repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java
ApplicationsInner.createAsync
public Observable<ApplicationInner> createAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { """ Creates applications for the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param a...
java
public Observable<ApplicationInner> createAsync(String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { return createWithServiceResponseAsync(resourceGroupName, clusterName, applicationName, parameters).map(new Func1<ServiceResponse<ApplicationInner>, ApplicationInne...
[ "public", "Observable", "<", "ApplicationInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "applicationName", ",", "ApplicationInner", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "re...
Creates applications for the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param applicationName The constant value for the application name. @param parameters The application create request. @throws IllegalArgumentException thrown if parameter...
[ "Creates", "applications", "for", "the", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java#L351-L358
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContent.java
CmsXmlContent.removeValuesInOtherLocales
private void removeValuesInOtherLocales(String elementPath, Locale sourceLocale) { """ Removes all values of the given path in the other locales.<p> @param elementPath the element path @param sourceLocale the source locale """ for (Locale locale : getLocales()) { if (locale.equals(sour...
java
private void removeValuesInOtherLocales(String elementPath, Locale sourceLocale) { for (Locale locale : getLocales()) { if (locale.equals(sourceLocale)) { continue; } while (hasValue(elementPath, locale)) { removeValue(elementPath, locale, 0);...
[ "private", "void", "removeValuesInOtherLocales", "(", "String", "elementPath", ",", "Locale", "sourceLocale", ")", "{", "for", "(", "Locale", "locale", ":", "getLocales", "(", ")", ")", "{", "if", "(", "locale", ".", "equals", "(", "sourceLocale", ")", ")", ...
Removes all values of the given path in the other locales.<p> @param elementPath the element path @param sourceLocale the source locale
[ "Removes", "all", "values", "of", "the", "given", "path", "in", "the", "other", "locales", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContent.java#L1112-L1122
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getUsersBatch
public OneLoginResponse<User> getUsersBatch(int batchSize) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Get a batch Users. This is usually the first version of the user batching methods to call as it requires no after-cursor information. @param batchSize Size of the Batch @...
java
public OneLoginResponse<User> getUsersBatch(int batchSize) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getUsersBatch(batchSize, null); }
[ "public", "OneLoginResponse", "<", "User", ">", "getUsersBatch", "(", "int", "batchSize", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "getUsersBatch", "(", "batchSize", ",", "null", ")", ";", "}" ]
Get a batch Users. This is usually the first version of the user batching methods to call as it requires no after-cursor information. @param batchSize Size of the Batch @return OneLoginResponse of User (Batch) @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @thro...
[ "Get", "a", "batch", "Users", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L357-L359
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java
TransactionWriteRequest.addConditionCheck
public TransactionWriteRequest addConditionCheck(Object key, DynamoDBTransactionWriteExpression transactionWriteExpression) { """ Adds conditionCheck operation (to be executed on the object represented by key) to the list of transaction write operations. transactionWriteExpression is used to condition check on th...
java
public TransactionWriteRequest addConditionCheck(Object key, DynamoDBTransactionWriteExpression transactionWriteExpression) { return addConditionCheck(key, transactionWriteExpression, null /* returnValuesOnConditionCheckFailure */); }
[ "public", "TransactionWriteRequest", "addConditionCheck", "(", "Object", "key", ",", "DynamoDBTransactionWriteExpression", "transactionWriteExpression", ")", "{", "return", "addConditionCheck", "(", "key", ",", "transactionWriteExpression", ",", "null", "/* returnValuesOnCondit...
Adds conditionCheck operation (to be executed on the object represented by key) to the list of transaction write operations. transactionWriteExpression is used to condition check on the object represented by key.
[ "Adds", "conditionCheck", "operation", "(", "to", "be", "executed", "on", "the", "object", "represented", "by", "key", ")", "to", "the", "list", "of", "transaction", "write", "operations", ".", "transactionWriteExpression", "is", "used", "to", "condition", "chec...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java#L132-L134
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionaction.java
vpnsessionaction.get
public static vpnsessionaction get(nitro_service service, String name) throws Exception { """ Use this API to fetch vpnsessionaction resource of given name . """ vpnsessionaction obj = new vpnsessionaction(); obj.set_name(name); vpnsessionaction response = (vpnsessionaction) obj.get_resource(service); ...
java
public static vpnsessionaction get(nitro_service service, String name) throws Exception{ vpnsessionaction obj = new vpnsessionaction(); obj.set_name(name); vpnsessionaction response = (vpnsessionaction) obj.get_resource(service); return response; }
[ "public", "static", "vpnsessionaction", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnsessionaction", "obj", "=", "new", "vpnsessionaction", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch vpnsessionaction resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnsessionaction", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionaction.java#L1731-L1736
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.updateUserAsync
public Observable<Void> updateUserAsync(String poolId, String nodeId, String userName, NodeUpdateUserParameter nodeUpdateUserParameter, ComputeNodeUpdateUserOptions computeNodeUpdateUserOptions) { """ Updates the password and expiration time of a user account on the specified compute node. This operation replaces...
java
public Observable<Void> updateUserAsync(String poolId, String nodeId, String userName, NodeUpdateUserParameter nodeUpdateUserParameter, ComputeNodeUpdateUserOptions computeNodeUpdateUserOptions) { return updateUserWithServiceResponseAsync(poolId, nodeId, userName, nodeUpdateUserParameter, computeNodeUpdateUserO...
[ "public", "Observable", "<", "Void", ">", "updateUserAsync", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ",", "NodeUpdateUserParameter", "nodeUpdateUserParameter", ",", "ComputeNodeUpdateUserOptions", "computeNodeUpdateUserOptions", ")", "...
Updates the password and expiration time of a user account on the specified compute node. This operation replaces of all the updatable properties of the account. For example, if the expiryTime element is not specified, the current value is replaced with the default value, not left unmodified. You can update a user acco...
[ "Updates", "the", "password", "and", "expiration", "time", "of", "a", "user", "account", "on", "the", "specified", "compute", "node", ".", "This", "operation", "replaces", "of", "all", "the", "updatable", "properties", "of", "the", "account", ".", "For", "ex...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L764-L771
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java
BeanDefinitionParser.parseQualifierElements
public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) { """ Parse qualifier sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object. """ NodeList nl ...
java
public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT)) parseQualifierElement((Element) n...
[ "public", "void", "parseQualifierElements", "(", "Element", "beanEle", ",", "AbstractBeanDefinition", "bd", ")", "{", "NodeList", "nl", "=", "beanEle", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nl", ".", "getL...
Parse qualifier sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object.
[ "Parse", "qualifier", "sub", "-", "elements", "of", "the", "given", "bean", "element", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L407-L414
alkacon/opencms-core
src/org/opencms/widgets/serialdate/CmsSerialDateValue.java
CmsSerialDateValue.readOptionalDate
private Date readOptionalDate(JSONObject json, String key) { """ Read an optional Date value (stored as string) form a JSON Object. @param json the JSON object to read from. @param key the key for the Long value in the provided JSON object. @return the Date or null if reading the Date fails. """ tr...
java
private Date readOptionalDate(JSONObject json, String key) { try { String str = json.getString(key); return new Date(Long.parseLong(str)); } catch (NumberFormatException | JSONException e) { LOG.debug("Reading optional JSON Long failed. Default to provided default va...
[ "private", "Date", "readOptionalDate", "(", "JSONObject", "json", ",", "String", "key", ")", "{", "try", "{", "String", "str", "=", "json", ".", "getString", "(", "key", ")", ";", "return", "new", "Date", "(", "Long", ".", "parseLong", "(", "str", ")",...
Read an optional Date value (stored as string) form a JSON Object. @param json the JSON object to read from. @param key the key for the Long value in the provided JSON object. @return the Date or null if reading the Date fails.
[ "Read", "an", "optional", "Date", "value", "(", "stored", "as", "string", ")", "form", "a", "JSON", "Object", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateValue.java#L333-L342
btrplace/scheduler
json/src/main/java/org/btrplace/json/model/view/ModelViewsConverter.java
ModelViewsConverter.fromJSON
public ModelView fromJSON(Model mo, JSONObject in) throws JSONConverterException { """ Convert a json-encoded view. @param mo the model to rely on @param in the view to decode @return the resulting view @throws JSONConverterException if the conversion failed """ checkKeys(in, ModelViewConverter.I...
java
public ModelView fromJSON(Model mo, JSONObject in) throws JSONConverterException { checkKeys(in, ModelViewConverter.IDENTIFIER); Object id = in.get(ModelViewConverter.IDENTIFIER); ModelViewConverter<? extends ModelView> c = json2java.get(id.toString()); if (c == null) { throw...
[ "public", "ModelView", "fromJSON", "(", "Model", "mo", ",", "JSONObject", "in", ")", "throws", "JSONConverterException", "{", "checkKeys", "(", "in", ",", "ModelViewConverter", ".", "IDENTIFIER", ")", ";", "Object", "id", "=", "in", ".", "get", "(", "ModelVi...
Convert a json-encoded view. @param mo the model to rely on @param in the view to decode @return the resulting view @throws JSONConverterException if the conversion failed
[ "Convert", "a", "json", "-", "encoded", "view", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/json/src/main/java/org/btrplace/json/model/view/ModelViewsConverter.java#L106-L114
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java
ContinuousDistributions.fCdf
public static double fCdf(double x, int f1, int f2) { """ Calculates the probability from 0 to X under F Distribution @param x @param f1 @param f2 @return """ if(x<0 || f1<=0 || f2<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } ...
java
public static double fCdf(double x, int f1, int f2) { if(x<0 || f1<=0 || f2<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double Z = x/(x + (double)f2/f1); double FCdf = betaCdf(Z,f1/2.0,f2/2.0); return FCdf; ...
[ "public", "static", "double", "fCdf", "(", "double", "x", ",", "int", "f1", ",", "int", "f2", ")", "{", "if", "(", "x", "<", "0", "||", "f1", "<=", "0", "||", "f2", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"All the pa...
Calculates the probability from 0 to X under F Distribution @param x @param f1 @param f2 @return
[ "Calculates", "the", "probability", "from", "0", "to", "X", "under", "F", "Distribution" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java#L249-L258
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java
CassandraClientBase.persistJoinTableByCql
protected void persistJoinTableByCql(JoinTableData joinTableData, Cassandra.Client conn) { """ Persist join table by cql. @param joinTableData the join table data @param conn the conn """ String joinTableName = joinTableData.getJoinTableName(); String invJoinColumnName = joinTableData.get...
java
protected void persistJoinTableByCql(JoinTableData joinTableData, Cassandra.Client conn) { String joinTableName = joinTableData.getJoinTableName(); String invJoinColumnName = joinTableData.getInverseJoinColumnName(); Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords()...
[ "protected", "void", "persistJoinTableByCql", "(", "JoinTableData", "joinTableData", ",", "Cassandra", ".", "Client", "conn", ")", "{", "String", "joinTableName", "=", "joinTableData", ".", "getJoinTableName", "(", ")", ";", "String", "invJoinColumnName", "=", "join...
Persist join table by cql. @param joinTableData the join table data @param conn the conn
[ "Persist", "join", "table", "by", "cql", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java#L2357-L2425
apiman/apiman
gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java
JdbcRegistry.validateContract
private void validateContract(final Contract contract, Connection connection) throws RegistrationException { """ Ensures that the api referenced by the Contract actually exists (is published). @param contract @param connection @throws RegistrationException """ QueryRunner run = new Query...
java
private void validateContract(final Contract contract, Connection connection) throws RegistrationException { QueryRunner run = new QueryRunner(); try { Api api = run.query(connection, "SELECT bean FROM gw_apis WHERE org_id = ? AND id = ? AND version = ?", //$NON-NLS-1$ ...
[ "private", "void", "validateContract", "(", "final", "Contract", "contract", ",", "Connection", "connection", ")", "throws", "RegistrationException", "{", "QueryRunner", "run", "=", "new", "QueryRunner", "(", ")", ";", "try", "{", "Api", "api", "=", "run", "."...
Ensures that the api referenced by the Contract actually exists (is published). @param contract @param connection @throws RegistrationException
[ "Ensures", "that", "the", "api", "referenced", "by", "the", "Contract", "actually", "exists", "(", "is", "published", ")", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/jdbc/src/main/java/io/apiman/gateway/engine/jdbc/JdbcRegistry.java#L151-L165
apache/groovy
subprojects/groovy-swing/src/main/java/groovy/model/DefaultTableColumn.java
DefaultTableColumn.getValue
public Object getValue(Object row, int rowIndex, int columnIndex) { """ Evaluates the value of a cell @return the value @param row the row of interest @param rowIndex the index of the row of interest @param columnIndex the column of interest """ if (valueModel instanceof NestedValueModel) { ...
java
public Object getValue(Object row, int rowIndex, int columnIndex) { if (valueModel instanceof NestedValueModel) { NestedValueModel nestedModel = (NestedValueModel) valueModel; nestedModel.getSourceModel().setValue(row); } return valueModel.getValue(); }
[ "public", "Object", "getValue", "(", "Object", "row", ",", "int", "rowIndex", ",", "int", "columnIndex", ")", "{", "if", "(", "valueModel", "instanceof", "NestedValueModel", ")", "{", "NestedValueModel", "nestedModel", "=", "(", "NestedValueModel", ")", "valueMo...
Evaluates the value of a cell @return the value @param row the row of interest @param rowIndex the index of the row of interest @param columnIndex the column of interest
[ "Evaluates", "the", "value", "of", "a", "cell" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/groovy/model/DefaultTableColumn.java#L56-L62
lestard/advanced-bindings
src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java
MathBindings.multiplyExact
public static LongBinding multiplyExact(final long x, final ObservableLongValue y) { """ Binding for {@link java.lang.Math#multiplyExact(long, long)} @param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows a long """ return createL...
java
public static LongBinding multiplyExact(final long x, final ObservableLongValue y) { return createLongBinding(() -> Math.multiplyExact(x, y.get()), y); }
[ "public", "static", "LongBinding", "multiplyExact", "(", "final", "long", "x", ",", "final", "ObservableLongValue", "y", ")", "{", "return", "createLongBinding", "(", "(", ")", "->", "Math", ".", "multiplyExact", "(", "x", ",", "y", ".", "get", "(", ")", ...
Binding for {@link java.lang.Math#multiplyExact(long, long)} @param x the first value @param y the second value @return the result @throws ArithmeticException if the result overflows a long
[ "Binding", "for", "{", "@link", "java", ".", "lang", ".", "Math#multiplyExact", "(", "long", "long", ")", "}" ]
train
https://github.com/lestard/advanced-bindings/blob/054a5dde261c29f862b971765fa3da3704a13ab4/src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java#L1035-L1037
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java
RoleAssignmentsInner.createByIdAsync
public Observable<RoleAssignmentInner> createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties) { """ Creates a role assignment by ID. @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/provid...
java
public Observable<RoleAssignmentInner> createByIdAsync(String roleAssignmentId, RoleAssignmentProperties properties) { return createByIdWithServiceResponseAsync(roleAssignmentId, properties).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public Rol...
[ "public", "Observable", "<", "RoleAssignmentInner", ">", "createByIdAsync", "(", "String", "roleAssignmentId", ",", "RoleAssignmentProperties", "properties", ")", "{", "return", "createByIdWithServiceResponseAsync", "(", "roleAssignmentId", ",", "properties", ")", ".", "m...
Creates a role assignment by ID. @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and resource type. Use the format, /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: /subscriptions/{subId}/resourcegroups/{rgname}//provide...
[ "Creates", "a", "role", "assignment", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java#L1018-L1025
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/compat/javatime/LocalDateIteratorFactory.java
LocalDateIteratorFactory.createLocalDateIterable
public static LocalDateIterable createLocalDateIterable(String rdata, LocalDate start, boolean strict) throws ParseException { """ given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse them into a single local date iterable. @param rd...
java
public static LocalDateIterable createLocalDateIterable(String rdata, LocalDate start, boolean strict) throws ParseException { return createLocalDateIterable(rdata, start, ZoneId.of("UTC"), strict); }
[ "public", "static", "LocalDateIterable", "createLocalDateIterable", "(", "String", "rdata", ",", "LocalDate", "start", ",", "boolean", "strict", ")", "throws", "ParseException", "{", "return", "createLocalDateIterable", "(", "rdata", ",", "start", ",", "ZoneId", "."...
given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse them into a single local date iterable. @param rdata RRULE, EXRULE, RDATE, and EXDATE lines. @param start the first occurrence of the series. @param strict true if any failure to parse should result in a ParseException. false causes bad content lin...
[ "given", "a", "block", "of", "RRULE", "EXRULE", "RDATE", "and", "EXDATE", "content", "lines", "parse", "them", "into", "a", "single", "local", "date", "iterable", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/compat/javatime/LocalDateIteratorFactory.java#L123-L126
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java
InstrumentedExecutors.defaultThreadFactory
public static InstrumentedThreadFactory defaultThreadFactory(MetricRegistry registry, String name) { """ Returns an instrumented default thread factory used to create new threads. This factory creates all new threads used by an Executor in the same {@link ThreadGroup}. If there is a {@link java.lang.SecurityMan...
java
public static InstrumentedThreadFactory defaultThreadFactory(MetricRegistry registry, String name) { return new InstrumentedThreadFactory(Executors.defaultThreadFactory(), registry, name); }
[ "public", "static", "InstrumentedThreadFactory", "defaultThreadFactory", "(", "MetricRegistry", "registry", ",", "String", "name", ")", "{", "return", "new", "InstrumentedThreadFactory", "(", "Executors", ".", "defaultThreadFactory", "(", ")", ",", "registry", ",", "n...
Returns an instrumented default thread factory used to create new threads. This factory creates all new threads used by an Executor in the same {@link ThreadGroup}. If there is a {@link java.lang.SecurityManager}, it uses the group of {@link System#getSecurityManager}, else the group of the thread invoking this {@code ...
[ "Returns", "an", "instrumented", "default", "thread", "factory", "used", "to", "create", "new", "threads", ".", "This", "factory", "creates", "all", "new", "threads", "used", "by", "an", "Executor", "in", "the", "same", "{", "@link", "ThreadGroup", "}", ".",...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L483-L485
Ordinastie/MalisisCore
src/main/java/net/malisis/core/asm/AsmUtils.java
AsmUtils.findMethod
public static MethodNode findMethod(ClassNode clazz, String name) { """ Finds the method with the given name. If multiple methods with the same name exist, the first one will be returned @param clazz the class @param name the method name to search for @return the first method with the given name or null if no...
java
public static MethodNode findMethod(ClassNode clazz, String name) { for (MethodNode method : clazz.methods) { if (method.name.equals(name)) { return method; } } return null; }
[ "public", "static", "MethodNode", "findMethod", "(", "ClassNode", "clazz", ",", "String", "name", ")", "{", "for", "(", "MethodNode", "method", ":", "clazz", ".", "methods", ")", "{", "if", "(", "method", ".", "name", ".", "equals", "(", "name", ")", "...
Finds the method with the given name. If multiple methods with the same name exist, the first one will be returned @param clazz the class @param name the method name to search for @return the first method with the given name or null if no such method is found
[ "Finds", "the", "method", "with", "the", "given", "name", ".", "If", "multiple", "methods", "with", "the", "same", "name", "exist", "the", "first", "one", "will", "be", "returned" ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/asm/AsmUtils.java#L63-L73
dnsjava/dnsjava
org/xbill/DNS/Cache.java
Cache.addRecord
public synchronized void addRecord(Record r, int cred, Object o) { """ Adds a record to the Cache. @param r The record to be added @param cred The credibility of the record @param o The source of the record (this could be a Message, for example) @see Record """ Name name = r.getName(); int type = r.getRR...
java
public synchronized void addRecord(Record r, int cred, Object o) { Name name = r.getName(); int type = r.getRRsetType(); if (!Type.isRR(type)) return; Element element = findElement(name, type, cred); if (element == null) { CacheRRset crrset = new CacheRRset(r, cred, maxcache); addRRset(crrset, cred); } else...
[ "public", "synchronized", "void", "addRecord", "(", "Record", "r", ",", "int", "cred", ",", "Object", "o", ")", "{", "Name", "name", "=", "r", ".", "getName", "(", ")", ";", "int", "type", "=", "r", ".", "getRRsetType", "(", ")", ";", "if", "(", ...
Adds a record to the Cache. @param r The record to be added @param cred The credibility of the record @param o The source of the record (this could be a Message, for example) @see Record
[ "Adds", "a", "record", "to", "the", "Cache", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Cache.java#L326-L342
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/VarTupleSet.java
VarTupleSet.getUsedScore
private double getUsedScore( VarBindingDef binding, boolean onceOnly) { """ Returns a measure of the "used-ness" of the given binding. If <CODE>onceOnly</CODE> is true, consider only once-only tuples. Returns a value between 0 and 1 (exclusive) -- a higher value means a binding is more used. """ // Since ...
java
private double getUsedScore( VarBindingDef binding, boolean onceOnly) { // Since used tuples are in least-recently-used-first order, start from the end of the list and look // for the first tuple that includes this binding. This is the most recent use of this binding. // Return the distance of this tupl...
[ "private", "double", "getUsedScore", "(", "VarBindingDef", "binding", ",", "boolean", "onceOnly", ")", "{", "// Since used tuples are in least-recently-used-first order, start from the end of the list and look", "// for the first tuple that includes this binding. This is the most recent use ...
Returns a measure of the "used-ness" of the given binding. If <CODE>onceOnly</CODE> is true, consider only once-only tuples. Returns a value between 0 and 1 (exclusive) -- a higher value means a binding is more used.
[ "Returns", "a", "measure", "of", "the", "used", "-", "ness", "of", "the", "given", "binding", ".", "If", "<CODE", ">", "onceOnly<", "/", "CODE", ">", "is", "true", "consider", "only", "once", "-", "only", "tuples", ".", "Returns", "a", "value", "betwee...
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/VarTupleSet.java#L146-L168
netty/netty
resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
DnsNameResolver.resolveAll
public final Future<List<InetAddress>> resolveAll(String inetHost, Iterable<DnsRecord> additionals) { """ Resolves the specified host name and port into a list of address. @param inetHost the name to resolve @param additionals additional records ({@code OPT}) @return the list of the address as the result of...
java
public final Future<List<InetAddress>> resolveAll(String inetHost, Iterable<DnsRecord> additionals) { return resolveAll(inetHost, additionals, executor().<List<InetAddress>>newPromise()); }
[ "public", "final", "Future", "<", "List", "<", "InetAddress", ">", ">", "resolveAll", "(", "String", "inetHost", ",", "Iterable", "<", "DnsRecord", ">", "additionals", ")", "{", "return", "resolveAll", "(", "inetHost", ",", "additionals", ",", "executor", "(...
Resolves the specified host name and port into a list of address. @param inetHost the name to resolve @param additionals additional records ({@code OPT}) @return the list of the address as the result of the resolution
[ "Resolves", "the", "specified", "host", "name", "and", "port", "into", "a", "list", "of", "address", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L670-L672
romannurik/muzei
muzei-api/src/main/java/com/google/android/apps/muzei/api/Artwork.java
Artwork.fromJson
@NonNull public static Artwork fromJson(@NonNull JSONObject jsonObject) { """ Deserializes an artwork object from a {@link JSONObject}. @param jsonObject JSON representation generated by {@link #toJson} to deserialize. @return the artwork from the given {@link JSONObject} """ @SuppressWarning...
java
@NonNull public static Artwork fromJson(@NonNull JSONObject jsonObject) { @SuppressWarnings("WrongConstant") // Assume the KEY_META_FONT is valid Builder builder = new Builder() .title(jsonObject.optString(KEY_TITLE)) .byline(jsonObject.optString(KEY_BYLINE)) ...
[ "@", "NonNull", "public", "static", "Artwork", "fromJson", "(", "@", "NonNull", "JSONObject", "jsonObject", ")", "{", "@", "SuppressWarnings", "(", "\"WrongConstant\"", ")", "// Assume the KEY_META_FONT is valid", "Builder", "builder", "=", "new", "Builder", "(", ")...
Deserializes an artwork object from a {@link JSONObject}. @param jsonObject JSON representation generated by {@link #toJson} to deserialize. @return the artwork from the given {@link JSONObject}
[ "Deserializes", "an", "artwork", "object", "from", "a", "{", "@link", "JSONObject", "}", "." ]
train
https://github.com/romannurik/muzei/blob/d00777a5fc59f34471be338c814ea85ddcbde304/muzei-api/src/main/java/com/google/android/apps/muzei/api/Artwork.java#L618-L651
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cloud_project_serviceName_ip_GET
public OvhOrder cloud_project_serviceName_ip_GET(String serviceName, OvhGeolocationEnum country, String instanceId, Long quantity) throws IOException { """ Get prices and contracts information REST: GET /order/cloud/project/{serviceName}/ip @param instanceId [required] Instance id where ip will be routed to @...
java
public OvhOrder cloud_project_serviceName_ip_GET(String serviceName, OvhGeolocationEnum country, String instanceId, Long quantity) throws IOException { String qPath = "/order/cloud/project/{serviceName}/ip"; StringBuilder sb = path(qPath, serviceName); query(sb, "country", country); query(sb, "instanceId", inst...
[ "public", "OvhOrder", "cloud_project_serviceName_ip_GET", "(", "String", "serviceName", ",", "OvhGeolocationEnum", "country", ",", "String", "instanceId", ",", "Long", "quantity", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cloud/project/{serviceN...
Get prices and contracts information REST: GET /order/cloud/project/{serviceName}/ip @param instanceId [required] Instance id where ip will be routed to @param country [required] IP geolocation @param quantity [required] Number of failover ip @param serviceName [required] The project id
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2926-L2934
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.rename_resource
protected base_response rename_resource(nitro_service service, String newname) throws Exception { """ Use this method to perform a rename operation on netscaler resource. @param service nitro_service object. @param newname new name to be set to the specified resource. @return status of the operation performed...
java
protected base_response rename_resource(nitro_service service, String newname) throws Exception { if (!service.isLogin() && !get_object_type().equals("login")) service.login(); options option = new options(); option.set_action("rename"); this.set_newname(newname); base_response response = post_request(s...
[ "protected", "base_response", "rename_resource", "(", "nitro_service", "service", ",", "String", "newname", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", "&&", "!", "get_object_type", "(", ")", ".", "equals", "(", "\"l...
Use this method to perform a rename operation on netscaler resource. @param service nitro_service object. @param newname new name to be set to the specified resource. @return status of the operation performed. @throws Exception Nitro exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "rename", "operation", "on", "netscaler", "resource", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L458-L468
netty/netty
example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java
HttpStaticFileServerHandler.setContentTypeHeader
private static void setContentTypeHeader(HttpResponse response, File file) { """ Sets the content type header for the HTTP Response @param response HTTP response @param file file to extract content type """ MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers()...
java
private static void setContentTypeHeader(HttpResponse response, File file) { MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mimeTypesMap.getContentType(file.getPath())); }
[ "private", "static", "void", "setContentTypeHeader", "(", "HttpResponse", "response", ",", "File", "file", ")", "{", "MimetypesFileTypeMap", "mimeTypesMap", "=", "new", "MimetypesFileTypeMap", "(", ")", ";", "response", ".", "headers", "(", ")", ".", "set", "(",...
Sets the content type header for the HTTP Response @param response HTTP response @param file file to extract content type
[ "Sets", "the", "content", "type", "header", "for", "the", "HTTP", "Response" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java#L415-L418
j256/ormlite-core
src/main/java/com/j256/ormlite/dao/DaoManager.java
DaoManager.lookupDao
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, Class<T> clazz) { """ Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null. """ if (connectionSource == null) { throw new IllegalArgumentException("conn...
java
public synchronized static <D extends Dao<T, ?>, T> D lookupDao(ConnectionSource connectionSource, Class<T> clazz) { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } ClassConnectionSource key = new ClassConnectionSource(connectionSource, clazz); ...
[ "public", "synchronized", "static", "<", "D", "extends", "Dao", "<", "T", ",", "?", ">", ",", "T", ">", "D", "lookupDao", "(", "ConnectionSource", "connectionSource", ",", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "connectionSource", "==", ...
Helper method to lookup a DAO if it has already been associated with the class. Otherwise this returns null.
[ "Helper", "method", "to", "lookup", "a", "DAO", "if", "it", "has", "already", "been", "associated", "with", "the", "class", ".", "Otherwise", "this", "returns", "null", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/dao/DaoManager.java#L109-L118
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/code/Types.java
Types.isAssignable
public boolean isAssignable(Type t, Type s, Warner warn) { """ Is t assignable to s?<br> Equivalent to subtype except for constant values and raw types.<br> (not defined for Method and ForAll types) """ if (t.hasTag(ERROR)) return true; if (t.getTag().isSubRangeOf(INT) && t.const...
java
public boolean isAssignable(Type t, Type s, Warner warn) { if (t.hasTag(ERROR)) return true; if (t.getTag().isSubRangeOf(INT) && t.constValue() != null) { int value = ((Number)t.constValue()).intValue(); switch (s.getTag()) { case BYTE: if ...
[ "public", "boolean", "isAssignable", "(", "Type", "t", ",", "Type", "s", ",", "Warner", "warn", ")", "{", "if", "(", "t", ".", "hasTag", "(", "ERROR", ")", ")", "return", "true", ";", "if", "(", "t", ".", "getTag", "(", ")", ".", "isSubRangeOf", ...
Is t assignable to s?<br> Equivalent to subtype except for constant values and raw types.<br> (not defined for Method and ForAll types)
[ "Is", "t", "assignable", "to", "s?<br", ">", "Equivalent", "to", "subtype", "except", "for", "constant", "values", "and", "raw", "types", ".", "<br", ">", "(", "not", "defined", "for", "Method", "and", "ForAll", "types", ")" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Types.java#L2134-L2165
drinkjava2/jDialects
core/src/main/java/com/github/drinkjava2/jdialects/model/TableModel.java
TableModel.sortedUUIDGenerator
public void sortedUUIDGenerator(String name, Integer sortedLength, Integer uuidLength) { """ Add a Sequence Generator, note: not all database support sequence """ checkReadOnly(); DialectException.assureNotNull(name); if (this.getIdGenerator(GenerationType.SORTED_UUID, name) != null) throw new Dialect...
java
public void sortedUUIDGenerator(String name, Integer sortedLength, Integer uuidLength) { checkReadOnly(); DialectException.assureNotNull(name); if (this.getIdGenerator(GenerationType.SORTED_UUID, name) != null) throw new DialectException("Duplicated sortedUUIDGenerator name '" + name + "'"); idGenerators.add...
[ "public", "void", "sortedUUIDGenerator", "(", "String", "name", ",", "Integer", "sortedLength", ",", "Integer", "uuidLength", ")", "{", "checkReadOnly", "(", ")", ";", "DialectException", ".", "assureNotNull", "(", "name", ")", ";", "if", "(", "this", ".", "...
Add a Sequence Generator, note: not all database support sequence
[ "Add", "a", "Sequence", "Generator", "note", ":", "not", "all", "database", "support", "sequence" ]
train
https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/model/TableModel.java#L172-L178
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java
BondTools.giveAngle
public static double giveAngle(IAtom from, IAtom to1, IAtom to2) { """ Calls giveAngleBothMethods with bool = true. @param from the atom to view from @param to1 first direction to look in @param to2 second direction to look in @return The angle in rad from 0 to 2*PI """ return (give...
java
public static double giveAngle(IAtom from, IAtom to1, IAtom to2) { return (giveAngleBothMethods(from, to1, to2, true)); }
[ "public", "static", "double", "giveAngle", "(", "IAtom", "from", ",", "IAtom", "to1", ",", "IAtom", "to2", ")", "{", "return", "(", "giveAngleBothMethods", "(", "from", ",", "to1", ",", "to2", ",", "true", ")", ")", ";", "}" ]
Calls giveAngleBothMethods with bool = true. @param from the atom to view from @param to1 first direction to look in @param to2 second direction to look in @return The angle in rad from 0 to 2*PI
[ "Calls", "giveAngleBothMethods", "with", "bool", "=", "true", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L531-L533
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Long checkNull(Long value, Long elseValue) { """ 检查Long是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Long} @since 1.0.8 """ return isNull(value) ? elseValue : value; }
java
public static Long checkNull(Long value, Long elseValue) { return isNull(value) ? elseValue : value; }
[ "public", "static", "Long", "checkNull", "(", "Long", "value", ",", "Long", "elseValue", ")", "{", "return", "isNull", "(", "value", ")", "?", "elseValue", ":", "value", ";", "}" ]
检查Long是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Long} @since 1.0.8
[ "检查Long是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1253-L1255
unic/neba
core/src/main/java/io/neba/core/resourcemodels/metadata/ResourceModelMetaDataRegistrar.java
ResourceModelMetaDataRegistrar.register
public synchronized void register(OsgiModelSource<?> modelSource) { """ Creates a new {@link ResourceModelMetaData} for the model represented by the provided model source. @param modelSource must not be <code>null</code>. """ if (modelSource == null) { throw new IllegalArgumentException...
java
public synchronized void register(OsgiModelSource<?> modelSource) { if (modelSource == null) { throw new IllegalArgumentException("method parameter modelSource must not be null"); } Class<?> modelType = modelSource.getModelType(); ResourceModelMetaData modelMetaData = new Re...
[ "public", "synchronized", "void", "register", "(", "OsgiModelSource", "<", "?", ">", "modelSource", ")", "{", "if", "(", "modelSource", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"method parameter modelSource must not be null\"", ")", ...
Creates a new {@link ResourceModelMetaData} for the model represented by the provided model source. @param modelSource must not be <code>null</code>.
[ "Creates", "a", "new", "{", "@link", "ResourceModelMetaData", "}", "for", "the", "model", "represented", "by", "the", "provided", "model", "source", "." ]
train
https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/core/src/main/java/io/neba/core/resourcemodels/metadata/ResourceModelMetaDataRegistrar.java#L99-L112
codescape/bitvunit
bitvunit-core/src/main/java/de/codescape/bitvunit/BitvUnit.java
BitvUnit.assertAccessibility
public static void assertAccessibility(Reader reader, Testable testable) { """ JUnit Assertion to verify a {@link java.io.Reader} instance for accessibility. @param reader {@link java.io.Reader} instance @param testable rule(s) to apply """ assertThat(reader, is(compliantTo(testable))); }
java
public static void assertAccessibility(Reader reader, Testable testable) { assertThat(reader, is(compliantTo(testable))); }
[ "public", "static", "void", "assertAccessibility", "(", "Reader", "reader", ",", "Testable", "testable", ")", "{", "assertThat", "(", "reader", ",", "is", "(", "compliantTo", "(", "testable", ")", ")", ")", ";", "}" ]
JUnit Assertion to verify a {@link java.io.Reader} instance for accessibility. @param reader {@link java.io.Reader} instance @param testable rule(s) to apply
[ "JUnit", "Assertion", "to", "verify", "a", "{", "@link", "java", ".", "io", ".", "Reader", "}", "instance", "for", "accessibility", "." ]
train
https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/BitvUnit.java#L68-L70
pravega/pravega
controller/src/main/java/io/pravega/controller/server/SegmentHelper.java
SegmentHelper.deleteTableSegment
public CompletableFuture<Boolean> deleteTableSegment(final String tableName, final boolean mustBeEmpty, String delegationToken, final long clientRequ...
java
public CompletableFuture<Boolean> deleteTableSegment(final String tableName, final boolean mustBeEmpty, String delegationToken, final long clientRequ...
[ "public", "CompletableFuture", "<", "Boolean", ">", "deleteTableSegment", "(", "final", "String", "tableName", ",", "final", "boolean", "mustBeEmpty", ",", "String", "delegationToken", ",", "final", "long", "clientRequestId", ")", "{", "final", "CompletableFuture", ...
This method sends a WireCommand to delete a table segment. @param tableName Qualified table name. @param mustBeEmpty Flag to check if the table segment should be empty before deletion. @param delegationToken The token to be presented to the segmentstore. @param clientRequestId Request id. @re...
[ "This", "method", "sends", "a", "WireCommand", "to", "delete", "a", "table", "segment", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/server/SegmentHelper.java#L696-L755
molgenis/molgenis
molgenis-data-validation/src/main/java/org/molgenis/data/validation/meta/EntityTypeValidator.java
EntityTypeValidator.validateEntityId
static void validateEntityId(EntityType entityType) { """ Validates the entity ID: - Validates that the entity ID does not contain illegal characters and validates the name length @param entityType entity meta data @throws MolgenisValidationException if the entity simple name content is invalid or the fully ...
java
static void validateEntityId(EntityType entityType) { // validate entity name (e.g. illegal characters, length) String id = entityType.getId(); if (!id.equals(ATTRIBUTE_META_DATA) && !id.equals(ENTITY_TYPE_META_DATA) && !id.equals(PACKAGE)) { try { NameValidator.validateEntityN...
[ "static", "void", "validateEntityId", "(", "EntityType", "entityType", ")", "{", "// validate entity name (e.g. illegal characters, length)", "String", "id", "=", "entityType", ".", "getId", "(", ")", ";", "if", "(", "!", "id", ".", "equals", "(", "ATTRIBUTE_META_DA...
Validates the entity ID: - Validates that the entity ID does not contain illegal characters and validates the name length @param entityType entity meta data @throws MolgenisValidationException if the entity simple name content is invalid or the fully qualified name, simple name and package name are not consistent
[ "Validates", "the", "entity", "ID", ":", "-", "Validates", "that", "the", "entity", "ID", "does", "not", "contain", "illegal", "characters", "and", "validates", "the", "name", "length" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-validation/src/main/java/org/molgenis/data/validation/meta/EntityTypeValidator.java#L292-L304
mfornos/humanize
humanize-emoji/src/main/java/humanize/emoji/Emoji.java
Emoji.findByVendorCodePoint
public static EmojiChar findByVendorCodePoint(Vendor vendor, String point) { """ Finds an emoji character by vendor code point. @param vendor the vendor @param point the raw character for the code point in the vendor space @return the corresponding emoji character or null if not found """ Emoji ...
java
public static EmojiChar findByVendorCodePoint(Vendor vendor, String point) { Emoji emoji = Emoji.getInstance(); return emoji._findByVendorCodePoint(vendor, point); }
[ "public", "static", "EmojiChar", "findByVendorCodePoint", "(", "Vendor", "vendor", ",", "String", "point", ")", "{", "Emoji", "emoji", "=", "Emoji", ".", "getInstance", "(", ")", ";", "return", "emoji", ".", "_findByVendorCodePoint", "(", "vendor", ",", "point...
Finds an emoji character by vendor code point. @param vendor the vendor @param point the raw character for the code point in the vendor space @return the corresponding emoji character or null if not found
[ "Finds", "an", "emoji", "character", "by", "vendor", "code", "point", "." ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-emoji/src/main/java/humanize/emoji/Emoji.java#L147-L151
VoltDB/voltdb
src/frontend/org/voltdb/ElasticHashinator.java
ElasticHashinator.toJSONStringCompressed
private byte[] toJSONStringCompressed() { """ Serializes the configuration into JSON, also updates the currently cached m_configJSON. @return The JSONString of the current configuration. """ String str = toJSONString(); if (str == null || str.length() == 0) { return new byte[0] ; ...
java
private byte[] toJSONStringCompressed() { String str = toJSONString(); if (str == null || str.length() == 0) { return new byte[0] ; } byte[] outStr; try { outStr = compressJSONString(str); } catch (IOException e) { throw new RuntimeExce...
[ "private", "byte", "[", "]", "toJSONStringCompressed", "(", ")", "{", "String", "str", "=", "toJSONString", "(", ")", ";", "if", "(", "str", "==", "null", "||", "str", ".", "length", "(", ")", "==", "0", ")", "{", "return", "new", "byte", "[", "0",...
Serializes the configuration into JSON, also updates the currently cached m_configJSON. @return The JSONString of the current configuration.
[ "Serializes", "the", "configuration", "into", "JSON", "also", "updates", "the", "currently", "cached", "m_configJSON", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ElasticHashinator.java#L252-L264
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/deeplearning/DeeplearningMojoModel.java
DeeplearningMojoModel.calculateReconstructionErrorPerRowData
public double calculateReconstructionErrorPerRowData(double [] original, double [] reconstructed) { """ Calculates average reconstruction error (MSE). Uses a normalization defined for the numerical features of the trained model. @return average reconstruction error = ||original - reconstructed||^2 / length(origi...
java
public double calculateReconstructionErrorPerRowData(double [] original, double [] reconstructed){ assert (original != null && original.length > 0) && (reconstructed != null && reconstructed.length > 0); assert original.length == reconstructed.length; int numStartIndex = original.length - this._nums; do...
[ "public", "double", "calculateReconstructionErrorPerRowData", "(", "double", "[", "]", "original", ",", "double", "[", "]", "reconstructed", ")", "{", "assert", "(", "original", "!=", "null", "&&", "original", ".", "length", ">", "0", ")", "&&", "(", "recons...
Calculates average reconstruction error (MSE). Uses a normalization defined for the numerical features of the trained model. @return average reconstruction error = ||original - reconstructed||^2 / length(original)
[ "Calculates", "average", "reconstruction", "error", "(", "MSE", ")", ".", "Uses", "a", "normalization", "defined", "for", "the", "numerical", "features", "of", "the", "trained", "model", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/deeplearning/DeeplearningMojoModel.java#L142-L153
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/ContentCryptoScheme.java
ContentCryptoScheme.createCipherLite
CipherLite createCipherLite(SecretKey cek, byte[] iv, int cipherMode) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidAlgorithmParameterException { """ Creates and initializes a cipher lite for content encrypt/decrypt...
java
CipherLite createCipherLite(SecretKey cek, byte[] iv, int cipherMode) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidAlgorithmParameterException { return createCipherLite(cek, iv, cipherMode, null); }
[ "CipherLite", "createCipherLite", "(", "SecretKey", "cek", ",", "byte", "[", "]", "iv", ",", "int", "cipherMode", ")", "throws", "InvalidKeyException", ",", "NoSuchAlgorithmException", ",", "NoSuchProviderException", ",", "NoSuchPaddingException", ",", "InvalidAlgorithm...
Creates and initializes a cipher lite for content encrypt/decryption. @param cek content encrypting key @param iv initialization vector @param cipherMode such as {@link Cipher#ENCRYPT_MODE} @return the cipher lite created and initialized.
[ "Creates", "and", "initializes", "a", "cipher", "lite", "for", "content", "encrypt", "/", "decryption", "." ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/ContentCryptoScheme.java#L226-L231
dickschoeller/gedbrowser
gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/transformers/AttributeListHelper.java
AttributeListHelper.addByType
private void addByType(final ApiAttribute apiParent, final String string) { """ Add the attributes if they match the given type. @param apiParent the parent attribute @param string the type we want to match """ for (final ApiAttribute object : apiParent.getAttributes()) { if (object.isT...
java
private void addByType(final ApiAttribute apiParent, final String string) { for (final ApiAttribute object : apiParent.getAttributes()) { if (object.isType(string)) { final ApiModelToGedObjectVisitor visitor = createVisitor(); object.accept(visitor); } ...
[ "private", "void", "addByType", "(", "final", "ApiAttribute", "apiParent", ",", "final", "String", "string", ")", "{", "for", "(", "final", "ApiAttribute", "object", ":", "apiParent", ".", "getAttributes", "(", ")", ")", "{", "if", "(", "object", ".", "isT...
Add the attributes if they match the given type. @param apiParent the parent attribute @param string the type we want to match
[ "Add", "the", "attributes", "if", "they", "match", "the", "given", "type", "." ]
train
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/transformers/AttributeListHelper.java#L42-L49
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.uploadFile
public <E extends Throwable> DbxEntry.File uploadFile(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer) throws DbxException, E { """ Upload file contents to Dropbox, getting contents from the given {@link DbxStreamWriter}. <pre> DbxClientV1 dbxClient = ... <b>// Crea...
java
public <E extends Throwable> DbxEntry.File uploadFile(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer) throws DbxException, E { Uploader uploader = startUploadFile(targetPath, writeMode, numBytes); return finishUploadFile(uploader, writer); }
[ "public", "<", "E", "extends", "Throwable", ">", "DbxEntry", ".", "File", "uploadFile", "(", "String", "targetPath", ",", "DbxWriteMode", "writeMode", ",", "long", "numBytes", ",", "DbxStreamWriter", "<", "E", ">", "writer", ")", "throws", "DbxException", ",",...
Upload file contents to Dropbox, getting contents from the given {@link DbxStreamWriter}. <pre> DbxClientV1 dbxClient = ... <b>// Create a file on Dropbox with 100 3-digit random numbers, one per line.</b> final int numRandoms = 100; int fileSize = numRandoms * 4; <b>3 digits, plus a newline</b> dbxClient.uploadFile(...
[ "Upload", "file", "contents", "to", "Dropbox", "getting", "contents", "from", "the", "given", "{", "@link", "DbxStreamWriter", "}", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L647-L652
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.importDevices
public JobResponseInner importDevices(String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters) { """ Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-ide...
java
public JobResponseInner importDevices(String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters) { return importDevicesWithServiceResponseAsync(resourceGroupName, resourceName, importDevicesParameters).toBlocking().single().body(); }
[ "public", "JobResponseInner", "importDevices", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ImportDevicesRequest", "importDevicesParameters", ")", "{", "return", "importDevicesWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ...
Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. Import, update, or delete device identities in the IoT hub identity registry from a blob. ...
[ "Import", "update", "or", "delete", "device", "identities", "in", "the", "IoT", "hub", "identity", "registry", "from", "a", "blob", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L3165-L3167
pedrovgs/Nox
nox/src/main/java/com/github/pedrovgs/nox/shape/Shape.java
Shape.setNoxItemYPosition
protected final void setNoxItemYPosition(int position, float y) { """ Configures the Y position for a given NoxItem indicated with the item position. This method uses two counters to calculate the Shape minimum and maximum Y position used to configure the Shape scroll. """ noxItemsYPositions[position] = ...
java
protected final void setNoxItemYPosition(int position, float y) { noxItemsYPositions[position] = y; minY = (int) Math.min(y, minY); maxY = (int) Math.max(y, maxY); }
[ "protected", "final", "void", "setNoxItemYPosition", "(", "int", "position", ",", "float", "y", ")", "{", "noxItemsYPositions", "[", "position", "]", "=", "y", ";", "minY", "=", "(", "int", ")", "Math", ".", "min", "(", "y", ",", "minY", ")", ";", "m...
Configures the Y position for a given NoxItem indicated with the item position. This method uses two counters to calculate the Shape minimum and maximum Y position used to configure the Shape scroll.
[ "Configures", "the", "Y", "position", "for", "a", "given", "NoxItem", "indicated", "with", "the", "item", "position", ".", "This", "method", "uses", "two", "counters", "to", "calculate", "the", "Shape", "minimum", "and", "maximum", "Y", "position", "used", "...
train
https://github.com/pedrovgs/Nox/blob/b4dfe37895e1b7bf2084d60139931dd4fb12f3f4/nox/src/main/java/com/github/pedrovgs/nox/shape/Shape.java#L191-L195
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/support/LdapUtils.java
LdapUtils.iterateAttributeValues
public static void iterateAttributeValues(Attribute attribute, AttributeValueCallbackHandler callbackHandler) { """ Iterate through all the values of the specified Attribute calling back to the specified callbackHandler. @param attribute the Attribute to work with; not <code>null</code>. @param callbackHandler ...
java
public static void iterateAttributeValues(Attribute attribute, AttributeValueCallbackHandler callbackHandler) { Assert.notNull(attribute, "Attribute must not be null"); Assert.notNull(callbackHandler, "callbackHandler must not be null"); if (attribute instanceof Iterable) { int i = 0; for (Object obj : (It...
[ "public", "static", "void", "iterateAttributeValues", "(", "Attribute", "attribute", ",", "AttributeValueCallbackHandler", "callbackHandler", ")", "{", "Assert", ".", "notNull", "(", "attribute", ",", "\"Attribute must not be null\"", ")", ";", "Assert", ".", "notNull",...
Iterate through all the values of the specified Attribute calling back to the specified callbackHandler. @param attribute the Attribute to work with; not <code>null</code>. @param callbackHandler the callbackHandler; not <code>null</code>. @since 1.3
[ "Iterate", "through", "all", "the", "values", "of", "the", "specified", "Attribute", "calling", "back", "to", "the", "specified", "callbackHandler", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/support/LdapUtils.java#L298-L318
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/SystemUtil.java
SystemUtil.appendSuffixIfMissing
public static String appendSuffixIfMissing(String _str, String _suffix) { """ Append a suffix to the string (e.g. filename) if it doesn't have it already. @param _str string to check @param _suffix suffix to append @return string with suffix or original if no suffix was appended """ if (_str == null...
java
public static String appendSuffixIfMissing(String _str, String _suffix) { if (_str == null) { return null; } if (!_str.endsWith(_suffix)) { _str += _suffix; } return _str; }
[ "public", "static", "String", "appendSuffixIfMissing", "(", "String", "_str", ",", "String", "_suffix", ")", "{", "if", "(", "_str", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "!", "_str", ".", "endsWith", "(", "_suffix", ")", ")", ...
Append a suffix to the string (e.g. filename) if it doesn't have it already. @param _str string to check @param _suffix suffix to append @return string with suffix or original if no suffix was appended
[ "Append", "a", "suffix", "to", "the", "string", "(", "e", ".", "g", ".", "filename", ")", "if", "it", "doesn", "t", "have", "it", "already", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/SystemUtil.java#L168-L176
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.getInteger
public int getInteger() throws IOException { """ Get an integer from the input stream as an integer. @return the integer held in this DER input stream. """ if (buffer.read() != DerValue.tag_Integer) { throw new IOException("DER input, Integer tag error"); } return buffer....
java
public int getInteger() throws IOException { if (buffer.read() != DerValue.tag_Integer) { throw new IOException("DER input, Integer tag error"); } return buffer.getInteger(getLength(buffer)); }
[ "public", "int", "getInteger", "(", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "read", "(", ")", "!=", "DerValue", ".", "tag_Integer", ")", "{", "throw", "new", "IOException", "(", "\"DER input, Integer tag error\"", ")", ";", "}", "return"...
Get an integer from the input stream as an integer. @return the integer held in this DER input stream.
[ "Get", "an", "integer", "from", "the", "input", "stream", "as", "an", "integer", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L166-L171
datacleaner/AnalyzerBeans
components/html-rendering/src/main/java/org/eobjects/analyzer/result/renderer/TableBodyElement.java
TableBodyElement.getCellClass
protected String getCellClass(HtmlRenderingContext context, int row, int col) { """ Overrideable method for setting the class of a cell (the <td>element) in the table @param context @param row @param col @return """ if (ArrayUtils.indexOf(_highlightedColumns, col) == -1) { return nul...
java
protected String getCellClass(HtmlRenderingContext context, int row, int col) { if (ArrayUtils.indexOf(_highlightedColumns, col) == -1) { return null; } return "highlighted"; }
[ "protected", "String", "getCellClass", "(", "HtmlRenderingContext", "context", ",", "int", "row", ",", "int", "col", ")", "{", "if", "(", "ArrayUtils", ".", "indexOf", "(", "_highlightedColumns", ",", "col", ")", "==", "-", "1", ")", "{", "return", "null",...
Overrideable method for setting the class of a cell (the <td>element) in the table @param context @param row @param col @return
[ "Overrideable", "method", "for", "setting", "the", "class", "of", "a", "cell", "(", "the", "<td", ">", "element", ")", "in", "the", "table" ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/html-rendering/src/main/java/org/eobjects/analyzer/result/renderer/TableBodyElement.java#L135-L140
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/handlers/MapReduceServletImpl.java
MapReduceServletImpl.checkForAjax
private static boolean checkForAjax(HttpServletRequest request, HttpServletResponse response) throws IOException { """ Checks to ensure that the current request was sent via an AJAX request. If the request was not sent by an AJAX request, returns false, and sets the response status code to 403. This prot...
java
private static boolean checkForAjax(HttpServletRequest request, HttpServletResponse response) throws IOException { if (!"XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) { log.log( Level.SEVERE, "Received unexpected non-XMLHttpRequest command. Possible CSRF attack."); respo...
[ "private", "static", "boolean", "checkForAjax", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "if", "(", "!", "\"XMLHttpRequest\"", ".", "equals", "(", "request", ".", "getHeader", "(", "\"X-Requeste...
Checks to ensure that the current request was sent via an AJAX request. If the request was not sent by an AJAX request, returns false, and sets the response status code to 403. This protects against CSRF attacks against AJAX only handlers. @return true if the request is a task queue request
[ "Checks", "to", "ensure", "that", "the", "current", "request", "was", "sent", "via", "an", "AJAX", "request", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/handlers/MapReduceServletImpl.java#L133-L143
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java
TabContextLoader.setArrayNodeID
private void setArrayNodeID(int index, ArrayList<INode> array, INode node) { """ Sets the node at a given position of the array. Changes the current value if there is one, if there is no value, adds a new one. @param index position to be filled @param array array to be modified @param node value to be set ...
java
private void setArrayNodeID(int index, ArrayList<INode> array, INode node) { if (index < array.size()) { array.set(index, node); } else { array.add(index, node); } }
[ "private", "void", "setArrayNodeID", "(", "int", "index", ",", "ArrayList", "<", "INode", ">", "array", ",", "INode", "node", ")", "{", "if", "(", "index", "<", "array", ".", "size", "(", ")", ")", "{", "array", ".", "set", "(", "index", ",", "node...
Sets the node at a given position of the array. Changes the current value if there is one, if there is no value, adds a new one. @param index position to be filled @param array array to be modified @param node value to be set
[ "Sets", "the", "node", "at", "a", "given", "position", "of", "the", "array", ".", "Changes", "the", "current", "value", "if", "there", "is", "one", "if", "there", "is", "no", "value", "adds", "a", "new", "one", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java#L108-L114
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/MagickUtil.java
MagickUtil.cmykToBuffered
private static BufferedImage cmykToBuffered(MagickImage pImage, boolean pAlpha) throws MagickException { """ Converts an {@code MagickImage} to a {@code BufferedImage} which holds an CMYK ICC profile @param pImage the original {@code MagickImage} @param pAlpha keep alpha channel @return a new {@code BufferedI...
java
private static BufferedImage cmykToBuffered(MagickImage pImage, boolean pAlpha) throws MagickException { Dimension size = pImage.getDimension(); int length = size.width * size.height; // Retreive the ICC profile ICC_Profile profile = ICC_Profile.getInstance(pImage.getColorProfile().getInfo()); ColorS...
[ "private", "static", "BufferedImage", "cmykToBuffered", "(", "MagickImage", "pImage", ",", "boolean", "pAlpha", ")", "throws", "MagickException", "{", "Dimension", "size", "=", "pImage", ".", "getDimension", "(", ")", ";", "int", "length", "=", "size", ".", "w...
Converts an {@code MagickImage} to a {@code BufferedImage} which holds an CMYK ICC profile @param pImage the original {@code MagickImage} @param pAlpha keep alpha channel @return a new {@code BufferedImage} @throws MagickException if an exception occurs during conversion @see BufferedImage
[ "Converts", "an", "{", "@code", "MagickImage", "}", "to", "a", "{", "@code", "BufferedImage", "}", "which", "holds", "an", "CMYK", "ICC", "profile" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/MagickUtil.java#L575-L615
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.removeResultCollector
public void removeResultCollector(ResultCollector<?, DPO> resultCollector) { """ Removes the specified result collector from the triggers and data providers. @param resultCollector Result collector to be removed. """ if (resultCollector != null) { removeTrigger(resultCollector); ...
java
public void removeResultCollector(ResultCollector<?, DPO> resultCollector) { if (resultCollector != null) { removeTrigger(resultCollector); removeDataProvider(resultCollector); } }
[ "public", "void", "removeResultCollector", "(", "ResultCollector", "<", "?", ",", "DPO", ">", "resultCollector", ")", "{", "if", "(", "resultCollector", "!=", "null", ")", "{", "removeTrigger", "(", "resultCollector", ")", ";", "removeDataProvider", "(", "result...
Removes the specified result collector from the triggers and data providers. @param resultCollector Result collector to be removed.
[ "Removes", "the", "specified", "result", "collector", "from", "the", "triggers", "and", "data", "providers", "." ]
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L177-L182
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java
MapTransitionExtractor.getTransitionType
private static TransitionType getTransitionType(String groupIn, Collection<String> neighborGroups) { """ Get the transition type from one group to another. @param groupIn The group in. @param neighborGroups The neighbor groups. @return The tile transition. """ final boolean[] bits = new boolean[T...
java
private static TransitionType getTransitionType(String groupIn, Collection<String> neighborGroups) { final boolean[] bits = new boolean[TransitionType.BITS]; int i = 0; for (final String neighborGroup : neighborGroups) { bits[i] = !groupIn.equals(neighborGroup); ...
[ "private", "static", "TransitionType", "getTransitionType", "(", "String", "groupIn", ",", "Collection", "<", "String", ">", "neighborGroups", ")", "{", "final", "boolean", "[", "]", "bits", "=", "new", "boolean", "[", "TransitionType", ".", "BITS", "]", ";", ...
Get the transition type from one group to another. @param groupIn The group in. @param neighborGroups The neighbor groups. @return The tile transition.
[ "Get", "the", "transition", "type", "from", "one", "group", "to", "another", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java#L73-L83
tzaeschke/zoodb
src/org/zoodb/internal/server/StorageWriter.java
StorageWriter.allocateAndSeekAP
@Override public int allocateAndSeekAP(PAGE_TYPE type, int prevPage, long header) { """ Assumes autoPaging=true; @return the page ID of the allocated page """ //isAutoPaging = true; currentDataType = type; classOid = header; int pageId = allocateAndSeekPage(prevPage); //auto-paging is true retur...
java
@Override public int allocateAndSeekAP(PAGE_TYPE type, int prevPage, long header) { //isAutoPaging = true; currentDataType = type; classOid = header; int pageId = allocateAndSeekPage(prevPage); //auto-paging is true return pageId; }
[ "@", "Override", "public", "int", "allocateAndSeekAP", "(", "PAGE_TYPE", "type", ",", "int", "prevPage", ",", "long", "header", ")", "{", "//isAutoPaging = true;", "currentDataType", "=", "type", ";", "classOid", "=", "header", ";", "int", "pageId", "=", "allo...
Assumes autoPaging=true; @return the page ID of the allocated page
[ "Assumes", "autoPaging", "=", "true", ";" ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/server/StorageWriter.java#L102-L111
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/ComponentUtil.java
ComponentUtil.hasChangesOfChildren
private static boolean hasChangesOfChildren(long last, PageContext pc, Class clazz) { """ check if one of the children is changed @param component @param pc @param clazz @return return true if children has changed """ java.lang.reflect.Method[] methods = clazz.getMethods(); java.lang.reflect.Method me...
java
private static boolean hasChangesOfChildren(long last, PageContext pc, Class clazz) { java.lang.reflect.Method[] methods = clazz.getMethods(); java.lang.reflect.Method method; Class[] params; for (int i = 0; i < methods.length; i++) { method = methods[i]; if (method.getDeclaringClass() == clazz) { if (...
[ "private", "static", "boolean", "hasChangesOfChildren", "(", "long", "last", ",", "PageContext", "pc", ",", "Class", "clazz", ")", "{", "java", ".", "lang", ".", "reflect", ".", "Method", "[", "]", "methods", "=", "clazz", ".", "getMethods", "(", ")", ";...
check if one of the children is changed @param component @param pc @param clazz @return return true if children has changed
[ "check", "if", "one", "of", "the", "children", "is", "changed" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ComponentUtil.java#L221-L237
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPaymentPersistenceImpl.java
CommerceOrderPaymentPersistenceImpl.findAll
@Override public List<CommerceOrderPayment> findAll(int start, int end) { """ Returns a range of all the commerce order payments. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the r...
java
@Override public List<CommerceOrderPayment> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderPayment", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce order payments. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <co...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "order", "payments", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPaymentPersistenceImpl.java#L1137-L1140
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java
HttpUtils.parseHttpResponse
public static String parseHttpResponse(HttpURLConnection conn, boolean includeHeaders, boolean ignoreBody) throws IOException { """ Parses an http request response @param conn the connection @param includeHeaders if include headers ot not @param ignoreBody if ignore body or not @return a string representing ...
java
public static String parseHttpResponse(HttpURLConnection conn, boolean includeHeaders, boolean ignoreBody) throws IOException { StringBuilder buff = new StringBuilder(); if (includeHeaders) { buff.append(conn.getResponseCode()).append(' ').append(conn.getResponseMessage()).append('\n'); ...
[ "public", "static", "String", "parseHttpResponse", "(", "HttpURLConnection", "conn", ",", "boolean", "includeHeaders", ",", "boolean", "ignoreBody", ")", "throws", "IOException", "{", "StringBuilder", "buff", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", ...
Parses an http request response @param conn the connection @param includeHeaders if include headers ot not @param ignoreBody if ignore body or not @return a string representing the received answer @throws IOException on any connection
[ "Parses", "an", "http", "request", "response" ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java#L163-L193
seedstack/business
core/src/main/java/org/seedstack/business/internal/utils/MethodMatcher.java
MethodMatcher.findMatchingMethod
public static Method findMatchingMethod(Class<?> classToInspect, Class<?> returnType, Object... params) { """ Finds a method matching the given parameters and return type. """ Method[] methods = classToInspect.getMethods(); Method checkedMethod = null; for (Method method : methods) { ...
java
public static Method findMatchingMethod(Class<?> classToInspect, Class<?> returnType, Object... params) { Method[] methods = classToInspect.getMethods(); Method checkedMethod = null; for (Method method : methods) { Type[] parameterTypes = method.getParameterTypes(); // if...
[ "public", "static", "Method", "findMatchingMethod", "(", "Class", "<", "?", ">", "classToInspect", ",", "Class", "<", "?", ">", "returnType", ",", "Object", "...", "params", ")", "{", "Method", "[", "]", "methods", "=", "classToInspect", ".", "getMethods", ...
Finds a method matching the given parameters and return type.
[ "Finds", "a", "method", "matching", "the", "given", "parameters", "and", "return", "type", "." ]
train
https://github.com/seedstack/business/blob/55b3e861fe152e9b125ebc69daa91a682deeae8a/core/src/main/java/org/seedstack/business/internal/utils/MethodMatcher.java#L27-L48
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java
ViewFetcher.getRecyclerView
public <T extends View> ViewGroup getRecyclerView(int recyclerViewIndex, int timeOut) { """ Waits for a RecyclerView and returns it. @param recyclerViewIndex the index of the RecyclerView @return {@code ViewGroup} if RecycleView is displayed """ final long endTime = SystemClock.uptimeMillis() + timeOut; ...
java
public <T extends View> ViewGroup getRecyclerView(int recyclerViewIndex, int timeOut) { final long endTime = SystemClock.uptimeMillis() + timeOut; while (SystemClock.uptimeMillis() < endTime) { View recyclerView = getRecyclerView(true, recyclerViewIndex); if(recyclerView != null){ return (ViewGroup) recy...
[ "public", "<", "T", "extends", "View", ">", "ViewGroup", "getRecyclerView", "(", "int", "recyclerViewIndex", ",", "int", "timeOut", ")", "{", "final", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "timeOut", ";", "while", "(", ...
Waits for a RecyclerView and returns it. @param recyclerViewIndex the index of the RecyclerView @return {@code ViewGroup} if RecycleView is displayed
[ "Waits", "for", "a", "RecyclerView", "and", "returns", "it", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java#L417-L427
michael-simons/wro4j-spring-boot-starter
src/main/java/ac/simons/spring/boot/wro4j/Wro4jAutoConfiguration.java
Wro4jAutoConfiguration.wro4jFilterRegistration
@Bean FilterRegistrationBean wro4jFilterRegistration(ConfigurableWroFilter wroFilter, Wro4jProperties wro4jProperties) { """ Registeres the {@code wroFilter} through a Spring {@link FilterRegistrationBean}. @param wroFilter The configured {@code wroFilter} @param wro4jProperties Needed for the url pattern to...
java
@Bean FilterRegistrationBean wro4jFilterRegistration(ConfigurableWroFilter wroFilter, Wro4jProperties wro4jProperties) { final FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(wroFilter); filterRegistrationBean.addUrlPatterns(wro4jProperties.getFilterUrl() + "/*"); return filterRegistra...
[ "@", "Bean", "FilterRegistrationBean", "wro4jFilterRegistration", "(", "ConfigurableWroFilter", "wroFilter", ",", "Wro4jProperties", "wro4jProperties", ")", "{", "final", "FilterRegistrationBean", "filterRegistrationBean", "=", "new", "FilterRegistrationBean", "(", "wroFilter",...
Registeres the {@code wroFilter} through a Spring {@link FilterRegistrationBean}. @param wroFilter The configured {@code wroFilter} @param wro4jProperties Needed for the url pattern to which the filter should be registered @return The Spring {@code FilterRegistrationBean}
[ "Registeres", "the", "{", "@code", "wroFilter", "}", "through", "a", "Spring", "{", "@link", "FilterRegistrationBean", "}", "." ]
train
https://github.com/michael-simons/wro4j-spring-boot-starter/blob/c0d7cc5c03b6f884f63596c36c5e0aa86cd54141/src/main/java/ac/simons/spring/boot/wro4j/Wro4jAutoConfiguration.java#L297-L302
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java
ManualDescriptor.setDBInfoList
public void setDBInfoList(int i, DBInfo v) { """ indexed setter for dBInfoList - sets an indexed value - A collection of objects of type uima.julielab.uima.DBInfo, O @generated @param i index in the array to set @param v value to set into the array """ if (ManualDescriptor_Type.featOkTst && ((ManualDes...
java
public void setDBInfoList(int i, DBInfo v) { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_dBInfoList == null) jcasType.jcas.throwFeatMissing("dBInfoList", "de.julielab.jules.types.pubmed.ManualDescriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(...
[ "public", "void", "setDBInfoList", "(", "int", "i", ",", "DBInfo", "v", ")", "{", "if", "(", "ManualDescriptor_Type", ".", "featOkTst", "&&", "(", "(", "ManualDescriptor_Type", ")", "jcasType", ")", ".", "casFeat_dBInfoList", "==", "null", ")", "jcasType", "...
indexed setter for dBInfoList - sets an indexed value - A collection of objects of type uima.julielab.uima.DBInfo, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "dBInfoList", "-", "sets", "an", "indexed", "value", "-", "A", "collection", "of", "objects", "of", "type", "uima", ".", "julielab", ".", "uima", ".", "DBInfo", "O" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java#L209-L213
OpenNTF/JavascriptAggregator
jaggr-service/src/main/java/com/ibm/jaggr/service/impl/resource/BundleResource.java
BundleResource.recurse
private void recurse(Bundle bundle, String path, IResourceVisitor visitor, String relPathName) throws IOException { """ Internal method for recursing sub directories. @param file The file object @param visitor The {@link IResourceVisitor} to call for non-folder resources @throws IOException """ Enume...
java
private void recurse(Bundle bundle, String path, IResourceVisitor visitor, String relPathName) throws IOException { Enumeration<?> entries = bundle.findEntries(path, "*", false); //$NON-NLS-1$ if (entries != null) { while (entries.hasMoreElements()) { URL child = (URL)entries.nextElement(); String c...
[ "private", "void", "recurse", "(", "Bundle", "bundle", ",", "String", "path", ",", "IResourceVisitor", "visitor", ",", "String", "relPathName", ")", "throws", "IOException", "{", "Enumeration", "<", "?", ">", "entries", "=", "bundle", ".", "findEntries", "(", ...
Internal method for recursing sub directories. @param file The file object @param visitor The {@link IResourceVisitor} to call for non-folder resources @throws IOException
[ "Internal", "method", "for", "recursing", "sub", "directories", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-service/src/main/java/com/ibm/jaggr/service/impl/resource/BundleResource.java#L139-L161
tvbarthel/Cheerleader
library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java
PlaybackService.unregisterListener
public static void unregisterListener(Context context, PlaybackListener listener) { """ Unregister a registered listener. @param context context used to unregister the listener. @param listener listener to unregister. """ LocalBroadcastManager.getInstance(context.getApplicationContext()) ...
java
public static void unregisterListener(Context context, PlaybackListener listener) { LocalBroadcastManager.getInstance(context.getApplicationContext()) .unregisterReceiver(listener); }
[ "public", "static", "void", "unregisterListener", "(", "Context", "context", ",", "PlaybackListener", "listener", ")", "{", "LocalBroadcastManager", ".", "getInstance", "(", "context", ".", "getApplicationContext", "(", ")", ")", ".", "unregisterReceiver", "(", "lis...
Unregister a registered listener. @param context context used to unregister the listener. @param listener listener to unregister.
[ "Unregister", "a", "registered", "listener", "." ]
train
https://github.com/tvbarthel/Cheerleader/blob/f61527e4cc44fcd0ed2e1e98aca285f8c236f24e/library/src/main/java/fr/tvbarthel/cheerleader/library/player/PlaybackService.java#L388-L391
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java
EntityUtilities.getCSNodeTopicEntity
public static TopicWrapper getCSNodeTopicEntity(final CSNodeWrapper node, final TopicProvider topicProvider) { """ Gets the CSNode Topic entity that is represented by the node. @param node The node that represents a topic entry. @param topicProvider The topic provider to lookup the topic entity from. ...
java
public static TopicWrapper getCSNodeTopicEntity(final CSNodeWrapper node, final TopicProvider topicProvider) { if (!isNodeATopic(node)) return null; return topicProvider.getTopic(node.getEntityId(), node.getEntityRevision()); }
[ "public", "static", "TopicWrapper", "getCSNodeTopicEntity", "(", "final", "CSNodeWrapper", "node", ",", "final", "TopicProvider", "topicProvider", ")", "{", "if", "(", "!", "isNodeATopic", "(", "node", ")", ")", "return", "null", ";", "return", "topicProvider", ...
Gets the CSNode Topic entity that is represented by the node. @param node The node that represents a topic entry. @param topicProvider The topic provider to lookup the topic entity from. @return The topic entity represented by the node, or null if there isn't one that matches.
[ "Gets", "the", "CSNode", "Topic", "entity", "that", "is", "represented", "by", "the", "node", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/EntityUtilities.java#L371-L375
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201902/companyservice/CreateCompanies.java
CreateCompanies.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the CompanyService. CompanyServiceInterface companyService = adManagerServices.get(session, CompanyServiceInterface.class); // Create an advertiser. Company adverti...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "// Get the CompanyService.", "CompanyServiceInterface", "companyService", "=", "adManagerServices", ".", "get",...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/companyservice/CreateCompanies.java#L51-L75
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.validateTrue
public void validateTrue(boolean value, String name) { """ Validates a given value to be true @param value The value to check @param name The name of the field to display the error message """ validateTrue(value, name, messages.get(Validation.TRUE_KEY.name(), name)); }
java
public void validateTrue(boolean value, String name) { validateTrue(value, name, messages.get(Validation.TRUE_KEY.name(), name)); }
[ "public", "void", "validateTrue", "(", "boolean", "value", ",", "String", "name", ")", "{", "validateTrue", "(", "value", ",", "name", ",", "messages", ".", "get", "(", "Validation", ".", "TRUE_KEY", ".", "name", "(", ")", ",", "name", ")", ")", ";", ...
Validates a given value to be true @param value The value to check @param name The name of the field to display the error message
[ "Validates", "a", "given", "value", "to", "be", "true" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L441-L443
mercadopago/dx-java
src/main/java/com/mercadopago/core/MPBase.java
MPBase.processMethodBulk
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, String param1, Boolean useCache) throws MPException { """ Process method to call the api, usually used for loadAll and search methods @param clazz a MPBase extended class @param methodName a String wit...
java
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, String param1, Boolean useCache) throws MPException { HashMap<String, String> mapParams = new HashMap<String, String>(); mapParams.put("param1", param1); return processMethodBulk(clazz, methodName, mapParams, useC...
[ "protected", "static", "MPResourceArray", "processMethodBulk", "(", "Class", "clazz", ",", "String", "methodName", ",", "String", "param1", ",", "Boolean", "useCache", ")", "throws", "MPException", "{", "HashMap", "<", "String", ",", "String", ">", "mapParams", ...
Process method to call the api, usually used for loadAll and search methods @param clazz a MPBase extended class @param methodName a String with the decorated method to be processed @param param1 a String with the arg passed in the call of the method @param useCache ...
[ "Process", "method", "to", "call", "the", "api", "usually", "used", "for", "loadAll", "and", "search", "methods" ]
train
https://github.com/mercadopago/dx-java/blob/9df65a6bfb4db0c1fddd7699a5b109643961b03f/src/main/java/com/mercadopago/core/MPBase.java#L220-L224
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.newReader
public static BufferedReader newReader(URL url, Map parameters) throws MalformedURLException, IOException { """ Creates a buffered reader for this URL. The default connection parameters can be modified by adding keys to the <i>parameters map</i>: <ul> <li>connectTimeout : the connection timeout</li> <li>readT...
java
public static BufferedReader newReader(URL url, Map parameters) throws MalformedURLException, IOException { return IOGroovyMethods.newReader(configuredInputStream(parameters, url)); }
[ "public", "static", "BufferedReader", "newReader", "(", "URL", "url", ",", "Map", "parameters", ")", "throws", "MalformedURLException", ",", "IOException", "{", "return", "IOGroovyMethods", ".", "newReader", "(", "configuredInputStream", "(", "parameters", ",", "url...
Creates a buffered reader for this URL. The default connection parameters can be modified by adding keys to the <i>parameters map</i>: <ul> <li>connectTimeout : the connection timeout</li> <li>readTimeout : the read timeout</li> <li>useCaches : set the use cache property for the URL connection</li> <li>allowUserInterac...
[ "Creates", "a", "buffered", "reader", "for", "this", "URL", ".", "The", "default", "connection", "parameters", "can", "be", "modified", "by", "adding", "keys", "to", "the", "<i", ">", "parameters", "map<", "/", "i", ">", ":", "<ul", ">", "<li", ">", "c...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L2254-L2256
calimero-project/calimero-core
src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java
TunnelingFeature.newGet
public static TunnelingFeature newGet(final int channelId, final int seq, final InterfaceFeature featureId) { """ Creates a new tunneling feature-get service. @param channelId tunneling connection channel identifier @param seq tunneling connection send sequence number @param featureId the requested interface ...
java
public static TunnelingFeature newGet(final int channelId, final int seq, final InterfaceFeature featureId) { return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureGet, channelId, seq, featureId, Success); }
[ "public", "static", "TunnelingFeature", "newGet", "(", "final", "int", "channelId", ",", "final", "int", "seq", ",", "final", "InterfaceFeature", "featureId", ")", "{", "return", "new", "TunnelingFeature", "(", "KNXnetIPHeader", ".", "TunnelingFeatureGet", ",", "c...
Creates a new tunneling feature-get service. @param channelId tunneling connection channel identifier @param seq tunneling connection send sequence number @param featureId the requested interface feature @return new tunneling feature-get service
[ "Creates", "a", "new", "tunneling", "feature", "-", "get", "service", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java#L81-L83
adessoAG/wicked-charts
highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java
OptionsUtil.setRenderTo
public void setRenderTo(final Options options, final String renderTo) { """ Null-safe setter for the renderTo configuration. @param options the Options object to set the renderTo of @param renderTo the render target """ if (options.getChartOptions() == null) { options.setChartOptions(ne...
java
public void setRenderTo(final Options options, final String renderTo) { if (options.getChartOptions() == null) { options.setChartOptions(new ChartOptions()); } options.getChartOptions().setRenderTo(renderTo); }
[ "public", "void", "setRenderTo", "(", "final", "Options", "options", ",", "final", "String", "renderTo", ")", "{", "if", "(", "options", ".", "getChartOptions", "(", ")", "==", "null", ")", "{", "options", ".", "setChartOptions", "(", "new", "ChartOptions", ...
Null-safe setter for the renderTo configuration. @param options the Options object to set the renderTo of @param renderTo the render target
[ "Null", "-", "safe", "setter", "for", "the", "renderTo", "configuration", "." ]
train
https://github.com/adessoAG/wicked-charts/blob/498aceff025f612e22ba5135b26531afeabac03c/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java#L56-L61
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_fkeep.java
Scs_fkeep.cs_fkeep
public static int cs_fkeep(Scs A, Scs_ifkeep fkeep, Object other) { """ Srops entries from a sparse matrix; @param A column-compressed matrix @param fkeep drop aij if fkeep.fkeep(i,j,aij,other) is false @param other optional parameter to fkeep @return nz, new number of entries in A, -1 on error """ ...
java
public static int cs_fkeep(Scs A, Scs_ifkeep fkeep, Object other) { int j, p, nz = 0, n, Ap[], Ai[]; float Ax[]; if (!Scs_util.CS_CSC(A)) return (-1); /* check inputs */ n = A.n; Ap = A.p; Ai = A.i; Ax = A.x; for (j = 0; j < n; j++) { ...
[ "public", "static", "int", "cs_fkeep", "(", "Scs", "A", ",", "Scs_ifkeep", "fkeep", ",", "Object", "other", ")", "{", "int", "j", ",", "p", ",", "nz", "=", "0", ",", "n", ",", "Ap", "[", "]", ",", "Ai", "[", "]", ";", "float", "Ax", "[", "]",...
Srops entries from a sparse matrix; @param A column-compressed matrix @param fkeep drop aij if fkeep.fkeep(i,j,aij,other) is false @param other optional parameter to fkeep @return nz, new number of entries in A, -1 on error
[ "Srops", "entries", "from", "a", "sparse", "matrix", ";" ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_fkeep.java#L48-L71
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java
MediaRow.setData
public void setData(BufferedImage image, String imageFormat) throws IOException { """ Set the data from an image @param image image @param imageFormat image format @throws IOException upon failure @since 3.2.0 """ setData(image, imageFormat, null); }
java
public void setData(BufferedImage image, String imageFormat) throws IOException { setData(image, imageFormat, null); }
[ "public", "void", "setData", "(", "BufferedImage", "image", ",", "String", "imageFormat", ")", "throws", "IOException", "{", "setData", "(", "image", ",", "imageFormat", ",", "null", ")", ";", "}" ]
Set the data from an image @param image image @param imageFormat image format @throws IOException upon failure @since 3.2.0
[ "Set", "the", "data", "from", "an", "image" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java#L144-L147
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.email_exchange_organizationName_service_exchangeService_account_duration_POST
public OvhOrder email_exchange_organizationName_service_exchangeService_account_duration_POST(String organizationName, String exchangeService, String duration, OvhOvhLicenceEnum licence, Long number, OvhAccountQuotaEnum storageQuota) throws IOException { """ Create order REST: POST /order/email/exchange/{organi...
java
public OvhOrder email_exchange_organizationName_service_exchangeService_account_duration_POST(String organizationName, String exchangeService, String duration, OvhOvhLicenceEnum licence, Long number, OvhAccountQuotaEnum storageQuota) throws IOException { String qPath = "/order/email/exchange/{organizationName}/servic...
[ "public", "OvhOrder", "email_exchange_organizationName_service_exchangeService_account_duration_POST", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "duration", ",", "OvhOvhLicenceEnum", "licence", ",", "Long", "number", ",", "OvhAccountQuo...
Create order REST: POST /order/email/exchange/{organizationName}/service/{exchangeService}/account/{duration} @param storageQuota [required] The storage quota for the account(s) in GB (default = 50) @param number [required] Number of Accounts to order @param licence [required] Licence type for the account @param organ...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3945-L3954
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java
InstanceFailoverGroupsInner.beginDelete
public void beginDelete(String resourceGroupName, String locationName, String failoverGroupName) { """ Deletes a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param locationName T...
java
public void beginDelete(String resourceGroupName, String locationName, String failoverGroupName) { beginDeleteWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "locationName", ",", "String", "failoverGroupName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "locationName", ",", "failoverGroupName", ")", ".", "t...
Deletes a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param locationName The name of the region where the resource is located. @param failoverGroupName The name of the failover group. @...
[ "Deletes", "a", "failover", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/InstanceFailoverGroupsInner.java#L476-L478
tvesalainen/util
util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java
ChannelHelper.write
public static final long write(WritableByteChannel channel, ByteBuffer[] srcs, int offset, int length) throws IOException { """ GatheringChannel support. @param channel @param srcs @param offset @param length @return @throws IOException """ long res = 0; for (int ii=0;ii<length;ii++) ...
java
public static final long write(WritableByteChannel channel, ByteBuffer[] srcs, int offset, int length) throws IOException { long res = 0; for (int ii=0;ii<length;ii++) { ByteBuffer bb = srcs[ii+offset]; if (bb.hasRemaining()) { res...
[ "public", "static", "final", "long", "write", "(", "WritableByteChannel", "channel", ",", "ByteBuffer", "[", "]", "srcs", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "long", "res", "=", "0", ";", "for", "(", "int", "ii"...
GatheringChannel support. @param channel @param srcs @param offset @param length @return @throws IOException
[ "GatheringChannel", "support", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java#L236-L252
TheHortonMachine/hortonmachine
apps/src/main/java/org/hortonmachine/nww/utils/NwwUtilities.java
NwwUtilities.getScreenPointsPolygon
public static Geometry getScreenPointsPolygon( WorldWindow wwd, int x1, int y1, int x2, int y2 ) { """ Get the lat/long world geometry from two screen corner coordinates. @param wwd the {@link WorldWindow} instance. @param x1 the first point screen x. @param y1 the first point screen y. @param x2 the sec...
java
public static Geometry getScreenPointsPolygon( WorldWindow wwd, int x1, int y1, int x2, int y2 ) { View view = wwd.getView(); Position p1 = view.computePositionFromScreenPoint(x1, y1); Position p2 = view.computePositionFromScreenPoint(x1, y2); Position p3 = view.computePositionFromScreen...
[ "public", "static", "Geometry", "getScreenPointsPolygon", "(", "WorldWindow", "wwd", ",", "int", "x1", ",", "int", "y1", ",", "int", "x2", ",", "int", "y2", ")", "{", "View", "view", "=", "wwd", ".", "getView", "(", ")", ";", "Position", "p1", "=", "...
Get the lat/long world geometry from two screen corner coordinates. @param wwd the {@link WorldWindow} instance. @param x1 the first point screen x. @param y1 the first point screen y. @param x2 the second point screen x. @param y2 the second point screen y. @return the world geomnetry.
[ "Get", "the", "lat", "/", "long", "world", "geometry", "from", "two", "screen", "corner", "coordinates", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/apps/src/main/java/org/hortonmachine/nww/utils/NwwUtilities.java#L246-L261
apache/incubator-zipkin
zipkin-server/src/main/java/zipkin2/server/internal/mysql/TracingZipkinMySQLStorageAutoConfiguration.java
TracingZipkinMySQLStorageAutoConfiguration.makeContextAware
static Executor makeContextAware(Executor delegate, CurrentTraceContext currentTraceContext) { """ Decorates the input such that the {@link RequestContext#current() current request context} and the and the {@link CurrentTraceContext#get() current trace context} at assembly time is made current when task is execu...
java
static Executor makeContextAware(Executor delegate, CurrentTraceContext currentTraceContext) { class TracingCurrentRequestContextExecutor implements Executor { @Override public void execute(Runnable task) { delegate.execute(RequestContext.current().makeContextAware(currentTraceContext.wrap(task))); ...
[ "static", "Executor", "makeContextAware", "(", "Executor", "delegate", ",", "CurrentTraceContext", "currentTraceContext", ")", "{", "class", "TracingCurrentRequestContextExecutor", "implements", "Executor", "{", "@", "Override", "public", "void", "execute", "(", "Runnable...
Decorates the input such that the {@link RequestContext#current() current request context} and the and the {@link CurrentTraceContext#get() current trace context} at assembly time is made current when task is executed.
[ "Decorates", "the", "input", "such", "that", "the", "{" ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-server/src/main/java/zipkin2/server/internal/mysql/TracingZipkinMySQLStorageAutoConfiguration.java#L60-L67
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.deleteFirewallRuleAsync
public Observable<Void> deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { """ Deletes the specified firewall rule from the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @...
java
public Observable<Void> deleteFirewallRuleAsync(String resourceGroupName, String accountName, String firewallRuleName) { return deleteFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, firewallRuleName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Voi...
[ "public", "Observable", "<", "Void", ">", "deleteFirewallRuleAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "firewallRuleName", ")", "{", "return", "deleteFirewallRuleWithServiceResponseAsync", "(", "resourceGroupName", ",", "acco...
Deletes the specified firewall rule from the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param accountName The name of the Data Lake Store account from which to delete the firewall rule. @param firewallRuleName The name of...
[ "Deletes", "the", "specified", "firewall", "rule", "from", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java#L176-L183
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.getToleranceDistance
public static double getToleranceDistance(View view, GoogleMap map) { """ Get the tolerance distance meters in the current region of the map @param view view @param map google map @return tolerance distance in meters """ BoundingBox boundingBox = getBoundingBox(map); double boundingBoxW...
java
public static double getToleranceDistance(View view, GoogleMap map) { BoundingBox boundingBox = getBoundingBox(map); double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox); double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox); ...
[ "public", "static", "double", "getToleranceDistance", "(", "View", "view", ",", "GoogleMap", "map", ")", "{", "BoundingBox", "boundingBox", "=", "getBoundingBox", "(", "map", ")", ";", "double", "boundingBoxWidth", "=", "TileBoundingBoxMapUtils", ".", "getLongitudeD...
Get the tolerance distance meters in the current region of the map @param view view @param map google map @return tolerance distance in meters
[ "Get", "the", "tolerance", "distance", "meters", "in", "the", "current", "region", "of", "the", "map" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L51-L72
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/SCheckBox.java
SCheckBox.setSFieldValue
public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode) { """ Set this control's converter to this HTML param. @param strParamValue The param to set (if matches button, do the command). @return An error code. """ char chFirst = 'N'; if (strParamValue != null) if...
java
public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode) { char chFirst = 'N'; if (strParamValue != null) if (strParamValue.length() > 0) chFirst = strParamValue.charAt(0); boolean bState = false; if ((chFirst == 'T') || (chFirst == 'Y')) // ...
[ "public", "int", "setSFieldValue", "(", "String", "strParamValue", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "char", "chFirst", "=", "'", "'", ";", "if", "(", "strParamValue", "!=", "null", ")", "if", "(", "strParamValue", ".", "...
Set this control's converter to this HTML param. @param strParamValue The param to set (if matches button, do the command). @return An error code.
[ "Set", "this", "control", "s", "converter", "to", "this", "HTML", "param", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/SCheckBox.java#L78-L87
zaproxy/zaproxy
src/org/parosproxy/paros/network/HttpSender.java
HttpSender.extractRedirectLocation
private static URI extractRedirectLocation(HttpMessage message) throws InvalidRedirectLocationException { """ Extracts a {@code URI} from the {@code Location} header of the given HTTP {@code message}. <p> If there's no {@code Location} header this method returns {@code null}. @param message the HTTP message t...
java
private static URI extractRedirectLocation(HttpMessage message) throws InvalidRedirectLocationException { String location = message.getResponseHeader().getHeader(HttpHeader.LOCATION); if (location == null) { if (log.isDebugEnabled()) { log.debug("No Location header found:...
[ "private", "static", "URI", "extractRedirectLocation", "(", "HttpMessage", "message", ")", "throws", "InvalidRedirectLocationException", "{", "String", "location", "=", "message", ".", "getResponseHeader", "(", ")", ".", "getHeader", "(", "HttpHeader", ".", "LOCATION"...
Extracts a {@code URI} from the {@code Location} header of the given HTTP {@code message}. <p> If there's no {@code Location} header this method returns {@code null}. @param message the HTTP message that will processed @return the {@code URI} created from the value of the {@code Location} header, might be {@code null}...
[ "Extracts", "a", "{", "@code", "URI", "}", "from", "the", "{", "@code", "Location", "}", "header", "of", "the", "given", "HTTP", "{", "@code", "message", "}", ".", "<p", ">", "If", "there", "s", "no", "{", "@code", "Location", "}", "header", "this", ...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpSender.java#L1032-L1046
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/remote/BaseAugmenter.java
BaseAugmenter.augment
public WebElement augment(RemoteWebElement element) { """ Enhance the interfaces implemented by this instance of WebElement iff that instance is a {@link org.openqa.selenium.remote.RemoteWebElement}. The WebElement that is returned may well be a dynamic proxy. You cannot rely on the concrete implementing clas...
java
public WebElement augment(RemoteWebElement element) { // TODO(simon): We should really add a "SelfDescribing" interface for this RemoteWebDriver parent = (RemoteWebDriver) element.getWrappedDriver(); if (parent == null) { return element; } return create(parent, elementAugmentors, element); ...
[ "public", "WebElement", "augment", "(", "RemoteWebElement", "element", ")", "{", "// TODO(simon): We should really add a \"SelfDescribing\" interface for this", "RemoteWebDriver", "parent", "=", "(", "RemoteWebDriver", ")", "element", ".", "getWrappedDriver", "(", ")", ";", ...
Enhance the interfaces implemented by this instance of WebElement iff that instance is a {@link org.openqa.selenium.remote.RemoteWebElement}. The WebElement that is returned may well be a dynamic proxy. You cannot rely on the concrete implementing class to remain constant. @param element The driver to enhance. @retur...
[ "Enhance", "the", "interfaces", "implemented", "by", "this", "instance", "of", "WebElement", "iff", "that", "instance", "is", "a", "{", "@link", "org", ".", "openqa", ".", "selenium", ".", "remote", ".", "RemoteWebElement", "}", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/BaseAugmenter.java#L110-L118
phax/ph-commons
ph-cli/src/main/java/com/helger/cli/HelpFormatter.java
HelpFormatter.printHelp
public void printHelp (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull @Nonempty final String sCmdLineSyntax, @Nullable final String sHeader, @Nonnull final Options aOptions, final int...
java
public void printHelp (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull @Nonempty final String sCmdLineSyntax, @Nullable final String sHeader, @Nonnull final Options aOptions, final int...
[ "public", "void", "printHelp", "(", "@", "Nonnull", "final", "PrintWriter", "aPW", ",", "final", "int", "nWidth", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sCmdLineSyntax", ",", "@", "Nullable", "final", "String", "sHeader", ",", "@", "Nonnul...
Print the help for <code>options</code> with the specified command line syntax. @param aPW the writer to which the help will be written @param nWidth the number of characters to be displayed on each line @param sCmdLineSyntax the syntax for this application @param sHeader the banner to display at the beginning of the ...
[ "Print", "the", "help", "for", "<code", ">", "options<", "/", "code", ">", "with", "the", "specified", "command", "line", "syntax", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-cli/src/main/java/com/helger/cli/HelpFormatter.java#L588-L612
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.fax_customDomains_POST
public OvhMailDomain2Service fax_customDomains_POST(String domain) throws IOException { """ Create a custom domain for your fax services REST: POST /me/fax/customDomains @param domain [required] The custom domain of your fax services """ String qPath = "/me/fax/customDomains"; StringBuilder sb = path(q...
java
public OvhMailDomain2Service fax_customDomains_POST(String domain) throws IOException { String qPath = "/me/fax/customDomains"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "domain", domain); String resp = exec(qPath, "POST", sb.toString(), o); return ...
[ "public", "OvhMailDomain2Service", "fax_customDomains_POST", "(", "String", "domain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/fax/customDomains\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "HashMap", "<", "String", ...
Create a custom domain for your fax services REST: POST /me/fax/customDomains @param domain [required] The custom domain of your fax services
[ "Create", "a", "custom", "domain", "for", "your", "fax", "services" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1651-L1658
jayantk/jklol
src/com/jayantkrish/jklol/ccg/chart/CcgExactChart.java
CcgExactChart.longMultisetsEqual
private static final boolean longMultisetsEqual(long[] firstDeps, long[] secondDeps) { """ Checks if two multisets of long numbers contain the same keys with the same frequency @param first @param second @return """ if (firstDeps.length != secondDeps.length) { return false; } Arrays.sor...
java
private static final boolean longMultisetsEqual(long[] firstDeps, long[] secondDeps) { if (firstDeps.length != secondDeps.length) { return false; } Arrays.sort(firstDeps); Arrays.sort(secondDeps); for (int i = 0; i < firstDeps.length; i++) { if (firstDeps[i] != secondDeps[i]) { ...
[ "private", "static", "final", "boolean", "longMultisetsEqual", "(", "long", "[", "]", "firstDeps", ",", "long", "[", "]", "secondDeps", ")", "{", "if", "(", "firstDeps", ".", "length", "!=", "secondDeps", ".", "length", ")", "{", "return", "false", ";", ...
Checks if two multisets of long numbers contain the same keys with the same frequency @param first @param second @return
[ "Checks", "if", "two", "multisets", "of", "long", "numbers", "contain", "the", "same", "keys", "with", "the", "same", "frequency" ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/chart/CcgExactChart.java#L171-L184
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/recurrent/KerasRnnUtils.java
KerasRnnUtils.getUnrollRecurrentLayer
public static boolean getUnrollRecurrentLayer(KerasLayerConfiguration conf, Map<String, Object> layerConfig) throws InvalidKerasConfigurationException { """ Get unroll parameter to decide whether to unroll RNN with BPTT or not. @param conf KerasLayerConfiguration @param layerConfig dictionar...
java
public static boolean getUnrollRecurrentLayer(KerasLayerConfiguration conf, Map<String, Object> layerConfig) throws InvalidKerasConfigurationException { Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf); if (!innerConfig.containsKey(conf.getLA...
[ "public", "static", "boolean", "getUnrollRecurrentLayer", "(", "KerasLayerConfiguration", "conf", ",", "Map", "<", "String", ",", "Object", ">", "layerConfig", ")", "throws", "InvalidKerasConfigurationException", "{", "Map", "<", "String", ",", "Object", ">", "inner...
Get unroll parameter to decide whether to unroll RNN with BPTT or not. @param conf KerasLayerConfiguration @param layerConfig dictionary containing Keras layer properties @return boolean unroll parameter @throws InvalidKerasConfigurationException Invalid Keras configuration
[ "Get", "unroll", "parameter", "to", "decide", "whether", "to", "unroll", "RNN", "with", "BPTT", "or", "not", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/recurrent/KerasRnnUtils.java#L41-L48
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/util/StringUtil.java
StringUtil.isEquals
public static boolean isEquals( String s1, String s2) { """ <p>isEquals.</p> @param s1 a {@link java.lang.String} object. @param s2 a {@link java.lang.String} object. @return a boolean. """ return s1 == null ? s2 == null : s1.equals(s2); }
java
public static boolean isEquals( String s1, String s2) { return s1 == null ? s2 == null : s1.equals(s2); }
[ "public", "static", "boolean", "isEquals", "(", "String", "s1", ",", "String", "s2", ")", "{", "return", "s1", "==", "null", "?", "s2", "==", "null", ":", "s1", ".", "equals", "(", "s2", ")", ";", "}" ]
<p>isEquals.</p> @param s1 a {@link java.lang.String} object. @param s2 a {@link java.lang.String} object. @return a boolean.
[ "<p", ">", "isEquals", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/util/StringUtil.java#L67-L70
roboconf/roboconf-platform
core/roboconf-plugin-puppet/src/main/java/net/roboconf/plugin/puppet/internal/PluginPuppet.java
PluginPuppet.installPuppetModules
void installPuppetModules( Instance instance ) throws IOException, InterruptedException { """ Executes a Puppet command to install the required modules. @param instance the instance @throws IOException @throws InterruptedException @throws PluginException """ // Load the modules names File instanceDir...
java
void installPuppetModules( Instance instance ) throws IOException, InterruptedException { // Load the modules names File instanceDirectory = InstanceHelpers.findInstanceDirectoryOnAgent( instance ); File modulesFile = new File( instanceDirectory, "modules.properties" ); if( ! modulesFile.exists()) return; ...
[ "void", "installPuppetModules", "(", "Instance", "instance", ")", "throws", "IOException", ",", "InterruptedException", "{", "// Load the modules names", "File", "instanceDirectory", "=", "InstanceHelpers", ".", "findInstanceDirectoryOnAgent", "(", "instance", ")", ";", "...
Executes a Puppet command to install the required modules. @param instance the instance @throws IOException @throws InterruptedException @throws PluginException
[ "Executes", "a", "Puppet", "command", "to", "install", "the", "required", "modules", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-puppet/src/main/java/net/roboconf/plugin/puppet/internal/PluginPuppet.java#L207-L241
square/okhttp
okhttp/src/main/java/okhttp3/internal/cache2/Relay.java
Relay.edit
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { """ Creates a new relay that reads a live stream from {@code upstream}, using {@code file} to share that data with other sources. <p><strong>Warning:</strong> callers to this method must im...
java
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize); // Write a dirty header. That wa...
[ "public", "static", "Relay", "edit", "(", "File", "file", ",", "Source", "upstream", ",", "ByteString", "metadata", ",", "long", "bufferMaxSize", ")", "throws", "IOException", "{", "RandomAccessFile", "randomAccessFile", "=", "new", "RandomAccessFile", "(", "file"...
Creates a new relay that reads a live stream from {@code upstream}, using {@code file} to share that data with other sources. <p><strong>Warning:</strong> callers to this method must immediately call {@link #newSource} to create a source and close that when they're done. Otherwise a handle to {@code file} will be leak...
[ "Creates", "a", "new", "relay", "that", "reads", "a", "live", "stream", "from", "{", "@code", "upstream", "}", "using", "{", "@code", "file", "}", "to", "share", "that", "data", "with", "other", "sources", "." ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/cache2/Relay.java#L124-L134
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addSrcLink
public void addSrcLink(ProgramElementDoc doc, Content label, Content htmltree) { """ Add the link to the content tree. @param doc program element doc for which the link will be added @param label label for the link @param htmltree the content tree to which the link will be added """ if (doc == nul...
java
public void addSrcLink(ProgramElementDoc doc, Content label, Content htmltree) { if (doc == null) { return; } ClassDoc cd = doc.containingClass(); if (cd == null) { //d must be a class doc since in has no containing class. cd = (ClassDoc) doc; ...
[ "public", "void", "addSrcLink", "(", "ProgramElementDoc", "doc", ",", "Content", "label", ",", "Content", "htmltree", ")", "{", "if", "(", "doc", "==", "null", ")", "{", "return", ";", "}", "ClassDoc", "cd", "=", "doc", ".", "containingClass", "(", ")", ...
Add the link to the content tree. @param doc program element doc for which the link will be added @param label label for the link @param htmltree the content tree to which the link will be added
[ "Add", "the", "link", "to", "the", "content", "tree", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L994-L1008
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.getCleanupSingularityRequests
public Collection<SingularityRequestCleanup> getCleanupSingularityRequests() { """ Get all requests that are cleaning up Requests that are cleaning up are those that have been marked for removal and their tasks are being stopped/removed before they are being removed. So after their have been cleaned up, these re...
java
public Collection<SingularityRequestCleanup> getCleanupSingularityRequests() { final Function<String, String> requestUri = (host) -> String.format(REQUESTS_GET_CLEANUP_FORMAT, getApiBase(host)); return getCollection(requestUri, "cleaning requests", CLEANUP_REQUESTS_COLLECTION); }
[ "public", "Collection", "<", "SingularityRequestCleanup", ">", "getCleanupSingularityRequests", "(", ")", "{", "final", "Function", "<", "String", ",", "String", ">", "requestUri", "=", "(", "host", ")", "-", ">", "String", ".", "format", "(", "REQUESTS_GET_CLEA...
Get all requests that are cleaning up Requests that are cleaning up are those that have been marked for removal and their tasks are being stopped/removed before they are being removed. So after their have been cleaned up, these request cease to exist in Singularity. @return A collection of {@link SingularityRequestCle...
[ "Get", "all", "requests", "that", "are", "cleaning", "up", "Requests", "that", "are", "cleaning", "up", "are", "those", "that", "have", "been", "marked", "for", "removal", "and", "their", "tasks", "are", "being", "stopped", "/", "removed", "before", "they", ...
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L817-L821
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java
MapFixture.setValueForIn
public void setValueForIn(Object value, String name, Map<String, Object> map) { """ Stores value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in. """ getMapHelper().setValueForIn(value, name, map); }
java
public void setValueForIn(Object value, String name, Map<String, Object> map) { getMapHelper().setValueForIn(value, name, map); }
[ "public", "void", "setValueForIn", "(", "Object", "value", ",", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "getMapHelper", "(", ")", ".", "setValueForIn", "(", "value", ",", "name", ",", "map", ")", ";", "}" ]
Stores value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in.
[ "Stores", "value", "in", "map", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java#L85-L87
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.handleException
private static ReflectionException handleException(String memberName, IllegalAccessException e) { """ Handle {@link IllegalAccessException} by logging it and rethrown it as a {@link ReflectionException} @param memberName member name @param e exception @return wrapped exception """ LOGGER....
java
private static ReflectionException handleException(String memberName, IllegalAccessException e) { LOGGER.error("Couldn't access member " + memberName, e); return new ReflectionException(e); }
[ "private", "static", "ReflectionException", "handleException", "(", "String", "memberName", ",", "IllegalAccessException", "e", ")", "{", "LOGGER", ".", "error", "(", "\"Couldn't access member \"", "+", "memberName", ",", "e", ")", ";", "return", "new", "ReflectionE...
Handle {@link IllegalAccessException} by logging it and rethrown it as a {@link ReflectionException} @param memberName member name @param e exception @return wrapped exception
[ "Handle", "{", "@link", "IllegalAccessException", "}", "by", "logging", "it", "and", "rethrown", "it", "as", "a", "{", "@link", "ReflectionException", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L184-L187
defei/codelogger-utils
src/main/java/org/codelogger/utils/ArrayUtils.java
ArrayUtils.subArray
public static <T> T subArray(final T array, final int start, final int end) { """ 裁剪数组。 @param array 源数组。 @param start 裁剪的起始位置的索引。 @param end 裁剪的结束位置的索引。 @return 一个新的数组,包含从指定索引开始到指定索引结束的所有元素。如果数组为空或起始索引小于0,或起始索引大于结束索引,或结束大于数组本身索引长度 ,则返回数组本身。 """ if (isEmpty(array) || start < 0 || start > end || en...
java
public static <T> T subArray(final T array, final int start, final int end) { if (isEmpty(array) || start < 0 || start > end || end >= Array.getLength(array)) { return array; } int newArraySize = end - start + 1; @SuppressWarnings("unchecked") T newArray = (T) buildArray(ClassUtils.getPrimiti...
[ "public", "static", "<", "T", ">", "T", "subArray", "(", "final", "T", "array", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "if", "(", "isEmpty", "(", "array", ")", "||", "start", "<", "0", "||", "start", ">", "end", "||",...
裁剪数组。 @param array 源数组。 @param start 裁剪的起始位置的索引。 @param end 裁剪的结束位置的索引。 @return 一个新的数组,包含从指定索引开始到指定索引结束的所有元素。如果数组为空或起始索引小于0,或起始索引大于结束索引,或结束大于数组本身索引长度 ,则返回数组本身。
[ "裁剪数组。" ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/ArrayUtils.java#L274-L285
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java
XmlReader.readByte
public byte readByte(byte defaultValue, String attribute) { """ Read a byte. @param defaultValue The value returned if attribute not found. @param attribute The integer name (must not be <code>null</code>). @return The byte value. """ return Byte.parseByte(getValue(String.valueOf(defaultValue), at...
java
public byte readByte(byte defaultValue, String attribute) { return Byte.parseByte(getValue(String.valueOf(defaultValue), attribute)); }
[ "public", "byte", "readByte", "(", "byte", "defaultValue", ",", "String", "attribute", ")", "{", "return", "Byte", ".", "parseByte", "(", "getValue", "(", "String", ".", "valueOf", "(", "defaultValue", ")", ",", "attribute", ")", ")", ";", "}" ]
Read a byte. @param defaultValue The value returned if attribute not found. @param attribute The integer name (must not be <code>null</code>). @return The byte value.
[ "Read", "a", "byte", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/XmlReader.java#L160-L163
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java
FactoryMultiView.triangulateNViewCalibrated
public static TriangulateNViewsMetric triangulateNViewCalibrated(@Nullable ConfigTriangulation config ) { """ Triangulate N views using the Discrete Linear Transform (DLT) with a calibrated camera @see TriangulateMetricLinearDLT @return Two view triangulation algorithm """ if( config == null ) confi...
java
public static TriangulateNViewsMetric triangulateNViewCalibrated(@Nullable ConfigTriangulation config ) { if( config == null ) config = new ConfigTriangulation(); switch ( config.type ) { case DLT: return new WrapNViewsTriangulateMetricDLT(); case GEOMETRIC: { TriangulateNViewsMetric estimator = ...
[ "public", "static", "TriangulateNViewsMetric", "triangulateNViewCalibrated", "(", "@", "Nullable", "ConfigTriangulation", "config", ")", "{", "if", "(", "config", "==", "null", ")", "config", "=", "new", "ConfigTriangulation", "(", ")", ";", "switch", "(", "config...
Triangulate N views using the Discrete Linear Transform (DLT) with a calibrated camera @see TriangulateMetricLinearDLT @return Two view triangulation algorithm
[ "Triangulate", "N", "views", "using", "the", "Discrete", "Linear", "Transform", "(", "DLT", ")", "with", "a", "calibrated", "camera" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java#L585-L601
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.beginCreateOrUpdate
public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { """ Creates or updates a virtual network gateway connection in the specified resource group. @param resourceGroupName The name ...
java
public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocki...
[ "public", "VirtualNetworkGatewayConnectionInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "VirtualNetworkGatewayConnectionInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync...
Creates or updates a virtual network gateway connection in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. @param parameters Parameters supplied to the create or update virtual network ...
[ "Creates", "or", "updates", "a", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L214-L216
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/FileBlobStoreImpl.java
FileBlobStoreImpl.deleteKey
public void deleteKey(String key) throws IOException { """ Delete a key from the blob store @param key the key to delete @throws IOException on any error """ File keyDir = getKeyDir(key); LocalFsBlobStoreFile pf = new LocalFsBlobStoreFile(keyDir, BlobStoreFile.BLOBSTORE_DATA_FILE); pf...
java
public void deleteKey(String key) throws IOException { File keyDir = getKeyDir(key); LocalFsBlobStoreFile pf = new LocalFsBlobStoreFile(keyDir, BlobStoreFile.BLOBSTORE_DATA_FILE); pf.delete(); delete(keyDir); }
[ "public", "void", "deleteKey", "(", "String", "key", ")", "throws", "IOException", "{", "File", "keyDir", "=", "getKeyDir", "(", "key", ")", ";", "LocalFsBlobStoreFile", "pf", "=", "new", "LocalFsBlobStoreFile", "(", "keyDir", ",", "BlobStoreFile", ".", "BLOBS...
Delete a key from the blob store @param key the key to delete @throws IOException on any error
[ "Delete", "a", "key", "from", "the", "blob", "store" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/FileBlobStoreImpl.java#L166-L171
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
EnumConstantBuilder.getInstance
public static EnumConstantBuilder getInstance(Context context, TypeElement typeElement, EnumConstantWriter writer) { """ Construct a new EnumConstantsBuilder. @param context the build context. @param typeElement the class whoses members are being documented. @param writer the doclet specific writ...
java
public static EnumConstantBuilder getInstance(Context context, TypeElement typeElement, EnumConstantWriter writer) { return new EnumConstantBuilder(context, typeElement, writer); }
[ "public", "static", "EnumConstantBuilder", "getInstance", "(", "Context", "context", ",", "TypeElement", "typeElement", ",", "EnumConstantWriter", "writer", ")", "{", "return", "new", "EnumConstantBuilder", "(", "context", ",", "typeElement", ",", "writer", ")", ";"...
Construct a new EnumConstantsBuilder. @param context the build context. @param typeElement the class whoses members are being documented. @param writer the doclet specific writer. @return the new EnumConstantsBuilder
[ "Construct", "a", "new", "EnumConstantsBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java#L105-L108
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Bzip2BitWriter.java
Bzip2BitWriter.writeUnary
void writeUnary(ByteBuf out, int value) { """ Writes a zero-terminated unary number to the output {@link ByteBuf}. Example of the output for value = 6: {@code 1111110} @param value The number of {@code 1} to write """ if (value < 0) { throw new IllegalArgumentException("value: " + value +...
java
void writeUnary(ByteBuf out, int value) { if (value < 0) { throw new IllegalArgumentException("value: " + value + " (expected 0 or more)"); } while (value-- > 0) { writeBoolean(out, true); } writeBoolean(out, false); }
[ "void", "writeUnary", "(", "ByteBuf", "out", ",", "int", "value", ")", "{", "if", "(", "value", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"value: \"", "+", "value", "+", "\" (expected 0 or more)\"", ")", ";", "}", "while", "(",...
Writes a zero-terminated unary number to the output {@link ByteBuf}. Example of the output for value = 6: {@code 1111110} @param value The number of {@code 1} to write
[ "Writes", "a", "zero", "-", "terminated", "unary", "number", "to", "the", "output", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Bzip2BitWriter.java#L80-L88
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/ApplicationDialog.java
ApplicationDialog.addActionKeyBinding
protected void addActionKeyBinding(KeyStroke key, String actionKey) { """ Add an action key binding to this dialog. @param key the {@link KeyStroke} that triggers the command/action. @param actionKey id of command that will be triggered by the {@link KeyStroke}. @see #addActionKeyBinding(KeyStroke, String, ...
java
protected void addActionKeyBinding(KeyStroke key, String actionKey) { if (actionKey == finishCommand.getId()) { addActionKeyBinding(key, actionKey, finishCommand.getActionAdapter()); } else if (actionKey == cancelCommand.getId()) { addActionKeyBinding(key, actionKey, cancelCommand.getActionAdapter()); } ...
[ "protected", "void", "addActionKeyBinding", "(", "KeyStroke", "key", ",", "String", "actionKey", ")", "{", "if", "(", "actionKey", "==", "finishCommand", ".", "getId", "(", ")", ")", "{", "addActionKeyBinding", "(", "key", ",", "actionKey", ",", "finishCommand...
Add an action key binding to this dialog. @param key the {@link KeyStroke} that triggers the command/action. @param actionKey id of command that will be triggered by the {@link KeyStroke}. @see #addActionKeyBinding(KeyStroke, String, Action)
[ "Add", "an", "action", "key", "binding", "to", "this", "dialog", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/ApplicationDialog.java#L655-L665
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/CapabilityRegistry.java
CapabilityRegistry.registerCapability
@Override public void registerCapability(RuntimeCapabilityRegistration capabilityRegistration) { """ Registers a capability with the system. Any {@link org.jboss.as.controller.capability.Capability#getRequirements() requirements} associated with the capability will be recorded as requirements. @param capa...
java
@Override public void registerCapability(RuntimeCapabilityRegistration capabilityRegistration) { writeLock.lock(); try { CapabilityId capabilityId = capabilityRegistration.getCapabilityId(); RegistrationPoint rp = capabilityRegistration.getOldestRegistrationPoint(); ...
[ "@", "Override", "public", "void", "registerCapability", "(", "RuntimeCapabilityRegistration", "capabilityRegistration", ")", "{", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "CapabilityId", "capabilityId", "=", "capabilityRegistration", ".", "getCapabilityId",...
Registers a capability with the system. Any {@link org.jboss.as.controller.capability.Capability#getRequirements() requirements} associated with the capability will be recorded as requirements. @param capabilityRegistration the capability. Cannot be {@code null}
[ "Registers", "a", "capability", "with", "the", "system", ".", "Any", "{", "@link", "org", ".", "jboss", ".", "as", ".", "controller", ".", "capability", ".", "Capability#getRequirements", "()", "requirements", "}", "associated", "with", "the", "capability", "w...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/CapabilityRegistry.java#L146-L181