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
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaFragmentVersions.java
PartitionReplicaFragmentVersions.setVersions
private void setVersions(long[] newVersions, int fromReplica) { """ Change versions for all replicas with an index greater than {@code fromReplica} to the new replica versions """ int fromIndex = fromReplica - 1; int len = newVersions.length - fromIndex; arraycopy(newVersions, fromIndex...
java
private void setVersions(long[] newVersions, int fromReplica) { int fromIndex = fromReplica - 1; int len = newVersions.length - fromIndex; arraycopy(newVersions, fromIndex, versions, fromIndex, len); }
[ "private", "void", "setVersions", "(", "long", "[", "]", "newVersions", ",", "int", "fromReplica", ")", "{", "int", "fromIndex", "=", "fromReplica", "-", "1", ";", "int", "len", "=", "newVersions", ".", "length", "-", "fromIndex", ";", "arraycopy", "(", ...
Change versions for all replicas with an index greater than {@code fromReplica} to the new replica versions
[ "Change", "versions", "for", "all", "replicas", "with", "an", "index", "greater", "than", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaFragmentVersions.java#L87-L91
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java
AbstractRoller.doFileRoll
private void doFileRoll(final File from, final File to) { """ Renames the current base log file to the roll file name. @param from The current base log file. @param to The backup file. """ final FileHelper fileHelper = FileHelper.getInstance(); if (!fileHelper.deleteExisting(to)) { this.get...
java
private void doFileRoll(final File from, final File to) { final FileHelper fileHelper = FileHelper.getInstance(); if (!fileHelper.deleteExisting(to)) { this.getAppender().getErrorHandler() .error("Unable to delete existing " + to + " for rename"); } final String original = from.toString(...
[ "private", "void", "doFileRoll", "(", "final", "File", "from", ",", "final", "File", "to", ")", "{", "final", "FileHelper", "fileHelper", "=", "FileHelper", ".", "getInstance", "(", ")", ";", "if", "(", "!", "fileHelper", ".", "deleteExisting", "(", "to", ...
Renames the current base log file to the roll file name. @param from The current base log file. @param to The backup file.
[ "Renames", "the", "current", "base", "log", "file", "to", "the", "roll", "file", "name", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/AbstractRoller.java#L210-L223
google/auto
value/src/main/java/com/google/auto/value/processor/AutoValueOrOneOfProcessor.java
AutoValueOrOneOfProcessor.equalsParameterType
static String equalsParameterType(Map<ObjectMethod, ExecutableElement> methodsToGenerate) { """ Returns the encoded parameter type of the {@code equals(Object)} method that is to be generated, or an empty string if the method is not being generated. The parameter type includes any type annotations, for example {...
java
static String equalsParameterType(Map<ObjectMethod, ExecutableElement> methodsToGenerate) { ExecutableElement equals = methodsToGenerate.get(ObjectMethod.EQUALS); if (equals == null) { return ""; // this will not be referenced because no equals method will be generated } TypeMirror parameterType =...
[ "static", "String", "equalsParameterType", "(", "Map", "<", "ObjectMethod", ",", "ExecutableElement", ">", "methodsToGenerate", ")", "{", "ExecutableElement", "equals", "=", "methodsToGenerate", ".", "get", "(", "ObjectMethod", ".", "EQUALS", ")", ";", "if", "(", ...
Returns the encoded parameter type of the {@code equals(Object)} method that is to be generated, or an empty string if the method is not being generated. The parameter type includes any type annotations, for example {@code @Nullable}.
[ "Returns", "the", "encoded", "parameter", "type", "of", "the", "{" ]
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/value/src/main/java/com/google/auto/value/processor/AutoValueOrOneOfProcessor.java#L682-L689
networknt/light-4j
security/src/main/java/com/networknt/security/JwtIssuer.java
JwtIssuer.getPrivateKey
private static PrivateKey getPrivateKey(String filename, String password, String key) { """ Get private key from java key store @param filename Key store file name @param password Key store password @param key key name in keystore @return A PrivateKey object """ if(logger.isDebugEnabled()) logger...
java
private static PrivateKey getPrivateKey(String filename, String password, String key) { if(logger.isDebugEnabled()) logger.debug("filename = " + filename + " key = " + key); PrivateKey privateKey = null; try { KeyStore keystore = KeyStore.getInstance("JKS"); keystore.loa...
[ "private", "static", "PrivateKey", "getPrivateKey", "(", "String", "filename", ",", "String", "password", ",", "String", "key", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "logger", ".", "debug", "(", "\"filename = \"", "+", "filenam...
Get private key from java key store @param filename Key store file name @param password Key store password @param key key name in keystore @return A PrivateKey object
[ "Get", "private", "key", "from", "java", "key", "store" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/security/src/main/java/com/networknt/security/JwtIssuer.java#L141-L161
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeDefinitionAxiomImpl_CustomFieldSerializer.java
OWLDatatypeDefinitionAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeDefinitionAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDatatypeDefinitionAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDatatypeDefinitionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDatatypeDefinitionAxiomImpl_CustomFieldSerializer.java#L98-L101
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java
FormatUtil.appendSpace
public static StringBuilder appendSpace(StringBuilder buf, int spaces) { """ Append whitespace to a buffer. @param buf Buffer to append to @param spaces Number of spaces to append. @return Buffer """ for(int i = spaces; i > 0; i -= SPACEPADDING.length) { buf.append(SPACEPADDING, 0, i < SPACEPADD...
java
public static StringBuilder appendSpace(StringBuilder buf, int spaces) { for(int i = spaces; i > 0; i -= SPACEPADDING.length) { buf.append(SPACEPADDING, 0, i < SPACEPADDING.length ? i : SPACEPADDING.length); } return buf; }
[ "public", "static", "StringBuilder", "appendSpace", "(", "StringBuilder", "buf", ",", "int", "spaces", ")", "{", "for", "(", "int", "i", "=", "spaces", ";", "i", ">", "0", ";", "i", "-=", "SPACEPADDING", ".", "length", ")", "{", "buf", ".", "append", ...
Append whitespace to a buffer. @param buf Buffer to append to @param spaces Number of spaces to append. @return Buffer
[ "Append", "whitespace", "to", "a", "buffer", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L989-L994
EdwardRaff/JSAT
JSAT/src/jsat/clustering/MeanShift.java
MeanShift.setScaleBandwidthFactor
public void setScaleBandwidthFactor(double scaleBandwidthFactor) { """ Sets the value by which the bandwidth of the {@link MultivariateKDE} will be scaled by. @param scaleBandwidthFactor the value to scale bandwidth by @throws ArithmeticException if the value given is {@link Double#NaN NaN } or {@link Double#P...
java
public void setScaleBandwidthFactor(double scaleBandwidthFactor) { if(Double.isNaN(scaleBandwidthFactor) || Double.isInfinite(scaleBandwidthFactor)) throw new ArithmeticException("Invalid scale factor, " + scaleBandwidthFactor); this.scaleBandwidthFactor = scaleBandwidthFactor; ...
[ "public", "void", "setScaleBandwidthFactor", "(", "double", "scaleBandwidthFactor", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "scaleBandwidthFactor", ")", "||", "Double", ".", "isInfinite", "(", "scaleBandwidthFactor", ")", ")", "throw", "new", "Arithmetic...
Sets the value by which the bandwidth of the {@link MultivariateKDE} will be scaled by. @param scaleBandwidthFactor the value to scale bandwidth by @throws ArithmeticException if the value given is {@link Double#NaN NaN } or {@link Double#POSITIVE_INFINITY infinity}
[ "Sets", "the", "value", "by", "which", "the", "bandwidth", "of", "the", "{" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/clustering/MeanShift.java#L134-L139
liyiorg/weixin-popular
src/main/java/weixin/popular/api/WxaAPI.java
WxaAPI.submit_audit
public static SubmitAuditResult submit_audit(String access_token,SubmitAudit submitAudit) { """ 代码管理<br> 将第三方提交的代码包提交审核(仅供第三方开发者代小程序调用) @since 2.8.9 @param access_token access_token @param submitAudit submitAudit @return result """ String json = JsonUtil.toJSONString(submitAudit); HttpUriRequest htt...
java
public static SubmitAuditResult submit_audit(String access_token,SubmitAudit submitAudit){ String json = JsonUtil.toJSONString(submitAudit); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/wxa/submit_audit") .addParameter(PARAM_ACCESS_TOKEN, API.acc...
[ "public", "static", "SubmitAuditResult", "submit_audit", "(", "String", "access_token", ",", "SubmitAudit", "submitAudit", ")", "{", "String", "json", "=", "JsonUtil", ".", "toJSONString", "(", "submitAudit", ")", ";", "HttpUriRequest", "httpUriRequest", "=", "Reque...
代码管理<br> 将第三方提交的代码包提交审核(仅供第三方开发者代小程序调用) @since 2.8.9 @param access_token access_token @param submitAudit submitAudit @return result
[ "代码管理<br", ">", "将第三方提交的代码包提交审核(仅供第三方开发者代小程序调用)" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/WxaAPI.java#L210-L219
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ExecutorsUtils.java
ExecutorsUtils.shutdownExecutorService
public static void shutdownExecutorService(ExecutorService executorService, Optional<Logger> logger) { """ Shutdown an {@link ExecutorService} gradually, first disabling new task submissions and later cancelling existing tasks. <p> This method calls {@link #shutdownExecutorService(ExecutorService, Optional, l...
java
public static void shutdownExecutorService(ExecutorService executorService, Optional<Logger> logger) { shutdownExecutorService(executorService, logger, EXECUTOR_SERVICE_SHUTDOWN_TIMEOUT, EXECUTOR_SERVICE_SHUTDOWN_TIMEOUT_TIMEUNIT); }
[ "public", "static", "void", "shutdownExecutorService", "(", "ExecutorService", "executorService", ",", "Optional", "<", "Logger", ">", "logger", ")", "{", "shutdownExecutorService", "(", "executorService", ",", "logger", ",", "EXECUTOR_SERVICE_SHUTDOWN_TIMEOUT", ",", "E...
Shutdown an {@link ExecutorService} gradually, first disabling new task submissions and later cancelling existing tasks. <p> This method calls {@link #shutdownExecutorService(ExecutorService, Optional, long, TimeUnit)} with default timeout time {@link #EXECUTOR_SERVICE_SHUTDOWN_TIMEOUT} and time unit {@link #EXECUTOR_...
[ "Shutdown", "an", "{", "@link", "ExecutorService", "}", "gradually", "first", "disabling", "new", "task", "submissions", "and", "later", "cancelling", "existing", "tasks", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ExecutorsUtils.java#L232-L235
duracloud/duracloud
chunk/src/main/java/org/duracloud/chunk/writer/DuracloudContentWriter.java
DuracloudContentWriter.chunkInStorage
private boolean chunkInStorage(String spaceId, String contentId, String checksum) { """ /* Determines if a file chunk exists in DuraCloud storage with the given checksum """ try { if (contentStore.contentExists(spaceId, contentId)) { // dc file exists Map<String, String> pr...
java
private boolean chunkInStorage(String spaceId, String contentId, String checksum) { try { if (contentStore.contentExists(spaceId, contentId)) { // dc file exists Map<String, String> props = contentStore.getContentProperties(spaceId, contentId); Str...
[ "private", "boolean", "chunkInStorage", "(", "String", "spaceId", ",", "String", "contentId", ",", "String", "checksum", ")", "{", "try", "{", "if", "(", "contentStore", ".", "contentExists", "(", "spaceId", ",", "contentId", ")", ")", "{", "// dc file exists"...
/* Determines if a file chunk exists in DuraCloud storage with the given checksum
[ "/", "*", "Determines", "if", "a", "file", "chunk", "exists", "in", "DuraCloud", "storage", "with", "the", "given", "checksum" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/chunk/src/main/java/org/duracloud/chunk/writer/DuracloudContentWriter.java#L261-L278
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getTaggedImagesWithServiceResponseAsync
public Observable<ServiceResponse<List<Image>>> getTaggedImagesWithServiceResponseAsync(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter) { """ Get tagged images for a given project iteration. This API supports batching and range selection. By default it will only return first 50 ...
java
public Observable<ServiceResponse<List<Image>>> getTaggedImagesWithServiceResponseAsync(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter) { if (projectId == null) { throw new IllegalArgumentException("Parameter projectId is required and cannot be null."); } ...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "Image", ">", ">", ">", "getTaggedImagesWithServiceResponseAsync", "(", "UUID", "projectId", ",", "GetTaggedImagesOptionalParameter", "getTaggedImagesOptionalParameter", ")", "{", "if", "(", "projectId", ...
Get tagged images for a given project iteration. This API supports batching and range selection. By default it will only return first 50 images matching images. Use the {take} and {skip} parameters to control how many images to return in a given batch. The filtering is on an and/or relationship. For example, if the pro...
[ "Get", "tagged", "images", "for", "a", "given", "project", "iteration", ".", "This", "API", "supports", "batching", "and", "range", "selection", ".", "By", "default", "it", "will", "only", "return", "first", "50", "images", "matching", "images", ".", "Use", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L5028-L5042
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java
InlineModelResolver.copyVendorExtensions
public void copyVendorExtensions(Schema source, Schema target) { """ Copy vendor extensions from Property to another Property @param source source property @param target target property """ if (source.getExtensions() != null) { Map<String, Object> vendorExtensions = source.getExtensions...
java
public void copyVendorExtensions(Schema source, Schema target) { if (source.getExtensions() != null) { Map<String, Object> vendorExtensions = source.getExtensions(); for (String extName : vendorExtensions.keySet()) { ((SchemaImpl) target).addExtension_compat(extName, vend...
[ "public", "void", "copyVendorExtensions", "(", "Schema", "source", ",", "Schema", "target", ")", "{", "if", "(", "source", ".", "getExtensions", "(", ")", "!=", "null", ")", "{", "Map", "<", "String", ",", "Object", ">", "vendorExtensions", "=", "source", ...
Copy vendor extensions from Property to another Property @param source source property @param target target property
[ "Copy", "vendor", "extensions", "from", "Property", "to", "another", "Property" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/parser/util/InlineModelResolver.java#L499-L506
authorjapps/zerocode
core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java
ZeroCodePackageRunner.runChild
@Override protected void runChild(ScenarioSpec child, RunNotifier notifier) { """ Runs the test corresponding to {@code child}, which can be assumed to be an element of the list returned by {@link ParentRunner#getChildren()}. Subclasses are responsible for making sure that relevant test events are reported ...
java
@Override protected void runChild(ScenarioSpec child, RunNotifier notifier) { final Description description = Description.createTestDescription(testClass, child.getScenarioName()); // ---------------------------------------------- // Notify that this single test has been started. /...
[ "@", "Override", "protected", "void", "runChild", "(", "ScenarioSpec", "child", ",", "RunNotifier", "notifier", ")", "{", "final", "Description", "description", "=", "Description", ".", "createTestDescription", "(", "testClass", ",", "child", ".", "getScenarioName",...
Runs the test corresponding to {@code child}, which can be assumed to be an element of the list returned by {@link ParentRunner#getChildren()}. Subclasses are responsible for making sure that relevant test events are reported through {@code notifier} @param child @param notifier
[ "Runs", "the", "test", "corresponding", "to", "{", "@code", "child", "}", "which", "can", "be", "assumed", "to", "be", "an", "element", "of", "the", "list", "returned", "by", "{", "@link", "ParentRunner#getChildren", "()", "}", ".", "Subclasses", "are", "r...
train
https://github.com/authorjapps/zerocode/blob/d66a3e8778d2eb5e4f0006bfcccfc0922ceb7cef/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java#L159-L182
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.getClientIP
public static String getClientIP(HttpServletRequest request, String... otherHeaderNames) { """ 获取客户端IP <p> 默认检测的Header: <pre> 1、X-Forwarded-For 2、X-Real-IP 3、Proxy-Client-IP 4、WL-Proxy-Client-IP </pre> </p> <p> otherHeaderNames参数用于自定义检测的Header<br> 需要注意的是,使用此方法获取的客户IP地址必须在Http服务器(例如Nginx)中配置头信息,否则...
java
public static String getClientIP(HttpServletRequest request, String... otherHeaderNames) { String[] headers = { "X-Forwarded-For", "X-Real-IP", "Proxy-Client-IP", "WL-Proxy-Client-IP", "HTTP_CLIENT_IP", "HTTP_X_FORWARDED_FOR" }; if (ArrayUtil.isNotEmpty(otherHeaderNames)) { headers = ArrayUtil.addAll(headers,...
[ "public", "static", "String", "getClientIP", "(", "HttpServletRequest", "request", ",", "String", "...", "otherHeaderNames", ")", "{", "String", "[", "]", "headers", "=", "{", "\"X-Forwarded-For\"", ",", "\"X-Real-IP\"", ",", "\"Proxy-Client-IP\"", ",", "\"WL-Proxy-...
获取客户端IP <p> 默认检测的Header: <pre> 1、X-Forwarded-For 2、X-Real-IP 3、Proxy-Client-IP 4、WL-Proxy-Client-IP </pre> </p> <p> otherHeaderNames参数用于自定义检测的Header<br> 需要注意的是,使用此方法获取的客户IP地址必须在Http服务器(例如Nginx)中配置头信息,否则容易造成IP伪造。 </p> @param request 请求对象{@link HttpServletRequest} @param otherHeaderNames 其他自定义头文件,通常在Http服务器(例如Nginx)中...
[ "获取客户端IP" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L200-L207
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.conditionsRule
public static Rule conditionsRule(final Condition condition, String key, String value) { """ Create a rule: predicate(conditions) => new state(results) @param condition single condition @param key key @param value value @return rule """ return conditionsRule(condition, States.state(ke...
java
public static Rule conditionsRule(final Condition condition, String key, String value) { return conditionsRule(condition, States.state(key, value)); }
[ "public", "static", "Rule", "conditionsRule", "(", "final", "Condition", "condition", ",", "String", "key", ",", "String", "value", ")", "{", "return", "conditionsRule", "(", "condition", ",", "States", ".", "state", "(", "key", ",", "value", ")", ")", ";"...
Create a rule: predicate(conditions) => new state(results) @param condition single condition @param key key @param value value @return rule
[ "Create", "a", "rule", ":", "predicate", "(", "conditions", ")", "=", ">", "new", "state", "(", "results", ")" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L98-L100
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java
Organizer.flattenPaging
public static <T> Paging<T> flattenPaging(Collection<Paging<T>> collectionOfPaging, Comparator<T> sorter, BooleanExpression<T> filter) { """ Aggregates multiple collections into a single paging collection @param collectionOfPaging the collection paging that need to be flatten @param sorter optional compara...
java
public static <T> Paging<T> flattenPaging(Collection<Paging<T>> collectionOfPaging, Comparator<T> sorter, BooleanExpression<T> filter) { if (collectionOfPaging == null || collectionOfPaging.isEmpty()) return null; PageCriteria pageCriteria = collectionOfPaging.iterator().next().getPageCriteria(); ret...
[ "public", "static", "<", "T", ">", "Paging", "<", "T", ">", "flattenPaging", "(", "Collection", "<", "Paging", "<", "T", ">", ">", "collectionOfPaging", ",", "Comparator", "<", "T", ">", "sorter", ",", "BooleanExpression", "<", "T", ">", "filter", ")", ...
Aggregates multiple collections into a single paging collection @param collectionOfPaging the collection paging that need to be flatten @param sorter optional comparable for sorting @param filter optional filter, if filter. @param <T> the type class @return the flatten collections into a single collection
[ "Aggregates", "multiple", "collections", "into", "a", "single", "paging", "collection" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java#L206-L214
axibase/atsd-api-java
src/main/java/com/axibase/tsd/client/MetaDataService.java
MetaDataService.addGroupEntities
public boolean addGroupEntities(String entityGroupName, Boolean createEntities, Entity... entities) { """ Add specified entities to entity group. @param entityGroupName Entity group name. @param createEntities Automatically create new entities from the submitted list if such entities don't already exist. @pa...
java
public boolean addGroupEntities(String entityGroupName, Boolean createEntities, Entity... entities) { checkEntityGroupIsEmpty(entityGroupName); List<String> entitiesNames = new ArrayList<>(); for (Entity entity : entities) { entitiesNames.add(entity.getName()); } Quer...
[ "public", "boolean", "addGroupEntities", "(", "String", "entityGroupName", ",", "Boolean", "createEntities", ",", "Entity", "...", "entities", ")", "{", "checkEntityGroupIsEmpty", "(", "entityGroupName", ")", ";", "List", "<", "String", ">", "entitiesNames", "=", ...
Add specified entities to entity group. @param entityGroupName Entity group name. @param createEntities Automatically create new entities from the submitted list if such entities don't already exist. @param entities Entities to create. @return {@code true} if entities added. @throws AtsdClientException raised ...
[ "Add", "specified", "entities", "to", "entity", "group", "." ]
train
https://github.com/axibase/atsd-api-java/blob/63a0767d08b202dad2ebef4372ff947d6fba0246/src/main/java/com/axibase/tsd/client/MetaDataService.java#L508-L519
m-m-m/util
gwt/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/rebind/PojoDescriptorGenerator.java
PojoDescriptorGenerator.generateMethodNewInstance
private void generateMethodNewInstance(JClassType inputType, SourceWriter sourceWriter, PojoDescriptor<?> pojoDescriptor) { """ Generates the method {@link AbstractPojoDescriptorImpl#newInstance()}. @param inputType is the {@link JClassType} reflecting the input-type that triggered the generation via {@link co...
java
private void generateMethodNewInstance(JClassType inputType, SourceWriter sourceWriter, PojoDescriptor<?> pojoDescriptor) { generateSourcePublicMethodDeclaration(sourceWriter, inputType.getQualifiedSourceName(), "newInstance", "", false); if (inputType.isInterface() != null) { sourceWriter.print("throw ...
[ "private", "void", "generateMethodNewInstance", "(", "JClassType", "inputType", ",", "SourceWriter", "sourceWriter", ",", "PojoDescriptor", "<", "?", ">", "pojoDescriptor", ")", "{", "generateSourcePublicMethodDeclaration", "(", "sourceWriter", ",", "inputType", ".", "g...
Generates the method {@link AbstractPojoDescriptorImpl#newInstance()}. @param inputType is the {@link JClassType} reflecting the input-type that triggered the generation via {@link com.google.gwt.core.client.GWT#create(Class)}. @param sourceWriter is the {@link SourceWriter} where to {@link SourceWriter#print(String) ...
[ "Generates", "the", "method", "{", "@link", "AbstractPojoDescriptorImpl#newInstance", "()", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/gwt/src/main/java/net/sf/mmm/util/pojo/descriptor/impl/rebind/PojoDescriptorGenerator.java#L99-L114
FrodeRanders/java-vopn
src/main/java/org/gautelis/vopn/queue/WorkerQueueFactory.java
WorkerQueueFactory.getWorkQueue
public static WorkQueue getWorkQueue(Type type, int nThreads) { """ Returns a thread-backed queue. @param type {@link Type} of queue @param nThreads number of threads tending to the queue @return a worker queue """ switch(type) { case Simple: return new SimpleWorkQueue(nThreads); case ...
java
public static WorkQueue getWorkQueue(Type type, int nThreads) { switch(type) { case Simple: return new SimpleWorkQueue(nThreads); case Multi: return new MultiWorkQueue(nThreads); //case WorkStealing: default: return new MultiWorkQueue(nThreads); } }
[ "public", "static", "WorkQueue", "getWorkQueue", "(", "Type", "type", ",", "int", "nThreads", ")", "{", "switch", "(", "type", ")", "{", "case", "Simple", ":", "return", "new", "SimpleWorkQueue", "(", "nThreads", ")", ";", "case", "Multi", ":", "return", ...
Returns a thread-backed queue. @param type {@link Type} of queue @param nThreads number of threads tending to the queue @return a worker queue
[ "Returns", "a", "thread", "-", "backed", "queue", "." ]
train
https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/queue/WorkerQueueFactory.java#L46-L58
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.createTableAlias
private TableAlias createTableAlias(String aTable, String aPath, String aUserAlias) { """ Create a TableAlias for path or userAlias @param aTable @param aPath @param aUserAlias @return TableAlias """ if (aUserAlias == null) { return createTableAlias(aTable, aPath); } else { return cr...
java
private TableAlias createTableAlias(String aTable, String aPath, String aUserAlias) { if (aUserAlias == null) { return createTableAlias(aTable, aPath); } else { return createTableAlias(aTable, aUserAlias + ALIAS_SEPARATOR + aPath); } }
[ "private", "TableAlias", "createTableAlias", "(", "String", "aTable", ",", "String", "aPath", ",", "String", "aUserAlias", ")", "{", "if", "(", "aUserAlias", "==", "null", ")", "{", "return", "createTableAlias", "(", "aTable", ",", "aPath", ")", ";", "}", ...
Create a TableAlias for path or userAlias @param aTable @param aPath @param aUserAlias @return TableAlias
[ "Create", "a", "TableAlias", "for", "path", "or", "userAlias" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L1319-L1329
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.profile_setFBML
public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup) throws FacebookException, IOException { """ Sets the FBML for the profile box and profile actions for the logged-in user. Refer to the FBML documentation for a description of the markup and its role in various...
java
public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup) throws FacebookException, IOException { return profile_setFBML(profileFbmlMarkup, profileActionFbmlMarkup, /* mobileFbmlMarkup */null, /* profileId */null); }
[ "public", "boolean", "profile_setFBML", "(", "CharSequence", "profileFbmlMarkup", ",", "CharSequence", "profileActionFbmlMarkup", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "profile_setFBML", "(", "profileFbmlMarkup", ",", "profileActionFbmlMarkup"...
Sets the FBML for the profile box and profile actions for the logged-in user. Refer to the FBML documentation for a description of the markup and its role in various contexts. @param profileFbmlMarkup the FBML for the profile box @param profileActionFbmlMarkup the FBML for the profile actions @return a boolean indicati...
[ "Sets", "the", "FBML", "for", "the", "profile", "box", "and", "profile", "actions", "for", "the", "logged", "-", "in", "user", ".", "Refer", "to", "the", "FBML", "documentation", "for", "a", "description", "of", "the", "markup", "and", "its", "role", "in...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1515-L1518
apache/incubator-heron
heron/simulator/src/java/org/apache/heron/simulator/Simulator.java
Simulator.submitTopology
public void submitTopology(String name, Config heronConfig, HeronTopology heronTopology) { """ Submit and run topology in simulator @param name topology name @param heronConfig topology config @param heronTopology topology built from topology builder """ TopologyAPI.Topology topologyToRun = hero...
java
public void submitTopology(String name, Config heronConfig, HeronTopology heronTopology) { TopologyAPI.Topology topologyToRun = heronTopology. setConfig(heronConfig). setName(name). setState(TopologyAPI.TopologyState.RUNNING). getTopology(); if (!Topology...
[ "public", "void", "submitTopology", "(", "String", "name", ",", "Config", "heronConfig", ",", "HeronTopology", "heronTopology", ")", "{", "TopologyAPI", ".", "Topology", "topologyToRun", "=", "heronTopology", ".", "setConfig", "(", "heronConfig", ")", ".", "setNam...
Submit and run topology in simulator @param name topology name @param heronConfig topology config @param heronTopology topology built from topology builder
[ "Submit", "and", "run", "topology", "in", "simulator" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/simulator/src/java/org/apache/heron/simulator/Simulator.java#L110-L158
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java
TypeUtility.mergeTypeNameWithSuffix
public static ClassName mergeTypeNameWithSuffix(TypeName typeName, String typeNameSuffix) { """ Merge type name with suffix. @param typeName the type name @param typeNameSuffix the type name suffix @return the class name """ ClassName className = className(typeName.toString()); return classNameWith...
java
public static ClassName mergeTypeNameWithSuffix(TypeName typeName, String typeNameSuffix) { ClassName className = className(typeName.toString()); return classNameWithSuffix(className.packageName(), className.simpleName(), typeNameSuffix); }
[ "public", "static", "ClassName", "mergeTypeNameWithSuffix", "(", "TypeName", "typeName", ",", "String", "typeNameSuffix", ")", "{", "ClassName", "className", "=", "className", "(", "typeName", ".", "toString", "(", ")", ")", ";", "return", "classNameWithSuffix", "...
Merge type name with suffix. @param typeName the type name @param typeNameSuffix the type name suffix @return the class name
[ "Merge", "type", "name", "with", "suffix", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java#L287-L291
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/entityjson/EntityJsonParser.java
EntityJsonParser.parseStructuredObject
public StructuredObject parseStructuredObject(Object instanceSource, ObjectNode instance) throws SchemaValidationException { """ Parse a single StructuredObject instance from the given URL. Callers may prefer to catch EntityJSONException and treat all failures in the same way. @param instanceSource An objec...
java
public StructuredObject parseStructuredObject(Object instanceSource, ObjectNode instance) throws SchemaValidationException { try { return new StructuredObject(validate(STRUCTURED_OBJECT_SCHEMA_URL, instanceSource, instance)); } catch (NoSchemaException | InvalidSchemaException e) { // ...
[ "public", "StructuredObject", "parseStructuredObject", "(", "Object", "instanceSource", ",", "ObjectNode", "instance", ")", "throws", "SchemaValidationException", "{", "try", "{", "return", "new", "StructuredObject", "(", "validate", "(", "STRUCTURED_OBJECT_SCHEMA_URL", "...
Parse a single StructuredObject instance from the given URL. Callers may prefer to catch EntityJSONException and treat all failures in the same way. @param instanceSource An object describing the source of the instance, typically an instance of java.net.URL or java.io.File. @param instance A JSON ObjectNode c...
[ "Parse", "a", "single", "StructuredObject", "instance", "from", "the", "given", "URL", "." ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/entityjson/EntityJsonParser.java#L241-L252
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.internalGetSessionScope
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (@Nullable final IRequestWebScope aRequestScope, final boolean bCreateIfNotExisting, ...
java
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetSessionScope (@Nullable final IRequestWebScope aRequestScope, final boolean bCreateIfNotExisting, ...
[ "@", "Nullable", "@", "DevelopersNote", "(", "\"This is only for project-internal use!\"", ")", "public", "static", "ISessionWebScope", "internalGetSessionScope", "(", "@", "Nullable", "final", "IRequestWebScope", "aRequestScope", ",", "final", "boolean", "bCreateIfNotExistin...
Get the session scope of the provided request scope. @param aRequestScope The request scope it is about. May be <code>null</code>. @param bCreateIfNotExisting if <code>true</code> a new session scope (and a new HTTP session if required) is created if none is existing so far. @param bItsOkayToCreateANewSession if <code...
[ "Get", "the", "session", "scope", "of", "the", "provided", "request", "scope", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L355-L376
alkacon/opencms-core
src/org/opencms/widgets/CmsCalendarWidget.java
CmsCalendarWidget.calendarIncludes
public static String calendarIncludes(Locale locale, String style) { """ Creates the HTML JavaScript and stylesheet includes required by the calendar for the head of the page.<p> @param locale the locale to use for the calendar @param style the name of the used calendar style, e.g. "system", "blue" @return ...
java
public static String calendarIncludes(Locale locale, String style) { StringBuffer result = new StringBuffer(512); String calendarPath = CmsWorkplace.getSkinUri() + "components/js_calendar/"; if (CmsStringUtil.isEmpty(style)) { style = "system"; } result.append("<link...
[ "public", "static", "String", "calendarIncludes", "(", "Locale", "locale", ",", "String", "style", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "512", ")", ";", "String", "calendarPath", "=", "CmsWorkplace", ".", "getSkinUri", "(", ")",...
Creates the HTML JavaScript and stylesheet includes required by the calendar for the head of the page.<p> @param locale the locale to use for the calendar @param style the name of the used calendar style, e.g. "system", "blue" @return the necessary HTML code for the js and stylesheet includes
[ "Creates", "the", "HTML", "JavaScript", "and", "stylesheet", "includes", "required", "by", "the", "calendar", "for", "the", "head", "of", "the", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsCalendarWidget.java#L104-L128
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/GeometryEngine.java
GeometryEngine.isSimple
static boolean isSimple(Geometry geometry, SpatialReference spatialReference) { """ Checks if the Geometry is simple. See OperatorSimplify. @param geometry The geometry to be checked. @param spatialReference The spatial reference of the geometry. @return TRUE if the geometry is simple. """ Operator...
java
static boolean isSimple(Geometry geometry, SpatialReference spatialReference) { OperatorSimplify op = (OperatorSimplify) factory .getOperator(Operator.Type.Simplify); boolean result = op.isSimpleAsFeature(geometry, spatialReference, null); return result; }
[ "static", "boolean", "isSimple", "(", "Geometry", "geometry", ",", "SpatialReference", "spatialReference", ")", "{", "OperatorSimplify", "op", "=", "(", "OperatorSimplify", ")", "factory", ".", "getOperator", "(", "Operator", ".", "Type", ".", "Simplify", ")", "...
Checks if the Geometry is simple. See OperatorSimplify. @param geometry The geometry to be checked. @param spatialReference The spatial reference of the geometry. @return TRUE if the geometry is simple.
[ "Checks", "if", "the", "Geometry", "is", "simple", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/GeometryEngine.java#L890-L895
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutGatewayResponseRequest.java
PutGatewayResponseRequest.withResponseParameters
public PutGatewayResponseRequest withResponseParameters(java.util.Map<String, String> responseParameters) { """ <p> <p> Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> </p> @param responseParameters Response parameters...
java
public PutGatewayResponseRequest withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
[ "public", "PutGatewayResponseRequest", "withResponseParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseParameters", ")", "{", "setResponseParameters", "(", "responseParameters", ")", ";", "return", "this", ";", "}" ]
<p> <p> Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> </p> @param responseParameters Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. @return Retur...
[ "<p", ">", "<p", ">", "Response", "parameters", "(", "paths", "query", "strings", "and", "headers", ")", "of", "the", "<a", ">", "GatewayResponse<", "/", "a", ">", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pair...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutGatewayResponseRequest.java#L530-L533
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java
JavaTimeZone.getOffset
@Override public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) { """ /* (non-Javadoc) @see android.icu.util.TimeZone#getOffset(int, int, int, int, int, int) """ return javatz.getOffset(era, year, month, day, dayOfWeek, milliseconds); }
java
@Override public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) { return javatz.getOffset(era, year, month, day, dayOfWeek, milliseconds); }
[ "@", "Override", "public", "int", "getOffset", "(", "int", "era", ",", "int", "year", ",", "int", "month", ",", "int", "day", ",", "int", "dayOfWeek", ",", "int", "milliseconds", ")", "{", "return", "javatz", ".", "getOffset", "(", "era", ",", "year", ...
/* (non-Javadoc) @see android.icu.util.TimeZone#getOffset(int, int, int, int, int, int)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java#L112-L115
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java
AGeneralOperationAccessor.write
protected final StringBuilder write(StringBuilder sb,final Object... objects) { """ This method adds to the sb the objects. @param sb StringBuilder to be used @param objects objects to be added to sb @return the sb parameter """ for (Object string : objects)sb.append(string); return sb; }
java
protected final StringBuilder write(StringBuilder sb,final Object... objects){ for (Object string : objects)sb.append(string); return sb; }
[ "protected", "final", "StringBuilder", "write", "(", "StringBuilder", "sb", ",", "final", "Object", "...", "objects", ")", "{", "for", "(", "Object", "string", ":", "objects", ")", "sb", ".", "append", "(", "string", ")", ";", "return", "sb", ";", "}" ]
This method adds to the sb the objects. @param sb StringBuilder to be used @param objects objects to be added to sb @return the sb parameter
[ "This", "method", "adds", "to", "the", "sb", "the", "objects", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/AGeneralOperationAccessor.java#L188-L191
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java
PAbstractObject.getInt
@Override public final int getInt(final String key) { """ Get a property as an int or throw an exception. @param key the property name """ Integer result = optInt(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
java
@Override public final int getInt(final String key) { Integer result = optInt(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "@", "Override", "public", "final", "int", "getInt", "(", "final", "String", "key", ")", "{", "Integer", "result", "=", "optInt", "(", "key", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "ObjectMissingException", "(", "this", ...
Get a property as an int or throw an exception. @param key the property name
[ "Get", "a", "property", "as", "an", "int", "or", "throw", "an", "exception", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L50-L57
lightblue-platform/lightblue-client
http/src/main/java/com/redhat/lightblue/client/http/servlet/AbstractLightblueProxyServlet.java
AbstractLightblueProxyServlet.proxyRequest
private HttpUriRequest proxyRequest(HttpServletRequest request) throws ServletException, IOException { """ For the given servlet request, return a new request object (for use with Apache HttpClient), that may be executed in place of the original request to make the real service call. @throws javax...
java
private HttpUriRequest proxyRequest(HttpServletRequest request) throws ServletException, IOException { String newUri = serviceUriForRequest(request); BasicHttpEntityEnclosingRequest httpRequest = new BasicHttpEntityEnclosingRequest(request.getMethod(), newUri); HttpE...
[ "private", "HttpUriRequest", "proxyRequest", "(", "HttpServletRequest", "request", ")", "throws", "ServletException", ",", "IOException", "{", "String", "newUri", "=", "serviceUriForRequest", "(", "request", ")", ";", "BasicHttpEntityEnclosingRequest", "httpRequest", "=",...
For the given servlet request, return a new request object (for use with Apache HttpClient), that may be executed in place of the original request to make the real service call. @throws javax.servlet.ServletException
[ "For", "the", "given", "servlet", "request", "return", "a", "new", "request", "object", "(", "for", "use", "with", "Apache", "HttpClient", ")", "that", "may", "be", "executed", "in", "place", "of", "the", "original", "request", "to", "make", "the", "real",...
train
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/http/src/main/java/com/redhat/lightblue/client/http/servlet/AbstractLightblueProxyServlet.java#L192-L215
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseFloat
public static float parseFloat (@Nullable final String sStr, final float fDefault) { """ Parse the given {@link String} as float. @param sStr The string to parse. May be <code>null</code>. @param fDefault The default value to be returned if the passed object could not be converted to a valid value. @return...
java
public static float parseFloat (@Nullable final String sStr, final float fDefault) { // parseDouble throws a NPE if parameter is null if (sStr != null && sStr.length () > 0) try { // Single point where we replace "," with "." for parsing! return Float.parseFloat (_getUnifiedDecimal...
[ "public", "static", "float", "parseFloat", "(", "@", "Nullable", "final", "String", "sStr", ",", "final", "float", "fDefault", ")", "{", "// parseDouble throws a NPE if parameter is null", "if", "(", "sStr", "!=", "null", "&&", "sStr", ".", "length", "(", ")", ...
Parse the given {@link String} as float. @param sStr The string to parse. May be <code>null</code>. @param fDefault The default value to be returned if the passed object could not be converted to a valid value. @return The default value if the string does not represent a valid value.
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "float", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L607-L621
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.compareVersions
public static int compareVersions(String v1, String v2) { """ Compare two report versions strings @param v1 first version string @param v2 second version string @return -1 if v1 less than v2, 0 if v1 equals v2, 1 if v1 greater than v2 """ String[] v1a = v1.split("\\."); String[] v2a = v2.split("\\."...
java
public static int compareVersions(String v1, String v2) { String[] v1a = v1.split("\\."); String[] v2a = v2.split("\\."); Integer v1M = Integer.parseInt(v1a[0]); Integer v2M = Integer.parseInt(v2a[0]); if (v1M < v2M) { return -1; } else if (v1M > v2M) { return 1; } else { Integer v1min = Integer....
[ "public", "static", "int", "compareVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "String", "[", "]", "v1a", "=", "v1", ".", "split", "(", "\"\\\\.\"", ")", ";", "String", "[", "]", "v2a", "=", "v2", ".", "split", "(", "\"\\\\.\"", ...
Compare two report versions strings @param v1 first version string @param v2 second version string @return -1 if v1 less than v2, 0 if v1 equals v2, 1 if v1 greater than v2
[ "Compare", "two", "report", "versions", "strings" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L367-L387
bmwcarit/joynr
java/messaging/messaging-common/src/main/java/io/joynr/common/ExpiryDate.java
ExpiryDate.fromAbsolute
public static ExpiryDate fromAbsolute(long expiryDate) { """ NOTE: relative Ttl can be negative if the ExpiryDate passed in was in the past @param expiryDate time measured in milliseconds, between the current time and midnight, January 1, 1970 UTC @return an ExpiryDate object with creationTime = current time, an...
java
public static ExpiryDate fromAbsolute(long expiryDate) { long creationTime = System.currentTimeMillis(); long relativeTtl; try { relativeTtl = Math.subtractExact(expiryDate, creationTime); } catch (ArithmeticException exception) { relativeTtl = Long.MIN_VALUE; ...
[ "public", "static", "ExpiryDate", "fromAbsolute", "(", "long", "expiryDate", ")", "{", "long", "creationTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "relativeTtl", ";", "try", "{", "relativeTtl", "=", "Math", ".", "subtractExact", "("...
NOTE: relative Ttl can be negative if the ExpiryDate passed in was in the past @param expiryDate time measured in milliseconds, between the current time and midnight, January 1, 1970 UTC @return an ExpiryDate object with creationTime = current time, and relativeTtl = ExpiryDate - creationTime;
[ "NOTE", ":", "relative", "Ttl", "can", "be", "negative", "if", "the", "ExpiryDate", "passed", "in", "was", "in", "the", "past" ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/messaging-common/src/main/java/io/joynr/common/ExpiryDate.java#L60-L69
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java
AbstractDataGridHtmlTag.applyIndexedTagId
protected final void applyIndexedTagId(AbstractHtmlState state, String tagId) throws JspException { """ Create an indexed tag identifier given a state object and a base tag identifier. The <code>tagId</code> will have the index of the current item in the data grid attached as a suffix to the the given b...
java
protected final void applyIndexedTagId(AbstractHtmlState state, String tagId) throws JspException { state.id = indexTagId(generateTagId(tagId)); }
[ "protected", "final", "void", "applyIndexedTagId", "(", "AbstractHtmlState", "state", ",", "String", "tagId", ")", "throws", "JspException", "{", "state", ".", "id", "=", "indexTagId", "(", "generateTagId", "(", "tagId", ")", ")", ";", "}" ]
Create an indexed tag identifier given a state object and a base tag identifier. The <code>tagId</code> will have the index of the current item in the data grid attached as a suffix to the the given base identifier. @param state the {@link AbstractHtmlState} upon which the tag identifier will be set once created @para...
[ "Create", "an", "indexed", "tag", "identifier", "given", "a", "state", "object", "and", "a", "base", "tag", "identifier", ".", "The", "<code", ">", "tagId<", "/", "code", ">", "will", "have", "the", "index", "of", "the", "current", "item", "in", "the", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AbstractDataGridHtmlTag.java#L68-L71
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.anySatisfy
@Deprecated public static boolean anySatisfy(String string, CharPredicate predicate) { """ @return true if any of the characters in the {@code string} answer true for the specified {@code predicate}. @deprecated since 7.0. Use {@link #anySatisfyChar(String, CharPredicate)} instead. """ return St...
java
@Deprecated public static boolean anySatisfy(String string, CharPredicate predicate) { return StringIterate.anySatisfyChar(string, predicate); }
[ "@", "Deprecated", "public", "static", "boolean", "anySatisfy", "(", "String", "string", ",", "CharPredicate", "predicate", ")", "{", "return", "StringIterate", ".", "anySatisfyChar", "(", "string", ",", "predicate", ")", ";", "}" ]
@return true if any of the characters in the {@code string} answer true for the specified {@code predicate}. @deprecated since 7.0. Use {@link #anySatisfyChar(String, CharPredicate)} instead.
[ "@return", "true", "if", "any", "of", "the", "characters", "in", "the", "{", "@code", "string", "}", "answer", "true", "for", "the", "specified", "{", "@code", "predicate", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L791-L795
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java
XPathParser.isComp
private boolean isComp() { """ Indicates whether the current token is a comparison operator, or not. * Parses the the rule NodeComp [24], ValueComp [23] and GeneralComp [22] according to the following production rule: <p> [22] GeneralComp ::= * "=" | "!=" | "<" | "<=" | * ">" | ">=" . </p> <p> [23] ValueCom...
java
private boolean isComp() { return is(TokenType.L_SHIFT, true) || is(TokenType.R_SHIFT, true) || is(TokenType.EQ, true) || is(TokenType.N_EQ, true) || is(TokenType.COMP, true) || mToken.getType() == TokenType.TEXT && (is("ne", true) || is("...
[ "private", "boolean", "isComp", "(", ")", "{", "return", "is", "(", "TokenType", ".", "L_SHIFT", ",", "true", ")", "||", "is", "(", "TokenType", ".", "R_SHIFT", ",", "true", ")", "||", "is", "(", "TokenType", ".", "EQ", ",", "true", ")", "||", "is"...
Indicates whether the current token is a comparison operator, or not. * Parses the the rule NodeComp [24], ValueComp [23] and GeneralComp [22] according to the following production rule: <p> [22] GeneralComp ::= * "=" | "!=" | "<" | "<=" | * ">" | ">=" . </p> <p> [23] ValueComp ::= "eq" | "ne" | "lt" | "le" | "gt" | "g...
[ "Indicates", "whether", "the", "current", "token", "is", "a", "comparison", "operator", "or", "not", ".", "*", "Parses", "the", "the", "rule", "NodeComp", "[", "24", "]", "ValueComp", "[", "23", "]", "and", "GeneralComp", "[", "22", "]", "according", "to...
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java#L403-L413
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.writeField
public static void writeField(final Object target, final String fieldName, final Object value) throws IllegalAccessException { """ Writes a {@code public} {@link Field}. Superclasses will be considered. @param target the object to reflect, must not be {@code null} @param fieldName the field name to obtain @...
java
public static void writeField(final Object target, final String fieldName, final Object value) throws IllegalAccessException { writeField(target, fieldName, value, false); }
[ "public", "static", "void", "writeField", "(", "final", "Object", "target", ",", "final", "String", "fieldName", ",", "final", "Object", "value", ")", "throws", "IllegalAccessException", "{", "writeField", "(", "target", ",", "fieldName", ",", "value", ",", "f...
Writes a {@code public} {@link Field}. Superclasses will be considered. @param target the object to reflect, must not be {@code null} @param fieldName the field name to obtain @param value to set @throws IllegalArgumentException if {@code target} is {@code null}, {@code fieldName} is blank or empty or could not be fou...
[ "Writes", "a", "{", "@code", "public", "}", "{", "@link", "Field", "}", ".", "Superclasses", "will", "be", "considered", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L761-L763
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.getClassDigest
private byte[] getClassDigest(File directory, String name) { """ Gets the MD5 digest of a class definition. @param directory The root of the directory tree containing the class. @param name The fully qualified name of the class. @return The MD5 digest of the class definition. """ String baseName = getBa...
java
private byte[] getClassDigest(File directory, String name) { String baseName = getBaseFileName(name); File digestFile = new File(directory, baseName + DIGEST_EXTENSION); return getFileContents(digestFile); }
[ "private", "byte", "[", "]", "getClassDigest", "(", "File", "directory", ",", "String", "name", ")", "{", "String", "baseName", "=", "getBaseFileName", "(", "name", ")", ";", "File", "digestFile", "=", "new", "File", "(", "directory", ",", "baseName", "+",...
Gets the MD5 digest of a class definition. @param directory The root of the directory tree containing the class. @param name The fully qualified name of the class. @return The MD5 digest of the class definition.
[ "Gets", "the", "MD5", "digest", "of", "a", "class", "definition", "." ]
train
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L254-L258
Netflix/dyno
dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java
HostStatusTracker.checkIfChanged
public boolean checkIfChanged(Collection<Host> hostsUp, Collection<Host> hostsDown) { """ Helper method that checks if anything has changed b/w the current state and the new set of hosts up and down @param hostsUp @param hostsDown @return true/false indicating whether the set of hosts has changed or not. ""...
java
public boolean checkIfChanged(Collection<Host> hostsUp, Collection<Host> hostsDown) { boolean changed = activeSetChanged(hostsUp) || inactiveSetChanged(hostsUp, hostsDown); if (changed && logger.isDebugEnabled()) { Set<Host> changedHostsUp = new HashSet<>(hostsUp); changedHostsUp.removeAll(activeHosts); c...
[ "public", "boolean", "checkIfChanged", "(", "Collection", "<", "Host", ">", "hostsUp", ",", "Collection", "<", "Host", ">", "hostsDown", ")", "{", "boolean", "changed", "=", "activeSetChanged", "(", "hostsUp", ")", "||", "inactiveSetChanged", "(", "hostsUp", "...
Helper method that checks if anything has changed b/w the current state and the new set of hosts up and down @param hostsUp @param hostsDown @return true/false indicating whether the set of hosts has changed or not.
[ "Helper", "method", "that", "checks", "if", "anything", "has", "changed", "b", "/", "w", "the", "current", "state", "and", "the", "new", "set", "of", "hosts", "up", "and", "down" ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java#L130-L143
Jasig/uPortal
uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/StylesheetUserPreferencesServiceImpl.java
StylesheetUserPreferencesServiceImpl.getStyleSheetName
protected String getStyleSheetName(final HttpServletRequest request, PreferencesScope scope) { """ Returns the stylesheet name if overridden in the request object. @param request HttpRequest @param scope Scope (Structure or Theme) @return Stylesheet name if set as an override in the request, else null if it w...
java
protected String getStyleSheetName(final HttpServletRequest request, PreferencesScope scope) { final String stylesheetNameFromRequest; if (scope.equals(PreferencesScope.STRUCTURE)) { stylesheetNameFromRequest = (String) request.getAttribute(STYLESHEET_STRUCTURE_OVERRIDE_...
[ "protected", "String", "getStyleSheetName", "(", "final", "HttpServletRequest", "request", ",", "PreferencesScope", "scope", ")", "{", "final", "String", "stylesheetNameFromRequest", ";", "if", "(", "scope", ".", "equals", "(", "PreferencesScope", ".", "STRUCTURE", ...
Returns the stylesheet name if overridden in the request object. @param request HttpRequest @param scope Scope (Structure or Theme) @return Stylesheet name if set as an override in the request, else null if it was not.
[ "Returns", "the", "stylesheet", "name", "if", "overridden", "in", "the", "request", "object", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/StylesheetUserPreferencesServiceImpl.java#L1254-L1266
tvesalainen/util
util/src/main/java/org/vesalainen/nio/RingByteBuffer.java
RingByteBuffer.writeTo
public int writeTo(RingByteBuffer ring) throws IOException { """ Write this buffers content from mark (included) to position (excluded). Returns count of actual written items. @param ring @return @throws java.io.IOException """ return writeTo((srcs, offset, length)->ring.fill(srcs, offset, length)...
java
public int writeTo(RingByteBuffer ring) throws IOException { return writeTo((srcs, offset, length)->ring.fill(srcs, offset, length), writeToSplitter); }
[ "public", "int", "writeTo", "(", "RingByteBuffer", "ring", ")", "throws", "IOException", "{", "return", "writeTo", "(", "(", "srcs", ",", "offset", ",", "length", ")", "->", "ring", ".", "fill", "(", "srcs", ",", "offset", ",", "length", ")", ",", "wri...
Write this buffers content from mark (included) to position (excluded). Returns count of actual written items. @param ring @return @throws java.io.IOException
[ "Write", "this", "buffers", "content", "from", "mark", "(", "included", ")", "to", "position", "(", "excluded", ")", ".", "Returns", "count", "of", "actual", "written", "items", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/RingByteBuffer.java#L171-L174
amzn/ion-java
src/com/amazon/ion/Timestamp.java
Timestamp.addMillisForPrecision
private Timestamp addMillisForPrecision(long amount, Precision precision, boolean millisecondsPrecision) { """ Adds the given number of milliseconds, extending (if necessary) the resulting Timestamp to the given precision. @param amount the number of milliseconds to add. @param precision the precision that the ...
java
private Timestamp addMillisForPrecision(long amount, Precision precision, boolean millisecondsPrecision) { // When millisecondsPrecision is true, the caller must do its own short-circuiting because it must // check the fractional precision. if (!millisecondsPrecision && amount == 0 && _precision...
[ "private", "Timestamp", "addMillisForPrecision", "(", "long", "amount", ",", "Precision", "precision", ",", "boolean", "millisecondsPrecision", ")", "{", "// When millisecondsPrecision is true, the caller must do its own short-circuiting because it must", "// check the fractional preci...
Adds the given number of milliseconds, extending (if necessary) the resulting Timestamp to the given precision. @param amount the number of milliseconds to add. @param precision the precision that the Timestamp will be extended to, if it does not already include that precision. @param millisecondsPrecision true if and ...
[ "Adds", "the", "given", "number", "of", "milliseconds", "extending", "(", "if", "necessary", ")", "the", "resulting", "Timestamp", "to", "the", "given", "precision", "." ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/Timestamp.java#L2269-L2298
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectNumberOrSymbol
void expectNumberOrSymbol(Node n, JSType type, String msg) { """ Expect the type to be a number or string, or a type convertible to a number or symbol. If the expectation is not met, issue a warning at the provided node's source code position. """ if (!type.matchesNumberContext() && !type.matchesSymbolCon...
java
void expectNumberOrSymbol(Node n, JSType type, String msg) { if (!type.matchesNumberContext() && !type.matchesSymbolContext()) { mismatch(n, msg, type, NUMBER_SYMBOL); } }
[ "void", "expectNumberOrSymbol", "(", "Node", "n", ",", "JSType", "type", ",", "String", "msg", ")", "{", "if", "(", "!", "type", ".", "matchesNumberContext", "(", ")", "&&", "!", "type", ".", "matchesSymbolContext", "(", ")", ")", "{", "mismatch", "(", ...
Expect the type to be a number or string, or a type convertible to a number or symbol. If the expectation is not met, issue a warning at the provided node's source code position.
[ "Expect", "the", "type", "to", "be", "a", "number", "or", "string", "or", "a", "type", "convertible", "to", "a", "number", "or", "symbol", ".", "If", "the", "expectation", "is", "not", "met", "issue", "a", "warning", "at", "the", "provided", "node", "s...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L413-L417
JodaOrg/joda-beans
src/main/java/org/joda/beans/gen/PropertyData.java
PropertyData.resolveToStringStyle
public void resolveToStringStyle(File file, int lineIndex) { """ Resolves the toString generator. @param file the file @param lineIndex the line index """ if (toStringStyle.equals("smart")) { toStringStyle = (bean.isImmutable() ? "field" : "getter"); } if (toStringStyle....
java
public void resolveToStringStyle(File file, int lineIndex) { if (toStringStyle.equals("smart")) { toStringStyle = (bean.isImmutable() ? "field" : "getter"); } if (toStringStyle.equals("omit") || toStringStyle.equals("getter") || toStringStyle.equals("f...
[ "public", "void", "resolveToStringStyle", "(", "File", "file", ",", "int", "lineIndex", ")", "{", "if", "(", "toStringStyle", ".", "equals", "(", "\"smart\"", ")", ")", "{", "toStringStyle", "=", "(", "bean", ".", "isImmutable", "(", ")", "?", "\"field\"",...
Resolves the toString generator. @param file the file @param lineIndex the line index
[ "Resolves", "the", "toString", "generator", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/gen/PropertyData.java#L487-L498
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.buildB
private BitSet buildB(BitSet sourceBitSet, BitSet targetBitSet) throws CDKException { """ Builds the initial extension set. This is the set of node that may be used as seed for the CDKRGraph parsing. This set depends on the constrains defined by the user. @param sourceBitSet constraint in the graph G1 @para...
java
private BitSet buildB(BitSet sourceBitSet, BitSet targetBitSet) throws CDKException { this.setSourceBitSet(sourceBitSet); this.setTargetBitSet(targetBitSet); BitSet bistSet = new BitSet(); // only nodes that fulfill the initial constrains // are allowed in the initial extension...
[ "private", "BitSet", "buildB", "(", "BitSet", "sourceBitSet", ",", "BitSet", "targetBitSet", ")", "throws", "CDKException", "{", "this", ".", "setSourceBitSet", "(", "sourceBitSet", ")", ";", "this", ".", "setTargetBitSet", "(", "targetBitSet", ")", ";", "BitSet...
Builds the initial extension set. This is the set of node that may be used as seed for the CDKRGraph parsing. This set depends on the constrains defined by the user. @param sourceBitSet constraint in the graph G1 @param targetBitSet constraint in the graph G2 @return
[ "Builds", "the", "initial", "extension", "set", ".", "This", "is", "the", "set", "of", "node", "that", "may", "be", "used", "as", "seed", "for", "the", "CDKRGraph", "parsing", ".", "This", "set", "depends", "on", "the", "constrains", "defined", "by", "th...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L426-L445
BioPAX/Paxtools
paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/StringFieldFilter.java
StringFieldFilter.addAccessor
protected void addAccessor(PathAccessor acc, Class<? extends BioPAXElement> clazz) { """ Adds the given <code>PathAccessor</code> to the list of accessors to use to get field values of objects and their related objects. @param acc accessor @param clazz the type of element that the accessor is applied """ ...
java
protected void addAccessor(PathAccessor acc, Class<? extends BioPAXElement> clazz) { accessors.put(acc, clazz); }
[ "protected", "void", "addAccessor", "(", "PathAccessor", "acc", ",", "Class", "<", "?", "extends", "BioPAXElement", ">", "clazz", ")", "{", "accessors", ".", "put", "(", "acc", ",", "clazz", ")", ";", "}" ]
Adds the given <code>PathAccessor</code> to the list of accessors to use to get field values of objects and their related objects. @param acc accessor @param clazz the type of element that the accessor is applied
[ "Adds", "the", "given", "<code", ">", "PathAccessor<", "/", "code", ">", "to", "the", "list", "of", "accessors", "to", "use", "to", "get", "field", "values", "of", "objects", "and", "their", "related", "objects", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/wrapperL3/StringFieldFilter.java#L86-L89
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayCountry
public static String getDisplayCountry(String localeID, String displayLocaleID) { """ <strong>[icu]</strong> Returns a locale's country localized for display in the provided locale. <b>Warning: </b>this is for the region part of a valid locale ID; it cannot just be the region code (like "FR"). To get the display...
java
public static String getDisplayCountry(String localeID, String displayLocaleID) { return getDisplayCountryInternal(new ULocale(localeID), new ULocale(displayLocaleID)); }
[ "public", "static", "String", "getDisplayCountry", "(", "String", "localeID", ",", "String", "displayLocaleID", ")", "{", "return", "getDisplayCountryInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "new", "ULocale", "(", "displayLocaleID", ")", ")", ...
<strong>[icu]</strong> Returns a locale's country localized for display in the provided locale. <b>Warning: </b>this is for the region part of a valid locale ID; it cannot just be the region code (like "FR"). To get the display name for a region alone, or for other options, use {@link LocaleDisplayNames} instead. This ...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "locale", "s", "country", "localized", "for", "display", "in", "the", "provided", "locale", ".", "<b", ">", "Warning", ":", "<", "/", "b", ">", "this", "is", "for", "the", "r...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1593-L1595
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.readString
public static String readString(DataInputStream dis) throws IOException { """ Read a string from a data input stream Credit to: https://github.com/NLPchina/Word2VEC_java/blob/master/src/com/ansj/vec/Word2VEC.java @param dis @return @throws IOException """ byte[] bytes = new byte[MAX_SIZE]; ...
java
public static String readString(DataInputStream dis) throws IOException { byte[] bytes = new byte[MAX_SIZE]; byte b = dis.readByte(); int i = -1; StringBuilder sb = new StringBuilder(); while (b != 32 && b != 10) { i++; bytes[i] = b; b = dis.re...
[ "public", "static", "String", "readString", "(", "DataInputStream", "dis", ")", "throws", "IOException", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "MAX_SIZE", "]", ";", "byte", "b", "=", "dis", ".", "readByte", "(", ")", ";", "int", "i",...
Read a string from a data input stream Credit to: https://github.com/NLPchina/Word2VEC_java/blob/master/src/com/ansj/vec/Word2VEC.java @param dis @return @throws IOException
[ "Read", "a", "string", "from", "a", "data", "input", "stream", "Credit", "to", ":", "https", ":", "//", "github", ".", "com", "/", "NLPchina", "/", "Word2VEC_java", "/", "blob", "/", "master", "/", "src", "/", "com", "/", "ansj", "/", "vec", "/", "...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L277-L294
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withBundle
public Postcard withBundle(@Nullable String key, @Nullable Bundle value) { """ Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return current """...
java
public Postcard withBundle(@Nullable String key, @Nullable Bundle value) { mBundle.putBundle(key, value); return this; }
[ "public", "Postcard", "withBundle", "(", "@", "Nullable", "String", "key", ",", "@", "Nullable", "Bundle", "value", ")", "{", "mBundle", ".", "putBundle", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Bundle value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return current
[ "Inserts", "a", "Bundle", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L546-L549
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.isLessThan
public static StringIsLessThan isLessThan(StringExpression left, Object constant) { """ Creates an StringIsLessThan expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a String). @throws IllegalArgumentException If the consta...
java
public static StringIsLessThan isLessThan(StringExpression left, Object constant) { if (!(constant instanceof String)) throw new IllegalArgumentException("constant is not a String"); return new StringIsLessThan(left, constant((String)constant)); }
[ "public", "static", "StringIsLessThan", "isLessThan", "(", "StringExpression", "left", ",", "Object", "constant", ")", "{", "if", "(", "!", "(", "constant", "instanceof", "String", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"constant is not a Strin...
Creates an StringIsLessThan expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a String). @throws IllegalArgumentException If the constant is not a String @return A new is less than binary expression.
[ "Creates", "an", "StringIsLessThan", "expression", "from", "the", "given", "expression", "and", "constant", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L389-L395
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getAllRows
public Iterable<DRow> getAllRows(String storeName) { """ Get {@link DRow} object for the given row key. the object will be returned even if the row has no columns or does not exist @param storeName Name of physical store to query. @return {@link DRow} object. May be empty but not null. """ ...
java
public Iterable<DRow> getAllRows(String storeName) { return new SequenceIterable<DRow>(new RowSequence(m_tenant, storeName, 65536)); }
[ "public", "Iterable", "<", "DRow", ">", "getAllRows", "(", "String", "storeName", ")", "{", "return", "new", "SequenceIterable", "<", "DRow", ">", "(", "new", "RowSequence", "(", "m_tenant", ",", "storeName", ",", "65536", ")", ")", ";", "}" ]
Get {@link DRow} object for the given row key. the object will be returned even if the row has no columns or does not exist @param storeName Name of physical store to query. @return {@link DRow} object. May be empty but not null.
[ "Get", "{", "@link", "DRow", "}", "object", "for", "the", "given", "row", "key", ".", "the", "object", "will", "be", "returned", "even", "if", "the", "row", "has", "no", "columns", "or", "does", "not", "exist" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L298-L300
threerings/nenya
core/src/main/java/com/threerings/util/DirectionUtil.java
DirectionUtil.getFineDirection
public static int getFineDirection (int ax, int ay, int bx, int by) { """ Returns which of the sixteen compass directions that point <code>b</code> lies in from point <code>a</code> as one of the {@link DirectionCodes} direction constants. <em>Note:</em> that the coordinates supplied are assumed to be logical (s...
java
public static int getFineDirection (int ax, int ay, int bx, int by) { return getFineDirection(Math.atan2(by-ay, bx-ax)); }
[ "public", "static", "int", "getFineDirection", "(", "int", "ax", ",", "int", "ay", ",", "int", "bx", ",", "int", "by", ")", "{", "return", "getFineDirection", "(", "Math", ".", "atan2", "(", "by", "-", "ay", ",", "bx", "-", "ax", ")", ")", ";", "...
Returns which of the sixteen compass directions that point <code>b</code> lies in from point <code>a</code> as one of the {@link DirectionCodes} direction constants. <em>Note:</em> that the coordinates supplied are assumed to be logical (screen) rather than cartesian coordinates and <code>NORTH</code> is considered to ...
[ "Returns", "which", "of", "the", "sixteen", "compass", "directions", "that", "point", "<code", ">", "b<", "/", "code", ">", "lies", "in", "from", "point", "<code", ">", "a<", "/", "code", ">", "as", "one", "of", "the", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/DirectionUtil.java#L242-L245
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/QueryByCriteria.java
QueryByCriteria.addOrderBy
public void addOrderBy(String fieldName, boolean sortAscending) { """ Adds a field for orderBy @param fieldName The field name to be used @param sortAscending true for ASCENDING, false for DESCENDING """ if (fieldName != null) { m_orderby.add(new FieldHelper(fieldName, ...
java
public void addOrderBy(String fieldName, boolean sortAscending) { if (fieldName != null) { m_orderby.add(new FieldHelper(fieldName, sortAscending)); } }
[ "public", "void", "addOrderBy", "(", "String", "fieldName", ",", "boolean", "sortAscending", ")", "{", "if", "(", "fieldName", "!=", "null", ")", "{", "m_orderby", ".", "add", "(", "new", "FieldHelper", "(", "fieldName", ",", "sortAscending", ")", ")", ";"...
Adds a field for orderBy @param fieldName The field name to be used @param sortAscending true for ASCENDING, false for DESCENDING
[ "Adds", "a", "field", "for", "orderBy" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/QueryByCriteria.java#L403-L409
Netflix/zuul
zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java
SessionContext.addFilterExecutionSummary
public void addFilterExecutionSummary(String name, String status, long time) { """ appends filter name and status to the filter execution history for the current request """ StringBuilder sb = getFilterExecutionSummary(); if (sb.length() > 0) sb.append(", "); sb.append(name).append('['...
java
public void addFilterExecutionSummary(String name, String status, long time) { StringBuilder sb = getFilterExecutionSummary(); if (sb.length() > 0) sb.append(", "); sb.append(name).append('[').append(status).append(']').append('[').append(time).append("ms]"); }
[ "public", "void", "addFilterExecutionSummary", "(", "String", "name", ",", "String", "status", ",", "long", "time", ")", "{", "StringBuilder", "sb", "=", "getFilterExecutionSummary", "(", ")", ";", "if", "(", "sb", ".", "length", "(", ")", ">", "0", ")", ...
appends filter name and status to the filter execution history for the current request
[ "appends", "filter", "name", "and", "status", "to", "the", "filter", "execution", "history", "for", "the", "current", "request" ]
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/zuul/context/SessionContext.java#L305-L309
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/DatabaseClientFactory.java
DatabaseClientFactory.newClient
@Deprecated static public DatabaseClient newClient(String host, int port, String database, String user, String password, Authentication type, SSLContext context, SSLHostnameVerifier verifier) { """ Creates a client to access the database by means of a REST server. The CallManager interface can only call an en...
java
@Deprecated static public DatabaseClient newClient(String host, int port, String database, String user, String password, Authentication type, SSLContext context, SSLHostnameVerifier verifier) { return newClient(host, port, database, makeSecurityContext(user, password, type, context, verifier), null); }
[ "@", "Deprecated", "static", "public", "DatabaseClient", "newClient", "(", "String", "host", ",", "int", "port", ",", "String", "database", ",", "String", "user", ",", "String", "password", ",", "Authentication", "type", ",", "SSLContext", "context", ",", "SSL...
Creates a client to access the database by means of a REST server. The CallManager interface can only call an endpoint for the configured content database of the appserver. You cannot specify the database when constructing a client for working with a CallManager. @param host the host with the REST server @param port ...
[ "Creates", "a", "client", "to", "access", "the", "database", "by", "means", "of", "a", "REST", "server", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/DatabaseClientFactory.java#L1364-L1367
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java
StrSpliter.splitToArray
public static String[] splitToArray(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty) { """ 切分字符串为字符串数组 @param str 被切分的字符串 @param separator 分隔符字符 @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8 """ return toArray...
java
public static String[] splitToArray(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty){ return toArray(split(str, separator, limit, isTrim, ignoreEmpty)); }
[ "public", "static", "String", "[", "]", "splitToArray", "(", "String", "str", ",", "String", "separator", ",", "int", "limit", ",", "boolean", "isTrim", ",", "boolean", "ignoreEmpty", ")", "{", "return", "toArray", "(", "split", "(", "str", ",", "separator...
切分字符串为字符串数组 @param str 被切分的字符串 @param separator 分隔符字符 @param limit 限制分片数 @param isTrim 是否去除切分字符串后每个元素两边的空格 @param ignoreEmpty 是否忽略空串 @return 切分后的集合 @since 3.0.8
[ "切分字符串为字符串数组" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrSpliter.java#L336-L338
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.sendEmail
public <T extends IEntity> T sendEmail(T entity) throws FMSException { """ Send entity via email using address associated with this entity in the system @param entity @param <T> @return @throws FMSException """ return sendEmail(entity, null); }
java
public <T extends IEntity> T sendEmail(T entity) throws FMSException { return sendEmail(entity, null); }
[ "public", "<", "T", "extends", "IEntity", ">", "T", "sendEmail", "(", "T", "entity", ")", "throws", "FMSException", "{", "return", "sendEmail", "(", "entity", ",", "null", ")", ";", "}" ]
Send entity via email using address associated with this entity in the system @param entity @param <T> @return @throws FMSException
[ "Send", "entity", "via", "email", "using", "address", "associated", "with", "this", "entity", "in", "the", "system" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L548-L550
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizedToPixelError.java
NormalizedToPixelError.set
public void set(double fx, double fy, double skew) { """ Specify camera intrinsic parameters @param fx focal length x @param fy focal length y @param skew camera skew """ this.fx = fx; this.fy = fy; this.skew = skew; }
java
public void set(double fx, double fy, double skew) { this.fx = fx; this.fy = fy; this.skew = skew; }
[ "public", "void", "set", "(", "double", "fx", ",", "double", "fy", ",", "double", "skew", ")", "{", "this", ".", "fx", "=", "fx", ";", "this", ".", "fy", "=", "fy", ";", "this", ".", "skew", "=", "skew", ";", "}" ]
Specify camera intrinsic parameters @param fx focal length x @param fy focal length y @param skew camera skew
[ "Specify", "camera", "intrinsic", "parameters" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/NormalizedToPixelError.java#L48-L52
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java
Util.extractUserNameFromScopedName
public static String extractUserNameFromScopedName(byte[] scopedNameBytes) throws UnsupportedEncodingException { """ See csiv2 spec 16.2.5 par. 63-64. We extract the username if any and un-escape any escaped \ and @ characters. @param scopedNameBytes @return @throws UnsupportedEncodingException """ ...
java
public static String extractUserNameFromScopedName(byte[] scopedNameBytes) throws UnsupportedEncodingException { String scopedUserName = new String(scopedNameBytes, "UTF8"); return extractUserNameFromScopedName(scopedUserName); }
[ "public", "static", "String", "extractUserNameFromScopedName", "(", "byte", "[", "]", "scopedNameBytes", ")", "throws", "UnsupportedEncodingException", "{", "String", "scopedUserName", "=", "new", "String", "(", "scopedNameBytes", ",", "\"UTF8\"", ")", ";", "return", ...
See csiv2 spec 16.2.5 par. 63-64. We extract the username if any and un-escape any escaped \ and @ characters. @param scopedNameBytes @return @throws UnsupportedEncodingException
[ "See", "csiv2", "spec", "16", ".", "2", ".", "5", "par", ".", "63", "-", "64", ".", "We", "extract", "the", "username", "if", "any", "and", "un", "-", "escape", "any", "escaped", "\\", "and", "@", "characters", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java#L317-L320
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.deletePackage
public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { """ Deletes a project package. <pre><code>GitLab Endpoint: DELETE /projects/:id/packages/:package_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instanc...
java
public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { if (packageId == null) { throw new RuntimeException("packageId cannot be null"); } delete(Response.Status.NO_CONTENT, null,"projects", getProjectIdOrPath(projectIdOrPath), "packages", p...
[ "public", "void", "deletePackage", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ")", "throws", "GitLabApiException", "{", "if", "(", "packageId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"packageId cannot be null\"", ")", ...
Deletes a project package. <pre><code>GitLab Endpoint: DELETE /projects/:id/packages/:package_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to delete @throws GitLabApiException if any exception occurs
[ "Deletes", "a", "project", "package", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L196-L203
actorapp/actor-platform
actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java
VerticalViewPager.smoothScrollTo
void smoothScrollTo(int x, int y, int velocity) { """ Like {@link View#scrollBy}, but scroll smoothly instead of immediately. @param x the number of pixels to scroll by on the X axis @param y the number of pixels to scroll by on the Y axis @param velocity the velocity associated with a fling, if...
java
void smoothScrollTo(int x, int y, int velocity) { if (getChildCount() == 0) { // Nothing to do. setScrollingCacheEnabled(false); return; } int sx = getScrollX(); int sy = getScrollY(); int dx = x - sx; int dy = y - sy; if (dx ==...
[ "void", "smoothScrollTo", "(", "int", "x", ",", "int", "y", ",", "int", "velocity", ")", "{", "if", "(", "getChildCount", "(", ")", "==", "0", ")", "{", "// Nothing to do.", "setScrollingCacheEnabled", "(", "false", ")", ";", "return", ";", "}", "int", ...
Like {@link View#scrollBy}, but scroll smoothly instead of immediately. @param x the number of pixels to scroll by on the X axis @param y the number of pixels to scroll by on the Y axis @param velocity the velocity associated with a fling, if applicable. (0 otherwise)
[ "Like", "{", "@link", "View#scrollBy", "}", "but", "scroll", "smoothly", "instead", "of", "immediately", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java#L653-L692
rythmengine/rythmengine
src/main/java/org/rythmengine/template/TemplateBase.java
TemplateBase.__getRenderPropertyAs
protected final <T> T __getRenderPropertyAs(String name, T def) { """ Get render property by name and do type cast to the specified default value. If the render property cannot be found by name, then return the default value @param name @param def @param <T> @return a render property @see #__getRenderPrope...
java
protected final <T> T __getRenderPropertyAs(String name, T def) { Object o = __getRenderProperty(name, def); return null == o ? def : (T) o; }
[ "protected", "final", "<", "T", ">", "T", "__getRenderPropertyAs", "(", "String", "name", ",", "T", "def", ")", "{", "Object", "o", "=", "__getRenderProperty", "(", "name", ",", "def", ")", ";", "return", "null", "==", "o", "?", "def", ":", "(", "T",...
Get render property by name and do type cast to the specified default value. If the render property cannot be found by name, then return the default value @param name @param def @param <T> @return a render property @see #__getRenderProperty(String)
[ "Get", "render", "property", "by", "name", "and", "do", "type", "cast", "to", "the", "specified", "default", "value", ".", "If", "the", "render", "property", "cannot", "be", "found", "by", "name", "then", "return", "the", "default", "value" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/template/TemplateBase.java#L1108-L1111
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.getParent
public FilePath getParent() { """ Gets the parent file. @return parent FilePath or null if there is no parent """ int i = remote.length() - 2; for (; i >= 0; i--) { char ch = remote.charAt(i); if(ch=='\\' || ch=='/') break; } return i >=...
java
public FilePath getParent() { int i = remote.length() - 2; for (; i >= 0; i--) { char ch = remote.charAt(i); if(ch=='\\' || ch=='/') break; } return i >= 0 ? new FilePath( channel, remote.substring(0,i+1) ) : null; }
[ "public", "FilePath", "getParent", "(", ")", "{", "int", "i", "=", "remote", ".", "length", "(", ")", "-", "2", ";", "for", "(", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "char", "ch", "=", "remote", ".", "charAt", "(", "i", ")", ";", ...
Gets the parent file. @return parent FilePath or null if there is no parent
[ "Gets", "the", "parent", "file", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1350-L1359
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.getDataSource
protected DataSource getDataSource( HttpServletRequest request, String key ) { """ Return the specified data source for the current Struts module. @param request The servlet request we are processing @param key The key specified in the <code>&lt;message-resources&gt;</code> element for the requested bund...
java
protected DataSource getDataSource( HttpServletRequest request, String key ) { // Return the requested data source instance return ( DataSource ) getServletContext().getAttribute( key + getModuleConfig().getPrefix() ); }
[ "protected", "DataSource", "getDataSource", "(", "HttpServletRequest", "request", ",", "String", "key", ")", "{", "// Return the requested data source instance", "return", "(", "DataSource", ")", "getServletContext", "(", ")", ".", "getAttribute", "(", "key", "+", "ge...
Return the specified data source for the current Struts module. @param request The servlet request we are processing @param key The key specified in the <code>&lt;message-resources&gt;</code> element for the requested bundle
[ "Return", "the", "specified", "data", "source", "for", "the", "current", "Struts", "module", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1596-L1600
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java
Vector.removeRange
protected synchronized void removeRange(int fromIndex, int toIndex) { """ Removes from this list all of the elements whose index is between {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by {@code (toInd...
java
protected synchronized void removeRange(int fromIndex, int toIndex) { modCount++; int numMoved = elementCount - toIndex; System.arraycopy(elementData, toIndex, elementData, fromIndex, numMoved); // Let gc do its work int newElementCount = elementCount - ...
[ "protected", "synchronized", "void", "removeRange", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "modCount", "++", ";", "int", "numMoved", "=", "elementCount", "-", "toIndex", ";", "System", ".", "arraycopy", "(", "elementData", ",", "toIndex", ...
Removes from this list all of the elements whose index is between {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. Shifts any succeeding elements to the left (reduces their index). This call shortens the list by {@code (toIndex - fromIndex)} elements. (If {@code toIndex==fromIndex}, this operation has no e...
[ "Removes", "from", "this", "list", "all", "of", "the", "elements", "whose", "index", "is", "between", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L1049-L1059
nemerosa/ontrack
ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BuildController.java
BuildController.deleteBuildLink
@RequestMapping(value = "builds/ { """ Deletes a link between a build and another @param buildId From this build... @param targetBuildId ... to this build @return List of builds """buildId}/links/{targetBuildId}", method = RequestMethod.DELETE) public Build deleteBuildLink(@PathVariable ID build...
java
@RequestMapping(value = "builds/{buildId}/links/{targetBuildId}", method = RequestMethod.DELETE) public Build deleteBuildLink(@PathVariable ID buildId, @PathVariable ID targetBuildId) { Build build = structureService.getBuild(buildId); Build targetBuild = structureService.getBuild(targetBuildId); ...
[ "@", "RequestMapping", "(", "value", "=", "\"builds/{buildId}/links/{targetBuildId}\"", ",", "method", "=", "RequestMethod", ".", "DELETE", ")", "public", "Build", "deleteBuildLink", "(", "@", "PathVariable", "ID", "buildId", ",", "@", "PathVariable", "ID", "targetB...
Deletes a link between a build and another @param buildId From this build... @param targetBuildId ... to this build @return List of builds
[ "Deletes", "a", "link", "between", "a", "build", "and", "another" ]
train
https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BuildController.java#L330-L336
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/navLink/NavLinkRenderer.java
NavLinkRenderer.getStyleClasses
private static String getStyleClasses(AbstractNavLink link, boolean isResponsive) { """ Collects the CSS classes of the link. @return the CSS classes (separated by a space). """ StringBuilder sb; sb = new StringBuilder(20); // optimize int String look = null; if (link instanceof Link) { look = (...
java
private static String getStyleClasses(AbstractNavLink link, boolean isResponsive) { StringBuilder sb; sb = new StringBuilder(20); // optimize int String look = null; if (link instanceof Link) { look = ((Link) link).getLook(); } else if (link instanceof CommandLink) { look = ((CommandLink) link).getLook...
[ "private", "static", "String", "getStyleClasses", "(", "AbstractNavLink", "link", ",", "boolean", "isResponsive", ")", "{", "StringBuilder", "sb", ";", "sb", "=", "new", "StringBuilder", "(", "20", ")", ";", "// optimize int", "String", "look", "=", "null", ";...
Collects the CSS classes of the link. @return the CSS classes (separated by a space).
[ "Collects", "the", "CSS", "classes", "of", "the", "link", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/navLink/NavLinkRenderer.java#L442-L461
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.latitudeToPixelY
public static double latitudeToPixelY(double latitude, byte zoomLevel, int tileSize) { """ Converts a latitude coordinate (in degrees) to a pixel Y coordinate at a certain zoom level. @param latitude the latitude coordinate that should be converted. @param zoomLevel the zoom level at which the coordinate shou...
java
public static double latitudeToPixelY(double latitude, byte zoomLevel, int tileSize) { double sinLatitude = Math.sin(latitude * (Math.PI / 180)); long mapSize = getMapSize(zoomLevel, tileSize); // FIXME improve this formula so that it works correctly without the clipping double pixelY = ...
[ "public", "static", "double", "latitudeToPixelY", "(", "double", "latitude", ",", "byte", "zoomLevel", ",", "int", "tileSize", ")", "{", "double", "sinLatitude", "=", "Math", ".", "sin", "(", "latitude", "*", "(", "Math", ".", "PI", "/", "180", ")", ")",...
Converts a latitude coordinate (in degrees) to a pixel Y coordinate at a certain zoom level. @param latitude the latitude coordinate that should be converted. @param zoomLevel the zoom level at which the coordinate should be converted. @return the pixel Y coordinate of the latitude value.
[ "Converts", "a", "latitude", "coordinate", "(", "in", "degrees", ")", "to", "a", "pixel", "Y", "coordinate", "at", "a", "certain", "zoom", "level", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L201-L207
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.createInstance
public static Object createInstance(final String className, final ClassLoader classLoader) { """ Create an instance with Class.forName(..) and wrap all exceptions into RuntimeExceptions. @param className Full qualified class name - Cannot be <code>null</code>. @param classLoader Dedicated class loader to use...
java
public static Object createInstance(final String className, final ClassLoader classLoader) { checkNotNull("className", className); checkNotNull("classLoader", classLoader); try { final Class<?> clasz = Class.forName(className, true, classLoader); return clasz.newInst...
[ "public", "static", "Object", "createInstance", "(", "final", "String", "className", ",", "final", "ClassLoader", "classLoader", ")", "{", "checkNotNull", "(", "\"className\"", ",", "className", ")", ";", "checkNotNull", "(", "\"classLoader\"", ",", "classLoader", ...
Create an instance with Class.forName(..) and wrap all exceptions into RuntimeExceptions. @param className Full qualified class name - Cannot be <code>null</code>. @param classLoader Dedicated class loader to use - Cannot be <code>NULL</code>. @return New instance of the class.
[ "Create", "an", "instance", "with", "Class", ".", "forName", "(", "..", ")", "and", "wrap", "all", "exceptions", "into", "RuntimeExceptions", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L194-L207
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java
CPDAvailabilityEstimatePersistenceImpl.findAll
@Override public List<CPDAvailabilityEstimate> findAll(int start, int end) { """ Returns a range of all the cpd availability estimates. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in...
java
@Override public List<CPDAvailabilityEstimate> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDAvailabilityEstimate", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cpd availability estimates. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both ...
[ "Returns", "a", "range", "of", "all", "the", "cpd", "availability", "estimates", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java#L2921-L2924
geomajas/geomajas-project-server
api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java
ManyToOneAttribute.setCurrencyAttribute
public void setCurrencyAttribute(String name, String value) { """ Sets the specified currency attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0 """ ensureValue(); Attribute attribute = new CurrencyAttribute(value); attribute.setEdita...
java
public void setCurrencyAttribute(String name, String value) { ensureValue(); Attribute attribute = new CurrencyAttribute(value); attribute.setEditable(isEditable(name)); getValue().getAllAttributes().put(name, attribute); }
[ "public", "void", "setCurrencyAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "ensureValue", "(", ")", ";", "Attribute", "attribute", "=", "new", "CurrencyAttribute", "(", "value", ")", ";", "attribute", ".", "setEditable", "(", "isEditabl...
Sets the specified currency attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0
[ "Sets", "the", "specified", "currency", "attribute", "to", "the", "specified", "value", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L132-L137
forge/furnace
container/src/main/java/org/jboss/forge/furnace/impl/util/Files.java
Files.doCopyFile
private static void doCopyFile(File srcFile, File destFile) throws IOException { """ Internal copy file method. @param srcFile the validated source file, must not be <code>null</code> @param destFile the validated destination file, must not be <code>null</code> @throws IOException if an error occurs """ ...
java
private static void doCopyFile(File srcFile, File destFile) throws IOException { if (destFile.exists() && destFile.isDirectory()) { throw new IOException("Destination '" + destFile + "' exists but is a directory"); } FileInputStream fis = null; FileOutputStream fos = null; ...
[ "private", "static", "void", "doCopyFile", "(", "File", "srcFile", ",", "File", "destFile", ")", "throws", "IOException", "{", "if", "(", "destFile", ".", "exists", "(", ")", "&&", "destFile", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "IOEx...
Internal copy file method. @param srcFile the validated source file, must not be <code>null</code> @param destFile the validated destination file, must not be <code>null</code> @throws IOException if an error occurs
[ "Internal", "copy", "file", "method", "." ]
train
https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/container/src/main/java/org/jboss/forge/furnace/impl/util/Files.java#L237-L276
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.mixin
public static void mixin(Class self, Class[] categoryClass) { """ Extend class globally with category methods. @param self any Class @param categoryClass a category class to use @since 1.6.0 """ mixin(getMetaClass(self), Arrays.asList(categoryClass)); }
java
public static void mixin(Class self, Class[] categoryClass) { mixin(getMetaClass(self), Arrays.asList(categoryClass)); }
[ "public", "static", "void", "mixin", "(", "Class", "self", ",", "Class", "[", "]", "categoryClass", ")", "{", "mixin", "(", "getMetaClass", "(", "self", ")", ",", "Arrays", ".", "asList", "(", "categoryClass", ")", ")", ";", "}" ]
Extend class globally with category methods. @param self any Class @param categoryClass a category class to use @since 1.6.0
[ "Extend", "class", "globally", "with", "category", "methods", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L600-L602
atomix/copycat
server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java
AbstractAppender.buildAppendRequest
protected AppendRequest buildAppendRequest(MemberState member, long lastIndex) { """ Builds an append request. @param member The member to which to send the request. @return The append request. """ // If the log is empty then send an empty commit. // If the next index hasn't yet been set then we se...
java
protected AppendRequest buildAppendRequest(MemberState member, long lastIndex) { // If the log is empty then send an empty commit. // If the next index hasn't yet been set then we send an empty commit first. // If the next index is greater than the last index then send an empty commit. // If the member ...
[ "protected", "AppendRequest", "buildAppendRequest", "(", "MemberState", "member", ",", "long", "lastIndex", ")", "{", "// If the log is empty then send an empty commit.", "// If the next index hasn't yet been set then we send an empty commit first.", "// If the next index is greater than t...
Builds an append request. @param member The member to which to send the request. @return The append request.
[ "Builds", "an", "append", "request", "." ]
train
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/state/AbstractAppender.java#L61-L72
ansell/restlet-utils
src/main/java/com/github/ansell/restletutils/FixedRedirectCookieAuthenticator.java
FixedRedirectCookieAuthenticator.authenticate
@Override protected boolean authenticate(final Request request, final Response response) { """ Restores credentials from the cookie named {@link #getCookieName()} if available. The usual processing is the followed. """ // Restore credentials from the cookie final Cookie credentialsCookie =...
java
@Override protected boolean authenticate(final Request request, final Response response) { // Restore credentials from the cookie final Cookie credentialsCookie = request.getCookies().getFirst(this.getCookieName()); if(credentialsCookie != null) { ChallengeRe...
[ "@", "Override", "protected", "boolean", "authenticate", "(", "final", "Request", "request", ",", "final", "Response", "response", ")", "{", "// Restore credentials from the cookie", "final", "Cookie", "credentialsCookie", "=", "request", ".", "getCookies", "(", ")", ...
Restores credentials from the cookie named {@link #getCookieName()} if available. The usual processing is the followed.
[ "Restores", "credentials", "from", "the", "cookie", "named", "{" ]
train
https://github.com/ansell/restlet-utils/blob/6c39a3e91aa8295936af1dbfccd6ba27230c40a9/src/main/java/com/github/ansell/restletutils/FixedRedirectCookieAuthenticator.java#L230-L251
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java
NodeReportsInner.get
public DscNodeReportInner get(String resourceGroupName, String automationAccountName, String nodeId, String reportId) { """ Retrieve the Dsc node report data by node id and report id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @pa...
java
public DscNodeReportInner get(String resourceGroupName, String automationAccountName, String nodeId, String reportId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId, reportId).toBlocking().single().body(); }
[ "public", "DscNodeReportInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "nodeId", ",", "String", "reportId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName"...
Retrieve the Dsc node report data by node id and report id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The Dsc node id. @param reportId The report id. @throws IllegalArgumentException thrown if parameters fail the validation ...
[ "Retrieve", "the", "Dsc", "node", "report", "data", "by", "node", "id", "and", "report", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java#L347-L349
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java
JCRStatisticsManager.registerStatistics
public static void registerStatistics(String category, Statistics global, Map<String, Statistics> allStatistics) { """ Register a new category of statistics to manage. @param category the name of the category of statistics to register. @param global the global statistics. @param allStatistics the list of all st...
java
public static void registerStatistics(String category, Statistics global, Map<String, Statistics> allStatistics) { if (category == null || category.length() == 0) { throw new IllegalArgumentException("The category of the statistics cannot be empty"); } if (allStatistics == null || al...
[ "public", "static", "void", "registerStatistics", "(", "String", "category", ",", "Statistics", "global", ",", "Map", "<", "String", ",", "Statistics", ">", "allStatistics", ")", "{", "if", "(", "category", "==", "null", "||", "category", ".", "length", "(",...
Register a new category of statistics to manage. @param category the name of the category of statistics to register. @param global the global statistics. @param allStatistics the list of all statistics corresponding to the category.
[ "Register", "a", "new", "category", "of", "statistics", "to", "manage", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/statistics/JCRStatisticsManager.java#L105-L137
box/box-java-sdk
src/main/java/com/box/sdk/BoxJSONResponse.java
BoxJSONResponse.getJSON
public String getJSON() { """ Gets the body of the response as a JSON string. When this method is called, the response's body will be read and the response will be disconnected, meaning that the stream returned by {@link #getBody} can no longer be used. @return the body of the response as a JSON string. """ ...
java
public String getJSON() { if (this.jsonObject != null) { return this.jsonObject.toString(); } else { InputStreamReader reader = new InputStreamReader(this.getBody(), StandardCharsets.UTF_8); StringBuilder builder = new StringBuilder(); char[] buffer = new ...
[ "public", "String", "getJSON", "(", ")", "{", "if", "(", "this", ".", "jsonObject", "!=", "null", ")", "{", "return", "this", ".", "jsonObject", ".", "toString", "(", ")", ";", "}", "else", "{", "InputStreamReader", "reader", "=", "new", "InputStreamRead...
Gets the body of the response as a JSON string. When this method is called, the response's body will be read and the response will be disconnected, meaning that the stream returned by {@link #getBody} can no longer be used. @return the body of the response as a JSON string.
[ "Gets", "the", "body", "of", "the", "response", "as", "a", "JSON", "string", ".", "When", "this", "method", "is", "called", "the", "response", "s", "body", "will", "be", "read", "and", "the", "response", "will", "be", "disconnected", "meaning", "that", "...
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxJSONResponse.java#L63-L86
JodaOrg/joda-time
src/main/java/org/joda/time/PeriodType.java
PeriodType.setIndexedField
boolean setIndexedField(ReadablePeriod period, int index, int[] values, int newValue) { """ Sets the indexed field part of the period. @param period the period to query @param index the index to use @param values the array to populate @param newValue the value to set @throws UnsupportedOperationExceptio...
java
boolean setIndexedField(ReadablePeriod period, int index, int[] values, int newValue) { int realIndex = iIndices[index]; if (realIndex == -1) { throw new UnsupportedOperationException("Field is not supported"); } values[realIndex] = newValue; return true; }
[ "boolean", "setIndexedField", "(", "ReadablePeriod", "period", ",", "int", "index", ",", "int", "[", "]", "values", ",", "int", "newValue", ")", "{", "int", "realIndex", "=", "iIndices", "[", "index", "]", ";", "if", "(", "realIndex", "==", "-", "1", "...
Sets the indexed field part of the period. @param period the period to query @param index the index to use @param values the array to populate @param newValue the value to set @throws UnsupportedOperationException if not supported
[ "Sets", "the", "indexed", "field", "part", "of", "the", "period", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/PeriodType.java#L687-L694
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, Byte[] value) { """ Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this} """ return put(key, getNodeFactory().binaryNode(value)); }
java
public T put(YamlNode key, Byte[] value) { return put(key, getNodeFactory().binaryNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "Byte", "[", "]", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "binaryNode", "(", "value", ")", ")", ";", "}" ]
Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this}
[ "Adds", "the", "specified", "{", "@code", "key", "}", "/", "{", "@code", "value", "}", "pair", "to", "this", "mapping", "." ]
train
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java#L348-L350
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.addSubResources
private void addSubResources(CmsDbContext dbc, CmsPublishList publishList, CmsResource directPublishResource) throws CmsDataAccessException { """ Adds all sub-resources of the given resource to the publish list.<p> @param dbc the database context @param publishList the publish list @param directPublishRes...
java
private void addSubResources(CmsDbContext dbc, CmsPublishList publishList, CmsResource directPublishResource) throws CmsDataAccessException { int flags = CmsDriverManager.READMODE_INCLUDE_TREE | CmsDriverManager.READMODE_EXCLUDE_STATE; if (!directPublishResource.getState().isDeleted()) { ...
[ "private", "void", "addSubResources", "(", "CmsDbContext", "dbc", ",", "CmsPublishList", "publishList", ",", "CmsResource", "directPublishResource", ")", "throws", "CmsDataAccessException", "{", "int", "flags", "=", "CmsDriverManager", ".", "READMODE_INCLUDE_TREE", "|", ...
Adds all sub-resources of the given resource to the publish list.<p> @param dbc the database context @param publishList the publish list @param directPublishResource the resource to get the sub-resources for @throws CmsDataAccessException if something goes wrong accessing the database
[ "Adds", "all", "sub", "-", "resources", "of", "the", "given", "resource", "to", "the", "publish", "list", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L10661-L10702
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java
HawkbitCommonUtil.getArtifactUploadPopupWidth
public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) { """ Get artifact upload pop up width. @param newBrowserWidth new browser width @param minPopupWidth minimum popup width @return float new pop up width """ final float extraWidth = findRequired...
java
public static float getArtifactUploadPopupWidth(final float newBrowserWidth, final int minPopupWidth) { final float extraWidth = findRequiredSwModuleExtraWidth(newBrowserWidth); if (extraWidth + minPopupWidth > SPUIDefinitions.MAX_UPLOAD_CONFIRMATION_POPUP_WIDTH) { return SPUIDefinitions.MAX...
[ "public", "static", "float", "getArtifactUploadPopupWidth", "(", "final", "float", "newBrowserWidth", ",", "final", "int", "minPopupWidth", ")", "{", "final", "float", "extraWidth", "=", "findRequiredSwModuleExtraWidth", "(", "newBrowserWidth", ")", ";", "if", "(", ...
Get artifact upload pop up width. @param newBrowserWidth new browser width @param minPopupWidth minimum popup width @return float new pop up width
[ "Get", "artifact", "upload", "pop", "up", "width", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L202-L208
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newIllegalStateException
public static IllegalStateException newIllegalStateException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link IllegalStateException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause ...
java
public static IllegalStateException newIllegalStateException(Throwable cause, String message, Object... args) { return new IllegalStateException(format(message, args), cause); }
[ "public", "static", "IllegalStateException", "newIllegalStateException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "IllegalStateException", "(", "format", "(", "message", ",", "args", ")", ",", ...
Constructs and initializes a new {@link IllegalStateException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link IllegalStateException} was thrown. @param message {@link String} desc...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IllegalStateException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Ob...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L90-L92
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/opengl/CursorLoader.java
CursorLoader.getAnimatedCursor
public Cursor getAnimatedCursor(String ref,int x,int y, int width, int height, int[] cursorDelays) throws IOException, LWJGLException { """ Get a cursor based on a image reference on the classpath. The image is assumed to be a set/strip of cursor animation frames running from top to bottom. @param ref The ref...
java
public Cursor getAnimatedCursor(String ref,int x,int y, int width, int height, int[] cursorDelays) throws IOException, LWJGLException { IntBuffer cursorDelaysBuffer = ByteBuffer.allocateDirect(cursorDelays.length*4).order(ByteOrder.nativeOrder()).asIntBuffer(); for (int i=0;i<cursorDelays.length;i++) { cursor...
[ "public", "Cursor", "getAnimatedCursor", "(", "String", "ref", ",", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ",", "int", "[", "]", "cursorDelays", ")", "throws", "IOException", ",", "LWJGLException", "{", "IntBuffer", "cursor...
Get a cursor based on a image reference on the classpath. The image is assumed to be a set/strip of cursor animation frames running from top to bottom. @param ref The reference to the image to be loaded @param x The x-coordinate of the cursor hotspot (left -> right) @param y The y-coordinate of the cursor hotspot (bot...
[ "Get", "a", "cursor", "based", "on", "a", "image", "reference", "on", "the", "classpath", ".", "The", "image", "is", "assumed", "to", "be", "a", "set", "/", "strip", "of", "cursor", "animation", "frames", "running", "from", "top", "to", "bottom", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/opengl/CursorLoader.java#L171-L182
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyChildRangeInserted
@UiThread public void notifyChildRangeInserted(int parentPosition, int childPositionStart, int itemCount) { """ Notify any registered observers that the parent reflected at {@code parentPosition} has {@code itemCount} child list items that have been newly inserted at {@code childPositionStart}. The child lis...
java
@UiThread public void notifyChildRangeInserted(int parentPosition, int childPositionStart, int itemCount) { int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition); parentWrapper.setParent(mParentList.get(...
[ "@", "UiThread", "public", "void", "notifyChildRangeInserted", "(", "int", "parentPosition", ",", "int", "childPositionStart", ",", "int", "itemCount", ")", "{", "int", "flatParentPosition", "=", "getFlatParentPosition", "(", "parentPosition", ")", ";", "ExpandableWra...
Notify any registered observers that the parent reflected at {@code parentPosition} has {@code itemCount} child list items that have been newly inserted at {@code childPositionStart}. The child list item previously at {@code childPositionStart} and beyond are now at position {@code childPositionStart + itemCount}. <p> ...
[ "Notify", "any", "registered", "observers", "that", "the", "parent", "reflected", "at", "{", "@code", "parentPosition", "}", "has", "{", "@code", "itemCount", "}", "child", "list", "items", "that", "have", "been", "newly", "inserted", "at", "{", "@code", "ch...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1157-L1171
korpling/ANNIS
annis-service/src/main/java/annis/dao/AbstractDao.java
AbstractDao.executeSqlFromScript
protected PreparedStatement executeSqlFromScript(String script, MapSqlParameterSource args) { """ executes an SQL script from $ANNIS_HOME/scripts, substituting the parameters found in args @param script @param args @return """ File fScript = new File(scriptPath, script); if (fScript.canRead()...
java
protected PreparedStatement executeSqlFromScript(String script, MapSqlParameterSource args) { File fScript = new File(scriptPath, script); if (fScript.canRead() && fScript.isFile()) { Resource resource = new FileSystemResource(fScript); log.debug("executing SQL script: " + resource.getFile...
[ "protected", "PreparedStatement", "executeSqlFromScript", "(", "String", "script", ",", "MapSqlParameterSource", "args", ")", "{", "File", "fScript", "=", "new", "File", "(", "scriptPath", ",", "script", ")", ";", "if", "(", "fScript", ".", "canRead", "(", ")"...
executes an SQL script from $ANNIS_HOME/scripts, substituting the parameters found in args @param script @param args @return
[ "executes", "an", "SQL", "script", "from", "$ANNIS_HOME", "/", "scripts", "substituting", "the", "parameters", "found", "in", "args" ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/dao/AbstractDao.java#L109-L125
geomajas/geomajas-project-graphics
graphics/src/main/java/org/geomajas/graphics/client/widget/SliderBar.java
SliderBar.onResize
public void onResize(int width, int height) { """ This method is called when the dimensions of the parent element change. Subclasses should override this method as needed. @param width the new client width of the element @param height the new client height of the element """ // Center the line in the...
java
public void onResize(int width, int height) { // Center the line in the shell int lineWidth = lineElement.getOffsetWidth(); lineLeftOffset = (width / 2) - (lineWidth / 2); DOM.setStyleAttribute(lineElement, "left", lineLeftOffset + "px"); // Draw the other components drawLabels(); drawTicks(); ...
[ "public", "void", "onResize", "(", "int", "width", ",", "int", "height", ")", "{", "// Center the line in the shell\r", "int", "lineWidth", "=", "lineElement", ".", "getOffsetWidth", "(", ")", ";", "lineLeftOffset", "=", "(", "width", "/", "2", ")", "-", "("...
This method is called when the dimensions of the parent element change. Subclasses should override this method as needed. @param width the new client width of the element @param height the new client height of the element
[ "This", "method", "is", "called", "when", "the", "dimensions", "of", "the", "parent", "element", "change", ".", "Subclasses", "should", "override", "this", "method", "as", "needed", "." ]
train
https://github.com/geomajas/geomajas-project-graphics/blob/1104196640e0ba455b8a619e774352a8e1e319ba/graphics/src/main/java/org/geomajas/graphics/client/widget/SliderBar.java#L520-L530
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMain.java
GVRMain.getSplashTexture
public GVRTexture getSplashTexture(GVRContext gvrContext) { """ Override this method to supply a custom splash screen image. @param gvrContext The new {@link GVRContext} @return Texture to display @since 1.6.4 """ Bitmap bitmap = BitmapFactory.decodeResource( // gvrContext.getCo...
java
public GVRTexture getSplashTexture(GVRContext gvrContext) { Bitmap bitmap = BitmapFactory.decodeResource( // gvrContext.getContext().getResources(), // R.drawable.__default_splash_screen__); GVRTexture tex = new GVRTexture(gvrContext); tex.setImage(new GVRBitmapIm...
[ "public", "GVRTexture", "getSplashTexture", "(", "GVRContext", "gvrContext", ")", "{", "Bitmap", "bitmap", "=", "BitmapFactory", ".", "decodeResource", "(", "//", "gvrContext", ".", "getContext", "(", ")", ".", "getResources", "(", ")", ",", "//", "R", ".", ...
Override this method to supply a custom splash screen image. @param gvrContext The new {@link GVRContext} @return Texture to display @since 1.6.4
[ "Override", "this", "method", "to", "supply", "a", "custom", "splash", "screen", "image", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMain.java#L280-L287
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java
VimGenerator2.generateKeywords
protected void generateKeywords(IStyleAppendable it, String family, VimSyntaxGroup color, Iterable<String> keywords) { """ Generate the Vim keywords. @param it the receiver of the generated elements. @param family the name of the keyword family. @param color the color to be associated to the elements. @param...
java
protected void generateKeywords(IStyleAppendable it, String family, VimSyntaxGroup color, Iterable<String> keywords) { appendComment(it, "keywords for the '" + family + "' family."); //$NON-NLS-1$ //$NON-NLS-2$ final Iterator<String> iterator = keywords.iterator(); if (iterator.hasNext()) { it.append("syn keyw...
[ "protected", "void", "generateKeywords", "(", "IStyleAppendable", "it", ",", "String", "family", ",", "VimSyntaxGroup", "color", ",", "Iterable", "<", "String", ">", "keywords", ")", "{", "appendComment", "(", "it", ",", "\"keywords for the '\"", "+", "family", ...
Generate the Vim keywords. @param it the receiver of the generated elements. @param family the name of the keyword family. @param color the color to be associated to the elements. @param keywords the keywords.
[ "Generate", "the", "Vim", "keywords", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java#L311-L326
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/parser/JSONParser.java
JSONParser.parse
public <T> T parse(Reader in, Class<T> mapTo) throws ParseException { """ use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory """ return getPStream().parse(in, JSONValue.defaultReader.getMapper(mapTo)); }
java
public <T> T parse(Reader in, Class<T> mapTo) throws ParseException { return getPStream().parse(in, JSONValue.defaultReader.getMapper(mapTo)); }
[ "public", "<", "T", ">", "T", "parse", "(", "Reader", "in", ",", "Class", "<", "T", ">", "mapTo", ")", "throws", "ParseException", "{", "return", "getPStream", "(", ")", ".", "parse", "(", "in", ",", "JSONValue", ".", "defaultReader", ".", "getMapper",...
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
[ "use", "to", "return", "Primitive", "Type", "or", "String", "Or", "JsonObject", "or", "JsonArray", "generated", "by", "a", "ContainerFactory" ]
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/parser/JSONParser.java#L254-L256
lucee/Lucee
core/src/main/java/lucee/runtime/writer/CFMLWriterImpl.java
CFMLWriterImpl.setBufferConfig
@Override public void setBufferConfig(int bufferSize, boolean autoFlush) throws IOException { """ reset configuration of buffer @param bufferSize size of the buffer @param autoFlush does the buffer autoflush @throws IOException """ this.bufferSize = bufferSize; this.autoFlush = autoFlush; _check();...
java
@Override public void setBufferConfig(int bufferSize, boolean autoFlush) throws IOException { this.bufferSize = bufferSize; this.autoFlush = autoFlush; _check(); }
[ "@", "Override", "public", "void", "setBufferConfig", "(", "int", "bufferSize", ",", "boolean", "autoFlush", ")", "throws", "IOException", "{", "this", ".", "bufferSize", "=", "bufferSize", ";", "this", ".", "autoFlush", "=", "autoFlush", ";", "_check", "(", ...
reset configuration of buffer @param bufferSize size of the buffer @param autoFlush does the buffer autoflush @throws IOException
[ "reset", "configuration", "of", "buffer" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/writer/CFMLWriterImpl.java#L121-L126
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java
ProjectiveStructureByFactorization.getCameraMatrix
public void getCameraMatrix(int view , DMatrixRMaj cameraMatrix ) { """ Used to get found camera matrix for a view @param view Which view @param cameraMatrix storage for 3x4 projective camera matrix """ cameraMatrix.reshape(3,4); CommonOps_DDRM.extract(P,view*3,0,cameraMatrix); for (int col = 0; col <...
java
public void getCameraMatrix(int view , DMatrixRMaj cameraMatrix ) { cameraMatrix.reshape(3,4); CommonOps_DDRM.extract(P,view*3,0,cameraMatrix); for (int col = 0; col < 4; col++) { cameraMatrix.data[cameraMatrix.getIndex(0,col)] *= pixelScale; cameraMatrix.data[cameraMatrix.getIndex(1,col)] *= pixelScale; ...
[ "public", "void", "getCameraMatrix", "(", "int", "view", ",", "DMatrixRMaj", "cameraMatrix", ")", "{", "cameraMatrix", ".", "reshape", "(", "3", ",", "4", ")", ";", "CommonOps_DDRM", ".", "extract", "(", "P", ",", "view", "*", "3", ",", "0", ",", "came...
Used to get found camera matrix for a view @param view Which view @param cameraMatrix storage for 3x4 projective camera matrix
[ "Used", "to", "get", "found", "camera", "matrix", "for", "a", "view" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L219-L227
killme2008/Metamorphosis
metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java
MetamorphosisOnJettyProcessor.doResponseHeaders
protected void doResponseHeaders(final HttpServletResponse response, final String mimeType) { """ Set the response headers. This method is called to set the response headers such as content type and content length. May be extended to add additional headers. @param response @param resource @param mimeType ...
java
protected void doResponseHeaders(final HttpServletResponse response, final String mimeType) { if (mimeType != null) { response.setContentType(mimeType); } }
[ "protected", "void", "doResponseHeaders", "(", "final", "HttpServletResponse", "response", ",", "final", "String", "mimeType", ")", "{", "if", "(", "mimeType", "!=", "null", ")", "{", "response", ".", "setContentType", "(", "mimeType", ")", ";", "}", "}" ]
Set the response headers. This method is called to set the response headers such as content type and content length. May be extended to add additional headers. @param response @param resource @param mimeType
[ "Set", "the", "response", "headers", ".", "This", "method", "is", "called", "to", "set", "the", "response", "headers", "such", "as", "content", "type", "and", "content", "length", ".", "May", "be", "extended", "to", "add", "additional", "headers", "." ]
train
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-server-wrapper/src/main/java/com/taobao/metamorphosis/http/processor/MetamorphosisOnJettyProcessor.java#L204-L208
drtrang/spring-boot-autoconfigure
src/main/java/com/github/trang/autoconfigure/mybatis/SqlMapper.java
SqlMapper.selectOne
public <T> T selectOne(String sql, Object value, Class<T> resultType) { """ 查询返回一个结果,多个结果时抛出异常 @param sql 执行的sql @param value 参数 @param resultType 返回的结果类型 @param <T> 泛型类型 @return result """ List<T> list = selectList(sql, value, resultType); return getOne(list); }
java
public <T> T selectOne(String sql, Object value, Class<T> resultType) { List<T> list = selectList(sql, value, resultType); return getOne(list); }
[ "public", "<", "T", ">", "T", "selectOne", "(", "String", "sql", ",", "Object", "value", ",", "Class", "<", "T", ">", "resultType", ")", "{", "List", "<", "T", ">", "list", "=", "selectList", "(", "sql", ",", "value", ",", "resultType", ")", ";", ...
查询返回一个结果,多个结果时抛出异常 @param sql 执行的sql @param value 参数 @param resultType 返回的结果类型 @param <T> 泛型类型 @return result
[ "查询返回一个结果,多个结果时抛出异常" ]
train
https://github.com/drtrang/spring-boot-autoconfigure/blob/6c9aa6352c22d3eb44f1edf93e89e8442d3f3efa/src/main/java/com/github/trang/autoconfigure/mybatis/SqlMapper.java#L103-L106
xm-online/xm-commons
xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java
PermissionCheckService.hasPermission
public boolean hasPermission(Authentication authentication, Object resource, Object privilege) { """ Check permission for role, privilege key and resource condition. @param authentication the authentication @param resource the resource @param pri...
java
public boolean hasPermission(Authentication authentication, Object resource, Object privilege) { boolean logPermission = isLogPermission(resource); return checkRole(authentication, privilege, logPermission) || checkPermission(...
[ "public", "boolean", "hasPermission", "(", "Authentication", "authentication", ",", "Object", "resource", ",", "Object", "privilege", ")", "{", "boolean", "logPermission", "=", "isLogPermission", "(", "resource", ")", ";", "return", "checkRole", "(", "authentication...
Check permission for role, privilege key and resource condition. @param authentication the authentication @param resource the resource @param privilege the privilege key @return true if permitted
[ "Check", "permission", "for", "role", "privilege", "key", "and", "resource", "condition", "." ]
train
https://github.com/xm-online/xm-commons/blob/43eb2273adb96f40830d7b905ee3a767b8715caf/xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java#L68-L74
dita-ot/dita-ot
src/main/java/org/dita/dost/platform/Integrator.java
Integrator.getValue
static String getValue(final Map<String, Features> featureTable, final String extension) { """ Get all and combine extension values @param featureTable plugin features @param extension extension ID @return combined extension value, {@code null} if no value available """ final List<String> buf = ne...
java
static String getValue(final Map<String, Features> featureTable, final String extension) { final List<String> buf = new ArrayList<>(); for (final Features f : featureTable.values()) { final List<String> v = f.getFeature(extension); if (v != null) { buf.addAll(v); ...
[ "static", "String", "getValue", "(", "final", "Map", "<", "String", ",", "Features", ">", "featureTable", ",", "final", "String", "extension", ")", "{", "final", "List", "<", "String", ">", "buf", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(...
Get all and combine extension values @param featureTable plugin features @param extension extension ID @return combined extension value, {@code null} if no value available
[ "Get", "all", "and", "combine", "extension", "values" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/Integrator.java#L914-L927
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java
AbstractBeanDefinition.getBeanProviderForField
@SuppressWarnings("WeakerAccess") @Internal protected final Provider getBeanProviderForField(BeanResolutionContext resolutionContext, BeanContext context, FieldInjectionPoint injectionPoint) { """ Obtains a bean definition for the field at the given index and the argument at the given index <p> Warning: ...
java
@SuppressWarnings("WeakerAccess") @Internal protected final Provider getBeanProviderForField(BeanResolutionContext resolutionContext, BeanContext context, FieldInjectionPoint injectionPoint) { return resolveBeanWithGenericsForField(resolutionContext, injectionPoint, (beanType, qualifier) -> ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "@", "Internal", "protected", "final", "Provider", "getBeanProviderForField", "(", "BeanResolutionContext", "resolutionContext", ",", "BeanContext", "context", ",", "FieldInjectionPoint", "injectionPoint", ")", "{", "...
Obtains a bean definition for the field at the given index and the argument at the given index <p> Warning: this method is used by internal generated code and should not be called by user code. @param resolutionContext The resolution context @param context The context @param injectionPoint The field injec...
[ "Obtains", "a", "bean", "definition", "for", "the", "field", "at", "the", "given", "index", "and", "the", "argument", "at", "the", "given", "index", "<p", ">", "Warning", ":", "this", "method", "is", "used", "by", "internal", "generated", "code", "and", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java#L1369-L1375
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/driver/restart/DriverRestartManager.java
DriverRestartManager.getIdleStatus
@Override public IdleMessage getIdleStatus() { """ {@inheritDoc} @return True if not in process of restart. False otherwise. """ boolean idleState = !this.state.isRestarting(); final String idleMessage = idleState ? CLASS_NAME + " currently not in the process of restart." : CLASS_NAME + " cu...
java
@Override public IdleMessage getIdleStatus() { boolean idleState = !this.state.isRestarting(); final String idleMessage = idleState ? CLASS_NAME + " currently not in the process of restart." : CLASS_NAME + " currently in the process of restart."; return new IdleMessage(CLASS_NAME, idleMessage, idl...
[ "@", "Override", "public", "IdleMessage", "getIdleStatus", "(", ")", "{", "boolean", "idleState", "=", "!", "this", ".", "state", ".", "isRestarting", "(", ")", ";", "final", "String", "idleMessage", "=", "idleState", "?", "CLASS_NAME", "+", "\" currently not ...
{@inheritDoc} @return True if not in process of restart. False otherwise.
[ "{" ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/driver/restart/DriverRestartManager.java#L333-L339