repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
188
func_name
stringlengths
7
127
whole_func_string
stringlengths
77
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
77
3.91k
func_code_tokens
listlengths
20
745
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
477
split_name
stringclasses
1 value
func_code_url
stringlengths
111
288
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java
Channels.writeFullyImpl
private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) throws IOException { while (bb.remaining() > 0) { int n = ch.write(bb); if (n <= 0) throw new RuntimeException("no bytes written"); } }
java
private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) throws IOException { while (bb.remaining() > 0) { int n = ch.write(bb); if (n <= 0) throw new RuntimeException("no bytes written"); } }
[ "private", "static", "void", "writeFullyImpl", "(", "WritableByteChannel", "ch", ",", "ByteBuffer", "bb", ")", "throws", "IOException", "{", "while", "(", "bb", ".", "remaining", "(", ")", ">", "0", ")", "{", "int", "n", "=", "ch", ".", "write", "(", "...
Write all remaining bytes in buffer to the given channel. If the channel is selectable then it must be configured blocking.
[ "Write", "all", "remaining", "bytes", "in", "buffer", "to", "the", "given", "channel", ".", "If", "the", "channel", "is", "selectable", "then", "it", "must", "be", "configured", "blocking", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L75-L83
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.writeUtf16Bom
private static void writeUtf16Bom(OutputStream stream, boolean bigEndian) throws IOException { if (bigEndian) { stream.write(-2); stream.write(-1); } else { stream.write(-1); stream.write(-2); } }
java
private static void writeUtf16Bom(OutputStream stream, boolean bigEndian) throws IOException { if (bigEndian) { stream.write(-2); stream.write(-1); } else { stream.write(-1); stream.write(-2); } }
[ "private", "static", "void", "writeUtf16Bom", "(", "OutputStream", "stream", ",", "boolean", "bigEndian", ")", "throws", "IOException", "{", "if", "(", "bigEndian", ")", "{", "stream", ".", "write", "(", "-", "2", ")", ";", "stream", ".", "write", "(", "...
Write a Byte Order Mark at the beginning of the file @param stream the FileOutputStream to write the BOM to @param bigEndian true if UTF 16 Big Endian or false if Low Endian @throws IOException if an IOException occurs. @since 1.0
[ "Write", "a", "Byte", "Order", "Mark", "at", "the", "beginning", "of", "the", "file" ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1825-L1833
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRActivity.java
LRActivity.addMeasureToVerb
public boolean addMeasureToVerb(Map<String, Object> properties) { String[] pathKeys = {"verb"}; return addChild("measure", properties, pathKeys); }
java
public boolean addMeasureToVerb(Map<String, Object> properties) { String[] pathKeys = {"verb"}; return addChild("measure", properties, pathKeys); }
[ "public", "boolean", "addMeasureToVerb", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "String", "[", "]", "pathKeys", "=", "{", "\"verb\"", "}", ";", "return", "addChild", "(", "\"measure\"", ",", "properties", ",", "pathKeys", ")...
Add an arbitrary map of key-value pairs as a measure to the verb @param properties @return True if added, false if not (due to missing required fields or lack of "verb")
[ "Add", "an", "arbitrary", "map", "of", "key", "-", "value", "pairs", "as", "a", "measure", "to", "the", "verb" ]
train
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L165-L169
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/Options.java
Options.setOption
public int setOption(String[] flags, int i) { int j = setOptionFlag(flags, i); if (j == i) { j = tlpParams.setOptionFlag(flags, i); } if (j == i) { throw new IllegalArgumentException("Unknown option: " + flags[i]); } return j; }
java
public int setOption(String[] flags, int i) { int j = setOptionFlag(flags, i); if (j == i) { j = tlpParams.setOptionFlag(flags, i); } if (j == i) { throw new IllegalArgumentException("Unknown option: " + flags[i]); } return j; }
[ "public", "int", "setOption", "(", "String", "[", "]", "flags", ",", "int", "i", ")", "{", "int", "j", "=", "setOptionFlag", "(", "flags", ",", "i", ")", ";", "if", "(", "j", "==", "i", ")", "{", "j", "=", "tlpParams", ".", "setOptionFlag", "(", ...
Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is set in the language-particular TreebankLangParserParams. No...
[ "Set", "an", "option", "based", "on", "a", "String", "array", "in", "the", "style", "of", "commandline", "flags", ".", "The", "option", "may", "be", "either", "one", "known", "by", "the", "Options", "object", "or", "one", "recognized", "by", "the", "Tree...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/Options.java#L167-L176
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/Parser.java
Parser.parseLong
public static long parseLong(String s, int beginIndex, int endIndex) { // Fallback to default implementation in case the string is long if (endIndex - beginIndex > 16) { return Long.parseLong(s.substring(beginIndex, endIndex)); } long res = digitAt(s, beginIndex); for (beginIndex++; beginIndex...
java
public static long parseLong(String s, int beginIndex, int endIndex) { // Fallback to default implementation in case the string is long if (endIndex - beginIndex > 16) { return Long.parseLong(s.substring(beginIndex, endIndex)); } long res = digitAt(s, beginIndex); for (beginIndex++; beginIndex...
[ "public", "static", "long", "parseLong", "(", "String", "s", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "// Fallback to default implementation in case the string is long", "if", "(", "endIndex", "-", "beginIndex", ">", "16", ")", "{", "return", "L...
Faster version of {@link Long#parseLong(String)} when parsing a substring is required @param s string to parse @param beginIndex begin index @param endIndex end index @return long value
[ "Faster", "version", "of", "{", "@link", "Long#parseLong", "(", "String", ")", "}", "when", "parsing", "a", "substring", "is", "required" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/Parser.java#L704-L714
liferay/com-liferay-commerce
commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountUtil.java
CommerceDiscountUtil.findByUUID_G
public static CommerceDiscount findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.discount.exception.NoSuchDiscountException { return getPersistence().findByUUID_G(uuid, groupId); }
java
public static CommerceDiscount findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.discount.exception.NoSuchDiscountException { return getPersistence().findByUUID_G(uuid, groupId); }
[ "public", "static", "CommerceDiscount", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "discount", ".", "exception", ".", "NoSuchDiscountException", "{", "return", "getPersistence", "(", ...
Returns the commerce discount where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscountException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce discount @throws NoSuchDiscountException if a matching commerce discount could not be found
[ "Returns", "the", "commerce", "discount", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchDiscountException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountUtil.java#L280-L283
liyiorg/weixin-popular
src/main/java/weixin/popular/api/QrcodeAPI.java
QrcodeAPI.wxaappCreatewxaqrcode
public static BufferedImage wxaappCreatewxaqrcode(String access_token,Wxaqrcode wxaqrcode){ String json = JsonUtil.toJSONString(wxaqrcode); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/cgi-bin/wxaapp/createwxaqrcode") .addParameter(PARAM_A...
java
public static BufferedImage wxaappCreatewxaqrcode(String access_token,Wxaqrcode wxaqrcode){ String json = JsonUtil.toJSONString(wxaqrcode); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/cgi-bin/wxaapp/createwxaqrcode") .addParameter(PARAM_A...
[ "public", "static", "BufferedImage", "wxaappCreatewxaqrcode", "(", "String", "access_token", ",", "Wxaqrcode", "wxaqrcode", ")", "{", "String", "json", "=", "JsonUtil", ".", "toJSONString", "(", "wxaqrcode", ")", ";", "HttpUriRequest", "httpUriRequest", "=", "Reques...
获取小程序页面二维码 <br> 小程序码使用 使用 WxaAPI.getwxacode 或 WxaAPI.getwxacodeunlimit @since 2.8.8 @param access_token access_token @param wxaqrcode wxaqrcode @return BufferedImage
[ "获取小程序页面二维码", "<br", ">", "小程序码使用", "使用", "WxaAPI", ".", "getwxacode", "或", "WxaAPI", ".", "getwxacodeunlimit" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/QrcodeAPI.java#L117-L127
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.asJTSGeometry
public static <T extends Geometry> JTSGeometryExpression<T> asJTSGeometry( Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); return new JTSGeometryExpression<T>(underlyingMixin) { private static final long serialVersionUID = -671404400557042000...
java
public static <T extends Geometry> JTSGeometryExpression<T> asJTSGeometry( Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); return new JTSGeometryExpression<T>(underlyingMixin) { private static final long serialVersionUID = -671404400557042000...
[ "public", "static", "<", "T", "extends", "Geometry", ">", "JTSGeometryExpression", "<", "T", ">", "asJTSGeometry", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "("...
Create a new JTSGeometryExpression @param expr Expression of type Geometry @return new JTSGeometryExpression
[ "Create", "a", "new", "JTSGeometryExpression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L268-L281
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java
DatabaseBlobAuditingPoliciesInner.createOrUpdateAsync
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceRespo...
java
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceRespo...
[ "public", "Observable", "<", "DatabaseBlobAuditingPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "DatabaseBlobAuditingPolicyInner", "parameters", ")", "{", "return", "createOrUpd...
Creates or updates a database's blob auditing policy. @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 databaseName The name of the database. @param parameter...
[ "Creates", "or", "updates", "a", "database", "s", "blob", "auditing", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java#L202-L209
javers/javers
javers-core/src/main/java/org/javers/core/Changes.java
Changes.groupByCommit
public List<ChangesByCommit> groupByCommit() { Map<CommitMetadata, List<Change>> changesByCommit = changes.stream().collect( groupingBy(c -> c.getCommitMetadata().orElseThrow( () -> new IllegalStateException("No CommitMetadata in this Change")), () -> new LinkedHashMap...
java
public List<ChangesByCommit> groupByCommit() { Map<CommitMetadata, List<Change>> changesByCommit = changes.stream().collect( groupingBy(c -> c.getCommitMetadata().orElseThrow( () -> new IllegalStateException("No CommitMetadata in this Change")), () -> new LinkedHashMap...
[ "public", "List", "<", "ChangesByCommit", ">", "groupByCommit", "(", ")", "{", "Map", "<", "CommitMetadata", ",", "List", "<", "Change", ">", ">", "changesByCommit", "=", "changes", ".", "stream", "(", ")", ".", "collect", "(", "groupingBy", "(", "c", "-...
Changes grouped by commits. <br/> When formatting a changelog, usually you need to group changes by commits and then by objects. <br/><br/> For example, this changelog: <pre> commit 2.0 changes on Employee/Frodo : - ValueChange{ 'salary' changed from '10000' to '11000' } - ListChange{ 'subordinates' collection change...
[ "Changes", "grouped", "by", "commits", ".", "<br", "/", ">" ]
train
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/Changes.java#L84-L95
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/security/LoginForm.java
LoginForm.getAuthentication
public Authentication getAuthentication() { String username = getValueModel(LoginDetails.PROPERTY_USERNAME, String.class).getValue(); String password = getValueModel(LoginDetails.PROPERTY_PASSWORD, String.class).getValue(); return new UsernamePasswordAuthenticationToken( username, password ); ...
java
public Authentication getAuthentication() { String username = getValueModel(LoginDetails.PROPERTY_USERNAME, String.class).getValue(); String password = getValueModel(LoginDetails.PROPERTY_PASSWORD, String.class).getValue(); return new UsernamePasswordAuthenticationToken( username, password ); ...
[ "public", "Authentication", "getAuthentication", "(", ")", "{", "String", "username", "=", "getValueModel", "(", "LoginDetails", ".", "PROPERTY_USERNAME", ",", "String", ".", "class", ")", ".", "getValue", "(", ")", ";", "String", "password", "=", "getValueModel...
Get an Authentication token that contains the current username and password. @return authentication token
[ "Get", "an", "Authentication", "token", "that", "contains", "the", "current", "username", "and", "password", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/security/LoginForm.java#L58-L62
EXIficient/exificient-core
src/main/java/com/siemens/ct/exi/core/io/channel/BitEncoderChannel.java
BitEncoderChannel.encodeNBitUnsignedInteger
public void encodeNBitUnsignedInteger(int b, int n) throws IOException { if (b < 0 || n < 0) { throw new IllegalArgumentException( "Encode negative value as unsigned integer is invalid!"); } assert (b >= 0); assert (n >= 0); ostream.writeBits(b, n); }
java
public void encodeNBitUnsignedInteger(int b, int n) throws IOException { if (b < 0 || n < 0) { throw new IllegalArgumentException( "Encode negative value as unsigned integer is invalid!"); } assert (b >= 0); assert (n >= 0); ostream.writeBits(b, n); }
[ "public", "void", "encodeNBitUnsignedInteger", "(", "int", "b", ",", "int", "n", ")", "throws", "IOException", "{", "if", "(", "b", "<", "0", "||", "n", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Encode negative value as unsigned i...
Encode n-bit unsigned integer. The n least significant bits of parameter b starting with the most significant, i.e. from left to right.
[ "Encode", "n", "-", "bit", "unsigned", "integer", ".", "The", "n", "least", "significant", "bits", "of", "parameter", "b", "starting", "with", "the", "most", "significant", "i", ".", "e", ".", "from", "left", "to", "right", "." ]
train
https://github.com/EXIficient/exificient-core/blob/b6026c5fd39e9cc3d7874caa20f084e264e0ddc7/src/main/java/com/siemens/ct/exi/core/io/channel/BitEncoderChannel.java#L90-L99
undertow-io/undertow
core/src/main/java/io/undertow/util/ETagUtils.java
ETagUtils.handleIfMatch
public static boolean handleIfMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) { return handleIfMatch(exchange.getRequestHeaders().getFirst(Headers.IF_MATCH), etags, allowWeak); }
java
public static boolean handleIfMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) { return handleIfMatch(exchange.getRequestHeaders().getFirst(Headers.IF_MATCH), etags, allowWeak); }
[ "public", "static", "boolean", "handleIfMatch", "(", "final", "HttpServerExchange", "exchange", ",", "final", "List", "<", "ETag", ">", "etags", ",", "boolean", "allowWeak", ")", "{", "return", "handleIfMatch", "(", "exchange", ".", "getRequestHeaders", "(", ")"...
Handles the if-match header. returns true if the request should proceed, false otherwise @param exchange the exchange @param etags The etags @return
[ "Handles", "the", "if", "-", "match", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ETagUtils.java#L55-L57
gocd/gocd
base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java
DirectoryScanner.setBasedir
public DirectoryScanner setBasedir(String basedir) { setBasedir(basedir == null ? null : new File(basedir.replace('/', File.separatorChar).replace( '\\', File.separatorChar))); return this; }
java
public DirectoryScanner setBasedir(String basedir) { setBasedir(basedir == null ? null : new File(basedir.replace('/', File.separatorChar).replace( '\\', File.separatorChar))); return this; }
[ "public", "DirectoryScanner", "setBasedir", "(", "String", "basedir", ")", "{", "setBasedir", "(", "basedir", "==", "null", "?", "null", ":", "new", "File", "(", "basedir", ".", "replace", "(", "'", "'", ",", "File", ".", "separatorChar", ")", ".", "repl...
Set the base directory to be scanned. This is the directory which is scanned recursively. All '/' and '\' characters are replaced by <code>File.separatorChar</code>, so the separator used need not match <code>File.separatorChar</code>. @param basedir The base directory to scan.
[ "Set", "the", "base", "directory", "to", "be", "scanned", ".", "This", "is", "the", "directory", "which", "is", "scanned", "recursively", ".", "All", "/", "and", "\\", "characters", "are", "replaced", "by", "<code", ">", "File", ".", "separatorChar<", "/",...
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java#L557-L562
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java
DispatcherBase.obtainIntConfigParameter
protected static int obtainIntConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, int minValue, int maxValue) { int value = Integer.parseInt(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
java
protected static int obtainIntConfigParameter(MessageStoreImpl msi, String parameterName, String defaultValue, int minValue, int maxValue) { int value = Integer.parseInt(defaultValue); if (msi != null) { String strValue = msi.getProperty(parameterName, defaultValue); ...
[ "protected", "static", "int", "obtainIntConfigParameter", "(", "MessageStoreImpl", "msi", ",", "String", "parameterName", ",", "String", "defaultValue", ",", "int", "minValue", ",", "int", "maxValue", ")", "{", "int", "value", "=", "Integer", ".", "parseInt", "(...
Obtains the value of an integer configuration parameter given its name, the default value and 'reasonable' minimum and maximum values. @param msi The Message Store instance to obtain the parameters (may be null) @param parameterName The parameter's name @param defaultValue The default value @param minValue A reasonable...
[ "Obtains", "the", "value", "of", "an", "integer", "configuration", "parameter", "given", "its", "name", "the", "default", "value", "and", "reasonable", "minimum", "and", "maximum", "values", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/dispatcher/DispatcherBase.java#L38-L70
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.updateProject
public Project updateProject(UUID projectId, Project updatedProject) { return updateProjectWithServiceResponseAsync(projectId, updatedProject).toBlocking().single().body(); }
java
public Project updateProject(UUID projectId, Project updatedProject) { return updateProjectWithServiceResponseAsync(projectId, updatedProject).toBlocking().single().body(); }
[ "public", "Project", "updateProject", "(", "UUID", "projectId", ",", "Project", "updatedProject", ")", "{", "return", "updateProjectWithServiceResponseAsync", "(", "projectId", ",", "updatedProject", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", ...
Update a specific project. @param projectId The id of the project to update @param updatedProject The updated project model @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exc...
[ "Update", "a", "specific", "project", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L2123-L2125
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltCompiler.java
VoltCompiler.debugVerifyCatalog
private void debugVerifyCatalog(InMemoryJarfile origJarFile, Catalog origCatalog) { final VoltCompiler autoGenCompiler = new VoltCompiler(m_isXDCR); // Make the new compiler use the original jarfile's classloader so it can // pull in the class files for procedures and imports autoGen...
java
private void debugVerifyCatalog(InMemoryJarfile origJarFile, Catalog origCatalog) { final VoltCompiler autoGenCompiler = new VoltCompiler(m_isXDCR); // Make the new compiler use the original jarfile's classloader so it can // pull in the class files for procedures and imports autoGen...
[ "private", "void", "debugVerifyCatalog", "(", "InMemoryJarfile", "origJarFile", ",", "Catalog", "origCatalog", ")", "{", "final", "VoltCompiler", "autoGenCompiler", "=", "new", "VoltCompiler", "(", "m_isXDCR", ")", ";", "// Make the new compiler use the original jarfile's c...
Internal method that takes the generated DDL from the catalog and builds a new catalog. The generated catalog is diffed with the original catalog to verify compilation and catalog generation consistency.
[ "Internal", "method", "that", "takes", "the", "generated", "DDL", "from", "the", "catalog", "and", "builds", "a", "new", "catalog", ".", "The", "generated", "catalog", "is", "diffed", "with", "the", "original", "catalog", "to", "verify", "compilation", "and", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L647-L695
VoltDB/voltdb
src/frontend/org/voltdb/planner/FilterMatcher.java
FilterMatcher.childrenMatch
private static boolean childrenMatch(AbstractExpression e1, AbstractExpression e2) { return new FilterMatcher(e1.getLeft(), e2.getLeft()).match() && new FilterMatcher(e1.getRight(), e2.getRight()).match(); }
java
private static boolean childrenMatch(AbstractExpression e1, AbstractExpression e2) { return new FilterMatcher(e1.getLeft(), e2.getLeft()).match() && new FilterMatcher(e1.getRight(), e2.getRight()).match(); }
[ "private", "static", "boolean", "childrenMatch", "(", "AbstractExpression", "e1", ",", "AbstractExpression", "e2", ")", "{", "return", "new", "FilterMatcher", "(", "e1", ".", "getLeft", "(", ")", ",", "e2", ".", "getLeft", "(", ")", ")", ".", "match", "(",...
Check that getLeft() and getRight() of the two expressions match. @param e1 first expression @param e2 second expression @return whether first's getLeft() matches with second's getLeft(), and first's getRight() matches second's getRight().
[ "Check", "that", "getLeft", "()", "and", "getRight", "()", "of", "the", "two", "expressions", "match", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/FilterMatcher.java#L113-L116
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/UrlTool.java
UrlTool.getRestUrl
public String getRestUrl(String urlKey, Boolean addClientId) throws UnsupportedEncodingException { return getRestUrl(urlKey, addClientId, null, null); }
java
public String getRestUrl(String urlKey, Boolean addClientId) throws UnsupportedEncodingException { return getRestUrl(urlKey, addClientId, null, null); }
[ "public", "String", "getRestUrl", "(", "String", "urlKey", ",", "Boolean", "addClientId", ")", "throws", "UnsupportedEncodingException", "{", "return", "getRestUrl", "(", "urlKey", ",", "addClientId", ",", "null", ",", "null", ")", ";", "}" ]
Gets REST url. @param urlKey Url key. @param addClientId Denotes whether client identifier should be composed into final url. @return Final REST url. @throws UnsupportedEncodingException
[ "Gets", "REST", "url", "." ]
train
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/UrlTool.java#L58-L60
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobLauncherFactory.java
JobLauncherFactory.newJobLauncher
public static JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, String launcherTypeValue, SharedResourcesBroker<GobblinScopeTypes> instanceBroker, List<? extends Tag<?>> metadataTags) { Optional<JobLauncherType> launcherType = Enums.getIfPresent(JobLauncherType.class, launcherTypeValue); ...
java
public static JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, String launcherTypeValue, SharedResourcesBroker<GobblinScopeTypes> instanceBroker, List<? extends Tag<?>> metadataTags) { Optional<JobLauncherType> launcherType = Enums.getIfPresent(JobLauncherType.class, launcherTypeValue); ...
[ "public", "static", "JobLauncher", "newJobLauncher", "(", "Properties", "sysProps", ",", "Properties", "jobProps", ",", "String", "launcherTypeValue", ",", "SharedResourcesBroker", "<", "GobblinScopeTypes", ">", "instanceBroker", ",", "List", "<", "?", "extends", "Tag...
Creates a new instance for a JobLauncher with a given type @param sysProps the system/environment properties @param jobProps the job properties @param launcherTypeValue the type of the launcher; either a {@link JobLauncherType} value or the name of the class that extends {@link AbstractJobLauncher} an...
[ "Creates", "a", "new", "instance", "for", "a", "JobLauncher", "with", "a", "given", "type" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobLauncherFactory.java#L136-L160
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseNewExpression
private Expr parseNewExpression(EnclosingScope scope, boolean terminated) { int start = index; // try to match a lifetime Identifier lifetime = parseOptionalLifetimeIdentifier(scope, terminated); if (lifetime != null) { scope.mustBeLifetime(lifetime); match(Colon); } else { // FIXME: this should real...
java
private Expr parseNewExpression(EnclosingScope scope, boolean terminated) { int start = index; // try to match a lifetime Identifier lifetime = parseOptionalLifetimeIdentifier(scope, terminated); if (lifetime != null) { scope.mustBeLifetime(lifetime); match(Colon); } else { // FIXME: this should real...
[ "private", "Expr", "parseNewExpression", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "int", "start", "=", "index", ";", "// try to match a lifetime", "Identifier", "lifetime", "=", "parseOptionalLifetimeIdentifier", "(", "scope", ",", "term...
Parse a new expression, which is of the form: <pre> TermExpr::= ... | "new" Expr | Lifetime ":" "new" Identifier Expr </pre> @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @param terminated This indicates tha...
[ "Parse", "a", "new", "expression", "which", "is", "of", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2844-L2858
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/BitFieldReader.java
BitFieldReader.loadIndeces
public int loadIndeces(List<RowIndexEntry> rowIndexEntries, int startIndex) { int updatedStartIndex = input.loadIndeces(rowIndexEntries, startIndex); int numIndeces = rowIndexEntries.size(); indeces = new int[numIndeces + 1]; int i = 0; for (RowIndexEntry rowIndexEntry : rowIndexEntries) { in...
java
public int loadIndeces(List<RowIndexEntry> rowIndexEntries, int startIndex) { int updatedStartIndex = input.loadIndeces(rowIndexEntries, startIndex); int numIndeces = rowIndexEntries.size(); indeces = new int[numIndeces + 1]; int i = 0; for (RowIndexEntry rowIndexEntry : rowIndexEntries) { in...
[ "public", "int", "loadIndeces", "(", "List", "<", "RowIndexEntry", ">", "rowIndexEntries", ",", "int", "startIndex", ")", "{", "int", "updatedStartIndex", "=", "input", ".", "loadIndeces", "(", "rowIndexEntries", ",", "startIndex", ")", ";", "int", "numIndeces",...
Read in the number of bytes consumed at each index entry and store it, also call loadIndeces on child stream and return the index of the next streams indexes.
[ "Read", "in", "the", "number", "of", "bytes", "consumed", "at", "each", "index", "entry", "and", "store", "it", "also", "call", "loadIndeces", "on", "child", "stream", "and", "return", "the", "index", "of", "the", "next", "streams", "indexes", "." ]
train
https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/BitFieldReader.java#L80-L91
BoltsFramework/Bolts-Android
bolts-applinks/src/main/java/bolts/AppLinks.java
AppLinks.getTargetUrlFromInboundIntent
public static Uri getTargetUrlFromInboundIntent(Context context, Intent intent) { Bundle appLinkData = getAppLinkData(intent); if (appLinkData != null) { String targetString = appLinkData.getString(KEY_NAME_TARGET); if (targetString != null) { MeasurementEvent.sendBroadcastEvent(context, Mea...
java
public static Uri getTargetUrlFromInboundIntent(Context context, Intent intent) { Bundle appLinkData = getAppLinkData(intent); if (appLinkData != null) { String targetString = appLinkData.getString(KEY_NAME_TARGET); if (targetString != null) { MeasurementEvent.sendBroadcastEvent(context, Mea...
[ "public", "static", "Uri", "getTargetUrlFromInboundIntent", "(", "Context", "context", ",", "Intent", "intent", ")", "{", "Bundle", "appLinkData", "=", "getAppLinkData", "(", "intent", ")", ";", "if", "(", "appLinkData", "!=", "null", ")", "{", "String", "targ...
Gets the target URL for an intent. If the intent is from an App Link, this will be the App Link target. Otherwise, it return null; For app link intent, this function will broadcast APP_LINK_NAVIGATE_IN_EVENT_NAME event. @param context the context this function is called within. @param intent the incoming intent. @retu...
[ "Gets", "the", "target", "URL", "for", "an", "intent", ".", "If", "the", "intent", "is", "from", "an", "App", "Link", "this", "will", "be", "the", "App", "Link", "target", ".", "Otherwise", "it", "return", "null", ";", "For", "app", "link", "intent", ...
train
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-applinks/src/main/java/bolts/AppLinks.java#L78-L88
joniles/mpxj
src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java
ConceptDrawProjectReader.readResourceAssignment
private void readResourceAssignment(Task task, Document.Projects.Project.Task.ResourceAssignments.ResourceAssignment assignment) { Resource resource = m_projectFile.getResourceByUniqueID(assignment.getResourceID()); if (resource != null) { ResourceAssignment mpxjAssignment = task.addResour...
java
private void readResourceAssignment(Task task, Document.Projects.Project.Task.ResourceAssignments.ResourceAssignment assignment) { Resource resource = m_projectFile.getResourceByUniqueID(assignment.getResourceID()); if (resource != null) { ResourceAssignment mpxjAssignment = task.addResour...
[ "private", "void", "readResourceAssignment", "(", "Task", "task", ",", "Document", ".", "Projects", ".", "Project", ".", "Task", ".", "ResourceAssignments", ".", "ResourceAssignment", "assignment", ")", "{", "Resource", "resource", "=", "m_projectFile", ".", "getR...
Read resource assignments. @param task Parent task @param assignment ConceptDraw PROJECT resource assignment
[ "Read", "resource", "assignments", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L466-L476
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/FileIoUtil.java
FileIoUtil.readPropertiesBoolean
public static boolean readPropertiesBoolean(Properties _props, String _property) { if (_props.containsKey(_property)) { if (_props.getProperty(_property).matches("(?i)(1|yes|true|enabled|on|y)")) { return true; } } return false; }
java
public static boolean readPropertiesBoolean(Properties _props, String _property) { if (_props.containsKey(_property)) { if (_props.getProperty(_property).matches("(?i)(1|yes|true|enabled|on|y)")) { return true; } } return false; }
[ "public", "static", "boolean", "readPropertiesBoolean", "(", "Properties", "_props", ",", "String", "_property", ")", "{", "if", "(", "_props", ".", "containsKey", "(", "_property", ")", ")", "{", "if", "(", "_props", ".", "getProperty", "(", "_property", ")...
Reads a property as boolean from an properties object. Returns true if read property matches 1, yes, true, enabled, on, y @param _props @param _property @return
[ "Reads", "a", "property", "as", "boolean", "from", "an", "properties", "object", ".", "Returns", "true", "if", "read", "property", "matches", "1", "yes", "true", "enabled", "on", "y" ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/FileIoUtil.java#L129-L136
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/AbstractSecureRedirectStrategy.java
AbstractSecureRedirectStrategy.makeInsecure
@Override public void makeInsecure(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.setHeader("Location", insecureUrl(request, response)); response.getOutputStream().flush(); response.getOutputStream()...
java
@Override public void makeInsecure(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.setHeader("Location", insecureUrl(request, response)); response.getOutputStream().flush(); response.getOutputStream()...
[ "@", "Override", "public", "void", "makeInsecure", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "response", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_MOVED_PERMANENTLY", ")", ";", "respon...
Sends a moved perminately redirect to the insecure form of the request URL. @request the request to make secure. @response the response for the request.
[ "Sends", "a", "moved", "perminately", "redirect", "to", "the", "insecure", "form", "of", "the", "request", "URL", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/AbstractSecureRedirectStrategy.java#L170-L176
eclipse/xtext-core
org.eclipse.xtext/xtend-gen/org/eclipse/xtext/generator/trace/node/GeneratorNodeExtensions.java
GeneratorNodeExtensions.appendTemplate
public CompositeGeneratorNode appendTemplate(final CompositeGeneratorNode parent, final StringConcatenationClient templateString) { final TemplateNode proc = new TemplateNode(templateString, this); List<IGeneratorNode> _children = parent.getChildren(); _children.add(proc); return parent; }
java
public CompositeGeneratorNode appendTemplate(final CompositeGeneratorNode parent, final StringConcatenationClient templateString) { final TemplateNode proc = new TemplateNode(templateString, this); List<IGeneratorNode> _children = parent.getChildren(); _children.add(proc); return parent; }
[ "public", "CompositeGeneratorNode", "appendTemplate", "(", "final", "CompositeGeneratorNode", "parent", ",", "final", "StringConcatenationClient", "templateString", ")", "{", "final", "TemplateNode", "proc", "=", "new", "TemplateNode", "(", "templateString", ",", "this", ...
Creates a template node for the given templateString and appends it to the given parent node. Templates are translated to generator node trees and expressions in templates can be of type IGeneratorNode. @return the given parent node
[ "Creates", "a", "template", "node", "for", "the", "given", "templateString", "and", "appends", "it", "to", "the", "given", "parent", "node", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/generator/trace/node/GeneratorNodeExtensions.java#L161-L166
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/provisioning/OptionsApi.java
OptionsApi.getOptions
public Options getOptions(String personDBID, String agentGroupDBID) throws ProvisioningApiException { try { OptionsGetResponseSuccess resp = optionsApi.optionsGet( personDBID, agentGroupDBID ); if (!resp.getStatus().getCode().eq...
java
public Options getOptions(String personDBID, String agentGroupDBID) throws ProvisioningApiException { try { OptionsGetResponseSuccess resp = optionsApi.optionsGet( personDBID, agentGroupDBID ); if (!resp.getStatus().getCode().eq...
[ "public", "Options", "getOptions", "(", "String", "personDBID", ",", "String", "agentGroupDBID", ")", "throws", "ProvisioningApiException", "{", "try", "{", "OptionsGetResponseSuccess", "resp", "=", "optionsApi", ".", "optionsGet", "(", "personDBID", ",", "agentGroupD...
Get options. Get options for a specified application and merge them with the person and agent group annexes. @param personDBID The DBID of a person. Options are merged with the person&#39;s annex and the annexes of the person&#39;s agent groups. Mutual with agent_group_dbid. (optional) @param agentGroupDBID The D...
[ "Get", "options", ".", "Get", "options", "for", "a", "specified", "application", "and", "merge", "them", "with", "the", "person", "and", "agent", "group", "annexes", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/OptionsApi.java#L31-L52
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/AgentPoolsInner.java
AgentPoolsInner.listAsync
public Observable<Page<AgentPoolInner>> listAsync(final String resourceGroupName, final String managedClusterName) { return listWithServiceResponseAsync(resourceGroupName, managedClusterName) .map(new Func1<ServiceResponse<Page<AgentPoolInner>>, Page<AgentPoolInner>>() { @Override ...
java
public Observable<Page<AgentPoolInner>> listAsync(final String resourceGroupName, final String managedClusterName) { return listWithServiceResponseAsync(resourceGroupName, managedClusterName) .map(new Func1<ServiceResponse<Page<AgentPoolInner>>, Page<AgentPoolInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "AgentPoolInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "managedClusterName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "managedClu...
Gets a list of agent pools in the specified managed cluster. Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. @param resourceGroupName The name of the resource group. @param managedClusterName The name of the managed cluster resource. @throws IllegalArgu...
[ "Gets", "a", "list", "of", "agent", "pools", "in", "the", "specified", "managed", "cluster", ".", "Gets", "a", "list", "of", "agent", "pools", "in", "the", "specified", "managed", "cluster", ".", "The", "operation", "returns", "properties", "of", "each", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/AgentPoolsInner.java#L146-L154
Bedework/bw-util
bw-util-xml/src/main/java/org/bedework/util/xml/XmlUtil.java
XmlUtil.getAttrVal
public static String getAttrVal(final NamedNodeMap nnm, final String name) { Node nmAttr = nnm.getNamedItem(name); if ((nmAttr == null) || (absent(nmAttr.getNodeValue()))) { return null; } return nmAttr.getNodeValue(); }
java
public static String getAttrVal(final NamedNodeMap nnm, final String name) { Node nmAttr = nnm.getNamedItem(name); if ((nmAttr == null) || (absent(nmAttr.getNodeValue()))) { return null; } return nmAttr.getNodeValue(); }
[ "public", "static", "String", "getAttrVal", "(", "final", "NamedNodeMap", "nnm", ",", "final", "String", "name", ")", "{", "Node", "nmAttr", "=", "nnm", ".", "getNamedItem", "(", "name", ")", ";", "if", "(", "(", "nmAttr", "==", "null", ")", "||", "(",...
Return the attribute value of the named attribute from the given map. @param nnm NamedNodeMap @param name String name of desired attribute @return String attribute value or null
[ "Return", "the", "attribute", "value", "of", "the", "named", "attribute", "from", "the", "given", "map", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-xml/src/main/java/org/bedework/util/xml/XmlUtil.java#L252-L260
Stratio/deep-spark
deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java
CassandraCell.create
public static Cell create(String cellName, Object cellValue) { return create(cellName, cellValue, Boolean.FALSE, Boolean.FALSE); }
java
public static Cell create(String cellName, Object cellValue) { return create(cellName, cellValue, Boolean.FALSE, Boolean.FALSE); }
[ "public", "static", "Cell", "create", "(", "String", "cellName", ",", "Object", "cellValue", ")", "{", "return", "create", "(", "cellName", ",", "cellValue", ",", "Boolean", ".", "FALSE", ",", "Boolean", ".", "FALSE", ")", ";", "}" ]
Factory method, builds a new CassandraCell (isPartitionKey = false and isClusterKey = false). The validator will be automatically calculated using the value object type. @param cellName the cell name @param cellValue the cell value, provided as a ByteBuffer. @return an instance of a Cell object for the provided param...
[ "Factory", "method", "builds", "a", "new", "CassandraCell", "(", "isPartitionKey", "=", "false", "and", "isClusterKey", "=", "false", ")", ".", "The", "validator", "will", "be", "automatically", "calculated", "using", "the", "value", "object", "type", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java#L72-L74
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.deleteTag
public void deleteTag(Serializable projectId, String tagName) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabTag.URL + "/" + tagName; retrieve().method(DELETE).to(tailUrl, Void.class); }
java
public void deleteTag(Serializable projectId, String tagName) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabTag.URL + "/" + tagName; retrieve().method(DELETE).to(tailUrl, Void.class); }
[ "public", "void", "deleteTag", "(", "Serializable", "projectId", ",", "String", "tagName", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "sanitizeProjectId", "(", "projectId", ")", "+", "GitlabTag", ...
Delete tag in specific project @param projectId @param tagName @throws IOException on gitlab api call error
[ "Delete", "tag", "in", "specific", "project" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3427-L3430
gallandarakhneorg/afc
core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java
MathUtil.isEpsilonEqual
@Pure public static boolean isEpsilonEqual(double v1, double v2, double epsilon) { if (Double.isInfinite(v1)) { return Double.isInfinite(v2) && Math.signum(v1) == Math.signum(v2); } else if (Double.isNaN(v1)) { return false; } final double value = Math.abs(v1 - v2); final double eps = Double.isNaN(epsi...
java
@Pure public static boolean isEpsilonEqual(double v1, double v2, double epsilon) { if (Double.isInfinite(v1)) { return Double.isInfinite(v2) && Math.signum(v1) == Math.signum(v2); } else if (Double.isNaN(v1)) { return false; } final double value = Math.abs(v1 - v2); final double eps = Double.isNaN(epsi...
[ "@", "Pure", "public", "static", "boolean", "isEpsilonEqual", "(", "double", "v1", ",", "double", "v2", ",", "double", "epsilon", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "v1", ")", ")", "{", "return", "Double", ".", "isInfinite", "(", "v...
Replies if the given values are near. @param v1 first value. @param v2 second value. @param epsilon the approximation epsilon. If {@link Double#NaN}, the function {@link Math#ulp(double)} is used for evaluating the epsilon. @return <code>true</code> if the given {@code v1} is near {@code v2}, otherwise <code>false</co...
[ "Replies", "if", "the", "given", "values", "are", "near", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgen/src/main/java/org/arakhne/afc/math/MathUtil.java#L166-L176
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/util/EntityUtils.java
EntityUtils.isNullValue
public static boolean isNullValue(Entity entity, Attribute attribute) { boolean isNullValue; String attributeName = attribute.getName(); AttributeType attributeType = attribute.getDataType(); switch (attributeType) { case BOOL: isNullValue = entity.getBoolean(attributeName) == null; ...
java
public static boolean isNullValue(Entity entity, Attribute attribute) { boolean isNullValue; String attributeName = attribute.getName(); AttributeType attributeType = attribute.getDataType(); switch (attributeType) { case BOOL: isNullValue = entity.getBoolean(attributeName) == null; ...
[ "public", "static", "boolean", "isNullValue", "(", "Entity", "entity", ",", "Attribute", "attribute", ")", "{", "boolean", "isNullValue", ";", "String", "attributeName", "=", "attribute", ".", "getName", "(", ")", ";", "AttributeType", "attributeType", "=", "att...
Returns whether an entity attribute value is <tt>null</tt> or empty for attributes referencing multiple entities.
[ "Returns", "whether", "an", "entity", "attribute", "value", "is", "<tt", ">", "null<", "/", "tt", ">", "or", "empty", "for", "attributes", "referencing", "multiple", "entities", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/util/EntityUtils.java#L553-L602
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/DockerPathUtil.java
DockerPathUtil.resolveAbsolutely
public static File resolveAbsolutely(String pathToResolve, String baseDir) { // TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to "/" and a relative path of "../../foo". File fileToResolve = new File(pathToResolve); if (fileToResolve...
java
public static File resolveAbsolutely(String pathToResolve, String baseDir) { // TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to "/" and a relative path of "../../foo". File fileToResolve = new File(pathToResolve); if (fileToResolve...
[ "public", "static", "File", "resolveAbsolutely", "(", "String", "pathToResolve", ",", "String", "baseDir", ")", "{", "// TODO: handle the case where pathToResolve specifies a non-existent path, for example, a base directory equal to \"/\" and a relative path of \"../../foo\".", "File", "...
Resolves the supplied resource (a path or directory on the filesystem) relative the supplied {@code baseDir}. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. The returned file is <em>not</em> guaranteed to exist. <p> If the supplied {@code pathToResolve} is already {@link File#isAbso...
[ "Resolves", "the", "supplied", "resource", "(", "a", "path", "or", "directory", "on", "the", "filesystem", ")", "relative", "the", "supplied", "{", "@code", "baseDir", "}", ".", "The", "returned", "{", "@code", "File", "}", "is", "guaranteed", "to", "be", ...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/DockerPathUtil.java#L32-L56
denisneuling/cctrl.jar
cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java
ClassUtil.getValueOfField
public static Object getValueOfField(Field field, Object ref) { field.setAccessible(true); Object value = null; try { value = field.get(ref); } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } return value; }
java
public static Object getValueOfField(Field field, Object ref) { field.setAccessible(true); Object value = null; try { value = field.get(ref); } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } return value; }
[ "public", "static", "Object", "getValueOfField", "(", "Field", "field", ",", "Object", "ref", ")", "{", "field", ".", "setAccessible", "(", "true", ")", ";", "Object", "value", "=", "null", ";", "try", "{", "value", "=", "field", ".", "get", "(", "ref"...
<p> getValueOfField. </p> @param field a {@link java.lang.reflect.Field} object. @param ref a {@link java.lang.Object} object. @return a {@link java.lang.Object} object.
[ "<p", ">", "getValueOfField", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/cctrl.jar/blob/37450d824f4dc5ecbcc81c61e48f1ec876ca2de8/cctrl-api-client/src/main/java/com/cloudcontrolled/api/client/util/ClassUtil.java#L189-L198
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/RowMapper.java
RowMapper.build
public static RowMapper build(CFMetaData metadata, ColumnDefinition columnDefinition, Schema schema) { if (metadata.clusteringColumns().size() > 0) { return new RowMapperWide(metadata, columnDefinition, schema); } else { return new RowMapperSkinny(metadata, columnDefinition, sche...
java
public static RowMapper build(CFMetaData metadata, ColumnDefinition columnDefinition, Schema schema) { if (metadata.clusteringColumns().size() > 0) { return new RowMapperWide(metadata, columnDefinition, schema); } else { return new RowMapperSkinny(metadata, columnDefinition, sche...
[ "public", "static", "RowMapper", "build", "(", "CFMetaData", "metadata", ",", "ColumnDefinition", "columnDefinition", ",", "Schema", "schema", ")", "{", "if", "(", "metadata", ".", "clusteringColumns", "(", ")", ".", "size", "(", ")", ">", "0", ")", "{", "...
Returns a new {@link RowMapper} for the specified column family metadata, indexed column definition and {@link Schema}. @param metadata The indexed column family metadata. @param columnDefinition The indexed column definition. @param schema The mapping {@link Schema}. @return A new {@link RowMapper} ...
[ "Returns", "a", "new", "{", "@link", "RowMapper", "}", "for", "the", "specified", "column", "family", "metadata", "indexed", "column", "definition", "and", "{", "@link", "Schema", "}", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/RowMapper.java#L76-L82
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java
XmlPrintStream.printElement
public void printElement(String elementName, Object value) { println("<" + elementName + ">" + (value == null ? "" : escape(value.toString())) + "</" + elementName + ">"); }
java
public void printElement(String elementName, Object value) { println("<" + elementName + ">" + (value == null ? "" : escape(value.toString())) + "</" + elementName + ">"); }
[ "public", "void", "printElement", "(", "String", "elementName", ",", "Object", "value", ")", "{", "println", "(", "\"<\"", "+", "elementName", "+", "\">\"", "+", "(", "value", "==", "null", "?", "\"\"", ":", "escape", "(", "value", ".", "toString", "(", ...
Output a complete element with the given content. @param elementName Name of element. @param value Content of element.
[ "Output", "a", "complete", "element", "with", "the", "given", "content", "." ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/util/XmlPrintStream.java#L109-L111
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabSetRenderer.java
WTabSetRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTabSet tabSet = (WTabSet) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:tabset"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", com...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTabSet tabSet = (WTabSet) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("ui:tabset"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", com...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTabSet", "tabSet", "=", "(", "WTabSet", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext"...
Paints the given WTabSet. @param component the WTabSet to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTabSet", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTabSetRenderer.java#L24-L52
threerings/nenya
core/src/main/java/com/threerings/util/KeyboardManager.java
KeyboardManager.notifyObservers
protected synchronized void notifyObservers (int id, int keyCode, long timestamp) { _keyOp.init(id, keyCode, timestamp); _observers.apply(_keyOp); }
java
protected synchronized void notifyObservers (int id, int keyCode, long timestamp) { _keyOp.init(id, keyCode, timestamp); _observers.apply(_keyOp); }
[ "protected", "synchronized", "void", "notifyObservers", "(", "int", "id", ",", "int", "keyCode", ",", "long", "timestamp", ")", "{", "_keyOp", ".", "init", "(", "id", ",", "keyCode", ",", "timestamp", ")", ";", "_observers", ".", "apply", "(", "_keyOp", ...
Notifies all registered key observers of the supplied key event. This method provides a thread-safe manner in which to notify the observers, which is necessary since the {@link KeyInfo} objects do various antics from the interval manager thread whilst we may do other notification from the AWT thread when normal key eve...
[ "Notifies", "all", "registered", "key", "observers", "of", "the", "supplied", "key", "event", ".", "This", "method", "provides", "a", "thread", "-", "safe", "manner", "in", "which", "to", "notify", "the", "observers", "which", "is", "necessary", "since", "th...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyboardManager.java#L384-L388
cycorp/api-suite
core-api/src/main/java/com/cyc/kb/exception/KbObjectNotFoundException.java
KbObjectNotFoundException.fromThrowable
public static KbObjectNotFoundException fromThrowable(String message, Throwable cause) { return (cause instanceof KbObjectNotFoundException && Objects.equals(message, cause.getMessage())) ? (KbObjectNotFoundException) cause : new KbObjectNotFoundException(message, cause); }
java
public static KbObjectNotFoundException fromThrowable(String message, Throwable cause) { return (cause instanceof KbObjectNotFoundException && Objects.equals(message, cause.getMessage())) ? (KbObjectNotFoundException) cause : new KbObjectNotFoundException(message, cause); }
[ "public", "static", "KbObjectNotFoundException", "fromThrowable", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "(", "cause", "instanceof", "KbObjectNotFoundException", "&&", "Objects", ".", "equals", "(", "message", ",", "cause", ".", "...
Converts a Throwable to a KbObjectNotFoundException with the specified detail message. If the Throwable is a KbObjectNotFoundException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in a new KbObjectNotFoundException with t...
[ "Converts", "a", "Throwable", "to", "a", "KbObjectNotFoundException", "with", "the", "specified", "detail", "message", ".", "If", "the", "Throwable", "is", "a", "KbObjectNotFoundException", "and", "if", "the", "Throwable", "s", "message", "is", "identical", "to", ...
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/kb/exception/KbObjectNotFoundException.java#L65-L69
cqframework/clinical_quality_language
Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java
Cql2ElmVisitor.getPropertyPath
private String getPropertyPath(Expression reference, String alias) { if (reference instanceof Property) { Property property = (Property)reference; if (alias.equals(property.getScope())) { return property.getPath(); } else if (property.getSource() !...
java
private String getPropertyPath(Expression reference, String alias) { if (reference instanceof Property) { Property property = (Property)reference; if (alias.equals(property.getScope())) { return property.getPath(); } else if (property.getSource() !...
[ "private", "String", "getPropertyPath", "(", "Expression", "reference", ",", "String", "alias", ")", "{", "if", "(", "reference", "instanceof", "Property", ")", "{", "Property", "property", "=", "(", "Property", ")", "reference", ";", "if", "(", "alias", "."...
Collapse a property path expression back to it's qualified form for use as the path attribute of the retrieve. @param reference the <code>Expression</code> to collapse @param alias the alias of the <code>Retrieve</code> in the query. @return The collapsed path operands (or sub-operands) were modified; <code>false</...
[ "Collapse", "a", "property", "path", "expression", "back", "to", "it", "s", "qualified", "form", "for", "use", "as", "the", "path", "attribute", "of", "the", "retrieve", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/Cql2ElmVisitor.java#L3058-L3073
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java
DifferentialFunctionFactory.maxPooling2d
public SDVariable maxPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { MaxPooling2D maxPooling2D = MaxPooling2D.builder() .input(input) .sameDiff(sameDiff()) .config(pooling2DConfig) .build(); return maxPooling2D.outputVariabl...
java
public SDVariable maxPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { MaxPooling2D maxPooling2D = MaxPooling2D.builder() .input(input) .sameDiff(sameDiff()) .config(pooling2DConfig) .build(); return maxPooling2D.outputVariabl...
[ "public", "SDVariable", "maxPooling2d", "(", "SDVariable", "input", ",", "Pooling2DConfig", "pooling2DConfig", ")", "{", "MaxPooling2D", "maxPooling2D", "=", "MaxPooling2D", ".", "builder", "(", ")", ".", "input", "(", "input", ")", ".", "sameDiff", "(", "sameDi...
Max pooling 2d operation. @param input the inputs to pooling @param pooling2DConfig the configuration @return
[ "Max", "pooling", "2d", "operation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java#L334-L342
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createPattern
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color) { checkWriter(); if ( xstep == 0.0f || ystep == 0.0f ) throw new RuntimeException("XStep or YStep can not be ZERO."); PdfPatternPainter painter = new PdfPatternPainter(writer, col...
java
public PdfPatternPainter createPattern(float width, float height, float xstep, float ystep, Color color) { checkWriter(); if ( xstep == 0.0f || ystep == 0.0f ) throw new RuntimeException("XStep or YStep can not be ZERO."); PdfPatternPainter painter = new PdfPatternPainter(writer, col...
[ "public", "PdfPatternPainter", "createPattern", "(", "float", "width", ",", "float", "height", ",", "float", "xstep", ",", "float", "ystep", ",", "Color", "color", ")", "{", "checkWriter", "(", ")", ";", "if", "(", "xstep", "==", "0.0f", "||", "ystep", "...
Create a new uncolored tiling pattern. @param width the width of the pattern @param height the height of the pattern @param xstep the desired horizontal spacing between pattern cells. May be either positive or negative, but not zero. @param ystep the desired vertical spacing between pattern cells. May be either positi...
[ "Create", "a", "new", "uncolored", "tiling", "pattern", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1954-L1965
ecclesia/kipeto
kipeto-core/src/main/java/de/ecclesia/kipeto/repository/WritingRepositoryStrategy.java
WritingRepositoryStrategy.storeStream
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException { Assert.isNotNull(id); Assert.isNotNull(inputStream); CountingInputStream countingInputStream = new CountingInputStream(inputStream); countingInputStream.addByteTransferListener(new ByteTransferListen...
java
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException { Assert.isNotNull(id); Assert.isNotNull(inputStream); CountingInputStream countingInputStream = new CountingInputStream(inputStream); countingInputStream.addByteTransferListener(new ByteTransferListen...
[ "public", "void", "storeStream", "(", "String", "id", ",", "InputStream", "inputStream", ",", "ByteTransferListener", "listener", ")", "throws", "IOException", "{", "Assert", ".", "isNotNull", "(", "id", ")", ";", "Assert", ".", "isNotNull", "(", "inputStream", ...
Speichert den übergebenen InputStream unter der angegebenen Id. Per Definition ist die Id der Hash des InputStreams. Falls unter der angegebenen Id also bereits ein Objekt anderer Länge gepeichert ist, schlägt das Speichern fehl. @param id Id des Objektes, unter der es abgelegt wird @param inputStream des zu speichern...
[ "Speichert", "den", "übergebenen", "InputStream", "unter", "der", "angegebenen", "Id", ".", "Per", "Definition", "ist", "die", "Id", "der", "Hash", "des", "InputStreams", ".", "Falls", "unter", "der", "angegebenen", "Id", "also", "bereits", "ein", "Objekt", "a...
train
https://github.com/ecclesia/kipeto/blob/ea39a10ae4eaa550f71a856ab2f2845270a64913/kipeto-core/src/main/java/de/ecclesia/kipeto/repository/WritingRepositoryStrategy.java#L51-L68
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java
EventsRequest.withBatchItem
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) { setBatchItem(batchItem); return this; }
java
public EventsRequest withBatchItem(java.util.Map<String, EventsBatch> batchItem) { setBatchItem(batchItem); return this; }
[ "public", "EventsRequest", "withBatchItem", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "EventsBatch", ">", "batchItem", ")", "{", "setBatchItem", "(", "batchItem", ")", ";", "return", "this", ";", "}" ]
A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value. @param batchItem A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value. @return Returns a reference to this object so that met...
[ "A", "batch", "of", "events", "to", "process", ".", "Each", "BatchItem", "consists", "of", "an", "endpoint", "ID", "as", "the", "key", "and", "an", "EventsBatch", "object", "as", "the", "value", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EventsRequest.java#L70-L73
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java
ResourceUtils.getFile
public static File getFile(URL resourceUrl, String description) throws FileNotFoundException { if (!URL_PROTOCOL_FILE.equals(resourceUrl.getProtocol())) { throw new FileNotFoundException( description + " cannot be resolved to absolute file path " + "because it doe...
java
public static File getFile(URL resourceUrl, String description) throws FileNotFoundException { if (!URL_PROTOCOL_FILE.equals(resourceUrl.getProtocol())) { throw new FileNotFoundException( description + " cannot be resolved to absolute file path " + "because it doe...
[ "public", "static", "File", "getFile", "(", "URL", "resourceUrl", ",", "String", "description", ")", "throws", "FileNotFoundException", "{", "if", "(", "!", "URL_PROTOCOL_FILE", ".", "equals", "(", "resourceUrl", ".", "getProtocol", "(", ")", ")", ")", "{", ...
Resolve the given resource URL to a <code>java.io.File</code>, i.e. to a file in the file system. @param resourceUrl the resource URL to resolve @param description a description of the original resource that the URL was created for (for example, a class path location) @return a corresponding File object @throws java.i...
[ "Resolve", "the", "given", "resource", "URL", "to", "a", "<code", ">", "java", ".", "io", ".", "File<", "/", "code", ">", "i", ".", "e", ".", "to", "a", "file", "in", "the", "file", "system", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java#L208-L220
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/SearchUtils.java
SearchUtils.findLineNumberForInstruction
public static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode) { Validate.notNull(insnList); Validate.notNull(insnNode); int idx = insnList.indexOf(insnNode); Validate.isTrue(idx != -1); // Get index of labels and insnNod...
java
public static LineNumberNode findLineNumberForInstruction(InsnList insnList, AbstractInsnNode insnNode) { Validate.notNull(insnList); Validate.notNull(insnNode); int idx = insnList.indexOf(insnNode); Validate.isTrue(idx != -1); // Get index of labels and insnNod...
[ "public", "static", "LineNumberNode", "findLineNumberForInstruction", "(", "InsnList", "insnList", ",", "AbstractInsnNode", "insnNode", ")", "{", "Validate", ".", "notNull", "(", "insnList", ")", ";", "Validate", ".", "notNull", "(", "insnNode", ")", ";", "int", ...
Find line number associated with an instruction. @param insnList instruction list for method @param insnNode instruction within method being searched against @throws NullPointerException if any argument is {@code null} or contains {@code null} @throws IllegalArgumentException if arguments aren't all from the same metho...
[ "Find", "line", "number", "associated", "with", "an", "instruction", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/SearchUtils.java#L394-L412
pravega/pravega
common/src/main/java/io/pravega/common/function/Callbacks.java
Callbacks.invokeSafely
public static <T> void invokeSafely(Consumer<T> consumer, T argument, Consumer<Throwable> failureHandler) { Preconditions.checkNotNull(consumer, "consumer"); try { consumer.accept(argument); } catch (Exception ex) { if (failureHandler != null) { invokeSaf...
java
public static <T> void invokeSafely(Consumer<T> consumer, T argument, Consumer<Throwable> failureHandler) { Preconditions.checkNotNull(consumer, "consumer"); try { consumer.accept(argument); } catch (Exception ex) { if (failureHandler != null) { invokeSaf...
[ "public", "static", "<", "T", ">", "void", "invokeSafely", "(", "Consumer", "<", "T", ">", "consumer", ",", "T", "argument", ",", "Consumer", "<", "Throwable", ">", "failureHandler", ")", "{", "Preconditions", ".", "checkNotNull", "(", "consumer", ",", "\"...
Invokes the given Consumer with the given argument, and catches any exceptions that it may throw. @param consumer The consumer to invoke. @param argument The argument to pass to the consumer. @param failureHandler An optional callback to invoke if the consumer threw any exceptions. @param <T> Th...
[ "Invokes", "the", "given", "Consumer", "with", "the", "given", "argument", "and", "catches", "any", "exceptions", "that", "it", "may", "throw", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/function/Callbacks.java#L50-L60
deeplearning4j/deeplearning4j
datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/CropImageTransform.java
CropImageTransform.doTransform
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { if (image == null) { return null; } Mat mat = converter.convert(image.getFrame()); int top = random != null ? random.nextInt(cropTop + 1) : cropTop; int left = random != null ? ran...
java
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { if (image == null) { return null; } Mat mat = converter.convert(image.getFrame()); int top = random != null ? random.nextInt(cropTop + 1) : cropTop; int left = random != null ? ran...
[ "@", "Override", "protected", "ImageWritable", "doTransform", "(", "ImageWritable", "image", ",", "Random", "random", ")", "{", "if", "(", "image", "==", "null", ")", "{", "return", "null", ";", "}", "Mat", "mat", "=", "converter", ".", "convert", "(", "...
Takes an image and returns a transformed image. Uses the random object in the case of random transformations. @param image to transform, null == end of stream @param random object to use (or null for deterministic) @return transformed image
[ "Takes", "an", "image", "and", "returns", "a", "transformed", "image", ".", "Uses", "the", "random", "object", "in", "the", "case", "of", "random", "transformations", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/CropImageTransform.java#L89-L107
undertow-io/undertow
core/src/main/java/io/undertow/server/Connectors.java
Connectors.ungetRequestBytes
public static void ungetRequestBytes(final HttpServerExchange exchange, PooledByteBuffer... buffers) { PooledByteBuffer[] existing = exchange.getAttachment(HttpServerExchange.BUFFERED_REQUEST_DATA); PooledByteBuffer[] newArray; if (existing == null) { newArray = new PooledByteBuffer[...
java
public static void ungetRequestBytes(final HttpServerExchange exchange, PooledByteBuffer... buffers) { PooledByteBuffer[] existing = exchange.getAttachment(HttpServerExchange.BUFFERED_REQUEST_DATA); PooledByteBuffer[] newArray; if (existing == null) { newArray = new PooledByteBuffer[...
[ "public", "static", "void", "ungetRequestBytes", "(", "final", "HttpServerExchange", "exchange", ",", "PooledByteBuffer", "...", "buffers", ")", "{", "PooledByteBuffer", "[", "]", "existing", "=", "exchange", ".", "getAttachment", "(", "HttpServerExchange", ".", "BU...
Attached buffered data to the exchange. The will generally be used to allow data to be re-read. @param exchange The HTTP server exchange @param buffers The buffers to attach
[ "Attached", "buffered", "data", "to", "the", "exchange", ".", "The", "will", "generally", "be", "used", "to", "allow", "data", "to", "be", "re", "-", "read", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/Connectors.java#L110-L123
alibaba/ARouter
arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/utils/TypeUtils.java
TypeUtils.typeExchange
public int typeExchange(Element element) { TypeMirror typeMirror = element.asType(); // Primitive if (typeMirror.getKind().isPrimitive()) { return element.asType().getKind().ordinal(); } switch (typeMirror.toString()) { case BYTE: return ...
java
public int typeExchange(Element element) { TypeMirror typeMirror = element.asType(); // Primitive if (typeMirror.getKind().isPrimitive()) { return element.asType().getKind().ordinal(); } switch (typeMirror.toString()) { case BYTE: return ...
[ "public", "int", "typeExchange", "(", "Element", "element", ")", "{", "TypeMirror", "typeMirror", "=", "element", ".", "asType", "(", ")", ";", "// Primitive", "if", "(", "typeMirror", ".", "getKind", "(", ")", ".", "isPrimitive", "(", ")", ")", "{", "re...
Diagnostics out the true java type @param element Raw type @return Type class of java
[ "Diagnostics", "out", "the", "true", "java", "type" ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-compiler/src/main/java/com/alibaba/android/arouter/compiler/utils/TypeUtils.java#L48-L87
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.getRegionalAvailability
public GetRegionalAvailabilityResponseInner getRegionalAvailability(String resourceGroupName, String labAccountName) { return getRegionalAvailabilityWithServiceResponseAsync(resourceGroupName, labAccountName).toBlocking().single().body(); }
java
public GetRegionalAvailabilityResponseInner getRegionalAvailability(String resourceGroupName, String labAccountName) { return getRegionalAvailabilityWithServiceResponseAsync(resourceGroupName, labAccountName).toBlocking().single().body(); }
[ "public", "GetRegionalAvailabilityResponseInner", "getRegionalAvailability", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ")", "{", "return", "getRegionalAvailabilityWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ")", ".", "t...
Get regional availability information for each size category configured under a lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request...
[ "Get", "regional", "availability", "information", "for", "each", "size", "category", "configured", "under", "a", "lab", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L1211-L1213
aws/aws-sdk-java
aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/TagLogGroupRequest.java
TagLogGroupRequest.withTags
public TagLogGroupRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public TagLogGroupRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "TagLogGroupRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The key-value pairs to use for the tags. </p> @param tags The key-value pairs to use for the tags. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "key", "-", "value", "pairs", "to", "use", "for", "the", "tags", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/TagLogGroupRequest.java#L119-L122
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
TypeAnnotationPosition.constructorInvocationTypeArg
public static TypeAnnotationPosition constructorInvocationTypeArg(final List<TypePathEntry> location, final int type_index) { return constructorInvocationTypeArg(location, null, type_index, -1); }
java
public static TypeAnnotationPosition constructorInvocationTypeArg(final List<TypePathEntry> location, final int type_index) { return constructorInvocationTypeArg(location, null, type_index, -1); }
[ "public", "static", "TypeAnnotationPosition", "constructorInvocationTypeArg", "(", "final", "List", "<", "TypePathEntry", ">", "location", ",", "final", "int", "type_index", ")", "{", "return", "constructorInvocationTypeArg", "(", "location", ",", "null", ",", "type_i...
Create a {@code TypeAnnotationPosition} for a constructor invocation type argument. @param location The type path. @param type_index The index of the type argument.
[ "Create", "a", "{", "@code", "TypeAnnotationPosition", "}", "for", "a", "constructor", "invocation", "type", "argument", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java#L944-L948
EdwardRaff/JSAT
JSAT/src/jsat/distributions/discrete/Zipf.java
Zipf.setSkew
public void setSkew(double skew) { if(skew <= 0 || Double.isNaN(skew) || Double.isInfinite(skew)) throw new IllegalArgumentException("Skew must be a positive value, not " + skew); this.skew = skew; fixCache(); }
java
public void setSkew(double skew) { if(skew <= 0 || Double.isNaN(skew) || Double.isInfinite(skew)) throw new IllegalArgumentException("Skew must be a positive value, not " + skew); this.skew = skew; fixCache(); }
[ "public", "void", "setSkew", "(", "double", "skew", ")", "{", "if", "(", "skew", "<=", "0", "||", "Double", ".", "isNaN", "(", "skew", ")", "||", "Double", ".", "isInfinite", "(", "skew", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"Sk...
Sets the skewness of the distribution. Lower values spread out the probability distribution, while higher values concentrate on the lowest ranks. @param skew the positive value for the distribution's skew
[ "Sets", "the", "skewness", "of", "the", "distribution", ".", "Lower", "values", "spread", "out", "the", "probability", "distribution", "while", "higher", "values", "concentrate", "on", "the", "lowest", "ranks", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/discrete/Zipf.java#L111-L117
UrielCh/ovh-java-sdk
ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java
ApiOvhSaascsp2.serviceName_changeAdministratorPassword_POST
public OvhOfficeTask serviceName_changeAdministratorPassword_POST(String serviceName, String newPassword) throws IOException { String qPath = "/saas/csp2/{serviceName}/changeAdministratorPassword"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, ...
java
public OvhOfficeTask serviceName_changeAdministratorPassword_POST(String serviceName, String newPassword) throws IOException { String qPath = "/saas/csp2/{serviceName}/changeAdministratorPassword"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, ...
[ "public", "OvhOfficeTask", "serviceName_changeAdministratorPassword_POST", "(", "String", "serviceName", ",", "String", "newPassword", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/saas/csp2/{serviceName}/changeAdministratorPassword\"", ";", "StringBuilder", "s...
Changes the tenant administrator's password REST: POST /saas/csp2/{serviceName}/changeAdministratorPassword @param newPassword [required] New password for the tenant administrator @param serviceName [required] The unique identifier of your Office service API beta
[ "Changes", "the", "tenant", "administrator", "s", "password" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java#L254-L261
rhuss/jolokia
agent/core/src/main/java/org/jolokia/util/IoUtil.java
IoUtil.streamResponseAndClose
public static void streamResponseAndClose(Writer pWriter, JSONStreamAware pJson, String callback) throws IOException { try { if (callback == null) { pJson.writeJSONString(pWriter); } else { pWriter.write(callback); pWriter.write("("...
java
public static void streamResponseAndClose(Writer pWriter, JSONStreamAware pJson, String callback) throws IOException { try { if (callback == null) { pJson.writeJSONString(pWriter); } else { pWriter.write(callback); pWriter.write("("...
[ "public", "static", "void", "streamResponseAndClose", "(", "Writer", "pWriter", ",", "JSONStreamAware", "pJson", ",", "String", "callback", ")", "throws", "IOException", "{", "try", "{", "if", "(", "callback", "==", "null", ")", "{", "pJson", ".", "writeJSONSt...
Stream a JSON stream to a given writer, potentiall wrap it in a callback for a JSONP response and then flush & close the writer. The writer is closed in any case, also when an exception occurs @param pWriter writer to write to. Must be not null. @param pJson JSON response to stream @param callback the name of the call...
[ "Stream", "a", "JSON", "stream", "to", "a", "given", "writer", "potentiall", "wrap", "it", "in", "a", "callback", "for", "a", "JSONP", "response", "and", "then", "flush", "&", "close", "the", "writer", ".", "The", "writer", "is", "closed", "in", "any", ...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/util/IoUtil.java#L30-L48
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
ExecutorManager.cancelFlow
@Override public void cancelFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { if (this.runningExecutions.get().containsKey(exFlow.getExecutionId())) { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningEx...
java
@Override public void cancelFlow(final ExecutableFlow exFlow, final String userId) throws ExecutorManagerException { synchronized (exFlow) { if (this.runningExecutions.get().containsKey(exFlow.getExecutionId())) { final Pair<ExecutionReference, ExecutableFlow> pair = this.runningEx...
[ "@", "Override", "public", "void", "cancelFlow", "(", "final", "ExecutableFlow", "exFlow", ",", "final", "String", "userId", ")", "throws", "ExecutorManagerException", "{", "synchronized", "(", "exFlow", ")", "{", "if", "(", "this", ".", "runningExecutions", "."...
if flows was dispatched to an executor, cancel by calling Executor else if flow is still in queue, remove from queue and finalize {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#cancelFlow(azkaban.executor.ExecutableFlow, java.lang.String)
[ "if", "flows", "was", "dispatched", "to", "an", "executor", "cancel", "by", "calling", "Executor", "else", "if", "flow", "is", "still", "in", "queue", "remove", "from", "queue", "and", "finalize", "{", "@inheritDoc", "}" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java#L825-L844
line/centraldogma
client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/CentralDogmaEndpointGroup.java
CentralDogmaEndpointGroup.of
public static <T> CentralDogmaEndpointGroup<T> of(CentralDogma centralDogma, String projectName, String repositoryName, Query<T> query, EndpointListDecoder<T>...
java
public static <T> CentralDogmaEndpointGroup<T> of(CentralDogma centralDogma, String projectName, String repositoryName, Query<T> query, EndpointListDecoder<T>...
[ "public", "static", "<", "T", ">", "CentralDogmaEndpointGroup", "<", "T", ">", "of", "(", "CentralDogma", "centralDogma", ",", "String", "projectName", ",", "String", "repositoryName", ",", "Query", "<", "T", ">", "query", ",", "EndpointListDecoder", "<", "T",...
Creates a new {@link CentralDogmaEndpointGroup}. @param centralDogma a {@link CentralDogma} @param projectName a Central Dogma project name @param repositoryName a Central Dogma repository name @param query a {@link Query} to route file @param endpointListDecoder an {@link EndpointListDecoder}
[ "Creates", "a", "new", "{", "@link", "CentralDogmaEndpointGroup", "}", "." ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/client/java-armeria/src/main/java/com/linecorp/centraldogma/client/armeria/CentralDogmaEndpointGroup.java#L84-L89
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
AkkaInvocationHandler.invokeRpc
private Object invokeRpc(Method method, Object[] args) throws Exception { String methodName = method.getName(); Class<?>[] parameterTypes = method.getParameterTypes(); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); Time futureTimeout = extractRpcTimeout(parameterAnnotations, args, timeo...
java
private Object invokeRpc(Method method, Object[] args) throws Exception { String methodName = method.getName(); Class<?>[] parameterTypes = method.getParameterTypes(); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); Time futureTimeout = extractRpcTimeout(parameterAnnotations, args, timeo...
[ "private", "Object", "invokeRpc", "(", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "Exception", "{", "String", "methodName", "=", "method", ".", "getName", "(", ")", ";", "Class", "<", "?", ">", "[", "]", "parameterTypes", "=", ...
Invokes a RPC method by sending the RPC invocation details to the rpc endpoint. @param method to call @param args of the method call @return result of the RPC @throws Exception if the RPC invocation fails
[ "Invokes", "a", "RPC", "method", "by", "sending", "the", "RPC", "invocation", "details", "to", "the", "rpc", "endpoint", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java#L194-L240
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.setDateExpired
public void setDateExpired(CmsResource resource, long dateExpired, boolean recursive) throws CmsException { getResourceType(resource).setDateExpired(this, m_securityManager, resource, dateExpired, recursive); }
java
public void setDateExpired(CmsResource resource, long dateExpired, boolean recursive) throws CmsException { getResourceType(resource).setDateExpired(this, m_securityManager, resource, dateExpired, recursive); }
[ "public", "void", "setDateExpired", "(", "CmsResource", "resource", ",", "long", "dateExpired", ",", "boolean", "recursive", ")", "throws", "CmsException", "{", "getResourceType", "(", "resource", ")", ".", "setDateExpired", "(", "this", ",", "m_securityManager", ...
Changes the "expire" date of a resource.<p> @param resource the resource to change @param dateExpired the new expire date of the changed resource @param recursive if this operation is to be applied recursively to all resources in a folder @throws CmsException if something goes wrong
[ "Changes", "the", "expire", "date", "of", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L3753-L3756
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java
File.setReadable
public boolean setReadable(boolean readable, boolean ownerOnly) { return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable); }
java
public boolean setReadable(boolean readable, boolean ownerOnly) { return doChmod(ownerOnly ? S_IRUSR : (S_IRUSR | S_IRGRP | S_IROTH), readable); }
[ "public", "boolean", "setReadable", "(", "boolean", "readable", ",", "boolean", "ownerOnly", ")", "{", "return", "doChmod", "(", "ownerOnly", "?", "S_IRUSR", ":", "(", "S_IRUSR", "|", "S_IRGRP", "|", "S_IROTH", ")", ",", "readable", ")", ";", "}" ]
Manipulates the read permissions for the abstract path designated by this file. @param readable To allow read permission if true, otherwise disallow @param ownerOnly To manipulate read permission only for owner if true, otherwise for everyone. The manipulation will apply to everyone regardless of this value if the und...
[ "Manipulates", "the", "read", "permissions", "for", "the", "abstract", "path", "designated", "by", "this", "file", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java#L726-L728
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/utilities/DateCalculator.java
DateCalculator.getXNextDay
public static String getXNextDay(String date, Integer x) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String newDate = ""; Calendar c = Calendar.getInstance(); try { c.setTime(formatter.parse(date)); c.add(Calendar.DAY_OF_MONTH, x); c.getTime(); newDate = formatter.format(c.get...
java
public static String getXNextDay(String date, Integer x) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String newDate = ""; Calendar c = Calendar.getInstance(); try { c.setTime(formatter.parse(date)); c.add(Calendar.DAY_OF_MONTH, x); c.getTime(); newDate = formatter.format(c.get...
[ "public", "static", "String", "getXNextDay", "(", "String", "date", ",", "Integer", "x", ")", "{", "SimpleDateFormat", "formatter", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd\"", ")", ";", "String", "newDate", "=", "\"\"", ";", "Calendar", "c", "=", ...
get the x-next day of date. @param date given date to get new date from @param x type of temporal event to search for @return
[ "get", "the", "x", "-", "next", "day", "of", "date", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/utilities/DateCalculator.java#L149-L162
m-m-m/util
scanner/src/main/java/net/sf/mmm/util/scanner/base/CharSequenceScanner.java
CharSequenceScanner.getOriginalString
public String getOriginalString() { if (this.string != null) { this.string = new String(this.buffer, this.initialOffset, getLength()); } return this.string; }
java
public String getOriginalString() { if (this.string != null) { this.string = new String(this.buffer, this.initialOffset, getLength()); } return this.string; }
[ "public", "String", "getOriginalString", "(", ")", "{", "if", "(", "this", ".", "string", "!=", "null", ")", "{", "this", ".", "string", "=", "new", "String", "(", "this", ".", "buffer", ",", "this", ".", "initialOffset", ",", "getLength", "(", ")", ...
This method gets the original string to parse. @see CharSequenceScanner#CharSequenceScanner(String) @return the original string.
[ "This", "method", "gets", "the", "original", "string", "to", "parse", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/scanner/src/main/java/net/sf/mmm/util/scanner/base/CharSequenceScanner.java#L391-L397
threerings/nenya
core/src/main/java/com/threerings/media/sprite/Sprite.java
Sprite.cancelMove
public void cancelMove () { if (_path != null) { Path oldpath = _path; _path = null; oldpath.wasRemoved(this); if (_observers != null) { _observers.apply(new CancelledOp(this, oldpath)); } } }
java
public void cancelMove () { if (_path != null) { Path oldpath = _path; _path = null; oldpath.wasRemoved(this); if (_observers != null) { _observers.apply(new CancelledOp(this, oldpath)); } } }
[ "public", "void", "cancelMove", "(", ")", "{", "if", "(", "_path", "!=", "null", ")", "{", "Path", "oldpath", "=", "_path", ";", "_path", "=", "null", ";", "oldpath", ".", "wasRemoved", "(", "this", ")", ";", "if", "(", "_observers", "!=", "null", ...
Cancels any path that the sprite may currently be moving along.
[ "Cancels", "any", "path", "that", "the", "sprite", "may", "currently", "be", "moving", "along", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sprite/Sprite.java#L240-L250
vinta/pangu.java
src/main/java/ws/vinta/pangu/Pangu.java
Pangu.spacingFile
public void spacingFile(File inputFile, File outputFile) throws IOException { // TODO: support charset FileReader fr = new FileReader(inputFile); BufferedReader br = new BufferedReader(fr); outputFile.getParentFile().mkdirs(); FileWriter fw = new FileWriter(outputFile, false); ...
java
public void spacingFile(File inputFile, File outputFile) throws IOException { // TODO: support charset FileReader fr = new FileReader(inputFile); BufferedReader br = new BufferedReader(fr); outputFile.getParentFile().mkdirs(); FileWriter fw = new FileWriter(outputFile, false); ...
[ "public", "void", "spacingFile", "(", "File", "inputFile", ",", "File", "outputFile", ")", "throws", "IOException", "{", "// TODO: support charset", "FileReader", "fr", "=", "new", "FileReader", "(", "inputFile", ")", ";", "BufferedReader", "br", "=", "new", "Bu...
Performs a paranoid text spacing on {@code inputFile} and generate a new file {@code outputFile}. @param inputFile an existing file to process, must not be {@code null}. @param outputFile the processed file, must not be {@code null}. @throws IOException if an error occurs. @since 1.1.0
[ "Performs", "a", "paranoid", "text", "spacing", "on", "{", "@code", "inputFile", "}", "and", "generate", "a", "new", "file", "{", "@code", "outputFile", "}", "." ]
train
https://github.com/vinta/pangu.java/blob/a81ce9c0cfd5122a3d4234b95c250fd57afd7f34/src/main/java/ws/vinta/pangu/Pangu.java#L143-L174
vsima/uber-java-client
src/main/java/com/victorsima/uber/Utils.java
Utils.generateAuthorizeUrl
public static String generateAuthorizeUrl(String oAuthUri, String clientId, String[] scope){ StringBuilder sb = new StringBuilder(oAuthUri); sb.append("/oauth/authorize?response_type=code"); sb.append("&client_id=" + clientId); if (scope != null) { sb.append("&scope="); ...
java
public static String generateAuthorizeUrl(String oAuthUri, String clientId, String[] scope){ StringBuilder sb = new StringBuilder(oAuthUri); sb.append("/oauth/authorize?response_type=code"); sb.append("&client_id=" + clientId); if (scope != null) { sb.append("&scope="); ...
[ "public", "static", "String", "generateAuthorizeUrl", "(", "String", "oAuthUri", ",", "String", "clientId", ",", "String", "[", "]", "scope", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "oAuthUri", ")", ";", "sb", ".", "append", "(", ...
Generates the initial url for the OAuth authorization flow @return oauth authorize url
[ "Generates", "the", "initial", "url", "for", "the", "OAuth", "authorization", "flow" ]
train
https://github.com/vsima/uber-java-client/blob/7cb081728db6286d949024c1b4c85dd74d275472/src/main/java/com/victorsima/uber/Utils.java#L40-L54
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.addVideoTranscriptModerationResultAsync
public Observable<Void> addVideoTranscriptModerationResultAsync(String teamName, String reviewId, String contentType, List<TranscriptModerationBodyItem> transcriptModerationBody) { return addVideoTranscriptModerationResultWithServiceResponseAsync(teamName, reviewId, contentType, transcriptModerationBody).map(ne...
java
public Observable<Void> addVideoTranscriptModerationResultAsync(String teamName, String reviewId, String contentType, List<TranscriptModerationBodyItem> transcriptModerationBody) { return addVideoTranscriptModerationResultWithServiceResponseAsync(teamName, reviewId, contentType, transcriptModerationBody).map(ne...
[ "public", "Observable", "<", "Void", ">", "addVideoTranscriptModerationResultAsync", "(", "String", "teamName", ",", "String", "reviewId", ",", "String", "contentType", ",", "List", "<", "TranscriptModerationBodyItem", ">", "transcriptModerationBody", ")", "{", "return"...
This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. @param teamName Your team name. @param reviewId ...
[ "This", "API", "adds", "a", "transcript", "screen", "text", "result", "file", "for", "a", "video", "review", ".", "Transcript", "screen", "text", "result", "file", "is", "a", "result", "of", "Screen", "Text", "API", ".", "In", "order", "to", "generate", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L1724-L1731
dvasilen/Hive-XML-SerDe
src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlUtils.java
XmlUtils.getPrimitiveValue
public static Object getPrimitiveValue(String value, PrimitiveCategory primitiveCategory) { if (value != null) { try { switch (primitiveCategory) { case BOOLEAN: return Boolean.valueOf(value); case BYTE: ...
java
public static Object getPrimitiveValue(String value, PrimitiveCategory primitiveCategory) { if (value != null) { try { switch (primitiveCategory) { case BOOLEAN: return Boolean.valueOf(value); case BYTE: ...
[ "public", "static", "Object", "getPrimitiveValue", "(", "String", "value", ",", "PrimitiveCategory", "primitiveCategory", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "try", "{", "switch", "(", "primitiveCategory", ")", "{", "case", "BOOLEAN", ":", ...
Converts the string value to the java object for the given primitive category @param value the value @param primitiveCategory the primitive category @return the java object
[ "Converts", "the", "string", "value", "to", "the", "java", "object", "for", "the", "given", "primitive", "category" ]
train
https://github.com/dvasilen/Hive-XML-SerDe/blob/2a7a184b2cfaeb63008529a9851cd72edb8025d9/src/main/java/com/ibm/spss/hive/serde2/xml/processor/XmlUtils.java#L41-L68
Ordinastie/MalisisCore
src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java
MalisisInventoryContainer.handleShiftClick
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot) { ItemStack itemStack = transferSlotOutOfInventory(inventory, slot); //replace what's left of the item back into the slot slot.setItemStack(itemStack); slot.onSlotChanged(); return itemStack; }
java
private ItemStack handleShiftClick(MalisisInventory inventory, MalisisSlot slot) { ItemStack itemStack = transferSlotOutOfInventory(inventory, slot); //replace what's left of the item back into the slot slot.setItemStack(itemStack); slot.onSlotChanged(); return itemStack; }
[ "private", "ItemStack", "handleShiftClick", "(", "MalisisInventory", "inventory", ",", "MalisisSlot", "slot", ")", "{", "ItemStack", "itemStack", "=", "transferSlotOutOfInventory", "(", "inventory", ",", "slot", ")", ";", "//replace what's left of the item back into the slo...
Handles shift clicking a slot. @param inventoryId the inventory id @param slot the slot @return the item stack
[ "Handles", "shift", "clicking", "a", "slot", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java#L484-L492
aerogear/aerogear-crypto-java
src/main/java/org/jboss/aerogear/crypto/Util.java
Util.formatter
public static String formatter(Mode mode, Padding padding) { return String.format("%s/%s", mode, padding); }
java
public static String formatter(Mode mode, Padding padding) { return String.format("%s/%s", mode, padding); }
[ "public", "static", "String", "formatter", "(", "Mode", "mode", ",", "Padding", "padding", ")", "{", "return", "String", ".", "format", "(", "\"%s/%s\"", ",", "mode", ",", "padding", ")", ";", "}" ]
Utility method to format algorithms name in Java like way @param mode @param padding @return string name with the formatted algorithm
[ "Utility", "method", "to", "format", "algorithms", "name", "in", "Java", "like", "way" ]
train
https://github.com/aerogear/aerogear-crypto-java/blob/3a371780f7deff603f5a7a1dd3de1eeb5e147202/src/main/java/org/jboss/aerogear/crypto/Util.java#L91-L93
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java
ParameterTool.getByte
public byte getByte(String key, byte defaultValue) { addToDefaults(key, Byte.toString(defaultValue)); String value = get(key); if (value == null) { return defaultValue; } else { return Byte.valueOf(value); } }
java
public byte getByte(String key, byte defaultValue) { addToDefaults(key, Byte.toString(defaultValue)); String value = get(key); if (value == null) { return defaultValue; } else { return Byte.valueOf(value); } }
[ "public", "byte", "getByte", "(", "String", "key", ",", "byte", "defaultValue", ")", "{", "addToDefaults", "(", "key", ",", "Byte", ".", "toString", "(", "defaultValue", ")", ")", ";", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "...
Returns the Byte value for the given key. If the key does not exists it will return the default value given. The method fails if the value is not a Byte.
[ "Returns", "the", "Byte", "value", "for", "the", "given", "key", ".", "If", "the", "key", "does", "not", "exists", "it", "will", "return", "the", "default", "value", "given", ".", "The", "method", "fails", "if", "the", "value", "is", "not", "a", "Byte"...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L449-L457
samskivert/pythagoras
src/main/java/pythagoras/d/Matrix4.java
Matrix4.setToPerspective
public Matrix4 setToPerspective (double fovy, double aspect, double near, double far) { double f = 1f / Math.tan(fovy / 2f), dscale = 1f / (near - far); return set(f/aspect, 0f, 0f, 0f, 0f, f, 0f, 0f, 0f, 0f, (far+near) * dscale, 2f * far * near * dscale, ...
java
public Matrix4 setToPerspective (double fovy, double aspect, double near, double far) { double f = 1f / Math.tan(fovy / 2f), dscale = 1f / (near - far); return set(f/aspect, 0f, 0f, 0f, 0f, f, 0f, 0f, 0f, 0f, (far+near) * dscale, 2f * far * near * dscale, ...
[ "public", "Matrix4", "setToPerspective", "(", "double", "fovy", ",", "double", "aspect", ",", "double", "near", ",", "double", "far", ")", "{", "double", "f", "=", "1f", "/", "Math", ".", "tan", "(", "fovy", "/", "2f", ")", ",", "dscale", "=", "1f", ...
Sets this to a perspective projection matrix. The formula comes from the OpenGL documentation for the gluPerspective function. @return a reference to this matrix, for chaining.
[ "Sets", "this", "to", "a", "perspective", "projection", "matrix", ".", "The", "formula", "comes", "from", "the", "OpenGL", "documentation", "for", "the", "gluPerspective", "function", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Matrix4.java#L373-L379
finmath/finmath-lib
src/main/java/net/finmath/time/ScheduleGenerator.java
ScheduleGenerator.createScheduleFromConventions
public static Schedule createScheduleFromConventions( LocalDate referenceDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, BusinessdayCalendar businessdayCalendar, ...
java
public static Schedule createScheduleFromConventions( LocalDate referenceDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, BusinessdayCalendar businessdayCalendar, ...
[ "public", "static", "Schedule", "createScheduleFromConventions", "(", "LocalDate", "referenceDate", ",", "int", "spotOffsetDays", ",", "String", "startOffsetString", ",", "String", "maturityString", ",", "String", "frequency", ",", "String", "daycountConvention", ",", "...
Simple schedule generation where startDate and maturityDate are calculated based on referenceDate, spotOffsetDays, startOffsetString and maturityString. The schedule generation considers short periods. Date rolling is ignored. @param referenceDate The date which is used in the schedule to internally convert dates to ...
[ "Simple", "schedule", "generation", "where", "startDate", "and", "maturityDate", "are", "calculated", "based", "on", "referenceDate", "spotOffsetDays", "startOffsetString", "and", "maturityString", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/time/ScheduleGenerator.java#L613-L629
wildfly-swarm-archive/ARCHIVE-wildfly-swarm
container/runtime/src/main/java/org/wildfly/swarm/container/runtime/StandaloneXmlParser.java
StandaloneXmlParser.addDelegate
public StandaloneXmlParser addDelegate(QName elementName, XMLElementReader<List<ModelNode>> parser) { xmlMapper.registerRootElement(elementName, parser); return this; }
java
public StandaloneXmlParser addDelegate(QName elementName, XMLElementReader<List<ModelNode>> parser) { xmlMapper.registerRootElement(elementName, parser); return this; }
[ "public", "StandaloneXmlParser", "addDelegate", "(", "QName", "elementName", ",", "XMLElementReader", "<", "List", "<", "ModelNode", ">", ">", "parser", ")", "{", "xmlMapper", ".", "registerRootElement", "(", "elementName", ",", "parser", ")", ";", "return", "th...
Add a parser for a subpart of the XML model. @param elementName the FQ element name (i.e. subsystem name) @param parser creates ModelNode's from XML input @return
[ "Add", "a", "parser", "for", "a", "subpart", "of", "the", "XML", "model", "." ]
train
https://github.com/wildfly-swarm-archive/ARCHIVE-wildfly-swarm/blob/28ef71bcfa743a7267666e0ed2919c37b356c09b/container/runtime/src/main/java/org/wildfly/swarm/container/runtime/StandaloneXmlParser.java#L83-L86
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_renewSSL_POST
public OvhTask organizationName_service_exchangeService_renewSSL_POST(String organizationName, String exchangeService, String dcv) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/renewSSL"; StringBuilder sb = path(qPath, organizationName, exchangeService); HashMap...
java
public OvhTask organizationName_service_exchangeService_renewSSL_POST(String organizationName, String exchangeService, String dcv) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/renewSSL"; StringBuilder sb = path(qPath, organizationName, exchangeService); HashMap...
[ "public", "OvhTask", "organizationName_service_exchangeService_renewSSL_POST", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "dcv", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/service/{ex...
Renew SSL if it will expire in next 30 days REST: POST /email/exchange/{organizationName}/service/{exchangeService}/renewSSL @param dcv [required] DCV email require for order ssl varification process @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] Th...
[ "Renew", "SSL", "if", "it", "will", "expire", "in", "next", "30", "days" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1010-L1017
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java
BindingInstaller.installBinding
private void installBinding(DependencyGraph graph, Key<?> key, Binding binding) { // Figure out where we're putting the implicit entry GinjectorBindings implicitEntryPosition = positions.getInstallPosition(key); // Ensure that the dependencies are available to the ginjector inheritBindingsForDeps(i...
java
private void installBinding(DependencyGraph graph, Key<?> key, Binding binding) { // Figure out where we're putting the implicit entry GinjectorBindings implicitEntryPosition = positions.getInstallPosition(key); // Ensure that the dependencies are available to the ginjector inheritBindingsForDeps(i...
[ "private", "void", "installBinding", "(", "DependencyGraph", "graph", ",", "Key", "<", "?", ">", "key", ",", "Binding", "binding", ")", "{", "// Figure out where we're putting the implicit entry", "GinjectorBindings", "implicitEntryPosition", "=", "positions", ".", "get...
Adds the given implicit binding in the graph to the injector hierarchy in the position specified by the {@link BindingPositioner}. Also ensures that the dependencies of the implicit binding are available at the chosen position.
[ "Adds", "the", "given", "implicit", "binding", "in", "the", "graph", "to", "the", "injector", "hierarchy", "in", "the", "position", "specified", "by", "the", "{" ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java#L91-L100
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java
MutableBigInteger.addDisjoint
void addDisjoint(MutableBigInteger addend, int n) { if (addend.isZero()) return; int x = intLen; int y = addend.intLen + n; int resultLen = (intLen > y ? intLen : y); int[] result; if (value.length < resultLen) result = new int[resultLen]; ...
java
void addDisjoint(MutableBigInteger addend, int n) { if (addend.isZero()) return; int x = intLen; int y = addend.intLen + n; int resultLen = (intLen > y ? intLen : y); int[] result; if (value.length < resultLen) result = new int[resultLen]; ...
[ "void", "addDisjoint", "(", "MutableBigInteger", "addend", ",", "int", "n", ")", "{", "if", "(", "addend", ".", "isZero", "(", ")", ")", "return", ";", "int", "x", "=", "intLen", ";", "int", "y", "=", "addend", ".", "intLen", "+", "n", ";", "int", ...
Like {@link #addShifted(MutableBigInteger, int)} but {@code this.intLen} must not be greater than {@code n}. In other words, concatenates {@code this} and {@code addend}.
[ "Like", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L862-L894
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyParentRangeChanged
@UiThread public void notifyParentRangeChanged(int parentPositionStart, int itemCount) { int flatParentPositionStart = getFlatParentPosition(parentPositionStart); int flatParentPosition = flatParentPositionStart; int sizeChanged = 0; int changed; P parent; for (int j...
java
@UiThread public void notifyParentRangeChanged(int parentPositionStart, int itemCount) { int flatParentPositionStart = getFlatParentPosition(parentPositionStart); int flatParentPosition = flatParentPositionStart; int sizeChanged = 0; int changed; P parent; for (int j...
[ "@", "UiThread", "public", "void", "notifyParentRangeChanged", "(", "int", "parentPositionStart", ",", "int", "itemCount", ")", "{", "int", "flatParentPositionStart", "=", "getFlatParentPosition", "(", "parentPositionStart", ")", ";", "int", "flatParentPosition", "=", ...
Notify any registered observers that the {@code itemCount} parents starting at {@code parentPositionStart} have changed. This will also trigger an item changed for children of the parent list specified. <p> This is an item change event, not a structural change event. It indicates that any reflection of the data in the ...
[ "Notify", "any", "registered", "observers", "that", "the", "{", "@code", "itemCount", "}", "parents", "starting", "at", "{", "@code", "parentPositionStart", "}", "have", "changed", ".", "This", "will", "also", "trigger", "an", "item", "changed", "for", "childr...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1011-L1027
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
ClientStateMachine.getStateEpisodeForState
@Override protected StateEpisode getStateEpisodeForState(IState state) { if (!(state instanceof ClientState)) return null; ClientState cs = (ClientState) state; switch (cs) { case WAITING_FOR_MOD_READY: return new InitialiseClientModEpisode(this);...
java
@Override protected StateEpisode getStateEpisodeForState(IState state) { if (!(state instanceof ClientState)) return null; ClientState cs = (ClientState) state; switch (cs) { case WAITING_FOR_MOD_READY: return new InitialiseClientModEpisode(this);...
[ "@", "Override", "protected", "StateEpisode", "getStateEpisodeForState", "(", "IState", "state", ")", "{", "if", "(", "!", "(", "state", "instanceof", "ClientState", ")", ")", "return", "null", ";", "ClientState", "cs", "=", "(", "ClientState", ")", "state", ...
Create the episode object for the requested state. @param state the state the mod is entering @return a MissionStateEpisode that localises all the logic required to run this state
[ "Create", "the", "episode", "object", "for", "the", "requested", "state", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java#L282-L341
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesInner.java
RestorableDroppedDatabasesInner.getAsync
public Observable<RestorableDroppedDatabaseInner> getAsync(String resourceGroupName, String serverName, String restorableDroppededDatabaseId) { return getWithServiceResponseAsync(resourceGroupName, serverName, restorableDroppededDatabaseId).map(new Func1<ServiceResponse<RestorableDroppedDatabaseInner>, Restorab...
java
public Observable<RestorableDroppedDatabaseInner> getAsync(String resourceGroupName, String serverName, String restorableDroppededDatabaseId) { return getWithServiceResponseAsync(resourceGroupName, serverName, restorableDroppededDatabaseId).map(new Func1<ServiceResponse<RestorableDroppedDatabaseInner>, Restorab...
[ "public", "Observable", "<", "RestorableDroppedDatabaseInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "restorableDroppededDatabaseId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Gets a deleted database that can be restored. @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 restorableDroppededDatabaseId The id of the deleted database in...
[ "Gets", "a", "deleted", "database", "that", "can", "be", "restored", "." ]
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/RestorableDroppedDatabasesInner.java#L103-L110
codeprimate-software/cp-elements
src/main/java/org/cp/elements/tools/net/support/AbstractClientServerSupport.java
AbstractClientServerSupport.newServerSocket
public ServerSocket newServerSocket(int port) { try { ServerSocket serverSocket = newServerSocket(); serverSocket.setReuseAddress(DEFAULT_REUSE_ADDRESS); serverSocket.bind(newSocketAddress(port)); return serverSocket; } catch (IOException cause) { throw newRuntimeException(caus...
java
public ServerSocket newServerSocket(int port) { try { ServerSocket serverSocket = newServerSocket(); serverSocket.setReuseAddress(DEFAULT_REUSE_ADDRESS); serverSocket.bind(newSocketAddress(port)); return serverSocket; } catch (IOException cause) { throw newRuntimeException(caus...
[ "public", "ServerSocket", "newServerSocket", "(", "int", "port", ")", "{", "try", "{", "ServerSocket", "serverSocket", "=", "newServerSocket", "(", ")", ";", "serverSocket", ".", "setReuseAddress", "(", "DEFAULT_REUSE_ADDRESS", ")", ";", "serverSocket", ".", "bind...
Constructs and configures a new {@link ServerSocket}. @param port {@link Integer} value indicating the port number to which the {@link ServerSocket} is bound listening for client connections. @return a new {@link ServerSocket}. @throws RuntimeException if the {@link ServerSocket} could not be created. @see java.net.Se...
[ "Constructs", "and", "configures", "a", "new", "{", "@link", "ServerSocket", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/tools/net/support/AbstractClientServerSupport.java#L119-L129
soi-toolkit/soi-toolkit-mule
commons/components/module-logger/src/main/java/org/soitoolkit/commons/module/logger/SoitoolkitLoggerModule.java
SoitoolkitLoggerModule.logInfo
@Processor public Object logInfo( String message, @Optional String integrationScenario, @Optional String contractId, @Optional String correlationId, @Optional Map<String, String> extra) { return doLog(LogLevelType.INFO, message, integrationScenario, contractId, correlationId, extra...
java
@Processor public Object logInfo( String message, @Optional String integrationScenario, @Optional String contractId, @Optional String correlationId, @Optional Map<String, String> extra) { return doLog(LogLevelType.INFO, message, integrationScenario, contractId, correlationId, extra...
[ "@", "Processor", "public", "Object", "logInfo", "(", "String", "message", ",", "@", "Optional", "String", "integrationScenario", ",", "@", "Optional", "String", "contractId", ",", "@", "Optional", "String", "correlationId", ",", "@", "Optional", "Map", "<", "...
Log processor for level INFO {@sample.xml ../../../doc/SoitoolkitLogger-connector.xml.sample soitoolkitlogger:log} @param message Log-message to be processed @param integrationScenario Optional name of the integration scenario or business process @param contractId Optional name of the contract in use @param correlati...
[ "Log", "processor", "for", "level", "INFO" ]
train
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/module-logger/src/main/java/org/soitoolkit/commons/module/logger/SoitoolkitLoggerModule.java#L144-L153
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getNumArguments
public int getNumArguments(InvokeInstruction ins, ConstantPoolGen cpg) { SignatureParser parser = new SignatureParser(ins.getSignature(cpg)); return parser.getNumParameters(); }
java
public int getNumArguments(InvokeInstruction ins, ConstantPoolGen cpg) { SignatureParser parser = new SignatureParser(ins.getSignature(cpg)); return parser.getNumParameters(); }
[ "public", "int", "getNumArguments", "(", "InvokeInstruction", "ins", ",", "ConstantPoolGen", "cpg", ")", "{", "SignatureParser", "parser", "=", "new", "SignatureParser", "(", "ins", ".", "getSignature", "(", "cpg", ")", ")", ";", "return", "parser", ".", "getN...
Get the number of arguments passed to given method invocation. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the class containing the method @return number of arguments; note that this excludes the object instance for instance methods
[ "Get", "the", "number", "of", "arguments", "passed", "to", "given", "method", "invocation", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L348-L351
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/PermutationMatrix.java
PermutationMatrix.fromPartialPivots
public static PermutationMatrix fromPartialPivots(int[] pivots) { int[] permutations = new int[pivots.length]; for (int i = 0; i < pivots.length; i++) { permutations[i] = i; } for (int i = 0; i < pivots.length; i++) { int j = pivots[i] - 1; if (j == i...
java
public static PermutationMatrix fromPartialPivots(int[] pivots) { int[] permutations = new int[pivots.length]; for (int i = 0; i < pivots.length; i++) { permutations[i] = i; } for (int i = 0; i < pivots.length; i++) { int j = pivots[i] - 1; if (j == i...
[ "public", "static", "PermutationMatrix", "fromPartialPivots", "(", "int", "[", "]", "pivots", ")", "{", "int", "[", "]", "permutations", "=", "new", "int", "[", "pivots", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pivo...
The sequential row permutations to perform, e.g. (2, 3, 3) means: permute row 1 with row 2, then permute row 2 with row 3, then permute row 3 with row 3 (i.e. do nothing). <p> Using this factory will ensure that LAPACK optimisations are available for multiplication operations. @param pivots using fortran (1-indexed) n...
[ "The", "sequential", "row", "permutations", "to", "perform", "e", ".", "g", ".", "(", "2", "3", "3", ")", "means", ":", "permute", "row", "1", "with", "row", "2", "then", "permute", "row", "2", "with", "row", "3", "then", "permute", "row", "3", "wi...
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/PermutationMatrix.java#L51-L67
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.addPoint
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { final List<TimeData> list = R...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { final List<TimeData> list = R...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "// WARNING! Don't make a call from methods of the class to not break stack depth!", "public", "static", "void", "addPoint", "(",...
Add a named time point. @param timePointName name for the time point @param listener listener to be notified @see #checkPoint(java.lang.String) @since 1.0
[ "Add", "a", "named", "time", "point", "." ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L105-L110
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectAllInterfaceProperties
void expectAllInterfaceProperties(Node n, FunctionType type) { ObjectType instance = type.getInstanceType(); for (ObjectType implemented : type.getAllImplementedInterfaces()) { if (implemented.getImplicitPrototype() != null) { for (String prop : implemented.getImplicitPrototype().getO...
java
void expectAllInterfaceProperties(Node n, FunctionType type) { ObjectType instance = type.getInstanceType(); for (ObjectType implemented : type.getAllImplementedInterfaces()) { if (implemented.getImplicitPrototype() != null) { for (String prop : implemented.getImplicitPrototype().getO...
[ "void", "expectAllInterfaceProperties", "(", "Node", "n", ",", "FunctionType", "type", ")", "{", "ObjectType", "instance", "=", "type", ".", "getInstanceType", "(", ")", ";", "for", "(", "ObjectType", "implemented", ":", "type", ".", "getAllImplementedInterfaces",...
Expect that all properties on interfaces that this type implements are implemented and correctly typed.
[ "Expect", "that", "all", "properties", "on", "interfaces", "that", "this", "type", "implements", "are", "implemented", "and", "correctly", "typed", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L877-L887
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java
ESResponseWrapper.onEnum
private Object onEnum(Attribute attribute, Object fieldValue) { if (((Field) attribute.getJavaMember()).getType().isEnum()) { EnumAccessor accessor = new EnumAccessor(); fieldValue = accessor.fromString(((AbstractAttribute) attribute).getBindableJavaType(), ...
java
private Object onEnum(Attribute attribute, Object fieldValue) { if (((Field) attribute.getJavaMember()).getType().isEnum()) { EnumAccessor accessor = new EnumAccessor(); fieldValue = accessor.fromString(((AbstractAttribute) attribute).getBindableJavaType(), ...
[ "private", "Object", "onEnum", "(", "Attribute", "attribute", ",", "Object", "fieldValue", ")", "{", "if", "(", "(", "(", "Field", ")", "attribute", ".", "getJavaMember", "(", ")", ")", ".", "getType", "(", ")", ".", "isEnum", "(", ")", ")", "{", "En...
On enum. @param attribute the attribute @param fieldValue the field value @return the object
[ "On", "enum", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L662-L671
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/GridTable.java
GridTable.setHandle
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { m_objectID = null; // No current record m_dataSource = null; FieldList fieldList = this.getNextTable().setHandle(bookmark, iHandleType); if (fieldList != null) m_iRecordStatus = DBConst...
java
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { m_objectID = null; // No current record m_dataSource = null; FieldList fieldList = this.getNextTable().setHandle(bookmark, iHandleType); if (fieldList != null) m_iRecordStatus = DBConst...
[ "public", "FieldList", "setHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "m_objectID", "=", "null", ";", "// No current record", "m_dataSource", "=", "null", ";", "FieldList", "fieldList", "=", "this", ".", "ge...
Reposition to this record Using this bookmark. @param Object bookmark Bookmark. @param int iHandleType Type of handle (see getHandle). @exception FILE_NOT_OPEN. @return record if found/null - record not found.
[ "Reposition", "to", "this", "record", "Using", "this", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/GridTable.java#L571-L581
datumbox/datumbox-framework
datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/TransposeDataList.java
TransposeDataList.put
public final FlatDataList put(Object key, FlatDataList value) { return internalData.put(key, value); }
java
public final FlatDataList put(Object key, FlatDataList value) { return internalData.put(key, value); }
[ "public", "final", "FlatDataList", "put", "(", "Object", "key", ",", "FlatDataList", "value", ")", "{", "return", "internalData", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Adds a particular key-value into the internal map. It returns the previous value which was associated with that key. @param key @param value @return
[ "Adds", "a", "particular", "key", "-", "value", "into", "the", "internal", "map", ".", "It", "returns", "the", "previous", "value", "which", "was", "associated", "with", "that", "key", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/TransposeDataList.java#L79-L81
konvergeio/cofoja
src/main/java/com/google/java/contract/util/Predicates.java
Predicates.forEntries
public static <K, V> Predicate<Map<K, V>> forEntries( final Predicate<? super Set<Map.Entry<K, V>>> p) { return new Predicate<Map<K, V>>() { @Override public boolean apply(Map<K, V> obj) { return p.apply(obj.entrySet()); } }; }
java
public static <K, V> Predicate<Map<K, V>> forEntries( final Predicate<? super Set<Map.Entry<K, V>>> p) { return new Predicate<Map<K, V>>() { @Override public boolean apply(Map<K, V> obj) { return p.apply(obj.entrySet()); } }; }
[ "public", "static", "<", "K", ",", "V", ">", "Predicate", "<", "Map", "<", "K", ",", "V", ">", ">", "forEntries", "(", "final", "Predicate", "<", "?", "super", "Set", "<", "Map", ".", "Entry", "<", "K", ",", "V", ">", ">", ">", "p", ")", "{",...
Returns a predicate that evaluates to {@code true} if the entry set of its argument satisfies {@code p}.
[ "Returns", "a", "predicate", "that", "evaluates", "to", "{" ]
train
https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/util/Predicates.java#L240-L248
zandero/rest.vertx
src/main/java/com/zandero/rest/reader/ReaderFactory.java
ReaderFactory.get
public ValueReader get(MethodParameter parameter, Class<? extends ValueReader> byMethodDefinition, InjectionProvider provider, RoutingContext context, MediaType... mediaTypes) { // by type Class<?> readerType = null; ...
java
public ValueReader get(MethodParameter parameter, Class<? extends ValueReader> byMethodDefinition, InjectionProvider provider, RoutingContext context, MediaType... mediaTypes) { // by type Class<?> readerType = null; ...
[ "public", "ValueReader", "get", "(", "MethodParameter", "parameter", ",", "Class", "<", "?", "extends", "ValueReader", ">", "byMethodDefinition", ",", "InjectionProvider", "provider", ",", "RoutingContext", "context", ",", "MediaType", "...", "mediaTypes", ")", "{",...
Step over all possibilities to provide desired reader @param parameter check parameter if reader is set or we have a type reader present @param byMethodDefinition check default definition @param provider injection provider if any @param context routing context @param mediaTypes ch...
[ "Step", "over", "all", "possibilities", "to", "provide", "desired", "reader" ]
train
https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/reader/ReaderFactory.java#L49-L83
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java
Grego.getDayOfWeekInMonth
public static int getDayOfWeekInMonth(int year, int month, int dayOfMonth) { int weekInMonth = (dayOfMonth + 6)/7; if (weekInMonth == 4) { if (dayOfMonth + 7 > monthLength(year, month)) { weekInMonth = -1; } } else if (weekInMonth == 5) { weekI...
java
public static int getDayOfWeekInMonth(int year, int month, int dayOfMonth) { int weekInMonth = (dayOfMonth + 6)/7; if (weekInMonth == 4) { if (dayOfMonth + 7 > monthLength(year, month)) { weekInMonth = -1; } } else if (weekInMonth == 5) { weekI...
[ "public", "static", "int", "getDayOfWeekInMonth", "(", "int", "year", ",", "int", "month", ",", "int", "dayOfMonth", ")", "{", "int", "weekInMonth", "=", "(", "dayOfMonth", "+", "6", ")", "/", "7", ";", "if", "(", "weekInMonth", "==", "4", ")", "{", ...
/* Returns the ordinal number for the specified day of week in the month. The valid return value is 1, 2, 3, 4 or -1.
[ "/", "*", "Returns", "the", "ordinal", "number", "for", "the", "specified", "day", "of", "week", "in", "the", "month", ".", "The", "valid", "return", "value", "is", "1", "2", "3", "4", "or", "-", "1", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java#L207-L217
kubernetes-client/java
util/src/main/java/io/kubernetes/client/informer/impl/DefaultSharedIndexInformer.java
DefaultSharedIndexInformer.handleDeltas
private void handleDeltas(Deque<MutablePair<DeltaFIFO.DeltaType, Object>> deltas) { if (Collections.isEmptyCollection(deltas)) { return; } // from oldest to newest for (MutablePair<DeltaFIFO.DeltaType, Object> delta : deltas) { DeltaFIFO.DeltaType deltaType = delta.getLeft(); switch (...
java
private void handleDeltas(Deque<MutablePair<DeltaFIFO.DeltaType, Object>> deltas) { if (Collections.isEmptyCollection(deltas)) { return; } // from oldest to newest for (MutablePair<DeltaFIFO.DeltaType, Object> delta : deltas) { DeltaFIFO.DeltaType deltaType = delta.getLeft(); switch (...
[ "private", "void", "handleDeltas", "(", "Deque", "<", "MutablePair", "<", "DeltaFIFO", ".", "DeltaType", ",", "Object", ">", ">", "deltas", ")", "{", "if", "(", "Collections", ".", "isEmptyCollection", "(", "deltas", ")", ")", "{", "return", ";", "}", "/...
handleDeltas handles deltas and call processor distribute. @param deltas deltas
[ "handleDeltas", "handles", "deltas", "and", "call", "processor", "distribute", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/util/src/main/java/io/kubernetes/client/informer/impl/DefaultSharedIndexInformer.java#L167-L198
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java
MarkdownParser.setOutlineEntryFormat
public void setOutlineEntryFormat(String formatWithoutNumbers, String formatWithNumbers) { if (!Strings.isEmpty(formatWithoutNumbers)) { this.outlineEntryWithoutNumberFormat = formatWithoutNumbers; } if (!Strings.isEmpty(formatWithNumbers)) { this.outlineEntryWithNumberFormat = formatWithNumbers; } }
java
public void setOutlineEntryFormat(String formatWithoutNumbers, String formatWithNumbers) { if (!Strings.isEmpty(formatWithoutNumbers)) { this.outlineEntryWithoutNumberFormat = formatWithoutNumbers; } if (!Strings.isEmpty(formatWithNumbers)) { this.outlineEntryWithNumberFormat = formatWithNumbers; } }
[ "public", "void", "setOutlineEntryFormat", "(", "String", "formatWithoutNumbers", ",", "String", "formatWithNumbers", ")", "{", "if", "(", "!", "Strings", ".", "isEmpty", "(", "formatWithoutNumbers", ")", ")", "{", "this", ".", "outlineEntryWithoutNumberFormat", "="...
Change the formats to be applied to the outline entries. <p>The format must be compatible with {@link MessageFormat}. <p>If section auto-numbering is on, the first parameter <code>{0}</code> equals to the prefix, the second parameter <code>{1}</code> equals to the string representation of the section number, the thir...
[ "Change", "the", "formats", "to", "be", "applied", "to", "the", "outline", "entries", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java#L330-L337
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java
ModeledUser.putUnrestrictedAttributes
private void putUnrestrictedAttributes(Map<String, String> attributes) { // Set full name attribute attributes.put(User.Attribute.FULL_NAME, getModel().getFullName()); // Set email address attribute attributes.put(User.Attribute.EMAIL_ADDRESS, getModel().getEmailAddress()); //...
java
private void putUnrestrictedAttributes(Map<String, String> attributes) { // Set full name attribute attributes.put(User.Attribute.FULL_NAME, getModel().getFullName()); // Set email address attribute attributes.put(User.Attribute.EMAIL_ADDRESS, getModel().getEmailAddress()); //...
[ "private", "void", "putUnrestrictedAttributes", "(", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "// Set full name attribute", "attributes", ".", "put", "(", "User", ".", "Attribute", ".", "FULL_NAME", ",", "getModel", "(", ")", ".", "get...
Stores all unrestricted (unprivileged) attributes within the given Map, pulling the values of those attributes from the underlying user model. If no value is yet defined for an attribute, that attribute will be set to null. @param attributes The Map to store all unrestricted attributes within.
[ "Stores", "all", "unrestricted", "(", "unprivileged", ")", "attributes", "within", "the", "given", "Map", "pulling", "the", "values", "of", "those", "attributes", "from", "the", "underlying", "user", "model", ".", "If", "no", "value", "is", "yet", "defined", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java#L338-L352
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.updateFaceWithServiceResponseAsync
public Observable<ServiceResponse<Void>> updateFaceWithServiceResponseAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRe...
java
public Observable<ServiceResponse<Void>> updateFaceWithServiceResponseAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRe...
[ "public", "Observable", "<", "ServiceResponse", "<", "Void", ">", ">", "updateFaceWithServiceResponseAsync", "(", "String", "personGroupId", ",", "UUID", "personId", ",", "UUID", "persistedFaceId", ",", "UpdateFaceOptionalParameter", "updateFaceOptionalParameter", ")", "{...
Update a person persisted face's userData field. @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. @param updateFaceOptionalParameter the object representing the opti...
[ "Update", "a", "person", "persisted", "face", "s", "userData", "field", "." ]
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#L1030-L1046
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/visunproj/KeyVisualization.java
KeyVisualization.getPreferredColumns
protected static int getPreferredColumns(double width, double height, int numc, double maxwidth) { // Maximum width (compared to height) of labels - guess. // FIXME: do we really need to do this three-step computation? // Number of rows we'd use in a squared layout: final double rows = Math.ceil(FastMat...
java
protected static int getPreferredColumns(double width, double height, int numc, double maxwidth) { // Maximum width (compared to height) of labels - guess. // FIXME: do we really need to do this three-step computation? // Number of rows we'd use in a squared layout: final double rows = Math.ceil(FastMat...
[ "protected", "static", "int", "getPreferredColumns", "(", "double", "width", ",", "double", "height", ",", "int", "numc", ",", "double", "maxwidth", ")", "{", "// Maximum width (compared to height) of labels - guess.", "// FIXME: do we really need to do this three-step computat...
Compute the preferred number of columns. @param width Target width @param height Target height @param numc Number of clusters @param maxwidth Max width of entries @return Preferred number of columns
[ "Compute", "the", "preferred", "number", "of", "columns", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/visunproj/KeyVisualization.java#L130-L137
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.getByResourceGroup
public ApplicationGatewayInner getByResourceGroup(String resourceGroupName, String applicationGatewayName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); }
java
public ApplicationGatewayInner getByResourceGroup(String resourceGroupName, String applicationGatewayName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); }
[ "public", "ApplicationGatewayInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "applicationGatewayName", ")", ".", "toBlocki...
Gets the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Runtim...
[ "Gets", "the", "specified", "application", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L321-L323