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
aerogear/aerogear-android-core
library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java
Property.findFieldInClass
private Field findFieldInClass(Class klass, String fieldName) throws NoSuchFieldException { """ Search field in class/superclasses @param klass Class to search @param fieldName Field to search @return Field with @RecordId @throws NoSuchFieldException if field isn't found """ try { r...
java
private Field findFieldInClass(Class klass, String fieldName) throws NoSuchFieldException { try { return klass.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { Class superclass = klass.getSuperclass(); if (superclass != null) { return fi...
[ "private", "Field", "findFieldInClass", "(", "Class", "klass", ",", "String", "fieldName", ")", "throws", "NoSuchFieldException", "{", "try", "{", "return", "klass", ".", "getDeclaredField", "(", "fieldName", ")", ";", "}", "catch", "(", "NoSuchFieldException", ...
Search field in class/superclasses @param klass Class to search @param fieldName Field to search @return Field with @RecordId @throws NoSuchFieldException if field isn't found
[ "Search", "field", "in", "class", "/", "superclasses" ]
train
https://github.com/aerogear/aerogear-android-core/blob/3be24a79dd3d2792804935572bb672ff8714e6aa/library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java#L80-L90
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.getProfile
public void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback) { """ Get profile details from the service. @param profileId Profile Id of the user. @param callback Callback to deliver new session instance. """ adapter.adapt(getProfile(profil...
java
public void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback) { adapter.adapt(getProfile(profileId), callback); }
[ "public", "void", "getProfile", "(", "@", "NonNull", "final", "String", "profileId", ",", "@", "Nullable", "Callback", "<", "ComapiResult", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "callback", ")", "{", "adapter", ".", "adapt", "(", "getP...
Get profile details from the service. @param profileId Profile Id of the user. @param callback Callback to deliver new session instance.
[ "Get", "profile", "details", "from", "the", "service", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L279-L281
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java
ProcessUtil.invokeProcess
public static int invokeProcess(String[] commandLine, Consumer<String> consumer) throws IOException, InterruptedException { """ Runs the given set of command line arguments as a system process and returns the exit value of the spawned process. Outputs of the process (both normal and error) are passed ...
java
public static int invokeProcess(String[] commandLine, Consumer<String> consumer) throws IOException, InterruptedException { return invokeProcess(commandLine, null, new DelegatingConsumer(consumer)); }
[ "public", "static", "int", "invokeProcess", "(", "String", "[", "]", "commandLine", ",", "Consumer", "<", "String", ">", "consumer", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "invokeProcess", "(", "commandLine", ",", "null", ",", ...
Runs the given set of command line arguments as a system process and returns the exit value of the spawned process. Outputs of the process (both normal and error) are passed to the {@code consumer}. @param commandLine the list of command line arguments to run @param consumer the consumer for the program's output @ret...
[ "Runs", "the", "given", "set", "of", "command", "line", "arguments", "as", "a", "system", "process", "and", "returns", "the", "exit", "value", "of", "the", "spawned", "process", ".", "Outputs", "of", "the", "process", "(", "both", "normal", "and", "error",...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/process/ProcessUtil.java#L98-L101
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/security/SecurityViolationException.java
SecurityViolationException.processException
public void processException(HttpServletRequest req, HttpServletResponse res) throws IOException { """ Process security violation exception @param req - Http servlet request object @param res - Http servlet response object @throws IOException if error, otherwise redirects to appropriate error or login page ...
java
public void processException(HttpServletRequest req, HttpServletResponse res) throws IOException { if (redirectURL != null) { res.sendRedirect(redirectURL); return; } if (message == null) { res.sendError(statusCode); } ...
[ "public", "void", "processException", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "IOException", "{", "if", "(", "redirectURL", "!=", "null", ")", "{", "res", ".", "sendRedirect", "(", "redirectURL", ")", ";", "return", ...
Process security violation exception @param req - Http servlet request object @param res - Http servlet response object @throws IOException if error, otherwise redirects to appropriate error or login page
[ "Process", "security", "violation", "exception" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/security/SecurityViolationException.java#L84-L100
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.makeMarginTransform
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double xmargin, double ymargin) { """ Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas @param iwidth Width of inner (em...
java
public static String makeMarginTransform(double owidth, double oheight, double iwidth, double iheight, double xmargin, double ymargin) { return makeMarginTransform(owidth, oheight, iwidth, iheight, xmargin, ymargin, xmargin, ymargin); }
[ "public", "static", "String", "makeMarginTransform", "(", "double", "owidth", ",", "double", "oheight", ",", "double", "iwidth", ",", "double", "iheight", ",", "double", "xmargin", ",", "double", "ymargin", ")", "{", "return", "makeMarginTransform", "(", "owidth...
Make a transform string to add margins @param owidth Width of outer (embedding) canvas @param oheight Height of outer (embedding) canvas @param iwidth Width of inner (embedded) canvas @param iheight Height of inner (embedded) canvas @param xmargin Left and right margin (in inner canvas' units) @param ymargin Top and b...
[ "Make", "a", "transform", "string", "to", "add", "margins" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L600-L602
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.recognizeTextInStream
public void recognizeTextInStream(byte[] image, TextRecognitionMode mode) { """ Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Res...
java
public void recognizeTextInStream(byte[] image, TextRecognitionMode mode) { recognizeTextInStreamWithServiceResponseAsync(image, mode).toBlocking().single().body(); }
[ "public", "void", "recognizeTextInStream", "(", "byte", "[", "]", "image", ",", "TextRecognitionMode", "mode", ")", "{", "recognizeTextInStreamWithServiceResponseAsync", "(", "image", ",", "mode", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", ...
Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation. @param image An image stream. @param mode Type of text to recognize. ...
[ "Recognize", "Text", "operation", ".", "When", "you", "use", "the", "Recognize", "Text", "interface", "the", "response", "contains", "a", "field", "called", "Operation", "-", "Location", ".", "The", "Operation", "-", "Location", "field", "contains", "the", "UR...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L170-L172
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.beginChangeVnetAsync
public Observable<Page<SiteInner>> beginChangeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { """ Move an App Service Environment to a different VNET. Move an App Service Environment to a different VNET. @param resourceGroupName Name of the resource group to...
java
public Observable<Page<SiteInner>> beginChangeVnetAsync(final String resourceGroupName, final String name, final VirtualNetworkProfile vnetInfo) { return beginChangeVnetWithServiceResponseAsync(resourceGroupName, name, vnetInfo) .map(new Func1<ServiceResponse<Page<SiteInner>>, Page<SiteInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "SiteInner", ">", ">", "beginChangeVnetAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "VirtualNetworkProfile", "vnetInfo", ")", "{", "return", "beginChangeVnetWithServiceResp...
Move an App Service Environment to a different VNET. Move an App Service Environment to a different VNET. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param vnetInfo Details for the new virtual network. @throws IllegalArgumentExcep...
[ "Move", "an", "App", "Service", "Environment", "to", "a", "different", "VNET", ".", "Move", "an", "App", "Service", "Environment", "to", "a", "different", "VNET", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceEnvironmentsInner.java#L1720-L1728
fcrepo4-exts/fcrepo-camel-toolbox
fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/ClientFactory.java
ClientFactory.createClient
public static ClientConfiguration createClient(final List<Endpoint> endpoints, final List<DataProvider> providers) { """ Configure a linked data client suitable for use with a Fedora Repository. @param endpoints additional endpoints to enable on the client @param providers additional providers to enable on the c...
java
public static ClientConfiguration createClient(final List<Endpoint> endpoints, final List<DataProvider> providers) { return createClient(null, null, endpoints, providers); }
[ "public", "static", "ClientConfiguration", "createClient", "(", "final", "List", "<", "Endpoint", ">", "endpoints", ",", "final", "List", "<", "DataProvider", ">", "providers", ")", "{", "return", "createClient", "(", "null", ",", "null", ",", "endpoints", ","...
Configure a linked data client suitable for use with a Fedora Repository. @param endpoints additional endpoints to enable on the client @param providers additional providers to enable on the client @return a configuration for use with an LDClient
[ "Configure", "a", "linked", "data", "client", "suitable", "for", "use", "with", "a", "Fedora", "Repository", "." ]
train
https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/9e0cf220937b2d5c050e0e071f0cdc4c7a084c0f/fcrepo-ldpath/src/main/java/org/fcrepo/camel/ldpath/ClientFactory.java#L82-L84
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.searchByDSL
public JSONArray searchByDSL(final String query, final int limit, final int offset) throws AtlasServiceException { """ Search given query DSL @param query DSL query @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property v...
java
public JSONArray searchByDSL(final String query, final int limit, final int offset) throws AtlasServiceException { LOG.debug("DSL query: {}", query); JSONObject result = callAPIWithRetries(API.SEARCH_DSL, null, new ResourceCreator() { @Override public WebResource createResource()...
[ "public", "JSONArray", "searchByDSL", "(", "final", "String", "query", ",", "final", "int", "limit", ",", "final", "int", "offset", ")", "throws", "AtlasServiceException", "{", "LOG", ".", "debug", "(", "\"DSL query: {}\"", ",", "query", ")", ";", "JSONObject"...
Search given query DSL @param query DSL query @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0 @return result json o...
[ "Search", "given", "query", "DSL" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L840-L857
ontop/ontop
client/cli/src/main/java/it/unibz/inf/ontop/cli/OntopMaterialize.java
OutputSpec.createWriter
private BufferedWriter createWriter(Optional<String> prefixExtension) throws IOException { """ We need a direct access to the writer to close it (cannot be done via the RDFHandler) """ if (prefix.isPresent()) { String suffix = getSuffix(); return Files.newBufferedWri...
java
private BufferedWriter createWriter(Optional<String> prefixExtension) throws IOException { if (prefix.isPresent()) { String suffix = getSuffix(); return Files.newBufferedWriter( prefixExtension.isPresent() ? Paths.get(pr...
[ "private", "BufferedWriter", "createWriter", "(", "Optional", "<", "String", ">", "prefixExtension", ")", "throws", "IOException", "{", "if", "(", "prefix", ".", "isPresent", "(", ")", ")", "{", "String", "suffix", "=", "getSuffix", "(", ")", ";", "return", ...
We need a direct access to the writer to close it (cannot be done via the RDFHandler)
[ "We", "need", "a", "direct", "access", "to", "the", "writer", "to", "close", "it", "(", "cannot", "be", "done", "via", "the", "RDFHandler", ")" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/cli/src/main/java/it/unibz/inf/ontop/cli/OntopMaterialize.java#L298-L309
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java
ServiceInstanceQuery.getNotInQueryCriterion
public ServiceInstanceQuery getNotInQueryCriterion(String key, List<String> list) { """ Get a metadata value not in String list QueryCriterion. Add a QueryCriterion to check ServiceInstance has metadata value not in the target String list. @param key the metadata key. @param list the target String list t...
java
public ServiceInstanceQuery getNotInQueryCriterion(String key, List<String> list){ QueryCriterion c = new NotInQueryCriterion(key, list); addQueryCriterion(c); return this; }
[ "public", "ServiceInstanceQuery", "getNotInQueryCriterion", "(", "String", "key", ",", "List", "<", "String", ">", "list", ")", "{", "QueryCriterion", "c", "=", "new", "NotInQueryCriterion", "(", "key", ",", "list", ")", ";", "addQueryCriterion", "(", "c", ")"...
Get a metadata value not in String list QueryCriterion. Add a QueryCriterion to check ServiceInstance has metadata value not in the target String list. @param key the metadata key. @param list the target String list that metadata value should not be in. @return the ServiceInstanceQuery.
[ "Get", "a", "metadata", "value", "not", "in", "String", "list", "QueryCriterion", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java#L171-L175
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArrayFor
public static <T> Level0ArrayOperator<Character[],Character> onArrayFor(final Character... elements) { """ <p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining """ ...
java
public static <T> Level0ArrayOperator<Character[],Character> onArrayFor(final Character... elements) { return onArrayOf(Types.CHARACTER, VarArgsUtil.asRequiredObjectArray(elements)); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Character", "[", "]", ",", "Character", ">", "onArrayFor", "(", "final", "Character", "...", "elements", ")", "{", "return", "onArrayOf", "(", "Types", ".", "CHARACTER", ",", "VarArgsUtil", ".",...
<p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "array", "with", "the", "specified", "elements", "and", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L958-L960
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.listHybridConnectionsWithServiceResponseAsync
public Observable<ServiceResponse<Page<HybridConnectionInner>>> listHybridConnectionsWithServiceResponseAsync(final String resourceGroupName, final String name) { """ Retrieve all Hybrid Connections in use in an App Service plan. Retrieve all Hybrid Connections in use in an App Service plan. @param resourceGro...
java
public Observable<ServiceResponse<Page<HybridConnectionInner>>> listHybridConnectionsWithServiceResponseAsync(final String resourceGroupName, final String name) { return listHybridConnectionsSinglePageAsync(resourceGroupName, name) .concatMap(new Func1<ServiceResponse<Page<HybridConnectionInner>>, O...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "HybridConnectionInner", ">", ">", ">", "listHybridConnectionsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listHybridConnect...
Retrieve all Hybrid Connections in use in an App Service plan. Retrieve all Hybrid Connections in use in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Retrieve", "all", "Hybrid", "Connections", "in", "use", "in", "an", "App", "Service", "plan", ".", "Retrieve", "all", "Hybrid", "Connections", "in", "use", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L1739-L1751
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java
POIUtils.isEmptyCellContents
public static boolean isEmptyCellContents(final Cell cell, final CellFormatter cellFormatter) { """ フォーマッターを指定してセルの値が空かどうか判定する。 <p>ブランクセルなどの判定は優先的に行う。</p> @param cell セル @param cellFormatter セルのフォーマッタ @throws IllegalArgumentException {@literal sheet == null or cellFormatter == null.} @return """ ...
java
public static boolean isEmptyCellContents(final Cell cell, final CellFormatter cellFormatter) { ArgUtils.notNull(cell, "cell"); ArgUtils.notNull(cellFormatter, "cellFormatter"); return getCellContents(cell, cellFormatter).isEmpty(); }
[ "public", "static", "boolean", "isEmptyCellContents", "(", "final", "Cell", "cell", ",", "final", "CellFormatter", "cellFormatter", ")", "{", "ArgUtils", ".", "notNull", "(", "cell", ",", "\"cell\"", ")", ";", "ArgUtils", ".", "notNull", "(", "cellFormatter", ...
フォーマッターを指定してセルの値が空かどうか判定する。 <p>ブランクセルなどの判定は優先的に行う。</p> @param cell セル @param cellFormatter セルのフォーマッタ @throws IllegalArgumentException {@literal sheet == null or cellFormatter == null.} @return
[ "フォーマッターを指定してセルの値が空かどうか判定する。", "<p", ">", "ブランクセルなどの判定は優先的に行う。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java#L279-L284
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.maxBy
public static <T, V extends Comparable<? super V>> T maxBy(Iterable<T> iterable, Function<? super T, ? extends V> function) { """ Returns the maximum element out of the iterable based on the natural order of the attribute returned by the function. """ if (iterable instanceof RichIterable) { ...
java
public static <T, V extends Comparable<? super V>> T maxBy(Iterable<T> iterable, Function<? super T, ? extends V> function) { if (iterable instanceof RichIterable) { return ((RichIterable<T>) iterable).maxBy(function); } if (iterable instanceof RandomAccess) { ...
[ "public", "static", "<", "T", ",", "V", "extends", "Comparable", "<", "?", "super", "V", ">", ">", "T", "maxBy", "(", "Iterable", "<", "T", ">", "iterable", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ">", "function", ")", ...
Returns the maximum element out of the iterable based on the natural order of the attribute returned by the function.
[ "Returns", "the", "maximum", "element", "out", "of", "the", "iterable", "based", "on", "the", "natural", "order", "of", "the", "attribute", "returned", "by", "the", "function", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L3546-L3561
stephanenicolas/robospice
robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java
SpiceManager.getDateOfDataInCache
public Future<Date> getDateOfDataInCache(Class<?> clazz, final Object cacheKey) throws CacheCreationException { """ Returns the last date of storage of a given data into the cache. @param clazz the class of the result to retrieve from cache. @param cacheKey the key used to store and retrieve the result of the ...
java
public Future<Date> getDateOfDataInCache(Class<?> clazz, final Object cacheKey) throws CacheCreationException { return executeCommand(new GetDateOfDataInCacheCommand(this, clazz, cacheKey)); }
[ "public", "Future", "<", "Date", ">", "getDateOfDataInCache", "(", "Class", "<", "?", ">", "clazz", ",", "final", "Object", "cacheKey", ")", "throws", "CacheCreationException", "{", "return", "executeCommand", "(", "new", "GetDateOfDataInCacheCommand", "(", "this"...
Returns the last date of storage of a given data into the cache. @param clazz the class of the result to retrieve from cache. @param cacheKey the key used to store and retrieve the result of the request in the cache @return the date at which data has been stored in cache. Null if no such data is in Cache. @throws Cache...
[ "Returns", "the", "last", "date", "of", "storage", "of", "a", "given", "data", "into", "the", "cache", "." ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceManager.java#L965-L967
jamesdbloom/mockserver
mockserver-client-java/src/main/java/org/mockserver/client/MockServerClient.java
MockServerClient.isRunning
public boolean isRunning(int attempts, long timeout, TimeUnit timeUnit) { """ Returns whether server MockServer is running, by polling the MockServer a configurable amount of times """ try { HttpResponse httpResponse = sendRequest(request().withMethod("PUT").withPath(calculatePath("status")...
java
public boolean isRunning(int attempts, long timeout, TimeUnit timeUnit) { try { HttpResponse httpResponse = sendRequest(request().withMethod("PUT").withPath(calculatePath("status"))); if (httpResponse.getStatusCode() == HttpStatusCode.OK_200.code()) { return true; ...
[ "public", "boolean", "isRunning", "(", "int", "attempts", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "try", "{", "HttpResponse", "httpResponse", "=", "sendRequest", "(", "request", "(", ")", ".", "withMethod", "(", "\"PUT\"", ")", ".", ...
Returns whether server MockServer is running, by polling the MockServer a configurable amount of times
[ "Returns", "whether", "server", "MockServer", "is", "running", "by", "polling", "the", "MockServer", "a", "configurable", "amount", "of", "times" ]
train
https://github.com/jamesdbloom/mockserver/blob/8b84fdd877e57b4eb780c9f8c8b1d65bcb448025/mockserver-client-java/src/main/java/org/mockserver/client/MockServerClient.java#L198-L216
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.elementMultiply
public static void elementMultiply(ZMatrixD1 input , double real , double imaginary, ZMatrixD1 output ) { """ <p>Performs element by element multiplication operation with a complex numbert<br> <br> output<sub>ij</sub> = input<sub>ij</sub> * (real + imaginary*i) <br> </p> @param input The left matrix in the mu...
java
public static void elementMultiply(ZMatrixD1 input , double real , double imaginary, ZMatrixD1 output ) { if( input.numCols != output.numCols || input.numRows != output.numRows ) { throw new IllegalArgumentException("The 'input' and 'output' matrices do not have compatible dimensions"); ...
[ "public", "static", "void", "elementMultiply", "(", "ZMatrixD1", "input", ",", "double", "real", ",", "double", "imaginary", ",", "ZMatrixD1", "output", ")", "{", "if", "(", "input", ".", "numCols", "!=", "output", ".", "numCols", "||", "input", ".", "numR...
<p>Performs element by element multiplication operation with a complex numbert<br> <br> output<sub>ij</sub> = input<sub>ij</sub> * (real + imaginary*i) <br> </p> @param input The left matrix in the multiplication operation. Not modified. @param real Real component of the number it is multiplied by @param imaginary Ima...
[ "<p", ">", "Performs", "element", "by", "element", "multiplication", "operation", "with", "a", "complex", "numbert<br", ">", "<br", ">", "output<sub", ">", "ij<", "/", "sub", ">", "=", "input<sub", ">", "ij<", "/", "sub", ">", "*", "(", "real", "+", "i...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L936-L950
lecho/hellocharts-android
hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java
PieChartRenderer.drawSlice
private void drawSlice(Canvas canvas, SliceValue sliceValue, float lastAngle, float angle, int mode) { """ Method draws single slice from lastAngle to lastAngle+angle, if mode = {@link #MODE_HIGHLIGHT} slice will be darken and will have bigger radius. """ sliceVector.set((float) (Math.cos(Math.toRadi...
java
private void drawSlice(Canvas canvas, SliceValue sliceValue, float lastAngle, float angle, int mode) { sliceVector.set((float) (Math.cos(Math.toRadians(lastAngle + angle / 2))), (float) (Math.sin(Math.toRadians(lastAngle + angle / 2)))); normalizeVector(sliceVector); drawCircleOv...
[ "private", "void", "drawSlice", "(", "Canvas", "canvas", ",", "SliceValue", "sliceValue", ",", "float", "lastAngle", ",", "float", "angle", ",", "int", "mode", ")", "{", "sliceVector", ".", "set", "(", "(", "float", ")", "(", "Math", ".", "cos", "(", "...
Method draws single slice from lastAngle to lastAngle+angle, if mode = {@link #MODE_HIGHLIGHT} slice will be darken and will have bigger radius.
[ "Method", "draws", "single", "slice", "from", "lastAngle", "to", "lastAngle", "+", "angle", "if", "mode", "=", "{" ]
train
https://github.com/lecho/hellocharts-android/blob/c41419c9afa097452dee823c7eba0e5136aa96bd/hellocharts-library/src/lecho/lib/hellocharts/renderer/PieChartRenderer.java#L318-L332
threerings/nenya
core/src/main/java/com/threerings/openal/SoundManager.java
SoundManager.getClip
protected ClipBuffer getClip (ClipProvider provider, String path, Observer observer) { """ Creates a clip buffer for the sound clip loaded via the specified provider with the specified path. The clip buffer may come from the cache, and it will immediately be queued for loading if it is not already loaded. ""...
java
protected ClipBuffer getClip (ClipProvider provider, String path, Observer observer) { String ckey = ClipBuffer.makeKey(provider, path); ClipBuffer buffer = _clips.get(ckey); try { if (buffer == null) { // check to see if this clip is currently loading ...
[ "protected", "ClipBuffer", "getClip", "(", "ClipProvider", "provider", ",", "String", "path", ",", "Observer", "observer", ")", "{", "String", "ckey", "=", "ClipBuffer", ".", "makeKey", "(", "provider", ",", "path", ")", ";", "ClipBuffer", "buffer", "=", "_c...
Creates a clip buffer for the sound clip loaded via the specified provider with the specified path. The clip buffer may come from the cache, and it will immediately be queued for loading if it is not already loaded.
[ "Creates", "a", "clip", "buffer", "for", "the", "sound", "clip", "loaded", "via", "the", "specified", "provider", "with", "the", "specified", "path", ".", "The", "clip", "buffer", "may", "come", "from", "the", "cache", "and", "it", "will", "immediately", "...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L259-L279
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyEncoder.java
KeyEncoder.encodeDesc
public static void encodeDesc(Float value, byte[] dst, int dstOffset) { """ Encodes the given Float object into exactly 4 bytes for descending order. A non-canonical NaN value is used to represent null. @param value optional Float value to encode @param dst destination for encoded bytes @param dstOffset offs...
java
public static void encodeDesc(Float value, byte[] dst, int dstOffset) { if (value == null) { DataEncoder.encode(~0x7fffffff, dst, dstOffset); } else { encodeDesc(value.floatValue(), dst, dstOffset); } }
[ "public", "static", "void", "encodeDesc", "(", "Float", "value", ",", "byte", "[", "]", "dst", ",", "int", "dstOffset", ")", "{", "if", "(", "value", "==", "null", ")", "{", "DataEncoder", ".", "encode", "(", "~", "0x7fffffff", ",", "dst", ",", "dstO...
Encodes the given Float object into exactly 4 bytes for descending order. A non-canonical NaN value is used to represent null. @param value optional Float value to encode @param dst destination for encoded bytes @param dstOffset offset into destination array
[ "Encodes", "the", "given", "Float", "object", "into", "exactly", "4", "bytes", "for", "descending", "order", ".", "A", "non", "-", "canonical", "NaN", "value", "is", "used", "to", "represent", "null", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyEncoder.java#L255-L261
rey5137/material
app/src/main/java/com/rey/material/app/Recurring.java
Recurring.setEnabledWeekday
public void setEnabledWeekday(int dayOfWeek, boolean enable) { """ Enable repeat on a dayOfWeek. Only apply it repeat mode is REPEAT_WEEKLY. @param dayOfWeek value of dayOfWeek, take from Calendar obj. @param enable Enable this dayOfWeek or not. """ if(mRepeatMode != REPEAT_WEEKLY) return...
java
public void setEnabledWeekday(int dayOfWeek, boolean enable){ if(mRepeatMode != REPEAT_WEEKLY) return; if(enable) mRepeatSetting = mRepeatSetting | WEEKDAY_MASK[dayOfWeek - 1]; else mRepeatSetting = mRepeatSetting & (~WEEKDAY_MASK[dayOfWeek - 1]); }
[ "public", "void", "setEnabledWeekday", "(", "int", "dayOfWeek", ",", "boolean", "enable", ")", "{", "if", "(", "mRepeatMode", "!=", "REPEAT_WEEKLY", ")", "return", ";", "if", "(", "enable", ")", "mRepeatSetting", "=", "mRepeatSetting", "|", "WEEKDAY_MASK", "["...
Enable repeat on a dayOfWeek. Only apply it repeat mode is REPEAT_WEEKLY. @param dayOfWeek value of dayOfWeek, take from Calendar obj. @param enable Enable this dayOfWeek or not.
[ "Enable", "repeat", "on", "a", "dayOfWeek", ".", "Only", "apply", "it", "repeat", "mode", "is", "REPEAT_WEEKLY", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/app/src/main/java/com/rey/material/app/Recurring.java#L157-L165
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/Timecode.java
Timecode.getInstance
@Deprecated public static final Timecode getInstance(long frameNumber, boolean dropFrame, Timebase timebase, boolean supportDays) { """ @param frameNumber the frame offset from zero @param dropFrame set to true to indicate that the frame-rate excludes dropframes (keep false for PAL) @param timebase the timeb...
java
@Deprecated public static final Timecode getInstance(long frameNumber, boolean dropFrame, Timebase timebase, boolean supportDays) { final Timecode timecode = getInstance(frameNumber, dropFrame, timebase); if (!supportDays && timecode.getDaysPart() != 0) { throw new IllegalArgumentException("supportDays disa...
[ "@", "Deprecated", "public", "static", "final", "Timecode", "getInstance", "(", "long", "frameNumber", ",", "boolean", "dropFrame", ",", "Timebase", "timebase", ",", "boolean", "supportDays", ")", "{", "final", "Timecode", "timecode", "=", "getInstance", "(", "f...
@param frameNumber the frame offset from zero @param dropFrame set to true to indicate that the frame-rate excludes dropframes (keep false for PAL) @param timebase the timebase @param supportDays true if the resulting Timecode may use the days field (default false) @return a timecode representation of the given data, ...
[ "@param", "frameNumber", "the", "frame", "offset", "from", "zero", "@param", "dropFrame", "set", "to", "true", "to", "indicate", "that", "the", "frame", "-", "rate", "excludes", "dropframes", "(", "keep", "false", "for", "PAL", ")", "@param", "timebase", "th...
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/Timecode.java#L880-L894
threerings/narya
core/src/main/java/com/threerings/presents/peer/server/PeerManager.java
PeerManager.clientLoggedOn
protected void clientLoggedOn (String nodeName, ClientInfo clinfo) { """ Called when we hear about a client logging on to another node. """ PresentsSession session = _clmgr.getClient(clinfo.username); if (session != null) { log.info("Booting user that has connected on another node",...
java
protected void clientLoggedOn (String nodeName, ClientInfo clinfo) { PresentsSession session = _clmgr.getClient(clinfo.username); if (session != null) { log.info("Booting user that has connected on another node", "username", clinfo.username, "otherNode", nodeName); ...
[ "protected", "void", "clientLoggedOn", "(", "String", "nodeName", ",", "ClientInfo", "clinfo", ")", "{", "PresentsSession", "session", "=", "_clmgr", ".", "getClient", "(", "clinfo", ".", "username", ")", ";", "if", "(", "session", "!=", "null", ")", "{", ...
Called when we hear about a client logging on to another node.
[ "Called", "when", "we", "hear", "about", "a", "client", "logging", "on", "to", "another", "node", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java#L1357-L1365
mailin-api/sendinblue-java-mvn
src/main/java/com/sendinblue/Sendinblue.java
Sendinblue.get_processes
public String get_processes(Object data) { """ /* Get all the processes information under the account. @param {Object} data contains json objects as a key value pair from HashMap. @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this...
java
public String get_processes(Object data) { Gson gson = new Gson(); String json = gson.toJson(data); return get("process", json); }
[ "public", "String", "get_processes", "(", "Object", "data", ")", "{", "Gson", "gson", "=", "new", "Gson", "(", ")", ";", "String", "json", "=", "gson", ".", "toJson", "(", "data", ")", ";", "return", "get", "(", "\"process\"", ",", "json", ")", ";", ...
/* Get all the processes information under the account. @param {Object} data contains json objects as a key value pair from HashMap. @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory] @options ...
[ "/", "*", "Get", "all", "the", "processes", "information", "under", "the", "account", "." ]
train
https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L558-L562
openengsb/openengsb
components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/LdapUtils.java
LdapUtils.extractAttributeEmptyCheck
public static String extractAttributeEmptyCheck(Entry entry, String attributeType) { """ Returns the value of the first occurence of attributeType from entry. """ Attribute attribute = entry.get(attributeType); Attribute emptyFlagAttribute = entry.get(SchemaConstants.EMPTY_FLAG_ATTRIBUTE); ...
java
public static String extractAttributeEmptyCheck(Entry entry, String attributeType) { Attribute attribute = entry.get(attributeType); Attribute emptyFlagAttribute = entry.get(SchemaConstants.EMPTY_FLAG_ATTRIBUTE); boolean empty = false; try { if (attribute != null) { ...
[ "public", "static", "String", "extractAttributeEmptyCheck", "(", "Entry", "entry", ",", "String", "attributeType", ")", "{", "Attribute", "attribute", "=", "entry", ".", "get", "(", "attributeType", ")", ";", "Attribute", "emptyFlagAttribute", "=", "entry", ".", ...
Returns the value of the first occurence of attributeType from entry.
[ "Returns", "the", "value", "of", "the", "first", "occurence", "of", "attributeType", "from", "entry", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/LdapUtils.java#L70-L84
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java
ZoomablePane.moveLeft
public void moveLeft(boolean isUnit, boolean isLarge, boolean isVeryLarge) { """ Move the viewport left. @param isUnit indicates if the move is a unit move. If {@code true}, this argument has precedence to the other arguments. @param isLarge indicates if the move is a large move. If {@code true}, this argument...
java
public void moveLeft(boolean isUnit, boolean isLarge, boolean isVeryLarge) { double inc = isUnit ? this.hbar.getUnitIncrement() : (isLarge ? LARGE_MOVE_FACTOR : (isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR)) * this.hbar.getBlockIncrement(); if (!isInvertedAxisX()) { inc = -inc; } th...
[ "public", "void", "moveLeft", "(", "boolean", "isUnit", ",", "boolean", "isLarge", ",", "boolean", "isVeryLarge", ")", "{", "double", "inc", "=", "isUnit", "?", "this", ".", "hbar", ".", "getUnitIncrement", "(", ")", ":", "(", "isLarge", "?", "LARGE_MOVE_F...
Move the viewport left. @param isUnit indicates if the move is a unit move. If {@code true}, this argument has precedence to the other arguments. @param isLarge indicates if the move is a large move. If {@code true}, this argument has precedence to the very large argument. @param isVeryLarge indicates if the move is a...
[ "Move", "the", "viewport", "left", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L531-L539
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newWasGeneratedBy
public WasGeneratedBy newWasGeneratedBy(QualifiedName id, QualifiedName entity, QualifiedName activity, XMLGregorianCalendar time, Collection<Attribute> attributes) { """ /* (non-Javadoc) @see org.openprovenance.prov.model.ModelConstructor#newWasGeneratedBy(org.openprovenance.model.QualifiedName, org.openprovenan...
java
public WasGeneratedBy newWasGeneratedBy(QualifiedName id, QualifiedName entity, QualifiedName activity, XMLGregorianCalendar time, Collection<Attribute> attributes) { WasGeneratedBy res=newWasGeneratedBy(id,entity,null,activity); res.setTime(time); setAttributes(res, attributes); return res; }
[ "public", "WasGeneratedBy", "newWasGeneratedBy", "(", "QualifiedName", "id", ",", "QualifiedName", "entity", ",", "QualifiedName", "activity", ",", "XMLGregorianCalendar", "time", ",", "Collection", "<", "Attribute", ">", "attributes", ")", "{", "WasGeneratedBy", "res...
/* (non-Javadoc) @see org.openprovenance.prov.model.ModelConstructor#newWasGeneratedBy(org.openprovenance.model.QualifiedName, org.openprovenance.model.QualifiedName, org.openprovenance.model.QualifiedName, javax.xml.datatype.XMLGregorianCalendar, java.util.Collection)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L1339-L1344
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/ApplicationImpl.java
ApplicationImpl.createComponent
private final UIComponent createComponent(FacesContext facesContext, final String componentType) throws FacesException { """ This works just like createComponent(String componentType), but without call FacesContext.getCurrentInstance() @param facesContext @param componentType @return @throws Fa...
java
private final UIComponent createComponent(FacesContext facesContext, final String componentType) throws FacesException { checkNull(componentType, "componentType"); checkEmpty(componentType, "componentType"); final Class<? extends UIComponent> componentClass = ge...
[ "private", "final", "UIComponent", "createComponent", "(", "FacesContext", "facesContext", ",", "final", "String", "componentType", ")", "throws", "FacesException", "{", "checkNull", "(", "componentType", ",", "\"componentType\"", ")", ";", "checkEmpty", "(", "compone...
This works just like createComponent(String componentType), but without call FacesContext.getCurrentInstance() @param facesContext @param componentType @return @throws FacesException
[ "This", "works", "just", "like", "createComponent", "(", "String", "componentType", ")", "but", "without", "call", "FacesContext", ".", "getCurrentInstance", "()" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/application/ApplicationImpl.java#L1453-L1478
aerogear/aerogear-unifiedpush-java-client
src/main/java/org/jboss/aerogear/unifiedpush/utils/HttpRequestUtil.java
HttpRequestUtil.getConnection
private static URLConnection getConnection(String url, final ProxyConfig proxy) throws IOException { """ Method to open/establish a URLConnection. @param url The URL to connect to. @param proxy The proxy configuration. @return {@link URLConnection} @throws IOException """ URLConnection conn = nul...
java
private static URLConnection getConnection(String url, final ProxyConfig proxy) throws IOException { URLConnection conn = null; if (proxy != null && proxy.getProxyUser() != null) { Authenticator.setDefault(new Authenticator() { @Override protected PasswordAut...
[ "private", "static", "URLConnection", "getConnection", "(", "String", "url", ",", "final", "ProxyConfig", "proxy", ")", "throws", "IOException", "{", "URLConnection", "conn", "=", "null", ";", "if", "(", "proxy", "!=", "null", "&&", "proxy", ".", "getProxyUser...
Method to open/establish a URLConnection. @param url The URL to connect to. @param proxy The proxy configuration. @return {@link URLConnection} @throws IOException
[ "Method", "to", "open", "/", "establish", "a", "URLConnection", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/50705dc1b9e301a99fa73a9c5fd14e76c2a28c80/src/main/java/org/jboss/aerogear/unifiedpush/utils/HttpRequestUtil.java#L161-L182
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.addAllTo
public static <T, R extends Collection<T>> R addAllTo(Iterable<? extends T> iterable, R targetCollection) { """ Add all elements from the source Iterable to the target collection, return the target collection. """ Iterate.addAllIterable(iterable, targetCollection); return targetCollection; ...
java
public static <T, R extends Collection<T>> R addAllTo(Iterable<? extends T> iterable, R targetCollection) { Iterate.addAllIterable(iterable, targetCollection); return targetCollection; }
[ "public", "static", "<", "T", ",", "R", "extends", "Collection", "<", "T", ">", ">", "R", "addAllTo", "(", "Iterable", "<", "?", "extends", "T", ">", "iterable", ",", "R", "targetCollection", ")", "{", "Iterate", ".", "addAllIterable", "(", "iterable", ...
Add all elements from the source Iterable to the target collection, return the target collection.
[ "Add", "all", "elements", "from", "the", "source", "Iterable", "to", "the", "target", "collection", "return", "the", "target", "collection", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L1115-L1119
jenkinsci/jenkins
core/src/main/java/jenkins/model/Jenkins.java
Jenkins.isNameUnique
boolean isNameUnique(String name, String currentJobName) { """ True if there is no item in Jenkins that has this name @param name The name to test @param currentJobName The name of the job that the user is configuring """ Item item = getItem(name); if(null==item) { // the candida...
java
boolean isNameUnique(String name, String currentJobName) { Item item = getItem(name); if(null==item) { // the candidate name didn't return any items so the name is unique return true; } else if(item.getName().equals(currentJobName)) { // the candidate...
[ "boolean", "isNameUnique", "(", "String", "name", ",", "String", "currentJobName", ")", "{", "Item", "item", "=", "getItem", "(", "name", ")", ";", "if", "(", "null", "==", "item", ")", "{", "// the candidate name didn't return any items so the name is unique", "r...
True if there is no item in Jenkins that has this name @param name The name to test @param currentJobName The name of the job that the user is configuring
[ "True", "if", "there", "is", "no", "item", "in", "Jenkins", "that", "has", "this", "name" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L4801-L4817
oboehm/jfachwert
src/main/java/de/jfachwert/pruefung/NumberValidator.java
NumberValidator.validate
@Override public String validate(String value) { """ Wenn der uebergebene Wert gueltig ist, soll er unveraendert zurueckgegeben werden, damit er anschliessend von der aufrufenden Methode weiterverarbeitet werden kann. Ist der Wert nicht gueltig, soll eine {@link ValidationException} geworfen werden. @para...
java
@Override public String validate(String value) { String normalized = normalize(value); try { BigDecimal n = new BigDecimal(normalized); if (range.contains(n)) { return normalized; } } catch (NumberFormatException ex) { throw new...
[ "@", "Override", "public", "String", "validate", "(", "String", "value", ")", "{", "String", "normalized", "=", "normalize", "(", "value", ")", ";", "try", "{", "BigDecimal", "n", "=", "new", "BigDecimal", "(", "normalized", ")", ";", "if", "(", "range",...
Wenn der uebergebene Wert gueltig ist, soll er unveraendert zurueckgegeben werden, damit er anschliessend von der aufrufenden Methode weiterverarbeitet werden kann. Ist der Wert nicht gueltig, soll eine {@link ValidationException} geworfen werden. @param value Wert, der validiert werden soll @return Wert selber, wenn ...
[ "Wenn", "der", "uebergebene", "Wert", "gueltig", "ist", "soll", "er", "unveraendert", "zurueckgegeben", "werden", "damit", "er", "anschliessend", "von", "der", "aufrufenden", "Methode", "weiterverarbeitet", "werden", "kann", ".", "Ist", "der", "Wert", "nicht", "gu...
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/pruefung/NumberValidator.java#L83-L95
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/html/XAppletHtmlScreen.java
XAppletHtmlScreen.printScreen
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { """ Code to display a Menu. @exception DBException File exception. """ out.println("<html>"); this.printAppletHtmlScreen(out, reg); out.println("</html>"); /* Map<String,Object> propApplet ...
java
public void printScreen(PrintWriter out, ResourceBundle reg) throws DBException { out.println("<html>"); this.printAppletHtmlScreen(out, reg); out.println("</html>"); /* Map<String,Object> propApplet = new Hashtable<String,Object>(); Map<String,Object> properties = ((A...
[ "public", "void", "printScreen", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "out", ".", "println", "(", "\"<html>\"", ")", ";", "this", ".", "printAppletHtmlScreen", "(", "out", ",", "reg", ")", ";", "out", ...
Code to display a Menu. @exception DBException File exception.
[ "Code", "to", "display", "a", "Menu", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/html/XAppletHtmlScreen.java#L64-L82
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java
JScreen.addScreenControl
public JComponent addScreenControl(Container parent, Converter fieldInfo) { """ Add the screen controls to the second column of the grid. @param parent The container to add the control(s) to. @param fieldInfo the field to add a control for. @param gridbag The screen layout. @param c The constraint to use. ...
java
public JComponent addScreenControl(Container parent, Converter fieldInfo) { JComponent component = this.createScreenComponent(fieldInfo); if (component instanceof ScreenComponent) if (((ScreenComponent)component).getConverter() != null) fieldInfo = (Converter)((ScreenComp...
[ "public", "JComponent", "addScreenControl", "(", "Container", "parent", ",", "Converter", "fieldInfo", ")", "{", "JComponent", "component", "=", "this", ".", "createScreenComponent", "(", "fieldInfo", ")", ";", "if", "(", "component", "instanceof", "ScreenComponent"...
Add the screen controls to the second column of the grid. @param parent The container to add the control(s) to. @param fieldInfo the field to add a control for. @param gridbag The screen layout. @param c The constraint to use.
[ "Add", "the", "screen", "controls", "to", "the", "second", "column", "of", "the", "grid", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java#L283-L291
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/NaaccrXmlUtils.java
NaaccrXmlUtils.writeXmlFile
public static void writeXmlFile(NaaccrData data, File xmlFile, NaaccrOptions options, List<NaaccrDictionary> userDictionaries, NaaccrObserver observer) throws NaaccrIOException { """ Writes the provided data to the requested XML file. <br/> ATTENTION: THIS METHOD REQUIRES THE ENTIRE DATA OBJECT TO BE IN MEMORY; ...
java
public static void writeXmlFile(NaaccrData data, File xmlFile, NaaccrOptions options, List<NaaccrDictionary> userDictionaries, NaaccrObserver observer) throws NaaccrIOException { if (data == null) throw new NaaccrIOException("Data is required"); if (!xmlFile.getParentFile().exists()) ...
[ "public", "static", "void", "writeXmlFile", "(", "NaaccrData", "data", ",", "File", "xmlFile", ",", "NaaccrOptions", "options", ",", "List", "<", "NaaccrDictionary", ">", "userDictionaries", ",", "NaaccrObserver", "observer", ")", "throws", "NaaccrIOException", "{",...
Writes the provided data to the requested XML file. <br/> ATTENTION: THIS METHOD REQUIRES THE ENTIRE DATA OBJECT TO BE IN MEMORY; CONSIDER USING A STREAM INSTEAD. @param data a <code>NaaccrData</code> object, cannot be null @param xmlFile target XML data file @param options optional validating options @param userDictio...
[ "Writes", "the", "provided", "data", "to", "the", "requested", "XML", "file", ".", "<br", "/", ">", "ATTENTION", ":", "THIS", "METHOD", "REQUIRES", "THE", "ENTIRE", "DATA", "OBJECT", "TO", "BE", "IN", "MEMORY", ";", "CONSIDER", "USING", "A", "STREAM", "I...
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/NaaccrXmlUtils.java#L175-L190
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java
SftpSubsystemChannel.changePermissions
public void changePermissions(SftpFile file, int permissions) throws SftpStatusException, SshException { """ Change the permissions of a file. @param file the file @param permissions an integer value containing a file permissions mask @throws SshException ,SftpStatusException """ SftpFileAttribute...
java
public void changePermissions(SftpFile file, int permissions) throws SftpStatusException, SshException { SftpFileAttributes attrs = new SftpFileAttributes(this, SftpFileAttributes.SSH_FILEXFER_TYPE_UNKNOWN); attrs.setPermissions(new UnsignedInteger32(permissions)); setAttributes(file, attrs); }
[ "public", "void", "changePermissions", "(", "SftpFile", "file", ",", "int", "permissions", ")", "throws", "SftpStatusException", ",", "SshException", "{", "SftpFileAttributes", "attrs", "=", "new", "SftpFileAttributes", "(", "this", ",", "SftpFileAttributes", ".", "...
Change the permissions of a file. @param file the file @param permissions an integer value containing a file permissions mask @throws SshException ,SftpStatusException
[ "Change", "the", "permissions", "of", "a", "file", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java#L408-L414
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java
BugInstance.addMethod
@Nonnull public BugInstance addMethod(String className, String methodName, String methodSig, boolean isStatic) { """ Add a method annotation. If this is the first method annotation added, it becomes the primary method annotation. @param className name of the class containing the method @param methodName ...
java
@Nonnull public BugInstance addMethod(String className, String methodName, String methodSig, boolean isStatic) { addMethod(MethodAnnotation.fromForeignMethod(className, methodName, methodSig, isStatic)); return this; }
[ "@", "Nonnull", "public", "BugInstance", "addMethod", "(", "String", "className", ",", "String", "methodName", ",", "String", "methodSig", ",", "boolean", "isStatic", ")", "{", "addMethod", "(", "MethodAnnotation", ".", "fromForeignMethod", "(", "className", ",", ...
Add a method annotation. If this is the first method annotation added, it becomes the primary method annotation. @param className name of the class containing the method @param methodName name of the method @param methodSig type signature of the method @param isStatic true if the method is static, false otherwise @ret...
[ "Add", "a", "method", "annotation", ".", "If", "this", "is", "the", "first", "method", "annotation", "added", "it", "becomes", "the", "primary", "method", "annotation", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L1305-L1309
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentNode.java
PersistentNode.waitForInitialCreate
public boolean waitForInitialCreate(long timeout, TimeUnit unit) throws InterruptedException { """ Block until the either initial node creation initiated by {@link #start()} succeeds or the timeout elapses. @param timeout the maximum time to wait @param unit time unit @return if the node was created befor...
java
public boolean waitForInitialCreate(long timeout, TimeUnit unit) throws InterruptedException { Preconditions.checkState(state.get() == State.STARTED, "Not started"); CountDownLatch localLatch = initialCreateLatch.get(); return (localLatch == null) || localLatch.await(timeout, unit); }
[ "public", "boolean", "waitForInitialCreate", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "Preconditions", ".", "checkState", "(", "state", ".", "get", "(", ")", "==", "State", ".", "STARTED", ",", "\"Not started\"...
Block until the either initial node creation initiated by {@link #start()} succeeds or the timeout elapses. @param timeout the maximum time to wait @param unit time unit @return if the node was created before timeout @throws InterruptedException if the thread is interrupted
[ "Block", "until", "the", "either", "initial", "node", "creation", "initiated", "by", "{", "@link", "#start", "()", "}", "succeeds", "or", "the", "timeout", "elapses", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentNode.java#L271-L277
konvergeio/cofoja
src/main/java/com/google/java/contract/core/agent/SpecificationMethodAdapter.java
SpecificationMethodAdapter.getPostDescOffset
@Requires( { """ Computes the method descriptor offset of a postcondition (or an exceptional postcondition). The method descriptor offset is the number of extra arguments the contract method has in addition to those inherited from the original method. @param oldLocals the list of old value variables @param ...
java
@Requires({ "oldLocals != null", "extraIndex >= -1" }) @Ensures("result >= 0") protected int getPostDescOffset(List<Integer> oldLocals, int extraIndex) { int off = 0; if (extraIndex != -1) { ++off; } off += oldLocals.size(); return off; }
[ "@", "Requires", "(", "{", "\"oldLocals != null\"", ",", "\"extraIndex >= -1\"", "}", ")", "@", "Ensures", "(", "\"result >= 0\"", ")", "protected", "int", "getPostDescOffset", "(", "List", "<", "Integer", ">", "oldLocals", ",", "int", "extraIndex", ")", "{", ...
Computes the method descriptor offset of a postcondition (or an exceptional postcondition). The method descriptor offset is the number of extra arguments the contract method has in addition to those inherited from the original method. @param oldLocals the list of old value variables @param extraIndex the local variabl...
[ "Computes", "the", "method", "descriptor", "offset", "of", "a", "postcondition", "(", "or", "an", "exceptional", "postcondition", ")", ".", "The", "method", "descriptor", "offset", "is", "the", "number", "of", "extra", "arguments", "the", "contract", "method", ...
train
https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/core/agent/SpecificationMethodAdapter.java#L496-L508
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java
FieldList.handleRemoteCommand
public Object handleRemoteCommand(String strCommand, Map<String, Object> properties, boolean bWriteAndRefresh, boolean bDontCallIfLocal, boolean bCloneServerRecord) throws DBException, RemoteException { """ Do a remote command. This method simplifies the task of calling a remote method. Instead of having...
java
public Object handleRemoteCommand(String strCommand, Map<String, Object> properties, boolean bWriteAndRefresh, boolean bDontCallIfLocal, boolean bCloneServerRecord) throws DBException, RemoteException { RemoteTarget remoteTask = this.getTable().getRemoteTableType(org.jbundle.model.Remote.class); ...
[ "public", "Object", "handleRemoteCommand", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "boolean", "bWriteAndRefresh", ",", "boolean", "bDontCallIfLocal", ",", "boolean", "bCloneServerRecord", ")", "throws", "DBExcep...
Do a remote command. This method simplifies the task of calling a remote method. Instead of having to override the session, all you have to do is override doRemoteCommand in your record and handleRemoteCommand will call the remote version of the record. @param strCommand @param properties @return
[ "Do", "a", "remote", "command", ".", "This", "method", "simplifies", "the", "task", "of", "calling", "a", "remote", "method", ".", "Instead", "of", "having", "to", "override", "the", "session", "all", "you", "have", "to", "do", "is", "override", "doRemoteC...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java#L904-L916
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.upto
public static void upto(Temporal from, Temporal to, TemporalUnit unit, Closure closure) { """ Iterates from this to the {@code to} {@link java.time.temporal.Temporal}, inclusive, incrementing by one {@code unit} each iteration, calling the closure once per iteration. The closure may accept a single {@link java.t...
java
public static void upto(Temporal from, Temporal to, TemporalUnit unit, Closure closure) { if (isUptoEligible(from, to)) { for (Temporal i = from; isUptoEligible(i, to); i = i.plus(1, unit)) { closure.call(i); } } else { throw new GroovyRuntimeException...
[ "public", "static", "void", "upto", "(", "Temporal", "from", ",", "Temporal", "to", ",", "TemporalUnit", "unit", ",", "Closure", "closure", ")", "{", "if", "(", "isUptoEligible", "(", "from", ",", "to", ")", ")", "{", "for", "(", "Temporal", "i", "=", ...
Iterates from this to the {@code to} {@link java.time.temporal.Temporal}, inclusive, incrementing by one {@code unit} each iteration, calling the closure once per iteration. The closure may accept a single {@link java.time.temporal.Temporal} argument. <p> If the unit is too large to iterate to the second Temporal exact...
[ "Iterates", "from", "this", "to", "the", "{", "@code", "to", "}", "{", "@link", "java", ".", "time", ".", "temporal", ".", "Temporal", "}", "inclusive", "incrementing", "by", "one", "{", "@code", "unit", "}", "each", "iteration", "calling", "the", "closu...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L155-L164
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.extractEpipoles
public static void extractEpipoles( DMatrixRMaj F , Point3D_F64 e1 , Point3D_F64 e2 ) { """ <p> Extracts the epipoles from an essential or fundamental matrix. The epipoles are extracted from the left and right null space of the provided matrix. Note that the found epipoles are in homogeneous coordinates. If ...
java
public static void extractEpipoles( DMatrixRMaj F , Point3D_F64 e1 , Point3D_F64 e2 ) { FundamentalExtractEpipoles alg = new FundamentalExtractEpipoles(); alg.process(F,e1,e2); }
[ "public", "static", "void", "extractEpipoles", "(", "DMatrixRMaj", "F", ",", "Point3D_F64", "e1", ",", "Point3D_F64", "e2", ")", "{", "FundamentalExtractEpipoles", "alg", "=", "new", "FundamentalExtractEpipoles", "(", ")", ";", "alg", ".", "process", "(", "F", ...
<p> Extracts the epipoles from an essential or fundamental matrix. The epipoles are extracted from the left and right null space of the provided matrix. Note that the found epipoles are in homogeneous coordinates. If the epipole is at infinity then z=0 </p> <p> Left: e<sub>2</sub><sup>T</sup>*F = 0 <br> Right: F*e<...
[ "<p", ">", "Extracts", "the", "epipoles", "from", "an", "essential", "or", "fundamental", "matrix", ".", "The", "epipoles", "are", "extracted", "from", "the", "left", "and", "right", "null", "space", "of", "the", "provided", "matrix", ".", "Note", "that", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L842-L845
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
GobblinServiceJobScheduler.scheduleJob
@Override public synchronized void scheduleJob(Properties jobProps, JobListener jobListener) throws JobException { """ Synchronize the job scheduling because the same flowSpec can be scheduled by different threads. """ Map<String, Object> additionalJobDataMap = Maps.newHashMap(); additionalJobDataMap...
java
@Override public synchronized void scheduleJob(Properties jobProps, JobListener jobListener) throws JobException { Map<String, Object> additionalJobDataMap = Maps.newHashMap(); additionalJobDataMap.put(ServiceConfigKeys.GOBBLIN_SERVICE_FLOWSPEC, this.scheduledFlowSpecs.get(jobProps.getProperty(Configu...
[ "@", "Override", "public", "synchronized", "void", "scheduleJob", "(", "Properties", "jobProps", ",", "JobListener", "jobListener", ")", "throws", "JobException", "{", "Map", "<", "String", ",", "Object", ">", "additionalJobDataMap", "=", "Maps", ".", "newHashMap"...
Synchronize the job scheduling because the same flowSpec can be scheduled by different threads.
[ "Synchronize", "the", "job", "scheduling", "because", "the", "same", "flowSpec", "can", "be", "scheduled", "by", "different", "threads", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java#L191-L202
liaochong/spring-boot-starter-converter
src/main/java/com/github/liaochong/converter/core/BeansConvertStrategy.java
BeansConvertStrategy.parallelConvertBeans
public static <E, T> List<E> parallelConvertBeans(List<T> source, Class<E> targetClass, boolean nonNullFilter) { """ 集合并行转换,无指定异常提供 @param source 需要转换的集合 @param targetClass 需要转换到的类型 @param nonNullFilter 是否非空过滤 @param <E> 转换后的类型 @param <T> 转换前的类型 @return 结果 """ return convertBeans(source, target...
java
public static <E, T> List<E> parallelConvertBeans(List<T> source, Class<E> targetClass, boolean nonNullFilter) { return convertBeans(source, targetClass, null, true, nonNullFilter); }
[ "public", "static", "<", "E", ",", "T", ">", "List", "<", "E", ">", "parallelConvertBeans", "(", "List", "<", "T", ">", "source", ",", "Class", "<", "E", ">", "targetClass", ",", "boolean", "nonNullFilter", ")", "{", "return", "convertBeans", "(", "sou...
集合并行转换,无指定异常提供 @param source 需要转换的集合 @param targetClass 需要转换到的类型 @param nonNullFilter 是否非空过滤 @param <E> 转换后的类型 @param <T> 转换前的类型 @return 结果
[ "集合并行转换,无指定异常提供" ]
train
https://github.com/liaochong/spring-boot-starter-converter/blob/a36bea44bd23330a6f43b0372906a804a09285c5/src/main/java/com/github/liaochong/converter/core/BeansConvertStrategy.java#L83-L85
walkmod/walkmod-core
src/main/java/org/walkmod/WalkModFacade.java
WalkModFacade.addConfigurationParameter
public void addConfigurationParameter(String param, String value, String type, String category, String name, String chain, boolean recursive) throws Exception { """ Sets an specific parameter value into a bean. @param param Parameter name @param value Parameter value @param type Bean type to s...
java
public void addConfigurationParameter(String param, String value, String type, String category, String name, String chain, boolean recursive) throws Exception { long startTime = System.currentTimeMillis(); Exception exception = null; if (cfg.exists()) { userDir = n...
[ "public", "void", "addConfigurationParameter", "(", "String", "param", ",", "String", "value", ",", "String", "type", ",", "String", "category", ",", "String", "name", ",", "String", "chain", ",", "boolean", "recursive", ")", "throws", "Exception", "{", "long"...
Sets an specific parameter value into a bean. @param param Parameter name @param value Parameter value @param type Bean type to set the parameter @param category Bean category to set the parameter (walker, reader, transformation, writer) @param name Bean name/alias to set the parameter @param chain Bean chain to filte...
[ "Sets", "an", "specific", "parameter", "value", "into", "a", "bean", "." ]
train
https://github.com/walkmod/walkmod-core/blob/fa79b836894fa00ca4b3e2bd26326a44b778f46f/src/main/java/org/walkmod/WalkModFacade.java#L1013-L1033
hdbeukel/james-core
src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiDeletionNeighbourhood.java
DisjointMultiDeletionNeighbourhood.getRandomMove
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { """ Generates a move for the given subset solution that deselects a random subset of currently selected IDs. Whenever possible, the requested number of deletions is performed. However, taking into account the current number of s...
java
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { // get set of candidate IDs for deletion (fixed IDs are discarded) Set<Integer> delCandidates = getRemoveCandidates(solution); // compute number of deletions int curNumDel = numDeletions(delCandidates, s...
[ "@", "Override", "public", "SubsetMove", "getRandomMove", "(", "SubsetSolution", "solution", ",", "Random", "rnd", ")", "{", "// get set of candidate IDs for deletion (fixed IDs are discarded)", "Set", "<", "Integer", ">", "delCandidates", "=", "getRemoveCandidates", "(", ...
Generates a move for the given subset solution that deselects a random subset of currently selected IDs. Whenever possible, the requested number of deletions is performed. However, taking into account the current number of selected items, the imposed minimum subset size (if set) and the fixed IDs (if any) may result in...
[ "Generates", "a", "move", "for", "the", "given", "subset", "solution", "that", "deselects", "a", "random", "subset", "of", "currently", "selected", "IDs", ".", "Whenever", "possible", "the", "requested", "number", "of", "deletions", "is", "performed", ".", "Ho...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiDeletionNeighbourhood.java#L147-L161
Harium/keel
src/main/java/com/harium/keel/catalano/core/FloatPoint.java
FloatPoint.Subtract
public FloatPoint Subtract(FloatPoint point1, FloatPoint point2) { """ Subtracts values of two points. @param point1 FloatPoint. @param point2 FloatPoint. @return A new FloatPoint with the subtract operation. """ FloatPoint result = new FloatPoint(point1); result.Subtract(point2); ...
java
public FloatPoint Subtract(FloatPoint point1, FloatPoint point2) { FloatPoint result = new FloatPoint(point1); result.Subtract(point2); return result; }
[ "public", "FloatPoint", "Subtract", "(", "FloatPoint", "point1", ",", "FloatPoint", "point2", ")", "{", "FloatPoint", "result", "=", "new", "FloatPoint", "(", "point1", ")", ";", "result", ".", "Subtract", "(", "point2", ")", ";", "return", "result", ";", ...
Subtracts values of two points. @param point1 FloatPoint. @param point2 FloatPoint. @return A new FloatPoint with the subtract operation.
[ "Subtracts", "values", "of", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/FloatPoint.java#L170-L174
groupon/monsoon
impl/src/main/java/com/groupon/lex/metrics/PushMetricRegistryInstance.java
PushMetricRegistryInstance.combine_alert_with_past_
private static Alert combine_alert_with_past_(Alert alert, Map<GroupName, Alert> previous) { """ Combine a new alert with its previous state. @param alert An emitted alert. @param previous A map with alerts during the previous cycle. @return An alert that its predecessor extended. """ Alert result...
java
private static Alert combine_alert_with_past_(Alert alert, Map<GroupName, Alert> previous) { Alert result = Optional.ofNullable(previous.get(alert.getName())) .map((prev) -> prev.extend(alert)) .orElse(alert); logger.log(Level.FINE, "emitting alert {0} -> {1}", new Object...
[ "private", "static", "Alert", "combine_alert_with_past_", "(", "Alert", "alert", ",", "Map", "<", "GroupName", ",", "Alert", ">", "previous", ")", "{", "Alert", "result", "=", "Optional", ".", "ofNullable", "(", "previous", ".", "get", "(", "alert", ".", "...
Combine a new alert with its previous state. @param alert An emitted alert. @param previous A map with alerts during the previous cycle. @return An alert that its predecessor extended.
[ "Combine", "a", "new", "alert", "with", "its", "previous", "state", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/impl/src/main/java/com/groupon/lex/metrics/PushMetricRegistryInstance.java#L150-L156
jbundle/jbundle
base/model/src/main/java/org/jbundle/base/model/Utility.java
Utility.transferURLStream
public static String transferURLStream(String strURL, String strFilename, Reader in) { """ Transfer the data stream from this URL to a string or file. @param strURL The URL to read. @param strFilename If non-null, create this file and send the URL data here. @param strFilename If null, return the stream as a st...
java
public static String transferURLStream(String strURL, String strFilename, Reader in) { return Utility.transferURLStream(strURL, strFilename, in, null); }
[ "public", "static", "String", "transferURLStream", "(", "String", "strURL", ",", "String", "strFilename", ",", "Reader", "in", ")", "{", "return", "Utility", ".", "transferURLStream", "(", "strURL", ",", "strFilename", ",", "in", ",", "null", ")", ";", "}" ]
Transfer the data stream from this URL to a string or file. @param strURL The URL to read. @param strFilename If non-null, create this file and send the URL data here. @param strFilename If null, return the stream as a string. @param in If this is non-null, read from this input source. @return The stream as a string if...
[ "Transfer", "the", "data", "stream", "from", "this", "URL", "to", "a", "string", "or", "file", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/model/src/main/java/org/jbundle/base/model/Utility.java#L347-L350
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Invoker.java
Invoker.callStaticMethod
public static Object callStaticMethod(Class staticClass, String methodName, Object[] values) throws PageException { """ call of a static method of a Class @param staticClass class how contains method to invoke @param methodName method name to invoke @param values Arguments for the Method @return return value...
java
public static Object callStaticMethod(Class staticClass, String methodName, Object[] values) throws PageException { if (values == null) values = new Object[0]; MethodParameterPair mp; try { mp = getMethodParameterPairIgnoreCase(staticClass, methodName, values); } catch (NoSuchMethodException e) { throw ...
[ "public", "static", "Object", "callStaticMethod", "(", "Class", "staticClass", ",", "String", "methodName", ",", "Object", "[", "]", "values", ")", "throws", "PageException", "{", "if", "(", "values", "==", "null", ")", "values", "=", "new", "Object", "[", ...
call of a static method of a Class @param staticClass class how contains method to invoke @param methodName method name to invoke @param values Arguments for the Method @return return value from method @throws PageException
[ "call", "of", "a", "static", "method", "of", "a", "Class" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Invoker.java#L409-L431
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/CraftingHelper.java
CraftingHelper.playerHasIngredients
public static boolean playerHasIngredients(EntityPlayerMP player, List<ItemStack> ingredients) { """ Inspect a player's inventory to see whether they have enough items to form the supplied list of ItemStacks.<br> The ingredients list MUST be amalgamated such that no two ItemStacks contain the same type of item. ...
java
public static boolean playerHasIngredients(EntityPlayerMP player, List<ItemStack> ingredients) { NonNullList<ItemStack> main = player.inventory.mainInventory; NonNullList<ItemStack> arm = player.inventory.armorInventory; for (ItemStack isIngredient : ingredients) { int t...
[ "public", "static", "boolean", "playerHasIngredients", "(", "EntityPlayerMP", "player", ",", "List", "<", "ItemStack", ">", "ingredients", ")", "{", "NonNullList", "<", "ItemStack", ">", "main", "=", "player", ".", "inventory", ".", "mainInventory", ";", "NonNul...
Inspect a player's inventory to see whether they have enough items to form the supplied list of ItemStacks.<br> The ingredients list MUST be amalgamated such that no two ItemStacks contain the same type of item. @param player @param ingredients an amalgamated list of ingredients @return true if the player's inventory c...
[ "Inspect", "a", "player", "s", "inventory", "to", "see", "whether", "they", "have", "enough", "items", "to", "form", "the", "supplied", "list", "of", "ItemStacks", ".", "<br", ">", "The", "ingredients", "list", "MUST", "be", "amalgamated", "such", "that", ...
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/CraftingHelper.java#L185-L203
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java
StatusData.getFormattedStatus
public String getFormattedStatus() { """ Formats the StatusData for viewing. @return The formatted status data as a String. """ final StringBuilder sb = new StringBuilder(); final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); sb.append(format.format(new D...
java
public String getFormattedStatus() { final StringBuilder sb = new StringBuilder(); final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); sb.append(format.format(new Date(timestamp))); sb.append(SPACE); sb.append(getThreadName()); sb.append(SPACE...
[ "public", "String", "getFormattedStatus", "(", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "final", "SimpleDateFormat", "format", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd HH:mm:ss,SSS\"", ")", ";", "sb", ".", "...
Formats the StatusData for viewing. @return The formatted status data as a String.
[ "Formats", "the", "StatusData", "for", "viewing", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java#L120-L144
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/util/box/MutableChar.java
MutableChar.fromExternal
public static MutableChar fromExternal(final Supplier<Character> s, final Consumer<Character> c) { """ Construct a MutableChar that gets and sets an external value using the provided Supplier and Consumer e.g. <pre> {@code MutableChar mutable = MutableChar.fromExternal(()->!this.value,val->!this.value); } ...
java
public static MutableChar fromExternal(final Supplier<Character> s, final Consumer<Character> c) { return new MutableChar() { @Override public char getAsChar() { return s.get(); } @Override public Character get() { retu...
[ "public", "static", "MutableChar", "fromExternal", "(", "final", "Supplier", "<", "Character", ">", "s", ",", "final", "Consumer", "<", "Character", ">", "c", ")", "{", "return", "new", "MutableChar", "(", ")", "{", "@", "Override", "public", "char", "getA...
Construct a MutableChar that gets and sets an external value using the provided Supplier and Consumer e.g. <pre> {@code MutableChar mutable = MutableChar.fromExternal(()->!this.value,val->!this.value); } </pre> @param s Supplier of an external value @param c Consumer that sets an external value @return MutableChar t...
[ "Construct", "a", "MutableChar", "that", "gets", "and", "sets", "an", "external", "value", "using", "the", "provided", "Supplier", "and", "Consumer" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/util/box/MutableChar.java#L81-L99
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_service_serviceName_previousVoiceConsumption_GET
public ArrayList<Long> billingAccount_service_serviceName_previousVoiceConsumption_GET(String billingAccount, String serviceName, Date creationDatetime_from, Date creationDatetime_to, OvhVoiceConsumptionDestinationTypeEnum destinationType, OvhVoiceConsumptionPlanTypeEnum planType, OvhVoiceConsumptionWayTypeEnum wayType...
java
public ArrayList<Long> billingAccount_service_serviceName_previousVoiceConsumption_GET(String billingAccount, String serviceName, Date creationDatetime_from, Date creationDatetime_to, OvhVoiceConsumptionDestinationTypeEnum destinationType, OvhVoiceConsumptionPlanTypeEnum planType, OvhVoiceConsumptionWayTypeEnum wayType...
[ "public", "ArrayList", "<", "Long", ">", "billingAccount_service_serviceName_previousVoiceConsumption_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Date", "creationDatetime_from", ",", "Date", "creationDatetime_to", ",", "OvhVoiceConsumptionDestinat...
Call delivery records of the previous month. REST: GET /telephony/{billingAccount}/service/{serviceName}/previousVoiceConsumption @param creationDatetime_from [required] Filter the value of creationDatetime property (>=) @param creationDatetime_to [required] Filter the value of creationDatetime property (<=) @param wa...
[ "Call", "delivery", "records", "of", "the", "previous", "month", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3824-L3834
fozziethebeat/S-Space
opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java
LatentRelationalAnalysis.countWildcardPhraseFrequencies
private static int countWildcardPhraseFrequencies(File dir, String pattern) throws Exception { """ Searches through all the .txt files in a directory and returns the total number of occurrences of a pattern. """ File[] files = dir.listFiles(); int total = 0; for (int...
java
private static int countWildcardPhraseFrequencies(File dir, String pattern) throws Exception { File[] files = dir.listFiles(); int total = 0; for (int i = 0; i < files.length; i++) { File f = files[i]; if (f.isDirectory()) { total += cou...
[ "private", "static", "int", "countWildcardPhraseFrequencies", "(", "File", "dir", ",", "String", "pattern", ")", "throws", "Exception", "{", "File", "[", "]", "files", "=", "dir", ".", "listFiles", "(", ")", ";", "int", "total", "=", "0", ";", "for", "("...
Searches through all the .txt files in a directory and returns the total number of occurrences of a pattern.
[ "Searches", "through", "all", "the", ".", "txt", "files", "in", "a", "directory", "and", "returns", "the", "total", "number", "of", "occurrences", "of", "a", "pattern", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java#L629-L651
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcWrapper.java
WSJdbcWrapper.createClosedException
protected final SQLRecoverableException createClosedException(String ifc) { """ Create an SQLRecoverableException if exception mapping is enabled, or SQLRecoverableException if exception mapping is disabled. @param ifc the simple interface name (such as Connection) of the closed wrapper. @return an exceptio...
java
protected final SQLRecoverableException createClosedException(String ifc) { String message = AdapterUtil.getNLSMessage("OBJECT_CLOSED", ifc); return new SQLRecoverableException(message, "08003", 0); }
[ "protected", "final", "SQLRecoverableException", "createClosedException", "(", "String", "ifc", ")", "{", "String", "message", "=", "AdapterUtil", ".", "getNLSMessage", "(", "\"OBJECT_CLOSED\"", ",", "ifc", ")", ";", "return", "new", "SQLRecoverableException", "(", ...
Create an SQLRecoverableException if exception mapping is enabled, or SQLRecoverableException if exception mapping is disabled. @param ifc the simple interface name (such as Connection) of the closed wrapper. @return an exception indicating the object is closed.
[ "Create", "an", "SQLRecoverableException", "if", "exception", "mapping", "is", "enabled", "or", "SQLRecoverableException", "if", "exception", "mapping", "is", "disabled", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcWrapper.java#L108-L111
cdk/cdk
tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java
SmartsFragmentExtractor.encodeBondExpr
private String encodeBondExpr(int bondIdx, int beg, int end) { """ Encodes the bond at index (bondIdx) to a SMARTS expression that matches itself. @param bondIdx bond index @param beg atom index of first atom @param end atom index of second atom @return SMARTS bond expression """ IBond b...
java
private String encodeBondExpr(int bondIdx, int beg, int end) { IBond bond = mol.getBond(bondIdx); if (bond.getOrder() == null) return ""; boolean bArom = bond.isAromatic(); boolean aArom = mol.getAtom(beg).isAromatic() && mol.getAtom(end).isAromatic(); switch (bond.g...
[ "private", "String", "encodeBondExpr", "(", "int", "bondIdx", ",", "int", "beg", ",", "int", "end", ")", "{", "IBond", "bond", "=", "mol", ".", "getBond", "(", "bondIdx", ")", ";", "if", "(", "bond", ".", "getOrder", "(", ")", "==", "null", ")", "r...
Encodes the bond at index (bondIdx) to a SMARTS expression that matches itself. @param bondIdx bond index @param beg atom index of first atom @param end atom index of second atom @return SMARTS bond expression
[ "Encodes", "the", "bond", "at", "index", "(", "bondIdx", ")", "to", "a", "SMARTS", "expression", "that", "matches", "itself", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java#L434-L455
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskTracker.java
TaskTracker.getMaxSlots
protected int getMaxSlots(JobConf conf, int numCpuOnTT, TaskType type) { """ Obtain the max number of task slots based on the configuration and CPU """ int maxSlots; String cpuToSlots; if (type == TaskType.MAP) { maxSlots = conf.getInt("mapred.tasktracker.map.tasks.maximum", 2); cpuToSl...
java
protected int getMaxSlots(JobConf conf, int numCpuOnTT, TaskType type) { int maxSlots; String cpuToSlots; if (type == TaskType.MAP) { maxSlots = conf.getInt("mapred.tasktracker.map.tasks.maximum", 2); cpuToSlots = conf.get("mapred.tasktracker.cpus.to.maptasks"); } else { maxSlots = con...
[ "protected", "int", "getMaxSlots", "(", "JobConf", "conf", ",", "int", "numCpuOnTT", ",", "TaskType", "type", ")", "{", "int", "maxSlots", ";", "String", "cpuToSlots", ";", "if", "(", "type", "==", "TaskType", ".", "MAP", ")", "{", "maxSlots", "=", "conf...
Obtain the max number of task slots based on the configuration and CPU
[ "Obtain", "the", "max", "number", "of", "task", "slots", "based", "on", "the", "configuration", "and", "CPU" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskTracker.java#L4554-L4582
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java
RpcConfigs.getStringValue
public static String getStringValue(String primaryKey, String secondaryKey) { """ Gets string value. @param primaryKey the primary key @param secondaryKey the secondary key @return the string value """ String val = (String) CFG.get(primaryKey); if (val == null) { val = (Strin...
java
public static String getStringValue(String primaryKey, String secondaryKey) { String val = (String) CFG.get(primaryKey); if (val == null) { val = (String) CFG.get(secondaryKey); if (val == null) { throw new SofaRpcRuntimeException("Not found key: " + primaryKey + ...
[ "public", "static", "String", "getStringValue", "(", "String", "primaryKey", ",", "String", "secondaryKey", ")", "{", "String", "val", "=", "(", "String", ")", "CFG", ".", "get", "(", "primaryKey", ")", ";", "if", "(", "val", "==", "null", ")", "{", "v...
Gets string value. @param primaryKey the primary key @param secondaryKey the secondary key @return the string value
[ "Gets", "string", "value", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java#L267-L279
moparisthebest/beehive
beehive-netui-compiler/src/main/java/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java
GenStrutsApp.canWrite
public boolean canWrite() { """ In some cases, canWrite() does not guarantee that a FileNotFoundException will not be thrown when trying to write to a file. This method actually tries to overwrite the file as a test to see whether it's possible. """ if ( ! _strutsConfigFile.canWrite() ) { ...
java
public boolean canWrite() { if ( ! _strutsConfigFile.canWrite() ) { return false; } try { // // This appears to be the only way to predict whether the file can actually be // written to; it may be that canWrite() return...
[ "public", "boolean", "canWrite", "(", ")", "{", "if", "(", "!", "_strutsConfigFile", ".", "canWrite", "(", ")", ")", "{", "return", "false", ";", "}", "try", "{", "//", "// This appears to be the only way to predict whether the file can actually be", "// written to; i...
In some cases, canWrite() does not guarantee that a FileNotFoundException will not be thrown when trying to write to a file. This method actually tries to overwrite the file as a test to see whether it's possible.
[ "In", "some", "cases", "canWrite", "()", "does", "not", "guarantee", "that", "a", "FileNotFoundException", "will", "not", "be", "thrown", "when", "trying", "to", "write", "to", "a", "file", ".", "This", "method", "actually", "tries", "to", "overwrite", "the"...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-compiler/src/main/java/org/apache/beehive/netui/compiler/genmodel/GenStrutsApp.java#L421-L447
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleEntries.java
ModuleEntries.fetchAll
public CMAArray<CMAEntry> fetchAll(String spaceId, String environmentId) { """ Fetch all entries from the given space and environment. <p> This fetch uses the default parameter defined in {@link DefaultQueryParameter#FETCH} <p> This method will override the configuration specified through {@link CMAClient.Bui...
java
public CMAArray<CMAEntry> fetchAll(String spaceId, String environmentId) { return fetchAll(spaceId, environmentId, new HashMap<>()); }
[ "public", "CMAArray", "<", "CMAEntry", ">", "fetchAll", "(", "String", "spaceId", ",", "String", "environmentId", ")", "{", "return", "fetchAll", "(", "spaceId", ",", "environmentId", ",", "new", "HashMap", "<>", "(", ")", ")", ";", "}" ]
Fetch all entries from the given space and environment. <p> This fetch uses the default parameter defined in {@link DefaultQueryParameter#FETCH} <p> This method will override the configuration specified through {@link CMAClient.Builder#setSpaceId(String)} and {@link CMAClient.Builder#setEnvironmentId(String)}. @param ...
[ "Fetch", "all", "entries", "from", "the", "given", "space", "and", "environment", ".", "<p", ">", "This", "fetch", "uses", "the", "default", "parameter", "defined", "in", "{", "@link", "DefaultQueryParameter#FETCH", "}", "<p", ">", "This", "method", "will", ...
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleEntries.java#L215-L217
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.convert
@Deprecated public static void convert(Image srcImage, String formatName, ImageOutputStream destImageStream) { """ 图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG<br> 此方法并不关闭流 @param srcImage 源图像流 @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等 @param destImageStream 目标图像输出流 @since 3.0.9 @depre...
java
@Deprecated public static void convert(Image srcImage, String formatName, ImageOutputStream destImageStream) { convert(srcImage, formatName, destImageStream, false); }
[ "@", "Deprecated", "public", "static", "void", "convert", "(", "Image", "srcImage", ",", "String", "formatName", ",", "ImageOutputStream", "destImageStream", ")", "{", "convert", "(", "srcImage", ",", "formatName", ",", "destImageStream", ",", "false", ")", ";",...
图像类型转换:GIF=》JPG、GIF=》PNG、PNG=》JPG、PNG=》GIF(X)、BMP=》PNG<br> 此方法并不关闭流 @param srcImage 源图像流 @param formatName 包含格式非正式名称的 String:如JPG、JPEG、GIF等 @param destImageStream 目标图像输出流 @since 3.0.9 @deprecated 请使用{@link #write(Image, String, ImageOutputStream)}
[ "图像类型转换:GIF", "=", "》JPG、GIF", "=", "》PNG、PNG", "=", "》JPG、PNG", "=", "》GIF", "(", "X", ")", "、BMP", "=", "》PNG<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L550-L553
dropwizard/dropwizard
dropwizard-json-logging/src/main/java/io/dropwizard/logging/json/layout/MapBuilder.java
MapBuilder.addNumber
public MapBuilder addNumber(String fieldName, boolean include, Supplier<Number> supplier) { """ Adds the number value to the provided map under the provided field name, if it should be included. The supplier is only invoked if the field is to be included. """ if (include) { Number value = ...
java
public MapBuilder addNumber(String fieldName, boolean include, Supplier<Number> supplier) { if (include) { Number value = supplier.get(); if (value != null) { map.put(getFieldName(fieldName), value); } } return this; }
[ "public", "MapBuilder", "addNumber", "(", "String", "fieldName", ",", "boolean", "include", ",", "Supplier", "<", "Number", ">", "supplier", ")", "{", "if", "(", "include", ")", "{", "Number", "value", "=", "supplier", ".", "get", "(", ")", ";", "if", ...
Adds the number value to the provided map under the provided field name, if it should be included. The supplier is only invoked if the field is to be included.
[ "Adds", "the", "number", "value", "to", "the", "provided", "map", "under", "the", "provided", "field", "name", "if", "it", "should", "be", "included", ".", "The", "supplier", "is", "only", "invoked", "if", "the", "field", "is", "to", "be", "included", "....
train
https://github.com/dropwizard/dropwizard/blob/7ee09a410476b9681e8072ab684788bb440877bd/dropwizard-json-logging/src/main/java/io/dropwizard/logging/json/layout/MapBuilder.java#L77-L85
alkacon/opencms-core
src/org/opencms/ui/apps/scheduler/CmsJobEditView.java
CmsJobEditView.loadFromBean
public void loadFromBean(CmsScheduledJobInfo info) { """ Initializes the form fields with values from the given job bean.<P> @param info the job bean with which to fill the form """ // all other fields already populated by field group, we still need to handle the parameters for (Map.Entry<...
java
public void loadFromBean(CmsScheduledJobInfo info) { // all other fields already populated by field group, we still need to handle the parameters for (Map.Entry<String, String> entry : info.getParameters().entrySet()) { addParamLine(entry.getKey(), entry.getValue()); } }
[ "public", "void", "loadFromBean", "(", "CmsScheduledJobInfo", "info", ")", "{", "// all other fields already populated by field group, we still need to handle the parameters", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "info", ".", ...
Initializes the form fields with values from the given job bean.<P> @param info the job bean with which to fill the form
[ "Initializes", "the", "form", "fields", "with", "values", "from", "the", "given", "job", "bean", ".", "<P", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/scheduler/CmsJobEditView.java#L407-L414
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java
ProbeManagerImpl.addListenerByProbe
void addListenerByProbe(ProbeImpl probe, ProbeListener listener) { """ Add the specified listener to the collection of listeners associated with the specified probe. @param probe the probe that fires for the listener @param listener the listener that's driven by the probe """ Set<ProbeListener> li...
java
void addListenerByProbe(ProbeImpl probe, ProbeListener listener) { Set<ProbeListener> listeners = listenersByProbe.get(probe); if (listeners == null) { listeners = new CopyOnWriteArraySet<ProbeListener>(); listenersByProbe.putIfAbsent(probe, listeners); listeners = li...
[ "void", "addListenerByProbe", "(", "ProbeImpl", "probe", ",", "ProbeListener", "listener", ")", "{", "Set", "<", "ProbeListener", ">", "listeners", "=", "listenersByProbe", ".", "get", "(", "probe", ")", ";", "if", "(", "listeners", "==", "null", ")", "{", ...
Add the specified listener to the collection of listeners associated with the specified probe. @param probe the probe that fires for the listener @param listener the listener that's driven by the probe
[ "Add", "the", "specified", "listener", "to", "the", "collection", "of", "listeners", "associated", "with", "the", "specified", "probe", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L691-L699
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/bingspellcheck/src/main/java/com/microsoft/azure/cognitiveservices/language/spellcheck/implementation/BingSpellCheckOperationsImpl.java
BingSpellCheckOperationsImpl.spellCheckerWithServiceResponseAsync
public Observable<ServiceResponse<SpellCheck>> spellCheckerWithServiceResponseAsync(String text, SpellCheckerOptionalParameter spellCheckerOptionalParameter) { """ The Bing Spell Check API lets you perform contextual grammar and spell checking. Bing has developed a web-based spell-checker that leverages machine le...
java
public Observable<ServiceResponse<SpellCheck>> spellCheckerWithServiceResponseAsync(String text, SpellCheckerOptionalParameter spellCheckerOptionalParameter) { if (text == null) { throw new IllegalArgumentException("Parameter text is required and cannot be null."); } final String acc...
[ "public", "Observable", "<", "ServiceResponse", "<", "SpellCheck", ">", ">", "spellCheckerWithServiceResponseAsync", "(", "String", "text", ",", "SpellCheckerOptionalParameter", "spellCheckerOptionalParameter", ")", "{", "if", "(", "text", "==", "null", ")", "{", "thr...
The Bing Spell Check API lets you perform contextual grammar and spell checking. Bing has developed a web-based spell-checker that leverages machine learning and statistical machine translation to dynamically train a constantly evolving and highly contextual algorithm. The spell-checker is based on a massive corpus of ...
[ "The", "Bing", "Spell", "Check", "API", "lets", "you", "perform", "contextual", "grammar", "and", "spell", "checking", ".", "Bing", "has", "developed", "a", "web", "-", "based", "spell", "-", "checker", "that", "leverages", "machine", "learning", "and", "sta...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/bingspellcheck/src/main/java/com/microsoft/azure/cognitiveservices/language/spellcheck/implementation/BingSpellCheckOperationsImpl.java#L117-L141
czyzby/gdx-lml
mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java
InterfaceService.addViewActionContainer
public void addViewActionContainer(final String actionContainerId, final ActionContainer actionContainer) { """ Registers an action container globally for all views. @param actionContainerId ID of the action container as it appears in the views. @param actionContainer contains view actions. """ par...
java
public void addViewActionContainer(final String actionContainerId, final ActionContainer actionContainer) { parser.getData().addActionContainer(actionContainerId, actionContainer); }
[ "public", "void", "addViewActionContainer", "(", "final", "String", "actionContainerId", ",", "final", "ActionContainer", "actionContainer", ")", "{", "parser", ".", "getData", "(", ")", ".", "addActionContainer", "(", "actionContainerId", ",", "actionContainer", ")",...
Registers an action container globally for all views. @param actionContainerId ID of the action container as it appears in the views. @param actionContainer contains view actions.
[ "Registers", "an", "action", "container", "globally", "for", "all", "views", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/mvc/src/main/java/com/github/czyzby/autumn/mvc/component/ui/InterfaceService.java#L134-L136
patka/cassandra-migration
cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java
Ensure.notNull
public static <T> T notNull(T argument, String argumentName) { """ Checks if the given argument is null and throws an exception with a message containing the argument name if that it true. @param argument the argument to check for null @param argumentName the name of the argument to check. This is used i...
java
public static <T> T notNull(T argument, String argumentName) { if (argument == null) { throw new IllegalArgumentException("Argument " + argumentName + " must not be null."); } return argument; }
[ "public", "static", "<", "T", ">", "T", "notNull", "(", "T", "argument", ",", "String", "argumentName", ")", "{", "if", "(", "argument", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument \"", "+", "argumentName", "+", "\"...
Checks if the given argument is null and throws an exception with a message containing the argument name if that it true. @param argument the argument to check for null @param argumentName the name of the argument to check. This is used in the exception message. @param <T> the type of the argument @return...
[ "Checks", "if", "the", "given", "argument", "is", "null", "and", "throws", "an", "exception", "with", "a", "message", "containing", "the", "argument", "name", "if", "that", "it", "true", "." ]
train
https://github.com/patka/cassandra-migration/blob/c61840c23b17a18df704d136909c26ff46bd5c77/cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java#L21-L26
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareMediaManager.java
ScreenShareMediaManager.createMediaSession
@Override public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) { """ Returns a new JingleMediaSession. @param payloadType payloadType @param remote remote Candidate @param local ...
java
@Override public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) { ScreenShareSession session = null; session = new ScreenShareSession(payloadType, remote, local, "Screen", jingleSessio...
[ "@", "Override", "public", "JingleMediaSession", "createMediaSession", "(", "PayloadType", "payloadType", ",", "final", "TransportCandidate", "remote", ",", "final", "TransportCandidate", "local", ",", "final", "JingleSession", "jingleSession", ")", "{", "ScreenShareSessi...
Returns a new JingleMediaSession. @param payloadType payloadType @param remote remote Candidate @param local local Candidate @return JingleMediaSession JingleMediaSession
[ "Returns", "a", "new", "JingleMediaSession", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareMediaManager.java#L77-L88
JamesIry/jADT
jADT-core/src/main/java/com/pogofish/jadt/source/StringSourceFactory.java
StringSourceFactory.createSources
@Override public List<StringSource> createSources(String sourceFileName) { """ Create a list with a single StringSource - the sourceFileName will be used as the srcInfo in the resulting Source """ return Util.list(new StringSource(sourceFileName, source)); }
java
@Override public List<StringSource> createSources(String sourceFileName) { return Util.list(new StringSource(sourceFileName, source)); }
[ "@", "Override", "public", "List", "<", "StringSource", ">", "createSources", "(", "String", "sourceFileName", ")", "{", "return", "Util", ".", "list", "(", "new", "StringSource", "(", "sourceFileName", ",", "source", ")", ")", ";", "}" ]
Create a list with a single StringSource - the sourceFileName will be used as the srcInfo in the resulting Source
[ "Create", "a", "list", "with", "a", "single", "StringSource", "-", "the", "sourceFileName", "will", "be", "used", "as", "the", "srcInfo", "in", "the", "resulting", "Source" ]
train
https://github.com/JamesIry/jADT/blob/92ee94b6624cd673851497d78c218837dcf02b8a/jADT-core/src/main/java/com/pogofish/jadt/source/StringSourceFactory.java#L45-L48
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.executeBatchAsync
public void executeBatchAsync(BatchOperation batchOperation, CallbackHandler callbackHandler) throws FMSException { """ Method to cancel the operation for the corresponding entity in asynchronous fashion @param batchOperation the batch operation @param callbackHandler the callback handler @throws FMSExcepti...
java
public void executeBatchAsync(BatchOperation batchOperation, CallbackHandler callbackHandler) throws FMSException { IntuitMessage intuitMessage = prepareBatch(batchOperation); //set callback handler intuitMessage.getRequestElements().setCallbackHandler(callbackHandler); //execute asyn...
[ "public", "void", "executeBatchAsync", "(", "BatchOperation", "batchOperation", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "IntuitMessage", "intuitMessage", "=", "prepareBatch", "(", "batchOperation", ")", ";", "//set callback handler", ...
Method to cancel the operation for the corresponding entity in asynchronous fashion @param batchOperation the batch operation @param callbackHandler the callback handler @throws FMSException
[ "Method", "to", "cancel", "the", "operation", "for", "the", "corresponding", "entity", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L1016-L1025
alkacon/opencms-core
src/org/opencms/jsp/decorator/CmsDecorationObject.java
CmsDecorationObject.replaceMacros
private String replaceMacros(String msg, String contentLocale) { """ Replaces the macros in the given message.<p> @param msg the message in which the macros are replaced @param contentLocale the locale of the content that is currently decorated @return the message with the macros replaced """ C...
java
private String replaceMacros(String msg, String contentLocale) { CmsMacroResolver resolver = CmsMacroResolver.newInstance(); resolver.addMacro(MACRO_DECORATION, m_decoration); resolver.addMacro(MACRO_DECORATIONKEY, m_decorationKey); if (m_locale != null) { resolver.addMacro(...
[ "private", "String", "replaceMacros", "(", "String", "msg", ",", "String", "contentLocale", ")", "{", "CmsMacroResolver", "resolver", "=", "CmsMacroResolver", ".", "newInstance", "(", ")", ";", "resolver", ".", "addMacro", "(", "MACRO_DECORATION", ",", "m_decorati...
Replaces the macros in the given message.<p> @param msg the message in which the macros are replaced @param contentLocale the locale of the content that is currently decorated @return the message with the macros replaced
[ "Replaces", "the", "macros", "in", "the", "given", "message", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/decorator/CmsDecorationObject.java#L185-L198
vladmihalcea/flexy-pool
flexy-dropwizard3-metrics/src/main/java/com/vladmihalcea/flexypool/metric/codahale/JmxMetricReporter.java
JmxMetricReporter.init
@Override public JmxMetricReporter init(ConfigurationProperties configurationProperties, MetricRegistry metricRegistry) { """ The JMX Reporter is activated only if the jmxEnabled property is set. If the jmxAutoStart property is enabled, the JMX Reporter will start automatically. @param configurationPropert...
java
@Override public JmxMetricReporter init(ConfigurationProperties configurationProperties, MetricRegistry metricRegistry) { if (configurationProperties.isJmxEnabled()) { jmxReporter = JmxReporter .forRegistry(metricRegistry) .inDomain(MetricRegistry.name(get...
[ "@", "Override", "public", "JmxMetricReporter", "init", "(", "ConfigurationProperties", "configurationProperties", ",", "MetricRegistry", "metricRegistry", ")", "{", "if", "(", "configurationProperties", ".", "isJmxEnabled", "(", ")", ")", "{", "jmxReporter", "=", "Jm...
The JMX Reporter is activated only if the jmxEnabled property is set. If the jmxAutoStart property is enabled, the JMX Reporter will start automatically. @param configurationProperties configuration properties @param metricRegistry metric registry @return {@link JmxMetricReporter}
[ "The", "JMX", "Reporter", "is", "activated", "only", "if", "the", "jmxEnabled", "property", "is", "set", ".", "If", "the", "jmxAutoStart", "property", "is", "enabled", "the", "JMX", "Reporter", "will", "start", "automatically", "." ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-dropwizard3-metrics/src/main/java/com/vladmihalcea/flexypool/metric/codahale/JmxMetricReporter.java#L25-L37
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/api/QrcodeAPI.java
QrcodeAPI.createQrcode
public QrcodeResponse createQrcode(QrcodeType actionName, String sceneId, Integer expireSeconds) { """ 创建二维码 @param actionName 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久 @param sceneId 场景值ID,临时二维码时为32位非0整型,永久二维码时最大值为100000(目前参数只支持1--100000) @param expireSeconds 该二维码有效时间,以秒为单位。 最大不超过2592000(即30天),此字段如果不填,则默认...
java
public QrcodeResponse createQrcode(QrcodeType actionName, String sceneId, Integer expireSeconds) { return createQrcode(actionName, sceneId, null, expireSeconds); }
[ "public", "QrcodeResponse", "createQrcode", "(", "QrcodeType", "actionName", ",", "String", "sceneId", ",", "Integer", "expireSeconds", ")", "{", "return", "createQrcode", "(", "actionName", ",", "sceneId", ",", "null", ",", "expireSeconds", ")", ";", "}" ]
创建二维码 @param actionName 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久 @param sceneId 场景值ID,临时二维码时为32位非0整型,永久二维码时最大值为100000(目前参数只支持1--100000) @param expireSeconds 该二维码有效时间,以秒为单位。 最大不超过2592000(即30天),此字段如果不填,则默认有效期为30秒 @return 二维码对象
[ "创建二维码" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/api/QrcodeAPI.java#L38-L40
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/style/Styles.java
Styles.setStyle
public void setStyle(StyleRow styleRow, GeometryType geometryType) { """ Set the style for the geometry type @param styleRow style row @param geometryType geometry type """ if (geometryType != null) { if (styleRow != null) { styles.put(geometryType, styleRow); } else { styles.remove(geome...
java
public void setStyle(StyleRow styleRow, GeometryType geometryType) { if (geometryType != null) { if (styleRow != null) { styles.put(geometryType, styleRow); } else { styles.remove(geometryType); } } else { defaultStyle = styleRow; } }
[ "public", "void", "setStyle", "(", "StyleRow", "styleRow", ",", "GeometryType", "geometryType", ")", "{", "if", "(", "geometryType", "!=", "null", ")", "{", "if", "(", "styleRow", "!=", "null", ")", "{", "styles", ".", "put", "(", "geometryType", ",", "s...
Set the style for the geometry type @param styleRow style row @param geometryType geometry type
[ "Set", "the", "style", "for", "the", "geometry", "type" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/style/Styles.java#L47-L57
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/json/validators/ValidationContext.java
ValidationContext.addBadValueError
public void addBadValueError(final String type, final JSONValue val) throws ValidationException { """ Calls {@link #addError(String)} with a message that indicates that a node has the wrong JSON type, e.g. we're expecting a String but the value was a Number. @param type expected Node or Shape type @param val...
java
public void addBadValueError(final String type, final JSONValue val) throws ValidationException { addError(StringFormatter.format(MessageConstants.MESSAGES.invalidValueForType(), type, val)); }
[ "public", "void", "addBadValueError", "(", "final", "String", "type", ",", "final", "JSONValue", "val", ")", "throws", "ValidationException", "{", "addError", "(", "StringFormatter", ".", "format", "(", "MessageConstants", ".", "MESSAGES", ".", "invalidValueForType"...
Calls {@link #addError(String)} with a message that indicates that a node has the wrong JSON type, e.g. we're expecting a String but the value was a Number. @param type expected Node or Shape type @param val JSONValue that caused the error @throws ValidationException
[ "Calls", "{", "@link", "#addError", "(", "String", ")", "}", "with", "a", "message", "that", "indicates", "that", "a", "node", "has", "the", "wrong", "JSON", "type", "e", ".", "g", ".", "we", "re", "expecting", "a", "String", "but", "the", "value", "...
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/json/validators/ValidationContext.java#L141-L144
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java
AnnotatedTextBuilder.addMarkup
public AnnotatedTextBuilder addMarkup(String markup) { """ Add a markup text snippet like {@code <b attr='something'>} or {@code <div>}. These parts will be ignored by LanguageTool when using {@link org.languagetool.JLanguageTool#check(AnnotatedText)}. """ parts.add(new TextPart(markup, TextPart.Type.MARK...
java
public AnnotatedTextBuilder addMarkup(String markup) { parts.add(new TextPart(markup, TextPart.Type.MARKUP)); return this; }
[ "public", "AnnotatedTextBuilder", "addMarkup", "(", "String", "markup", ")", "{", "parts", ".", "add", "(", "new", "TextPart", "(", "markup", ",", "TextPart", ".", "Type", ".", "MARKUP", ")", ")", ";", "return", "this", ";", "}" ]
Add a markup text snippet like {@code <b attr='something'>} or {@code <div>}. These parts will be ignored by LanguageTool when using {@link org.languagetool.JLanguageTool#check(AnnotatedText)}.
[ "Add", "a", "markup", "text", "snippet", "like", "{" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/markup/AnnotatedTextBuilder.java#L93-L96
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseClient.java
HBaseClient.addFilter
public void addFilter(final String columnFamily, Filter filter) { """ Adds the filter. @param columnFamily the column family @param filter the filter """ ((HBaseDataHandler) handler).addFilter(columnFamily, filter); }
java
public void addFilter(final String columnFamily, Filter filter) { ((HBaseDataHandler) handler).addFilter(columnFamily, filter); }
[ "public", "void", "addFilter", "(", "final", "String", "columnFamily", ",", "Filter", "filter", ")", "{", "(", "(", "HBaseDataHandler", ")", "handler", ")", ".", "addFilter", "(", "columnFamily", ",", "filter", ")", ";", "}" ]
Adds the filter. @param columnFamily the column family @param filter the filter
[ "Adds", "the", "filter", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseClient.java#L319-L322
EXIficient/exificient-grammars
src/main/java/com/siemens/ct/exi/grammars/regex/RegularExpression.java
RegularExpression.matches
public boolean matches(String target, Match match) { """ Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not. @param match A Match instance for storing matching result. @return Offset of the start position in <VAR>target</VAR>; or -1 if not match. """ return this.m...
java
public boolean matches(String target, Match match) { return this.matches(target, 0, target.length(), match); }
[ "public", "boolean", "matches", "(", "String", "target", ",", "Match", "match", ")", "{", "return", "this", ".", "matches", "(", "target", ",", "0", ",", "target", ".", "length", "(", ")", ",", "match", ")", ";", "}" ]
Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not. @param match A Match instance for storing matching result. @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
[ "Checks", "whether", "the", "<var", ">", "target<", "/", "var", ">", "text", "<strong", ">", "contains<", "/", "strong", ">", "this", "pattern", "or", "not", "." ]
train
https://github.com/EXIficient/exificient-grammars/blob/d96477062ebdd4245920e44cc1995259699fc7fb/src/main/java/com/siemens/ct/exi/grammars/regex/RegularExpression.java#L994-L996
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XThrowExpression throwStatement, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param throwStatement the throw statement. @param it the target for the generated content. @param context the context. @return the statement. """ it....
java
protected XExpression _generate(XThrowExpression throwStatement, IAppendable it, IExtraLanguageGeneratorContext context) { it.append("raise "); //$NON-NLS-1$ generate(throwStatement.getExpression(), it, context); return throwStatement; }
[ "protected", "XExpression", "_generate", "(", "XThrowExpression", "throwStatement", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "it", ".", "append", "(", "\"raise \"", ")", ";", "//$NON-NLS-1$", "generate", "(", "throwStatemen...
Generate the given object. @param throwStatement the throw statement. @param it the target for the generated content. @param context the context. @return the statement.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L916-L920
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/EnglishGrammaticalStructure.java
EnglishGrammaticalStructure.getSubject
public static TreeGraphNode getSubject(TreeGraphNode t) { """ Tries to return a node representing the <code>SUBJECT</code> (whether nominal or clausal) of the given node <code>t</code>. Probably, node <code>t</code> should represent a clause or verb phrase. @param t a node in this <code>GrammaticalStructure<...
java
public static TreeGraphNode getSubject(TreeGraphNode t) { TreeGraphNode subj = getNodeInRelation(t, NOMINAL_SUBJECT); if (subj != null) { return subj; } subj = getNodeInRelation(t, CLAUSAL_SUBJECT); if (subj != null) { return subj; } else { return getNodeInRelation(t, ...
[ "public", "static", "TreeGraphNode", "getSubject", "(", "TreeGraphNode", "t", ")", "{", "TreeGraphNode", "subj", "=", "getNodeInRelation", "(", "t", ",", "NOMINAL_SUBJECT", ")", ";", "if", "(", "subj", "!=", "null", ")", "{", "return", "subj", ";", "}", "s...
Tries to return a node representing the <code>SUBJECT</code> (whether nominal or clausal) of the given node <code>t</code>. Probably, node <code>t</code> should represent a clause or verb phrase. @param t a node in this <code>GrammaticalStructure</code> @return a node which is the subject of node <code>t</code>, or el...
[ "Tries", "to", "return", "a", "node", "representing", "the", "<code", ">", "SUBJECT<", "/", "code", ">", "(", "whether", "nominal", "or", "clausal", ")", "of", "the", "given", "node", "<code", ">", "t<", "/", "code", ">", ".", "Probably", "node", "<cod...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/EnglishGrammaticalStructure.java#L103-L114
jpaoletti/java-presentation-manager
modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java
Converter.getNestedProperty
public Object getNestedProperty(Object obj, String propertyName) { """ Getter for a nested property in the given object. @param obj The object @param propertyName The name of the property to get @return The property value """ if (obj != null && propertyName != null) { return Presentation...
java
public Object getNestedProperty(Object obj, String propertyName) { if (obj != null && propertyName != null) { return PresentationManager.getPm().get(obj, propertyName); } return null; }
[ "public", "Object", "getNestedProperty", "(", "Object", "obj", ",", "String", "propertyName", ")", "{", "if", "(", "obj", "!=", "null", "&&", "propertyName", "!=", "null", ")", "{", "return", "PresentationManager", ".", "getPm", "(", ")", ".", "get", "(", ...
Getter for a nested property in the given object. @param obj The object @param propertyName The name of the property to get @return The property value
[ "Getter", "for", "a", "nested", "property", "in", "the", "given", "object", "." ]
train
https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/converter/Converter.java#L111-L116
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/Segment.java
Segment.combineByCustomDictionary
protected static List<Vertex> combineByCustomDictionary(List<Vertex> vertexList, DoubleArrayTrie<CoreDictionary.Attribute> dat, final WordNet wordNetAll) { """ 使用用户词典合并粗分结果,并将用户词语收集到全词图中 @param vertexList 粗分结果 @param dat 用户自定义词典 @param wordNetAll 收集用户词语到全词图中 @return 合并后的结果 """ List<Vertex> outputLi...
java
protected static List<Vertex> combineByCustomDictionary(List<Vertex> vertexList, DoubleArrayTrie<CoreDictionary.Attribute> dat, final WordNet wordNetAll) { List<Vertex> outputList = combineByCustomDictionary(vertexList, dat); int line = 0; for (final Vertex vertex : outputList) { ...
[ "protected", "static", "List", "<", "Vertex", ">", "combineByCustomDictionary", "(", "List", "<", "Vertex", ">", "vertexList", ",", "DoubleArrayTrie", "<", "CoreDictionary", ".", "Attribute", ">", "dat", ",", "final", "WordNet", "wordNetAll", ")", "{", "List", ...
使用用户词典合并粗分结果,并将用户词语收集到全词图中 @param vertexList 粗分结果 @param dat 用户自定义词典 @param wordNetAll 收集用户词语到全词图中 @return 合并后的结果
[ "使用用户词典合并粗分结果,并将用户词语收集到全词图中" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/Segment.java#L299-L322
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.isTyping
public Observable<ComapiResult<Void>> isTyping(@NonNull final String conversationId) { """ Send 'user is typing'. @param conversationId ID of a conversation. @return Observable to send event. """ final String token = getToken(); if (sessionController.isCreatingSession() || TextUtils.isEmp...
java
public Observable<ComapiResult<Void>> isTyping(@NonNull final String conversationId) { final String token = getToken(); if (sessionController.isCreatingSession() || TextUtils.isEmpty(token)) { return Observable.error(getSessionStateErrorDescription()); } else { return d...
[ "public", "Observable", "<", "ComapiResult", "<", "Void", ">", ">", "isTyping", "(", "@", "NonNull", "final", "String", "conversationId", ")", "{", "final", "String", "token", "=", "getToken", "(", ")", ";", "if", "(", "sessionController", ".", "isCreatingSe...
Send 'user is typing'. @param conversationId ID of a conversation. @return Observable to send event.
[ "Send", "user", "is", "typing", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L912-L921
GerdHolz/TOVAL
src/de/invation/code/toval/file/LineBasedFileTransformer.java
LineBasedFileTransformer.initialize
protected synchronized void initialize(String fileName) throws IOException, ParameterException { """ ------- Methods for setting up the parser ---------------------------------------------- """ Validate.notNull(fileName, "File Name must not be null"); input = new FileReader(fileName, inputCharset); Strin...
java
protected synchronized void initialize(String fileName) throws IOException, ParameterException { Validate.notNull(fileName, "File Name must not be null"); input = new FileReader(fileName, inputCharset); String inputName = input.getFile().getAbsolutePath(); String outputFileName = inputName.substring(0, inputNam...
[ "protected", "synchronized", "void", "initialize", "(", "String", "fileName", ")", "throws", "IOException", ",", "ParameterException", "{", "Validate", ".", "notNull", "(", "fileName", ",", "\"File Name must not be null\"", ")", ";", "input", "=", "new", "FileReader...
------- Methods for setting up the parser ----------------------------------------------
[ "-------", "Methods", "for", "setting", "up", "the", "parser", "----------------------------------------------" ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/file/LineBasedFileTransformer.java#L85-L94
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/VecmathUtil.java
VecmathUtil.getNearestVector
static Vector2d getNearestVector(final Vector2d reference, final List<Vector2d> vectors) { """ Given a list of unit vectors, find the vector which is nearest to a provided reference. @param reference a target vector @param vectors list of vectors @return the nearest vector @throws java.lang.IllegalArgumentE...
java
static Vector2d getNearestVector(final Vector2d reference, final List<Vector2d> vectors) { if (vectors.isEmpty()) throw new IllegalArgumentException("No vectors provided"); // to find the closest vector we find use the dot product, // for the general case (non-unit vectors) one can use the ...
[ "static", "Vector2d", "getNearestVector", "(", "final", "Vector2d", "reference", ",", "final", "List", "<", "Vector2d", ">", "vectors", ")", "{", "if", "(", "vectors", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"No vector...
Given a list of unit vectors, find the vector which is nearest to a provided reference. @param reference a target vector @param vectors list of vectors @return the nearest vector @throws java.lang.IllegalArgumentException no vectors provided
[ "Given", "a", "list", "of", "unit", "vectors", "find", "the", "vector", "which", "is", "nearest", "to", "a", "provided", "reference", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/VecmathUtil.java#L248-L267
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.negate
public BigDecimal negate() { """ Returns a {@code BigDecimal} whose value is {@code (-this)}, and whose scale is {@code this.scale()}. @return {@code -this}. """ if (intCompact == INFLATED) { return new BigDecimal(intVal.negate(), INFLATED, scale, precision); } else { ...
java
public BigDecimal negate() { if (intCompact == INFLATED) { return new BigDecimal(intVal.negate(), INFLATED, scale, precision); } else { return valueOf(-intCompact, scale, precision); } }
[ "public", "BigDecimal", "negate", "(", ")", "{", "if", "(", "intCompact", "==", "INFLATED", ")", "{", "return", "new", "BigDecimal", "(", "intVal", ".", "negate", "(", ")", ",", "INFLATED", ",", "scale", ",", "precision", ")", ";", "}", "else", "{", ...
Returns a {@code BigDecimal} whose value is {@code (-this)}, and whose scale is {@code this.scale()}. @return {@code -this}.
[ "Returns", "a", "{", "@code", "BigDecimal", "}", "whose", "value", "is", "{", "@code", "(", "-", "this", ")", "}", "and", "whose", "scale", "is", "{", "@code", "this", ".", "scale", "()", "}", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L2141-L2147
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.assertSeleniumIsEnabled
@Then("^the element on index '(\\d+?)' (IS|IS NOT) enabled$") public void assertSeleniumIsEnabled(Integer index, Boolean isEnabled) { """ Verifies that a webelement previously found {@code isEnabled} @param index @param isEnabled """ assertThat(this.commonspec, commonspec.getPreviousWebElements...
java
@Then("^the element on index '(\\d+?)' (IS|IS NOT) enabled$") public void assertSeleniumIsEnabled(Integer index, Boolean isEnabled) { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found elements than required") .hasAtLeast(index); assertThat(this...
[ "@", "Then", "(", "\"^the element on index '(\\\\d+?)' (IS|IS NOT) enabled$\"", ")", "public", "void", "assertSeleniumIsEnabled", "(", "Integer", "index", ",", "Boolean", "isEnabled", ")", "{", "assertThat", "(", "this", ".", "commonspec", ",", "commonspec", ".", "get...
Verifies that a webelement previously found {@code isEnabled} @param index @param isEnabled
[ "Verifies", "that", "a", "webelement", "previously", "found", "{", "@code", "isEnabled", "}" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L498-L504
HotelsDotCom/corc
corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java
CorcInputFormat.setSearchArgument
public static void setSearchArgument(Configuration conf, SearchArgument searchArgument) { """ Sets the SearchArgument predicate pushdown in the configuration """ if (searchArgument != null) { setSearchArgumentKryo(conf, searchArgument.toKryo()); } }
java
public static void setSearchArgument(Configuration conf, SearchArgument searchArgument) { if (searchArgument != null) { setSearchArgumentKryo(conf, searchArgument.toKryo()); } }
[ "public", "static", "void", "setSearchArgument", "(", "Configuration", "conf", ",", "SearchArgument", "searchArgument", ")", "{", "if", "(", "searchArgument", "!=", "null", ")", "{", "setSearchArgumentKryo", "(", "conf", ",", "searchArgument", ".", "toKryo", "(", ...
Sets the SearchArgument predicate pushdown in the configuration
[ "Sets", "the", "SearchArgument", "predicate", "pushdown", "in", "the", "configuration" ]
train
https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java#L143-L147
Netflix/ribbon
ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/reactive/ExecutionContextListenerInvoker.java
ExecutionContextListenerInvoker.onExecutionFailed
public void onExecutionFailed(ExecutionContext<I> context, Throwable finalException, ExecutionInfo info) { """ Called when the request is considered failed after all retries. @param finalException Final exception received. """ for (ExecutionListener<I, O> listener: listeners) { try { ...
java
public void onExecutionFailed(ExecutionContext<I> context, Throwable finalException, ExecutionInfo info) { for (ExecutionListener<I, O> listener: listeners) { try { if (!isListenerDisabled(listener)) { listener.onExecutionFailed(context.getChildContext(listener), ...
[ "public", "void", "onExecutionFailed", "(", "ExecutionContext", "<", "I", ">", "context", ",", "Throwable", "finalException", ",", "ExecutionInfo", "info", ")", "{", "for", "(", "ExecutionListener", "<", "I", ",", "O", ">", "listener", ":", "listeners", ")", ...
Called when the request is considered failed after all retries. @param finalException Final exception received.
[ "Called", "when", "the", "request", "is", "considered", "failed", "after", "all", "retries", "." ]
train
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-loadbalancer/src/main/java/com/netflix/loadbalancer/reactive/ExecutionContextListenerInvoker.java#L160-L170
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java
GenericUtils.putInt
static public WsByteBuffer[] putInt(WsByteBuffer[] buffers, int value, BNFHeadersImpl bnfObj) { """ Given a wsbb[], we're adding a int value to the <b>last</b> buffer. If that buffer fills up, then we will allocate a new one, by expanding the last WsByteBuffer in wsbb[]. <p> Returns the new wsbb[] (expanded if...
java
static public WsByteBuffer[] putInt(WsByteBuffer[] buffers, int value, BNFHeadersImpl bnfObj) { // verify input buffer information if (null == buffers) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Null buffers sent to putInt"); ...
[ "static", "public", "WsByteBuffer", "[", "]", "putInt", "(", "WsByteBuffer", "[", "]", "buffers", ",", "int", "value", ",", "BNFHeadersImpl", "bnfObj", ")", "{", "// verify input buffer information", "if", "(", "null", "==", "buffers", ")", "{", "if", "(", "...
Given a wsbb[], we're adding a int value to the <b>last</b> buffer. If that buffer fills up, then we will allocate a new one, by expanding the last WsByteBuffer in wsbb[]. <p> Returns the new wsbb[] (expanded if needed). @param buffers @param value @param bnfObj @return WsByteBuffer[]
[ "Given", "a", "wsbb", "[]", "we", "re", "adding", "a", "int", "value", "to", "the", "<b", ">", "last<", "/", "b", ">", "buffer", ".", "If", "that", "buffer", "fills", "up", "then", "we", "will", "allocate", "a", "new", "one", "by", "expanding", "th...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java#L112-L135
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getArgument
public ValueType getArgument(InvokeInstruction ins, ConstantPoolGen cpg, int i, SignatureParser sigParser) throws DataflowAnalysisException { """ Get the <i>i</i>th argument passed to given method invocation. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the clas...
java
public ValueType getArgument(InvokeInstruction ins, ConstantPoolGen cpg, int i, SignatureParser sigParser) throws DataflowAnalysisException { if (i >= sigParser.getNumParameters()) { throw new IllegalArgumentException("requesting parameter # " + i + " of " + sigParser); } ...
[ "public", "ValueType", "getArgument", "(", "InvokeInstruction", "ins", ",", "ConstantPoolGen", "cpg", ",", "int", "i", ",", "SignatureParser", "sigParser", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "i", ">=", "sigParser", ".", "getNumParameters", ...
Get the <i>i</i>th argument passed to given method invocation. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the class containing the method @param i index of the argument; 0 for the first argument, etc. @return the <i>i</i>th argument @throws DataflowAnalysisException
[ "Get", "the", "<i", ">", "i<", "/", "i", ">", "th", "argument", "passed", "to", "given", "method", "invocation", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L406-L412
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java
CPDefinitionPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp definitions where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPDefinition cpDefinition : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDefinition cpDefinition : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinition); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPDefinition", "cpDefinition", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ...
Removes all the cp definitions where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "definitions", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java#L1397-L1403
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/LocalQPConsumerKeyGroup.java
LocalQPConsumerKeyGroup.addMemberToList
private void addMemberToList(JSConsumerKey key, boolean specificList) { """ Add the member to the correct list @param key @param specificList """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "addMemberToList", new Object[] {key, Boolean.valueOf(specificList)}); ...
java
private void addMemberToList(JSConsumerKey key, boolean specificList) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "addMemberToList", new Object[] {key, Boolean.valueOf(specificList)}); if(specificList) { if(specificKeyMembers == null) { //...
[ "private", "void", "addMemberToList", "(", "JSConsumerKey", "key", ",", "boolean", "specificList", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc"...
Add the member to the correct list @param key @param specificList
[ "Add", "the", "member", "to", "the", "correct", "list" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/LocalQPConsumerKeyGroup.java#L364-L393
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getAllPvPGameID
public void getAllPvPGameID(String api, Callback<List<String>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on pvp games API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/games">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link ...
java
public void getAllPvPGameID(String api, Callback<List<String>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, api)); gw2API.getAllPvPGameIDs(api).enqueue(callback); }
[ "public", "void", "getAllPvPGameID", "(", "String", "api", ",", "Callback", "<", "List", "<", "String", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ParamType", "....
For more info on pvp games API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/games">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param api Guild Wars 2 API key @param callback callback th...
[ "For", "more", "info", "on", "pvp", "games", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "pvp", "/", "games", ">", "here<", "/", "a", ">", "<br", "/", ">", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2038-L2041
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/TimeFinder.java
TimeFinder.interpolateTimeSinceUpdate
private long interpolateTimeSinceUpdate(TrackPositionUpdate update, long currentTimestamp) { """ Figure out, based on how much time has elapsed since we received an update, and the playback position, speed, and direction at the time of that update, where the player will be now. @param update the most recent up...
java
private long interpolateTimeSinceUpdate(TrackPositionUpdate update, long currentTimestamp) { if (!update.playing) { return update.milliseconds; } long elapsedMillis = (currentTimestamp - update.timestamp) / 1000000; long moved = Math.round(update.pitch * elapsedMillis); ...
[ "private", "long", "interpolateTimeSinceUpdate", "(", "TrackPositionUpdate", "update", ",", "long", "currentTimestamp", ")", "{", "if", "(", "!", "update", ".", "playing", ")", "{", "return", "update", ".", "milliseconds", ";", "}", "long", "elapsedMillis", "=",...
Figure out, based on how much time has elapsed since we received an update, and the playback position, speed, and direction at the time of that update, where the player will be now. @param update the most recent update received from a player @param currentTimestamp the nanosecond timestamp representing when we want to...
[ "Figure", "out", "based", "on", "how", "much", "time", "has", "elapsed", "since", "we", "received", "an", "update", "and", "the", "playback", "position", "speed", "and", "direction", "at", "the", "time", "of", "that", "update", "where", "the", "player", "w...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/TimeFinder.java#L151-L161
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/engine/CommonsMetadataEngine.java
CommonsMetadataEngine.createIndex
@Override public final void createIndex(ClusterName targetCluster, IndexMetadata indexMetadata) throws UnsupportedException, ExecutionException { """ This method creates an index. @param targetCluster the target cluster where the index will be created. @param indexMetadata the index metainform...
java
@Override public final void createIndex(ClusterName targetCluster, IndexMetadata indexMetadata) throws UnsupportedException, ExecutionException { try { connectionHandler.startJob(targetCluster.getName()); if (logger.isDebugEnabled()) { logger.debug("Cre...
[ "@", "Override", "public", "final", "void", "createIndex", "(", "ClusterName", "targetCluster", ",", "IndexMetadata", "indexMetadata", ")", "throws", "UnsupportedException", ",", "ExecutionException", "{", "try", "{", "connectionHandler", ".", "startJob", "(", "target...
This method creates an index. @param targetCluster the target cluster where the index will be created. @param indexMetadata the index metainformation. @throws UnsupportedException if an operation is not supported. @throws ExecutionException if an error happens.
[ "This", "method", "creates", "an", "index", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/CommonsMetadataEngine.java#L206-L230
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java
ClassUseMapper.mapTypeParameters
private <T extends Element> void mapTypeParameters(final Map<TypeElement, List<T>> map, Element element, final T holder) { """ Map the TypeElements to the members that use them as type parameters. @param map the map the insert the information into. @param element the te whose type parameters are be...
java
private <T extends Element> void mapTypeParameters(final Map<TypeElement, List<T>> map, Element element, final T holder) { SimpleElementVisitor9<Void, Void> elementVisitor = new SimpleElementVisitor9<Void, Void>() { private void addParameters(TypeParameterElemen...
[ "private", "<", "T", "extends", "Element", ">", "void", "mapTypeParameters", "(", "final", "Map", "<", "TypeElement", ",", "List", "<", "T", ">", ">", "map", ",", "Element", "element", ",", "final", "T", "holder", ")", "{", "SimpleElementVisitor9", "<", ...
Map the TypeElements to the members that use them as type parameters. @param map the map the insert the information into. @param element the te whose type parameters are being checked. @param holder the holder that owns the type parameters.
[ "Map", "the", "TypeElements", "to", "the", "members", "that", "use", "them", "as", "type", "parameters", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java#L477-L518
gilberto-torrezan/gwt-views
src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java
URLToken.getParameterAsInt
public int getParameterAsInt(String name, int defaultValue) { """ Gets an integer parameter extracted from the History token. For example, if the token is: <pre>{@code tokenId&param1=1 }</pre>the call to <code>getParameterAsInt("param1", 0)</code> will return <code>1</code>. @param name The name of the paramet...
java
public int getParameterAsInt(String name, int defaultValue){ String value = parameters.get(name); if (value == null || value.isEmpty()){ return defaultValue; } try { return Integer.parseInt(value); } catch (Exception e) { return defaultValue; } }
[ "public", "int", "getParameterAsInt", "(", "String", "name", ",", "int", "defaultValue", ")", "{", "String", "value", "=", "parameters", ".", "get", "(", "name", ")", ";", "if", "(", "value", "==", "null", "||", "value", ".", "isEmpty", "(", ")", ")", ...
Gets an integer parameter extracted from the History token. For example, if the token is: <pre>{@code tokenId&param1=1 }</pre>the call to <code>getParameterAsInt("param1", 0)</code> will return <code>1</code>. @param name The name of the parameter @param defaultValue The value to be returned when the parameter is <cod...
[ "Gets", "an", "integer", "parameter", "extracted", "from", "the", "History", "token", ".", "For", "example", "if", "the", "token", "is", ":", "<pre", ">", "{", "@code", "tokenId&param1", "=", "1", "}", "<", "/", "pre", ">", "the", "call", "to", "<code"...
train
https://github.com/gilberto-torrezan/gwt-views/blob/c6511435d14b5aa93a722b0e861230d0ae2159e5/src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java#L218-L228