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
jhy/jsoup
src/main/java/org/jsoup/safety/Whitelist.java
Whitelist.removeEnforcedAttribute
public Whitelist removeEnforcedAttribute(String tag, String attribute) { """ Remove a previously configured enforced attribute from a tag. @param tag The tag the enforced attribute is for. @param attribute The attribute name @return this (for chaining) """ Validate.notEmpty(tag); Valid...
java
public Whitelist removeEnforcedAttribute(String tag, String attribute) { Validate.notEmpty(tag); Validate.notEmpty(attribute); TagName tagName = TagName.valueOf(tag); if(tagNames.contains(tagName) && enforcedAttributes.containsKey(tagName)) { AttributeKey attrKey = Attribute...
[ "public", "Whitelist", "removeEnforcedAttribute", "(", "String", "tag", ",", "String", "attribute", ")", "{", "Validate", ".", "notEmpty", "(", "tag", ")", ";", "Validate", ".", "notEmpty", "(", "attribute", ")", ";", "TagName", "tagName", "=", "TagName", "....
Remove a previously configured enforced attribute from a tag. @param tag The tag the enforced attribute is for. @param attribute The attribute name @return this (for chaining)
[ "Remove", "a", "previously", "configured", "enforced", "attribute", "from", "a", "tag", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/safety/Whitelist.java#L358-L372
grails/grails-core
grails-encoder/src/main/groovy/org/grails/encoder/DefaultEncodingStateRegistry.java
DefaultEncodingStateRegistry.isPreviousEncoderSafeOrEqual
public static boolean isPreviousEncoderSafeOrEqual(Encoder encoderToApply, Encoder previousEncoder) { """ Checks if is previous encoder is already "safe", equal or equivalent @param encoderToApply the encoder to apply @param previousEncoder the previous encoder @return true, if previous encoder is already "...
java
public static boolean isPreviousEncoderSafeOrEqual(Encoder encoderToApply, Encoder previousEncoder) { return previousEncoder == encoderToApply || !encoderToApply.isApplyToSafelyEncoded() && previousEncoder.isSafe() && encoderToApply.isSafe() || previousEncoder.getCodecIdentifier().isEquivalent(e...
[ "public", "static", "boolean", "isPreviousEncoderSafeOrEqual", "(", "Encoder", "encoderToApply", ",", "Encoder", "previousEncoder", ")", "{", "return", "previousEncoder", "==", "encoderToApply", "||", "!", "encoderToApply", ".", "isApplyToSafelyEncoded", "(", ")", "&&",...
Checks if is previous encoder is already "safe", equal or equivalent @param encoderToApply the encoder to apply @param previousEncoder the previous encoder @return true, if previous encoder is already "safe", equal or equivalent
[ "Checks", "if", "is", "previous", "encoder", "is", "already", "safe", "equal", "or", "equivalent" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-encoder/src/main/groovy/org/grails/encoder/DefaultEncodingStateRegistry.java#L125-L128
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/hash/MurmurHash3.java
MurmurHash3.getLong
private static long getLong(final byte[] bArr, final int index, final int rem) { """ Gets a long from the given byte array starting at the given byte array index and continuing for remainder (rem) bytes. The bytes are extracted in little-endian order. There is no limit checking. @param bArr The given input by...
java
private static long getLong(final byte[] bArr, final int index, final int rem) { long out = 0L; for (int i = rem; i-- > 0;) { //i= 7,6,5,4,3,2,1,0 final byte b = bArr[index + i]; out ^= (b & 0xFFL) << (i * 8); //equivalent to |= } return out; }
[ "private", "static", "long", "getLong", "(", "final", "byte", "[", "]", "bArr", ",", "final", "int", "index", ",", "final", "int", "rem", ")", "{", "long", "out", "=", "0L", ";", "for", "(", "int", "i", "=", "rem", ";", "i", "--", ">", "0", ";"...
Gets a long from the given byte array starting at the given byte array index and continuing for remainder (rem) bytes. The bytes are extracted in little-endian order. There is no limit checking. @param bArr The given input byte array. @param index Zero-based index from the start of the byte array. @param rem Remainder...
[ "Gets", "a", "long", "from", "the", "given", "byte", "array", "starting", "at", "the", "given", "byte", "array", "index", "and", "continuing", "for", "remainder", "(", "rem", ")", "bytes", ".", "The", "bytes", "are", "extracted", "in", "little", "-", "en...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hash/MurmurHash3.java#L308-L315
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
OtpNode.deliverError
void deliverError(final OtpCookedConnection conn, final Exception e) { """ /* OtpCookedConnection delivers errors here, we send them on to the handler specified by the application """ removeConnection(conn); remoteStatus(conn.name, false, e); }
java
void deliverError(final OtpCookedConnection conn, final Exception e) { removeConnection(conn); remoteStatus(conn.name, false, e); }
[ "void", "deliverError", "(", "final", "OtpCookedConnection", "conn", ",", "final", "Exception", "e", ")", "{", "removeConnection", "(", "conn", ")", ";", "remoteStatus", "(", "conn", ".", "name", ",", "false", ",", "e", ")", ";", "}" ]
/* OtpCookedConnection delivers errors here, we send them on to the handler specified by the application
[ "/", "*", "OtpCookedConnection", "delivers", "errors", "here", "we", "send", "them", "on", "to", "the", "handler", "specified", "by", "the", "application" ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java#L554-L557
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.getMapEventJournalConfig
public EventJournalConfig getMapEventJournalConfig(String name) { """ Returns the map event journal config for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name...
java
public EventJournalConfig getMapEventJournalConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, mapEventJournalConfigs, name, EventJournalConfig.class, new BiConsumer<EventJournalConfig, String>() { @Override public void accept(EventJo...
[ "public", "EventJournalConfig", "getMapEventJournalConfig", "(", "String", "name", ")", "{", "return", "ConfigUtils", ".", "getConfig", "(", "configPatternMatcher", ",", "mapEventJournalConfigs", ",", "name", ",", "EventJournalConfig", ".", "class", ",", "new", "BiCon...
Returns the map event journal config for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name} without the partition qualifier (the part of the name after {@code '@'}). If ...
[ "Returns", "the", "map", "event", "journal", "config", "for", "the", "given", "name", "creating", "one", "if", "necessary", "and", "adding", "it", "to", "the", "collection", "of", "known", "configurations", ".", "<p", ">", "The", "configuration", "is", "foun...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L2817-L2828
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/McCodeGen.java
McCodeGen.writeTransaction
private void writeTransaction(Definition def, Writer out, int indent) throws IOException { """ Output Transaction method @param def definition @param out Writer @param indent space number @throws IOException ioException """ writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, ind...
java
private void writeTransaction(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "/**\n"); writeWithIndent(out, indent, " * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.\n"); writeWithIndent(out, indent, " *\n"); writeWithIndent(o...
[ "private", "void", "writeTransaction", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeWithIndent", "(", "out", ",", "indent", ",", "\"/**\\n\"", ")", ";", "writeWithIndent", "(", "out", ",", "in...
Output Transaction method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "Transaction", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/McCodeGen.java#L391-L435
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/BcUtils.java
BcUtils.getX509CertificateHolder
public static X509CertificateHolder getX509CertificateHolder(CertifiedPublicKey cert) { """ Convert certified public key to certificate holder. @param cert the certified public key. @return a certificate holder. """ if (cert instanceof BcX509CertifiedPublicKey) { return ((BcX509Certifie...
java
public static X509CertificateHolder getX509CertificateHolder(CertifiedPublicKey cert) { if (cert instanceof BcX509CertifiedPublicKey) { return ((BcX509CertifiedPublicKey) cert).getX509CertificateHolder(); } else { try { return new X509CertificateHolder(cert.ge...
[ "public", "static", "X509CertificateHolder", "getX509CertificateHolder", "(", "CertifiedPublicKey", "cert", ")", "{", "if", "(", "cert", "instanceof", "BcX509CertifiedPublicKey", ")", "{", "return", "(", "(", "BcX509CertifiedPublicKey", ")", "cert", ")", ".", "getX509...
Convert certified public key to certificate holder. @param cert the certified public key. @return a certificate holder.
[ "Convert", "certified", "public", "key", "to", "certificate", "holder", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/BcUtils.java#L68-L81
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommonG.java
CommonG.executeCommand
public void executeCommand(String command, Integer exitStatus, String envVar) throws Exception { """ Executes the command specified in remote system @param command command to be run locally @param exitStatus command exit status @param envVar environment variable name @throws Exception exception ""...
java
public void executeCommand(String command, Integer exitStatus, String envVar) throws Exception { if (exitStatus == null) { exitStatus = 0; } command = "set -o pipefail && alias grep='grep --color=never' && " + command; getRemoteSSHConnection().runCommand(command); se...
[ "public", "void", "executeCommand", "(", "String", "command", ",", "Integer", "exitStatus", ",", "String", "envVar", ")", "throws", "Exception", "{", "if", "(", "exitStatus", "==", "null", ")", "{", "exitStatus", "=", "0", ";", "}", "command", "=", "\"set ...
Executes the command specified in remote system @param command command to be run locally @param exitStatus command exit status @param envVar environment variable name @throws Exception exception
[ "Executes", "the", "command", "specified", "in", "remote", "system" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommonG.java#L2350-L2362
Harium/keel
src/main/java/jdt/triangulation/GridIndex.java
GridIndex.middleOfCell
private Vector3 middleOfCell(int x_index, int y_index) { """ Create a point at the center of a cell @param x_index horizontal cell index @param y_index vertical cell index @return Point at the center of the cell at (x_index, y_index) """ float middleXCell = (float) (indexRegion.minX() + x_index *...
java
private Vector3 middleOfCell(int x_index, int y_index) { float middleXCell = (float) (indexRegion.minX() + x_index * x_size + x_size / 2); float middleYCell = (float) (indexRegion.minY() + y_index * y_size + y_size / 2); return new Vector3(middleXCell, middleYCell, 0); }
[ "private", "Vector3", "middleOfCell", "(", "int", "x_index", ",", "int", "y_index", ")", "{", "float", "middleXCell", "=", "(", "float", ")", "(", "indexRegion", ".", "minX", "(", ")", "+", "x_index", "*", "x_size", "+", "x_size", "/", "2", ")", ";", ...
Create a point at the center of a cell @param x_index horizontal cell index @param y_index vertical cell index @return Point at the center of the cell at (x_index, y_index)
[ "Create", "a", "point", "at", "the", "center", "of", "a", "cell" ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/jdt/triangulation/GridIndex.java#L230-L234
RestComm/jain-slee.xcap
resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java
UriComponentEncoder.encodeQuery
public static String encodeQuery(String query) throws NullPointerException { """ Encodes an HTTP URI Query. @param query @return @throws NullPointerException """ return new String(encode(query, UriComponentEncoderBitSets.allowed_query)); }
java
public static String encodeQuery(String query) throws NullPointerException { return new String(encode(query, UriComponentEncoderBitSets.allowed_query)); }
[ "public", "static", "String", "encodeQuery", "(", "String", "query", ")", "throws", "NullPointerException", "{", "return", "new", "String", "(", "encode", "(", "query", ",", "UriComponentEncoderBitSets", ".", "allowed_query", ")", ")", ";", "}" ]
Encodes an HTTP URI Query. @param query @return @throws NullPointerException
[ "Encodes", "an", "HTTP", "URI", "Query", "." ]
train
https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/uri/encoding/UriComponentEncoder.java#L68-L70
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.includeInDocs
public boolean includeInDocs(final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { """ Determine if a particular class should be included in the output. This is called by the doclet to determine if a DocWorkUnit should be created for this feature. @param documentedFeature ...
java
public boolean includeInDocs(final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { boolean hidden = !showHiddenFeatures() && clazz.isAnnotationPresent(Hidden.class); return !hidden && JVMUtils.isConcrete(clazz); }
[ "public", "boolean", "includeInDocs", "(", "final", "DocumentedFeature", "documentedFeature", ",", "final", "ClassDoc", "classDoc", ",", "final", "Class", "<", "?", ">", "clazz", ")", "{", "boolean", "hidden", "=", "!", "showHiddenFeatures", "(", ")", "&&", "c...
Determine if a particular class should be included in the output. This is called by the doclet to determine if a DocWorkUnit should be created for this feature. @param documentedFeature feature that is being considered for inclusion in the docs @param classDoc for the class that is being considered for inclusion in th...
[ "Determine", "if", "a", "particular", "class", "should", "be", "included", "in", "the", "output", ".", "This", "is", "called", "by", "the", "doclet", "to", "determine", "if", "a", "DocWorkUnit", "should", "be", "created", "for", "this", "feature", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L361-L364
ops4j/org.ops4j.pax.wicket
spi/springdm/src/main/java/org/ops4j/pax/wicket/spi/springdm/injection/spring/AbstractSpringBeanDefinitionParser.java
AbstractSpringBeanDefinitionParser.addPropertyReferenceFromElement
protected void addPropertyReferenceFromElement(String id, Element element, BeanDefinitionBuilder bean) { """ <p>addPropertyReferenceFromElement.</p> @param id a {@link java.lang.String} object. @param element a {@link org.w3c.dom.Element} object. @param bean a {@link org.springframework.beans.factory.support....
java
protected void addPropertyReferenceFromElement(String id, Element element, BeanDefinitionBuilder bean) { String beanElement = element.getAttribute(id); bean.addPropertyReference(id, beanElement); }
[ "protected", "void", "addPropertyReferenceFromElement", "(", "String", "id", ",", "Element", "element", ",", "BeanDefinitionBuilder", "bean", ")", "{", "String", "beanElement", "=", "element", ".", "getAttribute", "(", "id", ")", ";", "bean", ".", "addPropertyRefe...
<p>addPropertyReferenceFromElement.</p> @param id a {@link java.lang.String} object. @param element a {@link org.w3c.dom.Element} object. @param bean a {@link org.springframework.beans.factory.support.BeanDefinitionBuilder} object.
[ "<p", ">", "addPropertyReferenceFromElement", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/spi/springdm/src/main/java/org/ops4j/pax/wicket/spi/springdm/injection/spring/AbstractSpringBeanDefinitionParser.java#L79-L82
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java
CryptoHelper.verifySignatureFor
@Deprecated boolean verifySignatureFor(String algorithm, PublicKey publicKey, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { """ Verify signature using a public key. @param algorithm algorithm name. @param publicKey algorithm public ke...
java
@Deprecated boolean verifySignatureFor(String algorithm, PublicKey publicKey, byte[] contentBytes, byte[] signatureBytes) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { final Signature s = Signature.getInstance(algorithm); s.initVerify(publicKey); s.update(content...
[ "@", "Deprecated", "boolean", "verifySignatureFor", "(", "String", "algorithm", ",", "PublicKey", "publicKey", ",", "byte", "[", "]", "contentBytes", ",", "byte", "[", "]", "signatureBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", ",",...
Verify signature using a public key. @param algorithm algorithm name. @param publicKey algorithm public key. @param contentBytes the content to which the signature applies. @param signatureBytes JWT signature. @return the signature bytes. @throws NoSuchAlgorithmException if the algorithm is not supported. @throws Inva...
[ "Verify", "signature", "using", "a", "public", "key", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java#L179-L185
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.getGroupStatistic
public GroupStatListResult getGroupStatistic(String start, int duration) throws APIConnectionException, APIRequestException { """ Get group statistic, time unit only supports DAY now. @param start Format: yyyy-MM-dd @param duration duration must between 0 and 60 @return {@link GroupStatListResult} ...
java
public GroupStatListResult getGroupStatistic(String start, int duration) throws APIConnectionException, APIRequestException { return _reportClient.getGroupStatistic(start, duration); }
[ "public", "GroupStatListResult", "getGroupStatistic", "(", "String", "start", ",", "int", "duration", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_reportClient", ".", "getGroupStatistic", "(", "start", ",", "duration", ")", ";"...
Get group statistic, time unit only supports DAY now. @param start Format: yyyy-MM-dd @param duration duration must between 0 and 60 @return {@link GroupStatListResult} @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Get", "group", "statistic", "time", "unit", "only", "supports", "DAY", "now", "." ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L1023-L1026
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java
FavoritesInner.listAsync
public Observable<List<ApplicationInsightsComponentFavoriteInner>> listAsync(String resourceGroupName, String resourceName) { """ Gets a list of favorites defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application I...
java
public Observable<List<ApplicationInsightsComponentFavoriteInner>> listAsync(String resourceGroupName, String resourceName) { return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentFavoriteInner>>, List<ApplicationInsightsComponentFavo...
[ "public", "Observable", "<", "List", "<", "ApplicationInsightsComponentFavoriteInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceNam...
Gets a list of favorites defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&l...
[ "Gets", "a", "list", "of", "favorites", "defined", "within", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java#L120-L127
Erudika/para
para-core/src/main/java/com/erudika/para/core/App.java
App.setResourcePermissions
public void setResourcePermissions(Map<String, Map<String, List<String>>> resourcePermissions) { """ Sets the permissions map. @param resourcePermissions permissions map """ this.resourcePermissions = resourcePermissions; }
java
public void setResourcePermissions(Map<String, Map<String, List<String>>> resourcePermissions) { this.resourcePermissions = resourcePermissions; }
[ "public", "void", "setResourcePermissions", "(", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "resourcePermissions", ")", "{", "this", ".", "resourcePermissions", "=", "resourcePermissions", ";", "}" ]
Sets the permissions map. @param resourcePermissions permissions map
[ "Sets", "the", "permissions", "map", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/core/App.java#L297-L299
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlActionSourceAppender.java
SarlActionSourceAppender.eInit
public void eInit(XtendTypeDeclaration container, String name, String modifier, IJvmTypeProvider context) { """ Initialize the Ecore element. @param container the container of the SarlAction. @param name the name of the SarlAction. """ this.builder.eInit(container, name, modifier, context); }
java
public void eInit(XtendTypeDeclaration container, String name, String modifier, IJvmTypeProvider context) { this.builder.eInit(container, name, modifier, context); }
[ "public", "void", "eInit", "(", "XtendTypeDeclaration", "container", ",", "String", "name", ",", "String", "modifier", ",", "IJvmTypeProvider", "context", ")", "{", "this", ".", "builder", ".", "eInit", "(", "container", ",", "name", ",", "modifier", ",", "c...
Initialize the Ecore element. @param container the container of the SarlAction. @param name the name of the SarlAction.
[ "Initialize", "the", "Ecore", "element", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlActionSourceAppender.java#L86-L88
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/decompose/TriangularSolver_ZDRM.java
TriangularSolver_ZDRM.solveU
public static void solveU( double U[] , double []b , int n ) { """ <p> This is a forward substitution solver for non-singular upper triangular matrices. <br> b = U<sup>-1</sup>b<br> <br> where b is a vector, U is an n by n matrix.<br> </p> @param U An n by n non-singular upper triangular matrix. Not modif...
java
public static void solveU( double U[] , double []b , int n ) { // for( int i =n-1; i>=0; i-- ) { // double sum = b[i]; // for( int j = i+1; j <n; j++ ) { // sum -= U[i*n+j]* b[j]; // } // b[i] = sum/U[i*n+i]; // } int stride = n*2; ...
[ "public", "static", "void", "solveU", "(", "double", "U", "[", "]", ",", "double", "[", "]", "b", ",", "int", "n", ")", "{", "// for( int i =n-1; i>=0; i-- ) {", "// double sum = b[i];", "// for( int j = i+1; j <n; j++ ) {", "// ...
<p> This is a forward substitution solver for non-singular upper triangular matrices. <br> b = U<sup>-1</sup>b<br> <br> where b is a vector, U is an n by n matrix.<br> </p> @param U An n by n non-singular upper triangular matrix. Not modified. @param b A vector of length n. Modified. @param n The size of the matrices.
[ "<p", ">", "This", "is", "a", "forward", "substitution", "solver", "for", "non", "-", "singular", "upper", "triangular", "matrices", ".", "<br", ">", "b", "=", "U<sup", ">", "-", "1<", "/", "sup", ">", "b<br", ">", "<br", ">", "where", "b", "is", "...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/decompose/TriangularSolver_ZDRM.java#L51-L84
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/util/ReflectionUtils.java
ReflectionUtils.getMethod
public static Method getMethod(Class<?> clazz, String name) { """ Gets a method of a class by name. @param clazz @param name @return """ return getMethod(clazz, name, false); }
java
public static Method getMethod(Class<?> clazz, String name) { return getMethod(clazz, name, false); }
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "name", ")", "{", "return", "getMethod", "(", "clazz", ",", "name", ",", "false", ")", ";", "}" ]
Gets a method of a class by name. @param clazz @param name @return
[ "Gets", "a", "method", "of", "a", "class", "by", "name", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/util/ReflectionUtils.java#L424-L426
twilio/twilio-java
src/main/java/com/twilio/rest/trunking/v1/trunk/TerminatingSipDomainReader.java
TerminatingSipDomainReader.firstPage
@Override @SuppressWarnings("checkstyle:linelength") public Page<TerminatingSipDomain> firstPage(final TwilioRestClient client) { """ Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return TerminatingSipDomain ResourceSet """ ...
java
@Override @SuppressWarnings("checkstyle:linelength") public Page<TerminatingSipDomain> firstPage(final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, Domains.TRUNKING.toString(), "/v1/Trunks/" + this.pathTrunkSid + "/TerminatingSipDomains", ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"checkstyle:linelength\"", ")", "public", "Page", "<", "TerminatingSipDomain", ">", "firstPage", "(", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ...
Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return TerminatingSipDomain ResourceSet
[ "Make", "the", "request", "to", "the", "Twilio", "API", "to", "perform", "the", "read", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/trunking/v1/trunk/TerminatingSipDomainReader.java#L51-L63
qiniu/java-sdk
src/main/java/com/qiniu/storage/BucketManager.java
BucketManager.rename
public Response rename(String bucket, String oldFileKey, String newFileKey, boolean force) throws QiniuException { """ 重命名空间中的文件,可以设置force参数为true强行覆盖空间已有同名文件 @param bucket 空间名称 @param oldFileKey 文件名称 @param newFileKey 新文件名 @param force 强制覆盖空间中已有同名(和 newFileKey 相同)的文件 @throws QiniuExcept...
java
public Response rename(String bucket, String oldFileKey, String newFileKey, boolean force) throws QiniuException { return move(bucket, oldFileKey, bucket, newFileKey, force); }
[ "public", "Response", "rename", "(", "String", "bucket", ",", "String", "oldFileKey", ",", "String", "newFileKey", ",", "boolean", "force", ")", "throws", "QiniuException", "{", "return", "move", "(", "bucket", ",", "oldFileKey", ",", "bucket", ",", "newFileKe...
重命名空间中的文件,可以设置force参数为true强行覆盖空间已有同名文件 @param bucket 空间名称 @param oldFileKey 文件名称 @param newFileKey 新文件名 @param force 强制覆盖空间中已有同名(和 newFileKey 相同)的文件 @throws QiniuException
[ "重命名空间中的文件,可以设置force参数为true强行覆盖空间已有同名文件" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/BucketManager.java#L340-L343
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateDeploymentJobRequest.java
CreateDeploymentJobRequest.withTags
public CreateDeploymentJobRequest withTags(java.util.Map<String, String> tags) { """ <p> A map that contains tag keys and tag values that are attached to the deployment job. </p> @param tags A map that contains tag keys and tag values that are attached to the deployment job. @return Returns a reference to t...
java
public CreateDeploymentJobRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateDeploymentJobRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> A map that contains tag keys and tag values that are attached to the deployment job. </p> @param tags A map that contains tag keys and tag values that are attached to the deployment job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "map", "that", "contains", "tag", "keys", "and", "tag", "values", "that", "are", "attached", "to", "the", "deployment", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateDeploymentJobRequest.java#L284-L287
JoeKerouac/utils
src/main/java/com/joe/utils/common/JMail.java
JMail.sendEmail
public Future<Boolean> sendEmail(EmailBody body, String to, String title, FilePart[] fileParts, JMailCallback callback) { """ 发送带附件的邮件 @param body 邮件正文 @param to 邮件接收人 @param title 邮件标题 @param fileParts 邮件附件 @param callback 回调函数,邮件发送完毕后会执行 @return 如果发送成...
java
public Future<Boolean> sendEmail(EmailBody body, String to, String title, FilePart[] fileParts, JMailCallback callback) { if (StringUtils.isEmpty(to) || (body == null && fileParts == null)) { logger.debug("邮件没有设置接收人或者没有正文"); execCallback(false, body, ...
[ "public", "Future", "<", "Boolean", ">", "sendEmail", "(", "EmailBody", "body", ",", "String", "to", ",", "String", "title", ",", "FilePart", "[", "]", "fileParts", ",", "JMailCallback", "callback", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", ...
发送带附件的邮件 @param body 邮件正文 @param to 邮件接收人 @param title 邮件标题 @param fileParts 邮件附件 @param callback 回调函数,邮件发送完毕后会执行 @return 如果发送成功则返回<code>true</code>
[ "发送带附件的邮件" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/JMail.java#L152-L162
dmfs/httpurlconnection-executor
src/org/dmfs/httpessentials/httpurlconnection/HttpUrlConnectionExecutor.java
HttpUrlConnectionExecutor.sendRequest
private <T> HttpResponse sendRequest(final URI uri, final HttpRequest<T> request) throws IOException, ProtocolException { """ Sends the request and returns an {@link HttpResponse}. @param uri The URL to connect to. @param request The {@link HttpRequest} to send. @return An {@link HttpResponse}. @throws Mal...
java
private <T> HttpResponse sendRequest(final URI uri, final HttpRequest<T> request) throws IOException, ProtocolException { final HttpURLConnection connection; try { connection = mConnectionFactory.httpUrlConnection(uri); } catch (IllegalArgumentException e) { throw new ProtocolException("The given URI...
[ "private", "<", "T", ">", "HttpResponse", "sendRequest", "(", "final", "URI", "uri", ",", "final", "HttpRequest", "<", "T", ">", "request", ")", "throws", "IOException", ",", "ProtocolException", "{", "final", "HttpURLConnection", "connection", ";", "try", "{"...
Sends the request and returns an {@link HttpResponse}. @param uri The URL to connect to. @param request The {@link HttpRequest} to send. @return An {@link HttpResponse}. @throws MalformedURLException @throws IOException @throws ProtocolException
[ "Sends", "the", "request", "and", "returns", "an", "{", "@link", "HttpResponse", "}", "." ]
train
https://github.com/dmfs/httpurlconnection-executor/blob/e5f58c0a500804fdb1ead2f5fd67259e5c23ee93/src/org/dmfs/httpessentials/httpurlconnection/HttpUrlConnectionExecutor.java#L95-L136
stapler/stapler
core/src/main/java/org/kohsuke/stapler/config/ConfigurationLoader.java
ConfigurationLoader.fromEnvironmentVariables
public static ConfigurationLoader fromEnvironmentVariables() throws IOException { """ Creates {@link ConfigurationLoader} that uses environment variables as the source. Since environment variables are often by convention all caps, while system properties and other properties tend to be camel cased, this method...
java
public static ConfigurationLoader fromEnvironmentVariables() throws IOException { TreeMap<String, String> m = new TreeMap<String, String>(new Comparator<String>() { public int compare(String o1, String o2) { return o1.compareToIgnoreCase(o2); } }); m.putAl...
[ "public", "static", "ConfigurationLoader", "fromEnvironmentVariables", "(", ")", "throws", "IOException", "{", "TreeMap", "<", "String", ",", "String", ">", "m", "=", "new", "TreeMap", "<", "String", ",", "String", ">", "(", "new", "Comparator", "<", "String",...
Creates {@link ConfigurationLoader} that uses environment variables as the source. Since environment variables are often by convention all caps, while system properties and other properties tend to be camel cased, this method creates a case-insensitive configuration (that allows retrievals by both "path" and "PATH" to...
[ "Creates", "{", "@link", "ConfigurationLoader", "}", "that", "uses", "environment", "variables", "as", "the", "source", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/config/ConfigurationLoader.java#L111-L119
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_sqlserver_serviceName_upgrade_duration_POST
public OvhOrder license_sqlserver_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhSqlServerVersionEnum version) throws IOException { """ Create order REST: POST /order/license/sqlserver/{serviceName}/upgrade/{duration} @param version [required] This license version @param serviceName...
java
public OvhOrder license_sqlserver_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhSqlServerVersionEnum version) throws IOException { String qPath = "/order/license/sqlserver/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o...
[ "public", "OvhOrder", "license_sqlserver_serviceName_upgrade_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhSqlServerVersionEnum", "version", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/license/sqlserver/{serviceName}/...
Create order REST: POST /order/license/sqlserver/{serviceName}/upgrade/{duration} @param version [required] This license version @param serviceName [required] The name of your SQL Server license @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1427-L1434
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/map/AbstractLongObjectMap.java
AbstractLongObjectMap.pairsMatching
public void pairsMatching(final LongObjectProcedure condition, final LongArrayList keyList, final ObjectArrayList valueList) { """ Fills all pairs satisfying a given condition into the specified lists. Fills into the lists, starting at index 0. After this call returns the specified lists both have a new size, th...
java
public void pairsMatching(final LongObjectProcedure condition, final LongArrayList keyList, final ObjectArrayList valueList) { keyList.clear(); valueList.clear(); forEachPair( new LongObjectProcedure() { public boolean apply(long key, Object value) { if (condition.apply(key,value)) { keyList....
[ "public", "void", "pairsMatching", "(", "final", "LongObjectProcedure", "condition", ",", "final", "LongArrayList", "keyList", ",", "final", "ObjectArrayList", "valueList", ")", "{", "keyList", ".", "clear", "(", ")", ";", "valueList", ".", "clear", "(", ")", ...
Fills all pairs satisfying a given condition into the specified lists. Fills into the lists, starting at index 0. After this call returns the specified lists both have a new size, the number of pairs satisfying the condition. Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEa...
[ "Fills", "all", "pairs", "satisfying", "a", "given", "condition", "into", "the", "specified", "lists", ".", "Fills", "into", "the", "lists", "starting", "at", "index", "0", ".", "After", "this", "call", "returns", "the", "specified", "lists", "both", "have",...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/map/AbstractLongObjectMap.java#L254-L269
lucee/Lucee
core/src/main/java/lucee/commons/lang/ClassUtil.java
ClassUtil.getClassPathesFromLoader
private static void getClassPathesFromLoader(ClassLoader cl, Map pathes) { """ get class pathes from all url ClassLoaders @param cl URL Class Loader @param pathes Hashmap with allpathes """ if (cl instanceof URLClassLoader) _getClassPathesFromLoader((URLClassLoader) cl, pathes); }
java
private static void getClassPathesFromLoader(ClassLoader cl, Map pathes) { if (cl instanceof URLClassLoader) _getClassPathesFromLoader((URLClassLoader) cl, pathes); }
[ "private", "static", "void", "getClassPathesFromLoader", "(", "ClassLoader", "cl", ",", "Map", "pathes", ")", "{", "if", "(", "cl", "instanceof", "URLClassLoader", ")", "_getClassPathesFromLoader", "(", "(", "URLClassLoader", ")", "cl", ",", "pathes", ")", ";", ...
get class pathes from all url ClassLoaders @param cl URL Class Loader @param pathes Hashmap with allpathes
[ "get", "class", "pathes", "from", "all", "url", "ClassLoaders" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ClassUtil.java#L553-L555
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/adapter/urbridge/utils/URBridgeGroup.java
URBridgeGroup.getUsersForGroup
@Override public void getUsersForGroup(List<String> grpMbrAttrs, int countLimit) throws WIMException { """ Get the groups for the user and add the specified attributes to each of the groups. @param grpMbrAttrs the attributes to be added to the groups. @param countLimit restricts the size of the number of ...
java
@Override public void getUsersForGroup(List<String> grpMbrAttrs, int countLimit) throws WIMException { String securityName = null; try { securityName = getSecurityName(false); List<String> returnNames = urBridge.getUsersForGroup(securityName, countLimit).getList(); ...
[ "@", "Override", "public", "void", "getUsersForGroup", "(", "List", "<", "String", ">", "grpMbrAttrs", ",", "int", "countLimit", ")", "throws", "WIMException", "{", "String", "securityName", "=", "null", ";", "try", "{", "securityName", "=", "getSecurityName", ...
Get the groups for the user and add the specified attributes to each of the groups. @param grpMbrAttrs the attributes to be added to the groups. @param countLimit restricts the size of the number of groups returned for the user. @Exception an error occurs in the underlying registry or while attempting to add the attri...
[ "Get", "the", "groups", "for", "the", "user", "and", "add", "the", "specified", "attributes", "to", "each", "of", "the", "groups", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/adapter/urbridge/utils/URBridgeGroup.java#L102-L128
ben-manes/caffeine
caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/ConcurrentHashMapV7.java
ConcurrentHashMapV7.replace
@Override public V replace(K key, V value) { """ {@inheritDoc} @return the previous value associated with the specified key, or <tt>null</tt> if there was no mapping for the key @throws NullPointerException if the specified key or value is null """ int hash = hash(key); if (value == nu...
java
@Override public V replace(K key, V value) { int hash = hash(key); if (value == null) { throw new NullPointerException(); } Segment<K,V> s = segmentForHash(hash); return s == null ? null : s.replace(key, hash, value); }
[ "@", "Override", "public", "V", "replace", "(", "K", "key", ",", "V", "value", ")", "{", "int", "hash", "=", "hash", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "Se...
{@inheritDoc} @return the previous value associated with the specified key, or <tt>null</tt> if there was no mapping for the key @throws NullPointerException if the specified key or value is null
[ "{", "@inheritDoc", "}" ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/ConcurrentHashMapV7.java#L1286-L1294
zaproxy/zaproxy
src/org/zaproxy/zap/extension/forceduser/ExtensionForcedUser.java
ExtensionForcedUser.setForcedUser
public void setForcedUser(int contextId, int userId) throws IllegalStateException { """ Sets the forced user for a context, based on the user id. @param contextId the context id @param userId the user id @throws IllegalStateException if no user was found that matches the provided id. """ User user = get...
java
public void setForcedUser(int contextId, int userId) throws IllegalStateException { User user = getUserManagementExtension().getContextUserAuthManager(contextId).getUserById(userId); if (user == null) throw new IllegalStateException("No user matching the provided id was found."); setForcedUser(contextId, user)...
[ "public", "void", "setForcedUser", "(", "int", "contextId", ",", "int", "userId", ")", "throws", "IllegalStateException", "{", "User", "user", "=", "getUserManagementExtension", "(", ")", ".", "getContextUserAuthManager", "(", "contextId", ")", ".", "getUserById", ...
Sets the forced user for a context, based on the user id. @param contextId the context id @param userId the user id @throws IllegalStateException if no user was found that matches the provided id.
[ "Sets", "the", "forced", "user", "for", "a", "context", "based", "on", "the", "user", "id", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/forceduser/ExtensionForcedUser.java#L249-L254
alkacon/opencms-core
src/org/opencms/ui/components/editablegroup/CmsEditableGroupButtons.java
CmsEditableGroupButtons.setFirstLast
public void setFirstLast(boolean first, boolean last, boolean hideAdd) { """ Sets the 'first' and 'last' status of the button bar.<p> @param first true if this is the button bar of the first row @param last true if this is the button bar of the last row @param hideAdd true -> hide add option """ ...
java
public void setFirstLast(boolean first, boolean last, boolean hideAdd) { CmsEditableGroupButtonsState state = (CmsEditableGroupButtonsState)getState(false); if ((state.isFirst() != first) || (state.isLast() != last)) { state.setFirst(first); state.setLast(last); stat...
[ "public", "void", "setFirstLast", "(", "boolean", "first", ",", "boolean", "last", ",", "boolean", "hideAdd", ")", "{", "CmsEditableGroupButtonsState", "state", "=", "(", "CmsEditableGroupButtonsState", ")", "getState", "(", "false", ")", ";", "if", "(", "(", ...
Sets the 'first' and 'last' status of the button bar.<p> @param first true if this is the button bar of the first row @param last true if this is the button bar of the last row @param hideAdd true -> hide add option
[ "Sets", "the", "first", "and", "last", "status", "of", "the", "button", "bar", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/editablegroup/CmsEditableGroupButtons.java#L106-L115
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/RPC.java
RPC.getProtocolProxy
@SuppressWarnings("unchecked") public static <T extends VersionedProtocol> ProtocolProxy<T> getProtocolProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, ...
java
@SuppressWarnings("unchecked") public static <T extends VersionedProtocol> ProtocolProxy<T> getProtocolProxy( Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "VersionedProtocol", ">", "ProtocolProxy", "<", "T", ">", "getProtocolProxy", "(", "Class", "<", "T", ">", "protocol", ",", "long", "clientVersion", ",", "InetSocketAddr...
Construct a client-side proxy that implements the named protocol, talking to a server at the named address. @param protocol protocol @param clientVersion client's version @param addr server address @param ticket security ticket @param conf configuration @param factory socket factory @param rpcTimeout max time for each...
[ "Construct", "a", "client", "-", "side", "proxy", "that", "implements", "the", "named", "protocol", "talking", "to", "a", "server", "at", "the", "named", "address", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/RPC.java#L587-L621
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java
CommonDatabaseMetaData.getSchemas
public ResultSet getSchemas(final String catalog, final String schemaPattern) throws SQLException { """ Retrieves the schema names available in this database. The results are ordered by <code>TABLE_CATALOG</code> and <code>TABLE_SCHEM</code>. <p/> <P>The schema columns are: <OL> <LI><B>TABLE_SCHEM</B> String =...
java
public ResultSet getSchemas(final String catalog, final String schemaPattern) throws SQLException { final String query = "SELECT schema_name table_schem, " + "null table_catalog " + "FROM information_schema.schemata " + (schemaPattern != null ? "WHERE sche...
[ "public", "ResultSet", "getSchemas", "(", "final", "String", "catalog", ",", "final", "String", "schemaPattern", ")", "throws", "SQLException", "{", "final", "String", "query", "=", "\"SELECT schema_name table_schem, \"", "+", "\"null table_catalog \"", "+", "\"FROM inf...
Retrieves the schema names available in this database. The results are ordered by <code>TABLE_CATALOG</code> and <code>TABLE_SCHEM</code>. <p/> <P>The schema columns are: <OL> <LI><B>TABLE_SCHEM</B> String => schema name <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>) </OL> @param catalog ...
[ "Retrieves", "the", "schema", "names", "available", "in", "this", "database", ".", "The", "results", "are", "ordered", "by", "<code", ">", "TABLE_CATALOG<", "/", "code", ">", "and", "<code", ">", "TABLE_SCHEM<", "/", "code", ">", ".", "<p", "/", ">", "<P...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java#L2538-L2546
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java
MailUtil.sendHtml
public static void sendHtml(Collection<String> tos, String subject, String content, File... files) { """ 使用配置文件中设置的账户发送HTML邮件,发送给多人 @param tos 收件人列表 @param subject 标题 @param content 正文 @param files 附件列表 @since 3.2.0 """ send(tos, subject, content, true, files); }
java
public static void sendHtml(Collection<String> tos, String subject, String content, File... files) { send(tos, subject, content, true, files); }
[ "public", "static", "void", "sendHtml", "(", "Collection", "<", "String", ">", "tos", ",", "String", "subject", ",", "String", "content", ",", "File", "...", "files", ")", "{", "send", "(", "tos", ",", "subject", ",", "content", ",", "true", ",", "file...
使用配置文件中设置的账户发送HTML邮件,发送给多人 @param tos 收件人列表 @param subject 标题 @param content 正文 @param files 附件列表 @since 3.2.0
[ "使用配置文件中设置的账户发送HTML邮件,发送给多人" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L98-L100
trellis-ldp/trellis
components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java
TrellisWebDAV.getProperties
@PROPFIND @Consumes( { """ Get properties for a resource. @param response the response @param request the request @param uriInfo the URI info @param headers the headers @param propfind the propfind @throws ParserConfigurationException if the XML parser is not properly configured """APPLICATION_XML}) ...
java
@PROPFIND @Consumes({APPLICATION_XML}) @Produces({APPLICATION_XML}) @Timed public void getProperties(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, final DavPropFind propfind) throws Par...
[ "@", "PROPFIND", "@", "Consumes", "(", "{", "APPLICATION_XML", "}", ")", "@", "Produces", "(", "{", "APPLICATION_XML", "}", ")", "@", "Timed", "public", "void", "getProperties", "(", "@", "Suspended", "final", "AsyncResponse", "response", ",", "@", "Context"...
Get properties for a resource. @param response the response @param request the request @param uriInfo the URI info @param headers the headers @param propfind the propfind @throws ParserConfigurationException if the XML parser is not properly configured
[ "Get", "properties", "for", "a", "resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java#L238-L254
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.beginExport
public ImportExportResponseInner beginExport(String resourceGroupName, String serverName, String databaseName, ExportRequest parameters) { """ Exports a database to a bacpac. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Man...
java
public ImportExportResponseInner beginExport(String resourceGroupName, String serverName, String databaseName, ExportRequest parameters) { return beginExportWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().single().body(); }
[ "public", "ImportExportResponseInner", "beginExport", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "ExportRequest", "parameters", ")", "{", "return", "beginExportWithServiceResponseAsync", "(", "resourceGroupName", ","...
Exports a database to a bacpac. @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 serverName The name of the server. @param databaseName The name of the database to be exported. @param parameters The r...
[ "Exports", "a", "database", "to", "a", "bacpac", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L2182-L2184
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.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 { return _chatRoomClient.updateChatRoomInfo(roomId, ownerUsername, name, desc); }
[ "public", "ResponseWrapper", "updateChatRoomInfo", "(", "long", "roomId", ",", "String", "ownerUsername", ",", "String", "name", ",", "String", "desc", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_chatRoomClient", ".", "updateC...
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/JMessageClient.java#L834-L837
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.getBrand
public Brand getBrand(String accountId, String brandId) throws ApiException { """ Get information for a specific brand. @param accountId The external account number (int) or account ID Guid. (required) @param brandId The unique identifier of a brand. (required) @return Brand """ return getBrand(accoun...
java
public Brand getBrand(String accountId, String brandId) throws ApiException { return getBrand(accountId, brandId, null); }
[ "public", "Brand", "getBrand", "(", "String", "accountId", ",", "String", "brandId", ")", "throws", "ApiException", "{", "return", "getBrand", "(", "accountId", ",", "brandId", ",", "null", ")", ";", "}" ]
Get information for a specific brand. @param accountId The external account number (int) or account ID Guid. (required) @param brandId The unique identifier of a brand. (required) @return Brand
[ "Get", "information", "for", "a", "specific", "brand", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L1048-L1050
casmi/casmi
src/main/java/casmi/graphics/object/Camera.java
Camera.setCenter
public void setCenter(double centerX, double centerY, double centerZ) { """ Sets the center of the scene of this Camera. @param centerX The x-coordinate for the center of the scene. @param centerY The y-coordinate for the center of the scene. @param centerZ The z-coordinate for the center of the scene. ...
java
public void setCenter(double centerX, double centerY, double centerZ) { this.centerX = centerX; this.centerY = centerY; this.centerZ = centerZ; }
[ "public", "void", "setCenter", "(", "double", "centerX", ",", "double", "centerY", ",", "double", "centerZ", ")", "{", "this", ".", "centerX", "=", "centerX", ";", "this", ".", "centerY", "=", "centerY", ";", "this", ".", "centerZ", "=", "centerZ", ";", ...
Sets the center of the scene of this Camera. @param centerX The x-coordinate for the center of the scene. @param centerY The y-coordinate for the center of the scene. @param centerZ The z-coordinate for the center of the scene.
[ "Sets", "the", "center", "of", "the", "scene", "of", "this", "Camera", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/object/Camera.java#L163-L167
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/energybalance/OmsEnergyBalance.java
OmsEnergyBalance.pVap
private double pVap( double T, double P ) { """ calcola la pressione di vapore [mbar] a saturazione in dipendenza dalla temperatura [gradi Celsius]. @param T @param P @return la pressione di vapore [mbar] a saturazione """ double A = 6.1121 * (1.0007 + 3.46E-6 * P); double b = 17.502; ...
java
private double pVap( double T, double P ) { double A = 6.1121 * (1.0007 + 3.46E-6 * P); double b = 17.502; double c = 240.97; double e = A * exp(b * T / (c + T)); return e; }
[ "private", "double", "pVap", "(", "double", "T", ",", "double", "P", ")", "{", "double", "A", "=", "6.1121", "*", "(", "1.0007", "+", "3.46E-6", "*", "P", ")", ";", "double", "b", "=", "17.502", ";", "double", "c", "=", "240.97", ";", "double", "...
calcola la pressione di vapore [mbar] a saturazione in dipendenza dalla temperatura [gradi Celsius]. @param T @param P @return la pressione di vapore [mbar] a saturazione
[ "calcola", "la", "pressione", "di", "vapore", "[", "mbar", "]", "a", "saturazione", "in", "dipendenza", "dalla", "temperatura", "[", "gradi", "Celsius", "]", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/energybalance/OmsEnergyBalance.java#L1254-L1260
line/armeria
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
ServerBuilder.blockingTaskExecutor
public ServerBuilder blockingTaskExecutor(Executor blockingTaskExecutor, boolean shutdownOnStop) { """ Sets the {@link Executor} dedicated to the execution of blocking tasks or invocations. If not set, {@linkplain CommonPools#blockingTaskExecutor() the common pool} is used. @param shutdownOnStop whether to shu...
java
public ServerBuilder blockingTaskExecutor(Executor blockingTaskExecutor, boolean shutdownOnStop) { this.blockingTaskExecutor = requireNonNull(blockingTaskExecutor, "blockingTaskExecutor"); shutdownBlockingTaskExecutorOnStop = shutdownOnStop; return this; }
[ "public", "ServerBuilder", "blockingTaskExecutor", "(", "Executor", "blockingTaskExecutor", ",", "boolean", "shutdownOnStop", ")", "{", "this", ".", "blockingTaskExecutor", "=", "requireNonNull", "(", "blockingTaskExecutor", ",", "\"blockingTaskExecutor\"", ")", ";", "shu...
Sets the {@link Executor} dedicated to the execution of blocking tasks or invocations. If not set, {@linkplain CommonPools#blockingTaskExecutor() the common pool} is used. @param shutdownOnStop whether to shut down the {@link Executor} when the {@link Server} stops
[ "Sets", "the", "{", "@link", "Executor", "}", "dedicated", "to", "the", "execution", "of", "blocking", "tasks", "or", "invocations", ".", "If", "not", "set", "{", "@linkplain", "CommonPools#blockingTaskExecutor", "()", "the", "common", "pool", "}", "is", "used...
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java#L667-L671
threerings/nenya
core/src/main/java/com/threerings/media/tile/TrimmedObjectTileSet.java
TrimmedObjectTileSet.trimObjectTileSet
public static TrimmedObjectTileSet trimObjectTileSet ( ObjectTileSet source, OutputStream destImage) throws IOException { """ Convenience function to trim the tile set to a file using FastImageIO. """ return trimObjectTileSet(source, destImage, FastImageIO.FILE_SUFFIX); }
java
public static TrimmedObjectTileSet trimObjectTileSet ( ObjectTileSet source, OutputStream destImage) throws IOException { return trimObjectTileSet(source, destImage, FastImageIO.FILE_SUFFIX); }
[ "public", "static", "TrimmedObjectTileSet", "trimObjectTileSet", "(", "ObjectTileSet", "source", ",", "OutputStream", "destImage", ")", "throws", "IOException", "{", "return", "trimObjectTileSet", "(", "source", ",", "destImage", ",", "FastImageIO", ".", "FILE_SUFFIX", ...
Convenience function to trim the tile set to a file using FastImageIO.
[ "Convenience", "function", "to", "trim", "the", "tile", "set", "to", "a", "file", "using", "FastImageIO", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/TrimmedObjectTileSet.java#L174-L179
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.isInsideCurrentProject
public boolean isInsideCurrentProject(CmsDbContext dbc, String resourcename) { """ Checks if the specified resource is inside the current project.<p> The project "view" is determined by a set of path prefixes. If the resource starts with any one of this prefixes, it is considered to be "inside" the project.<p...
java
public boolean isInsideCurrentProject(CmsDbContext dbc, String resourcename) { List<String> projectResources = null; try { projectResources = readProjectResources(dbc, dbc.currentProject()); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error...
[ "public", "boolean", "isInsideCurrentProject", "(", "CmsDbContext", "dbc", ",", "String", "resourcename", ")", "{", "List", "<", "String", ">", "projectResources", "=", "null", ";", "try", "{", "projectResources", "=", "readProjectResources", "(", "dbc", ",", "d...
Checks if the specified resource is inside the current project.<p> The project "view" is determined by a set of path prefixes. If the resource starts with any one of this prefixes, it is considered to be "inside" the project.<p> @param dbc the current database context @param resourcename the specified resource name (...
[ "Checks", "if", "the", "specified", "resource", "is", "inside", "the", "current", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L5222-L5239
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java
ContentKeyPoliciesInner.getPolicyPropertiesWithSecrets
public ContentKeyPolicyPropertiesInner getPolicyPropertiesWithSecrets(String resourceGroupName, String accountName, String contentKeyPolicyName) { """ Get a Content Key Policy with secrets. Get a Content Key Policy including secret values. @param resourceGroupName The name of the resource group within the Azur...
java
public ContentKeyPolicyPropertiesInner getPolicyPropertiesWithSecrets(String resourceGroupName, String accountName, String contentKeyPolicyName) { return getPolicyPropertiesWithSecretsWithServiceResponseAsync(resourceGroupName, accountName, contentKeyPolicyName).toBlocking().single().body(); }
[ "public", "ContentKeyPolicyPropertiesInner", "getPolicyPropertiesWithSecrets", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "contentKeyPolicyName", ")", "{", "return", "getPolicyPropertiesWithSecretsWithServiceResponseAsync", "(", "resourceGroupN...
Get a Content Key Policy with secrets. Get a Content Key Policy including secret values. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param contentKeyPolicyName The Content Key Policy name. @throws IllegalArgumentException t...
[ "Get", "a", "Content", "Key", "Policy", "with", "secrets", ".", "Get", "a", "Content", "Key", "Policy", "including", "secret", "values", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java#L781-L783
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/contextmenu/CmsReplace.java
CmsReplace.getContextMenuCommand
public static I_CmsContextMenuCommand getContextMenuCommand() { """ Returns the context menu command according to {@link org.opencms.gwt.client.ui.contextmenu.I_CmsHasContextMenuCommand}.<p> @return the context menu command """ return new I_CmsContextMenuCommand() { public void ex...
java
public static I_CmsContextMenuCommand getContextMenuCommand() { return new I_CmsContextMenuCommand() { public void execute(CmsUUID structureId, I_CmsContextMenuHandler handler, CmsContextMenuEntryBean bean) { // nothing to do, will be handled by the widget } ...
[ "public", "static", "I_CmsContextMenuCommand", "getContextMenuCommand", "(", ")", "{", "return", "new", "I_CmsContextMenuCommand", "(", ")", "{", "public", "void", "execute", "(", "CmsUUID", "structureId", ",", "I_CmsContextMenuHandler", "handler", ",", "CmsContextMenuE...
Returns the context menu command according to {@link org.opencms.gwt.client.ui.contextmenu.I_CmsHasContextMenuCommand}.<p> @return the context menu command
[ "Returns", "the", "context", "menu", "command", "according", "to", "{", "@link", "org", ".", "opencms", ".", "gwt", ".", "client", ".", "ui", ".", "contextmenu", ".", "I_CmsHasContextMenuCommand", "}", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/contextmenu/CmsReplace.java#L87-L109
OpenLiberty/open-liberty
dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/ConfigEvaluator.java
ConfigEvaluator.getUnconfiguredAttributeValue
private Object getUnconfiguredAttributeValue(EvaluationContext context, ExtendedAttributeDefinition attributeDef) throws ConfigEvaluatorException { """ Try to determine a value from variable or defaults for the AD. @param attributeDef @param context @return @throws ConfigEvaluatorException """ O...
java
private Object getUnconfiguredAttributeValue(EvaluationContext context, ExtendedAttributeDefinition attributeDef) throws ConfigEvaluatorException { Object rawValue = null; // no value in config then try ibm:variable if set rawValue = variableEvaluator.lookupVariableExtension(context, attribut...
[ "private", "Object", "getUnconfiguredAttributeValue", "(", "EvaluationContext", "context", ",", "ExtendedAttributeDefinition", "attributeDef", ")", "throws", "ConfigEvaluatorException", "{", "Object", "rawValue", "=", "null", ";", "// no value in config then try ibm:variable if s...
Try to determine a value from variable or defaults for the AD. @param attributeDef @param context @return @throws ConfigEvaluatorException
[ "Try", "to", "determine", "a", "value", "from", "variable", "or", "defaults", "for", "the", "AD", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/ConfigEvaluator.java#L700-L717
TakahikoKawasaki/nv-websocket-client
src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java
WebSocketFactory.createSocket
public WebSocket createSocket(String uri, int timeout) throws IOException { """ Create a WebSocket. <p> This method is an alias of {@link #createSocket(URI, int) createSocket}{@code (}{@link URI#create(String) URI.create}{@code (uri), timeout)}. </p> @param uri The URI of the WebSocket endpoint on the se...
java
public WebSocket createSocket(String uri, int timeout) throws IOException { if (uri == null) { throw new IllegalArgumentException("The given URI is null."); } if (timeout < 0) { throw new IllegalArgumentException("The given timeout value is negative."...
[ "public", "WebSocket", "createSocket", "(", "String", "uri", ",", "int", "timeout", ")", "throws", "IOException", "{", "if", "(", "uri", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The given URI is null.\"", ")", ";", "}", "if",...
Create a WebSocket. <p> This method is an alias of {@link #createSocket(URI, int) createSocket}{@code (}{@link URI#create(String) URI.create}{@code (uri), timeout)}. </p> @param uri The URI of the WebSocket endpoint on the server side. @param timeout The timeout value in milliseconds for socket connection. A timeout...
[ "Create", "a", "WebSocket", "." ]
train
https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java#L375-L388
geomajas/geomajas-project-client-gwt2
plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/message/MessageBox.java
MessageBox.showYesNoCancelMessageBox
public static MessageBox showYesNoCancelMessageBox(String title, String question, Callback<Boolean, Void> onFinished) { """ This will show a MessageBox expecting an answer. <p> onFinished.onSuccess will be called with true for yes, and false for no. onFinished.onFailure will be called for cancel and when the...
java
public static MessageBox showYesNoCancelMessageBox(String title, String question, Callback<Boolean, Void> onFinished) { MessageBox box = new MessageBox(title, question, onFinished); box.setMessageStyleType(MessageStyleType.HELP); box.setMessageBoxType(MessageBoxType.YESNOCANCEL); box.center(); return box; ...
[ "public", "static", "MessageBox", "showYesNoCancelMessageBox", "(", "String", "title", ",", "String", "question", ",", "Callback", "<", "Boolean", ",", "Void", ">", "onFinished", ")", "{", "MessageBox", "box", "=", "new", "MessageBox", "(", "title", ",", "ques...
This will show a MessageBox expecting an answer. <p> onFinished.onSuccess will be called with true for yes, and false for no. onFinished.onFailure will be called for cancel and when the dialogbox is closed with the closebutton. @param title @param question @param onFinished @return
[ "This", "will", "show", "a", "MessageBox", "expecting", "an", "answer", ".", "<p", ">", "onFinished", ".", "onSuccess", "will", "be", "called", "with", "true", "for", "yes", "and", "false", "for", "no", ".", "onFinished", ".", "onFailure", "will", "be", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/message/MessageBox.java#L329-L336
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.findByEmail
public DUser findByEmail(java.lang.String email) { """ find-by method for unique field email @param email the unique attribute @return the unique DUser for the specified email """ return queryUniqueByField(null, DUserMapper.Field.EMAIL.getFieldName(), email); }
java
public DUser findByEmail(java.lang.String email) { return queryUniqueByField(null, DUserMapper.Field.EMAIL.getFieldName(), email); }
[ "public", "DUser", "findByEmail", "(", "java", ".", "lang", ".", "String", "email", ")", "{", "return", "queryUniqueByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "EMAIL", ".", "getFieldName", "(", ")", ",", "email", ")", ";", "}" ]
find-by method for unique field email @param email the unique attribute @return the unique DUser for the specified email
[ "find", "-", "by", "method", "for", "unique", "field", "email" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L142-L144
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ShExGenerator.java
ShExGenerator.genReference
private String genReference(String id, ElementDefinition.TypeRefComponent typ) { """ Generate a reference to a resource @param id attribute identifier @param typ possible reference types @return string that represents the result """ ST shex_ref = tmplt(REFERENCE_DEFN_TEMPLATE); String ref = getT...
java
private String genReference(String id, ElementDefinition.TypeRefComponent typ) { ST shex_ref = tmplt(REFERENCE_DEFN_TEMPLATE); String ref = getTypeName(typ); shex_ref.add("id", id); shex_ref.add("ref", ref); references.add(ref); return shex_ref.render(); }
[ "private", "String", "genReference", "(", "String", "id", ",", "ElementDefinition", ".", "TypeRefComponent", "typ", ")", "{", "ST", "shex_ref", "=", "tmplt", "(", "REFERENCE_DEFN_TEMPLATE", ")", ";", "String", "ref", "=", "getTypeName", "(", "typ", ")", ";", ...
Generate a reference to a resource @param id attribute identifier @param typ possible reference types @return string that represents the result
[ "Generate", "a", "reference", "to", "a", "resource" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/conformance/ShExGenerator.java#L707-L715
rapidpro/expressions
java/src/main/java/io/rapidpro/expressions/utils/Parameter.java
Parameter.fromMethod
public static Parameter[] fromMethod(Method method) { """ Returns an array of Parameter objects that represent all the parameters to the underlying method """ Class<?>[] types = method.getParameterTypes(); Annotation[][] annotations = method.getParameterAnnotations(); int numParams = ty...
java
public static Parameter[] fromMethod(Method method) { Class<?>[] types = method.getParameterTypes(); Annotation[][] annotations = method.getParameterAnnotations(); int numParams = types.length; Parameter[] params = new Parameter[numParams]; for (int p = 0; p < numParams; p++) { ...
[ "public", "static", "Parameter", "[", "]", "fromMethod", "(", "Method", "method", ")", "{", "Class", "<", "?", ">", "[", "]", "types", "=", "method", ".", "getParameterTypes", "(", ")", ";", "Annotation", "[", "]", "[", "]", "annotations", "=", "method...
Returns an array of Parameter objects that represent all the parameters to the underlying method
[ "Returns", "an", "array", "of", "Parameter", "objects", "that", "represent", "all", "the", "parameters", "to", "the", "underlying", "method" ]
train
https://github.com/rapidpro/expressions/blob/b03d91ec58fc328960bce90ecb5fa49dcf467627/java/src/main/java/io/rapidpro/expressions/utils/Parameter.java#L23-L33
google/flatbuffers
java/com/google/flatbuffers/Table.java
Table.__vector_in_bytebuffer
protected ByteBuffer __vector_in_bytebuffer(ByteBuffer bb, int vector_offset, int elem_size) { """ Initialize vector as a ByteBuffer. This is more efficient than using duplicate, since it doesn't copy the data nor allocattes a new {@link ByteBuffer}, creating no garbage to be collected. @param bb The {@link...
java
protected ByteBuffer __vector_in_bytebuffer(ByteBuffer bb, int vector_offset, int elem_size) { int o = this.__offset(vector_offset); if (o == 0) return null; int vectorstart = __vector(o); bb.rewind(); bb.limit(vectorstart + __vector_len(o) * elem_size); bb.position(vectorstart); return bb; ...
[ "protected", "ByteBuffer", "__vector_in_bytebuffer", "(", "ByteBuffer", "bb", ",", "int", "vector_offset", ",", "int", "elem_size", ")", "{", "int", "o", "=", "this", ".", "__offset", "(", "vector_offset", ")", ";", "if", "(", "o", "==", "0", ")", "return"...
Initialize vector as a ByteBuffer. This is more efficient than using duplicate, since it doesn't copy the data nor allocattes a new {@link ByteBuffer}, creating no garbage to be collected. @param bb The {@link ByteBuffer} for the array @param vector_offset The position of the vector in the byte buffer @param elem_siz...
[ "Initialize", "vector", "as", "a", "ByteBuffer", "." ]
train
https://github.com/google/flatbuffers/blob/6cc30b3272d79c85db7d4871ac0aa69541dc89de/java/com/google/flatbuffers/Table.java#L154-L162
pac4j/pac4j
pac4j-saml/src/main/java/org/pac4j/saml/transport/Pac4jHTTPRedirectDeflateEncoder.java
Pac4jHTTPRedirectDeflateEncoder.deflateAndBase64Encode
String deflateAndBase64Encode(SAMLObject message) throws MessageEncodingException { """ DEFLATE (RFC1951) compresses the given SAML message. @param message SAML message @return DEFLATE compressed message @throws MessageEncodingException thrown if there is a problem compressing the message """ ...
java
String deflateAndBase64Encode(SAMLObject message) throws MessageEncodingException { log.debug("Deflating and Base64 encoding SAML message"); try { String messageStr = SerializeSupport.nodeToString(marshallMessage(message)); log.trace("Output XML message: {}", messageStr); ...
[ "String", "deflateAndBase64Encode", "(", "SAMLObject", "message", ")", "throws", "MessageEncodingException", "{", "log", ".", "debug", "(", "\"Deflating and Base64 encoding SAML message\"", ")", ";", "try", "{", "String", "messageStr", "=", "SerializeSupport", ".", "nod...
DEFLATE (RFC1951) compresses the given SAML message. @param message SAML message @return DEFLATE compressed message @throws MessageEncodingException thrown if there is a problem compressing the message
[ "DEFLATE", "(", "RFC1951", ")", "compresses", "the", "given", "SAML", "message", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-saml/src/main/java/org/pac4j/saml/transport/Pac4jHTTPRedirectDeflateEncoder.java#L121-L137
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.getVnetGateway
public VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { """ Get a Virtual Network gateway. Get a Virtual Network gateway. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @...
java
public VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { return getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().body(); }
[ "public", "VnetGatewayInner", "getVnetGateway", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "vnetName", ",", "String", "gatewayName", ")", "{", "return", "getVnetGatewayWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", ...
Get a Virtual Network gateway. Get a Virtual Network gateway. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param vnetName Name of the Virtual Network. @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. @throw...
[ "Get", "a", "Virtual", "Network", "gateway", ".", "Get", "a", "Virtual", "Network", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3174-L3176
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/Evaluation.java
Evaluation.getPredictionsByActualClass
public List<Prediction> getPredictionsByActualClass(int actualClass) { """ Get a list of predictions, for all data with the specified <i>actual</i> class, regardless of the predicted class. <p> <b>Note</b>: Prediction errors are ONLY available if the "evaluate with metadata" method is used: {@link #eval(INDArr...
java
public List<Prediction> getPredictionsByActualClass(int actualClass) { if (confusionMatrixMetaData == null) return null; List<Prediction> out = new ArrayList<>(); for (Map.Entry<Pair<Integer, Integer>, List<Object>> entry : confusionMatrixMetaData.entrySet()) { //Entry Pair: (Actual...
[ "public", "List", "<", "Prediction", ">", "getPredictionsByActualClass", "(", "int", "actualClass", ")", "{", "if", "(", "confusionMatrixMetaData", "==", "null", ")", "return", "null", ";", "List", "<", "Prediction", ">", "out", "=", "new", "ArrayList", "<>", ...
Get a list of predictions, for all data with the specified <i>actual</i> class, regardless of the predicted class. <p> <b>Note</b>: Prediction errors are ONLY available if the "evaluate with metadata" method is used: {@link #eval(INDArray, INDArray, List)} Otherwise (if the metadata hasn't been recorded via that previ...
[ "Get", "a", "list", "of", "predictions", "for", "all", "data", "with", "the", "specified", "<i", ">", "actual<", "/", "i", ">", "class", "regardless", "of", "the", "predicted", "class", ".", "<p", ">", "<b", ">", "Note<", "/", "b", ">", ":", "Predict...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/Evaluation.java#L1771-L1786
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java
JsonWriter.writeEntry
public String writeEntry(Object entity, String contextUrl) throws ODataRenderException { """ Write a single entity (entry) to the JSON stream. @param entity The entity to fill in the JSON stream. It can not be {@code null}. @param contextUrl The 'Context URL' to write. It can not be {@code null}. @return ...
java
public String writeEntry(Object entity, String contextUrl) throws ODataRenderException { this.contextURL = checkNotNull(contextUrl); try { return writeJson(entity, null); } catch (IOException | IllegalAccessException | NoSuchFieldException | ODataEdmException | ODat...
[ "public", "String", "writeEntry", "(", "Object", "entity", ",", "String", "contextUrl", ")", "throws", "ODataRenderException", "{", "this", ".", "contextURL", "=", "checkNotNull", "(", "contextUrl", ")", ";", "try", "{", "return", "writeJson", "(", "entity", "...
Write a single entity (entry) to the JSON stream. @param entity The entity to fill in the JSON stream. It can not be {@code null}. @param contextUrl The 'Context URL' to write. It can not be {@code null}. @return the rendered entry @throws ODataRenderException In case it is not possible to write to the JSON stream...
[ "Write", "a", "single", "entity", "(", "entry", ")", "to", "the", "JSON", "stream", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java#L125-L136
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
AttributesImpl.setQName
public void setQName (int index, String qName) { """ Set the qualified name of a specific attribute. @param index The index of the attribute (zero-based). @param qName The attribute's qualified name, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index do...
java
public void setQName (int index, String qName) { if (index >= 0 && index < length) { data[index*5+2] = qName; } else { badIndex(index); } }
[ "public", "void", "setQName", "(", "int", "index", ",", "String", "qName", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "length", ")", "{", "data", "[", "index", "*", "5", "+", "2", "]", "=", "qName", ";", "}", "else", "{", "bad...
Set the qualified name of a specific attribute. @param index The index of the attribute (zero-based). @param qName The attribute's qualified name, or the empty string for none. @exception java.lang.ArrayIndexOutOfBoundsException When the supplied index does not point to an attribute in the list.
[ "Set", "the", "qualified", "name", "of", "a", "specific", "attribute", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java#L506-L513
mojohaus/xml-maven-plugin
src/main/java/org/codehaus/mojo/xml/format/IndentCheckSaxHandler.java
IndentCheckSaxHandler.startElement
@Override public void startElement( String uri, String localName, String qName, Attributes attributes ) throws SAXException { """ Checks indentation for a start element. @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes...
java
@Override public void startElement( String uri, String localName, String qName, Attributes attributes ) throws SAXException { flushCharacters(); IndentCheckSaxHandler.ElementEntry currentEntry = new ElementEntry( qName, lastIndent ); if ( !stack.isEmpty() ) { ...
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "attributes", ")", "throws", "SAXException", "{", "flushCharacters", "(", ")", ";", "IndentCheckSaxHandler", ".", "Ele...
Checks indentation for a start element. @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
[ "Checks", "indentation", "for", "a", "start", "element", "." ]
train
https://github.com/mojohaus/xml-maven-plugin/blob/161edde37bbfe7a472369a9675c44d91ec24561d/src/main/java/org/codehaus/mojo/xml/format/IndentCheckSaxHandler.java#L245-L285
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/NvdCveAnalyzer.java
NvdCveAnalyzer.analyzeDependency
@Override protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException { """ Analyzes a dependency and attempts to determine if there are any CPE identifiers for this dependency. @param dependency The Dependency to analyze @param engine The analysis engine @throws Analy...
java
@Override protected void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException { final CveDB cveDB = engine.getDatabase(); try { dependency.getVulnerableSoftwareIdentifiers().stream() .filter((i) -> (i instanceof CpeIdentifier)) ...
[ "@", "Override", "protected", "void", "analyzeDependency", "(", "Dependency", "dependency", ",", "Engine", "engine", ")", "throws", "AnalysisException", "{", "final", "CveDB", "cveDB", "=", "engine", ".", "getDatabase", "(", ")", ";", "try", "{", "dependency", ...
Analyzes a dependency and attempts to determine if there are any CPE identifiers for this dependency. @param dependency The Dependency to analyze @param engine The analysis engine @throws AnalysisException thrown if there is an issue analyzing the dependency
[ "Analyzes", "a", "dependency", "and", "attempts", "to", "determine", "if", "there", "are", "any", "CPE", "identifiers", "for", "this", "dependency", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/NvdCveAnalyzer.java#L55-L84
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java
DrawerUIUtils.getTextColorStateList
public static ColorStateList getTextColorStateList(int text_color, int selected_text_color) { """ helper to create a colorStateList for the text @param text_color @param selected_text_color @return """ return new ColorStateList( new int[][]{ new int[]{androi...
java
public static ColorStateList getTextColorStateList(int text_color, int selected_text_color) { return new ColorStateList( new int[][]{ new int[]{android.R.attr.state_selected}, new int[]{} }, new int[]{ ...
[ "public", "static", "ColorStateList", "getTextColorStateList", "(", "int", "text_color", ",", "int", "selected_text_color", ")", "{", "return", "new", "ColorStateList", "(", "new", "int", "[", "]", "[", "]", "{", "new", "int", "[", "]", "{", "android", ".", ...
helper to create a colorStateList for the text @param text_color @param selected_text_color @return
[ "helper", "to", "create", "a", "colorStateList", "for", "the", "text" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/util/DrawerUIUtils.java#L135-L146
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java
AbstractNewSarlElementWizardPage.isFileExists
protected static boolean isFileExists(IPackageFragment packageFragment, String filename, String extension) { """ Replies if the given filename is a SARL script in the given package. @param packageFragment the package in which the file should be search for. @param filename the filename to test. @param extensio...
java
protected static boolean isFileExists(IPackageFragment packageFragment, String filename, String extension) { if (packageFragment != null) { final IResource resource = packageFragment.getResource(); if (resource instanceof IFolder) { final IFolder folder = (IFolder) resource; if (folder.getFile(filename ...
[ "protected", "static", "boolean", "isFileExists", "(", "IPackageFragment", "packageFragment", ",", "String", "filename", ",", "String", "extension", ")", "{", "if", "(", "packageFragment", "!=", "null", ")", "{", "final", "IResource", "resource", "=", "packageFrag...
Replies if the given filename is a SARL script in the given package. @param packageFragment the package in which the file should be search for. @param filename the filename to test. @param extension the filename extension to search for. @return <code>true</code> if a file (SARL or Java) with the given name exists.
[ "Replies", "if", "the", "given", "filename", "is", "a", "SARL", "script", "in", "the", "given", "package", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L375-L386
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPublishScheduled.java
CmsPublishScheduled.actionUpdate
public void actionUpdate() throws JspException { """ Performs the resource operation, will be called by the JSP page.<p> @throws JspException if problems including sub-elements occur """ // save initialized instance of this class in request attribute for included sub-elements getJsp().getRe...
java
public void actionUpdate() throws JspException { // save initialized instance of this class in request attribute for included sub-elements getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this); try { // prepare the publish scheduled resource performDialogOpe...
[ "public", "void", "actionUpdate", "(", ")", "throws", "JspException", "{", "// save initialized instance of this class in request attribute for included sub-elements", "getJsp", "(", ")", ".", "getRequest", "(", ")", ".", "setAttribute", "(", "SESSION_WORKPLACE_CLASS", ",", ...
Performs the resource operation, will be called by the JSP page.<p> @throws JspException if problems including sub-elements occur
[ "Performs", "the", "resource", "operation", "will", "be", "called", "by", "the", "JSP", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPublishScheduled.java#L131-L145
michael-rapp/AndroidPreferenceActivity
example/src/main/java/de/mrapp/android/preference/activity/example/fragment/BehaviorPreferenceFragment.java
BehaviorPreferenceFragment.createHideNavigationChangeListener
private OnPreferenceChangeListener createHideNavigationChangeListener() { """ Creates a listener, which allows to adapt the behavior of the {@link PreferenceActivity} when the value, which determines, whether the navigation should be hidden, has been changed. @return The listener, which has been created, as an...
java
private OnPreferenceChangeListener createHideNavigationChangeListener() { return new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(final Preference preference, final Object newValue) { if (newValue != null) { boolean hideN...
[ "private", "OnPreferenceChangeListener", "createHideNavigationChangeListener", "(", ")", "{", "return", "new", "OnPreferenceChangeListener", "(", ")", "{", "@", "Override", "public", "boolean", "onPreferenceChange", "(", "final", "Preference", "preference", ",", "final", ...
Creates a listener, which allows to adapt the behavior of the {@link PreferenceActivity} when the value, which determines, whether the navigation should be hidden, has been changed. @return The listener, which has been created, as an instance of the type {@link OnPreferenceChangeListener}
[ "Creates", "a", "listener", "which", "allows", "to", "adapt", "the", "behavior", "of", "the", "{", "@link", "PreferenceActivity", "}", "when", "the", "value", "which", "determines", "whether", "the", "navigation", "should", "be", "hidden", "has", "been", "chan...
train
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/example/src/main/java/de/mrapp/android/preference/activity/example/fragment/BehaviorPreferenceFragment.java#L68-L82
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/evaluation/scores/ROCEvaluation.java
ROCEvaluation.computeROCAUC
public static <I extends ScoreIter> double computeROCAUC(Predicate<? super I> predicate, I iter) { """ Compute the area under the ROC curve given a set of positive IDs and a sorted list of (comparable, ID)s, where the comparable object is used to decided when two objects are interchangeable. @param <I> Iterat...
java
public static <I extends ScoreIter> double computeROCAUC(Predicate<? super I> predicate, I iter) { int poscnt = 0, negcnt = 0, pospre = 0, negpre = 0; double acc = 0.; while(iter.valid()) { // positive or negative match? do { if(predicate.test(iter)) { ++poscnt; } ...
[ "public", "static", "<", "I", "extends", "ScoreIter", ">", "double", "computeROCAUC", "(", "Predicate", "<", "?", "super", "I", ">", "predicate", ",", "I", "iter", ")", "{", "int", "poscnt", "=", "0", ",", "negcnt", "=", "0", ",", "pospre", "=", "0",...
Compute the area under the ROC curve given a set of positive IDs and a sorted list of (comparable, ID)s, where the comparable object is used to decided when two objects are interchangeable. @param <I> Iterator type @param predicate Predicate to test for positive objects @param iter Iterator over results, with ties. @r...
[ "Compute", "the", "area", "under", "the", "ROC", "curve", "given", "a", "set", "of", "positive", "IDs", "and", "a", "sorted", "list", "of", "(", "comparable", "ID", ")", "s", "where", "the", "comparable", "object", "is", "used", "to", "decided", "when", ...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/evaluation/scores/ROCEvaluation.java#L113-L136
jenkinsci/jenkins
cli/src/main/java/hudson/cli/PrivateKeyProvider.java
PrivateKeyProvider.readFromDefaultLocations
public boolean readFromDefaultLocations() { """ Read keys from default keyFiles {@code .ssh/id_rsa}, {@code .ssh/id_dsa} and {@code .ssh/identity}. @return true if some key was read successfully. """ final File home = new File(System.getProperty("user.home")); boolean read = false; ...
java
public boolean readFromDefaultLocations() { final File home = new File(System.getProperty("user.home")); boolean read = false; for (String path : new String[] {".ssh/id_rsa", ".ssh/id_dsa", ".ssh/identity"}) { final File key = new File(home, path); if (!key.exists()) con...
[ "public", "boolean", "readFromDefaultLocations", "(", ")", "{", "final", "File", "home", "=", "new", "File", "(", "System", ".", "getProperty", "(", "\"user.home\"", ")", ")", ";", "boolean", "read", "=", "false", ";", "for", "(", "String", "path", ":", ...
Read keys from default keyFiles {@code .ssh/id_rsa}, {@code .ssh/id_dsa} and {@code .ssh/identity}. @return true if some key was read successfully.
[ "Read", "keys", "from", "default", "keyFiles" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/cli/src/main/java/hudson/cli/PrivateKeyProvider.java#L77-L99
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeUtils.java
FlowTypeUtils.declareThisWithin
public static Environment declareThisWithin(Decl.FunctionOrMethod decl, Environment environment) { """ Update the environment to reflect the fact that the special "this" lifetime is contained within all declared lifetime parameters. Observe that this only makes sense if the enclosing declaration is for a method....
java
public static Environment declareThisWithin(Decl.FunctionOrMethod decl, Environment environment) { if (decl instanceof Decl.Method) { Decl.Method method = (Decl.Method) decl; environment = environment.declareWithin("this", method.getLifetimes()); } return environment; }
[ "public", "static", "Environment", "declareThisWithin", "(", "Decl", ".", "FunctionOrMethod", "decl", ",", "Environment", "environment", ")", "{", "if", "(", "decl", "instanceof", "Decl", ".", "Method", ")", "{", "Decl", ".", "Method", "method", "=", "(", "D...
Update the environment to reflect the fact that the special "this" lifetime is contained within all declared lifetime parameters. Observe that this only makes sense if the enclosing declaration is for a method. @param decl @param environment @return
[ "Update", "the", "environment", "to", "reflect", "the", "fact", "that", "the", "special", "this", "lifetime", "is", "contained", "within", "all", "declared", "lifetime", "parameters", ".", "Observe", "that", "this", "only", "makes", "sense", "if", "the", "encl...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeUtils.java#L70-L76
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java
BugInstance.addParameterAnnotation
@Nonnull public BugInstance addParameterAnnotation(int index, String role) { """ Add an annotation about a parameter @param index parameter index, starting from 0 @param role the role used to describe the parameter """ return addInt(index + 1).describe(role); }
java
@Nonnull public BugInstance addParameterAnnotation(int index, String role) { return addInt(index + 1).describe(role); }
[ "@", "Nonnull", "public", "BugInstance", "addParameterAnnotation", "(", "int", "index", ",", "String", "role", ")", "{", "return", "addInt", "(", "index", "+", "1", ")", ".", "describe", "(", "role", ")", ";", "}" ]
Add an annotation about a parameter @param index parameter index, starting from 0 @param role the role used to describe the parameter
[ "Add", "an", "annotation", "about", "a", "parameter" ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L1544-L1547
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10Attribute
public static void escapeXml10Attribute(final Reader reader, final Writer writer) throws IOException { """ <p> Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation on a <tt>Reader</tt> input meant to be an XML attribute value, writing results to a ...
java
public static void escapeXml10Attribute(final Reader reader, final Writer writer) throws IOException { escapeXml(reader, writer, XmlEscapeSymbols.XML10_ATTRIBUTE_SYMBOLS, XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA, XmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_P...
[ "public", "static", "void", "escapeXml10Attribute", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeXml", "(", "reader", ",", "writer", ",", "XmlEscapeSymbols", ".", "XML10_ATTRIBUTE_SYMBOLS", ",", "Xml...
<p> Perform an XML 1.0 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation on a <tt>Reader</tt> input meant to be an XML attribute value, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The five markup-significant characters...
[ "<p", ">", "Perform", "an", "XML", "1", ".", "0", "level", "2", "(", "markup", "-", "significant", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1502-L1507
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemSort.java
ElemSort.setSelect
public void setSelect(XPath v) { """ Set the "select" attribute. xsl:sort has a select attribute whose value is an expression. For each node to be processed, the expression is evaluated with that node as the current node and with the complete list of nodes being processed in unsorted order as the current node...
java
public void setSelect(XPath v) { if (v.getPatternString().indexOf("{") < 0) m_selectExpression = v; else error(XSLTErrorResources.ER_NO_CURLYBRACE, null); }
[ "public", "void", "setSelect", "(", "XPath", "v", ")", "{", "if", "(", "v", ".", "getPatternString", "(", ")", ".", "indexOf", "(", "\"{\"", ")", "<", "0", ")", "m_selectExpression", "=", "v", ";", "else", "error", "(", "XSLTErrorResources", ".", "ER_N...
Set the "select" attribute. xsl:sort has a select attribute whose value is an expression. For each node to be processed, the expression is evaluated with that node as the current node and with the complete list of nodes being processed in unsorted order as the current node list. The resulting object is converted to a s...
[ "Set", "the", "select", "attribute", ".", "xsl", ":", "sort", "has", "a", "select", "attribute", "whose", "value", "is", "an", "expression", ".", "For", "each", "node", "to", "be", "processed", "the", "expression", "is", "evaluated", "with", "that", "node"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemSort.java#L70-L77
DavidPizarro/PinView
library/src/main/java/com/dpizarro/pinview/library/PinViewBaseHelper.java
PinViewBaseHelper.generatePinBox
EditText generatePinBox(int i, int inputType) { """ Generate a PinBox {@link EditText} with all attributes to add to {@link PinView} @param i index of new PinBox @param inputType inputType to new PinBox @return new PinBox """ EditText editText = (EditText) LayoutInflater.from(getContext()).inflate...
java
EditText generatePinBox(int i, int inputType) { EditText editText = (EditText) LayoutInflater.from(getContext()).inflate(R.layout.partial_pin_box, this, false); int generateViewId = PinViewUtils.generateViewId(); editText.setId(generateViewId); editText.setTag(i); if (inputType !...
[ "EditText", "generatePinBox", "(", "int", "i", ",", "int", "inputType", ")", "{", "EditText", "editText", "=", "(", "EditText", ")", "LayoutInflater", ".", "from", "(", "getContext", "(", ")", ")", ".", "inflate", "(", "R", ".", "layout", ".", "partial_p...
Generate a PinBox {@link EditText} with all attributes to add to {@link PinView} @param i index of new PinBox @param inputType inputType to new PinBox @return new PinBox
[ "Generate", "a", "PinBox", "{", "@link", "EditText", "}", "with", "all", "attributes", "to", "add", "to", "{", "@link", "PinView", "}" ]
train
https://github.com/DavidPizarro/PinView/blob/b171a89694921475b5442585810b8475ef1cfe35/library/src/main/java/com/dpizarro/pinview/library/PinViewBaseHelper.java#L178-L193
OpenLiberty/open-liberty
dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java
RecoveryDirectorImpl.driveCallBacks
private void driveCallBacks(int stage, FailureScope failureScope) { """ <p> Internal method to drive a callback operation onto registered callback objects. Available 'stage' values are defined in this class and consist of the following: </p> <p> <ul> <li>CALLBACK_RECOVERYSTARTED</li> <li>CALLBACK_RECOVERY...
java
private void driveCallBacks(int stage, FailureScope failureScope) { if (tc.isEntryEnabled()) { switch (stage) { case CALLBACK_RECOVERYSTARTED: Tr.entry(tc, "driveCallBacks", new Object[] { "CALLBACK_RECOVERYSTARTED", failureScope }); break; ...
[ "private", "void", "driveCallBacks", "(", "int", "stage", ",", "FailureScope", "failureScope", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "switch", "(", "stage", ")", "{", "case", "CALLBACK_RECOVERYSTARTED", ":", "Tr", ".", "entr...
<p> Internal method to drive a callback operation onto registered callback objects. Available 'stage' values are defined in this class and consist of the following: </p> <p> <ul> <li>CALLBACK_RECOVERYSTARTED</li> <li>CALLBACK_RECOVERYCOMPLETE</li> <li>CALLBACK_TERMINATIONSTARTED</li> <li>CALLBACK_TERMINATIONCOMPLETE</...
[ "<p", ">", "Internal", "method", "to", "drive", "a", "callback", "operation", "onto", "registered", "callback", "objects", ".", "Available", "stage", "values", "are", "defined", "in", "this", "class", "and", "consist", "of", "the", "following", ":", "<", "/"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L1551-L1604
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java
JobState.toJson
public void toJson(JsonWriter jsonWriter, boolean keepConfig) throws IOException { """ Convert this {@link JobState} to a json document. @param jsonWriter a {@link com.google.gson.stream.JsonWriter} used to write the json document @param keepConfig whether to keep all configuration properties @throws I...
java
public void toJson(JsonWriter jsonWriter, boolean keepConfig) throws IOException { jsonWriter.beginObject(); writeStateSummary(jsonWriter); jsonWriter.name("task states"); jsonWriter.beginArray(); for (TaskState taskState : this.taskStates.values()) { taskState.toJson(jsonWriter, keepCo...
[ "public", "void", "toJson", "(", "JsonWriter", "jsonWriter", ",", "boolean", "keepConfig", ")", "throws", "IOException", "{", "jsonWriter", ".", "beginObject", "(", ")", ";", "writeStateSummary", "(", "jsonWriter", ")", ";", "jsonWriter", ".", "name", "(", "\"...
Convert this {@link JobState} to a json document. @param jsonWriter a {@link com.google.gson.stream.JsonWriter} used to write the json document @param keepConfig whether to keep all configuration properties @throws IOException
[ "Convert", "this", "{", "@link", "JobState", "}", "to", "a", "json", "document", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobState.java#L585-L606
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/common/util/ProxyHelper.java
ProxyHelper.getClassLoaderForInterfaces
private ClassLoader getClassLoaderForInterfaces(final ClassLoader loader, final Class<?>[] interfaces) { """ Return a classloader that can see all the given interfaces If the given loader can see all interfaces then it is used. If not then a combined classloader of all interface classloaders is returned. @para...
java
private ClassLoader getClassLoaderForInterfaces(final ClassLoader loader, final Class<?>[] interfaces) { if (canSeeAllInterfaces(loader, interfaces)) { LOG.log(Level.FINE, "current classloader " + loader + " can see all interface"); return loader; } String sortedNameFromI...
[ "private", "ClassLoader", "getClassLoaderForInterfaces", "(", "final", "ClassLoader", "loader", ",", "final", "Class", "<", "?", ">", "[", "]", "interfaces", ")", "{", "if", "(", "canSeeAllInterfaces", "(", "loader", ",", "interfaces", ")", ")", "{", "LOG", ...
Return a classloader that can see all the given interfaces If the given loader can see all interfaces then it is used. If not then a combined classloader of all interface classloaders is returned. @param loader use supplied class loader @param interfaces @return classloader that sees all interfaces
[ "Return", "a", "classloader", "that", "can", "see", "all", "the", "given", "interfaces", "If", "the", "given", "loader", "can", "see", "all", "interfaces", "then", "it", "is", "used", ".", "If", "not", "then", "a", "combined", "classloader", "of", "all", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/common/util/ProxyHelper.java#L61-L89
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/hashing/DataHasher.java
DataHasher.getHash
public final DataHash getHash() { """ Gets the final hash value for the digest. <p> This will not reset hash calculation.</p> @return hashValue with computed hash value. @throws HashException when exception occurs during hash calculation. """ if (outputHash == null) { byte[] hash = m...
java
public final DataHash getHash() { if (outputHash == null) { byte[] hash = messageDigest.digest(); outputHash = new DataHash(algorithm, hash); } return outputHash; }
[ "public", "final", "DataHash", "getHash", "(", ")", "{", "if", "(", "outputHash", "==", "null", ")", "{", "byte", "[", "]", "hash", "=", "messageDigest", ".", "digest", "(", ")", ";", "outputHash", "=", "new", "DataHash", "(", "algorithm", ",", "hash",...
Gets the final hash value for the digest. <p> This will not reset hash calculation.</p> @return hashValue with computed hash value. @throws HashException when exception occurs during hash calculation.
[ "Gets", "the", "final", "hash", "value", "for", "the", "digest", ".", "<p", ">", "This", "will", "not", "reset", "hash", "calculation", ".", "<", "/", "p", ">" ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/hashing/DataHasher.java#L268-L274
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.uploadAttachment
public WikiAttachment uploadAttachment(Object projectIdOrPath, File fileToUpload, String branch) throws GitLabApiException { """ Uploads a file to the attachment folder inside the wiki’s repository. The attachment folder is the uploads folder. <pre><code>POST /projects/:id/wikis/attachments</code></pre> @par...
java
public WikiAttachment uploadAttachment(Object projectIdOrPath, File fileToUpload, String branch) throws GitLabApiException { URL url; try { url = getApiClient().getApiUrl("projects", getProjectIdOrPath(projectIdOrPath), "wikis", "attachments"); } catch (IOException ioe) { ...
[ "public", "WikiAttachment", "uploadAttachment", "(", "Object", "projectIdOrPath", ",", "File", "fileToUpload", ",", "String", "branch", ")", "throws", "GitLabApiException", "{", "URL", "url", ";", "try", "{", "url", "=", "getApiClient", "(", ")", ".", "getApiUrl...
Uploads a file to the attachment folder inside the wiki’s repository. The attachment folder is the uploads folder. <pre><code>POST /projects/:id/wikis/attachments</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param fileToUpl...
[ "Uploads", "a", "file", "to", "the", "attachment", "folder", "inside", "the", "wiki’s", "repository", ".", "The", "attachment", "folder", "is", "the", "uploads", "folder", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L196-L208
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueConstraintsMatcher.java
ValueConstraintsMatcher.parsePathMatcher
protected JCRPathMatcher parsePathMatcher(LocationFactory locFactory, String path) throws RepositoryException { """ Parses JCR path matcher from string. @param path @return @throws RepositoryException """ JCRPath knownPath = null; boolean forDescendants = false; boolean forAncestors = f...
java
protected JCRPathMatcher parsePathMatcher(LocationFactory locFactory, String path) throws RepositoryException { JCRPath knownPath = null; boolean forDescendants = false; boolean forAncestors = false; if (path.equals("*") || path.equals(".*")) { // any forDescendants ...
[ "protected", "JCRPathMatcher", "parsePathMatcher", "(", "LocationFactory", "locFactory", ",", "String", "path", ")", "throws", "RepositoryException", "{", "JCRPath", "knownPath", "=", "null", ";", "boolean", "forDescendants", "=", "false", ";", "boolean", "forAncestor...
Parses JCR path matcher from string. @param path @return @throws RepositoryException
[ "Parses", "JCR", "path", "matcher", "from", "string", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/ValueConstraintsMatcher.java#L405-L440
mikepenz/FastAdapter
app/src/main/java/com/mikepenz/fastadapter/app/adapters/StickyHeaderAdapter.java
StickyHeaderAdapter.onBindViewHolder
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { """ the onBindViewHolder is managed by the FastAdapter so forward this correctly @param holder @param position """ mFastAdapter.onBindViewHolder(holder, position); }
java
@Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { mFastAdapter.onBindViewHolder(holder, position); }
[ "@", "Override", "public", "void", "onBindViewHolder", "(", "RecyclerView", ".", "ViewHolder", "holder", ",", "int", "position", ")", "{", "mFastAdapter", ".", "onBindViewHolder", "(", "holder", ",", "position", ")", ";", "}" ]
the onBindViewHolder is managed by the FastAdapter so forward this correctly @param holder @param position
[ "the", "onBindViewHolder", "is", "managed", "by", "the", "FastAdapter", "so", "forward", "this", "correctly" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/app/src/main/java/com/mikepenz/fastadapter/app/adapters/StickyHeaderAdapter.java#L190-L193
JodaOrg/joda-money
src/main/java/org/joda/money/CurrencyUnitDataProvider.java
CurrencyUnitDataProvider.registerCountry
protected final void registerCountry(String countryCode, String currencyCode) { """ Registers a country allowing it to be used. <p> This method is called by {@link #registerCurrencies()} to perform the actual creation of a country. @param countryCode the country code, not null @param currencyCode the curr...
java
protected final void registerCountry(String countryCode, String currencyCode) { CurrencyUnit.registerCountry(countryCode, CurrencyUnit.of(currencyCode)); }
[ "protected", "final", "void", "registerCountry", "(", "String", "countryCode", ",", "String", "currencyCode", ")", "{", "CurrencyUnit", ".", "registerCountry", "(", "countryCode", ",", "CurrencyUnit", ".", "of", "(", "currencyCode", ")", ")", ";", "}" ]
Registers a country allowing it to be used. <p> This method is called by {@link #registerCurrencies()} to perform the actual creation of a country. @param countryCode the country code, not null @param currencyCode the currency code, not null
[ "Registers", "a", "country", "allowing", "it", "to", "be", "used", ".", "<p", ">", "This", "method", "is", "called", "by", "{", "@link", "#registerCurrencies", "()", "}", "to", "perform", "the", "actual", "creation", "of", "a", "country", "." ]
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/CurrencyUnitDataProvider.java#L54-L56
grpc/grpc-java
core/src/main/java/io/grpc/internal/ServiceConfigUtil.java
ServiceConfigUtil.durationIsValid
private static boolean durationIsValid(long seconds, int nanos) { """ Returns true if the given number of seconds and nanos is a valid {@code Duration}. The {@code seconds} value must be in the range [-315,576,000,000, +315,576,000,000]. The {@code nanos} value must be in the range [-999,999,999, +999,999,999]. ...
java
private static boolean durationIsValid(long seconds, int nanos) { if (seconds < DURATION_SECONDS_MIN || seconds > DURATION_SECONDS_MAX) { return false; } if (nanos < -999999999L || nanos >= NANOS_PER_SECOND) { return false; } if (seconds < 0 || nanos < 0) { if (seconds > 0 || nanos...
[ "private", "static", "boolean", "durationIsValid", "(", "long", "seconds", ",", "int", "nanos", ")", "{", "if", "(", "seconds", "<", "DURATION_SECONDS_MIN", "||", "seconds", ">", "DURATION_SECONDS_MAX", ")", "{", "return", "false", ";", "}", "if", "(", "nano...
Returns true if the given number of seconds and nanos is a valid {@code Duration}. The {@code seconds} value must be in the range [-315,576,000,000, +315,576,000,000]. The {@code nanos} value must be in the range [-999,999,999, +999,999,999]. <p><b>Note:</b> Durations less than one second are represented with a 0 {@co...
[ "Returns", "true", "if", "the", "given", "number", "of", "seconds", "and", "nanos", "is", "a", "valid", "{", "@code", "Duration", "}", ".", "The", "{", "@code", "seconds", "}", "value", "must", "be", "in", "the", "range", "[", "-", "315", "576", "000...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/ServiceConfigUtil.java#L637-L650
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/AddUniformScale.java
AddUniformScale.run
private ScalesResult run(Relation<? extends NumberVector> rel) { """ Add scales to a single vector relation. @param rel Relation @return Scales """ double[][] mms = RelationUtil.computeMinMax(rel); int dim = mms[0].length; double delta = 0.; for(int d = 0; d < dim; d++) { double del =...
java
private ScalesResult run(Relation<? extends NumberVector> rel) { double[][] mms = RelationUtil.computeMinMax(rel); int dim = mms[0].length; double delta = 0.; for(int d = 0; d < dim; d++) { double del = mms[1][d] - mms[0][d]; delta = del > delta ? del : delta; } if(delta < Double.MIN...
[ "private", "ScalesResult", "run", "(", "Relation", "<", "?", "extends", "NumberVector", ">", "rel", ")", "{", "double", "[", "]", "[", "]", "mms", "=", "RelationUtil", ".", "computeMinMax", "(", "rel", ")", ";", "int", "dim", "=", "mms", "[", "0", "]...
Add scales to a single vector relation. @param rel Relation @return Scales
[ "Add", "scales", "to", "a", "single", "vector", "relation", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/AddUniformScale.java#L73-L95
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/DisplayUtil.java
DisplayUtil.pixelsToDp
public static int pixelsToDp(@NonNull final Context context, final int pixels) { """ Converts an {@link Integer} value, which is measured in pixels, into a value, which is measured in dp. @param context The context, which should be used, as an instance of the class {@link Context}. The context may not be nul...
java
public static int pixelsToDp(@NonNull final Context context, final int pixels) { Condition.INSTANCE.ensureNotNull(context, "The context may not be null"); DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); return Math.round(pixels / (displayMetrics.densityDpi / PIXEL_DP_...
[ "public", "static", "int", "pixelsToDp", "(", "@", "NonNull", "final", "Context", "context", ",", "final", "int", "pixels", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureNotNull", "(", "context", ",", "\"The context may not be null\"", ")", ";", "DisplayMe...
Converts an {@link Integer} value, which is measured in pixels, into a value, which is measured in dp. @param context The context, which should be used, as an instance of the class {@link Context}. The context may not be null @param pixels The pixel value, which should be converted, as an {@link Integer} value @return...
[ "Converts", "an", "{", "@link", "Integer", "}", "value", "which", "is", "measured", "in", "pixels", "into", "a", "value", "which", "is", "measured", "in", "dp", "." ]
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/DisplayUtil.java#L147-L151
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java
JacksonDBCollection.updateMulti
public WriteResult<T, K> updateMulti(T query, T object) throws MongoException { """ calls {@link DBCollection#update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean)} with upsert=false and multi=true @param query search query for old object to update @param object object with which to update <tt>...
java
public WriteResult<T, K> updateMulti(T query, T object) throws MongoException { return update(query, object, false, true); }
[ "public", "WriteResult", "<", "T", ",", "K", ">", "updateMulti", "(", "T", "query", ",", "T", "object", ")", "throws", "MongoException", "{", "return", "update", "(", "query", ",", "object", ",", "false", ",", "true", ")", ";", "}" ]
calls {@link DBCollection#update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean)} with upsert=false and multi=true @param query search query for old object to update @param object object with which to update <tt>query</tt> @return The result @throws MongoException If an error occurred
[ "calls", "{", "@link", "DBCollection#update", "(", "com", ".", "mongodb", ".", "DBObject", "com", ".", "mongodb", ".", "DBObject", "boolean", "boolean", ")", "}", "with", "upsert", "=", "false", "and", "multi", "=", "true" ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/JacksonDBCollection.java#L507-L509
xwiki/xwiki-rendering
xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java
WikiScannerUtil.skipSequence
public static int skipSequence(char[] array, int arrayPos, char[] sequence) { """ Skips the specified sequence if it starts from the given position in the character array. @param array the array of characters @param arrayPos the position of the first character in the array; starting from this position the se...
java
public static int skipSequence(char[] array, int arrayPos, char[] sequence) { int i; int j; for (i = arrayPos, j = 0; i < array.length && j < sequence.length; i++, j++) { if (array[i] != sequence[j]) { break; } } return j == sequence.le...
[ "public", "static", "int", "skipSequence", "(", "char", "[", "]", "array", ",", "int", "arrayPos", ",", "char", "[", "]", "sequence", ")", "{", "int", "i", ";", "int", "j", ";", "for", "(", "i", "=", "arrayPos", ",", "j", "=", "0", ";", "i", "<...
Skips the specified sequence if it starts from the given position in the character array. @param array the array of characters @param arrayPos the position of the first character in the array; starting from this position the sequence should be skipped @param sequence the sequence of characters to skip @return a new va...
[ "Skips", "the", "specified", "sequence", "if", "it", "starts", "from", "the", "given", "position", "in", "the", "character", "array", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/impl/WikiScannerUtil.java#L301-L311
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/misc/TriangularSolver_DSCC.java
TriangularSolver_DSCC.solveL
public static void solveL(DMatrixSparseCSC L , double []x ) { """ Solves for a lower triangular matrix against a dense matrix. L*x = b @param L Lower triangular matrix. Diagonal elements are assumed to be non-zero @param x (Input) Solution matrix 'b'. (Output) matrix 'x' """ final int N = L.numCo...
java
public static void solveL(DMatrixSparseCSC L , double []x ) { final int N = L.numCols; int idx0 = L.col_idx[0]; for (int col = 0; col < N; col++) { int idx1 = L.col_idx[col+1]; double x_j = x[col] /= L.nz_values[idx0]; for (int i = idx0+1; i < idx1; i++...
[ "public", "static", "void", "solveL", "(", "DMatrixSparseCSC", "L", ",", "double", "[", "]", "x", ")", "{", "final", "int", "N", "=", "L", ".", "numCols", ";", "int", "idx0", "=", "L", ".", "col_idx", "[", "0", "]", ";", "for", "(", "int", "col",...
Solves for a lower triangular matrix against a dense matrix. L*x = b @param L Lower triangular matrix. Diagonal elements are assumed to be non-zero @param x (Input) Solution matrix 'b'. (Output) matrix 'x'
[ "Solves", "for", "a", "lower", "triangular", "matrix", "against", "a", "dense", "matrix", ".", "L", "*", "x", "=", "b" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/misc/TriangularSolver_DSCC.java#L40-L57
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/action/menu/DeleteFeatureAction.java
DeleteFeatureAction.onClick
public void onClick(MenuItemClickEvent event) { """ Prepare a FeatureTransaction for deletion of the selected feature, and ask if the user wants to continue. If he/she does, the feature will be deselected and then the FeatureTransaction will be committed. """ if (feature != null && feature.isSelected()) { ...
java
public void onClick(MenuItemClickEvent event) { if (feature != null && feature.isSelected()) { SC.confirm( I18nProvider.getGlobal().confirmDeleteFeature(feature.getLabel(), feature.getLayer().getLabel()), new BooleanCallback() { public void execute(Boolean value) { if (value) { feat...
[ "public", "void", "onClick", "(", "MenuItemClickEvent", "event", ")", "{", "if", "(", "feature", "!=", "null", "&&", "feature", ".", "isSelected", "(", ")", ")", "{", "SC", ".", "confirm", "(", "I18nProvider", ".", "getGlobal", "(", ")", ".", "confirmDel...
Prepare a FeatureTransaction for deletion of the selected feature, and ask if the user wants to continue. If he/she does, the feature will be deselected and then the FeatureTransaction will be committed.
[ "Prepare", "a", "FeatureTransaction", "for", "deletion", "of", "the", "selected", "feature", "and", "ask", "if", "the", "user", "wants", "to", "continue", ".", "If", "he", "/", "she", "does", "the", "feature", "will", "be", "deselected", "and", "then", "th...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/action/menu/DeleteFeatureAction.java#L62-L79
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java
BaseExchangeRateProvider.getExchangeRate
public ExchangeRate getExchangeRate(String baseCode, String termCode) { """ Access a {@link javax.money.convert.ExchangeRate} using the given currencies. The {@link javax.money.convert.ExchangeRate} may be, depending on the data provider, eal-time or deferred. This method should return the rate that is <i>curren...
java
public ExchangeRate getExchangeRate(String baseCode, String termCode){ return getExchangeRate(Monetary.getCurrency(baseCode), Monetary.getCurrency(termCode)); }
[ "public", "ExchangeRate", "getExchangeRate", "(", "String", "baseCode", ",", "String", "termCode", ")", "{", "return", "getExchangeRate", "(", "Monetary", ".", "getCurrency", "(", "baseCode", ")", ",", "Monetary", ".", "getCurrency", "(", "termCode", ")", ")", ...
Access a {@link javax.money.convert.ExchangeRate} using the given currencies. The {@link javax.money.convert.ExchangeRate} may be, depending on the data provider, eal-time or deferred. This method should return the rate that is <i>currently</i> valid. @param baseCode base currency code, not {@code null} @param termCod...
[ "Access", "a", "{", "@link", "javax", ".", "money", ".", "convert", ".", "ExchangeRate", "}", "using", "the", "given", "currencies", ".", "The", "{", "@link", "javax", ".", "money", ".", "convert", ".", "ExchangeRate", "}", "may", "be", "depending", "on"...
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java#L139-L141
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/RTMPConnection.java
RTMPConnection.createOutputStream
public OutputStream createOutputStream(Number streamId) { """ Creates output stream object from stream id. Output stream consists of audio, video, and data channels. @see org.red5.server.stream.OutputStream @param streamId Stream id @return Output stream object """ int channelId = getChannelIdFo...
java
public OutputStream createOutputStream(Number streamId) { int channelId = getChannelIdForStreamId(streamId); if (log.isTraceEnabled()) { log.trace("Create output - stream id: {} channel id: {}", streamId, channelId); } final Channel data = getChannel(channelId++); ...
[ "public", "OutputStream", "createOutputStream", "(", "Number", "streamId", ")", "{", "int", "channelId", "=", "getChannelIdForStreamId", "(", "streamId", ")", ";", "if", "(", "log", ".", "isTraceEnabled", "(", ")", ")", "{", "log", ".", "trace", "(", "\"Crea...
Creates output stream object from stream id. Output stream consists of audio, video, and data channels. @see org.red5.server.stream.OutputStream @param streamId Stream id @return Output stream object
[ "Creates", "output", "stream", "object", "from", "stream", "id", ".", "Output", "stream", "consists", "of", "audio", "video", "and", "data", "channels", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java#L887-L899
jfinal/jfinal
src/main/java/com/jfinal/core/Controller.java
Controller.setCookie
public Controller setCookie(String name, String value, int maxAgeInSeconds, String path, boolean isHttpOnly) { """ Set Cookie to response. @param name cookie name @param value cookie value @param maxAgeInSeconds -1: clear cookie when close browser. 0: clear cookie immediately. n>0 : max age in n seconds. @par...
java
public Controller setCookie(String name, String value, int maxAgeInSeconds, String path, boolean isHttpOnly) { return doSetCookie(name, value, maxAgeInSeconds, path, null, isHttpOnly); }
[ "public", "Controller", "setCookie", "(", "String", "name", ",", "String", "value", ",", "int", "maxAgeInSeconds", ",", "String", "path", ",", "boolean", "isHttpOnly", ")", "{", "return", "doSetCookie", "(", "name", ",", "value", ",", "maxAgeInSeconds", ",", ...
Set Cookie to response. @param name cookie name @param value cookie value @param maxAgeInSeconds -1: clear cookie when close browser. 0: clear cookie immediately. n>0 : max age in n seconds. @param path see Cookie.setPath(String) @param isHttpOnly true if this cookie is to be marked as HttpOnly, false otherwise
[ "Set", "Cookie", "to", "response", "." ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/core/Controller.java#L608-L610
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getEventHubConsumerGroupAsync
public Observable<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { """ Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. Get a consumer group from the Event Hub-compati...
java
public Observable<EventHubConsumerGroupInfoInner> getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { return getEventHubConsumerGroupWithServiceResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name).map(new Func1<ServiceRes...
[ "public", "Observable", "<", "EventHubConsumerGroupInfoInner", ">", "getEventHubConsumerGroupAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "eventHubEndpointName", ",", "String", "name", ")", "{", "return", "getEventHubConsumerGrou...
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @param ...
[ "Get", "a", "consumer", "group", "from", "the", "Event", "Hub", "-", "compatible", "device", "-", "to", "-", "cloud", "endpoint", "for", "an", "IoT", "hub", ".", "Get", "a", "consumer", "group", "from", "the", "Event", "Hub", "-", "compatible", "device",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L1801-L1808
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/SamlSettingsApi.java
SamlSettingsApi.postAnyLocations
public SetAnyLocationsResponse postAnyLocations(String region, SettingsData data) throws ApiException { """ Set region settings. Change region settings. @param region The name of region (required) @param data (required) @return SetAnyLocationsResponse @throws ApiException If fail to call the API, e.g. server...
java
public SetAnyLocationsResponse postAnyLocations(String region, SettingsData data) throws ApiException { ApiResponse<SetAnyLocationsResponse> resp = postAnyLocationsWithHttpInfo(region, data); return resp.getData(); }
[ "public", "SetAnyLocationsResponse", "postAnyLocations", "(", "String", "region", ",", "SettingsData", "data", ")", "throws", "ApiException", "{", "ApiResponse", "<", "SetAnyLocationsResponse", ">", "resp", "=", "postAnyLocationsWithHttpInfo", "(", "region", ",", "data"...
Set region settings. Change region settings. @param region The name of region (required) @param data (required) @return SetAnyLocationsResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Set", "region", "settings", ".", "Change", "region", "settings", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/SamlSettingsApi.java#L757-L760
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.extractWords
public static List<WordInfo> extractWords(BufferedReader reader, int size, boolean newWordsOnly, int max_word_len, float min_freq, float min_entropy, float min_aggregation) throws IOException { """ 提取词语(新词发现) @param reader 从reader获取文本 @param size 需要提取词语的数量 @param newWordsOnly 是否只提取词典中没有...
java
public static List<WordInfo> extractWords(BufferedReader reader, int size, boolean newWordsOnly, int max_word_len, float min_freq, float min_entropy, float min_aggregation) throws IOException { NewWordDiscover discover = new NewWordDiscover(max_word_len, min_freq, min_entropy, min_aggregation, newWordsOnly)...
[ "public", "static", "List", "<", "WordInfo", ">", "extractWords", "(", "BufferedReader", "reader", ",", "int", "size", ",", "boolean", "newWordsOnly", ",", "int", "max_word_len", ",", "float", "min_freq", ",", "float", "min_entropy", ",", "float", "min_aggregati...
提取词语(新词发现) @param reader 从reader获取文本 @param size 需要提取词语的数量 @param newWordsOnly 是否只提取词典中没有的词语 @param max_word_len 词语最长长度 @param min_freq 词语最低频率 @param min_entropy 词语最低熵 @param min_aggregation 词语最低互信息 @return 一个词语列表
[ "提取词语(新词发现)" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L789-L793
palatable/lambda
src/main/java/com/jnape/palatable/lambda/optics/lenses/MapLens.java
MapLens.mappingValues
public static <K, V, V2> Lens.Simple<Map<K, V>, Map<K, V2>> mappingValues(Iso<V, V, V2, V2> iso) { """ A lens that focuses on a map while mapping its values with the mapping {@link Iso}. <p> Note that for this lens to be lawful, <code>iso</code> must be lawful. @param iso the mapping {@link Iso} @param <K> ...
java
public static <K, V, V2> Lens.Simple<Map<K, V>, Map<K, V2>> mappingValues(Iso<V, V, V2, V2> iso) { return simpleLens(m -> toMap(HashMap::new, map(t -> t.biMapR(view(iso)), map(Tuple2::fromEntry, m.entrySet()))), (s, b) -> view(mappingValues(iso.mirror()), b)); }
[ "public", "static", "<", "K", ",", "V", ",", "V2", ">", "Lens", ".", "Simple", "<", "Map", "<", "K", ",", "V", ">", ",", "Map", "<", "K", ",", "V2", ">", ">", "mappingValues", "(", "Iso", "<", "V", ",", "V", ",", "V2", ",", "V2", ">", "is...
A lens that focuses on a map while mapping its values with the mapping {@link Iso}. <p> Note that for this lens to be lawful, <code>iso</code> must be lawful. @param iso the mapping {@link Iso} @param <K> the key type @param <V> the unfocused map value type @param <V2> the focused map value type @return a lens that...
[ "A", "lens", "that", "focuses", "on", "a", "map", "while", "mapping", "its", "values", "with", "the", "mapping", "{", "@link", "Iso", "}", ".", "<p", ">", "Note", "that", "for", "this", "lens", "to", "be", "lawful", "<code", ">", "iso<", "/", "code",...
train
https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/optics/lenses/MapLens.java#L191-L194
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/sdcard.java
sdcard.renameOrMove
public static boolean renameOrMove(File fileToBeMoved, File destination) { """ Renames or moves a determined {@link File} instance to a destination defined by another {@link File} instance.<br> Differs from the {@link File#renameTo(File)} method in the fact that this method logs if the operation was successful.<...
java
public static boolean renameOrMove(File fileToBeMoved, File destination) { boolean result = fileToBeMoved.renameTo(destination); if (result) { log.d("File " + fileToBeMoved.getPath() + " was succesfully renamed or moved."); } else { log.e("File " + fileToBeMoved.getP...
[ "public", "static", "boolean", "renameOrMove", "(", "File", "fileToBeMoved", ",", "File", "destination", ")", "{", "boolean", "result", "=", "fileToBeMoved", ".", "renameTo", "(", "destination", ")", ";", "if", "(", "result", ")", "{", "log", ".", "d", "("...
Renames or moves a determined {@link File} instance to a destination defined by another {@link File} instance.<br> Differs from the {@link File#renameTo(File)} method in the fact that this method logs if the operation was successful.<br> @see File#renameTo(File) @param fileToBeMoved The file to be renamed or moved. @p...
[ "Renames", "or", "moves", "a", "determined", "{", "@link", "File", "}", "instance", "to", "a", "destination", "defined", "by", "another", "{", "@link", "File", "}", "instance", ".", "<br", ">", "Differs", "from", "the", "{", "@link", "File#renameTo", "(", ...
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/sdcard.java#L439-L447
LachlanMcKee/gsonpath
library/src/main/java/gsonpath/GsonPath.java
GsonPath.createTypeAdapterFactory
public static TypeAdapterFactory createTypeAdapterFactory(Class<? extends TypeAdapterFactory> clazz) { """ Creates an instance of an {@link TypeAdapterFactory} implementation class that implements the input interface. <p> This factory is used to map the auto generated {@link com.google.gson.TypeAdapter} classes ...
java
public static TypeAdapterFactory createTypeAdapterFactory(Class<? extends TypeAdapterFactory> clazz) { String factoryClassName = clazz.getCanonicalName() + FACTORY_IMPLEMENTATION_SUFFIX; try { return (TypeAdapterFactory) Class.forName(factoryClassName).newInstance(); } catch (Excepti...
[ "public", "static", "TypeAdapterFactory", "createTypeAdapterFactory", "(", "Class", "<", "?", "extends", "TypeAdapterFactory", ">", "clazz", ")", "{", "String", "factoryClassName", "=", "clazz", ".", "getCanonicalName", "(", ")", "+", "FACTORY_IMPLEMENTATION_SUFFIX", ...
Creates an instance of an {@link TypeAdapterFactory} implementation class that implements the input interface. <p> This factory is used to map the auto generated {@link com.google.gson.TypeAdapter} classes created using the {@link gsonpath.AutoGsonAdapter} annotation. <p> Only a single use of reflection is used within ...
[ "Creates", "an", "instance", "of", "an", "{", "@link", "TypeAdapterFactory", "}", "implementation", "class", "that", "implements", "the", "input", "interface", ".", "<p", ">", "This", "factory", "is", "used", "to", "map", "the", "auto", "generated", "{", "@l...
train
https://github.com/LachlanMcKee/gsonpath/blob/7462869521b163684d66a07feef0ddbadc8949b5/library/src/main/java/gsonpath/GsonPath.java#L29-L36
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationRootElements.java
CollationRootElements.getTertiaryAfter
int getTertiaryAfter(int index, int s, int t) { """ Returns the tertiary weight after [p, s, t] where index=findPrimary(p) except use index=0 for p=0. <p>Must return a weight for every root [p, s, t] as well as for every weight returned by getTertiaryBefore(). If s!=0 then t can be BEFORE_WEIGHT16. <p>Exce...
java
int getTertiaryAfter(int index, int s, int t) { long secTer; int terLimit; if(index == 0) { // primary = 0 if(s == 0) { assert(t != 0); index = (int)elements[IX_FIRST_TERTIARY_INDEX]; // Gap at the end of the tertiary CE ran...
[ "int", "getTertiaryAfter", "(", "int", "index", ",", "int", "s", ",", "int", "t", ")", "{", "long", "secTer", ";", "int", "terLimit", ";", "if", "(", "index", "==", "0", ")", "{", "// primary = 0", "if", "(", "s", "==", "0", ")", "{", "assert", "...
Returns the tertiary weight after [p, s, t] where index=findPrimary(p) except use index=0 for p=0. <p>Must return a weight for every root [p, s, t] as well as for every weight returned by getTertiaryBefore(). If s!=0 then t can be BEFORE_WEIGHT16. <p>Exception: [0, 0, 0] is handled by the CollationBuilder: Both its l...
[ "Returns", "the", "tertiary", "weight", "after", "[", "p", "s", "t", "]", "where", "index", "=", "findPrimary", "(", "p", ")", "except", "use", "index", "=", "0", "for", "p", "=", "0", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationRootElements.java#L387-L420
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java
LinkUtil.getAbsoluteUrl
public static String getAbsoluteUrl(SlingHttpServletRequest request, String url) { """ Makes a URL already built external; the url should be built by the 'getUrl' method. @param request the request as the externalization context @param url the url value (the local URL) @return """ if (!isExter...
java
public static String getAbsoluteUrl(SlingHttpServletRequest request, String url) { if (!isExternalUrl(url) && url.startsWith("/")) { String scheme = request.getScheme().toLowerCase(); url = scheme + "://" + getAuthority(request) + url; } return url; }
[ "public", "static", "String", "getAbsoluteUrl", "(", "SlingHttpServletRequest", "request", ",", "String", "url", ")", "{", "if", "(", "!", "isExternalUrl", "(", "url", ")", "&&", "url", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "String", "scheme", "=...
Makes a URL already built external; the url should be built by the 'getUrl' method. @param request the request as the externalization context @param url the url value (the local URL) @return
[ "Makes", "a", "URL", "already", "built", "external", ";", "the", "url", "should", "be", "built", "by", "the", "getUrl", "method", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/LinkUtil.java#L182-L188
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.statObject
public ObjectStat statObject(String bucketName, String objectName, ServerSideEncryption sse) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalEx...
java
public ObjectStat statObject(String bucketName, String objectName, ServerSideEncryption sse) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalEx...
[ "public", "ObjectStat", "statObject", "(", "String", "bucketName", ",", "String", "objectName", ",", "ServerSideEncryption", "sse", ")", "throws", "InvalidBucketNameException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "In...
Returns meta data information of given object in given bucket. </p><b>Example:</b><br> <pre>{@code ObjectStat objectStat = minioClient.statObject("my-bucketname", "my-objectname", sse); System.out.println(objectStat); }</pre> @param bucketName Bucket name. @param objectName Object name in the bucket. @param sse ...
[ "Returns", "meta", "data", "information", "of", "given", "object", "in", "given", "bucket", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L1515-L1532
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitSerialField
@Override public R visitSerialField(SerialFieldTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getName(), p); r = scanAndReduce(node....
java
@Override public R visitSerialField(SerialFieldTree node, P p) { R r = scan(node.getName(), p); r = scanAndReduce(node.getType(), p, r); r = scanAndReduce(node.getDescription(), p, r); return r; }
[ "@", "Override", "public", "R", "visitSerialField", "(", "SerialFieldTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getName", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getType", "...
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L408-L414
Breinify/brein-time-utilities
src/com/brein/time/timeseries/BucketTimeSeries.java
BucketTimeSeries.getEndPoints
public BucketEndPoints getEndPoints(final int bucketsFromNow) throws IllegalTimePoint { """ Gets the end-points by an offset to now, i.e., 0 means to get the now bucket, -1 gets the previous bucket, and +1 will get the next bucket. @param bucketsFromNow the amount of buckets to retrieve using now as anchor ...
java
public BucketEndPoints getEndPoints(final int bucketsFromNow) throws IllegalTimePoint { if (currentNowIdx == -1 || now == null) { throw new IllegalTimePoint("The now is not set yet, thus no end-points can be returned"); } return now.move(bucketsFromNow); }
[ "public", "BucketEndPoints", "getEndPoints", "(", "final", "int", "bucketsFromNow", ")", "throws", "IllegalTimePoint", "{", "if", "(", "currentNowIdx", "==", "-", "1", "||", "now", "==", "null", ")", "{", "throw", "new", "IllegalTimePoint", "(", "\"The now is no...
Gets the end-points by an offset to now, i.e., 0 means to get the now bucket, -1 gets the previous bucket, and +1 will get the next bucket. @param bucketsFromNow the amount of buckets to retrieve using now as anchor @return the end-point (bucket) with an offset of {@code bucketsFromNow} from now @throws IllegalTimeP...
[ "Gets", "the", "end", "-", "points", "by", "an", "offset", "to", "now", "i", ".", "e", ".", "0", "means", "to", "get", "the", "now", "bucket", "-", "1", "gets", "the", "previous", "bucket", "and", "+", "1", "will", "get", "the", "next", "bucket", ...
train
https://github.com/Breinify/brein-time-utilities/blob/ec0165a50ec1951ec7730b72c85c801c2018f314/src/com/brein/time/timeseries/BucketTimeSeries.java#L217-L224