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
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.deleteDataLakeStoreAccountAsync
public Observable<Void> deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { """ Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that conta...
java
public Observable<Void> deleteDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { return deleteDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1<ServiceResponse<Void>, Void>() { ...
[ "public", "Observable", "<", "Void", ">", "deleteDataLakeStoreAccountAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "dataLakeStoreAccountName", ")", "{", "return", "deleteDataLakeStoreAccountWithServiceResponseAsync", "(", "resourceGr...
Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account...
[ "Updates", "the", "Data", "Lake", "Analytics", "account", "specified", "to", "remove", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1066-L1073
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/internal/UploadCallable.java
UploadCallable.initiateMultipartUpload
private String initiateMultipartUpload(PutObjectRequest origReq, boolean isUsingEncryption) { """ Initiates a multipart upload and returns the upload id @param isUsingEncryption """ InitiateMultipartUploadRequest req = null; if (isUsingEncryption && origReq instanceof EncryptedPutObjectReques...
java
private String initiateMultipartUpload(PutObjectRequest origReq, boolean isUsingEncryption) { InitiateMultipartUploadRequest req = null; if (isUsingEncryption && origReq instanceof EncryptedPutObjectRequest) { req = new EncryptedInitiateMultipartUploadRequest( origReq.ge...
[ "private", "String", "initiateMultipartUpload", "(", "PutObjectRequest", "origReq", ",", "boolean", "isUsingEncryption", ")", "{", "InitiateMultipartUploadRequest", "req", "=", "null", ";", "if", "(", "isUsingEncryption", "&&", "origReq", "instanceof", "EncryptedPutObject...
Initiates a multipart upload and returns the upload id @param isUsingEncryption
[ "Initiates", "a", "multipart", "upload", "and", "returns", "the", "upload", "id" ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/internal/UploadCallable.java#L331-L362
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java
HttpConversionUtil.parseStatus
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception { """ Apply HTTP/2 rules while translating status code to {@link HttpResponseStatus} @param status The status from an HTTP/2 frame @return The HTTP/1.x status @throws Http2Exception If there is a problem translating from H...
java
public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception { HttpResponseStatus result; try { result = parseLine(status); if (result == HttpResponseStatus.SWITCHING_PROTOCOLS) { throw connectionError(PROTOCOL_ERROR, "Invalid HTTP/2 sta...
[ "public", "static", "HttpResponseStatus", "parseStatus", "(", "CharSequence", "status", ")", "throws", "Http2Exception", "{", "HttpResponseStatus", "result", ";", "try", "{", "result", "=", "parseLine", "(", "status", ")", ";", "if", "(", "result", "==", "HttpRe...
Apply HTTP/2 rules while translating status code to {@link HttpResponseStatus} @param status The status from an HTTP/2 frame @return The HTTP/1.x status @throws Http2Exception If there is a problem translating from HTTP/2 to HTTP/1.x
[ "Apply", "HTTP", "/", "2", "rules", "while", "translating", "status", "code", "to", "{", "@link", "HttpResponseStatus", "}" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java#L184-L198
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAWebhook.java
CMAWebhook.addHeader
public CMAWebhook addHeader(String key, String value) { """ Adds a custom http header to the call done by this webhook. @param key HTTP header key to be used (aka 'X-My-Header-Name') @param value HTTP header value to be used (aka 'this-is-my-name') @return this webhook for chaining. """ if (this.hea...
java
public CMAWebhook addHeader(String key, String value) { if (this.headers == null) { this.headers = new ArrayList<CMAWebhookHeader>(); } this.headers.add(new CMAWebhookHeader(key, value)); return this; }
[ "public", "CMAWebhook", "addHeader", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "this", ".", "headers", "==", "null", ")", "{", "this", ".", "headers", "=", "new", "ArrayList", "<", "CMAWebhookHeader", ">", "(", ")", ";", "}", ...
Adds a custom http header to the call done by this webhook. @param key HTTP header key to be used (aka 'X-My-Header-Name') @param value HTTP header value to be used (aka 'this-is-my-name') @return this webhook for chaining.
[ "Adds", "a", "custom", "http", "header", "to", "the", "call", "done", "by", "this", "webhook", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAWebhook.java#L115-L122
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/FieldsInner.java
FieldsInner.listByTypeAsync
public Observable<List<TypeFieldInner>> listByTypeAsync(String resourceGroupName, String automationAccountName, String moduleName, String typeName) { """ Retrieve a list of fields of a given type identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName T...
java
public Observable<List<TypeFieldInner>> listByTypeAsync(String resourceGroupName, String automationAccountName, String moduleName, String typeName) { return listByTypeWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName, typeName).map(new Func1<ServiceResponse<List<TypeFieldInner>>, Lis...
[ "public", "Observable", "<", "List", "<", "TypeFieldInner", ">", ">", "listByTypeAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "moduleName", ",", "String", "typeName", ")", "{", "return", "listByTypeWithServiceRespo...
Retrieve a list of fields of a given type identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName The name of module. @param typeName The name of type. @throws IllegalArgumentException thrown if parameters f...
[ "Retrieve", "a", "list", "of", "fields", "of", "a", "given", "type", "identified", "by", "module", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/FieldsInner.java#L102-L109
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/query/SqlQuery.java
SqlQuery.namedQuery
public static @NotNull SqlQuery namedQuery(@NotNull @SQL String sql, @NotNull Object bean) { """ Constructs a query with named arguments, using the properties/fields of given bean for resolving arguments. @see #namedQuery(String, VariableResolver) @see VariableResolver#forBean(Object) """ return na...
java
public static @NotNull SqlQuery namedQuery(@NotNull @SQL String sql, @NotNull Object bean) { return namedQuery(sql, VariableResolver.forBean(bean)); }
[ "public", "static", "@", "NotNull", "SqlQuery", "namedQuery", "(", "@", "NotNull", "@", "SQL", "String", "sql", ",", "@", "NotNull", "Object", "bean", ")", "{", "return", "namedQuery", "(", "sql", ",", "VariableResolver", ".", "forBean", "(", "bean", ")", ...
Constructs a query with named arguments, using the properties/fields of given bean for resolving arguments. @see #namedQuery(String, VariableResolver) @see VariableResolver#forBean(Object)
[ "Constructs", "a", "query", "with", "named", "arguments", "using", "the", "properties", "/", "fields", "of", "given", "bean", "for", "resolving", "arguments", "." ]
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/query/SqlQuery.java#L91-L93
tipsy/javalin
src/main/java/io/javalin/apibuilder/ApiBuilder.java
ApiBuilder.ws
public static void ws(@NotNull String path, @NotNull Consumer<WsHandler> ws, @NotNull Set<Role> permittedRoles) { """ Adds a WebSocket handler with the given roles for the specified path. The method can only be called inside a {@link Javalin#routes(EndpointGroup)}. @see <a href="https://javalin.io/documentatio...
java
public static void ws(@NotNull String path, @NotNull Consumer<WsHandler> ws, @NotNull Set<Role> permittedRoles) { staticInstance().ws(prefixPath(path), ws, permittedRoles); }
[ "public", "static", "void", "ws", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "WsHandler", ">", "ws", ",", "@", "NotNull", "Set", "<", "Role", ">", "permittedRoles", ")", "{", "staticInstance", "(", ")", ".", "ws", "(",...
Adds a WebSocket handler with the given roles for the specified path. The method can only be called inside a {@link Javalin#routes(EndpointGroup)}. @see <a href="https://javalin.io/documentation#websockets">WebSockets in docs</a>
[ "Adds", "a", "WebSocket", "handler", "with", "the", "given", "roles", "for", "the", "specified", "path", ".", "The", "method", "can", "only", "be", "called", "inside", "a", "{", "@link", "Javalin#routes", "(", "EndpointGroup", ")", "}", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/apibuilder/ApiBuilder.java#L384-L386
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/libcore/net/url/UrlUtils.java
UrlUtils.findFirstOf
public static int findFirstOf(String string, String chars, int start, int end) { """ Returns the index of the first char of {@code chars} in {@code string} bounded between {@code start} and {@code end}. This returns {@code end} if none of the characters exist in the requested range. """ for (int i = ...
java
public static int findFirstOf(String string, String chars, int start, int end) { for (int i = start; i < end; i++) { char c = string.charAt(i); if (chars.indexOf(c) != -1) { return i; } } return end; }
[ "public", "static", "int", "findFirstOf", "(", "String", "string", ",", "String", "chars", ",", "int", "start", ",", "int", "end", ")", "{", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "i", "++", ")", "{", "char", "c", "=", ...
Returns the index of the first char of {@code chars} in {@code string} bounded between {@code start} and {@code end}. This returns {@code end} if none of the characters exist in the requested range.
[ "Returns", "the", "index", "of", "the", "first", "char", "of", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/net/url/UrlUtils.java#L133-L141
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasDocument.java
BaasDocument.getArray
public JsonArray getArray(String name, JsonArray otherwise) { """ Returns the value mapped to <code>name</code> as a {@link com.baasbox.android.json.JsonArray} or <code>otherwise</code> if the mapping is absent. @param name a non <code>null</code> key @param otherwise a default value @return the value m...
java
public JsonArray getArray(String name, JsonArray otherwise) { return data.getArray(name, otherwise); }
[ "public", "JsonArray", "getArray", "(", "String", "name", ",", "JsonArray", "otherwise", ")", "{", "return", "data", ".", "getArray", "(", "name", ",", "otherwise", ")", ";", "}" ]
Returns the value mapped to <code>name</code> as a {@link com.baasbox.android.json.JsonArray} or <code>otherwise</code> if the mapping is absent. @param name a non <code>null</code> key @param otherwise a default value @return the value mapped to <code>name</code> or <code>otherwise</code>
[ "Returns", "the", "value", "mapped", "to", "<code", ">", "name<", "/", "code", ">", "as", "a", "{", "@link", "com", ".", "baasbox", ".", "android", ".", "json", ".", "JsonArray", "}", "or", "<code", ">", "otherwise<", "/", "code", ">", "if", "the", ...
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasDocument.java#L773-L775
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java
SipServletRequestImpl.addInfoForRoutingBackToContainer
private void addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo, String applicationSessionId, String applicationName) throws ParseException, SipException { """ Add a route header to route back to the container @param applicationName the application name that was chosen by the AR to route the req...
java
private void addInfoForRoutingBackToContainer(SipApplicationRouterInfo routerInfo, String applicationSessionId, String applicationName) throws ParseException, SipException { final Request request = (Request) super.message; final javax.sip.address.SipURI sipURI = JainSipUtils.createRecordRouteURI( sipFactoryImpl...
[ "private", "void", "addInfoForRoutingBackToContainer", "(", "SipApplicationRouterInfo", "routerInfo", ",", "String", "applicationSessionId", ",", "String", "applicationName", ")", "throws", "ParseException", ",", "SipException", "{", "final", "Request", "request", "=", "(...
Add a route header to route back to the container @param applicationName the application name that was chosen by the AR to route the request @throws ParseException @throws SipException @throws NullPointerException
[ "Add", "a", "route", "header", "to", "route", "back", "to", "the", "container" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/SipServletRequestImpl.java#L1918-L1945
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.isAllowedTo
public boolean isAllowedTo(String subjectid, String resourcePath, String httpMethod) { """ Checks if a subject is allowed to call method X on resource Y. @param subjectid subject id @param resourcePath resource path or object type @param httpMethod HTTP method name @return true if allowed """ if (StringU...
java
public boolean isAllowedTo(String subjectid, String resourcePath, String httpMethod) { if (StringUtils.isBlank(subjectid) || StringUtils.isBlank(resourcePath) || StringUtils.isBlank(httpMethod)) { return false; } resourcePath = Utils.urlEncode(resourcePath); String url = Utils.formatMessage("_permissions/{0}...
[ "public", "boolean", "isAllowedTo", "(", "String", "subjectid", ",", "String", "resourcePath", ",", "String", "httpMethod", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "subjectid", ")", "||", "StringUtils", ".", "isBlank", "(", "resourcePath", ")"...
Checks if a subject is allowed to call method X on resource Y. @param subjectid subject id @param resourcePath resource path or object type @param httpMethod HTTP method name @return true if allowed
[ "Checks", "if", "a", "subject", "is", "allowed", "to", "call", "method", "X", "on", "resource", "Y", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1491-L1499
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java
WatcherUtils.hasExtension
public static boolean hasExtension(File file, String... extensions) { """ Checks whether the given file has one of the given extension. @param file the file @param extensions the extensions @return {@literal true} if the file has one of the given extension, {@literal false} otherwise """ Str...
java
public static boolean hasExtension(File file, String... extensions) { String extension = FilenameUtils.getExtension(file.getName()); for (String s : extensions) { if (extension.equalsIgnoreCase(s) || ("." + extension).equalsIgnoreCase(s)) { return true; } ...
[ "public", "static", "boolean", "hasExtension", "(", "File", "file", ",", "String", "...", "extensions", ")", "{", "String", "extension", "=", "FilenameUtils", ".", "getExtension", "(", "file", ".", "getName", "(", ")", ")", ";", "for", "(", "String", "s", ...
Checks whether the given file has one of the given extension. @param file the file @param extensions the extensions @return {@literal true} if the file has one of the given extension, {@literal false} otherwise
[ "Checks", "whether", "the", "given", "file", "has", "one", "of", "the", "given", "extension", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java#L159-L167
Azure/azure-sdk-for-java
loganalytics/data-plane/src/main/java/com/microsoft/azure/loganalytics/implementation/LogAnalyticsDataClientImpl.java
LogAnalyticsDataClientImpl.queryAsync
public ServiceFuture<QueryResults> queryAsync(String workspaceId, QueryBody body, final ServiceCallback<QueryResults> serviceCallback) { """ Execute an Analytics query. Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analyt...
java
public ServiceFuture<QueryResults> queryAsync(String workspaceId, QueryBody body, final ServiceCallback<QueryResults> serviceCallback) { return ServiceFuture.fromResponse(queryWithServiceResponseAsync(workspaceId, body), serviceCallback); }
[ "public", "ServiceFuture", "<", "QueryResults", ">", "queryAsync", "(", "String", "workspaceId", ",", "QueryBody", "body", ",", "final", "ServiceCallback", "<", "QueryResults", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", "fromResponse", "(", ...
Execute an Analytics query. Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. @param body The Analytics q...
[ "Execute", "an", "Analytics", "query", ".", "Executes", "an", "Analytics", "query", "for", "data", ".", "[", "Here", "]", "(", "https", ":", "//", "dev", ".", "loganalytics", ".", "io", "/", "documentation", "/", "Using", "-", "the", "-", "API", ")", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/loganalytics/data-plane/src/main/java/com/microsoft/azure/loganalytics/implementation/LogAnalyticsDataClientImpl.java#L209-L211
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/send/ComQuery.java
ComQuery.sendMultiDirect
public static void sendMultiDirect(final PacketOutputStream pos, List<byte[]> sqlBytes) throws IOException { """ Send directly to socket the sql data. @param pos output stream @param sqlBytes the query in UTF-8 bytes @throws IOException if connection error occur """ pos.startPacket(0); ...
java
public static void sendMultiDirect(final PacketOutputStream pos, List<byte[]> sqlBytes) throws IOException { pos.startPacket(0); pos.write(Packet.COM_QUERY); for (byte[] bytes : sqlBytes) { pos.write(bytes); } pos.flush(); }
[ "public", "static", "void", "sendMultiDirect", "(", "final", "PacketOutputStream", "pos", ",", "List", "<", "byte", "[", "]", ">", "sqlBytes", ")", "throws", "IOException", "{", "pos", ".", "startPacket", "(", "0", ")", ";", "pos", ".", "write", "(", "Pa...
Send directly to socket the sql data. @param pos output stream @param sqlBytes the query in UTF-8 bytes @throws IOException if connection error occur
[ "Send", "directly", "to", "socket", "the", "sql", "data", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/send/ComQuery.java#L331-L339
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormatter.java
DateTimeFormatter.parseMillis
public long parseMillis(String text) { """ Parses a datetime from the given text, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. <p> The parse will use the ISO chronology, and the default time zone. If the text contains a time zone string then that will be taken into account. @p...
java
public long parseMillis(String text) { InternalParser parser = requireParser(); Chronology chrono = selectChronology(iChrono); DateTimeParserBucket bucket = new DateTimeParserBucket(0, chrono, iLocale, iPivotYear, iDefaultYear); return bucket.doParseMillis(parser, text); }
[ "public", "long", "parseMillis", "(", "String", "text", ")", "{", "InternalParser", "parser", "=", "requireParser", "(", ")", ";", "Chronology", "chrono", "=", "selectChronology", "(", "iChrono", ")", ";", "DateTimeParserBucket", "bucket", "=", "new", "DateTimeP...
Parses a datetime from the given text, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. <p> The parse will use the ISO chronology, and the default time zone. If the text contains a time zone string then that will be taken into account. @param text the text to parse, not null @return parsed ...
[ "Parses", "a", "datetime", "from", "the", "given", "text", "returning", "the", "number", "of", "milliseconds", "since", "the", "epoch", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", ".", "<p", ">", "The", "parse", "will", "use", "the", "ISO",...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormatter.java#L822-L827
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java
BeanProvider.getContextualReference
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Set<Bean<?>> beans) { """ Internal helper method to resolve the right bean and resolve the contextual reference. @param type the type of the bean in question @param beanManager current bean-manager @param beans beans in questi...
java
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Set<Bean<?>> beans) { Bean<?> bean = beanManager.resolve(beans); //logWarningIfDependent(bean); CreationalContext<?> creationalContext = beanManager.createCreationalContext(bean); @SuppressWarnings...
[ "private", "static", "<", "T", ">", "T", "getContextualReference", "(", "Class", "<", "T", ">", "type", ",", "BeanManager", "beanManager", ",", "Set", "<", "Bean", "<", "?", ">", ">", "beans", ")", "{", "Bean", "<", "?", ">", "bean", "=", "beanManage...
Internal helper method to resolve the right bean and resolve the contextual reference. @param type the type of the bean in question @param beanManager current bean-manager @param beans beans in question @param <T> target type @return the contextual reference
[ "Internal", "helper", "method", "to", "resolve", "the", "right", "bean", "and", "resolve", "the", "contextual", "reference", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java#L411-L422
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Verifier.java
Verifier.runFor
public long runFor(final long duration, final TimeUnit unit) { """ Execute the verifier for the given duration. <p> This provides a simple way to execute the verifier for those applications which do not wish to manage threads directly. @param duration amount of time to execute @param unit units used t...
java
public long runFor(final long duration, final TimeUnit unit) { final long deadline = System.currentTimeMillis() + unit.toMillis(duration); final ExecutorService es = Executors.newSingleThreadExecutor(); final Future<Long> future = es.submit(this); try { while (System.currentTimeMillis() < deadline...
[ "public", "long", "runFor", "(", "final", "long", "duration", ",", "final", "TimeUnit", "unit", ")", "{", "final", "long", "deadline", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "unit", ".", "toMillis", "(", "duration", ")", ";", "final", "E...
Execute the verifier for the given duration. <p> This provides a simple way to execute the verifier for those applications which do not wish to manage threads directly. @param duration amount of time to execute @param unit units used to express the duration @return number of database rows successfully verified
[ "Execute", "the", "verifier", "for", "the", "given", "duration", "." ]
train
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Verifier.java#L166-L187
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/MiniMax.java
MiniMax.updateEntry
protected static void updateEntry(MatrixParadigm mat, DBIDArrayMIter prots, Int2ObjectOpenHashMap<ModifiableDBIDs> clusters, DistanceQuery<?> dq, int x, int y) { """ Update entry at x,y for distance matrix distances @param mat distance matrix @param prots calculated prototypes @param clusters the clusters @p...
java
protected static void updateEntry(MatrixParadigm mat, DBIDArrayMIter prots, Int2ObjectOpenHashMap<ModifiableDBIDs> clusters, DistanceQuery<?> dq, int x, int y) { assert (y < x); final DBIDArrayIter ix = mat.ix, iy = mat.iy; final double[] distances = mat.matrix; ModifiableDBIDs cx = clusters.get(x), cy ...
[ "protected", "static", "void", "updateEntry", "(", "MatrixParadigm", "mat", ",", "DBIDArrayMIter", "prots", ",", "Int2ObjectOpenHashMap", "<", "ModifiableDBIDs", ">", "clusters", ",", "DistanceQuery", "<", "?", ">", "dq", ",", "int", "x", ",", "int", "y", ")",...
Update entry at x,y for distance matrix distances @param mat distance matrix @param prots calculated prototypes @param clusters the clusters @param dq distance query on the data set @param x index of cluster, {@code x > y} @param y index of cluster, {@code y < x}
[ "Update", "entry", "at", "x", "y", "for", "distance", "matrix", "distances" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/MiniMax.java#L273-L302
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/Sources.java
Sources.asString
public static String asString(Class<?> contextClass, String resourceName) throws IOException { """ Returns the given source as a {@link String}. @param contextClass @param resourceName @return @throws IOException """ Closer closer = Closer.create(); try { return CharStreams.toString(closer.registe...
java
public static String asString(Class<?> contextClass, String resourceName) throws IOException { Closer closer = Closer.create(); try { return CharStreams.toString(closer.register(asCharSource(contextClass, resourceName).openStream())); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer....
[ "public", "static", "String", "asString", "(", "Class", "<", "?", ">", "contextClass", ",", "String", "resourceName", ")", "throws", "IOException", "{", "Closer", "closer", "=", "Closer", ".", "create", "(", ")", ";", "try", "{", "return", "CharStreams", "...
Returns the given source as a {@link String}. @param contextClass @param resourceName @return @throws IOException
[ "Returns", "the", "given", "source", "as", "a", "{", "@link", "String", "}", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/Sources.java#L64-L73
revapi/revapi
revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java
CheckBase.visitClass
@Override public final void visitClass(@Nullable JavaTypeElement oldType, @Nullable JavaTypeElement newType) { """ Please override the {@link #doVisitClass(JavaTypeElement, JavaTypeElement)} @see Check#visitClass(JavaTypeElement, JavaTypeElement) """ depth++; doVisitClass(oldType, newTy...
java
@Override public final void visitClass(@Nullable JavaTypeElement oldType, @Nullable JavaTypeElement newType) { depth++; doVisitClass(oldType, newType); }
[ "@", "Override", "public", "final", "void", "visitClass", "(", "@", "Nullable", "JavaTypeElement", "oldType", ",", "@", "Nullable", "JavaTypeElement", "newType", ")", "{", "depth", "++", ";", "doVisitClass", "(", "oldType", ",", "newType", ")", ";", "}" ]
Please override the {@link #doVisitClass(JavaTypeElement, JavaTypeElement)} @see Check#visitClass(JavaTypeElement, JavaTypeElement)
[ "Please", "override", "the", "{", "@link", "#doVisitClass", "(", "JavaTypeElement", "JavaTypeElement", ")", "}" ]
train
https://github.com/revapi/revapi/blob/e070b136d977441ab96fdce067a13e7e0423295b/revapi-java-spi/src/main/java/org/revapi/java/spi/CheckBase.java#L254-L258
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/parsing/ParserUtil.java
ParserUtil.parseHeaders
public static String parseHeaders(String commandLine, final CommandLineParser.CallbackHandler handler, CommandContext ctx) throws CommandFormatException { """ Returns the string which was actually parsed with all the substitutions performed """ if (commandLine == null) { return null; ...
java
public static String parseHeaders(String commandLine, final CommandLineParser.CallbackHandler handler, CommandContext ctx) throws CommandFormatException { if (commandLine == null) { return null; } SubstitutedLine sl = parseHeadersLine(commandLine, handler, ctx); return sl == ...
[ "public", "static", "String", "parseHeaders", "(", "String", "commandLine", ",", "final", "CommandLineParser", ".", "CallbackHandler", "handler", ",", "CommandContext", "ctx", ")", "throws", "CommandFormatException", "{", "if", "(", "commandLine", "==", "null", ")",...
Returns the string which was actually parsed with all the substitutions performed
[ "Returns", "the", "string", "which", "was", "actually", "parsed", "with", "all", "the", "substitutions", "performed" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/parsing/ParserUtil.java#L147-L153
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedUniqueIDGeneratorFactory.java
SynchronizedUniqueIDGeneratorFactory.generatorFor
public static synchronized IDGenerator generatorFor(SynchronizedGeneratorIdentity synchronizedGeneratorIdentity, Mode mode) throws IOException { """ Get the synchronized ID generator instance. @param synchronizedGeneratorIdentity An instance of...
java
public static synchronized IDGenerator generatorFor(SynchronizedGeneratorIdentity synchronizedGeneratorIdentity, Mode mode) throws IOException { String instanceKey = synchronizedGeneratorIdentity.getZNode(); if (!instances.containsKey(...
[ "public", "static", "synchronized", "IDGenerator", "generatorFor", "(", "SynchronizedGeneratorIdentity", "synchronizedGeneratorIdentity", ",", "Mode", "mode", ")", "throws", "IOException", "{", "String", "instanceKey", "=", "synchronizedGeneratorIdentity", ".", "getZNode", ...
Get the synchronized ID generator instance. @param synchronizedGeneratorIdentity An instance of {@link SynchronizedGeneratorIdentity} to (re)use for acquiring the generator ID. @param mode Generator mode. @return An instance of this class. @throws IOException Thrown when something went wrong t...
[ "Get", "the", "synchronized", "ID", "generator", "instance", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedUniqueIDGeneratorFactory.java#L78-L88
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toQueryColumn
public static QueryColumn toQueryColumn(Object o) throws PageException { """ converts a object to a QueryColumn, if possible @param o @return @throws PageException """ if (o instanceof QueryColumn) return (QueryColumn) o; throw new CasterException(o, "querycolumn"); }
java
public static QueryColumn toQueryColumn(Object o) throws PageException { if (o instanceof QueryColumn) return (QueryColumn) o; throw new CasterException(o, "querycolumn"); }
[ "public", "static", "QueryColumn", "toQueryColumn", "(", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "QueryColumn", ")", "return", "(", "QueryColumn", ")", "o", ";", "throw", "new", "CasterException", "(", "o", ",", "\"q...
converts a object to a QueryColumn, if possible @param o @return @throws PageException
[ "converts", "a", "object", "to", "a", "QueryColumn", "if", "possible" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L2985-L2988
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/AzureFirewallsInner.java
AzureFirewallsInner.getByResourceGroupAsync
public Observable<AzureFirewallInner> getByResourceGroupAsync(String resourceGroupName, String azureFirewallName) { """ Gets the specified Azure Firewall. @param resourceGroupName The name of the resource group. @param azureFirewallName The name of the Azure Firewall. @throws IllegalArgumentException thrown i...
java
public Observable<AzureFirewallInner> getByResourceGroupAsync(String resourceGroupName, String azureFirewallName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1<ServiceResponse<AzureFirewallInner>, AzureFirewallInner>() { @Override ...
[ "public", "Observable", "<", "AzureFirewallInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "azureFirewallName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "azureFirewallName", ")"...
Gets the specified Azure Firewall. @param resourceGroupName The name of the resource group. @param azureFirewallName The name of the Azure Firewall. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the AzureFirewallInner object
[ "Gets", "the", "specified", "Azure", "Firewall", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/AzureFirewallsInner.java#L291-L298
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/Pipe.java
Pipe.designPipe
public void designPipe( double[][] diameters, double tau, double g, double maxd, double c, StringBuilder strWarnings ) { """ Calculate the dimension of the pipes. <p> It switch between several section geometry. </p> @param diameters matrix with the commercial diameters. @param tau tangential stress at...
java
public void designPipe( double[][] diameters, double tau, double g, double maxd, double c, StringBuilder strWarnings ) { switch( this.pipeSectionType ) { case 1: designCircularPipe(diameters, tau, g, maxd, strWarnings); break; case 2: designRectangularPipe(ta...
[ "public", "void", "designPipe", "(", "double", "[", "]", "[", "]", "diameters", ",", "double", "tau", ",", "double", "g", ",", "double", "maxd", ",", "double", "c", ",", "StringBuilder", "strWarnings", ")", "{", "switch", "(", "this", ".", "pipeSectionTy...
Calculate the dimension of the pipes. <p> It switch between several section geometry. </p> @param diameters matrix with the commercial diameters. @param tau tangential stress at the bottom of the pipe.. @param g fill degree. @param maxd maximum diameter. @param c is a geometric expression b/h where h is the height a...
[ "Calculate", "the", "dimension", "of", "the", "pipes", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/Pipe.java#L608-L624
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.getText
public static String getText(Path self, String charset) throws IOException { """ Read the content of the Path using the specified encoding and return it as a String. @param self the file whose content we want to read @param charset the charset used to read the content of the file @return a String containi...
java
public static String getText(Path self, String charset) throws IOException { return IOGroovyMethods.getText(newReader(self, charset)); }
[ "public", "static", "String", "getText", "(", "Path", "self", ",", "String", "charset", ")", "throws", "IOException", "{", "return", "IOGroovyMethods", ".", "getText", "(", "newReader", "(", "self", ",", "charset", ")", ")", ";", "}" ]
Read the content of the Path using the specified encoding and return it as a String. @param self the file whose content we want to read @param charset the charset used to read the content of the file @return a String containing the content of the file @throws java.io.IOException if an IOException occurs. @since 2.3...
[ "Read", "the", "content", "of", "the", "Path", "using", "the", "specified", "encoding", "and", "return", "it", "as", "a", "String", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L380-L382
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.unbox
public static float[] unbox(final Float[] a, final float valueForNull) { """ <p> Converts an array of object Floats to primitives handling {@code null}. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code Float} array, may be {@code null} @param valueForNull...
java
public static float[] unbox(final Float[] a, final float valueForNull) { if (a == null) { return null; } return unbox(a, 0, a.length, valueForNull); }
[ "public", "static", "float", "[", "]", "unbox", "(", "final", "Float", "[", "]", "a", ",", "final", "float", "valueForNull", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "unbox", "(", "a", ",", "0", ",",...
<p> Converts an array of object Floats to primitives handling {@code null}. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code Float} array, may be {@code null} @param valueForNull the value to insert if {@code null} found @return a {@code float} array, {@code null} if nu...
[ "<p", ">", "Converts", "an", "array", "of", "object", "Floats", "to", "primitives", "handling", "{", "@code", "null", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L1137-L1143
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/OmidHBaseUtils.java
OmidHBaseUtils.getScanner
@Override public ResultScanner getScanner(String tableName, Scan scan) { """ Gets a scanner for a specific table @param tableName to get the scanner from @param scan for the specific table @param conf object to get a hold of an HBase table """ logger.debug("OMID Begin of getScanner(" + tableName + ", "...
java
@Override public ResultScanner getScanner(String tableName, Scan scan) { logger.debug("OMID Begin of getScanner(" + tableName + ", " + scan + ")"); TTable tTable = (TTable)getTable(tableName); ResultScanner resScanner = null; try { resScanner = tTable.getScanner(t1, scan); ...
[ "@", "Override", "public", "ResultScanner", "getScanner", "(", "String", "tableName", ",", "Scan", "scan", ")", "{", "logger", ".", "debug", "(", "\"OMID Begin of getScanner(\"", "+", "tableName", "+", "\", \"", "+", "scan", "+", "\")\"", ")", ";", "TTable", ...
Gets a scanner for a specific table @param tableName to get the scanner from @param scan for the specific table @param conf object to get a hold of an HBase table
[ "Gets", "a", "scanner", "for", "a", "specific", "table" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/OmidHBaseUtils.java#L276-L288
danieldk/dictomaton
src/main/java/eu/danieldk/dictomaton/collections/ImmutableStringShortMap.java
ImmutableStringShortMap.getOrElse
public short getOrElse(String key, short defaultValue) { """ Get the value associated with a key, returning a default value is it is not in the mapping. """ int hash = d_keys.number(key); if (hash == -1) return defaultValue; return d_values[hash - 1]; }
java
public short getOrElse(String key, short defaultValue) { int hash = d_keys.number(key); if (hash == -1) return defaultValue; return d_values[hash - 1]; }
[ "public", "short", "getOrElse", "(", "String", "key", ",", "short", "defaultValue", ")", "{", "int", "hash", "=", "d_keys", ".", "number", "(", "key", ")", ";", "if", "(", "hash", "==", "-", "1", ")", "return", "defaultValue", ";", "return", "d_values"...
Get the value associated with a key, returning a default value is it is not in the mapping.
[ "Get", "the", "value", "associated", "with", "a", "key", "returning", "a", "default", "value", "is", "it", "is", "not", "in", "the", "mapping", "." ]
train
https://github.com/danieldk/dictomaton/blob/c0a3ae2d407ebd88023ea2d0f02a4882b0492df0/src/main/java/eu/danieldk/dictomaton/collections/ImmutableStringShortMap.java#L261-L267
dlemmermann/PreferencesFX
preferencesfx/src/main/java/com/dlsc/preferencesfx/PreferencesFx.java
PreferencesFx.initializeCategoryViews
private void initializeCategoryViews() { """ Prepares the CategoryController by creating CategoryView / CategoryPresenter pairs from all Categories and loading them into the CategoryController. """ preferencesFxModel.getFlatCategoriesLst().forEach(category -> { CategoryView categoryView = new Catego...
java
private void initializeCategoryViews() { preferencesFxModel.getFlatCategoriesLst().forEach(category -> { CategoryView categoryView = new CategoryView(preferencesFxModel, category); CategoryPresenter categoryPresenter = new CategoryPresenter( preferencesFxModel, category, categoryView, breadCru...
[ "private", "void", "initializeCategoryViews", "(", ")", "{", "preferencesFxModel", ".", "getFlatCategoriesLst", "(", ")", ".", "forEach", "(", "category", "->", "{", "CategoryView", "categoryView", "=", "new", "CategoryView", "(", "preferencesFxModel", ",", "categor...
Prepares the CategoryController by creating CategoryView / CategoryPresenter pairs from all Categories and loading them into the CategoryController.
[ "Prepares", "the", "CategoryController", "by", "creating", "CategoryView", "/", "CategoryPresenter", "pairs", "from", "all", "Categories", "and", "loading", "them", "into", "the", "CategoryController", "." ]
train
https://github.com/dlemmermann/PreferencesFX/blob/e06a49663ec949c2f7eb56e6b5952c030ed42d33/preferencesfx/src/main/java/com/dlsc/preferencesfx/PreferencesFx.java#L115-L123
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/cookie/DefaultCookie.java
DefaultCookie.validateValue
@Deprecated protected String validateValue(String name, String value) { """ Validate a cookie attribute value, throws a {@link IllegalArgumentException} otherwise. Only intended to be used by {@link io.netty.handler.codec.http.DefaultCookie}. @param name attribute name @param value attribute value @return ...
java
@Deprecated protected String validateValue(String name, String value) { return validateAttributeValue(name, value); }
[ "@", "Deprecated", "protected", "String", "validateValue", "(", "String", "name", ",", "String", "value", ")", "{", "return", "validateAttributeValue", "(", "name", ",", "value", ")", ";", "}" ]
Validate a cookie attribute value, throws a {@link IllegalArgumentException} otherwise. Only intended to be used by {@link io.netty.handler.codec.http.DefaultCookie}. @param name attribute name @param value attribute value @return the trimmed, validated attribute value @deprecated CookieUtil is package private, will be...
[ "Validate", "a", "cookie", "attribute", "value", "throws", "a", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/cookie/DefaultCookie.java#L205-L208
bbossgroups/bboss-elasticsearch
bboss-elasticsearch/src/main/java/org/frameworkset/elasticsearch/AbstractElasticSearchIndexRequestBuilderFactory.java
AbstractElasticSearchIndexRequestBuilderFactory.getIndexName
protected String getIndexName(String indexPrefix, long timestamp) { """ Gets the name of the index to use for an index request @param indexPrefix Prefix of index name to use -- as configured on the sink @param timestamp timestamp (millis) to format / use @return index name of the form 'indexPrefix-formattedTi...
java
protected String getIndexName(String indexPrefix, long timestamp) { return new StringBuilder(indexPrefix).append('-') .append(fastDateFormat.format(timestamp)).toString(); }
[ "protected", "String", "getIndexName", "(", "String", "indexPrefix", ",", "long", "timestamp", ")", "{", "return", "new", "StringBuilder", "(", "indexPrefix", ")", ".", "append", "(", "'", "'", ")", ".", "append", "(", "fastDateFormat", ".", "format", "(", ...
Gets the name of the index to use for an index request @param indexPrefix Prefix of index name to use -- as configured on the sink @param timestamp timestamp (millis) to format / use @return index name of the form 'indexPrefix-formattedTimestamp'
[ "Gets", "the", "name", "of", "the", "index", "to", "use", "for", "an", "index", "request" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch/src/main/java/org/frameworkset/elasticsearch/AbstractElasticSearchIndexRequestBuilderFactory.java#L95-L98
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.beginGetBgpPeerStatus
public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { """ The GetBgpPeerStatus operation retrieves the status of all BGP peers. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual net...
java
public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); }
[ "public", "BgpPeerStatusListResultInner", "beginGetBgpPeerStatus", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "beginGetBgpPeerStatusWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName", ")", ...
The GetBgpPeerStatus operation retrieves the status of all BGP peers. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request...
[ "The", "GetBgpPeerStatus", "operation", "retrieves", "the", "status", "of", "all", "BGP", "peers", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2089-L2091
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java
LocalDateTime.plusMonths
public LocalDateTime plusMonths(long months) { """ Returns a copy of this {@code LocalDateTime} with the specified number of months added. <p> This method adds the specified amount to the months field in three steps: <ol> <li>Add the input months to the month-of-year field</li> <li>Check if the resulting date...
java
public LocalDateTime plusMonths(long months) { LocalDate newDate = date.plusMonths(months); return with(newDate, time); }
[ "public", "LocalDateTime", "plusMonths", "(", "long", "months", ")", "{", "LocalDate", "newDate", "=", "date", ".", "plusMonths", "(", "months", ")", ";", "return", "with", "(", "newDate", ",", "time", ")", ";", "}" ]
Returns a copy of this {@code LocalDateTime} with the specified number of months added. <p> This method adds the specified amount to the months field in three steps: <ol> <li>Add the input months to the month-of-year field</li> <li>Check if the resulting date would be invalid</li> <li>Adjust the day-of-month to the las...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "LocalDateTime", "}", "with", "the", "specified", "number", "of", "months", "added", ".", "<p", ">", "This", "method", "adds", "the", "specified", "amount", "to", "the", "months", "field", "in", "three", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java#L1239-L1242
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/liquibase/changes/FixInvitations.java
FixInvitations.isPanelUser
private boolean isPanelUser(JdbcConnection connection, Long panelId, String email) throws CustomChangeException { """ Returns whether user by email is a PanelUser or not @param connection connection @param panelId panel id @param email email @return whether user by email is a PanelUser or not @throws Custom...
java
private boolean isPanelUser(JdbcConnection connection, Long panelId, String email) throws CustomChangeException { try (PreparedStatement statement = connection.prepareStatement("SELECT id FROM PANELUSER WHERE panel_id = ? AND user_id = (SELECT id FROM USEREMAIL WHERE address = ?)")) { statement.setLong(1, pan...
[ "private", "boolean", "isPanelUser", "(", "JdbcConnection", "connection", ",", "Long", "panelId", ",", "String", "email", ")", "throws", "CustomChangeException", "{", "try", "(", "PreparedStatement", "statement", "=", "connection", ".", "prepareStatement", "(", "\"S...
Returns whether user by email is a PanelUser or not @param connection connection @param panelId panel id @param email email @return whether user by email is a PanelUser or not @throws CustomChangeException on error
[ "Returns", "whether", "user", "by", "email", "is", "a", "PanelUser", "or", "not" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/liquibase/changes/FixInvitations.java#L48-L59
aws/aws-sdk-java
aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/MetricFilterMatchRecord.java
MetricFilterMatchRecord.withExtractedValues
public MetricFilterMatchRecord withExtractedValues(java.util.Map<String, String> extractedValues) { """ <p> The values extracted from the event data by the filter. </p> @param extractedValues The values extracted from the event data by the filter. @return Returns a reference to this object so that method ca...
java
public MetricFilterMatchRecord withExtractedValues(java.util.Map<String, String> extractedValues) { setExtractedValues(extractedValues); return this; }
[ "public", "MetricFilterMatchRecord", "withExtractedValues", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "extractedValues", ")", "{", "setExtractedValues", "(", "extractedValues", ")", ";", "return", "this", ";", "}" ]
<p> The values extracted from the event data by the filter. </p> @param extractedValues The values extracted from the event data by the filter. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "values", "extracted", "from", "the", "event", "data", "by", "the", "filter", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/MetricFilterMatchRecord.java#L168-L171
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/PathHandler.java
PathHandler.addPrefixPath
public synchronized PathHandler addPrefixPath(final String path, final HttpHandler handler) { """ Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. <p> The match is done on a prefix bases, so registering /foo will also match /foo/bar. Though exact p...
java
public synchronized PathHandler addPrefixPath(final String path, final HttpHandler handler) { Handlers.handlerNotNull(handler); pathMatcher.addPrefixPath(path, handler); return this; }
[ "public", "synchronized", "PathHandler", "addPrefixPath", "(", "final", "String", "path", ",", "final", "HttpHandler", "handler", ")", "{", "Handlers", ".", "handlerNotNull", "(", "handler", ")", ";", "pathMatcher", ".", "addPrefixPath", "(", "path", ",", "handl...
Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. <p> The match is done on a prefix bases, so registering /foo will also match /foo/bar. Though exact path matches are taken into account before prefix path matches. So if an exact path match exists it's handl...
[ "Adds", "a", "path", "prefix", "and", "a", "handler", "for", "that", "path", ".", "If", "the", "path", "does", "not", "start", "with", "a", "/", "then", "one", "will", "be", "prepended", ".", "<p", ">", "The", "match", "is", "done", "on", "a", "pre...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/PathHandler.java#L127-L131
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/utils/Utility.java
Utility.pipeMagnitude
public static void pipeMagnitude( double[] magnitude, double[] whereDrain, IHMProgressMonitor pm ) { """ Calculate the magnitudo of the several drainage area. <p> It begin from the first state, where the magnitudo is setted to 1, and then it follow the path of the water until the outlet. </p> <p> During th...
java
public static void pipeMagnitude( double[] magnitude, double[] whereDrain, IHMProgressMonitor pm ) { int count = 0; /* whereDrain Contiene gli indici degli stati riceventi. */ /* magnitude Contiene la magnitude dei vari stati. */ int length = magnitude.length; /* Per ogni stat...
[ "public", "static", "void", "pipeMagnitude", "(", "double", "[", "]", "magnitude", ",", "double", "[", "]", "whereDrain", ",", "IHMProgressMonitor", "pm", ")", "{", "int", "count", "=", "0", ";", "/* whereDrain Contiene gli indici degli stati riceventi. */", "/* mag...
Calculate the magnitudo of the several drainage area. <p> It begin from the first state, where the magnitudo is setted to 1, and then it follow the path of the water until the outlet. </p> <p> During this process the magnitudo of each through areas is incremented of 1 units. This operation is done for every state, so ...
[ "Calculate", "the", "magnitudo", "of", "the", "several", "drainage", "area", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/utils/Utility.java#L265-L294
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageData.java
JSMessageData.ownership
private Object ownership(Object val, boolean forceShared) { """ this new instance, and it logically belongs in the locking scope of this.master. """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "ownership", new Object[] { val, Boolean.valueOf(forceS...
java
private Object ownership(Object val, boolean forceShared) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "ownership", new Object[] { val, Boolean.valueOf(forceShared) }); if (val instanceof JSMessageData) { ((JSMessageData) val).setParen...
[ "private", "Object", "ownership", "(", "Object", "val", ",", "boolean", "forceShared", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "JmfTr", ".", "entry", "(", "this", ",", ...
this new instance, and it logically belongs in the locking scope of this.master.
[ "this", "new", "instance", "and", "it", "logically", "belongs", "in", "the", "locking", "scope", "of", "this", ".", "master", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSMessageData.java#L418-L436
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.binomial
public static double binomial(int k, double p, int n) { """ Returns the probability of k of a specific number of tries n and probability p @param k @param p @param n @return """ if(k<0 || p<0 || n<1) { throw new IllegalArgumentException("All the parameters must be positive and n larg...
java
public static double binomial(int k, double p, int n) { if(k<0 || p<0 || n<1) { throw new IllegalArgumentException("All the parameters must be positive and n larger than 1."); } k = Math.min(k, n); /* //Slow and can't handle large numbers $...
[ "public", "static", "double", "binomial", "(", "int", "k", ",", "double", "p", ",", "int", "n", ")", "{", "if", "(", "k", "<", "0", "||", "p", "<", "0", "||", "n", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"All the para...
Returns the probability of k of a specific number of tries n and probability p @param k @param p @param n @return
[ "Returns", "the", "probability", "of", "k", "of", "a", "specific", "number", "of", "tries", "n", "and", "probability", "p" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L76-L96
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/scheduler/SchedulerProvider.java
SchedulerProvider.getScheduler
public synchronized ScheduledExecutorService getScheduler(final String purpose, boolean needDedicatedThread) { """ /* @param owner Object which will be using the scheduler (and shutting it down when the object is disposed) @param purpose short description of the purpose of the scheduler, will be set as the...
java
public synchronized ScheduledExecutorService getScheduler(final String purpose, boolean needDedicatedThread) { return needDedicatedThread ? new ManagedScheduledExecutorService(1, purpose, false) : sharedScheduler; }
[ "public", "synchronized", "ScheduledExecutorService", "getScheduler", "(", "final", "String", "purpose", ",", "boolean", "needDedicatedThread", ")", "{", "return", "needDedicatedThread", "?", "new", "ManagedScheduledExecutorService", "(", "1", ",", "purpose", ",", "fals...
/* @param owner Object which will be using the scheduler (and shutting it down when the object is disposed) @param purpose short description of the purpose of the scheduler, will be set as the thread name if a dedicated thread is used @param needDedicatedThread set this to true to guarantee the scheduler will hav...
[ "/", "*", "@param", "owner", "Object", "which", "will", "be", "using", "the", "scheduler", "(", "and", "shutting", "it", "down", "when", "the", "object", "is", "disposed", ")" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/scheduler/SchedulerProvider.java#L54-L56
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ActivationCodeGen.java
ActivationCodeGen.writeGetAs
private void writeGetAs(Definition def, Writer out, int indent) throws IOException { """ Output get activation spec method @param def definition @param out Writer @param indent space number @throws IOException ioException """ writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, i...
java
private void writeGetAs(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * Get activation spec class\n"); writeWithIndent(out, indent, " * @return Activation spec\n"); writeWithIndent(out, indent, " */\n"); ...
[ "private", "void", "writeGetAs", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeWithIndent", "(", "out", ",", "indent", ",", "\"/**\\n\"", ")", ";", "writeWithIndent", "(", "out", ",", "indent",...
Output get activation spec method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "get", "activation", "spec", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ActivationCodeGen.java#L136-L149
wildfly-swarm-archive/ARCHIVE-wildfly-swarm
logging/api/src/main/java/org/wildfly/swarm/logging/LoggingFraction.java
LoggingFraction.customFormatter
public LoggingFraction customFormatter(String name, String module, String className) { """ Add a CustomFormatter to this logger @param name the name of the formatter @param module the module that the logging handler depends on @param className the logging handler class to be used @return This fractio...
java
public LoggingFraction customFormatter(String name, String module, String className) { return customFormatter(name, module, className, null); }
[ "public", "LoggingFraction", "customFormatter", "(", "String", "name", ",", "String", "module", ",", "String", "className", ")", "{", "return", "customFormatter", "(", "name", ",", "module", ",", "className", ",", "null", ")", ";", "}" ]
Add a CustomFormatter to this logger @param name the name of the formatter @param module the module that the logging handler depends on @param className the logging handler class to be used @return This fraction.
[ "Add", "a", "CustomFormatter", "to", "this", "logger" ]
train
https://github.com/wildfly-swarm-archive/ARCHIVE-wildfly-swarm/blob/28ef71bcfa743a7267666e0ed2919c37b356c09b/logging/api/src/main/java/org/wildfly/swarm/logging/LoggingFraction.java#L140-L142
yavijava/yavijava
src/main/java/com/vmware/vim25/mox/VirtualMachineDeviceManager.java
VirtualMachineDeviceManager.createNetworkAdapter
public void createNetworkAdapter(VirtualNetworkAdapterType type, String networkName, String macAddress, boolean wakeOnLan, boolean startConnected) throws InvalidProperty, RuntimeFault, RemoteException, InterruptedException { """ Create a new virtual network adapter on the VM Your MAC address should start with 00:...
java
public void createNetworkAdapter(VirtualNetworkAdapterType type, String networkName, String macAddress, boolean wakeOnLan, boolean startConnected) throws InvalidProperty, RuntimeFault, RemoteException, InterruptedException { VirtualMachinePowerState powerState = vm.getRuntime().getPowerState(); String...
[ "public", "void", "createNetworkAdapter", "(", "VirtualNetworkAdapterType", "type", ",", "String", "networkName", ",", "String", "macAddress", ",", "boolean", "wakeOnLan", ",", "boolean", "startConnected", ")", "throws", "InvalidProperty", ",", "RuntimeFault", ",", "R...
Create a new virtual network adapter on the VM Your MAC address should start with 00:50:56
[ "Create", "a", "new", "virtual", "network", "adapter", "on", "the", "VM", "Your", "MAC", "address", "should", "start", "with", "00", ":", "50", ":", "56" ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mox/VirtualMachineDeviceManager.java#L449-L473
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/index/SecondaryIndex.java
SecondaryIndex.getIndexComparator
public static CellNameType getIndexComparator(CFMetaData baseMetadata, ColumnDefinition cdef) { """ Returns the index comparator for index backed by CFS, or null. Note: it would be cleaner to have this be a member method. However we need this when opening indexes sstables, but by then the CFS won't be fully in...
java
public static CellNameType getIndexComparator(CFMetaData baseMetadata, ColumnDefinition cdef) { switch (cdef.getIndexType()) { case KEYS: return new SimpleDenseCellNameType(keyComparator); case COMPOSITES: return CompositesIndex.getIndexCompara...
[ "public", "static", "CellNameType", "getIndexComparator", "(", "CFMetaData", "baseMetadata", ",", "ColumnDefinition", "cdef", ")", "{", "switch", "(", "cdef", ".", "getIndexType", "(", ")", ")", "{", "case", "KEYS", ":", "return", "new", "SimpleDenseCellNameType",...
Returns the index comparator for index backed by CFS, or null. Note: it would be cleaner to have this be a member method. However we need this when opening indexes sstables, but by then the CFS won't be fully initiated, so the SecondaryIndex object won't be accessible.
[ "Returns", "the", "index", "comparator", "for", "index", "backed", "by", "CFS", "or", "null", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/index/SecondaryIndex.java#L368-L380
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/DatanodeBlockInfo.java
DatanodeBlockInfo.detachFile
private void detachFile(int namespaceId, File file, Block b) throws IOException { """ Copy specified file into a temporary file. Then rename the temporary file to the original name. This will cause any hardlinks to the original file to be removed. The temporary files are created in the detachDir. The temporary ...
java
private void detachFile(int namespaceId, File file, Block b) throws IOException { File tmpFile = blockDataFile.volume.createDetachFile(namespaceId, b, file.getName()); try { IOUtils.copyBytes(new FileInputStream(file), new FileOutputStream(tmpFile), 16*1024,...
[ "private", "void", "detachFile", "(", "int", "namespaceId", ",", "File", "file", ",", "Block", "b", ")", "throws", "IOException", "{", "File", "tmpFile", "=", "blockDataFile", ".", "volume", ".", "createDetachFile", "(", "namespaceId", ",", "b", ",", "file",...
Copy specified file into a temporary file. Then rename the temporary file to the original name. This will cause any hardlinks to the original file to be removed. The temporary files are created in the detachDir. The temporary files will be recovered (especially on Windows) on datanode restart.
[ "Copy", "specified", "file", "into", "a", "temporary", "file", ".", "Then", "rename", "the", "temporary", "file", "to", "the", "original", "name", ".", "This", "will", "cause", "any", "hardlinks", "to", "the", "original", "file", "to", "be", "removed", "."...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DatanodeBlockInfo.java#L186-L206
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java
LSSerializerImpl.getPathWithoutEscapes
private static String getPathWithoutEscapes(String origPath) { """ Replaces all escape sequences in the given path with their literal characters. """ if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) { // Locate the escape characters StringTokenizer ...
java
private static String getPathWithoutEscapes(String origPath) { if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) { // Locate the escape characters StringTokenizer tokenizer = new StringTokenizer(origPath, "%"); StringBuffer result = new StringBuff...
[ "private", "static", "String", "getPathWithoutEscapes", "(", "String", "origPath", ")", "{", "if", "(", "origPath", "!=", "null", "&&", "origPath", ".", "length", "(", ")", "!=", "0", "&&", "origPath", ".", "indexOf", "(", "'", "'", ")", "!=", "-", "1"...
Replaces all escape sequences in the given path with their literal characters.
[ "Replaces", "all", "escape", "sequences", "in", "the", "given", "path", "with", "their", "literal", "characters", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1464-L1484
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithoutPath.java
PactDslRequestWithoutPath.headerFromProviderState
public PactDslRequestWithoutPath headerFromProviderState(String name, String expression, String example) { """ Adds a header that will have it's value injected from the provider state @param name Header Name @param expression Expression to be evaluated from the provider state @param example Example value to use...
java
public PactDslRequestWithoutPath headerFromProviderState(String name, String expression, String example) { requestGenerators.addGenerator(Category.HEADER, name, new ProviderStateGenerator(expression)); requestHeaders.put(name, Collections.singletonList(example)); return this; }
[ "public", "PactDslRequestWithoutPath", "headerFromProviderState", "(", "String", "name", ",", "String", "expression", ",", "String", "example", ")", "{", "requestGenerators", ".", "addGenerator", "(", "Category", ".", "HEADER", ",", "name", ",", "new", "ProviderStat...
Adds a header that will have it's value injected from the provider state @param name Header Name @param expression Expression to be evaluated from the provider state @param example Example value to use in the consumer test
[ "Adds", "a", "header", "that", "will", "have", "it", "s", "value", "injected", "from", "the", "provider", "state" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithoutPath.java#L296-L300
Stratio/cassandra-lucene-index
plugin/src/main/java/com/stratio/cassandra/lucene/common/JsonSerializer.java
JsonSerializer.fromString
public static <T> T fromString(String value, Class<T> valueType) throws IOException { """ Returns the object of the specified class represented by the specified JSON {@code String}. @param value the JSON {@code String} to be parsed @param valueType the class of the object to be parsed @param <T> the type of t...
java
public static <T> T fromString(String value, Class<T> valueType) throws IOException { return INSTANCE.mapper.readValue(value, valueType); }
[ "public", "static", "<", "T", ">", "T", "fromString", "(", "String", "value", ",", "Class", "<", "T", ">", "valueType", ")", "throws", "IOException", "{", "return", "INSTANCE", ".", "mapper", ".", "readValue", "(", "value", ",", "valueType", ")", ";", ...
Returns the object of the specified class represented by the specified JSON {@code String}. @param value the JSON {@code String} to be parsed @param valueType the class of the object to be parsed @param <T> the type of the object to be parsed @return an object of the specified class represented by {@code value} @throw...
[ "Returns", "the", "object", "of", "the", "specified", "class", "represented", "by", "the", "specified", "JSON", "{", "@code", "String", "}", "." ]
train
https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/plugin/src/main/java/com/stratio/cassandra/lucene/common/JsonSerializer.java#L69-L71
m-m-m/util
scanner/src/main/java/net/sf/mmm/util/scanner/base/CharSequenceScanner.java
CharSequenceScanner.appendSubstring
public void appendSubstring(StringBuilder appendable, int start, int end) { """ This method appends the {@link #substring(int, int) substring} specified by {@code start} and {@code end} to the given {@code buffer}. <br> This avoids the overhead of creating a new string and copying the char array. @param appen...
java
public void appendSubstring(StringBuilder appendable, int start, int end) { appendable.append(this.buffer, this.initialOffset + start, end - start); }
[ "public", "void", "appendSubstring", "(", "StringBuilder", "appendable", ",", "int", "start", ",", "int", "end", ")", "{", "appendable", ".", "append", "(", "this", ".", "buffer", ",", "this", ".", "initialOffset", "+", "start", ",", "end", "-", "start", ...
This method appends the {@link #substring(int, int) substring} specified by {@code start} and {@code end} to the given {@code buffer}. <br> This avoids the overhead of creating a new string and copying the char array. @param appendable is the buffer where to append the substring to. @param start the start index, inclu...
[ "This", "method", "appends", "the", "{", "@link", "#substring", "(", "int", "int", ")", "substring", "}", "specified", "by", "{", "@code", "start", "}", "and", "{", "@code", "end", "}", "to", "the", "given", "{", "@code", "buffer", "}", ".", "<br", "...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/scanner/src/main/java/net/sf/mmm/util/scanner/base/CharSequenceScanner.java#L161-L164
samskivert/samskivert
src/main/java/com/samskivert/util/Invoker.java
Invoker.didInvokeUnit
protected void didInvokeUnit (Unit unit, long start) { """ Called before we process an invoker unit. @param unit the unit about to be invoked. @param start a timestamp recorded immediately before invocation if {@link #PERF_TRACK} is enabled, 0L otherwise. """ // track some performance metrics ...
java
protected void didInvokeUnit (Unit unit, long start) { // track some performance metrics if (PERF_TRACK) { long duration = System.currentTimeMillis() - start; Object key = unit.getClass(); recordMetrics(key, duration); // report long runners ...
[ "protected", "void", "didInvokeUnit", "(", "Unit", "unit", ",", "long", "start", ")", "{", "// track some performance metrics", "if", "(", "PERF_TRACK", ")", "{", "long", "duration", "=", "System", ".", "currentTimeMillis", "(", ")", "-", "start", ";", "Object...
Called before we process an invoker unit. @param unit the unit about to be invoked. @param start a timestamp recorded immediately before invocation if {@link #PERF_TRACK} is enabled, 0L otherwise.
[ "Called", "before", "we", "process", "an", "invoker", "unit", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Invoker.java#L276-L300
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.updateDate
@Conditioned @Quand("Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\.|\\?]") @When("I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\.|\\?]") public void updateDate(String page, String elementName, String dateType, String dateOrKey, List<GherkinStepCondition> conditions) throws Tec...
java
@Conditioned @Quand("Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\.|\\?]") @When("I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\.|\\?]") public void updateDate(String page, String elementName, String dateType, String dateOrKey, List<GherkinStepCondition> conditions) throws Tec...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "When", "(", "\"I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "updateDate", "(", "String", "page", "...
Update a html input text with a date. @param page The concerned page of elementName @param elementName is target element @param dateOrKey Is the new date (date or date in context (after a save)) @param dateType 'future', 'future_strict', 'today' or 'any' @param conditions list of 'expected' values condition and 'actua...
[ "Update", "a", "html", "input", "text", "with", "a", "date", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L526-L539
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/client/util/ToolsClassFinder.java
ToolsClassFinder.createClassLoader
private static ClassLoader createClassLoader(File toolsJar) throws MalformedURLException { """ Create a classloader and respect a security manager if installed """ final URL urls[] = new URL[] {toolsJar.toURI().toURL() }; if (System.getSecurityManager() == null) { return new URLClas...
java
private static ClassLoader createClassLoader(File toolsJar) throws MalformedURLException { final URL urls[] = new URL[] {toolsJar.toURI().toURL() }; if (System.getSecurityManager() == null) { return new URLClassLoader(urls, getParentClassLoader()); } else { return AccessC...
[ "private", "static", "ClassLoader", "createClassLoader", "(", "File", "toolsJar", ")", "throws", "MalformedURLException", "{", "final", "URL", "urls", "[", "]", "=", "new", "URL", "[", "]", "{", "toolsJar", ".", "toURI", "(", ")", ".", "toURL", "(", ")", ...
Create a classloader and respect a security manager if installed
[ "Create", "a", "classloader", "and", "respect", "a", "security", "manager", "if", "installed" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/client/util/ToolsClassFinder.java#L99-L111
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java
MiniTemplator.setVariable
public void setVariable(String variableName, String variableValue) throws VariableNotDefinedException { """ Sets a template variable. <p> Convenience method for: <code>setVariable (variableName, variableValue, false)</code> @param variableName the name of the variable to be set. Case-insensitive. @param vari...
java
public void setVariable(String variableName, String variableValue) throws VariableNotDefinedException { setVariable(variableName, variableValue, false); }
[ "public", "void", "setVariable", "(", "String", "variableName", ",", "String", "variableValue", ")", "throws", "VariableNotDefinedException", "{", "setVariable", "(", "variableName", ",", "variableValue", ",", "false", ")", ";", "}" ]
Sets a template variable. <p> Convenience method for: <code>setVariable (variableName, variableValue, false)</code> @param variableName the name of the variable to be set. Case-insensitive. @param variableValue the new value of the variable. May be <code>null</code>. @throws VariableNotDefinedException when no variabl...
[ "Sets", "a", "template", "variable", ".", "<p", ">", "Convenience", "method", "for", ":", "<code", ">", "setVariable", "(", "variableName", "variableValue", "false", ")", "<", "/", "code", ">" ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L387-L389
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.errorReport
public static Report errorReport(String key, String message) { """ Return a report for a single error item @param key key @param message message @return report """ return buildReport().error(key, message).build(); }
java
public static Report errorReport(String key, String message) { return buildReport().error(key, message).build(); }
[ "public", "static", "Report", "errorReport", "(", "String", "key", ",", "String", "message", ")", "{", "return", "buildReport", "(", ")", ".", "error", "(", "key", ",", "message", ")", ".", "build", "(", ")", ";", "}" ]
Return a report for a single error item @param key key @param message message @return report
[ "Return", "a", "report", "for", "a", "single", "error", "item" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L41-L43
alkacon/opencms-core
src/org/opencms/acacia/shared/CmsEntity.java
CmsEntity.setAttributeValue
public void setAttributeValue(String attributeName, CmsEntity value) { """ Sets the given attribute value. Will remove all previous attribute values.<p> @param attributeName the attribute name @param value the attribute value """ // make sure there is no attribute value set removeAttrib...
java
public void setAttributeValue(String attributeName, CmsEntity value) { // make sure there is no attribute value set removeAttributeSilent(attributeName); addAttributeValue(attributeName, value); }
[ "public", "void", "setAttributeValue", "(", "String", "attributeName", ",", "CmsEntity", "value", ")", "{", "// make sure there is no attribute value set\r", "removeAttributeSilent", "(", "attributeName", ")", ";", "addAttributeValue", "(", "attributeName", ",", "value", ...
Sets the given attribute value. Will remove all previous attribute values.<p> @param attributeName the attribute name @param value the attribute value
[ "Sets", "the", "given", "attribute", "value", ".", "Will", "remove", "all", "previous", "attribute", "values", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsEntity.java#L583-L588
wisdom-framework/wisdom-orientdb
wisdom-orientdb-manager/src/main/java/org/wisdom/orientdb/conf/WOrientConf.java
WOrientConf.createFromApplicationConf
public static Collection<WOrientConf> createFromApplicationConf(Configuration config, String prefix) { """ Extract all WOrientConf configuration with the given prefix from the parent wisdom configuration. If the prefix is <code>"orientdb"</code> and the configuration is: <br/> <code> orientdb.default.url = "plo...
java
public static Collection<WOrientConf> createFromApplicationConf(Configuration config, String prefix) { Configuration orient = config.getConfiguration(prefix); if(orient == null){ return Collections.EMPTY_SET; } Set<String> subkeys = new HashSet<>(); for (String key...
[ "public", "static", "Collection", "<", "WOrientConf", ">", "createFromApplicationConf", "(", "Configuration", "config", ",", "String", "prefix", ")", "{", "Configuration", "orient", "=", "config", ".", "getConfiguration", "(", "prefix", ")", ";", "if", "(", "ori...
Extract all WOrientConf configuration with the given prefix from the parent wisdom configuration. If the prefix is <code>"orientdb"</code> and the configuration is: <br/> <code> orientdb.default.url = "plocal:/home/wisdom/db" orientdb.test.url = "plocal:/home/wisdom/test/db" </code> <p/> the sub configuration will be: ...
[ "Extract", "all", "WOrientConf", "configuration", "with", "the", "given", "prefix", "from", "the", "parent", "wisdom", "configuration", ".", "If", "the", "prefix", "is", "<code", ">", "orientdb", "<", "/", "code", ">", "and", "the", "configuration", "is", ":...
train
https://github.com/wisdom-framework/wisdom-orientdb/blob/fd172fc19f03ca151d81a4f9cf0ad38cb8411852/wisdom-orientdb-manager/src/main/java/org/wisdom/orientdb/conf/WOrientConf.java#L160-L180
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/DnsAddressDecoder.java
DnsAddressDecoder.decodeAddress
static InetAddress decodeAddress(DnsRecord record, String name, boolean decodeIdn) { """ Decodes an {@link InetAddress} from an A or AAAA {@link DnsRawRecord}. @param record the {@link DnsRecord}, most likely a {@link DnsRawRecord} @param name the host name of the decoded address @param decodeIdn whether to c...
java
static InetAddress decodeAddress(DnsRecord record, String name, boolean decodeIdn) { if (!(record instanceof DnsRawRecord)) { return null; } final ByteBuf content = ((ByteBufHolder) record).content(); final int contentLen = content.readableBytes(); if (contentLen != I...
[ "static", "InetAddress", "decodeAddress", "(", "DnsRecord", "record", ",", "String", "name", ",", "boolean", "decodeIdn", ")", "{", "if", "(", "!", "(", "record", "instanceof", "DnsRawRecord", ")", ")", "{", "return", "null", ";", "}", "final", "ByteBuf", ...
Decodes an {@link InetAddress} from an A or AAAA {@link DnsRawRecord}. @param record the {@link DnsRecord}, most likely a {@link DnsRawRecord} @param name the host name of the decoded address @param decodeIdn whether to convert {@code name} to a unicode host name @return the {@link InetAddress}, or {@code null} if {@...
[ "Decodes", "an", "{", "@link", "InetAddress", "}", "from", "an", "A", "or", "AAAA", "{", "@link", "DnsRawRecord", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsAddressDecoder.java#L45-L64
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createGetProps
Node createGetProps(Node receiver, String firstPropName, String... otherPropNames) { """ Creates a tree of nodes representing `receiver.name1.name2.etc`. """ Node result = createGetProp(receiver, firstPropName); for (String propertyName : otherPropNames) { result = createGetProp(result, propertyN...
java
Node createGetProps(Node receiver, String firstPropName, String... otherPropNames) { Node result = createGetProp(receiver, firstPropName); for (String propertyName : otherPropNames) { result = createGetProp(result, propertyName); } return result; }
[ "Node", "createGetProps", "(", "Node", "receiver", ",", "String", "firstPropName", ",", "String", "...", "otherPropNames", ")", "{", "Node", "result", "=", "createGetProp", "(", "receiver", ",", "firstPropName", ")", ";", "for", "(", "String", "propertyName", ...
Creates a tree of nodes representing `receiver.name1.name2.etc`.
[ "Creates", "a", "tree", "of", "nodes", "representing", "receiver", ".", "name1", ".", "name2", ".", "etc", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L416-L422
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java
FileSystemView.lockSourceAndCopy
private void lockSourceAndCopy(File sourceFile, File copyFile) { """ Locks source and copy files before copying content. Also marks the source file as opened so that its content won't be deleted until after the copy if it is deleted. """ sourceFile.opened(); ReadWriteLock sourceLock = sourceFile.conte...
java
private void lockSourceAndCopy(File sourceFile, File copyFile) { sourceFile.opened(); ReadWriteLock sourceLock = sourceFile.contentLock(); if (sourceLock != null) { sourceLock.readLock().lock(); } ReadWriteLock copyLock = copyFile.contentLock(); if (copyLock != null) { copyLock.write...
[ "private", "void", "lockSourceAndCopy", "(", "File", "sourceFile", ",", "File", "copyFile", ")", "{", "sourceFile", ".", "opened", "(", ")", ";", "ReadWriteLock", "sourceLock", "=", "sourceFile", ".", "contentLock", "(", ")", ";", "if", "(", "sourceLock", "!...
Locks source and copy files before copying content. Also marks the source file as opened so that its content won't be deleted until after the copy if it is deleted.
[ "Locks", "source", "and", "copy", "files", "before", "copying", "content", ".", "Also", "marks", "the", "source", "file", "as", "opened", "so", "that", "its", "content", "won", "t", "be", "deleted", "until", "after", "the", "copy", "if", "it", "is", "del...
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java#L666-L676
orbisgis/h2gis
h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java
CoordinateUtils.vectorIntersection
public static Coordinate vectorIntersection(Coordinate p1, Vector3D v1, Coordinate p2, Vector3D v2) { """ Compute intersection point of two vectors @param p1 Origin point @param v1 Direction from p1 @param p2 Origin point 2 @param v2 Direction of p2 @return Null if vectors are collinear or if intersection is ...
java
public static Coordinate vectorIntersection(Coordinate p1, Vector3D v1, Coordinate p2, Vector3D v2) { double delta; Coordinate i = null; // Cramer's rule for compute intersection of two planes delta = v1.getX() * (-v2.getY()) - (-v1.getY()) * v2.getX(); if (delta != 0) { ...
[ "public", "static", "Coordinate", "vectorIntersection", "(", "Coordinate", "p1", ",", "Vector3D", "v1", ",", "Coordinate", "p2", ",", "Vector3D", "v2", ")", "{", "double", "delta", ";", "Coordinate", "i", "=", "null", ";", "// Cramer's rule for compute intersectio...
Compute intersection point of two vectors @param p1 Origin point @param v1 Direction from p1 @param p2 Origin point 2 @param v2 Direction of p2 @return Null if vectors are collinear or if intersection is done behind one of origin point
[ "Compute", "intersection", "point", "of", "two", "vectors" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-utilities/src/main/java/org/h2gis/utilities/jts_utils/CoordinateUtils.java#L124-L139
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java
Option.findOption
public static Option findOption(String name, Option[] options) { """ Returns an option with the given name. @param name The option name to search for @param options The list of options to search through @return The named option from the list or null if it doesn't exist """ for (int i =...
java
public static Option findOption(String name, Option[] options) { for (int i = 0; i < options.length; i++) { if (options[i].getName().equals(name)) { return options[i]; } } return null; }
[ "public", "static", "Option", "findOption", "(", "String", "name", ",", "Option", "[", "]", "options", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "options", ".", "length", ";", "i", "++", ")", "{", "if", "(", "options", "[", "i", ...
Returns an option with the given name. @param name The option name to search for @param options The list of options to search through @return The named option from the list or null if it doesn't exist
[ "Returns", "an", "option", "with", "the", "given", "name", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java#L170-L177
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.domain_zone_new_GET
public OvhOrder domain_zone_new_GET(Boolean minimized, String zoneName) throws IOException { """ Get prices and contracts information REST: GET /order/domain/zone/new @param minimized [required] Create only mandatory records @param zoneName [required] Name of the zone to create """ String qPath = "/orde...
java
public OvhOrder domain_zone_new_GET(Boolean minimized, String zoneName) throws IOException { String qPath = "/order/domain/zone/new"; StringBuilder sb = path(qPath); query(sb, "minimized", minimized); query(sb, "zoneName", zoneName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(re...
[ "public", "OvhOrder", "domain_zone_new_GET", "(", "Boolean", "minimized", ",", "String", "zoneName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/domain/zone/new\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", ...
Get prices and contracts information REST: GET /order/domain/zone/new @param minimized [required] Create only mandatory records @param zoneName [required] Name of the zone to create
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6005-L6012
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java
GlobusGSSContextImpl.getMIC
public byte[] getMIC(byte [] inBuf, int off, int len, MessageProp prop) throws GSSException { """ Returns a cryptographic MIC (message integrity check) of a specified message. """ throw new GSSException(GSSException.UNA...
java
public byte[] getMIC(byte [] inBuf, int off, int len, MessageProp prop) throws GSSException { throw new GSSException(GSSException.UNAVAILABLE); /*TODO checkContext(); logger.debug("enter getMic"); if (p...
[ "public", "byte", "[", "]", "getMIC", "(", "byte", "[", "]", "inBuf", ",", "int", "off", ",", "int", "len", ",", "MessageProp", "prop", ")", "throws", "GSSException", "{", "throw", "new", "GSSException", "(", "GSSException", ".", "UNAVAILABLE", ")", ";",...
Returns a cryptographic MIC (message integrity check) of a specified message.
[ "Returns", "a", "cryptographic", "MIC", "(", "message", "integrity", "check", ")", "of", "a", "specified", "message", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java#L1771-L1826
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/EncodedGradientsAccumulator.java
EncodedGradientsAccumulator.touch
@Override public void touch() { """ This method does initialization of given worker wrt Thread-Device Affinity """ if (index.get() == null) { // set index int numDevces = Nd4j.getAffinityManager().getNumberOfDevices(); /* if we have > 1 computati...
java
@Override public void touch() { if (index.get() == null) { // set index int numDevces = Nd4j.getAffinityManager().getNumberOfDevices(); /* if we have > 1 computational device, we assign workers to workspaces "as is", as provided via AffinityManager ...
[ "@", "Override", "public", "void", "touch", "(", ")", "{", "if", "(", "index", ".", "get", "(", ")", "==", "null", ")", "{", "// set index", "int", "numDevces", "=", "Nd4j", ".", "getAffinityManager", "(", ")", ".", "getNumberOfDevices", "(", ")", ";",...
This method does initialization of given worker wrt Thread-Device Affinity
[ "This", "method", "does", "initialization", "of", "given", "worker", "wrt", "Thread", "-", "Device", "Affinity" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/solvers/accumulation/EncodedGradientsAccumulator.java#L415-L433
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificatePolicy
public CertificatePolicy updateCertificatePolicy(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) { """ Updates the policy for a certificate. Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission. @para...
java
public CertificatePolicy updateCertificatePolicy(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy) { return updateCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certificateName, certificatePolicy).toBlocking().single().body(); }
[ "public", "CertificatePolicy", "updateCertificatePolicy", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "CertificatePolicy", "certificatePolicy", ")", "{", "return", "updateCertificatePolicyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificat...
Updates the policy for a certificate. Set specified members in the certificate policy. Leave others as null. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate in the given vault...
[ "Updates", "the", "policy", "for", "a", "certificate", ".", "Set", "specified", "members", "in", "the", "certificate", "policy", ".", "Leave", "others", "as", "null", ".", "This", "operation", "requires", "the", "certificates", "/", "update", "permission", "."...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7241-L7243
mapbox/mapbox-java
services-turf/src/main/java/com/mapbox/turf/TurfMeta.java
TurfMeta.addCoordAll
@NonNull private static List<Point> addCoordAll(@NonNull List<Point> pointList, @NonNull Feature feature, @NonNull boolean excludeWrapCoord) { """ Private helper method to be used with other methods in this class. @param pointList the {@code List} of {@link Point}s. @...
java
@NonNull private static List<Point> addCoordAll(@NonNull List<Point> pointList, @NonNull Feature feature, @NonNull boolean excludeWrapCoord) { return coordAllFromSingleGeometry(pointList, feature.geometry(), excludeWrapCoord); }
[ "@", "NonNull", "private", "static", "List", "<", "Point", ">", "addCoordAll", "(", "@", "NonNull", "List", "<", "Point", ">", "pointList", ",", "@", "NonNull", "Feature", "feature", ",", "@", "NonNull", "boolean", "excludeWrapCoord", ")", "{", "return", "...
Private helper method to be used with other methods in this class. @param pointList the {@code List} of {@link Point}s. @param feature the {@link Feature} that you'd like to extract the Points from. @param excludeWrapCoord whether or not to include the final coordinate of LinearRings that wraps the ring in its iterat...
[ "Private", "helper", "method", "to", "be", "used", "with", "other", "methods", "in", "this", "class", "." ]
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-turf/src/main/java/com/mapbox/turf/TurfMeta.java#L287-L291
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgLine.java
DwgLine.readDwgLineV15
public void readDwgLineV15(int[] data, int offset) throws Exception { """ Read a Line in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG ...
java
public void readDwgLineV15(int[] data, int offset) throws Exception { int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); zflag = ((Boolean)v.get(1)).booleanValue(); v = DwgUtil.getRawDouble(data, bitPos); bitP...
[ "public", "void", "readDwgLineV15", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "int", "bitPos", "=", "offset", ";", "bitPos", "=", "readObjectHeaderV15", "(", "data", ",", "bitPos", ")", ";", "Vector", "v", "=", ...
Read a Line in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.
[ "Read", "a", "Line", "in", "the", "DWG", "format", "Version", "15" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgLine.java#L46-L114
andriusvelykis/reflow-maven-skin
reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java
HtmlTool.addClass
public String addClass(String content, String selector, List<String> classNames) { """ Adds given class names to the elements in HTML. @param content HTML content to modify @param selector CSS selector for elements to add classes to @param classNames Names of classes to add to the selected elements @retur...
java
public String addClass(String content, String selector, List<String> classNames) { return addClass(content, selector, classNames, -1); }
[ "public", "String", "addClass", "(", "String", "content", ",", "String", "selector", ",", "List", "<", "String", ">", "classNames", ")", "{", "return", "addClass", "(", "content", ",", "selector", ",", "classNames", ",", "-", "1", ")", ";", "}" ]
Adds given class names to the elements in HTML. @param content HTML content to modify @param selector CSS selector for elements to add classes to @param classNames Names of classes to add to the selected elements @return HTML content with modified elements. If no elements are found, the original content is returned. @...
[ "Adds", "given", "class", "names", "to", "the", "elements", "in", "HTML", "." ]
train
https://github.com/andriusvelykis/reflow-maven-skin/blob/01170ae1426a1adfe7cc9c199e77aaa2ecb37ef2/reflow-velocity-tools/src/main/java/lt/velykis/maven/skins/reflow/HtmlTool.java#L696-L698
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.swapExtension
public static File swapExtension(final File f, final String newExtension) { """ Returns another file just like the input but with a different extension. If the input file has an extension (a suffix beginning with "."), everything after the . is replaced with newExtension. Otherwise, a newExtension is appended to...
java
public static File swapExtension(final File f, final String newExtension) { checkNotNull(f); checkNotNull(newExtension); Preconditions.checkArgument(!f.isDirectory()); final String absolutePath = f.getAbsolutePath(); final int dotIndex = absolutePath.lastIndexOf("."); String basePath; if (...
[ "public", "static", "File", "swapExtension", "(", "final", "File", "f", ",", "final", "String", "newExtension", ")", "{", "checkNotNull", "(", "f", ")", ";", "checkNotNull", "(", "newExtension", ")", ";", "Preconditions", ".", "checkArgument", "(", "!", "f",...
Returns another file just like the input but with a different extension. If the input file has an extension (a suffix beginning with "."), everything after the . is replaced with newExtension. Otherwise, a newExtension is appended to the filename and a new File is returned. Note that unless you want double .s, newExten...
[ "Returns", "another", "file", "just", "like", "the", "input", "but", "with", "a", "different", "extension", ".", "If", "the", "input", "file", "has", "an", "extension", "(", "a", "suffix", "beginning", "with", ".", ")", "everything", "after", "the", ".", ...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L190-L206
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/DocxStamperConfiguration.java
DocxStamperConfiguration.exposeInterfaceToExpressionLanguage
public DocxStamperConfiguration exposeInterfaceToExpressionLanguage(Class<?> interfaceClass, Object implementation) { """ Exposes all methods of a given interface to the expression language. @param interfaceClass the interface whose methods should be exposed in the expression language. @param implementation the...
java
public DocxStamperConfiguration exposeInterfaceToExpressionLanguage(Class<?> interfaceClass, Object implementation) { this.expressionFunctions.put(interfaceClass, implementation); return this; }
[ "public", "DocxStamperConfiguration", "exposeInterfaceToExpressionLanguage", "(", "Class", "<", "?", ">", "interfaceClass", ",", "Object", "implementation", ")", "{", "this", ".", "expressionFunctions", ".", "put", "(", "interfaceClass", ",", "implementation", ")", ";...
Exposes all methods of a given interface to the expression language. @param interfaceClass the interface whose methods should be exposed in the expression language. @param implementation the implementation that should be called to evaluate invocations of the interface methods within the expression language. Must imple...
[ "Exposes", "all", "methods", "of", "a", "given", "interface", "to", "the", "expression", "language", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/DocxStamperConfiguration.java#L106-L109
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.printFailure
protected void printFailure(String interfaceId, ProviderInfo providerInfo, ClientTransport transport) { """ 打印连接失败日志 @param interfaceId 接口名称 @param providerInfo 服务端 @param transport 连接 """ if (LOGGER.isInfoEnabled(consumerConfig.getAppName())) { LOGGER.infoWithApp(consumerConfig.ge...
java
protected void printFailure(String interfaceId, ProviderInfo providerInfo, ClientTransport transport) { if (LOGGER.isInfoEnabled(consumerConfig.getAppName())) { LOGGER.infoWithApp(consumerConfig.getAppName(), "Connect to {} provider:{} failure !", interfaceId, providerInfo); ...
[ "protected", "void", "printFailure", "(", "String", "interfaceId", ",", "ProviderInfo", "providerInfo", ",", "ClientTransport", "transport", ")", "{", "if", "(", "LOGGER", ".", "isInfoEnabled", "(", "consumerConfig", ".", "getAppName", "(", ")", ")", ")", "{", ...
打印连接失败日志 @param interfaceId 接口名称 @param providerInfo 服务端 @param transport 连接
[ "打印连接失败日志" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L711-L716
bpsm/edn-java
src/main/java/us/bpsm/edn/Keyword.java
Keyword.newKeyword
public static Keyword newKeyword(String prefix, String name) { """ Provide a Keyword with the given prefix and name. <p> Keywords are interned, which means that any two keywords which are equal (by value) will also be identical (by reference). @param prefix An empty String or a non-empty String obeying the ...
java
public static Keyword newKeyword(String prefix, String name) { return newKeyword(newSymbol(prefix, name)); }
[ "public", "static", "Keyword", "newKeyword", "(", "String", "prefix", ",", "String", "name", ")", "{", "return", "newKeyword", "(", "newSymbol", "(", "prefix", ",", "name", ")", ")", ";", "}" ]
Provide a Keyword with the given prefix and name. <p> Keywords are interned, which means that any two keywords which are equal (by value) will also be identical (by reference). @param prefix An empty String or a non-empty String obeying the restrictions specified by edn. Never null. @param name A non-empty string obey...
[ "Provide", "a", "Keyword", "with", "the", "given", "prefix", "and", "name", ".", "<p", ">", "Keywords", "are", "interned", "which", "means", "that", "any", "two", "keywords", "which", "are", "equal", "(", "by", "value", ")", "will", "also", "be", "identi...
train
https://github.com/bpsm/edn-java/blob/c5dfdb77431da1aca3c257599b237a21575629b2/src/main/java/us/bpsm/edn/Keyword.java#L58-L60
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.getAsync
public Observable<NetworkInterfaceTapConfigurationInner> getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { """ Get the specified tap configuration on a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name o...
java
public Observable<NetworkInterfaceTapConfigurationInner> getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).map(new Func1<ServiceResponse<NetworkInterfaceTapConfiguration...
[ "public", "Observable", "<", "NetworkInterfaceTapConfigurationInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ",", "String", "tapConfigurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName"...
Get the specified tap configuration on a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param tapConfigurationName The name of the tap configuration. @throws IllegalArgumentException thrown if parameters fail the validation @r...
[ "Get", "the", "specified", "tap", "configuration", "on", "a", "network", "interface", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java#L297-L304
structr/structr
structr-ui/src/main/java/org/structr/web/common/FileHelper.java
FileHelper.transformFile
public static <T extends File> T transformFile(final SecurityContext securityContext, final String uuid, final Class<T> fileType) throws FrameworkException, IOException { """ Transform an existing file into the target class. @param <T> @param securityContext @param uuid @param fileType @return transformed f...
java
public static <T extends File> T transformFile(final SecurityContext securityContext, final String uuid, final Class<T> fileType) throws FrameworkException, IOException { AbstractFile existingFile = getFileByUuid(securityContext, uuid); if (existingFile != null) { existingFile.unlockSystemPropertiesOnce(); ...
[ "public", "static", "<", "T", "extends", "File", ">", "T", "transformFile", "(", "final", "SecurityContext", "securityContext", ",", "final", "String", "uuid", ",", "final", "Class", "<", "T", ">", "fileType", ")", "throws", "FrameworkException", ",", "IOExcep...
Transform an existing file into the target class. @param <T> @param securityContext @param uuid @param fileType @return transformed file @throws FrameworkException @throws IOException
[ "Transform", "an", "existing", "file", "into", "the", "target", "class", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/common/FileHelper.java#L79-L94
google/closure-compiler
src/com/google/javascript/jscomp/NodeTraversal.java
NodeTraversal.traverseChangedFunctions
public static void traverseChangedFunctions( final AbstractCompiler compiler, final ChangeScopeRootCallback callback) { """ Traversal for passes that work only on changed functions. Suppose a loopable pass P1 uses this traversal. Then, if a function doesn't change between two runs of P1, it won't look at ...
java
public static void traverseChangedFunctions( final AbstractCompiler compiler, final ChangeScopeRootCallback callback) { final Node jsRoot = compiler.getJsRoot(); NodeTraversal.traverse(compiler, jsRoot, new AbstractPreOrderCallback() { @Override public final boolean shouldTrave...
[ "public", "static", "void", "traverseChangedFunctions", "(", "final", "AbstractCompiler", "compiler", ",", "final", "ChangeScopeRootCallback", "callback", ")", "{", "final", "Node", "jsRoot", "=", "compiler", ".", "getJsRoot", "(", ")", ";", "NodeTraversal", ".", ...
Traversal for passes that work only on changed functions. Suppose a loopable pass P1 uses this traversal. Then, if a function doesn't change between two runs of P1, it won't look at the function the second time. (We're assuming that P1 runs to a fixpoint, o/w we may miss optimizations.) <p>Most changes are reported wi...
[ "Traversal", "for", "passes", "that", "work", "only", "on", "changed", "functions", ".", "Suppose", "a", "loopable", "pass", "P1", "uses", "this", "traversal", ".", "Then", "if", "a", "function", "doesn", "t", "change", "between", "two", "runs", "of", "P1"...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeTraversal.java#L779-L792
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/ClassUtil.java
ClassUtil.findEnumConstant
public static Object findEnumConstant(Class<?> type, String constantName, boolean caseSensitive) { """ Finds an instance of an Enum constant on a class. Useful for safely getting the value of an enum constant without an exception being thrown like the Enum.valueOf() method causes. Also, this method optionally al...
java
public static Object findEnumConstant(Class<?> type, String constantName, boolean caseSensitive) { if (!type.isEnum()) { return null; } for (Object obj : type.getEnumConstants()) { String name = obj.toString(); if ((caseSensitive && name.equals(constantName)) ...
[ "public", "static", "Object", "findEnumConstant", "(", "Class", "<", "?", ">", "type", ",", "String", "constantName", ",", "boolean", "caseSensitive", ")", "{", "if", "(", "!", "type", ".", "isEnum", "(", ")", ")", "{", "return", "null", ";", "}", "for...
Finds an instance of an Enum constant on a class. Useful for safely getting the value of an enum constant without an exception being thrown like the Enum.valueOf() method causes. Also, this method optionally allows the caller to choose whether case matters during the search.
[ "Finds", "an", "instance", "of", "an", "Enum", "constant", "on", "a", "class", ".", "Useful", "for", "safely", "getting", "the", "value", "of", "an", "enum", "constant", "without", "an", "exception", "being", "thrown", "like", "the", "Enum", ".", "valueOf"...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/ClassUtil.java#L52-L64
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/CTLuMedianAlgorithm.java
CTLuMedianAlgorithm.run
public OutlierResult run(Database database, Relation<N> nrel, Relation<? extends NumberVector> relation) { """ Main method. @param database Database @param nrel Neighborhood relation @param relation Data relation (1d!) @return Outlier detection result """ final NeighborSetPredicate npred = getNeighbo...
java
public OutlierResult run(Database database, Relation<N> nrel, Relation<? extends NumberVector> relation) { final NeighborSetPredicate npred = getNeighborSetPredicateFactory().instantiate(database, nrel); WritableDoubleDataStore scores = DataStoreUtil.makeDoubleStorage(relation.getDBIDs(), DataStoreFactory.HINT_...
[ "public", "OutlierResult", "run", "(", "Database", "database", ",", "Relation", "<", "N", ">", "nrel", ",", "Relation", "<", "?", "extends", "NumberVector", ">", "relation", ")", "{", "final", "NeighborSetPredicate", "npred", "=", "getNeighborSetPredicateFactory",...
Main method. @param database Database @param nrel Neighborhood relation @param relation Data relation (1d!) @return Outlier detection result
[ "Main", "method", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/spatial/CTLuMedianAlgorithm.java#L97-L144
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/DatatypeConverter.java
DatatypeConverter.parseExtendedAttribute
public static final void parseExtendedAttribute(ProjectFile file, FieldContainer mpx, String value, FieldType mpxFieldID, TimeUnit durationFormat) { """ Parse an extended attribute value. @param file parent file @param mpx parent entity @param value string value @param mpxFieldID field ID @param durationFor...
java
public static final void parseExtendedAttribute(ProjectFile file, FieldContainer mpx, String value, FieldType mpxFieldID, TimeUnit durationFormat) { if (mpxFieldID != null) { switch (mpxFieldID.getDataType()) { case STRING: { mpx.set(mpxFieldID, va...
[ "public", "static", "final", "void", "parseExtendedAttribute", "(", "ProjectFile", "file", ",", "FieldContainer", "mpx", ",", "String", "value", ",", "FieldType", "mpxFieldID", ",", "TimeUnit", "durationFormat", ")", "{", "if", "(", "mpxFieldID", "!=", "null", "...
Parse an extended attribute value. @param file parent file @param mpx parent entity @param value string value @param mpxFieldID field ID @param durationFormat duration format associated with the extended attribute
[ "Parse", "an", "extended", "attribute", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/DatatypeConverter.java#L239-L287
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/HyphenationAuto.java
HyphenationAuto.getHyphenatedWordPre
public String getHyphenatedWordPre(String word, BaseFont font, float fontSize, float remainingWidth) { """ Hyphenates a word and returns the first part of it. To get the second part of the hyphenated word call <CODE>getHyphenatedWordPost()</CODE>. @param word the word to hyphenate @param font the font used by t...
java
public String getHyphenatedWordPre(String word, BaseFont font, float fontSize, float remainingWidth) { post = word; String hyphen = getHyphenSymbol(); float hyphenWidth = font.getWidthPoint(hyphen, fontSize); if (hyphenWidth > remainingWidth) return ""; Hyphenation hy...
[ "public", "String", "getHyphenatedWordPre", "(", "String", "word", ",", "BaseFont", "font", ",", "float", "fontSize", ",", "float", "remainingWidth", ")", "{", "post", "=", "word", ";", "String", "hyphen", "=", "getHyphenSymbol", "(", ")", ";", "float", "hyp...
Hyphenates a word and returns the first part of it. To get the second part of the hyphenated word call <CODE>getHyphenatedWordPost()</CODE>. @param word the word to hyphenate @param font the font used by this word @param fontSize the font size used by this word @param remainingWidth the width available to fit this word...
[ "Hyphenates", "a", "word", "and", "returns", "the", "first", "part", "of", "it", ".", "To", "get", "the", "second", "part", "of", "the", "hyphenated", "word", "call", "<CODE", ">", "getHyphenatedWordPost", "()", "<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/HyphenationAuto.java#L94-L115
GII/broccoli
broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java
OWLValueObject.buildFromCollection
public static OWLValueObject buildFromCollection(OWLModel model, Collection col) throws NotYetImplementedException, OWLTranslationException { """ Builds an instance, from a given collection @param model @param col @return @throws NotYetImplementedException @throws OWLTranslationException """ if (c...
java
public static OWLValueObject buildFromCollection(OWLModel model, Collection col) throws NotYetImplementedException, OWLTranslationException { if (col.isEmpty()) { return null; } return buildFromClasAndCollection(model, OWLURIClass.from(col.iterator().next()), col); }
[ "public", "static", "OWLValueObject", "buildFromCollection", "(", "OWLModel", "model", ",", "Collection", "col", ")", "throws", "NotYetImplementedException", ",", "OWLTranslationException", "{", "if", "(", "col", ".", "isEmpty", "(", ")", ")", "{", "return", "null...
Builds an instance, from a given collection @param model @param col @return @throws NotYetImplementedException @throws OWLTranslationException
[ "Builds", "an", "instance", "from", "a", "given", "collection" ]
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java#L159-L164
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java
DelegateView.preferenceChanged
@Override public void preferenceChanged(View child, boolean width, boolean height) { """ Specifies that a preference has changed. Child views can call this on the parent to indicate that the preference has changed. The root view routes this to invalidate on the hosting component. <p> This can be called on ...
java
@Override public void preferenceChanged(View child, boolean width, boolean height) { if (parent != null) { parent.preferenceChanged(child, width, height); } }
[ "@", "Override", "public", "void", "preferenceChanged", "(", "View", "child", ",", "boolean", "width", ",", "boolean", "height", ")", "{", "if", "(", "parent", "!=", "null", ")", "{", "parent", ".", "preferenceChanged", "(", "child", ",", "width", ",", "...
Specifies that a preference has changed. Child views can call this on the parent to indicate that the preference has changed. The root view routes this to invalidate on the hosting component. <p> This can be called on a different thread from the event dispatching thread and is basically unsafe to propagate into the com...
[ "Specifies", "that", "a", "preference", "has", "changed", ".", "Child", "views", "can", "call", "this", "on", "the", "parent", "to", "indicate", "that", "the", "preference", "has", "changed", ".", "The", "root", "view", "routes", "this", "to", "invalidate", ...
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java#L246-L253
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.createGroup
public void createGroup(String groupId) throws Exception { """ Creates a new group and adds it to the vector QueryControllerEntity """ if (getElementPosition(groupId) == -1) { QueryControllerGroup group = new QueryControllerGroup(groupId); entities.add(group); fireElementAdded(group); } else { ...
java
public void createGroup(String groupId) throws Exception { if (getElementPosition(groupId) == -1) { QueryControllerGroup group = new QueryControllerGroup(groupId); entities.add(group); fireElementAdded(group); } else { throw new Exception("The name is already taken, either by a query group or a query ...
[ "public", "void", "createGroup", "(", "String", "groupId", ")", "throws", "Exception", "{", "if", "(", "getElementPosition", "(", "groupId", ")", "==", "-", "1", ")", "{", "QueryControllerGroup", "group", "=", "new", "QueryControllerGroup", "(", "groupId", ")"...
Creates a new group and adds it to the vector QueryControllerEntity
[ "Creates", "a", "new", "group", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L64-L73
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateEntityAsync
public Observable<OperationStatus> updateEntityAsync(UUID appId, String versionId, UUID entityId, UpdateEntityOptionalParameter updateEntityOptionalParameter) { """ Updates the name of an entity extractor. @param appId The application ID. @param versionId The version ID. @param entityId The entity extractor I...
java
public Observable<OperationStatus> updateEntityAsync(UUID appId, String versionId, UUID entityId, UpdateEntityOptionalParameter updateEntityOptionalParameter) { return updateEntityWithServiceResponseAsync(appId, versionId, entityId, updateEntityOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, ...
[ "public", "Observable", "<", "OperationStatus", ">", "updateEntityAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UpdateEntityOptionalParameter", "updateEntityOptionalParameter", ")", "{", "return", "updateEntityWithServiceResponseAs...
Updates the name of an entity extractor. @param appId The application ID. @param versionId The version ID. @param entityId The entity extractor ID. @param updateEntityOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameter...
[ "Updates", "the", "name", "of", "an", "entity", "extractor", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3407-L3414
openskynetwork/java-adsb
src/main/java/org/opensky/libadsb/PositionDecoder.java
PositionDecoder.decodePosition
public Position decodePosition(double time, Position receiver, SurfacePositionV0Msg msg, Position reference) { """ Performs all reasonableness tests. @param time time of applicability/reception of position report (seconds) @param reference position used to decide which position of the four results of the CPR alg...
java
public Position decodePosition(double time, Position receiver, SurfacePositionV0Msg msg, Position reference) { Position ret = decodePosition(time, msg, reference); if (ret != null && receiver != null && !withinReasonableRange(receiver, ret)) { ret.setReasonable(false); num_reasonable = 0; } return ret; }
[ "public", "Position", "decodePosition", "(", "double", "time", ",", "Position", "receiver", ",", "SurfacePositionV0Msg", "msg", ",", "Position", "reference", ")", "{", "Position", "ret", "=", "decodePosition", "(", "time", ",", "msg", ",", "reference", ")", ";...
Performs all reasonableness tests. @param time time of applicability/reception of position report (seconds) @param reference position used to decide which position of the four results of the CPR algorithm is the right one @param receiver position to check if received position was more than 700km away and @param msg sur...
[ "Performs", "all", "reasonableness", "tests", "." ]
train
https://github.com/openskynetwork/java-adsb/blob/01d497d3e74ad10063ab443ab583e9c8653a8b8d/src/main/java/org/opensky/libadsb/PositionDecoder.java#L474-L481
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java
ParseUtil.convertLike
static Selector convertLike(Selector arg, String pattern, String escape) { """ Convert a partially parsed LIKE expression, in which the pattern and escape are in the form of token images, to the proper Selector expression to represent the LIKE expression @param arg the argument of the like @param pattern the p...
java
static Selector convertLike(Selector arg, String pattern, String escape) { try { pattern = reduceStringLiteralToken(pattern); boolean escaped = false; char esc = 0; if (escape != null) { escape = reduceStringLiteralToken(escape); if (escape.length() != 1) return...
[ "static", "Selector", "convertLike", "(", "Selector", "arg", ",", "String", "pattern", ",", "String", "escape", ")", "{", "try", "{", "pattern", "=", "reduceStringLiteralToken", "(", "pattern", ")", ";", "boolean", "escaped", "=", "false", ";", "char", "esc"...
Convert a partially parsed LIKE expression, in which the pattern and escape are in the form of token images, to the proper Selector expression to represent the LIKE expression @param arg the argument of the like @param pattern the pattern image (still containing leading and trailing ') @param escape the escape (still c...
[ "Convert", "a", "partially", "parsed", "LIKE", "expression", "in", "which", "the", "pattern", "and", "escape", "are", "in", "the", "form", "of", "token", "images", "to", "the", "proper", "Selector", "expression", "to", "represent", "the", "LIKE", "expression" ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/ParseUtil.java#L139-L167
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java
AttributedString.addAttribute
public void addAttribute(Attribute attribute, Object value) { """ Adds an attribute to the entire string. @param attribute the attribute key @param value the value of the attribute; may be null @exception NullPointerException if <code>attribute</code> is null. @exception IllegalArgumentException if the Attribu...
java
public void addAttribute(Attribute attribute, Object value) { if (attribute == null) { throw new NullPointerException(); } int len = length(); if (len == 0) { throw new IllegalArgumentException("Can't add attribute to 0-length text"); } addAttri...
[ "public", "void", "addAttribute", "(", "Attribute", "attribute", ",", "Object", "value", ")", "{", "if", "(", "attribute", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "int", "len", "=", "length", "(", ")", ";", "...
Adds an attribute to the entire string. @param attribute the attribute key @param value the value of the attribute; may be null @exception NullPointerException if <code>attribute</code> is null. @exception IllegalArgumentException if the AttributedString has length 0 (attributes cannot be applied to a 0-length range).
[ "Adds", "an", "attribute", "to", "the", "entire", "string", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java#L316-L328
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/property/DateProperty.java
DateProperty.setValue
public void setValue(final String value) throws ParseException { """ Default setValue() implementation. Allows for either DATE or DATE-TIME values. @param value a string representation of a DATE or DATE-TIME value @throws ParseException where the specified value is not a valid DATE or DATE-TIME representation...
java
public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(va...
[ "public", "void", "setValue", "(", "final", "String", "value", ")", "throws", "ParseException", "{", "// value can be either a date-time or a date..", "if", "(", "Value", ".", "DATE", ".", "equals", "(", "getParameter", "(", "Parameter", ".", "VALUE", ")", ")", ...
Default setValue() implementation. Allows for either DATE or DATE-TIME values. @param value a string representation of a DATE or DATE-TIME value @throws ParseException where the specified value is not a valid DATE or DATE-TIME representation
[ "Default", "setValue", "()", "implementation", ".", "Allows", "for", "either", "DATE", "or", "DATE", "-", "TIME", "values", "." ]
train
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/property/DateProperty.java#L130-L139
TNG/JGiven
jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/ReflectionUtil.java
ReflectionUtil.forEachSuperClass
public static void forEachSuperClass( Class<?> clazz, ClassAction action ) { """ Iterates over all super classes of the given class (including the class itself) and calls action.act() for these classes. """ try { action.act( clazz ); Class<?> superclass = clazz.getSuperclass();...
java
public static void forEachSuperClass( Class<?> clazz, ClassAction action ) { try { action.act( clazz ); Class<?> superclass = clazz.getSuperclass(); if( superclass != null ) { forEachSuperClass( superclass, action ); } } catch( Exception e ...
[ "public", "static", "void", "forEachSuperClass", "(", "Class", "<", "?", ">", "clazz", ",", "ClassAction", "action", ")", "{", "try", "{", "action", ".", "act", "(", "clazz", ")", ";", "Class", "<", "?", ">", "superclass", "=", "clazz", ".", "getSuperc...
Iterates over all super classes of the given class (including the class itself) and calls action.act() for these classes.
[ "Iterates", "over", "all", "super", "classes", "of", "the", "given", "class", "(", "including", "the", "class", "itself", ")", "and", "calls", "action", ".", "act", "()", "for", "these", "classes", "." ]
train
https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/ReflectionUtil.java#L65-L76
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java
ManagedDatabasesInner.completeRestoreAsync
public Observable<Void> completeRestoreAsync(String locationName, UUID operationId, String lastBackupName) { """ Completes the restore operation on a managed database. @param locationName The name of the region where the resource is located. @param operationId Management operation id that this request tries to...
java
public Observable<Void> completeRestoreAsync(String locationName, UUID operationId, String lastBackupName) { return completeRestoreWithServiceResponseAsync(locationName, operationId, lastBackupName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse...
[ "public", "Observable", "<", "Void", ">", "completeRestoreAsync", "(", "String", "locationName", ",", "UUID", "operationId", ",", "String", "lastBackupName", ")", "{", "return", "completeRestoreWithServiceResponseAsync", "(", "locationName", ",", "operationId", ",", "...
Completes the restore operation on a managed database. @param locationName The name of the region where the resource is located. @param operationId Management operation id that this request tries to complete. @param lastBackupName The last backup name to apply @throws IllegalArgumentException thrown if parameters fail...
[ "Completes", "the", "restore", "operation", "on", "a", "managed", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L152-L159
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java
InHamp.readStreamCancel
private void readStreamCancel(InH3 hIn, HeadersAmp headers) throws IOException { """ The stream result message is a partial or final result from the target's stream. """ ServiceRefAmp serviceRef = readToAddress(hIn); GatewayReply from = readFromAddress(hIn); long qid = hIn.readLong(); ...
java
private void readStreamCancel(InH3 hIn, HeadersAmp headers) throws IOException { ServiceRefAmp serviceRef = readToAddress(hIn); GatewayReply from = readFromAddress(hIn); long qid = hIn.readLong(); if (log.isLoggable(_logLevel)) { log.log(_logLevel, "stream-cancel-r " + from + "," + qi...
[ "private", "void", "readStreamCancel", "(", "InH3", "hIn", ",", "HeadersAmp", "headers", ")", "throws", "IOException", "{", "ServiceRefAmp", "serviceRef", "=", "readToAddress", "(", "hIn", ")", ";", "GatewayReply", "from", "=", "readFromAddress", "(", "hIn", ")"...
The stream result message is a partial or final result from the target's stream.
[ "The", "stream", "result", "message", "is", "a", "partial", "or", "final", "result", "from", "the", "target", "s", "stream", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L750-L765
leancloud/java-sdk-all
core/src/main/java/cn/leancloud/AVObject.java
AVObject.createWithoutData
public static AVObject createWithoutData(String className, String objectId) { """ create a new instance with particular classname and objectId. @param className class name @param objectId object id @return """ AVObject object = new AVObject(className); object.setObjectId(objectId); return objec...
java
public static AVObject createWithoutData(String className, String objectId) { AVObject object = new AVObject(className); object.setObjectId(objectId); return object; }
[ "public", "static", "AVObject", "createWithoutData", "(", "String", "className", ",", "String", "objectId", ")", "{", "AVObject", "object", "=", "new", "AVObject", "(", "className", ")", ";", "object", ".", "setObjectId", "(", "objectId", ")", ";", "return", ...
create a new instance with particular classname and objectId. @param className class name @param objectId object id @return
[ "create", "a", "new", "instance", "with", "particular", "classname", "and", "objectId", "." ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/core/src/main/java/cn/leancloud/AVObject.java#L1006-L1010
HotelsDotCom/corc
corc-cascading/src/main/java/com/hotels/corc/cascading/OrcFile.java
OrcFile.sourcePrepare
@Override public void sourcePrepare(FlowProcess<? extends Configuration> flowProcess, SourceCall<Corc, RecordReader> sourceCall) throws IOException { """ Creates an {@link Corc} instance and stores it in the context to be reused for all rows. """ sourceCall.setContext((Corc) sourceCall.getInput().c...
java
@Override public void sourcePrepare(FlowProcess<? extends Configuration> flowProcess, SourceCall<Corc, RecordReader> sourceCall) throws IOException { sourceCall.setContext((Corc) sourceCall.getInput().createValue()); }
[ "@", "Override", "public", "void", "sourcePrepare", "(", "FlowProcess", "<", "?", "extends", "Configuration", ">", "flowProcess", ",", "SourceCall", "<", "Corc", ",", "RecordReader", ">", "sourceCall", ")", "throws", "IOException", "{", "sourceCall", ".", "setCo...
Creates an {@link Corc} instance and stores it in the context to be reused for all rows.
[ "Creates", "an", "{" ]
train
https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-cascading/src/main/java/com/hotels/corc/cascading/OrcFile.java#L160-L164
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java
OAuth20Utils.writeError
public static ModelAndView writeError(final HttpServletResponse response, final String error) { """ Write to the output this error. @param response the response @param error error message @return json -backed view. """ val model = CollectionUtils.wrap(OAuth20Constants.ERROR, error); val...
java
public static ModelAndView writeError(final HttpServletResponse response, final String error) { val model = CollectionUtils.wrap(OAuth20Constants.ERROR, error); val mv = new ModelAndView(new MappingJackson2JsonView(MAPPER), (Map) model); mv.setStatus(HttpStatus.BAD_REQUEST); response.set...
[ "public", "static", "ModelAndView", "writeError", "(", "final", "HttpServletResponse", "response", ",", "final", "String", "error", ")", "{", "val", "model", "=", "CollectionUtils", ".", "wrap", "(", "OAuth20Constants", ".", "ERROR", ",", "error", ")", ";", "v...
Write to the output this error. @param response the response @param error error message @return json -backed view.
[ "Write", "to", "the", "output", "this", "error", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L61-L67
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
NodeImpl.isPrefixMappedToUri
boolean isPrefixMappedToUri(String prefix, String uri) { """ Returns true if the given prefix is mapped to the given URI on this element. Since child elements can redefine prefixes, this check is necessary: {@code <foo xmlns:a="http://good"> <bar xmlns:a="http://evil"> <a:baz /> </bar> </foo>} @param pre...
java
boolean isPrefixMappedToUri(String prefix, String uri) { if (prefix == null) { return false; } String actual = lookupNamespaceURI(prefix); return uri.equals(actual); }
[ "boolean", "isPrefixMappedToUri", "(", "String", "prefix", ",", "String", "uri", ")", "{", "if", "(", "prefix", "==", "null", ")", "{", "return", "false", ";", "}", "String", "actual", "=", "lookupNamespaceURI", "(", "prefix", ")", ";", "return", "uri", ...
Returns true if the given prefix is mapped to the given URI on this element. Since child elements can redefine prefixes, this check is necessary: {@code <foo xmlns:a="http://good"> <bar xmlns:a="http://evil"> <a:baz /> </bar> </foo>} @param prefix the prefix to find. Nullable. @param uri the URI to match. Non-null.
[ "Returns", "true", "if", "the", "given", "prefix", "is", "mapped", "to", "the", "given", "URI", "on", "this", "element", ".", "Since", "child", "elements", "can", "redefine", "prefixes", "this", "check", "is", "necessary", ":", "{", "@code", "<foo", "xmlns...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java#L543-L550
ept/warc-hadoop
src/main/java/com/martinkl/warc/mapred/WARCInputFormat.java
WARCInputFormat.getRecordReader
@Override public RecordReader<LongWritable, WARCWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { """ Opens a WARC file (possibly compressed) for reading, and returns a RecordReader for accessing it. """ reporter.setStatus(split.toString())...
java
@Override public RecordReader<LongWritable, WARCWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new WARCReader(job, (FileSplit) split); }
[ "@", "Override", "public", "RecordReader", "<", "LongWritable", ",", "WARCWritable", ">", "getRecordReader", "(", "InputSplit", "split", ",", "JobConf", "job", ",", "Reporter", "reporter", ")", "throws", "IOException", "{", "reporter", ".", "setStatus", "(", "sp...
Opens a WARC file (possibly compressed) for reading, and returns a RecordReader for accessing it.
[ "Opens", "a", "WARC", "file", "(", "possibly", "compressed", ")", "for", "reading", "and", "returns", "a", "RecordReader", "for", "accessing", "it", "." ]
train
https://github.com/ept/warc-hadoop/blob/f41cbb8002c29053eed9206e50ab9787de7da67f/src/main/java/com/martinkl/warc/mapred/WARCInputFormat.java#L37-L42
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java
CmsXmlContentPropertyHelper.mergeDefaults
public static Map<String, String> mergeDefaults( CmsObject cms, CmsResource resource, Map<String, String> properties, Locale locale, ServletRequest request) { """ Extends the given properties with the default values from the resource's property configuration.<p> @param c...
java
public static Map<String, String> mergeDefaults( CmsObject cms, CmsResource resource, Map<String, String> properties, Locale locale, ServletRequest request) { Map<String, CmsXmlContentProperty> propertyConfig = null; if (CmsResourceTypeXmlContent.isXmlContent(res...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "mergeDefaults", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "Map", "<", "String", ",", "String", ">", "properties", ",", "Locale", "locale", ",", "ServletRequest", "request", ")...
Extends the given properties with the default values from the resource's property configuration.<p> @param cms the current CMS context @param resource the resource to get the property configuration from @param properties the properties to extend @param locale the content locale @param request the current request, if a...
[ "Extends", "the", "given", "properties", "with", "the", "default", "values", "from", "the", "resource", "s", "property", "configuration", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java#L402-L445
spotbugs/spotbugs
eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java
ASTUtil.getTypeDeclaration
public static TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, String typeName) throws TypeDeclarationNotFoundException { """ Returns the <CODE>TypeDeclaration</CODE> for the specified type name. The type has to be declared in the specified <CODE>CompilationUnit</CODE>. @param co...
java
public static TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, String typeName) throws TypeDeclarationNotFoundException { requireNonNull(compilationUnit, "compilation unit"); requireNonNull(typeName, "class name"); int index = typeName.lastIndexOf('.'); St...
[ "public", "static", "TypeDeclaration", "getTypeDeclaration", "(", "CompilationUnit", "compilationUnit", ",", "String", "typeName", ")", "throws", "TypeDeclarationNotFoundException", "{", "requireNonNull", "(", "compilationUnit", ",", "\"compilation unit\"", ")", ";", "requi...
Returns the <CODE>TypeDeclaration</CODE> for the specified type name. The type has to be declared in the specified <CODE>CompilationUnit</CODE>. @param compilationUnit The <CODE>CompilationUnit</CODE>, where the <CODE>TypeDeclaration</CODE> is declared in. @param typeName The qualified class name to search for. @retur...
[ "Returns", "the", "<CODE", ">", "TypeDeclaration<", "/", "CODE", ">", "for", "the", "specified", "type", "name", ".", "The", "type", "has", "to", "be", "declared", "in", "the", "specified", "<CODE", ">", "CompilationUnit<", "/", "CODE", ">", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java#L248-L265
yanzhenjie/AndPermission
support/src/main/java/com/yanzhenjie/permission/AndPermission.java
AndPermission.getFileUri
public static Uri getFileUri(Fragment fragment, File file) { """ Get compatible Android 7.0 and lower versions of Uri. @param fragment {@link Fragment}. @param file apk file. @return uri. """ return getFileUri(fragment.getContext(), file); }
java
public static Uri getFileUri(Fragment fragment, File file) { return getFileUri(fragment.getContext(), file); }
[ "public", "static", "Uri", "getFileUri", "(", "Fragment", "fragment", ",", "File", "file", ")", "{", "return", "getFileUri", "(", "fragment", ".", "getContext", "(", ")", ",", "file", ")", ";", "}" ]
Get compatible Android 7.0 and lower versions of Uri. @param fragment {@link Fragment}. @param file apk file. @return uri.
[ "Get", "compatible", "Android", "7", ".", "0", "and", "lower", "versions", "of", "Uri", "." ]
train
https://github.com/yanzhenjie/AndPermission/blob/bbfaaecdb8ecf0f2aa270d80c0b88d022dddda7c/support/src/main/java/com/yanzhenjie/permission/AndPermission.java#L338-L340
telly/groundy
library/src/main/java/com/telly/groundy/CallbacksManager.java
CallbacksManager.init
public static CallbacksManager init(Bundle bundle, Object... callbackHandlers) { """ Call from within your activity or fragment onCreate method. @param bundle the onSaveInstance bundle @param callbackHandlers an array of callback handlers to mange @return an instance of {@link CallbacksManager} """ if...
java
public static CallbacksManager init(Bundle bundle, Object... callbackHandlers) { if (bundle == null) { return new CallbacksManager(); } CallbacksManager callbacksManager = new CallbacksManager(); ArrayList<TaskHandler> taskProxies = bundle.getParcelableArrayList(TASK_PROXY_LIST); if (taskProx...
[ "public", "static", "CallbacksManager", "init", "(", "Bundle", "bundle", ",", "Object", "...", "callbackHandlers", ")", "{", "if", "(", "bundle", "==", "null", ")", "{", "return", "new", "CallbacksManager", "(", ")", ";", "}", "CallbacksManager", "callbacksMan...
Call from within your activity or fragment onCreate method. @param bundle the onSaveInstance bundle @param callbackHandlers an array of callback handlers to mange @return an instance of {@link CallbacksManager}
[ "Call", "from", "within", "your", "activity", "or", "fragment", "onCreate", "method", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/CallbacksManager.java#L63-L81