repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
oasp/oasp4j
modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java
RestServiceExceptionFacade.handleSecurityError
protected Response handleSecurityError(Throwable exception, Throwable catched) { """ Exception handling for security exception. @param exception the exception to handle @param catched the original exception that was cached. Either same as {@code error} or a (child-) {@link Throwable#getCause() cause} of it. ...
java
protected Response handleSecurityError(Throwable exception, Throwable catched) { NlsRuntimeException error; if ((exception == catched) && (exception instanceof NlsRuntimeException)) { error = (NlsRuntimeException) exception; } else { error = new SecurityErrorUserException(catched); } LO...
[ "protected", "Response", "handleSecurityError", "(", "Throwable", "exception", ",", "Throwable", "catched", ")", "{", "NlsRuntimeException", "error", ";", "if", "(", "(", "exception", "==", "catched", ")", "&&", "(", "exception", "instanceof", "NlsRuntimeException",...
Exception handling for security exception. @param exception the exception to handle @param catched the original exception that was cached. Either same as {@code error} or a (child-) {@link Throwable#getCause() cause} of it. @return the response build from exception
[ "Exception", "handling", "for", "security", "exception", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java#L298-L316
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpScsrlsvluHost
public static int cusolverSpScsrlsvluHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x...
java
public static int cusolverSpScsrlsvluHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x...
[ "public", "static", "int", "cusolverSpScsrlsvluHost", "(", "cusolverSpHandle", "handle", ",", "int", "n", ",", "int", "nnzA", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrValA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", ...
<pre> -------- GPU linear solver by LU factorization solve A*x = b, A can be singular [ls] stands for linear solve [v] stands for vector [lu] stands for LU factorization </pre>
[ "<pre", ">", "--------", "GPU", "linear", "solver", "by", "LU", "factorization", "solve", "A", "*", "x", "=", "b", "A", "can", "be", "singular", "[", "ls", "]", "stands", "for", "linear", "solve", "[", "v", "]", "stands", "for", "vector", "[", "lu", ...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L137-L152
aws/aws-sdk-java
jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java
JmesPathEvaluationVisitor.visit
@Override public JsonNode visit(JmesPathNotExpression notExpression, JsonNode input) throws InvalidTypeException { """ Not-expression negates the result of an expression. If the expression results in a truth-like value, a not-expression will change this value to false. If the expression results in a false-l...
java
@Override public JsonNode visit(JmesPathNotExpression notExpression, JsonNode input) throws InvalidTypeException { JsonNode resultExpr = notExpression.getExpr().accept(this, input); if (resultExpr != BooleanNode.TRUE) { return BooleanNode.TRUE; } return BooleanNode.FALSE;...
[ "@", "Override", "public", "JsonNode", "visit", "(", "JmesPathNotExpression", "notExpression", ",", "JsonNode", "input", ")", "throws", "InvalidTypeException", "{", "JsonNode", "resultExpr", "=", "notExpression", ".", "getExpr", "(", ")", ".", "accept", "(", "this...
Not-expression negates the result of an expression. If the expression results in a truth-like value, a not-expression will change this value to false. If the expression results in a false-like value, a not-expression will change this value to true. @param notExpression JmesPath not-expression type @param input ...
[ "Not", "-", "expression", "negates", "the", "result", "of", "an", "expression", ".", "If", "the", "expression", "results", "in", "a", "truth", "-", "like", "value", "a", "not", "-", "expression", "will", "change", "this", "value", "to", "false", ".", "If...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/jmespath-java/src/main/java/com/amazonaws/jmespath/JmesPathEvaluationVisitor.java#L279-L286
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldHelperFunctions.java
TldHelperFunctions.computeOverlap
public double computeOverlap( ImageRectangle a , ImageRectangle b ) { """ Computes the fractional area of intersection between the two regions. @return number from 0 to 1. higher means more intersection """ if( !a.intersection(b,work) ) return 0; int areaI = work.area(); int bottom = a.area() + ...
java
public double computeOverlap( ImageRectangle a , ImageRectangle b ) { if( !a.intersection(b,work) ) return 0; int areaI = work.area(); int bottom = a.area() + b.area() - areaI; return areaI/ (double)bottom; }
[ "public", "double", "computeOverlap", "(", "ImageRectangle", "a", ",", "ImageRectangle", "b", ")", "{", "if", "(", "!", "a", ".", "intersection", "(", "b", ",", "work", ")", ")", "return", "0", ";", "int", "areaI", "=", "work", ".", "area", "(", ")",...
Computes the fractional area of intersection between the two regions. @return number from 0 to 1. higher means more intersection
[ "Computes", "the", "fractional", "area", "of", "intersection", "between", "the", "two", "regions", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldHelperFunctions.java#L38-L47
openxc/openxc-android
library/src/main/java/com/openxc/interfaces/bluetooth/DeviceManager.java
DeviceManager.setupSocket
private BluetoothSocket setupSocket(BluetoothDevice device) throws BluetoothException { """ Open an RFCOMM socket to the Bluetooth device. <p> The device may or may not actually exist, the argument is just a reference to it. """ if (device == null) { Log.w(TAG, "Can't setup s...
java
private BluetoothSocket setupSocket(BluetoothDevice device) throws BluetoothException { if (device == null) { Log.w(TAG, "Can't setup socket -- device is null"); throw new BluetoothException(); } Log.d(TAG, "Scanning services on " + device); Bluetooth...
[ "private", "BluetoothSocket", "setupSocket", "(", "BluetoothDevice", "device", ")", "throws", "BluetoothException", "{", "if", "(", "device", "==", "null", ")", "{", "Log", ".", "w", "(", "TAG", ",", "\"Can't setup socket -- device is null\"", ")", ";", "throw", ...
Open an RFCOMM socket to the Bluetooth device. <p> The device may or may not actually exist, the argument is just a reference to it.
[ "Open", "an", "RFCOMM", "socket", "to", "the", "Bluetooth", "device", ".", "<p", ">", "The", "device", "may", "or", "may", "not", "actually", "exist", "the", "argument", "is", "just", "a", "reference", "to", "it", "." ]
train
https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/bluetooth/DeviceManager.java#L244-L262
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildEnumConstantsSummary
public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) { """ Build the summary for the enum constants. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added """ MemberSummary...
java
public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters.get(VisibleMemberMap.Kind.ENUM_CONSTANTS); VisibleMemberMap visibleMemberMap = getVisibleMemberMap(VisibleMemberMap.Kind.ENUM_CONSTANTS); ...
[ "public", "void", "buildEnumConstantsSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", ".", "get", "(", "VisibleMemberMap", ".", "Kind", ".", "ENUM_CONSTANTS", ")", ";", "Vi...
Build the summary for the enum constants. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "summary", "for", "the", "enum", "constants", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java#L209-L215
deephacks/confit
provider-hbase-filter/src/main/java/org/deephacks/confit/internal/hbase/Bytes.java
Bytes.setLong
public static void setLong(final byte[] b, final long n, final int offset) { """ Writes a big-endian 8-byte long at an offset in the given array. @param b The array to write to. @param offset The offset in the array to start writing at. @throws IndexOutOfBoundsException if the byte array is too small. """ ...
java
public static void setLong(final byte[] b, final long n, final int offset) { b[offset + 0] = (byte) (n >>> 56); b[offset + 1] = (byte) (n >>> 48); b[offset + 2] = (byte) (n >>> 40); b[offset + 3] = (byte) (n >>> 32); b[offset + 4] = (byte) (n >>> 24); b[offset + 5] = (byt...
[ "public", "static", "void", "setLong", "(", "final", "byte", "[", "]", "b", ",", "final", "long", "n", ",", "final", "int", "offset", ")", "{", "b", "[", "offset", "+", "0", "]", "=", "(", "byte", ")", "(", "n", ">>>", "56", ")", ";", "b", "[...
Writes a big-endian 8-byte long at an offset in the given array. @param b The array to write to. @param offset The offset in the array to start writing at. @throws IndexOutOfBoundsException if the byte array is too small.
[ "Writes", "a", "big", "-", "endian", "8", "-", "byte", "long", "at", "an", "offset", "in", "the", "given", "array", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/provider-hbase-filter/src/main/java/org/deephacks/confit/internal/hbase/Bytes.java#L243-L252
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java
SyncAgentsInner.listLinkedDatabasesAsync
public Observable<Page<SyncAgentLinkedDatabaseInner>> listLinkedDatabasesAsync(final String resourceGroupName, final String serverName, final String syncAgentName) { """ Lists databases linked to a sync agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain thi...
java
public Observable<Page<SyncAgentLinkedDatabaseInner>> listLinkedDatabasesAsync(final String resourceGroupName, final String serverName, final String syncAgentName) { return listLinkedDatabasesWithServiceResponseAsync(resourceGroupName, serverName, syncAgentName) .map(new Func1<ServiceResponse<Page<S...
[ "public", "Observable", "<", "Page", "<", "SyncAgentLinkedDatabaseInner", ">", ">", "listLinkedDatabasesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "serverName", ",", "final", "String", "syncAgentName", ")", "{", "return", "listLinkedD...
Lists databases linked to a sync agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server on which the sync agent is hosted. @param syncAgentName The name of the sync ...
[ "Lists", "databases", "linked", "to", "a", "sync", "agent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java#L986-L994
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/trie/PatriciaTrie.java
PatriciaTrie.findFirstDifferingBit
private int findFirstDifferingBit(String key1, String key2) { """ Returns the leftmost differing bit index when doing a bitwise comparison of key1 and key2 @param key1 first key to compare @param key2 second key to compare @return bit index of first different bit """ int bit = 0; while ...
java
private int findFirstDifferingBit(String key1, String key2) { int bit = 0; while (keyMapper.isSet(bit, key1) == keyMapper.isSet(bit, key2)) { bit++; } return bit; }
[ "private", "int", "findFirstDifferingBit", "(", "String", "key1", ",", "String", "key2", ")", "{", "int", "bit", "=", "0", ";", "while", "(", "keyMapper", ".", "isSet", "(", "bit", ",", "key1", ")", "==", "keyMapper", ".", "isSet", "(", "bit", ",", "...
Returns the leftmost differing bit index when doing a bitwise comparison of key1 and key2 @param key1 first key to compare @param key2 second key to compare @return bit index of first different bit
[ "Returns", "the", "leftmost", "differing", "bit", "index", "when", "doing", "a", "bitwise", "comparison", "of", "key1", "and", "key2" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/trie/PatriciaTrie.java#L315-L322
Crab2died/Excel4J
src/main/java/com/github/crab2died/utils/DateUtils.java
DateUtils.str2Date
public static Date str2Date(String strDate, String format) { """ <p>根据给出的格式化类型将时间字符串转为{@link Date}类型</p> author : Crab2Died date : 2017年06月02日 15:27:22 @param strDate 时间字符串 @param format 格式化类型 @return 返回{@link java.util.Date}类型 """ Date date = null; SimpleDateFormat sdf = new SimpleD...
java
public static Date str2Date(String strDate, String format) { Date date = null; SimpleDateFormat sdf = new SimpleDateFormat(format); try { date = sdf.parse(strDate); } catch (ParseException e) { throw new TimeMatchFormatException("[" + strDate + "] parse to [" + fo...
[ "public", "static", "Date", "str2Date", "(", "String", "strDate", ",", "String", "format", ")", "{", "Date", "date", "=", "null", ";", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "format", ")", ";", "try", "{", "date", "=", "sdf", "."...
<p>根据给出的格式化类型将时间字符串转为{@link Date}类型</p> author : Crab2Died date : 2017年06月02日 15:27:22 @param strDate 时间字符串 @param format 格式化类型 @return 返回{@link java.util.Date}类型
[ "<p", ">", "根据给出的格式化类型将时间字符串转为", "{", "@link", "Date", "}", "类型<", "/", "p", ">", "author", ":", "Crab2Died", "date", ":", "2017年06月02日", "15", ":", "27", ":", "22" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/utils/DateUtils.java#L123-L132
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/naming/PhysicalNamingStrategyShogunCore.java
PhysicalNamingStrategyShogunCore.toPhysicalTableName
@Override public Identifier toPhysicalTableName(Identifier tableIdentifier, JdbcEnvironment context) { """ Converts table names to lower case and limits the length if necessary. """ return convertToLimitedLowerCase(context, tableIdentifier, tablePrefix); }
java
@Override public Identifier toPhysicalTableName(Identifier tableIdentifier, JdbcEnvironment context) { return convertToLimitedLowerCase(context, tableIdentifier, tablePrefix); }
[ "@", "Override", "public", "Identifier", "toPhysicalTableName", "(", "Identifier", "tableIdentifier", ",", "JdbcEnvironment", "context", ")", "{", "return", "convertToLimitedLowerCase", "(", "context", ",", "tableIdentifier", ",", "tablePrefix", ")", ";", "}" ]
Converts table names to lower case and limits the length if necessary.
[ "Converts", "table", "names", "to", "lower", "case", "and", "limits", "the", "length", "if", "necessary", "." ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/naming/PhysicalNamingStrategyShogunCore.java#L48-L51
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java
LoggerCreator.createModuleLogger
public static Logger createModuleLogger(String name, Logger parent) { """ Create a logger with the given name for a module (kernel or agent). <p>The level of logging is influence by {@link JanusConfig#VERBOSE_LEVEL_NAME}. @param name - the name of the new logger. @param parent - the parent logger. @retur...
java
public static Logger createModuleLogger(String name, Logger parent) { final Logger logger = Logger.getLogger(name); if (parent != null) { logger.setParent(parent); } logger.setUseParentHandlers(true); final Level level = getLoggingLevelFromProperties(); logger.setLevel(level); return logger; }
[ "public", "static", "Logger", "createModuleLogger", "(", "String", "name", ",", "Logger", "parent", ")", "{", "final", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "name", ")", ";", "if", "(", "parent", "!=", "null", ")", "{", "logger", ".",...
Create a logger with the given name for a module (kernel or agent). <p>The level of logging is influence by {@link JanusConfig#VERBOSE_LEVEL_NAME}. @param name - the name of the new logger. @param parent - the parent logger. @return the logger.
[ "Create", "a", "logger", "with", "the", "given", "name", "for", "a", "module", "(", "kernel", "or", "agent", ")", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/LoggerCreator.java#L110-L119
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java
ESClient.addSource
private void addSource(Object entity, Map<String, Object> values, EntityType entityType) { """ Adds the source. @param entity the entity @param values the values @param entityType the entity type """ Set<Attribute> attributes = entityType.getAttributes(); for (Attribute attrib : attribu...
java
private void addSource(Object entity, Map<String, Object> values, EntityType entityType) { Set<Attribute> attributes = entityType.getAttributes(); for (Attribute attrib : attributes) { if (!attrib.isAssociation()) { Object value = PropertyAccessorHelpe...
[ "private", "void", "addSource", "(", "Object", "entity", ",", "Map", "<", "String", ",", "Object", ">", "values", ",", "EntityType", "entityType", ")", "{", "Set", "<", "Attribute", ">", "attributes", "=", "entityType", ".", "getAttributes", "(", ")", ";",...
Adds the source. @param entity the entity @param values the values @param entityType the entity type
[ "Adds", "the", "source", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java#L235-L246
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/beans/visitor/BeanIntrospectionWriter.java
BeanIntrospectionWriter.indexProperty
void indexProperty(AnnotationValue<?> annotation, String property, @Nullable String value) { """ Builds an index for the given property and annotation. @param annotation The annotation @param property The property @param value the value of the annotation """ indexes.computeIfAbsent(property, s -> ...
java
void indexProperty(AnnotationValue<?> annotation, String property, @Nullable String value) { indexes.computeIfAbsent(property, s -> new HashSet<>(2)).add(new AnnotationValueIndex(annotation, property, value)); }
[ "void", "indexProperty", "(", "AnnotationValue", "<", "?", ">", "annotation", ",", "String", "property", ",", "@", "Nullable", "String", "value", ")", "{", "indexes", ".", "computeIfAbsent", "(", "property", ",", "s", "->", "new", "HashSet", "<>", "(", "2"...
Builds an index for the given property and annotation. @param annotation The annotation @param property The property @param value the value of the annotation
[ "Builds", "an", "index", "for", "the", "given", "property", "and", "annotation", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/beans/visitor/BeanIntrospectionWriter.java#L164-L166
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayReplace
public static Expression arrayReplace(JsonArray array, Expression value1, Expression value2, long n) { """ Returned expression results in new array with at most n occurrences of value1 replaced with value2. """ return arrayReplace(x(array), value1, value2, n); }
java
public static Expression arrayReplace(JsonArray array, Expression value1, Expression value2, long n) { return arrayReplace(x(array), value1, value2, n); }
[ "public", "static", "Expression", "arrayReplace", "(", "JsonArray", "array", ",", "Expression", "value1", ",", "Expression", "value2", ",", "long", "n", ")", "{", "return", "arrayReplace", "(", "x", "(", "array", ")", ",", "value1", ",", "value2", ",", "n"...
Returned expression results in new array with at most n occurrences of value1 replaced with value2.
[ "Returned", "expression", "results", "in", "new", "array", "with", "at", "most", "n", "occurrences", "of", "value1", "replaced", "with", "value2", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L431-L433
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/contentcensor/AipContentCensor.java
AipContentCensor.faceAudit
public JSONObject faceAudit(List<String> imgPaths, EImgType type, HashMap<String, String> options) { """ 头像审核接口 @param imgPaths 本地图片路径或图片url列表 @param type imgPaths参数类型:FILE或URL @param options 可选参数 @return JSONObject """ if (type == EImgType.FILE) { try { ...
java
public JSONObject faceAudit(List<String> imgPaths, EImgType type, HashMap<String, String> options) { if (type == EImgType.FILE) { try { byte[][] imgData = new byte[imgPaths.size()][]; int idx = 0; for (String path : imgP...
[ "public", "JSONObject", "faceAudit", "(", "List", "<", "String", ">", "imgPaths", ",", "EImgType", "type", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "if", "(", "type", "==", "EImgType", ".", "FILE", ")", "{", "try", "{", ...
头像审核接口 @param imgPaths 本地图片路径或图片url列表 @param type imgPaths参数类型:FILE或URL @param options 可选参数 @return JSONObject
[ "头像审核接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/contentcensor/AipContentCensor.java#L219-L240
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_mailingList_name_subscriber_POST
public OvhTaskMl domain_mailingList_name_subscriber_POST(String domain, String name, String email) throws IOException { """ Add subscriber to mailing list REST: POST /email/domain/{domain}/mailingList/{name}/subscriber @param email [required] Email of subscriber @param domain [required] Name of your domain na...
java
public OvhTaskMl domain_mailingList_name_subscriber_POST(String domain, String name, String email) throws IOException { String qPath = "/email/domain/{domain}/mailingList/{name}/subscriber"; StringBuilder sb = path(qPath, domain, name); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "email...
[ "public", "OvhTaskMl", "domain_mailingList_name_subscriber_POST", "(", "String", "domain", ",", "String", "name", ",", "String", "email", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/mailingList/{name}/subscriber\"", ";", "StringBuild...
Add subscriber to mailing list REST: POST /email/domain/{domain}/mailingList/{name}/subscriber @param email [required] Email of subscriber @param domain [required] Name of your domain name @param name [required] Name of mailing list
[ "Add", "subscriber", "to", "mailing", "list" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1585-L1592
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setInteger
public <T extends Model> T setInteger(String attributeName, Object value) { """ Sets attribute value as <code>Integer</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Integer</code>, given the value is an instance of <code>S</co...
java
public <T extends Model> T setInteger(String attributeName, Object value) { Converter<Object, Integer> converter = modelRegistryLocal.converterForValue(attributeName, value, Integer.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toInteger(value)); }
[ "public", "<", "T", "extends", "Model", ">", "T", "setInteger", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "Converter", "<", "Object", ",", "Integer", ">", "converter", "=", "modelRegistryLocal", ".", "converterForValue", "(", "attribute...
Sets attribute value as <code>Integer</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Integer</code>, given the value is an instance of <code>S</code>, then it will be used, otherwise performs a conversion using {@link Convert#toInteg...
[ "Sets", "attribute", "value", "as", "<code", ">", "Integer<", "/", "code", ">", ".", "If", "there", "is", "a", "{", "@link", "Converter", "}", "registered", "for", "the", "attribute", "that", "converts", "from", "Class", "<code", ">", "S<", "/", "code", ...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1756-L1759
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.grantResourcePermission
public Map<String, Map<String, List<String>>> grantResourcePermission(String subjectid, String resourcePath, EnumSet<App.AllowedMethods> permission) { """ Grants a permission to a subject that allows them to call the specified HTTP methods on a given resource. @param subjectid subject id (user id) @param reso...
java
public Map<String, Map<String, List<String>>> grantResourcePermission(String subjectid, String resourcePath, EnumSet<App.AllowedMethods> permission) { return grantResourcePermission(subjectid, resourcePath, permission, false); }
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "grantResourcePermission", "(", "String", "subjectid", ",", "String", "resourcePath", ",", "EnumSet", "<", "App", ".", "AllowedMethods", ">", "permission", ...
Grants a permission to a subject that allows them to call the specified HTTP methods on a given resource. @param subjectid subject id (user id) @param resourcePath resource path or object type @param permission a set of HTTP methods @return a map of the permissions for this subject id
[ "Grants", "a", "permission", "to", "a", "subject", "that", "allows", "them", "to", "call", "the", "specified", "HTTP", "methods", "on", "a", "given", "resource", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1431-L1434
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/activities/engine/ParallelEngine.java
ParallelEngine.execute
@Override public Vector execute(TypedVector<ActivityInfo> infos) throws ActivityException { """ Submits a set of activities to the underlying asynchornous execution mechanism. @param infos the activities, along with the elements of data they will operate upon and their context. @return a set of {@code Fut...
java
@Override public Vector execute(TypedVector<ActivityInfo> infos) throws ActivityException { if(infos != null && !infos.isEmpty()) { logger.trace("executing {} activities...", infos.size()); int i = 0; TypedVector<Future<ActivityData>> futures = new TypedVector<Future<ActivityData>>(); for(ActivityInfo i...
[ "@", "Override", "public", "Vector", "execute", "(", "TypedVector", "<", "ActivityInfo", ">", "infos", ")", "throws", "ActivityException", "{", "if", "(", "infos", "!=", "null", "&&", "!", "infos", ".", "isEmpty", "(", ")", ")", "{", "logger", ".", "trac...
Submits a set of activities to the underlying asynchornous execution mechanism. @param infos the activities, along with the elements of data they will operate upon and their context. @return a set of {@code Future}s representing the execution results.
[ "Submits", "a", "set", "of", "activities", "to", "the", "underlying", "asynchornous", "execution", "mechanism", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/activities/engine/ParallelEngine.java#L92-L108
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java
Transform2D.setScale
@SuppressWarnings("checkstyle:magicnumber") public void setScale(double scaleX, double scaleY) { """ Change the scale of this matrix. Performs an SVD normalization of this matrix for determining and preserving the rotation. @param scaleX the scaling factor along x axis. @param scaleY the scaling factor along...
java
@SuppressWarnings("checkstyle:magicnumber") public void setScale(double scaleX, double scaleY) { final double[] tmpScale = new double[3]; final double[] tmpRot = new double[9]; getScaleRotate2x2(tmpScale, tmpRot); this.m00 = tmpRot[0] * scaleX; this.m01 = tmpRot[1] * scaleY; this.m10 = tmpRot[3] * scaleX; ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "public", "void", "setScale", "(", "double", "scaleX", ",", "double", "scaleY", ")", "{", "final", "double", "[", "]", "tmpScale", "=", "new", "double", "[", "3", "]", ";", "final", "double", ...
Change the scale of this matrix. Performs an SVD normalization of this matrix for determining and preserving the rotation. @param scaleX the scaling factor along x axis. @param scaleY the scaling factor along y axis. @see #makeScaleMatrix(double, double)
[ "Change", "the", "scale", "of", "this", "matrix", ".", "Performs", "an", "SVD", "normalization", "of", "this", "matrix", "for", "determining", "and", "preserving", "the", "rotation", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java#L475-L484
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINK.java
SLINK.step2primitive
private void step2primitive(DBIDRef id, DBIDArrayIter it, int n, Relation<? extends O> relation, PrimitiveDistanceFunction<? super O> distFunc, WritableDoubleDataStore m) { """ Second step: Determine the pairwise distances from all objects in the pointer representation to the new object with the specified id. ...
java
private void step2primitive(DBIDRef id, DBIDArrayIter it, int n, Relation<? extends O> relation, PrimitiveDistanceFunction<? super O> distFunc, WritableDoubleDataStore m) { O newObj = relation.get(id); for(it.seek(0); it.getOffset() < n; it.advance()) { // M(i) = dist(i, n+1) m.putDouble(it, distFun...
[ "private", "void", "step2primitive", "(", "DBIDRef", "id", ",", "DBIDArrayIter", "it", ",", "int", "n", ",", "Relation", "<", "?", "extends", "O", ">", "relation", ",", "PrimitiveDistanceFunction", "<", "?", "super", "O", ">", "distFunc", ",", "WritableDoubl...
Second step: Determine the pairwise distances from all objects in the pointer representation to the new object with the specified id. @param id the id of the object to be inserted into the pointer representation @param it Array iterator @param n Last object @param m Data store @param relation Data relation @param dist...
[ "Second", "step", ":", "Determine", "the", "pairwise", "distances", "from", "all", "objects", "in", "the", "pointer", "representation", "to", "the", "new", "object", "with", "the", "specified", "id", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINK.java#L181-L187
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/HexUtil.java
HexUtil.dumpString
public static String dumpString(byte[] frame, int offset, int length) { """ Create a formatted "dump" of a sequence of bytes @param frame the byte array containing the bytes to be formatted @param offset the offset of the first byte to format @param length the number of bytes to format @return a St...
java
public static String dumpString(byte[] frame, int offset, int length) { return dumpString(frame, offset, length, false); }
[ "public", "static", "String", "dumpString", "(", "byte", "[", "]", "frame", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "dumpString", "(", "frame", ",", "offset", ",", "length", ",", "false", ")", ";", "}" ]
Create a formatted "dump" of a sequence of bytes @param frame the byte array containing the bytes to be formatted @param offset the offset of the first byte to format @param length the number of bytes to format @return a String containing the formatted dump.
[ "Create", "a", "formatted", "dump", "of", "a", "sequence", "of", "bytes" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/util/HexUtil.java#L95-L97
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_federation_activeDirectory_activeDirectoryId_DELETE
public OvhTask serviceName_federation_activeDirectory_activeDirectoryId_DELETE(String serviceName, Long activeDirectoryId) throws IOException { """ Remove an option user access REST: DELETE /dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId} @param serviceName [required] Domain of the ...
java
public OvhTask serviceName_federation_activeDirectory_activeDirectoryId_DELETE(String serviceName, Long activeDirectoryId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId}"; StringBuilder sb = path(qPath, serviceName, activeDirectoryId); String resp...
[ "public", "OvhTask", "serviceName_federation_activeDirectory_activeDirectoryId_DELETE", "(", "String", "serviceName", ",", "Long", "activeDirectoryId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirect...
Remove an option user access REST: DELETE /dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId} @param serviceName [required] Domain of the service @param activeDirectoryId [required] Id of the Active Directory
[ "Remove", "an", "option", "user", "access" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1150-L1155
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedhousing/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedhousing.java
ApiOvhDedicatedhousing.serviceName_features_backupFTP_access_ipBlock_GET
public OvhBackupFtpAcl serviceName_features_backupFTP_access_ipBlock_GET(String serviceName, String ipBlock) throws IOException { """ Get this object properties REST: GET /dedicated/housing/{serviceName}/features/backupFTP/access/{ipBlock} @param serviceName [required] The internal name of your Housing bay @p...
java
public OvhBackupFtpAcl serviceName_features_backupFTP_access_ipBlock_GET(String serviceName, String ipBlock) throws IOException { String qPath = "/dedicated/housing/{serviceName}/features/backupFTP/access/{ipBlock}"; StringBuilder sb = path(qPath, serviceName, ipBlock); String resp = exec(qPath, "GET", sb.toStrin...
[ "public", "OvhBackupFtpAcl", "serviceName_features_backupFTP_access_ipBlock_GET", "(", "String", "serviceName", ",", "String", "ipBlock", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/housing/{serviceName}/features/backupFTP/access/{ipBlock}\"", ";", "S...
Get this object properties REST: GET /dedicated/housing/{serviceName}/features/backupFTP/access/{ipBlock} @param serviceName [required] The internal name of your Housing bay @param ipBlock [required] The IP Block specific to this ACL
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedhousing/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedhousing.java#L180-L185
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeFailedResult
public void writeFailedResult(int line, String value) { """ Writes a fail result @param line The line number @param value The value """ logger.debug("Write Failed result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
java
public void writeFailedResult(int line, String value) { logger.debug("Write Failed result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
[ "public", "void", "writeFailedResult", "(", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Failed result => line:{} value:{}\"", ",", "line", ",", "value", ")", ";", "writeValue", "(", "resultColumnName", ",", "line", ",",...
Writes a fail result @param line The line number @param value The value
[ "Writes", "a", "fail", "result" ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L143-L146
httl/httl
httl/src/main/java/httl/Engine.java
Engine.getEngine
public static Engine getEngine(String configPath, Properties configProperties) { """ Get template engine singleton. @param configPath - config path @param configProperties - config properties @return template engine """ if (StringUtils.isEmpty(configPath)) { configPath = HTTL_PRO...
java
public static Engine getEngine(String configPath, Properties configProperties) { if (StringUtils.isEmpty(configPath)) { configPath = HTTL_PROPERTIES; } VolatileReference<Engine> reference = ENGINES.get(configPath); if (reference == null) { reference = new Volatile...
[ "public", "static", "Engine", "getEngine", "(", "String", "configPath", ",", "Properties", "configProperties", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "configPath", ")", ")", "{", "configPath", "=", "HTTL_PROPERTIES", ";", "}", "VolatileReferenc...
Get template engine singleton. @param configPath - config path @param configProperties - config properties @return template engine
[ "Get", "template", "engine", "singleton", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/Engine.java#L105-L130
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java
JQMHeader.setRightButton
public JQMButton setRightButton(String text, String url) { """ Creates a new {@link JQMButton} with the given text and linking to the given url and then sets that button in the right slot. Any existing right button will be replaced. @param text the text for the button @param url the optional url for the bu...
java
public JQMButton setRightButton(String text, String url) { return setRightButton(text, url, null); }
[ "public", "JQMButton", "setRightButton", "(", "String", "text", ",", "String", "url", ")", "{", "return", "setRightButton", "(", "text", ",", "url", ",", "null", ")", ";", "}" ]
Creates a new {@link JQMButton} with the given text and linking to the given url and then sets that button in the right slot. Any existing right button will be replaced. @param text the text for the button @param url the optional url for the button, if null then this button does not navigate by default @return the cr...
[ "Creates", "a", "new", "{", "@link", "JQMButton", "}", "with", "the", "given", "text", "and", "linking", "to", "the", "given", "url", "and", "then", "sets", "that", "button", "in", "the", "right", "slot", ".", "Any", "existing", "right", "button", "will"...
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L346-L348
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.setBounds
public void setBounds(TypeVar t, List<Type> bounds, boolean allInterfaces) { """ Set the bounds field of the given type variable to reflect a (possibly multiple) list of bounds. This does not cause symbol completion as an extra parameter indicates as to whether all bounds are interfaces - in which case the super...
java
public void setBounds(TypeVar t, List<Type> bounds, boolean allInterfaces) { t.bound = bounds.tail.isEmpty() ? bounds.head : makeIntersectionType(bounds, allInterfaces); t.rank_field = -1; }
[ "public", "void", "setBounds", "(", "TypeVar", "t", ",", "List", "<", "Type", ">", "bounds", ",", "boolean", "allInterfaces", ")", "{", "t", ".", "bound", "=", "bounds", ".", "tail", ".", "isEmpty", "(", ")", "?", "bounds", ".", "head", ":", "makeInt...
Set the bounds field of the given type variable to reflect a (possibly multiple) list of bounds. This does not cause symbol completion as an extra parameter indicates as to whether all bounds are interfaces - in which case the supertype is implicitly assumed to be 'Object'. @param t a type variable @param ...
[ "Set", "the", "bounds", "field", "of", "the", "given", "type", "variable", "to", "reflect", "a", "(", "possibly", "multiple", ")", "list", "of", "bounds", ".", "This", "does", "not", "cause", "symbol", "completion", "as", "an", "extra", "parameter", "indic...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L2418-L2423
Alluxio/alluxio
core/client/fs/src/main/java/alluxio/client/block/stream/BlockInStream.java
BlockInStream.createGrpcBlockInStream
private static BlockInStream createGrpcBlockInStream(FileSystemContext context, WorkerNetAddress address, BlockInStreamSource blockSource, ReadRequest readRequestPartial, long blockSize, InStreamOptions options) { """ Creates a {@link BlockInStream} to read from a gRPC data server. @param context th...
java
private static BlockInStream createGrpcBlockInStream(FileSystemContext context, WorkerNetAddress address, BlockInStreamSource blockSource, ReadRequest readRequestPartial, long blockSize, InStreamOptions options) { ReadRequest.Builder readRequestBuilder = readRequestPartial.toBuilder(); long chunkSiz...
[ "private", "static", "BlockInStream", "createGrpcBlockInStream", "(", "FileSystemContext", "context", ",", "WorkerNetAddress", "address", ",", "BlockInStreamSource", "blockSource", ",", "ReadRequest", "readRequestPartial", ",", "long", "blockSize", ",", "InStreamOptions", "...
Creates a {@link BlockInStream} to read from a gRPC data server. @param context the file system context @param address the address of the gRPC data server @param blockSource the source location of the block @param blockSize the block size @param readRequestPartial the partial read request @return the {@link BlockInStr...
[ "Creates", "a", "{", "@link", "BlockInStream", "}", "to", "read", "from", "a", "gRPC", "data", "server", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/client/fs/src/main/java/alluxio/client/block/stream/BlockInStream.java#L167-L178
apereo/cas
support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/support/claims/WrappingSecurityTokenServiceClaimsHandler.java
WrappingSecurityTokenServiceClaimsHandler.createProcessedClaim
protected ProcessedClaim createProcessedClaim(final Claim requestClaim, final ClaimsParameters parameters) { """ Create processed claim processed claim. @param requestClaim the request claim @param parameters the parameters @return the processed claim """ val claim = new ProcessedClaim(); ...
java
protected ProcessedClaim createProcessedClaim(final Claim requestClaim, final ClaimsParameters parameters) { val claim = new ProcessedClaim(); claim.setClaimType(createProcessedClaimType(requestClaim, parameters)); claim.setIssuer(this.issuer); claim.setOriginalIssuer(this.issuer); ...
[ "protected", "ProcessedClaim", "createProcessedClaim", "(", "final", "Claim", "requestClaim", ",", "final", "ClaimsParameters", "parameters", ")", "{", "val", "claim", "=", "new", "ProcessedClaim", "(", ")", ";", "claim", ".", "setClaimType", "(", "createProcessedCl...
Create processed claim processed claim. @param requestClaim the request claim @param parameters the parameters @return the processed claim
[ "Create", "processed", "claim", "processed", "claim", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/support/claims/WrappingSecurityTokenServiceClaimsHandler.java#L69-L76
HiddenStage/divide
Client/java-client/src/main/java/io/divide/client/BackendUser.java
BackendUser.signUpInBackground
public static Observable<BackendUser> signUpInBackground(String username, String email, String password) { """ Perform asyncronously sign up attempt. @param username user name user will be identified by. @param email user email address @param password user password @return login results as observable. """ ...
java
public static Observable<BackendUser> signUpInBackground(String username, String email, String password){ return getAM().signUpASync(new SignUpCredentials(username, email, password)); }
[ "public", "static", "Observable", "<", "BackendUser", ">", "signUpInBackground", "(", "String", "username", ",", "String", "email", ",", "String", "password", ")", "{", "return", "getAM", "(", ")", ".", "signUpASync", "(", "new", "SignUpCredentials", "(", "use...
Perform asyncronously sign up attempt. @param username user name user will be identified by. @param email user email address @param password user password @return login results as observable.
[ "Perform", "asyncronously", "sign", "up", "attempt", "." ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Client/java-client/src/main/java/io/divide/client/BackendUser.java#L193-L195
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java
XPopupBox.printInputControl
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { """ Display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @para...
java
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { strValue = Utility.encodeXML(this.getScreenField().getSFieldValue(false, true)); // Need the RAW data. if (m_vDi...
[ "public", "void", "printInputControl", "(", "PrintWriter", "out", ",", "String", "strFieldDesc", ",", "String", "strFieldName", ",", "String", "strSize", ",", "String", "strMaxSize", ",", "String", "strValue", ",", "String", "strControlType", ",", "String", "strFi...
Display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @param strFieldName The field name. @param strSize The control size. @param strMaxSize The string max size. @param strValue The default value. @param strControlType The control type. @param iHtmlAttribure...
[ "Display", "this", "field", "in", "html", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XPopupBox.java#L128-L147
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_boot_bootId_option_GET
public ArrayList<OvhBootOptionEnum> serviceName_boot_bootId_option_GET(String serviceName, Long bootId) throws IOException { """ Option used on this netboot REST: GET /dedicated/server/{serviceName}/boot/{bootId}/option @param serviceName [required] The internal name of your dedicated server @param bootId [re...
java
public ArrayList<OvhBootOptionEnum> serviceName_boot_bootId_option_GET(String serviceName, Long bootId) throws IOException { String qPath = "/dedicated/server/{serviceName}/boot/{bootId}/option"; StringBuilder sb = path(qPath, serviceName, bootId); String resp = exec(qPath, "GET", sb.toString(), null); return c...
[ "public", "ArrayList", "<", "OvhBootOptionEnum", ">", "serviceName_boot_bootId_option_GET", "(", "String", "serviceName", ",", "Long", "bootId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/boot/{bootId}/option\"", ";", "Stri...
Option used on this netboot REST: GET /dedicated/server/{serviceName}/boot/{bootId}/option @param serviceName [required] The internal name of your dedicated server @param bootId [required] boot id
[ "Option", "used", "on", "this", "netboot" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1814-L1819
future-architect/uroborosql
src/main/java/jp/co/future/uroborosql/context/SqlContextFactoryImpl.java
SqlContextFactoryImpl.makeEnumConstParamMap
protected void makeEnumConstParamMap(final Map<String, Parameter> paramMap, final String packageName, final Class<? extends Enum<?>> targetClass) { """ Enum型の定数パラメータのMapを生成する @param paramMap 定数パラメータを保持するMap @param packageName パッケージ名 @param targetClass 対象Enumクラス """ String fieldPrefix = CaseFormat.UP...
java
protected void makeEnumConstParamMap(final Map<String, Parameter> paramMap, final String packageName, final Class<? extends Enum<?>> targetClass) { String fieldPrefix = CaseFormat.UPPER_SNAKE_CASE.convert(targetClass.getName().substring( packageName.length() + 1)) + "_"; Enum<?>[] enumValues = targetCl...
[ "protected", "void", "makeEnumConstParamMap", "(", "final", "Map", "<", "String", ",", "Parameter", ">", "paramMap", ",", "final", "String", "packageName", ",", "final", "Class", "<", "?", "extends", "Enum", "<", "?", ">", ">", "targetClass", ")", "{", "St...
Enum型の定数パラメータのMapを生成する @param paramMap 定数パラメータを保持するMap @param packageName パッケージ名 @param targetClass 対象Enumクラス
[ "Enum型の定数パラメータのMapを生成する" ]
train
https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/context/SqlContextFactoryImpl.java#L184-L203
alibaba/canal
client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java
ESTemplate.updateByQuery
public void updateByQuery(ESSyncConfig config, Map<String, Object> paramsTmp, Map<String, Object> esFieldData) { """ update by query @param config 配置对象 @param paramsTmp sql查询条件 @param esFieldData 数据Map """ if (paramsTmp.isEmpty()) { return; } ESMapping mapping = config....
java
public void updateByQuery(ESSyncConfig config, Map<String, Object> paramsTmp, Map<String, Object> esFieldData) { if (paramsTmp.isEmpty()) { return; } ESMapping mapping = config.getEsMapping(); BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery(); paramsTmp.forEac...
[ "public", "void", "updateByQuery", "(", "ESSyncConfig", "config", ",", "Map", "<", "String", ",", "Object", ">", "paramsTmp", ",", "Map", "<", "String", ",", "Object", ">", "esFieldData", ")", "{", "if", "(", "paramsTmp", ".", "isEmpty", "(", ")", ")", ...
update by query @param config 配置对象 @param paramsTmp sql查询条件 @param esFieldData 数据Map
[ "update", "by", "query" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java#L130-L166
greese/dasein-cloud-digitalocean
src/main/java/org/dasein/cloud/digitalocean/compute/DOInstance.java
DOInstance.waitForAllDropletEventsToComplete
void waitForAllDropletEventsToComplete(@Nonnull String instanceId, int timeout) throws InternalException, CloudException { """ Wait for specified number of minutes for all pending droplet events to complete @param instanceId Id of the droplet @param timeout Time in minutes to wait for events to complete @throws...
java
void waitForAllDropletEventsToComplete(@Nonnull String instanceId, int timeout) throws InternalException, CloudException { APITrace.begin(getProvider(), "listVirtualMachineStatus"); try { // allow maximum five minutes for events to complete long wait = System.currentTimeMillis() ...
[ "void", "waitForAllDropletEventsToComplete", "(", "@", "Nonnull", "String", "instanceId", ",", "int", "timeout", ")", "throws", "InternalException", ",", "CloudException", "{", "APITrace", ".", "begin", "(", "getProvider", "(", ")", ",", "\"listVirtualMachineStatus\""...
Wait for specified number of minutes for all pending droplet events to complete @param instanceId Id of the droplet @param timeout Time in minutes to wait for events to complete @throws InternalException @throws CloudException
[ "Wait", "for", "specified", "number", "of", "minutes", "for", "all", "pending", "droplet", "events", "to", "complete" ]
train
https://github.com/greese/dasein-cloud-digitalocean/blob/09b74566b24d7f668379fca237524d4cc0335f77/src/main/java/org/dasein/cloud/digitalocean/compute/DOInstance.java#L95-L124
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/channelfactory/AbstractChannelFactory.java
AbstractChannelFactory.toCheckedFile
protected File toCheckedFile(final String context, final String path) { """ Converts the given path to a file. This method checks that the file exists and refers to a file. @param context The context for what the file is used. This value will be used in case of exceptions. @param path The path of the file to u...
java
protected File toCheckedFile(final String context, final String path) { if (!isNonNullAndNonBlank(path)) { throw new IllegalArgumentException(context + " path cannot be null or blank"); } final File file = new File(path); if (!file.isFile()) { String message = ...
[ "protected", "File", "toCheckedFile", "(", "final", "String", "context", ",", "final", "String", "path", ")", "{", "if", "(", "!", "isNonNullAndNonBlank", "(", "path", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "context", "+", "\" path can...
Converts the given path to a file. This method checks that the file exists and refers to a file. @param context The context for what the file is used. This value will be used in case of exceptions. @param path The path of the file to use. @return The file instance created with the given path.
[ "Converts", "the", "given", "path", "to", "a", "file", ".", "This", "method", "checks", "that", "the", "file", "exists", "and", "refers", "to", "a", "file", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/channelfactory/AbstractChannelFactory.java#L204-L218
azkaban/azkaban
azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java
FlowLoaderUtils.getPropsFromYamlFile
public static Props getPropsFromYamlFile(final String path, final File flowFile) { """ Gets flow or job props from flow yaml file. @param path the flow or job path delimited by ":", e.g. "flow:subflow1:subflow2:job3" @param flowFile the flow yaml file @return the props from yaml file """ final List<Pr...
java
public static Props getPropsFromYamlFile(final String path, final File flowFile) { final List<Props> propsList = new ArrayList<>(); final NodeBeanLoader loader = new NodeBeanLoader(); try { final NodeBean nodeBean = loader.load(flowFile); final String[] pathList = path.split(Constants.PATH_DELI...
[ "public", "static", "Props", "getPropsFromYamlFile", "(", "final", "String", "path", ",", "final", "File", "flowFile", ")", "{", "final", "List", "<", "Props", ">", "propsList", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "NodeBeanLoader", "loader...
Gets flow or job props from flow yaml file. @param path the flow or job path delimited by ":", e.g. "flow:subflow1:subflow2:job3" @param flowFile the flow yaml file @return the props from yaml file
[ "Gets", "flow", "or", "job", "props", "from", "flow", "yaml", "file", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/project/FlowLoaderUtils.java#L136-L154
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPagesNotContainingTemplateFragments
public Iterable<Page> getPagesNotContainingTemplateFragments(List<String> templateFragments) throws WikiApiException { """ Return an iterable containing all pages that contain a template the name of which starts with any of the given Strings. @param templateFragments the beginning of the templates that have t...
java
public Iterable<Page> getPagesNotContainingTemplateFragments(List<String> templateFragments) throws WikiApiException{ return getFragmentFilteredPages(templateFragments, false); }
[ "public", "Iterable", "<", "Page", ">", "getPagesNotContainingTemplateFragments", "(", "List", "<", "String", ">", "templateFragments", ")", "throws", "WikiApiException", "{", "return", "getFragmentFilteredPages", "(", "templateFragments", ",", "false", ")", ";", "}" ...
Return an iterable containing all pages that contain a template the name of which starts with any of the given Strings. @param templateFragments the beginning of the templates that have to be matched @return An iterable with the page objects that contain templates beginning with any String in templateFragments @throws...
[ "Return", "an", "iterable", "containing", "all", "pages", "that", "contain", "a", "template", "the", "name", "of", "which", "starts", "with", "any", "of", "the", "given", "Strings", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L423-L425
VoltDB/voltdb
src/frontend/org/voltdb/client/ConnectionUtil.java
ConnectionUtil.getAuthenticatedConnection
public static Object[] getAuthenticatedConnection(String host, String username, byte[] hashedPassword, int port, final Subject subject, ClientAuthScheme scheme, ...
java
public static Object[] getAuthenticatedConnection(String host, String username, byte[] hashedPassword, int port, final Subject subject, ClientAuthScheme scheme, ...
[ "public", "static", "Object", "[", "]", "getAuthenticatedConnection", "(", "String", "host", ",", "String", "username", ",", "byte", "[", "]", "hashedPassword", ",", "int", "port", ",", "final", "Subject", "subject", ",", "ClientAuthScheme", "scheme", ",", "lo...
Create a connection to a Volt server and authenticate the connection. @param host @param username @param hashedPassword @param port @param subject @throws IOException @returns An array of objects. The first is an authenticated socket channel, the second. is an array of 4 longs - Integer hostId, Long connectionId, Long ...
[ "Create", "a", "connection", "to", "a", "Volt", "server", "and", "authenticate", "the", "connection", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ConnectionUtil.java#L253-L259
arakelian/docker-junit-rule
src/main/java/com/arakelian/docker/junit/Container.java
Container.isSocketAlive
public static boolean isSocketAlive(final SocketAddress socketAddress, final int timeoutMsecs) { """ Returns true if a connection can be established to the given socket address within the timeout provided. @param socketAddress socket address @param timeoutMsecs timeout @return true if a connection can be e...
java
public static boolean isSocketAlive(final SocketAddress socketAddress, final int timeoutMsecs) { final Socket socket = new Socket(); try { socket.connect(socketAddress, timeoutMsecs); socket.close(); return true; } catch (final SocketTimeoutException exception...
[ "public", "static", "boolean", "isSocketAlive", "(", "final", "SocketAddress", "socketAddress", ",", "final", "int", "timeoutMsecs", ")", "{", "final", "Socket", "socket", "=", "new", "Socket", "(", ")", ";", "try", "{", "socket", ".", "connect", "(", "socke...
Returns true if a connection can be established to the given socket address within the timeout provided. @param socketAddress socket address @param timeoutMsecs timeout @return true if a connection can be established to the given socket address
[ "Returns", "true", "if", "a", "connection", "can", "be", "established", "to", "the", "given", "socket", "address", "within", "the", "timeout", "provided", "." ]
train
https://github.com/arakelian/docker-junit-rule/blob/cc99d63896a07df398b53fd5f0f6e4777e3b23cf/src/main/java/com/arakelian/docker/junit/Container.java#L87-L98
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
SessionDataManager.getItem
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType) throws RepositoryException { """ Return Item by parent NodeDada and the name of searched item. @param parent - parent of the searched item @param name - item name @param itemType - item type @param pool - ind...
java
public ItemImpl getItem(NodeData parent, QPathEntry name, boolean pool, ItemType itemType) throws RepositoryException { return getItem(parent, name, pool, itemType, true); }
[ "public", "ItemImpl", "getItem", "(", "NodeData", "parent", ",", "QPathEntry", "name", ",", "boolean", "pool", ",", "ItemType", "itemType", ")", "throws", "RepositoryException", "{", "return", "getItem", "(", "parent", ",", "name", ",", "pool", ",", "itemType"...
Return Item by parent NodeDada and the name of searched item. @param parent - parent of the searched item @param name - item name @param itemType - item type @param pool - indicates does the item fall in pool @return existed item or null if not found @throws RepositoryException
[ "Return", "Item", "by", "parent", "NodeDada", "and", "the", "name", "of", "searched", "item", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L361-L365
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Conference.java
Conference.getMembers
public List<ConferenceMember> getMembers() throws Exception { """ Gets list all members from a conference. If a member had already hung up or removed from conference it will be displayed as completed. @return list of members @throws IOException unexpected error. """ final String membersPath = Strin...
java
public List<ConferenceMember> getMembers() throws Exception { final String membersPath = StringUtils.join(new String[]{ getUri(), "members" }, '/'); final JSONArray array = toJSONArray(client.get(membersPath, null)); final List<ConferenceMember> members =...
[ "public", "List", "<", "ConferenceMember", ">", "getMembers", "(", ")", "throws", "Exception", "{", "final", "String", "membersPath", "=", "StringUtils", ".", "join", "(", "new", "String", "[", "]", "{", "getUri", "(", ")", ",", "\"members\"", "}", ",", ...
Gets list all members from a conference. If a member had already hung up or removed from conference it will be displayed as completed. @return list of members @throws IOException unexpected error.
[ "Gets", "list", "all", "members", "from", "a", "conference", ".", "If", "a", "member", "had", "already", "hung", "up", "or", "removed", "from", "conference", "it", "will", "be", "displayed", "as", "completed", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Conference.java#L165-L177
signalapp/libsignal-service-java
java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageReceiver.java
SignalServiceMessageReceiver.retrieveAttachment
public InputStream retrieveAttachment(SignalServiceAttachmentPointer pointer, File destination, int maxSizeBytes, ProgressListener listener) throws IOException, InvalidMessageException { """ Retrieves a SignalServiceAttachment. @param pointer The {@link SignalServiceAttachmentPointer} received in a {@lin...
java
public InputStream retrieveAttachment(SignalServiceAttachmentPointer pointer, File destination, int maxSizeBytes, ProgressListener listener) throws IOException, InvalidMessageException { if (!pointer.getDigest().isPresent()) throw new InvalidMessageException("No attachment digest!"); socket.retrieveAtt...
[ "public", "InputStream", "retrieveAttachment", "(", "SignalServiceAttachmentPointer", "pointer", ",", "File", "destination", ",", "int", "maxSizeBytes", ",", "ProgressListener", "listener", ")", "throws", "IOException", ",", "InvalidMessageException", "{", "if", "(", "!...
Retrieves a SignalServiceAttachment. @param pointer The {@link SignalServiceAttachmentPointer} received in a {@link SignalServiceDataMessage}. @param destination The download destination for this attachment. @param listener An optional listener (may be null) to receive callbacks on download progress. @return An Input...
[ "Retrieves", "a", "SignalServiceAttachment", "." ]
train
https://github.com/signalapp/libsignal-service-java/blob/64f1150c5e4062d67d31c9a2a9c3a0237d022902/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageReceiver.java#L130-L137
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getPatternAnyEntityRole
public EntityRole getPatternAnyEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { """ Get one entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity ID. @param roleId entity role ID. @throws IllegalArgumentException thrown...
java
public EntityRole getPatternAnyEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { return getPatternAnyEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body(); }
[ "public", "EntityRole", "getPatternAnyEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ")", "{", "return", "getPatternAnyEntityRoleWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId",...
Get one entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity ID. @param roleId entity role ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws...
[ "Get", "one", "entity", "role", "for", "a", "given", "entity", "." ]
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/ModelsImpl.java#L12757-L12759
ical4j/ical4j
src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java
ParameterValidator.assertOneOrLess
public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { """ Ensure a parameter occurs no more than once. @param paramName the parameter name @param parameters a list of parameters to query @throws ValidationException when the specified pa...
java
public void assertOneOrLess(final String paramName, final ParameterList parameters) throws ValidationException { if (parameters.getParameters(paramName).size() > 1) { throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName}); } }
[ "public", "void", "assertOneOrLess", "(", "final", "String", "paramName", ",", "final", "ParameterList", "parameters", ")", "throws", "ValidationException", "{", "if", "(", "parameters", ".", "getParameters", "(", "paramName", ")", ".", "size", "(", ")", ">", ...
Ensure a parameter occurs no more than once. @param paramName the parameter name @param parameters a list of parameters to query @throws ValidationException when the specified parameter occurs more than once
[ "Ensure", "a", "parameter", "occurs", "no", "more", "than", "once", "." ]
train
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/validate/ParameterValidator.java#L73-L79
TimeAndSpaceIO/SmoothieMap
src/main/java/net/openhft/smoothie/SmoothieMap.java
SmoothieMap.containsEntry
public final boolean containsEntry(Object key, Object value) { """ Returns {@code true} if this map contains a mapping of the given key and value. More formally, this map should contain a mapping from a key {@code k} to a value {@code v} such that {@link #keysEqual(Object, Object) keysEqual(key, k)}{@code == tru...
java
public final boolean containsEntry(Object key, Object value) { long hash, allocIndex; Segment<K, V> segment; V v; return (allocIndex = (segment = segment(segmentIndex(hash = keyHashCode(key)))) .find(this, hash, key)) > 0 && ((v = segment.readValue(allocIn...
[ "public", "final", "boolean", "containsEntry", "(", "Object", "key", ",", "Object", "value", ")", "{", "long", "hash", ",", "allocIndex", ";", "Segment", "<", "K", ",", "V", ">", "segment", ";", "V", "v", ";", "return", "(", "allocIndex", "=", "(", "...
Returns {@code true} if this map contains a mapping of the given key and value. More formally, this map should contain a mapping from a key {@code k} to a value {@code v} such that {@link #keysEqual(Object, Object) keysEqual(key, k)}{@code == true} and {@link #valuesEqual(Object, Object) valuesEqual(value, v)}{@code ==...
[ "Returns", "{", "@code", "true", "}", "if", "this", "map", "contains", "a", "mapping", "of", "the", "given", "key", "and", "value", ".", "More", "formally", "this", "map", "should", "contain", "a", "mapping", "from", "a", "key", "{", "@code", "k", "}",...
train
https://github.com/TimeAndSpaceIO/SmoothieMap/blob/c798f6cae1d377f6913e8821a1fcf5bf45ee0412/src/main/java/net/openhft/smoothie/SmoothieMap.java#L688-L696
nextreports/nextreports-engine
src/ro/nextreports/engine/util/DateUtil.java
DateUtil.getNumberOfDays
public static int getNumberOfDays(Date first, Date second) { """ Get number of days between two dates @param first first date @param second second date @return number of days if first date less than second date, 0 if first date is bigger than second date, 1 if dates are the same """ Calendar c...
java
public static int getNumberOfDays(Date first, Date second) { Calendar c = Calendar.getInstance(); int result = 0; int compare = first.compareTo(second); if (compare > 0) return 0; if (compare == 0) return 1; c.setTime(first); int firstDay = c....
[ "public", "static", "int", "getNumberOfDays", "(", "Date", "first", ",", "Date", "second", ")", "{", "Calendar", "c", "=", "Calendar", ".", "getInstance", "(", ")", ";", "int", "result", "=", "0", ";", "int", "compare", "=", "first", ".", "compareTo", ...
Get number of days between two dates @param first first date @param second second date @return number of days if first date less than second date, 0 if first date is bigger than second date, 1 if dates are the same
[ "Get", "number", "of", "days", "between", "two", "dates" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/DateUtil.java#L332-L373
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putSurrogateAuthenticationAccounts
public static void putSurrogateAuthenticationAccounts(final RequestContext requestContext, final List<String> surrogates) { """ Put surrogate authentication accounts. @param requestContext the request context @param surrogates the surrogates """ requestContext.getFlowScope().put("surrogates", s...
java
public static void putSurrogateAuthenticationAccounts(final RequestContext requestContext, final List<String> surrogates) { requestContext.getFlowScope().put("surrogates", surrogates); }
[ "public", "static", "void", "putSurrogateAuthenticationAccounts", "(", "final", "RequestContext", "requestContext", ",", "final", "List", "<", "String", ">", "surrogates", ")", "{", "requestContext", ".", "getFlowScope", "(", ")", ".", "put", "(", "\"surrogates\"", ...
Put surrogate authentication accounts. @param requestContext the request context @param surrogates the surrogates
[ "Put", "surrogate", "authentication", "accounts", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L910-L912
alkacon/opencms-core
src/org/opencms/widgets/CmsHtmlWidgetOption.java
CmsHtmlWidgetOption.parseEmbeddedGalleryOptions
public static CmsPair<String, Map<String, String>> parseEmbeddedGalleryOptions(String configuration) { """ Parses and removes embedded gallery configuration strings. @param configuration the configuration string to parse @return a map containing both the string resulting from removing the embedded configurat...
java
public static CmsPair<String, Map<String, String>> parseEmbeddedGalleryOptions(String configuration) { final Map<String, String> galleryOptions = Maps.newHashMap(); String resultConfig = CmsStringUtil.substitute( PATTERN_EMBEDDED_GALLERY_CONFIG, configuration, new I_...
[ "public", "static", "CmsPair", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "parseEmbeddedGalleryOptions", "(", "String", "configuration", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "galleryOptions", "=", "Maps", ".", ...
Parses and removes embedded gallery configuration strings. @param configuration the configuration string to parse @return a map containing both the string resulting from removing the embedded configurations, and the embedded configurations as a a map
[ "Parses", "and", "removes", "embedded", "gallery", "configuration", "strings", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsHtmlWidgetOption.java#L497-L514
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java
XmlParser.setXpath
public void setXpath(String xpath) { """ Set an XPath A very simple subset of xpath is supported to select a partial tree. Currently only path like "/node1/nodeA | /node1/nodeB" are supported. @param xpath The xpath to set. """ _xpath = xpath; StringTokenizer tok = new StringTokenizer(xpat...
java
public void setXpath(String xpath) { _xpath = xpath; StringTokenizer tok = new StringTokenizer(xpath,"| "); while(tok.hasMoreTokens()) _xpaths=LazyList.add(_xpaths, tok.nextToken()); }
[ "public", "void", "setXpath", "(", "String", "xpath", ")", "{", "_xpath", "=", "xpath", ";", "StringTokenizer", "tok", "=", "new", "StringTokenizer", "(", "xpath", ",", "\"| \"", ")", ";", "while", "(", "tok", ".", "hasMoreTokens", "(", ")", ")", "_xpath...
Set an XPath A very simple subset of xpath is supported to select a partial tree. Currently only path like "/node1/nodeA | /node1/nodeB" are supported. @param xpath The xpath to set.
[ "Set", "an", "XPath", "A", "very", "simple", "subset", "of", "xpath", "is", "supported", "to", "select", "a", "partial", "tree", ".", "Currently", "only", "path", "like", "/", "node1", "/", "nodeA", "|", "/", "node1", "/", "nodeB", "are", "supported", ...
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java#L147-L153
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.compareIgnoreCase
public static int compareIgnoreCase(final String str1, final String str2, final boolean nullIsLess) { """ <p>Compare two Strings lexicographically, ignoring case differences, as per {@link String#compareToIgnoreCase(String)}, returning :</p> <ul> <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or...
java
public static int compareIgnoreCase(final String str1, final String str2, final boolean nullIsLess) { if (str1 == str2) { return 0; } if (str1 == null) { return nullIsLess ? -1 : 1; } if (str2 == null) { return nullIsLess ? 1 : - 1; } ...
[ "public", "static", "int", "compareIgnoreCase", "(", "final", "String", "str1", ",", "final", "String", "str2", ",", "final", "boolean", "nullIsLess", ")", "{", "if", "(", "str1", "==", "str2", ")", "{", "return", "0", ";", "}", "if", "(", "str1", "=="...
<p>Compare two Strings lexicographically, ignoring case differences, as per {@link String#compareToIgnoreCase(String)}, returning :</p> <ul> <li>{@code int = 0}, if {@code str1} is equal to {@code str2} (or both {@code null})</li> <li>{@code int < 0}, if {@code str1} is less than {@code str2}</li> <li>{@code int > 0}, ...
[ "<p", ">", "Compare", "two", "Strings", "lexicographically", "ignoring", "case", "differences", "as", "per", "{", "@link", "String#compareToIgnoreCase", "(", "String", ")", "}", "returning", ":", "<", "/", "p", ">", "<ul", ">", "<li", ">", "{", "@code", "i...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L1211-L1222
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipAssert.java
SipAssert.assertHeaderNotContains
public static void assertHeaderNotContains(SipMessage sipMessage, String header, String value) { """ Asserts that the given SIP message contains no occurrence of the specified header with the value given, or that there is no occurrence of the header in the message. The assertion fails if any occurrence of the he...
java
public static void assertHeaderNotContains(SipMessage sipMessage, String header, String value) { assertHeaderNotContains(null, sipMessage, header, value); }
[ "public", "static", "void", "assertHeaderNotContains", "(", "SipMessage", "sipMessage", ",", "String", "header", ",", "String", "value", ")", "{", "assertHeaderNotContains", "(", "null", ",", "sipMessage", ",", "header", ",", "value", ")", ";", "}" ]
Asserts that the given SIP message contains no occurrence of the specified header with the value given, or that there is no occurrence of the header in the message. The assertion fails if any occurrence of the header contains the value. @param sipMessage the SIP message. @param header the string identifying the header...
[ "Asserts", "that", "the", "given", "SIP", "message", "contains", "no", "occurrence", "of", "the", "specified", "header", "with", "the", "value", "given", "or", "that", "there", "is", "no", "occurrence", "of", "the", "header", "in", "the", "message", ".", "...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipAssert.java#L207-L209
teknux-org/jetty-bootstrap
jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java
JettyBootstrap.addExplodedWarAppFromClasspath
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor) throws JettyBootstrapException { """ Add an exploded (not packaged) War application from the current classpath, on the default context path {@value #CONTEXT_PATH_ROOT} @param explodedWar the exploded war path @param des...
java
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor) throws JettyBootstrapException { return addExplodedWarAppFromClasspath(explodedWar, descriptor, CONTEXT_PATH_ROOT); }
[ "public", "WebAppContext", "addExplodedWarAppFromClasspath", "(", "String", "explodedWar", ",", "String", "descriptor", ")", "throws", "JettyBootstrapException", "{", "return", "addExplodedWarAppFromClasspath", "(", "explodedWar", ",", "descriptor", ",", "CONTEXT_PATH_ROOT", ...
Add an exploded (not packaged) War application from the current classpath, on the default context path {@value #CONTEXT_PATH_ROOT} @param explodedWar the exploded war path @param descriptor the web.xml descriptor path @return WebAppContext @throws JettyBootstrapException on failed
[ "Add", "an", "exploded", "(", "not", "packaged", ")", "War", "application", "from", "the", "current", "classpath", "on", "the", "default", "context", "path", "{", "@value", "#CONTEXT_PATH_ROOT", "}" ]
train
https://github.com/teknux-org/jetty-bootstrap/blob/c16e710b833084c650fce35aa8c1ccaf83cd93ef/jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java#L358-L360
unbescape/unbescape
src/main/java/org/unbescape/javascript/JavaScriptEscape.java
JavaScriptEscape.unescapeJavaScript
public static void unescapeJavaScript(final String text, final Writer writer) throws IOException { """ <p> Perform a JavaScript <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescap...
java
public static void unescapeJavaScript(final String text, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (text == null) { return; } if (text.indexOf('...
[ "public", "static", "void", "unescapeJavaScript", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writ...
<p> Perform a JavaScript <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> JavaScript unescape of SECs, x-based, u-based and octal escapes. </p> <p> ...
[ "<p", ">", "Perform", "a", "JavaScript", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/javascript/JavaScriptEscape.java#L992-L1009
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newUploadVideoRequest
public static Request newUploadVideoRequest(Session session, File file, Callback callback) throws FileNotFoundException { """ Creates a new Request configured to upload a photo to the user's default photo album. The photo will be read from the specified file descriptor. @param session the Session ...
java
public static Request newUploadVideoRequest(Session session, File file, Callback callback) throws FileNotFoundException { ParcelFileDescriptor descriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY); Bundle parameters = new Bundle(1); parameters.putParcelabl...
[ "public", "static", "Request", "newUploadVideoRequest", "(", "Session", "session", ",", "File", "file", ",", "Callback", "callback", ")", "throws", "FileNotFoundException", "{", "ParcelFileDescriptor", "descriptor", "=", "ParcelFileDescriptor", ".", "open", "(", "file...
Creates a new Request configured to upload a photo to the user's default photo album. The photo will be read from the specified file descriptor. @param session the Session to use, or null; if non-null, the session must be in an opened state @param file the file to upload @param callback a callback that will be ca...
[ "Creates", "a", "new", "Request", "configured", "to", "upload", "a", "photo", "to", "the", "user", "s", "default", "photo", "album", ".", "The", "photo", "will", "be", "read", "from", "the", "specified", "file", "descriptor", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L353-L360
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java
Tile.getBoundingBox
public BoundingBox getBoundingBox() { """ Gets the geographic extend of this Tile as a BoundingBox. @return boundaries of this tile. """ if (this.boundingBox == null) { double minLatitude = Math.max(MercatorProjection.LATITUDE_MIN, MercatorProjection.tileYToLatitude(tileY + 1, zoomLevel)...
java
public BoundingBox getBoundingBox() { if (this.boundingBox == null) { double minLatitude = Math.max(MercatorProjection.LATITUDE_MIN, MercatorProjection.tileYToLatitude(tileY + 1, zoomLevel)); double minLongitude = Math.max(-180, MercatorProjection.tileXToLongitude(this.tileX, zoomLevel))...
[ "public", "BoundingBox", "getBoundingBox", "(", ")", "{", "if", "(", "this", ".", "boundingBox", "==", "null", ")", "{", "double", "minLatitude", "=", "Math", ".", "max", "(", "MercatorProjection", ".", "LATITUDE_MIN", ",", "MercatorProjection", ".", "tileYToL...
Gets the geographic extend of this Tile as a BoundingBox. @return boundaries of this tile.
[ "Gets", "the", "geographic", "extend", "of", "this", "Tile", "as", "a", "BoundingBox", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java#L170-L183
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchema.java
JSchema.getAccessor
public int getAccessor(String name) { """ Resolve a symbolic name to an accessor @param name the symbolic name to resolve. We use a simple, vaguely XPath-like, syntax: <xmp> Name ::= [ Segment ] ( '/' Segment )* Segment ::= SimpleName | '[' NonNegInt ']' SimpleName ::= ... anything acceptable as XML NCN...
java
public int getAccessor(String name) { if (name == null) name = ""; StringTokenizer path = new StringTokenizer(name, "/"); JMFType pos = getEffectiveType(jsTypeTree); while (pos != null && path.hasMoreTokens()) pos = findChild(getEffectiveType(pos), path.nextToken()); if (pos instanceof J...
[ "public", "int", "getAccessor", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "name", "=", "\"\"", ";", "StringTokenizer", "path", "=", "new", "StringTokenizer", "(", "name", ",", "\"/\"", ")", ";", "JMFType", "pos", "=", "getE...
Resolve a symbolic name to an accessor @param name the symbolic name to resolve. We use a simple, vaguely XPath-like, syntax: <xmp> Name ::= [ Segment ] ( '/' Segment )* Segment ::= SimpleName | '[' NonNegInt ']' SimpleName ::= ... anything acceptable as XML NCName ... </xmp> <p>The starting context for resolution ...
[ "Resolve", "a", "symbolic", "name", "to", "an", "accessor" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchema.java#L354-L367
JM-Lab/utils-java8
src/main/java/kr/jm/utils/JMWordSplitter.java
JMWordSplitter.splitAsList
public static List<String> splitAsList(Pattern splitPattern, String text) { """ Split as list list. @param splitPattern the split pattern @param text the text @return the list """ return splitAsStream(splitPattern, text).collect(toList()); }
java
public static List<String> splitAsList(Pattern splitPattern, String text) { return splitAsStream(splitPattern, text).collect(toList()); }
[ "public", "static", "List", "<", "String", ">", "splitAsList", "(", "Pattern", "splitPattern", ",", "String", "text", ")", "{", "return", "splitAsStream", "(", "splitPattern", ",", "text", ")", ".", "collect", "(", "toList", "(", ")", ")", ";", "}" ]
Split as list list. @param splitPattern the split pattern @param text the text @return the list
[ "Split", "as", "list", "list", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/JMWordSplitter.java#L38-L40
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.obtainAccessToken
@Sensitive public Map<String, Object> obtainAccessToken(SocialLoginConfig config, String requestToken, String verifierOrPinValue) { """ Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_ACCESS_TOKEN} endpoint in order to obtain an access token. The request is authorized for the consumer key set by the cla...
java
@Sensitive public Map<String, Object> obtainAccessToken(SocialLoginConfig config, String requestToken, String verifierOrPinValue) { String endpointUrl = config.getTokenEndpoint(); try { SocialUtil.validateEndpointWithQuery(endpointUrl); } catch (SocialLoginException e) { ...
[ "@", "Sensitive", "public", "Map", "<", "String", ",", "Object", ">", "obtainAccessToken", "(", "SocialLoginConfig", "config", ",", "String", "requestToken", ",", "String", "verifierOrPinValue", ")", "{", "String", "endpointUrl", "=", "config", ".", "getTokenEndpo...
Invokes the {@value TwitterConstants#TWITTER_ENDPOINT_ACCESS_TOKEN} endpoint in order to obtain an access token. The request is authorized for the consumer key set by the class and the previously obtained request token. The appropriate consumer key must be set before invoking this method in order to obtain an access to...
[ "Invokes", "the", "{", "@value", "TwitterConstants#TWITTER_ENDPOINT_ACCESS_TOKEN", "}", "endpoint", "in", "order", "to", "obtain", "an", "access", "token", ".", "The", "request", "is", "authorized", "for", "the", "consumer", "key", "set", "by", "the", "class", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L945-L962
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java
CsvFiles.getCsvDataMap
public static Map<String, String> getCsvDataMap(String fileName, boolean headerPresent) throws IOException { """ Returns a {@code Map<String, String>} mapping of the first column to the second column. This method also ignores all columns other than the first two. @param fileName the CSV file to load @p...
java
public static Map<String, String> getCsvDataMap(String fileName, boolean headerPresent) throws IOException { return getCsvDataMap(fileName, 0, 1, headerPresent); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "getCsvDataMap", "(", "String", "fileName", ",", "boolean", "headerPresent", ")", "throws", "IOException", "{", "return", "getCsvDataMap", "(", "fileName", ",", "0", ",", "1", ",", "headerPresent", ...
Returns a {@code Map<String, String>} mapping of the first column to the second column. This method also ignores all columns other than the first two. @param fileName the CSV file to load @param headerPresent {@code true} if the fist line is the header @return a {@code Map<String, String>} mapping of the first to the ...
[ "Returns", "a", "{", "@code", "Map<String", "String", ">", "}", "mapping", "of", "the", "first", "column", "to", "the", "second", "column", ".", "This", "method", "also", "ignores", "all", "columns", "other", "than", "the", "first", "two", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java#L79-L82
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetRollingUpgradesInner.java
VirtualMachineScaleSetRollingUpgradesInner.beginCancelAsync
public Observable<OperationStatusResponseInner> beginCancelAsync(String resourceGroupName, String vmScaleSetName) { """ Cancels the current virtual machine scale set rolling upgrade. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArg...
java
public Observable<OperationStatusResponseInner> beginCancelAsync(String resourceGroupName, String vmScaleSetName) { return beginCancelWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "beginCancelAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "beginCancelWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", ...
Cancels the current virtual machine scale set rolling upgrade. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationStatusResponseInner object
[ "Cancels", "the", "current", "virtual", "machine", "scale", "set", "rolling", "upgrade", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetRollingUpgradesInner.java#L181-L188
google/closure-compiler
src/com/google/javascript/jscomp/PeepholeReplaceKnownMethods.java
PeepholeReplaceKnownMethods.tryFoldKnownNumericMethods
private Node tryFoldKnownNumericMethods(Node subtree, Node callTarget) { """ Try to evaluate known Numeric methods parseInt(), parseFloat() """ checkArgument(subtree.isCall()); if (isASTNormalized()) { // check if this is a call on a string method // then dispatch to specific folding meth...
java
private Node tryFoldKnownNumericMethods(Node subtree, Node callTarget) { checkArgument(subtree.isCall()); if (isASTNormalized()) { // check if this is a call on a string method // then dispatch to specific folding method. String functionNameString = callTarget.getString(); Node firstArg...
[ "private", "Node", "tryFoldKnownNumericMethods", "(", "Node", "subtree", ",", "Node", "callTarget", ")", "{", "checkArgument", "(", "subtree", ".", "isCall", "(", ")", ")", ";", "if", "(", "isASTNormalized", "(", ")", ")", "{", "// check if this is a call on a s...
Try to evaluate known Numeric methods parseInt(), parseFloat()
[ "Try", "to", "evaluate", "known", "Numeric", "methods", "parseInt", "()", "parseFloat", "()" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PeepholeReplaceKnownMethods.java#L284-L298
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/CrateDigger.java
CrateDigger.findTrackAnalysis
private RekordboxAnlz findTrackAnalysis(DataReference track, Database database) { """ Find the analysis file for the specified track, downloading it from the player if we have not already done so. Be sure to call {@code _io().close()} when you are done using the returned struct. @param track the track whose an...
java
private RekordboxAnlz findTrackAnalysis(DataReference track, Database database) { File file = null; try { RekordboxPdb.TrackRow trackRow = database.trackIndex.get((long) track.rekordboxId); if (trackRow != null) { file = new File(downloadDirectory, slotPrefix(trac...
[ "private", "RekordboxAnlz", "findTrackAnalysis", "(", "DataReference", "track", ",", "Database", "database", ")", "{", "File", "file", "=", "null", ";", "try", "{", "RekordboxPdb", ".", "TrackRow", "trackRow", "=", "database", ".", "trackIndex", ".", "get", "(...
Find the analysis file for the specified track, downloading it from the player if we have not already done so. Be sure to call {@code _io().close()} when you are done using the returned struct. @param track the track whose analysis file is desired @param database the parsed database export from which the analysis path...
[ "Find", "the", "analysis", "file", "for", "the", "specified", "track", "downloading", "it", "from", "the", "player", "if", "we", "have", "not", "already", "done", "so", ".", "Be", "sure", "to", "call", "{", "@code", "_io", "()", ".", "close", "()", "}"...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/CrateDigger.java#L366-L397
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java
AsyncMutateInBuilder.upsert
public <T> AsyncMutateInBuilder upsert(String path, T fragment) { """ Insert a fragment, replacing the old value if the path exists. @param path the path where to insert (or replace) a dictionary value. @param fragment the new dictionary value to be applied. """ if (StringUtil.isNullOrEmpty(path)) ...
java
public <T> AsyncMutateInBuilder upsert(String path, T fragment) { if (StringUtil.isNullOrEmpty(path)) { throw new IllegalArgumentException("Path must not be empty for upsert"); } this.mutationSpecs.add(new MutationSpec(Mutation.DICT_UPSERT, path, fragment)); return this; ...
[ "public", "<", "T", ">", "AsyncMutateInBuilder", "upsert", "(", "String", "path", ",", "T", "fragment", ")", "{", "if", "(", "StringUtil", ".", "isNullOrEmpty", "(", "path", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Path must not be em...
Insert a fragment, replacing the old value if the path exists. @param path the path where to insert (or replace) a dictionary value. @param fragment the new dictionary value to be applied.
[ "Insert", "a", "fragment", "replacing", "the", "old", "value", "if", "the", "path", "exists", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java#L734-L740
facebookarchive/hadoop-20
src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/ShellParser.java
ShellParser.findPattern
protected String findPattern(String strPattern, String text, int grp) { """ Find the first occurence ofa pattern in a piece of text and return a specific group. @param strPattern the regular expression to match @param text the text to search @param grp the number of the matching group to return @return a ...
java
protected String findPattern(String strPattern, String text, int grp) { Pattern pattern = Pattern.compile(strPattern, Pattern.MULTILINE); Matcher matcher = pattern.matcher(text); if (matcher.find(0)) return matcher.group(grp); return null; }
[ "protected", "String", "findPattern", "(", "String", "strPattern", ",", "String", "text", ",", "int", "grp", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "strPattern", ",", "Pattern", ".", "MULTILINE", ")", ";", "Matcher", "matcher", ...
Find the first occurence ofa pattern in a piece of text and return a specific group. @param strPattern the regular expression to match @param text the text to search @param grp the number of the matching group to return @return a String containing the matched group of the regular expression
[ "Find", "the", "first", "occurence", "ofa", "pattern", "in", "a", "piece", "of", "text", "and", "return", "a", "specific", "group", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/ShellParser.java#L47-L56
wigforss/Ka-Web
servlet/src/main/java/org/kasource/web/servlet/listener/properties/SystemPropertiesSetter.java
SystemPropertiesSetter.getStreamForLocation
private InputStream getStreamForLocation(final String location, final ServletContext context) throws FileNotFoundException { """ Returns the InputStream to the supplied file location @param location File location, may contain file:, classpath: or war: prefix. If no prefix is used war location is assumed. @par...
java
private InputStream getStreamForLocation(final String location, final ServletContext context) throws FileNotFoundException { String fileLocation = StringUtils.replaceVariables(location, new HashMap<String, Object>(), true); if (fileLocation.startsWith(PREFIX_FILE)) { return new FileIn...
[ "private", "InputStream", "getStreamForLocation", "(", "final", "String", "location", ",", "final", "ServletContext", "context", ")", "throws", "FileNotFoundException", "{", "String", "fileLocation", "=", "StringUtils", ".", "replaceVariables", "(", "location", ",", "...
Returns the InputStream to the supplied file location @param location File location, may contain file:, classpath: or war: prefix. If no prefix is used war location is assumed. @param context Servlet Context to read war resources from. @throws FileNotFoundException If a file resource could not be found.
[ "Returns", "the", "InputStream", "to", "the", "supplied", "file", "location" ]
train
https://github.com/wigforss/Ka-Web/blob/bb6d8eacbefdeb7c8c6bb6135e55939d968fa433/servlet/src/main/java/org/kasource/web/servlet/listener/properties/SystemPropertiesSetter.java#L141-L153
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/runtime/Micronaut.java
Micronaut.mapError
public <T extends Throwable> Micronaut mapError(Class<T> exception, Function<T, Integer> mapper) { """ Maps an exception to the given error code. @param exception The exception @param mapper The mapper @param <T> The exception type @return This application """ this.exitHandlers.put(excep...
java
public <T extends Throwable> Micronaut mapError(Class<T> exception, Function<T, Integer> mapper) { this.exitHandlers.put(exception, (Function<Throwable, Integer>) mapper); return this; }
[ "public", "<", "T", "extends", "Throwable", ">", "Micronaut", "mapError", "(", "Class", "<", "T", ">", "exception", ",", "Function", "<", "T", ",", "Integer", ">", "mapper", ")", "{", "this", ".", "exitHandlers", ".", "put", "(", "exception", ",", "(",...
Maps an exception to the given error code. @param exception The exception @param mapper The mapper @param <T> The exception type @return This application
[ "Maps", "an", "exception", "to", "the", "given", "error", "code", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/runtime/Micronaut.java#L241-L244
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java
BigtableInstanceAdminClient.deleteCluster
@SuppressWarnings("WeakerAccess") public void deleteCluster(String instanceId, String clusterId) { """ Deletes the specified cluster. Please note that an instance must have at least 1 cluster. To remove the last cluster, please use {@link BigtableInstanceAdminClient#deleteInstance(String)}. <p>Sample code: ...
java
@SuppressWarnings("WeakerAccess") public void deleteCluster(String instanceId, String clusterId) { ApiExceptions.callAndTranslateApiException(deleteClusterAsync(instanceId, clusterId)); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "deleteCluster", "(", "String", "instanceId", ",", "String", "clusterId", ")", "{", "ApiExceptions", ".", "callAndTranslateApiException", "(", "deleteClusterAsync", "(", "instanceId", ",", "clust...
Deletes the specified cluster. Please note that an instance must have at least 1 cluster. To remove the last cluster, please use {@link BigtableInstanceAdminClient#deleteInstance(String)}. <p>Sample code: <pre>{@code client.deleteCluster("my-instance", "my-cluster"); }</pre>
[ "Deletes", "the", "specified", "cluster", ".", "Please", "note", "that", "an", "instance", "must", "have", "at", "least", "1", "cluster", ".", "To", "remove", "the", "last", "cluster", "please", "use", "{", "@link", "BigtableInstanceAdminClient#deleteInstance", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClient.java#L751-L754
icode/ameba
src/main/java/ameba/db/ebean/internal/ModelInterceptor.java
ModelInterceptor.applyUriQuery
@SuppressWarnings("unchecked") public static FutureRowCount applyUriQuery(MultivaluedMap<String, String> queryParams, SpiQuery query, InjectionManager manager, boolean needPageList) { """ apply uri query parameter on ...
java
@SuppressWarnings("unchecked") public static FutureRowCount applyUriQuery(MultivaluedMap<String, String> queryParams, SpiQuery query, InjectionManager manager, boolean needPageList) { Set<String> inv = query.valida...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "FutureRowCount", "applyUriQuery", "(", "MultivaluedMap", "<", "String", ",", "String", ">", "queryParams", ",", "SpiQuery", "query", ",", "InjectionManager", "manager", ",", "boolean", "needPag...
apply uri query parameter on query @param queryParams uri query params @param query Query @param needPageList need page list @param manager a {@link InjectionManager} object. @return page list count or null @see #applyFetchProperties @see #applyFilter @see #applyOrderBy @see #applyPageList
[ "apply", "uri", "query", "parameter", "on", "query" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/internal/ModelInterceptor.java#L349-L367
h2oai/h2o-3
h2o-core/src/main/java/water/parser/CharSkippingBufferedString.java
CharSkippingBufferedString.toBufferedString
public BufferedString toBufferedString() { """ Converts the current window into byte buffer to a {@link BufferedString}. The resulting new instance of {@link BufferedString} is backed by a newly allocated byte[] buffer sized exactly to fit the desired string represented by current buffer window, excluding the sk...
java
public BufferedString toBufferedString() { if (_skipped.length == 0) return _bufferedString; byte[] buf = MemoryManager.malloc1(_bufferedString._len - _skipped.length); // Length of the buffer window minus skipped chars int copyStart = _bufferedString._off; int target = 0; ...
[ "public", "BufferedString", "toBufferedString", "(", ")", "{", "if", "(", "_skipped", ".", "length", "==", "0", ")", "return", "_bufferedString", ";", "byte", "[", "]", "buf", "=", "MemoryManager", ".", "malloc1", "(", "_bufferedString", ".", "_len", "-", ...
Converts the current window into byte buffer to a {@link BufferedString}. The resulting new instance of {@link BufferedString} is backed by a newly allocated byte[] buffer sized exactly to fit the desired string represented by current buffer window, excluding the skipped characters. @return An instance of {@link Buffe...
[ "Converts", "the", "current", "window", "into", "byte", "buffer", "to", "a", "{", "@link", "BufferedString", "}", ".", "The", "resulting", "new", "instance", "of", "{", "@link", "BufferedString", "}", "is", "backed", "by", "a", "newly", "allocated", "byte", ...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/CharSkippingBufferedString.java#L87-L108
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toGUId
public static Object toGUId(Object o, Object defaultValue) { """ cast a Object to a GUID @param o Object to cast @param defaultValue @return casted Query Object """ String str = toString(o, null); if (str == null) return defaultValue; if (!Decision.isGUId(str)) return defaultValue; return str; }
java
public static Object toGUId(Object o, Object defaultValue) { String str = toString(o, null); if (str == null) return defaultValue; if (!Decision.isGUId(str)) return defaultValue; return str; }
[ "public", "static", "Object", "toGUId", "(", "Object", "o", ",", "Object", "defaultValue", ")", "{", "String", "str", "=", "toString", "(", "o", ",", "null", ")", ";", "if", "(", "str", "==", "null", ")", "return", "defaultValue", ";", "if", "(", "!"...
cast a Object to a GUID @param o Object to cast @param defaultValue @return casted Query Object
[ "cast", "a", "Object", "to", "a", "GUID" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L3137-L3143
NessComputing/components-ness-jms
src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java
JmsRunnableFactory.createTopicTextMessageListener
public TopicConsumer createTopicTextMessageListener(final String topic, final ConsumerCallback<String> messageCallback) { """ Creates a new {@link TopicConsumer}. For every text message received, the callback is invoked with the contents of the text message as string. """ Preconditions.checkState(conn...
java
public TopicConsumer createTopicTextMessageListener(final String topic, final ConsumerCallback<String> messageCallback) { Preconditions.checkState(connectionFactory != null, "connection factory was never injected!"); return new TopicConsumer(connectionFactory, jmsConfig, topic, new TextMessageConsum...
[ "public", "TopicConsumer", "createTopicTextMessageListener", "(", "final", "String", "topic", ",", "final", "ConsumerCallback", "<", "String", ">", "messageCallback", ")", "{", "Preconditions", ".", "checkState", "(", "connectionFactory", "!=", "null", ",", "\"connect...
Creates a new {@link TopicConsumer}. For every text message received, the callback is invoked with the contents of the text message as string.
[ "Creates", "a", "new", "{" ]
train
https://github.com/NessComputing/components-ness-jms/blob/29e0d320ada3a1a375483437a9f3ff629822b714/src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java#L144-L148
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java
OptimizerNode.setBroadcastInputs
public void setBroadcastInputs(Map<Operator<?>, OptimizerNode> operatorToNode, ExecutionMode defaultExchangeMode) { """ This function connects the operators that produce the broadcast inputs to this operator. @param operatorToNode The map from program operators to optimizer nodes. @param defaultExchangeMode Th...
java
public void setBroadcastInputs(Map<Operator<?>, OptimizerNode> operatorToNode, ExecutionMode defaultExchangeMode) { // skip for Operators that don't support broadcast variables if (!(getOperator() instanceof AbstractUdfOperator<?, ?>)) { return; } // get all broadcast inputs AbstractUdfOperator<?, ?> ope...
[ "public", "void", "setBroadcastInputs", "(", "Map", "<", "Operator", "<", "?", ">", ",", "OptimizerNode", ">", "operatorToNode", ",", "ExecutionMode", "defaultExchangeMode", ")", "{", "// skip for Operators that don't support broadcast variables ", "if", "(", "!", "(", ...
This function connects the operators that produce the broadcast inputs to this operator. @param operatorToNode The map from program operators to optimizer nodes. @param defaultExchangeMode The data exchange mode to use, if the operator does not specify one. @throws CompilerException
[ "This", "function", "connects", "the", "operators", "that", "produce", "the", "broadcast", "inputs", "to", "this", "operator", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java#L177-L194
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectHeight
public int getObjectHeight(int groupID, int objectID) { """ Returns the height of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The height of an object, or -1, when error occurred """ if (groupID >= 0 && groupID < objectGroups.size...
java
public int getObjectHeight(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); return object.h...
[ "public", "int", "getObjectHeight", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "ob...
Returns the height of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The height of an object, or -1, when error occurred
[ "Returns", "the", "height", "of", "a", "specific", "object", "from", "a", "specific", "group", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L906-L915
aoindustries/aocode-public
src/main/java/com/aoindustries/util/i18n/ModifiableResourceBundle.java
ModifiableResourceBundle.setObject
public final void setObject(String key, Object value, boolean modified) { """ Adds or updates the value associated with the provided key and sets the verified time to the current time. If <code>modified</code> is <code>true</code>, the modified time will also be updated, which will cause other locales to requi...
java
public final void setObject(String key, Object value, boolean modified) { if(!isModifiable()) throw new AssertionError("ResourceBundle is not modifiable: "+this); handleSetObject(key, value, modified); }
[ "public", "final", "void", "setObject", "(", "String", "key", ",", "Object", "value", ",", "boolean", "modified", ")", "{", "if", "(", "!", "isModifiable", "(", ")", ")", "throw", "new", "AssertionError", "(", "\"ResourceBundle is not modifiable: \"", "+", "th...
Adds or updates the value associated with the provided key and sets the verified time to the current time. If <code>modified</code> is <code>true</code>, the modified time will also be updated, which will cause other locales to require verification.
[ "Adds", "or", "updates", "the", "value", "associated", "with", "the", "provided", "key", "and", "sets", "the", "verified", "time", "to", "the", "current", "time", ".", "If", "<code", ">", "modified<", "/", "code", ">", "is", "<code", ">", "true<", "/", ...
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/util/i18n/ModifiableResourceBundle.java#L75-L78
phax/ph-commons
ph-datetime/src/main/java/com/helger/datetime/util/PDTHelper.java
PDTHelper.birthdayEquals
public static boolean birthdayEquals (@Nullable final LocalDate aDate1, @Nullable final LocalDate aDate2) { """ Check if the two birthdays are equal. Equal birthdays are identified by equal months and equal days. @param aDate1 First date. May be <code>null</code>. @param aDate2 Second date. May be <code>nul...
java
public static boolean birthdayEquals (@Nullable final LocalDate aDate1, @Nullable final LocalDate aDate2) { return birthdayCompare (aDate1, aDate2) == 0; }
[ "public", "static", "boolean", "birthdayEquals", "(", "@", "Nullable", "final", "LocalDate", "aDate1", ",", "@", "Nullable", "final", "LocalDate", "aDate2", ")", "{", "return", "birthdayCompare", "(", "aDate1", ",", "aDate2", ")", "==", "0", ";", "}" ]
Check if the two birthdays are equal. Equal birthdays are identified by equal months and equal days. @param aDate1 First date. May be <code>null</code>. @param aDate2 Second date. May be <code>null</code>. @return <code>true</code> if month and day are equal
[ "Check", "if", "the", "two", "birthdays", "are", "equal", ".", "Equal", "birthdays", "are", "identified", "by", "equal", "months", "and", "equal", "days", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-datetime/src/main/java/com/helger/datetime/util/PDTHelper.java#L310-L313
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.fetchByUUID_G
@Override public CommerceWishList fetchByUUID_G(String uuid, long groupId) { """ Returns the commerce wish list where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching commerce w...
java
@Override public CommerceWishList fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CommerceWishList", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the commerce wish list where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching commerce wish list, or <code>null</code> if a matching commerce wish list could not be found
[ "Returns", "the", "commerce", "wish", "list", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "c...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L703-L706
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/common/base/Preconditions.java
Preconditions.checkNotBlank
public static String checkNotBlank(String str, String message) { """ Checks that the given string is not blank and throws a customized {@link NullPointerException} if it is {@code null}, and a customized {@link IllegalArgumentException} if it is empty or whitespace. Intended for doing parameter validation in me...
java
public static String checkNotBlank(String str, String message) { checkNotNull(str, message); checkArgument(Strings.isNotBlank(str), message); return str; }
[ "public", "static", "String", "checkNotBlank", "(", "String", "str", ",", "String", "message", ")", "{", "checkNotNull", "(", "str", ",", "message", ")", ";", "checkArgument", "(", "Strings", ".", "isNotBlank", "(", "str", ")", ",", "message", ")", ";", ...
Checks that the given string is not blank and throws a customized {@link NullPointerException} if it is {@code null}, and a customized {@link IllegalArgumentException} if it is empty or whitespace. Intended for doing parameter validation in methods and constructors, e.g.: <blockquote><pre> public void foo(String text) ...
[ "Checks", "that", "the", "given", "string", "is", "not", "blank", "and", "throws", "a", "customized", "{", "@link", "NullPointerException", "}", "if", "it", "is", "{", "@code", "null", "}", "and", "a", "customized", "{", "@link", "IllegalArgumentException", ...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/common/base/Preconditions.java#L212-L216
keyboardsurfer/Crouton
library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java
Crouton.makeText
public static Crouton makeText(Activity activity, int textResourceId, Style style, ViewGroup viewGroup) { """ Creates a {@link Crouton} with provided text-resource and style for a given activity. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param textRe...
java
public static Crouton makeText(Activity activity, int textResourceId, Style style, ViewGroup viewGroup) { return makeText(activity, activity.getString(textResourceId), style, viewGroup); }
[ "public", "static", "Crouton", "makeText", "(", "Activity", "activity", ",", "int", "textResourceId", ",", "Style", "style", ",", "ViewGroup", "viewGroup", ")", "{", "return", "makeText", "(", "activity", ",", "activity", ".", "getString", "(", "textResourceId",...
Creates a {@link Crouton} with provided text-resource and style for a given activity. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param textResourceId The resource id of the text you want to display. @param style The style that this {@link Crouton} should be cre...
[ "Creates", "a", "{", "@link", "Crouton", "}", "with", "provided", "text", "-", "resource", "and", "style", "for", "a", "given", "activity", "." ]
train
https://github.com/keyboardsurfer/Crouton/blob/7806b15e4d52793e1f5aeaa4a55b1e220289e619/library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java#L270-L272
Azure/azure-sdk-for-java
recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/ExportJobsOperationResultsInner.java
ExportJobsOperationResultsInner.getAsync
public Observable<OperationResultInfoBaseResourceInner> getAsync(String vaultName, String resourceGroupName, String operationId) { """ Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also contains URL of a Blob and a SAS key to access the same. The blob ...
java
public Observable<OperationResultInfoBaseResourceInner> getAsync(String vaultName, String resourceGroupName, String operationId) { return getWithServiceResponseAsync(vaultName, resourceGroupName, operationId).map(new Func1<ServiceResponse<OperationResultInfoBaseResourceInner>, OperationResultInfoBaseResourceInn...
[ "public", "Observable", "<", "OperationResultInfoBaseResourceInner", ">", "getAsync", "(", "String", "vaultName", ",", "String", "resourceGroupName", ",", "String", "operationId", ")", "{", "return", "getWithServiceResponseAsync", "(", "vaultName", ",", "resourceGroupName...
Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized format. @param vaultName The name of the recovery services vault. @param resourceGroupName The na...
[ "Gets", "the", "operation", "result", "of", "operation", "triggered", "by", "Export", "Jobs", "API", ".", "If", "the", "operation", "is", "successful", "then", "it", "also", "contains", "URL", "of", "a", "Blob", "and", "a", "SAS", "key", "to", "access", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/ExportJobsOperationResultsInner.java#L98-L105
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeDao.java
PurgeDao.deleteNonRootComponentsInView
public void deleteNonRootComponentsInView(DbSession dbSession, Collection<ComponentDto> components) { """ Delete the non root components (ie. sub-view, application or project copy) from the specified collection of {@link ComponentDto} and data from their child tables. <p> This method has no effect when passed a...
java
public void deleteNonRootComponentsInView(DbSession dbSession, Collection<ComponentDto> components) { Set<ComponentDto> nonRootComponents = components.stream().filter(PurgeDao::isNotRoot).collect(MoreCollectors.toSet()); if (nonRootComponents.isEmpty()) { return; } PurgeProfiler profiler = new Pu...
[ "public", "void", "deleteNonRootComponentsInView", "(", "DbSession", "dbSession", ",", "Collection", "<", "ComponentDto", ">", "components", ")", "{", "Set", "<", "ComponentDto", ">", "nonRootComponents", "=", "components", ".", "stream", "(", ")", ".", "filter", ...
Delete the non root components (ie. sub-view, application or project copy) from the specified collection of {@link ComponentDto} and data from their child tables. <p> This method has no effect when passed an empty collection or only root components. </p>
[ "Delete", "the", "non", "root", "components", "(", "ie", ".", "sub", "-", "view", "application", "or", "project", "copy", ")", "from", "the", "specified", "collection", "of", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/purge/PurgeDao.java#L252-L261
alkacon/opencms-core
src-modules/org/opencms/workplace/list/A_CmsListDialog.java
A_CmsListDialog.getMetadata
public synchronized CmsListMetadata getMetadata(String listDialogName, String listId) { """ Should generate the metadata definition for the list, and return the corresponding <code>{@link CmsListMetadata}</code> object.<p> @param listDialogName the name of the class generating the list @param listId the id of...
java
public synchronized CmsListMetadata getMetadata(String listDialogName, String listId) { getSettings(); String metaDataKey = listDialogName + listId; if ((getMetadataCache().get(metaDataKey) == null) || getMetadataCache().get(metaDataKey).isVolatile()) { if (LOG.isDebugEnabled()) { ...
[ "public", "synchronized", "CmsListMetadata", "getMetadata", "(", "String", "listDialogName", ",", "String", "listId", ")", "{", "getSettings", "(", ")", ";", "String", "metaDataKey", "=", "listDialogName", "+", "listId", ";", "if", "(", "(", "getMetadataCache", ...
Should generate the metadata definition for the list, and return the corresponding <code>{@link CmsListMetadata}</code> object.<p> @param listDialogName the name of the class generating the list @param listId the id of the list @return The metadata for the given list
[ "Should", "generate", "the", "metadata", "definition", "for", "the", "list", "and", "return", "the", "corresponding", "<code", ">", "{", "@link", "CmsListMetadata", "}", "<", "/", "code", ">", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/list/A_CmsListDialog.java#L539-L563
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/GalleriesApi.java
GalleriesApi.editMeta
public Response editMeta(String galleryId, String title, String description) throws JinxException { """ Modify the meta-data for a gallery. <br> This method requires authentication with 'write' permission. @param galleryId Required. The gallery ID to update. @param title Required. The new title for t...
java
public Response editMeta(String galleryId, String title, String description) throws JinxException { JinxUtils.validateParams(galleryId, title); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.galleries.editMeta"); params.put("gallery_id", galleryId); params.put("title", ti...
[ "public", "Response", "editMeta", "(", "String", "galleryId", ",", "String", "title", ",", "String", "description", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "galleryId", ",", "title", ")", ";", "Map", "<", "String", ",", ...
Modify the meta-data for a gallery. <br> This method requires authentication with 'write' permission. @param galleryId Required. The gallery ID to update. @param title Required. The new title for the gallery. @param description Optional. The new description for the gallery. @return object with response from Fl...
[ "Modify", "the", "meta", "-", "data", "for", "a", "gallery", ".", "<br", ">", "This", "method", "requires", "authentication", "with", "write", "permission", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/GalleriesApi.java#L112-L122
BlueBrain/bluima
modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java
diff_match_patch.match_bitapScore
@SuppressWarnings("unused") private static double match_bitapScore(int e, int x, int loc, String pattern) { """ Compute and return the score for a match with e errors and x location. @param e Number of errors in match. @param x Location of match. @param loc Expected location of match. @param pattern ...
java
@SuppressWarnings("unused") private static double match_bitapScore(int e, int x, int loc, String pattern) { float accuracy = (float) e / pattern.length(); int proximity = Math.abs(loc - x); if (Match_Distance == 0) { // Dodge divide by zero error. return proximity == ...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "private", "static", "double", "match_bitapScore", "(", "int", "e", ",", "int", "x", ",", "int", "loc", ",", "String", "pattern", ")", "{", "float", "accuracy", "=", "(", "float", ")", "e", "/", "pattern",...
Compute and return the score for a match with e errors and x location. @param e Number of errors in match. @param x Location of match. @param loc Expected location of match. @param pattern Pattern being sought. @return Overall score for match (0.0 = good, 1.0 = bad).
[ "Compute", "and", "return", "the", "score", "for", "a", "match", "with", "e", "errors", "and", "x", "location", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java#L1832-L1841
google/closure-compiler
src/com/google/javascript/jscomp/Es6ToEs3Util.java
Es6ToEs3Util.arrayFromIterable
static Node arrayFromIterable(AbstractCompiler compiler, Node iterable) { """ Returns a call to $jscomp.arrayFromIterable with {@code iterable} as its argument. """ JSTypeRegistry registry = compiler.getTypeRegistry(); JSType arrayType = registry.getNativeType(JSTypeNative.ARRAY_TYPE); Node call =...
java
static Node arrayFromIterable(AbstractCompiler compiler, Node iterable) { JSTypeRegistry registry = compiler.getTypeRegistry(); JSType arrayType = registry.getNativeType(JSTypeNative.ARRAY_TYPE); Node call = callEs6RuntimeFunction(compiler, iterable, "arrayFromIterable").setJSType(arrayType); c...
[ "static", "Node", "arrayFromIterable", "(", "AbstractCompiler", "compiler", ",", "Node", "iterable", ")", "{", "JSTypeRegistry", "registry", "=", "compiler", ".", "getTypeRegistry", "(", ")", ";", "JSType", "arrayType", "=", "registry", ".", "getNativeType", "(", ...
Returns a call to $jscomp.arrayFromIterable with {@code iterable} as its argument.
[ "Returns", "a", "call", "to", "$jscomp", ".", "arrayFromIterable", "with", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6ToEs3Util.java#L74-L82
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/util/LogUtils.java
LogUtils.createLog
public static PrintWriter createLog(File logDir, String callpath) throws Exception { """ Creates a Writer used to write test results to the log.xml file. @param logDir The directory containing the test session results. @param callpath A test session identifier. @return A PrintWriter object, or ...
java
public static PrintWriter createLog(File logDir, String callpath) throws Exception { if (logDir != null) { File dir = new File(logDir, callpath); String path=logDir.toString() + "/" + callpath.split("/")[0]; System.setProperty("PATH", path); dir....
[ "public", "static", "PrintWriter", "createLog", "(", "File", "logDir", ",", "String", "callpath", ")", "throws", "Exception", "{", "if", "(", "logDir", "!=", "null", ")", "{", "File", "dir", "=", "new", "File", "(", "logDir", ",", "callpath", ")", ";", ...
Creates a Writer used to write test results to the log.xml file. @param logDir The directory containing the test session results. @param callpath A test session identifier. @return A PrintWriter object, or {@code null} if one could not be created. @throws Exception
[ "Creates", "a", "Writer", "used", "to", "write", "test", "results", "to", "the", "log", ".", "xml", "file", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/util/LogUtils.java#L70-L84
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
SipManagerDelegate.createDerivedSipSession
protected MobicentsSipSession createDerivedSipSession(MobicentsSipSession parentSipSession, SipSessionKey sessionKey) { """ clone the parent sip session given in parameter except its attributes (they will be shared) and add it to the internal map of derived sessions identifying it by its ToTag @param parentSip...
java
protected MobicentsSipSession createDerivedSipSession(MobicentsSipSession parentSipSession, SipSessionKey sessionKey) { // clone the session and add it to the map of derived sessions MobicentsSipSession sipSessionImpl = getNewMobicentsSipSession(sessionKey, sipFactoryImpl, parentSipSession.getSipApplicationSession(...
[ "protected", "MobicentsSipSession", "createDerivedSipSession", "(", "MobicentsSipSession", "parentSipSession", ",", "SipSessionKey", "sessionKey", ")", "{", "// clone the session and add it to the map of derived sessions", "MobicentsSipSession", "sipSessionImpl", "=", "getNewMobicentsS...
clone the parent sip session given in parameter except its attributes (they will be shared) and add it to the internal map of derived sessions identifying it by its ToTag @param parentSipSession the parent sip session holding the newly created derived session @param sessionKey the key of the new derived session to cre...
[ "clone", "the", "parent", "sip", "session", "given", "in", "parameter", "except", "its", "attributes", "(", "they", "will", "be", "shared", ")", "and", "add", "it", "to", "the", "internal", "map", "of", "derived", "sessions", "identifying", "it", "by", "it...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java#L417-L455
meertensinstituut/mtas
src/main/java/mtas/codec/tree/MtasTree.java
MtasTree.addIdFromDoc
final public void addIdFromDoc(Integer docId, Long reference) { """ Adds the id from doc. @param docId the doc id @param reference the reference """ if (!closed && (docId != null)) { addSinglePoint(docId, 0, 0, docId, reference); } }
java
final public void addIdFromDoc(Integer docId, Long reference) { if (!closed && (docId != null)) { addSinglePoint(docId, 0, 0, docId, reference); } }
[ "final", "public", "void", "addIdFromDoc", "(", "Integer", "docId", ",", "Long", "reference", ")", "{", "if", "(", "!", "closed", "&&", "(", "docId", "!=", "null", ")", ")", "{", "addSinglePoint", "(", "docId", ",", "0", ",", "0", ",", "docId", ",", ...
Adds the id from doc. @param docId the doc id @param reference the reference
[ "Adds", "the", "id", "from", "doc", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/tree/MtasTree.java#L55-L59
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/userdata/UserUploadManager.java
UserUploadManager.addUploadedFile
public void addUploadedFile (@Nonnull @Nonempty final String sFieldName, @Nonnull final TemporaryUserDataObject aUDO) { """ Add an uploaded file. Existing UDOs with the same field name are overwritten and the underlying file is deleted. By default an uploaded file is not confirmed and will be deleted when the se...
java
public void addUploadedFile (@Nonnull @Nonempty final String sFieldName, @Nonnull final TemporaryUserDataObject aUDO) { ValueEnforcer.notEmpty (sFieldName, "FieldName"); ValueEnforcer.notNull (aUDO, "UDO"); m_aRWLock.writeLocked ( () -> { // Remove an eventually existing old UDO with the same filen...
[ "public", "void", "addUploadedFile", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sFieldName", ",", "@", "Nonnull", "final", "TemporaryUserDataObject", "aUDO", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sFieldName", ",", "\"FieldName\"", ")", ...
Add an uploaded file. Existing UDOs with the same field name are overwritten and the underlying file is deleted. By default an uploaded file is not confirmed and will be deleted when the session expires. By confirming the uploaded image it is safe for later reuse. @param sFieldName The ID of the uploaded file. May nei...
[ "Add", "an", "uploaded", "file", ".", "Existing", "UDOs", "with", "the", "same", "field", "name", "are", "overwritten", "and", "the", "underlying", "file", "is", "deleted", ".", "By", "default", "an", "uploaded", "file", "is", "not", "confirmed", "and", "w...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/userdata/UserUploadManager.java#L103-L118
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java
ServerOperations.createOperation
public static ModelNode createOperation(final String operation, final ModelNode address, final boolean recursive) { """ Creates an operation. @param operation the operation name @param address the address for the operation @param recursive whether the operation is recursive or not @return the operation ...
java
public static ModelNode createOperation(final String operation, final ModelNode address, final boolean recursive) { final ModelNode op = createOperation(operation, address); op.get(RECURSIVE).set(recursive); return op; }
[ "public", "static", "ModelNode", "createOperation", "(", "final", "String", "operation", ",", "final", "ModelNode", "address", ",", "final", "boolean", "recursive", ")", "{", "final", "ModelNode", "op", "=", "createOperation", "(", "operation", ",", "address", "...
Creates an operation. @param operation the operation name @param address the address for the operation @param recursive whether the operation is recursive or not @return the operation @throws IllegalArgumentException if the address is not of type {@link ModelType#LIST}
[ "Creates", "an", "operation", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L154-L158
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/cluster/PeerEurekaNode.java
PeerEurekaNode.syncInstancesIfTimestampDiffers
private void syncInstancesIfTimestampDiffers(String appName, String id, InstanceInfo info, InstanceInfo infoFromPeer) { """ Synchronize {@link InstanceInfo} information if the timestamp between this node and the peer eureka nodes vary. """ try { if (infoFromPeer != null) { ...
java
private void syncInstancesIfTimestampDiffers(String appName, String id, InstanceInfo info, InstanceInfo infoFromPeer) { try { if (infoFromPeer != null) { logger.warn("Peer wants us to take the instance information from it, since the timestamp differs," + "Id :...
[ "private", "void", "syncInstancesIfTimestampDiffers", "(", "String", "appName", ",", "String", "id", ",", "InstanceInfo", "info", ",", "InstanceInfo", "infoFromPeer", ")", "{", "try", "{", "if", "(", "infoFromPeer", "!=", "null", ")", "{", "logger", ".", "warn...
Synchronize {@link InstanceInfo} information if the timestamp between this node and the peer eureka nodes vary.
[ "Synchronize", "{" ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/cluster/PeerEurekaNode.java#L358-L373
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.removeEntryFromAuthCache
private void removeEntryFromAuthCache(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { """ Remove entries in the authentication cache @param req @param res @param config """ /* * TODO: we need to optimize this method... if the authCacheService.remove() metho...
java
private void removeEntryFromAuthCache(HttpServletRequest req, HttpServletResponse res, WebAppSecurityConfig config) { /* * TODO: we need to optimize this method... if the authCacheService.remove() method * return true for successfully removed the entry in the authentication cache, then we ...
[ "private", "void", "removeEntryFromAuthCache", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "WebAppSecurityConfig", "config", ")", "{", "/*\n * TODO: we need to optimize this method... if the authCacheService.remove() method\n * return true fo...
Remove entries in the authentication cache @param req @param res @param config
[ "Remove", "entries", "in", "the", "authentication", "cache" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L322-L330
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java
ParserPropertyHelper.isEmbeddedProperty
public boolean isEmbeddedProperty(String targetTypeName, List<String> namesWithoutAlias) { """ Checks if the path leads to an embedded property or association. @param targetTypeName the entity with the property @param namesWithoutAlias the path to the property with all the aliases resolved @return {@code true...
java
public boolean isEmbeddedProperty(String targetTypeName, List<String> namesWithoutAlias) { OgmEntityPersister persister = getPersister( targetTypeName ); Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) ); if ( propertyType.isComponentType() ) { // Embedded return true; } else i...
[ "public", "boolean", "isEmbeddedProperty", "(", "String", "targetTypeName", ",", "List", "<", "String", ">", "namesWithoutAlias", ")", "{", "OgmEntityPersister", "persister", "=", "getPersister", "(", "targetTypeName", ")", ";", "Type", "propertyType", "=", "persist...
Checks if the path leads to an embedded property or association. @param targetTypeName the entity with the property @param namesWithoutAlias the path to the property with all the aliases resolved @return {@code true} if the property is an embedded, {@code false} otherwise.
[ "Checks", "if", "the", "path", "leads", "to", "an", "embedded", "property", "or", "association", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/query/parsing/impl/ParserPropertyHelper.java#L158-L173
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java
IOUtils.writeGzipObjectToStream
public static void writeGzipObjectToStream(final Object o, OutputStream out) { """ Serialized gzipped java object to an ObjectOutputStream. The stream remains open. @param o the java object @param out the output stream """ out = new BufferedOutputStream(out); try { out = new GZIPOutputStre...
java
public static void writeGzipObjectToStream(final Object o, OutputStream out) { out = new BufferedOutputStream(out); try { out = new GZIPOutputStream(out, true); final ObjectOutputStream oos = new ObjectOutputStream(out); oos.writeObject(o); oos.flush(); } catch (final IOException e) ...
[ "public", "static", "void", "writeGzipObjectToStream", "(", "final", "Object", "o", ",", "OutputStream", "out", ")", "{", "out", "=", "new", "BufferedOutputStream", "(", "out", ")", ";", "try", "{", "out", "=", "new", "GZIPOutputStream", "(", "out", ",", "...
Serialized gzipped java object to an ObjectOutputStream. The stream remains open. @param o the java object @param out the output stream
[ "Serialized", "gzipped", "java", "object", "to", "an", "ObjectOutputStream", ".", "The", "stream", "remains", "open", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L330-L340
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java
VisualizeImageData.drawEdgeContours
public static void drawEdgeContours( List<EdgeContour> contours , int color , Bitmap output , byte[] storage ) { """ Draws each contour using a single color. @param contours List of edge contours @param color The RGB color that each edge pixel should be drawn @param output Where the output is written to @par...
java
public static void drawEdgeContours( List<EdgeContour> contours , int color , Bitmap output , byte[] storage ) { if( output.getConfig() != Bitmap.Config.ARGB_8888 ) throw new IllegalArgumentException("Only ARGB_8888 is supported"); if( storage == null ) storage = declareStorage(output,null); else Arrays...
[ "public", "static", "void", "drawEdgeContours", "(", "List", "<", "EdgeContour", ">", "contours", ",", "int", "color", ",", "Bitmap", "output", ",", "byte", "[", "]", "storage", ")", "{", "if", "(", "output", ".", "getConfig", "(", ")", "!=", "Bitmap", ...
Draws each contour using a single color. @param contours List of edge contours @param color The RGB color that each edge pixel should be drawn @param output Where the output is written to @param storage Optional working buffer for Bitmap image. Can be null.
[ "Draws", "each", "contour", "using", "a", "single", "color", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/VisualizeImageData.java#L501-L535
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.setOrthoSymmetric
public Matrix4d setOrthoSymmetric(double width, double height, double zNear, double zFar) { """ Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setO...
java
public Matrix4d setOrthoSymmetric(double width, double height, double zNear, double zFar) { return setOrthoSymmetric(width, height, zNear, zFar, false); }
[ "public", "Matrix4d", "setOrthoSymmetric", "(", "double", "width", ",", "double", "height", ",", "double", "zNear", ",", "double", "zFar", ")", "{", "return", "setOrthoSymmetric", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ")", "...
Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOrtho(double, double, double, double, double, double) setOrtho()} with <code>left=-width/2</code>, <code>...
[ "Set", "this", "matrix", "to", "be", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L10460-L10462
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/AbstractRenderer.java
AbstractRenderer.toModelCoordinates
public Point2d toModelCoordinates(double screenX, double screenY) { """ Convert a point in screen space into a point in model space. @param screenX the screen x-coordinate @param screenY the screen y-coordinate @return the equivalent point in model space, or (0,0) if there is an error """ try { ...
java
public Point2d toModelCoordinates(double screenX, double screenY) { try { double[] dest = new double[2]; double[] src = new double[]{screenX, screenY}; transform.inverseTransform(src, 0, dest, 0, 1); return new Point2d(dest[0], dest[1]); } catch (Noninvert...
[ "public", "Point2d", "toModelCoordinates", "(", "double", "screenX", ",", "double", "screenY", ")", "{", "try", "{", "double", "[", "]", "dest", "=", "new", "double", "[", "2", "]", ";", "double", "[", "]", "src", "=", "new", "double", "[", "]", "{",...
Convert a point in screen space into a point in model space. @param screenX the screen x-coordinate @param screenY the screen y-coordinate @return the equivalent point in model space, or (0,0) if there is an error
[ "Convert", "a", "point", "in", "screen", "space", "into", "a", "point", "in", "model", "space", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/AbstractRenderer.java#L162-L171
netty/netty
common/src/main/java/io/netty/util/DomainNameMapping.java
DomainNameMapping.matches
static boolean matches(String template, String hostName) { """ Simple function to match <a href="http://en.wikipedia.org/wiki/Wildcard_DNS_record">DNS wildcard</a>. """ if (template.startsWith("*.")) { return template.regionMatches(2, hostName, 0, hostName.length()) || commo...
java
static boolean matches(String template, String hostName) { if (template.startsWith("*.")) { return template.regionMatches(2, hostName, 0, hostName.length()) || commonSuffixOfLength(hostName, template, template.length() - 1); } return template.equals(hostName); }
[ "static", "boolean", "matches", "(", "String", "template", ",", "String", "hostName", ")", "{", "if", "(", "template", ".", "startsWith", "(", "\"*.\"", ")", ")", "{", "return", "template", ".", "regionMatches", "(", "2", ",", "hostName", ",", "0", ",", ...
Simple function to match <a href="http://en.wikipedia.org/wiki/Wildcard_DNS_record">DNS wildcard</a>.
[ "Simple", "function", "to", "match", "<a", "href", "=", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Wildcard_DNS_record", ">", "DNS", "wildcard<", "/", "a", ">", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/DomainNameMapping.java#L96-L102