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
httl/httl
httl/src/main/java/httl/spi/codecs/json/JSONObject.java
JSONObject.putAll
public void putAll(String[] names, Object[] values) { """ put all. @param names name array. @param values value array. """ for (int i = 0, len = Math.min(names.length, values.length); i < len; i++) objectMap.put(names[i], values[i]); }
java
public void putAll(String[] names, Object[] values) { for (int i = 0, len = Math.min(names.length, values.length); i < len; i++) objectMap.put(names[i], values[i]); }
[ "public", "void", "putAll", "(", "String", "[", "]", "names", ",", "Object", "[", "]", "values", ")", "{", "for", "(", "int", "i", "=", "0", ",", "len", "=", "Math", ".", "min", "(", "names", ".", "length", ",", "values", ".", "length", ")", ";...
put all. @param names name array. @param values value array.
[ "put", "all", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/spi/codecs/json/JSONObject.java#L178-L181
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/BandwidthClient.java
BandwidthClient.setCredentials
public void setCredentials(final String userId, final String apiToken, final String apiSecret) { """ The setCredentials() provides a convenience method to pass the userId, API-token and API-secret after a client has been instantiated. @param userId the user id. @param apiToken the API token. @param apiSe...
java
public void setCredentials(final String userId, final String apiToken, final String apiSecret) { if (userId != null && apiToken != null && apiSecret != null) { this.usersUri = String.format(BandwidthConstants.USERS_URI_PATH, userId.replaceAll(" ", "")); this.token = apiToken.replaceAll("...
[ "public", "void", "setCredentials", "(", "final", "String", "userId", ",", "final", "String", "apiToken", ",", "final", "String", "apiSecret", ")", "{", "if", "(", "userId", "!=", "null", "&&", "apiToken", "!=", "null", "&&", "apiSecret", "!=", "null", ")"...
The setCredentials() provides a convenience method to pass the userId, API-token and API-secret after a client has been instantiated. @param userId the user id. @param apiToken the API token. @param apiSecret the API secret.
[ "The", "setCredentials", "()", "provides", "a", "convenience", "method", "to", "pass", "the", "userId", "API", "-", "token", "and", "API", "-", "secret", "after", "a", "client", "has", "been", "instantiated", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/BandwidthClient.java#L207-L217
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/Predicates.java
Predicates.greaterThan
public static Predicate greaterThan(String attribute, Comparable value) { """ Creates a <b>greater than</b> predicate that will pass items if the value stored under the given item {@code attribute} is greater than the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attribute Paths</i>, <i>Handli...
java
public static Predicate greaterThan(String attribute, Comparable value) { return new GreaterLessPredicate(attribute, value, false, false); }
[ "public", "static", "Predicate", "greaterThan", "(", "String", "attribute", ",", "Comparable", "value", ")", "{", "return", "new", "GreaterLessPredicate", "(", "attribute", ",", "value", ",", "false", ",", "false", ")", ";", "}" ]
Creates a <b>greater than</b> predicate that will pass items if the value stored under the given item {@code attribute} is greater than the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attribute Paths</i>, <i>Handling of {@code null}</i> and <i>Implicit Type Conversion</i> sections of {@link Predicat...
[ "Creates", "a", "<b", ">", "greater", "than<", "/", "b", ">", "predicate", "that", "will", "pass", "items", "if", "the", "value", "stored", "under", "the", "given", "item", "{", "@code", "attribute", "}", "is", "greater", "than", "the", "given", "{", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/Predicates.java#L344-L346
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/FileResource.java
FileResource.getProperty
private HierarchicalProperty getProperty(Node node, QName name) throws PathNotFoundException, RepositoryException { """ Returns node's property wrapped in {@link HierarchicalProperty}. """ Property property = node.getProperty(WebDavNamespaceContext.createName(name)); String propertyValue; ...
java
private HierarchicalProperty getProperty(Node node, QName name) throws PathNotFoundException, RepositoryException { Property property = node.getProperty(WebDavNamespaceContext.createName(name)); String propertyValue; if (property.getDefinition().isMultiple()) { if (property.get...
[ "private", "HierarchicalProperty", "getProperty", "(", "Node", "node", ",", "QName", "name", ")", "throws", "PathNotFoundException", ",", "RepositoryException", "{", "Property", "property", "=", "node", ".", "getProperty", "(", "WebDavNamespaceContext", ".", "createNa...
Returns node's property wrapped in {@link HierarchicalProperty}.
[ "Returns", "node", "s", "property", "wrapped", "in", "{" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/resource/FileResource.java#L332-L356
VoltDB/voltdb
src/frontend/org/voltdb/AbstractTopology.java
AbstractTopology.getTopology
public static AbstractTopology getTopology(Map<Integer, HostInfo> hostInfos, Set<Integer> missingHosts, int kfactor, boolean restorePartition ) { """ Create a new topology using {@code hosts} @param hostInfos hosts to put in topology @param missingHosts set of missing host IDs @param kfactor ...
java
public static AbstractTopology getTopology(Map<Integer, HostInfo> hostInfos, Set<Integer> missingHosts, int kfactor, boolean restorePartition ) { TopologyBuilder builder = addPartitionsToHosts(hostInfos, missingHosts, kfactor, 0); AbstractTopology topo = new AbstractTopology(EMPTY_TOPOLOGY, ...
[ "public", "static", "AbstractTopology", "getTopology", "(", "Map", "<", "Integer", ",", "HostInfo", ">", "hostInfos", ",", "Set", "<", "Integer", ">", "missingHosts", ",", "int", "kfactor", ",", "boolean", "restorePartition", ")", "{", "TopologyBuilder", "builde...
Create a new topology using {@code hosts} @param hostInfos hosts to put in topology @param missingHosts set of missing host IDs @param kfactor for cluster @return {@link AbstractTopology} for cluster @throws RuntimeException if hosts are not valid for topology
[ "Create", "a", "new", "topology", "using", "{", "@code", "hosts", "}" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/AbstractTopology.java#L975-L983
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java
CertificateOperations.createCertificate
public void createCertificate(InputStream certStream, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException, CertificateException, NoSuchAlgorithmException { """ Adds a certificate to the Batch account. @param certStream The certificate data in .cer format. @param additiona...
java
public void createCertificate(InputStream certStream, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException, CertificateException, NoSuchAlgorithmException { CertificateFactory x509CertFact = CertificateFactory.getInstance("X.509"); X509Certificate cert = (X509Certif...
[ "public", "void", "createCertificate", "(", "InputStream", "certStream", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", ",", "CertificateException", ",", "NoSuchAlgorithmException", "{", "...
Adds a certificate to the Batch account. @param certStream The certificate data in .cer format. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch ...
[ "Adds", "a", "certificate", "to", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/CertificateOperations.java#L115-L126
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/animation/transformation/ChainedTransformation.java
ChainedTransformation.doTransform
@SuppressWarnings( { """ Calculates the transformation. @param transformable the transformable @param comp the comp """ "unchecked", "rawtypes" }) @Override protected void doTransform(ITransformable transformable, float comp) { if (listTransformations.size() == 0) return; if (reversed) elapse...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected void doTransform(ITransformable transformable, float comp) { if (listTransformations.size() == 0) return; if (reversed) elapsedTimeCurrentLoop = Math.max(0, duration - elapsedTimeCurrentLoop); for (Transformation transformation : listTra...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "@", "Override", "protected", "void", "doTransform", "(", "ITransformable", "transformable", ",", "float", "comp", ")", "{", "if", "(", "listTransformations", ".", "size", "(", ...
Calculates the transformation. @param transformable the transformable @param comp the comp
[ "Calculates", "the", "transformation", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/animation/transformation/ChainedTransformation.java#L83-L97
sundrio/sundrio
codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java
JavaGeneratingProcessor.createTypeFromTemplate
public <T> TypeDef createTypeFromTemplate(T model, String[] parameters, String content) { """ Generate a {@link TypeDef} from the specified model, parameters and template. """ try (StringWriter writer = new StringWriter()) { new CodeGeneratorBuilder<T>() .withContext(con...
java
public <T> TypeDef createTypeFromTemplate(T model, String[] parameters, String content) { try (StringWriter writer = new StringWriter()) { new CodeGeneratorBuilder<T>() .withContext(context) .withModel(model) .withParameters(parameters) ...
[ "public", "<", "T", ">", "TypeDef", "createTypeFromTemplate", "(", "T", "model", ",", "String", "[", "]", "parameters", ",", "String", "content", ")", "{", "try", "(", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ")", "{", "new", "Code...
Generate a {@link TypeDef} from the specified model, parameters and template.
[ "Generate", "a", "{" ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java#L167-L183
validator/validator
src/nu/validator/checker/NormalizationChecker.java
NormalizationChecker.appendToBuf
private void appendToBuf(char[] ch, int start, int end) { """ Appends a slice of an UTF-16 code unit array to the internal buffer. @param ch the array from which to copy @param start the index of the first element that is copied @param end the index of the first element that is not copied """ if ...
java
private void appendToBuf(char[] ch, int start, int end) { if (start == end) { return; } int neededBufLen = pos + (end - start); if (neededBufLen > buf.length) { char[] newBuf = new char[neededBufLen]; System.arraycopy(buf, 0, newBuf, 0, pos); ...
[ "private", "void", "appendToBuf", "(", "char", "[", "]", "ch", ",", "int", "start", ",", "int", "end", ")", "{", "if", "(", "start", "==", "end", ")", "{", "return", ";", "}", "int", "neededBufLen", "=", "pos", "+", "(", "end", "-", "start", ")",...
Appends a slice of an UTF-16 code unit array to the internal buffer. @param ch the array from which to copy @param start the index of the first element that is copied @param end the index of the first element that is not copied
[ "Appends", "a", "slice", "of", "an", "UTF", "-", "16", "code", "unit", "array", "to", "the", "internal", "buffer", "." ]
train
https://github.com/validator/validator/blob/c7b7f85b3a364df7d9944753fb5b2cd0ce642889/src/nu/validator/checker/NormalizationChecker.java#L297-L312
OpenFeign/feign
core/src/main/java/feign/template/UriUtils.java
UriUtils.pctEncode
private static void pctEncode(byte data, ByteArrayOutputStream bos) { """ Percent Encode the provided byte. @param data to encode @param bos with the output stream to use. """ bos.write('%'); char hex1 = Character.toUpperCase(Character.forDigit((data >> 4) & 0xF, 16)); char hex2 = Character.toU...
java
private static void pctEncode(byte data, ByteArrayOutputStream bos) { bos.write('%'); char hex1 = Character.toUpperCase(Character.forDigit((data >> 4) & 0xF, 16)); char hex2 = Character.toUpperCase(Character.forDigit(data & 0xF, 16)); bos.write(hex1); bos.write(hex2); }
[ "private", "static", "void", "pctEncode", "(", "byte", "data", ",", "ByteArrayOutputStream", "bos", ")", "{", "bos", ".", "write", "(", "'", "'", ")", ";", "char", "hex1", "=", "Character", ".", "toUpperCase", "(", "Character", ".", "forDigit", "(", "(",...
Percent Encode the provided byte. @param data to encode @param bos with the output stream to use.
[ "Percent", "Encode", "the", "provided", "byte", "." ]
train
https://github.com/OpenFeign/feign/blob/318fb0e955b8cfcf64f70d6aeea0ba5795f8a7eb/core/src/main/java/feign/template/UriUtils.java#L201-L207
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java
LdapRdnComponent.encodeUrl
public String encodeUrl() { """ Get a String representation of this instance for use in URLs. @return a properly URL encoded representation of this instancs. """ // Use the URI class to properly URL encode the value. try { URI valueUri = new URI(null, null, value, null); return key + "=" + valueUr...
java
public String encodeUrl() { // Use the URI class to properly URL encode the value. try { URI valueUri = new URI(null, null, value, null); return key + "=" + valueUri.toString(); } catch (URISyntaxException e) { // This should really never happen... return key + "=" + "value"; } }
[ "public", "String", "encodeUrl", "(", ")", "{", "// Use the URI class to properly URL encode the value.", "try", "{", "URI", "valueUri", "=", "new", "URI", "(", "null", ",", "null", ",", "value", ",", "null", ")", ";", "return", "key", "+", "\"=\"", "+", "va...
Get a String representation of this instance for use in URLs. @return a properly URL encoded representation of this instancs.
[ "Get", "a", "String", "representation", "of", "this", "instance", "for", "use", "in", "URLs", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/core/LdapRdnComponent.java#L176-L186
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java
SqlConnRunner.findIn
public List<Entity> findIn(Connection conn, String tableName, String field, Object... values) throws SQLException { """ 根据某个字段名条件查询数据列表,返回所有字段 @param conn 数据库连接对象 @param tableName 表名 @param field 字段名 @param values 字段值列表 @return 数据对象列表 @throws SQLException SQL执行异常 """ return findAll(conn, Entity.crea...
java
public List<Entity> findIn(Connection conn, String tableName, String field, Object... values) throws SQLException{ return findAll(conn, Entity.create(tableName).set(field, values)); }
[ "public", "List", "<", "Entity", ">", "findIn", "(", "Connection", "conn", ",", "String", "tableName", ",", "String", "field", ",", "Object", "...", "values", ")", "throws", "SQLException", "{", "return", "findAll", "(", "conn", ",", "Entity", ".", "create...
根据某个字段名条件查询数据列表,返回所有字段 @param conn 数据库连接对象 @param tableName 表名 @param field 字段名 @param values 字段值列表 @return 数据对象列表 @throws SQLException SQL执行异常
[ "根据某个字段名条件查询数据列表,返回所有字段" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L428-L430
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/core/DigestAuthHeaderFunction.java
DigestAuthHeaderFunction.getDigestHex
private String getDigestHex(String algorithm, String key) { """ Generates digest hexadecimal string representation of a key with given algorithm. @param algorithm @param key @return """ if (algorithm.equals("md5")) { return DigestUtils.md5Hex(key); } else if (algorithm.equals(...
java
private String getDigestHex(String algorithm, String key) { if (algorithm.equals("md5")) { return DigestUtils.md5Hex(key); } else if (algorithm.equals("sha")) { return DigestUtils.shaHex(key); } throw new CitrusRuntimeException("Unsupported digest algorit...
[ "private", "String", "getDigestHex", "(", "String", "algorithm", ",", "String", "key", ")", "{", "if", "(", "algorithm", ".", "equals", "(", "\"md5\"", ")", ")", "{", "return", "DigestUtils", ".", "md5Hex", "(", "key", ")", ";", "}", "else", "if", "(",...
Generates digest hexadecimal string representation of a key with given algorithm. @param algorithm @param key @return
[ "Generates", "digest", "hexadecimal", "string", "representation", "of", "a", "key", "with", "given", "algorithm", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/core/DigestAuthHeaderFunction.java#L97-L105
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.hosting_privateDatabase_serviceName_ram_GET
public ArrayList<String> hosting_privateDatabase_serviceName_ram_GET(String serviceName, OvhAvailableRamSizeEnum ram) throws IOException { """ Get allowed durations for 'ram' option REST: GET /order/hosting/privateDatabase/{serviceName}/ram @param ram [required] Private database ram size @param serviceName [r...
java
public ArrayList<String> hosting_privateDatabase_serviceName_ram_GET(String serviceName, OvhAvailableRamSizeEnum ram) throws IOException { String qPath = "/order/hosting/privateDatabase/{serviceName}/ram"; StringBuilder sb = path(qPath, serviceName); query(sb, "ram", ram); String resp = exec(qPath, "GET", sb.to...
[ "public", "ArrayList", "<", "String", ">", "hosting_privateDatabase_serviceName_ram_GET", "(", "String", "serviceName", ",", "OvhAvailableRamSizeEnum", "ram", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/hosting/privateDatabase/{serviceName}/ram\"", ";...
Get allowed durations for 'ram' option REST: GET /order/hosting/privateDatabase/{serviceName}/ram @param ram [required] Private database ram size @param serviceName [required] The internal name of your private database
[ "Get", "allowed", "durations", "for", "ram", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5200-L5206
JodaOrg/joda-time
src/main/java/org/joda/time/DateTimeComparator.java
DateTimeComparator.getInstance
public static DateTimeComparator getInstance(DateTimeFieldType lowerLimit, DateTimeFieldType upperLimit) { """ Returns a DateTimeComparator with a lower and upper limit. Fields of a magnitude less than the lower limit are excluded from comparisons. Fields of a magnitude greater than or equal to the upper limit a...
java
public static DateTimeComparator getInstance(DateTimeFieldType lowerLimit, DateTimeFieldType upperLimit) { if (lowerLimit == null && upperLimit == null) { return ALL_INSTANCE; } if (lowerLimit == DateTimeFieldType.dayOfYear() && upperLimit == null) { return DATE_INSTANCE;...
[ "public", "static", "DateTimeComparator", "getInstance", "(", "DateTimeFieldType", "lowerLimit", ",", "DateTimeFieldType", "upperLimit", ")", "{", "if", "(", "lowerLimit", "==", "null", "&&", "upperLimit", "==", "null", ")", "{", "return", "ALL_INSTANCE", ";", "}"...
Returns a DateTimeComparator with a lower and upper limit. Fields of a magnitude less than the lower limit are excluded from comparisons. Fields of a magnitude greater than or equal to the upper limit are also excluded from comparisons. Either limit may be specified as null, which indicates an unbounded limit. <p> The ...
[ "Returns", "a", "DateTimeComparator", "with", "a", "lower", "and", "upper", "limit", ".", "Fields", "of", "a", "magnitude", "less", "than", "the", "lower", "limit", "are", "excluded", "from", "comparisons", ".", "Fields", "of", "a", "magnitude", "greater", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTimeComparator.java#L105-L116
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java
ManagedBackupShortTermRetentionPoliciesInner.beginUpdateAsync
public Observable<ManagedBackupShortTermRetentionPolicyInner> beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { """ Updates a managed database's short term retention policy. @param resourceGroupName The name of the resource group that contains t...
java
public Observable<ManagedBackupShortTermRetentionPolicyInner> beginUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, Integer retentionDays) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, retentionDays).map(new Func1<Service...
[ "public", "Observable", "<", "ManagedBackupShortTermRetentionPolicyInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "Integer", "retentionDays", ")", "{", "return", "beginUpdateWith...
Updates a managed database's short term retention policy. @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 managedInstanceName The name of the managed instance. @param databaseName The name of the dat...
[ "Updates", "a", "managed", "database", "s", "short", "term", "retention", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedBackupShortTermRetentionPoliciesInner.java#L833-L840
OpenLiberty/open-liberty
dev/wlp-mavenRepoTasks/src/com/ibm/ws/wlp/mavenFeatures/utils/Utils.java
Utils.getFileName
public static String getFileName(MavenCoordinates artifact, Constants.ArtifactType type) { """ Gets the expected file name for a Maven artifact, based on its Maven coordinates. @param artifact the MavenArtifact whose file name you want @param type the type of artifact @return the file name including extens...
java
public static String getFileName(MavenCoordinates artifact, Constants.ArtifactType type) { return artifact.getArtifactId() + "-" + artifact.getVersion() + type.getMavenFileExtension(); }
[ "public", "static", "String", "getFileName", "(", "MavenCoordinates", "artifact", ",", "Constants", ".", "ArtifactType", "type", ")", "{", "return", "artifact", ".", "getArtifactId", "(", ")", "+", "\"-\"", "+", "artifact", ".", "getVersion", "(", ")", "+", ...
Gets the expected file name for a Maven artifact, based on its Maven coordinates. @param artifact the MavenArtifact whose file name you want @param type the type of artifact @return the file name including extension
[ "Gets", "the", "expected", "file", "name", "for", "a", "Maven", "artifact", "based", "on", "its", "Maven", "coordinates", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp-mavenRepoTasks/src/com/ibm/ws/wlp/mavenFeatures/utils/Utils.java#L46-L48
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.setTextMatrix
public void setTextMatrix(float a, float b, float c, float d, float x, float y) { """ Changes the text matrix. <P> Remark: this operation also initializes the current point position.</P> @param a operand 1,1 in the matrix @param b operand 1,2 in the matrix @param c ...
java
public void setTextMatrix(float a, float b, float c, float d, float x, float y) { state.xTLM = x; state.yTLM = y; content.append(a).append(' ').append(b).append_i(' ') .append(c).append_i(' ').append(d).append_i(' ') .append(x).append_i(' ').append(y).append(" Tm").append_i(separ...
[ "public", "void", "setTextMatrix", "(", "float", "a", ",", "float", "b", ",", "float", "c", ",", "float", "d", ",", "float", "x", ",", "float", "y", ")", "{", "state", ".", "xTLM", "=", "x", ";", "state", ".", "yTLM", "=", "y", ";", "content", ...
Changes the text matrix. <P> Remark: this operation also initializes the current point position.</P> @param a operand 1,1 in the matrix @param b operand 1,2 in the matrix @param c operand 2,1 in the matrix @param d operand 2,2 in the matrix @param x...
[ "Changes", "the", "text", "matrix", ".", "<P", ">", "Remark", ":", "this", "operation", "also", "initializes", "the", "current", "point", "position", ".", "<", "/", "P", ">" ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1532-L1538
dlemmermann/PreferencesFX
preferencesfx/src/main/java/com/dlsc/preferencesfx/util/PreferencesFxUtils.java
PreferencesFxUtils.flattenCategories
private static void flattenCategories(List<Category> flatList, List<Category> categories) { """ Goes through the list of parent categories and adds each category it visists to the flatList. @param flatList list to which the categories for the flattened list should be added @param categories list of parent ca...
java
private static void flattenCategories(List<Category> flatList, List<Category> categories) { categories.forEach(category -> { flatList.add(category); List<Category> children = category.getChildren(); if (children != null) { flattenCategories(flatList, children); } }); }
[ "private", "static", "void", "flattenCategories", "(", "List", "<", "Category", ">", "flatList", ",", "List", "<", "Category", ">", "categories", ")", "{", "categories", ".", "forEach", "(", "category", "->", "{", "flatList", ".", "add", "(", "category", "...
Goes through the list of parent categories and adds each category it visists to the flatList. @param flatList list to which the categories for the flattened list should be added @param categories list of parent categories to go through recursively @implNote Internal helper method for {@link PreferencesFxUtils#flatte...
[ "Goes", "through", "the", "list", "of", "parent", "categories", "and", "adds", "each", "category", "it", "visists", "to", "the", "flatList", "." ]
train
https://github.com/dlemmermann/PreferencesFX/blob/e06a49663ec949c2f7eb56e6b5952c030ed42d33/preferencesfx/src/main/java/com/dlsc/preferencesfx/util/PreferencesFxUtils.java#L183-L191
Ordinastie/MalisisCore
src/main/java/net/malisis/core/MalisisCommand.java
MalisisCommand.execute
@Override public void execute(MinecraftServer server, ICommandSender sender, String[] params) throws CommandException { """ Processes the command. @param sender the sender @param params the params """ if (params.length == 0) throw new WrongUsageException("malisiscore.commands.usage"); if (!paramet...
java
@Override public void execute(MinecraftServer server, ICommandSender sender, String[] params) throws CommandException { if (params.length == 0) throw new WrongUsageException("malisiscore.commands.usage"); if (!parameters.contains(params[0])) throw new WrongUsageException("malisiscore.commands.usage"); s...
[ "@", "Override", "public", "void", "execute", "(", "MinecraftServer", "server", ",", "ICommandSender", "sender", ",", "String", "[", "]", "params", ")", "throws", "CommandException", "{", "if", "(", "params", ".", "length", "==", "0", ")", "throw", "new", ...
Processes the command. @param sender the sender @param params the params
[ "Processes", "the", "command", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/MalisisCommand.java#L105-L142
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/conditions/ConditionFactory.java
ConditionFactory.newUserAgentCondition
public static Condition newUserAgentCondition(StringComparisonType comparisonType, String value) { """ Constructs a new access control policy condition that tests the incoming request's user agent field against the specified value, using the specified comparison type. This condition can be used to allow or deny ...
java
public static Condition newUserAgentCondition(StringComparisonType comparisonType, String value) { return new StringCondition(comparisonType, USER_AGENT_CONDITION_KEY, value); }
[ "public", "static", "Condition", "newUserAgentCondition", "(", "StringComparisonType", "comparisonType", ",", "String", "value", ")", "{", "return", "new", "StringCondition", "(", "comparisonType", ",", "USER_AGENT_CONDITION_KEY", ",", "value", ")", ";", "}" ]
Constructs a new access control policy condition that tests the incoming request's user agent field against the specified value, using the specified comparison type. This condition can be used to allow or deny access to a resource based on what user agent is specified in the request. @param comparisonType The type of ...
[ "Constructs", "a", "new", "access", "control", "policy", "condition", "that", "tests", "the", "incoming", "request", "s", "user", "agent", "field", "against", "the", "specified", "value", "using", "the", "specified", "comparison", "type", ".", "This", "condition...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/conditions/ConditionFactory.java#L152-L154
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.hasProperty
public static boolean hasProperty(final String propKey, final File propFile) { """ Reads propFile and then checks if specified key exists. @param propKey property name @param propFile property file @return file if a property with that name exists. If an exception occurs while reading the file, false is retu...
java
public static boolean hasProperty(final String propKey, final File propFile) { if (null == propKey) throw new IllegalArgumentException("propKey param was null"); if (null == propFile) throw new IllegalArgumentException("propFile param was null"); if (propFile.exists()) { final Proper...
[ "public", "static", "boolean", "hasProperty", "(", "final", "String", "propKey", ",", "final", "File", "propFile", ")", "{", "if", "(", "null", "==", "propKey", ")", "throw", "new", "IllegalArgumentException", "(", "\"propKey param was null\"", ")", ";", "if", ...
Reads propFile and then checks if specified key exists. @param propKey property name @param propFile property file @return file if a property with that name exists. If an exception occurs while reading the file, false is returned.
[ "Reads", "propFile", "and", "then", "checks", "if", "specified", "key", "exists", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L333-L354
graphql-java/graphql-java
src/main/java/graphql/execution/ExecutionStepInfo.java
ExecutionStepInfo.changeTypeWithPreservedNonNull
public ExecutionStepInfo changeTypeWithPreservedNonNull(GraphQLOutputType newType) { """ This allows you to morph a type into a more specialized form yet return the same parent and non-null ness, for example taking a {@link GraphQLInterfaceType} and turning it into a specific {@link graphql.schema.GraphQLObjectT...
java
public ExecutionStepInfo changeTypeWithPreservedNonNull(GraphQLOutputType newType) { assertTrue(!GraphQLTypeUtil.isNonNull(newType), "newType can't be non null"); if (isNonNullType()) { return new ExecutionStepInfo(GraphQLNonNull.nonNull(newType), fieldDefinition, field, path, this.parent, a...
[ "public", "ExecutionStepInfo", "changeTypeWithPreservedNonNull", "(", "GraphQLOutputType", "newType", ")", "{", "assertTrue", "(", "!", "GraphQLTypeUtil", ".", "isNonNull", "(", "newType", ")", ",", "\"newType can't be non null\"", ")", ";", "if", "(", "isNonNullType", ...
This allows you to morph a type into a more specialized form yet return the same parent and non-null ness, for example taking a {@link GraphQLInterfaceType} and turning it into a specific {@link graphql.schema.GraphQLObjectType} after type resolution has occurred @param newType the new type to be @return a new type i...
[ "This", "allows", "you", "to", "morph", "a", "type", "into", "a", "more", "specialized", "form", "yet", "return", "the", "same", "parent", "and", "non", "-", "null", "ness", "for", "example", "taking", "a", "{", "@link", "GraphQLInterfaceType", "}", "and",...
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/ExecutionStepInfo.java#L169-L176
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/SendQueueHolder.java
SendQueueHolder.doProcess
public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { """ Handle the command send from my client peer. @param in The (optional) Inputstream to get the params from. @param out The stream to write the results. """ String strCommand = thi...
java
public void doProcess(InputStream in, PrintWriter out, Map<String, Object> properties) throws RemoteException { String strCommand = this.getProperty(REMOTE_COMMAND, properties); if (SEND_MESSAGE.equals(strCommand)) { BaseMessage message = (BaseMessage)this.getNextObjectPa...
[ "public", "void", "doProcess", "(", "InputStream", "in", ",", "PrintWriter", "out", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "String", "strCommand", "=", "this", ".", "getProperty", "(", "REMOTE_COMMAN...
Handle the command send from my client peer. @param in The (optional) Inputstream to get the params from. @param out The stream to write the results.
[ "Handle", "the", "command", "send", "from", "my", "client", "peer", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/SendQueueHolder.java#L60-L71
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.removeResourceFromProject
public void removeResourceFromProject(CmsDbContext dbc, CmsResource resource) throws CmsException { """ Removes a resource from the current project of the user.<p> @param dbc the current database context @param resource the resource to apply this operation to @throws CmsException if something goes wrong ...
java
public void removeResourceFromProject(CmsDbContext dbc, CmsResource resource) throws CmsException { // remove the resource to the project only if the resource is already in the project if (isInsideCurrentProject(dbc, resource.getRootPath())) { // check if there are already any subfolders of...
[ "public", "void", "removeResourceFromProject", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "// remove the resource to the project only if the resource is already in the project", "if", "(", "isInsideCurrentProject", "(", "dbc", ...
Removes a resource from the current project of the user.<p> @param dbc the current database context @param resource the resource to apply this operation to @throws CmsException if something goes wrong @see CmsObject#copyResourceToProject(String) @see I_CmsResourceType#copyResourceToProject(CmsObject, CmsSecurityMana...
[ "Removes", "a", "resource", "from", "the", "current", "project", "of", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L8218-L8247
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.distancePointLine
public double distancePointLine(Point2D.Double p1,Point2D.Double p2,Point2D.Double p) { """ Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point...
java
public double distancePointLine(Point2D.Double p1,Point2D.Double p2,Point2D.Double p){ double d; double m = (p2.y-p1.y)/(p2.x-p1.x); if(Double.isInfinite(m)) { d = Math.abs(p2.x-p.x); } else{ double k = -1*m*p1.x+p1.y; d = Math.sqrt( Math.pow( (p.x+m*p.y-m*k)/(m*m+1)-p.x , 2) + Math.pow( m*( (p...
[ "public", "double", "distancePointLine", "(", "Point2D", ".", "Double", "p1", ",", "Point2D", ".", "Double", "p2", ",", "Point2D", ".", "Double", "p", ")", "{", "double", "d", ";", "double", "m", "=", "(", "p2", ".", "y", "-", "p1", ".", "y", ")", ...
Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point for which the distance should be calculated. @return distance of p to line defined by p1&p2
[ "Please", "see", "https", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Distance_from_a_point_to_a_line#Another_formula", "and", "http", ":", "//", "mathworld", ".", "wolfram", ".", "com", "/", "Two", "-", "PointForm", ".", "html" ]
train
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L517-L530
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.constructTypeQualifierAnnotation
public static void constructTypeQualifierAnnotation(Set<TypeQualifierAnnotation> set, AnnotationValue v) { """ Resolve a raw AnnotationValue into a TypeQualifierAnnotation, storing result in given Set. @param set Set of resolved TypeQualifierAnnotations @param v a raw AnnotationValue """ assert ...
java
public static void constructTypeQualifierAnnotation(Set<TypeQualifierAnnotation> set, AnnotationValue v) { assert set != null; TypeQualifierAnnotation tqa = constructTypeQualifierAnnotation(v); set.add(tqa); }
[ "public", "static", "void", "constructTypeQualifierAnnotation", "(", "Set", "<", "TypeQualifierAnnotation", ">", "set", ",", "AnnotationValue", "v", ")", "{", "assert", "set", "!=", "null", ";", "TypeQualifierAnnotation", "tqa", "=", "constructTypeQualifierAnnotation", ...
Resolve a raw AnnotationValue into a TypeQualifierAnnotation, storing result in given Set. @param set Set of resolved TypeQualifierAnnotations @param v a raw AnnotationValue
[ "Resolve", "a", "raw", "AnnotationValue", "into", "a", "TypeQualifierAnnotation", "storing", "result", "in", "given", "Set", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L270-L274
pip-services3-java/pip-services3-components-java
src/org/pipservices3/components/count/CompositeCounters.java
CompositeCounters.stats
public void stats(String name, float value) { """ Calculates min/average/max statistics based on the current and previous values. @param name a counter name of Statistics type @param value a value to update statistics """ for (ICounters counter : _counters) counter.stats(name, value); } /** * R...
java
public void stats(String name, float value) { for (ICounters counter : _counters) counter.stats(name, value); } /** * Records the last calculated measurement value. * * Usually this method is used by metrics calculated externally. * * @param name a counter name of Last type. * @param value a last...
[ "public", "void", "stats", "(", "String", "name", ",", "float", "value", ")", "{", "for", "(", "ICounters", "counter", ":", "_counters", ")", "counter", ".", "stats", "(", "name", ",", "value", ")", ";", "}", "/**\n\t * Records the last calculated measurement ...
Calculates min/average/max statistics based on the current and previous values. @param name a counter name of Statistics type @param value a value to update statistics
[ "Calculates", "min", "/", "average", "/", "max", "statistics", "based", "on", "the", "current", "and", "previous", "values", "." ]
train
https://github.com/pip-services3-java/pip-services3-components-java/blob/122352fbf9b208f6417376da7b8ad725bc85ee58/src/org/pipservices3/components/count/CompositeCounters.java#L100-L158
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/query/Saml2AttributeQueryProfileHandlerController.java
Saml2AttributeQueryProfileHandlerController.handlePostRequest
@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML2_SOAP_ATTRIBUTE_QUERY) protected void handlePostRequest(final HttpServletResponse response, final HttpServletRequest request) { """ Handle post request. @param response the response @param request the request """ ...
java
@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML2_SOAP_ATTRIBUTE_QUERY) protected void handlePostRequest(final HttpServletResponse response, final HttpServletRequest request) { val ctx = decodeSoapRequest(request); val query = (AttributeQuery) ctx.getMessage()...
[ "@", "PostMapping", "(", "path", "=", "SamlIdPConstants", ".", "ENDPOINT_SAML2_SOAP_ATTRIBUTE_QUERY", ")", "protected", "void", "handlePostRequest", "(", "final", "HttpServletResponse", "response", ",", "final", "HttpServletRequest", "request", ")", "{", "val", "ctx", ...
Handle post request. @param response the response @param request the request
[ "Handle", "post", "request", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/query/Saml2AttributeQueryProfileHandlerController.java#L39-L84
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.contentEquals
public static boolean contentEquals(File file1, File file2) throws IORuntimeException { """ 比较两个文件内容是否相同<br> 首先比较长度,长度一致再比较内容<br> 此方法来自Apache Commons io @param file1 文件1 @param file2 文件2 @return 两个文件内容一致返回true,否则false @throws IORuntimeException IO异常 @since 4.0.6 """ boolean file1Exists = file1.exis...
java
public static boolean contentEquals(File file1, File file2) throws IORuntimeException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (false == file1Exists) { // 两个文件都不存在,返回true return true; } if (file1.isDirectory() || file2.isDirectory(...
[ "public", "static", "boolean", "contentEquals", "(", "File", "file1", ",", "File", "file2", ")", "throws", "IORuntimeException", "{", "boolean", "file1Exists", "=", "file1", ".", "exists", "(", ")", ";", "if", "(", "file1Exists", "!=", "file2", ".", "exists"...
比较两个文件内容是否相同<br> 首先比较长度,长度一致再比较内容<br> 此方法来自Apache Commons io @param file1 文件1 @param file2 文件2 @return 两个文件内容一致返回true,否则false @throws IORuntimeException IO异常 @since 4.0.6
[ "比较两个文件内容是否相同<br", ">", "首先比较长度,长度一致再比较内容<br", ">", "此方法来自Apache", "Commons", "io" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1339-L1376
perwendel/spark
src/main/java/spark/utils/GzipUtils.java
GzipUtils.checkAndWrap
public static OutputStream checkAndWrap(HttpServletRequest httpRequest, HttpServletResponse httpResponse, boolean requireWantsHeader) throws IOException { "...
java
public static OutputStream checkAndWrap(HttpServletRequest httpRequest, HttpServletResponse httpResponse, boolean requireWantsHeader) throws IOException { ...
[ "public", "static", "OutputStream", "checkAndWrap", "(", "HttpServletRequest", "httpRequest", ",", "HttpServletResponse", "httpResponse", ",", "boolean", "requireWantsHeader", ")", "throws", "IOException", "{", "OutputStream", "responseStream", "=", "httpResponse", ".", "...
Checks if the HTTP request/response accepts and wants GZIP and i that case wraps the response output stream in a {@link java.util.zip.GZIPOutputStream}. @param httpRequest the HTTP servlet request. @param httpResponse the HTTP servlet response. @param requireWantsHeader if wants header is required @return...
[ "Checks", "if", "the", "HTTP", "request", "/", "response", "accepts", "and", "wants", "GZIP", "and", "i", "that", "case", "wraps", "the", "response", "output", "stream", "in", "a", "{", "@link", "java", ".", "util", ".", "zip", ".", "GZIPOutputStream", "...
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/utils/GzipUtils.java#L59-L77
apache/incubator-gobblin
gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/JCEKSKeystoreCredentialStore.java
JCEKSKeystoreCredentialStore.generateAesKeys
public void generateAesKeys(int numKeys, int startOffset) throws IOException, KeyStoreException { """ Generate a set of AES keys for the store. The key ids will simple be (startOffset ... startOffset + numKeys). @param numKeys Number of keys to generate @param startOffset ID to start generating keys with @throw...
java
public void generateAesKeys(int numKeys, int startOffset) throws IOException, KeyStoreException { for (int i = 1; i <= numKeys; i++) { SecretKey key = generateKey(); ks.setEntry(String.valueOf(i + startOffset), new KeyStore.SecretKeyEntry(key), new KeyStore.PasswordProtection(password)); }...
[ "public", "void", "generateAesKeys", "(", "int", "numKeys", ",", "int", "startOffset", ")", "throws", "IOException", ",", "KeyStoreException", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "numKeys", ";", "i", "++", ")", "{", "SecretKey", "key",...
Generate a set of AES keys for the store. The key ids will simple be (startOffset ... startOffset + numKeys). @param numKeys Number of keys to generate @param startOffset ID to start generating keys with @throws IOException If there is an error serializing the keystore back to disk @throws KeyStoreException If there is...
[ "Generate", "a", "set", "of", "AES", "keys", "for", "the", "store", ".", "The", "key", "ids", "will", "simple", "be", "(", "startOffset", "...", "startOffset", "+", "numKeys", ")", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/JCEKSKeystoreCredentialStore.java#L163-L171
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java
PersistenceController.deleteConversation
public Observable<Boolean> deleteConversation(String conversationId) { """ Delete conversation from the store. @param conversationId Unique conversation id. @return Observable emitting result. """ return asObservable(new Executor<Boolean>() { @Override void execute(ChatStor...
java
public Observable<Boolean> deleteConversation(String conversationId) { return asObservable(new Executor<Boolean>() { @Override void execute(ChatStore store, Emitter<Boolean> emitter) { store.beginTransaction(); boolean isSuccess = store.deleteConversation...
[ "public", "Observable", "<", "Boolean", ">", "deleteConversation", "(", "String", "conversationId", ")", "{", "return", "asObservable", "(", "new", "Executor", "<", "Boolean", ">", "(", ")", "{", "@", "Override", "void", "execute", "(", "ChatStore", "store", ...
Delete conversation from the store. @param conversationId Unique conversation id. @return Observable emitting result.
[ "Delete", "conversation", "from", "the", "store", "." ]
train
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L545-L557
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java
AbstractExtraLanguageGenerator._generate
protected void _generate(SarlScript script, IExtraLanguageGeneratorContext context) { """ Generate the given script. @param script the script. @param context the context. """ if (script != null) { for (final XtendTypeDeclaration content : script.getXtendTypes()) { if (context.getCancelIndicator()....
java
protected void _generate(SarlScript script, IExtraLanguageGeneratorContext context) { if (script != null) { for (final XtendTypeDeclaration content : script.getXtendTypes()) { if (context.getCancelIndicator().isCanceled()) { return; } try { generate(content, context); } finally { con...
[ "protected", "void", "_generate", "(", "SarlScript", "script", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "script", "!=", "null", ")", "{", "for", "(", "final", "XtendTypeDeclaration", "content", ":", "script", ".", "getXtendTypes", "...
Generate the given script. @param script the script. @param context the context.
[ "Generate", "the", "given", "script", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java#L678-L691
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/ResourceBundleTools.java
ResourceBundleTools.getMessageBundle
public static ResourceBundle getMessageBundle() { """ Gets the ResourceBundle (i18n strings) for the default language of the user's system. """ try { ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE); ResourceBundle fallbackBundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale...
java
public static ResourceBundle getMessageBundle() { try { ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE); ResourceBundle fallbackBundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale.ENGLISH); return new ResourceBundleWithFallback(bundle, fallbackBundle); } catch (MissingRes...
[ "public", "static", "ResourceBundle", "getMessageBundle", "(", ")", "{", "try", "{", "ResourceBundle", "bundle", "=", "ResourceBundle", ".", "getBundle", "(", "MESSAGE_BUNDLE", ")", ";", "ResourceBundle", "fallbackBundle", "=", "ResourceBundle", ".", "getBundle", "(...
Gets the ResourceBundle (i18n strings) for the default language of the user's system.
[ "Gets", "the", "ResourceBundle", "(", "i18n", "strings", ")", "for", "the", "default", "language", "of", "the", "user", "s", "system", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/ResourceBundleTools.java#L39-L47
Azure/azure-sdk-for-java
recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/ReplicationUsagesInner.java
ReplicationUsagesInner.listAsync
public Observable<List<ReplicationUsageInner>> listAsync(String resourceGroupName, String vaultName) { """ Fetches the replication usages of the vault. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault....
java
public Observable<List<ReplicationUsageInner>> listAsync(String resourceGroupName, String vaultName) { return listWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1<ServiceResponse<List<ReplicationUsageInner>>, List<ReplicationUsageInner>>() { @Override public List<Repl...
[ "public", "Observable", "<", "List", "<", "ReplicationUsageInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "vaultName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "vaultName", ")", ".", "map",...
Fetches the replication usages of the vault. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;Re...
[ "Fetches", "the", "replication", "usages", "of", "the", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/ReplicationUsagesInner.java#L96-L103
netty/netty
common/src/main/java/io/netty/util/AsciiString.java
AsciiString.indexOf
public int indexOf(char ch, int start) { """ Searches in this string for the index of the specified char {@code ch}. The search for the char starts at the specified offset {@code start} and moves towards the end of this string. @param ch the char to find. @param start the starting offset. @return the index o...
java
public int indexOf(char ch, int start) { if (ch > MAX_CHAR_VALUE) { return INDEX_NOT_FOUND; } if (start < 0) { start = 0; } final byte chAsByte = c2b0(ch); final int len = offset + length; for (int i = start + offset; i < len; ++i) { ...
[ "public", "int", "indexOf", "(", "char", "ch", ",", "int", "start", ")", "{", "if", "(", "ch", ">", "MAX_CHAR_VALUE", ")", "{", "return", "INDEX_NOT_FOUND", ";", "}", "if", "(", "start", "<", "0", ")", "{", "start", "=", "0", ";", "}", "final", "...
Searches in this string for the index of the specified char {@code ch}. The search for the char starts at the specified offset {@code start} and moves towards the end of this string. @param ch the char to find. @param start the starting offset. @return the index of the first occurrence of the specified char {@code ch}...
[ "Searches", "in", "this", "string", "for", "the", "index", "of", "the", "specified", "char", "{", "@code", "ch", "}", ".", "The", "search", "for", "the", "char", "starts", "at", "the", "specified", "offset", "{", "@code", "start", "}", "and", "moves", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/AsciiString.java#L715-L732
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java
ExecutionDAOFacade.removeWorkflow
public void removeWorkflow(String workflowId, boolean archiveWorkflow) { """ Removes the workflow from the data store. @param workflowId the id of the workflow to be removed @param archiveWorkflow if true, the workflow will be archived in the {@link IndexDAO} after removal from {@link ExecutionDAO} "...
java
public void removeWorkflow(String workflowId, boolean archiveWorkflow) { try { Workflow workflow = getWorkflowById(workflowId, true); // remove workflow from ES if (archiveWorkflow) { //Add to elasticsearch indexDAO.updateWorkflow(workflowId, ...
[ "public", "void", "removeWorkflow", "(", "String", "workflowId", ",", "boolean", "archiveWorkflow", ")", "{", "try", "{", "Workflow", "workflow", "=", "getWorkflowById", "(", "workflowId", ",", "true", ")", ";", "// remove workflow from ES", "if", "(", "archiveWor...
Removes the workflow from the data store. @param workflowId the id of the workflow to be removed @param archiveWorkflow if true, the workflow will be archived in the {@link IndexDAO} after removal from {@link ExecutionDAO}
[ "Removes", "the", "workflow", "from", "the", "data", "store", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java#L172-L198
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/Prism.java
Prism.getPolygonVertices
public static Point3d[] getPolygonVertices(int n, double radius, Point3d center) { """ Returns the vertices of an n-fold polygon of given radius and center @return """ Point3d[] polygon = new Point3d[n]; Matrix3d m = new Matrix3d(); for (int i = 0; i < n; i++) { polygon[i] = new Point3d(0, radius, 0...
java
public static Point3d[] getPolygonVertices(int n, double radius, Point3d center) { Point3d[] polygon = new Point3d[n]; Matrix3d m = new Matrix3d(); for (int i = 0; i < n; i++) { polygon[i] = new Point3d(0, radius, 0); m.rotZ(i*2*Math.PI/n); m.transform(polygon[i]); polygon[i].add(center); } retur...
[ "public", "static", "Point3d", "[", "]", "getPolygonVertices", "(", "int", "n", ",", "double", "radius", ",", "Point3d", "center", ")", "{", "Point3d", "[", "]", "polygon", "=", "new", "Point3d", "[", "n", "]", ";", "Matrix3d", "m", "=", "new", "Matrix...
Returns the vertices of an n-fold polygon of given radius and center @return
[ "Returns", "the", "vertices", "of", "an", "n", "-", "fold", "polygon", "of", "given", "radius", "and", "center" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/Prism.java#L147-L158
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.importCertificateAsync
public ServiceFuture<CertificateBundle> importCertificateAsync(String vaultBaseUrl, String certificateName, String base64EncodedCertificate, final ServiceCallback<CertificateBundle> serviceCallback) { """ Imports a certificate into a specified key vault. Imports an existing valid certificate, containing a private...
java
public ServiceFuture<CertificateBundle> importCertificateAsync(String vaultBaseUrl, String certificateName, String base64EncodedCertificate, final ServiceCallback<CertificateBundle> serviceCallback) { return ServiceFuture.fromResponse(importCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, base...
[ "public", "ServiceFuture", "<", "CertificateBundle", ">", "importCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "String", "base64EncodedCertificate", ",", "final", "ServiceCallback", "<", "CertificateBundle", ">", "serviceCallback",...
Imports a certificate into a specified key vault. Imports an existing valid certificate, containing a private key, into Azure Key Vault. The certificate to be imported can be in either PFX or PEM format. If the certificate is in PEM format the PEM file must contain the key as well as x509 certificates. This operation r...
[ "Imports", "a", "certificate", "into", "a", "specified", "key", "vault", ".", "Imports", "an", "existing", "valid", "certificate", "containing", "a", "private", "key", "into", "Azure", "Key", "Vault", ".", "The", "certificate", "to", "be", "imported", "can", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6699-L6701
alkacon/opencms-core
src/org/opencms/ui/components/CmsToolBar.java
CmsToolBar.createDropDown
public static Component createDropDown(FontIcon icon, Component content, String title) { """ Creates a drop down menu.<p> @param icon the button icon @param content the drop down content @param title the drop down title @return the component """ return createDropDown(getDropDownButtonHtml(icon...
java
public static Component createDropDown(FontIcon icon, Component content, String title) { return createDropDown(getDropDownButtonHtml(icon), content, title); }
[ "public", "static", "Component", "createDropDown", "(", "FontIcon", "icon", ",", "Component", "content", ",", "String", "title", ")", "{", "return", "createDropDown", "(", "getDropDownButtonHtml", "(", "icon", ")", ",", "content", ",", "title", ")", ";", "}" ]
Creates a drop down menu.<p> @param icon the button icon @param content the drop down content @param title the drop down title @return the component
[ "Creates", "a", "drop", "down", "menu", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsToolBar.java#L266-L269
dita-ot/dita-ot
src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java
ExtensibleAntInvoker.getJob
public static Job getJob(final File tempDir, final Project project) { """ Get job configuration from Ant project reference or create new. @param tempDir configuration directory @param project Ant project @return job configuration """ Job job = project.getReference(ANT_REFERENCE_JOB); if (j...
java
public static Job getJob(final File tempDir, final Project project) { Job job = project.getReference(ANT_REFERENCE_JOB); if (job != null && job.isStale()) { project.log("Reload stale job configuration reference", Project.MSG_VERBOSE); job = null; } if (job == null...
[ "public", "static", "Job", "getJob", "(", "final", "File", "tempDir", ",", "final", "Project", "project", ")", "{", "Job", "job", "=", "project", ".", "getReference", "(", "ANT_REFERENCE_JOB", ")", ";", "if", "(", "job", "!=", "null", "&&", "job", ".", ...
Get job configuration from Ant project reference or create new. @param tempDir configuration directory @param project Ant project @return job configuration
[ "Get", "job", "configuration", "from", "Ant", "project", "reference", "or", "create", "new", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/ant/ExtensibleAntInvoker.java#L292-L307
MTDdk/jawn
jawn-security/src/main/java/net/javapla/jawn/security/JawnRememberMeManager.java
JawnRememberMeManager.rememberSerializedIdentity
@Override protected void rememberSerializedIdentity(Subject subject, byte[] serialized) { """ Base64-encodes the specified serialized byte array and sets that base64-encoded String as the cookie value. <p/> The {@code subject} instance is expected to be a {@link WebSubject} instance with an HTTP Request/Resp...
java
@Override protected void rememberSerializedIdentity(Subject subject, byte[] serialized) { if (! (subject instanceof ContextSource)) { // if (log.isDebugEnabled()) { // String msg = "Subject argument is not an HTTP-aware instance. This is required to obtain a servlet " + // ...
[ "@", "Override", "protected", "void", "rememberSerializedIdentity", "(", "Subject", "subject", ",", "byte", "[", "]", "serialized", ")", "{", "if", "(", "!", "(", "subject", "instanceof", "ContextSource", ")", ")", "{", "// if (log.isDebugEnabled()) {", ...
Base64-encodes the specified serialized byte array and sets that base64-encoded String as the cookie value. <p/> The {@code subject} instance is expected to be a {@link WebSubject} instance with an HTTP Request/Response pair so an HTTP cookie can be set on the outgoing response. If it is not a {@code WebSubject} or th...
[ "Base64", "-", "encodes", "the", "specified", "serialized", "byte", "array", "and", "sets", "that", "base64", "-", "encoded", "String", "as", "the", "cookie", "value", ".", "<p", "/", ">", "The", "{", "@code", "subject", "}", "instance", "is", "expected", ...
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-security/src/main/java/net/javapla/jawn/security/JawnRememberMeManager.java#L83-L101
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.sendMessage
public void sendMessage(BaseMessage messageOut, BaseInternalMessageProcessor messageOutProcessor) { """ Using this transport, send this message (using this processor) and (optionally) process the reply. @param internalTrxMessage The message to send. @param messageOutProcessor The message out processor. """ ...
java
public void sendMessage(BaseMessage messageOut, BaseInternalMessageProcessor messageOutProcessor) { int iErrorCode = this.convertToExternal(messageOut, messageOutProcessor); // Convert my standard message to the external format for this message BaseMessage messageReplyIn = null; if (iErro...
[ "public", "void", "sendMessage", "(", "BaseMessage", "messageOut", ",", "BaseInternalMessageProcessor", "messageOutProcessor", ")", "{", "int", "iErrorCode", "=", "this", ".", "convertToExternal", "(", "messageOut", ",", "messageOutProcessor", ")", ";", "// Convert my s...
Using this transport, send this message (using this processor) and (optionally) process the reply. @param internalTrxMessage The message to send. @param messageOutProcessor The message out processor.
[ "Using", "this", "transport", "send", "this", "message", "(", "using", "this", "processor", ")", "and", "(", "optionally", ")", "process", "the", "reply", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L159-L183
hal/core
gui/src/main/java/org/jboss/as/console/client/v3/stores/domain/ServerStore.java
ServerStore.deriveGroups
private SortedSet<ServerGroup> deriveGroups(List<HostInfo> hosts) { """ Builds {@link ServerGroup} instances and populates the map {@link #serverGroups} """ serverGroups.clear(); for (HostInfo host : hosts) { List<ServerInstance> serverInstances = host.getServerInstances(); ...
java
private SortedSet<ServerGroup> deriveGroups(List<HostInfo> hosts) { serverGroups.clear(); for (HostInfo host : hosts) { List<ServerInstance> serverInstances = host.getServerInstances(); for (ServerInstance server : serverInstances) { String group = server.getGroup...
[ "private", "SortedSet", "<", "ServerGroup", ">", "deriveGroups", "(", "List", "<", "HostInfo", ">", "hosts", ")", "{", "serverGroups", ".", "clear", "(", ")", ";", "for", "(", "HostInfo", "host", ":", "hosts", ")", "{", "List", "<", "ServerInstance", ">"...
Builds {@link ServerGroup} instances and populates the map {@link #serverGroups}
[ "Builds", "{" ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/v3/stores/domain/ServerStore.java#L181-L197
apache/flink
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java
AbstractFetcher.emitRecord
protected void emitRecord(T record, KafkaTopicPartitionState<KPH> partitionState, long offset) throws Exception { """ Emits a record without attaching an existing timestamp to it. <p>Implementation Note: This method is kept brief to be JIT inlining friendly. That makes the fast path efficient, the extended pat...
java
protected void emitRecord(T record, KafkaTopicPartitionState<KPH> partitionState, long offset) throws Exception { if (record != null) { if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) { // fast path logic, in case there are no watermarks // emit the record, using the checkpoint lock to guarantee ...
[ "protected", "void", "emitRecord", "(", "T", "record", ",", "KafkaTopicPartitionState", "<", "KPH", ">", "partitionState", ",", "long", "offset", ")", "throws", "Exception", "{", "if", "(", "record", "!=", "null", ")", "{", "if", "(", "timestampWatermarkMode",...
Emits a record without attaching an existing timestamp to it. <p>Implementation Note: This method is kept brief to be JIT inlining friendly. That makes the fast path efficient, the extended paths are called as separate methods. @param record The record to emit @param partitionState The state of the Kafka partition fr...
[ "Emits", "a", "record", "without", "attaching", "an", "existing", "timestamp", "to", "it", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java#L353-L376
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java
GitFlowGraphMonitor.checkFileLevelRelativeToRoot
private boolean checkFileLevelRelativeToRoot(Path filePath, int depth) { """ Helper to check if a file has proper hierarchy. @param filePath path of the node/edge file @param depth expected depth of the file @return true if the file conforms to the expected hierarchy """ if (filePath == null) { re...
java
private boolean checkFileLevelRelativeToRoot(Path filePath, int depth) { if (filePath == null) { return false; } Path path = filePath; for (int i = 0; i < depth - 1; i++) { path = path.getParent(); } if (!path.getName().equals(folderName)) { return false; } return true;...
[ "private", "boolean", "checkFileLevelRelativeToRoot", "(", "Path", "filePath", ",", "int", "depth", ")", "{", "if", "(", "filePath", "==", "null", ")", "{", "return", "false", ";", "}", "Path", "path", "=", "filePath", ";", "for", "(", "int", "i", "=", ...
Helper to check if a file has proper hierarchy. @param filePath path of the node/edge file @param depth expected depth of the file @return true if the file conforms to the expected hierarchy
[ "Helper", "to", "check", "if", "a", "file", "has", "proper", "hierarchy", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GitFlowGraphMonitor.java#L293-L305
google/closure-compiler
src/com/google/javascript/refactoring/Matchers.java
Matchers.constructorPropertyDeclaration
public static Matcher constructorPropertyDeclaration() { """ Returns a Matcher that matches against properties that are declared in the constructor. """ return new Matcher() { @Override public boolean matches(Node node, NodeMetadata metadata) { // This will match against code that looks like:...
java
public static Matcher constructorPropertyDeclaration() { return new Matcher() { @Override public boolean matches(Node node, NodeMetadata metadata) { // This will match against code that looks like: // /** @constructor */ // function constructor() { // this.variable = 3; ...
[ "public", "static", "Matcher", "constructorPropertyDeclaration", "(", ")", "{", "return", "new", "Matcher", "(", ")", "{", "@", "Override", "public", "boolean", "matches", "(", "Node", "node", ",", "NodeMetadata", "metadata", ")", "{", "// This will match against ...
Returns a Matcher that matches against properties that are declared in the constructor.
[ "Returns", "a", "Matcher", "that", "matches", "against", "properties", "that", "are", "declared", "in", "the", "constructor", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/Matchers.java#L362-L387
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java
BigtableSession.createChannelPool
protected ManagedChannel createChannelPool(final String hostString, int count) throws IOException { """ Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers. @param hostString a {@link java.lang.String} object. @return a {@link com.google.cloud.bigtable.grpc.io.ChannelPool} obj...
java
protected ManagedChannel createChannelPool(final String hostString, int count) throws IOException { Preconditions.checkState(!options.useGCJClient(), "Channel pools cannot be created when using google-cloud-java"); ChannelPool.ChannelFactory channelFactory = new ChannelPool.ChannelFactory() { @Ove...
[ "protected", "ManagedChannel", "createChannelPool", "(", "final", "String", "hostString", ",", "int", "count", ")", "throws", "IOException", "{", "Preconditions", ".", "checkState", "(", "!", "options", ".", "useGCJClient", "(", ")", ",", "\"Channel pools cannot be ...
Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers. @param hostString a {@link java.lang.String} object. @return a {@link com.google.cloud.bigtable.grpc.io.ChannelPool} object. @throws java.io.IOException if any.
[ "Create", "a", "new", "{", "@link", "com", ".", "google", ".", "cloud", ".", "bigtable", ".", "grpc", ".", "io", ".", "ChannelPool", "}", "with", "auth", "headers", "." ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java#L499-L509
auth0/auth0-java
src/main/java/com/auth0/client/auth/AuthAPI.java
AuthAPI.revokeToken
public Request<Void> revokeToken(String refreshToken) { """ Creates a request to revoke an existing Refresh Token. <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); try { auth.revokeToken("ej2E8zNEzjrcSD2edjaE") .execute(); } cat...
java
public Request<Void> revokeToken(String refreshToken) { Asserts.assertNotNull(refreshToken, "refresh token"); String url = baseUrl .newBuilder() .addPathSegment(PATH_OAUTH) .addPathSegment(PATH_REVOKE) .build() .toString();...
[ "public", "Request", "<", "Void", ">", "revokeToken", "(", "String", "refreshToken", ")", "{", "Asserts", ".", "assertNotNull", "(", "refreshToken", ",", "\"refresh token\"", ")", ";", "String", "url", "=", "baseUrl", ".", "newBuilder", "(", ")", ".", "addPa...
Creates a request to revoke an existing Refresh Token. <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); try { auth.revokeToken("ej2E8zNEzjrcSD2edjaE") .execute(); } catch (Auth0Exception e) { //Something happened } } </pre> @param refreshT...
[ "Creates", "a", "request", "to", "revoke", "an", "existing", "Refresh", "Token", ".", "<pre", ">", "{", "@code", "AuthAPI", "auth", "=", "new", "AuthAPI", "(", "me", ".", "auth0", ".", "com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr", "-", ...
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/auth/AuthAPI.java#L438-L452
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/linear/ALMA2.java
ALMA2.setAlpha
public void setAlpha(double alpha) { """ Alpha controls the approximation of the large margin formed by ALMA, with larger values causing more updates. A value of 1.0 will update only on mistakes, while smaller values update if the error was not far enough away from the margin. <br><br> NOTE: Whenever alpha is...
java
public void setAlpha(double alpha) { if(alpha <= 0 || alpha > 1 || Double.isNaN(alpha)) throw new ArithmeticException("alpha must be in (0, 1], not " + alpha); this.alpha = alpha; setB(1.0/alpha); }
[ "public", "void", "setAlpha", "(", "double", "alpha", ")", "{", "if", "(", "alpha", "<=", "0", "||", "alpha", ">", "1", "||", "Double", ".", "isNaN", "(", "alpha", ")", ")", "throw", "new", "ArithmeticException", "(", "\"alpha must be in (0, 1], not \"", "...
Alpha controls the approximation of the large margin formed by ALMA, with larger values causing more updates. A value of 1.0 will update only on mistakes, while smaller values update if the error was not far enough away from the margin. <br><br> NOTE: Whenever alpha is set, the value of {@link #setB(double) B} will als...
[ "Alpha", "controls", "the", "approximation", "of", "the", "large", "margin", "formed", "by", "ALMA", "with", "larger", "values", "causing", "more", "updates", ".", "A", "value", "of", "1", ".", "0", "will", "update", "only", "on", "mistakes", "while", "sma...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/ALMA2.java#L94-L100
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java
FeatureTiles.drawTileQueryAll
public BufferedImage drawTileQueryAll(int x, int y, int zoom) { """ Draw a tile image from the x, y, and zoom level by querying all features. This could be very slow if there are a lot of features @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null """ B...
java
public BufferedImage drawTileQueryAll(int x, int y, int zoom) { BoundingBox boundingBox = TileBoundingBoxUtils .getWebMercatorBoundingBox(x, y, zoom); BufferedImage image = null; // Query for all features FeatureResultSet resultSet = featureDao.queryForAll(); try { int totalCount = resultSet.getCo...
[ "public", "BufferedImage", "drawTileQueryAll", "(", "int", "x", ",", "int", "y", ",", "int", "zoom", ")", "{", "BoundingBox", "boundingBox", "=", "TileBoundingBoxUtils", ".", "getWebMercatorBoundingBox", "(", "x", ",", "y", ",", "zoom", ")", ";", "BufferedImag...
Draw a tile image from the x, y, and zoom level by querying all features. This could be very slow if there are a lot of features @param x x coordinate @param y y coordinate @param zoom zoom level @return drawn image, or null
[ "Draw", "a", "tile", "image", "from", "the", "x", "y", "and", "zoom", "level", "by", "querying", "all", "features", ".", "This", "could", "be", "very", "slow", "if", "there", "are", "a", "lot", "of", "features" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java#L1193-L1229
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/StatsConfigHelper.java
StatsConfigHelper.getNlsKey
private static final String getNlsKey(String resourceBundle, Locale locale) { """ 234782 - JPM: Create key for NLS based on resource bundle name and locale """ return new StringBuffer(resourceBundle).append("#").append(locale.toString()).toString(); }
java
private static final String getNlsKey(String resourceBundle, Locale locale) { return new StringBuffer(resourceBundle).append("#").append(locale.toString()).toString(); }
[ "private", "static", "final", "String", "getNlsKey", "(", "String", "resourceBundle", ",", "Locale", "locale", ")", "{", "return", "new", "StringBuffer", "(", "resourceBundle", ")", ".", "append", "(", "\"#\"", ")", ".", "append", "(", "locale", ".", "toStri...
234782 - JPM: Create key for NLS based on resource bundle name and locale
[ "234782", "-", "JPM", ":", "Create", "key", "for", "NLS", "based", "on", "resource", "bundle", "name", "and", "locale" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/StatsConfigHelper.java#L48-L50
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java
Section508Compliance.processNullLayouts
private void processNullLayouts(String className, String methodName) { """ looks for containers where a null layout is installed @param className class that a method call is made on @param methodName name of the method that is called """ if ("java/awt/Container".equals(className) && "setLayout".e...
java
private void processNullLayouts(String className, String methodName) { if ("java/awt/Container".equals(className) && "setLayout".equals(methodName) && (stack.getStackDepth() > 0) && stack.getStackItem(0).isNull()) { bugReporter.reportBug(new BugInstance(this, BugType.S508C_NULL_LAYOUT.name(), NORMAL...
[ "private", "void", "processNullLayouts", "(", "String", "className", ",", "String", "methodName", ")", "{", "if", "(", "\"java/awt/Container\"", ".", "equals", "(", "className", ")", "&&", "\"setLayout\"", ".", "equals", "(", "methodName", ")", "&&", "(", "sta...
looks for containers where a null layout is installed @param className class that a method call is made on @param methodName name of the method that is called
[ "looks", "for", "containers", "where", "a", "null", "layout", "is", "installed" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/Section508Compliance.java#L367-L371
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java
TrustedIdProvidersInner.listByAccountAsync
public Observable<Page<TrustedIdProviderInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { """ Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group. @param accountName...
java
public Observable<Page<TrustedIdProviderInner>> listByAccountAsync(final String resourceGroupName, final String accountName) { return listByAccountWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<TrustedIdProviderInner>>, Page<TrustedIdProviderInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "TrustedIdProviderInner", ">", ">", "listByAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listByAccountWithServiceResponseAsync", "(", "resourceGroupName", ...
Lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable ...
[ "Lists", "the", "Data", "Lake", "Store", "trusted", "identity", "providers", "within", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java#L142-L150
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isBetweenExclusive
public static BigDecimal isBetweenExclusive (final BigDecimal aValue, final String sName, @Nonnull final BigDecimal aLowerBoundExclusive, @Nonnull final BigDecimal aUpperBoundExcl...
java
public static BigDecimal isBetweenExclusive (final BigDecimal aValue, final String sName, @Nonnull final BigDecimal aLowerBoundExclusive, @Nonnull final BigDecimal aUpperBoundExcl...
[ "public", "static", "BigDecimal", "isBetweenExclusive", "(", "final", "BigDecimal", "aValue", ",", "final", "String", "sName", ",", "@", "Nonnull", "final", "BigDecimal", "aLowerBoundExclusive", ",", "@", "Nonnull", "final", "BigDecimal", "aUpperBoundExclusive", ")", ...
Check if <code>nValue &gt; nLowerBoundInclusive &amp;&amp; nValue &lt; nUpperBoundInclusive</code> @param aValue Value @param sName Name @param aLowerBoundExclusive Lower bound @param aUpperBoundExclusive Upper bound @return The value
[ "Check", "if", "<code", ">", "nValue", "&gt", ";", "nLowerBoundInclusive", "&amp", ";", "&amp", ";", "nValue", "&lt", ";", "nUpperBoundInclusive<", "/", "code", ">" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L2955-L2963
apereo/cas
support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlRegisteredServiceServiceProviderMetadataFacade.java
SamlRegisteredServiceServiceProviderMetadataFacade.get
public static Optional<SamlRegisteredServiceServiceProviderMetadataFacade> get(final SamlRegisteredServiceCachingMetadataResolver resolver, final SamlRegisteredService registeredService, ...
java
public static Optional<SamlRegisteredServiceServiceProviderMetadataFacade> get(final SamlRegisteredServiceCachingMetadataResolver resolver, final SamlRegisteredService registeredService, ...
[ "public", "static", "Optional", "<", "SamlRegisteredServiceServiceProviderMetadataFacade", ">", "get", "(", "final", "SamlRegisteredServiceCachingMetadataResolver", "resolver", ",", "final", "SamlRegisteredService", "registeredService", ",", "final", "String", "entityID", ")", ...
Adapt saml metadata and parse. Acts as a facade. @param resolver the resolver @param registeredService the service @param entityID the entity id @return the saml metadata adaptor
[ "Adapt", "saml", "metadata", "and", "parse", ".", "Acts", "as", "a", "facade", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlRegisteredServiceServiceProviderMetadataFacade.java#L65-L69
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getSummaryTableHeader
public Content getSummaryTableHeader(List<String> header, String scope) { """ Get summary table header. @param header the header for the table @param scope the scope of the headers @return a content tree for the header """ Content tr = new HtmlTree(HtmlTag.TR); final int size = header.size...
java
public Content getSummaryTableHeader(List<String> header, String scope) { Content tr = new HtmlTree(HtmlTag.TR); final int size = header.size(); Content tableHeader; if (size == 2) { tableHeader = new StringContent(header.get(0)); tr.addContent(HtmlTree.TH(HtmlSty...
[ "public", "Content", "getSummaryTableHeader", "(", "List", "<", "String", ">", "header", ",", "String", "scope", ")", "{", "Content", "tr", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "TR", ")", ";", "final", "int", "size", "=", "header", ".", "size", ...
Get summary table header. @param header the header for the table @param scope the scope of the headers @return a content tree for the header
[ "Get", "summary", "table", "header", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L948-L971
keenlabs/KeenClient-Java
query/src/main/java/io/keen/client/java/KeenQueryClient.java
KeenQueryClient.selectUnique
public QueryResult selectUnique(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { """ Select Unique query with only the required arguments. Query API info here: https://keen.io/docs/api/#select-unique @param eventCollection The name of the event collection you are ana...
java
public QueryResult selectUnique(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.SELECT_UNIQUE) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) .withT...
[ "public", "QueryResult", "selectUnique", "(", "String", "eventCollection", ",", "String", "targetProperty", ",", "Timeframe", "timeframe", ")", "throws", "IOException", "{", "Query", "queryParams", "=", "new", "Query", ".", "Builder", "(", "QueryType", ".", "SELEC...
Select Unique query with only the required arguments. Query API info here: https://keen.io/docs/api/#select-unique @param eventCollection The name of the event collection you are analyzing. @param targetProperty The name of the property you are analyzing. @param timeframe The {@link RelativeTimeframe} or {...
[ "Select", "Unique", "query", "with", "only", "the", "required", "arguments", ".", "Query", "API", "info", "here", ":", "https", ":", "//", "keen", ".", "io", "/", "docs", "/", "api", "/", "#select", "-", "unique" ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/query/src/main/java/io/keen/client/java/KeenQueryClient.java#L244-L252
citrusframework/citrus
modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java
AbstractDockerCommand.withParam
public AbstractDockerCommand withParam(String name, String value) { """ Adds command parameter to current command. @param name @param value @return """ parameters.put(name, value); return this; }
java
public AbstractDockerCommand withParam(String name, String value) { parameters.put(name, value); return this; }
[ "public", "AbstractDockerCommand", "withParam", "(", "String", "name", ",", "String", "value", ")", "{", "parameters", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds command parameter to current command. @param name @param value @return
[ "Adds", "command", "parameter", "to", "current", "command", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-docker/src/main/java/com/consol/citrus/docker/command/AbstractDockerCommand.java#L144-L147
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.saveMediaFile
private void saveMediaFile(final String name, final String contentType, final long size, final InputStream is) throws AtomException { """ Save file to website's resource directory. @param handle Weblog handle to save to @param name Name of file to save @param size Size of file to be saved @param is Read file...
java
private void saveMediaFile(final String name, final String contentType, final long size, final InputStream is) throws AtomException { final byte[] buffer = new byte[8192]; int bytesRead = 0; final File dirPath = new File(getEntryMediaPath(name)); if (!dirPath.getParentFile().exists()) ...
[ "private", "void", "saveMediaFile", "(", "final", "String", "name", ",", "final", "String", "contentType", ",", "final", "long", "size", ",", "final", "InputStream", "is", ")", "throws", "AtomException", "{", "final", "byte", "[", "]", "buffer", "=", "new", ...
Save file to website's resource directory. @param handle Weblog handle to save to @param name Name of file to save @param size Size of file to be saved @param is Read file from input stream
[ "Save", "file", "to", "website", "s", "resource", "directory", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L650-L675
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java
ChannelAction.addPermissionOverride
@CheckReturnValue public ChannelAction addPermissionOverride(IPermissionHolder target, Collection<Permission> allow, Collection<Permission> deny) { """ Adds a new Role or Member {@link net.dv8tion.jda.core.entities.PermissionOverride PermissionOverride} for the new Channel. <p>Example: <pre>{@code Role r...
java
@CheckReturnValue public ChannelAction addPermissionOverride(IPermissionHolder target, Collection<Permission> allow, Collection<Permission> deny) { checkPermissions(allow); checkPermissions(deny); final long allowRaw = allow != null ? Permission.getRaw(allow) : 0; final long deny...
[ "@", "CheckReturnValue", "public", "ChannelAction", "addPermissionOverride", "(", "IPermissionHolder", "target", ",", "Collection", "<", "Permission", ">", "allow", ",", "Collection", "<", "Permission", ">", "deny", ")", "{", "checkPermissions", "(", "allow", ")", ...
Adds a new Role or Member {@link net.dv8tion.jda.core.entities.PermissionOverride PermissionOverride} for the new Channel. <p>Example: <pre>{@code Role role = guild.getPublicRole(); EnumSet<Permission> allow = EnumSet.of(Permission.MESSAGE_READ); EnumSet<Permission> deny = EnumSet.of(Permission.MESSAGE_WRITE); channel...
[ "Adds", "a", "new", "Role", "or", "Member", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "entities", ".", "PermissionOverride", "PermissionOverride", "}", "for", "the", "new", "Channel", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/ChannelAction.java#L255-L264
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java
CryptoHelper.verifySignatureFor
boolean verifySignatureFor(String algorithm, byte[] secretBytes, String header, String payload, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException { """ Verify signature for JWT header and payload. @param algorithm algorithm name. @param secretBytes algorithm secret. @param header JWT...
java
boolean verifySignatureFor(String algorithm, byte[] secretBytes, String header, String payload, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException { return verifySignatureFor(algorithm, secretBytes, header.getBytes(StandardCharsets.UTF_8), payload.getBytes(StandardCharsets.UTF_8), signa...
[ "boolean", "verifySignatureFor", "(", "String", "algorithm", ",", "byte", "[", "]", "secretBytes", ",", "String", "header", ",", "String", "payload", ",", "byte", "[", "]", "signatureBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", "{...
Verify signature for JWT header and payload. @param algorithm algorithm name. @param secretBytes algorithm secret. @param header JWT header. @param payload JWT payload. @param signatureBytes JWT signature. @return true if signature is valid. @throws NoSuchAlgorithmException if the algorithm is not supported. @throws I...
[ "Verify", "signature", "for", "JWT", "header", "and", "payload", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java#L26-L28
openengsb/openengsb
components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/AbstractEDBService.java
AbstractEDBService.persistCommitChanges
private void persistCommitChanges(JPACommit commit, Long timestamp) { """ Add all the changes which are done through the given commit object to the entity manager. """ commit.setTimestamp(timestamp); addModifiedObjectsToEntityManager(commit.getJPAObjects(), timestamp); commit.setCommitt...
java
private void persistCommitChanges(JPACommit commit, Long timestamp) { commit.setTimestamp(timestamp); addModifiedObjectsToEntityManager(commit.getJPAObjects(), timestamp); commit.setCommitted(true); logger.debug("persisting JPACommit"); entityManager.persist(commit); logg...
[ "private", "void", "persistCommitChanges", "(", "JPACommit", "commit", ",", "Long", "timestamp", ")", "{", "commit", ".", "setTimestamp", "(", "timestamp", ")", ";", "addModifiedObjectsToEntityManager", "(", "commit", ".", "getJPAObjects", "(", ")", ",", "timestam...
Add all the changes which are done through the given commit object to the entity manager.
[ "Add", "all", "the", "changes", "which", "are", "done", "through", "the", "given", "commit", "object", "to", "the", "entity", "manager", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/AbstractEDBService.java#L112-L120
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/ConfigurationsInner.java
ConfigurationsInner.beginUpdateAsync
public Observable<Void> beginUpdateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) { """ Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. @param resourceGroup...
java
public Observable<Void> beginUpdateAsync(String resourceGroupName, String clusterName, String configurationName, Map<String, String> parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, configurationName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { ...
[ "public", "Observable", "<", "Void", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "configurationName", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "return", "beginUpdateWithSer...
Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param configurationName The name of the cluster configuration. @param parame...
[ "Configures", "the", "HTTP", "settings", "on", "the", "specified", "cluster", ".", "This", "API", "is", "deprecated", "please", "use", "UpdateGatewaySettings", "in", "cluster", "endpoint", "instead", "." ]
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/ConfigurationsInner.java#L285-L292
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/BaseAsset.java
BaseAsset.createLink
public Link createLink(String name, String url, boolean onMenu) { """ Create a link that belongs to this asset. @param name The name of the link. @param url The url of the link. @param onMenu True if the link is visible on this asset's detail page menu. @return created Link. """ return getI...
java
public Link createLink(String name, String url, boolean onMenu) { return getInstance().create().link(name, this, url, onMenu); }
[ "public", "Link", "createLink", "(", "String", "name", ",", "String", "url", ",", "boolean", "onMenu", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "link", "(", "name", ",", "this", ",", "url", ",", "onMenu", ")", ";", ...
Create a link that belongs to this asset. @param name The name of the link. @param url The url of the link. @param onMenu True if the link is visible on this asset's detail page menu. @return created Link.
[ "Create", "a", "link", "that", "belongs", "to", "this", "asset", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/BaseAsset.java#L213-L215
apereo/cas
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DelegatedClientAuthenticationAction.java
DelegatedClientAuthenticationAction.buildProviderConfiguration
protected Optional<ProviderLoginPageConfiguration> buildProviderConfiguration(final IndirectClient client, final WebContext webContext, final WebApplicationService service) { """ Build provider configuration optional. @param clien...
java
protected Optional<ProviderLoginPageConfiguration> buildProviderConfiguration(final IndirectClient client, final WebContext webContext, final WebApplicationService service) { val name = client.getName(); val matcher = PAC4...
[ "protected", "Optional", "<", "ProviderLoginPageConfiguration", ">", "buildProviderConfiguration", "(", "final", "IndirectClient", "client", ",", "final", "WebContext", "webContext", ",", "final", "WebApplicationService", "service", ")", "{", "val", "name", "=", "client...
Build provider configuration optional. @param client the client @param webContext the web context @param service the service @return the optional
[ "Build", "provider", "configuration", "optional", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DelegatedClientAuthenticationAction.java#L348-L381
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java
SSOCookieHelperImpl.getJwtSsoTokenFromCookies
@Override public String getJwtSsoTokenFromCookies(HttpServletRequest req, String baseName) { """ The token can be split across multiple cookies if it is over 3900 chars. Look for subsequent cookies and concatenate them in that case. The counterpart for this method is SSOCookieHelperImpl.addJwtSsoCookiesToRes...
java
@Override public String getJwtSsoTokenFromCookies(HttpServletRequest req, String baseName) { StringBuffer tokenStr = new StringBuffer(); String cookieName = baseName; for (int i = 1; i <= 99; i++) { if (i > 1) { cookieName = baseName + (i < 10 ? "0" : "") + i; //...
[ "@", "Override", "public", "String", "getJwtSsoTokenFromCookies", "(", "HttpServletRequest", "req", ",", "String", "baseName", ")", "{", "StringBuffer", "tokenStr", "=", "new", "StringBuffer", "(", ")", ";", "String", "cookieName", "=", "baseName", ";", "for", "...
The token can be split across multiple cookies if it is over 3900 chars. Look for subsequent cookies and concatenate them in that case. The counterpart for this method is SSOCookieHelperImpl.addJwtSsoCookiesToResponse. @param req @return the token String or null if nothing found.
[ "The", "token", "can", "be", "split", "across", "multiple", "cookies", "if", "it", "is", "over", "3900", "chars", ".", "Look", "for", "subsequent", "cookies", "and", "concatenate", "them", "in", "that", "case", ".", "The", "counterpart", "for", "this", "me...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/SSOCookieHelperImpl.java#L519-L537
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/utils/FastDateFormat.java
FastDateFormat.getDateTimeInstance
public static FastDateFormat getDateTimeInstance( int dateStyle, int timeStyle, TimeZone timeZone) { """ <p>Gets a date/time formatter instance using the specified style and time zone in the default locale.</p> @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time styl...
java
public static FastDateFormat getDateTimeInstance( int dateStyle, int timeStyle, TimeZone timeZone) { return getDateTimeInstance(dateStyle, timeStyle, timeZone, null); }
[ "public", "static", "FastDateFormat", "getDateTimeInstance", "(", "int", "dateStyle", ",", "int", "timeStyle", ",", "TimeZone", "timeZone", ")", "{", "return", "getDateTimeInstance", "(", "dateStyle", ",", "timeStyle", ",", "timeZone", ",", "null", ")", ";", "}"...
<p>Gets a date/time formatter instance using the specified style and time zone in the default locale.</p> @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT @param timeZone optional time zone, overrides time zone of formatted date @return a localized ...
[ "<p", ">", "Gets", "a", "date", "/", "time", "formatter", "instance", "using", "the", "specified", "style", "and", "time", "zone", "in", "the", "default", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/utils/FastDateFormat.java#L441-L444
audit4j/audit4j-core
src/main/java/org/audit4j/core/util/AuditUtil.java
AuditUtil.timeStampToString
public static String timeStampToString(final Timestamp timestamp, final String format) { """ Time stamp to string. @param timestamp the timestamp @param format the format @return the string """ return dateToString(new Date(timestamp.getTime()), format); }
java
public static String timeStampToString(final Timestamp timestamp, final String format) { return dateToString(new Date(timestamp.getTime()), format); }
[ "public", "static", "String", "timeStampToString", "(", "final", "Timestamp", "timestamp", ",", "final", "String", "format", ")", "{", "return", "dateToString", "(", "new", "Date", "(", "timestamp", ".", "getTime", "(", ")", ")", ",", "format", ")", ";", "...
Time stamp to string. @param timestamp the timestamp @param format the format @return the string
[ "Time", "stamp", "to", "string", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/util/AuditUtil.java#L111-L113
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.handleInvocationTargetException
@SuppressWarnings("static-method") protected void handleInvocationTargetException(Throwable targetException, Context context) { """ Handle an exception. @param targetException the exception. @param context the context. """ // ignore NullPointerException, as not having to check for NPEs all the time is a...
java
@SuppressWarnings("static-method") protected void handleInvocationTargetException(Throwable targetException, Context context) { // ignore NullPointerException, as not having to check for NPEs all the time is a convenience feature if (!(targetException instanceof NullPointerException)) { Exceptions.throwUnchecke...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "void", "handleInvocationTargetException", "(", "Throwable", "targetException", ",", "Context", "context", ")", "{", "// ignore NullPointerException, as not having to check for NPEs all the time is a convenience fea...
Handle an exception. @param targetException the exception. @param context the context.
[ "Handle", "an", "exception", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L488-L494
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java
GoogleCloudStorageImpl.getDeletionCallback
private JsonBatchCallback<Void> getDeletionCallback( final StorageResourceId resourceId, final KeySetView<IOException, Boolean> innerExceptions, final BatchHelper batchHelper, final int attempt, final long generation) { """ Helper to create a callback for a particular deletion request...
java
private JsonBatchCallback<Void> getDeletionCallback( final StorageResourceId resourceId, final KeySetView<IOException, Boolean> innerExceptions, final BatchHelper batchHelper, final int attempt, final long generation) { return new JsonBatchCallback<Void>() { @Override publi...
[ "private", "JsonBatchCallback", "<", "Void", ">", "getDeletionCallback", "(", "final", "StorageResourceId", "resourceId", ",", "final", "KeySetView", "<", "IOException", ",", "Boolean", ">", "innerExceptions", ",", "final", "BatchHelper", "batchHelper", ",", "final", ...
Helper to create a callback for a particular deletion request.
[ "Helper", "to", "create", "a", "callback", "for", "a", "particular", "deletion", "request", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java#L691-L727
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java
MsgDestEncodingUtilsImpl.setDestinationProperty
final static void setDestinationProperty(JmsDestination dest, String longName, Object longValue) throws JMSException { """ /* setDestinationProperty Utility method which the MQRequestReplyUtilsImpl and URIDestinationCreater classes use to sep properties onto a destination object given the name of the property a...
java
final static void setDestinationProperty(JmsDestination dest, String longName, Object longValue) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setDestinationProperty", new Object[]{dest, longName, longValue}); // Let's hope the property is one we know a...
[ "final", "static", "void", "setDestinationProperty", "(", "JmsDestination", "dest", ",", "String", "longName", ",", "Object", "longValue", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "is...
/* setDestinationProperty Utility method which the MQRequestReplyUtilsImpl and URIDestinationCreater classes use to sep properties onto a destination object given the name of the property and the value to be set. FRP & RRP are ignored by this method, as they are always set separately. @param dest The ...
[ "/", "*", "setDestinationProperty", "Utility", "method", "which", "the", "MQRequestReplyUtilsImpl", "and", "URIDestinationCreater", "classes", "use", "to", "sep", "properties", "onto", "a", "destination", "object", "given", "the", "name", "of", "the", "property", "a...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L365-L400
treasure-data/td-client-java
src/main/java/com/treasuredata/client/TDClient.java
TDClient.withApiKey
@Override public TDClient withApiKey(String newApiKey) { """ Create a new TDClient that uses the given api key for the authentication. The new instance of TDClient shares the same HttpClient, so closing this will invalidate the other copy of TDClient instances @param newApiKey @return """ retu...
java
@Override public TDClient withApiKey(String newApiKey) { return new TDClient(config, httpClient, Optional.of(newApiKey)); }
[ "@", "Override", "public", "TDClient", "withApiKey", "(", "String", "newApiKey", ")", "{", "return", "new", "TDClient", "(", "config", ",", "httpClient", ",", "Optional", ".", "of", "(", "newApiKey", ")", ")", ";", "}" ]
Create a new TDClient that uses the given api key for the authentication. The new instance of TDClient shares the same HttpClient, so closing this will invalidate the other copy of TDClient instances @param newApiKey @return
[ "Create", "a", "new", "TDClient", "that", "uses", "the", "given", "api", "key", "for", "the", "authentication", ".", "The", "new", "instance", "of", "TDClient", "shares", "the", "same", "HttpClient", "so", "closing", "this", "will", "invalidate", "the", "oth...
train
https://github.com/treasure-data/td-client-java/blob/2769cbcf0e787d457344422cfcdde467399bd684/src/main/java/com/treasuredata/client/TDClient.java#L143-L147
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/security/access/entity/UserGroupPermissionEvaluator.java
UserGroupPermissionEvaluator.hasPermission
@Override public boolean hasPermission(User user, E userGroup, Permission permission) { """ Grants READ permission on groups where the user is a member. Uses default implementation otherwise. """ // always grant READ access to groups in which the user itself is a member if (user != null &...
java
@Override public boolean hasPermission(User user, E userGroup, Permission permission) { // always grant READ access to groups in which the user itself is a member if (user != null && permission.equals(Permission.READ) && userGroup.getMembers().contains(user)) { LOG.trace("Gr...
[ "@", "Override", "public", "boolean", "hasPermission", "(", "User", "user", ",", "E", "userGroup", ",", "Permission", "permission", ")", "{", "// always grant READ access to groups in which the user itself is a member", "if", "(", "user", "!=", "null", "&&", "permission...
Grants READ permission on groups where the user is a member. Uses default implementation otherwise.
[ "Grants", "READ", "permission", "on", "groups", "where", "the", "user", "is", "a", "member", ".", "Uses", "default", "implementation", "otherwise", "." ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/security/access/entity/UserGroupPermissionEvaluator.java#L34-L46
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XListLiteral literal, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param literal the list literal. @param it the target for the generated content. @param context the context. @return the literal. """ appendReturnIfExpectedRetu...
java
protected XExpression _generate(XListLiteral literal, IAppendable it, IExtraLanguageGeneratorContext context) { appendReturnIfExpectedReturnedExpression(it, context); it.append("["); //$NON-NLS-1$ boolean first = true; for (final XExpression value : literal.getElements()) { if (first) { first = false; ...
[ "protected", "XExpression", "_generate", "(", "XListLiteral", "literal", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "appendReturnIfExpectedReturnedExpression", "(", "it", ",", "context", ")", ";", "it", ".", "append", "(", ...
Generate the given object. @param literal the list literal. @param it the target for the generated content. @param context the context. @return the literal.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L699-L713
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_boot_GET
public ArrayList<Long> serviceName_boot_GET(String serviceName, OvhBootTypeEnum bootType) throws IOException { """ Server compatibles netboots REST: GET /dedicated/server/{serviceName}/boot @param bootType [required] Filter the value of bootType property (=) @param serviceName [required] The internal name of ...
java
public ArrayList<Long> serviceName_boot_GET(String serviceName, OvhBootTypeEnum bootType) throws IOException { String qPath = "/dedicated/server/{serviceName}/boot"; StringBuilder sb = path(qPath, serviceName); query(sb, "bootType", bootType); String resp = exec(qPath, "GET", sb.toString(), null); return conv...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_boot_GET", "(", "String", "serviceName", ",", "OvhBootTypeEnum", "bootType", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/boot\"", ";", "StringBuilder", "sb", "=", "...
Server compatibles netboots REST: GET /dedicated/server/{serviceName}/boot @param bootType [required] Filter the value of bootType property (=) @param serviceName [required] The internal name of your dedicated server
[ "Server", "compatibles", "netboots" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1784-L1790
datastax/java-driver
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/parsing/TableParser.java
TableParser.buildLegacyIndex
private IndexMetadata buildLegacyIndex(RawColumn raw, ColumnMetadata column) { """ In C*<=2.2, index information is stored alongside the column. """ if (raw.indexName == null) { return null; } return new DefaultIndexMetadata( column.getKeyspace(), column.getParent(), C...
java
private IndexMetadata buildLegacyIndex(RawColumn raw, ColumnMetadata column) { if (raw.indexName == null) { return null; } return new DefaultIndexMetadata( column.getKeyspace(), column.getParent(), CqlIdentifier.fromInternal(raw.indexName), IndexKind.valueOf(raw.indexTy...
[ "private", "IndexMetadata", "buildLegacyIndex", "(", "RawColumn", "raw", ",", "ColumnMetadata", "column", ")", "{", "if", "(", "raw", ".", "indexName", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "DefaultIndexMetadata", "(", "column", ...
In C*<=2.2, index information is stored alongside the column.
[ "In", "C", "*", "<", "=", "2", ".", "2", "index", "information", "is", "stored", "alongside", "the", "column", "." ]
train
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/schema/parsing/TableParser.java#L288-L299
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.writePropertyObject
public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException { """ Writes a property for a specified resource.<p> @param resourcename the name of resource with complete path @param property the property to write @throws CmsException if something goes wrong """ ...
java
public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).writePropertyObject(this, m_securityManager, resource, property); }
[ "public", "void", "writePropertyObject", "(", "String", "resourcename", ",", "CmsProperty", "property", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "readResource", "(", "resourcename", ",", "CmsResourceFilter", ".", "IGNORE_EXPIRATION", ")", ";...
Writes a property for a specified resource.<p> @param resourcename the name of resource with complete path @param property the property to write @throws CmsException if something goes wrong
[ "Writes", "a", "property", "for", "a", "specified", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L4068-L4072
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java
Neighbours.removeTopicSpaceReference
void removeTopicSpaceReference( SIBUuid8 neighbourUuid, MESubscription subscription, SIBUuid12 topicSpace, String topic) { """ Removes the topic space reference for the given ME on the given topic. @param neighbourUuid the uuid of the remote ME @param subscription The subscription object repre...
java
void removeTopicSpaceReference( SIBUuid8 neighbourUuid, MESubscription subscription, SIBUuid12 topicSpace, String topic) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "removeTopicSpaceReference", new Object[] { neighbourUuid, subs...
[ "void", "removeTopicSpaceReference", "(", "SIBUuid8", "neighbourUuid", ",", "MESubscription", "subscription", ",", "SIBUuid12", "topicSpace", ",", "String", "topic", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isE...
Removes the topic space reference for the given ME on the given topic. @param neighbourUuid the uuid of the remote ME @param subscription The subscription object representing this proxy @param topicSpace the name of the topic space destination @param topic The topic registered.
[ "Removes", "the", "topic", "space", "reference", "for", "the", "given", "ME", "on", "the", "given", "topic", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbours.java#L282-L322
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java
ChatRoomClient.updateChatRoomInfo
public ResponseWrapper updateChatRoomInfo(long roomId, String ownerUsername, String name, String desc) throws APIConnectionException, APIRequestException { """ Update chat room info @param roomId room id @param ownerUsername owner username @param name new chat room name @param des...
java
public ResponseWrapper updateChatRoomInfo(long roomId, String ownerUsername, String name, String desc) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(roomId > 0, "room id is invalid"); StringUtils.checkUsername(ownerUsername); Preconditions.checkArgu...
[ "public", "ResponseWrapper", "updateChatRoomInfo", "(", "long", "roomId", ",", "String", "ownerUsername", ",", "String", "name", ",", "String", "desc", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "("...
Update chat room info @param roomId room id @param ownerUsername owner username @param name new chat room name @param desc chat room description @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Update", "chat", "room", "info" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java#L118-L129
codegist/crest
core/src/main/java/org/codegist/crest/CRestBuilder.java
CRestBuilder.deserializeXmlWith
public CRestBuilder deserializeXmlWith(Class<? extends Deserializer> deserializer, Map<String, Object> config) { """ <p>Overrides the default {@link org.codegist.crest.serializer.jaxb.JaxbDeserializer} XML deserializer with the given one</p> <p>By default, <b>CRest</b> will use this deserializer for the following...
java
public CRestBuilder deserializeXmlWith(Class<? extends Deserializer> deserializer, Map<String, Object> config) { this.xmlDeserializer = deserializer; this.xmlDeserializerConfig.clear(); this.xmlDeserializerConfig.putAll(config); return this; }
[ "public", "CRestBuilder", "deserializeXmlWith", "(", "Class", "<", "?", "extends", "Deserializer", ">", "deserializer", ",", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "this", ".", "xmlDeserializer", "=", "deserializer", ";", "this", ".", ...
<p>Overrides the default {@link org.codegist.crest.serializer.jaxb.JaxbDeserializer} XML deserializer with the given one</p> <p>By default, <b>CRest</b> will use this deserializer for the following response Content-Type:</p> <ul> <li>application/xml</li> <li>text/xml</li> </ul> @param deserializer deserializer to use f...
[ "<p", ">", "Overrides", "the", "default", "{" ]
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/CRestBuilder.java#L757-L762
looly/hutool
hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java
SqlConnRunner.insert
public int insert(Connection conn, Entity record) throws SQLException { """ 插入数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @return 插入行数 @throws SQLException SQL执行异常 """ checkConn(conn); if(CollectionUtil.isEmpty(record)){ throw new SQLException("Empty entity provided!"); } P...
java
public int insert(Connection conn, Entity record) throws SQLException { checkConn(conn); if(CollectionUtil.isEmpty(record)){ throw new SQLException("Empty entity provided!"); } PreparedStatement ps = null; try { ps = dialect.psForInsert(conn, record); return ps.executeUpdate(); } catch (SQ...
[ "public", "int", "insert", "(", "Connection", "conn", ",", "Entity", "record", ")", "throws", "SQLException", "{", "checkConn", "(", "conn", ")", ";", "if", "(", "CollectionUtil", ".", "isEmpty", "(", "record", ")", ")", "{", "throw", "new", "SQLException"...
插入数据<br> 此方法不会关闭Connection @param conn 数据库连接 @param record 记录 @return 插入行数 @throws SQLException SQL执行异常
[ "插入数据<br", ">", "此方法不会关闭Connection" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L95-L109
gallandarakhneorg/afc
core/text/src/main/java/org/arakhne/afc/text/TextUtil.java
TextUtil.equalsIgnoreCase
@Pure public static boolean equalsIgnoreCase(String firstText, String secondText, boolean isNullEmptyEquivalence) { """ Enforced version of the equality test on two strings with case ignoring. This enforced version supported <code>null</code> values given as parameters. @param firstText first text. @param s...
java
@Pure public static boolean equalsIgnoreCase(String firstText, String secondText, boolean isNullEmptyEquivalence) { final String aa = (firstText != null || !isNullEmptyEquivalence) ? firstText : ""; //$NON-NLS-1$ final String bb = (secondText != null || !isNullEmptyEquivalence) ? secondText : ""; //$NON-NLS-1$ i...
[ "@", "Pure", "public", "static", "boolean", "equalsIgnoreCase", "(", "String", "firstText", ",", "String", "secondText", ",", "boolean", "isNullEmptyEquivalence", ")", "{", "final", "String", "aa", "=", "(", "firstText", "!=", "null", "||", "!", "isNullEmptyEqui...
Enforced version of the equality test on two strings with case ignoring. This enforced version supported <code>null</code> values given as parameters. @param firstText first text. @param secondText second text. @param isNullEmptyEquivalence indicates if the <code>null</code> value is assimilated to the empty string. @...
[ "Enforced", "version", "of", "the", "equality", "test", "on", "two", "strings", "with", "case", "ignoring", ".", "This", "enforced", "version", "supported", "<code", ">", "null<", "/", "code", ">", "values", "given", "as", "parameters", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L78-L89
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernel.java
FactoryKernel.random2D_F32
public static Kernel2D_F32 random2D_F32(int width , int offset, float min, float max, Random rand) { """ Creates a random 2D kernel drawn from a uniform distribution. @param width Kernel's width. @param offset Offset for element zero in the kernel @param min minimum value. @param max maximum value. @param r...
java
public static Kernel2D_F32 random2D_F32(int width , int offset, float min, float max, Random rand) { Kernel2D_F32 ret = new Kernel2D_F32(width,offset); float range = max - min; for (int i = 0; i < ret.data.length; i++) { ret.data[i] = rand.nextFloat() * range + min; } return ret; }
[ "public", "static", "Kernel2D_F32", "random2D_F32", "(", "int", "width", ",", "int", "offset", ",", "float", "min", ",", "float", "max", ",", "Random", "rand", ")", "{", "Kernel2D_F32", "ret", "=", "new", "Kernel2D_F32", "(", "width", ",", "offset", ")", ...
Creates a random 2D kernel drawn from a uniform distribution. @param width Kernel's width. @param offset Offset for element zero in the kernel @param min minimum value. @param max maximum value. @param rand Random number generator. @return Randomized kernel.
[ "Creates", "a", "random", "2D", "kernel", "drawn", "from", "a", "uniform", "distribution", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernel.java#L298-L307
camunda/camunda-bpm-mockito
src/main/java/org/camunda/bpm/extension/mockito/process/CallActivityMock.java
CallActivityMock.onExecutionDo
public CallActivityMock onExecutionDo(final String serviceId, final Consumer<DelegateExecution> consumer) { """ On execution, the MockProcess will execute the given consumer with a DelegateExecution. @param serviceId ... the id of the mock delegate @param consumer delegate for service task @return self ""...
java
public CallActivityMock onExecutionDo(final String serviceId, final Consumer<DelegateExecution> consumer) { flowNodeBuilder = flowNodeBuilder.serviceTask(serviceId) .camundaDelegateExpression("${id}".replace("id", serviceId)); registerInstance(serviceId, (JavaDelegate) consumer::accept); return this;...
[ "public", "CallActivityMock", "onExecutionDo", "(", "final", "String", "serviceId", ",", "final", "Consumer", "<", "DelegateExecution", ">", "consumer", ")", "{", "flowNodeBuilder", "=", "flowNodeBuilder", ".", "serviceTask", "(", "serviceId", ")", ".", "camundaDele...
On execution, the MockProcess will execute the given consumer with a DelegateExecution. @param serviceId ... the id of the mock delegate @param consumer delegate for service task @return self
[ "On", "execution", "the", "MockProcess", "will", "execute", "the", "given", "consumer", "with", "a", "DelegateExecution", "." ]
train
https://github.com/camunda/camunda-bpm-mockito/blob/77b86c9710813f0bfa59b92985e126a9dad66eef/src/main/java/org/camunda/bpm/extension/mockito/process/CallActivityMock.java#L89-L95
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/watermarker/PartitionLevelWatermarker.java
PartitionLevelWatermarker.onPartitionProcessBegin
@Override public void onPartitionProcessBegin(Partition partition, long partitionProcessTime, long partitionUpdateTime) { """ Adds an expected high watermark for this {@link Partition}. Also removes any watermarks for partitions being replaced. Replace partitions are read using partition parameter {@link Abstra...
java
@Override public void onPartitionProcessBegin(Partition partition, long partitionProcessTime, long partitionUpdateTime) { Preconditions.checkNotNull(partition); Preconditions.checkNotNull(partition.getTable()); if (!this.expectedHighWatermarks.hasPartitionWatermarks(tableKey(partition.getTable()))) { ...
[ "@", "Override", "public", "void", "onPartitionProcessBegin", "(", "Partition", "partition", ",", "long", "partitionProcessTime", ",", "long", "partitionUpdateTime", ")", "{", "Preconditions", ".", "checkNotNull", "(", "partition", ")", ";", "Preconditions", ".", "c...
Adds an expected high watermark for this {@link Partition}. Also removes any watermarks for partitions being replaced. Replace partitions are read using partition parameter {@link AbstractAvroToOrcConverter#REPLACED_PARTITIONS_HIVE_METASTORE_KEY}. Uses the <code>partitionUpdateTime</code> as the high watermark for this...
[ "Adds", "an", "expected", "high", "watermark", "for", "this", "{", "@link", "Partition", "}", ".", "Also", "removes", "any", "watermarks", "for", "partitions", "being", "replaced", ".", "Replace", "partitions", "are", "read", "using", "partition", "parameter", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/watermarker/PartitionLevelWatermarker.java#L229-L254
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java
ProductVariationUrl.deleteProductVariationLocalizedDeltaPriceUrl
public static MozuUrl deleteProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String variationKey) { """ Get Resource Url for DeleteProductVariationLocalizedDeltaPrice @param currencyCode The three character ISO currency code, such as USD for US Dollars. @param productCode The uni...
java
public static MozuUrl deleteProductVariationLocalizedDeltaPriceUrl(String currencyCode, String productCode, String variationKey) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/variations/{variationKey}/localizedDeltaPrice/{currencyCode}"); formatter.formatUrl("cu...
[ "public", "static", "MozuUrl", "deleteProductVariationLocalizedDeltaPriceUrl", "(", "String", "currencyCode", ",", "String", "productCode", ",", "String", "variationKey", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/...
Get Resource Url for DeleteProductVariationLocalizedDeltaPrice @param currencyCode The three character ISO currency code, such as USD for US Dollars. @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param variationKey System-generated ke...
[ "Get", "Resource", "Url", "for", "DeleteProductVariationLocalizedDeltaPrice" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductVariationUrl.java#L265-L272
aws/aws-sdk-java
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/ResourceDetails.java
ResourceDetails.withOther
public ResourceDetails withOther(java.util.Map<String, String> other) { """ <p> The details of a resource that does not have a specific sub-field for the resource type defined. </p> @param other The details of a resource that does not have a specific sub-field for the resource type defined. @return Returns ...
java
public ResourceDetails withOther(java.util.Map<String, String> other) { setOther(other); return this; }
[ "public", "ResourceDetails", "withOther", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "other", ")", "{", "setOther", "(", "other", ")", ";", "return", "this", ";", "}" ]
<p> The details of a resource that does not have a specific sub-field for the resource type defined. </p> @param other The details of a resource that does not have a specific sub-field for the resource type defined. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "details", "of", "a", "resource", "that", "does", "not", "have", "a", "specific", "sub", "-", "field", "for", "the", "resource", "type", "defined", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/ResourceDetails.java#L257-L260
weld/core
impl/src/main/java/org/jboss/weld/util/Beans.java
Beans.containsAllQualifiers
public static boolean containsAllQualifiers(Set<QualifierInstance> requiredQualifiers, Set<QualifierInstance> qualifiers) { """ Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for annotation members are followed. @param requiredQualifiers The ...
java
public static boolean containsAllQualifiers(Set<QualifierInstance> requiredQualifiers, Set<QualifierInstance> qualifiers) { return qualifiers.containsAll(requiredQualifiers); }
[ "public", "static", "boolean", "containsAllQualifiers", "(", "Set", "<", "QualifierInstance", ">", "requiredQualifiers", ",", "Set", "<", "QualifierInstance", ">", "qualifiers", ")", "{", "return", "qualifiers", ".", "containsAll", "(", "requiredQualifiers", ")", ";...
Checks that all the qualifiers in the set requiredQualifiers are in the set of qualifiers. Qualifier equality rules for annotation members are followed. @param requiredQualifiers The required qualifiers @param qualifiers The set of qualifiers to check @return True if all matches, false otherwise
[ "Checks", "that", "all", "the", "qualifiers", "in", "the", "set", "requiredQualifiers", "are", "in", "the", "set", "of", "qualifiers", ".", "Qualifier", "equality", "rules", "for", "annotation", "members", "are", "followed", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/Beans.java#L194-L196
sebastiangraf/treetank
coremodules/core/src/main/java/org/treetank/io/IOUtils.java
IOUtils.createFolderStructure
public static boolean createFolderStructure(final File pFile, IConfigurationPath[] pPaths) throws TTIOException { """ Creating a folder structure based on a set of paths given as parameter and returning a boolean determining the success. @param pFile the root folder where the configuration should be c...
java
public static boolean createFolderStructure(final File pFile, IConfigurationPath[] pPaths) throws TTIOException { boolean returnVal = true; pFile.mkdirs(); // creation of folder structure for (IConfigurationPath paths : pPaths) { final File toCreate = new File(pFile, ...
[ "public", "static", "boolean", "createFolderStructure", "(", "final", "File", "pFile", ",", "IConfigurationPath", "[", "]", "pPaths", ")", "throws", "TTIOException", "{", "boolean", "returnVal", "=", "true", ";", "pFile", ".", "mkdirs", "(", ")", ";", "// crea...
Creating a folder structure based on a set of paths given as parameter and returning a boolean determining the success. @param pFile the root folder where the configuration should be created to. @param pPaths to be created @return true if creations was successful, false otherwise. @throws TTIOException
[ "Creating", "a", "folder", "structure", "based", "on", "a", "set", "of", "paths", "given", "as", "parameter", "and", "returning", "a", "boolean", "determining", "the", "success", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/core/src/main/java/org/treetank/io/IOUtils.java#L32-L53
Stratio/bdt
src/main/java/com/stratio/qa/assertions/SeleniumAssert.java
SeleniumAssert.assertThat
public static SeleniumAssert assertThat(CommonG commong, List<WebElement> actual) { """ Checks a selenium list of WebElements. @param commong common object that contains relevant execution info @param actual webElement used in assert @return SeleniumAssert """ return new SeleniumAssert(commong, ac...
java
public static SeleniumAssert assertThat(CommonG commong, List<WebElement> actual) { return new SeleniumAssert(commong, actual); }
[ "public", "static", "SeleniumAssert", "assertThat", "(", "CommonG", "commong", ",", "List", "<", "WebElement", ">", "actual", ")", "{", "return", "new", "SeleniumAssert", "(", "commong", ",", "actual", ")", ";", "}" ]
Checks a selenium list of WebElements. @param commong common object that contains relevant execution info @param actual webElement used in assert @return SeleniumAssert
[ "Checks", "a", "selenium", "list", "of", "WebElements", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/assertions/SeleniumAssert.java#L205-L207
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/eviction/EvictionChecker.java
EvictionChecker.toPerPartitionMaxSize
private double toPerPartitionMaxSize(int maxConfiguredSize, String mapName) { """ Calculates and returns the expected maximum size of an evicted record-store when {@link com.hazelcast.config.MaxSizeConfig.MaxSizePolicy#PER_NODE PER_NODE} max-size-policy is used. """ int memberCount = clusterService....
java
private double toPerPartitionMaxSize(int maxConfiguredSize, String mapName) { int memberCount = clusterService.getSize(DATA_MEMBER_SELECTOR); double translatedPartitionSize = (1D * maxConfiguredSize * memberCount / partitionCount); if (translatedPartitionSize < 1) { translatedPartit...
[ "private", "double", "toPerPartitionMaxSize", "(", "int", "maxConfiguredSize", ",", "String", "mapName", ")", "{", "int", "memberCount", "=", "clusterService", ".", "getSize", "(", "DATA_MEMBER_SELECTOR", ")", ";", "double", "translatedPartitionSize", "=", "(", "1D"...
Calculates and returns the expected maximum size of an evicted record-store when {@link com.hazelcast.config.MaxSizeConfig.MaxSizePolicy#PER_NODE PER_NODE} max-size-policy is used.
[ "Calculates", "and", "returns", "the", "expected", "maximum", "size", "of", "an", "evicted", "record", "-", "store", "when", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/eviction/EvictionChecker.java#L114-L124
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/ForwardCurve.java
ForwardCurve.createForwardCurveFromForwards
public static ForwardCurve createForwardCurveFromForwards(String name, double[] times, double[] givenForwards, AnalyticModelInterface model, String discountCurveName, double paymentOffset) { """ Create a forward curve from given times and given forwards with respect to an associated discount curve and payment offs...
java
public static ForwardCurve createForwardCurveFromForwards(String name, double[] times, double[] givenForwards, AnalyticModelInterface model, String discountCurveName, double paymentOffset) { ForwardCurve forwardCurve = new ForwardCurve(name, paymentOffset, InterpolationEntityForward.FORWARD, discountCurveName); fo...
[ "public", "static", "ForwardCurve", "createForwardCurveFromForwards", "(", "String", "name", ",", "double", "[", "]", "times", ",", "double", "[", "]", "givenForwards", ",", "AnalyticModelInterface", "model", ",", "String", "discountCurveName", ",", "double", "payme...
Create a forward curve from given times and given forwards with respect to an associated discount curve and payment offset. @param name The name of this curve. @param times A vector of given time points. @param givenForwards A vector of given forwards (corresponding to the given time points). @param model An analytic ...
[ "Create", "a", "forward", "curve", "from", "given", "times", "and", "given", "forwards", "with", "respect", "to", "an", "associated", "discount", "curve", "and", "payment", "offset", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/ForwardCurve.java#L289-L298
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
FastAdapter.onBindViewHolder
@Override @SuppressWarnings("unchecked") public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) { """ Binds the data to the created ViewHolder and sets the listeners to the holder.itemView Note that you should use the `onBindViewHolder(RecyclerView.ViewHolder holder, int position...
java
@Override @SuppressWarnings("unchecked") public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) { if (mLegacyBindViewMode) { if (mVerbose) { Log.v(TAG, "onBindViewHolderLegacy: " + position + "/" + holder.getItemViewType() + " isLegacy: true"); ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "onBindViewHolder", "(", "final", "RecyclerView", ".", "ViewHolder", "holder", ",", "int", "position", ")", "{", "if", "(", "mLegacyBindViewMode", ")", "{", "if", "(", "mVer...
Binds the data to the created ViewHolder and sets the listeners to the holder.itemView Note that you should use the `onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads` as it allows you to implement a more efficient adapter implementation @param holder the viewHolder we bind the data on @pa...
[ "Binds", "the", "data", "to", "the", "created", "ViewHolder", "and", "sets", "the", "listeners", "to", "the", "holder", ".", "itemView", "Note", "that", "you", "should", "use", "the", "onBindViewHolder", "(", "RecyclerView", ".", "ViewHolder", "holder", "int",...
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java#L712-L724
elki-project/elki
addons/joglvis/src/main/java/de/lmu/ifi/dbs/elki/joglvis/ShaderUtil.java
ShaderUtil.linkShaderProgram
public static int linkShaderProgram(GL2 gl, int[] shaders) throws ShaderCompilationException { """ Link multiple (compiled) shaders into one program. @param gl GL context @param shaders Shaders to link @return Program id @throws ShaderCompilationException on errors. """ int[] error = new int[1]; ...
java
public static int linkShaderProgram(GL2 gl, int[] shaders) throws ShaderCompilationException { int[] error = new int[1]; int shaderprogram = gl.glCreateProgram(); for(int shader : shaders) { gl.glAttachShader(shaderprogram, shader); } gl.glLinkProgram(shaderprogram); gl.glValidateProgram(s...
[ "public", "static", "int", "linkShaderProgram", "(", "GL2", "gl", ",", "int", "[", "]", "shaders", ")", "throws", "ShaderCompilationException", "{", "int", "[", "]", "error", "=", "new", "int", "[", "1", "]", ";", "int", "shaderprogram", "=", "gl", ".", ...
Link multiple (compiled) shaders into one program. @param gl GL context @param shaders Shaders to link @return Program id @throws ShaderCompilationException on errors.
[ "Link", "multiple", "(", "compiled", ")", "shaders", "into", "one", "program", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/joglvis/src/main/java/de/lmu/ifi/dbs/elki/joglvis/ShaderUtil.java#L91-L110
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.NTFLambert_NTFLambdaPhi
@SuppressWarnings( { """ This function convert extended France NTF Lambert coordinate to Angular NTF coordinate. @param x is the coordinate in extended France NTF Lambert @param y is the coordinate in extended France NTF Lambert @param n is the exponential of the Lambert projection. @param c is the constant ...
java
@SuppressWarnings({"checkstyle:parametername", "checkstyle:localfinalvariablename"}) private static Point2d NTFLambert_NTFLambdaPhi(double x, double y, double n, double c, double Xs, double Ys) { // Several constants from the IGN specifications //Longitude in radians of Paris (2°20'14.025" E) from Greenwich fina...
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:parametername\"", ",", "\"checkstyle:localfinalvariablename\"", "}", ")", "private", "static", "Point2d", "NTFLambert_NTFLambdaPhi", "(", "double", "x", ",", "double", "y", ",", "double", "n", ",", "double", "c", ",",...
This function convert extended France NTF Lambert coordinate to Angular NTF coordinate. @param x is the coordinate in extended France NTF Lambert @param y is the coordinate in extended France NTF Lambert @param n is the exponential of the Lambert projection. @param c is the constant of projection. @param Xs is the x c...
[ "This", "function", "convert", "extended", "France", "NTF", "Lambert", "coordinate", "to", "Angular", "NTF", "coordinate", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L941-L965
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseSwitchStatement
private Stmt parseSwitchStatement(EnclosingScope scope) { """ Parse a switch statement, which has the form: <pre> SwitchStmt ::= "switch" Expr ':' NewLine CaseStmt+ CaseStmt ::= "case" UnitExpr (',' UnitExpr)* ':' NewLine Block </pre> @see wyc.lang.Stmt.Switch @param scope The enclosing scope for th...
java
private Stmt parseSwitchStatement(EnclosingScope scope) { int start = index; match(Switch); // NOTE: expression terminated by ':' Expr condition = parseExpression(scope, true); match(Colon); int end = index; matchEndLine(); // Match case block Tuple<Stmt.Case> cases = parseCaseBlock(scope); // Done ...
[ "private", "Stmt", "parseSwitchStatement", "(", "EnclosingScope", "scope", ")", "{", "int", "start", "=", "index", ";", "match", "(", "Switch", ")", ";", "// NOTE: expression terminated by ':'", "Expr", "condition", "=", "parseExpression", "(", "scope", ",", "true...
Parse a switch statement, which has the form: <pre> SwitchStmt ::= "switch" Expr ':' NewLine CaseStmt+ CaseStmt ::= "case" UnitExpr (',' UnitExpr)* ':' NewLine Block </pre> @see wyc.lang.Stmt.Switch @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables an...
[ "Parse", "a", "switch", "statement", "which", "has", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1239-L1251
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java
TableMetadataBuilder.withPartitionKey
@TimerJ public TableMetadataBuilder withPartitionKey(String... fields) { """ Set the partition key. @param fields the fields @return the table metadata builder """ for (String field : fields) { partitionKey.add(new ColumnName(tableName, field)); } return this; ...
java
@TimerJ public TableMetadataBuilder withPartitionKey(String... fields) { for (String field : fields) { partitionKey.add(new ColumnName(tableName, field)); } return this; }
[ "@", "TimerJ", "public", "TableMetadataBuilder", "withPartitionKey", "(", "String", "...", "fields", ")", "{", "for", "(", "String", "field", ":", "fields", ")", "{", "partitionKey", ".", "add", "(", "new", "ColumnName", "(", "tableName", ",", "field", ")", ...
Set the partition key. @param fields the fields @return the table metadata builder
[ "Set", "the", "partition", "key", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L192-L200
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/NewFeatureAction.java
NewFeatureAction.execute
public boolean execute(Canvas target, Menu menu, MenuItem item) { """ Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be enabled or not. In essence, this action will be enabled if a vector-layer is selected that allows the creation of new features. ...
java
public boolean execute(Canvas target, Menu menu, MenuItem item) { Layer<?> selected = mapWidget.getMapModel().getSelectedLayer(); if (selected != null && selected instanceof VectorLayer) { VectorLayer layer = (VectorLayer) selected; if (layer.getLayerInfo().isCreatable()) { return true; } } return ...
[ "public", "boolean", "execute", "(", "Canvas", "target", ",", "Menu", "menu", ",", "MenuItem", "item", ")", "{", "Layer", "<", "?", ">", "selected", "=", "mapWidget", ".", "getMapModel", "(", ")", ".", "getSelectedLayer", "(", ")", ";", "if", "(", "sel...
Implementation of the <code>MenuItemIfFunction</code> interface. This will determine if the menu action should be enabled or not. In essence, this action will be enabled if a vector-layer is selected that allows the creation of new features.
[ "Implementation", "of", "the", "<code", ">", "MenuItemIfFunction<", "/", "code", ">", "interface", ".", "This", "will", "determine", "if", "the", "menu", "action", "should", "be", "enabled", "or", "not", ".", "In", "essence", "this", "action", "will", "be", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/NewFeatureAction.java#L89-L98