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
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/tag/CFMLTransformer.java
CFMLTransformer.comment
private static void comment(SourceCode cfml, boolean removeSpace) throws TemplateException { """ Liest einen Kommentar ein, Kommentare werden nicht in die CFXD uebertragen sondern verworfen. Komentare koennen auch Kommentare enthalten. <br /> EBNF:<br /> <code>"<!---" {?-"--->"} "--->";</code> @throws Templa...
java
private static void comment(SourceCode cfml, boolean removeSpace) throws TemplateException { if (!removeSpace) { comment(cfml); } else { cfml.removeSpace(); if (comment(cfml)) cfml.removeSpace(); } }
[ "private", "static", "void", "comment", "(", "SourceCode", "cfml", ",", "boolean", "removeSpace", ")", "throws", "TemplateException", "{", "if", "(", "!", "removeSpace", ")", "{", "comment", "(", "cfml", ")", ";", "}", "else", "{", "cfml", ".", "removeSpac...
Liest einen Kommentar ein, Kommentare werden nicht in die CFXD uebertragen sondern verworfen. Komentare koennen auch Kommentare enthalten. <br /> EBNF:<br /> <code>"<!---" {?-"--->"} "--->";</code> @throws TemplateException
[ "Liest", "einen", "Kommentar", "ein", "Kommentare", "werden", "nicht", "in", "die", "CFXD", "uebertragen", "sondern", "verworfen", ".", "Komentare", "koennen", "auch", "Kommentare", "enthalten", ".", "<br", "/", ">", "EBNF", ":", "<br", "/", ">", "<code", ">...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/tag/CFMLTransformer.java#L396-L405
molgenis/molgenis
molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlRepositoryCollection.java
PostgreSqlRepositoryCollection.updateUnique
private void updateUnique(EntityType entityType, Attribute attr, Attribute updatedAttr) { """ Updates unique constraint based on attribute unique changes. @param entityType entity meta data @param attr current attribute @param updatedAttr updated attribute """ if (attr.isUnique() && !updatedAttr.isUni...
java
private void updateUnique(EntityType entityType, Attribute attr, Attribute updatedAttr) { if (attr.isUnique() && !updatedAttr.isUnique()) { Attribute idAttr = entityType.getIdAttribute(); if (idAttr != null && idAttr.getName().equals(attr.getName())) { throw new MolgenisDataException( ...
[ "private", "void", "updateUnique", "(", "EntityType", "entityType", ",", "Attribute", "attr", ",", "Attribute", "updatedAttr", ")", "{", "if", "(", "attr", ".", "isUnique", "(", ")", "&&", "!", "updatedAttr", ".", "isUnique", "(", ")", ")", "{", "Attribute...
Updates unique constraint based on attribute unique changes. @param entityType entity meta data @param attr current attribute @param updatedAttr updated attribute
[ "Updates", "unique", "constraint", "based", "on", "attribute", "unique", "changes", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlRepositoryCollection.java#L658-L672
Azure/azure-sdk-for-java
marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java
MarketplaceAgreementsInner.getAsync
public Observable<AgreementTermsInner> getAsync(String publisherId, String offerId, String planId) { """ Get marketplace terms. @param publisherId Publisher identifier string of image being deployed. @param offerId Offer identifier string of image being deployed. @param planId Plan identifier string of image ...
java
public Observable<AgreementTermsInner> getAsync(String publisherId, String offerId, String planId) { return getWithServiceResponseAsync(publisherId, offerId, planId).map(new Func1<ServiceResponse<AgreementTermsInner>, AgreementTermsInner>() { @Override public AgreementTermsInner call(Ser...
[ "public", "Observable", "<", "AgreementTermsInner", ">", "getAsync", "(", "String", "publisherId", ",", "String", "offerId", ",", "String", "planId", ")", "{", "return", "getWithServiceResponseAsync", "(", "publisherId", ",", "offerId", ",", "planId", ")", ".", ...
Get marketplace terms. @param publisherId Publisher identifier string of image being deployed. @param offerId Offer identifier string of image being deployed. @param planId Plan identifier string of image being deployed. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable t...
[ "Get", "marketplace", "terms", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java#L126-L133
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java
AbstractService.bindMessage
private void bindMessage(final ServiceTask<?> task, final StringProperty messageProperty) { """ Bind a task to a string property that will display the task message. @param task the service task that we need to follow the progression @param messageProperty the message presenter """ // Perform this ...
java
private void bindMessage(final ServiceTask<?> task, final StringProperty messageProperty) { // Perform this binding into the JAT to respect widget and task API JRebirth.runIntoJAT("Bind Message for " + task.getServiceHandlerName(), // Bind the task title ...
[ "private", "void", "bindMessage", "(", "final", "ServiceTask", "<", "?", ">", "task", ",", "final", "StringProperty", "messageProperty", ")", "{", "// Perform this binding into the JAT to respect widget and task API", "JRebirth", ".", "runIntoJAT", "(", "\"Bind Message for ...
Bind a task to a string property that will display the task message. @param task the service task that we need to follow the progression @param messageProperty the message presenter
[ "Bind", "a", "task", "to", "a", "string", "property", "that", "will", "display", "the", "task", "message", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java#L238-L244
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
TreeInfo.isStaticSelector
public static boolean isStaticSelector(JCTree base, Names names) { """ Return true if the AST corresponds to a static select of the kind A.B """ if (base == null) return false; switch (base.getTag()) { case IDENT: JCIdent id = (JCIdent)base; ...
java
public static boolean isStaticSelector(JCTree base, Names names) { if (base == null) return false; switch (base.getTag()) { case IDENT: JCIdent id = (JCIdent)base; return id.name != names._this && id.name != names._super && ...
[ "public", "static", "boolean", "isStaticSelector", "(", "JCTree", "base", ",", "Names", "names", ")", "{", "if", "(", "base", "==", "null", ")", "return", "false", ";", "switch", "(", "base", ".", "getTag", "(", ")", ")", "{", "case", "IDENT", ":", "...
Return true if the AST corresponds to a static select of the kind A.B
[ "Return", "true", "if", "the", "AST", "corresponds", "to", "a", "static", "select", "of", "the", "kind", "A", ".", "B" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java#L283-L303
Waikato/moa
moa/src/main/java/moa/core/Utils.java
Utils.probRound
public static int probRound(double value, Random rand) { """ Rounds a double to the next nearest integer value in a probabilistic fashion (e.g. 0.8 has a 20% chance of being rounded down to 0 and a 80% chance of being rounded up to 1). In the limit, the average of the rounded numbers generated by this procedure...
java
public static int probRound(double value, Random rand) { if (value >= 0) { double lower = Math.floor(value); double prob = value - lower; if (rand.nextDouble() < prob) { return (int)lower + 1; } else { return (int)lower; } } else { double lower = Math.floor(Math.abs(value)...
[ "public", "static", "int", "probRound", "(", "double", "value", ",", "Random", "rand", ")", "{", "if", "(", "value", ">=", "0", ")", "{", "double", "lower", "=", "Math", ".", "floor", "(", "value", ")", ";", "double", "prob", "=", "value", "-", "lo...
Rounds a double to the next nearest integer value in a probabilistic fashion (e.g. 0.8 has a 20% chance of being rounded down to 0 and a 80% chance of being rounded up to 1). In the limit, the average of the rounded numbers generated by this procedure should converge to the original double. @param value the double val...
[ "Rounds", "a", "double", "to", "the", "next", "nearest", "integer", "value", "in", "a", "probabilistic", "fashion", "(", "e", ".", "g", ".", "0", ".", "8", "has", "a", "20%", "chance", "of", "being", "rounded", "down", "to", "0", "and", "a", "80%", ...
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/core/Utils.java#L1279-L1298
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.location_pccZone_GET
public OvhPccZone location_pccZone_GET(String pccZone) throws IOException { """ Get this object properties REST: GET /dedicatedCloud/location/{pccZone} @param pccZone [required] Name of pccZone """ String qPath = "/dedicatedCloud/location/{pccZone}"; StringBuilder sb = path(qPath, pccZone); String re...
java
public OvhPccZone location_pccZone_GET(String pccZone) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}"; StringBuilder sb = path(qPath, pccZone); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPccZone.class); }
[ "public", "OvhPccZone", "location_pccZone_GET", "(", "String", "pccZone", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/location/{pccZone}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "pccZone", ")", ";", "String", ...
Get this object properties REST: GET /dedicatedCloud/location/{pccZone} @param pccZone [required] Name of pccZone
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L3094-L3099
structr/structr
structr-core/src/main/java/org/structr/core/graph/SyncCommand.java
SyncCommand.exportToFile
public static void exportToFile(final String fileName, final Iterable<? extends NodeInterface> nodes, final Iterable<? extends RelationshipInterface> relationships, final Iterable<String> filePaths, final boolean includeFiles) throws FrameworkException { """ Exports the given part of the structr database to a file...
java
public static void exportToFile(final String fileName, final Iterable<? extends NodeInterface> nodes, final Iterable<? extends RelationshipInterface> relationships, final Iterable<String> filePaths, final boolean includeFiles) throws FrameworkException { try (final Tx tx = StructrApp.getInstance().tx()) { try (f...
[ "public", "static", "void", "exportToFile", "(", "final", "String", "fileName", ",", "final", "Iterable", "<", "?", "extends", "NodeInterface", ">", "nodes", ",", "final", "Iterable", "<", "?", "extends", "RelationshipInterface", ">", "relationships", ",", "fina...
Exports the given part of the structr database to a file with the given name. @param fileName @param nodes @param relationships @param filePaths @param includeFiles @throws FrameworkException
[ "Exports", "the", "given", "part", "of", "the", "structr", "database", "to", "a", "file", "with", "the", "given", "name", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/core/graph/SyncCommand.java#L235-L250
belaban/jgroups-raft
src/org/jgroups/raft/blocks/CounterService.java
CounterService.getOrCreateCounter
public Counter getOrCreateCounter(String name, long initial_value) throws Exception { """ Returns an existing counter, or creates a new one if none exists @param name Name of the counter, different counters have to have different names @param initial_value The initial value of a new counter if there is no existi...
java
public Counter getOrCreateCounter(String name, long initial_value) throws Exception { Object existing_value=allow_dirty_reads? _get(name) : invoke(Command.get, name, false); if(existing_value != null) counters.put(name, (Long)existing_value); else { Object retval=invoke(C...
[ "public", "Counter", "getOrCreateCounter", "(", "String", "name", ",", "long", "initial_value", ")", "throws", "Exception", "{", "Object", "existing_value", "=", "allow_dirty_reads", "?", "_get", "(", "name", ")", ":", "invoke", "(", "Command", ".", "get", ","...
Returns an existing counter, or creates a new one if none exists @param name Name of the counter, different counters have to have different names @param initial_value The initial value of a new counter if there is no existing counter. Ignored if the counter already exists @return The counter implementation
[ "Returns", "an", "existing", "counter", "or", "creates", "a", "new", "one", "if", "none", "exists" ]
train
https://github.com/belaban/jgroups-raft/blob/5923a4761df50bfd203cc82cefc138694b4d7fc3/src/org/jgroups/raft/blocks/CounterService.java#L67-L77
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/MatrixFeatures_DDRM.java
MatrixFeatures_DDRM.isLowerTriangle
public static boolean isLowerTriangle(DMatrixRMaj A , int hessenberg , double tol ) { """ <p> Checks to see if a matrix is lower triangular or Hessenberg. A Hessenberg matrix of degree N has the following property:<br> <br> a<sub>ij</sub> &le; 0 for all i &lt; j+N<br> <br> A triangular matrix is a Hessenberg...
java
public static boolean isLowerTriangle(DMatrixRMaj A , int hessenberg , double tol ) { for( int i = 0; i < A.numRows-hessenberg-1; i++ ) { for( int j = i+hessenberg+1; j < A.numCols; j++ ) { if( !(Math.abs(A.unsafe_get(i,j)) <= tol) ) { return false; ...
[ "public", "static", "boolean", "isLowerTriangle", "(", "DMatrixRMaj", "A", ",", "int", "hessenberg", ",", "double", "tol", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "A", ".", "numRows", "-", "hessenberg", "-", "1", ";", "i", "++", ...
<p> Checks to see if a matrix is lower triangular or Hessenberg. A Hessenberg matrix of degree N has the following property:<br> <br> a<sub>ij</sub> &le; 0 for all i &lt; j+N<br> <br> A triangular matrix is a Hessenberg matrix of degree 0. </p> @param A Matrix being tested. Not modified. @param hessenberg The degree o...
[ "<p", ">", "Checks", "to", "see", "if", "a", "matrix", "is", "lower", "triangular", "or", "Hessenberg", ".", "A", "Hessenberg", "matrix", "of", "degree", "N", "has", "the", "following", "property", ":", "<br", ">", "<br", ">", "a<sub", ">", "ij<", "/",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/MatrixFeatures_DDRM.java#L652-L661
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java
AbstractAsymmetricCrypto.encryptBase64
public String encryptBase64(String data, KeyType keyType) { """ 编码为Base64字符串,使用UTF-8编码 @param data 被加密的字符串 @param keyType 私钥或公钥 {@link KeyType} @return Base64字符串 @since 4.0.1 """ return Base64.encode(encrypt(data, keyType)); }
java
public String encryptBase64(String data, KeyType keyType) { return Base64.encode(encrypt(data, keyType)); }
[ "public", "String", "encryptBase64", "(", "String", "data", ",", "KeyType", "keyType", ")", "{", "return", "Base64", ".", "encode", "(", "encrypt", "(", "data", ",", "keyType", ")", ")", ";", "}" ]
编码为Base64字符串,使用UTF-8编码 @param data 被加密的字符串 @param keyType 私钥或公钥 {@link KeyType} @return Base64字符串 @since 4.0.1
[ "编码为Base64字符串,使用UTF", "-", "8编码" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L137-L139
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java
ColorHelper.getFromRGB
public Color getFromRGB(final int red, final int green, final int blue) { """ Helper function to create any available color string from color values. @param red The red value, 0-255 @param green The green value, 0-255 @param blue The blue value, 0-255 @return The hex string in the format '#rrggbb' """...
java
public Color getFromRGB(final int red, final int green, final int blue) { return this.getFromString("#" + this.toHexString(red) + this.toHexString(green) + this .toHexString(blue)); }
[ "public", "Color", "getFromRGB", "(", "final", "int", "red", ",", "final", "int", "green", ",", "final", "int", "blue", ")", "{", "return", "this", ".", "getFromString", "(", "\"#\"", "+", "this", ".", "toHexString", "(", "red", ")", "+", "this", ".", ...
Helper function to create any available color string from color values. @param red The red value, 0-255 @param green The green value, 0-255 @param blue The blue value, 0-255 @return The hex string in the format '#rrggbb'
[ "Helper", "function", "to", "create", "any", "available", "color", "string", "from", "color", "values", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/ColorHelper.java#L87-L90
knowitall/common-java
src/main/java/edu/washington/cs/knowitall/commonlib/FileUtils.java
FileUtils.pipe
public static void pipe(InputStream is, OutputStream os, int buffersize) throws IOException { """ * Writes all lines read from the reader. @param is The input stream @param os The output stream @param buffersize size of the buffer to use @throws IOException """ byte[] buffer = new byte[buffersize]...
java
public static void pipe(InputStream is, OutputStream os, int buffersize) throws IOException { byte[] buffer = new byte[buffersize]; while (is.read(buffer) != -1) { os.write(buffer); } }
[ "public", "static", "void", "pipe", "(", "InputStream", "is", ",", "OutputStream", "os", ",", "int", "buffersize", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "buffersize", "]", ";", "while", "(", "is", ".", ...
* Writes all lines read from the reader. @param is The input stream @param os The output stream @param buffersize size of the buffer to use @throws IOException
[ "*", "Writes", "all", "lines", "read", "from", "the", "reader", "." ]
train
https://github.com/knowitall/common-java/blob/6c3e7b2f13da5afb1306e87a6c322c55b65fddfc/src/main/java/edu/washington/cs/knowitall/commonlib/FileUtils.java#L66-L71
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java
UnsignedNumberUtil.parseUnsignedLong
private static long parseUnsignedLong(String s, int radix) { """ Returns the unsigned {@code long} value represented by a string with the given radix. @param s the string containing the unsigned {@code long} representation to be parsed. @param radix the radix to use while parsing {@code s} @throws NumberFor...
java
private static long parseUnsignedLong(String s, int radix) { if (s.length() == 0) { throw new NumberFormatException("empty string"); } if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) { throw new NumberFormatException("illegal radix: " +...
[ "private", "static", "long", "parseUnsignedLong", "(", "String", "s", ",", "int", "radix", ")", "{", "if", "(", "s", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "NumberFormatException", "(", "\"empty string\"", ")", ";", "}", "if", "(...
Returns the unsigned {@code long} value represented by a string with the given radix. @param s the string containing the unsigned {@code long} representation to be parsed. @param radix the radix to use while parsing {@code s} @throws NumberFormatException if the string does not contain a valid unsigned {@code long} wi...
[ "Returns", "the", "unsigned", "{", "@code", "long", "}", "value", "represented", "by", "a", "string", "with", "the", "given", "radix", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java#L282-L310
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.setTransferEncodingChunked
public static void setTransferEncodingChunked(HttpMessage m, boolean chunked) { """ Set the {@link HttpHeaderNames#TRANSFER_ENCODING} to either include {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code true}, or remove {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code false}. @param m T...
java
public static void setTransferEncodingChunked(HttpMessage m, boolean chunked) { if (chunked) { m.headers().set(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED); m.headers().remove(HttpHeaderNames.CONTENT_LENGTH); } else { List<String> encodings = m.headers...
[ "public", "static", "void", "setTransferEncodingChunked", "(", "HttpMessage", "m", ",", "boolean", "chunked", ")", "{", "if", "(", "chunked", ")", "{", "m", ".", "headers", "(", ")", ".", "set", "(", "HttpHeaderNames", ".", "TRANSFER_ENCODING", ",", "HttpHea...
Set the {@link HttpHeaderNames#TRANSFER_ENCODING} to either include {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code true}, or remove {@link HttpHeaderValues#CHUNKED} if {@code chunked} is {@code false}. @param m The message which contains the headers to modify. @param chunked if {@code true} then include...
[ "Set", "the", "{", "@link", "HttpHeaderNames#TRANSFER_ENCODING", "}", "to", "either", "include", "{", "@link", "HttpHeaderValues#CHUNKED", "}", "if", "{", "@code", "chunked", "}", "is", "{", "@code", "true", "}", "or", "remove", "{", "@link", "HttpHeaderValues#C...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L312-L335
ModeShape/modeshape
index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/query/ComparePathQuery.java
ComparePathQuery.createQueryForNodesWithPathGreaterThan
public static ComparePathQuery createQueryForNodesWithPathGreaterThan( Path constraintPath, String fieldName, ValueFactories factories, ...
java
public static ComparePathQuery createQueryForNodesWithPathGreaterThan( Path constraintPath, String fieldName, ValueFactories factories, ...
[ "public", "static", "ComparePathQuery", "createQueryForNodesWithPathGreaterThan", "(", "Path", "constraintPath", ",", "String", "fieldName", ",", "ValueFactories", "factories", ",", "Function", "<", "String", ",", "String", ">", "caseOperation", ")", "{", "return", "n...
Construct a {@link Query} implementation that scores documents such that the node represented by the document has a path that is greater than the supplied constraint path. @param constraintPath the constraint path; may not be null @param fieldName the name of the document field containing the path value; may not be nu...
[ "Construct", "a", "{", "@link", "Query", "}", "implementation", "that", "scores", "documents", "such", "that", "the", "node", "represented", "by", "the", "document", "has", "a", "path", "that", "is", "greater", "than", "the", "supplied", "constraint", "path", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/query/ComparePathQuery.java#L82-L88
alkacon/opencms-core
src-gwt/org/opencms/ugc/client/export/CmsClientUgcSession.java
CmsClientUgcSession.saveContent
public void saveContent( JavaScriptObject newValues, final I_CmsStringCallback onSuccess, final I_CmsErrorCallback onFailure) { """ Asks the server to save the values set via setNewValue in the XML content.<p> @param newValues the new values to set @param onSuccess the callback to be ca...
java
public void saveContent( JavaScriptObject newValues, final I_CmsStringCallback onSuccess, final I_CmsErrorCallback onFailure) { m_apiRoot.getRpcHelper().executeRpc( CmsXmlContentUgcApi.SERVICE.saveContent( m_content.getSessionId(), CmsJsUtils....
[ "public", "void", "saveContent", "(", "JavaScriptObject", "newValues", ",", "final", "I_CmsStringCallback", "onSuccess", ",", "final", "I_CmsErrorCallback", "onFailure", ")", "{", "m_apiRoot", ".", "getRpcHelper", "(", ")", ".", "executeRpc", "(", "CmsXmlContentUgcApi...
Asks the server to save the values set via setNewValue in the XML content.<p> @param newValues the new values to set @param onSuccess the callback to be called in case of success @param onFailure the callback to be called in case of failure
[ "Asks", "the", "server", "to", "save", "the", "values", "set", "via", "setNewValue", "in", "the", "XML", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ugc/client/export/CmsClientUgcSession.java#L198-L227
openengsb/openengsb
components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/JavassistUtils.java
JavassistUtils.hasAnnotation
public static boolean hasAnnotation(CtClass clazz, String annotationName) { """ Returns true if the given class has an annotation set with the given name, returns false otherwise. """ ClassFile cf = clazz.getClassFile2(); AnnotationsAttribute ainfo = (AnnotationsAttribute) cf.getAtt...
java
public static boolean hasAnnotation(CtClass clazz, String annotationName) { ClassFile cf = clazz.getClassFile2(); AnnotationsAttribute ainfo = (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag); AnnotationsAttribute ainfo2 = (AnnotationsAttribute) c...
[ "public", "static", "boolean", "hasAnnotation", "(", "CtClass", "clazz", ",", "String", "annotationName", ")", "{", "ClassFile", "cf", "=", "clazz", ".", "getClassFile2", "(", ")", ";", "AnnotationsAttribute", "ainfo", "=", "(", "AnnotationsAttribute", ")", "cf"...
Returns true if the given class has an annotation set with the given name, returns false otherwise.
[ "Returns", "true", "if", "the", "given", "class", "has", "an", "annotation", "set", "with", "the", "given", "name", "returns", "false", "otherwise", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/JavassistUtils.java#L37-L44
samskivert/pythagoras
src/main/java/pythagoras/d/QuadCurve.java
QuadCurve.setCurve
public void setCurve (XY p1, XY cp, XY p2) { """ Configures the start, control, and end points for this curve. """ setCurve(p1.x(), p1.y(), cp.x(), cp.y(), p2.x(), p2.y()); }
java
public void setCurve (XY p1, XY cp, XY p2) { setCurve(p1.x(), p1.y(), cp.x(), cp.y(), p2.x(), p2.y()); }
[ "public", "void", "setCurve", "(", "XY", "p1", ",", "XY", "cp", ",", "XY", "p2", ")", "{", "setCurve", "(", "p1", ".", "x", "(", ")", ",", "p1", ".", "y", "(", ")", ",", "cp", ".", "x", "(", ")", ",", "cp", ".", "y", "(", ")", ",", "p2"...
Configures the start, control, and end points for this curve.
[ "Configures", "the", "start", "control", "and", "end", "points", "for", "this", "curve", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/QuadCurve.java#L62-L64
stapler/stapler
core/src/main/java/org/kohsuke/stapler/IndexHtmlDispatcher.java
IndexHtmlDispatcher.make
static Dispatcher make(ServletContext context, Class c) { """ Returns a {@link IndexHtmlDispatcher} if and only if the said class has {@code index.html} as a side-file. @param context @param c Class from where to start the index.html inspection. Will go through class hierarchy (unless interface) @return Index d...
java
static Dispatcher make(ServletContext context, Class c) { for (; c != null && c != Object.class; c = c.getSuperclass()) { String name = "/WEB-INF/side-files/" + c.getName().replace('.', '/') + "/index.html"; try { URL url = context.getResource(name); if (u...
[ "static", "Dispatcher", "make", "(", "ServletContext", "context", ",", "Class", "c", ")", "{", "for", "(", ";", "c", "!=", "null", "&&", "c", "!=", "Object", ".", "class", ";", "c", "=", "c", ".", "getSuperclass", "(", ")", ")", "{", "String", "nam...
Returns a {@link IndexHtmlDispatcher} if and only if the said class has {@code index.html} as a side-file. @param context @param c Class from where to start the index.html inspection. Will go through class hierarchy (unless interface) @return Index dispatcher or {@code null} if it cannot be found
[ "Returns", "a", "{" ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/IndexHtmlDispatcher.java#L41-L53
tiesebarrell/process-assertions
process-assertions-api/src/main/java/org/toxos/processassertions/api/ProcessAssert.java
ProcessAssert.assertProcessEndedAndInEndEvents
public static void assertProcessEndedAndInEndEvents(final String processInstanceId, final String... endEventIds) { """ Asserts the process instance with the provided id is ended and has reached <strong>all</strong> end events with the provided ids. <p> <strong>Note:</strong> this assertion assumes the process...
java
public static void assertProcessEndedAndInEndEvents(final String processInstanceId, final String... endEventIds) { Validate.notNull(processInstanceId); Validate.notNull(endEventIds); apiCallback.debug(LogMessage.PROCESS_11, processInstanceId, AssertUtils.arrayToString(endEventIds)); try...
[ "public", "static", "void", "assertProcessEndedAndInEndEvents", "(", "final", "String", "processInstanceId", ",", "final", "String", "...", "endEventIds", ")", "{", "Validate", ".", "notNull", "(", "processInstanceId", ")", ";", "Validate", ".", "notNull", "(", "e...
Asserts the process instance with the provided id is ended and has reached <strong>all</strong> end events with the provided ids. <p> <strong>Note:</strong> this assertion assumes the process has one or more end events and that all of them have been reached (in other words, the exact set of provided end event ids is c...
[ "Asserts", "the", "process", "instance", "with", "the", "provided", "id", "is", "ended", "and", "has", "reached", "<strong", ">", "all<", "/", "strong", ">", "end", "events", "with", "the", "provided", "ids", "." ]
train
https://github.com/tiesebarrell/process-assertions/blob/932a8443982e356cdf5a230165a35c725d9306ab/process-assertions-api/src/main/java/org/toxos/processassertions/api/ProcessAssert.java#L210-L220
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java
PhotosGeoApi.setContext
public Response setContext(String photoId, JinxConstants.GeoContext context) throws JinxException { """ Indicate the state of a photo's geotagginess beyond latitude and longitude. <br> Note : photos passed to this method must already be geotagged. <br> This method requires authentication with 'write' permissio...
java
public Response setContext(String photoId, JinxConstants.GeoContext context) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.geo.setContext"); params.put("photo_id", photoId); params.put("context", Integer.to...
[ "public", "Response", "setContext", "(", "String", "photoId", ",", "JinxConstants", ".", "GeoContext", "context", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "photoId", ")", ";", "Map", "<", "String", ",", "String", ">", "para...
Indicate the state of a photo's geotagginess beyond latitude and longitude. <br> Note : photos passed to this method must already be geotagged. <br> This method requires authentication with 'write' permission. @param photoId (Required) The id of the photo to set context data for. @param context (Required) The photo's ...
[ "Indicate", "the", "state", "of", "a", "photo", "s", "geotagginess", "beyond", "latitude", "and", "longitude", ".", "<br", ">", "Note", ":", "photos", "passed", "to", "this", "method", "must", "already", "be", "geotagged", ".", "<br", ">", "This", "method"...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java#L221-L228
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java
RDN.toRFC1779String
public String toRFC1779String(Map<String, String> oidMap) { """ /* Returns a printable form of this RDN using the algorithm defined in RFC 1779. RFC 1779 attribute type keywords are emitted, as well as keywords contained in the OID/keyword map. """ if (assertion.length == 1) { return ass...
java
public String toRFC1779String(Map<String, String> oidMap) { if (assertion.length == 1) { return assertion[0].toRFC1779String(oidMap); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < assertion.length; i++) { if (i != 0) { sb.append(" ...
[ "public", "String", "toRFC1779String", "(", "Map", "<", "String", ",", "String", ">", "oidMap", ")", "{", "if", "(", "assertion", ".", "length", "==", "1", ")", "{", "return", "assertion", "[", "0", "]", ".", "toRFC1779String", "(", "oidMap", ")", ";",...
/* Returns a printable form of this RDN using the algorithm defined in RFC 1779. RFC 1779 attribute type keywords are emitted, as well as keywords contained in the OID/keyword map.
[ "/", "*", "Returns", "a", "printable", "form", "of", "this", "RDN", "using", "the", "algorithm", "defined", "in", "RFC", "1779", ".", "RFC", "1779", "attribute", "type", "keywords", "are", "emitted", "as", "well", "as", "keywords", "contained", "in", "the"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java#L375-L388
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java
BondTools.isValidDoubleBondConfiguration
public static boolean isValidDoubleBondConfiguration(IAtomContainer container, IBond bond) { """ Tells if a certain bond is center of a valid double bond configuration. @param container The atomcontainer. @param bond The bond. @return true=is a potential configuration, false=is not. ""...
java
public static boolean isValidDoubleBondConfiguration(IAtomContainer container, IBond bond) { //org.openscience.cdk.interfaces.IAtom[] atoms = bond.getAtoms(); List<IAtom> connectedAtoms = container.getConnectedAtomsList(bond.getBegin()); IAtom from = null; for (IAtom connectedAtom : conn...
[ "public", "static", "boolean", "isValidDoubleBondConfiguration", "(", "IAtomContainer", "container", ",", "IBond", "bond", ")", "{", "//org.openscience.cdk.interfaces.IAtom[] atoms = bond.getAtoms();", "List", "<", "IAtom", ">", "connectedAtoms", "=", "container", ".", "get...
Tells if a certain bond is center of a valid double bond configuration. @param container The atomcontainer. @param bond The bond. @return true=is a potential configuration, false=is not.
[ "Tells", "if", "a", "certain", "bond", "is", "center", "of", "a", "valid", "double", "bond", "configuration", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/geometry/BondTools.java#L60-L80
knowm/XChange
xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceCore.java
DSXMarketDataServiceCore.getOrderBook
@Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { """ Get market depth from exchange @param currencyPair Currency pair for getting info about @param args Optional arguments. Exchange-specific @return The OrderBook @throws IOException """ String...
java
@Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { String marketName = DSXAdapters.currencyPairToMarketName(currencyPair); String accountType = null; try { if (args != null) { accountType = (String) args[0]; } } catch (ArrayInd...
[ "@", "Override", "public", "OrderBook", "getOrderBook", "(", "CurrencyPair", "currencyPair", ",", "Object", "...", "args", ")", "throws", "IOException", "{", "String", "marketName", "=", "DSXAdapters", ".", "currencyPairToMarketName", "(", "currencyPair", ")", ";", ...
Get market depth from exchange @param currencyPair Currency pair for getting info about @param args Optional arguments. Exchange-specific @return The OrderBook @throws IOException
[ "Get", "market", "depth", "from", "exchange" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceCore.java#L67-L89
OpenTSDB/opentsdb
src/query/expression/ExpressionFactory.java
ExpressionFactory.addFunction
static void addFunction(final String name, final Expression expr) { """ Add an expression to the map. WARNING: The map is not thread safe so don't use this to dynamically modify the map while the TSD is running. @param name The name of the expression @param expr The expression object to store. @throws Illegal...
java
static void addFunction(final String name, final Expression expr) { if (name == null || name.isEmpty()) { throw new IllegalArgumentException("Missing function name"); } if (expr == null) { throw new IllegalArgumentException("Function cannot be null"); } available_functions.put(name, expr...
[ "static", "void", "addFunction", "(", "final", "String", "name", ",", "final", "Expression", "expr", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Missing fu...
Add an expression to the map. WARNING: The map is not thread safe so don't use this to dynamically modify the map while the TSD is running. @param name The name of the expression @param expr The expression object to store. @throws IllegalArgumentException if the name is null or empty or the function is null.
[ "Add", "an", "expression", "to", "the", "map", ".", "WARNING", ":", "The", "map", "is", "not", "thread", "safe", "so", "don", "t", "use", "this", "to", "dynamically", "modify", "the", "map", "while", "the", "TSD", "is", "running", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/query/expression/ExpressionFactory.java#L70-L78
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.symlinkTo
public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { """ Creates a symlink to the specified target. @param target The file that the symlink should point to. @param listener If symlink creation requires a help of an external process, the error will...
java
public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); }
[ "public", "void", "symlinkTo", "(", "final", "String", "target", ",", "final", "TaskListener", "listener", ")", "throws", "IOException", ",", "InterruptedException", "{", "act", "(", "new", "SymlinkTo", "(", "target", ",", "listener", ")", ")", ";", "}" ]
Creates a symlink to the specified target. @param target The file that the symlink should point to. @param listener If symlink creation requires a help of an external process, the error will be reported here. @since 1.456
[ "Creates", "a", "symlink", "to", "the", "specified", "target", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L699-L701
wellner/jcarafe
jcarafe-core/src/main/java/org/mitre/jcarafe/jarafe/JarafeMETrainer.java
JarafeMETrainer.addValuedTrainingInstance
public void addValuedTrainingInstance(int id, String label, List<StringDoublePair> features) { """ /* @param id - an integer id that can be used to re-assign this classification instance @param label - A string value that is the "gold standard" label for this training instance @param features - A list of string...
java
public void addValuedTrainingInstance(int id, String label, List<StringDoublePair> features) { List<scala.Tuple2<String,Double>> arr = new ArrayList<scala.Tuple2<String,Double>>(); for (StringDoublePair pair : features) { arr.add(new scala.Tuple2<String,Double>(pair.getString(), pair.getDouble())); ...
[ "public", "void", "addValuedTrainingInstance", "(", "int", "id", ",", "String", "label", ",", "List", "<", "StringDoublePair", ">", "features", ")", "{", "List", "<", "scala", ".", "Tuple2", "<", "String", ",", "Double", ">", ">", "arr", "=", "new", "Arr...
/* @param id - an integer id that can be used to re-assign this classification instance @param label - A string value that is the "gold standard" label for this training instance @param features - A list of strings double pairs that correspond to the names of the features present for this training instance
[ "/", "*" ]
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/org/mitre/jcarafe/jarafe/JarafeMETrainer.java#L37-L43
threerings/nenya
core/src/main/java/com/threerings/util/KeyboardManager.java
KeyboardManager.keyTyped
protected boolean keyTyped (KeyEvent e) { """ Called when Swing notifies us that a key has been typed while the keyboard manager is active. @return true to swallow the key event """ logKey("keyTyped", e); // get the action command associated with this key char keyChar = e.getKeyCha...
java
protected boolean keyTyped (KeyEvent e) { logKey("keyTyped", e); // get the action command associated with this key char keyChar = e.getKeyChar(); boolean hasCommand = _xlate.hasCommand(keyChar); if (hasCommand) { // Okay, we're clearly doing actions based on key...
[ "protected", "boolean", "keyTyped", "(", "KeyEvent", "e", ")", "{", "logKey", "(", "\"keyTyped\"", ",", "e", ")", ";", "// get the action command associated with this key", "char", "keyChar", "=", "e", ".", "getKeyChar", "(", ")", ";", "boolean", "hasCommand", "...
Called when Swing notifies us that a key has been typed while the keyboard manager is active. @return true to swallow the key event
[ "Called", "when", "Swing", "notifies", "us", "that", "a", "key", "has", "been", "typed", "while", "the", "keyboard", "manager", "is", "active", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyboardManager.java#L321-L353
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/LogGammaDistribution.java
LogGammaDistribution.logcdf
public static double logcdf(double x, double k, double theta, double shift) { """ The log CDF, static version. @param x Value @param k Shape k @param theta Theta = 1.0/Beta aka. "scaling" parameter @return cdf value """ x = (x - shift); return x <= 0. ? -Double.NEGATIVE_INFINITY : GammaDistributi...
java
public static double logcdf(double x, double k, double theta, double shift) { x = (x - shift); return x <= 0. ? -Double.NEGATIVE_INFINITY : GammaDistribution.logregularizedGammaP(k, FastMath.log1p(x) * theta); }
[ "public", "static", "double", "logcdf", "(", "double", "x", ",", "double", "k", ",", "double", "theta", ",", "double", "shift", ")", "{", "x", "=", "(", "x", "-", "shift", ")", ";", "return", "x", "<=", "0.", "?", "-", "Double", ".", "NEGATIVE_INFI...
The log CDF, static version. @param x Value @param k Shape k @param theta Theta = 1.0/Beta aka. "scaling" parameter @return cdf value
[ "The", "log", "CDF", "static", "version", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/LogGammaDistribution.java#L179-L182
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java
AsyncMutateInBuilder.arrayInsertAll
public <T> AsyncMutateInBuilder arrayInsertAll(String path, Collection<T> values) { """ Insert multiple values at once in an existing array at a specified position (denoted in the path, eg. "sub.array[2]"), inserting all values in the collection's iteration order at the given position and shifting existing value...
java
public <T> AsyncMutateInBuilder arrayInsertAll(String path, Collection<T> values) { if (StringUtil.isNullOrEmpty(path)) { throw new IllegalArgumentException("Path must not be empty for arrayInsert"); } this.mutationSpecs.add(new MutationSpec(Mutation.ARRAY_INSERT, path, new MultiValu...
[ "public", "<", "T", ">", "AsyncMutateInBuilder", "arrayInsertAll", "(", "String", "path", ",", "Collection", "<", "T", ">", "values", ")", "{", "if", "(", "StringUtil", ".", "isNullOrEmpty", "(", "path", ")", ")", "{", "throw", "new", "IllegalArgumentExcepti...
Insert multiple values at once in an existing array at a specified position (denoted in the path, eg. "sub.array[2]"), inserting all values in the collection's iteration order at the given position and shifting existing values beyond the position by the number of elements in the collection. Each item in the collection...
[ "Insert", "multiple", "values", "at", "once", "in", "an", "existing", "array", "at", "a", "specified", "position", "(", "denoted", "in", "the", "path", "eg", ".", "sub", ".", "array", "[", "2", "]", ")", "inserting", "all", "values", "in", "the", "coll...
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java#L1115-L1121
Ordinastie/MalisisCore
src/main/java/net/malisis/core/block/component/ItemTransformComponent.java
ItemTransformComponent.firstPerson
public ItemTransformComponent firstPerson(Matrix4f left, Matrix4f right) { """ Sets the transforms to use for the {@link Item} in first person. @param left the left @param right the right @return the item transform component """ this.firstPersonLeftHand = left; this.firstPersonRightHand = right; ret...
java
public ItemTransformComponent firstPerson(Matrix4f left, Matrix4f right) { this.firstPersonLeftHand = left; this.firstPersonRightHand = right; return this; }
[ "public", "ItemTransformComponent", "firstPerson", "(", "Matrix4f", "left", ",", "Matrix4f", "right", ")", "{", "this", ".", "firstPersonLeftHand", "=", "left", ";", "this", ".", "firstPersonRightHand", "=", "right", ";", "return", "this", ";", "}" ]
Sets the transforms to use for the {@link Item} in first person. @param left the left @param right the right @return the item transform component
[ "Sets", "the", "transforms", "to", "use", "for", "the", "{", "@link", "Item", "}", "in", "first", "person", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/block/component/ItemTransformComponent.java#L80-L85
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlField field, PyAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param field the fields. @param it the target for the generated content. @param context the context. """ if (field.isStatic()) { // Static field generatePythonField(f...
java
protected void _generate(SarlField field, PyAppendable it, IExtraLanguageGeneratorContext context) { if (field.isStatic()) { // Static field generatePythonField(field, it, context); } else { final String key = this.qualifiedNameProvider.getFullyQualifiedName(field.getDeclaringType()).toString(); final L...
[ "protected", "void", "_generate", "(", "SarlField", "field", ",", "PyAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "field", ".", "isStatic", "(", ")", ")", "{", "// Static field", "generatePythonField", "(", "field", "...
Generate the given object. @param field the fields. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L938-L947
alkacon/opencms-core
src/org/opencms/ui/login/CmsLoginHelper.java
CmsLoginHelper.validateUserAndPasswordNotEmpty
public static CmsMessageContainer validateUserAndPasswordNotEmpty(String username, String password) { """ Checks that the user name and password are not empty, and returns an error message if they are.<p> @param username the user name @param password the password @return the error message, or null if the us...
java
public static CmsMessageContainer validateUserAndPasswordNotEmpty(String username, String password) { boolean userEmpty = CmsStringUtil.isEmpty(username); boolean passwordEmpty = CmsStringUtil.isEmpty(password); // login was requested if (userEmpty && passwordEmpty) { retur...
[ "public", "static", "CmsMessageContainer", "validateUserAndPasswordNotEmpty", "(", "String", "username", ",", "String", "password", ")", "{", "boolean", "userEmpty", "=", "CmsStringUtil", ".", "isEmpty", "(", "username", ")", ";", "boolean", "passwordEmpty", "=", "C...
Checks that the user name and password are not empty, and returns an error message if they are.<p> @param username the user name @param password the password @return the error message, or null if the user name and password are OK
[ "Checks", "that", "the", "user", "name", "and", "password", "are", "not", "empty", "and", "returns", "an", "error", "message", "if", "they", "are", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsLoginHelper.java#L575-L589
threerings/narya
core/src/main/java/com/threerings/presents/server/InvocationException.java
InvocationException.requireAccess
public static void requireAccess (ClientObject clobj, Permission perm, Object context) throws InvocationException { """ Requires that the specified client have the specified permissions. @throws InvocationException if they do not. """ String errmsg = clobj.checkAccess(perm, context); ...
java
public static void requireAccess (ClientObject clobj, Permission perm, Object context) throws InvocationException { String errmsg = clobj.checkAccess(perm, context); if (errmsg != null) { throw new InvocationException(errmsg); } }
[ "public", "static", "void", "requireAccess", "(", "ClientObject", "clobj", ",", "Permission", "perm", ",", "Object", "context", ")", "throws", "InvocationException", "{", "String", "errmsg", "=", "clobj", ".", "checkAccess", "(", "perm", ",", "context", ")", "...
Requires that the specified client have the specified permissions. @throws InvocationException if they do not.
[ "Requires", "that", "the", "specified", "client", "have", "the", "specified", "permissions", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/InvocationException.java#L39-L46
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodesInner.java
DscNodesInner.deleteAsync
public Observable<DscNodeInner> deleteAsync(String resourceGroupName, String automationAccountName, String nodeId) { """ Delete the dsc node identified by node id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The node ...
java
public Observable<DscNodeInner> deleteAsync(String resourceGroupName, String automationAccountName, String nodeId) { return deleteWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId).map(new Func1<ServiceResponse<DscNodeInner>, DscNodeInner>() { @Override public Dsc...
[ "public", "Observable", "<", "DscNodeInner", ">", "deleteAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "nodeId", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountNam...
Delete the dsc node identified by node id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The node id. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DscNodeInner object
[ "Delete", "the", "dsc", "node", "identified", "by", "node", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodesInner.java#L125-L132
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java
BlockFileLoader.getReferenceClientBlockFileList
public static List<File> getReferenceClientBlockFileList(File blocksDir) { """ Gets the list of files which contain blocks from Bitcoin Core. """ checkArgument(blocksDir.isDirectory(), "%s is not a directory", blocksDir); List<File> list = new LinkedList<>(); for (int i = 0; true; i++) ...
java
public static List<File> getReferenceClientBlockFileList(File blocksDir) { checkArgument(blocksDir.isDirectory(), "%s is not a directory", blocksDir); List<File> list = new LinkedList<>(); for (int i = 0; true; i++) { File file = new File(blocksDir, String.format(Locale.US, "blk%05d....
[ "public", "static", "List", "<", "File", ">", "getReferenceClientBlockFileList", "(", "File", "blocksDir", ")", "{", "checkArgument", "(", "blocksDir", ".", "isDirectory", "(", ")", ",", "\"%s is not a directory\"", ",", "blocksDir", ")", ";", "List", "<", "File...
Gets the list of files which contain blocks from Bitcoin Core.
[ "Gets", "the", "list", "of", "files", "which", "contain", "blocks", "from", "Bitcoin", "Core", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/utils/BlockFileLoader.java#L57-L67
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Assert.java
Assert.checkIndex
public static int checkIndex(int index, int size, String errorMsgTemplate, Object... params) throws IllegalArgumentException, IndexOutOfBoundsException { """ 检查下标(数组、集合、字符串)是否符合要求,下标必须满足: <pre> 0 <= index < size </pre> @param index 下标 @param size 长度 @param errorMsgTemplate 异常时的消息模板 @param params 参数列表 @...
java
public static int checkIndex(int index, int size, String errorMsgTemplate, Object... params) throws IllegalArgumentException, IndexOutOfBoundsException { if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(badIndexMsg(index, size, errorMsgTemplate, params)); } return index; }
[ "public", "static", "int", "checkIndex", "(", "int", "index", ",", "int", "size", ",", "String", "errorMsgTemplate", ",", "Object", "...", "params", ")", "throws", "IllegalArgumentException", ",", "IndexOutOfBoundsException", "{", "if", "(", "index", "<", "0", ...
检查下标(数组、集合、字符串)是否符合要求,下标必须满足: <pre> 0 <= index < size </pre> @param index 下标 @param size 长度 @param errorMsgTemplate 异常时的消息模板 @param params 参数列表 @return 检查后的下标 @throws IllegalArgumentException 如果size < 0 抛出此异常 @throws IndexOutOfBoundsException 如果index < 0或者 index >= size 抛出此异常 @since 4.1.9
[ "检查下标(数组、集合、字符串)是否符合要求,下标必须满足:" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L558-L563
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/Stream.java
Stream.flatMapToDouble
@NotNull public DoubleStream flatMapToDouble(@NotNull final Function<? super T, ? extends DoubleStream> mapper) { """ Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element. ...
java
@NotNull public DoubleStream flatMapToDouble(@NotNull final Function<? super T, ? extends DoubleStream> mapper) { return new DoubleStream(params, new ObjFlatMapToDouble<T>(iterator, mapper)); }
[ "@", "NotNull", "public", "DoubleStream", "flatMapToDouble", "(", "@", "NotNull", "final", "Function", "<", "?", "super", "T", ",", "?", "extends", "DoubleStream", ">", "mapper", ")", "{", "return", "new", "DoubleStream", "(", "params", ",", "new", "ObjFlatM...
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element. <p>This is an intermediate operation. @param mapper the mapper function used to apply to each element @return the new {@code Dou...
[ "Returns", "a", "stream", "consisting", "of", "the", "results", "of", "replacing", "each", "element", "of", "this", "stream", "with", "the", "contents", "of", "a", "mapped", "stream", "produced", "by", "applying", "the", "provided", "mapping", "function", "to"...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Stream.java#L912-L915
whitesource/agents
wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java
RequestFactory.newUpdateInventoryRequest
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, String product, String productVersion, Collection<A...
java
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, String product, String productVersion, Collection<A...
[ "@", "Deprecated", "public", "UpdateInventoryRequest", "newUpdateInventoryRequest", "(", "String", "orgToken", ",", "String", "product", ",", "String", "productVersion", ",", "Collection", "<", "AgentProjectInfo", ">", "projects", ",", "String", "userKey", ")", "{", ...
Create new Inventory Update request. @param orgToken WhiteSource organization token. @param projects Projects status statement to update. @param product Name or WhiteSource service token of the product to update. @param productVersion Version of the product to update. @param userKey user key ...
[ "Create", "new", "Inventory", "Update", "request", "." ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java#L78-L85
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/qjournal/client/AsyncLoggerSet.java
AsyncLoggerSet.setCommittedTxId
public void setCommittedTxId(long txid, boolean force) { """ Set the highest successfully committed txid seen by the writer. This should be called after a successful write to a quorum, and is used for extra sanity checks against the protocol. See HDFS-3863. """ for (AsyncLogger logger : loggers) { ...
java
public void setCommittedTxId(long txid, boolean force) { for (AsyncLogger logger : loggers) { logger.setCommittedTxId(txid, force); } }
[ "public", "void", "setCommittedTxId", "(", "long", "txid", ",", "boolean", "force", ")", "{", "for", "(", "AsyncLogger", "logger", ":", "loggers", ")", "{", "logger", ".", "setCommittedTxId", "(", "txid", ",", "force", ")", ";", "}", "}" ]
Set the highest successfully committed txid seen by the writer. This should be called after a successful write to a quorum, and is used for extra sanity checks against the protocol. See HDFS-3863.
[ "Set", "the", "highest", "successfully", "committed", "txid", "seen", "by", "the", "writer", ".", "This", "should", "be", "called", "after", "a", "successful", "write", "to", "a", "quorum", "and", "is", "used", "for", "extra", "sanity", "checks", "against", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/client/AsyncLoggerSet.java#L81-L85
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/QuadPoseEstimator.java
QuadPoseEstimator.process
public boolean process(Quadrilateral_F64 corners, boolean unitsPixels) { """ <p>Estimate the 3D pose of the camera from the observed location of the fiducial.</p> MUST call {@link #setFiducial} and {@link #setLensDistoriton} before calling this function. @param corners Observed corners of the fiducial. @par...
java
public boolean process(Quadrilateral_F64 corners, boolean unitsPixels) { if( unitsPixels ) { pixelCorners.set(corners); pixelToNorm.compute(corners.a.x, corners.a.y, normCorners.a); pixelToNorm.compute(corners.b.x, corners.b.y, normCorners.b); pixelToNorm.compute(corners.c.x, corners.c.y, normCorners.c);...
[ "public", "boolean", "process", "(", "Quadrilateral_F64", "corners", ",", "boolean", "unitsPixels", ")", "{", "if", "(", "unitsPixels", ")", "{", "pixelCorners", ".", "set", "(", "corners", ")", ";", "pixelToNorm", ".", "compute", "(", "corners", ".", "a", ...
<p>Estimate the 3D pose of the camera from the observed location of the fiducial.</p> MUST call {@link #setFiducial} and {@link #setLensDistoriton} before calling this function. @param corners Observed corners of the fiducial. @param unitsPixels If true the specified corners are in original image pixels or false for...
[ "<p", ">", "Estimate", "the", "3D", "pose", "of", "the", "camera", "from", "the", "observed", "location", "of", "the", "fiducial", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/QuadPoseEstimator.java#L182-L204
aws/aws-sdk-java
aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/EncryptRequest.java
EncryptRequest.getEncryptionContext
public java.util.Map<String, String> getEncryptionContext() { """ <p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more information, see <a href="http://do...
java
public java.util.Map<String, String> getEncryptionContext() { if (encryptionContext == null) { encryptionContext = new com.amazonaws.internal.SdkInternalMap<String, String>(); } return encryptionContext; }
[ "public", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "getEncryptionContext", "(", ")", "{", "if", "(", "encryptionContext", "==", "null", ")", "{", "encryptionContext", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "...
<p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encry...
[ "<p", ">", "Name", "-", "value", "pair", "that", "specifies", "the", "encryption", "context", "to", "be", "used", "for", "authenticated", "encryption", ".", "If", "used", "here", "the", "same", "value", "must", "be", "supplied", "to", "the", "<code", ">", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/EncryptRequest.java#L411-L416
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/JavaJNDIComponentMetaDataAccessor.java
JavaJNDIComponentMetaDataAccessor.getComponentMetaData
public static ComponentMetaData getComponentMetaData(JavaColonNamespace namespace, String name) throws NamingException { """ Helper method to get the component metadata from the thread context. @return the component metadata data for the thread. @throws NamingException Throws NamingException if running on a no...
java
public static ComponentMetaData getComponentMetaData(JavaColonNamespace namespace, String name) throws NamingException { ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData(); if (cmd == null) { String fullName = name.isEmpty() ? namespac...
[ "public", "static", "ComponentMetaData", "getComponentMetaData", "(", "JavaColonNamespace", "namespace", ",", "String", "name", ")", "throws", "NamingException", "{", "ComponentMetaData", "cmd", "=", "ComponentMetaDataAccessorImpl", ".", "getComponentMetaDataAccessor", "(", ...
Helper method to get the component metadata from the thread context. @return the component metadata data for the thread. @throws NamingException Throws NamingException if running on a non-Java EE thread.
[ "Helper", "method", "to", "get", "the", "component", "metadata", "from", "the", "thread", "context", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi.url.contexts/src/com/ibm/ws/jndi/url/contexts/javacolon/JavaJNDIComponentMetaDataAccessor.java#L36-L45
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
BackupManagerImpl.startBackup
BackupChain startBackup(BackupConfig config, BackupJobListener jobListener) throws BackupOperationException, BackupConfigurationException, RepositoryException, RepositoryConfigurationException { """ Internally used for call with job listener from scheduler. @param config @param jobListener @return @thr...
java
BackupChain startBackup(BackupConfig config, BackupJobListener jobListener) throws BackupOperationException, BackupConfigurationException, RepositoryException, RepositoryConfigurationException { validateBackupConfig(config); Calendar startTime = Calendar.getInstance(); File dir = Fi...
[ "BackupChain", "startBackup", "(", "BackupConfig", "config", ",", "BackupJobListener", "jobListener", ")", "throws", "BackupOperationException", ",", "BackupConfigurationException", ",", "RepositoryException", ",", "RepositoryConfigurationException", "{", "validateBackupConfig", ...
Internally used for call with job listener from scheduler. @param config @param jobListener @return @throws BackupOperationException @throws BackupConfigurationException @throws RepositoryException @throws RepositoryConfigurationException
[ "Internally", "used", "for", "call", "with", "job", "listener", "from", "scheduler", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java#L764-L787
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/math/matrixes/Matrix.java
Matrix.setRow
public void setRow(RowVector rv, int r) throws MatrixException { """ Set a row of this matrix from a row vector. @param rv the row vector @param r the row index @throws numbercruncher.MatrixException for an invalid index or an invalid vector size """ if ((r < 0) || (r >= nRows)) { throw...
java
public void setRow(RowVector rv, int r) throws MatrixException { if ((r < 0) || (r >= nRows)) { throw new MatrixException(MatrixException.INVALID_INDEX); } if (nCols != rv.nCols) { throw new MatrixException( MatrixException.INVALID_DIME...
[ "public", "void", "setRow", "(", "RowVector", "rv", ",", "int", "r", ")", "throws", "MatrixException", "{", "if", "(", "(", "r", "<", "0", ")", "||", "(", "r", ">=", "nRows", ")", ")", "{", "throw", "new", "MatrixException", "(", "MatrixException", "...
Set a row of this matrix from a row vector. @param rv the row vector @param r the row index @throws numbercruncher.MatrixException for an invalid index or an invalid vector size
[ "Set", "a", "row", "of", "this", "matrix", "from", "a", "row", "vector", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/math/matrixes/Matrix.java#L183-L196
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/InstanceHelpers.java
InstanceHelpers.tryToInsertChildInstance
public static boolean tryToInsertChildInstance( AbstractApplication application, Instance parentInstance, Instance childInstance ) { """ Tries to insert a child instance. <ol> <li>Check if there is no child instance with this name.</li> <li>Check that the graph(s) allow it (coherence with respect to the compone...
java
public static boolean tryToInsertChildInstance( AbstractApplication application, Instance parentInstance, Instance childInstance ) { // First, make sure there is no child instance with this name before inserting. // Otherwise, removing the child instance may result randomly. boolean hasAlreadyAChildWithThisName ...
[ "public", "static", "boolean", "tryToInsertChildInstance", "(", "AbstractApplication", "application", ",", "Instance", "parentInstance", ",", "Instance", "childInstance", ")", "{", "// First, make sure there is no child instance with this name before inserting.", "// Otherwise, remov...
Tries to insert a child instance. <ol> <li>Check if there is no child instance with this name.</li> <li>Check that the graph(s) allow it (coherence with respect to the components).</li> <li>Insert the instance.</li> <li>Validate the application after insertion.</li> <li>Critical error =&gt; revert the insertion.</li> <...
[ "Tries", "to", "insert", "a", "child", "instance", ".", "<ol", ">", "<li", ">", "Check", "if", "there", "is", "no", "child", "instance", "with", "this", "name", ".", "<", "/", "li", ">", "<li", ">", "Check", "that", "the", "graph", "(", "s", ")", ...
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/InstanceHelpers.java#L420-L457
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/TieredBlockStore.java
TieredBlockStore.checkTempBlockIdAvailable
private void checkTempBlockIdAvailable(long blockId) throws BlockAlreadyExistsException { """ Checks if a block id is available for a new temp block. This method must be enclosed by {@link #mMetadataLock}. @param blockId the id of block @throws BlockAlreadyExistsException if block id already exists """ ...
java
private void checkTempBlockIdAvailable(long blockId) throws BlockAlreadyExistsException { if (mMetaManager.hasTempBlockMeta(blockId)) { throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_EXISTS, blockId); } if (mMetaManager.hasBlockMeta(blockId)) { throw new BlockAlreadyExistsE...
[ "private", "void", "checkTempBlockIdAvailable", "(", "long", "blockId", ")", "throws", "BlockAlreadyExistsException", "{", "if", "(", "mMetaManager", ".", "hasTempBlockMeta", "(", "blockId", ")", ")", "{", "throw", "new", "BlockAlreadyExistsException", "(", "Exception...
Checks if a block id is available for a new temp block. This method must be enclosed by {@link #mMetadataLock}. @param blockId the id of block @throws BlockAlreadyExistsException if block id already exists
[ "Checks", "if", "a", "block", "id", "is", "available", "for", "a", "new", "temp", "block", ".", "This", "method", "must", "be", "enclosed", "by", "{", "@link", "#mMetadataLock", "}", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/TieredBlockStore.java#L514-L521
oboehm/jfachwert
src/main/java/de/jfachwert/post/Adresse.java
Adresse.of
public static Adresse of(Ort ort, String strasse, int hausnummer) { """ Liefert eine Adresse mit den uebergebenen Parametern. @param ort the ort @param strasse the strasse @param hausnummer the hausnummer @return Adresse @since 2.1 """ return of(ort, strasse, Integer.toString(hausnumme...
java
public static Adresse of(Ort ort, String strasse, int hausnummer) { return of(ort, strasse, Integer.toString(hausnummer)); }
[ "public", "static", "Adresse", "of", "(", "Ort", "ort", ",", "String", "strasse", ",", "int", "hausnummer", ")", "{", "return", "of", "(", "ort", ",", "strasse", ",", "Integer", ".", "toString", "(", "hausnummer", ")", ")", ";", "}" ]
Liefert eine Adresse mit den uebergebenen Parametern. @param ort the ort @param strasse the strasse @param hausnummer the hausnummer @return Adresse @since 2.1
[ "Liefert", "eine", "Adresse", "mit", "den", "uebergebenen", "Parametern", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/post/Adresse.java#L168-L170
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java
ListDialogDecorator.initializeSelectionListener
private void initializeSelectionListener() { """ Initializes the listener, which should be notified, when the selection of a list item of the dialog has been changed. """ ChoiceMode choiceMode = adapter.getChoiceMode(); if (choiceMode instanceof MultipleChoiceMode) { adapter.setOn...
java
private void initializeSelectionListener() { ChoiceMode choiceMode = adapter.getChoiceMode(); if (choiceMode instanceof MultipleChoiceMode) { adapter.setOnItemClickListener( new OnMultiChoiceClickListenerWrapper(multiChoiceListener, getDialog(), 0)); } else if (c...
[ "private", "void", "initializeSelectionListener", "(", ")", "{", "ChoiceMode", "choiceMode", "=", "adapter", ".", "getChoiceMode", "(", ")", ";", "if", "(", "choiceMode", "instanceof", "MultipleChoiceMode", ")", "{", "adapter", ".", "setOnItemClickListener", "(", ...
Initializes the listener, which should be notified, when the selection of a list item of the dialog has been changed.
[ "Initializes", "the", "listener", "which", "should", "be", "notified", "when", "the", "selection", "of", "a", "list", "item", "of", "the", "dialog", "has", "been", "changed", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/ListDialogDecorator.java#L258-L272
strator-dev/greenpepper
greenpepper/greenpepper-server/src/main/java/com/greenpepper/server/GreenPepperServerServiceImpl.java
GreenPepperServerServiceImpl.getAllSpecificationRepositories
public List<Repository> getAllSpecificationRepositories() throws GreenPepperServerException { """ <p>getAllSpecificationRepositories.</p> @inheritDoc NO NEEDS TO SECURE THIS @return a {@link java.util.List} object. @throws com.greenpepper.server.GreenPepperServerException if any. """ try { ...
java
public List<Repository> getAllSpecificationRepositories() throws GreenPepperServerException { try { sessionService.startSession(); List<Repository> repositories = repositoryDao.getAllRepositories(ContentType.TEST); log.debug("Retrieved All Specification Repositories number:...
[ "public", "List", "<", "Repository", ">", "getAllSpecificationRepositories", "(", ")", "throws", "GreenPepperServerException", "{", "try", "{", "sessionService", ".", "startSession", "(", ")", ";", "List", "<", "Repository", ">", "repositories", "=", "repositoryDao"...
<p>getAllSpecificationRepositories.</p> @inheritDoc NO NEEDS TO SECURE THIS @return a {@link java.util.List} object. @throws com.greenpepper.server.GreenPepperServerException if any.
[ "<p", ">", "getAllSpecificationRepositories", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-server/src/main/java/com/greenpepper/server/GreenPepperServerServiceImpl.java#L454-L467
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java
LabsInner.updateAsync
public Observable<LabInner> updateAsync(String resourceGroupName, String labAccountName, String labName, LabFragment lab) { """ Modify properties of labs. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param lab...
java
public Observable<LabInner> updateAsync(String resourceGroupName, String labAccountName, String labName, LabFragment lab) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, lab).map(new Func1<ServiceResponse<LabInner>, LabInner>() { @Override public LabIn...
[ "public", "Observable", "<", "LabInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "LabFragment", "lab", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Modify properties of labs. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param lab Represents a lab. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LabInner object
[ "Modify", "properties", "of", "labs", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java#L864-L871
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTextAreaRenderer.java
WTextAreaRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WTextArea. @param component the WTextArea to paint. @param renderContext the RenderContext to paint to. """ WTextArea textArea = (WTextArea) component; XmlStringBuilder xml = rend...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WTextArea textArea = (WTextArea) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = textArea.isReadOnly(); xml.appendTagOpen("ui:textarea"); xml.appendAttribute("id", component.g...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WTextArea", "textArea", "=", "(", "WTextArea", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderCo...
Paints the given WTextArea. @param component the WTextArea to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WTextArea", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTextAreaRenderer.java#L25-L86
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.getPool
public CloudPool getPool(String poolId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @param detailLevel A {@link DetailLevel} used for contro...
java
public CloudPool getPool(String poolId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolGetOptions options = new PoolGetOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors...
[ "public", "CloudPool", "getPool", "(", "String", "poolId", ",", "DetailLevel", "detailLevel", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolGetOptions", "options", "=", "new...
Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @param detailLevel A {@link DetailLevel} used for controlling which properties are retrieved from the service. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @...
[ "Gets", "the", "specified", "{", "@link", "CloudPool", "}", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L215-L223
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/impl/DamAsset.java
DamAsset.getDamRendition
protected Rendition getDamRendition(MediaArgs mediaArgs) { """ Get DAM rendition instance. @param mediaArgs Media args @return DAM rendition instance (may be invalid rendition) """ return new DamRendition(this.damAsset, this.cropDimension, this.rotation, mediaArgs, adaptable); }
java
protected Rendition getDamRendition(MediaArgs mediaArgs) { return new DamRendition(this.damAsset, this.cropDimension, this.rotation, mediaArgs, adaptable); }
[ "protected", "Rendition", "getDamRendition", "(", "MediaArgs", "mediaArgs", ")", "{", "return", "new", "DamRendition", "(", "this", ".", "damAsset", ",", "this", ".", "cropDimension", ",", "this", ".", "rotation", ",", "mediaArgs", ",", "adaptable", ")", ";", ...
Get DAM rendition instance. @param mediaArgs Media args @return DAM rendition instance (may be invalid rendition)
[ "Get", "DAM", "rendition", "instance", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/impl/DamAsset.java#L161-L163
rhuss/jolokia
agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java
MBeanServerHandler.dispatchRequest
public Object dispatchRequest(JsonRequestHandler pRequestHandler, JmxRequest pJmxReq) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, NotChangedException { """ Dispatch a request to the MBeanServer which can handle it @param pRequestHandler request ...
java
public Object dispatchRequest(JsonRequestHandler pRequestHandler, JmxRequest pJmxReq) throws InstanceNotFoundException, AttributeNotFoundException, ReflectionException, MBeanException, NotChangedException { serverHandle.preDispatch(mBeanServerManager,pJmxReq); if (pRequestHandler.handleAllSe...
[ "public", "Object", "dispatchRequest", "(", "JsonRequestHandler", "pRequestHandler", ",", "JmxRequest", "pJmxReq", ")", "throws", "InstanceNotFoundException", ",", "AttributeNotFoundException", ",", "ReflectionException", ",", "MBeanException", ",", "NotChangedException", "{"...
Dispatch a request to the MBeanServer which can handle it @param pRequestHandler request handler to be called with an MBeanServer @param pJmxReq the request to dispatch @return the result of the request
[ "Dispatch", "a", "request", "to", "the", "MBeanServer", "which", "can", "handle", "it" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/MBeanServerHandler.java#L151-L163
wdullaer/MaterialDateTimePicker
library/src/main/java/com/wdullaer/materialdatetimepicker/Utils.java
Utils.isDarkTheme
public static boolean isDarkTheme(Context context, boolean current) { """ Gets dialog type (Light/Dark) from current theme @param context The context to use as reference for the boolean @param current Default value to return if cannot resolve the attribute @return true if dark mode, false if light. """ ...
java
public static boolean isDarkTheme(Context context, boolean current) { return resolveBoolean(context, R.attr.mdtp_theme_dark, current); }
[ "public", "static", "boolean", "isDarkTheme", "(", "Context", "context", ",", "boolean", "current", ")", "{", "return", "resolveBoolean", "(", "context", ",", "R", ".", "attr", ".", "mdtp_theme_dark", ",", "current", ")", ";", "}" ]
Gets dialog type (Light/Dark) from current theme @param context The context to use as reference for the boolean @param current Default value to return if cannot resolve the attribute @return true if dark mode, false if light.
[ "Gets", "dialog", "type", "(", "Light", "/", "Dark", ")", "from", "current", "theme" ]
train
https://github.com/wdullaer/MaterialDateTimePicker/blob/0a8fe28f19db4f5a5a6cfc525a852416232873a8/library/src/main/java/com/wdullaer/materialdatetimepicker/Utils.java#L123-L125
wildfly/wildfly-core
protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java
AbstractMessageHandler.getFallbackHandler
protected static <T, A> ManagementRequestHandler<T, A> getFallbackHandler(final ManagementRequestHeader header) { """ Get a fallback handler. @param header the protocol header @return the fallback handler """ return new ManagementRequestHandler<T, A>() { @Override public voi...
java
protected static <T, A> ManagementRequestHandler<T, A> getFallbackHandler(final ManagementRequestHeader header) { return new ManagementRequestHandler<T, A>() { @Override public void handleRequest(final DataInput input, ActiveOperation.ResultHandler<T> resultHandler, ManagementRequestCont...
[ "protected", "static", "<", "T", ",", "A", ">", "ManagementRequestHandler", "<", "T", ",", "A", ">", "getFallbackHandler", "(", "final", "ManagementRequestHeader", "header", ")", "{", "return", "new", "ManagementRequestHandler", "<", "T", ",", "A", ">", "(", ...
Get a fallback handler. @param header the protocol header @return the fallback handler
[ "Get", "a", "fallback", "handler", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/AbstractMessageHandler.java#L537-L547
validator/validator
src/nu/validator/gnu/xml/aelfred2/XmlParser.java
XmlParser.pushString
private void pushString(String ename, String s) throws SAXException { """ This method pushes a string back onto input. <p> It is useful either as the expansion of an internal entity, or for backtracking during the parse. <p> Call pushCharArray () to do the actual work. @param s The string to push back ont...
java
private void pushString(String ename, String s) throws SAXException { char[] ch = s.toCharArray(); pushCharArray(ename, ch, 0, ch.length); }
[ "private", "void", "pushString", "(", "String", "ename", ",", "String", "s", ")", "throws", "SAXException", "{", "char", "[", "]", "ch", "=", "s", ".", "toCharArray", "(", ")", ";", "pushCharArray", "(", "ename", ",", "ch", ",", "0", ",", "ch", ".", ...
This method pushes a string back onto input. <p> It is useful either as the expansion of an internal entity, or for backtracking during the parse. <p> Call pushCharArray () to do the actual work. @param s The string to push back onto input. @see #pushCharArray
[ "This", "method", "pushes", "a", "string", "back", "onto", "input", ".", "<p", ">", "It", "is", "useful", "either", "as", "the", "expansion", "of", "an", "internal", "entity", "or", "for", "backtracking", "during", "the", "parse", ".", "<p", ">", "Call",...
train
https://github.com/validator/validator/blob/c7b7f85b3a364df7d9944753fb5b2cd0ce642889/src/nu/validator/gnu/xml/aelfred2/XmlParser.java#L4131-L4134
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java
JobControllerClient.deleteJob
public final void deleteJob(String projectId, String region, String jobId) { """ Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`. <p>Sample code: <pre><code> try (JobControllerClient jobControllerClient = JobControllerClient.create())...
java
public final void deleteJob(String projectId, String region, String jobId) { DeleteJobRequest request = DeleteJobRequest.newBuilder() .setProjectId(projectId) .setRegion(region) .setJobId(jobId) .build(); deleteJob(request); }
[ "public", "final", "void", "deleteJob", "(", "String", "projectId", ",", "String", "region", ",", "String", "jobId", ")", "{", "DeleteJobRequest", "request", "=", "DeleteJobRequest", ".", "newBuilder", "(", ")", ".", "setProjectId", "(", "projectId", ")", ".",...
Deletes the job from the project. If the job is active, the delete fails, and the response returns `FAILED_PRECONDITION`. <p>Sample code: <pre><code> try (JobControllerClient jobControllerClient = JobControllerClient.create()) { String projectId = ""; String region = ""; String jobId = ""; jobControllerClient.deleteJ...
[ "Deletes", "the", "job", "from", "the", "project", ".", "If", "the", "job", "is", "active", "the", "delete", "fails", "and", "the", "response", "returns", "FAILED_PRECONDITION", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java#L647-L656
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionManager.java
RaftSessionManager.resetConnections
public void resetConnections(MemberId leader, Collection<MemberId> servers) { """ Resets the session manager's cluster information. @param leader The leader address. @param servers The collection of servers. """ selectorManager.resetAll(leader, servers); }
java
public void resetConnections(MemberId leader, Collection<MemberId> servers) { selectorManager.resetAll(leader, servers); }
[ "public", "void", "resetConnections", "(", "MemberId", "leader", ",", "Collection", "<", "MemberId", ">", "servers", ")", "{", "selectorManager", ".", "resetAll", "(", "leader", ",", "servers", ")", ";", "}" ]
Resets the session manager's cluster information. @param leader The leader address. @param servers The collection of servers.
[ "Resets", "the", "session", "manager", "s", "cluster", "information", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionManager.java#L131-L133
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractIPListPolicy.java
AbstractIPListPolicy.getRemoteAddr
protected String getRemoteAddr(ApiRequest request, IPListConfig config) { """ Gets the remote address for comparison. @param request the request @param config the config """ String httpHeader = config.getHttpHeader(); if (httpHeader != null && httpHeader.trim().length() > 0) { Str...
java
protected String getRemoteAddr(ApiRequest request, IPListConfig config) { String httpHeader = config.getHttpHeader(); if (httpHeader != null && httpHeader.trim().length() > 0) { String value = (String) request.getHeaders().get(httpHeader); if (value != null) { ret...
[ "protected", "String", "getRemoteAddr", "(", "ApiRequest", "request", ",", "IPListConfig", "config", ")", "{", "String", "httpHeader", "=", "config", ".", "getHttpHeader", "(", ")", ";", "if", "(", "httpHeader", "!=", "null", "&&", "httpHeader", ".", "trim", ...
Gets the remote address for comparison. @param request the request @param config the config
[ "Gets", "the", "remote", "address", "for", "comparison", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractIPListPolicy.java#L35-L44
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/CQLStashTableDAO.java
CQLStashTableDAO.fromSameShard
private boolean fromSameShard(ByteBuffer fromInclusive, ByteBuffer toExclusive) { """ Two tokens are from the same shard if the following are both true: <ol> <li>Both tokens are at least 9 bytes long (1 shard + 8 table uuid bytes)</li> <li>The shard and table uuid for both tokens are identical</li> </ol> "...
java
private boolean fromSameShard(ByteBuffer fromInclusive, ByteBuffer toExclusive) { return fromInclusive.remaining() >= 9 && toExclusive.remaining() >= 9 && RowKeyUtils.getShardId(fromInclusive) == RowKeyUtils.getShardId(toExclusive) && RowKeyUtils.getTableUuid(from...
[ "private", "boolean", "fromSameShard", "(", "ByteBuffer", "fromInclusive", ",", "ByteBuffer", "toExclusive", ")", "{", "return", "fromInclusive", ".", "remaining", "(", ")", ">=", "9", "&&", "toExclusive", ".", "remaining", "(", ")", ">=", "9", "&&", "RowKeyUt...
Two tokens are from the same shard if the following are both true: <ol> <li>Both tokens are at least 9 bytes long (1 shard + 8 table uuid bytes)</li> <li>The shard and table uuid for both tokens are identical</li> </ol>
[ "Two", "tokens", "are", "from", "the", "same", "shard", "if", "the", "following", "are", "both", "true", ":", "<ol", ">", "<li", ">", "Both", "tokens", "are", "at", "least", "9", "bytes", "long", "(", "1", "shard", "+", "8", "table", "uuid", "bytes",...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/CQLStashTableDAO.java#L128-L133
google/truth
extensions/proto/src/main/java/com/google/common/truth/extensions/proto/IterableOfProtosSubject.java
IterableOfProtosSubject.usingFloatToleranceForFieldDescriptors
public IterableOfProtosFluentAssertion<M> usingFloatToleranceForFieldDescriptors( float tolerance, Iterable<FieldDescriptor> fieldDescriptors) { """ Compares float fields with these explicitly specified top-level field numbers using the provided absolute tolerance. @param tolerance A finite, non-negative...
java
public IterableOfProtosFluentAssertion<M> usingFloatToleranceForFieldDescriptors( float tolerance, Iterable<FieldDescriptor> fieldDescriptors) { return usingConfig(config.usingFloatToleranceForFieldDescriptors(tolerance, fieldDescriptors)); }
[ "public", "IterableOfProtosFluentAssertion", "<", "M", ">", "usingFloatToleranceForFieldDescriptors", "(", "float", "tolerance", ",", "Iterable", "<", "FieldDescriptor", ">", "fieldDescriptors", ")", "{", "return", "usingConfig", "(", "config", ".", "usingFloatToleranceFo...
Compares float fields with these explicitly specified top-level field numbers using the provided absolute tolerance. @param tolerance A finite, non-negative tolerance.
[ "Compares", "float", "fields", "with", "these", "explicitly", "specified", "top", "-", "level", "field", "numbers", "using", "the", "provided", "absolute", "tolerance", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/IterableOfProtosSubject.java#L845-L848
lucee/Lucee
core/src/main/java/lucee/runtime/rest/RestUtil.java
RestUtil.matchPath
public static int matchPath(Struct variables, Path[] restPath, String[] callerPath) { """ check if caller path match the cfc path @param variables @param restPath @param callerPath @return match until which index of the given cfc path, returns -1 if there is no match """ if (restPath.length > callerPath...
java
public static int matchPath(Struct variables, Path[] restPath, String[] callerPath) { if (restPath.length > callerPath.length) return -1; int index = 0; for (; index < restPath.length; index++) { if (!restPath[index].match(variables, callerPath[index])) return -1; } return index - 1; }
[ "public", "static", "int", "matchPath", "(", "Struct", "variables", ",", "Path", "[", "]", "restPath", ",", "String", "[", "]", "callerPath", ")", "{", "if", "(", "restPath", ".", "length", ">", "callerPath", ".", "length", ")", "return", "-", "1", ";"...
check if caller path match the cfc path @param variables @param restPath @param callerPath @return match until which index of the given cfc path, returns -1 if there is no match
[ "check", "if", "caller", "path", "match", "the", "cfc", "path" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/rest/RestUtil.java#L46-L54
opentable/otj-logging
jetty/src/main/java/com/opentable/logging/jetty/JsonRequestLog.java
JsonRequestLog.getRequestIdFrom
protected UUID getRequestIdFrom(Request request, Response response) { """ Provides a hook whereby an alternate source can be provided for grabbing the requestId """ return optUuid(response.getHeader(OTHeaders.REQUEST_ID)); }
java
protected UUID getRequestIdFrom(Request request, Response response) { return optUuid(response.getHeader(OTHeaders.REQUEST_ID)); }
[ "protected", "UUID", "getRequestIdFrom", "(", "Request", "request", ",", "Response", "response", ")", "{", "return", "optUuid", "(", "response", ".", "getHeader", "(", "OTHeaders", ".", "REQUEST_ID", ")", ")", ";", "}" ]
Provides a hook whereby an alternate source can be provided for grabbing the requestId
[ "Provides", "a", "hook", "whereby", "an", "alternate", "source", "can", "be", "provided", "for", "grabbing", "the", "requestId" ]
train
https://github.com/opentable/otj-logging/blob/eaa74c877c4721ddb9af8eb7fe1612166f7ac14d/jetty/src/main/java/com/opentable/logging/jetty/JsonRequestLog.java#L157-L159
rometools/rome
rome-fetcher/src/main/java/com/rometools/fetcher/impl/HttpURLFeedFetcher.java
HttpURLFeedFetcher.setRequestHeaders
protected void setRequestHeaders(final URLConnection connection, final SyndFeedInfo syndFeedInfo, final String userAgent) { """ <p> Set appropriate HTTP headers, including conditional get and gzip encoding headers </p> @param connection A URLConnection @param syndFeedInfo The SyndFeedInfo for the feed to be ...
java
protected void setRequestHeaders(final URLConnection connection, final SyndFeedInfo syndFeedInfo, final String userAgent) { if (syndFeedInfo != null) { // set the headers to get feed only if modified // we support the use of both last modified and eTag headers if (syndFeedInf...
[ "protected", "void", "setRequestHeaders", "(", "final", "URLConnection", "connection", ",", "final", "SyndFeedInfo", "syndFeedInfo", ",", "final", "String", "userAgent", ")", "{", "if", "(", "syndFeedInfo", "!=", "null", ")", "{", "// set the headers to get feed only ...
<p> Set appropriate HTTP headers, including conditional get and gzip encoding headers </p> @param connection A URLConnection @param syndFeedInfo The SyndFeedInfo for the feed to be retrieved. May be null @param userAgent the name of the user-agent to be placed in HTTP-header.
[ "<p", ">", "Set", "appropriate", "HTTP", "headers", "including", "conditional", "get", "and", "gzip", "encoding", "headers", "<", "/", "p", ">" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-fetcher/src/main/java/com/rometools/fetcher/impl/HttpURLFeedFetcher.java#L253-L275
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.queryProfiles
public void queryProfiles(@NonNull final String queryString, @Nullable Callback<ComapiResult<List<Map<String, Object>>>> callback) { """ Query user profiles on the services. @param queryString Query string. See https://www.npmjs.com/package/mongo-querystring for query syntax. You can use {@link QueryBuilder} he...
java
public void queryProfiles(@NonNull final String queryString, @Nullable Callback<ComapiResult<List<Map<String, Object>>>> callback) { adapter.adapt(queryProfiles(queryString), callback); }
[ "public", "void", "queryProfiles", "(", "@", "NonNull", "final", "String", "queryString", ",", "@", "Nullable", "Callback", "<", "ComapiResult", "<", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", ">", "callback", ")", "{", "adapter", "...
Query user profiles on the services. @param queryString Query string. See https://www.npmjs.com/package/mongo-querystring for query syntax. You can use {@link QueryBuilder} helper class to construct valid query string. @param callback Callback to deliver new session instance.
[ "Query", "user", "profiles", "on", "the", "services", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L308-L310
strator-dev/greenpepper
greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java
ConfluenceGreenPepper.getText
@HtmlSafe public String getText(String key, Object... arguments) { """ <p>getText.</p> @param key a {@link java.lang.String} object. @param arguments a {@link java.lang.Object} object. @return a {@link java.lang.String} object. """ return I18nUtil.getText(key, getResourceBundle(), arguments); ...
java
@HtmlSafe public String getText(String key, Object... arguments) { return I18nUtil.getText(key, getResourceBundle(), arguments); }
[ "@", "HtmlSafe", "public", "String", "getText", "(", "String", "key", ",", "Object", "...", "arguments", ")", "{", "return", "I18nUtil", ".", "getText", "(", "key", ",", "getResourceBundle", "(", ")", ",", "arguments", ")", ";", "}" ]
<p>getText.</p> @param key a {@link java.lang.String} object. @param arguments a {@link java.lang.Object} object. @return a {@link java.lang.String} object.
[ "<p", ">", "getText", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java#L240-L243
amzn/ion-java
src/com/amazon/ion/util/IonTextUtils.java
IonTextUtils.printCodePointAsTwoHexDigits
private static void printCodePointAsTwoHexDigits(Appendable out, int c) throws IOException { """ Generates a two-digit hex escape sequence, {@code "\x}<i>{@code HH}</i>{@code "}, using lower-case for alphabetics. """ String s = Integer.toHexString(c); out.append("\\x"); if (s....
java
private static void printCodePointAsTwoHexDigits(Appendable out, int c) throws IOException { String s = Integer.toHexString(c); out.append("\\x"); if (s.length() < 2) { out.append(ZERO_PADDING[2-s.length()]); } out.append(s); }
[ "private", "static", "void", "printCodePointAsTwoHexDigits", "(", "Appendable", "out", ",", "int", "c", ")", "throws", "IOException", "{", "String", "s", "=", "Integer", ".", "toHexString", "(", "c", ")", ";", "out", ".", "append", "(", "\"\\\\x\"", ")", "...
Generates a two-digit hex escape sequence, {@code "\x}<i>{@code HH}</i>{@code "}, using lower-case for alphabetics.
[ "Generates", "a", "two", "-", "digit", "hex", "escape", "sequence", "{" ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/util/IonTextUtils.java#L339-L348
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzleResultSet.java
DrizzleResultSet.updateNClob
public void updateNClob(final String columnLabel, final java.sql.NClob nClob) throws SQLException { """ Updates the designated column with a <code>java.sql.NClob</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlyi...
java
public void updateNClob(final String columnLabel, final java.sql.NClob nClob) throws SQLException { throw SQLExceptionMapper.getFeatureNotSupportedException("Updates are not supported"); }
[ "public", "void", "updateNClob", "(", "final", "String", "columnLabel", ",", "final", "java", ".", "sql", ".", "NClob", "nClob", ")", "throws", "SQLException", "{", "throw", "SQLExceptionMapper", ".", "getFeatureNotSupportedException", "(", "\"Updates are not supporte...
Updates the designated column with a <code>java.sql.NClob</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the dat...
[ "Updates", "the", "designated", "column", "with", "a", "<code", ">", "java", ".", "sql", ".", "NClob<", "/", "code", ">", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values", "in", "the", "current", "row", "or", ...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleResultSet.java#L2563-L2565
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectCircleCircle
public static boolean intersectCircleCircle(Vector2fc centerA, float radiusSquaredA, Vector2fc centerB, float radiusSquaredB, Vector3f intersectionCenterAndHL) { """ Test whether the one circle with center <code>centerA</code> and square radius <code>radiusSquaredA</code> intersects the other circle with center <...
java
public static boolean intersectCircleCircle(Vector2fc centerA, float radiusSquaredA, Vector2fc centerB, float radiusSquaredB, Vector3f intersectionCenterAndHL) { return intersectCircleCircle(centerA.x(), centerA.y(), radiusSquaredA, centerB.x(), centerB.y(), radiusSquaredB, intersectionCenterAndHL); }
[ "public", "static", "boolean", "intersectCircleCircle", "(", "Vector2fc", "centerA", ",", "float", "radiusSquaredA", ",", "Vector2fc", "centerB", ",", "float", "radiusSquaredB", ",", "Vector3f", "intersectionCenterAndHL", ")", "{", "return", "intersectCircleCircle", "("...
Test whether the one circle with center <code>centerA</code> and square radius <code>radiusSquaredA</code> intersects the other circle with center <code>centerB</code> and square radius <code>radiusSquaredB</code>, and store the center of the line segment of intersection in the <code>(x, y)</code> components of the sup...
[ "Test", "whether", "the", "one", "circle", "with", "center", "<code", ">", "centerA<", "/", "code", ">", "and", "square", "radius", "<code", ">", "radiusSquaredA<", "/", "code", ">", "intersects", "the", "other", "circle", "with", "center", "<code", ">", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L3756-L3758
vincentk/joptimizer
src/main/java/com/joptimizer/optimizers/LPPrimalDualMethod.java
LPPrimalDualMethod.GradLSum
protected DoubleMatrix2D GradLSum(DoubleMatrix1D L, DoubleMatrix1D fiX) { """ Return the H matrix (that is diagonal). This is the third addendum of (11.56) of "Convex Optimization". @see "Convex Optimization, 11.56" """ //DoubleMatrix2D GradLSum = F2.make(1, getDim()); SparseDoubleMatrix2D GradLSum = n...
java
protected DoubleMatrix2D GradLSum(DoubleMatrix1D L, DoubleMatrix1D fiX) { //DoubleMatrix2D GradLSum = F2.make(1, getDim()); SparseDoubleMatrix2D GradLSum = new SparseDoubleMatrix2D(getDim(), getDim(), getDim(), 0.001, 0.01); for(int i=0; i<getDim(); i++){ double d = 0; d -= L.getQuick(i) / fiX.getQuic...
[ "protected", "DoubleMatrix2D", "GradLSum", "(", "DoubleMatrix1D", "L", ",", "DoubleMatrix1D", "fiX", ")", "{", "//DoubleMatrix2D GradLSum = F2.make(1, getDim());\r", "SparseDoubleMatrix2D", "GradLSum", "=", "new", "SparseDoubleMatrix2D", "(", "getDim", "(", ")", ",", "get...
Return the H matrix (that is diagonal). This is the third addendum of (11.56) of "Convex Optimization". @see "Convex Optimization, 11.56"
[ "Return", "the", "H", "matrix", "(", "that", "is", "diagonal", ")", ".", "This", "is", "the", "third", "addendum", "of", "(", "11", ".", "56", ")", "of", "Convex", "Optimization", "." ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/optimizers/LPPrimalDualMethod.java#L745-L757
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/rb/CloudResourceBundle.java
CloudResourceBundle.loadBundle
static CloudResourceBundle loadBundle(ServiceAccount serviceAccount, String bundleId, Locale locale) { """ Package local factory method creating a new CloundResourceBundle instance for the specified service account, bundle ID and locale. @param serviceAccount The service account for IBM Globalization Pipeli...
java
static CloudResourceBundle loadBundle(ServiceAccount serviceAccount, String bundleId, Locale locale) { CloudResourceBundle crb = null; ServiceClient client = ServiceClient.getInstance(serviceAccount); try { Map<String, String> resStrings = client.getResourceStrings(bundleId, locale.t...
[ "static", "CloudResourceBundle", "loadBundle", "(", "ServiceAccount", "serviceAccount", ",", "String", "bundleId", ",", "Locale", "locale", ")", "{", "CloudResourceBundle", "crb", "=", "null", ";", "ServiceClient", "client", "=", "ServiceClient", ".", "getInstance", ...
Package local factory method creating a new CloundResourceBundle instance for the specified service account, bundle ID and locale. @param serviceAccount The service account for IBM Globalization Pipeline @param bundleId The bundle ID @param locale The locale @return An instance of CloundResource...
[ "Package", "local", "factory", "method", "creating", "a", "new", "CloundResourceBundle", "instance", "for", "the", "specified", "service", "account", "bundle", "ID", "and", "locale", "." ]
train
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/rb/CloudResourceBundle.java#L50-L61
zaproxy/zaproxy
src/org/parosproxy/paros/network/HttpHeader.java
HttpHeader.setHeader
public void setHeader(String name, String value) { """ Set a header name and value. If the name is not found, it will be added. If the value is null, the header will be removed. @param name @param value """ // int pos = 0; // int crlfpos = 0; Pattern pattern = null; if (getHeaders(...
java
public void setHeader(String name, String value) { // int pos = 0; // int crlfpos = 0; Pattern pattern = null; if (getHeaders(name) == null && value != null) { // header value not found, append to end addHeader(name, value); } else { pattern = getH...
[ "public", "void", "setHeader", "(", "String", "name", ",", "String", "value", ")", "{", "//\t\tint pos = 0;\r", "//\t\tint crlfpos = 0;\r", "Pattern", "pattern", "=", "null", ";", "if", "(", "getHeaders", "(", "name", ")", "==", "null", "&&", "value", "!=", ...
Set a header name and value. If the name is not found, it will be added. If the value is null, the header will be removed. @param name @param value
[ "Set", "a", "header", "name", "and", "value", ".", "If", "the", "name", "is", "not", "found", "it", "will", "be", "added", ".", "If", "the", "value", "is", "null", "the", "header", "will", "be", "removed", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpHeader.java#L250-L273
samskivert/pythagoras
src/main/java/pythagoras/f/QuadCurve.java
QuadCurve.setCurve
public void setCurve (float x1, float y1, float ctrlx, float ctrly, float x2, float y2) { """ Configures the start, control, and end points for this curve. """ this.x1 = x1; this.y1 = y1; this.ctrlx = ctrlx; this.ctrly = ctrly; this.x2 = x2; this.y2 = y2; }
java
public void setCurve (float x1, float y1, float ctrlx, float ctrly, float x2, float y2) { this.x1 = x1; this.y1 = y1; this.ctrlx = ctrlx; this.ctrly = ctrly; this.x2 = x2; this.y2 = y2; }
[ "public", "void", "setCurve", "(", "float", "x1", ",", "float", "y1", ",", "float", "ctrlx", ",", "float", "ctrly", ",", "float", "x2", ",", "float", "y2", ")", "{", "this", ".", "x1", "=", "x1", ";", "this", ".", "y1", "=", "y1", ";", "this", ...
Configures the start, control, and end points for this curve.
[ "Configures", "the", "start", "control", "and", "end", "points", "for", "this", "curve", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/QuadCurve.java#L50-L57
jamesagnew/hapi-fhir
hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java
AuditingInterceptor.getObjectElement
protected ObjectElement getObjectElement(IResource resource, SecurityEventObjectLifecycleEnum lifecycle, byte[] query) throws InstantiationException, IllegalAccessException { """ If the resource is considered an auditable resource containing PHI, create an ObjectElement, otherwise return null @param resource t...
java
protected ObjectElement getObjectElement(IResource resource, SecurityEventObjectLifecycleEnum lifecycle, byte[] query) throws InstantiationException, IllegalAccessException { String resourceType = resource.getResourceName(); if (myAuditableResources.containsKey(resourceType)) { log.debug("Found auditable resour...
[ "protected", "ObjectElement", "getObjectElement", "(", "IResource", "resource", ",", "SecurityEventObjectLifecycleEnum", "lifecycle", ",", "byte", "[", "]", "query", ")", "throws", "InstantiationException", ",", "IllegalAccessException", "{", "String", "resourceType", "="...
If the resource is considered an auditable resource containing PHI, create an ObjectElement, otherwise return null @param resource the resource to be audited @param lifecycle the SecurityEventObjectLifecycleEnum of the request @param query the byte encoded query string of the request @return an ObjectElement populated...
[ "If", "the", "resource", "is", "considered", "an", "auditable", "resource", "containing", "PHI", "create", "an", "ObjectElement", "otherwise", "return", "null" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L280-L321
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._generate
protected void _generate(SarlEvent event, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param event the event. @param context the context. """ final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(event); final PyAppendable appendable = createAppendable(j...
java
protected void _generate(SarlEvent event, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(event); final PyAppendable appendable = createAppendable(jvmType, context); final List<JvmTypeReference> superTypes; if (event.getExtends() != null) { ...
[ "protected", "void", "_generate", "(", "SarlEvent", "event", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "final", "JvmDeclaredType", "jvmType", "=", "getJvmModelAssociations", "(", ")", ".", "getInferredType", "(", "event", ")", ";", "final", "PyAppe...
Generate the given object. @param event the event. @param context the context.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L744-L762
JodaOrg/joda-time
src/main/java/org/joda/time/field/BaseDateTimeField.java
BaseDateTimeField.getAsText
public final String getAsText(ReadablePartial partial, Locale locale) { """ Get the human-readable, text value of this field from a partial instant. If the specified locale is null, the default locale is used. <p> The default implementation calls {@link ReadablePartial#get(DateTimeFieldType)} and {@link #getAs...
java
public final String getAsText(ReadablePartial partial, Locale locale) { return getAsText(partial, partial.get(getType()), locale); }
[ "public", "final", "String", "getAsText", "(", "ReadablePartial", "partial", ",", "Locale", "locale", ")", "{", "return", "getAsText", "(", "partial", ",", "partial", ".", "get", "(", "getType", "(", ")", ")", ",", "locale", ")", ";", "}" ]
Get the human-readable, text value of this field from a partial instant. If the specified locale is null, the default locale is used. <p> The default implementation calls {@link ReadablePartial#get(DateTimeFieldType)} and {@link #getAsText(ReadablePartial, int, Locale)}. @param partial the partial instant to query @p...
[ "Get", "the", "human", "-", "readable", "text", "value", "of", "this", "field", "from", "a", "partial", "instant", ".", "If", "the", "specified", "locale", "is", "null", "the", "default", "locale", "is", "used", ".", "<p", ">", "The", "default", "impleme...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/field/BaseDateTimeField.java#L135-L137
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/TopicApi.java
TopicApi.publishTopic
public ApiSuccessResponse publishTopic(String topic, PublishEventData publishEventData) throws ApiException { """ Publish an user event regarding specific topic Publish a user event on interaction server channel regarding specific topic. @param topic The specific topic (required) @param publishEventData (requi...
java
public ApiSuccessResponse publishTopic(String topic, PublishEventData publishEventData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = publishTopicWithHttpInfo(topic, publishEventData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "publishTopic", "(", "String", "topic", ",", "PublishEventData", "publishEventData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "publishTopicWithHttpInfo", "(", "topic", ",", "publishEv...
Publish an user event regarding specific topic Publish a user event on interaction server channel regarding specific topic. @param topic The specific topic (required) @param publishEventData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the ...
[ "Publish", "an", "user", "event", "regarding", "specific", "topic", "Publish", "a", "user", "event", "on", "interaction", "server", "channel", "regarding", "specific", "topic", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/TopicApi.java#L139-L142
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java
StructureTools.getAllAtomArray
public static final Atom[] getAllAtomArray(Structure s, int model) { """ Convert all atoms of the structure (specified model) into an Atom array @param s input structure @return all atom array """ List<Atom> atoms = new ArrayList<Atom>(); AtomIterator iter = new AtomIterator(s,model); while (iter.h...
java
public static final Atom[] getAllAtomArray(Structure s, int model) { List<Atom> atoms = new ArrayList<Atom>(); AtomIterator iter = new AtomIterator(s,model); while (iter.hasNext()) { Atom a = iter.next(); atoms.add(a); } return atoms.toArray(new Atom[atoms.size()]); }
[ "public", "static", "final", "Atom", "[", "]", "getAllAtomArray", "(", "Structure", "s", ",", "int", "model", ")", "{", "List", "<", "Atom", ">", "atoms", "=", "new", "ArrayList", "<", "Atom", ">", "(", ")", ";", "AtomIterator", "iter", "=", "new", "...
Convert all atoms of the structure (specified model) into an Atom array @param s input structure @return all atom array
[ "Convert", "all", "atoms", "of", "the", "structure", "(", "specified", "model", ")", "into", "an", "Atom", "array" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L377-L387
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/HMac.java
HMac.digestHex
public String digestHex(InputStream data, int bufferLength) { """ 生成摘要,并转为16进制字符串<br> 使用默认缓存大小,见 {@link IoUtil#DEFAULT_BUFFER_SIZE} @param data 被摘要数据 @param bufferLength 缓存长度,不足1使用 {@link IoUtil#DEFAULT_BUFFER_SIZE} 做为默认值 @return 摘要 """ return HexUtil.encodeHexStr(digest(data, bufferLength)); }
java
public String digestHex(InputStream data, int bufferLength) { return HexUtil.encodeHexStr(digest(data, bufferLength)); }
[ "public", "String", "digestHex", "(", "InputStream", "data", ",", "int", "bufferLength", ")", "{", "return", "HexUtil", ".", "encodeHexStr", "(", "digest", "(", "data", ",", "bufferLength", ")", ")", ";", "}" ]
生成摘要,并转为16进制字符串<br> 使用默认缓存大小,见 {@link IoUtil#DEFAULT_BUFFER_SIZE} @param data 被摘要数据 @param bufferLength 缓存长度,不足1使用 {@link IoUtil#DEFAULT_BUFFER_SIZE} 做为默认值 @return 摘要
[ "生成摘要,并转为16进制字符串<br", ">", "使用默认缓存大小,见", "{", "@link", "IoUtil#DEFAULT_BUFFER_SIZE", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/HMac.java#L252-L254
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java
DataFrameJoiner.rightOuter
public Table rightOuter(Table table2, String col2Name) { """ Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double column, the join is performed aft...
java
public Table rightOuter(Table table2, String col2Name) { return rightOuter(table2, false, col2Name); }
[ "public", "Table", "rightOuter", "(", "Table", "table2", ",", "String", "col2Name", ")", "{", "return", "rightOuter", "(", "table2", ",", "false", ",", "col2Name", ")", ";", "}" ]
Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers. @return The resulting table
[ "Joins", "the", "joiner", "to", "the", "table2", "using", "the", "given", "column", "for", "the", "second", "table", "and", "returns", "the", "resulting", "table" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java#L578-L580
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/config/loaderwriter/DefaultCacheLoaderWriterProviderConfiguration.java
DefaultCacheLoaderWriterProviderConfiguration.addLoaderFor
public DefaultCacheLoaderWriterProviderConfiguration addLoaderFor(String alias, Class<? extends CacheLoaderWriter<?, ?>> clazz, Object... arguments) { """ Adds a default {@link CacheLoaderWriter} class and associated constuctor arguments to be used with a cache matching the provided alias. @param alias the cac...
java
public DefaultCacheLoaderWriterProviderConfiguration addLoaderFor(String alias, Class<? extends CacheLoaderWriter<?, ?>> clazz, Object... arguments) { getDefaults().put(alias, new DefaultCacheLoaderWriterConfiguration(clazz, arguments)); return this; }
[ "public", "DefaultCacheLoaderWriterProviderConfiguration", "addLoaderFor", "(", "String", "alias", ",", "Class", "<", "?", "extends", "CacheLoaderWriter", "<", "?", ",", "?", ">", ">", "clazz", ",", "Object", "...", "arguments", ")", "{", "getDefaults", "(", ")"...
Adds a default {@link CacheLoaderWriter} class and associated constuctor arguments to be used with a cache matching the provided alias. @param alias the cache alias @param clazz the cache loader writer class @param arguments the constructor arguments @return this configuration instance
[ "Adds", "a", "default", "{", "@link", "CacheLoaderWriter", "}", "class", "and", "associated", "constuctor", "arguments", "to", "be", "used", "with", "a", "cache", "matching", "the", "provided", "alias", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/config/loaderwriter/DefaultCacheLoaderWriterProviderConfiguration.java#L47-L50
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java
AbstractContextSource.createContext
protected DirContext createContext(Hashtable<String, Object> environment) { """ Create a DirContext using the supplied environment. @param environment the LDAP environment to use when creating the <code>DirContext</code>. @return a new DirContext implementation initialized with the supplied environment. ...
java
protected DirContext createContext(Hashtable<String, Object> environment) { DirContext ctx = null; try { ctx = getDirContextInstance(environment); if (LOG.isInfoEnabled()) { Hashtable<?, ?> ctxEnv = ctx.getEnvironment(); String ldapUrl = (String) ctxEnv.get(Context.PROVIDER_URL); LOG.debug("Got ...
[ "protected", "DirContext", "createContext", "(", "Hashtable", "<", "String", ",", "Object", ">", "environment", ")", "{", "DirContext", "ctx", "=", "null", ";", "try", "{", "ctx", "=", "getDirContextInstance", "(", "environment", ")", ";", "if", "(", "LOG", ...
Create a DirContext using the supplied environment. @param environment the LDAP environment to use when creating the <code>DirContext</code>. @return a new DirContext implementation initialized with the supplied environment.
[ "Create", "a", "DirContext", "using", "the", "supplied", "environment", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java#L339-L357
gotev/android-upload-service
examples/app/demoapp/src/main/java/net/gotev/uploadservicedemo/utils/AndroidPermissions.java
AndroidPermissions.areAllRequiredPermissionsGranted
public boolean areAllRequiredPermissionsGranted(String[] permissions, int[] grantResults) { """ Method to call inside {@link Activity#onRequestPermissionsResult(int, String[], int[])}, to check if the required permissions are granted. @param permissions permissions requested @param grantResults results @retur...
java
public boolean areAllRequiredPermissionsGranted(String[] permissions, int[] grantResults) { if (permissions == null || permissions.length == 0 || grantResults == null || grantResults.length == 0) { return false; } LinkedHashMap<String, Integer> perms = new LinkedHash...
[ "public", "boolean", "areAllRequiredPermissionsGranted", "(", "String", "[", "]", "permissions", ",", "int", "[", "]", "grantResults", ")", "{", "if", "(", "permissions", "==", "null", "||", "permissions", ".", "length", "==", "0", "||", "grantResults", "==", ...
Method to call inside {@link Activity#onRequestPermissionsResult(int, String[], int[])}, to check if the required permissions are granted. @param permissions permissions requested @param grantResults results @return true if all the required permissions are granted, otherwise false
[ "Method", "to", "call", "inside", "{" ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/examples/app/demoapp/src/main/java/net/gotev/uploadservicedemo/utils/AndroidPermissions.java#L83-L104
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/f/EssentialNister5.java
EssentialNister5.process
public boolean process( List<AssociatedPair> points , FastQueue<DMatrixRMaj> solutions ) { """ Computes the essential matrix from point correspondences. @param points Input: List of points correspondences in normalized image coordinates @param solutions Output: Storage for the found solutions. . @return tru...
java
public boolean process( List<AssociatedPair> points , FastQueue<DMatrixRMaj> solutions ) { if( points.size() != 5 ) throw new IllegalArgumentException("Exactly 5 points are required, not "+points.size()); solutions.reset(); // Computes the 4-vector span which contains E. See equations 7-9 computeSpan(point...
[ "public", "boolean", "process", "(", "List", "<", "AssociatedPair", ">", "points", ",", "FastQueue", "<", "DMatrixRMaj", ">", "solutions", ")", "{", "if", "(", "points", ".", "size", "(", ")", "!=", "5", ")", "throw", "new", "IllegalArgumentException", "("...
Computes the essential matrix from point correspondences. @param points Input: List of points correspondences in normalized image coordinates @param solutions Output: Storage for the found solutions. . @return true for success or false if a fault has been detected
[ "Computes", "the", "essential", "matrix", "from", "point", "correspondences", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/f/EssentialNister5.java#L104-L142
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathFinderImpl.java
PathFinderImpl.getMovementCost
public double getMovementCost(Pathfindable pathfindable, int tx, int ty) { """ Get the cost to move through a given location. @param pathfindable The object that is being moved. @param tx The horizontal tile index. @param ty The vertical tile index. @return The cost of movement through the given tile. ""...
java
public double getMovementCost(Pathfindable pathfindable, int tx, int ty) { return mapPath.getCost(pathfindable, tx, ty); }
[ "public", "double", "getMovementCost", "(", "Pathfindable", "pathfindable", ",", "int", "tx", ",", "int", "ty", ")", "{", "return", "mapPath", ".", "getCost", "(", "pathfindable", ",", "tx", ",", "ty", ")", ";", "}" ]
Get the cost to move through a given location. @param pathfindable The object that is being moved. @param tx The horizontal tile index. @param ty The vertical tile index. @return The cost of movement through the given tile.
[ "Get", "the", "cost", "to", "move", "through", "a", "given", "location", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathFinderImpl.java#L83-L86
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/cellconverter/BaseCellConverter.java
BaseCellConverter.newTypeBindExceptionOnParse
public TypeBindException newTypeBindExceptionOnParse(final Cell cell, final Object cellValue) { """ セルの値をパースしセルの値をJavaオブジェクトに型変換するとに失敗したときの例外{@link TypeBindException}を作成します。 @since 2.0 @param cell パースに失敗したセル @param cellValue パースに失敗した値 @return マッピングに失敗したときの例外のインスタンス """ final String message = Mes...
java
public TypeBindException newTypeBindExceptionOnParse(final Cell cell, final Object cellValue) { final String message = MessageBuilder.create("cell.typeBind.failParse") .var("property", field.getNameWithClass()) .var("cellAddress", POIUtils.formatCellAddress(cell)) ...
[ "public", "TypeBindException", "newTypeBindExceptionOnParse", "(", "final", "Cell", "cell", ",", "final", "Object", "cellValue", ")", "{", "final", "String", "message", "=", "MessageBuilder", ".", "create", "(", "\"cell.typeBind.failParse\"", ")", ".", "var", "(", ...
セルの値をパースしセルの値をJavaオブジェクトに型変換するとに失敗したときの例外{@link TypeBindException}を作成します。 @since 2.0 @param cell パースに失敗したセル @param cellValue パースに失敗した値 @return マッピングに失敗したときの例外のインスタンス
[ "セルの値をパースしセルの値をJavaオブジェクトに型変換するとに失敗したときの例外", "{" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/cellconverter/BaseCellConverter.java#L166-L179
aws/aws-sdk-java
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/LogConfiguration.java
LogConfiguration.withOptions
public LogConfiguration withOptions(java.util.Map<String, String> options) { """ <p> The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in...
java
public LogConfiguration withOptions(java.util.Map<String, String> options) { setOptions(options); return this; }
[ "public", "LogConfiguration", "withOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "options", ")", "{", "setOptions", "(", "options", ")", ";", "return", "this", ";", "}" ]
<p> The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --fo...
[ "<p", ">", "The", "configuration", "options", "to", "send", "to", "the", "log", "driver", ".", "This", "parameter", "requires", "version", "1", ".", "19", "of", "the", "Docker", "Remote", "API", "or", "greater", "on", "your", "container", "instance", ".", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/LogConfiguration.java#L366-L369
zmarko/sss
src/main/java/rs/in/zivanovic/sss/SasUtils.java
SasUtils.encodeToBinary
public static byte[] encodeToBinary(SecretShare share) { """ Serialize secret share to binary message format. The message consists of the following fields: <ul> <li>header (ASCII string "SS")</li> <li>single byte indicating the ordinal number of this specific share in the series</li> <li>single integer (four b...
java
public static byte[] encodeToBinary(SecretShare share) { if (share.getN() < 0 || share.getN() > 255) { throw new IllegalArgumentException("Invalid share number, must be between 0 and 255"); } byte[] shareData = share.getShare().toByteArray(); byte[] primeData = share.getPrim...
[ "public", "static", "byte", "[", "]", "encodeToBinary", "(", "SecretShare", "share", ")", "{", "if", "(", "share", ".", "getN", "(", ")", "<", "0", "||", "share", ".", "getN", "(", ")", ">", "255", ")", "{", "throw", "new", "IllegalArgumentException", ...
Serialize secret share to binary message format. The message consists of the following fields: <ul> <li>header (ASCII string "SS")</li> <li>single byte indicating the ordinal number of this specific share in the series</li> <li>single integer (four bytes) indicating the length of the share data</li> <li>variable number...
[ "Serialize", "secret", "share", "to", "binary", "message", "format", ".", "The", "message", "consists", "of", "the", "following", "fields", ":", "<ul", ">", "<li", ">", "header", "(", "ASCII", "string", "SS", ")", "<", "/", "li", ">", "<li", ">", "sing...
train
https://github.com/zmarko/sss/blob/a41d9d39ca9a4ca1a2719c441c88e209ffc511f5/src/main/java/rs/in/zivanovic/sss/SasUtils.java#L150-L173
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/support/AbstractBinderSelectionStrategy.java
AbstractBinderSelectionStrategy.findBinderByPropertyName
protected Binder findBinderByPropertyName(Class parentObjectType, String propertyName) { """ Try to find a binder for the provided parentObjectType and propertyName. If no direct match found try to find binder for any superclass of the provided objectType which also has the same propertyName. """ Pro...
java
protected Binder findBinderByPropertyName(Class parentObjectType, String propertyName) { PropertyNameKey key = new PropertyNameKey(parentObjectType, propertyName); Binder binder = (Binder)propertyNameBinders.get(key); if (binder == null) { // if no direct match was found try to find ...
[ "protected", "Binder", "findBinderByPropertyName", "(", "Class", "parentObjectType", ",", "String", "propertyName", ")", "{", "PropertyNameKey", "key", "=", "new", "PropertyNameKey", "(", "parentObjectType", ",", "propertyName", ")", ";", "Binder", "binder", "=", "(...
Try to find a binder for the provided parentObjectType and propertyName. If no direct match found try to find binder for any superclass of the provided objectType which also has the same propertyName.
[ "Try", "to", "find", "a", "binder", "for", "the", "provided", "parentObjectType", "and", "propertyName", ".", "If", "no", "direct", "match", "found", "try", "to", "find", "binder", "for", "any", "superclass", "of", "the", "provided", "objectType", "which", "...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/support/AbstractBinderSelectionStrategy.java#L93-L113
samskivert/pythagoras
src/main/java/pythagoras/d/RectangularShape.java
RectangularShape.setFrameFromCenter
public void setFrameFromCenter (XY center, XY corner) { """ Sets the location and size of the framing rectangle of this shape based on the supplied center and corner points. """ setFrameFromCenter(center.x(), center.y(), corner.x(), corner.y()); }
java
public void setFrameFromCenter (XY center, XY corner) { setFrameFromCenter(center.x(), center.y(), corner.x(), corner.y()); }
[ "public", "void", "setFrameFromCenter", "(", "XY", "center", ",", "XY", "corner", ")", "{", "setFrameFromCenter", "(", "center", ".", "x", "(", ")", ",", "center", ".", "y", "(", ")", ",", "corner", ".", "x", "(", ")", ",", "corner", ".", "y", "(",...
Sets the location and size of the framing rectangle of this shape based on the supplied center and corner points.
[ "Sets", "the", "location", "and", "size", "of", "the", "framing", "rectangle", "of", "this", "shape", "based", "on", "the", "supplied", "center", "and", "corner", "points", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/RectangularShape.java#L79-L81
triceo/splitlog
splitlog-core/src/main/java/com/github/triceo/splitlog/DefaultLogWatch.java
DefaultLogWatch.stop
@Override public synchronized boolean stop() { """ Invoking this method will cause the running message sweep to be de-scheduled. Any currently present {@link Message}s will only be removed from memory when this watch instance is removed from memory. """ if (!this.isStarted()) { throw ...
java
@Override public synchronized boolean stop() { if (!this.isStarted()) { throw new IllegalStateException("Cannot terminate what was not started."); } else if (!this.isStopped.compareAndSet(false, true)) { return false; } DefaultLogWatch.LOGGER.info("Terminating...
[ "@", "Override", "public", "synchronized", "boolean", "stop", "(", ")", "{", "if", "(", "!", "this", ".", "isStarted", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Cannot terminate what was not started.\"", ")", ";", "}", "else", "if", ...
Invoking this method will cause the running message sweep to be de-scheduled. Any currently present {@link Message}s will only be removed from memory when this watch instance is removed from memory.
[ "Invoking", "this", "method", "will", "cause", "the", "running", "message", "sweep", "to", "be", "de", "-", "scheduled", ".", "Any", "currently", "present", "{" ]
train
https://github.com/triceo/splitlog/blob/4e1b188e8c814119f5cf7343bbc53917843d68a2/splitlog-core/src/main/java/com/github/triceo/splitlog/DefaultLogWatch.java#L265-L279
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.saveReport
public static void saveReport(Report report, String path) { """ Write a report object to a file at specified path @param report report object @param path file path """ FileOutputStream fos = null; try { fos = new FileOutputStream(path); saveReport(report, fos); } catch (Exception ex) { LOG...
java
public static void saveReport(Report report, String path) { FileOutputStream fos = null; try { fos = new FileOutputStream(path); saveReport(report, fos); } catch (Exception ex) { LOG.error(ex.getMessage(), ex); ex.printStackTrace(); } finally { if (fos != null) { try { fos.close(); }...
[ "public", "static", "void", "saveReport", "(", "Report", "report", ",", "String", "path", ")", "{", "FileOutputStream", "fos", "=", "null", ";", "try", "{", "fos", "=", "new", "FileOutputStream", "(", "path", ")", ";", "saveReport", "(", "report", ",", "...
Write a report object to a file at specified path @param report report object @param path file path
[ "Write", "a", "report", "object", "to", "a", "file", "at", "specified", "path" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L211-L228
m-m-m/util
lang/src/main/java/net/sf/mmm/util/lang/api/BasicHelper.java
BasicHelper.toUpperCase
public static String toUpperCase(String string, Locale locale) { """ Indirection for {@link String#toUpperCase(Locale)}. @param string is the {@link String}. @param locale is the {@link Locale}. @return the result of {@link String#toUpperCase(Locale)}. """ if (locale == null) { return toUpperCa...
java
public static String toUpperCase(String string, Locale locale) { if (locale == null) { return toUpperCase(string, STANDARD_LOCALE); } return string.toUpperCase(locale); }
[ "public", "static", "String", "toUpperCase", "(", "String", "string", ",", "Locale", "locale", ")", "{", "if", "(", "locale", "==", "null", ")", "{", "return", "toUpperCase", "(", "string", ",", "STANDARD_LOCALE", ")", ";", "}", "return", "string", ".", ...
Indirection for {@link String#toUpperCase(Locale)}. @param string is the {@link String}. @param locale is the {@link Locale}. @return the result of {@link String#toUpperCase(Locale)}.
[ "Indirection", "for", "{", "@link", "String#toUpperCase", "(", "Locale", ")", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/lang/src/main/java/net/sf/mmm/util/lang/api/BasicHelper.java#L116-L122
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Disk.java
Disk.createSnapshot
public Operation createSnapshot(String snapshot, String description, OperationOption... options) { """ Creates a snapshot for this disk given the snapshot's name and description. @return a zone operation for snapshot creation @throws ComputeException upon failure """ SnapshotInfo snapshotInfo = ...
java
public Operation createSnapshot(String snapshot, String description, OperationOption... options) { SnapshotInfo snapshotInfo = SnapshotInfo.newBuilder(SnapshotId.of(snapshot), getDiskId()) .setDescription(description) .build(); return compute.create(snapshotInfo, options); }
[ "public", "Operation", "createSnapshot", "(", "String", "snapshot", ",", "String", "description", ",", "OperationOption", "...", "options", ")", "{", "SnapshotInfo", "snapshotInfo", "=", "SnapshotInfo", ".", "newBuilder", "(", "SnapshotId", ".", "of", "(", "snapsh...
Creates a snapshot for this disk given the snapshot's name and description. @return a zone operation for snapshot creation @throws ComputeException upon failure
[ "Creates", "a", "snapshot", "for", "this", "disk", "given", "the", "snapshot", "s", "name", "and", "description", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/Disk.java#L179-L185
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/dbhandling/TorqueDBHandling.java
TorqueDBHandling.createCreationScript
public void createCreationScript() throws PlatformException { """ Creates the db-creation sql script (but does not perform it). @throws PlatformException If some error occurred """ Project project = new Project(); TorqueDataModelTask modelTask = new TorqueDataModelTask(); ...
java
public void createCreationScript() throws PlatformException { Project project = new Project(); TorqueDataModelTask modelTask = new TorqueDataModelTask(); File tmpDir = null; File scriptFile = null; _creationScr...
[ "public", "void", "createCreationScript", "(", ")", "throws", "PlatformException", "{", "Project", "project", "=", "new", "Project", "(", ")", ";", "TorqueDataModelTask", "modelTask", "=", "new", "TorqueDataModelTask", "(", ")", ";", "File", "tmpDir", "=", "null...
Creates the db-creation sql script (but does not perform it). @throws PlatformException If some error occurred
[ "Creates", "the", "db", "-", "creation", "sql", "script", "(", "but", "does", "not", "perform", "it", ")", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/dbhandling/TorqueDBHandling.java#L204-L251
blackdoor/blackdoor
src/main/java/black/door/crypto/Hash.java
Hash.getSHA256
public static byte[] getSHA256(byte[] input, boolean asSingleton) { """ Get the SHA256 Hash of input @param input - the bytes to hash @param asSingleton if true use a singleton MessageDigest instance, else create and destroy a MD instance just for this call. @return 32 bytes that represent the SHA256 hash of in...
java
public static byte[] getSHA256(byte[] input, boolean asSingleton){ if(SHA256_INSTANCE == null){ if(asSingleton){ try { SHA256_INSTANCE = MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } }else{ return getHash("SHA-256", input); } ...
[ "public", "static", "byte", "[", "]", "getSHA256", "(", "byte", "[", "]", "input", ",", "boolean", "asSingleton", ")", "{", "if", "(", "SHA256_INSTANCE", "==", "null", ")", "{", "if", "(", "asSingleton", ")", "{", "try", "{", "SHA256_INSTANCE", "=", "M...
Get the SHA256 Hash of input @param input - the bytes to hash @param asSingleton if true use a singleton MessageDigest instance, else create and destroy a MD instance just for this call. @return 32 bytes that represent the SHA256 hash of input;
[ "Get", "the", "SHA256", "Hash", "of", "input" ]
train
https://github.com/blackdoor/blackdoor/blob/060c7a71dfafb85e10e8717736e6d3160262e96b/src/main/java/black/door/crypto/Hash.java#L120-L133
Metatavu/edelphi
edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/panels/PanelUserDAO.java
PanelUserDAO.updateRole
public PanelUser updateRole(PanelUser panelUser, PanelUserRole panelUserRole, User modifier) { """ Updates panel user's role @param panelUser panel user @param panelUserRole new role @param modifier modifier @return updated user """ panelUser.setRole(panelUserRole); panelUser.setLastModified(new ...
java
public PanelUser updateRole(PanelUser panelUser, PanelUserRole panelUserRole, User modifier) { panelUser.setRole(panelUserRole); panelUser.setLastModified(new Date()); panelUser.setLastModifier(modifier); return persist(panelUser); }
[ "public", "PanelUser", "updateRole", "(", "PanelUser", "panelUser", ",", "PanelUserRole", "panelUserRole", ",", "User", "modifier", ")", "{", "panelUser", ".", "setRole", "(", "panelUserRole", ")", ";", "panelUser", ".", "setLastModified", "(", "new", "Date", "(...
Updates panel user's role @param panelUser panel user @param panelUserRole new role @param modifier modifier @return updated user
[ "Updates", "panel", "user", "s", "role" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi-persistence/src/main/java/fi/metatavu/edelphi/dao/panels/PanelUserDAO.java#L196-L202