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
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerListener.java
PaymentChannelServerListener.bindAndStart
public void bindAndStart(int port) throws Exception { """ Binds to the given port and starts accepting new client connections. @throws Exception If binding to the given port fails (eg SocketException: Permission denied for privileged ports) """ server = new NioServer(new StreamConnectionFactory() { ...
java
public void bindAndStart(int port) throws Exception { server = new NioServer(new StreamConnectionFactory() { @Override public ProtobufConnection<Protos.TwoWayChannelMessage> getNewConnection(InetAddress inetAddress, int port) { return new ServerHandler(new InetSocketAddre...
[ "public", "void", "bindAndStart", "(", "int", "port", ")", "throws", "Exception", "{", "server", "=", "new", "NioServer", "(", "new", "StreamConnectionFactory", "(", ")", "{", "@", "Override", "public", "ProtobufConnection", "<", "Protos", ".", "TwoWayChannelMes...
Binds to the given port and starts accepting new client connections. @throws Exception If binding to the given port fails (eg SocketException: Permission denied for privileged ports)
[ "Binds", "to", "the", "given", "port", "and", "starts", "accepting", "new", "client", "connections", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelServerListener.java#L152-L161
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.compileDefaults
private void compileDefaults(Map<String, TreeMap<String, Object>> compiledDefaults, UIDefaults d) { """ Iterates over all the keys in the specified UIDefaults and compiles those keys into the comiledDefaults data structure. It relies on parsing the "prefix" out of the key. If the key is not a String or is null t...
java
private void compileDefaults(Map<String, TreeMap<String, Object>> compiledDefaults, UIDefaults d) { for (Map.Entry<Object, Object> entry : d.entrySet()) { if (entry.getKey() instanceof String) { String key = (String) entry.getKey(); String kp = parsePrefix(key); ...
[ "private", "void", "compileDefaults", "(", "Map", "<", "String", ",", "TreeMap", "<", "String", ",", "Object", ">", ">", "compiledDefaults", ",", "UIDefaults", "d", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Object", ",", "Object", ">", "entry", ...
Iterates over all the keys in the specified UIDefaults and compiles those keys into the comiledDefaults data structure. It relies on parsing the "prefix" out of the key. If the key is not a String or is null then it is ignored. In all other cases a prefix is parsed out (even if that prefix is the empty String or is a "...
[ "Iterates", "over", "all", "the", "keys", "in", "the", "specified", "UIDefaults", "and", "compiles", "those", "keys", "into", "the", "comiledDefaults", "data", "structure", ".", "It", "relies", "on", "parsing", "the", "prefix", "out", "of", "the", "key", "."...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L502-L522
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java
AStar.removeAStarListener
public void removeAStarListener(AStarListener<ST, PT> listener) { """ Remove listener on A* algorithm events. @param listener the listener. """ if (this.listeners != null) { this.listeners.remove(listener); if (this.listeners.isEmpty()) { this.listeners = null; } } }
java
public void removeAStarListener(AStarListener<ST, PT> listener) { if (this.listeners != null) { this.listeners.remove(listener); if (this.listeners.isEmpty()) { this.listeners = null; } } }
[ "public", "void", "removeAStarListener", "(", "AStarListener", "<", "ST", ",", "PT", ">", "listener", ")", "{", "if", "(", "this", ".", "listeners", "!=", "null", ")", "{", "this", ".", "listeners", ".", "remove", "(", "listener", ")", ";", "if", "(", ...
Remove listener on A* algorithm events. @param listener the listener.
[ "Remove", "listener", "on", "A", "*", "algorithm", "events", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L102-L109
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GitLabApi.java
GitLabApi.oauth2Login
public static GitLabApi oauth2Login(String url, String username, CharSequence password) throws GitLabApiException { """ <p>Logs into GitLab using OAuth2 with the provided {@code username} and {@code password}, and creates a new {@code GitLabApi} instance using returned access token.</p> @param url GitLab URL ...
java
public static GitLabApi oauth2Login(String url, String username, CharSequence password) throws GitLabApiException { return (GitLabApi.oauth2Login(ApiVersion.V4, url, username, password, null, null, false)); }
[ "public", "static", "GitLabApi", "oauth2Login", "(", "String", "url", ",", "String", "username", ",", "CharSequence", "password", ")", "throws", "GitLabApiException", "{", "return", "(", "GitLabApi", ".", "oauth2Login", "(", "ApiVersion", ".", "V4", ",", "url", ...
<p>Logs into GitLab using OAuth2 with the provided {@code username} and {@code password}, and creates a new {@code GitLabApi} instance using returned access token.</p> @param url GitLab URL @param username user name for which private token should be obtained @param password a CharSequence containing the password for a...
[ "<p", ">", "Logs", "into", "GitLab", "using", "OAuth2", "with", "the", "provided", "{", "@code", "username", "}", "and", "{", "@code", "password", "}", "and", "creates", "a", "new", "{", "@code", "GitLabApi", "}", "instance", "using", "returned", "access",...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L129-L131
belaban/JGroups
src/org/jgroups/protocols/pbcast/Merger.java
Merger.fetchDigestsFromAllMembersInSubPartition
protected Digest fetchDigestsFromAllMembersInSubPartition(final View view, MergeId merge_id) { """ Multicasts a GET_DIGEST_REQ to all members of this sub partition and waits for all responses (GET_DIGEST_RSP) or N ms. """ final List<Address> current_mbrs=view.getMembers(); // Optimiza...
java
protected Digest fetchDigestsFromAllMembersInSubPartition(final View view, MergeId merge_id) { final List<Address> current_mbrs=view.getMembers(); // Optimization: if we're the only member, we don't need to multicast the get-digest message if(current_mbrs == null || current_mbrs.size() ...
[ "protected", "Digest", "fetchDigestsFromAllMembersInSubPartition", "(", "final", "View", "view", ",", "MergeId", "merge_id", ")", "{", "final", "List", "<", "Address", ">", "current_mbrs", "=", "view", ".", "getMembers", "(", ")", ";", "// Optimization: if we're the...
Multicasts a GET_DIGEST_REQ to all members of this sub partition and waits for all responses (GET_DIGEST_RSP) or N ms.
[ "Multicasts", "a", "GET_DIGEST_REQ", "to", "all", "members", "of", "this", "sub", "partition", "and", "waits", "for", "all", "responses", "(", "GET_DIGEST_RSP", ")", "or", "N", "ms", "." ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/protocols/pbcast/Merger.java#L372-L410
ivanceras/orm
src/main/java/com/ivanceras/db/server/util/DAOGenerator.java
DAOGenerator.startUncurated
public void startUncurated(Configuration conf) throws Exception { """ Curated will correct The ModelDef @param curated @throws Exception """ IDatabaseDev db = (IDatabaseDev) em.getDB();//TODO make sure DB platform can be used for development ModelDefinitionProvider provider = new ModelDefinitionProvider(...
java
public void startUncurated(Configuration conf) throws Exception{ IDatabaseDev db = (IDatabaseDev) em.getDB();//TODO make sure DB platform can be used for development ModelDefinitionProvider provider = new ModelDefinitionProvider(db, conf.dbUser, null, conf.includeSchema); ModelDef[] origModelList = provider.getTa...
[ "public", "void", "startUncurated", "(", "Configuration", "conf", ")", "throws", "Exception", "{", "IDatabaseDev", "db", "=", "(", "IDatabaseDev", ")", "em", ".", "getDB", "(", ")", ";", "//TODO make sure DB platform can be used for development", "ModelDefinitionProvide...
Curated will correct The ModelDef @param curated @throws Exception
[ "Curated", "will", "correct", "The", "ModelDef" ]
train
https://github.com/ivanceras/orm/blob/e63213cb8abefd11df0e2d34b1c95477788e600e/src/main/java/com/ivanceras/db/server/util/DAOGenerator.java#L59-L72
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java
DBSCAN.runDBSCAN
protected void runDBSCAN(Relation<O> relation, RangeQuery<O> rangeQuery) { """ Run the DBSCAN algorithm @param relation Data relation @param rangeQuery Range query class """ final int size = relation.size(); FiniteProgress objprog = LOG.isVerbose() ? new FiniteProgress("Processing objects", size, L...
java
protected void runDBSCAN(Relation<O> relation, RangeQuery<O> rangeQuery) { final int size = relation.size(); FiniteProgress objprog = LOG.isVerbose() ? new FiniteProgress("Processing objects", size, LOG) : null; IndefiniteProgress clusprog = LOG.isVerbose() ? new IndefiniteProgress("Number of clusters", LOG...
[ "protected", "void", "runDBSCAN", "(", "Relation", "<", "O", ">", "relation", ",", "RangeQuery", "<", "O", ">", "rangeQuery", ")", "{", "final", "int", "size", "=", "relation", ".", "size", "(", ")", ";", "FiniteProgress", "objprog", "=", "LOG", ".", "...
Run the DBSCAN algorithm @param relation Data relation @param rangeQuery Range query class
[ "Run", "the", "DBSCAN", "algorithm" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCAN.java#L175-L197
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java
ImmutableChecker.matchMethodInvocation
@Override public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { """ check instantiations of `@ImmutableTypeParameter`s in method invocations """ return checkInvocation( tree, ASTHelpers.getType(tree.getMethodSelect()), state, ASTHelpers.getSymbol(tree)); }
java
@Override public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) { return checkInvocation( tree, ASTHelpers.getType(tree.getMethodSelect()), state, ASTHelpers.getSymbol(tree)); }
[ "@", "Override", "public", "Description", "matchMethodInvocation", "(", "MethodInvocationTree", "tree", ",", "VisitorState", "state", ")", "{", "return", "checkInvocation", "(", "tree", ",", "ASTHelpers", ".", "getType", "(", "tree", ".", "getMethodSelect", "(", "...
check instantiations of `@ImmutableTypeParameter`s in method invocations
[ "check", "instantiations", "of" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableChecker.java#L105-L109
apereo/cas
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java
AbstractCasWebflowEventResolver.putResolvedEventsAsAttribute
protected void putResolvedEventsAsAttribute(final RequestContext context, final Set<Event> resolvedEvents) { """ Put resolved events as attribute. @param context the context @param resolvedEvents the resolved events """ context.getAttributes().put(RESOLVED_AUTHENTICATION_EVENTS, resolvedEven...
java
protected void putResolvedEventsAsAttribute(final RequestContext context, final Set<Event> resolvedEvents) { context.getAttributes().put(RESOLVED_AUTHENTICATION_EVENTS, resolvedEvents); }
[ "protected", "void", "putResolvedEventsAsAttribute", "(", "final", "RequestContext", "context", ",", "final", "Set", "<", "Event", ">", "resolvedEvents", ")", "{", "context", ".", "getAttributes", "(", ")", ".", "put", "(", "RESOLVED_AUTHENTICATION_EVENTS", ",", "...
Put resolved events as attribute. @param context the context @param resolvedEvents the resolved events
[ "Put", "resolved", "events", "as", "attribute", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java#L127-L129
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java
GenericRepository.findPropertyCount
@Transactional public int findPropertyCount(E entity, SearchParameters sp, String path) { """ Count the number of E instances. @param entity a sample entity whose non-null properties may be used as search hint @param sp carries additional search information @param path the path to the property @ret...
java
@Transactional public int findPropertyCount(E entity, SearchParameters sp, String path) { return findPropertyCount(entity, sp, metamodelUtil.toAttributes(path, type)); }
[ "@", "Transactional", "public", "int", "findPropertyCount", "(", "E", "entity", ",", "SearchParameters", "sp", ",", "String", "path", ")", "{", "return", "findPropertyCount", "(", "entity", ",", "sp", ",", "metamodelUtil", ".", "toAttributes", "(", "path", ","...
Count the number of E instances. @param entity a sample entity whose non-null properties may be used as search hint @param sp carries additional search information @param path the path to the property @return the number of entities matching the search.
[ "Count", "the", "number", "of", "E", "instances", "." ]
train
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L379-L382
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java
PolicyEventsInner.listQueryResultsForResourceGroupAsync
public Observable<PolicyEventsQueryResultsInner> listQueryResultsForResourceGroupAsync(String subscriptionId, String resourceGroupName) { """ Queries policy events for the resources under the resource group. @param subscriptionId Microsoft Azure subscription ID. @param resourceGroupName Resource group name. @...
java
public Observable<PolicyEventsQueryResultsInner> listQueryResultsForResourceGroupAsync(String subscriptionId, String resourceGroupName) { return listQueryResultsForResourceGroupWithServiceResponseAsync(subscriptionId, resourceGroupName).map(new Func1<ServiceResponse<PolicyEventsQueryResultsInner>, PolicyEventsQ...
[ "public", "Observable", "<", "PolicyEventsQueryResultsInner", ">", "listQueryResultsForResourceGroupAsync", "(", "String", "subscriptionId", ",", "String", "resourceGroupName", ")", "{", "return", "listQueryResultsForResourceGroupWithServiceResponseAsync", "(", "subscriptionId", ...
Queries policy events for the resources under the resource group. @param subscriptionId Microsoft Azure subscription ID. @param resourceGroupName Resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PolicyEventsQueryResultsInner object
[ "Queries", "policy", "events", "for", "the", "resources", "under", "the", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java#L509-L516
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java
PreConditionException.validateLesserThan
public static void validateLesserThan( Number value, Number limit, String identifier ) throws PreConditionException { """ Validates that the value is lesser than a limit. <p/> This method ensures that <code>value < limit</code>. @param identifier The name of the object. @param limit The limit th...
java
public static void validateLesserThan( Number value, Number limit, String identifier ) throws PreConditionException { if( value.doubleValue() < limit.doubleValue() ) { return; } throw new PreConditionException( identifier + " was not lesser than " + limit + ". Was...
[ "public", "static", "void", "validateLesserThan", "(", "Number", "value", ",", "Number", "limit", ",", "String", "identifier", ")", "throws", "PreConditionException", "{", "if", "(", "value", ".", "doubleValue", "(", ")", "<", "limit", ".", "doubleValue", "(",...
Validates that the value is lesser than a limit. <p/> This method ensures that <code>value < limit</code>. @param identifier The name of the object. @param limit The limit that the value must be smaller than. @param value The value to be tested. @throws PreConditionException if the condition is not met.
[ "Validates", "that", "the", "value", "is", "lesser", "than", "a", "limit", ".", "<p", "/", ">", "This", "method", "ensures", "that", "<code", ">", "value", "<", "limit<", "/", "code", ">", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java#L190-L198
kiegroup/drools
drools-templates/src/main/java/org/drools/template/DataProviderCompiler.java
DataProviderCompiler.compile
public String compile(final DataProvider dataProvider, final InputStream templateStream, boolean replaceOptionals) { """ Generates DRL from a data provider for the spreadsheet data and templates. @param dataProvider the data provider for the spreadsheet data...
java
public String compile(final DataProvider dataProvider, final InputStream templateStream, boolean replaceOptionals) { DefaultTemplateContainer tc = new DefaultTemplateContainer(templateStream, replaceOptionals); closeStream(templateStream); retu...
[ "public", "String", "compile", "(", "final", "DataProvider", "dataProvider", ",", "final", "InputStream", "templateStream", ",", "boolean", "replaceOptionals", ")", "{", "DefaultTemplateContainer", "tc", "=", "new", "DefaultTemplateContainer", "(", "templateStream", ","...
Generates DRL from a data provider for the spreadsheet data and templates. @param dataProvider the data provider for the spreadsheet data @param templateStream the InputStream for reading the templates @return the generated DRL text as a String
[ "Generates", "DRL", "from", "a", "data", "provider", "for", "the", "spreadsheet", "data", "and", "templates", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-templates/src/main/java/org/drools/template/DataProviderCompiler.java#L94-L101
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpConnection.java
HttpConnection.getRequestOutputStream
public OutputStream getRequestOutputStream() throws IOException, IllegalStateException { """ Returns an {@link OutputStream} suitable for writing the request. @throws IllegalStateException if the connection is not open @throws IOException if an I/O problem occurs @return a stream to write the request ...
java
public OutputStream getRequestOutputStream() throws IOException, IllegalStateException { LOG.trace("enter HttpConnection.getRequestOutputStream()"); assertOpen(); OutputStream out = this.outputStream; if (Wire.CONTENT_WIRE.enabled()) { out = new WireLogOutputStream(ou...
[ "public", "OutputStream", "getRequestOutputStream", "(", ")", "throws", "IOException", ",", "IllegalStateException", "{", "LOG", ".", "trace", "(", "\"enter HttpConnection.getRequestOutputStream()\"", ")", ";", "assertOpen", "(", ")", ";", "OutputStream", "out", "=", ...
Returns an {@link OutputStream} suitable for writing the request. @throws IllegalStateException if the connection is not open @throws IOException if an I/O problem occurs @return a stream to write the request to
[ "Returns", "an", "{", "@link", "OutputStream", "}", "suitable", "for", "writing", "the", "request", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpConnection.java#L870-L879
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsEditorBase.java
CmsEditorBase.loadContentDefinition
public void loadContentDefinition(final String entityId, final Command callback) { """ Loads the content definition for the given entity and executes the callback on success.<p> @param entityId the entity id @param callback the callback """ AsyncCallback<CmsContentDefinition> asyncCallback = new...
java
public void loadContentDefinition(final String entityId, final Command callback) { AsyncCallback<CmsContentDefinition> asyncCallback = new AsyncCallback<CmsContentDefinition>() { public void onFailure(Throwable caught) { onRpcError(caught); } publ...
[ "public", "void", "loadContentDefinition", "(", "final", "String", "entityId", ",", "final", "Command", "callback", ")", "{", "AsyncCallback", "<", "CmsContentDefinition", ">", "asyncCallback", "=", "new", "AsyncCallback", "<", "CmsContentDefinition", ">", "(", ")",...
Loads the content definition for the given entity and executes the callback on success.<p> @param entityId the entity id @param callback the callback
[ "Loads", "the", "content", "definition", "for", "the", "given", "entity", "and", "executes", "the", "callback", "on", "success", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsEditorBase.java#L336-L352
jbossas/jboss-invocation
src/main/java/org/jboss/invocation/proxy/ProxyFactory.java
ProxyFactory.getInvocationHandler
public InvocationHandler getInvocationHandler(Object proxy) { """ Returns the invocation handler for a proxy created from this factory. @param proxy the proxy @return the invocation handler """ Field field = getInvocationHandlerField(); try { return (InvocationHandler) field.get...
java
public InvocationHandler getInvocationHandler(Object proxy) { Field field = getInvocationHandlerField(); try { return (InvocationHandler) field.get(proxy); } catch (IllegalArgumentException e) { throw new RuntimeException("Object is not a proxy of correct type", e); ...
[ "public", "InvocationHandler", "getInvocationHandler", "(", "Object", "proxy", ")", "{", "Field", "field", "=", "getInvocationHandlerField", "(", ")", ";", "try", "{", "return", "(", "InvocationHandler", ")", "field", ".", "get", "(", "proxy", ")", ";", "}", ...
Returns the invocation handler for a proxy created from this factory. @param proxy the proxy @return the invocation handler
[ "Returns", "the", "invocation", "handler", "for", "a", "proxy", "created", "from", "this", "factory", "." ]
train
https://github.com/jbossas/jboss-invocation/blob/f72586a554264cbc78fcdad9fdd3e84b833249c9/src/main/java/org/jboss/invocation/proxy/ProxyFactory.java#L375-L384
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicatedCloud_serviceName_upgradeRessource_GET
public ArrayList<String> dedicatedCloud_serviceName_upgradeRessource_GET(String serviceName, OvhUpgradeTypeEnum upgradeType, Long upgradedRessourceId, OvhUpgradeRessourceTypeEnum upgradedRessourceType) throws IOException { """ Get allowed durations for 'upgradeRessource' option REST: GET /order/dedicatedCloud/{...
java
public ArrayList<String> dedicatedCloud_serviceName_upgradeRessource_GET(String serviceName, OvhUpgradeTypeEnum upgradeType, Long upgradedRessourceId, OvhUpgradeRessourceTypeEnum upgradedRessourceType) throws IOException { String qPath = "/order/dedicatedCloud/{serviceName}/upgradeRessource"; StringBuilder sb = pat...
[ "public", "ArrayList", "<", "String", ">", "dedicatedCloud_serviceName_upgradeRessource_GET", "(", "String", "serviceName", ",", "OvhUpgradeTypeEnum", "upgradeType", ",", "Long", "upgradedRessourceId", ",", "OvhUpgradeRessourceTypeEnum", "upgradedRessourceType", ")", "throws", ...
Get allowed durations for 'upgradeRessource' option REST: GET /order/dedicatedCloud/{serviceName}/upgradeRessource @param upgradedRessourceType [required] The type of ressource you want to upgrade. @param upgradedRessourceId [required] The id of a particular ressource you want to upgrade in your Private Cloud (useless...
[ "Get", "allowed", "durations", "for", "upgradeRessource", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5735-L5743
VueGWT/vue-gwt
processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java
TemplateParser.processVForValue
private String processVForValue(String vForValue) { """ Process a v-for value. It will register the loop variables as a local variable in the context stack. @param vForValue The value of the v-for attribute @return A processed v-for value, should be placed in the HTML in place of the original v-for value ...
java
private String processVForValue(String vForValue) { VForDefinition vForDef = new VForDefinition(vForValue, context, logger); // Set return of the "in" expression currentExpressionReturnType = vForDef.getInExpressionType(); String inExpression = this.processExpression(vForDef.getInExpression()); /...
[ "private", "String", "processVForValue", "(", "String", "vForValue", ")", "{", "VForDefinition", "vForDef", "=", "new", "VForDefinition", "(", "vForValue", ",", "context", ",", "logger", ")", ";", "// Set return of the \"in\" expression", "currentExpressionReturnType", ...
Process a v-for value. It will register the loop variables as a local variable in the context stack. @param vForValue The value of the v-for attribute @return A processed v-for value, should be placed in the HTML in place of the original v-for value
[ "Process", "a", "v", "-", "for", "value", ".", "It", "will", "register", "the", "loop", "variables", "as", "a", "local", "variable", "in", "the", "context", "stack", "." ]
train
https://github.com/VueGWT/vue-gwt/blob/961cd83aed6fe8e2dd80c279847f1b3f62918a1f/processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java#L524-L534
alkacon/opencms-core
src/org/opencms/loader/CmsResourceManager.java
CmsResourceManager.getTemplateLoaderFacade
public CmsTemplateLoaderFacade getTemplateLoaderFacade(CmsObject cms, CmsResource resource, String templateProperty) throws CmsException { """ Returns a template loader facade for the given file.<p> @param cms the current OpenCms user context @param resource the requested file @param templateProperty the pr...
java
public CmsTemplateLoaderFacade getTemplateLoaderFacade(CmsObject cms, CmsResource resource, String templateProperty) throws CmsException { return getTemplateLoaderFacade(cms, null, resource, templateProperty); }
[ "public", "CmsTemplateLoaderFacade", "getTemplateLoaderFacade", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "String", "templateProperty", ")", "throws", "CmsException", "{", "return", "getTemplateLoaderFacade", "(", "cms", ",", "null", ",", "resource",...
Returns a template loader facade for the given file.<p> @param cms the current OpenCms user context @param resource the requested file @param templateProperty the property to read for the template @return a resource loader facade for the given file @throws CmsException if something goes wrong
[ "Returns", "a", "template", "loader", "facade", "for", "the", "given", "file", ".", "<p", ">", "@param", "cms", "the", "current", "OpenCms", "user", "context", "@param", "resource", "the", "requested", "file", "@param", "templateProperty", "the", "property", "...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsResourceManager.java#L998-L1002
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.disableAutoScaleAsync
public Observable<Void> disableAutoScaleAsync(String poolId, PoolDisableAutoScaleOptions poolDisableAutoScaleOptions) { """ Disables automatic scaling for a pool. @param poolId The ID of the pool on which to disable automatic scaling. @param poolDisableAutoScaleOptions Additional parameters for the operation ...
java
public Observable<Void> disableAutoScaleAsync(String poolId, PoolDisableAutoScaleOptions poolDisableAutoScaleOptions) { return disableAutoScaleWithServiceResponseAsync(poolId, poolDisableAutoScaleOptions).map(new Func1<ServiceResponseWithHeaders<Void, PoolDisableAutoScaleHeaders>, Void>() { @Overrid...
[ "public", "Observable", "<", "Void", ">", "disableAutoScaleAsync", "(", "String", "poolId", ",", "PoolDisableAutoScaleOptions", "poolDisableAutoScaleOptions", ")", "{", "return", "disableAutoScaleWithServiceResponseAsync", "(", "poolId", ",", "poolDisableAutoScaleOptions", ")...
Disables automatic scaling for a pool. @param poolId The ID of the pool on which to disable automatic scaling. @param poolDisableAutoScaleOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponseWithHeaders} object if su...
[ "Disables", "automatic", "scaling", "for", "a", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L2183-L2190
alkacon/opencms-core
src/org/opencms/configuration/CmsVfsConfiguration.java
CmsVfsConfiguration.getFolderTranslator
public CmsResourceTranslator getFolderTranslator() { """ Returns the folder resource translator that has been initialized with the configured folder translation rules.<p> @return the folder resource translator """ String[] array = new String[0]; if (m_folderTranslationEnabled) { ...
java
public CmsResourceTranslator getFolderTranslator() { String[] array = new String[0]; if (m_folderTranslationEnabled) { array = new String[m_folderTranslations.size()]; for (int i = 0; i < m_folderTranslations.size(); i++) { array[i] = m_folderTranslations.get(i);...
[ "public", "CmsResourceTranslator", "getFolderTranslator", "(", ")", "{", "String", "[", "]", "array", "=", "new", "String", "[", "0", "]", ";", "if", "(", "m_folderTranslationEnabled", ")", "{", "array", "=", "new", "String", "[", "m_folderTranslations", ".", ...
Returns the folder resource translator that has been initialized with the configured folder translation rules.<p> @return the folder resource translator
[ "Returns", "the", "folder", "resource", "translator", "that", "has", "been", "initialized", "with", "the", "configured", "folder", "translation", "rules", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsVfsConfiguration.java#L826-L836
MGunlogson/CuckooFilter4J
src/main/java/com/github/mgunlogson/cuckoofilter4j/IndexTagCalc.java
IndexTagCalc.isHashConfigurationIsSupported
private static boolean isHashConfigurationIsSupported(long numBuckets, int tagBits, int hashSize) { """ Determines if the chosen hash function is long enough for the table configuration used. """ int hashBitsNeeded = getTotalBitsNeeded(numBuckets, tagBits); switch (hashSize) { case 32: case 64: ...
java
private static boolean isHashConfigurationIsSupported(long numBuckets, int tagBits, int hashSize) { int hashBitsNeeded = getTotalBitsNeeded(numBuckets, tagBits); switch (hashSize) { case 32: case 64: return hashBitsNeeded <= hashSize; default: } if (hashSize >= 128) return tagBits <= 64 && ...
[ "private", "static", "boolean", "isHashConfigurationIsSupported", "(", "long", "numBuckets", ",", "int", "tagBits", ",", "int", "hashSize", ")", "{", "int", "hashBitsNeeded", "=", "getTotalBitsNeeded", "(", "numBuckets", ",", "tagBits", ")", ";", "switch", "(", ...
Determines if the chosen hash function is long enough for the table configuration used.
[ "Determines", "if", "the", "chosen", "hash", "function", "is", "long", "enough", "for", "the", "table", "configuration", "used", "." ]
train
https://github.com/MGunlogson/CuckooFilter4J/blob/e8472aa150b201f05046d1c81cac5a5ca4348db8/src/main/java/com/github/mgunlogson/cuckoofilter4j/IndexTagCalc.java#L111-L122
apache/incubator-gobblin
gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/BaseJdbcBufferedInserter.java
BaseJdbcBufferedInserter.initializeBatch
protected void initializeBatch(String databaseName, String table) throws SQLException { """ Initializes variables for batch insert and pre-compute PreparedStatement based on requested batch size and parameter size. @param databaseName @param table @throws SQLException """ this.insertStmtPrefix = c...
java
protected void initializeBatch(String databaseName, String table) throws SQLException { this.insertStmtPrefix = createInsertStatementStr(databaseName, table); this.insertPstmtForFixedBatch = this.conn.prepareStatement(createPrepareStatementStr(this.batchSize)); LOG.info(String.format("Initiali...
[ "protected", "void", "initializeBatch", "(", "String", "databaseName", ",", "String", "table", ")", "throws", "SQLException", "{", "this", ".", "insertStmtPrefix", "=", "createInsertStatementStr", "(", "databaseName", ",", "table", ")", ";", "this", ".", "insertPs...
Initializes variables for batch insert and pre-compute PreparedStatement based on requested batch size and parameter size. @param databaseName @param table @throws SQLException
[ "Initializes", "variables", "for", "batch", "insert", "and", "pre", "-", "compute", "PreparedStatement", "based", "on", "requested", "batch", "size", "and", "parameter", "size", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/writer/commands/BaseJdbcBufferedInserter.java#L132-L138
pravega/pravega
common/src/main/java/io/pravega/common/util/TypedProperties.java
TypedProperties.getEnum
public <T extends Enum<T>> T getEnum(Property<T> property, Class<T> enumClass) throws ConfigurationException { """ Gets the value of an Enumeration property. @param property The Property to get. @param enumClass Class defining return type. @param <T> Type of Enumeration. @return The property value or ...
java
public <T extends Enum<T>> T getEnum(Property<T> property, Class<T> enumClass) throws ConfigurationException { return tryGet(property, s -> Enum.valueOf(enumClass, s)); }
[ "public", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnum", "(", "Property", "<", "T", ">", "property", ",", "Class", "<", "T", ">", "enumClass", ")", "throws", "ConfigurationException", "{", "return", "tryGet", "(", "property", ",", "s"...
Gets the value of an Enumeration property. @param property The Property to get. @param enumClass Class defining return type. @param <T> Type of Enumeration. @return The property value or default value, if no such is defined in the base Properties. @throws ConfigurationException When the given property name does...
[ "Gets", "the", "value", "of", "an", "Enumeration", "property", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/TypedProperties.java#L105-L107
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Streams.java
Streams.composedClose
static Runnable composedClose(BaseStream<?, ?> a, BaseStream<?, ?> b) { """ Given two streams, return a Runnable that executes both of their {@link BaseStream#close} methods in sequence, even if the first throws an exception, and if both throw exceptions, add any exceptions thrown by the second as suppressed ex...
java
static Runnable composedClose(BaseStream<?, ?> a, BaseStream<?, ?> b) { return new Runnable() { @Override public void run() { try { a.close(); } catch (Throwable e1) { try { b....
[ "static", "Runnable", "composedClose", "(", "BaseStream", "<", "?", ",", "?", ">", "a", ",", "BaseStream", "<", "?", ",", "?", ">", "b", ")", "{", "return", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", ...
Given two streams, return a Runnable that executes both of their {@link BaseStream#close} methods in sequence, even if the first throws an exception, and if both throw exceptions, add any exceptions thrown by the second as suppressed exceptions of the first.
[ "Given", "two", "streams", "return", "a", "Runnable", "that", "executes", "both", "of", "their", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Streams.java#L874-L895
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Strings.java
Strings.removeWord
public static String removeWord(final String host, final String word) { """ <p> removeWord. </p> @param host a {@link java.lang.String} object. @param word a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ return removeWord(host, word, DELIMITER); }
java
public static String removeWord(final String host, final String word) { return removeWord(host, word, DELIMITER); }
[ "public", "static", "String", "removeWord", "(", "final", "String", "host", ",", "final", "String", "word", ")", "{", "return", "removeWord", "(", "host", ",", "word", ",", "DELIMITER", ")", ";", "}" ]
<p> removeWord. </p> @param host a {@link java.lang.String} object. @param word a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "<p", ">", "removeWord", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L630-L633
kiegroup/drools
drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/Providers.java
Providers.resourceProvider
public static Provider resourceProvider(String pathToResource, Charset encoding) throws IOException { """ Provide a Provider from the resource found in the current class loader with the provided encoding.<br/> As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource """ ...
java
public static Provider resourceProvider(String pathToResource, Charset encoding) throws IOException { ClassLoader classLoader = Provider.class.getClassLoader(); return resourceProvider(classLoader, pathToResource, encoding); }
[ "public", "static", "Provider", "resourceProvider", "(", "String", "pathToResource", ",", "Charset", "encoding", ")", "throws", "IOException", "{", "ClassLoader", "classLoader", "=", "Provider", ".", "class", ".", "getClassLoader", "(", ")", ";", "return", "resour...
Provide a Provider from the resource found in the current class loader with the provided encoding.<br/> As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource
[ "Provide", "a", "Provider", "from", "the", "resource", "found", "in", "the", "current", "class", "loader", "with", "the", "provided", "encoding", ".", "<br", "/", ">", "As", "resource", "is", "accessed", "through", "a", "class", "loader", "a", "leading", "...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/java/org/drools/constraint/parser/Providers.java#L106-L109
dita-ot/dita-ot
src/main/java/org/dita/dost/module/CopyToModule.java
CopyToModule.copyFileWithPIReplaced
private void copyFileWithPIReplaced(final URI src, final URI target, final URI copytoTargetFilename, final URI inputMapInTemp) { """ Copy files and replace workdir PI contents. @param src source URI in temporary directory @param target target URI in temporary directory @param co...
java
private void copyFileWithPIReplaced(final URI src, final URI target, final URI copytoTargetFilename, final URI inputMapInTemp) { assert src.isAbsolute(); assert target.isAbsolute(); assert !copytoTargetFilename.isAbsolute(); assert inputMapInTemp.isAbsolute(); final File workdir ...
[ "private", "void", "copyFileWithPIReplaced", "(", "final", "URI", "src", ",", "final", "URI", "target", ",", "final", "URI", "copytoTargetFilename", ",", "final", "URI", "inputMapInTemp", ")", "{", "assert", "src", ".", "isAbsolute", "(", ")", ";", "assert", ...
Copy files and replace workdir PI contents. @param src source URI in temporary directory @param target target URI in temporary directory @param copytoTargetFilename target URI relative to temporary directory @param inputMapInTemp input map URI in temporary directory
[ "Copy", "files", "and", "replace", "workdir", "PI", "contents", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L198-L218
pravega/pravega
controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java
StreamMetrics.reportActiveSegments
public static void reportActiveSegments(String scope, String streamName, int numSegments) { """ Reports the number of active segments for a Stream. @param scope Scope. @param streamName Name of the Stream. @param numSegments Number of active segments in this Stream. """ DYNAMIC_LOGGER...
java
public static void reportActiveSegments(String scope, String streamName, int numSegments) { DYNAMIC_LOGGER.reportGaugeValue(SEGMENTS_COUNT, numSegments, streamTags(scope, streamName)); }
[ "public", "static", "void", "reportActiveSegments", "(", "String", "scope", ",", "String", "streamName", ",", "int", "numSegments", ")", "{", "DYNAMIC_LOGGER", ".", "reportGaugeValue", "(", "SEGMENTS_COUNT", ",", "numSegments", ",", "streamTags", "(", "scope", ","...
Reports the number of active segments for a Stream. @param scope Scope. @param streamName Name of the Stream. @param numSegments Number of active segments in this Stream.
[ "Reports", "the", "number", "of", "active", "segments", "for", "a", "Stream", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java#L200-L202
gwt-maven-plugin/gwt-maven-plugin
src/main/java/org/codehaus/mojo/gwt/ClasspathBuilder.java
ClasspathBuilder.addSources
private void addSources( final Collection<File> items, final Collection<String> sourceRoots ) { """ Add source path and resource paths of the project to the list of classpath items. @param items Classpath items. @param sourceRoots """ for ( String path : sourceRoots ) { items.ad...
java
private void addSources( final Collection<File> items, final Collection<String> sourceRoots ) { for ( String path : sourceRoots ) { items.add( new File( path ) ); } }
[ "private", "void", "addSources", "(", "final", "Collection", "<", "File", ">", "items", ",", "final", "Collection", "<", "String", ">", "sourceRoots", ")", "{", "for", "(", "String", "path", ":", "sourceRoots", ")", "{", "items", ".", "add", "(", "new", ...
Add source path and resource paths of the project to the list of classpath items. @param items Classpath items. @param sourceRoots
[ "Add", "source", "path", "and", "resource", "paths", "of", "the", "project", "to", "the", "list", "of", "classpath", "items", "." ]
train
https://github.com/gwt-maven-plugin/gwt-maven-plugin/blob/0cdd5054b43f182cc22a8acf61ec79ac42b0dfdc/src/main/java/org/codehaus/mojo/gwt/ClasspathBuilder.java#L273-L279
thelinmichael/spotify-web-api-java
src/main/java/com/wrapper/spotify/SpotifyApi.java
SpotifyApi.unfollowPlaylist
public UnfollowPlaylistRequest.Builder unfollowPlaylist(String owner_id, String playlist_id) { """ Remove the current user as a follower of a playlist. @param owner_id The owners username. @param playlist_id The playlist's ID. @return An {@link UnfollowPlaylistRequest.Builder}. @see <a href="https://devel...
java
public UnfollowPlaylistRequest.Builder unfollowPlaylist(String owner_id, String playlist_id) { return new UnfollowPlaylistRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .owner_id(owner_id) .playlist_id(playlist_id); }
[ "public", "UnfollowPlaylistRequest", ".", "Builder", "unfollowPlaylist", "(", "String", "owner_id", ",", "String", "playlist_id", ")", "{", "return", "new", "UnfollowPlaylistRequest", ".", "Builder", "(", "accessToken", ")", ".", "setDefaults", "(", "httpManager", "...
Remove the current user as a follower of a playlist. @param owner_id The owners username. @param playlist_id The playlist's ID. @return An {@link UnfollowPlaylistRequest.Builder}. @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URLs &amp; IDs</a>
[ "Remove", "the", "current", "user", "as", "a", "follower", "of", "a", "playlist", "." ]
train
https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L725-L730
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java
BondTools.giveAngleBothMethods
public static double giveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) { """ Gives the angle between two lines starting at atom from and going to to1 and to2. If bool=false the angle starts from the middle line and goes from 0 to PI or 0 to -PI if the to2 is on the left or right side of the li...
java
public static double giveAngleBothMethods(IAtom from, IAtom to1, IAtom to2, boolean bool) { return giveAngleBothMethods(from.getPoint2d(), to1.getPoint2d(), to2.getPoint2d(), bool); }
[ "public", "static", "double", "giveAngleBothMethods", "(", "IAtom", "from", ",", "IAtom", "to1", ",", "IAtom", "to2", ",", "boolean", "bool", ")", "{", "return", "giveAngleBothMethods", "(", "from", ".", "getPoint2d", "(", ")", ",", "to1", ".", "getPoint2d",...
Gives the angle between two lines starting at atom from and going to to1 and to2. If bool=false the angle starts from the middle line and goes from 0 to PI or 0 to -PI if the to2 is on the left or right side of the line. If bool=true the angle goes from 0 to 2PI. @param from the atom to view from. @param to1 firs...
[ "Gives", "the", "angle", "between", "two", "lines", "starting", "at", "atom", "from", "and", "going", "to", "to1", "and", "to2", ".", "If", "bool", "=", "false", "the", "angle", "starts", "from", "the", "middle", "line", "and", "goes", "from", "0", "to...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L157-L159
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookMessage.java
WebhookMessage.embeds
public static WebhookMessage embeds(MessageEmbed first, MessageEmbed... embeds) { """ forcing first embed as we expect at least one entry (Effective Java 3rd. Edition - Item 53) """ Checks.notNull(first, "Embeds"); Checks.noneNull(embeds, "Embeds"); List<MessageEmbed> list = new Array...
java
public static WebhookMessage embeds(MessageEmbed first, MessageEmbed... embeds) { Checks.notNull(first, "Embeds"); Checks.noneNull(embeds, "Embeds"); List<MessageEmbed> list = new ArrayList<>(1 + embeds.length); list.add(first); Collections.addAll(list, embeds); ret...
[ "public", "static", "WebhookMessage", "embeds", "(", "MessageEmbed", "first", ",", "MessageEmbed", "...", "embeds", ")", "{", "Checks", ".", "notNull", "(", "first", ",", "\"Embeds\"", ")", ";", "Checks", ".", "noneNull", "(", "embeds", ",", "\"Embeds\"", ")...
forcing first embed as we expect at least one entry (Effective Java 3rd. Edition - Item 53)
[ "forcing", "first", "embed", "as", "we", "expect", "at", "least", "one", "entry", "(", "Effective", "Java", "3rd", ".", "Edition", "-", "Item", "53", ")" ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessage.java#L77-L85
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/oauth/OAuth2SessionManager.java
OAuth2SessionManager.fetchUserCredentials
UserCredentials fetchUserCredentials( String code ) { """ Fetches user credentials @param code oauth2 OTP code @return The user credentials (without userId) """ HttpPost post = new HttpPost( accessTokenUrl ); List<NameValuePair> parameters = new ArrayList<NameValuePair>(); paramete...
java
UserCredentials fetchUserCredentials( String code ) { HttpPost post = new HttpPost( accessTokenUrl ); List<NameValuePair> parameters = new ArrayList<NameValuePair>(); parameters.add( new BasicNameValuePair( OAuth2.CLIENT_ID, appInfo.getAppId() ) ); parameters.add( new BasicNameValue...
[ "UserCredentials", "fetchUserCredentials", "(", "String", "code", ")", "{", "HttpPost", "post", "=", "new", "HttpPost", "(", "accessTokenUrl", ")", ";", "List", "<", "NameValuePair", ">", "parameters", "=", "new", "ArrayList", "<", "NameValuePair", ">", "(", "...
Fetches user credentials @param code oauth2 OTP code @return The user credentials (without userId)
[ "Fetches", "user", "credentials" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/oauth/OAuth2SessionManager.java#L198-L242
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.addAll
public static <T> boolean addAll(Collection<T> self, Iterable<T> items) { """ Adds all items from the iterable to the Collection. @param self the collection @param items the items to add @return true if the collection changed """ boolean changed = false; for (T next : items) { ...
java
public static <T> boolean addAll(Collection<T> self, Iterable<T> items) { boolean changed = false; for (T next : items) { if (self.add(next)) changed = true; } return changed; }
[ "public", "static", "<", "T", ">", "boolean", "addAll", "(", "Collection", "<", "T", ">", "self", ",", "Iterable", "<", "T", ">", "items", ")", "{", "boolean", "changed", "=", "false", ";", "for", "(", "T", "next", ":", "items", ")", "{", "if", "...
Adds all items from the iterable to the Collection. @param self the collection @param items the items to add @return true if the collection changed
[ "Adds", "all", "items", "from", "the", "iterable", "to", "the", "Collection", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L9387-L9393
lessthanoptimal/BoofCV
examples/src/main/java/boofcv/examples/imageprocessing/ExamplePlanarImages.java
ExamplePlanarImages.pixelAccess
public static void pixelAccess( BufferedImage input ) { """ Values of pixels can be read and modified by accessing the internal {@link ImageGray}. """ // convert the BufferedImage into a Planar Planar<GrayU8> image = ConvertBufferedImage.convertFromPlanar(input,null,true,GrayU8.class); int x = 10, y = ...
java
public static void pixelAccess( BufferedImage input ) { // convert the BufferedImage into a Planar Planar<GrayU8> image = ConvertBufferedImage.convertFromPlanar(input,null,true,GrayU8.class); int x = 10, y = 10; // to access a pixel you first access the gray image for the each band for( int i = 0; i < imag...
[ "public", "static", "void", "pixelAccess", "(", "BufferedImage", "input", ")", "{", "// convert the BufferedImage into a Planar", "Planar", "<", "GrayU8", ">", "image", "=", "ConvertBufferedImage", ".", "convertFromPlanar", "(", "input", ",", "null", ",", "true", ",...
Values of pixels can be read and modified by accessing the internal {@link ImageGray}.
[ "Values", "of", "pixels", "can", "be", "read", "and", "modified", "by", "accessing", "the", "internal", "{" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/imageprocessing/ExamplePlanarImages.java#L86-L143
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/mock/CommonsAssert.java
CommonsAssert.assertEquals
public static <T> void assertEquals (@Nullable final String sUserMsg, @Nullable final T x, @Nullable final T y) { """ Like JUnit assertEquals but using {@link EqualsHelper}. @param sUserMsg Optional user message. May be <code>null</code>. @param x Fist object. May be <code>null</code> @param y Second objec...
java
public static <T> void assertEquals (@Nullable final String sUserMsg, @Nullable final T x, @Nullable final T y) { if (!EqualsHelper.equals (x, y)) fail ("<" + x + "> is not equal to <" + y + ">" + (sUserMsg != null && sUserMsg.length () > 0 ? ": " ...
[ "public", "static", "<", "T", ">", "void", "assertEquals", "(", "@", "Nullable", "final", "String", "sUserMsg", ",", "@", "Nullable", "final", "T", "x", ",", "@", "Nullable", "final", "T", "y", ")", "{", "if", "(", "!", "EqualsHelper", ".", "equals", ...
Like JUnit assertEquals but using {@link EqualsHelper}. @param sUserMsg Optional user message. May be <code>null</code>. @param x Fist object. May be <code>null</code> @param y Second object. May be <code>null</code>.
[ "Like", "JUnit", "assertEquals", "but", "using", "{", "@link", "EqualsHelper", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/mock/CommonsAssert.java#L185-L194
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/JwtFatActions.java
JwtFatActions.logInAndObtainJwtCookie
public Cookie logInAndObtainJwtCookie(String testName, String protectedUrl, String username, String password) throws Exception { """ Accesses the protected resource and logs in successfully, ensuring that a JWT SSO cookie is included in the result. """ return logInAndObtainJwtCookie(testName, new WebCl...
java
public Cookie logInAndObtainJwtCookie(String testName, String protectedUrl, String username, String password) throws Exception { return logInAndObtainJwtCookie(testName, new WebClient(), protectedUrl, username, password); }
[ "public", "Cookie", "logInAndObtainJwtCookie", "(", "String", "testName", ",", "String", "protectedUrl", ",", "String", "username", ",", "String", "password", ")", "throws", "Exception", "{", "return", "logInAndObtainJwtCookie", "(", "testName", ",", "new", "WebClie...
Accesses the protected resource and logs in successfully, ensuring that a JWT SSO cookie is included in the result.
[ "Accesses", "the", "protected", "resource", "and", "logs", "in", "successfully", "ensuring", "that", "a", "JWT", "SSO", "cookie", "is", "included", "in", "the", "result", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/JwtFatActions.java#L29-L31
apache/incubator-atlas
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
HiveMetaStoreBridge.getTableQualifiedName
public static String getTableQualifiedName(String clusterName, String dbName, String tableName, boolean isTemporaryTable) { """ Construct the qualified name used to uniquely identify a Table instance in Atlas. @param clusterName Name of the cluster to which the Hive component belongs @param dbName Name of the Hi...
java
public static String getTableQualifiedName(String clusterName, String dbName, String tableName, boolean isTemporaryTable) { String tableTempName = tableName; if (isTemporaryTable) { if (SessionState.get() != null && SessionState.get().getSessionId() != null) { tableTempName =...
[ "public", "static", "String", "getTableQualifiedName", "(", "String", "clusterName", ",", "String", "dbName", ",", "String", "tableName", ",", "boolean", "isTemporaryTable", ")", "{", "String", "tableTempName", "=", "tableName", ";", "if", "(", "isTemporaryTable", ...
Construct the qualified name used to uniquely identify a Table instance in Atlas. @param clusterName Name of the cluster to which the Hive component belongs @param dbName Name of the Hive database to which the Table belongs @param tableName Name of the Hive table @return Unique qualified name to identify the Table inst...
[ "Construct", "the", "qualified", "name", "used", "to", "uniquely", "identify", "a", "Table", "instance", "in", "Atlas", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java#L374-L384
petergeneric/stdlib
guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/resteasy/GuicedResteasy.java
GuicedResteasy.configure
protected void configure(ServletContainerDispatcher dispatcher) throws ServletException { """ Try to initialise a ServletContainerDispatcher with the connection to the Guice REST services """ // Make sure we are registered with the Guice registry registry.register(this, true); // Configure the dispatche...
java
protected void configure(ServletContainerDispatcher dispatcher) throws ServletException { // Make sure we are registered with the Guice registry registry.register(this, true); // Configure the dispatcher final Registry resteasyRegistry; final ResteasyProviderFactory providerFactory; { final ResteasyReq...
[ "protected", "void", "configure", "(", "ServletContainerDispatcher", "dispatcher", ")", "throws", "ServletException", "{", "// Make sure we are registered with the Guice registry", "registry", ".", "register", "(", "this", ",", "true", ")", ";", "// Configure the dispatcher",...
Try to initialise a ServletContainerDispatcher with the connection to the Guice REST services
[ "Try", "to", "initialise", "a", "ServletContainerDispatcher", "with", "the", "connection", "to", "the", "Guice", "REST", "services" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/resteasy/GuicedResteasy.java#L330-L386
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java
FaultManager.addNode
public void addNode(String name, Set<ResourceType> resourceTypes) { """ Notify the fault manager of a new node. @param name The node name. @param resourceTypes The types of resource on this node. """ List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>( resourceTypes.size()); ...
java
public void addNode(String name, Set<ResourceType> resourceTypes) { List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>( resourceTypes.size()); for (ResourceType type : resourceTypes) { faultStats.add(new FaultStatsForType(type)); } nodeToFaultStats.put(name, faultStats);...
[ "public", "void", "addNode", "(", "String", "name", ",", "Set", "<", "ResourceType", ">", "resourceTypes", ")", "{", "List", "<", "FaultStatsForType", ">", "faultStats", "=", "new", "ArrayList", "<", "FaultStatsForType", ">", "(", "resourceTypes", ".", "size",...
Notify the fault manager of a new node. @param name The node name. @param resourceTypes The types of resource on this node.
[ "Notify", "the", "fault", "manager", "of", "a", "new", "node", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/FaultManager.java#L115-L122
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
HiveSessionImplwithUGI.cancelDelegationToken
private void cancelDelegationToken() throws HiveSQLException { """ If the session has a delegation token obtained from the metastore, then cancel it """ if (delegationTokenStr != null) { try { Hive.get(getHiveConf()).cancelDelegationToken(delegationTokenStr); } catch (HiveException e) {...
java
private void cancelDelegationToken() throws HiveSQLException { if (delegationTokenStr != null) { try { Hive.get(getHiveConf()).cancelDelegationToken(delegationTokenStr); } catch (HiveException e) { throw new HiveSQLException("Couldn't cancel delegation token", e); } // close ...
[ "private", "void", "cancelDelegationToken", "(", ")", "throws", "HiveSQLException", "{", "if", "(", "delegationTokenStr", "!=", "null", ")", "{", "try", "{", "Hive", ".", "get", "(", "getHiveConf", "(", ")", ")", ".", "cancelDelegationToken", "(", "delegationT...
If the session has a delegation token obtained from the metastore, then cancel it
[ "If", "the", "session", "has", "a", "delegation", "token", "obtained", "from", "the", "metastore", "then", "cancel", "it" ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java#L141-L151
ReactiveX/RxJavaFX
src/main/java/io/reactivex/rxjavafx/transformers/FxObservableTransformers.java
FxObservableTransformers.doOnNextCount
public static <T> ObservableTransformer<T,T> doOnNextCount(Consumer<Integer> onNext) { """ Performs an action on onNext with the provided emission count @param onNext @param <T> """ return obs -> obs.lift(new OperatorEmissionCounter<>(new CountObserver(onNext,null,null))); }
java
public static <T> ObservableTransformer<T,T> doOnNextCount(Consumer<Integer> onNext) { return obs -> obs.lift(new OperatorEmissionCounter<>(new CountObserver(onNext,null,null))); }
[ "public", "static", "<", "T", ">", "ObservableTransformer", "<", "T", ",", "T", ">", "doOnNextCount", "(", "Consumer", "<", "Integer", ">", "onNext", ")", "{", "return", "obs", "->", "obs", ".", "lift", "(", "new", "OperatorEmissionCounter", "<>", "(", "...
Performs an action on onNext with the provided emission count @param onNext @param <T>
[ "Performs", "an", "action", "on", "onNext", "with", "the", "provided", "emission", "count" ]
train
https://github.com/ReactiveX/RxJavaFX/blob/8f44d4cc1caba9a8919f01cb1897aaea5514c7e5/src/main/java/io/reactivex/rxjavafx/transformers/FxObservableTransformers.java#L113-L115
spotify/styx
styx-service-common/src/main/java/com/spotify/styx/util/ShardedCounter.java
ShardedCounter.updateLimit
public void updateLimit(StorageTransaction tx, String counterId, long limit) throws IOException { """ Must be called within a TransactionCallable. (?) <p>Augments the transaction with operations to persist the given limit in Datastore. So long as there has been no preceding successful updateLimit operation, no...
java
public void updateLimit(StorageTransaction tx, String counterId, long limit) throws IOException { tx.updateLimitForCounter(counterId, limit); }
[ "public", "void", "updateLimit", "(", "StorageTransaction", "tx", ",", "String", "counterId", ",", "long", "limit", ")", "throws", "IOException", "{", "tx", ".", "updateLimitForCounter", "(", "counterId", ",", "limit", ")", ";", "}" ]
Must be called within a TransactionCallable. (?) <p>Augments the transaction with operations to persist the given limit in Datastore. So long as there has been no preceding successful updateLimit operation, no limit is applied in updateCounter operations on this counter.
[ "Must", "be", "called", "within", "a", "TransactionCallable", ".", "(", "?", ")" ]
train
https://github.com/spotify/styx/blob/0d63999beeb93a17447e3bbccaa62175b74cf6e4/styx-service-common/src/main/java/com/spotify/styx/util/ShardedCounter.java#L229-L231
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java
PolicyEventsInner.listQueryResultsForResource
public PolicyEventsQueryResultsInner listQueryResultsForResource(String resourceId, QueryOptions queryOptions) { """ Queries policy events for the resource. @param resourceId Resource ID. @param queryOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the...
java
public PolicyEventsQueryResultsInner listQueryResultsForResource(String resourceId, QueryOptions queryOptions) { return listQueryResultsForResourceWithServiceResponseAsync(resourceId, queryOptions).toBlocking().single().body(); }
[ "public", "PolicyEventsQueryResultsInner", "listQueryResultsForResource", "(", "String", "resourceId", ",", "QueryOptions", "queryOptions", ")", "{", "return", "listQueryResultsForResourceWithServiceResponseAsync", "(", "resourceId", ",", "queryOptions", ")", ".", "toBlocking",...
Queries policy events for the resource. @param resourceId Resource ID. @param queryOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @throws QueryFailureException thrown if the request is rejected by server @throws RuntimeException all other wrapp...
[ "Queries", "policy", "events", "for", "the", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java#L764-L766
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/gui/CommandExecutor.java
CommandExecutor.doCommand
public synchronized ModelNode doCommand(String command) throws CommandFormatException, IOException { """ Submit a command to the server. @param command The CLI command @return The DMR response as a ModelNode @throws CommandFormatException @throws IOException """ ModelNode request = cmdCtx.buildRe...
java
public synchronized ModelNode doCommand(String command) throws CommandFormatException, IOException { ModelNode request = cmdCtx.buildRequest(command); return execute(request, isSlowCommand(command)).getResponseNode(); }
[ "public", "synchronized", "ModelNode", "doCommand", "(", "String", "command", ")", "throws", "CommandFormatException", ",", "IOException", "{", "ModelNode", "request", "=", "cmdCtx", ".", "buildRequest", "(", "command", ")", ";", "return", "execute", "(", "request...
Submit a command to the server. @param command The CLI command @return The DMR response as a ModelNode @throws CommandFormatException @throws IOException
[ "Submit", "a", "command", "to", "the", "server", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/gui/CommandExecutor.java#L75-L78
kirgor/enklib
ejb/src/main/java/com/kirgor/enklib/ejb/Bean.java
Bean.afterInvoke
protected void afterInvoke(Method method, Object[] params) throws Exception { """ Called by interceptor after bean method has been invoked. <p/> It's important to call base method in override-method, since it closes SQL session. @param method Method, which has just been invoked. @param params Method params. ...
java
protected void afterInvoke(Method method, Object[] params) throws Exception { // Close the session if (session != null) { session.close(); } }
[ "protected", "void", "afterInvoke", "(", "Method", "method", ",", "Object", "[", "]", "params", ")", "throws", "Exception", "{", "// Close the session", "if", "(", "session", "!=", "null", ")", "{", "session", ".", "close", "(", ")", ";", "}", "}" ]
Called by interceptor after bean method has been invoked. <p/> It's important to call base method in override-method, since it closes SQL session. @param method Method, which has just been invoked. @param params Method params. @throws Exception
[ "Called", "by", "interceptor", "after", "bean", "method", "has", "been", "invoked", ".", "<p", "/", ">", "It", "s", "important", "to", "call", "base", "method", "in", "override", "-", "method", "since", "it", "closes", "SQL", "session", "." ]
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/ejb/src/main/java/com/kirgor/enklib/ejb/Bean.java#L143-L148
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/build/NFBuildGraph.java
NFBuildGraph.addConnection
public void addConnection(String nodeType, int fromOrdinal, String viaProperty, int toOrdinal) { """ Add a connection to this graph. The connection will be from the node identified by the given <code>nodeType</code> and <code>fromOrdinal</code>. The connection will be via the specified <code>viaProperty</code> i...
java
public void addConnection(String nodeType, int fromOrdinal, String viaProperty, int toOrdinal) { addConnection(CONNECTION_MODEL_GLOBAL, nodeType, fromOrdinal, viaProperty, toOrdinal); }
[ "public", "void", "addConnection", "(", "String", "nodeType", ",", "int", "fromOrdinal", ",", "String", "viaProperty", ",", "int", "toOrdinal", ")", "{", "addConnection", "(", "CONNECTION_MODEL_GLOBAL", ",", "nodeType", ",", "fromOrdinal", ",", "viaProperty", ",",...
Add a connection to this graph. The connection will be from the node identified by the given <code>nodeType</code> and <code>fromOrdinal</code>. The connection will be via the specified <code>viaProperty</code> in the {@link NFNodeSpec} for the given <code>nodeType</code>. The connection will be to the node identified...
[ "Add", "a", "connection", "to", "this", "graph", ".", "The", "connection", "will", "be", "from", "the", "node", "identified", "by", "the", "given", "<code", ">", "nodeType<", "/", "code", ">", "and", "<code", ">", "fromOrdinal<", "/", "code", ">", ".", ...
train
https://github.com/Netflix/netflix-graph/blob/ee129252a08a9f51dd296d6fca2f0b28b7be284e/src/main/java/com/netflix/nfgraph/build/NFBuildGraph.java#L78-L80
upwork/java-upwork
src/com/Upwork/api/Routers/Activities/Engagement.java
Engagement.assignToEngagement
public JSONObject assignToEngagement(String engagement_ref, HashMap<String, String> params) throws JSONException { """ Assign engagements to the list of activities @param engagement_ref Engagement reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} ""...
java
public JSONObject assignToEngagement(String engagement_ref, HashMap<String, String> params) throws JSONException { return oClient.put("/tasks/v2/tasks/contracts/" + engagement_ref, params); }
[ "public", "JSONObject", "assignToEngagement", "(", "String", "engagement_ref", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "put", "(", "\"/tasks/v2/tasks/contracts/\"", "+", "engagement_...
Assign engagements to the list of activities @param engagement_ref Engagement reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Assign", "engagements", "to", "the", "list", "of", "activities" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Activities/Engagement.java#L79-L81
kiswanij/jk-util
src/main/java/com/jk/util/model/table/JKDefaultTableModel.java
JKDefaultTableModel.addColumn
public void addColumn(final Object columnName, final Vector columnData) { """ Adds a column to the model. The new column will have the identifier <code>columnName</code>, which may be null. <code>columnData</code> is the optional vector of data for the column. If it is <code>null</code> the column is filled wit...
java
public void addColumn(final Object columnName, final Vector columnData) { this.columnIdentifiers.addElement(columnName); if (columnData != null) { final int columnSize = columnData.size(); if (columnSize > getRowCount()) { this.dataVector.setSize(columnSize); } justifyRows(0, getRowCount()); ...
[ "public", "void", "addColumn", "(", "final", "Object", "columnName", ",", "final", "Vector", "columnData", ")", "{", "this", ".", "columnIdentifiers", ".", "addElement", "(", "columnName", ")", ";", "if", "(", "columnData", "!=", "null", ")", "{", "final", ...
Adds a column to the model. The new column will have the identifier <code>columnName</code>, which may be null. <code>columnData</code> is the optional vector of data for the column. If it is <code>null</code> the column is filled with <code>null</code> values. Otherwise, the new data will be added to model starting wi...
[ "Adds", "a", "column", "to", "the", "model", ".", "The", "new", "column", "will", "have", "the", "identifier", "<code", ">", "columnName<", "/", "code", ">", "which", "may", "be", "null", ".", "<code", ">", "columnData<", "/", "code", ">", "is", "the",...
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/model/table/JKDefaultTableModel.java#L298-L316
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/eip/EipClient.java
EipClient.purchaseReservedEipInMonth
public void purchaseReservedEipInMonth(String eip, int reservationLength) { """ PurchaseReserved eip with specified duration in month @param eip @param reservationLength """ Billing billing = new Billing(); billing.setReservation(new Billing.Reservation().withReservationLength(reservationLeng...
java
public void purchaseReservedEipInMonth(String eip, int reservationLength) { Billing billing = new Billing(); billing.setReservation(new Billing.Reservation().withReservationLength(reservationLength)); this.purchaseReservedEip(new PurchaseReservedEipRequest().withEip(eip).withBilling(billing)); ...
[ "public", "void", "purchaseReservedEipInMonth", "(", "String", "eip", ",", "int", "reservationLength", ")", "{", "Billing", "billing", "=", "new", "Billing", "(", ")", ";", "billing", ".", "setReservation", "(", "new", "Billing", ".", "Reservation", "(", ")", ...
PurchaseReserved eip with specified duration in month @param eip @param reservationLength
[ "PurchaseReserved", "eip", "with", "specified", "duration", "in", "month" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/eip/EipClient.java#L153-L157
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/TypedQuery.java
TypedQuery.withResultSetAsyncListeners
public TypedQuery<ENTITY> withResultSetAsyncListeners(List<Function<ResultSet, ResultSet>> resultSetAsyncListeners) { """ Add the given list of async listeners on the {@link com.datastax.driver.core.ResultSet} object. Example of usage: <pre class="code"><code class="java"> .withResultSetAsyncListeners(Arrays....
java
public TypedQuery<ENTITY> withResultSetAsyncListeners(List<Function<ResultSet, ResultSet>> resultSetAsyncListeners) { this.options.setResultSetAsyncListeners(Optional.of(resultSetAsyncListeners)); return this; }
[ "public", "TypedQuery", "<", "ENTITY", ">", "withResultSetAsyncListeners", "(", "List", "<", "Function", "<", "ResultSet", ",", "ResultSet", ">", ">", "resultSetAsyncListeners", ")", "{", "this", ".", "options", ".", "setResultSetAsyncListeners", "(", "Optional", ...
Add the given list of async listeners on the {@link com.datastax.driver.core.ResultSet} object. Example of usage: <pre class="code"><code class="java"> .withResultSetAsyncListeners(Arrays.asList(resultSet -> { //Do something with the resultSet object here })) </code></pre> Remark: <strong>it is not allowed to consum...
[ "Add", "the", "given", "list", "of", "async", "listeners", "on", "the", "{", "@link", "com", ".", "datastax", ".", "driver", ".", "core", ".", "ResultSet", "}", "object", ".", "Example", "of", "usage", ":", "<pre", "class", "=", "code", ">", "<code", ...
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/TypedQuery.java#L83-L86
j256/ormlite-core
src/main/java/com/j256/ormlite/table/TableUtils.java
TableUtils.dropTable
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { """ Issue the database statements to drop the table associated with a class. <p> <b>WARNING:</b> This is [obviously] very destructive and is unrecoverable. </p> @param c...
java
public static <T, ID> int dropTable(ConnectionSource connectionSource, Class<T> dataClass, boolean ignoreErrors) throws SQLException { Dao<T, ID> dao = DaoManager.createDao(connectionSource, dataClass); return dropTable(dao, ignoreErrors); }
[ "public", "static", "<", "T", ",", "ID", ">", "int", "dropTable", "(", "ConnectionSource", "connectionSource", ",", "Class", "<", "T", ">", "dataClass", ",", "boolean", "ignoreErrors", ")", "throws", "SQLException", "{", "Dao", "<", "T", ",", "ID", ">", ...
Issue the database statements to drop the table associated with a class. <p> <b>WARNING:</b> This is [obviously] very destructive and is unrecoverable. </p> @param connectionSource Associated connection source. @param dataClass The class for which a table will be dropped. @param ignoreErrors If set to true then try e...
[ "Issue", "the", "database", "statements", "to", "drop", "the", "table", "associated", "with", "a", "class", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/TableUtils.java#L170-L174
alkacon/opencms-core
src/org/opencms/importexport/CmsExport.java
CmsExport.exportUsers
protected void exportUsers(Element parent, CmsOrganizationalUnit orgunit) throws CmsImportExportException, SAXException { """ Exports all users of the given organizational unit.<p> @param parent the parent node to add the users to @param orgunit the organizational unit to write the groups for @throws Cm...
java
protected void exportUsers(Element parent, CmsOrganizationalUnit orgunit) throws CmsImportExportException, SAXException { try { I_CmsReport report = getReport(); List<CmsUser> allUsers = OpenCms.getOrgUnitManager().getUsers(getCms(), orgunit.getName(), false); for (int i...
[ "protected", "void", "exportUsers", "(", "Element", "parent", ",", "CmsOrganizationalUnit", "orgunit", ")", "throws", "CmsImportExportException", ",", "SAXException", "{", "try", "{", "I_CmsReport", "report", "=", "getReport", "(", ")", ";", "List", "<", "CmsUser"...
Exports all users of the given organizational unit.<p> @param parent the parent node to add the users to @param orgunit the organizational unit to write the groups for @throws CmsImportExportException if something goes wrong @throws SAXException if something goes wrong processing the manifest.xml
[ "Exports", "all", "users", "of", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExport.java#L1321-L1354
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java
UserSearchManager.getSearchResults
public ReportedData getSearchResults(Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Submits a search form to the server and returns the resulting information in the form of <code>ReportedData</code>. @param searchF...
java
public ReportedData getSearchResults(Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return userSearch.sendSearchForm(con, searchForm, searchService); }
[ "public", "ReportedData", "getSearchResults", "(", "Form", "searchForm", ",", "DomainBareJid", "searchService", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "userSearch", ".", "s...
Submits a search form to the server and returns the resulting information in the form of <code>ReportedData</code>. @param searchForm the <code>Form</code> to submit for searching. @param searchService the name of the search service to use. @return the ReportedData returned by the server. @throws XMPPErrorException...
[ "Submits", "a", "search", "form", "to", "the", "server", "and", "returns", "the", "resulting", "information", "in", "the", "form", "of", "<code", ">", "ReportedData<", "/", "code", ">", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearchManager.java#L90-L92
kaazing/gateway
security/src/main/java/org/kaazing/gateway/security/auth/context/DefaultLoginContextFactory.java
DefaultLoginContextFactory.createLoginContext
protected LoginContext createLoginContext(CallbackHandler handler, final DefaultLoginResult loginResult) throws LoginException { """ For login context providers that can abstract their tokens into a CallbackHandler that understands their token, this is a utility method that can be called to construct ...
java
protected LoginContext createLoginContext(CallbackHandler handler, final DefaultLoginResult loginResult) throws LoginException { return createLoginContext(null, handler, loginResult); }
[ "protected", "LoginContext", "createLoginContext", "(", "CallbackHandler", "handler", ",", "final", "DefaultLoginResult", "loginResult", ")", "throws", "LoginException", "{", "return", "createLoginContext", "(", "null", ",", "handler", ",", "loginResult", ")", ";", "}...
For login context providers that can abstract their tokens into a CallbackHandler that understands their token, this is a utility method that can be called to construct a create login. @param handler the callback handler that can understand @return a login context @throws LoginException when a login context cannot be ...
[ "For", "login", "context", "providers", "that", "can", "abstract", "their", "tokens", "into", "a", "CallbackHandler", "that", "understands", "their", "token", "this", "is", "a", "utility", "method", "that", "can", "be", "called", "to", "construct", "a", "creat...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/security/src/main/java/org/kaazing/gateway/security/auth/context/DefaultLoginContextFactory.java#L205-L208
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java
KeyValueHandler.handleSubdocumentResponseMessages
private static CouchbaseResponse handleSubdocumentResponseMessages(BinaryRequest request, FullBinaryMemcacheResponse msg, ChannelHandlerContext ctx, ResponseStatus status, boolean seqOnMutation) { """ Helper method to decode all simple subdocument response messages. @param request the current request. ...
java
private static CouchbaseResponse handleSubdocumentResponseMessages(BinaryRequest request, FullBinaryMemcacheResponse msg, ChannelHandlerContext ctx, ResponseStatus status, boolean seqOnMutation) { if (!(request instanceof BinarySubdocRequest)) return null; BinarySubdocRequest subdoc...
[ "private", "static", "CouchbaseResponse", "handleSubdocumentResponseMessages", "(", "BinaryRequest", "request", ",", "FullBinaryMemcacheResponse", "msg", ",", "ChannelHandlerContext", "ctx", ",", "ResponseStatus", "status", ",", "boolean", "seqOnMutation", ")", "{", "if", ...
Helper method to decode all simple subdocument response messages. @param request the current request. @param msg the current response message. @param ctx the handler context. @param status the response status code. @return the decoded response or null if none did match.
[ "Helper", "method", "to", "decode", "all", "simple", "subdocument", "response", "messages", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java#L1154-L1179
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java
KickflipApiClient.getStreamsByKeyword
public void getStreamsByKeyword(String keyword, int pageNumber, int itemsPerPage, final KickflipCallback cb) { """ Get a List of {@link io.kickflip.sdk.api.json.Stream}s containing a keyword. <p/> This method searches all public recordings made by Users of your Kickflip app. @param keyword The String keyword ...
java
public void getStreamsByKeyword(String keyword, int pageNumber, int itemsPerPage, final KickflipCallback cb) { if (!assertActiveUserAvailable(cb)) return; GenericData data = new GenericData(); addPaginationData(pageNumber, itemsPerPage, data); data.put("uuid", getActiveUser().getUUID());...
[ "public", "void", "getStreamsByKeyword", "(", "String", "keyword", ",", "int", "pageNumber", ",", "int", "itemsPerPage", ",", "final", "KickflipCallback", "cb", ")", "{", "if", "(", "!", "assertActiveUserAvailable", "(", "cb", ")", ")", "return", ";", "Generic...
Get a List of {@link io.kickflip.sdk.api.json.Stream}s containing a keyword. <p/> This method searches all public recordings made by Users of your Kickflip app. @param keyword The String keyword to query @param cb A callback to receive the resulting List of Streams
[ "Get", "a", "List", "of", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "api", ".", "json", ".", "Stream", "}", "s", "containing", "a", "keyword", ".", "<p", "/", ">", "This", "method", "searches", "all", "public", "recordings", "made", "by",...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java#L506-L515
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGraphAddMemcpyNode
public static int cuGraphAddMemcpyNode(CUgraphNode phGraphNode, CUgraph hGraph, CUgraphNode dependencies[], long numDependencies, CUDA_MEMCPY3D copyParams, CUcontext ctx) { """ Creates a memcpy node and adds it to a graph.<br> <br> Creates a new memcpy node and adds it to \p hGraph with \p numDependencies depen...
java
public static int cuGraphAddMemcpyNode(CUgraphNode phGraphNode, CUgraph hGraph, CUgraphNode dependencies[], long numDependencies, CUDA_MEMCPY3D copyParams, CUcontext ctx) { return checkResult(cuGraphAddMemcpyNodeNative(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)); }
[ "public", "static", "int", "cuGraphAddMemcpyNode", "(", "CUgraphNode", "phGraphNode", ",", "CUgraph", "hGraph", ",", "CUgraphNode", "dependencies", "[", "]", ",", "long", "numDependencies", ",", "CUDA_MEMCPY3D", "copyParams", ",", "CUcontext", "ctx", ")", "{", "re...
Creates a memcpy node and adds it to a graph.<br> <br> Creates a new memcpy node and adds it to \p hGraph with \p numDependencies dependencies specified via \p dependencies. It is possible for \p numDependencies to be 0, in which case the node will be placed at the root of the graph. \p dependencies may not have any du...
[ "Creates", "a", "memcpy", "node", "and", "adds", "it", "to", "a", "graph", ".", "<br", ">", "<br", ">", "Creates", "a", "new", "memcpy", "node", "and", "adds", "it", "to", "\\", "p", "hGraph", "with", "\\", "p", "numDependencies", "dependencies", "spec...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L12199-L12202
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/Assembler.java
Assembler.if_tcmplt
public void if_tcmplt(TypeMirror type, String target) throws IOException { """ lt succeeds if and only if value1 &lt; value2 <p>Stack: ..., value1, value2 =&gt; ... @param type @param target @throws IOException """ pushType(type); if_tcmplt(target); popType(); }
java
public void if_tcmplt(TypeMirror type, String target) throws IOException { pushType(type); if_tcmplt(target); popType(); }
[ "public", "void", "if_tcmplt", "(", "TypeMirror", "type", ",", "String", "target", ")", "throws", "IOException", "{", "pushType", "(", "type", ")", ";", "if_tcmplt", "(", "target", ")", ";", "popType", "(", ")", ";", "}" ]
lt succeeds if and only if value1 &lt; value2 <p>Stack: ..., value1, value2 =&gt; ... @param type @param target @throws IOException
[ "lt", "succeeds", "if", "and", "only", "if", "value1", "&lt", ";", "value2", "<p", ">", "Stack", ":", "...", "value1", "value2", "=", "&gt", ";", "..." ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/Assembler.java#L593-L598
codelibs/jcifs
src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java
NtlmPasswordAuthentication.getPreNTLMResponse
static public byte[] getPreNTLMResponse( String password, byte[] challenge ) { """ Generate the ANSI DES hash for the password associated with these credentials. """ byte[] p14 = new byte[14]; byte[] p21 = new byte[21]; byte[] p24 = new byte[24]; byte[] passwordBytes; tr...
java
static public byte[] getPreNTLMResponse( String password, byte[] challenge ) { byte[] p14 = new byte[14]; byte[] p21 = new byte[21]; byte[] p24 = new byte[24]; byte[] passwordBytes; try { passwordBytes = password.toUpperCase().getBytes( ServerMessageBlock.OEM_ENCODING...
[ "static", "public", "byte", "[", "]", "getPreNTLMResponse", "(", "String", "password", ",", "byte", "[", "]", "challenge", ")", "{", "byte", "[", "]", "p14", "=", "new", "byte", "[", "14", "]", ";", "byte", "[", "]", "p21", "=", "new", "byte", "[",...
Generate the ANSI DES hash for the password associated with these credentials.
[ "Generate", "the", "ANSI", "DES", "hash", "for", "the", "password", "associated", "with", "these", "credentials", "." ]
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java#L91-L111
openbase/jul
visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java
FXMLProcessor.loadFxmlPaneAndControllerPair
public static Pair<Pane, AbstractFXController> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class clazz) throws CouldNotPerformException { """ Method load the pane and controller of the given fxml file. @param fxmlFileUri the uri pointing to the fxml file within the classpath. @param clazz ...
java
public static Pair<Pane, AbstractFXController> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class clazz) throws CouldNotPerformException { return loadFxmlPaneAndControllerPair(fxmlFileUri, clazz, DEFAULT_CONTROLLER_FACTORY); }
[ "public", "static", "Pair", "<", "Pane", ",", "AbstractFXController", ">", "loadFxmlPaneAndControllerPair", "(", "final", "String", "fxmlFileUri", ",", "final", "Class", "clazz", ")", "throws", "CouldNotPerformException", "{", "return", "loadFxmlPaneAndControllerPair", ...
Method load the pane and controller of the given fxml file. @param fxmlFileUri the uri pointing to the fxml file within the classpath. @param clazz the responsible class which is used for class path resolution. @return an pair of the pane and its controller. @throws CouldNotPerformException is thrown if someth...
[ "Method", "load", "the", "pane", "and", "controller", "of", "the", "given", "fxml", "file", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java#L121-L123
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.greaterThan
@ArgumentsChecked @Throws(IllegalNotGreaterThanException.class) public static byte greaterThan(final byte expected, final byte check) { """ Ensures that a passed {@code byte} is greater to another {@code byte}. @param expected Expected value @param check Comparable to be checked @return the passed {@code ...
java
@ArgumentsChecked @Throws(IllegalNotGreaterThanException.class) public static byte greaterThan(final byte expected, final byte check) { if (expected >= check) { throw new IllegalNotGreaterThanException(check); } return check; }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "IllegalNotGreaterThanException", ".", "class", ")", "public", "static", "byte", "greaterThan", "(", "final", "byte", "expected", ",", "final", "byte", "check", ")", "{", "if", "(", "expected", ">=", "check", ")", ...
Ensures that a passed {@code byte} is greater to another {@code byte}. @param expected Expected value @param check Comparable to be checked @return the passed {@code Comparable} argument {@code check} @throws IllegalNotGreaterThanException if the argument value {@code check} is not greater than value {@code expected}
[ "Ensures", "that", "a", "passed", "{", "@code", "byte", "}", "is", "greater", "to", "another", "{", "@code", "byte", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L731-L739
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/parser/SqlFragmentContainer.java
SqlFragmentContainer.getPreparedStatementText
String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) { """ builds the text of the prepared statement @param context A ControlBeanContext instance. @param m The annotated method. @param args The method's parameters. @return The PreparedStatement text generated by this fragment ...
java
String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) { StringBuilder sb = new StringBuilder(); for (SqlFragment sf : _children) { sb.append(sf.getPreparedStatementText(context, m, args)); } return sb.toString(); }
[ "String", "getPreparedStatementText", "(", "ControlBeanContext", "context", ",", "Method", "m", ",", "Object", "[", "]", "args", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "SqlFragment", "sf", ":", "_children", "...
builds the text of the prepared statement @param context A ControlBeanContext instance. @param m The annotated method. @param args The method's parameters. @return The PreparedStatement text generated by this fragment and its children.
[ "builds", "the", "text", "of", "the", "prepared", "statement" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/parser/SqlFragmentContainer.java#L92-L98
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.serializeDocToStream
private static void serializeDocToStream(final OutputStream output, final Document doc) throws IOException { """ Write Document to a file @param output stream @param doc document @throws IOException on error """ final OutputFormat format = OutputFormat.createPrettyPrint(); final XMLWrite...
java
private static void serializeDocToStream(final OutputStream output, final Document doc) throws IOException { final OutputFormat format = OutputFormat.createPrettyPrint(); final XMLWriter writer = new XMLWriter(output, format); writer.write(doc); writer.flush(); }
[ "private", "static", "void", "serializeDocToStream", "(", "final", "OutputStream", "output", ",", "final", "Document", "doc", ")", "throws", "IOException", "{", "final", "OutputFormat", "format", "=", "OutputFormat", ".", "createPrettyPrint", "(", ")", ";", "final...
Write Document to a file @param output stream @param doc document @throws IOException on error
[ "Write", "Document", "to", "a", "file" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L300-L305
primefaces/primefaces
src/main/java/org/primefaces/util/ComponentTraversalUtils.java
ComponentTraversalUtils.firstWithId
public static UIComponent firstWithId(String id, UIComponent base) { """ Finds the first component with the given id (NOT clientId!). @param id The id. @param base The base component to start the traversal. @return The component or null. """ if (id.equals(base.getId())) { return base; ...
java
public static UIComponent firstWithId(String id, UIComponent base) { if (id.equals(base.getId())) { return base; } UIComponent result = null; Iterator<UIComponent> kids = base.getFacetsAndChildren(); while (kids.hasNext() && (result == null)) { UICompone...
[ "public", "static", "UIComponent", "firstWithId", "(", "String", "id", ",", "UIComponent", "base", ")", "{", "if", "(", "id", ".", "equals", "(", "base", ".", "getId", "(", ")", ")", ")", "{", "return", "base", ";", "}", "UIComponent", "result", "=", ...
Finds the first component with the given id (NOT clientId!). @param id The id. @param base The base component to start the traversal. @return The component or null.
[ "Finds", "the", "first", "component", "with", "the", "given", "id", "(", "NOT", "clientId!", ")", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentTraversalUtils.java#L117-L137
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.infov
public void infov(String format, Object param1) { """ Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param param1 the sole parameter """ if (isEnabled(Level.INFO)) { doLog(Level.INFO, FQCN, format...
java
public void infov(String format, Object param1) { if (isEnabled(Level.INFO)) { doLog(Level.INFO, FQCN, format, new Object[] { param1 }, null); } }
[ "public", "void", "infov", "(", "String", "format", ",", "Object", "param1", ")", "{", "if", "(", "isEnabled", "(", "Level", ".", "INFO", ")", ")", "{", "doLog", "(", "Level", ".", "INFO", ",", "FQCN", ",", "format", ",", "new", "Object", "[", "]",...
Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting. @param format the message format string @param param1 the sole parameter
[ "Issue", "a", "log", "message", "with", "a", "level", "of", "INFO", "using", "{", "@link", "java", ".", "text", ".", "MessageFormat", "}", "-", "style", "formatting", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L1032-L1036
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java
Clause.setSubclauses
public void setSubclauses(int i, Annotation v) { """ indexed setter for subclauses - sets an indexed value - array of subelements. contains WordForms or Clauses @generated @param i index in the array to set @param v value to set into the array """ if (Clause_Type.featOkTst && ((Clause_Type)jcasType).ca...
java
public void setSubclauses(int i, Annotation v) { if (Clause_Type.featOkTst && ((Clause_Type)jcasType).casFeat_subclauses == null) jcasType.jcas.throwFeatMissing("subclauses", "com.digitalpebble.rasp.Clause"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Clause_Type)jcasType).casF...
[ "public", "void", "setSubclauses", "(", "int", "i", ",", "Annotation", "v", ")", "{", "if", "(", "Clause_Type", ".", "featOkTst", "&&", "(", "(", "Clause_Type", ")", "jcasType", ")", ".", "casFeat_subclauses", "==", "null", ")", "jcasType", ".", "jcas", ...
indexed setter for subclauses - sets an indexed value - array of subelements. contains WordForms or Clauses @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "subclauses", "-", "sets", "an", "indexed", "value", "-", "array", "of", "subelements", ".", "contains", "WordForms", "or", "Clauses" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/com/digitalpebble/rasp/Clause.java#L139-L143
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/rendering/writer/svg/geometry/LineStringWriter.java
LineStringWriter.writeObject
public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException { """ Writes a {@link LineString} object. LineStrings are encoded into SVG path elements. This function writes: "&lt;path d=". @param o The {@link LineString} to be encoded. """ document.writeElement("pat...
java
public void writeObject(Object o, GraphicsDocument document, boolean asChild) throws RenderException { document.writeElement("path", asChild); document.writeAttributeStart("d"); document.writePathContent(((LineString) o).getCoordinates()); document.writeAttributeEnd(); }
[ "public", "void", "writeObject", "(", "Object", "o", ",", "GraphicsDocument", "document", ",", "boolean", "asChild", ")", "throws", "RenderException", "{", "document", ".", "writeElement", "(", "\"path\"", ",", "asChild", ")", ";", "document", ".", "writeAttribu...
Writes a {@link LineString} object. LineStrings are encoded into SVG path elements. This function writes: "&lt;path d=". @param o The {@link LineString} to be encoded.
[ "Writes", "a", "{", "@link", "LineString", "}", "object", ".", "LineStrings", "are", "encoded", "into", "SVG", "path", "elements", ".", "This", "function", "writes", ":", "&lt", ";", "path", "d", "=", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/writer/svg/geometry/LineStringWriter.java#L35-L40
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java
ST_MakeEnvelope.makeEnvelope
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax, int srid) { """ Creates a rectangular Polygon formed from the minima and maxima by the given shell. The user can set a srid. @param xmin X min @param ymin Y min @param xmax X max @param ymax Y max @param srid SRID @retur...
java
public static Polygon makeEnvelope(double xmin, double ymin, double xmax, double ymax, int srid) { Polygon geom = makeEnvelope(xmin, ymin, xmax, ymax); geom.setSRID(srid); return geom; }
[ "public", "static", "Polygon", "makeEnvelope", "(", "double", "xmin", ",", "double", "ymin", ",", "double", "xmax", ",", "double", "ymax", ",", "int", "srid", ")", "{", "Polygon", "geom", "=", "makeEnvelope", "(", "xmin", ",", "ymin", ",", "xmax", ",", ...
Creates a rectangular Polygon formed from the minima and maxima by the given shell. The user can set a srid. @param xmin X min @param ymin Y min @param xmax X max @param ymax Y max @param srid SRID @return Envelope as a POLYGON
[ "Creates", "a", "rectangular", "Polygon", "formed", "from", "the", "minima", "and", "maxima", "by", "the", "given", "shell", ".", "The", "user", "can", "set", "a", "srid", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakeEnvelope.java#L81-L85
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java
WaveformDetailComponent.setWaveform
public void setWaveform(WaveformDetail waveform, TrackMetadata metadata, BeatGrid beatGrid) { """ Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param waveform the waveform detail to display @param metadata informatio...
java
public void setWaveform(WaveformDetail waveform, TrackMetadata metadata, BeatGrid beatGrid) { this.waveform.set(waveform); if (metadata != null) { cueList.set(metadata.getCueList()); } else { cueList.set(null); } this.beatGrid.set(beatGrid); clearP...
[ "public", "void", "setWaveform", "(", "WaveformDetail", "waveform", ",", "TrackMetadata", "metadata", ",", "BeatGrid", "beatGrid", ")", "{", "this", ".", "waveform", ".", "set", "(", "waveform", ")", ";", "if", "(", "metadata", "!=", "null", ")", "{", "cue...
Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param waveform the waveform detail to display @param metadata information about the track whose waveform we are drawing, so we can draw cue and memory points @param beatGrid the l...
[ "Change", "the", "waveform", "preview", "being", "drawn", ".", "This", "will", "be", "quickly", "overruled", "if", "a", "player", "is", "being", "monitored", "but", "can", "be", "used", "in", "other", "contexts", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java#L341-L354
logic-ng/LogicNG
src/main/java/org/logicng/bdds/orderings/ForceOrdering.java
ForceOrdering.orderingFromTentativeNewLocations
private LinkedHashMap<HypergraphNode<Variable>, Integer> orderingFromTentativeNewLocations(final LinkedHashMap<HypergraphNode<Variable>, Double> newLocations) { """ Generates a new integer ordering from tentative new locations of nodes with the double weighting. @param newLocations the tentative new locations @r...
java
private LinkedHashMap<HypergraphNode<Variable>, Integer> orderingFromTentativeNewLocations(final LinkedHashMap<HypergraphNode<Variable>, Double> newLocations) { final LinkedHashMap<HypergraphNode<Variable>, Integer> ordering = new LinkedHashMap<>(); final List<Map.Entry<HypergraphNode<Variable>, Double>> list =...
[ "private", "LinkedHashMap", "<", "HypergraphNode", "<", "Variable", ">", ",", "Integer", ">", "orderingFromTentativeNewLocations", "(", "final", "LinkedHashMap", "<", "HypergraphNode", "<", "Variable", ">", ",", "Double", ">", "newLocations", ")", "{", "final", "L...
Generates a new integer ordering from tentative new locations of nodes with the double weighting. @param newLocations the tentative new locations @return the new integer ordering
[ "Generates", "a", "new", "integer", "ordering", "from", "tentative", "new", "locations", "of", "nodes", "with", "the", "double", "weighting", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/bdds/orderings/ForceOrdering.java#L120-L138
hyperledger/fabric-chaincode-java
fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/impl/Handler.java
Handler.markIsTransaction
private synchronized boolean markIsTransaction(String channelId, String uuid, boolean isTransaction) { """ Marks a CHANNELID+UUID as either a transaction or a query @param uuid ID to be marked @param isTransaction true for transaction, false for query @return whether or not the UUID was successfully ...
java
private synchronized boolean markIsTransaction(String channelId, String uuid, boolean isTransaction) { if (this.isTransaction == null) { return false; } String key = getTxKey(channelId, uuid); this.isTransaction.put(key, isTransaction); return true; }
[ "private", "synchronized", "boolean", "markIsTransaction", "(", "String", "channelId", ",", "String", "uuid", ",", "boolean", "isTransaction", ")", "{", "if", "(", "this", ".", "isTransaction", "==", "null", ")", "{", "return", "false", ";", "}", "String", "...
Marks a CHANNELID+UUID as either a transaction or a query @param uuid ID to be marked @param isTransaction true for transaction, false for query @return whether or not the UUID was successfully marked
[ "Marks", "a", "CHANNELID", "+", "UUID", "as", "either", "a", "transaction", "or", "a", "query" ]
train
https://github.com/hyperledger/fabric-chaincode-java/blob/1c688a3c7824758448fec31daaf0a1410a427e91/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim/impl/Handler.java#L216-L224
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/documents/XlsWorkbook.java
XlsWorkbook.createSheet
@Override public XlsWorksheet createSheet(FileColumn[] columns, List<String[]> lines, String sheetName) throws IOException { """ Creates a sheet in the workbook with the given name and lines of data. @param columns The column definitions for the worksheet @param lines The list of lines to be added to...
java
@Override public XlsWorksheet createSheet(FileColumn[] columns, List<String[]> lines, String sheetName) throws IOException { // Create the worksheet and add the cells WritableSheet sheet = writableWorkbook.createSheet(sheetName, 9999); // Append sheet try { a...
[ "@", "Override", "public", "XlsWorksheet", "createSheet", "(", "FileColumn", "[", "]", "columns", ",", "List", "<", "String", "[", "]", ">", "lines", ",", "String", "sheetName", ")", "throws", "IOException", "{", "// Create the worksheet and add the cells", "Writa...
Creates a sheet in the workbook with the given name and lines of data. @param columns The column definitions for the worksheet @param lines The list of lines to be added to the worksheet @param sheetName The name of the worksheet to be added @return The worksheet created @throws IOException if the sheet cannot be creat...
[ "Creates", "a", "sheet", "in", "the", "workbook", "with", "the", "given", "name", "and", "lines", "of", "data", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/documents/XlsWorkbook.java#L238-L270
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.removeInvalidLogins
protected void removeInvalidLogins(String userName, String remoteAddress) { """ Removes all invalid attempts to login for the given user / IP.<p> @param userName the name of the user @param remoteAddress the remore address (IP) from which the login attempt was made """ if (m_maxBadAttempts < 0) { ...
java
protected void removeInvalidLogins(String userName, String remoteAddress) { if (m_maxBadAttempts < 0) { // invalid login storage is disabled return; } String key = createStorageKey(userName, remoteAddress); // just remove the user from the storage m_stor...
[ "protected", "void", "removeInvalidLogins", "(", "String", "userName", ",", "String", "remoteAddress", ")", "{", "if", "(", "m_maxBadAttempts", "<", "0", ")", "{", "// invalid login storage is disabled", "return", ";", "}", "String", "key", "=", "createStorageKey", ...
Removes all invalid attempts to login for the given user / IP.<p> @param userName the name of the user @param remoteAddress the remore address (IP) from which the login attempt was made
[ "Removes", "all", "invalid", "attempts", "to", "login", "for", "the", "given", "user", "/", "IP", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L743-L753
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java
BaseBuffer.getNextField
public int getNextField(FieldInfo field, boolean bDisplayOption, int iMoveMode) // Must be to call right Get calls { """ Get the next field and fill it with data from this buffer. You must override this method. @param field The field to set. @param bDisplayOption The display option for setting the field. @pa...
java
public int getNextField(FieldInfo field, boolean bDisplayOption, int iMoveMode) // Must be to call right Get calls { Object objNext = this.getNextData(); if (DATA_ERROR.equals(objNext)) return Constants.ERROR_RETURN; // EOF if (DATA_EOF.equals(objNext)) return Cons...
[ "public", "int", "getNextField", "(", "FieldInfo", "field", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "// Must be to call right Get calls", "{", "Object", "objNext", "=", "this", ".", "getNextData", "(", ")", ";", "if", "(", "DATA_ERROR", "...
Get the next field and fill it with data from this buffer. You must override this method. @param field The field to set. @param bDisplayOption The display option for setting the field. @param iMoveMove The move mode for setting the field. @return The error code.
[ "Get", "the", "next", "field", "and", "fill", "it", "with", "data", "from", "this", "buffer", ".", "You", "must", "override", "this", "method", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L336-L346
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java
DecimalStyle.withZeroDigit
public DecimalStyle withZeroDigit(char zeroDigit) { """ Returns a copy of the info with a new character that represents zero. <p> The character used to represent digits may vary by culture. This method specifies the zero character to use, which implies the characters for one to nine. @param zeroDigit the ch...
java
public DecimalStyle withZeroDigit(char zeroDigit) { if (zeroDigit == this.zeroDigit) { return this; } return new DecimalStyle(zeroDigit, positiveSign, negativeSign, decimalSeparator); }
[ "public", "DecimalStyle", "withZeroDigit", "(", "char", "zeroDigit", ")", "{", "if", "(", "zeroDigit", "==", "this", ".", "zeroDigit", ")", "{", "return", "this", ";", "}", "return", "new", "DecimalStyle", "(", "zeroDigit", ",", "positiveSign", ",", "negativ...
Returns a copy of the info with a new character that represents zero. <p> The character used to represent digits may vary by culture. This method specifies the zero character to use, which implies the characters for one to nine. @param zeroDigit the character for zero @return a copy with a new character that represe...
[ "Returns", "a", "copy", "of", "the", "info", "with", "a", "new", "character", "that", "represents", "zero", ".", "<p", ">", "The", "character", "used", "to", "represent", "digits", "may", "vary", "by", "culture", ".", "This", "method", "specifies", "the", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java#L216-L221
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java
AbstractFrameModelingVisitor.analyzeInstruction
public void analyzeInstruction(Instruction ins) throws DataflowAnalysisException { """ Analyze the given Instruction. @param ins the Instruction @throws DataflowAnalysisException if an error occurs analyzing the instruction; in most cases, this indicates that the bytecode for the method being analyzed is i...
java
public void analyzeInstruction(Instruction ins) throws DataflowAnalysisException { if (frame.isValid()) { try { ins.accept(this); } catch (InvalidBytecodeException e) { String message = "Invalid bytecode: could not analyze instr. " + ins + " at frame " + f...
[ "public", "void", "analyzeInstruction", "(", "Instruction", "ins", ")", "throws", "DataflowAnalysisException", "{", "if", "(", "frame", ".", "isValid", "(", ")", ")", "{", "try", "{", "ins", ".", "accept", "(", "this", ")", ";", "}", "catch", "(", "Inval...
Analyze the given Instruction. @param ins the Instruction @throws DataflowAnalysisException if an error occurs analyzing the instruction; in most cases, this indicates that the bytecode for the method being analyzed is invalid
[ "Analyze", "the", "given", "Instruction", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/AbstractFrameModelingVisitor.java#L81-L90
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.listIntentsWithServiceResponseAsync
public Observable<ServiceResponse<List<IntentClassifier>>> listIntentsWithServiceResponseAsync(UUID appId, String versionId, ListIntentsOptionalParameter listIntentsOptionalParameter) { """ Gets information about the intent models. @param appId The application ID. @param versionId The version ID. @param listI...
java
public Observable<ServiceResponse<List<IntentClassifier>>> listIntentsWithServiceResponseAsync(UUID appId, String versionId, ListIntentsOptionalParameter listIntentsOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is requ...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "IntentClassifier", ">", ">", ">", "listIntentsWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListIntentsOptionalParameter", "listIntentsOptionalParameter", ")", "{", "...
Gets information about the intent models. @param appId The application ID. @param versionId The version ID. @param listIntentsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observa...
[ "Gets", "information", "about", "the", "intent", "models", "." ]
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#L799-L813
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java
QuestStatement.executeInThread
private <R extends OBDAResultSet, Q extends InputQuery<R>> R executeInThread(Q inputQuery, Evaluator<R, Q> evaluator) throws OntopReformulationException, OntopQueryEvaluationException { """ Internal method to start a new query execution thread type defines the query type SELECT, ASK, CONSTRUCT, or DESCRIBE ...
java
private <R extends OBDAResultSet, Q extends InputQuery<R>> R executeInThread(Q inputQuery, Evaluator<R, Q> evaluator) throws OntopReformulationException, OntopQueryEvaluationException { log.debug("Executing SPARQL query: \n{}", inputQuery); CountDownLatch monitor = new CountDownLatch(1); ExecutableQuery exec...
[ "private", "<", "R", "extends", "OBDAResultSet", ",", "Q", "extends", "InputQuery", "<", "R", ">", ">", "R", "executeInThread", "(", "Q", "inputQuery", ",", "Evaluator", "<", "R", ",", "Q", ">", "evaluator", ")", "throws", "OntopReformulationException", ",",...
Internal method to start a new query execution thread type defines the query type SELECT, ASK, CONSTRUCT, or DESCRIBE
[ "Internal", "method", "to", "start", "a", "new", "query", "execution", "thread", "type", "defines", "the", "query", "type", "SELECT", "ASK", "CONSTRUCT", "or", "DESCRIBE" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java#L307-L343
lessthanoptimal/ddogleg
src/org/ddogleg/nn/alg/VpTree.java
VpTree.buildFromPoints
private Node buildFromPoints(int lower, int upper) { """ Builds the tree from a set of points by recursively partitioning them according to a random pivot. @param lower start of range @param upper end of range (exclusive) @return root of the tree or null if lower == upper """ if (upper == lower) { r...
java
private Node buildFromPoints(int lower, int upper) { if (upper == lower) { return null; } final Node node = new Node(); node.index = lower; if (upper - lower > 1) { // choose an arbitrary vantage point and move it to the start int i = random.nextInt(upper - lower - 1) + lower; listS...
[ "private", "Node", "buildFromPoints", "(", "int", "lower", ",", "int", "upper", ")", "{", "if", "(", "upper", "==", "lower", ")", "{", "return", "null", ";", "}", "final", "Node", "node", "=", "new", "Node", "(", ")", ";", "node", ".", "index", "="...
Builds the tree from a set of points by recursively partitioning them according to a random pivot. @param lower start of range @param upper end of range (exclusive) @return root of the tree or null if lower == upper
[ "Builds", "the", "tree", "from", "a", "set", "of", "points", "by", "recursively", "partitioning", "them", "according", "to", "a", "random", "pivot", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/VpTree.java#L93-L123
facebook/fresco
drawee/src/main/java/com/facebook/drawee/generic/GenericDraweeHierarchy.java
GenericDraweeHierarchy.setPlaceholderImage
public void setPlaceholderImage(int resourceId, ScalingUtils.ScaleType scaleType) { """ Sets a new placeholder drawable with scale type. @param resourceId an identifier of an Android drawable or color resource. @param ScalingUtils.ScaleType a new scale type. """ setPlaceholderImage(mResources.getDrawab...
java
public void setPlaceholderImage(int resourceId, ScalingUtils.ScaleType scaleType) { setPlaceholderImage(mResources.getDrawable(resourceId), scaleType); }
[ "public", "void", "setPlaceholderImage", "(", "int", "resourceId", ",", "ScalingUtils", ".", "ScaleType", "scaleType", ")", "{", "setPlaceholderImage", "(", "mResources", ".", "getDrawable", "(", "resourceId", ")", ",", "scaleType", ")", ";", "}" ]
Sets a new placeholder drawable with scale type. @param resourceId an identifier of an Android drawable or color resource. @param ScalingUtils.ScaleType a new scale type.
[ "Sets", "a", "new", "placeholder", "drawable", "with", "scale", "type", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/generic/GenericDraweeHierarchy.java#L453-L455
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/io/Files.java
Files.newWriter
public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException { """ Returns a buffered writer that writes to a file using the given character set. @param file the file to write to @param charset the charset used to encode the output stream; see {@link StandardCharsets} for he...
java
public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset)); }
[ "public", "static", "BufferedWriter", "newWriter", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "FileNotFoundException", "{", "checkNotNull", "(", "file", ")", ";", "checkNotNull", "(", "charset", ")", ";", "return", "new", "BufferedWriter", "(...
Returns a buffered writer that writes to a file using the given character set. @param file the file to write to @param charset the charset used to encode the output stream; see {@link StandardCharsets} for helpful predefined constants @return the buffered writer
[ "Returns", "a", "buffered", "writer", "that", "writes", "to", "a", "file", "using", "the", "given", "character", "set", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L95-L99
spring-projects/spring-session-data-mongodb
src/main/java/org/springframework/session/data/mongo/ReactiveMongoOperationsSessionRepository.java
ReactiveMongoOperationsSessionRepository.createSession
@Override public Mono<MongoSession> createSession() { """ Creates a new {@link MongoSession} that is capable of being persisted by this {@link ReactiveSessionRepository}. <p> This allows optimizations and customizations in how the {@link MongoSession} is persisted. For example, the implementation returned migh...
java
@Override public Mono<MongoSession> createSession() { return Mono.justOrEmpty(this.maxInactiveIntervalInSeconds) // .map(MongoSession::new) // .doOnNext(mongoSession -> publishEvent(new SessionCreatedEvent(this, mongoSession))) // .switchIfEmpty(Mono.just(new MongoSession())); }
[ "@", "Override", "public", "Mono", "<", "MongoSession", ">", "createSession", "(", ")", "{", "return", "Mono", ".", "justOrEmpty", "(", "this", ".", "maxInactiveIntervalInSeconds", ")", "//", ".", "map", "(", "MongoSession", "::", "new", ")", "//", ".", "d...
Creates a new {@link MongoSession} that is capable of being persisted by this {@link ReactiveSessionRepository}. <p> This allows optimizations and customizations in how the {@link MongoSession} is persisted. For example, the implementation returned might keep track of the changes ensuring that only the delta needs to b...
[ "Creates", "a", "new", "{", "@link", "MongoSession", "}", "that", "is", "capable", "of", "being", "persisted", "by", "this", "{", "@link", "ReactiveSessionRepository", "}", ".", "<p", ">", "This", "allows", "optimizations", "and", "customizations", "in", "how"...
train
https://github.com/spring-projects/spring-session-data-mongodb/blob/c507bb2d2a9b52ea9846ffaf1ac7c71cb0e6690e/src/main/java/org/springframework/session/data/mongo/ReactiveMongoOperationsSessionRepository.java#L84-L91
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.getPositiveBigInteger
public BigInteger getPositiveBigInteger() throws IOException { """ Returns an ASN.1 INTEGER value as a positive BigInteger. This is just to deal with implementations that incorrectly encode some values as negative. @return the integer held in this DER value as a BigInteger. """ if (buffer.read() !...
java
public BigInteger getPositiveBigInteger() throws IOException { if (buffer.read() != DerValue.tag_Integer) { throw new IOException("DER input, Integer tag error"); } return buffer.getBigInteger(getLength(buffer), true); }
[ "public", "BigInteger", "getPositiveBigInteger", "(", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "read", "(", ")", "!=", "DerValue", ".", "tag_Integer", ")", "{", "throw", "new", "IOException", "(", "\"DER input, Integer tag error\"", ")", ";",...
Returns an ASN.1 INTEGER value as a positive BigInteger. This is just to deal with implementations that incorrectly encode some values as negative. @return the integer held in this DER value as a BigInteger.
[ "Returns", "an", "ASN", ".", "1", "INTEGER", "value", "as", "a", "positive", "BigInteger", ".", "This", "is", "just", "to", "deal", "with", "implementations", "that", "incorrectly", "encode", "some", "values", "as", "negative", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L192-L197
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java
ForwardCurveInterpolation.addForward
private void addForward(AnalyticModel model, double fixingTime, RandomVariable forward, boolean isParameter) { """ Add a forward to this curve. @param model An analytic model providing a context. The discount curve (if needed) is obtained from this model. @param fixingTime The given fixing time. @param forwar...
java
private void addForward(AnalyticModel model, double fixingTime, RandomVariable forward, boolean isParameter) { double interpolationEntitiyTime; RandomVariable interpolationEntityForwardValue; switch(interpolationEntityForward) { case FORWARD: default: interpolationEntitiyTime = fixingTime; interpolation...
[ "private", "void", "addForward", "(", "AnalyticModel", "model", ",", "double", "fixingTime", ",", "RandomVariable", "forward", ",", "boolean", "isParameter", ")", "{", "double", "interpolationEntitiyTime", ";", "RandomVariable", "interpolationEntityForwardValue", ";", "...
Add a forward to this curve. @param model An analytic model providing a context. The discount curve (if needed) is obtained from this model. @param fixingTime The given fixing time. @param forward The given forward. @param isParameter If true, then this point is server via {@link #getParameter()} and changed via {@lin...
[ "Add", "a", "forward", "to", "this", "curve", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java#L416-L445
stripe/stripe-android
stripe/src/main/java/com/stripe/android/PaymentSession.java
PaymentSession.presentShippingFlow
public void presentShippingFlow() { """ Launch the {@link PaymentFlowActivity} to allow the user to fill in payment details. """ final Intent intent = new Intent(mHostActivity, PaymentFlowActivity.class) .putExtra(PAYMENT_SESSION_CONFIG, mPaymentSessionConfig) .putExtra(...
java
public void presentShippingFlow() { final Intent intent = new Intent(mHostActivity, PaymentFlowActivity.class) .putExtra(PAYMENT_SESSION_CONFIG, mPaymentSessionConfig) .putExtra(PAYMENT_SESSION_DATA_KEY, mPaymentSessionData) .putExtra(EXTRA_PAYMENT_SESSION_ACTIVE,...
[ "public", "void", "presentShippingFlow", "(", ")", "{", "final", "Intent", "intent", "=", "new", "Intent", "(", "mHostActivity", ",", "PaymentFlowActivity", ".", "class", ")", ".", "putExtra", "(", "PAYMENT_SESSION_CONFIG", ",", "mPaymentSessionConfig", ")", ".", ...
Launch the {@link PaymentFlowActivity} to allow the user to fill in payment details.
[ "Launch", "the", "{" ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/PaymentSession.java#L204-L210
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/JavascriptHTMLBundleLinkRenderer.java
JavascriptHTMLBundleLinkRenderer.performGlobalBundleLinksRendering
@Override protected void performGlobalBundleLinksRendering(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { """ Performs the global bundle rendering @param ctx the context @param out the writer @param debugOn the flag indicating if we are in debug mode or not @throws IOExce...
java
@Override protected void performGlobalBundleLinksRendering(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { renderGlobalLinks = true; super.performGlobalBundleLinksRendering(ctx, out, debugOn); renderGlobalLinks = false; }
[ "@", "Override", "protected", "void", "performGlobalBundleLinksRendering", "(", "BundleRendererContext", "ctx", ",", "Writer", "out", ",", "boolean", "debugOn", ")", "throws", "IOException", "{", "renderGlobalLinks", "=", "true", ";", "super", ".", "performGlobalBundl...
Performs the global bundle rendering @param ctx the context @param out the writer @param debugOn the flag indicating if we are in debug mode or not @throws IOException if an IO exception occurs
[ "Performs", "the", "global", "bundle", "rendering" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/JavascriptHTMLBundleLinkRenderer.java#L141-L148
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java
dnsrecords_stats.get
public static dnsrecords_stats get(nitro_service service, String dnsrecordtype) throws Exception { """ Use this API to fetch statistics of dnsrecords_stats resource of given name . """ dnsrecords_stats obj = new dnsrecords_stats(); obj.set_dnsrecordtype(dnsrecordtype); dnsrecords_stats response = (dnsrec...
java
public static dnsrecords_stats get(nitro_service service, String dnsrecordtype) throws Exception{ dnsrecords_stats obj = new dnsrecords_stats(); obj.set_dnsrecordtype(dnsrecordtype); dnsrecords_stats response = (dnsrecords_stats) obj.stat_resource(service); return response; }
[ "public", "static", "dnsrecords_stats", "get", "(", "nitro_service", "service", ",", "String", "dnsrecordtype", ")", "throws", "Exception", "{", "dnsrecords_stats", "obj", "=", "new", "dnsrecords_stats", "(", ")", ";", "obj", ".", "set_dnsrecordtype", "(", "dnsrec...
Use this API to fetch statistics of dnsrecords_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "dnsrecords_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dns/dnsrecords_stats.java#L226-L231
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.deallocateAsync
public Observable<OperationStatusResponseInner> deallocateAsync(String resourceGroupName, String vmScaleSetName) { """ Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine ...
java
public Observable<OperationStatusResponseInner> deallocateAsync(String resourceGroupName, String vmScaleSetName) { return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "deallocateAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "deallocateWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "...
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM sc...
[ "Deallocates", "specific", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Shuts", "down", "the", "virtual", "machines", "and", "releases", "the", "compute", "resources", ".", "You", "are", "not", "billed", "for", "the", "compute", "resources", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L815-L822
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkConditions
public Environment checkConditions(Tuple<Expr> conditions, boolean sign, Environment environment) { """ Type check a sequence of zero or more conditions, such as the requires clause of a function or method. The environment from each condition is fed into the following. This means that, in principle, type tests i...
java
public Environment checkConditions(Tuple<Expr> conditions, boolean sign, Environment environment) { for (Expr e : conditions) { // Thread environment through from before environment = checkCondition(e, sign, environment); } return environment; }
[ "public", "Environment", "checkConditions", "(", "Tuple", "<", "Expr", ">", "conditions", ",", "boolean", "sign", ",", "Environment", "environment", ")", "{", "for", "(", "Expr", "e", ":", "conditions", ")", "{", "// Thread environment through from before", "envir...
Type check a sequence of zero or more conditions, such as the requires clause of a function or method. The environment from each condition is fed into the following. This means that, in principle, type tests influence both subsequent conditions and the remainder. The following illustrates: <pre> function f(int|null x)...
[ "Type", "check", "a", "sequence", "of", "zero", "or", "more", "conditions", "such", "as", "the", "requires", "clause", "of", "a", "function", "or", "method", ".", "The", "environment", "from", "each", "condition", "is", "fed", "into", "the", "following", "...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L808-L814
alkacon/opencms-core
src/org/opencms/db/CmsSubscriptionManager.java
CmsSubscriptionManager.getDateLastVisitedBy
public long getDateLastVisitedBy(CmsObject cms, CmsUser user, CmsResource resource) throws CmsException { """ Returns the date when the resource was last visited by the user.<p> @param cms the current users context @param user the user to check the date @param resource the resource to check the date @retur...
java
public long getDateLastVisitedBy(CmsObject cms, CmsUser user, CmsResource resource) throws CmsException { return m_securityManager.getDateLastVisitedBy(cms.getRequestContext(), getPoolName(), user, resource); }
[ "public", "long", "getDateLastVisitedBy", "(", "CmsObject", "cms", ",", "CmsUser", "user", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "m_securityManager", ".", "getDateLastVisitedBy", "(", "cms", ".", "getRequestContext", "(", ")",...
Returns the date when the resource was last visited by the user.<p> @param cms the current users context @param user the user to check the date @param resource the resource to check the date @return the date when the resource was last visited by the user @throws CmsException if something goes wrong
[ "Returns", "the", "date", "when", "the", "resource", "was", "last", "visited", "by", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSubscriptionManager.java#L90-L93
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java
ReflectionUtils.invokeJdbcMethod
public static Object invokeJdbcMethod(Method method, Object target, Object... args) throws SQLException { """ Invoke the specified JDBC API {@link Method} against the supplied target object with the supplied arguments. @param method the method to invoke @param target the target object to invoke the method on @...
java
public static Object invokeJdbcMethod(Method method, Object target, Object... args) throws SQLException { try { return method.invoke(target, args); } catch (IllegalAccessException ex) { handleReflectionException(ex); } catch (InvocationTargetException ex) { if (ex.getTargetException() instanceof SQLE...
[ "public", "static", "Object", "invokeJdbcMethod", "(", "Method", "method", ",", "Object", "target", ",", "Object", "...", "args", ")", "throws", "SQLException", "{", "try", "{", "return", "method", ".", "invoke", "(", "target", ",", "args", ")", ";", "}", ...
Invoke the specified JDBC API {@link Method} against the supplied target object with the supplied arguments. @param method the method to invoke @param target the target object to invoke the method on @param args the invocation arguments (may be {@code null}) @return the invocation result, if any @throws SQLException th...
[ "Invoke", "the", "specified", "JDBC", "API", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java#L228-L242
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java
PageFlowUtils.getCurrentActionResolver
public static ActionResolver getCurrentActionResolver( HttpServletRequest request, ServletContext servletContext ) { """ Get the current ActionResolver. @deprecated Use {@link #getCurrentPageFlow(HttpServletRequest, ServletContext)} instead. @param request the current HttpServletRequest. @param servletConte...
java
public static ActionResolver getCurrentActionResolver( HttpServletRequest request, ServletContext servletContext ) { StorageHandler sh = Handlers.get( servletContext ).getStorageHandler(); HttpServletRequest unwrappedRequest = unwrapMultipart( request ); RequestContext rc = new RequestContex...
[ "public", "static", "ActionResolver", "getCurrentActionResolver", "(", "HttpServletRequest", "request", ",", "ServletContext", "servletContext", ")", "{", "StorageHandler", "sh", "=", "Handlers", ".", "get", "(", "servletContext", ")", ".", "getStorageHandler", "(", "...
Get the current ActionResolver. @deprecated Use {@link #getCurrentPageFlow(HttpServletRequest, ServletContext)} instead. @param request the current HttpServletRequest. @param servletContext the current ServletContext. @return the current ActionResolver from the user session, or <code>null</code> if there is none.
[ "Get", "the", "current", "ActionResolver", ".", "@deprecated", "Use", "{", "@link", "#getCurrentPageFlow", "(", "HttpServletRequest", "ServletContext", ")", "}", "instead", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L300-L322
ACRA/acra
acra-core/src/main/java/org/acra/collector/LogCatCollector.java
LogCatCollector.collectLogCat
private String collectLogCat(@NonNull CoreConfiguration config, @Nullable String bufferName) throws IOException { """ Executes the logcat command with arguments taken from {@link org.acra.annotation.AcraCore#logcatArguments()} @param bufferName The name of the buffer to be read: "main" (default), "radio" or "ev...
java
private String collectLogCat(@NonNull CoreConfiguration config, @Nullable String bufferName) throws IOException { final int myPid = android.os.Process.myPid(); // no need to filter on jellybean onwards, android does that anyway final String myPidStr = Build.VERSION.SDK_INT < Build.VERSION_CODES....
[ "private", "String", "collectLogCat", "(", "@", "NonNull", "CoreConfiguration", "config", ",", "@", "Nullable", "String", "bufferName", ")", "throws", "IOException", "{", "final", "int", "myPid", "=", "android", ".", "os", ".", "Process", ".", "myPid", "(", ...
Executes the logcat command with arguments taken from {@link org.acra.annotation.AcraCore#logcatArguments()} @param bufferName The name of the buffer to be read: "main" (default), "radio" or "events". @return A string containing the latest lines of the output. Default is 100 lines, use "-t", "300" in {@link org.acra.a...
[ "Executes", "the", "logcat", "command", "with", "arguments", "taken", "from", "{", "@link", "org", ".", "acra", ".", "annotation", ".", "AcraCore#logcatArguments", "()", "}" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/collector/LogCatCollector.java#L69-L100
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java
RemoteWebDriverBuilder.oneOf
public RemoteWebDriverBuilder oneOf(Capabilities maybeThis, Capabilities... orOneOfThese) { """ Clears the current set of alternative browsers and instead sets the list of possible choices to the arguments given to this method. """ options.clear(); addAlternative(maybeThis); for (Capabilities anOr...
java
public RemoteWebDriverBuilder oneOf(Capabilities maybeThis, Capabilities... orOneOfThese) { options.clear(); addAlternative(maybeThis); for (Capabilities anOrOneOfThese : orOneOfThese) { addAlternative(anOrOneOfThese); } return this; }
[ "public", "RemoteWebDriverBuilder", "oneOf", "(", "Capabilities", "maybeThis", ",", "Capabilities", "...", "orOneOfThese", ")", "{", "options", ".", "clear", "(", ")", ";", "addAlternative", "(", "maybeThis", ")", ";", "for", "(", "Capabilities", "anOrOneOfThese",...
Clears the current set of alternative browsers and instead sets the list of possible choices to the arguments given to this method.
[ "Clears", "the", "current", "set", "of", "alternative", "browsers", "and", "instead", "sets", "the", "list", "of", "possible", "choices", "to", "the", "arguments", "given", "to", "this", "method", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java#L106-L113
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.padNext
public DateTimeFormatterBuilder padNext(int padWidth, char padChar) { """ Causes the next added printer/parser to pad to a fixed width. <p> This padding is intended for padding other than zero-padding. Zero-padding should be achieved using the appendValue methods. <p> During formatting, the decorated element ...
java
public DateTimeFormatterBuilder padNext(int padWidth, char padChar) { if (padWidth < 1) { throw new IllegalArgumentException("The pad width must be at least one but was " + padWidth); } active.padNextWidth = padWidth; active.padNextChar = padChar; active.valueParserIn...
[ "public", "DateTimeFormatterBuilder", "padNext", "(", "int", "padWidth", ",", "char", "padChar", ")", "{", "if", "(", "padWidth", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The pad width must be at least one but was \"", "+", "padWidth", ...
Causes the next added printer/parser to pad to a fixed width. <p> This padding is intended for padding other than zero-padding. Zero-padding should be achieved using the appendValue methods. <p> During formatting, the decorated element will be output and then padded to the specified width. An exception will be thrown d...
[ "Causes", "the", "next", "added", "printer", "/", "parser", "to", "pad", "to", "a", "fixed", "width", ".", "<p", ">", "This", "padding", "is", "intended", "for", "padding", "other", "than", "zero", "-", "padding", ".", "Zero", "-", "padding", "should", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L1751-L1759
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBindingBuilder.java
WebServiceRefBindingBuilder.createWebServiceRefFromResource
static WebServiceRef createWebServiceRefFromResource(Resource resource, Class<?> typeClass, String jndiName) throws InjectionException { """ This creates an @WebServiceRef instance based on data from an @Resource annotation. The type class and JNDI name are separately passed in because the @Resource annotation m...
java
static WebServiceRef createWebServiceRefFromResource(Resource resource, Class<?> typeClass, String jndiName) throws InjectionException { // notice we send in 'Service.class' for the 'value' attribute, this is // because only service type injections are possible with the @Resource // annotation, ...
[ "static", "WebServiceRef", "createWebServiceRefFromResource", "(", "Resource", "resource", ",", "Class", "<", "?", ">", "typeClass", ",", "String", "jndiName", ")", "throws", "InjectionException", "{", "// notice we send in 'Service.class' for the 'value' attribute, this is", ...
This creates an @WebServiceRef instance based on data from an @Resource annotation. The type class and JNDI name are separately passed in because the @Resource annotation may have the default values for these attributes.
[ "This", "creates", "an" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBindingBuilder.java#L190-L195
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerSICoreConnectionListener.java
ServerSICoreConnectionListener.asynchronousException
@Override public void asynchronousException(ConsumerSession session, Throwable e) { """ This event is generated if an exception is thrown during the processing of an asynchronous callback. In practise this should never occur as we should ensure that we catch all the errors in the place they occur as no state...
java
@Override public void asynchronousException(ConsumerSession session, Throwable e) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "asynchronousException", new Object[] { session, ...
[ "@", "Override", "public", "void", "asynchronousException", "(", "ConsumerSession", "session", ",", "Throwable", "e", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", ...
This event is generated if an exception is thrown during the processing of an asynchronous callback. In practise this should never occur as we should ensure that we catch all the errors in the place they occur as no state is available here. @param session @param e
[ "This", "event", "is", "generated", "if", "an", "exception", "is", "thrown", "during", "the", "processing", "of", "an", "asynchronous", "callback", ".", "In", "practise", "this", "should", "never", "occur", "as", "we", "should", "ensure", "that", "we", "catc...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerSICoreConnectionListener.java#L145-L179
agmip/dome
src/main/java/org/agmip/dome/DomeFunctions.java
DomeFunctions.dateOffset
public static HashMap<String, ArrayList<String>> dateOffset(HashMap m, String var, String base, String offset) { """ Wrapper around the {@code dateOffset()} method of {@code org.agmip.common.Functions}. @param m AgMIP simulation description @param var Variable to output @param base Base date to offset @param...
java
public static HashMap<String, ArrayList<String>> dateOffset(HashMap m, String var, String base, String offset) { return offset(m, var, base, offset, true); }
[ "public", "static", "HashMap", "<", "String", ",", "ArrayList", "<", "String", ">", ">", "dateOffset", "(", "HashMap", "m", ",", "String", "var", ",", "String", "base", ",", "String", "offset", ")", "{", "return", "offset", "(", "m", ",", "var", ",", ...
Wrapper around the {@code dateOffset()} method of {@code org.agmip.common.Functions}. @param m AgMIP simulation description @param var Variable to output @param base Base date to offset @param offset number of days to offset @return dome compatable modification
[ "Wrapper", "around", "the", "{", "@code", "dateOffset", "()", "}", "method", "of", "{", "@code", "org", ".", "agmip", ".", "common", ".", "Functions", "}", "." ]
train
https://github.com/agmip/dome/blob/ca7c15bf2bae09bb7e8d51160e77592bbda9343d/src/main/java/org/agmip/dome/DomeFunctions.java#L37-L39