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
btaz/data-util
src/main/java/com/btaz/util/unit/ResourceUtil.java
ResourceUtil.createRandomData
public static String createRandomData(int rows, int rowLength, boolean skipTrailingNewline) { """ This method creates test data containing letters between a-z @param rows how many rows of data to create @param rowLength how many characters per row @param skipTrailingNewline if true then a trailing newline is al...
java
public static String createRandomData(int rows, int rowLength, boolean skipTrailingNewline) { Random random = new Random(System.currentTimeMillis()); StringBuilder strb = new StringBuilder(); for(int i=0; i<rows; i++) { for(int j=0; j<rowLength; j++) { strb.append((ch...
[ "public", "static", "String", "createRandomData", "(", "int", "rows", ",", "int", "rowLength", ",", "boolean", "skipTrailingNewline", ")", "{", "Random", "random", "=", "new", "Random", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "StringBuilde...
This method creates test data containing letters between a-z @param rows how many rows of data to create @param rowLength how many characters per row @param skipTrailingNewline if true then a trailing newline is always added @return <code>String</code> contain all random data
[ "This", "method", "creates", "test", "data", "containing", "letters", "between", "a", "-", "z" ]
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/unit/ResourceUtil.java#L112-L124
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetExtensionsInner.java
VirtualMachineScaleSetExtensionsInner.beginCreateOrUpdate
public VirtualMachineScaleSetExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, VirtualMachineScaleSetExtensionInner extensionParameters) { """ The operation to create or update an extension. @param resourceGroupName The name of the resource group. @pa...
java
public VirtualMachineScaleSetExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, VirtualMachineScaleSetExtensionInner extensionParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensio...
[ "public", "VirtualMachineScaleSetExtensionInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "String", "vmssExtensionName", ",", "VirtualMachineScaleSetExtensionInner", "extensionParameters", ")", "{", "return", "beginCreateOr...
The operation to create or update an extension. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. @param vmssExtensionName The name of the VM scale set extension. @param extensionParameters Parameters supplied to...
[ "The", "operation", "to", "create", "or", "update", "an", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetExtensionsInner.java#L190-L192
nohana/Amalgam
amalgam/src/main/java/com/amalgam/appwidget/AppWidgetManagerUtils.java
AppWidgetManagerUtils.getAppWidgetIds
public static int[] getAppWidgetIds(AppWidgetManager appWidgetManager, Context context, Class<?> clazz) { """ Wrapper method of the {@link android.appwidget.AppWidgetManager#getAppWidgetIds(android.content.ComponentName)}. @see android.appwidget.AppWidgetManager#getAppWidgetIds(android.content.ComponentName). ...
java
public static int[] getAppWidgetIds(AppWidgetManager appWidgetManager, Context context, Class<?> clazz) { return appWidgetManager.getAppWidgetIds(new ComponentName(context, clazz)); }
[ "public", "static", "int", "[", "]", "getAppWidgetIds", "(", "AppWidgetManager", "appWidgetManager", ",", "Context", "context", ",", "Class", "<", "?", ">", "clazz", ")", "{", "return", "appWidgetManager", ".", "getAppWidgetIds", "(", "new", "ComponentName", "("...
Wrapper method of the {@link android.appwidget.AppWidgetManager#getAppWidgetIds(android.content.ComponentName)}. @see android.appwidget.AppWidgetManager#getAppWidgetIds(android.content.ComponentName).
[ "Wrapper", "method", "of", "the", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/appwidget/AppWidgetManagerUtils.java#L35-L37
Cleveroad/AdaptiveTableLayout
library/src/main/java/com/cleveroad/adaptivetablelayout/AdaptiveTableManager.java
AdaptiveTableManager.switchTwoRows
void switchTwoRows(int rowIndex, int rowToIndex) { """ Switch 2 items in array with rows data @param rowIndex from row index @param rowToIndex to row index """ checkForInit(); int cellData = mRowHeights[rowToIndex]; mRowHeights[rowToIndex] = mRowHeights[rowIndex]; mRowHeig...
java
void switchTwoRows(int rowIndex, int rowToIndex) { checkForInit(); int cellData = mRowHeights[rowToIndex]; mRowHeights[rowToIndex] = mRowHeights[rowIndex]; mRowHeights[rowIndex] = cellData; }
[ "void", "switchTwoRows", "(", "int", "rowIndex", ",", "int", "rowToIndex", ")", "{", "checkForInit", "(", ")", ";", "int", "cellData", "=", "mRowHeights", "[", "rowToIndex", "]", ";", "mRowHeights", "[", "rowToIndex", "]", "=", "mRowHeights", "[", "rowIndex"...
Switch 2 items in array with rows data @param rowIndex from row index @param rowToIndex to row index
[ "Switch", "2", "items", "in", "array", "with", "rows", "data" ]
train
https://github.com/Cleveroad/AdaptiveTableLayout/blob/188213b35e05e635497b03fe741799782dde7208/library/src/main/java/com/cleveroad/adaptivetablelayout/AdaptiveTableManager.java#L354-L359
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/RedisClusterClient.java
RedisClusterClient.connectPubSubToNodeAsync
<K, V> ConnectionFuture<StatefulRedisPubSubConnection<K, V>> connectPubSubToNodeAsync(RedisCodec<K, V> codec, String nodeId, Mono<SocketAddress> socketAddressSupplier) { """ Create a pub/sub connection to a redis socket address. @param codec Use this codec to encode/decode keys and values, must not ...
java
<K, V> ConnectionFuture<StatefulRedisPubSubConnection<K, V>> connectPubSubToNodeAsync(RedisCodec<K, V> codec, String nodeId, Mono<SocketAddress> socketAddressSupplier) { assertNotNull(codec); assertNotEmpty(initialUris); LettuceAssert.notNull(socketAddressSupplier, "SocketAddressSu...
[ "<", "K", ",", "V", ">", "ConnectionFuture", "<", "StatefulRedisPubSubConnection", "<", "K", ",", "V", ">", ">", "connectPubSubToNodeAsync", "(", "RedisCodec", "<", "K", ",", "V", ">", "codec", ",", "String", "nodeId", ",", "Mono", "<", "SocketAddress", ">...
Create a pub/sub connection to a redis socket address. @param codec Use this codec to encode/decode keys and values, must not be {@literal null} @param nodeId the nodeId @param socketAddressSupplier supplier for the socket address @param <K> Key type @param <V> Value type @return A new connection
[ "Create", "a", "pub", "/", "sub", "connection", "to", "a", "redis", "socket", "address", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/RedisClusterClient.java#L519-L549
ecclesia/kipeto
kipeto-core/src/main/java/de/ecclesia/kipeto/repository/Blob.java
Blob.writeToStream
public void writeToStream(OutputStream outputStream) throws IOException { """ Serialisiert das Objekt in den übergebenen OutputStream. Zunächst wird der Header (Type, Kompressions und Länge) in den Stream geschrieben. Anschließen der Content des Blobs, ggf. komprimiert. <br/> <br/> Der OutputStream wird am Ende...
java
public void writeToStream(OutputStream outputStream) throws IOException { if (exhausted) { throw new UnsupportedOperationException("Der Content-InputStream des Blobs wurde bereits einmal gelesen"); } MessageDigest digest = getDigest(); DigestOutputStream digestOutputStream = new DigestOutputStream(outputStr...
[ "public", "void", "writeToStream", "(", "OutputStream", "outputStream", ")", "throws", "IOException", "{", "if", "(", "exhausted", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Der Content-InputStream des Blobs wurde bereits einmal gelesen\"", ")", ";",...
Serialisiert das Objekt in den übergebenen OutputStream. Zunächst wird der Header (Type, Kompressions und Länge) in den Stream geschrieben. Anschließen der Content des Blobs, ggf. komprimiert. <br/> <br/> Der OutputStream wird am Ende der Operation geschlossen. Die geschriebenen Bytes werden gehasht und der Hash in der...
[ "Serialisiert", "das", "Objekt", "in", "den", "übergebenen", "OutputStream", ".", "Zunächst", "wird", "der", "Header", "(", "Type", "Kompressions", "und", "Länge", ")", "in", "den", "Stream", "geschrieben", ".", "Anschließen", "der", "Content", "des", "Blobs", ...
train
https://github.com/ecclesia/kipeto/blob/ea39a10ae4eaa550f71a856ab2f2845270a64913/kipeto-core/src/main/java/de/ecclesia/kipeto/repository/Blob.java#L124-L154
cqyijifu/watcher
watcher-core/src/main/java/com/yiji/framework/watcher/extension/ExtensionLoader.java
ExtensionLoader.load
public <T> void load(ExtensionRepository<T> repository, Class<T> extensionType) { """ 加载扩展类到仓储中 @param repository 扩展类存储仓储 @param extensionType 扩展类类型 @param <T> 类型 """ // loadExtensionFromPackage(repository, extensionType, getDefaultScanPackage()); // String customScanPackage = getCustomScanPackage(); // ...
java
public <T> void load(ExtensionRepository<T> repository, Class<T> extensionType) { // loadExtensionFromPackage(repository, extensionType, getDefaultScanPackage()); // String customScanPackage = getCustomScanPackage(); // if (!Strings.isNullOrEmpty(customScanPackage)) { // loadExtensionFromPackage(repository, extens...
[ "public", "<", "T", ">", "void", "load", "(", "ExtensionRepository", "<", "T", ">", "repository", ",", "Class", "<", "T", ">", "extensionType", ")", "{", "//\t\tloadExtensionFromPackage(repository, extensionType, getDefaultScanPackage());", "//\t\tString customScanPackage =...
加载扩展类到仓储中 @param repository 扩展类存储仓储 @param extensionType 扩展类类型 @param <T> 类型
[ "加载扩展类到仓储中" ]
train
https://github.com/cqyijifu/watcher/blob/9032ede2743de751d8ae4b77ade39726f016457d/watcher-core/src/main/java/com/yiji/framework/watcher/extension/ExtensionLoader.java#L39-L46
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/RangeSelectorHelper.java
RangeSelectorHelper.saveInstanceState
public Bundle saveInstanceState(Bundle savedInstanceState, String prefix) { """ add the values to the bundle for saveInstanceState @param savedInstanceState If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in Note: Otherwise ...
java
public Bundle saveInstanceState(Bundle savedInstanceState, String prefix) { if (savedInstanceState != null && mLastLongPressIndex != null) savedInstanceState.putInt(BUNDLE_LAST_LONG_PRESS, mLastLongPressIndex); return savedInstanceState; }
[ "public", "Bundle", "saveInstanceState", "(", "Bundle", "savedInstanceState", ",", "String", "prefix", ")", "{", "if", "(", "savedInstanceState", "!=", "null", "&&", "mLastLongPressIndex", "!=", "null", ")", "savedInstanceState", ".", "putInt", "(", "BUNDLE_LAST_LON...
add the values to the bundle for saveInstanceState @param savedInstanceState If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in Note: Otherwise it is null. @param prefix a prefix added to the savedInstance key so we can s...
[ "add", "the", "values", "to", "the", "bundle", "for", "saveInstanceState" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/RangeSelectorHelper.java#L186-L190
algolia/instantsearch-android
core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java
Searcher.addNumericRefinement
@SuppressWarnings( { """ Adds a numeric refinement for the next queries. @param refinement a {@link NumericRefinement} refining an attribute with a numerical value. @return this {@link Searcher} for chaining. """"WeakerAccess", "unused"}) // For library users public Searcher addNumericRefinement(@NonNu...
java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users public Searcher addNumericRefinement(@NonNull NumericRefinement refinement) { SparseArray<NumericRefinement> refinements = numericRefinements.get(refinement.attribute); if (refinements == null) { refinements = new SparseA...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "public", "Searcher", "addNumericRefinement", "(", "@", "NonNull", "NumericRefinement", "refinement", ")", "{", "SparseArray", "<", "NumericRefinement", ">", "r...
Adds a numeric refinement for the next queries. @param refinement a {@link NumericRefinement} refining an attribute with a numerical value. @return this {@link Searcher} for chaining.
[ "Adds", "a", "numeric", "refinement", "for", "the", "next", "queries", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L699-L710
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/CloudTrailSourceSerializer.java
CloudTrailSourceSerializer.addRestMessageAttributes
private void addRestMessageAttributes(Message sqsMessage, JsonNode messageNode) { """ Excluding S3_BUCKET, S3_OBJECT_KEY, add all other attributes from the message body to <code>sqsMessage</code>. @param sqsMessage The SQS message. @param messageNode The message body. """ Iterator<String> it = messag...
java
private void addRestMessageAttributes(Message sqsMessage, JsonNode messageNode) { Iterator<String> it = messageNode.fieldNames(); while(it.hasNext()) { String key = it.next(); if (!key.equals(S3_OBJECT_KEY) && !key.equals(S3_BUCKET_NAME)) { sqsMessage.addAttribute...
[ "private", "void", "addRestMessageAttributes", "(", "Message", "sqsMessage", ",", "JsonNode", "messageNode", ")", "{", "Iterator", "<", "String", ">", "it", "=", "messageNode", ".", "fieldNames", "(", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ...
Excluding S3_BUCKET, S3_OBJECT_KEY, add all other attributes from the message body to <code>sqsMessage</code>. @param sqsMessage The SQS message. @param messageNode The message body.
[ "Excluding", "S3_BUCKET", "S3_OBJECT_KEY", "add", "all", "other", "attributes", "from", "the", "message", "body", "to", "<code", ">", "sqsMessage<", "/", "code", ">", "." ]
train
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/CloudTrailSourceSerializer.java#L102-L110
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.addWsHandler
private Javalin addWsHandler(@NotNull WsHandlerType handlerType, @NotNull String path, @NotNull Consumer<WsHandler> wsHandler, @NotNull Set<Role> roles) { """ Adds a specific WebSocket handler for the given path to the instance. Requires an access manager to be set on the instance. """ wsServlet.addHa...
java
private Javalin addWsHandler(@NotNull WsHandlerType handlerType, @NotNull String path, @NotNull Consumer<WsHandler> wsHandler, @NotNull Set<Role> roles) { wsServlet.addHandler(handlerType, path, wsHandler, roles); eventManager.fireWsHandlerAddedEvent(new WsHandlerMetaInfo(handlerType, Util.prefixContext...
[ "private", "Javalin", "addWsHandler", "(", "@", "NotNull", "WsHandlerType", "handlerType", ",", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "WsHandler", ">", "wsHandler", ",", "@", "NotNull", "Set", "<", "Role", ">", "roles", ")",...
Adds a specific WebSocket handler for the given path to the instance. Requires an access manager to be set on the instance.
[ "Adds", "a", "specific", "WebSocket", "handler", "for", "the", "given", "path", "to", "the", "instance", ".", "Requires", "an", "access", "manager", "to", "be", "set", "on", "the", "instance", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L505-L509
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getFieldValue
@SuppressWarnings("unchecked") public static <T> T getFieldValue(Object object, Field field) { """ Get object instance field value. Reflective field argument should have accessibility set to true and this condition is fulfilled if field is obtained via {@link #getField(Class, String)}. @param object instanc...
java
@SuppressWarnings("unchecked") public static <T> T getFieldValue(Object object, Field field) { assert field.isAccessible(); try { return (T)field.get(object); } catch(IllegalAccessException e) { throw new BugError(e); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getFieldValue", "(", "Object", "object", ",", "Field", "field", ")", "{", "assert", "field", ".", "isAccessible", "(", ")", ";", "try", "{", "return", "(", "T", ...
Get object instance field value. Reflective field argument should have accessibility set to true and this condition is fulfilled if field is obtained via {@link #getField(Class, String)}. @param object instance to retrieve field value from, @param field object reflective field. @param <T> field type. @return field val...
[ "Get", "object", "instance", "field", "value", ".", "Reflective", "field", "argument", "should", "have", "accessibility", "set", "to", "true", "and", "this", "condition", "is", "fulfilled", "if", "field", "is", "obtained", "via", "{", "@link", "#getField", "("...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L686-L696
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildRequest
public HttpRequest buildRequest(String requestMethod, GenericUrl url, HttpContent content) throws IOException { """ Builds a request for the given HTTP method, URL, and content. @param requestMethod HTTP request method @param url HTTP request URL or {@code null} for none @param content HTTP request cont...
java
public HttpRequest buildRequest(String requestMethod, GenericUrl url, HttpContent content) throws IOException { HttpRequest request = transport.buildRequest(); if (initializer != null) { initializer.initialize(request); } request.setRequestMethod(requestMethod); if (url != null) { ...
[ "public", "HttpRequest", "buildRequest", "(", "String", "requestMethod", ",", "GenericUrl", "url", ",", "HttpContent", "content", ")", "throws", "IOException", "{", "HttpRequest", "request", "=", "transport", ".", "buildRequest", "(", ")", ";", "if", "(", "initi...
Builds a request for the given HTTP method, URL, and content. @param requestMethod HTTP request method @param url HTTP request URL or {@code null} for none @param content HTTP request content or {@code null} for none @return new HTTP request @since 1.12
[ "Builds", "a", "request", "for", "the", "given", "HTTP", "method", "URL", "and", "content", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L84-L98
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.makeArrayType
public ArrayType makeArrayType(Type t) { """ Returns an ArrayType with the component type t @param t The component type of the ArrayType @return the ArrayType for the given component """ if (t.hasTag(VOID) || t.hasTag(PACKAGE)) { Assert.error("Type t must not be a VOID or PACKAGE type, ...
java
public ArrayType makeArrayType(Type t) { if (t.hasTag(VOID) || t.hasTag(PACKAGE)) { Assert.error("Type t must not be a VOID or PACKAGE type, " + t.toString()); } return new ArrayType(t, syms.arrayClass); }
[ "public", "ArrayType", "makeArrayType", "(", "Type", "t", ")", "{", "if", "(", "t", ".", "hasTag", "(", "VOID", ")", "||", "t", ".", "hasTag", "(", "PACKAGE", ")", ")", "{", "Assert", ".", "error", "(", "\"Type t must not be a VOID or PACKAGE type, \"", "+...
Returns an ArrayType with the component type t @param t The component type of the ArrayType @return the ArrayType for the given component
[ "Returns", "an", "ArrayType", "with", "the", "component", "type", "t" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L1832-L1837
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/util/Path.java
Path.getAbsoluteLevel
public static int getAbsoluteLevel(@NotNull String path, @NotNull ResourceResolver resourceResolver) { """ Gets level from parent use same logic (but reverse) as {@link #getAbsoluteParent(Page, int, ResourceResolver)}. If the path is a version history or launch path the original path is returned. @param path Pat...
java
public static int getAbsoluteLevel(@NotNull String path, @NotNull ResourceResolver resourceResolver) { if (StringUtils.isEmpty(path) || StringUtils.equals(path, "/")) { return -1; } String originalPath = getOriginalPath(path, resourceResolver); return StringUtils.countMatches(originalPath, "/") - ...
[ "public", "static", "int", "getAbsoluteLevel", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "ResourceResolver", "resourceResolver", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "path", ")", "||", "StringUtils", ".", "equals", "(", ...
Gets level from parent use same logic (but reverse) as {@link #getAbsoluteParent(Page, int, ResourceResolver)}. If the path is a version history or launch path the original path is returned. @param path Path @param resourceResolver Resource resolver @return level &gt;= 0 if path is valid, -1 if path is invalid
[ "Gets", "level", "from", "parent", "use", "same", "logic", "(", "but", "reverse", ")", "as", "{" ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/util/Path.java#L112-L118
kiegroup/jbpm
jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java
QueryCriteriaUtil.basicCreatePredicateFromSingleCriteria
@SuppressWarnings("unchecked") public static Predicate basicCreatePredicateFromSingleCriteria(CriteriaBuilder builder, Expression entityField, QueryCriteria criteria) { """ This method creates the basic types of {@link Predicate} from trivial {@link QueryCriteria} (NORMAL/REGEXP/RANGE). @param builder The {...
java
@SuppressWarnings("unchecked") public static Predicate basicCreatePredicateFromSingleCriteria(CriteriaBuilder builder, Expression entityField, QueryCriteria criteria) { Predicate predicate = null; List<Object> parameters = criteria.getParameters(); int numParameters = parameters.size(); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Predicate", "basicCreatePredicateFromSingleCriteria", "(", "CriteriaBuilder", "builder", ",", "Expression", "entityField", ",", "QueryCriteria", "criteria", ")", "{", "Predicate", "predicate", "=", ...
This method creates the basic types of {@link Predicate} from trivial {@link QueryCriteria} (NORMAL/REGEXP/RANGE). @param builder The {@link CriteriaBuilder}, helpful when creating {@link Predicate}s to add to the {@link CriteriaQuery} @param entityField The {@link Expression} representing a field/column in an entity/...
[ "This", "method", "creates", "the", "basic", "types", "of", "{", "@link", "Predicate", "}", "from", "trivial", "{", "@link", "QueryCriteria", "}", "(", "NORMAL", "/", "REGEXP", "/", "RANGE", ")", "." ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java#L480-L531
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPForest.java
RPForest.queryAll
public INDArray queryAll(INDArray toQuery,int n) { """ Query results up to length n nearest neighbors @param toQuery the query item @param n the number of nearest neighbors for the given data point @return the indices for the nearest neighbors """ return RPUtils.queryAll(toQuery,data,trees,n,simila...
java
public INDArray queryAll(INDArray toQuery,int n) { return RPUtils.queryAll(toQuery,data,trees,n,similarityFunction); }
[ "public", "INDArray", "queryAll", "(", "INDArray", "toQuery", ",", "int", "n", ")", "{", "return", "RPUtils", ".", "queryAll", "(", "toQuery", ",", "data", ",", "trees", ",", "n", ",", "similarityFunction", ")", ";", "}" ]
Query results up to length n nearest neighbors @param toQuery the query item @param n the number of nearest neighbors for the given data point @return the indices for the nearest neighbors
[ "Query", "results", "up", "to", "length", "n", "nearest", "neighbors" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPForest.java#L83-L85
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.findByG_ST
@Override public List<CPInstance> findByG_ST(long groupId, int status, int start, int end) { """ Returns a range of all the cp instances where groupId = &#63; and status = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</co...
java
@Override public List<CPInstance> findByG_ST(long groupId, int status, int start, int end) { return findByG_ST(groupId, status, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPInstance", ">", "findByG_ST", "(", "long", "groupId", ",", "int", "status", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_ST", "(", "groupId", ",", "status", ",", "start", ",", "end", ",...
Returns a range of all the cp instances where groupId = &#63; and status = &#63;. <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 resul...
[ "Returns", "a", "range", "of", "all", "the", "cp", "instances", "where", "groupId", "=", "&#63", ";", "and", "status", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L3049-L3053
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/Util.java
Util.compactToString
public static String compactToString(ModelNode node) { """ Build a compact representation of the ModelNode. @param node The model @return A single line containing the multi lines ModelNode.toString() content. """ Objects.requireNonNull(node); final StringWriter stringWriter = new StringWriter...
java
public static String compactToString(ModelNode node) { Objects.requireNonNull(node); final StringWriter stringWriter = new StringWriter(); final PrintWriter writer = new PrintWriter(stringWriter, true); node.writeString(writer, true); return stringWriter.toString(); }
[ "public", "static", "String", "compactToString", "(", "ModelNode", "node", ")", "{", "Objects", ".", "requireNonNull", "(", "node", ")", ";", "final", "StringWriter", "stringWriter", "=", "new", "StringWriter", "(", ")", ";", "final", "PrintWriter", "writer", ...
Build a compact representation of the ModelNode. @param node The model @return A single line containing the multi lines ModelNode.toString() content.
[ "Build", "a", "compact", "representation", "of", "the", "ModelNode", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/Util.java#L1837-L1843
thymeleaf/thymeleaf-spring
thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/view/AbstractThymeleafView.java
AbstractThymeleafView.addStaticVariable
public void addStaticVariable(final String name, final Object value) { """ <p> Add a new static variable. </p> <p> These static variables are added to the context before this view is processed, so that they can be referenced from the context like any other context variables, for example: {@code ${myStaticVa...
java
public void addStaticVariable(final String name, final Object value) { if (this.staticVariables == null) { this.staticVariables = new HashMap<String, Object>(3, 1.0f); } this.staticVariables.put(name, value); }
[ "public", "void", "addStaticVariable", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "if", "(", "this", ".", "staticVariables", "==", "null", ")", "{", "this", ".", "staticVariables", "=", "new", "HashMap", "<", "String", ",", ...
<p> Add a new static variable. </p> <p> These static variables are added to the context before this view is processed, so that they can be referenced from the context like any other context variables, for example: {@code ${myStaticVar}}. </p> @param name the name of the static variable @param value the value of the st...
[ "<p", ">", "Add", "a", "new", "static", "variable", ".", "<", "/", "p", ">", "<p", ">", "These", "static", "variables", "are", "added", "to", "the", "context", "before", "this", "view", "is", "processed", "so", "that", "they", "can", "be", "referenced"...
train
https://github.com/thymeleaf/thymeleaf-spring/blob/9aa15a19017a0938e57646e3deefb8a90ab78dcb/thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/view/AbstractThymeleafView.java#L504-L509
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addEqualToColumn
public void addEqualToColumn(String attribute, String colName) { """ Adds and equals (=) criteria for column comparison. The column Name will NOT be translated. <br> name = T_BOSS.LASTNMAE @param attribute The field name to be used @param colName The name of the column to compare with """ // ...
java
public void addEqualToColumn(String attribute, String colName) { // FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getAlias()); FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getUserAlias(attribute)); c.setTranslateField(false); addSelecti...
[ "public", "void", "addEqualToColumn", "(", "String", "attribute", ",", "String", "colName", ")", "{", "// FieldCriteria c = FieldCriteria.buildEqualToCriteria(attribute, colName, getAlias());\r", "FieldCriteria", "c", "=", "FieldCriteria", ".", "buildEqualToCriteria", "(", "att...
Adds and equals (=) criteria for column comparison. The column Name will NOT be translated. <br> name = T_BOSS.LASTNMAE @param attribute The field name to be used @param colName The name of the column to compare with
[ "Adds", "and", "equals", "(", "=", ")", "criteria", "for", "column", "comparison", ".", "The", "column", "Name", "will", "NOT", "be", "translated", ".", "<br", ">", "name", "=", "T_BOSS", ".", "LASTNMAE" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L392-L398
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getJob
public JobResponseInner getJob(String resourceGroupName, String resourceName, String jobId) { """ Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. Get the details of a job from an IoT hub. For more information, see: h...
java
public JobResponseInner getJob(String resourceGroupName, String resourceName, String jobId) { return getJobWithServiceResponseAsync(resourceGroupName, resourceName, jobId).toBlocking().single().body(); }
[ "public", "JobResponseInner", "getJob", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "jobId", ")", "{", "return", "getJobWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ",", "jobId", ")", ".", "toBlocking"...
Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. @param resourceGroupName Th...
[ "Get", "the", "details", "of", "a", "job", "from", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub", "-", "de...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L2208-L2210
jayantk/jklol
src/com/jayantkrish/jklol/ccg/CcgParse.java
CcgParse.getLogicalFormForSpan
public SpannedExpression getLogicalFormForSpan(int spanStart, int spanEnd) { """ Returns the logical form for the smallest subtree of the parse which completely contains the given span. @param spanStart @param spanEnd @return """ CcgParse spanningParse = getParseForSpan(spanStart, spanEnd); Expre...
java
public SpannedExpression getLogicalFormForSpan(int spanStart, int spanEnd) { CcgParse spanningParse = getParseForSpan(spanStart, spanEnd); Expression2 lf = spanningParse.getPreUnaryLogicalForm(); if (lf != null) { return new SpannedExpression(spanningParse.getHeadedSyntacticCategory(), spann...
[ "public", "SpannedExpression", "getLogicalFormForSpan", "(", "int", "spanStart", ",", "int", "spanEnd", ")", "{", "CcgParse", "spanningParse", "=", "getParseForSpan", "(", "spanStart", ",", "spanEnd", ")", ";", "Expression2", "lf", "=", "spanningParse", ".", "getP...
Returns the logical form for the smallest subtree of the parse which completely contains the given span. @param spanStart @param spanEnd @return
[ "Returns", "the", "logical", "form", "for", "the", "smallest", "subtree", "of", "the", "parse", "which", "completely", "contains", "the", "given", "span", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/CcgParse.java#L241-L250
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java
TitlePaneMenuButtonPainter.decodeMarkBorder
private Shape decodeMarkBorder(int width, int height) { """ Create the mark border shape. @param width the width. @param height the height. @return the shape of the mark border. """ double left = width / 2.0 - 4; double top = height / 2.0 - 4; path.reset(); path.move...
java
private Shape decodeMarkBorder(int width, int height) { double left = width / 2.0 - 4; double top = height / 2.0 - 4; path.reset(); path.moveTo(left + 0, top + 0); path.lineTo(left + 8, top); path.lineTo(left + 4, top + 6); path.closePath(); return path...
[ "private", "Shape", "decodeMarkBorder", "(", "int", "width", ",", "int", "height", ")", "{", "double", "left", "=", "width", "/", "2.0", "-", "4", ";", "double", "top", "=", "height", "/", "2.0", "-", "4", ";", "path", ".", "reset", "(", ")", ";", ...
Create the mark border shape. @param width the width. @param height the height. @return the shape of the mark border.
[ "Create", "the", "mark", "border", "shape", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java#L255-L266
bmwcarit/joynr
java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java
Arbitrator.arbitrationFinished
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { """ Sets the arbitration result at the arbitrationListener if the listener is already registered """ this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationRes...
java
protected void arbitrationFinished(ArbitrationStatus arbitrationStatus, ArbitrationResult arbitrationResult) { this.arbitrationStatus = arbitrationStatus; this.arbitrationResult = arbitrationResult; // wait for arbitration listener to be registered if (arbitrationListenerSemaphore.tryAc...
[ "protected", "void", "arbitrationFinished", "(", "ArbitrationStatus", "arbitrationStatus", ",", "ArbitrationResult", "arbitrationResult", ")", "{", "this", ".", "arbitrationStatus", "=", "arbitrationStatus", ";", "this", ".", "arbitrationResult", "=", "arbitrationResult", ...
Sets the arbitration result at the arbitrationListener if the listener is already registered
[ "Sets", "the", "arbitration", "result", "at", "the", "arbitrationListener", "if", "the", "listener", "is", "already", "registered" ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/core/libjoynr/src/main/java/io/joynr/arbitration/Arbitrator.java#L153-L162
stanfy/gson-xml
src/main/java/com/stanfy/gsonxml/GsonXml.java
GsonXml.fromXml
public <T> T fromXml(final XmlReader reader, final Type typeOfT) throws JsonIOException, JsonSyntaxException { """ Reads the next JSON value from {@code reader} and convert it to an object of type {@code typeOfT}. Since Type is not parameterized by T, this method is type unsafe and should be used carefully @r...
java
public <T> T fromXml(final XmlReader reader, final Type typeOfT) throws JsonIOException, JsonSyntaxException { return core.fromJson(reader, typeOfT); }
[ "public", "<", "T", ">", "T", "fromXml", "(", "final", "XmlReader", "reader", ",", "final", "Type", "typeOfT", ")", "throws", "JsonIOException", ",", "JsonSyntaxException", "{", "return", "core", ".", "fromJson", "(", "reader", ",", "typeOfT", ")", ";", "}...
Reads the next JSON value from {@code reader} and convert it to an object of type {@code typeOfT}. Since Type is not parameterized by T, this method is type unsafe and should be used carefully @return deserialized object @param <T> type to deserialize @param reader XML source @param typeOfT type to deserialize @throws...
[ "Reads", "the", "next", "JSON", "value", "from", "{", "@code", "reader", "}", "and", "convert", "it", "to", "an", "object", "of", "type", "{", "@code", "typeOfT", "}", ".", "Since", "Type", "is", "not", "parameterized", "by", "T", "this", "method", "is...
train
https://github.com/stanfy/gson-xml/blob/574166248c5e7b55d8546a1ef69cb906936ee34d/src/main/java/com/stanfy/gsonxml/GsonXml.java#L95-L97
hibernate/hibernate-ogm
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java
GeoPolygon.addHole
public GeoPolygon addHole(GeoPoint firstPoint, GeoPoint secondPoint, GeoPoint thirdPoint, GeoPoint fourthPoint, GeoPoint... additionalPoints) { """ Adds a new hole to the polygon. @param firstPoint the first point of the polygon @param secondPoint the second point of the polygon @param thirdPoint the third po...
java
public GeoPolygon addHole(GeoPoint firstPoint, GeoPoint secondPoint, GeoPoint thirdPoint, GeoPoint fourthPoint, GeoPoint... additionalPoints) { Contracts.assertNotNull( firstPoint, "firstPoint" ); Contracts.assertNotNull( secondPoint, "secondPoint" ); Contracts.assertNotNull( thirdPoint, "thirdPoint" ); Contrac...
[ "public", "GeoPolygon", "addHole", "(", "GeoPoint", "firstPoint", ",", "GeoPoint", "secondPoint", ",", "GeoPoint", "thirdPoint", ",", "GeoPoint", "fourthPoint", ",", "GeoPoint", "...", "additionalPoints", ")", "{", "Contracts", ".", "assertNotNull", "(", "firstPoint...
Adds a new hole to the polygon. @param firstPoint the first point of the polygon @param secondPoint the second point of the polygon @param thirdPoint the third point of the polygon @param fourthPoint the third point of the polygon @param additionalPoints the additional points of the polygon
[ "Adds", "a", "new", "hole", "to", "the", "polygon", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java#L91-L108
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/CredentialManager.java
CredentialManager.getPreferredDeployer
public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) { """ Decides and returns the preferred deployment credentials to use from this builder settings and selected server @param deployerOverrider Deploy-overriding capable builder @param server ...
java
public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) { if (deployerOverrider.isOverridingDefaultDeployer()) { CredentialsConfig deployerCredentialsConfig = deployerOverrider.getDeployerCredentialsConfig(); if (deployerCredent...
[ "public", "static", "CredentialsConfig", "getPreferredDeployer", "(", "DeployerOverrider", "deployerOverrider", ",", "ArtifactoryServer", "server", ")", "{", "if", "(", "deployerOverrider", ".", "isOverridingDefaultDeployer", "(", ")", ")", "{", "CredentialsConfig", "depl...
Decides and returns the preferred deployment credentials to use from this builder settings and selected server @param deployerOverrider Deploy-overriding capable builder @param server Selected Artifactory server @return Preferred deployment credentials
[ "Decides", "and", "returns", "the", "preferred", "deployment", "credentials", "to", "use", "from", "this", "builder", "settings", "and", "selected", "server" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/CredentialManager.java#L41-L57
huahin/huahin-core
src/main/java/org/huahinframework/core/SimpleJob.java
SimpleJob.setSummarizer
public SimpleJob setSummarizer(Class<? extends Reducer<Key, Value, Key, Value>> clazz, boolean combine) { """ Job {@link Summarizer} class setting. @param clazz {@link Summarizer} class @param combine If true is set the combiner in the Summarizer @return this """ r...
java
public SimpleJob setSummarizer(Class<? extends Reducer<Key, Value, Key, Value>> clazz, boolean combine) { return setSummarizer(clazz, combine, DEFAULT_COMBAIN_CACHE); }
[ "public", "SimpleJob", "setSummarizer", "(", "Class", "<", "?", "extends", "Reducer", "<", "Key", ",", "Value", ",", "Key", ",", "Value", ">", ">", "clazz", ",", "boolean", "combine", ")", "{", "return", "setSummarizer", "(", "clazz", ",", "combine", ","...
Job {@link Summarizer} class setting. @param clazz {@link Summarizer} class @param combine If true is set the combiner in the Summarizer @return this
[ "Job", "{" ]
train
https://github.com/huahin/huahin-core/blob/a87921b5a12be92a822f753c075ab2431036e6f5/src/main/java/org/huahinframework/core/SimpleJob.java#L170-L173
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java
LoadBalancersInner.beginUpdateTagsAsync
public Observable<LoadBalancerInner> beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map<String, String> tags) { """ Updates a load balancer tags. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param tags Resource tags. ...
java
public Observable<LoadBalancerInner> beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1<ServiceResponse<LoadBalancerInner>, LoadBalancerInner>() { ...
[ "public", "Observable", "<", "LoadBalancerInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", ...
Updates a load balancer tags. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LoadBalancerInner object
[ "Updates", "a", "load", "balancer", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java#L862-L869
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/Linear.java
Linear.computeNearestNeighborsInternal
protected BoundedPriorityQueue<Result> computeNearestNeighborsInternal(int k, double[] queryVector) throws Exception { """ Computes the k-nearest neighbors of the given query vector. The search is exhaustive but includes some optimizations that make it faster, especially for high dimensional vectors. @para...
java
protected BoundedPriorityQueue<Result> computeNearestNeighborsInternal(int k, double[] queryVector) throws Exception { BoundedPriorityQueue<Result> nn = new BoundedPriorityQueue<Result>(new Result(), k); double lowest = Double.MAX_VALUE; for (int i = 0; i < (vectorsList.size() / vectorLength); i++) { ...
[ "protected", "BoundedPriorityQueue", "<", "Result", ">", "computeNearestNeighborsInternal", "(", "int", "k", ",", "double", "[", "]", "queryVector", ")", "throws", "Exception", "{", "BoundedPriorityQueue", "<", "Result", ">", "nn", "=", "new", "BoundedPriorityQueue"...
Computes the k-nearest neighbors of the given query vector. The search is exhaustive but includes some optimizations that make it faster, especially for high dimensional vectors. @param k The number of nearest neighbors to be returned @param queryVector The query vector @return A bounded priority queue of Result obje...
[ "Computes", "the", "k", "-", "nearest", "neighbors", "of", "the", "given", "query", "vector", ".", "The", "search", "is", "exhaustive", "but", "includes", "some", "optimizations", "that", "make", "it", "faster", "especially", "for", "high", "dimensional", "vec...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/Linear.java#L138-L163
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/MulticastSocket.java
MulticastSocket.joinGroup
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { """ Joins the specified multicast group at the specified interface. <p>If there is a security manager, this method first calls its {@code checkMulticast} method with the {@code mcastaddr} argument as its argum...
java
public void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { if (isClosed()) throw new SocketException("Socket is closed"); if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress)) throw new IllegalArgumentException("Unsupported ...
[ "public", "void", "joinGroup", "(", "SocketAddress", "mcastaddr", ",", "NetworkInterface", "netIf", ")", "throws", "IOException", "{", "if", "(", "isClosed", "(", ")", ")", "throw", "new", "SocketException", "(", "\"Socket is closed\"", ")", ";", "if", "(", "m...
Joins the specified multicast group at the specified interface. <p>If there is a security manager, this method first calls its {@code checkMulticast} method with the {@code mcastaddr} argument as its argument. @param mcastaddr is the multicast address to join @param netIf specifies the local interface to receive mult...
[ "Joins", "the", "specified", "multicast", "group", "at", "the", "specified", "interface", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/MulticastSocket.java#L385-L407
zeromq/jeromq
src/main/java/org/zeromq/ZThread.java
ZThread.fork
public static Socket fork(ZContext ctx, IAttachedRunnable runnable, Object... args) { """ pipe becomes unreadable. Returns pipe, or null if there was an error. """ Socket pipe = ctx.createSocket(SocketType.PAIR); if (pipe != null) { pipe.bind(String.format("inproc://zctx-pipe-%d", ...
java
public static Socket fork(ZContext ctx, IAttachedRunnable runnable, Object... args) { Socket pipe = ctx.createSocket(SocketType.PAIR); if (pipe != null) { pipe.bind(String.format("inproc://zctx-pipe-%d", pipe.hashCode())); } else { return null; } ...
[ "public", "static", "Socket", "fork", "(", "ZContext", "ctx", ",", "IAttachedRunnable", "runnable", ",", "Object", "...", "args", ")", "{", "Socket", "pipe", "=", "ctx", ".", "createSocket", "(", "SocketType", ".", "PAIR", ")", ";", "if", "(", "pipe", "!...
pipe becomes unreadable. Returns pipe, or null if there was an error.
[ "pipe", "becomes", "unreadable", ".", "Returns", "pipe", "or", "null", "if", "there", "was", "an", "error", "." ]
train
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/org/zeromq/ZThread.java#L87-L111
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photos/geo/GeoInterface.java
GeoInterface.batchCorrectLocation
public void batchCorrectLocation(GeoData location, String placeId, String woeId) throws FlickrException { """ Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy. <p> Batch corrections are processed in a delayed queue so it may take a few minutes before the ch...
java
public void batchCorrectLocation(GeoData location, String placeId, String woeId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_BATCH_CORRECT_LOCATION); if (placeId != null) { parameters.put("place_id", p...
[ "public", "void", "batchCorrectLocation", "(", "GeoData", "location", ",", "String", "placeId", ",", "String", "woeId", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", ...
Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy. <p> Batch corrections are processed in a delayed queue so it may take a few minutes before the changes are reflected in a user's photos. @param location The latitude/longitude and accuracy of the photos to be updat...
[ "Correct", "the", "places", "hierarchy", "for", "all", "the", "photos", "for", "a", "user", "at", "a", "given", "latitude", "longitude", "and", "accuracy", ".", "<p", ">" ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/geo/GeoInterface.java#L226-L247
radkovo/jStyleParser
src/main/java/cz/vutbr/web/csskit/antlr4/CSSParserFactory.java
CSSParserFactory.encapsulateException
protected static CSSException encapsulateException(Throwable t, String msg) { """ Creates new CSSException which encapsulates cause @param t Cause @param msg Message @return New CSSException """ log.error("THROWN:", t); return new CSSException(msg, t); }
java
protected static CSSException encapsulateException(Throwable t, String msg) { log.error("THROWN:", t); return new CSSException(msg, t); }
[ "protected", "static", "CSSException", "encapsulateException", "(", "Throwable", "t", ",", "String", "msg", ")", "{", "log", ".", "error", "(", "\"THROWN:\"", ",", "t", ")", ";", "return", "new", "CSSException", "(", "msg", ",", "t", ")", ";", "}" ]
Creates new CSSException which encapsulates cause @param t Cause @param msg Message @return New CSSException
[ "Creates", "new", "CSSException", "which", "encapsulates", "cause" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/csskit/antlr4/CSSParserFactory.java#L255-L258
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.setPatternStroke
public void setPatternStroke(PdfPatternPainter p, Color color, float tint) { """ Sets the stroke color to an uncolored pattern. @param p the pattern @param color the color of the pattern @param tint the tint if the color is a spot color, ignored otherwise """ checkWriter(); if (!p.isStencil(...
java
public void setPatternStroke(PdfPatternPainter p, Color color, float tint) { checkWriter(); if (!p.isStencil()) throw new RuntimeException("An uncolored pattern was expected."); PageResources prs = getPageResources(); PdfName name = writer.addSimplePattern(p); name = ...
[ "public", "void", "setPatternStroke", "(", "PdfPatternPainter", "p", ",", "Color", "color", ",", "float", "tint", ")", "{", "checkWriter", "(", ")", ";", "if", "(", "!", "p", ".", "isStencil", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"An...
Sets the stroke color to an uncolored pattern. @param p the pattern @param color the color of the pattern @param tint the tint if the color is a spot color, ignored otherwise
[ "Sets", "the", "stroke", "color", "to", "an", "uncolored", "pattern", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2385-L2397
banq/jdonframework
JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java
PageIteratorSolver.getPageIterator
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) { """ get a PageIterator @param sqlqueryAllCount the sql sentence for "select count(1) .." @param sqlquery the sql sentence for "select id from xxxx"; @param queryParams the para...
java
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) { Debug.logVerbose("[JdonFramework]enter getPageIterator .. start= " + startIndex + " count=" + count, module); if (queryParams == null) { Debug.logError(" the parameters collection...
[ "public", "PageIterator", "getPageIterator", "(", "String", "sqlqueryAllCount", ",", "String", "sqlquery", ",", "Collection", "queryParams", ",", "int", "startIndex", ",", "int", "count", ")", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramework]enter getPageIterat...
get a PageIterator @param sqlqueryAllCount the sql sentence for "select count(1) .." @param sqlquery the sql sentence for "select id from xxxx"; @param queryParams the parameter collection for the sqlquery. @param start the starting number of a page in allCount; @param count the display number of a page @return
[ "get", "a", "PageIterator" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L228-L252
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.toComparatorWithKeys
public static <E extends Comparable<E>> Comparator<E> toComparatorWithKeys(final Counter<E> counter) { """ Returns a comparator backed by this counter: two objects are compared by their associated values stored in the counter. This comparator returns keys by ascending numeric value. Note that this ordering is no...
java
public static <E extends Comparable<E>> Comparator<E> toComparatorWithKeys(final Counter<E> counter) { return new Comparator<E>() { public int compare(E o1, E o2) { int res = Double.compare(counter.getCount(o1), counter.getCount(o2)); if (res == 0) { return o1.compareTo(o2); ...
[ "public", "static", "<", "E", "extends", "Comparable", "<", "E", ">", ">", "Comparator", "<", "E", ">", "toComparatorWithKeys", "(", "final", "Counter", "<", "E", ">", "counter", ")", "{", "return", "new", "Comparator", "<", "E", ">", "(", ")", "{", ...
Returns a comparator backed by this counter: two objects are compared by their associated values stored in the counter. This comparator returns keys by ascending numeric value. Note that this ordering is not fixed, but depends on the mutable values stored in the Counter. Doing this comparison does not depend on the typ...
[ "Returns", "a", "comparator", "backed", "by", "this", "counter", ":", "two", "objects", "are", "compared", "by", "their", "associated", "values", "stored", "in", "the", "counter", ".", "This", "comparator", "returns", "keys", "by", "ascending", "numeric", "val...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L787-L798
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.makeHTMLTable
public static String makeHTMLTable(String[][] table, String[] rowLabels, String[] colLabels) { """ Returns an HTML table containing the matrix of Strings passed in. The first dimension of the matrix should represent the rows, and the second dimension the columns. """ StringBuilder buff = new StringBuild...
java
public static String makeHTMLTable(String[][] table, String[] rowLabels, String[] colLabels) { StringBuilder buff = new StringBuilder(); buff.append("<table class=\"auto\" border=\"1\" cellspacing=\"0\">\n"); // top row buff.append("<tr>\n"); buff.append("<td></td>\n"); // the top left cell ...
[ "public", "static", "String", "makeHTMLTable", "(", "String", "[", "]", "[", "]", "table", ",", "String", "[", "]", "rowLabels", ",", "String", "[", "]", "colLabels", ")", "{", "StringBuilder", "buff", "=", "new", "StringBuilder", "(", ")", ";", "buff", ...
Returns an HTML table containing the matrix of Strings passed in. The first dimension of the matrix should represent the rows, and the second dimension the columns.
[ "Returns", "an", "HTML", "table", "containing", "the", "matrix", "of", "Strings", "passed", "in", ".", "The", "first", "dimension", "of", "the", "matrix", "should", "represent", "the", "rows", "and", "the", "second", "dimension", "the", "columns", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L1445-L1469
ios-driver/ios-driver
server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java
SimulatorSettings.setL10N
public void setL10N(String locale, String language) { """ set the emulator to the given locale.Required a clean context (can only be done after "reset content and settings" ) @param locale fr_FR @param language fr """ try { JSONObject plistJSON = getPreferenceFile(locale, language); writ...
java
public void setL10N(String locale, String language) { try { JSONObject plistJSON = getPreferenceFile(locale, language); writeOnDisk(plistJSON, globalPreferencePlist); } catch (Exception e) { throw new WebDriverException("cannot configure simulator", e); } }
[ "public", "void", "setL10N", "(", "String", "locale", ",", "String", "language", ")", "{", "try", "{", "JSONObject", "plistJSON", "=", "getPreferenceFile", "(", "locale", ",", "language", ")", ";", "writeOnDisk", "(", "plistJSON", ",", "globalPreferencePlist", ...
set the emulator to the given locale.Required a clean context (can only be done after "reset content and settings" ) @param locale fr_FR @param language fr
[ "set", "the", "emulator", "to", "the", "given", "locale", ".", "Required", "a", "clean", "context", "(", "can", "only", "be", "done", "after", "reset", "content", "and", "settings", ")" ]
train
https://github.com/ios-driver/ios-driver/blob/a9744419508d970fbb1ce18e4326cc624b237c8b/server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java#L165-L172
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java
DOMDifferenceEngine.splitAttributes
private Attributes splitAttributes(final NamedNodeMap map) { """ Separates XML namespace related attributes from "normal" attributes.xb """ Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants .W3C_XML_SCHEMA_INSTANCE_NS_URI, ...
java
private Attributes splitAttributes(final NamedNodeMap map) { Attr sLoc = (Attr) map.getNamedItemNS(XMLConstants .W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation"); Attr nNsLoc = (Attr) map.getNamedItemNS(XMLConst...
[ "private", "Attributes", "splitAttributes", "(", "final", "NamedNodeMap", "map", ")", "{", "Attr", "sLoc", "=", "(", "Attr", ")", "map", ".", "getNamedItemNS", "(", "XMLConstants", ".", "W3C_XML_SCHEMA_INSTANCE_NS_URI", ",", "\"schemaLocation\"", ")", ";", "Attr",...
Separates XML namespace related attributes from "normal" attributes.xb
[ "Separates", "XML", "namespace", "related", "attributes", "from", "normal", "attributes", ".", "xb" ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L747-L768
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/io/INChIPlainTextReader.java
INChIPlainTextReader.readChemFile
private IChemFile readChemFile(IChemFile cf) throws CDKException { """ Reads a ChemFile object from input. @return ChemFile with the content read from the input """ // have to do stuff here try { String line = null; while ((line = input.readLine()) != null) { ...
java
private IChemFile readChemFile(IChemFile cf) throws CDKException { // have to do stuff here try { String line = null; while ((line = input.readLine()) != null) { if (line.startsWith("INChI=") || line.startsWith("InChI=")) { // ok, the fun start...
[ "private", "IChemFile", "readChemFile", "(", "IChemFile", "cf", ")", "throws", "CDKException", "{", "// have to do stuff here", "try", "{", "String", "line", "=", "null", ";", "while", "(", "(", "line", "=", "input", ".", "readLine", "(", ")", ")", "!=", "...
Reads a ChemFile object from input. @return ChemFile with the content read from the input
[ "Reads", "a", "ChemFile", "object", "from", "input", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/io/INChIPlainTextReader.java#L152-L192
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateCompositeEntityRole
public OperationStatus updateCompositeEntityRole(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @...
java
public OperationStatus updateCompositeEntityRole(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { return updateCompositeEntityRoleWithServiceResponseAsync(appId, versionId, cEntityId, roleId, updateCompositeEntity...
[ "public", "OperationStatus", "updateCompositeEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "cEntityId", ",", "UUID", "roleId", ",", "UpdateCompositeEntityRoleOptionalParameter", "updateCompositeEntityRoleOptionalParameter", ")", "{", "return", ...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param cEntityId The composite entity extractor ID. @param roleId The entity role ID. @param updateCompositeEntityRoleOptionalParameter the object representing the optional parameters to be set before calling th...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L12454-L12456
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java
GeneratedDOAuth2UserDaoImpl.queryByRoles
public Iterable<DOAuth2User> queryByRoles(java.lang.Object roles) { """ query-by method for field roles @param roles the specified attribute @return an Iterable of DOAuth2Users for the specified roles """ return queryByField(null, DOAuth2UserMapper.Field.ROLES.getFieldName(), roles); }
java
public Iterable<DOAuth2User> queryByRoles(java.lang.Object roles) { return queryByField(null, DOAuth2UserMapper.Field.ROLES.getFieldName(), roles); }
[ "public", "Iterable", "<", "DOAuth2User", ">", "queryByRoles", "(", "java", ".", "lang", ".", "Object", "roles", ")", "{", "return", "queryByField", "(", "null", ",", "DOAuth2UserMapper", ".", "Field", ".", "ROLES", ".", "getFieldName", "(", ")", ",", "rol...
query-by method for field roles @param roles the specified attribute @return an Iterable of DOAuth2Users for the specified roles
[ "query", "-", "by", "method", "for", "field", "roles" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java#L115-L117
google/closure-compiler
src/com/google/javascript/jscomp/ExpressionDecomposer.java
ExpressionDecomposer.canExposeExpression
DecompositionType canExposeExpression(Node subExpression) { """ Determines if {@code subExpression} can be moved before {@code expressionRoot} without changing the behaviour of the code, or if there is a rewriting that would make such motion possible. <p>Walks the AST from {@code subExpression} to {@code expre...
java
DecompositionType canExposeExpression(Node subExpression) { Node expressionRoot = findExpressionRoot(subExpression); if (expressionRoot != null) { return isSubexpressionMovable(expressionRoot, subExpression); } return DecompositionType.UNDECOMPOSABLE; }
[ "DecompositionType", "canExposeExpression", "(", "Node", "subExpression", ")", "{", "Node", "expressionRoot", "=", "findExpressionRoot", "(", "subExpression", ")", ";", "if", "(", "expressionRoot", "!=", "null", ")", "{", "return", "isSubexpressionMovable", "(", "ex...
Determines if {@code subExpression} can be moved before {@code expressionRoot} without changing the behaviour of the code, or if there is a rewriting that would make such motion possible. <p>Walks the AST from {@code subExpression} to {@code expressionRoot} and verifies that the portions of the {@code expressionRoot} ...
[ "Determines", "if", "{", "@code", "subExpression", "}", "can", "be", "moved", "before", "{", "@code", "expressionRoot", "}", "without", "changing", "the", "behaviour", "of", "the", "code", "or", "if", "there", "is", "a", "rewriting", "that", "would", "make",...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ExpressionDecomposer.java#L852-L858
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.unzipFrom
public void unzipFrom(InputStream _in) throws IOException, InterruptedException { """ Reads the given InputStream as a zip file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @since 1.283 @see #unzip(FilePath) """ final InputStream ...
java
public void unzipFrom(InputStream _in) throws IOException, InterruptedException { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UnzipFrom(in)); }
[ "public", "void", "unzipFrom", "(", "InputStream", "_in", ")", "throws", "IOException", ",", "InterruptedException", "{", "final", "InputStream", "in", "=", "new", "RemoteInputStream", "(", "_in", ",", "Flag", ".", "GREEDY", ")", ";", "act", "(", "new", "Unz...
Reads the given InputStream as a zip file and extracts it into this directory. @param _in The stream will be closed by this method after it's fully read. @since 1.283 @see #unzip(FilePath)
[ "Reads", "the", "given", "InputStream", "as", "a", "zip", "file", "and", "extracts", "it", "into", "this", "directory", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L609-L612
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/svg/Gradient.java
Gradient.getColorAt
public Color getColorAt(float p) { """ Get the intepolated colour at the given location on the gradient @param p The point of the gradient (0 >= n >= 1) @return The interpolated colour at the given location """ if (p <= 0) { return ((Step) steps.get(0)).col; } if (p > 1) { return ((Step) s...
java
public Color getColorAt(float p) { if (p <= 0) { return ((Step) steps.get(0)).col; } if (p > 1) { return ((Step) steps.get(steps.size()-1)).col; } for (int i=1;i<steps.size();i++) { Step prev = ((Step) steps.get(i-1)); Step current = ((Step) steps.get(i)); if (p <= current.lo...
[ "public", "Color", "getColorAt", "(", "float", "p", ")", "{", "if", "(", "p", "<=", "0", ")", "{", "return", "(", "(", "Step", ")", "steps", ".", "get", "(", "0", ")", ")", ".", "col", ";", "}", "if", "(", "p", ">", "1", ")", "{", "return",...
Get the intepolated colour at the given location on the gradient @param p The point of the gradient (0 >= n >= 1) @return The interpolated colour at the given location
[ "Get", "the", "intepolated", "colour", "at", "the", "given", "location", "on", "the", "gradient" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/Gradient.java#L236-L265
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
JDBCStorageConnection.deleteValues
private void deleteValues(String cid, PropertyData pdata, boolean update, ChangedSizeHandler sizeHandler) throws IOException, SQLException, RepositoryException, InvalidItemStateException { """ Delete Property Values. @param cid Property id @param pdata PropertyData @param update boolean true if it's ...
java
private void deleteValues(String cid, PropertyData pdata, boolean update, ChangedSizeHandler sizeHandler) throws IOException, SQLException, RepositoryException, InvalidItemStateException { Set<String> storages = new HashSet<String>(); final ResultSet valueRecords = findValueStorageDescAndSize(cid)...
[ "private", "void", "deleteValues", "(", "String", "cid", ",", "PropertyData", "pdata", ",", "boolean", "update", ",", "ChangedSizeHandler", "sizeHandler", ")", "throws", "IOException", ",", "SQLException", ",", "RepositoryException", ",", "InvalidItemStateException", ...
Delete Property Values. @param cid Property id @param pdata PropertyData @param update boolean true if it's delete-add sequence (update operation) @param sizeHandler accumulates changed size @throws IOException i/O error @throws SQLException if database error occurs @throws RepositoryException @throws InvalidItemState...
[ "Delete", "Property", "Values", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java#L2549-L2598
Alluxio/alluxio
core/common/src/main/java/alluxio/conf/AlluxioProperties.java
AlluxioProperties.forEach
public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { """ Iterates over all the key value pairs and performs the given action. @param action the operation to perform on each key value pair """ for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.get...
java
public void forEach(BiConsumer<? super PropertyKey, ? super String> action) { for (Map.Entry<PropertyKey, String> entry : entrySet()) { action.accept(entry.getKey(), entry.getValue()); } }
[ "public", "void", "forEach", "(", "BiConsumer", "<", "?", "super", "PropertyKey", ",", "?", "super", "String", ">", "action", ")", "{", "for", "(", "Map", ".", "Entry", "<", "PropertyKey", ",", "String", ">", "entry", ":", "entrySet", "(", ")", ")", ...
Iterates over all the key value pairs and performs the given action. @param action the operation to perform on each key value pair
[ "Iterates", "over", "all", "the", "key", "value", "pairs", "and", "performs", "the", "given", "action", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/conf/AlluxioProperties.java#L219-L223
RestComm/media-core
sdp/src/main/java/org/restcomm/media/core/sdp/SdpParserPipeline.java
SdpParserPipeline.addFieldParser
public void addFieldParser(char type, SdpParser<? extends SdpField> parser) { """ Adds a parser to the pipeline. @param parser The parser to be registered """ synchronized (this.fieldParsers) { this.fieldParsers.put(type, parser); } }
java
public void addFieldParser(char type, SdpParser<? extends SdpField> parser) { synchronized (this.fieldParsers) { this.fieldParsers.put(type, parser); } }
[ "public", "void", "addFieldParser", "(", "char", "type", ",", "SdpParser", "<", "?", "extends", "SdpField", ">", "parser", ")", "{", "synchronized", "(", "this", ".", "fieldParsers", ")", "{", "this", ".", "fieldParsers", ".", "put", "(", "type", ",", "p...
Adds a parser to the pipeline. @param parser The parser to be registered
[ "Adds", "a", "parser", "to", "the", "pipeline", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/sdp/src/main/java/org/restcomm/media/core/sdp/SdpParserPipeline.java#L123-L127
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.copy
public static long copy(InputStream in, OutputStream out) throws IORuntimeException { """ 拷贝流,使用默认Buffer大小 @param in 输入流 @param out 输出流 @return 传输的byte数 @throws IORuntimeException IO异常 """ return copy(in, out, DEFAULT_BUFFER_SIZE); }
java
public static long copy(InputStream in, OutputStream out) throws IORuntimeException { return copy(in, out, DEFAULT_BUFFER_SIZE); }
[ "public", "static", "long", "copy", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "IORuntimeException", "{", "return", "copy", "(", "in", ",", "out", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "}" ]
拷贝流,使用默认Buffer大小 @param in 输入流 @param out 输出流 @return 传输的byte数 @throws IORuntimeException IO异常
[ "拷贝流,使用默认Buffer大小" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L133-L135
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
EventListenerSupport.initializeTransientFields
private void initializeTransientFields(final Class<L> listenerInterface, final ClassLoader classLoader) { """ Initialize transient fields. @param listenerInterface the class of the listener interface @param classLoader the class loader to be used """ @SuppressWarnings("unchecked") // Will throw CCE h...
java
private void initializeTransientFields(final Class<L> listenerInterface, final ClassLoader classLoader) { @SuppressWarnings("unchecked") // Will throw CCE here if not correct final L[] array = (L[]) Array.newInstance(listenerInterface, 0); this.prototypeArray = array; createProxy...
[ "private", "void", "initializeTransientFields", "(", "final", "Class", "<", "L", ">", "listenerInterface", ",", "final", "ClassLoader", "classLoader", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// Will throw CCE here if not correct", "final", "L", ...
Initialize transient fields. @param listenerInterface the class of the listener interface @param classLoader the class loader to be used
[ "Initialize", "transient", "fields", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java#L291-L297
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java
ComputePoliciesInner.updateAsync
public Observable<ComputePolicyInner> updateAsync(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters) { """ Updates the specified compute policy. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data ...
java
public Observable<ComputePolicyInner> updateAsync(String resourceGroupName, String accountName, String computePolicyName, UpdateComputePolicyParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, computePolicyName, parameters).map(new Func1<ServiceResponse<ComputePolicyIn...
[ "public", "Observable", "<", "ComputePolicyInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "computePolicyName", ",", "UpdateComputePolicyParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAsy...
Updates the specified compute policy. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @param computePolicyName The name of the compute policy to update. @param parameters Parameters supplied to update the compute policy. @throws IllegalArgu...
[ "Updates", "the", "specified", "compute", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/ComputePoliciesInner.java#L538-L545
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java
DeadCodeEliminator.removeDeadFields
private void removeDeadFields(String clazz, List<BodyDeclaration> declarations) { """ Deletes non-constant dead fields from a type's body declarations list. """ Iterator<BodyDeclaration> declarationsIter = declarations.iterator(); while (declarationsIter.hasNext()) { BodyDeclaration declaration =...
java
private void removeDeadFields(String clazz, List<BodyDeclaration> declarations) { Iterator<BodyDeclaration> declarationsIter = declarations.iterator(); while (declarationsIter.hasNext()) { BodyDeclaration declaration = declarationsIter.next(); if (declaration instanceof FieldDeclaration) { F...
[ "private", "void", "removeDeadFields", "(", "String", "clazz", ",", "List", "<", "BodyDeclaration", ">", "declarations", ")", "{", "Iterator", "<", "BodyDeclaration", ">", "declarationsIter", "=", "declarations", ".", "iterator", "(", ")", ";", "while", "(", "...
Deletes non-constant dead fields from a type's body declarations list.
[ "Deletes", "non", "-", "constant", "dead", "fields", "from", "a", "type", "s", "body", "declarations", "list", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L204-L227
fcrepo4-exts/fcrepo-camel-toolbox
fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java
AuditSparqlProcessor.serializedGraphForMessage
private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException { """ Convert a Camel message to audit event description. @param message Camel message produced by an audit event @param subject RDF subject of the audit description """ // serialize tri...
java
private static String serializedGraphForMessage(final Message message, final Resource subject) throws IOException { // serialize triples final ByteArrayOutputStream serializedGraph = new ByteArrayOutputStream(); final Model model = createDefaultModel(); // get info from jms message hea...
[ "private", "static", "String", "serializedGraphForMessage", "(", "final", "Message", "message", ",", "final", "Resource", "subject", ")", "throws", "IOException", "{", "// serialize triples", "final", "ByteArrayOutputStream", "serializedGraph", "=", "new", "ByteArrayOutpu...
Convert a Camel message to audit event description. @param message Camel message produced by an audit event @param subject RDF subject of the audit description
[ "Convert", "a", "Camel", "message", "to", "audit", "event", "description", "." ]
train
https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-audit-triplestore/src/main/java/org/fcrepo/camel/audit/triplestore/AuditSparqlProcessor.java#L120-L155
playn/playn
html/src/playn/super/java/nio/CharBuffer.java
CharBuffer.append
public CharBuffer append (CharSequence csq, int start, int end) { """ Writes chars of the given {@code CharSequence} to the current position of this buffer, and increases the position by the number of chars written. @param csq the {@code CharSequence} to write. @param start the first char to write, must not b...
java
public CharBuffer append (CharSequence csq, int start, int end) { if (csq == null) { csq = "null"; //$NON-NLS-1$ } CharSequence cs = csq.subSequence(start, end); if (cs.length() > 0) { return put(cs.toString()); } return this; }
[ "public", "CharBuffer", "append", "(", "CharSequence", "csq", ",", "int", "start", ",", "int", "end", ")", "{", "if", "(", "csq", "==", "null", ")", "{", "csq", "=", "\"null\"", ";", "//$NON-NLS-1$", "}", "CharSequence", "cs", "=", "csq", ".", "subSequ...
Writes chars of the given {@code CharSequence} to the current position of this buffer, and increases the position by the number of chars written. @param csq the {@code CharSequence} to write. @param start the first char to write, must not be negative and not greater than {@code csq.length()}. @param end the last char ...
[ "Writes", "chars", "of", "the", "given", "{", "@code", "CharSequence", "}", "to", "the", "current", "position", "of", "this", "buffer", "and", "increases", "the", "position", "by", "the", "number", "of", "chars", "written", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/html/src/playn/super/java/nio/CharBuffer.java#L515-L524
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java
CommonConfigUtils.getRequiredConfigAttributeWithDefaultValueAndConfigId
public String getRequiredConfigAttributeWithDefaultValueAndConfigId(Map<String, Object> props, String key, String defaultValue, String configId) { """ Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned. ...
java
public String getRequiredConfigAttributeWithDefaultValueAndConfigId(Map<String, Object> props, String key, String defaultValue, String configId) { String result = getAndTrimConfigAttribute(props, key); if (key != null && result == null) { if (defaultValue != null) { result = ...
[ "public", "String", "getRequiredConfigAttributeWithDefaultValueAndConfigId", "(", "Map", "<", "String", ",", "Object", ">", "props", ",", "String", "key", ",", "String", "defaultValue", ",", "String", "configId", ")", "{", "String", "result", "=", "getAndTrimConfigA...
Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned. If the default value is also null, an error message will be logged.
[ "Returns", "the", "value", "for", "the", "configuration", "attribute", "matching", "the", "key", "provided", ".", "If", "the", "value", "does", "not", "exist", "or", "is", "empty", "the", "provided", "default", "value", "will", "be", "returned", ".", "If", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java#L76-L86
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseDateHeaderRange
private void parseDateHeaderRange(Map<Object, Object> props) { """ Parse the date header range value from the input properties. @param props """ // @313642 Object value = props.get(HttpConfigConstants.PROPNAME_DATE_HEADER_RANGE); if (null != value) { try { ...
java
private void parseDateHeaderRange(Map<Object, Object> props) { // @313642 Object value = props.get(HttpConfigConstants.PROPNAME_DATE_HEADER_RANGE); if (null != value) { try { this.lDateHeaderRange = minLimit(convertLong(value), 0L); if (TraceComponent....
[ "private", "void", "parseDateHeaderRange", "(", "Map", "<", "Object", ",", "Object", ">", "props", ")", "{", "// @313642", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_DATE_HEADER_RANGE", ")", ";", "if", "(", "null", ...
Parse the date header range value from the input properties. @param props
[ "Parse", "the", "date", "header", "range", "value", "from", "the", "input", "properties", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1091-L1107
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.createResourceTypeInfo
@SuppressWarnings("deprecation") private CmsNewResourceInfo createResourceTypeInfo(I_CmsResourceType resType, CmsResource copyResource) { """ Creates a resource type info bean for a given resource type.<p> @param resType the resource type @param copyResource the structure id of the copy resource @return...
java
@SuppressWarnings("deprecation") private CmsNewResourceInfo createResourceTypeInfo(I_CmsResourceType resType, CmsResource copyResource) { String name = resType.getTypeName(); Locale locale = getWorkplaceLocale(); String subtitle = CmsWorkplaceMessages.getResourceTypeDescription(locale, name...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "CmsNewResourceInfo", "createResourceTypeInfo", "(", "I_CmsResourceType", "resType", ",", "CmsResource", "copyResource", ")", "{", "String", "name", "=", "resType", ".", "getTypeName", "(", ")", ";", "...
Creates a resource type info bean for a given resource type.<p> @param resType the resource type @param copyResource the structure id of the copy resource @return the resource type info bean
[ "Creates", "a", "resource", "type", "info", "bean", "for", "a", "given", "resource", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L1986-L2018
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VirtualFile.java
VirtualFile.getChild
public VirtualFile getChild(String path) { """ Get a child virtual file. The child may or may not exist in the virtual filesystem. @param path the path @return the child @throws IllegalArgumentException if the path is null """ if (path == null) { throw VFSMessages.MESSAGES.nullArgumen...
java
public VirtualFile getChild(String path) { if (path == null) { throw VFSMessages.MESSAGES.nullArgument("path"); } final List<String> pathParts = PathTokenizer.getTokens(path); VirtualFile current = this; for (String part : pathParts) { if (PathTokenizer.is...
[ "public", "VirtualFile", "getChild", "(", "String", "path", ")", "{", "if", "(", "path", "==", "null", ")", "{", "throw", "VFSMessages", ".", "MESSAGES", ".", "nullArgument", "(", "\"path\"", ")", ";", "}", "final", "List", "<", "String", ">", "pathParts...
Get a child virtual file. The child may or may not exist in the virtual filesystem. @param path the path @return the child @throws IllegalArgumentException if the path is null
[ "Get", "a", "child", "virtual", "file", ".", "The", "child", "may", "or", "may", "not", "exist", "in", "the", "virtual", "filesystem", "." ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VirtualFile.java#L494-L509
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/base64/Base64.java
Base64.safeDecodeAsString
@Nullable public static String safeDecodeAsString (@Nullable final byte [] aEncodedBytes, @Nonnull final Charset aCharset) { """ Decode the byte array and convert it to a string. @param aEncodedBytes The encoded byte array. @param aCharset The character set to be used. @return <code>null</code> if decodin...
java
@Nullable public static String safeDecodeAsString (@Nullable final byte [] aEncodedBytes, @Nonnull final Charset aCharset) { ValueEnforcer.notNull (aCharset, "Charset"); return aEncodedBytes == null ? null : safeDecodeAsString (aEncodedBytes, 0, aEncodedBytes.length, aCharset); }
[ "@", "Nullable", "public", "static", "String", "safeDecodeAsString", "(", "@", "Nullable", "final", "byte", "[", "]", "aEncodedBytes", ",", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aCharset", ",", "\"Char...
Decode the byte array and convert it to a string. @param aEncodedBytes The encoded byte array. @param aCharset The character set to be used. @return <code>null</code> if decoding failed.
[ "Decode", "the", "byte", "array", "and", "convert", "it", "to", "a", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/base64/Base64.java#L2690-L2696
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/ClustersInner.java
ClustersInner.updateAsync
public Observable<ClusterInner> updateAsync(String resourceGroupName, String clusterName, ClusterUpdateParameters parameters) { """ Update the properties of a given cluster. @param resourceGroupName Name of the resource group to which the resource belongs. @param clusterName The name of the cluster within the ...
java
public Observable<ClusterInner> updateAsync(String resourceGroupName, String clusterName, ClusterUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() { @Override publi...
[ "public", "Observable", "<", "ClusterInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "ClusterUpdateParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterNa...
Update the properties of a given cluster. @param resourceGroupName Name of the resource group to which the resource belongs. @param clusterName The name of the cluster within the specified resource group. Cluster names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). Th...
[ "Update", "the", "properties", "of", "a", "given", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/ClustersInner.java#L333-L340
openbase/jul
pattern/launch/src/main/java/org/openbase/jul/pattern/launch/AbstractLauncher.java
AbstractLauncher.instantiateLaunchable
protected L instantiateLaunchable() throws CouldNotPerformException { """ Method creates a launchable instance without any arguments.. In case the launchable needs arguments you can overwrite this method and instantiate the launchable by ourself. @return the new instantiated launchable. @throws CouldNotPerfo...
java
protected L instantiateLaunchable() throws CouldNotPerformException { try { return launchableClass.newInstance(); } catch (java.lang.InstantiationException | IllegalAccessException ex) { throw new CouldNotPerformException("Could not load launchable class!", ex); } }
[ "protected", "L", "instantiateLaunchable", "(", ")", "throws", "CouldNotPerformException", "{", "try", "{", "return", "launchableClass", ".", "newInstance", "(", ")", ";", "}", "catch", "(", "java", ".", "lang", ".", "InstantiationException", "|", "IllegalAccessEx...
Method creates a launchable instance without any arguments.. In case the launchable needs arguments you can overwrite this method and instantiate the launchable by ourself. @return the new instantiated launchable. @throws CouldNotPerformException is thrown in case the launchable could not properly be instantiated.
[ "Method", "creates", "a", "launchable", "instance", "without", "any", "arguments", "..", "In", "case", "the", "launchable", "needs", "arguments", "you", "can", "overwrite", "this", "method", "and", "instantiate", "the", "launchable", "by", "ourself", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/launch/src/main/java/org/openbase/jul/pattern/launch/AbstractLauncher.java#L148-L154
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java
GregorianCalendar.monthLength
private int monthLength(int month) { """ Returns the length of the specified month in the year provided by internalGet(YEAR). @see #isLeapYear(int) """ int year = internalGet(YEAR); if (internalGetEra() == BCE) { year = 1 - year; } return monthLength(month, year)...
java
private int monthLength(int month) { int year = internalGet(YEAR); if (internalGetEra() == BCE) { year = 1 - year; } return monthLength(month, year); }
[ "private", "int", "monthLength", "(", "int", "month", ")", "{", "int", "year", "=", "internalGet", "(", "YEAR", ")", ";", "if", "(", "internalGetEra", "(", ")", "==", "BCE", ")", "{", "year", "=", "1", "-", "year", ";", "}", "return", "monthLength", ...
Returns the length of the specified month in the year provided by internalGet(YEAR). @see #isLeapYear(int)
[ "Returns", "the", "length", "of", "the", "specified", "month", "in", "the", "year", "provided", "by", "internalGet", "(", "YEAR", ")", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L3270-L3276
eclipse/xtext-core
org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java
SourceLevelURIsAdapter.setSourceLevelUrisWithoutCopy
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) { """ Installs the given set of URIs as the source level URIs. Does not copy the given set but uses it directly. """ final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resour...
java
public static void setSourceLevelUrisWithoutCopy(final ResourceSet resourceSet, final Set<URI> uris) { final SourceLevelURIsAdapter adapter = SourceLevelURIsAdapter.findOrCreateAdapter(resourceSet); adapter.sourceLevelURIs = uris; }
[ "public", "static", "void", "setSourceLevelUrisWithoutCopy", "(", "final", "ResourceSet", "resourceSet", ",", "final", "Set", "<", "URI", ">", "uris", ")", "{", "final", "SourceLevelURIsAdapter", "adapter", "=", "SourceLevelURIsAdapter", ".", "findOrCreateAdapter", "(...
Installs the given set of URIs as the source level URIs. Does not copy the given set but uses it directly.
[ "Installs", "the", "given", "set", "of", "URIs", "as", "the", "source", "level", "URIs", ".", "Does", "not", "copy", "the", "given", "set", "but", "uses", "it", "directly", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/xtend-gen/org/eclipse/xtext/resource/persistence/SourceLevelURIsAdapter.java#L78-L81
bpsm/edn-java
src/main/java/us/bpsm/edn/Tag.java
Tag.newTag
public static Tag newTag(String prefix, String name) { """ Provide a Tag with the given prefix and name. <p> Bear in mind that tags with no prefix are reserved for use by the edn format itself. @param prefix An empty String or a non-empty String obeying the restrictions specified by edn. Never null. @para...
java
public static Tag newTag(String prefix, String name) { return newTag(newSymbol(prefix, name)); }
[ "public", "static", "Tag", "newTag", "(", "String", "prefix", ",", "String", "name", ")", "{", "return", "newTag", "(", "newSymbol", "(", "prefix", ",", "name", ")", ")", ";", "}" ]
Provide a Tag with the given prefix and name. <p> Bear in mind that tags with no prefix are reserved for use by the edn format itself. @param prefix An empty String or a non-empty String obeying the restrictions specified by edn. Never null. @param name A non-empty string obeying the restrictions specified by edn. Nev...
[ "Provide", "a", "Tag", "with", "the", "given", "prefix", "and", "name", ".", "<p", ">", "Bear", "in", "mind", "that", "tags", "with", "no", "prefix", "are", "reserved", "for", "use", "by", "the", "edn", "format", "itself", "." ]
train
https://github.com/bpsm/edn-java/blob/c5dfdb77431da1aca3c257599b237a21575629b2/src/main/java/us/bpsm/edn/Tag.java#L61-L63
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java
ProviderManager.removeExtensionProvider
public static String removeExtensionProvider(String elementName, String namespace) { """ Removes an extension provider with the specified element name and namespace. This method is typically called to cleanup providers that are programmatically added using the {@link #addExtensionProvider(String, String, Object)...
java
public static String removeExtensionProvider(String elementName, String namespace) { String key = getKey(elementName, namespace); extensionProviders.remove(key); return key; }
[ "public", "static", "String", "removeExtensionProvider", "(", "String", "elementName", ",", "String", "namespace", ")", "{", "String", "key", "=", "getKey", "(", "elementName", ",", "namespace", ")", ";", "extensionProviders", ".", "remove", "(", "key", ")", "...
Removes an extension provider with the specified element name and namespace. This method is typically called to cleanup providers that are programmatically added using the {@link #addExtensionProvider(String, String, Object) addExtensionProvider} method. @param elementName the XML element name. @param namespace the XM...
[ "Removes", "an", "extension", "provider", "with", "the", "specified", "element", "name", "and", "namespace", ".", "This", "method", "is", "typically", "called", "to", "cleanup", "providers", "that", "are", "programmatically", "added", "using", "the", "{", "@link...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java#L280-L284
jasminb/jsonapi-converter
src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java
ResourceConverter.setIdValue
private void setIdValue(Object target, JsonNode idValue) throws IllegalAccessException { """ Sets an id attribute value to a target object. @param target target POJO @param idValue id node @throws IllegalAccessException thrown in case target field is not accessible """ Field idField = configuration.getIdF...
java
private void setIdValue(Object target, JsonNode idValue) throws IllegalAccessException { Field idField = configuration.getIdField(target.getClass()); ResourceIdHandler idHandler = configuration.getIdHandler(target.getClass()); if (idValue != null) { idField.set(target, idHandler.fromString(idValue.asText()));...
[ "private", "void", "setIdValue", "(", "Object", "target", ",", "JsonNode", "idValue", ")", "throws", "IllegalAccessException", "{", "Field", "idField", "=", "configuration", ".", "getIdField", "(", "target", ".", "getClass", "(", ")", ")", ";", "ResourceIdHandle...
Sets an id attribute value to a target object. @param target target POJO @param idValue id node @throws IllegalAccessException thrown in case target field is not accessible
[ "Sets", "an", "id", "attribute", "value", "to", "a", "target", "object", "." ]
train
https://github.com/jasminb/jsonapi-converter/blob/73b41c3b9274e70e62b3425071ca8afdc7bddaf6/src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java#L622-L629
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/WhileMatchFilterAdapter.java
WhileMatchFilterAdapter.hasFilter
private boolean hasFilter(Filter filter, WhileMatchFilter whileMatchFilter) { """ Return {@code true} iff {@code whileMatchFilter} is in {@code filter}. """ if (filter == whileMatchFilter) { return true; } if (filter instanceof FilterList) { FilterList list = (FilterList) filter; ...
java
private boolean hasFilter(Filter filter, WhileMatchFilter whileMatchFilter) { if (filter == whileMatchFilter) { return true; } if (filter instanceof FilterList) { FilterList list = (FilterList) filter; for (Filter subFilter : list.getFilters()) { if (hasFilter(subFilter, whileMatc...
[ "private", "boolean", "hasFilter", "(", "Filter", "filter", ",", "WhileMatchFilter", "whileMatchFilter", ")", "{", "if", "(", "filter", "==", "whileMatchFilter", ")", "{", "return", "true", ";", "}", "if", "(", "filter", "instanceof", "FilterList", ")", "{", ...
Return {@code true} iff {@code whileMatchFilter} is in {@code filter}.
[ "Return", "{" ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/adapters/filters/WhileMatchFilterAdapter.java#L166-L181
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java
SARLJvmModelInferrer.appendAOPMembers
protected void appendAOPMembers( JvmGenericType featureContainerType, XtendTypeDeclaration container, GenerationContext context) { """ Generate the code for the given SARL members in a agent-oriented container. @param featureContainerType the feature container. @param container the SARL container. @p...
java
protected void appendAOPMembers( JvmGenericType featureContainerType, XtendTypeDeclaration container, GenerationContext context) { Utils.populateInheritanceContext( featureContainerType, context.getInheritedFinalOperations(), context.getInheritedOverridableOperations(), null, context.get...
[ "protected", "void", "appendAOPMembers", "(", "JvmGenericType", "featureContainerType", ",", "XtendTypeDeclaration", "container", ",", "GenerationContext", "context", ")", "{", "Utils", ".", "populateInheritanceContext", "(", "featureContainerType", ",", "context", ".", "...
Generate the code for the given SARL members in a agent-oriented container. @param featureContainerType the feature container. @param container the SARL container. @param context description of the generation context in which the members must be considered.
[ "Generate", "the", "code", "for", "the", "given", "SARL", "members", "in", "a", "agent", "-", "oriented", "container", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java#L2185-L2227
Omertron/api-omdb
src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java
OmdbBuilder.setImdbId
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException { """ A valid IMDb ID @param imdbId The IMDB ID @return @throws OMDBException """ if (StringUtils.isBlank(imdbId)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!"); } ...
java
public OmdbBuilder setImdbId(final String imdbId) throws OMDBException { if (StringUtils.isBlank(imdbId)) { throw new OMDBException(ApiExceptionType.UNKNOWN_CAUSE, "Must provide an IMDB ID!"); } params.add(Param.IMDB, imdbId); return this; }
[ "public", "OmdbBuilder", "setImdbId", "(", "final", "String", "imdbId", ")", "throws", "OMDBException", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "imdbId", ")", ")", "{", "throw", "new", "OMDBException", "(", "ApiExceptionType", ".", "UNKNOWN_CAUSE", ...
A valid IMDb ID @param imdbId The IMDB ID @return @throws OMDBException
[ "A", "valid", "IMDb", "ID" ]
train
https://github.com/Omertron/api-omdb/blob/acb506ded2d7b8a4159b48161ffab8cb5b7bad44/src/main/java/com/omertron/omdbapi/tools/OmdbBuilder.java#L74-L80
uber/NullAway
nullaway/src/main/java/com/uber/nullaway/NullAway.java
NullAway.matchReturn
@Override public Description matchReturn(ReturnTree tree, VisitorState state) { """ We are trying to see if (1) we are in a method guaranteed to return something non-null, and (2) this return statement can return something null. """ if (!matchWithinClass) { return Description.NO_MATCH; } h...
java
@Override public Description matchReturn(ReturnTree tree, VisitorState state) { if (!matchWithinClass) { return Description.NO_MATCH; } handler.onMatchReturn(this, tree, state); ExpressionTree retExpr = tree.getExpression(); // let's do quick checks on returned expression first if (retEx...
[ "@", "Override", "public", "Description", "matchReturn", "(", "ReturnTree", "tree", ",", "VisitorState", "state", ")", "{", "if", "(", "!", "matchWithinClass", ")", "{", "return", "Description", ".", "NO_MATCH", ";", "}", "handler", ".", "onMatchReturn", "(", ...
We are trying to see if (1) we are in a method guaranteed to return something non-null, and (2) this return statement can return something null.
[ "We", "are", "trying", "to", "see", "if", "(", "1", ")", "we", "are", "in", "a", "method", "guaranteed", "to", "return", "something", "non", "-", "null", "and", "(", "2", ")", "this", "return", "statement", "can", "return", "something", "null", "." ]
train
https://github.com/uber/NullAway/blob/c3979b4241f80411dbba6aac3ff653acbb88d00b/nullaway/src/main/java/com/uber/nullaway/NullAway.java#L284-L318
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java
ParameterSerializer.parseTwoDimensionsArray
protected Object parseTwoDimensionsArray(GetterMethodCover method, Object array) { """ Serialize two-dimensions array to ISFSArray @param method method's structure @param array the two-dimensions array @return ISFSArray object """ ISFSArray answer = new SFSArray(); int size = ...
java
protected Object parseTwoDimensionsArray(GetterMethodCover method, Object array) { ISFSArray answer = new SFSArray(); int size = Array.getLength(array); for(int i = 0 ; i < size ; i++) { SFSDataType dtype = getSFSArrayDataType(method); Object value = parseArr...
[ "protected", "Object", "parseTwoDimensionsArray", "(", "GetterMethodCover", "method", ",", "Object", "array", ")", "{", "ISFSArray", "answer", "=", "new", "SFSArray", "(", ")", ";", "int", "size", "=", "Array", ".", "getLength", "(", "array", ")", ";", "for"...
Serialize two-dimensions array to ISFSArray @param method method's structure @param array the two-dimensions array @return ISFSArray object
[ "Serialize", "two", "-", "dimensions", "array", "to", "ISFSArray" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java#L123-L133
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/authentication/AuthenticationApi.java
AuthenticationApi.changePassword
public ModelApiResponse changePassword(ChangePasswordOperation request, String authorization) throws AuthenticationApiException { """ Change password Change the user&#39;s password. @param request request (required) @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/t...
java
public ModelApiResponse changePassword(ChangePasswordOperation request, String authorization) throws AuthenticationApiException { try { ApiRequestChangePasswordOperation req = new ApiRequestChangePasswordOperation(); req.data(request); return authenticationApi.changePassword(...
[ "public", "ModelApiResponse", "changePassword", "(", "ChangePasswordOperation", "request", ",", "String", "authorization", ")", "throws", "AuthenticationApiException", "{", "try", "{", "ApiRequestChangePasswordOperation", "req", "=", "new", "ApiRequestChangePasswordOperation", ...
Change password Change the user&#39;s password. @param request request (required) @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Authorization: bearer a4b5da75-a584-4053-9227-0f0...
[ "Change", "password", "Change", "the", "user&#39", ";", "s", "password", "." ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/authentication/AuthenticationApi.java#L70-L78
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.checkNewWidgetsAvailable
public void checkNewWidgetsAvailable(final CmsUUID structureId, final AsyncCallback<Boolean> resultCallback) { """ Checks whether GWT widgets are available for all fields of a content.<p> @param structureId the structure id of the content @param resultCallback the callback for the result """ CmsRp...
java
public void checkNewWidgetsAvailable(final CmsUUID structureId, final AsyncCallback<Boolean> resultCallback) { CmsRpcAction<Boolean> action = new CmsRpcAction<Boolean>() { @Override public void execute() { start(200, false); getContainerpageService().ch...
[ "public", "void", "checkNewWidgetsAvailable", "(", "final", "CmsUUID", "structureId", ",", "final", "AsyncCallback", "<", "Boolean", ">", "resultCallback", ")", "{", "CmsRpcAction", "<", "Boolean", ">", "action", "=", "new", "CmsRpcAction", "<", "Boolean", ">", ...
Checks whether GWT widgets are available for all fields of a content.<p> @param structureId the structure id of the content @param resultCallback the callback for the result
[ "Checks", "whether", "GWT", "widgets", "are", "available", "for", "all", "fields", "of", "a", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L908-L930
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleInstallChaincodeProposalResponse.java
LifecycleInstallChaincodeProposalResponse.getPackageId
public String getPackageId() throws ProposalException { """ The packageId the identifies this chaincode change. @return the package id. @throws ProposalException """ if (Status.SUCCESS != getStatus()) { throw new ProposalException(format("Status of install proposal did not ret ok for %s...
java
public String getPackageId() throws ProposalException { if (Status.SUCCESS != getStatus()) { throw new ProposalException(format("Status of install proposal did not ret ok for %s, %s ", getPeer(), getStatus())); } ByteString payload = getProposalResponse().getResponse().getPayload(); ...
[ "public", "String", "getPackageId", "(", ")", "throws", "ProposalException", "{", "if", "(", "Status", ".", "SUCCESS", "!=", "getStatus", "(", ")", ")", "{", "throw", "new", "ProposalException", "(", "format", "(", "\"Status of install proposal did not ret ok for %s...
The packageId the identifies this chaincode change. @return the package id. @throws ProposalException
[ "The", "packageId", "the", "identifies", "this", "chaincode", "change", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleInstallChaincodeProposalResponse.java#L34-L46
OpenLiberty/open-liberty
dev/com.ibm.ws.anno/src/com/ibm/ws/anno/classsource/internal/ClassSourceImpl_MappedSimple.java
ClassSourceImpl_MappedSimple.openResourceStream
@Override public InputStream openResourceStream(String className, String resourceName) throws ClassSource_Exception { """ <p>Open a stream for a named class which used a named resource.</p> <p>Answer null if the provider does not contain the named resource. See {@link #isProviderResourc...
java
@Override public InputStream openResourceStream(String className, String resourceName) throws ClassSource_Exception { String methodName = "openResourceStream"; if (!isProviderResource(resourceName)) { if (tc.isDebugEnabled()) { Tr.debug(tc, MessageFor...
[ "@", "Override", "public", "InputStream", "openResourceStream", "(", "String", "className", ",", "String", "resourceName", ")", "throws", "ClassSource_Exception", "{", "String", "methodName", "=", "\"openResourceStream\"", ";", "if", "(", "!", "isProviderResource", "(...
<p>Open a stream for a named class which used a named resource.</p> <p>Answer null if the provider does not contain the named resource. See {@link #isProviderResource(String)}.</p> @param className The name of the class which mapped to the resource. @param resourceName The name of the resource used by the class. @re...
[ "<p", ">", "Open", "a", "stream", "for", "a", "named", "class", "which", "used", "a", "named", "resource", ".", "<", "/", "p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.anno/src/com/ibm/ws/anno/classsource/internal/ClassSourceImpl_MappedSimple.java#L510-L560
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java
ReactionManipulator.assignRoleAndGrp
private static void assignRoleAndGrp(IAtomContainer mol, ReactionRole role, int grpId) { """ Assigns a reaction role and group id to all atoms in a molecule. @param mol molecule @param role role to assign @param grpId group id """ for (IAtom atom : mol.atoms()) { atom.setProperty(CDKCo...
java
private static void assignRoleAndGrp(IAtomContainer mol, ReactionRole role, int grpId) { for (IAtom atom : mol.atoms()) { atom.setProperty(CDKConstants.REACTION_ROLE, role); atom.setProperty(CDKConstants.REACTION_GROUP, grpId); } }
[ "private", "static", "void", "assignRoleAndGrp", "(", "IAtomContainer", "mol", ",", "ReactionRole", "role", ",", "int", "grpId", ")", "{", "for", "(", "IAtom", "atom", ":", "mol", ".", "atoms", "(", ")", ")", "{", "atom", ".", "setProperty", "(", "CDKCon...
Assigns a reaction role and group id to all atoms in a molecule. @param mol molecule @param role role to assign @param grpId group id
[ "Assigns", "a", "reaction", "role", "and", "group", "id", "to", "all", "atoms", "in", "a", "molecule", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java#L313-L318
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.removeByG_NotS
@Override public void removeByG_NotS(long groupId, int status) { """ Removes all the commerce price lists where groupId = &#63; and status &ne; &#63; from the database. @param groupId the group ID @param status the status """ for (CommercePriceList commercePriceList : findByG_NotS(groupId, status, Q...
java
@Override public void removeByG_NotS(long groupId, int status) { for (CommercePriceList commercePriceList : findByG_NotS(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceList); } }
[ "@", "Override", "public", "void", "removeByG_NotS", "(", "long", "groupId", ",", "int", "status", ")", "{", "for", "(", "CommercePriceList", "commercePriceList", ":", "findByG_NotS", "(", "groupId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "Query...
Removes all the commerce price lists where groupId = &#63; and status &ne; &#63; from the database. @param groupId the group ID @param status the status
[ "Removes", "all", "the", "commerce", "price", "lists", "where", "groupId", "=", "&#63", ";", "and", "status", "&ne", ";", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L4267-L4273
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/xml/XmlUtils.java
XmlUtils.getChildText
public static String getChildText(Element elem, String childTagName) { """ Return content of child element with given tag name. If more than one children with this name are present, the content of the last element is returned. @param elem @param childTagName @return content of child element or null if no ch...
java
public static String getChildText(Element elem, String childTagName) { NodeList nodeList = elem.getElementsByTagName(childTagName); int len = nodeList.getLength(); if (len == 0) { return null; } return getElementText((Element)nodeList.item(len - 1)); ...
[ "public", "static", "String", "getChildText", "(", "Element", "elem", ",", "String", "childTagName", ")", "{", "NodeList", "nodeList", "=", "elem", ".", "getElementsByTagName", "(", "childTagName", ")", ";", "int", "len", "=", "nodeList", ".", "getLength", "("...
Return content of child element with given tag name. If more than one children with this name are present, the content of the last element is returned. @param elem @param childTagName @return content of child element or null if no child element with this name was found
[ "Return", "content", "of", "child", "element", "with", "given", "tag", "name", ".", "If", "more", "than", "one", "children", "with", "this", "name", "are", "present", "the", "content", "of", "the", "last", "element", "is", "returned", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/xml/XmlUtils.java#L67-L78
pierre/serialization
hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java
SmileRecordReader.initialize
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { """ Called once at initialization. @param genericSplit the split that defines the range of records to read @param context the information about the task @throws java.io.IOE...
java
@Override public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { FileSplit split = (FileSplit) genericSplit; Configuration job = context.getConfiguration(); start = split.getStart(); end = start + split.getLength(); ...
[ "@", "Override", "public", "void", "initialize", "(", "InputSplit", "genericSplit", ",", "TaskAttemptContext", "context", ")", "throws", "IOException", ",", "InterruptedException", "{", "FileSplit", "split", "=", "(", "FileSplit", ")", "genericSplit", ";", "Configur...
Called once at initialization. @param genericSplit the split that defines the range of records to read @param context the information about the task @throws java.io.IOException @throws InterruptedException
[ "Called", "once", "at", "initialization", "." ]
train
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/hadoop/src/main/java/com/ning/metrics/serialization/hadoop/SmileRecordReader.java#L55-L74
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java
Contract.sameLength
public static void sameLength(final Object[] array1, final Object[] array2, final String array1Name, final String array2Name) { """ Checks that the arrays have the same number of elements, otherwise throws and exception @param array1 the first array @param array2 the second array @param array1Name the name of t...
java
public static void sameLength(final Object[] array1, final Object[] array2, final String array1Name, final String array2Name) { notNull(array1, array1Name); notNull(array2, array2Name); if (array1.length != array2.length) { throw new IllegalArgumentException("expecting " + maskNullA...
[ "public", "static", "void", "sameLength", "(", "final", "Object", "[", "]", "array1", ",", "final", "Object", "[", "]", "array2", ",", "final", "String", "array1Name", ",", "final", "String", "array2Name", ")", "{", "notNull", "(", "array1", ",", "array1Na...
Checks that the arrays have the same number of elements, otherwise throws and exception @param array1 the first array @param array2 the second array @param array1Name the name of the first array @param array2Name the name of the second array @throws IllegalArgumentException if array1 or array2 are null or if the arrays...
[ "Checks", "that", "the", "arrays", "have", "the", "same", "number", "of", "elements", "otherwise", "throws", "and", "exception" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java#L112-L119
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyEval
public int polyEval(GrowQueue_I8 input , int x ) { """ Evaluate the polynomial using Horner's method. Avoids explicit calculating the powers of x. <p>01x**4 + 0fx**3 + 36x**2 + 78x + 40 = (((01 x + 0f) x + 36) x + 78) x + 40</p> <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,...
java
public int polyEval(GrowQueue_I8 input , int x ) { int y = input.data[0]&0xFF; for (int i = 1; i < input.size; i++) { y = multiply(y,x) ^ (input.data[i]&0xFF); } return y; }
[ "public", "int", "polyEval", "(", "GrowQueue_I8", "input", ",", "int", "x", ")", "{", "int", "y", "=", "input", ".", "data", "[", "0", "]", "&", "0xFF", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "input", ".", "size", ";", "i", "++...
Evaluate the polynomial using Horner's method. Avoids explicit calculating the powers of x. <p>01x**4 + 0fx**3 + 36x**2 + 78x + 40 = (((01 x + 0f) x + 36) x + 78) x + 40</p> <p>Coefficients for largest powers are first, e.g. 2*x**3 + 8*x**2+1 = [2,8,0,1]</p> @param input Polynomial being evaluated @param x Value of...
[ "Evaluate", "the", "polynomial", "using", "Horner", "s", "method", ".", "Avoids", "explicit", "calculating", "the", "powers", "of", "x", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L295-L303
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/slider/AjaxSlider.java
AjaxSlider.setAjaxChangeEvent
public void setAjaxChangeEvent(ISliderAjaxEvent ajaxChangeEvent) { """ Sets the call-back for the AJAX Change Event. @param ajaxChangeEvent """ this.ajaxEvents.put(SliderAjaxEvent.ajaxChangeEvent, ajaxChangeEvent); setChangeEvent(new SliderAjaxJsScopeUiEvent(this, SliderAjaxEvent.ajaxChangeEvent)); }
java
public void setAjaxChangeEvent(ISliderAjaxEvent ajaxChangeEvent) { this.ajaxEvents.put(SliderAjaxEvent.ajaxChangeEvent, ajaxChangeEvent); setChangeEvent(new SliderAjaxJsScopeUiEvent(this, SliderAjaxEvent.ajaxChangeEvent)); }
[ "public", "void", "setAjaxChangeEvent", "(", "ISliderAjaxEvent", "ajaxChangeEvent", ")", "{", "this", ".", "ajaxEvents", ".", "put", "(", "SliderAjaxEvent", ".", "ajaxChangeEvent", ",", "ajaxChangeEvent", ")", ";", "setChangeEvent", "(", "new", "SliderAjaxJsScopeUiEve...
Sets the call-back for the AJAX Change Event. @param ajaxChangeEvent
[ "Sets", "the", "call", "-", "back", "for", "the", "AJAX", "Change", "Event", "." ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/slider/AjaxSlider.java#L329-L333
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/methods/MethodIdentifier.java
MethodIdentifier.ofStatic
public static MethodIdentifier ofStatic(final String containingClass, final String methodName, final String returnType, final String... parameterTypes) { """ Creates an identifier of a static method. @param containingClass The class name @param methodName The method name @param returnType The return...
java
public static MethodIdentifier ofStatic(final String containingClass, final String methodName, final String returnType, final String... parameterTypes) { return of(containingClass, methodName, returnType, true, parameterTypes); }
[ "public", "static", "MethodIdentifier", "ofStatic", "(", "final", "String", "containingClass", ",", "final", "String", "methodName", ",", "final", "String", "returnType", ",", "final", "String", "...", "parameterTypes", ")", "{", "return", "of", "(", "containingCl...
Creates an identifier of a static method. @param containingClass The class name @param methodName The method name @param returnType The return type @param parameterTypes The parameter types @return The method identifier
[ "Creates", "an", "identifier", "of", "a", "static", "method", "." ]
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/model/methods/MethodIdentifier.java#L173-L175
graphql-java/java-dataloader
src/main/java/org/dataloader/DataLoader.java
DataLoader.loadMany
public CompletableFuture<List<V>> loadMany(List<K> keys) { """ Requests to load the list of data provided by the specified keys asynchronously, and returns a composite future of the resulting values. <p> If batching is enabled (the default), you'll have to call {@link DataLoader#dispatch()} at a later stage to ...
java
public CompletableFuture<List<V>> loadMany(List<K> keys) { return loadMany(keys, Collections.emptyList()); }
[ "public", "CompletableFuture", "<", "List", "<", "V", ">", ">", "loadMany", "(", "List", "<", "K", ">", "keys", ")", "{", "return", "loadMany", "(", "keys", ",", "Collections", ".", "emptyList", "(", ")", ")", ";", "}" ]
Requests to load the list of data provided by the specified keys asynchronously, and returns a composite future of the resulting values. <p> If batching is enabled (the default), you'll have to call {@link DataLoader#dispatch()} at a later stage to start batch execution. If you forget this call the future will never be...
[ "Requests", "to", "load", "the", "list", "of", "data", "provided", "by", "the", "specified", "keys", "asynchronously", "and", "returns", "a", "composite", "future", "of", "the", "resulting", "values", ".", "<p", ">", "If", "batching", "is", "enabled", "(", ...
train
https://github.com/graphql-java/java-dataloader/blob/dfdc8133ead10aa723f896b4a1fa4a1cec9a6fbc/src/main/java/org/dataloader/DataLoader.java#L415-L417
apache/incubator-druid
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
ApproximateHistogram.toHistogram
public Histogram toHistogram(final float[] breaks) { """ Computes a visual representation of the approximate histogram with bins laid out according to the given breaks @param breaks breaks defining the histogram bins @return visual representation of the histogram """ final double[] approximateBins = ...
java
public Histogram toHistogram(final float[] breaks) { final double[] approximateBins = new double[breaks.length - 1]; double prev = sum(breaks[0]); for (int i = 1; i < breaks.length; ++i) { double s = sum(breaks[i]); approximateBins[i - 1] = (float) (s - prev); prev = s; } retur...
[ "public", "Histogram", "toHistogram", "(", "final", "float", "[", "]", "breaks", ")", "{", "final", "double", "[", "]", "approximateBins", "=", "new", "double", "[", "breaks", ".", "length", "-", "1", "]", ";", "double", "prev", "=", "sum", "(", "break...
Computes a visual representation of the approximate histogram with bins laid out according to the given breaks @param breaks breaks defining the histogram bins @return visual representation of the histogram
[ "Computes", "a", "visual", "representation", "of", "the", "approximate", "histogram", "with", "bins", "laid", "out", "according", "to", "the", "given", "breaks" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java#L1610-L1622
jOOQ/jOOR
jOOR/src/main/java/org/joor/Reflect.java
Reflect.onClass
public static Reflect onClass(String name, ClassLoader classLoader) throws ReflectException { """ Wrap a class name, loading it via a given class loader. <p> This is the same as calling <code>onClass(Class.forName(name, classLoader))</code> @param name A fully qualified class name. @param classLoader The cl...
java
public static Reflect onClass(String name, ClassLoader classLoader) throws ReflectException { return onClass(forName(name, classLoader)); }
[ "public", "static", "Reflect", "onClass", "(", "String", "name", ",", "ClassLoader", "classLoader", ")", "throws", "ReflectException", "{", "return", "onClass", "(", "forName", "(", "name", ",", "classLoader", ")", ")", ";", "}" ]
Wrap a class name, loading it via a given class loader. <p> This is the same as calling <code>onClass(Class.forName(name, classLoader))</code> @param name A fully qualified class name. @param classLoader The class loader in whose context the class should be loaded. @return A wrapped class object, to be used for furthe...
[ "Wrap", "a", "class", "name", "loading", "it", "via", "a", "given", "class", "loader", ".", "<p", ">", "This", "is", "the", "same", "as", "calling", "<code", ">", "onClass", "(", "Class", ".", "forName", "(", "name", "classLoader", "))", "<", "/", "c...
train
https://github.com/jOOQ/jOOR/blob/40b42be12ecc9939560ff86921bbc57c99a21b85/jOOR/src/main/java/org/joor/Reflect.java#L184-L186
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java
MapConverter.sub
public Map<String, Object> sub(Map<String, Object> data, String prefix, String exclusiveAttrNames) { """ 返回request中以prefix.开头的参数 @param prefix a {@link java.lang.String} object. @param exclusiveAttrNames 要排除的属性串 @param data a {@link java.util.Map} object. @return a {@link java.util.Map} object. """ ...
java
public Map<String, Object> sub(Map<String, Object> data, String prefix, String exclusiveAttrNames) { return sub(data, prefix, exclusiveAttrNames, true); }
[ "public", "Map", "<", "String", ",", "Object", ">", "sub", "(", "Map", "<", "String", ",", "Object", ">", "data", ",", "String", "prefix", ",", "String", "exclusiveAttrNames", ")", "{", "return", "sub", "(", "data", ",", "prefix", ",", "exclusiveAttrName...
返回request中以prefix.开头的参数 @param prefix a {@link java.lang.String} object. @param exclusiveAttrNames 要排除的属性串 @param data a {@link java.util.Map} object. @return a {@link java.util.Map} object.
[ "返回request中以prefix", ".", "开头的参数" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java#L286-L288
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java
SelectMultiMenuRenderer.getValue2Render
public Object getValue2Render(FacesContext context, SelectMultiMenu menu) { """ Algorithm works as follows; - If it's an input component, submitted value is checked first since it'd be the value to be used in case validation errors terminates jsf lifecycle - Finally the value of the component is retrieved from ...
java
public Object getValue2Render(FacesContext context, SelectMultiMenu menu) { Object sv = menu.getSubmittedValue(); if (sv != null) { return sv; } Object val = menu.getValue(); if (val != null) { Converter converter = menu.getConverter(); if (converter != null) return converter.getAsString(contex...
[ "public", "Object", "getValue2Render", "(", "FacesContext", "context", ",", "SelectMultiMenu", "menu", ")", "{", "Object", "sv", "=", "menu", ".", "getSubmittedValue", "(", ")", ";", "if", "(", "sv", "!=", "null", ")", "{", "return", "sv", ";", "}", "Obj...
Algorithm works as follows; - If it's an input component, submitted value is checked first since it'd be the value to be used in case validation errors terminates jsf lifecycle - Finally the value of the component is retrieved from backing bean and if there's a converter, converted value is returned @param context Fac...
[ "Algorithm", "works", "as", "follows", ";", "-", "If", "it", "s", "an", "input", "component", "submitted", "value", "is", "checked", "first", "since", "it", "d", "be", "the", "value", "to", "be", "used", "in", "case", "validation", "errors", "terminates", ...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java#L465-L484
cchantep/acolyte
jdbc-driver/src/main/java/acolyte/jdbc/ParameterMetaData.java
ParameterMetaData.Scaled
public static ParameterDef Scaled(final int sqlType, final int scale) { """ Decimal parameter. @param sqlType the SQL type for the parameter definition @param scale the scale of the numeric parameter @return the parameter definition for a number with specified scale """ return new ParameterDef(jdb...
java
public static ParameterDef Scaled(final int sqlType, final int scale) { return new ParameterDef(jdbcTypeMappings.get(sqlType), parameterModeIn, sqlType, jdbcTypeNames.get(sqlType), jdb...
[ "public", "static", "ParameterDef", "Scaled", "(", "final", "int", "sqlType", ",", "final", "int", "scale", ")", "{", "return", "new", "ParameterDef", "(", "jdbcTypeMappings", ".", "get", "(", "sqlType", ")", ",", "parameterModeIn", ",", "sqlType", ",", "jdb...
Decimal parameter. @param sqlType the SQL type for the parameter definition @param scale the scale of the numeric parameter @return the parameter definition for a number with specified scale
[ "Decimal", "parameter", "." ]
train
https://github.com/cchantep/acolyte/blob/a383dff20fadc08ec9306f2f1f24b2a7e0047449/jdbc-driver/src/main/java/acolyte/jdbc/ParameterMetaData.java#L203-L213
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMPath.java
JMPath.getSubFilePathList
public static List<Path> getSubFilePathList(Path startDirectoryPath, int maxDepth) { """ Gets sub file path list. @param startDirectoryPath the start directory path @param maxDepth the max depth @return the sub file path list """ return getSubPathList(startDirectoryPath, maxDepth, RegularFi...
java
public static List<Path> getSubFilePathList(Path startDirectoryPath, int maxDepth) { return getSubPathList(startDirectoryPath, maxDepth, RegularFileFilter); }
[ "public", "static", "List", "<", "Path", ">", "getSubFilePathList", "(", "Path", "startDirectoryPath", ",", "int", "maxDepth", ")", "{", "return", "getSubPathList", "(", "startDirectoryPath", ",", "maxDepth", ",", "RegularFileFilter", ")", ";", "}" ]
Gets sub file path list. @param startDirectoryPath the start directory path @param maxDepth the max depth @return the sub file path list
[ "Gets", "sub", "file", "path", "list", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMPath.java#L434-L437
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/RepositoryApi.java
RepositoryApi.getRepositoryArchive
public InputStream getRepositoryArchive(Object projectIdOrPath, String sha, ArchiveFormat format) throws GitLabApiException { """ Get an archive of the complete repository by SHA (optional). <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</code></pre> @param projectIdOrPath the project in th...
java
public InputStream getRepositoryArchive(Object projectIdOrPath, String sha, ArchiveFormat format) throws GitLabApiException { if (format == null) { format = ArchiveFormat.TAR_GZ; } /* * Gitlab-ce has a bug when you try to download file archives with format by using "&forma...
[ "public", "InputStream", "getRepositoryArchive", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "ArchiveFormat", "format", ")", "throws", "GitLabApiException", "{", "if", "(", "format", "==", "null", ")", "{", "format", "=", "ArchiveFormat", ".", "...
Get an archive of the complete repository by SHA (optional). <pre><code>GitLab Endpoint: GET /projects/:id/repository/archive</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha the SHA of the archive to get @param format The archive format, defa...
[ "Get", "an", "archive", "of", "the", "complete", "repository", "by", "SHA", "(", "optional", ")", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L553-L570
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java
TimeUtils.firstDayOfWeekInMonth
public static DayOfWeek firstDayOfWeekInMonth(int year, int month) { """ Gets the day of the week of the first day in the given month. @param year the year @param month the month (1-12) @return the day of the week """ int result = fixedFromGregorian(year, month, 1) % 7; if (result < 0) { result += 7;...
java
public static DayOfWeek firstDayOfWeekInMonth(int year, int month) { int result = fixedFromGregorian(year, month, 1) % 7; if (result < 0) { result += 7; } return DAYS_OF_WEEK[result]; }
[ "public", "static", "DayOfWeek", "firstDayOfWeekInMonth", "(", "int", "year", ",", "int", "month", ")", "{", "int", "result", "=", "fixedFromGregorian", "(", "year", ",", "month", ",", "1", ")", "%", "7", ";", "if", "(", "result", "<", "0", ")", "{", ...
Gets the day of the week of the first day in the given month. @param year the year @param month the month (1-12) @return the day of the week
[ "Gets", "the", "day", "of", "the", "week", "of", "the", "first", "day", "in", "the", "given", "month", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java#L308-L314
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.aliveToSubHealth
protected void aliveToSubHealth(ProviderInfo providerInfo, ClientTransport transport) { """ 从存活丢到亚健康列表 @param providerInfo Provider @param transport 连接 """ providerLock.lock(); try { if (aliveConnections.remove(providerInfo) != null) { subHealthConnections.put...
java
protected void aliveToSubHealth(ProviderInfo providerInfo, ClientTransport transport) { providerLock.lock(); try { if (aliveConnections.remove(providerInfo) != null) { subHealthConnections.put(providerInfo, transport); } } finally { providerLoc...
[ "protected", "void", "aliveToSubHealth", "(", "ProviderInfo", "providerInfo", ",", "ClientTransport", "transport", ")", "{", "providerLock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "aliveConnections", ".", "remove", "(", "providerInfo", ")", "!=", "...
从存活丢到亚健康列表 @param providerInfo Provider @param transport 连接
[ "从存活丢到亚健康列表" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L198-L207
jbehave/jbehave-core
jbehave-needle/src/main/java/org/jbehave/core/steps/needle/NeedleStepsFactory.java
NeedleStepsFactory.methodReturningConverters
private List<ParameterConverter> methodReturningConverters(final Class<?> type) { """ Create parameter converters from methods annotated with @AsParameterConverter @see {@link AbstractStepsFactory} """ final List<ParameterConverter> converters = new ArrayList<>(); for (final Method method : ty...
java
private List<ParameterConverter> methodReturningConverters(final Class<?> type) { final List<ParameterConverter> converters = new ArrayList<>(); for (final Method method : type.getMethods()) { if (method.isAnnotationPresent(AsParameterConverter.class)) { converters.add(new Me...
[ "private", "List", "<", "ParameterConverter", ">", "methodReturningConverters", "(", "final", "Class", "<", "?", ">", "type", ")", "{", "final", "List", "<", "ParameterConverter", ">", "converters", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ...
Create parameter converters from methods annotated with @AsParameterConverter @see {@link AbstractStepsFactory}
[ "Create", "parameter", "converters", "from", "methods", "annotated", "with" ]
train
https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-needle/src/main/java/org/jbehave/core/steps/needle/NeedleStepsFactory.java#L137-L145
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmptyNoNullValue
public static <T> T [] notEmptyNoNullValue (final T [] aValue, final String sName) { """ Check that the passed Array is neither <code>null</code> nor empty and that no <code>null</code> value is contained. @param <T> Type to be checked and returned @param aValue The Array to check. @param sName The name o...
java
public static <T> T [] notEmptyNoNullValue (final T [] aValue, final String sName) { if (isEnabled ()) return notEmptyNoNullValue (aValue, () -> sName); return aValue; }
[ "public", "static", "<", "T", ">", "T", "[", "]", "notEmptyNoNullValue", "(", "final", "T", "[", "]", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "notEmptyNoNullValue", "(", "aValue", ",", "(", ...
Check that the passed Array is neither <code>null</code> nor empty and that no <code>null</code> value is contained. @param <T> Type to be checked and returned @param aValue The Array to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if th...
[ "Check", "that", "the", "passed", "Array", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "and", "that", "no", "<code", ">", "null<", "/", "code", ">", "value", "is", "contained", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L1180-L1185
google/closure-compiler
src/com/google/javascript/jscomp/CollapseProperties.java
CollapseProperties.warnAboutNamespaceRedefinition
private void warnAboutNamespaceRedefinition(Name nameObj, Ref ref) { """ Reports a warning because a namespace was redefined. @param nameObj A namespace that is being redefined @param ref The reference that set the namespace """ compiler.report( JSError.make(ref.getNode(), NAMESPACE_REDEFINED_W...
java
private void warnAboutNamespaceRedefinition(Name nameObj, Ref ref) { compiler.report( JSError.make(ref.getNode(), NAMESPACE_REDEFINED_WARNING, nameObj.getFullName())); }
[ "private", "void", "warnAboutNamespaceRedefinition", "(", "Name", "nameObj", ",", "Ref", "ref", ")", "{", "compiler", ".", "report", "(", "JSError", ".", "make", "(", "ref", ".", "getNode", "(", ")", ",", "NAMESPACE_REDEFINED_WARNING", ",", "nameObj", ".", "...
Reports a warning because a namespace was redefined. @param nameObj A namespace that is being redefined @param ref The reference that set the namespace
[ "Reports", "a", "warning", "because", "a", "namespace", "was", "redefined", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CollapseProperties.java#L234-L237
threerings/nenya
core/src/main/java/com/threerings/media/MetaMediaManager.java
MetaMediaManager.viewLocationDidChange
public void viewLocationDidChange (int dx, int dy) { """ If our host supports scrolling around in a virtual view, it should call this method when the view origin changes. """ if (_perfRect != null) { Rectangle sdirty = new Rectangle(_perfRect); sdirty.translate(-dx, -dy); ...
java
public void viewLocationDidChange (int dx, int dy) { if (_perfRect != null) { Rectangle sdirty = new Rectangle(_perfRect); sdirty.translate(-dx, -dy); _remgr.addDirtyRegion(sdirty); } // let our sprites and animations know what's up _animmgr.viewL...
[ "public", "void", "viewLocationDidChange", "(", "int", "dx", ",", "int", "dy", ")", "{", "if", "(", "_perfRect", "!=", "null", ")", "{", "Rectangle", "sdirty", "=", "new", "Rectangle", "(", "_perfRect", ")", ";", "sdirty", ".", "translate", "(", "-", "...
If our host supports scrolling around in a virtual view, it should call this method when the view origin changes.
[ "If", "our", "host", "supports", "scrolling", "around", "in", "a", "virtual", "view", "it", "should", "call", "this", "method", "when", "the", "view", "origin", "changes", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/MetaMediaManager.java#L326-L337
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormatter.java
DateTimeFormatter.printTo
public void printTo(StringBuffer buf, long instant) { """ Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using ISO chronology in the default DateTimeZone. @param buf the destination to format to, not null @param instant millis since 1970-01-01T00:00:00Z """ try { pri...
java
public void printTo(StringBuffer buf, long instant) { try { printTo((Appendable) buf, instant); } catch (IOException ex) { // StringBuffer does not throw IOException } }
[ "public", "void", "printTo", "(", "StringBuffer", "buf", ",", "long", "instant", ")", "{", "try", "{", "printTo", "(", "(", "Appendable", ")", "buf", ",", "instant", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "// StringBuffer does not thro...
Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using ISO chronology in the default DateTimeZone. @param buf the destination to format to, not null @param instant millis since 1970-01-01T00:00:00Z
[ "Prints", "an", "instant", "from", "milliseconds", "since", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", "using", "ISO", "chronology", "in", "the", "default", "DateTimeZone", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormatter.java#L546-L552