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
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateWord
public static <T extends CharSequence> T validateWord(T value, String errorMsg) throws ValidateException { if (false == isWord(value)) { throw new ValidateException(errorMsg); } return value; }
java
public static <T extends CharSequence> T validateWord(T value, String errorMsg) throws ValidateException { if (false == isWord(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "validateWord", "(", "T", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isWord", "(", "value", ")", ")", "{", "throw", "new", "Va...
验证是否为字母(包括大写和小写字母) @param <T> 字符串类型 @param value 表单值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常 @since 4.1.8
[ "验证是否为字母(包括大写和小写字母)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L572-L577
UrielCh/ovh-java-sdk
ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java
ApiOvhCaasregistry.serviceName_users_userId_DELETE
public void serviceName_users_userId_DELETE(String serviceName, String userId) throws IOException { String qPath = "/caas/registry/{serviceName}/users/{userId}"; StringBuilder sb = path(qPath, serviceName, userId); exec(qPath, "DELETE", sb.toString(), null); }
java
public void serviceName_users_userId_DELETE(String serviceName, String userId) throws IOException { String qPath = "/caas/registry/{serviceName}/users/{userId}"; StringBuilder sb = path(qPath, serviceName, userId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_users_userId_DELETE", "(", "String", "serviceName", ",", "String", "userId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/registry/{serviceName}/users/{userId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath...
Delete user REST: DELETE /caas/registry/{serviceName}/users/{userId} @param serviceName [required] Service name @param userId [required] User id API beta
[ "Delete", "user" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java#L139-L143
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/API.java
API.validateMandatoryParams
private void validateMandatoryParams(JSONObject params, ApiElement element) throws ApiException { if (element == null) { return; } List<String> mandatoryParams = element.getMandatoryParamNames(); if (mandatoryParams != null) { for (String param : mandatoryParams) { if (!params.has(param) || params.ge...
java
private void validateMandatoryParams(JSONObject params, ApiElement element) throws ApiException { if (element == null) { return; } List<String> mandatoryParams = element.getMandatoryParamNames(); if (mandatoryParams != null) { for (String param : mandatoryParams) { if (!params.has(param) || params.ge...
[ "private", "void", "validateMandatoryParams", "(", "JSONObject", "params", ",", "ApiElement", "element", ")", "throws", "ApiException", "{", "if", "(", "element", "==", "null", ")", "{", "return", ";", "}", "List", "<", "String", ">", "mandatoryParams", "=", ...
Validates that the mandatory parameters of the given {@code ApiElement} are present, throwing an {@code ApiException} if not. @param params the parameters of the API request. @param element the API element to validate. @throws ApiException if any of the mandatory parameters is missing.
[ "Validates", "that", "the", "mandatory", "parameters", "of", "the", "given", "{", "@code", "ApiElement", "}", "are", "present", "throwing", "an", "{", "@code", "ApiException", "}", "if", "not", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L558-L571
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/Reflection.java
Reflection.findBestMethodWithSignature
public Method findBestMethodWithSignature( String methodName, Class<?>... argumentsClasses ) throws NoSuchMethodException, SecurityException { return findBestMethodWithSignature(methodName, true, argumentsClasses); }
java
public Method findBestMethodWithSignature( String methodName, Class<?>... argumentsClasses ) throws NoSuchMethodException, SecurityException { return findBestMethodWithSignature(methodName, true, argumentsClasses); }
[ "public", "Method", "findBestMethodWithSignature", "(", "String", "methodName", ",", "Class", "<", "?", ">", "...", "argumentsClasses", ")", "throws", "NoSuchMethodException", ",", "SecurityException", "{", "return", "findBestMethodWithSignature", "(", "methodName", ","...
Find the best method on the target class that matches the signature specified with the specified name and the list of argument classes. This method first attempts to find the method with the specified argument classes; if no such method is found, a NoSuchMethodException is thrown. @param methodName the name of the met...
[ "Find", "the", "best", "method", "on", "the", "target", "class", "that", "matches", "the", "signature", "specified", "with", "the", "specified", "name", "and", "the", "list", "of", "argument", "classes", ".", "This", "method", "first", "attempts", "to", "fin...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/Reflection.java#L692-L696
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.moveTo
public SVGPath moveTo(double x, double y) { return append(PATH_MOVE).append(x).append(y); }
java
public SVGPath moveTo(double x, double y) { return append(PATH_MOVE).append(x).append(y); }
[ "public", "SVGPath", "moveTo", "(", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_MOVE", ")", ".", "append", "(", "x", ")", ".", "append", "(", "y", ")", ";", "}" ]
Move to the given coordinates. @param x new coordinates @param y new coordinates @return path object, for compact syntax.
[ "Move", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L311-L313
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGraphAddDependencies
public static int cuGraphAddDependencies(CUgraph hGraph, CUgraphNode from[], CUgraphNode to[], long numDependencies) { return checkResult(cuGraphAddDependenciesNative(hGraph, from, to, numDependencies)); }
java
public static int cuGraphAddDependencies(CUgraph hGraph, CUgraphNode from[], CUgraphNode to[], long numDependencies) { return checkResult(cuGraphAddDependenciesNative(hGraph, from, to, numDependencies)); }
[ "public", "static", "int", "cuGraphAddDependencies", "(", "CUgraph", "hGraph", ",", "CUgraphNode", "from", "[", "]", ",", "CUgraphNode", "to", "[", "]", ",", "long", "numDependencies", ")", "{", "return", "checkResult", "(", "cuGraphAddDependenciesNative", "(", ...
Adds dependency edges to a graph.<br> <br> The number of dependencies to be added is defined by \p numDependencies Elements in \p from and \p to at corresponding indices define a dependency. Each node in \p from and \p to must belong to \p hGraph.<br> <br> If \p numDependencies is 0, elements in \p from and \p to will ...
[ "Adds", "dependency", "edges", "to", "a", "graph", ".", "<br", ">", "<br", ">", "The", "number", "of", "dependencies", "to", "be", "added", "is", "defined", "by", "\\", "p", "numDependencies", "Elements", "in", "\\", "p", "from", "and", "\\", "p", "to"...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L12848-L12851
stripe/stripe-java
src/main/java/com/stripe/model/Account.java
Account.persons
public PersonCollection persons() throws StripeException { return persons((Map<String, Object>) null, (RequestOptions) null); }
java
public PersonCollection persons() throws StripeException { return persons((Map<String, Object>) null, (RequestOptions) null); }
[ "public", "PersonCollection", "persons", "(", ")", "throws", "StripeException", "{", "return", "persons", "(", "(", "Map", "<", "String", ",", "Object", ">", ")", "null", ",", "(", "RequestOptions", ")", "null", ")", ";", "}" ]
Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
[ "Returns", "a", "list", "of", "people", "associated", "with", "the", "account’s", "legal", "entity", ".", "The", "people", "are", "returned", "sorted", "by", "creation", "date", "with", "the", "most", "recent", "people", "appearing", "first", "." ]
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/Account.java#L451-L453
finnyb/javampd
src/main/java/org/bff/javampd/player/MPDPlayer.java
MPDPlayer.firePlayerChangeEvent
protected synchronized void firePlayerChangeEvent(PlayerChangeEvent.Event event) { PlayerChangeEvent pce = new PlayerChangeEvent(this, event); for (PlayerChangeListener pcl : listeners) { pcl.playerChanged(pce); } }
java
protected synchronized void firePlayerChangeEvent(PlayerChangeEvent.Event event) { PlayerChangeEvent pce = new PlayerChangeEvent(this, event); for (PlayerChangeListener pcl : listeners) { pcl.playerChanged(pce); } }
[ "protected", "synchronized", "void", "firePlayerChangeEvent", "(", "PlayerChangeEvent", ".", "Event", "event", ")", "{", "PlayerChangeEvent", "pce", "=", "new", "PlayerChangeEvent", "(", "this", ",", "event", ")", ";", "for", "(", "PlayerChangeListener", "pcl", ":...
Sends the appropriate {@link PlayerChangeEvent} to all registered {@link PlayerChangeListener}s. @param event the {@link PlayerChangeEvent.Event} to send
[ "Sends", "the", "appropriate", "{", "@link", "PlayerChangeEvent", "}", "to", "all", "registered", "{", "@link", "PlayerChangeListener", "}", "s", "." ]
train
https://github.com/finnyb/javampd/blob/186736e85fc238b4208cc9ee23373f9249376b4c/src/main/java/org/bff/javampd/player/MPDPlayer.java#L76-L82
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.sounds_id_PUT
public void sounds_id_PUT(Long id, OvhSound body) throws IOException { String qPath = "/telephony/sounds/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
java
public void sounds_id_PUT(Long id, OvhSound body) throws IOException { String qPath = "/telephony/sounds/{id}"; StringBuilder sb = path(qPath, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "sounds_id_PUT", "(", "Long", "id", ",", "OvhSound", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/sounds/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "id", ")", ";", "exec", "(", ...
Alter this object properties REST: PUT /telephony/sounds/{id} @param body [required] New object properties @param id [required] Sound ID
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8741-L8745
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java
GroovyResultSetExtension.putAt
public void putAt(int index, Object newValue) throws SQLException { index = normalizeIndex(index); getResultSet().updateObject(index, newValue); }
java
public void putAt(int index, Object newValue) throws SQLException { index = normalizeIndex(index); getResultSet().updateObject(index, newValue); }
[ "public", "void", "putAt", "(", "int", "index", ",", "Object", "newValue", ")", "throws", "SQLException", "{", "index", "=", "normalizeIndex", "(", "index", ")", ";", "getResultSet", "(", ")", ".", "updateObject", "(", "index", ",", "newValue", ")", ";", ...
Supports integer based subscript operators for updating the values of numbered columns starting at zero. Negative indices are supported, they will count from the last column backwards. @param index is the number of the column to look at starting at 1 @param newValue the updated value @throws java.sql.SQLException i...
[ "Supports", "integer", "based", "subscript", "operators", "for", "updating", "the", "values", "of", "numbered", "columns", "starting", "at", "zero", ".", "Negative", "indices", "are", "supported", "they", "will", "count", "from", "the", "last", "column", "backwa...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/GroovyResultSetExtension.java#L166-L169
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/util/json/JSONObject.java
JSONObject.optDouble
public double optDouble(String key, double defaultValue) { try { Object o = opt(key); return o instanceof Number ? ((Number) o).doubleValue() : new Double((String) o).doubleValue(); } catch (Exception e) { return defaultValue; } }
java
public double optDouble(String key, double defaultValue) { try { Object o = opt(key); return o instanceof Number ? ((Number) o).doubleValue() : new Double((String) o).doubleValue(); } catch (Exception e) { return defaultValue; } }
[ "public", "double", "optDouble", "(", "String", "key", ",", "double", "defaultValue", ")", "{", "try", "{", "Object", "o", "=", "opt", "(", "key", ")", ";", "return", "o", "instanceof", "Number", "?", "(", "(", "Number", ")", "o", ")", ".", "doubleVa...
Get an optional double associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. @param key A key string. @param defaultValue The default. @return An object which is the value.
[ "Get", "an", "optional", "double", "associated", "with", "a", "key", "or", "the", "defaultValue", "if", "there", "is", "no", "such", "key", "or", "if", "its", "value", "is", "not", "a", "number", ".", "If", "the", "value", "is", "a", "string", "an", ...
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/JSONObject.java#L704-L711
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoElementFactory.java
StereoElementFactory.using2DCoordinates
public static StereoElementFactory using2DCoordinates(IAtomContainer container) { EdgeToBondMap bondMap = EdgeToBondMap.withSpaceFor(container); int[][] graph = GraphUtil.toAdjList(container, bondMap); return new StereoElementFactory2D(container, graph, bondMap); }
java
public static StereoElementFactory using2DCoordinates(IAtomContainer container) { EdgeToBondMap bondMap = EdgeToBondMap.withSpaceFor(container); int[][] graph = GraphUtil.toAdjList(container, bondMap); return new StereoElementFactory2D(container, graph, bondMap); }
[ "public", "static", "StereoElementFactory", "using2DCoordinates", "(", "IAtomContainer", "container", ")", "{", "EdgeToBondMap", "bondMap", "=", "EdgeToBondMap", ".", "withSpaceFor", "(", "container", ")", ";", "int", "[", "]", "[", "]", "graph", "=", "GraphUtil",...
Create a stereo element factory for creating stereo elements using 2D coordinates and depiction labels (up/down, wedge/hatch). @param container the structure to create the factory for @return the factory instance
[ "Create", "a", "stereo", "element", "factory", "for", "creating", "stereo", "elements", "using", "2D", "coordinates", "and", "depiction", "labels", "(", "up", "/", "down", "wedge", "/", "hatch", ")", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoElementFactory.java#L483-L487
Omertron/api-rottentomatoes
src/main/java/com/omertron/rottentomatoesapi/RottenTomatoesApi.java
RottenTomatoesApi.getNewReleaseDvds
public List<RTMovie> getNewReleaseDvds(String country) throws RottenTomatoesException { return getNewReleaseDvds(country, DEFAULT_PAGE, DEFAULT_PAGE_LIMIT); }
java
public List<RTMovie> getNewReleaseDvds(String country) throws RottenTomatoesException { return getNewReleaseDvds(country, DEFAULT_PAGE, DEFAULT_PAGE_LIMIT); }
[ "public", "List", "<", "RTMovie", ">", "getNewReleaseDvds", "(", "String", "country", ")", "throws", "RottenTomatoesException", "{", "return", "getNewReleaseDvds", "(", "country", ",", "DEFAULT_PAGE", ",", "DEFAULT_PAGE_LIMIT", ")", ";", "}" ]
Retrieves new release DVDs @param country Provides localized data for the selected country @return @throws RottenTomatoesException
[ "Retrieves", "new", "release", "DVDs" ]
train
https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/RottenTomatoesApi.java#L439-L441
liaochong/spring-boot-starter-converter
src/main/java/com/github/liaochong/converter/core/BeanConvertStrategy.java
BeanConvertStrategy.convertBean
public static <T, U> U convertBean(T source, Class<U> targetClass) { return convertBean(source, targetClass, null); }
java
public static <T, U> U convertBean(T source, Class<U> targetClass) { return convertBean(source, targetClass, null); }
[ "public", "static", "<", "T", ",", "U", ">", "U", "convertBean", "(", "T", "source", ",", "Class", "<", "U", ">", "targetClass", ")", "{", "return", "convertBean", "(", "source", ",", "targetClass", ",", "null", ")", ";", "}" ]
单个Bean转换,无指定异常提供 @throws ConvertException 转换异常 @param source 被转换对象 @param targetClass 需要转换到的类型 @param <T> 转换前的类型 @param <U> 转换后的类型 @return 结果
[ "单个Bean转换,无指定异常提供" ]
train
https://github.com/liaochong/spring-boot-starter-converter/blob/a36bea44bd23330a6f43b0372906a804a09285c5/src/main/java/com/github/liaochong/converter/core/BeanConvertStrategy.java#L48-L50
jbundle/jbundle
thin/opt/location/src/main/java/org/jbundle/thin/opt/location/DynamicTreeNode.java
DynamicTreeNode.loadChildren
protected void loadChildren() { DynamicTreeNode newNode; // Font font; // int randomIndex; NodeData dataParent = (NodeData)this.getUserObject(); FieldList fieldList = dataParent.makeRecord(); FieldTable fieldTable = fieldList.getTable...
java
protected void loadChildren() { DynamicTreeNode newNode; // Font font; // int randomIndex; NodeData dataParent = (NodeData)this.getUserObject(); FieldList fieldList = dataParent.makeRecord(); FieldTable fieldTable = fieldList.getTable...
[ "protected", "void", "loadChildren", "(", ")", "{", "DynamicTreeNode", "newNode", ";", "// Font font;", "// int randomIndex;", "NodeData", "dataParent", "=", "(", "NodeData", ")", "this", ".", "getUserObject", "(", ")", ";", ...
Messaged the first time getChildCount is messaged. Creates children with random names from names.
[ "Messaged", "the", "first", "time", "getChildCount", "is", "messaged", ".", "Creates", "children", "with", "random", "names", "from", "names", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/opt/location/src/main/java/org/jbundle/thin/opt/location/DynamicTreeNode.java#L67-L97
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.removeByC_NotST
@Override public void removeByC_NotST(long CPDefinitionId, int status) { for (CPInstance cpInstance : findByC_NotST(CPDefinitionId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
java
@Override public void removeByC_NotST(long CPDefinitionId, int status) { for (CPInstance cpInstance : findByC_NotST(CPDefinitionId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
[ "@", "Override", "public", "void", "removeByC_NotST", "(", "long", "CPDefinitionId", ",", "int", "status", ")", "{", "for", "(", "CPInstance", "cpInstance", ":", "findByC_NotST", "(", "CPDefinitionId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "Que...
Removes all the cp instances where CPDefinitionId = &#63; and status &ne; &#63; from the database. @param CPDefinitionId the cp definition ID @param status the status
[ "Removes", "all", "the", "cp", "instances", "where", "CPDefinitionId", "=", "&#63", ";", "and", "status", "&ne", ";", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L5568-L5574
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Scanners.java
Scanners.nestableBlockComment
public static Parser<Void> nestableBlockComment(String begin, String end) { return nestableBlockComment(begin, end, Patterns.isChar(CharPredicates.ALWAYS)); }
java
public static Parser<Void> nestableBlockComment(String begin, String end) { return nestableBlockComment(begin, end, Patterns.isChar(CharPredicates.ALWAYS)); }
[ "public", "static", "Parser", "<", "Void", ">", "nestableBlockComment", "(", "String", "begin", ",", "String", "end", ")", "{", "return", "nestableBlockComment", "(", "begin", ",", "end", ",", "Patterns", ".", "isChar", "(", "CharPredicates", ".", "ALWAYS", ...
A scanner for a nestable block comment that starts with {@code begin} and ends with {@code end}. @param begin begins a block comment @param end ends a block comment @return the block comment scanner.
[ "A", "scanner", "for", "a", "nestable", "block", "comment", "that", "starts", "with", "{", "@code", "begin", "}", "and", "ends", "with", "{", "@code", "end", "}", "." ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Scanners.java#L472-L474
opencypher/openCypher
tools/grammar/src/main/java/org/opencypher/grammar/Description.java
Description.findStart
private static int findStart( char[] buffer, int start, int end ) { int pos, cp; for ( pos = start; pos < end && isWhitespace( cp = codePointAt( buffer, pos ) ); pos += charCount( cp ) ) { if ( cp == '\n' ) { start = pos + 1; } } ...
java
private static int findStart( char[] buffer, int start, int end ) { int pos, cp; for ( pos = start; pos < end && isWhitespace( cp = codePointAt( buffer, pos ) ); pos += charCount( cp ) ) { if ( cp == '\n' ) { start = pos + 1; } } ...
[ "private", "static", "int", "findStart", "(", "char", "[", "]", "buffer", ",", "int", "start", ",", "int", "end", ")", "{", "int", "pos", ",", "cp", ";", "for", "(", "pos", "=", "start", ";", "pos", "<", "end", "&&", "isWhitespace", "(", "cp", "=...
Find the beginning of the first line that isn't all whitespace.
[ "Find", "the", "beginning", "of", "the", "first", "line", "that", "isn", "t", "all", "whitespace", "." ]
train
https://github.com/opencypher/openCypher/blob/eb780caea625900ddbedd28a1eac9a5dbe09c5f0/tools/grammar/src/main/java/org/opencypher/grammar/Description.java#L210-L221
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/collection/BiInt2ObjectMap.java
BiInt2ObjectMap.get
public V get(final int keyPartA, final int keyPartB) { final long key = compoundKey(keyPartA, keyPartB); return map.get(key); }
java
public V get(final int keyPartA, final int keyPartB) { final long key = compoundKey(keyPartA, keyPartB); return map.get(key); }
[ "public", "V", "get", "(", "final", "int", "keyPartA", ",", "final", "int", "keyPartB", ")", "{", "final", "long", "key", "=", "compoundKey", "(", "keyPartA", ",", "keyPartB", ")", ";", "return", "map", ".", "get", "(", "key", ")", ";", "}" ]
Retrieve a value from the map. @param keyPartA for the key @param keyPartB for the key @return value matching the key if found or null if not found.
[ "Retrieve", "a", "value", "from", "the", "map", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/collection/BiInt2ObjectMap.java#L109-L113
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java
Convolution.convn
public static INDArray convn(INDArray input, INDArray kernel, Type type, int[] axes) { return Nd4j.getConvolution().convn(input, kernel, type, axes); }
java
public static INDArray convn(INDArray input, INDArray kernel, Type type, int[] axes) { return Nd4j.getConvolution().convn(input, kernel, type, axes); }
[ "public", "static", "INDArray", "convn", "(", "INDArray", "input", ",", "INDArray", "kernel", ",", "Type", "type", ",", "int", "[", "]", "axes", ")", "{", "return", "Nd4j", ".", "getConvolution", "(", ")", ".", "convn", "(", "input", ",", "kernel", ","...
ND Convolution @param input the input to op @param kernel the kerrnel to op with @param type the opType of convolution @param axes the axes to do the convolution along @return the convolution of the given input and kernel
[ "ND", "Convolution" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java#L368-L370
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyDecoder.java
KeyDecoder.decodeSingleNullableDesc
public static byte[] decodeSingleNullableDesc(byte[] src, int prefixPadding, int suffixPadding) throws CorruptEncodingException { try { byte b = src[prefixPadding]; if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) { return null; } ...
java
public static byte[] decodeSingleNullableDesc(byte[] src, int prefixPadding, int suffixPadding) throws CorruptEncodingException { try { byte b = src[prefixPadding]; if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) { return null; } ...
[ "public", "static", "byte", "[", "]", "decodeSingleNullableDesc", "(", "byte", "[", "]", "src", ",", "int", "prefixPadding", ",", "int", "suffixPadding", ")", "throws", "CorruptEncodingException", "{", "try", "{", "byte", "b", "=", "src", "[", "prefixPadding",...
Decodes the given byte array which was encoded by {@link KeyEncoder#encodeSingleNullableDesc}. Always returns a new byte array instance. @param prefixPadding amount of extra bytes to skip from start of encoded byte array @param suffixPadding amount of extra bytes to skip at end of encoded byte array
[ "Decodes", "the", "given", "byte", "array", "which", "was", "encoded", "by", "{", "@link", "KeyEncoder#encodeSingleNullableDesc", "}", ".", "Always", "returns", "a", "new", "byte", "array", "instance", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L881-L901
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java
StanzaCollector.nextResultOrThrow
public <P extends Stanza> P nextResultOrThrow(long timeout) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException { P result; try { result = nextResult(timeout); } finally { cancel(); } if (result =...
java
public <P extends Stanza> P nextResultOrThrow(long timeout) throws NoResponseException, XMPPErrorException, InterruptedException, NotConnectedException { P result; try { result = nextResult(timeout); } finally { cancel(); } if (result =...
[ "public", "<", "P", "extends", "Stanza", ">", "P", "nextResultOrThrow", "(", "long", "timeout", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "InterruptedException", ",", "NotConnectedException", "{", "P", "result", ";", "try", "{", "result...
Returns the next available stanza. The method call will block until a stanza is available or the <tt>timeout</tt> has elapsed. This method does also cancel the collector in every case. <p> Three things can happen when waiting for an response: </p> <ol> <li>A result response arrives.</li> <li>An error response arrives.<...
[ "Returns", "the", "next", "available", "stanza", ".", "The", "method", "call", "will", "block", "until", "a", "stanza", "is", "available", "or", "the", "<tt", ">", "timeout<", "/", "tt", ">", "has", "elapsed", ".", "This", "method", "does", "also", "canc...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java#L278-L299
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/HierarchicalTable.java
HierarchicalTable.setHandle
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { Record recMain = this.getRecord(); this.setCurrentTable(this.getNextTable()); FieldList record = super.setHandle(bookmark, iHandleType); if (record == null) { // Not found in the main...
java
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { Record recMain = this.getRecord(); this.setCurrentTable(this.getNextTable()); FieldList record = super.setHandle(bookmark, iHandleType); if (record == null) { // Not found in the main...
[ "public", "FieldList", "setHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "Record", "recMain", "=", "this", ".", "getRecord", "(", ")", ";", "this", ".", "setCurrentTable", "(", "this", ".", "getNextTable", ...
Reposition to this record Using this bookmark. @exception DBException File exception.
[ "Reposition", "to", "this", "record", "Using", "this", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/HierarchicalTable.java#L307-L333
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/capability/RuntimeCapability.java
RuntimeCapability.getCapabilityServiceName
public ServiceName getCapabilityServiceName(PathAddress address, Class<?> serviceValueType) { return fromBaseCapability(address).getCapabilityServiceName(serviceValueType); }
java
public ServiceName getCapabilityServiceName(PathAddress address, Class<?> serviceValueType) { return fromBaseCapability(address).getCapabilityServiceName(serviceValueType); }
[ "public", "ServiceName", "getCapabilityServiceName", "(", "PathAddress", "address", ",", "Class", "<", "?", ">", "serviceValueType", ")", "{", "return", "fromBaseCapability", "(", "address", ")", ".", "getCapabilityServiceName", "(", "serviceValueType", ")", ";", "}...
Gets the name of service provided by this capability. @param address the path from which dynamic portion of the capability name is calculated from. Cannot be {@code null} @param serviceValueType the expected type of the service's value. Only used to provide validate that the service value type provided by the capabili...
[ "Gets", "the", "name", "of", "service", "provided", "by", "this", "capability", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/capability/RuntimeCapability.java#L215-L217
netty/netty
common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java
GlobalEventExecutor.awaitInactivity
public boolean awaitInactivity(long timeout, TimeUnit unit) throws InterruptedException { if (unit == null) { throw new NullPointerException("unit"); } final Thread thread = this.thread; if (thread == null) { throw new IllegalStateException("thread was not starte...
java
public boolean awaitInactivity(long timeout, TimeUnit unit) throws InterruptedException { if (unit == null) { throw new NullPointerException("unit"); } final Thread thread = this.thread; if (thread == null) { throw new IllegalStateException("thread was not starte...
[ "public", "boolean", "awaitInactivity", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "if", "(", "unit", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"unit\"", ")", ";", "}", "final", "...
Waits until the worker thread of this executor has no tasks left in its task queue and terminates itself. Because a new worker thread will be started again when a new task is submitted, this operation is only useful when you want to ensure that the worker thread is terminated <strong>after</strong> your application is ...
[ "Waits", "until", "the", "worker", "thread", "of", "this", "executor", "has", "no", "tasks", "left", "in", "its", "task", "queue", "and", "terminates", "itself", ".", "Because", "a", "new", "worker", "thread", "will", "be", "started", "again", "when", "a",...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/GlobalEventExecutor.java#L194-L205
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/ssh2/Ssh2Session.java
Ssh2Session.requestX11Forwarding
boolean requestX11Forwarding(boolean singleconnection, String protocol, String cookie, int screen) throws SshException { ByteArrayWriter request = new ByteArrayWriter(); try { request.writeBoolean(singleconnection); request.writeString(protocol); request.writeString(cookie); request.writeInt(screen)...
java
boolean requestX11Forwarding(boolean singleconnection, String protocol, String cookie, int screen) throws SshException { ByteArrayWriter request = new ByteArrayWriter(); try { request.writeBoolean(singleconnection); request.writeString(protocol); request.writeString(cookie); request.writeInt(screen)...
[ "boolean", "requestX11Forwarding", "(", "boolean", "singleconnection", ",", "String", "protocol", ",", "String", "cookie", ",", "int", "screen", ")", "throws", "SshException", "{", "ByteArrayWriter", "request", "=", "new", "ByteArrayWriter", "(", ")", ";", "try", ...
Send a request for X Forwarding. @param singleconnection @param protocol @param cookie @param display @return boolean @throws SshException
[ "Send", "a", "request", "for", "X", "Forwarding", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/ssh2/Ssh2Session.java#L276-L294
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.setFeature
public void setFeature(String name, boolean state) throws IllegalArgumentException, IllegalStateException { if (name == null) { throw new IllegalArgumentException("feature name can not be null"); } if (FEATURE_NAMES_INTERNED.equals(name)) { namesInterned = state; } else if (FEATURE_SERIALIZER_ATTVALUE_USE...
java
public void setFeature(String name, boolean state) throws IllegalArgumentException, IllegalStateException { if (name == null) { throw new IllegalArgumentException("feature name can not be null"); } if (FEATURE_NAMES_INTERNED.equals(name)) { namesInterned = state; } else if (FEATURE_SERIALIZER_ATTVALUE_USE...
[ "public", "void", "setFeature", "(", "String", "name", ",", "boolean", "state", ")", "throws", "IllegalArgumentException", ",", "IllegalStateException", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"feature nam...
Sets the feature. @param name the name @param state the state @throws IllegalArgumentException the illegal argument exception @throws IllegalStateException the illegal state exception
[ "Sets", "the", "feature", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L328-L339
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java
ControlBean.preInvoke
protected void preInvoke(Method m, Object [] args) { try { preInvoke(m, args, null); } catch (InterceptorPivotException ipe) { //this will never happen because no interceptor is passed. } }
java
protected void preInvoke(Method m, Object [] args) { try { preInvoke(m, args, null); } catch (InterceptorPivotException ipe) { //this will never happen because no interceptor is passed. } }
[ "protected", "void", "preInvoke", "(", "Method", "m", ",", "Object", "[", "]", "args", ")", "{", "try", "{", "preInvoke", "(", "m", ",", "args", ",", "null", ")", ";", "}", "catch", "(", "InterceptorPivotException", "ipe", ")", "{", "//this will never ha...
The preinvoke method is called before all operations on the control. It is the basic hook for logging, context initialization, resource management, and other common services
[ "The", "preinvoke", "method", "is", "called", "before", "all", "operations", "on", "the", "control", ".", "It", "is", "the", "basic", "hook", "for", "logging", "context", "initialization", "resource", "management", "and", "other", "common", "services" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java#L421-L431
opendatatrentino/s-match
src/main/java/it/unitn/disi/common/utils/MiscUtils.java
MiscUtils.readObject
public static Object readObject(String fileName, boolean isInternalFile) throws DISIException { Object result; try { InputStream fos = null; if (isInternalFile == true) { fos = Thread.currentThread().getContextClassLoader().getResource(fileName).openStream(...
java
public static Object readObject(String fileName, boolean isInternalFile) throws DISIException { Object result; try { InputStream fos = null; if (isInternalFile == true) { fos = Thread.currentThread().getContextClassLoader().getResource(fileName).openStream(...
[ "public", "static", "Object", "readObject", "(", "String", "fileName", ",", "boolean", "isInternalFile", ")", "throws", "DISIException", "{", "Object", "result", ";", "try", "{", "InputStream", "fos", "=", "null", ";", "if", "(", "isInternalFile", "==", "true"...
Reads Java object from a file. @param fileName the file where the object is stored @parm isInternalFile reads from internal data file in resources folder @return the object @throws DISIException DISIException
[ "Reads", "Java", "object", "from", "a", "file", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/MiscUtils.java#L62-L95
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java
Counters.initialize
public void initialize(final MetricContext metricContext, final Class<E> enumClass, final Class<?> instrumentedClass) { Builder<E, Counter> builder = ImmutableMap.builder(); for (E e : Arrays.asList(enumClass.getEnumConstants())) { builder.put(e, metricContext.counter(MetricRegistry.name(instrumentedCla...
java
public void initialize(final MetricContext metricContext, final Class<E> enumClass, final Class<?> instrumentedClass) { Builder<E, Counter> builder = ImmutableMap.builder(); for (E e : Arrays.asList(enumClass.getEnumConstants())) { builder.put(e, metricContext.counter(MetricRegistry.name(instrumentedCla...
[ "public", "void", "initialize", "(", "final", "MetricContext", "metricContext", ",", "final", "Class", "<", "E", ">", "enumClass", ",", "final", "Class", "<", "?", ">", "instrumentedClass", ")", "{", "Builder", "<", "E", ",", "Counter", ">", "builder", "="...
Creates a {@link Counter} for every value of the enumClass. Use {@link #inc(Enum, long)} to increment the counter associated with a enum value @param metricContext that {@link Counter}s will be registered @param enumClass that define the names of {@link Counter}s. One counter is created per value @param instrumentedCl...
[ "Creates", "a", "{", "@link", "Counter", "}", "for", "every", "value", "of", "the", "enumClass", ".", "Use", "{", "@link", "#inc", "(", "Enum", "long", ")", "}", "to", "increment", "the", "counter", "associated", "with", "a", "enum", "value" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/Counters.java#L45-L54
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
TaskSlotTable.isValidTimeout
public boolean isValidTimeout(AllocationID allocationId, UUID ticket) { checkInit(); return timerService.isValid(allocationId, ticket); }
java
public boolean isValidTimeout(AllocationID allocationId, UUID ticket) { checkInit(); return timerService.isValid(allocationId, ticket); }
[ "public", "boolean", "isValidTimeout", "(", "AllocationID", "allocationId", ",", "UUID", "ticket", ")", "{", "checkInit", "(", ")", ";", "return", "timerService", ".", "isValid", "(", "allocationId", ",", "ticket", ")", ";", "}" ]
Check whether the timeout with ticket is valid for the given allocation id. @param allocationId to check against @param ticket of the timeout @return True if the timeout is valid; otherwise false
[ "Check", "whether", "the", "timeout", "with", "ticket", "is", "valid", "for", "the", "given", "allocation", "id", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L361-L365
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.fetchPubkeysList
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection, BareJid contact) throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NoResponseException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, PubSubException.NotAPub...
java
public static PublicKeysListElement fetchPubkeysList(XMPPConnection connection, BareJid contact) throws InterruptedException, XMPPException.XMPPErrorException, SmackException.NoResponseException, PubSubException.NotALeafNodeException, SmackException.NotConnectedException, PubSubException.NotAPub...
[ "public", "static", "PublicKeysListElement", "fetchPubkeysList", "(", "XMPPConnection", "connection", ",", "BareJid", "contact", ")", "throws", "InterruptedException", ",", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NoResponseException", ",", ...
Consult the public key metadata node of {@code contact} to fetch the list of their published OpenPGP public keys. @see <a href="https://xmpp.org/extensions/xep-0373.html#discover-pubkey-list"> XEP-0373 §4.3: Discovering Public Keys of a User</a> @param connection XMPP connection @param contact {@link BareJid} of the ...
[ "Consult", "the", "public", "key", "metadata", "node", "of", "{", "@code", "contact", "}", "to", "fetch", "the", "list", "of", "their", "published", "OpenPGP", "public", "keys", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L204-L217
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java
RedundentExprEliminator.createIteratorFromSteps
protected WalkingIterator createIteratorFromSteps(final WalkingIterator wi, int numSteps) { WalkingIterator newIter = new WalkingIterator(wi.getPrefixResolver()); try { AxesWalker walker = (AxesWalker)wi.getFirstWalker().clone(); newIter.setFirstWalker(walker); walker.setLocPathIterator(newIter);...
java
protected WalkingIterator createIteratorFromSteps(final WalkingIterator wi, int numSteps) { WalkingIterator newIter = new WalkingIterator(wi.getPrefixResolver()); try { AxesWalker walker = (AxesWalker)wi.getFirstWalker().clone(); newIter.setFirstWalker(walker); walker.setLocPathIterator(newIter);...
[ "protected", "WalkingIterator", "createIteratorFromSteps", "(", "final", "WalkingIterator", "wi", ",", "int", "numSteps", ")", "{", "WalkingIterator", "newIter", "=", "new", "WalkingIterator", "(", "wi", ".", "getPrefixResolver", "(", ")", ")", ";", "try", "{", ...
Create a new WalkingIterator from the steps in another WalkingIterator. @param wi The iterator from where the steps will be taken. @param numSteps The number of steps from the first to copy into the new iterator. @return The new iterator.
[ "Create", "a", "new", "WalkingIterator", "from", "the", "steps", "in", "another", "WalkingIterator", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java#L487-L509
Pixplicity/EasyPrefs
library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java
Prefs.putStringSet
@SuppressWarnings("WeakerAccess") @TargetApi(Build.VERSION_CODES.HONEYCOMB) public static void putStringSet(final String key, final Set<String> value) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { final Editor editor = getPreferences().edit(); editor.putStringSe...
java
@SuppressWarnings("WeakerAccess") @TargetApi(Build.VERSION_CODES.HONEYCOMB) public static void putStringSet(final String key, final Set<String> value) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { final Editor editor = getPreferences().edit(); editor.putStringSe...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB", ")", "public", "static", "void", "putStringSet", "(", "final", "String", "key", ",", "final", "Set", "<", "String", ">", "value", "...
Stores a Set of Strings. On Honeycomb and later this will call the native implementation in SharedPreferences.Editor, on older SDKs this will call {@link #putOrderedStringSet(String, Set)}. <strong>Note that the native implementation of {@link Editor#putStringSet(String, Set)} does not reliably preserve the order of th...
[ "Stores", "a", "Set", "of", "Strings", ".", "On", "Honeycomb", "and", "later", "this", "will", "call", "the", "native", "implementation", "in", "SharedPreferences", ".", "Editor", "on", "older", "SDKs", "this", "will", "call", "{", "@link", "#putOrderedStringS...
train
https://github.com/Pixplicity/EasyPrefs/blob/0ca13a403bf099019a13d68b38edcf55fca5a653/library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java#L360-L371
OpenLiberty/open-liberty
dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java
CommonMpJwtFat.badAppExpectations
public Expectations badAppExpectations(String errorMessage) throws Exception { Expectations expectations = new Expectations(); expectations.addExpectation(new ResponseStatusExpectation(HttpServletResponse.SC_UNAUTHORIZED)); expectations.addExpectation(new ResponseMessageExpectation(MpJwtFatCons...
java
public Expectations badAppExpectations(String errorMessage) throws Exception { Expectations expectations = new Expectations(); expectations.addExpectation(new ResponseStatusExpectation(HttpServletResponse.SC_UNAUTHORIZED)); expectations.addExpectation(new ResponseMessageExpectation(MpJwtFatCons...
[ "public", "Expectations", "badAppExpectations", "(", "String", "errorMessage", ")", "throws", "Exception", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ".", "addExpectation", "(", "new", "ResponseStatusExpectation", "...
Set bad app check expectations - sets checks for a 401 status code and the expected error message in the server's messages.log @param errorMessage - the error message to search for in the server's messages.log file @return - newly created Expectations @throws Exception
[ "Set", "bad", "app", "check", "expectations", "-", "sets", "checks", "for", "a", "401", "status", "code", "and", "the", "expected", "error", "message", "in", "the", "server", "s", "messages", ".", "log" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java#L111-L118
samskivert/pythagoras
src/main/java/pythagoras/f/Quaternion.java
Quaternion.fromAngles
public Quaternion fromAngles (Vector3 angles) { return fromAngles(angles.x, angles.y, angles.z); }
java
public Quaternion fromAngles (Vector3 angles) { return fromAngles(angles.x, angles.y, angles.z); }
[ "public", "Quaternion", "fromAngles", "(", "Vector3", "angles", ")", "{", "return", "fromAngles", "(", "angles", ".", "x", ",", "angles", ".", "y", ",", "angles", ".", "z", ")", ";", "}" ]
Sets this quaternion to one that first rotates about x by the specified number of radians, then rotates about y, then about z.
[ "Sets", "this", "quaternion", "to", "one", "that", "first", "rotates", "about", "x", "by", "the", "specified", "number", "of", "radians", "then", "rotates", "about", "y", "then", "about", "z", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Quaternion.java#L206-L208
google/closure-compiler
src/com/google/javascript/jscomp/CheckJSDoc.java
CheckJSDoc.validateNoSideEffects
private void validateNoSideEffects(Node n, JSDocInfo info) { // Cannot have @modifies or @nosideeffects in regular (non externs) js. Report errors. if (info == null) { return; } if (n.isFromExterns()) { return; } if (info.hasSideEffectsArgumentsAnnotation() || info.modifiesThis()) ...
java
private void validateNoSideEffects(Node n, JSDocInfo info) { // Cannot have @modifies or @nosideeffects in regular (non externs) js. Report errors. if (info == null) { return; } if (n.isFromExterns()) { return; } if (info.hasSideEffectsArgumentsAnnotation() || info.modifiesThis()) ...
[ "private", "void", "validateNoSideEffects", "(", "Node", "n", ",", "JSDocInfo", "info", ")", "{", "// Cannot have @modifies or @nosideeffects in regular (non externs) js. Report errors.", "if", "(", "info", "==", "null", ")", "{", "return", ";", "}", "if", "(", "n", ...
Check that @nosideeeffects annotations are only present in externs.
[ "Check", "that" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckJSDoc.java#L657-L673
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java
ByteUtils.bytesToBool
public static final boolean bytesToBool( byte[] data, int[] offset ) { boolean result = true; if (data[offset[0]] == 0) { result = false; } offset[0] += SIZE_BOOL; return result; }
java
public static final boolean bytesToBool( byte[] data, int[] offset ) { boolean result = true; if (data[offset[0]] == 0) { result = false; } offset[0] += SIZE_BOOL; return result; }
[ "public", "static", "final", "boolean", "bytesToBool", "(", "byte", "[", "]", "data", ",", "int", "[", "]", "offset", ")", "{", "boolean", "result", "=", "true", ";", "if", "(", "data", "[", "offset", "[", "0", "]", "]", "==", "0", ")", "{", "res...
Return the <code>boolean</code> represented by the bytes in <code>data</code> staring at offset <code>offset[0]</code>. @param data the array from which to read @param offset A single element array whose first element is the index in data from which to begin reading on function entry, and which on function exit has b...
[ "Return", "the", "<code", ">", "boolean<", "/", "code", ">", "represented", "by", "the", "bytes", "in", "<code", ">", "data<", "/", "code", ">", "staring", "at", "offset", "<code", ">", "offset", "[", "0", "]", "<", "/", "code", ">", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java#L312-L322
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.publishVideoReviewAsync
public Observable<Void> publishVideoReviewAsync(String teamName, String reviewId) { return publishVideoReviewWithServiceResponseAsync(teamName, reviewId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return res...
java
public Observable<Void> publishVideoReviewAsync(String teamName, String reviewId) { return publishVideoReviewWithServiceResponseAsync(teamName, reviewId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return res...
[ "public", "Observable", "<", "Void", ">", "publishVideoReviewAsync", "(", "String", "teamName", ",", "String", "reviewId", ")", "{", "return", "publishVideoReviewWithServiceResponseAsync", "(", "teamName", ",", "reviewId", ")", ".", "map", "(", "new", "Func1", "<"...
Publish video review to make it available for review. @param teamName Your team name. @param reviewId Id of the review. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Publish", "video", "review", "to", "make", "it", "available", "for", "review", "." ]
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#L1635-L1642
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/price/PriceGraduation.java
PriceGraduation.createSimple
@Nonnull public static IMutablePriceGraduation createSimple (@Nonnull final IMutablePrice aPrice) { final PriceGraduation ret = new PriceGraduation (aPrice.getCurrency ()); ret.addItem (new PriceGraduationItem (1, aPrice.getNetAmount ().getValue ())); return ret; }
java
@Nonnull public static IMutablePriceGraduation createSimple (@Nonnull final IMutablePrice aPrice) { final PriceGraduation ret = new PriceGraduation (aPrice.getCurrency ()); ret.addItem (new PriceGraduationItem (1, aPrice.getNetAmount ().getValue ())); return ret; }
[ "@", "Nonnull", "public", "static", "IMutablePriceGraduation", "createSimple", "(", "@", "Nonnull", "final", "IMutablePrice", "aPrice", ")", "{", "final", "PriceGraduation", "ret", "=", "new", "PriceGraduation", "(", "aPrice", ".", "getCurrency", "(", ")", ")", ...
Create a simple price graduation that contains one item with the minimum quantity of 1. @param aPrice The price to use. May not be <code>null</code>. @return Never <code>null</code>.
[ "Create", "a", "simple", "price", "graduation", "that", "contains", "one", "item", "with", "the", "minimum", "quantity", "of", "1", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/price/PriceGraduation.java#L218-L224
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WHiddenCommentRenderer.java
WHiddenCommentRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WHiddenComment hiddenComponent = (WHiddenComment) component; XmlStringBuilder xml = renderContext.getWriter(); String hiddenText = hiddenComponent.getText(); if (!Util.empty(hiddenText)) { xml.appendTag("...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WHiddenComment hiddenComponent = (WHiddenComment) component; XmlStringBuilder xml = renderContext.getWriter(); String hiddenText = hiddenComponent.getText(); if (!Util.empty(hiddenText)) { xml.appendTag("...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WHiddenComment", "hiddenComponent", "=", "(", "WHiddenComment", ")", "component", ";", "XmlStringBuilder", "xml", ...
Paints the given WHiddenComment. @param component the WHiddenComment to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WHiddenComment", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WHiddenCommentRenderer.java#L24-L36
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java
CommerceNotificationTemplatePersistenceImpl.countByG_T_E
@Override public int countByG_T_E(long groupId, String type, boolean enabled) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_T_E; Object[] finderArgs = new Object[] { groupId, type, enabled }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler que...
java
@Override public int countByG_T_E(long groupId, String type, boolean enabled) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_T_E; Object[] finderArgs = new Object[] { groupId, type, enabled }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler que...
[ "@", "Override", "public", "int", "countByG_T_E", "(", "long", "groupId", ",", "String", "type", ",", "boolean", "enabled", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_G_T_E", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[...
Returns the number of commerce notification templates where groupId = &#63; and type = &#63; and enabled = &#63;. @param groupId the group ID @param type the type @param enabled the enabled @return the number of matching commerce notification templates
[ "Returns", "the", "number", "of", "commerce", "notification", "templates", "where", "groupId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "and", "enabled", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationTemplatePersistenceImpl.java#L4296-L4361
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java
ScaleSceneStructure.applyScale
public void applyScale( SceneStructureProjective structure , SceneObservations observations ) { if( structure.homogenous ) { applyScaleToPointsHomogenous(structure); } else { computePointStatistics(structure.points); applyScaleToPoints3D(structure); applyScaleTranslation3D(structure); } // C...
java
public void applyScale( SceneStructureProjective structure , SceneObservations observations ) { if( structure.homogenous ) { applyScaleToPointsHomogenous(structure); } else { computePointStatistics(structure.points); applyScaleToPoints3D(structure); applyScaleTranslation3D(structure); } // C...
[ "public", "void", "applyScale", "(", "SceneStructureProjective", "structure", ",", "SceneObservations", "observations", ")", "{", "if", "(", "structure", ".", "homogenous", ")", "{", "applyScaleToPointsHomogenous", "(", "structure", ")", ";", "}", "else", "{", "co...
Applies the scale transform to the input scene structure. Metric. @param structure 3D scene @param observations Observations of the scene
[ "Applies", "the", "scale", "transform", "to", "the", "input", "scene", "structure", ".", "Metric", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/ScaleSceneStructure.java#L115-L130
syphr42/prom
src/main/java/org/syphr/prom/ManagedProperties.java
ManagedProperties.getProperties
public Properties getProperties(boolean includeDefaults, String propertyName) { Properties tmpProperties = new Properties(defaults); for (Entry<String, ChangeStack<String>> entry : properties.entrySet()) { String entryName = entry.getKey(); /* * If we a...
java
public Properties getProperties(boolean includeDefaults, String propertyName) { Properties tmpProperties = new Properties(defaults); for (Entry<String, ChangeStack<String>> entry : properties.entrySet()) { String entryName = entry.getKey(); /* * If we a...
[ "public", "Properties", "getProperties", "(", "boolean", "includeDefaults", ",", "String", "propertyName", ")", "{", "Properties", "tmpProperties", "=", "new", "Properties", "(", "defaults", ")", ";", "for", "(", "Entry", "<", "String", ",", "ChangeStack", "<", ...
Retrieve a {@link Properties} object that contains the properties managed by this instance. If a non-<code>null</code> property name is given, the values will be the last saved value for each property except the given one. Otherwise, the properties will all be the current values. This is useful for saving a change to a...
[ "Retrieve", "a", "{", "@link", "Properties", "}", "object", "that", "contains", "the", "properties", "managed", "by", "this", "instance", ".", "If", "a", "non", "-", "<code", ">", "null<", "/", "code", ">", "property", "name", "is", "given", "the", "valu...
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/ManagedProperties.java#L589-L622
softindex/datakernel
cloud-fs/src/main/java/io/datakernel/remotefs/LocalFsClient.java
LocalFsClient.create
public static LocalFsClient create(Eventloop eventloop, Path storageDir, Object lock) { return new LocalFsClient(eventloop, storageDir, Executors.newSingleThreadExecutor(), lock); }
java
public static LocalFsClient create(Eventloop eventloop, Path storageDir, Object lock) { return new LocalFsClient(eventloop, storageDir, Executors.newSingleThreadExecutor(), lock); }
[ "public", "static", "LocalFsClient", "create", "(", "Eventloop", "eventloop", ",", "Path", "storageDir", ",", "Object", "lock", ")", "{", "return", "new", "LocalFsClient", "(", "eventloop", ",", "storageDir", ",", "Executors", ".", "newSingleThreadExecutor", "(", ...
Use this to synchronize multiple LocalFsClient's over some filesystem space that they may all try to access (same storage folder, one storage is subfolder of another etc.)
[ "Use", "this", "to", "synchronize", "multiple", "LocalFsClient", "s", "over", "some", "filesystem", "space", "that", "they", "may", "all", "try", "to", "access", "(", "same", "storage", "folder", "one", "storage", "is", "subfolder", "of", "another", "etc", "...
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/cloud-fs/src/main/java/io/datakernel/remotefs/LocalFsClient.java#L168-L170
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/PGStream.java
PGStream.receive
public void receive(byte[] buf, int off, int siz) throws IOException { int s = 0; while (s < siz) { int w = pgInput.read(buf, off + s, siz - s); if (w < 0) { throw new EOFException(); } s += w; } }
java
public void receive(byte[] buf, int off, int siz) throws IOException { int s = 0; while (s < siz) { int w = pgInput.read(buf, off + s, siz - s); if (w < 0) { throw new EOFException(); } s += w; } }
[ "public", "void", "receive", "(", "byte", "[", "]", "buf", ",", "int", "off", ",", "int", "siz", ")", "throws", "IOException", "{", "int", "s", "=", "0", ";", "while", "(", "s", "<", "siz", ")", "{", "int", "w", "=", "pgInput", ".", "read", "("...
Reads in a given number of bytes from the backend. @param buf buffer to store result @param off offset in buffer @param siz number of bytes to read @throws IOException if a data I/O error occurs
[ "Reads", "in", "a", "given", "number", "of", "bytes", "from", "the", "backend", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/PGStream.java#L473-L483
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractQueryImpl.java
AbstractQueryImpl.bindValue
public void bindValue(InternalQName varName, Value value) throws IllegalArgumentException, RepositoryException { if (!variableNames.contains(varName)) { throw new IllegalArgumentException("not a valid variable in this query"); } else { bindValues.put(varName, value); ...
java
public void bindValue(InternalQName varName, Value value) throws IllegalArgumentException, RepositoryException { if (!variableNames.contains(varName)) { throw new IllegalArgumentException("not a valid variable in this query"); } else { bindValues.put(varName, value); ...
[ "public", "void", "bindValue", "(", "InternalQName", "varName", ",", "Value", "value", ")", "throws", "IllegalArgumentException", ",", "RepositoryException", "{", "if", "(", "!", "variableNames", ".", "contains", "(", "varName", ")", ")", "{", "throw", "new", ...
Binds the given <code>value</code> to the variable named <code>varName</code>. @param varName name of variable in query @param value value to bind @throws IllegalArgumentException if <code>varName</code> is not a valid variable in this query. @throws RepositoryException if an error occurs.
[ "Binds", "the", "given", "<code", ">", "value<", "/", "code", ">", "to", "the", "variable", "named", "<code", ">", "varName<", "/", "code", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/AbstractQueryImpl.java#L153-L163
weld/core
impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java
AnnotatedTypes.compareAnnotatedParameters
private static boolean compareAnnotatedParameters(List<? extends AnnotatedParameter<?>> p1, List<? extends AnnotatedParameter<?>> p2) { if (p1.size() != p2.size()) { return false; } for (int i = 0; i < p1.size(); ++i) { if (!compareAnnotated(p1.get(i), p2.get(i))) { ...
java
private static boolean compareAnnotatedParameters(List<? extends AnnotatedParameter<?>> p1, List<? extends AnnotatedParameter<?>> p2) { if (p1.size() != p2.size()) { return false; } for (int i = 0; i < p1.size(); ++i) { if (!compareAnnotated(p1.get(i), p2.get(i))) { ...
[ "private", "static", "boolean", "compareAnnotatedParameters", "(", "List", "<", "?", "extends", "AnnotatedParameter", "<", "?", ">", ">", "p1", ",", "List", "<", "?", "extends", "AnnotatedParameter", "<", "?", ">", ">", "p2", ")", "{", "if", "(", "p1", "...
compares two annotated elements to see if they have the same annotations
[ "compares", "two", "annotated", "elements", "to", "see", "if", "they", "have", "the", "same", "annotations" ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/AnnotatedTypes.java#L435-L445
knowm/XChange
xchange-core/src/main/java/org/knowm/xchange/utils/CertHelper.java
CertHelper.createIncorrectHostnameVerifier
public static HostnameVerifier createIncorrectHostnameVerifier( final String requestHostname, final String certPrincipalName) { return new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { try { String principalName = session.getPeerP...
java
public static HostnameVerifier createIncorrectHostnameVerifier( final String requestHostname, final String certPrincipalName) { return new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { try { String principalName = session.getPeerP...
[ "public", "static", "HostnameVerifier", "createIncorrectHostnameVerifier", "(", "final", "String", "requestHostname", ",", "final", "String", "certPrincipalName", ")", "{", "return", "new", "HostnameVerifier", "(", ")", "{", "@", "Override", "public", "boolean", "veri...
Creates a custom {@link HostnameVerifier} that allows a specific certificate to be accepted for a mismatching hostname. @param requestHostname hostname used to access the service which offers the incorrectly named certificate @param certPrincipalName RFC 2253 name on the certificate @return A {@link HostnameVerifier} ...
[ "Creates", "a", "custom", "{", "@link", "HostnameVerifier", "}", "that", "allows", "a", "specific", "certificate", "to", "be", "accepted", "for", "a", "mismatching", "hostname", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-core/src/main/java/org/knowm/xchange/utils/CertHelper.java#L220-L241
briandilley/jsonrpc4j
src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java
JsonRpcClient.readResponse
private Object readResponse(Type returnType, InputStream input, String id) throws Throwable { ReadContext context = ReadContext.getReadContext(input, mapper); ObjectNode jsonObject = getValidResponse(id, context); notifyAnswerListener(jsonObject); handleErrorResponse(jsonObject); if (hasResult(jsonObjec...
java
private Object readResponse(Type returnType, InputStream input, String id) throws Throwable { ReadContext context = ReadContext.getReadContext(input, mapper); ObjectNode jsonObject = getValidResponse(id, context); notifyAnswerListener(jsonObject); handleErrorResponse(jsonObject); if (hasResult(jsonObjec...
[ "private", "Object", "readResponse", "(", "Type", "returnType", ",", "InputStream", "input", ",", "String", "id", ")", "throws", "Throwable", "{", "ReadContext", "context", "=", "ReadContext", ".", "getReadContext", "(", "input", ",", "mapper", ")", ";", "Obje...
Reads a JSON-PRC response from the server. This blocks until a response is received. If an id is given, responses that do not correspond, are disregarded. @param returnType the expected return type @param input the {@link InputStream} to read from @param id The id used to compare the response with. @retu...
[ "Reads", "a", "JSON", "-", "PRC", "response", "from", "the", "server", ".", "This", "blocks", "until", "a", "response", "is", "received", ".", "If", "an", "id", "is", "given", "responses", "that", "do", "not", "correspond", "are", "disregarded", "." ]
train
https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java#L191-L207
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java
TemplateElasticsearchUpdater.removeTemplate
@Deprecated public static void removeTemplate(Client client, String template) { logger.trace("removeTemplate({})", template); client.admin().indices().prepareDeleteTemplate(template).get(); logger.trace("/removeTemplate({})", template); }
java
@Deprecated public static void removeTemplate(Client client, String template) { logger.trace("removeTemplate({})", template); client.admin().indices().prepareDeleteTemplate(template).get(); logger.trace("/removeTemplate({})", template); }
[ "@", "Deprecated", "public", "static", "void", "removeTemplate", "(", "Client", "client", ",", "String", "template", ")", "{", "logger", ".", "trace", "(", "\"removeTemplate({})\"", ",", "template", ")", ";", "client", ".", "admin", "(", ")", ".", "indices",...
Remove a template @param client Elasticsearch client @param template template name @deprecated Will be removed when we don't support TransportClient anymore
[ "Remove", "a", "template" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java#L142-L147
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java
NetworkConfig.createAllOrderers
private void createAllOrderers() throws NetworkConfigurationException { // Sanity check if (orderers != null) { throw new NetworkConfigurationException("INTERNAL ERROR: orderers has already been initialized!"); } orderers = new HashMap<>(); // orderers is a JSON ob...
java
private void createAllOrderers() throws NetworkConfigurationException { // Sanity check if (orderers != null) { throw new NetworkConfigurationException("INTERNAL ERROR: orderers has already been initialized!"); } orderers = new HashMap<>(); // orderers is a JSON ob...
[ "private", "void", "createAllOrderers", "(", ")", "throws", "NetworkConfigurationException", "{", "// Sanity check", "if", "(", "orderers", "!=", "null", ")", "{", "throw", "new", "NetworkConfigurationException", "(", "\"INTERNAL ERROR: orderers has already been initialized!\...
Creates Node instances representing all the orderers defined in the config file
[ "Creates", "Node", "instances", "representing", "all", "the", "orderers", "defined", "in", "the", "config", "file" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java#L501-L531
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayVariant
public static String getDisplayVariant(String localeID, ULocale displayLocale) { return getDisplayVariantInternal(new ULocale(localeID), displayLocale); }
java
public static String getDisplayVariant(String localeID, ULocale displayLocale) { return getDisplayVariantInternal(new ULocale(localeID), displayLocale); }
[ "public", "static", "String", "getDisplayVariant", "(", "String", "localeID", ",", "ULocale", "displayLocale", ")", "{", "return", "getDisplayVariantInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "displayLocale", ")", ";", "}" ]
<strong>[icu]</strong> Returns a locale's variant localized for display in the provided locale. This is a cover for the ICU4C API. @param localeID the id of the locale whose variant will be displayed. @param displayLocale the locale in which to display the name. @return the localized variant name.
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "locale", "s", "variant", "localized", "for", "display", "in", "the", "provided", "locale", ".", "This", "is", "a", "cover", "for", "the", "ICU4C", "API", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1652-L1654
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.unescapeProperties
public static void unescapeProperties(final char[] text, final int offset, final int len, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen =...
java
public static void unescapeProperties(final char[] text, final int offset, final int len, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen =...
[ "public", "static", "void", "unescapeProperties", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", "...
<p> Perform a Java Properties (key or value) <strong>unescape</strong> operation on a <tt>char[]</tt> input. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> Java Properties unescape of SECs and u-based escapes. </p> <p> This method is <strong>thread...
[ "<p", ">", "Perform", "a", "Java", "Properties", "(", "key", "or", "value", ")", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L1476-L1497
square/phrase
src/main/java/com/squareup/phrase/Phrase.java
Phrase.from
public static Phrase from(Fragment f, @StringRes int patternResourceId) { return from(f.getResources(), patternResourceId); }
java
public static Phrase from(Fragment f, @StringRes int patternResourceId) { return from(f.getResources(), patternResourceId); }
[ "public", "static", "Phrase", "from", "(", "Fragment", "f", ",", "@", "StringRes", "int", "patternResourceId", ")", "{", "return", "from", "(", "f", ".", "getResources", "(", ")", ",", "patternResourceId", ")", ";", "}" ]
Entry point into this API. @throws IllegalArgumentException if pattern contains any syntax errors.
[ "Entry", "point", "into", "this", "API", "." ]
train
https://github.com/square/phrase/blob/d91f18e80790832db11b811c462f8e5cd492d97e/src/main/java/com/squareup/phrase/Phrase.java#L78-L80
evernote/android-job
library/src/main/java/com/evernote/android/job/JobConfig.java
JobConfig.setApiEnabled
public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); }
java
public static void setApiEnabled(@NonNull JobApi api, boolean enabled) { ENABLED_APIS.put(api, enabled); CAT.w("setApiEnabled - %s, %b", api, enabled); }
[ "public", "static", "void", "setApiEnabled", "(", "@", "NonNull", "JobApi", "api", ",", "boolean", "enabled", ")", "{", "ENABLED_APIS", ".", "put", "(", "api", ",", "enabled", ")", ";", "CAT", ".", "w", "(", "\"setApiEnabled - %s, %b\"", ",", "api", ",", ...
<b>WARNING:</b> Please use this method carefully. It's only meant to be used for testing purposes and could break how the library works. <br> <br> Programmatic switch to enable or disable the given API. This only has an impact for new scheduled jobs. @param api The API which should be enabled or disabled. @param enabl...
[ "<b", ">", "WARNING", ":", "<", "/", "b", ">", "Please", "use", "this", "method", "carefully", ".", "It", "s", "only", "meant", "to", "be", "used", "for", "testing", "purposes", "and", "could", "break", "how", "the", "library", "works", ".", "<br", "...
train
https://github.com/evernote/android-job/blob/5ae3d776ad9d80b5b7f60ae3e382d44d0d193faf/library/src/main/java/com/evernote/android/job/JobConfig.java#L110-L113
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java
PermissionsImpl.updateAsync
public Observable<OperationStatus> updateAsync(UUID appId, UpdatePermissionsOptionalParameter updateOptionalParameter) { return updateWithServiceResponseAsync(appId, updateOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationSt...
java
public Observable<OperationStatus> updateAsync(UUID appId, UpdatePermissionsOptionalParameter updateOptionalParameter) { return updateWithServiceResponseAsync(appId, updateOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationSt...
[ "public", "Observable", "<", "OperationStatus", ">", "updateAsync", "(", "UUID", "appId", ",", "UpdatePermissionsOptionalParameter", "updateOptionalParameter", ")", "{", "return", "updateWithServiceResponseAsync", "(", "appId", ",", "updateOptionalParameter", ")", ".", "m...
Replaces the current users access list with the one sent in the body. If an empty list is sent, all access to other users will be removed. @param appId The application ID. @param updateOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException t...
[ "Replaces", "the", "current", "users", "access", "list", "with", "the", "one", "sent", "in", "the", "body", ".", "If", "an", "empty", "list", "is", "sent", "all", "access", "to", "other", "users", "will", "be", "removed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java#L506-L513
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java
ParameterParser.parse
@Nonnull @ReturnsMutableCopy public ICommonsMap <String, String> parse (@Nullable final String sStr, @Nullable final char [] aSeparators) { if (ArrayHelper.isEmpty (aSeparators)) return new CommonsHashMap <> (); char cSep = aSeparators[0]; if (sStr != null) { // Find the first separat...
java
@Nonnull @ReturnsMutableCopy public ICommonsMap <String, String> parse (@Nullable final String sStr, @Nullable final char [] aSeparators) { if (ArrayHelper.isEmpty (aSeparators)) return new CommonsHashMap <> (); char cSep = aSeparators[0]; if (sStr != null) { // Find the first separat...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "ICommonsMap", "<", "String", ",", "String", ">", "parse", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "char", "[", "]", "aSeparators", ")", "{", "if", "(", "ArrayHelp...
Extracts a map of name/value pairs from the given string. Names are expected to be unique. Multiple separators may be specified and the earliest found in the input string is used. @param sStr the string that contains a sequence of name/value pairs @param aSeparators the name/value pairs separators @return a map of nam...
[ "Extracts", "a", "map", "of", "name", "/", "value", "pairs", "from", "the", "given", "string", ".", "Names", "are", "expected", "to", "be", "unique", ".", "Multiple", "separators", "may", "be", "specified", "and", "the", "earliest", "found", "in", "the", ...
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java#L231-L254
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/JaspiServiceImpl.java
JaspiServiceImpl.isAnyProviderRegistered
@Override public boolean isAnyProviderRegistered(WebRequest webRequest) { // default to true for case where a custom factory is used (i.e. not our ProviderRegistry) // we will assume that some provider is registered so we will call jaspi to // process the request. boolean result = tr...
java
@Override public boolean isAnyProviderRegistered(WebRequest webRequest) { // default to true for case where a custom factory is used (i.e. not our ProviderRegistry) // we will assume that some provider is registered so we will call jaspi to // process the request. boolean result = tr...
[ "@", "Override", "public", "boolean", "isAnyProviderRegistered", "(", "WebRequest", "webRequest", ")", "{", "// default to true for case where a custom factory is used (i.e. not our ProviderRegistry)", "// we will assume that some provider is registered so we will call jaspi to", "// process...
/* This is for performance - so we will not call jaspi processing for a request if there are no providers registered. @see com.ibm.ws.webcontainer.security.JaspiService#isAnyProviderRegistered()
[ "/", "*", "This", "is", "for", "performance", "-", "so", "we", "will", "not", "call", "jaspi", "processing", "for", "a", "request", "if", "there", "are", "no", "providers", "registered", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jaspic/src/com/ibm/ws/security/jaspi/JaspiServiceImpl.java#L1080-L1103
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/JavaScriptCompilerMojo.java
JavaScriptCompilerMojo.createSourceMapFile
private void createSourceMapFile(File output,SourceMap sourceMap) throws WatchingException{ if (googleClosureMap) { PrintWriter mapWriter = null; File mapFile = new File(output.getPath() + ".map"); FileUtils.deleteQuietly(mapFile); try { mapWriter...
java
private void createSourceMapFile(File output,SourceMap sourceMap) throws WatchingException{ if (googleClosureMap) { PrintWriter mapWriter = null; File mapFile = new File(output.getPath() + ".map"); FileUtils.deleteQuietly(mapFile); try { mapWriter...
[ "private", "void", "createSourceMapFile", "(", "File", "output", ",", "SourceMap", "sourceMap", ")", "throws", "WatchingException", "{", "if", "(", "googleClosureMap", ")", "{", "PrintWriter", "mapWriter", "=", "null", ";", "File", "mapFile", "=", "new", "File",...
Create a source map file corresponding to the given compiled js file. @param output The compiled js file @param sourceMap The {@link SourceMap} retrieved from the compiler @throws WatchingException If an IOException occurred while creating the source map file.
[ "Create", "a", "source", "map", "file", "corresponding", "to", "the", "given", "compiled", "js", "file", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/JavaScriptCompilerMojo.java#L466-L483
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchAll
public CMAArray<CMAContentType> fetchAll(String spaceId, String environmentId) { return fetchAll(spaceId, environmentId, new HashMap<>()); }
java
public CMAArray<CMAContentType> fetchAll(String spaceId, String environmentId) { return fetchAll(spaceId, environmentId, new HashMap<>()); }
[ "public", "CMAArray", "<", "CMAContentType", ">", "fetchAll", "(", "String", "spaceId", ",", "String", "environmentId", ")", "{", "return", "fetchAll", "(", "spaceId", ",", "environmentId", ",", "new", "HashMap", "<>", "(", ")", ")", ";", "}" ]
Fetch all Content Types from an Environment, using default query parameter. <p> This fetch uses the default parameter defined in {@link DefaultQueryParameter#FETCH} <p> This method will override the configuration specified through {@link CMAClient.Builder#setSpaceId(String)} and {@link CMAClient.Builder#setEnvironmentI...
[ "Fetch", "all", "Content", "Types", "from", "an", "Environment", "using", "default", "query", "parameter", ".", "<p", ">", "This", "fetch", "uses", "the", "default", "parameter", "defined", "in", "{", "@link", "DefaultQueryParameter#FETCH", "}", "<p", ">", "Th...
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L186-L188
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/internal/BatchWorker.java
BatchWorker.submitTask
private void submitTask(@NotNull State<T, R> state, @NotNull BatchItem item, @NotNull Link auth) { // Submit task final StateHolder holder = new StateHolder(state); try { state.auth = auth; final Work<R> worker = objectTask(state, item); if (state.future.isDone()) { holder.close();...
java
private void submitTask(@NotNull State<T, R> state, @NotNull BatchItem item, @NotNull Link auth) { // Submit task final StateHolder holder = new StateHolder(state); try { state.auth = auth; final Work<R> worker = objectTask(state, item); if (state.future.isDone()) { holder.close();...
[ "private", "void", "submitTask", "(", "@", "NotNull", "State", "<", "T", ",", "R", ">", "state", ",", "@", "NotNull", "BatchItem", "item", ",", "@", "NotNull", "Link", "auth", ")", "{", "// Submit task", "final", "StateHolder", "holder", "=", "new", "Sta...
Submit object processing task. @param state Current object state @param item Metadata information with upload/download urls. @param auth Urls authentication state.
[ "Submit", "object", "processing", "task", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/internal/BatchWorker.java#L208-L231
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java
ArabicShaping.shape
public void shape(char[] source, int start, int length) throws ArabicShapingException { if ((options & LAMALEF_MASK) == LAMALEF_RESIZE) { throw new ArabicShapingException("Cannot shape in place with length option resize."); } shape(source, start, length, source, start, length); }
java
public void shape(char[] source, int start, int length) throws ArabicShapingException { if ((options & LAMALEF_MASK) == LAMALEF_RESIZE) { throw new ArabicShapingException("Cannot shape in place with length option resize."); } shape(source, start, length, source, start, length); }
[ "public", "void", "shape", "(", "char", "[", "]", "source", ",", "int", "start", ",", "int", "length", ")", "throws", "ArabicShapingException", "{", "if", "(", "(", "options", "&", "LAMALEF_MASK", ")", "==", "LAMALEF_RESIZE", ")", "{", "throw", "new", "A...
Convert a range of text in place. This may only be used if the Length option does not grow or shrink the text. @param source An array containing the input text @param start The start of the range of text to convert @param length The length of the range of text to convert @throws ArabicShapingException if the text can...
[ "Convert", "a", "range", "of", "text", "in", "place", ".", "This", "may", "only", "be", "used", "if", "the", "Length", "option", "does", "not", "grow", "or", "shrink", "the", "text", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L144-L149
Red5/red5-server-common
src/main/java/org/red5/server/messaging/AbstractPipe.java
AbstractPipe.subscribe
public boolean subscribe(IProvider provider, Map<String, Object> paramMap) { boolean success = providers.addIfAbsent(provider); // register event listener if given and just added if (success && provider instanceof IPipeConnectionListener) { listeners.addIfAbsent((IPipeConnectionListe...
java
public boolean subscribe(IProvider provider, Map<String, Object> paramMap) { boolean success = providers.addIfAbsent(provider); // register event listener if given and just added if (success && provider instanceof IPipeConnectionListener) { listeners.addIfAbsent((IPipeConnectionListe...
[ "public", "boolean", "subscribe", "(", "IProvider", "provider", ",", "Map", "<", "String", ",", "Object", ">", "paramMap", ")", "{", "boolean", "success", "=", "providers", ".", "addIfAbsent", "(", "provider", ")", ";", "// register event listener if given and jus...
Connect provider to this pipe. Doesn't allow to connect one provider twice. Does register event listeners if instance of IPipeConnectionListener is given. @param provider Provider @param paramMap Parameters passed with connection, used in concrete pipe implementations @return true if provider was added, false otherwis...
[ "Connect", "provider", "to", "this", "pipe", ".", "Doesn", "t", "allow", "to", "connect", "one", "provider", "twice", ".", "Does", "register", "event", "listeners", "if", "instance", "of", "IPipeConnectionListener", "is", "given", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/messaging/AbstractPipe.java#L92-L99
dnsjava/dnsjava
org/xbill/DNS/ZoneTransferIn.java
ZoneTransferIn.newAXFR
public static ZoneTransferIn newAXFR(Name zone, SocketAddress address, TSIG key) { return new ZoneTransferIn(zone, Type.AXFR, 0, false, address, key); }
java
public static ZoneTransferIn newAXFR(Name zone, SocketAddress address, TSIG key) { return new ZoneTransferIn(zone, Type.AXFR, 0, false, address, key); }
[ "public", "static", "ZoneTransferIn", "newAXFR", "(", "Name", "zone", ",", "SocketAddress", "address", ",", "TSIG", "key", ")", "{", "return", "new", "ZoneTransferIn", "(", "zone", ",", "Type", ".", "AXFR", ",", "0", ",", "false", ",", "address", ",", "k...
Instantiates a ZoneTransferIn object to do an AXFR (full zone transfer). @param zone The zone to transfer. @param address The host/port from which to transfer the zone. @param key The TSIG key used to authenticate the transfer, or null. @return The ZoneTransferIn object.
[ "Instantiates", "a", "ZoneTransferIn", "object", "to", "do", "an", "AXFR", "(", "full", "zone", "transfer", ")", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/ZoneTransferIn.java#L200-L203
joniles/mpxj
src/main/java/net/sf/mpxj/sample/PrimaveraConvert.java
PrimaveraConvert.process
public void process(String driverClass, String connectionString, String projectID, String outputFile) throws Exception { System.out.println("Reading Primavera database started."); Class.forName(driverClass); Properties props = new Properties(); // // This is not a very robust way to d...
java
public void process(String driverClass, String connectionString, String projectID, String outputFile) throws Exception { System.out.println("Reading Primavera database started."); Class.forName(driverClass); Properties props = new Properties(); // // This is not a very robust way to d...
[ "public", "void", "process", "(", "String", "driverClass", ",", "String", "connectionString", ",", "String", "projectID", ",", "String", "outputFile", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Reading Primavera database started.\...
Extract Primavera project data and export in another format. @param driverClass JDBC driver class name @param connectionString JDBC connection string @param projectID project ID @param outputFile output file @throws Exception
[ "Extract", "Primavera", "project", "data", "and", "export", "in", "another", "format", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/PrimaveraConvert.java#L82-L105
xmlunit/xmlunit
xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
EvaluateXPathMatcher.hasXPath
@Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); }
java
@Factory public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) { return new EvaluateXPathMatcher(xPath, valueMatcher); }
[ "@", "Factory", "public", "static", "EvaluateXPathMatcher", "hasXPath", "(", "String", "xPath", ",", "Matcher", "<", "String", ">", "valueMatcher", ")", "{", "return", "new", "EvaluateXPathMatcher", "(", "xPath", ",", "valueMatcher", ")", ";", "}" ]
Creates a matcher that matches when the examined XML input has a value at the specified <code>xPath</code> that satisfies the specified <code>valueMatcher</code>. <p>For example:</p> <pre>assertThat(xml, hasXPath(&quot;//fruits/fruit/@name&quot;, equalTo(&quot;apple&quot;))</pre> @param xPath the target xpath @param ...
[ "Creates", "a", "matcher", "that", "matches", "when", "the", "examined", "XML", "input", "has", "a", "value", "at", "the", "specified", "<code", ">", "xPath<", "/", "code", ">", "that", "satisfies", "the", "specified", "<code", ">", "valueMatcher<", "/", "...
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java#L96-L99
alkacon/opencms-core
src/org/opencms/xml/types/CmsXmlCategoryValue.java
CmsXmlCategoryValue.fillEntry
public static void fillEntry(Element element, CmsUUID id, String rootPath, CmsRelationType type) { CmsLink link = new CmsLink(CmsXmlCategoryValue.TYPE_VFS_LINK, type, id, rootPath, true); // get xml node Element linkElement = element.element(CmsXmlPage.NODE_LINK); if (linkElement == nul...
java
public static void fillEntry(Element element, CmsUUID id, String rootPath, CmsRelationType type) { CmsLink link = new CmsLink(CmsXmlCategoryValue.TYPE_VFS_LINK, type, id, rootPath, true); // get xml node Element linkElement = element.element(CmsXmlPage.NODE_LINK); if (linkElement == nul...
[ "public", "static", "void", "fillEntry", "(", "Element", "element", ",", "CmsUUID", "id", ",", "String", "rootPath", ",", "CmsRelationType", "type", ")", "{", "CmsLink", "link", "=", "new", "CmsLink", "(", "CmsXmlCategoryValue", ".", "TYPE_VFS_LINK", ",", "typ...
Fills the given element with a {@link CmsXmlCategoryValue} for the given data.<p> @param element the element to fill @param id the id to use @param rootPath the path to use @param type the relation type to use
[ "Fills", "the", "given", "element", "with", "a", "{", "@link", "CmsXmlCategoryValue", "}", "for", "the", "given", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/types/CmsXmlCategoryValue.java#L115-L126
microfocus-idol/java-idol-indexing-api
src/main/java/com/autonomy/nonaci/indexing/impl/IndexingServiceImpl.java
IndexingServiceImpl.executeCommand
@Override public int executeCommand(final IndexCommand command) throws IndexingException { LOGGER.trace("executeCommand() called..."); // Execute and return the result... return executeCommand(serverDetails, command); }
java
@Override public int executeCommand(final IndexCommand command) throws IndexingException { LOGGER.trace("executeCommand() called..."); // Execute and return the result... return executeCommand(serverDetails, command); }
[ "@", "Override", "public", "int", "executeCommand", "(", "final", "IndexCommand", "command", ")", "throws", "IndexingException", "{", "LOGGER", ".", "trace", "(", "\"executeCommand() called...\"", ")", ";", "// Execute and return the result...", "return", "executeCommand"...
Executes an index command @param command The index command to execute @return the index queue id for the command @throws com.autonomy.nonaci.indexing.IndexingException if an error response was detected
[ "Executes", "an", "index", "command" ]
train
https://github.com/microfocus-idol/java-idol-indexing-api/blob/178ea844da501318d8d797a35b2f72ff40786b8c/src/main/java/com/autonomy/nonaci/indexing/impl/IndexingServiceImpl.java#L123-L129
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.setConstraints
public void setConstraints(Component component, CellConstraints constraints) { checkNotNull(component, "The component must not be null."); checkNotNull(constraints, "The constraints must not be null."); constraints.ensureValidGridBounds(getColumnCount(), getRowCount()); constraintMap.put...
java
public void setConstraints(Component component, CellConstraints constraints) { checkNotNull(component, "The component must not be null."); checkNotNull(constraints, "The constraints must not be null."); constraints.ensureValidGridBounds(getColumnCount(), getRowCount()); constraintMap.put...
[ "public", "void", "setConstraints", "(", "Component", "component", ",", "CellConstraints", "constraints", ")", "{", "checkNotNull", "(", "component", ",", "\"The component must not be null.\"", ")", ";", "checkNotNull", "(", "constraints", ",", "\"The constraints must not...
Sets the constraints for the specified component in this layout. @param component the component to be modified @param constraints the constraints to be applied @throws NullPointerException if {@code component} or {@code constraints} is {@code null}
[ "Sets", "the", "constraints", "for", "the", "specified", "component", "in", "this", "layout", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L756-L761
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrameComponentFactory.java
MainFrameComponentFactory.bugSummaryComponent
public Component bugSummaryComponent(String str, BugInstance bug) { JLabel label = new JLabel(); label.setFont(label.getFont().deriveFont(Driver.getFontSize())); label.setFont(label.getFont().deriveFont(Font.PLAIN)); label.setForeground(Color.BLACK); label.setText(str); ...
java
public Component bugSummaryComponent(String str, BugInstance bug) { JLabel label = new JLabel(); label.setFont(label.getFont().deriveFont(Driver.getFontSize())); label.setFont(label.getFont().deriveFont(Font.PLAIN)); label.setForeground(Color.BLACK); label.setText(str); ...
[ "public", "Component", "bugSummaryComponent", "(", "String", "str", ",", "BugInstance", "bug", ")", "{", "JLabel", "label", "=", "new", "JLabel", "(", ")", ";", "label", ".", "setFont", "(", "label", ".", "getFont", "(", ")", ".", "deriveFont", "(", "Dri...
Creates bug summary component. If obj is a string will create a JLabel with that string as it's text and return it. If obj is an annotation will return a JLabel with the annotation's toString(). If that annotation is a SourceLineAnnotation or has a SourceLineAnnotation connected to it and the source file is available w...
[ "Creates", "bug", "summary", "component", ".", "If", "obj", "is", "a", "string", "will", "create", "a", "JLabel", "with", "that", "string", "as", "it", "s", "text", "and", "return", "it", ".", "If", "obj", "is", "an", "annotation", "will", "return", "a...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/MainFrameComponentFactory.java#L293-L307
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java
LayoutUtils.moveBandsElemnts
public static void moveBandsElemnts(int yOffset, JRDesignBand band) { if (band == null) return; for (JRChild jrChild : band.getChildren()) { JRDesignElement elem = (JRDesignElement) jrChild; elem.setY(elem.getY() + yOffset); } }
java
public static void moveBandsElemnts(int yOffset, JRDesignBand band) { if (band == null) return; for (JRChild jrChild : band.getChildren()) { JRDesignElement elem = (JRDesignElement) jrChild; elem.setY(elem.getY() + yOffset); } }
[ "public", "static", "void", "moveBandsElemnts", "(", "int", "yOffset", ",", "JRDesignBand", "band", ")", "{", "if", "(", "band", "==", "null", ")", "return", ";", "for", "(", "JRChild", "jrChild", ":", "band", ".", "getChildren", "(", ")", ")", "{", "J...
Moves the elements contained in "band" in the Y axis "yOffset" @param yOffset @param band
[ "Moves", "the", "elements", "contained", "in", "band", "in", "the", "Y", "axis", "yOffset" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/LayoutUtils.java#L89-L97
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java
NodePingUtil.internalPingNode
static void internalPingNode(Node node, PingCallback callback, NodeHealthChecker healthChecker, XnioIoThread ioThread, ByteBufferPool bufferPool, UndertowClient client, XnioSsl xnioSsl, OptionMap options) { final URI uri = node.getNodeConfig().getConnectionURI(); final long timeout = node.getNodeConfig...
java
static void internalPingNode(Node node, PingCallback callback, NodeHealthChecker healthChecker, XnioIoThread ioThread, ByteBufferPool bufferPool, UndertowClient client, XnioSsl xnioSsl, OptionMap options) { final URI uri = node.getNodeConfig().getConnectionURI(); final long timeout = node.getNodeConfig...
[ "static", "void", "internalPingNode", "(", "Node", "node", ",", "PingCallback", "callback", ",", "NodeHealthChecker", "healthChecker", ",", "XnioIoThread", "ioThread", ",", "ByteBufferPool", "bufferPool", ",", "UndertowClient", "client", ",", "XnioSsl", "xnioSsl", ","...
Internally ping a node. This should probably use the connections from the nodes pool, if there are any available. @param node the node @param callback the ping callback @param ioThread the xnio i/o thread @param bufferPool the xnio buffer pool @param client the undertow client @param xnioS...
[ "Internally", "ping", "a", "node", ".", "This", "should", "probably", "use", "the", "connections", "from", "the", "nodes", "pool", "if", "there", "are", "any", "available", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java#L170-L179
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/layer/labels/TileBasedLabelStore.java
TileBasedLabelStore.storeMapItems
public synchronized void storeMapItems(Tile tile, List<MapElementContainer> mapItems) { this.put(tile, LayerUtil.collisionFreeOrdered(mapItems)); this.version += 1; }
java
public synchronized void storeMapItems(Tile tile, List<MapElementContainer> mapItems) { this.put(tile, LayerUtil.collisionFreeOrdered(mapItems)); this.version += 1; }
[ "public", "synchronized", "void", "storeMapItems", "(", "Tile", "tile", ",", "List", "<", "MapElementContainer", ">", "mapItems", ")", "{", "this", ".", "put", "(", "tile", ",", "LayerUtil", ".", "collisionFreeOrdered", "(", "mapItems", ")", ")", ";", "this"...
Stores a list of MapElements against a tile. @param tile tile on which the mapItems reside. @param mapItems the map elements.
[ "Stores", "a", "list", "of", "MapElements", "against", "a", "tile", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/layer/labels/TileBasedLabelStore.java#L53-L56
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/parsers/SoapParser.java
SoapParser.parseSoap12Fault
private void parseSoap12Fault(Document soapMessage, PrintWriter logger) throws Exception { Element envelope = soapMessage.getDocumentElement(); Element code = DomUtils.getElementByTagNameNS(envelope, SOAP_12_NAMESPACE, "Code"); String value = DomUtils.getElementByTagN...
java
private void parseSoap12Fault(Document soapMessage, PrintWriter logger) throws Exception { Element envelope = soapMessage.getDocumentElement(); Element code = DomUtils.getElementByTagNameNS(envelope, SOAP_12_NAMESPACE, "Code"); String value = DomUtils.getElementByTagN...
[ "private", "void", "parseSoap12Fault", "(", "Document", "soapMessage", ",", "PrintWriter", "logger", ")", "throws", "Exception", "{", "Element", "envelope", "=", "soapMessage", ".", "getDocumentElement", "(", ")", ";", "Element", "code", "=", "DomUtils", ".", "g...
A method to parse a SOAP 1.2 fault message. @param soapMessage the SOAP 1.2 fault message to parse @param logger the PrintWriter to log all results to @return void @author Simone Gianfranceschi
[ "A", "method", "to", "parse", "a", "SOAP", "1", ".", "2", "fault", "message", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/parsers/SoapParser.java#L318-L343
apache/incubator-druid
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
ApproximateHistogram.shiftLeft
protected void shiftLeft(int start, int end) { for (int i = start; i < end; ++i) { positions[i] = positions[i + 1]; bins[i] = bins[i + 1]; } }
java
protected void shiftLeft(int start, int end) { for (int i = start; i < end; ++i) { positions[i] = positions[i + 1]; bins[i] = bins[i + 1]; } }
[ "protected", "void", "shiftLeft", "(", "int", "start", ",", "int", "end", ")", "{", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "++", "i", ")", "{", "positions", "[", "i", "]", "=", "positions", "[", "i", "+", "1", "]", "...
Shifts the given range of histogram bins one slot to the left @param start index of the leftmost empty bin to shift into @param end index of the last bin to shift left
[ "Shifts", "the", "given", "range", "of", "histogram", "bins", "one", "slot", "to", "the", "left" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java#L465-L471
Chorus-bdd/Chorus
interpreter/chorus-interpreter/src/main/java/org/chorusbdd/chorus/interpreter/interpreter/SpringContextSupport.java
SpringContextSupport.injectSpringResources
void injectSpringResources(Object handler, FeatureToken featureToken) throws Exception { log.trace("Looking for SpringContext annotation on handler " + handler); Class<?> handlerClass = handler.getClass(); Annotation[] annotations = handlerClass.getAnnotations(); String contextFileName =...
java
void injectSpringResources(Object handler, FeatureToken featureToken) throws Exception { log.trace("Looking for SpringContext annotation on handler " + handler); Class<?> handlerClass = handler.getClass(); Annotation[] annotations = handlerClass.getAnnotations(); String contextFileName =...
[ "void", "injectSpringResources", "(", "Object", "handler", ",", "FeatureToken", "featureToken", ")", "throws", "Exception", "{", "log", ".", "trace", "(", "\"Looking for SpringContext annotation on handler \"", "+", "handler", ")", ";", "Class", "<", "?", ">", "hand...
Will load a Spring context from the named @ContextConfiguration resource. Will then inject the beans into fields annotated with @Resource where the name of the bean matches the name of the field. @param handler an instance of the handler class that will be used for testing
[ "Will", "load", "a", "Spring", "context", "from", "the", "named", "@ContextConfiguration", "resource", ".", "Will", "then", "inject", "the", "beans", "into", "fields", "annotated", "with", "@Resource", "where", "the", "name", "of", "the", "bean", "matches", "t...
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-interpreter/src/main/java/org/chorusbdd/chorus/interpreter/interpreter/SpringContextSupport.java#L92-L101
coursera/courier
generator-api/src/main/java/org/coursera/courier/api/CourierTemplateSpecGenerator.java
CourierTemplateSpecGenerator.nullTypeNotAllowed
private static IllegalArgumentException nullTypeNotAllowed(ClassTemplateSpec enclosingClass, String memberName) { return new IllegalArgumentException("The null type can only be used in unions, null found" + enclosingClassAndMemberNameToString(enclosingClass, memberName)); }
java
private static IllegalArgumentException nullTypeNotAllowed(ClassTemplateSpec enclosingClass, String memberName) { return new IllegalArgumentException("The null type can only be used in unions, null found" + enclosingClassAndMemberNameToString(enclosingClass, memberName)); }
[ "private", "static", "IllegalArgumentException", "nullTypeNotAllowed", "(", "ClassTemplateSpec", "enclosingClass", ",", "String", "memberName", ")", "{", "return", "new", "IllegalArgumentException", "(", "\"The null type can only be used in unions, null found\"", "+", "enclosingC...
/* Return exception for trying to use null type outside of a union.
[ "/", "*", "Return", "exception", "for", "trying", "to", "use", "null", "type", "outside", "of", "a", "union", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/generator-api/src/main/java/org/coursera/courier/api/CourierTemplateSpecGenerator.java#L251-L254
sahan/IckleBot
icklebot/src/main/java/com/lonepulse/icklebot/fragment/EventFragment.java
EventFragment.onViewCreated
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); EventUtils.link(EVENT_CONFIGURATION); }
java
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); EventUtils.link(EVENT_CONFIGURATION); }
[ "@", "Override", "public", "void", "onViewCreated", "(", "View", "view", ",", "Bundle", "savedInstanceState", ")", "{", "super", ".", "onViewCreated", "(", "view", ",", "savedInstanceState", ")", ";", "EventUtils", ".", "link", "(", "EVENT_CONFIGURATION", ")", ...
<p>Performs <b>event listener linking</b> by invoking {@link EventUtils#link()}.</p>
[ "<p", ">", "Performs", "<b", ">", "event", "listener", "linking<", "/", "b", ">", "by", "invoking", "{" ]
train
https://github.com/sahan/IckleBot/blob/a19003ceb3ad7c7ee508dc23a8cb31b5676aa499/icklebot/src/main/java/com/lonepulse/icklebot/fragment/EventFragment.java#L65-L70
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/resizable/ResizableContainment.java
ResizableContainment.setParam
private void setParam(ElementEnum elementEnumParam, String objectParam, LiteralOption selector) { this.elementEnumParam = elementEnumParam; this.objectParam = objectParam; this.selector = selector; }
java
private void setParam(ElementEnum elementEnumParam, String objectParam, LiteralOption selector) { this.elementEnumParam = elementEnumParam; this.objectParam = objectParam; this.selector = selector; }
[ "private", "void", "setParam", "(", "ElementEnum", "elementEnumParam", ",", "String", "objectParam", ",", "LiteralOption", "selector", ")", "{", "this", ".", "elementEnumParam", "=", "elementEnumParam", ";", "this", ".", "objectParam", "=", "objectParam", ";", "th...
Method setting the right parameter @param elementEnumParam elementEnum parameter @param objectParam object parameter @param selector Selector
[ "Method", "setting", "the", "right", "parameter" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/resizable/ResizableContainment.java#L222-L227
Alluxio/alluxio
core/common/src/main/java/alluxio/conf/AlluxioProperties.java
AlluxioProperties.setSource
@VisibleForTesting public void setSource(PropertyKey key, Source source) { mSources.put(key, source); }
java
@VisibleForTesting public void setSource(PropertyKey key, Source source) { mSources.put(key, source); }
[ "@", "VisibleForTesting", "public", "void", "setSource", "(", "PropertyKey", "key", ",", "Source", "source", ")", "{", "mSources", ".", "put", "(", "key", ",", "source", ")", ";", "}" ]
Sets the source for a given key. @param key property key @param source the source
[ "Sets", "the", "source", "for", "a", "given", "key", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/conf/AlluxioProperties.java#L240-L243
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
NetworkEnvironmentConfiguration.calculateNewNetworkBufferMemory
@VisibleForTesting public static long calculateNewNetworkBufferMemory(Configuration config, long maxJvmHeapMemory) { // The maximum heap memory has been adjusted as in TaskManagerServices#calculateHeapSizeMB // and we need to invert these calculations. final long jvmHeapNoNet; final MemoryType memoryType = Con...
java
@VisibleForTesting public static long calculateNewNetworkBufferMemory(Configuration config, long maxJvmHeapMemory) { // The maximum heap memory has been adjusted as in TaskManagerServices#calculateHeapSizeMB // and we need to invert these calculations. final long jvmHeapNoNet; final MemoryType memoryType = Con...
[ "@", "VisibleForTesting", "public", "static", "long", "calculateNewNetworkBufferMemory", "(", "Configuration", "config", ",", "long", "maxJvmHeapMemory", ")", "{", "// The maximum heap memory has been adjusted as in TaskManagerServices#calculateHeapSizeMB", "// and we need to invert th...
Calculates the amount of memory used for network buffers inside the current JVM instance based on the available heap or the max heap size and the according configuration parameters. <p>For containers or when started via scripts, if started with a memory limit and set to use off-heap memory, the maximum heap size for t...
[ "Calculates", "the", "amount", "of", "memory", "used", "for", "network", "buffers", "inside", "the", "current", "JVM", "instance", "based", "on", "the", "available", "heap", "or", "the", "max", "heap", "size", "and", "the", "according", "configuration", "param...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java#L187-L217
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/dynamic/output/OutputRegistry.java
OutputRegistry.getOutputComponentType
static OutputType getOutputComponentType(Class<? extends CommandOutput> commandOutputClass) { ClassTypeInformation<? extends CommandOutput> classTypeInformation = ClassTypeInformation.from(commandOutputClass); TypeInformation<?> superTypeInformation = classTypeInformation.getSuperTypeInformation(Comma...
java
static OutputType getOutputComponentType(Class<? extends CommandOutput> commandOutputClass) { ClassTypeInformation<? extends CommandOutput> classTypeInformation = ClassTypeInformation.from(commandOutputClass); TypeInformation<?> superTypeInformation = classTypeInformation.getSuperTypeInformation(Comma...
[ "static", "OutputType", "getOutputComponentType", "(", "Class", "<", "?", "extends", "CommandOutput", ">", "commandOutputClass", ")", "{", "ClassTypeInformation", "<", "?", "extends", "CommandOutput", ">", "classTypeInformation", "=", "ClassTypeInformation", ".", "from"...
Retrieve {@link OutputType} for a {@link CommandOutput} type. @param commandOutputClass @return
[ "Retrieve", "{", "@link", "OutputType", "}", "for", "a", "{", "@link", "CommandOutput", "}", "type", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/dynamic/output/OutputRegistry.java#L199-L227
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/LatLongUtils.java
LatLongUtils.sphericalDistance
public static double sphericalDistance(LatLong latLong1, LatLong latLong2) { double dLat = Math.toRadians(latLong2.latitude - latLong1.latitude); double dLon = Math.toRadians(latLong2.longitude - latLong1.longitude); double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(Math.toRadians(la...
java
public static double sphericalDistance(LatLong latLong1, LatLong latLong2) { double dLat = Math.toRadians(latLong2.latitude - latLong1.latitude); double dLon = Math.toRadians(latLong2.longitude - latLong1.longitude); double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(Math.toRadians(la...
[ "public", "static", "double", "sphericalDistance", "(", "LatLong", "latLong1", ",", "LatLong", "latLong2", ")", "{", "double", "dLat", "=", "Math", ".", "toRadians", "(", "latLong2", ".", "latitude", "-", "latLong1", ".", "latitude", ")", ";", "double", "dLo...
Calculate the spherical distance between two LatLongs in meters using the Haversine formula. <p/> This calculation is done using the assumption, that the earth is a sphere, it is not though. If you need a higher precision and can afford a longer execution time you might want to use vincentyDistance. @param latLong1 fi...
[ "Calculate", "the", "spherical", "distance", "between", "two", "LatLongs", "in", "meters", "using", "the", "Haversine", "formula", ".", "<p", "/", ">", "This", "calculation", "is", "done", "using", "the", "assumption", "that", "the", "earth", "is", "a", "sph...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/LatLongUtils.java#L289-L296
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java
ClasspathOrder.addSystemClasspathEntry
boolean addSystemClasspathEntry(final String pathEntry, final ClassLoader classLoader) { if (classpathEntryUniqueResolvedPaths.add(pathEntry)) { order.add(new SimpleEntry<>(pathEntry, classLoader)); return true; } return false; }
java
boolean addSystemClasspathEntry(final String pathEntry, final ClassLoader classLoader) { if (classpathEntryUniqueResolvedPaths.add(pathEntry)) { order.add(new SimpleEntry<>(pathEntry, classLoader)); return true; } return false; }
[ "boolean", "addSystemClasspathEntry", "(", "final", "String", "pathEntry", ",", "final", "ClassLoader", "classLoader", ")", "{", "if", "(", "classpathEntryUniqueResolvedPaths", ".", "add", "(", "pathEntry", ")", ")", "{", "order", ".", "add", "(", "new", "Simple...
Add a system classpath entry. @param pathEntry the system classpath entry -- the path string should already have been run through FastPathResolver.resolve(FileUtils.CURR_DIR_PATH, path @param classLoader the classloader @return true, if added and unique
[ "Add", "a", "system", "classpath", "entry", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java#L114-L120
jbundle/jbundle
app/program/db/src/main/java/org/jbundle/app/program/db/AnalysisLog.java
AnalysisLog.logRemoveRecord
public void logRemoveRecord(Rec record, int iSystemID) { try { this.getTable().setProperty(DBParams.SUPRESSREMOTEDBMESSAGES, DBConstants.TRUE); this.getTable().getDatabase().setProperty(DBParams.MESSAGES_TO_REMOTE, DBConstants.FALSE); this.addNew(); t...
java
public void logRemoveRecord(Rec record, int iSystemID) { try { this.getTable().setProperty(DBParams.SUPRESSREMOTEDBMESSAGES, DBConstants.TRUE); this.getTable().getDatabase().setProperty(DBParams.MESSAGES_TO_REMOTE, DBConstants.FALSE); this.addNew(); t...
[ "public", "void", "logRemoveRecord", "(", "Rec", "record", ",", "int", "iSystemID", ")", "{", "try", "{", "this", ".", "getTable", "(", ")", ".", "setProperty", "(", "DBParams", ".", "SUPRESSREMOTEDBMESSAGES", ",", "DBConstants", ".", "TRUE", ")", ";", "th...
Log that this record has been freed. Call this from the end of record.free @param record the record that is being added.
[ "Log", "that", "this", "record", "has", "been", "freed", ".", "Call", "this", "from", "the", "end", "of", "record", ".", "free" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/AnalysisLog.java#L167-L192
dadoonet/testcontainers-java-module-elasticsearch
src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java
ElasticsearchContainer.withSecureSetting
public ElasticsearchContainer withSecureSetting(String key, String value) { securedKeys.put(key, value); return this; }
java
public ElasticsearchContainer withSecureSetting(String key, String value) { securedKeys.put(key, value); return this; }
[ "public", "ElasticsearchContainer", "withSecureSetting", "(", "String", "key", ",", "String", "value", ")", "{", "securedKeys", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Define the elasticsearch docker registry base url @param key Key @param value Value @return this
[ "Define", "the", "elasticsearch", "docker", "registry", "base", "url" ]
train
https://github.com/dadoonet/testcontainers-java-module-elasticsearch/blob/780eec66c2999a1e4814f039b2a4559d6a5da408/src/main/java/fr/pilato/elasticsearch/containers/ElasticsearchContainer.java#L93-L96
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java
Character.offsetByCodePoints
public static int offsetByCodePoints(char[] a, int start, int count, int index, int codePointOffset) { if (count > a.length-start || start < 0 || count < 0 || index < start || index > start+count) { throw new IndexOutOfBoundsException(); }...
java
public static int offsetByCodePoints(char[] a, int start, int count, int index, int codePointOffset) { if (count > a.length-start || start < 0 || count < 0 || index < start || index > start+count) { throw new IndexOutOfBoundsException(); }...
[ "public", "static", "int", "offsetByCodePoints", "(", "char", "[", "]", "a", ",", "int", "start", ",", "int", "count", ",", "int", "index", ",", "int", "codePointOffset", ")", "{", "if", "(", "count", ">", "a", ".", "length", "-", "start", "||", "sta...
Returns the index within the given {@code char} subarray that is offset from the given {@code index} by {@code codePointOffset} code points. The {@code start} and {@code count} arguments specify a subarray of the {@code char} array. Unpaired surrogates within the text range given by {@code index} and {@code codePointOf...
[ "Returns", "the", "index", "within", "the", "given", "{", "@code", "char", "}", "subarray", "that", "is", "offset", "from", "the", "given", "{", "@code", "index", "}", "by", "{", "@code", "codePointOffset", "}", "code", "points", ".", "The", "{", "@code"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L5410-L5417
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/LocalScanUploadMonitor.java
LocalScanUploadMonitor.resplitPartiallyCompleteTasks
private ScanStatus resplitPartiallyCompleteTasks(ScanStatus status) { boolean anyUpdated = false; int nextTaskId = -1; for (ScanRangeStatus complete : status.getCompleteScanRanges()) { if (complete.getResplitRange().isPresent()) { // This task only partially complete...
java
private ScanStatus resplitPartiallyCompleteTasks(ScanStatus status) { boolean anyUpdated = false; int nextTaskId = -1; for (ScanRangeStatus complete : status.getCompleteScanRanges()) { if (complete.getResplitRange().isPresent()) { // This task only partially complete...
[ "private", "ScanStatus", "resplitPartiallyCompleteTasks", "(", "ScanStatus", "status", ")", "{", "boolean", "anyUpdated", "=", "false", ";", "int", "nextTaskId", "=", "-", "1", ";", "for", "(", "ScanRangeStatus", "complete", ":", "status", ".", "getCompleteScanRan...
Checks whether any completed tasks returned before scanning the entire range. If so then the unscanned ranges are resplit and new tasks are created from them.
[ "Checks", "whether", "any", "completed", "tasks", "returned", "before", "scanning", "the", "entire", "range", ".", "If", "so", "then", "the", "unscanned", "ranges", "are", "resplit", "and", "new", "tasks", "are", "created", "from", "them", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/LocalScanUploadMonitor.java#L282-L317
alkacon/opencms-core
src/org/opencms/file/CmsRequestContext.java
CmsRequestContext.setAttribute
public void setAttribute(String key, Object value) { if (m_attributeMap == null) { // hash table is still the most efficient form of a synchronized Map m_attributeMap = new Hashtable<String, Object>(); } m_attributeMap.put(key, value); }
java
public void setAttribute(String key, Object value) { if (m_attributeMap == null) { // hash table is still the most efficient form of a synchronized Map m_attributeMap = new Hashtable<String, Object>(); } m_attributeMap.put(key, value); }
[ "public", "void", "setAttribute", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "m_attributeMap", "==", "null", ")", "{", "// hash table is still the most efficient form of a synchronized Map", "m_attributeMap", "=", "new", "Hashtable", "<", "Stri...
Sets an attribute in the request context.<p> @param key the attribute name @param value the attribute value
[ "Sets", "an", "attribute", "in", "the", "request", "context", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsRequestContext.java#L550-L557
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.absoluteQuadraticToH
public static boolean absoluteQuadraticToH(DMatrix4x4 Q , DMatrixRMaj H ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; return alg.computeRectifyingHomography(H); }
java
public static boolean absoluteQuadraticToH(DMatrix4x4 Q , DMatrixRMaj H ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; return alg.computeRectifyingHomography(H); }
[ "public", "static", "boolean", "absoluteQuadraticToH", "(", "DMatrix4x4", "Q", ",", "DMatrixRMaj", "H", ")", "{", "DecomposeAbsoluteDualQuadratic", "alg", "=", "new", "DecomposeAbsoluteDualQuadratic", "(", ")", ";", "if", "(", "!", "alg", ".", "decompose", "(", ...
Decomposes the absolute quadratic to extract the rectifying homogrpahy H. This is used to go from a projective to metric (calibrated) geometry. See pg 464 in [1]. <p>Q = H*I*H<sup>T</sup></p> <p>where I = diag(1 1 1 0)</p> <ol> <li> R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Ca...
[ "Decomposes", "the", "absolute", "quadratic", "to", "extract", "the", "rectifying", "homogrpahy", "H", ".", "This", "is", "used", "to", "go", "from", "a", "projective", "to", "metric", "(", "calibrated", ")", "geometry", ".", "See", "pg", "464", "in", "[",...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1472-L1478
Samsung/GearVRf
GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java
GVRScriptBehavior.invokeFunction
public boolean invokeFunction(String funcName, Object[] args) { mLastError = null; if (mScriptFile != null) { if (mScriptFile.invokeFunction(funcName, args)) { return true; } } mLastError = mScriptFile.getLastError(); ...
java
public boolean invokeFunction(String funcName, Object[] args) { mLastError = null; if (mScriptFile != null) { if (mScriptFile.invokeFunction(funcName, args)) { return true; } } mLastError = mScriptFile.getLastError(); ...
[ "public", "boolean", "invokeFunction", "(", "String", "funcName", ",", "Object", "[", "]", "args", ")", "{", "mLastError", "=", "null", ";", "if", "(", "mScriptFile", "!=", "null", ")", "{", "if", "(", "mScriptFile", ".", "invokeFunction", "(", "funcName",...
Calls a function script associated with this component. The function is called even if the component is not enabled and not attached to a scene object. @param funcName name of script function to call. @param args function parameters as an array of objects. @return true if function was called, false if no such function ...
[ "Calls", "a", "function", "script", "associated", "with", "this", "component", ".", "The", "function", "is", "called", "even", "if", "the", "component", "is", "not", "enabled", "and", "not", "attached", "to", "a", "scene", "object", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java#L316-L332
lets-blade/blade
src/main/java/com/blade/kit/EncryptKit.java
EncryptKit.hmacSHA256
public static String hmacSHA256(String data, String key) { return hmacSHA256(data.getBytes(), key.getBytes()); }
java
public static String hmacSHA256(String data, String key) { return hmacSHA256(data.getBytes(), key.getBytes()); }
[ "public", "static", "String", "hmacSHA256", "(", "String", "data", ",", "String", "key", ")", "{", "return", "hmacSHA256", "(", "data", ".", "getBytes", "(", ")", ",", "key", ".", "getBytes", "(", ")", ")", ";", "}" ]
HmacSHA256加密 @param data 明文字符串 @param key 秘钥 @return 16进制密文
[ "HmacSHA256加密" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/EncryptKit.java#L360-L362
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.updateUserData
public ApiSuccessResponse updateUserData(String id, UserDataOperationId userData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = updateUserDataWithHttpInfo(id, userData); return resp.getData(); }
java
public ApiSuccessResponse updateUserData(String id, UserDataOperationId userData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = updateUserDataWithHttpInfo(id, userData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "updateUserData", "(", "String", "id", ",", "UserDataOperationId", "userData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "updateUserDataWithHttpInfo", "(", "id", ",", "userData", ")"...
Update user data for a call Update call data with the provided key/value pairs. This replaces any existing key/value pairs with the same keys. @param id The connection ID of the call. (required) @param userData The data to update. This is an array of objects with the properties key, type, and value. (required) @return ...
[ "Update", "user", "data", "for", "a", "call", "Update", "call", "data", "with", "the", "provided", "key", "/", "value", "pairs", ".", "This", "replaces", "any", "existing", "key", "/", "value", "pairs", "with", "the", "same", "keys", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L5358-L5361
alkacon/opencms-core
src/org/opencms/search/solr/spellchecking/CmsSpellcheckDictionaryIndexer.java
CmsSpellcheckDictionaryIndexer.addDocuments
static void addDocuments(SolrClient client, List<SolrInputDocument> documents, boolean commit) throws IOException, SolrServerException { if ((null == client) || (null == documents)) { return; } if (!documents.isEmpty()) { client.add(documents); } if...
java
static void addDocuments(SolrClient client, List<SolrInputDocument> documents, boolean commit) throws IOException, SolrServerException { if ((null == client) || (null == documents)) { return; } if (!documents.isEmpty()) { client.add(documents); } if...
[ "static", "void", "addDocuments", "(", "SolrClient", "client", ",", "List", "<", "SolrInputDocument", ">", "documents", ",", "boolean", "commit", ")", "throws", "IOException", ",", "SolrServerException", "{", "if", "(", "(", "null", "==", "client", ")", "||", ...
Add a list of documents to the Solr client.<p> @param client The SolrClient instance object. @param documents The documents that should be added. @param commit boolean flag indicating whether a "commit" call should be made after adding the documents @throws IOException in case something goes wrong @throws SolrServerE...
[ "Add", "a", "list", "of", "documents", "to", "the", "Solr", "client", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSpellcheckDictionaryIndexer.java#L265-L279
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/EditFeatureAction.java
EditFeatureAction.execute
public boolean execute(Canvas target, Menu menu, MenuItem item) { int count = mapWidget.getMapModel().getNrSelectedFeatures(); if (count == 1) { for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) { if (layer.getSelectedFeatures().size() == 1) { // It's already selected, so we assume the...
java
public boolean execute(Canvas target, Menu menu, MenuItem item) { int count = mapWidget.getMapModel().getNrSelectedFeatures(); if (count == 1) { for (VectorLayer layer : mapWidget.getMapModel().getVectorLayers()) { if (layer.getSelectedFeatures().size() == 1) { // It's already selected, so we assume the...
[ "public", "boolean", "execute", "(", "Canvas", "target", ",", "Menu", "menu", ",", "MenuItem", "item", ")", "{", "int", "count", "=", "mapWidget", ".", "getMapModel", "(", ")", ".", "getNrSelectedFeatures", "(", ")", ";", "if", "(", "count", "==", "1", ...
Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be enabled or not. In essence, this action will be enabled if a vector-layer is selected that allows the updating of existing features.
[ "Implementation", "of", "the", "<code", ">", "MenuItemIfFunction<", "/", "code", ">", "interface", ".", "This", "will", "determine", "if", "the", "menu", "action", "should", "be", "enabled", "or", "not", ".", "In", "essence", "this", "action", "will", "be", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/EditFeatureAction.java#L102-L115
apache/spark
core/src/main/java/org/apache/spark/util/collection/TimSort.java
TimSort.countRunAndMakeAscending
private int countRunAndMakeAscending(Buffer a, int lo, int hi, Comparator<? super K> c) { assert lo < hi; int runHi = lo + 1; if (runHi == hi) return 1; K key0 = s.newKey(); K key1 = s.newKey(); // Find end of run, and reverse range if descending if (c.compare(s.getKey(a, runHi++, ke...
java
private int countRunAndMakeAscending(Buffer a, int lo, int hi, Comparator<? super K> c) { assert lo < hi; int runHi = lo + 1; if (runHi == hi) return 1; K key0 = s.newKey(); K key1 = s.newKey(); // Find end of run, and reverse range if descending if (c.compare(s.getKey(a, runHi++, ke...
[ "private", "int", "countRunAndMakeAscending", "(", "Buffer", "a", ",", "int", "lo", ",", "int", "hi", ",", "Comparator", "<", "?", "super", "K", ">", "c", ")", "{", "assert", "lo", "<", "hi", ";", "int", "runHi", "=", "lo", "+", "1", ";", "if", "...
Returns the length of the run beginning at the specified position in the specified array and reverses the run if it is descending (ensuring that the run will always be ascending when the method returns). A run is the longest ascending sequence with: a[lo] <= a[lo + 1] <= a[lo + 2] <= ... or the longest descending se...
[ "Returns", "the", "length", "of", "the", "run", "beginning", "at", "the", "specified", "position", "in", "the", "specified", "array", "and", "reverses", "the", "run", "if", "it", "is", "descending", "(", "ensuring", "that", "the", "run", "will", "always", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/TimSort.java#L260-L280
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java
Organizer.addAll
public static <T> void addAll(Collection<T> pagingResults, Collection<T> paging, BooleanExpression<T> filter) { if (pagingResults == null || paging == null) return; if (filter != null) { for (T obj : paging) { if (filter.apply(obj)) pagingResults.add(obj); } } else { ...
java
public static <T> void addAll(Collection<T> pagingResults, Collection<T> paging, BooleanExpression<T> filter) { if (pagingResults == null || paging == null) return; if (filter != null) { for (T obj : paging) { if (filter.apply(obj)) pagingResults.add(obj); } } else { ...
[ "public", "static", "<", "T", ">", "void", "addAll", "(", "Collection", "<", "T", ">", "pagingResults", ",", "Collection", "<", "T", ">", "paging", ",", "BooleanExpression", "<", "T", ">", "filter", ")", "{", "if", "(", "pagingResults", "==", "null", "...
Add all collections @param <T> the type class @param paging the paging output @param pagingResults the results to add to @param filter remove object where filter.getBoolean() == true
[ "Add", "all", "collections" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java#L295-L316
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.buildFieldProperties
public static void buildFieldProperties(final Class<?> aClass, final DescriptionBuilder builder) { for (final Field field : collectClassFields(aClass)) { final PluginProperty annotation = field.getAnnotation(PluginProperty.class); if (null == annotation) { continue; ...
java
public static void buildFieldProperties(final Class<?> aClass, final DescriptionBuilder builder) { for (final Field field : collectClassFields(aClass)) { final PluginProperty annotation = field.getAnnotation(PluginProperty.class); if (null == annotation) { continue; ...
[ "public", "static", "void", "buildFieldProperties", "(", "final", "Class", "<", "?", ">", "aClass", ",", "final", "DescriptionBuilder", "builder", ")", "{", "for", "(", "final", "Field", "field", ":", "collectClassFields", "(", "aClass", ")", ")", "{", "fina...
Add properties based on introspection of a class @param aClass class @param builder builder
[ "Add", "properties", "based", "on", "introspection", "of", "a", "class" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L151-L163
looly/hutool
hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java
DaoTemplate.del
public <T> int del(String field, T value) throws SQLException { if (StrUtil.isBlank(field)) { return 0; } return this.del(Entity.create(tableName).set(field, value)); }
java
public <T> int del(String field, T value) throws SQLException { if (StrUtil.isBlank(field)) { return 0; } return this.del(Entity.create(tableName).set(field, value)); }
[ "public", "<", "T", ">", "int", "del", "(", "String", "field", ",", "T", "value", ")", "throws", "SQLException", "{", "if", "(", "StrUtil", ".", "isBlank", "(", "field", ")", ")", "{", "return", "0", ";", "}", "return", "this", ".", "del", "(", "...
删除 @param <T> 主键类型 @param field 字段名 @param value 字段值 @return 删除行数 @throws SQLException SQL执行异常
[ "删除" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/DaoTemplate.java#L136-L142