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
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/process/PTBTokenizer.java
PTBTokenizer.ptb2Text
public static int ptb2Text(Reader ptbText, Writer w) throws IOException { """ Writes a presentable version of the given PTB-tokenized text. PTB tokenization splits up punctuation and does various other things that makes simply joining the tokens with spaces look bad. So join the tokens with space and run it thr...
java
public static int ptb2Text(Reader ptbText, Writer w) throws IOException { int numTokens = 0; PTB2TextLexer lexer = new PTB2TextLexer(ptbText); for (String token; (token = lexer.next()) != null; ) { numTokens++; w.write(token); } return numTokens; }
[ "public", "static", "int", "ptb2Text", "(", "Reader", "ptbText", ",", "Writer", "w", ")", "throws", "IOException", "{", "int", "numTokens", "=", "0", ";", "PTB2TextLexer", "lexer", "=", "new", "PTB2TextLexer", "(", "ptbText", ")", ";", "for", "(", "String"...
Writes a presentable version of the given PTB-tokenized text. PTB tokenization splits up punctuation and does various other things that makes simply joining the tokens with spaces look bad. So join the tokens with space and run it through this method to produce nice looking text. It's not perfect, but it works pretty w...
[ "Writes", "a", "presentable", "version", "of", "the", "given", "PTB", "-", "tokenized", "text", ".", "PTB", "tokenization", "splits", "up", "punctuation", "and", "does", "various", "other", "things", "that", "makes", "simply", "joining", "the", "tokens", "with...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/process/PTBTokenizer.java#L335-L343
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java
ActionConstants.getPermission
public static Permission getPermission(String name, String serviceName, String... actions) { """ Creates a permission @param name @param serviceName @param actions @return the created Permission @throws java.lang.IllegalArgumentException if there is no service found with the given serviceName. """ ...
java
public static Permission getPermission(String name, String serviceName, String... actions) { PermissionFactory permissionFactory = PERMISSION_FACTORY_MAP.get(serviceName); if (permissionFactory == null) { throw new IllegalArgumentException("No permissions found for service: " + serviceName);...
[ "public", "static", "Permission", "getPermission", "(", "String", "name", ",", "String", "serviceName", ",", "String", "...", "actions", ")", "{", "PermissionFactory", "permissionFactory", "=", "PERMISSION_FACTORY_MAP", ".", "get", "(", "serviceName", ")", ";", "i...
Creates a permission @param name @param serviceName @param actions @return the created Permission @throws java.lang.IllegalArgumentException if there is no service found with the given serviceName.
[ "Creates", "a", "permission" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java#L260-L267
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.isMappingUsingDefault
private boolean isMappingUsingDefault(String path, String mapping) { """ Checks if the given mapping has the 'useDefault' flag set to true.<p> @param path the mapping path @param mapping the mapping type @return true if 'useDefault' is enabled for this mapping """ String key = path + ":" + mapp...
java
private boolean isMappingUsingDefault(String path, String mapping) { String key = path + ":" + mapping; return m_mappingsUsingDefault.contains(key); }
[ "private", "boolean", "isMappingUsingDefault", "(", "String", "path", ",", "String", "mapping", ")", "{", "String", "key", "=", "path", "+", "\":\"", "+", "mapping", ";", "return", "m_mappingsUsingDefault", ".", "contains", "(", "key", ")", ";", "}" ]
Checks if the given mapping has the 'useDefault' flag set to true.<p> @param path the mapping path @param mapping the mapping type @return true if 'useDefault' is enabled for this mapping
[ "Checks", "if", "the", "given", "mapping", "has", "the", "useDefault", "flag", "set", "to", "true", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L4017-L4021
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/HerokuAPI.java
HerokuAPI.transferApp
public void transferApp(String appName, String to) { """ Transfer the ownership of an application to another user. @param appName App name. See {@link #listApps} for a list of apps that can be used. @param to Username of the person to transfer the app to. This is usually in the form of "user@company.com". ""...
java
public void transferApp(String appName, String to) { connection.execute(new SharingTransfer(appName, to), apiKey); }
[ "public", "void", "transferApp", "(", "String", "appName", ",", "String", "to", ")", "{", "connection", ".", "execute", "(", "new", "SharingTransfer", "(", "appName", ",", "to", ")", ",", "apiKey", ")", ";", "}" ]
Transfer the ownership of an application to another user. @param appName App name. See {@link #listApps} for a list of apps that can be used. @param to Username of the person to transfer the app to. This is usually in the form of "user@company.com".
[ "Transfer", "the", "ownership", "of", "an", "application", "to", "another", "user", "." ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/HerokuAPI.java#L347-L349
RestComm/jdiameter
core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java
MessageUtility.addOriginAvps
public static void addOriginAvps(Message m, MetaData md) { """ Used to set origin, previously done in MessageParser. @param m @param md """ // FIXME: check for "userFqnAsUri" ? AvpSet set = m.getAvps(); if (set.getAvp(Avp.ORIGIN_HOST) == null) { m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getL...
java
public static void addOriginAvps(Message m, MetaData md) { // FIXME: check for "userFqnAsUri" ? AvpSet set = m.getAvps(); if (set.getAvp(Avp.ORIGIN_HOST) == null) { m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getLocalPeer().getUri().getFQDN(), true, false, true); } if (set.getAvp(Avp.ORIGIN_REALM) ...
[ "public", "static", "void", "addOriginAvps", "(", "Message", "m", ",", "MetaData", "md", ")", "{", "// FIXME: check for \"userFqnAsUri\" ?", "AvpSet", "set", "=", "m", ".", "getAvps", "(", ")", ";", "if", "(", "set", ".", "getAvp", "(", "Avp", ".", "ORIGIN...
Used to set origin, previously done in MessageParser. @param m @param md
[ "Used", "to", "set", "origin", "previously", "done", "in", "MessageParser", "." ]
train
https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java#L66-L75
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/BoxFactory.java
BoxFactory.createViewportTree
public Viewport createViewportTree(Element root, Graphics2D g, VisualContext ctx, int width, int height) { """ Create the viewport and the underlying box tree from a DOM tree. @param root the root element of the source DOM tree. @param g the root graphic context. Copies of this context will be used for the ind...
java
public Viewport createViewportTree(Element root, Graphics2D g, VisualContext ctx, int width, int height) { Element vp = createAnonymousElement(root.getOwnerDocument(), "Xdiv", "block"); viewport = new Viewport(vp, g, ctx, this, root, width, height); viewport.setConfig(config); overfl...
[ "public", "Viewport", "createViewportTree", "(", "Element", "root", ",", "Graphics2D", "g", ",", "VisualContext", "ctx", ",", "int", "width", ",", "int", "height", ")", "{", "Element", "vp", "=", "createAnonymousElement", "(", "root", ".", "getOwnerDocument", ...
Create the viewport and the underlying box tree from a DOM tree. @param root the root element of the source DOM tree. @param g the root graphic context. Copies of this context will be used for the individual boxes. @param ctx the visual context (computed style). Copies of this context will be used for the individual b...
[ "Create", "the", "viewport", "and", "the", "underlying", "box", "tree", "from", "a", "DOM", "tree", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/BoxFactory.java#L196-L207
NordicSemiconductor/Android-DFU-Library
dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java
DfuServiceInitiator.setZip
public DfuServiceInitiator setZip(@Nullable final Uri uri, @Nullable final String path) { """ Sets the URI or path of the ZIP file. At least one of the parameters must not be null. If the URI and path are not null the URI will be used. @param uri the URI of the file @param path the path of the file @return...
java
public DfuServiceInitiator setZip(@Nullable final Uri uri, @Nullable final String path) { return init(uri, path, 0, DfuBaseService.TYPE_AUTO, DfuBaseService.MIME_TYPE_ZIP); }
[ "public", "DfuServiceInitiator", "setZip", "(", "@", "Nullable", "final", "Uri", "uri", ",", "@", "Nullable", "final", "String", "path", ")", "{", "return", "init", "(", "uri", ",", "path", ",", "0", ",", "DfuBaseService", ".", "TYPE_AUTO", ",", "DfuBaseSe...
Sets the URI or path of the ZIP file. At least one of the parameters must not be null. If the URI and path are not null the URI will be used. @param uri the URI of the file @param path the path of the file @return the builder
[ "Sets", "the", "URI", "or", "path", "of", "the", "ZIP", "file", ".", "At", "least", "one", "of", "the", "parameters", "must", "not", "be", "null", ".", "If", "the", "URI", "and", "path", "are", "not", "null", "the", "URI", "will", "be", "used", "."...
train
https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java#L604-L606
lastaflute/lasta-thymeleaf
src/main/java/org/lastaflute/thymeleaf/expression/ClassificationExpressionObject.java
ClassificationExpressionObject.listAll
public List<Classification> listAll(String classificationName) { """ Get list of all classification. @param classificationName The name of classification. (NotNull) @return The list of all classification. (NotNull) """ assertArgumentNotNull("classificationName", classificationName); return fi...
java
public List<Classification> listAll(String classificationName) { assertArgumentNotNull("classificationName", classificationName); return findClassificationMeta(classificationName, () -> { return "listAll('" + classificationName + "')"; }).listAll(); }
[ "public", "List", "<", "Classification", ">", "listAll", "(", "String", "classificationName", ")", "{", "assertArgumentNotNull", "(", "\"classificationName\"", ",", "classificationName", ")", ";", "return", "findClassificationMeta", "(", "classificationName", ",", "(", ...
Get list of all classification. @param classificationName The name of classification. (NotNull) @return The list of all classification. (NotNull)
[ "Get", "list", "of", "all", "classification", "." ]
train
https://github.com/lastaflute/lasta-thymeleaf/blob/d340a6e7eeddfcc9177052958c383fecd4a7fefa/src/main/java/org/lastaflute/thymeleaf/expression/ClassificationExpressionObject.java#L118-L123
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RestUtils.java
RestUtils.makeS3CanonicalString
public static <T> String makeS3CanonicalString(String method, String resource, SignableRequest<T> request, String expires) { """ Calculate the canonical string for a REST/HTTP request to S3 by only including query parameters that are mentioned in SIGNED_PARAMETERS. @see RestUtils#makeS3CanonicalStr...
java
public static <T> String makeS3CanonicalString(String method, String resource, SignableRequest<T> request, String expires) { return makeS3CanonicalString(method, resource, request, expires, null); }
[ "public", "static", "<", "T", ">", "String", "makeS3CanonicalString", "(", "String", "method", ",", "String", "resource", ",", "SignableRequest", "<", "T", ">", "request", ",", "String", "expires", ")", "{", "return", "makeS3CanonicalString", "(", "method", ",...
Calculate the canonical string for a REST/HTTP request to S3 by only including query parameters that are mentioned in SIGNED_PARAMETERS. @see RestUtils#makeS3CanonicalString(String, String, Request, String, boolean)
[ "Calculate", "the", "canonical", "string", "for", "a", "REST", "/", "HTTP", "request", "to", "S3", "by", "only", "including", "query", "parameters", "that", "are", "mentioned", "in", "SIGNED_PARAMETERS", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RestUtils.java#L62-L65
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimSort.java
TimSort.countRunAndMakeAscending
private static <T> int countRunAndMakeAscending(T[] a, int lo, int hi, Comparator<? super T> c) { """ Returns the length of the run beginning at the specified position in the specified array and reverses the run if it is descending (ensuring that the run will a...
java
private static <T> int countRunAndMakeAscending(T[] a, int lo, int hi, Comparator<? super T> c) { assert lo < hi; int runHi = lo + 1; if (runHi == hi) return 1; // Find end of run, and reverse range if descending if...
[ "private", "static", "<", "T", ">", "int", "countRunAndMakeAscending", "(", "T", "[", "]", "a", ",", "int", "lo", ",", "int", "hi", ",", "Comparator", "<", "?", "super", "T", ">", "c", ")", "{", "assert", "lo", "<", "hi", ";", "int", "runHi", "="...
Returns the length of the run beginning at the specified position in the specified array and reverses the run if it is descending (ensuring that the run will always be ascending when the method returns). A run is the longest ascending sequence with: a[lo] <= a[lo + 1] <= a[lo + 2] <= ... or the longest descending se...
[ "Returns", "the", "length", "of", "the", "run", "beginning", "at", "the", "specified", "position", "in", "the", "specified", "array", "and", "reverses", "the", "run", "if", "it", "is", "descending", "(", "ensuring", "that", "the", "run", "will", "always", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TimSort.java#L347-L365
OpenTSDB/opentsdb
src/core/Internal.java
Internal.setBaseTime
public static void setBaseTime(final byte[] row, int base_time) { """ Sets the time in a raw data table row key @param row The row to modify @param base_time The base time to store @since 2.3 """ Bytes.setInt(row, base_time, Const.SALT_WIDTH() + TSDB.metrics_width()); }
java
public static void setBaseTime(final byte[] row, int base_time) { Bytes.setInt(row, base_time, Const.SALT_WIDTH() + TSDB.metrics_width()); }
[ "public", "static", "void", "setBaseTime", "(", "final", "byte", "[", "]", "row", ",", "int", "base_time", ")", "{", "Bytes", ".", "setInt", "(", "row", ",", "base_time", ",", "Const", ".", "SALT_WIDTH", "(", ")", "+", "TSDB", ".", "metrics_width", "("...
Sets the time in a raw data table row key @param row The row to modify @param base_time The base time to store @since 2.3
[ "Sets", "the", "time", "in", "a", "raw", "data", "table", "row", "key" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/Internal.java#L146-L149
Alluxio/alluxio
core/common/src/main/java/alluxio/util/io/ByteIOUtils.java
ByteIOUtils.writeInt
public static void writeInt(byte[] buf, int pos, int v) { """ Writes a specific integer value (4 bytes) to the output byte array at the given offset. @param buf output byte array @param pos offset into the byte buffer to write @param v int value to write """ checkBoundary(buf, pos, 4); buf[pos++] ...
java
public static void writeInt(byte[] buf, int pos, int v) { checkBoundary(buf, pos, 4); buf[pos++] = (byte) (0xff & (v >> 24)); buf[pos++] = (byte) (0xff & (v >> 16)); buf[pos++] = (byte) (0xff & (v >> 8)); buf[pos] = (byte) (0xff & v); }
[ "public", "static", "void", "writeInt", "(", "byte", "[", "]", "buf", ",", "int", "pos", ",", "int", "v", ")", "{", "checkBoundary", "(", "buf", ",", "pos", ",", "4", ")", ";", "buf", "[", "pos", "++", "]", "=", "(", "byte", ")", "(", "0xff", ...
Writes a specific integer value (4 bytes) to the output byte array at the given offset. @param buf output byte array @param pos offset into the byte buffer to write @param v int value to write
[ "Writes", "a", "specific", "integer", "value", "(", "4", "bytes", ")", "to", "the", "output", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/ByteIOUtils.java#L168-L174
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java
SeleniumHelper.findElement
public T findElement(By by, int index) { """ Finds the nth element matching the By supplied. @param by criteria. @param index (zero based) matching element to return. @return element if found, null if none could be found. """ T element = null; List<T> elements = findElements(by); if ...
java
public T findElement(By by, int index) { T element = null; List<T> elements = findElements(by); if (elements.size() > index) { element = elements.get(index); } return element; }
[ "public", "T", "findElement", "(", "By", "by", ",", "int", "index", ")", "{", "T", "element", "=", "null", ";", "List", "<", "T", ">", "elements", "=", "findElements", "(", "by", ")", ";", "if", "(", "elements", ".", "size", "(", ")", ">", "index...
Finds the nth element matching the By supplied. @param by criteria. @param index (zero based) matching element to return. @return element if found, null if none could be found.
[ "Finds", "the", "nth", "element", "matching", "the", "By", "supplied", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java#L797-L804
Joe0/Feather
src/main/java/com/joepritzel/feather/strategy/publish/Sequential.java
Sequential.predicateApplies
private boolean predicateApplies(Subscriber<?> s, Object message) { """ Checks to see if the subscriber is a predicated subscriber, and if it applies. @param s - The subscriber to check. @param message - The message to check. @return If the subscriber is not predicated or it is and applies, then it return...
java
private boolean predicateApplies(Subscriber<?> s, Object message) { if (s instanceof PredicatedSubscriber && !((PredicatedSubscriber<?>) s).appliesO(message)) { return false; } return true; }
[ "private", "boolean", "predicateApplies", "(", "Subscriber", "<", "?", ">", "s", ",", "Object", "message", ")", "{", "if", "(", "s", "instanceof", "PredicatedSubscriber", "&&", "!", "(", "(", "PredicatedSubscriber", "<", "?", ">", ")", "s", ")", ".", "ap...
Checks to see if the subscriber is a predicated subscriber, and if it applies. @param s - The subscriber to check. @param message - The message to check. @return If the subscriber is not predicated or it is and applies, then it returns true. If it's a predicated subscriber, and it doesn't apply, then it returns false.
[ "Checks", "to", "see", "if", "the", "subscriber", "is", "a", "predicated", "subscriber", "and", "if", "it", "applies", "." ]
train
https://github.com/Joe0/Feather/blob/d17b1bc38326b8b86f1068898a59c8a34678d499/src/main/java/com/joepritzel/feather/strategy/publish/Sequential.java#L111-L117
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpScsrlsvqrHost
public static int cusolverSpScsrlsvqrHost( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x,...
java
public static int cusolverSpScsrlsvqrHost( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x,...
[ "public", "static", "int", "cusolverSpScsrlsvqrHost", "(", "cusolverSpHandle", "handle", ",", "int", "m", ",", "int", "nnz", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrValA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", ...
<pre> -------- CPU linear solver by QR factorization solve A*x = b, A can be singular [ls] stands for linear solve [v] stands for vector [qr] stands for QR factorization </pre>
[ "<pre", ">", "--------", "CPU", "linear", "solver", "by", "QR", "factorization", "solve", "A", "*", "x", "=", "b", "A", "can", "be", "singular", "[", "ls", "]", "stands", "for", "linear", "solve", "[", "v", "]", "stands", "for", "vector", "[", "qr", ...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L403-L418
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateExplicitListItemWithServiceResponseAsync
public Observable<ServiceResponse<OperationStatus>> updateExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId, UpdateExplicitListItemOptionalParameter updateExplicitListItemOptionalParameter) { """ Updates an explicit list item for a Pattern.Any entity. @param appId...
java
public Observable<ServiceResponse<OperationStatus>> updateExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId, UpdateExplicitListItemOptionalParameter updateExplicitListItemOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgum...
[ "public", "Observable", "<", "ServiceResponse", "<", "OperationStatus", ">", ">", "updateExplicitListItemWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "long", "itemId", ",", "UpdateExplicitListItemOptionalParame...
Updates an explicit list item for a Pattern.Any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity extractor ID. @param itemId The explicit list item ID. @param updateExplicitListItemOptionalParameter the object representing the optional parameters to be se...
[ "Updates", "an", "explicit", "list", "item", "for", "a", "Pattern", ".", "Any", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L14114-L14130
jenkinsci/jenkins
core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java
SimpleBuildWrapper.makeBuildVariables
@Override public void makeBuildVariables(AbstractBuild build, Map<String,String> variables) { """ May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. <p>{@inheritDoc} @since 1.608 """ super.makeBuildVariables(build, variables); }
java
@Override public void makeBuildVariables(AbstractBuild build, Map<String,String> variables) { super.makeBuildVariables(build, variables); }
[ "@", "Override", "public", "void", "makeBuildVariables", "(", "AbstractBuild", "build", ",", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "super", ".", "makeBuildVariables", "(", "build", ",", "variables", ")", ";", "}" ]
May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. <p>{@inheritDoc} @since 1.608
[ "May", "be", "overridden", "but", "this", "will", "only", "take", "effect", "when", "used", "as", "a", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java#L215-L217
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java
SARLJvmModelInferrer.appendSerialNumber
protected void appendSerialNumber(GenerationContext context, XtendTypeDeclaration source, JvmGenericType target) { """ Append the serial number field. <p>The serial number field is computed from the given context and from the generated fields. The field is added if no field with name "serialVersionUID" was def...
java
protected void appendSerialNumber(GenerationContext context, XtendTypeDeclaration source, JvmGenericType target) { if (!isAppendSerialNumbersEnable(context)) { return; } for (final JvmField field : target.getDeclaredFields()) { if (SERIAL_FIELD_NAME.equals(field.getSimpleName())) { return; } } f...
[ "protected", "void", "appendSerialNumber", "(", "GenerationContext", "context", ",", "XtendTypeDeclaration", "source", ",", "JvmGenericType", "target", ")", "{", "if", "(", "!", "isAppendSerialNumbersEnable", "(", "context", ")", ")", "{", "return", ";", "}", "for...
Append the serial number field. <p>The serial number field is computed from the given context and from the generated fields. The field is added if no field with name "serialVersionUID" was defined. <p>This function does not test if the field container is serializable. @param context the current generation context. @...
[ "Append", "the", "serial", "number", "field", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java#L2767-L2790
sirthias/parboiled
parboiled-java/src/main/java/org/parboiled/BaseActions.java
BaseActions.pushAll
public boolean pushAll(V firstValue, V... moreValues) { """ Pushes all given elements onto the value stack (in the order as given). @param firstValue the first value @param moreValues the other values @return true """ check(); context.getValueStack().pushAll(firstValue, moreValues); ...
java
public boolean pushAll(V firstValue, V... moreValues) { check(); context.getValueStack().pushAll(firstValue, moreValues); return true; }
[ "public", "boolean", "pushAll", "(", "V", "firstValue", ",", "V", "...", "moreValues", ")", "{", "check", "(", ")", ";", "context", ".", "getValueStack", "(", ")", ".", "pushAll", "(", "firstValue", ",", "moreValues", ")", ";", "return", "true", ";", "...
Pushes all given elements onto the value stack (in the order as given). @param firstValue the first value @param moreValues the other values @return true
[ "Pushes", "all", "given", "elements", "onto", "the", "value", "stack", "(", "in", "the", "order", "as", "given", ")", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-java/src/main/java/org/parboiled/BaseActions.java#L198-L202
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/av/Broadcaster.java
Broadcaster.queueUpload
private void queueUpload(String key, File file) { """ Queue an upload for later submission to S3 @param key destination key @param file local file """ if (mUploadQueue == null) mUploadQueue = new ArrayDeque<>(); mUploadQueue.add(new Pair<>(key, file)); }
java
private void queueUpload(String key, File file) { if (mUploadQueue == null) mUploadQueue = new ArrayDeque<>(); mUploadQueue.add(new Pair<>(key, file)); }
[ "private", "void", "queueUpload", "(", "String", "key", ",", "File", "file", ")", "{", "if", "(", "mUploadQueue", "==", "null", ")", "mUploadQueue", "=", "new", "ArrayDeque", "<>", "(", ")", ";", "mUploadQueue", ".", "add", "(", "new", "Pair", "<>", "(...
Queue an upload for later submission to S3 @param key destination key @param file local file
[ "Queue", "an", "upload", "for", "later", "submission", "to", "S3" ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/av/Broadcaster.java#L471-L475
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/tenant/TenantService.java
TenantService.isValidSystemCredentials
private boolean isValidSystemCredentials(String userid, String password) { """ Return true if the given userid/password are valid system credentials. """ String superUser = ServerParams.instance().getModuleParamString("DoradusServer", "super_user"); String superPassword = ServerParams.instance(...
java
private boolean isValidSystemCredentials(String userid, String password) { String superUser = ServerParams.instance().getModuleParamString("DoradusServer", "super_user"); String superPassword = ServerParams.instance().getModuleParamString("DoradusServer", "super_password"); return Utils.isEmpty(...
[ "private", "boolean", "isValidSystemCredentials", "(", "String", "userid", ",", "String", "password", ")", "{", "String", "superUser", "=", "ServerParams", ".", "instance", "(", ")", ".", "getModuleParamString", "(", "\"DoradusServer\"", ",", "\"super_user\"", ")", ...
Return true if the given userid/password are valid system credentials.
[ "Return", "true", "if", "the", "given", "userid", "/", "password", "are", "valid", "system", "credentials", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/tenant/TenantService.java#L511-L517
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderNoteUrl.java
OrderNoteUrl.getOrderNoteUrl
public static MozuUrl getOrderNoteUrl(String noteId, String orderId, String responseFields) { """ Get Resource Url for GetOrderNote @param noteId Unique identifier of a particular note to retrieve. @param orderId Unique identifier of the order. @param responseFields Filtering syntax appended to an API call to i...
java
public static MozuUrl getOrderNoteUrl(String noteId, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/notes/{noteId}?responseFields={responseFields}"); formatter.formatUrl("noteId", noteId); formatter.formatUrl("orderId", orderId); formatte...
[ "public", "static", "MozuUrl", "getOrderNoteUrl", "(", "String", "noteId", ",", "String", "orderId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{orderId}/notes/{noteId}?responseFields={res...
Get Resource Url for GetOrderNote @param noteId Unique identifier of a particular note to retrieve. @param orderId Unique identifier of the order. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used t...
[ "Get", "Resource", "Url", "for", "GetOrderNote" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderNoteUrl.java#L35-L42
jparsec/jparsec
jparsec/src/main/java/org/jparsec/OperatorTable.java
OperatorTable.infixn
public OperatorTable<T> infixn( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { """ Adds an infix non-associative binary operator. @param parser the parser for the operator. @param precedence the precedence number. @return this. """ ops.add(new Operator(...
java
public OperatorTable<T> infixn( Parser<? extends BiFunction<? super T, ? super T, ? extends T>> parser, int precedence) { ops.add(new Operator(parser, precedence, Associativity.NASSOC)); return this; }
[ "public", "OperatorTable", "<", "T", ">", "infixn", "(", "Parser", "<", "?", "extends", "BiFunction", "<", "?", "super", "T", ",", "?", "super", "T", ",", "?", "extends", "T", ">", ">", "parser", ",", "int", "precedence", ")", "{", "ops", ".", "add...
Adds an infix non-associative binary operator. @param parser the parser for the operator. @param precedence the precedence number. @return this.
[ "Adds", "an", "infix", "non", "-", "associative", "binary", "operator", "." ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/OperatorTable.java#L140-L144
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java
NetUtil.getInputStreamHttpPost
public static InputStream getInputStreamHttpPost(String pURL, Map pPostData, Properties pProperties, boolean pFollowRedirects, int pTimeout) throws IOException { """ Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an infinite...
java
public static InputStream getInputStreamHttpPost(String pURL, Map pPostData, Properties pProperties, boolean pFollowRedirects, int pTimeout) throws IOException { pProperties = pProperties != null ? pProperties : new Properties(); //URL url = getURLAndRegisterPassword(pURL); URL url...
[ "public", "static", "InputStream", "getInputStreamHttpPost", "(", "String", "pURL", ",", "Map", "pPostData", ",", "Properties", "pProperties", ",", "boolean", "pFollowRedirects", ",", "int", "pTimeout", ")", "throws", "IOException", "{", "pProperties", "=", "pProper...
Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. Supports basic HTTP authentication, using a URL string similar to most browsers. <P/> <SMALL>Implementation note: If the timeout parameter is greater than 0, this method uses ...
[ "Gets", "the", "InputStream", "from", "a", "given", "URL", "with", "the", "given", "timeout", ".", "The", "timeout", "must", "be", ">", "0", ".", "A", "timeout", "of", "zero", "is", "interpreted", "as", "an", "infinite", "timeout", ".", "Supports", "basi...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java#L757-L767
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.removeByG_S
@Override public void removeByG_S(long groupId, int status) { """ Removes all the commerce price lists where groupId = &#63; and status = &#63; from the database. @param groupId the group ID @param status the status """ for (CommercePriceList commercePriceList : findByG_S(groupId, status, QueryUtil....
java
@Override public void removeByG_S(long groupId, int status) { for (CommercePriceList commercePriceList : findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceList); } }
[ "@", "Override", "public", "void", "removeByG_S", "(", "long", "groupId", ",", "int", "status", ")", "{", "for", "(", "CommercePriceList", "commercePriceList", ":", "findByG_S", "(", "groupId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil",...
Removes all the commerce price lists where groupId = &#63; and status = &#63; from the database. @param groupId the group ID @param status the status
[ "Removes", "all", "the", "commerce", "price", "lists", "where", "groupId", "=", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L3741-L3747
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.premul
public Quaternionf premul(float qx, float qy, float qz, float qw) { """ Pre-multiply this quaternion by the quaternion represented via <code>(qx, qy, qz, qw)</code>. <p> If <code>T</code> is <code>this</code> and <code>Q</code> is the given quaternion, then the resulting quaternion <code>R</code> is: <p> <code...
java
public Quaternionf premul(float qx, float qy, float qz, float qw) { return premul(qx, qy, qz, qw, this); }
[ "public", "Quaternionf", "premul", "(", "float", "qx", ",", "float", "qy", ",", "float", "qz", ",", "float", "qw", ")", "{", "return", "premul", "(", "qx", ",", "qy", ",", "qz", ",", "qw", ",", "this", ")", ";", "}" ]
Pre-multiply this quaternion by the quaternion represented via <code>(qx, qy, qz, qw)</code>. <p> If <code>T</code> is <code>this</code> and <code>Q</code> is the given quaternion, then the resulting quaternion <code>R</code> is: <p> <code>R = Q * T</code> <p> So, this method uses pre-multiplication, resulting in a vec...
[ "Pre", "-", "multiply", "this", "quaternion", "by", "the", "quaternion", "represented", "via", "<code", ">", "(", "qx", "qy", "qz", "qw", ")", "<", "/", "code", ">", ".", "<p", ">", "If", "<code", ">", "T<", "/", "code", ">", "is", "<code", ">", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L1059-L1061
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/cryptohash/KeccakCore.java
KeccakCore.decodeLELong
private static long decodeLELong(byte[] buf, int off) { """ Decode a 64-bit little-endian word from the array {@code buf} at offset {@code off}. @param buf the source buffer @param off the source offset @return the decoded value """ return (buf[off + 0] & 0xFFL) | ((buf[off + 1] & 0xFFL) << 8) ...
java
private static long decodeLELong(byte[] buf, int off) { return (buf[off + 0] & 0xFFL) | ((buf[off + 1] & 0xFFL) << 8) | ((buf[off + 2] & 0xFFL) << 16) | ((buf[off + 3] & 0xFFL) << 24) | ((buf[off + 4] & 0xFFL) << 32) | ((buf[off + 5] & 0xFFL) << 40) | ((buf[off + 6] & 0xFFL) << 48) | ((buf[off +...
[ "private", "static", "long", "decodeLELong", "(", "byte", "[", "]", "buf", ",", "int", "off", ")", "{", "return", "(", "buf", "[", "off", "+", "0", "]", "&", "0xFF", "L", ")", "|", "(", "(", "buf", "[", "off", "+", "1", "]", "&", "0xFF", "L",...
Decode a 64-bit little-endian word from the array {@code buf} at offset {@code off}. @param buf the source buffer @param off the source offset @return the decoded value
[ "Decode", "a", "64", "-", "bit", "little", "-", "endian", "word", "from", "the", "array", "{", "@code", "buf", "}", "at", "offset", "{", "@code", "off", "}", "." ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/cryptohash/KeccakCore.java#L72-L82
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/interestrate/products/CancelableSwap.java
CancelableSwap.getValue
@Override public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is ofte...
java
@Override public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException { // After the last period the product has value zero: Initialize values to zero. RandomVariableInterface values = new RandomVariable(fixingDates[fixingDates.length-1...
[ "@", "Override", "public", "RandomVariableInterface", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationInterface", "model", ")", "throws", "CalculationException", "{", "// After the last period the product has value zero: Initialize values to zero.", "...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/products/CancelableSwap.java#L62-L108
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/impl/AbstractParser.java
AbstractParser.selectAID
protected byte[] selectAID(final byte[] pAid) throws CommunicationException { """ Select application with AID or RID @param pAid byte array containing AID or RID @return response byte array @throws CommunicationException communication error """ if (LOGGER.isDebugEnabled()) { LOGGER.debug("Select AID...
java
protected byte[] selectAID(final byte[] pAid) throws CommunicationException { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Select AID: " + BytesUtils.bytesToString(pAid)); } return template.get().getProvider().transceive(new CommandApdu(CommandEnum.SELECT, pAid, 0).toBytes()); }
[ "protected", "byte", "[", "]", "selectAID", "(", "final", "byte", "[", "]", "pAid", ")", "throws", "CommunicationException", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "{", "LOGGER", ".", "debug", "(", "\"Select AID: \"", "+", "BytesUt...
Select application with AID or RID @param pAid byte array containing AID or RID @return response byte array @throws CommunicationException communication error
[ "Select", "application", "with", "AID", "or", "RID" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/impl/AbstractParser.java#L80-L85
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/adapter/classes/ASTClassFactory.java
ASTClassFactory.getField
public ASTField getField(Field field) { """ Builds an AST Field from the given field @param field @return AST Field """ ASTAccessModifier modifier = ASTAccessModifier.getModifier(field.getModifiers()); return new ASTClassField(field, getType(field.getType(), field.getGenericType()), modifi...
java
public ASTField getField(Field field) { ASTAccessModifier modifier = ASTAccessModifier.getModifier(field.getModifiers()); return new ASTClassField(field, getType(field.getType(), field.getGenericType()), modifier, getAnnotations(field)); }
[ "public", "ASTField", "getField", "(", "Field", "field", ")", "{", "ASTAccessModifier", "modifier", "=", "ASTAccessModifier", ".", "getModifier", "(", "field", ".", "getModifiers", "(", ")", ")", ";", "return", "new", "ASTClassField", "(", "field", ",", "getTy...
Builds an AST Field from the given field @param field @return AST Field
[ "Builds", "an", "AST", "Field", "from", "the", "given", "field" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/adapter/classes/ASTClassFactory.java#L236-L240
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java
AbstractNotification.setParam
public int setParam(String param, Object value) { """ Sets the value for a parameter in extra info. @param param Parameter name. @param value Parameter value (null to remove). @return Index of parameter in extra info. """ int i = findParam(param); if (value == null && i < 0) { ...
java
public int setParam(String param, Object value) { int i = findParam(param); if (value == null && i < 0) { return i; } if (i < 0) { i = extraInfo.length; extraInfo = Arrays.copyOf(extraInfo, i + 1); } if (value...
[ "public", "int", "setParam", "(", "String", "param", ",", "Object", "value", ")", "{", "int", "i", "=", "findParam", "(", "param", ")", ";", "if", "(", "value", "==", "null", "&&", "i", "<", "0", ")", "{", "return", "i", ";", "}", "if", "(", "i...
Sets the value for a parameter in extra info. @param param Parameter name. @param value Parameter value (null to remove). @return Index of parameter in extra info.
[ "Sets", "the", "value", "for", "a", "parameter", "in", "extra", "info", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/AbstractNotification.java#L274-L293
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/matcher/MatchingPointConfigPatternMatcher.java
MatchingPointConfigPatternMatcher.getMatchingPoint
private int getMatchingPoint(String pattern, String itemName) { """ This method returns the higher value the better the matching is. @param pattern configuration pattern to match with @param itemName item name to match @return -1 if name does not match at all, zero or positive otherwise """ int i...
java
private int getMatchingPoint(String pattern, String itemName) { int index = pattern.indexOf('*'); if (index == -1) { return -1; } String firstPart = pattern.substring(0, index); if (!itemName.startsWith(firstPart)) { return -1; } String s...
[ "private", "int", "getMatchingPoint", "(", "String", "pattern", ",", "String", "itemName", ")", "{", "int", "index", "=", "pattern", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "return", "-", "1", ";", "}"...
This method returns the higher value the better the matching is. @param pattern configuration pattern to match with @param itemName item name to match @return -1 if name does not match at all, zero or positive otherwise
[ "This", "method", "returns", "the", "higher", "value", "the", "better", "the", "matching", "is", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/matcher/MatchingPointConfigPatternMatcher.java#L61-L78
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java
ExperimentsInner.listByWorkspaceWithServiceResponseAsync
public Observable<ServiceResponse<Page<ExperimentInner>>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final ExperimentsListByWorkspaceOptions experimentsListByWorkspaceOptions) { """ Gets a list of Experiments within the specified Workspace. @param resourc...
java
public Observable<ServiceResponse<Page<ExperimentInner>>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final ExperimentsListByWorkspaceOptions experimentsListByWorkspaceOptions) { return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, exper...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ExperimentInner", ">", ">", ">", "listByWorkspaceWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "workspaceName", ",", "final", "ExperimentsListByWorkspaceOp...
Gets a list of Experiments within the specified Workspace. @param resourceGroupName Name of the resource group to which the resource belongs. @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must b...
[ "Gets", "a", "list", "of", "Experiments", "within", "the", "specified", "Workspace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java#L283-L295
looly/hutool
hutool-db/src/main/java/cn/hutool/db/Entity.java
Entity.getStr
public String getStr(String field, Charset charset) { """ 获得字符串值<br> 支持Clob、Blob、RowId @param field 字段名 @param charset 编码 @return 字段对应值 @since 3.0.6 """ final Object obj = get(field); if (obj instanceof Clob) { return SqlUtil.clobToStr((Clob) obj); } else if (obj instanceof Blob) { retu...
java
public String getStr(String field, Charset charset) { final Object obj = get(field); if (obj instanceof Clob) { return SqlUtil.clobToStr((Clob) obj); } else if (obj instanceof Blob) { return SqlUtil.blobToStr((Blob) obj, charset); } else if (obj instanceof RowId) { final RowId rowId = (RowId) ob...
[ "public", "String", "getStr", "(", "String", "field", ",", "Charset", "charset", ")", "{", "final", "Object", "obj", "=", "get", "(", "field", ")", ";", "if", "(", "obj", "instanceof", "Clob", ")", "{", "return", "SqlUtil", ".", "clobToStr", "(", "(", ...
获得字符串值<br> 支持Clob、Blob、RowId @param field 字段名 @param charset 编码 @return 字段对应值 @since 3.0.6
[ "获得字符串值<br", ">", "支持Clob、Blob、RowId" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Entity.java#L333-L344
virgo47/javasimon
core/src/main/java/org/javasimon/utils/bean/SimonBeanUtils.java
SimonBeanUtils.setProperty
public void setProperty(Object target, String property, Object value) { """ Set property in object target. If values has type other than String setter method or field with specified type will be used to set value. If value has String type value will be converted using available converters. If conversion to all o...
java
public void setProperty(Object target, String property, Object value) { NestedResolver resolver = new NestedResolver(target, property); if (value instanceof String) { convertStringValue(resolver.getNestedTarget(), resolver.getProperty(), (String) value); } else { setObjectValue(resolver.getNestedTarget(), ...
[ "public", "void", "setProperty", "(", "Object", "target", ",", "String", "property", ",", "Object", "value", ")", "{", "NestedResolver", "resolver", "=", "new", "NestedResolver", "(", "target", ",", "property", ")", ";", "if", "(", "value", "instanceof", "St...
Set property in object target. If values has type other than String setter method or field with specified type will be used to set value. If value has String type value will be converted using available converters. If conversion to all of the types accepted by setters fails, field with corresponding name will be used ...
[ "Set", "property", "in", "object", "target", ".", "If", "values", "has", "type", "other", "than", "String", "setter", "method", "or", "field", "with", "specified", "type", "will", "be", "used", "to", "set", "value", ".", "If", "value", "has", "String", "...
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/bean/SimonBeanUtils.java#L69-L77
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/concurrency/CudaAffinityManager.java
CudaAffinityManager.replicateToDevice
@Override public synchronized INDArray replicateToDevice(Integer deviceId, INDArray array) { """ This method replicates given INDArray, and places it to target device. @param deviceId target deviceId @param array INDArray to replicate @return """ if (array == null) return null; ...
java
@Override public synchronized INDArray replicateToDevice(Integer deviceId, INDArray array) { if (array == null) return null; // string arrays are stored in host memory only atm if (array.isS()) return array.dup(array.ordering()); if (array.isView()) ...
[ "@", "Override", "public", "synchronized", "INDArray", "replicateToDevice", "(", "Integer", "deviceId", ",", "INDArray", "array", ")", "{", "if", "(", "array", "==", "null", ")", "return", "null", ";", "// string arrays are stored in host memory only atm", "if", "("...
This method replicates given INDArray, and places it to target device. @param deviceId target deviceId @param array INDArray to replicate @return
[ "This", "method", "replicates", "given", "INDArray", "and", "places", "it", "to", "target", "device", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/concurrency/CudaAffinityManager.java#L257-L300
landawn/AbacusUtil
src/com/landawn/abacus/util/Array.java
Array.binarySearch
static int binarySearch(final short[] a, final int fromIndex, final int toIndex, final short key) { """ {@link Arrays#binarySearch(short[], int, int, short)} @param a @param fromIndex @param toIndex @param key @return """ if (N.isNullOrEmpty(a)) { return N.INDEX_NOT_FOUND; ...
java
static int binarySearch(final short[] a, final int fromIndex, final int toIndex, final short key) { if (N.isNullOrEmpty(a)) { return N.INDEX_NOT_FOUND; } return Arrays.binarySearch(a, fromIndex, toIndex, key); }
[ "static", "int", "binarySearch", "(", "final", "short", "[", "]", "a", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ",", "final", "short", "key", ")", "{", "if", "(", "N", ".", "isNullOrEmpty", "(", "a", ")", ")", "{", "return", ...
{@link Arrays#binarySearch(short[], int, int, short)} @param a @param fromIndex @param toIndex @param key @return
[ "{", "@link", "Arrays#binarySearch", "(", "short", "[]", "int", "int", "short", ")", "}" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Array.java#L3349-L3355
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java
ContextUtil.makeRequestCtx
public RequestCtx makeRequestCtx(String request) throws MelcoeXacmlException { """ Converts a string based request to a RequestCtx obejct. @param request the string request @return the RequestCtx object @throws MelcoeXacmlException """ RequestCtx reqCtx = null; try { ...
java
public RequestCtx makeRequestCtx(String request) throws MelcoeXacmlException { RequestCtx reqCtx = null; try { ByteArrayInputStream is = new ByteArrayInputStream(request.getBytes()); reqCtx = BasicRequestCtx.getInstance(is); } catch (Parsin...
[ "public", "RequestCtx", "makeRequestCtx", "(", "String", "request", ")", "throws", "MelcoeXacmlException", "{", "RequestCtx", "reqCtx", "=", "null", ";", "try", "{", "ByteArrayInputStream", "is", "=", "new", "ByteArrayInputStream", "(", "request", ".", "getBytes", ...
Converts a string based request to a RequestCtx obejct. @param request the string request @return the RequestCtx object @throws MelcoeXacmlException
[ "Converts", "a", "string", "based", "request", "to", "a", "RequestCtx", "obejct", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L306-L317
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.saveCounter
public static <E> void saveCounter(Counter<E> c, String filename) throws IOException { """ Saves a Counter to a text file. Counter written as one key/count pair per line, separated by whitespace. """ FileOutputStream fos = new FileOutputStream(filename); saveCounter(c, fos); fos.close(); }
java
public static <E> void saveCounter(Counter<E> c, String filename) throws IOException { FileOutputStream fos = new FileOutputStream(filename); saveCounter(c, fos); fos.close(); }
[ "public", "static", "<", "E", ">", "void", "saveCounter", "(", "Counter", "<", "E", ">", "c", ",", "String", "filename", ")", "throws", "IOException", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "filename", ")", ";", "saveCounter", ...
Saves a Counter to a text file. Counter written as one key/count pair per line, separated by whitespace.
[ "Saves", "a", "Counter", "to", "a", "text", "file", ".", "Counter", "written", "as", "one", "key", "/", "count", "pair", "per", "line", "separated", "by", "whitespace", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L1643-L1647
akarnokd/ixjava
src/main/java/ix/Ix.java
Ix.sequenceEqual
public final Ix<Boolean> sequenceEqual(Iterable<? extends T> other) { """ Determines if two sequences have the same elements in the same order and are the same length based on null-safe object equality. <p> The result's iterator() doesn't support remove(). @param other the other sequence to compare with @retu...
java
public final Ix<Boolean> sequenceEqual(Iterable<? extends T> other) { return sequenceEqual(nullCheck(other, "other is null"), EqualityHelper.INSTANCE); }
[ "public", "final", "Ix", "<", "Boolean", ">", "sequenceEqual", "(", "Iterable", "<", "?", "extends", "T", ">", "other", ")", "{", "return", "sequenceEqual", "(", "nullCheck", "(", "other", ",", "\"other is null\"", ")", ",", "EqualityHelper", ".", "INSTANCE"...
Determines if two sequences have the same elements in the same order and are the same length based on null-safe object equality. <p> The result's iterator() doesn't support remove(). @param other the other sequence to compare with @return the new Ix instance @throws NullPointerException if other is null @since 1.0
[ "Determines", "if", "two", "sequences", "have", "the", "same", "elements", "in", "the", "same", "order", "and", "are", "the", "same", "length", "based", "on", "null", "-", "safe", "object", "equality", ".", "<p", ">", "The", "result", "s", "iterator", "(...
train
https://github.com/akarnokd/ixjava/blob/add721bba550c36541faa450e40a975bb65e78d7/src/main/java/ix/Ix.java#L1955-L1957
dnsjava/dnsjava
org/xbill/DNS/Message.java
Message.addRecord
public void addRecord(Record r, int section) { """ Adds a record to a section of the Message, and adjusts the header. @see Record @see Section """ if (sections[section] == null) sections[section] = new LinkedList(); header.incCount(section); sections[section].add(r); }
java
public void addRecord(Record r, int section) { if (sections[section] == null) sections[section] = new LinkedList(); header.incCount(section); sections[section].add(r); }
[ "public", "void", "addRecord", "(", "Record", "r", ",", "int", "section", ")", "{", "if", "(", "sections", "[", "section", "]", "==", "null", ")", "sections", "[", "section", "]", "=", "new", "LinkedList", "(", ")", ";", "header", ".", "incCount", "(...
Adds a record to a section of the Message, and adjusts the header. @see Record @see Section
[ "Adds", "a", "record", "to", "a", "section", "of", "the", "Message", "and", "adjusts", "the", "header", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Message.java#L171-L177
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java
PublicKeyReader.readPublicKey
public static PublicKey readPublicKey(final byte[] publicKeyBytes) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { """ Read public key. @param publicKeyBytes the public key bytes @return the public key @throws NoSuchAlgorithmException is thrown if instantiation of the c...
java
public static PublicKey readPublicKey(final byte[] publicKeyBytes) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPublicKey(publicKeyBytes, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); }
[ "public", "static", "PublicKey", "readPublicKey", "(", "final", "byte", "[", "]", "publicKeyBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "return", "readPublicKey", "(", "publicKeyBytes", ",", "Ke...
Read public key. @param publicKeyBytes the public key bytes @return the public key @throws NoSuchAlgorithmException is thrown if instantiation of the cypher object fails. @throws InvalidKeySpecException is thrown if generation of the SecretKey object fails. @throws NoSuchProviderException is thrown if the specified pr...
[ "Read", "public", "key", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java#L94-L98
relayrides/pushy
pushy/src/main/java/com/turo/pushy/apns/util/ApnsPayloadBuilder.java
ApnsPayloadBuilder.setLocalizedAlertTitle
public ApnsPayloadBuilder setLocalizedAlertTitle(final String localizedAlertTitleKey, final String... alertTitleArguments) { """ <p>Sets the key of the title string in the receiving app's localized string list to be shown for the push notification. Clears any previously-set literal alert title. The message in the...
java
public ApnsPayloadBuilder setLocalizedAlertTitle(final String localizedAlertTitleKey, final String... alertTitleArguments) { this.localizedAlertTitleKey = localizedAlertTitleKey; this.localizedAlertTitleArguments = (alertTitleArguments != null && alertTitleArguments.length > 0) ? alertTitleArguments : n...
[ "public", "ApnsPayloadBuilder", "setLocalizedAlertTitle", "(", "final", "String", "localizedAlertTitleKey", ",", "final", "String", "...", "alertTitleArguments", ")", "{", "this", ".", "localizedAlertTitleKey", "=", "localizedAlertTitleKey", ";", "this", ".", "localizedAl...
<p>Sets the key of the title string in the receiving app's localized string list to be shown for the push notification. Clears any previously-set literal alert title. The message in the app's string list may optionally have placeholders, which will be populated by values from the given {@code alertArguments}.</p> @par...
[ "<p", ">", "Sets", "the", "key", "of", "the", "title", "string", "in", "the", "receiving", "app", "s", "localized", "string", "list", "to", "be", "shown", "for", "the", "push", "notification", ".", "Clears", "any", "previously", "-", "set", "literal", "a...
train
https://github.com/relayrides/pushy/blob/1f6f9a0e07d785c815d74c2320a8d87c80231d36/pushy/src/main/java/com/turo/pushy/apns/util/ApnsPayloadBuilder.java#L237-L244
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java
ControlBean.getControlService
protected Object getControlService(Class serviceClass, Object selector) throws TooManyListenersException { """ Locates and obtains a context service from the BeanContextServices instance supporting this bean. The base design for the BeanContextServicesSupport is that it will delegate up to...
java
protected Object getControlService(Class serviceClass, Object selector) throws TooManyListenersException { // // Get the associated context object, then use it to locate the (parent) bean context. // Services are always provided by the parent context. // ...
[ "protected", "Object", "getControlService", "(", "Class", "serviceClass", ",", "Object", "selector", ")", "throws", "TooManyListenersException", "{", "//", "// Get the associated context object, then use it to locate the (parent) bean context.", "// Services are always provided by the ...
Locates and obtains a context service from the BeanContextServices instance supporting this bean. The base design for the BeanContextServicesSupport is that it will delegate up to peers in a nesting context, so a nested control bean will look 'up' to find a service provider.
[ "Locates", "and", "obtains", "a", "context", "service", "from", "the", "BeanContextServices", "instance", "supporting", "this", "bean", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBean.java#L615-L633
j256/ormlite-jdbc
src/main/java/com/j256/ormlite/jdbc/TypeValMapper.java
TypeValMapper.getSqlTypeForTypeVal
public static SqlType getSqlTypeForTypeVal(int typeVal) { """ Returns the SqlType value associated with the typeVal argument. Can be slow-er. """ // iterate through to save on the extra HashMap since only for errors for (Map.Entry<SqlType, int[]> entry : typeToValMap.entrySet()) { for (int val : entry.g...
java
public static SqlType getSqlTypeForTypeVal(int typeVal) { // iterate through to save on the extra HashMap since only for errors for (Map.Entry<SqlType, int[]> entry : typeToValMap.entrySet()) { for (int val : entry.getValue()) { if (val == typeVal) { return entry.getKey(); } } } return SqlTyp...
[ "public", "static", "SqlType", "getSqlTypeForTypeVal", "(", "int", "typeVal", ")", "{", "// iterate through to save on the extra HashMap since only for errors", "for", "(", "Map", ".", "Entry", "<", "SqlType", ",", "int", "[", "]", ">", "entry", ":", "typeToValMap", ...
Returns the SqlType value associated with the typeVal argument. Can be slow-er.
[ "Returns", "the", "SqlType", "value", "associated", "with", "the", "typeVal", "argument", ".", "Can", "be", "slow", "-", "er", "." ]
train
https://github.com/j256/ormlite-jdbc/blob/a5ce794ce34bce7000730ebe8e15f3fb3a8a5381/src/main/java/com/j256/ormlite/jdbc/TypeValMapper.java#L103-L113
hal/core
gui/src/main/java/org/jboss/as/console/client/widgets/CollapsibleSplitLayoutPanel.java
CollapsibleSplitLayoutPanel.setWidgetMinSize
public void setWidgetMinSize(Widget child, int minSize) { """ Sets the minimum allowable size for the given widget. <p> Its associated splitter cannot be dragged to a position that would make it smaller than this size. This method has no effect for the {@link DockLayoutPanel.Direction#CENTER} widget. </p> ...
java
public void setWidgetMinSize(Widget child, int minSize) { assertIsChild(child); Splitter splitter = getAssociatedSplitter(child); // The splitter is null for the center element. if (splitter != null) { splitter.setMinSize(minSize); } }
[ "public", "void", "setWidgetMinSize", "(", "Widget", "child", ",", "int", "minSize", ")", "{", "assertIsChild", "(", "child", ")", ";", "Splitter", "splitter", "=", "getAssociatedSplitter", "(", "child", ")", ";", "// The splitter is null for the center element.", "...
Sets the minimum allowable size for the given widget. <p> Its associated splitter cannot be dragged to a position that would make it smaller than this size. This method has no effect for the {@link DockLayoutPanel.Direction#CENTER} widget. </p> @param child the child whose minimum size will be set @param minSize the ...
[ "Sets", "the", "minimum", "allowable", "size", "for", "the", "given", "widget", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/widgets/CollapsibleSplitLayoutPanel.java#L416-L423
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.setOrthoSymmetric
public Matrix4f setOrthoSymmetric(float width, float height, float zNear, float zFar) { """ Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOrtho...
java
public Matrix4f setOrthoSymmetric(float width, float height, float zNear, float zFar) { return setOrthoSymmetric(width, height, zNear, zFar, false); }
[ "public", "Matrix4f", "setOrthoSymmetric", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ")", "{", "return", "setOrthoSymmetric", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ")", ";", ...
Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOrtho(float, float, float, float, float, float) setOrtho()} with <code>left=-width/2</code>, <code>right=...
[ "Set", "this", "matrix", "to", "be", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L7703-L7705
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/i/IntTuples.java
IntTuples.createSubTuple
static IntTuple createSubTuple( IntTuple parent, int fromIndex, int toIndex) { """ Creates a new tuple that is a <i>view</i> on the specified portion of the given parent. Changes in the parent will be visible in the returned tuple. @param parent The parent tuple @param fromIndex The start index in t...
java
static IntTuple createSubTuple( IntTuple parent, int fromIndex, int toIndex) { return new SubIntTuple(parent, fromIndex, toIndex); }
[ "static", "IntTuple", "createSubTuple", "(", "IntTuple", "parent", ",", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "return", "new", "SubIntTuple", "(", "parent", ",", "fromIndex", ",", "toIndex", ")", ";", "}" ]
Creates a new tuple that is a <i>view</i> on the specified portion of the given parent. Changes in the parent will be visible in the returned tuple. @param parent The parent tuple @param fromIndex The start index in the parent, inclusive @param toIndex The end index in the parent, exclusive @throws NullPointerExceptio...
[ "Creates", "a", "new", "tuple", "that", "is", "a", "<i", ">", "view<", "/", "i", ">", "on", "the", "specified", "portion", "of", "the", "given", "parent", ".", "Changes", "in", "the", "parent", "will", "be", "visible", "in", "the", "returned", "tuple",...
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/i/IntTuples.java#L229-L233
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/StringUtils.java
StringUtils.search
public static int search(CharSequence chars, char c) { """ Returns the number of times the specified character was found in the target string, or 0 if there is no specified character. @param chars the target string @param c the character to find @return the number of times the specified character was found ...
java
public static int search(CharSequence chars, char c) { int count = 0; for (int i = 0; i < chars.length(); i++) { if (chars.charAt(i) == c) { count++; } } return count; }
[ "public", "static", "int", "search", "(", "CharSequence", "chars", ",", "char", "c", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chars", ".", "length", "(", ")", ";", "i", "++", ")", "{", "if", "...
Returns the number of times the specified character was found in the target string, or 0 if there is no specified character. @param chars the target string @param c the character to find @return the number of times the specified character was found
[ "Returns", "the", "number", "of", "times", "the", "specified", "character", "was", "found", "in", "the", "target", "string", "or", "0", "if", "there", "is", "no", "specified", "character", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L572-L580
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.divideRowBy
public static void divideRowBy(double[][] matrix, int aRow, int fromCol, double value) { """ Divide the row from this column position by this value @param matrix the matrix to modify @param aRow the row to process @param fromCol starting from column @param value the value to divide """ int cols = m...
java
public static void divideRowBy(double[][] matrix, int aRow, int fromCol, double value) { int cols = matrix[0].length; double[] r = matrix[aRow]; for (int col = fromCol; col < cols; col++) { r[col] /= value; } }
[ "public", "static", "void", "divideRowBy", "(", "double", "[", "]", "[", "]", "matrix", ",", "int", "aRow", ",", "int", "fromCol", ",", "double", "value", ")", "{", "int", "cols", "=", "matrix", "[", "0", "]", ".", "length", ";", "double", "[", "]"...
Divide the row from this column position by this value @param matrix the matrix to modify @param aRow the row to process @param fromCol starting from column @param value the value to divide
[ "Divide", "the", "row", "from", "this", "column", "position", "by", "this", "value" ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L712-L718
jfinal/jfinal
src/main/java/com/jfinal/token/TokenManager.java
TokenManager.createToken
public static void createToken(Controller controller, String tokenName, int secondsOfTimeOut) { """ Create Token. @param Controller @param tokenName token name @param secondsOfTimeOut seconds of time out, for ITokenCache only. """ if (tokenCache == null) { String tokenId = String.valueOf(random.nextL...
java
public static void createToken(Controller controller, String tokenName, int secondsOfTimeOut) { if (tokenCache == null) { String tokenId = String.valueOf(random.nextLong()); controller.setAttr(tokenName, tokenId); controller.setSessionAttr(tokenName, tokenId); createTokenHiddenField(controller, token...
[ "public", "static", "void", "createToken", "(", "Controller", "controller", ",", "String", "tokenName", ",", "int", "secondsOfTimeOut", ")", "{", "if", "(", "tokenCache", "==", "null", ")", "{", "String", "tokenId", "=", "String", ".", "valueOf", "(", "rando...
Create Token. @param Controller @param tokenName token name @param secondsOfTimeOut seconds of time out, for ITokenCache only.
[ "Create", "Token", "." ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/token/TokenManager.java#L59-L69
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GroupContactSet.java
GroupContactSet.hasContact
public boolean hasContact(Group group1, Group group2) { """ Tell whether the given group pair is a contact in this GroupContactSet, the comparison is done by matching residue numbers and chain identifiers @param group1 @param group2 @return """ return hasContact(group1.getResidueNumber(),group2.getResidu...
java
public boolean hasContact(Group group1, Group group2) { return hasContact(group1.getResidueNumber(),group2.getResidueNumber()); }
[ "public", "boolean", "hasContact", "(", "Group", "group1", ",", "Group", "group2", ")", "{", "return", "hasContact", "(", "group1", ".", "getResidueNumber", "(", ")", ",", "group2", ".", "getResidueNumber", "(", ")", ")", ";", "}" ]
Tell whether the given group pair is a contact in this GroupContactSet, the comparison is done by matching residue numbers and chain identifiers @param group1 @param group2 @return
[ "Tell", "whether", "the", "given", "group", "pair", "is", "a", "contact", "in", "this", "GroupContactSet", "the", "comparison", "is", "done", "by", "matching", "residue", "numbers", "and", "chain", "identifiers" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/contact/GroupContactSet.java#L105-L107
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java
OWLObjectAllValuesFromImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectAllValuesFromImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.goo...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectAllValuesFromImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLObjectAllValuesFromImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java#L94-L97
threerings/nenya
core/src/main/java/com/threerings/resource/ResourceManager.java
ResourceManager.addModificationObserver
public void addModificationObserver (String path, ModificationObserver obs) { """ Adds a modification observer for the specified resource. Note that only a weak reference to the observer will be retained, and thus this will not prevent the observer from being garbage-collected. """ ObservedResource ...
java
public void addModificationObserver (String path, ModificationObserver obs) { ObservedResource resource = _observed.get(path); if (resource == null) { File file = getResourceFile(path); if (file == null) { return; // only resource files will ever be modified ...
[ "public", "void", "addModificationObserver", "(", "String", "path", ",", "ModificationObserver", "obs", ")", "{", "ObservedResource", "resource", "=", "_observed", ".", "get", "(", "path", ")", ";", "if", "(", "resource", "==", "null", ")", "{", "File", "fil...
Adds a modification observer for the specified resource. Note that only a weak reference to the observer will be retained, and thus this will not prevent the observer from being garbage-collected.
[ "Adds", "a", "modification", "observer", "for", "the", "specified", "resource", ".", "Note", "that", "only", "a", "weak", "reference", "to", "the", "observer", "will", "be", "retained", "and", "thus", "this", "will", "not", "prevent", "the", "observer", "fro...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/resource/ResourceManager.java#L727-L738
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readGroup
public CmsGroup readGroup(CmsRequestContext context, CmsProject project) { """ Reads the group of a project.<p> @param context the current request context @param project the project to read from @return the group of a resource """ CmsDbContext dbc = m_dbContextFactory.getDbContext(context); ...
java
public CmsGroup readGroup(CmsRequestContext context, CmsProject project) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.readGroup(dbc, project); } finally { dbc.clear(); } retu...
[ "public", "CmsGroup", "readGroup", "(", "CmsRequestContext", "context", ",", "CmsProject", "project", ")", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "CmsGroup", "result", "=", "null", ";", "try", "{", ...
Reads the group of a project.<p> @param context the current request context @param project the project to read from @return the group of a resource
[ "Reads", "the", "group", "of", "a", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4328-L4338
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.asDouble
public static double asDouble(Object value, double nullValue) { """ Return the value converted to a double or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The val...
java
public static double asDouble(Object value, double nullValue) { value=convert(Double.class,value); return (value!=null) ? ((Double)value).doubleValue() : nullValue; }
[ "public", "static", "double", "asDouble", "(", "Object", "value", ",", "double", "nullValue", ")", "{", "value", "=", "convert", "(", "Double", ".", "class", ",", "value", ")", ";", "return", "(", "value", "!=", "null", ")", "?", "(", "(", "Double", ...
Return the value converted to a double or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value to be converted @param nullValue The value to be returned if {@link value} i...
[ "Return", "the", "value", "converted", "to", "a", "double", "or", "the", "specified", "alternate", "value", "if", "the", "original", "value", "is", "null", ".", "Note", "this", "method", "still", "throws", "{", "@link", "IllegalArgumentException", "}", "if", ...
train
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L633-L638
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/conversation/Conversation.java
Conversation.saveConversationData
private synchronized void saveConversationData() throws SerializerException { """ Saves conversation data to the disk synchronously. Returns <code>true</code> if succeed. """ if (ApptentiveLog.canLog(ApptentiveLog.Level.VERBOSE)) { ApptentiveLog.v(CONVERSATION, "Saving conversation data..."); Apptenti...
java
private synchronized void saveConversationData() throws SerializerException { if (ApptentiveLog.canLog(ApptentiveLog.Level.VERBOSE)) { ApptentiveLog.v(CONVERSATION, "Saving conversation data..."); ApptentiveLog.v(CONVERSATION, "EventData: %s", getEventData().toString()); ApptentiveLog.v(CONVERSATION, "Messag...
[ "private", "synchronized", "void", "saveConversationData", "(", ")", "throws", "SerializerException", "{", "if", "(", "ApptentiveLog", ".", "canLog", "(", "ApptentiveLog", ".", "Level", ".", "VERBOSE", ")", ")", "{", "ApptentiveLog", ".", "v", "(", "CONVERSATION...
Saves conversation data to the disk synchronously. Returns <code>true</code> if succeed.
[ "Saves", "conversation", "data", "to", "the", "disk", "synchronously", ".", "Returns", "<code", ">", "true<", "/", "code", ">", "if", "succeed", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/conversation/Conversation.java#L381-L392
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/SpringConfigProcessor.java
SpringConfigProcessor.mergeDefinition
protected String mergeDefinition(BeanDefinition target, ReconfigBeanDefinitionHolder source) { """ 合并bean定义 @param target a {@link org.springframework.beans.factory.config.BeanDefinition} object. @param source a {@link org.beangle.inject.spring.config.context.spring.ReconfigBeanDefinitionHolder} object. @re...
java
protected String mergeDefinition(BeanDefinition target, ReconfigBeanDefinitionHolder source) { if (null == target.getBeanClassName()) { logger.warn("ingore bean definition {} for without class", source.getBeanName()); return null; } // 当类型变化后,删除原有配置 if (null != source.getBeanDefinition().get...
[ "protected", "String", "mergeDefinition", "(", "BeanDefinition", "target", ",", "ReconfigBeanDefinitionHolder", "source", ")", "{", "if", "(", "null", "==", "target", ".", "getBeanClassName", "(", ")", ")", "{", "logger", ".", "warn", "(", "\"ingore bean definitio...
合并bean定义 @param target a {@link org.springframework.beans.factory.config.BeanDefinition} object. @param source a {@link org.beangle.inject.spring.config.context.spring.ReconfigBeanDefinitionHolder} object. @return a {@link java.lang.String} object.
[ "合并bean定义" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/SpringConfigProcessor.java#L198-L220
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/rest/query/SimpleQueryParser.java
SimpleQueryParser.parse
public static QueryBuilder parse(String raw, boolean isQuery) throws IOException { """ Builds a QueryBuilder from the given string @param raw a JSON string or an URI search @param isQuery true if the string is a query otherwise the string is considered as a filter (only relevant for elasticsearch version prior ...
java
public static QueryBuilder parse(String raw, boolean isQuery) throws IOException { if (raw.startsWith("?")) { return parseURI(raw.substring(1)); } else if (raw.startsWith("{")) { return new RawQueryBuilder(raw, isQuery); } else { throw new IllegalArgumentExce...
[ "public", "static", "QueryBuilder", "parse", "(", "String", "raw", ",", "boolean", "isQuery", ")", "throws", "IOException", "{", "if", "(", "raw", ".", "startsWith", "(", "\"?\"", ")", ")", "{", "return", "parseURI", "(", "raw", ".", "substring", "(", "1...
Builds a QueryBuilder from the given string @param raw a JSON string or an URI search @param isQuery true if the string is a query otherwise the string is considered as a filter (only relevant for elasticsearch version prior to 2.x). @return @throws IOException
[ "Builds", "a", "QueryBuilder", "from", "the", "given", "string" ]
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/rest/query/SimpleQueryParser.java#L47-L56
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ClassApi.java
ClassApi.methodDistance
public static int methodDistance(Method from, Method to) { """ Calculates distance between from and to methods. @return -1 if this converter can not handle method value greater or equals then 0 otherwise (0 - highest priority) """ return from.getName().equals(to.getName()) && to.getDeclar...
java
public static int methodDistance(Method from, Method to) { return from.getName().equals(to.getName()) && to.getDeclaringClass().isAssignableFrom(from.getDeclaringClass()) ? classDistance(from.getDeclaringClass(), to.getDeclaringClass()) : -1; }
[ "public", "static", "int", "methodDistance", "(", "Method", "from", ",", "Method", "to", ")", "{", "return", "from", ".", "getName", "(", ")", ".", "equals", "(", "to", ".", "getName", "(", ")", ")", "&&", "to", ".", "getDeclaringClass", "(", ")", "....
Calculates distance between from and to methods. @return -1 if this converter can not handle method value greater or equals then 0 otherwise (0 - highest priority)
[ "Calculates", "distance", "between", "from", "and", "to", "methods", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ClassApi.java#L108-L113
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readLines
public static <T extends Collection<String>> T readLines(String path, Charset charset, T collection) throws IORuntimeException { """ 从文件中读取每一行数据 @param <T> 集合类型 @param path 文件路径 @param charset 字符集 @param collection 集合 @return 文件中的每行内容的集合 @throws IORuntimeException IO异常 """ return readLines(file(path...
java
public static <T extends Collection<String>> T readLines(String path, Charset charset, T collection) throws IORuntimeException { return readLines(file(path), charset, collection); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "readLines", "(", "String", "path", ",", "Charset", "charset", ",", "T", "collection", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "file", "(", "...
从文件中读取每一行数据 @param <T> 集合类型 @param path 文件路径 @param charset 字符集 @param collection 集合 @return 文件中的每行内容的集合 @throws IORuntimeException IO异常
[ "从文件中读取每一行数据" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2192-L2194
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/Tags.java
Tags.of
public static Tags of(@Nullable String... keyValues) { """ Return a new {@code Tags} instance containing tags constructed from the specified key/value pairs. @param keyValues the key/value pairs to add @return a new {@code Tags} instance """ if (keyValues == null || keyValues.length == 0) { ...
java
public static Tags of(@Nullable String... keyValues) { if (keyValues == null || keyValues.length == 0) { return empty(); } if (keyValues.length % 2 == 1) { throw new IllegalArgumentException("size must be even, it is a set of key=value pairs"); } Tag[] tag...
[ "public", "static", "Tags", "of", "(", "@", "Nullable", "String", "...", "keyValues", ")", "{", "if", "(", "keyValues", "==", "null", "||", "keyValues", ".", "length", "==", "0", ")", "{", "return", "empty", "(", ")", ";", "}", "if", "(", "keyValues"...
Return a new {@code Tags} instance containing tags constructed from the specified key/value pairs. @param keyValues the key/value pairs to add @return a new {@code Tags} instance
[ "Return", "a", "new", "{", "@code", "Tags", "}", "instance", "containing", "tags", "constructed", "from", "the", "specified", "key", "/", "value", "pairs", "." ]
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/Tags.java#L245-L257
icode/ameba
src/main/java/ameba/feature/AmebaFeature.java
AmebaFeature.subscribeEvent
protected <E extends Event> void subscribeEvent(Class<E> eventClass, final Listener<E> listener) { """ <p>subscribeEvent.</p> @param eventClass a {@link java.lang.Class} object. @param listener a {@link ameba.event.Listener} object. @param <E> a E object. """ locator.inject(listener); lo...
java
protected <E extends Event> void subscribeEvent(Class<E> eventClass, final Listener<E> listener) { locator.inject(listener); locator.postConstruct(listener); subscribe(eventClass, listener); }
[ "protected", "<", "E", "extends", "Event", ">", "void", "subscribeEvent", "(", "Class", "<", "E", ">", "eventClass", ",", "final", "Listener", "<", "E", ">", "listener", ")", "{", "locator", ".", "inject", "(", "listener", ")", ";", "locator", ".", "po...
<p>subscribeEvent.</p> @param eventClass a {@link java.lang.Class} object. @param listener a {@link ameba.event.Listener} object. @param <E> a E object.
[ "<p", ">", "subscribeEvent", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/feature/AmebaFeature.java#L87-L91
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.updateColumnMetaData
private void updateColumnMetaData(CfDef columnFamily, ByteBuffer columnName, String validationClass) { """ Used to locally update column family definition with new column metadata @param columnFamily - CfDef record @param columnName - column name represented as byte[] @param validationClass - value vali...
java
private void updateColumnMetaData(CfDef columnFamily, ByteBuffer columnName, String validationClass) { ColumnDef column = getColumnDefByName(columnFamily, columnName); if (column != null) { // if validation class is the same - no need to modify it if (column.getValid...
[ "private", "void", "updateColumnMetaData", "(", "CfDef", "columnFamily", ",", "ByteBuffer", "columnName", ",", "String", "validationClass", ")", "{", "ColumnDef", "column", "=", "getColumnDefByName", "(", "columnFamily", ",", "columnName", ")", ";", "if", "(", "co...
Used to locally update column family definition with new column metadata @param columnFamily - CfDef record @param columnName - column name represented as byte[] @param validationClass - value validation class
[ "Used", "to", "locally", "update", "column", "family", "definition", "with", "new", "column", "metadata" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2850-L2869
ops4j/org.ops4j.pax.web
pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java
InstanceManager.preDestroy
protected void preDestroy(Object instance, final Class<?> clazz) throws IllegalAccessException, InvocationTargetException { """ Call preDestroy method on the specified instance recursively from deepest superclass to actual class. @param instance object to call preDestroy methods on @param clazz (super) ...
java
protected void preDestroy(Object instance, final Class<?> clazz) throws IllegalAccessException, InvocationTargetException { Class<?> superClass = clazz.getSuperclass(); if (superClass != Object.class) { preDestroy(instance, superClass); } // At the end the postconstruct annotated // method is invoked ...
[ "protected", "void", "preDestroy", "(", "Object", "instance", ",", "final", "Class", "<", "?", ">", "clazz", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "Class", "<", "?", ">", "superClass", "=", "clazz", ".", "getSuperclass",...
Call preDestroy method on the specified instance recursively from deepest superclass to actual class. @param instance object to call preDestroy methods on @param clazz (super) class to examine for preDestroy annotation. @throws IllegalAccessException if preDestroy method is inaccessible. @throw...
[ "Call", "preDestroy", "method", "on", "the", "specified", "instance", "recursively", "from", "deepest", "superclass", "to", "actual", "class", "." ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java#L108-L136
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.notSoftSubtype
public boolean notSoftSubtype(Type t, Type s) { """ This relation answers the question: is impossible that something of type `t' can be a subtype of `s'? This is different from the question "is `t' not a subtype of `s'?" when type variables are involved: Integer is not a subtype of T where {@code <T extends Nu...
java
public boolean notSoftSubtype(Type t, Type s) { if (t == s) return false; if (t.hasTag(TYPEVAR)) { TypeVar tv = (TypeVar) t; return !isCastable(tv.bound, relaxBound(s), noWarnings); } if (!s.hasTag(WILD...
[ "public", "boolean", "notSoftSubtype", "(", "Type", "t", ",", "Type", "s", ")", "{", "if", "(", "t", "==", "s", ")", "return", "false", ";", "if", "(", "t", ".", "hasTag", "(", "TYPEVAR", ")", ")", "{", "TypeVar", "tv", "=", "(", "TypeVar", ")", ...
This relation answers the question: is impossible that something of type `t' can be a subtype of `s'? This is different from the question "is `t' not a subtype of `s'?" when type variables are involved: Integer is not a subtype of T where {@code <T extends Number>} but it is not true that Integer cannot possibly be a s...
[ "This", "relation", "answers", "the", "question", ":", "is", "impossible", "that", "something", "of", "type", "t", "can", "be", "a", "subtype", "of", "s", "?", "This", "is", "different", "from", "the", "question", "is", "t", "not", "a", "subtype", "of", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L1707-L1719
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.queryPropertiesAsync
public com.squareup.okhttp.Call queryPropertiesAsync(String dtid, Integer count, Integer offset, String filter, Boolean includeTimestamp, final ApiCallback<MetadataQueryEnvelope> callback) throws ApiException { """ Query device properties across devices. (asynchronously) Query device properties across devices. @...
java
public com.squareup.okhttp.Call queryPropertiesAsync(String dtid, Integer count, Integer offset, String filter, Boolean includeTimestamp, final ApiCallback<MetadataQueryEnvelope> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressR...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "queryPropertiesAsync", "(", "String", "dtid", ",", "Integer", "count", ",", "Integer", "offset", ",", "String", "filter", ",", "Boolean", "includeTimestamp", ",", "final", "ApiCallback", "<", "Meta...
Query device properties across devices. (asynchronously) Query device properties across devices. @param dtid Device Type ID. (required) @param count Max results count. (optional) @param offset Result starting offset. (optional) @param filter Query filter. Comma-separated key&#x3D;value pairs (optional) @param includeTi...
[ "Query", "device", "properties", "across", "devices", ".", "(", "asynchronously", ")", "Query", "device", "properties", "across", "devices", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L1455-L1480
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningsettings.java
appfwlearningsettings.get
public static appfwlearningsettings get(nitro_service service, String profilename) throws Exception { """ Use this API to fetch appfwlearningsettings resource of given name . """ appfwlearningsettings obj = new appfwlearningsettings(); obj.set_profilename(profilename); appfwlearningsettings response = (a...
java
public static appfwlearningsettings get(nitro_service service, String profilename) throws Exception{ appfwlearningsettings obj = new appfwlearningsettings(); obj.set_profilename(profilename); appfwlearningsettings response = (appfwlearningsettings) obj.get_resource(service); return response; }
[ "public", "static", "appfwlearningsettings", "get", "(", "nitro_service", "service", ",", "String", "profilename", ")", "throws", "Exception", "{", "appfwlearningsettings", "obj", "=", "new", "appfwlearningsettings", "(", ")", ";", "obj", ".", "set_profilename", "("...
Use this API to fetch appfwlearningsettings resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwlearningsettings", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwlearningsettings.java#L718-L723
payneteasy/superfly
superfly-web/src/main/java/com/payneteasy/superfly/web/wicket/component/label/DateLabels.java
DateLabels.forDate
public static DateLabel forDate(String id, IModel<Date> model) { """ Creates a label which displays date only (year, month, day). @param id component id @param model model returning date to display @return date label """ return DateLabel.forDatePattern(id, model, DATE_PATTERN); }
java
public static DateLabel forDate(String id, IModel<Date> model) { return DateLabel.forDatePattern(id, model, DATE_PATTERN); }
[ "public", "static", "DateLabel", "forDate", "(", "String", "id", ",", "IModel", "<", "Date", ">", "model", ")", "{", "return", "DateLabel", ".", "forDatePattern", "(", "id", ",", "model", ",", "DATE_PATTERN", ")", ";", "}" ]
Creates a label which displays date only (year, month, day). @param id component id @param model model returning date to display @return date label
[ "Creates", "a", "label", "which", "displays", "date", "only", "(", "year", "month", "day", ")", "." ]
train
https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-web/src/main/java/com/payneteasy/superfly/web/wicket/component/label/DateLabels.java#L37-L39
looly/hutool
hutool-db/src/main/java/cn/hutool/db/handler/HandleHelper.java
HandleHelper.handleRsToBeanList
public static <E, T extends Collection<E>> T handleRsToBeanList(ResultSet rs, T collection, Class<E> elementBeanType) throws SQLException { """ 处理多条数据并返回一个Bean列表 @param <E> 集合元素类型 @param <T> 集合类型 @param rs 数据集 @param collection 数据集 @param elementBeanType Bean类型 @return Entity列表 @throws SQLException SQL执行异...
java
public static <E, T extends Collection<E>> T handleRsToBeanList(ResultSet rs, T collection, Class<E> elementBeanType) throws SQLException { final ResultSetMetaData meta = rs.getMetaData(); final int columnCount = meta.getColumnCount(); while (rs.next()) { collection.add(handleRow(columnCount, meta, rs, e...
[ "public", "static", "<", "E", ",", "T", "extends", "Collection", "<", "E", ">", ">", "T", "handleRsToBeanList", "(", "ResultSet", "rs", ",", "T", "collection", ",", "Class", "<", "E", ">", "elementBeanType", ")", "throws", "SQLException", "{", "final", "...
处理多条数据并返回一个Bean列表 @param <E> 集合元素类型 @param <T> 集合类型 @param rs 数据集 @param collection 数据集 @param elementBeanType Bean类型 @return Entity列表 @throws SQLException SQL执行异常 @since 3.1.0
[ "处理多条数据并返回一个Bean列表" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/handler/HandleHelper.java#L188-L197
axibase/atsd-api-java
src/main/java/com/axibase/tsd/client/AtsdPropertyExtractor.java
AtsdPropertyExtractor.getAsLong
public long getAsLong(final String name, final long defaultValue) { """ Get property by name as long value @param name name of property without the prefix. @param defaultValue default value for case when the property is not set. @return property's value. """ return AtsdUtil.getPropertyLong...
java
public long getAsLong(final String name, final long defaultValue) { return AtsdUtil.getPropertyLongValue(fullName(name), clientProperties, defaultValue); }
[ "public", "long", "getAsLong", "(", "final", "String", "name", ",", "final", "long", "defaultValue", ")", "{", "return", "AtsdUtil", ".", "getPropertyLongValue", "(", "fullName", "(", "name", ")", ",", "clientProperties", ",", "defaultValue", ")", ";", "}" ]
Get property by name as long value @param name name of property without the prefix. @param defaultValue default value for case when the property is not set. @return property's value.
[ "Get", "property", "by", "name", "as", "long", "value" ]
train
https://github.com/axibase/atsd-api-java/blob/63a0767d08b202dad2ebef4372ff947d6fba0246/src/main/java/com/axibase/tsd/client/AtsdPropertyExtractor.java#L23-L25
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java
ElasticPoolsInner.updateAsync
public Observable<ElasticPoolInner> updateAsync(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { """ Updates an existing elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure ...
java
public Observable<ElasticPoolInner> updateAsync(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters).map(new Func1<ServiceResponse<ElasticPoolInner>, ElasticPoolInner...
[ "public", "Observable", "<", "ElasticPoolInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "elasticPoolName", ",", "ElasticPoolUpdate", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "re...
Updates an existing elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param elasticPoolName The name of the elastic pool to be updated. @param paramete...
[ "Updates", "an", "existing", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java#L327-L334
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java
LuisRuntimeManager.authenticate
public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String luisAuthoringKey) { """ Initializes an instance of Language Understanding (LUIS) Runtime API client. @param endpointAPI the endpoint API @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai...
java
public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String luisAuthoringKey) { return authenticate(String.format("https://%s/luis/v2.0/", endpointAPI.toString()), luisAuthoringKey) .withEndpoint(endpointAPI.toString()); }
[ "public", "static", "LuisRuntimeAPI", "authenticate", "(", "EndpointAPI", "endpointAPI", ",", "String", "luisAuthoringKey", ")", "{", "return", "authenticate", "(", "String", ".", "format", "(", "\"https://%s/luis/v2.0/\"", ",", "endpointAPI", ".", "toString", "(", ...
Initializes an instance of Language Understanding (LUIS) Runtime API client. @param endpointAPI the endpoint API @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) @return the Language Understanding Runtime API client
[ "Initializes", "an", "instance", "of", "Language", "Understanding", "(", "LUIS", ")", "Runtime", "API", "client", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java#L31-L34
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/launchable/LauncherConfig.java
LauncherConfig.imports
public static LauncherConfig imports(Xml node) { """ Import the launcher data from node. @param node The node reference (must not be <code>null</code>). @return The launcher data. @throws LionEngineException If unable to read node. """ Check.notNull(node); final Collection<Xml> childre...
java
public static LauncherConfig imports(Xml node) { Check.notNull(node); final Collection<Xml> children = node.getChildren(LaunchableConfig.NODE_LAUNCHABLE); final Collection<LaunchableConfig> launchables = new ArrayList<>(children.size()); for (final Xml launchable : children)...
[ "public", "static", "LauncherConfig", "imports", "(", "Xml", "node", ")", "{", "Check", ".", "notNull", "(", "node", ")", ";", "final", "Collection", "<", "Xml", ">", "children", "=", "node", ".", "getChildren", "(", "LaunchableConfig", ".", "NODE_LAUNCHABLE...
Import the launcher data from node. @param node The node reference (must not be <code>null</code>). @return The launcher data. @throws LionEngineException If unable to read node.
[ "Import", "the", "launcher", "data", "from", "node", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/launchable/LauncherConfig.java#L78-L94
SonarSource/sonarqube
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/def/Validations.java
Validations.checkDbIdentifier
static String checkDbIdentifier(@Nullable String identifier, String identifierDesc, int maxSize) { """ Ensure {@code identifier} is a valid DB identifier. @throws NullPointerException if {@code identifier} is {@code null} @throws IllegalArgumentException if {@code identifier} is empty @throws IllegalArgumentE...
java
static String checkDbIdentifier(@Nullable String identifier, String identifierDesc, int maxSize) { String res = checkNotNull(identifier, "%s can't be null", identifierDesc); checkArgument(!res.isEmpty(), "%s, can't be empty", identifierDesc); checkArgument( identifier.length() <= maxSize, "%s le...
[ "static", "String", "checkDbIdentifier", "(", "@", "Nullable", "String", "identifier", ",", "String", "identifierDesc", ",", "int", "maxSize", ")", "{", "String", "res", "=", "checkNotNull", "(", "identifier", ",", "\"%s can't be null\"", ",", "identifierDesc", ")...
Ensure {@code identifier} is a valid DB identifier. @throws NullPointerException if {@code identifier} is {@code null} @throws IllegalArgumentException if {@code identifier} is empty @throws IllegalArgumentException if {@code identifier} is longer than {@code maxSize} @throws IllegalArgumentException if {@code identif...
[ "Ensure", "{", "@code", "identifier", "}", "is", "a", "valid", "DB", "identifier", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/def/Validations.java#L107-L115
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createPrinterGraphicsShapes
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, PrinterJob printerJob) { """ Gets a <CODE>Graphics2D</CODE> to print on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear. @param width the width of the panel @param height the height of the panel @...
java
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, null, true, false, 0, printerJob); }
[ "public", "java", ".", "awt", ".", "Graphics2D", "createPrinterGraphicsShapes", "(", "float", "width", ",", "float", "height", ",", "PrinterJob", "printerJob", ")", "{", "return", "new", "PdfPrinterGraphics2D", "(", "this", ",", "width", ",", "height", ",", "n...
Gets a <CODE>Graphics2D</CODE> to print on. The graphics are translated to PDF commands as shapes. No PDF fonts will appear. @param width the width of the panel @param height the height of the panel @param printerJob a printer job @return a <CODE>Graphics2D</CODE>
[ "Gets", "a", "<CODE", ">", "Graphics2D<", "/", "CODE", ">", "to", "print", "on", ".", "The", "graphics", "are", "translated", "to", "PDF", "commands", "as", "shapes", ".", "No", "PDF", "fonts", "will", "appear", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2802-L2804
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
Gen.genDef
public void genDef(JCTree tree, Env<GenContext> env) { """ Visitor method: generate code for a definition, catching and reporting any completion failures. @param tree The definition to be visited. @param env The environment current at the definition. """ Env<GenContext> prevEnv = this.env; ...
java
public void genDef(JCTree tree, Env<GenContext> env) { Env<GenContext> prevEnv = this.env; try { this.env = env; tree.accept(this); } catch (CompletionFailure ex) { chk.completionError(tree.pos(), ex); } finally { this.env = prevEnv; ...
[ "public", "void", "genDef", "(", "JCTree", "tree", ",", "Env", "<", "GenContext", ">", "env", ")", "{", "Env", "<", "GenContext", ">", "prevEnv", "=", "this", ".", "env", ";", "try", "{", "this", ".", "env", "=", "env", ";", "tree", ".", "accept", ...
Visitor method: generate code for a definition, catching and reporting any completion failures. @param tree The definition to be visited. @param env The environment current at the definition.
[ "Visitor", "method", ":", "generate", "code", "for", "a", "definition", "catching", "and", "reporting", "any", "completion", "failures", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L589-L599
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policydataset_binding.java
policydataset_binding.get
public static policydataset_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch policydataset_binding resource of given name . """ policydataset_binding obj = new policydataset_binding(); obj.set_name(name); policydataset_binding response = (policydataset_binding)...
java
public static policydataset_binding get(nitro_service service, String name) throws Exception{ policydataset_binding obj = new policydataset_binding(); obj.set_name(name); policydataset_binding response = (policydataset_binding) obj.get_resource(service); return response; }
[ "public", "static", "policydataset_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "policydataset_binding", "obj", "=", "new", "policydataset_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ...
Use this API to fetch policydataset_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "policydataset_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policydataset_binding.java#L103-L108
ZieIony/Carbon
carbon/src/main/java/carbon/shadow/ShapePath.java
ShapePath.quadToPoint
public void quadToPoint(float controlX, float controlY, float toX, float toY) { """ Add a quad to the ShapePath. @param controlX the control point x of the arc. @param controlY the control point y of the arc. @param toX the end x of the arc. @param toY the end y of the arc. """ PathQuad...
java
public void quadToPoint(float controlX, float controlY, float toX, float toY) { PathQuadOperation operation = new PathQuadOperation(); operation.controlX = controlX; operation.controlY = controlY; operation.endX = toX; operation.endY = toY; operations.add(operation); ...
[ "public", "void", "quadToPoint", "(", "float", "controlX", ",", "float", "controlY", ",", "float", "toX", ",", "float", "toY", ")", "{", "PathQuadOperation", "operation", "=", "new", "PathQuadOperation", "(", ")", ";", "operation", ".", "controlX", "=", "con...
Add a quad to the ShapePath. @param controlX the control point x of the arc. @param controlY the control point y of the arc. @param toX the end x of the arc. @param toY the end y of the arc.
[ "Add", "a", "quad", "to", "the", "ShapePath", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapePath.java#L105-L115
vincentk/joptimizer
src/main/java/com/joptimizer/functions/LogarithmicBarrier.java
LogarithmicBarrier.calculatePhase1InitialFeasiblePoint
@Override public double calculatePhase1InitialFeasiblePoint(double[] originalNotFeasiblePoint, double tolerance) { """ Calculates the initial value for the s parameter in Phase I. Return s = max(fi(x)) @see "S.Boyd and L.Vandenberghe, Convex Optimization, 11.6.2" """ //DoubleMatrix1D X0NF = F1.make(orig...
java
@Override public double calculatePhase1InitialFeasiblePoint(double[] originalNotFeasiblePoint, double tolerance){ //DoubleMatrix1D X0NF = F1.make(originalNotFeasiblePoint); DoubleMatrix1D fiX0NF = F1.make(fi.length); for(int i=0; i<fi.length; i++){ fiX0NF.set(i, this.fi[i].value(originalNotFeasiblePoint)...
[ "@", "Override", "public", "double", "calculatePhase1InitialFeasiblePoint", "(", "double", "[", "]", "originalNotFeasiblePoint", ",", "double", "tolerance", ")", "{", "//DoubleMatrix1D X0NF = F1.make(originalNotFeasiblePoint);\r", "DoubleMatrix1D", "fiX0NF", "=", "F1", ".", ...
Calculates the initial value for the s parameter in Phase I. Return s = max(fi(x)) @see "S.Boyd and L.Vandenberghe, Convex Optimization, 11.6.2"
[ "Calculates", "the", "initial", "value", "for", "the", "s", "parameter", "in", "Phase", "I", ".", "Return", "s", "=", "max", "(", "fi", "(", "x", "))" ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/functions/LogarithmicBarrier.java#L168-L189
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/SceneStructureProjective.java
SceneStructureProjective.initialize
public void initialize( int totalViews , int totalPoints ) { """ Call this function first. Specifies number of each type of data which is available. @param totalViews Number of views @param totalPoints Number of points """ views = new View[totalViews]; points = new Point[totalPoints]; for (int i = 0...
java
public void initialize( int totalViews , int totalPoints ) { views = new View[totalViews]; points = new Point[totalPoints]; for (int i = 0; i < views.length; i++) { views[i] = new View(); } for (int i = 0; i < points.length; i++) { points[i] = new Point(pointSize); } }
[ "public", "void", "initialize", "(", "int", "totalViews", ",", "int", "totalPoints", ")", "{", "views", "=", "new", "View", "[", "totalViews", "]", ";", "points", "=", "new", "Point", "[", "totalPoints", "]", ";", "for", "(", "int", "i", "=", "0", ";...
Call this function first. Specifies number of each type of data which is available. @param totalViews Number of views @param totalPoints Number of points
[ "Call", "this", "function", "first", ".", "Specifies", "number", "of", "each", "type", "of", "data", "which", "is", "available", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/geo/bundle/SceneStructureProjective.java#L48-L58
apache/incubator-atlas
typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java
TypeSystem.defineQueryResultType
public StructType defineQueryResultType(String name, Map<String, IDataType> tempTypes, AttributeDefinition... attrDefs) throws AtlasException { """ construct a temporary StructType for a Query Result. This is not registered in the typeSystem. The attributes in the typeDefinition can only reference pe...
java
public StructType defineQueryResultType(String name, Map<String, IDataType> tempTypes, AttributeDefinition... attrDefs) throws AtlasException { AttributeInfo[] infos = new AttributeInfo[attrDefs.length]; for (int i = 0; i < attrDefs.length; i++) { infos[i] = new AttributeInfo(th...
[ "public", "StructType", "defineQueryResultType", "(", "String", "name", ",", "Map", "<", "String", ",", "IDataType", ">", "tempTypes", ",", "AttributeDefinition", "...", "attrDefs", ")", "throws", "AtlasException", "{", "AttributeInfo", "[", "]", "infos", "=", "...
construct a temporary StructType for a Query Result. This is not registered in the typeSystem. The attributes in the typeDefinition can only reference permanent types. @param name struct type name @param attrDefs struct type definition @return temporary struct type @throws AtlasException
[ "construct", "a", "temporary", "StructType", "for", "a", "Query", "Result", ".", "This", "is", "not", "registered", "in", "the", "typeSystem", ".", "The", "attributes", "in", "the", "typeDefinition", "can", "only", "reference", "permanent", "types", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java#L223-L232
opentelecoms-org/jsmpp
jsmpp/src/main/java/org/jsmpp/session/SMPPOutboundSession.java
SMPPOutboundSession.connectAndOutbind
public BindRequest connectAndOutbind(String host, int port, OutbindParameter outbindParameter, long timeout) throws IOException { """ Open connection and outbind immediately. @param host is the ESME host address. @param port is the ESME listen port. @param outbindParameter is the...
java
public BindRequest connectAndOutbind(String host, int port, OutbindParameter outbindParameter, long timeout) throws IOException { logger.debug("Connect and bind to {} port {}", host, port); if (getSessionState() != SessionState.CLOSED) { throw new IOException("Session state is not closed"); } ...
[ "public", "BindRequest", "connectAndOutbind", "(", "String", "host", ",", "int", "port", ",", "OutbindParameter", "outbindParameter", ",", "long", "timeout", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"Connect and bind to {} port {}\"", ",", "...
Open connection and outbind immediately. @param host is the ESME host address. @param port is the ESME listen port. @param outbindParameter is the bind parameters. @param timeout is the timeout. @return the SMSC system id. @throws IOException if there is an IO error found.
[ "Open", "connection", "and", "outbind", "immediately", "." ]
train
https://github.com/opentelecoms-org/jsmpp/blob/acc15e73e7431deabc803731971b15323315baaf/jsmpp/src/main/java/org/jsmpp/session/SMPPOutboundSession.java#L174-L221
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/IOUtil.java
IOUtil.initFullEnumMap
public static <T extends Enum<T> & HeaderKey> Map<T, StandardField> initFullEnumMap( Class<T> clazz) { """ Initialized a map containing all keys of the Enum T as map-key and default StandardFields as map-value. <p> Ensures that no null value is returned. @return the fully initialized map """ Map<T, ...
java
public static <T extends Enum<T> & HeaderKey> Map<T, StandardField> initFullEnumMap( Class<T> clazz) { Map<T, StandardField> map = new EnumMap<>(clazz); // loop through all values of the Enum type and add a dummy field for (T key : clazz.getEnumConstants()) { // TODO init correct description string Stand...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", "&", "HeaderKey", ">", "Map", "<", "T", ",", "StandardField", ">", "initFullEnumMap", "(", "Class", "<", "T", ">", "clazz", ")", "{", "Map", "<", "T", ",", "StandardField", ">", "map", ...
Initialized a map containing all keys of the Enum T as map-key and default StandardFields as map-value. <p> Ensures that no null value is returned. @return the fully initialized map
[ "Initialized", "a", "map", "containing", "all", "keys", "of", "the", "Enum", "T", "as", "map", "-", "key", "and", "default", "StandardFields", "as", "map", "-", "value", ".", "<p", ">", "Ensures", "that", "no", "null", "value", "is", "returned", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/IOUtil.java#L338-L349
febit/wit
wit-core/src/main/java/org/febit/wit/InternalContext.java
InternalContext.createPeerContext
public InternalContext createPeerContext(Template template, VariantIndexer[] indexers, int varSize, Vars rootParams) { """ Create a peer-context used by include/import. <p> Only share locals and out @param template template @param indexers indexers @param varSize var size @param rootParams root params @r...
java
public InternalContext createPeerContext(Template template, VariantIndexer[] indexers, int varSize, Vars rootParams) { InternalContext newContext = new InternalContext(template, this.out, rootParams, indexers, varSize, null); newContext.localContext = this; return newContext; ...
[ "public", "InternalContext", "createPeerContext", "(", "Template", "template", ",", "VariantIndexer", "[", "]", "indexers", ",", "int", "varSize", ",", "Vars", "rootParams", ")", "{", "InternalContext", "newContext", "=", "new", "InternalContext", "(", "template", ...
Create a peer-context used by include/import. <p> Only share locals and out @param template template @param indexers indexers @param varSize var size @param rootParams root params @return a new peer context
[ "Create", "a", "peer", "-", "context", "used", "by", "include", "/", "import", ".", "<p", ">", "Only", "share", "locals", "and", "out" ]
train
https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L158-L163
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java
ScreenUtil.getColor
public static ColorUIResource getColor(String strProperty, PropertyOwner propertyOwner, Map<String,Object> properties) { """ Get this color. (Utility method). @return The registered color for this property key. """ String strColor = ScreenUtil.getPropery(strProperty, propertyOwner, properties, null);...
java
public static ColorUIResource getColor(String strProperty, PropertyOwner propertyOwner, Map<String,Object> properties) { String strColor = ScreenUtil.getPropery(strProperty, propertyOwner, properties, null); if (strColor != null) return new ColorUIResource(BaseApplet.nameToColor(strColor...
[ "public", "static", "ColorUIResource", "getColor", "(", "String", "strProperty", ",", "PropertyOwner", "propertyOwner", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "String", "strColor", "=", "ScreenUtil", ".", "getPropery", "(", "strPr...
Get this color. (Utility method). @return The registered color for this property key.
[ "Get", "this", "color", ".", "(", "Utility", "method", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/landf/ScreenUtil.java#L187-L193
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java
SeleniumHelper.waitForJavascriptCallback
public Object waitForJavascriptCallback(String statementPattern, Object... parameters) { """ Executes Javascript in browser and then waits for 'callback' to be invoked. If statementPattern should reference the magic (function) variable 'callback' which should be called to provide this method's result. If the st...
java
public Object waitForJavascriptCallback(String statementPattern, Object... parameters) { JavascriptExecutor jse = (JavascriptExecutor) driver(); Object result = JavascriptHelper.waitForJavascriptCallback(jse, statementPattern, parameters); return result; }
[ "public", "Object", "waitForJavascriptCallback", "(", "String", "statementPattern", ",", "Object", "...", "parameters", ")", "{", "JavascriptExecutor", "jse", "=", "(", "JavascriptExecutor", ")", "driver", "(", ")", ";", "Object", "result", "=", "JavascriptHelper", ...
Executes Javascript in browser and then waits for 'callback' to be invoked. If statementPattern should reference the magic (function) variable 'callback' which should be called to provide this method's result. If the statementPattern contains the magic variable 'arguments' the parameters will also be passed to the stat...
[ "Executes", "Javascript", "in", "browser", "and", "then", "waits", "for", "callback", "to", "be", "invoked", ".", "If", "statementPattern", "should", "reference", "the", "magic", "(", "function", ")", "variable", "callback", "which", "should", "be", "called", ...
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java#L464-L468
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java
BackPropagationNet.setUp
private void setUp(Random rand) { """ Creates the weights for the hidden layers and output layer @param rand source of randomness """ Ws = new ArrayList<>(npl.length); bs = new ArrayList<>(npl.length); //First Hiden layer takes input raw DenseMatrix W = new DenseMatrix...
java
private void setUp(Random rand) { Ws = new ArrayList<>(npl.length); bs = new ArrayList<>(npl.length); //First Hiden layer takes input raw DenseMatrix W = new DenseMatrix(npl[0], inputSize); Vec b = new DenseVector(W.rows()); initializeWeights(W, rand); ...
[ "private", "void", "setUp", "(", "Random", "rand", ")", "{", "Ws", "=", "new", "ArrayList", "<>", "(", "npl", ".", "length", ")", ";", "bs", "=", "new", "ArrayList", "<>", "(", "npl", ".", "length", ")", ";", "//First Hiden layer takes input raw", "Dense...
Creates the weights for the hidden layers and output layer @param rand source of randomness
[ "Creates", "the", "weights", "for", "the", "hidden", "layers", "and", "output", "layer" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/neuralnetwork/BackPropagationNet.java#L737-L769
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java
SmileConverter.numericDataset
public AttributeDataset numericDataset(String responseColName, String... variablesColNames) { """ Returns a dataset where the response column is numeric. E.g. to be used for a regression """ return dataset(table.numberColumn(responseColName), AttributeType.NUMERIC, table.columns(variablesColNames)); ...
java
public AttributeDataset numericDataset(String responseColName, String... variablesColNames) { return dataset(table.numberColumn(responseColName), AttributeType.NUMERIC, table.columns(variablesColNames)); }
[ "public", "AttributeDataset", "numericDataset", "(", "String", "responseColName", ",", "String", "...", "variablesColNames", ")", "{", "return", "dataset", "(", "table", ".", "numberColumn", "(", "responseColName", ")", ",", "AttributeType", ".", "NUMERIC", ",", "...
Returns a dataset where the response column is numeric. E.g. to be used for a regression
[ "Returns", "a", "dataset", "where", "the", "response", "column", "is", "numeric", ".", "E", ".", "g", ".", "to", "be", "used", "for", "a", "regression" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java#L46-L48
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionLoader.java
MapTileCollisionLoader.addTileCollisions
private void addTileCollisions(MapTileCollision mapCollision, TileCollision tileCollision, Tile tile) { """ Add the tile collisions from loaded configuration. @param mapCollision The map tile collision owner. @param tileCollision The tile reference. @param tile The tile reference. """ final TileR...
java
private void addTileCollisions(MapTileCollision mapCollision, TileCollision tileCollision, Tile tile) { final TileRef ref = new TileRef(tile); for (final CollisionGroup collision : mapCollision.getCollisionGroups()) { final Collection<TileRef> group = mapGroup.getGroup(colli...
[ "private", "void", "addTileCollisions", "(", "MapTileCollision", "mapCollision", ",", "TileCollision", "tileCollision", ",", "Tile", "tile", ")", "{", "final", "TileRef", "ref", "=", "new", "TileRef", "(", "tile", ")", ";", "for", "(", "final", "CollisionGroup",...
Add the tile collisions from loaded configuration. @param mapCollision The map tile collision owner. @param tileCollision The tile reference. @param tile The tile reference.
[ "Add", "the", "tile", "collisions", "from", "loaded", "configuration", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionLoader.java#L287-L301
codeprimate-software/cp-elements
src/main/java/org/cp/elements/util/CollectionUtils.java
CollectionUtils.addAll
public static <E, T extends Collection<E>> T addAll(T collection, Iterable<E> iterable) { """ Adds all elements from the given {@link Iterable} to the {@link Collection}. @param <E> {@link Class} type of the elements in the {@link Collection} and {@link Iterable}. @param <T> concrete {@link Class} type of the ...
java
public static <E, T extends Collection<E>> T addAll(T collection, Iterable<E> iterable) { Assert.notNull(collection, "Collection is required"); for (E element : nullSafeIterable(iterable)) { collection.add(element); } return collection; }
[ "public", "static", "<", "E", ",", "T", "extends", "Collection", "<", "E", ">", ">", "T", "addAll", "(", "T", "collection", ",", "Iterable", "<", "E", ">", "iterable", ")", "{", "Assert", ".", "notNull", "(", "collection", ",", "\"Collection is required\...
Adds all elements from the given {@link Iterable} to the {@link Collection}. @param <E> {@link Class} type of the elements in the {@link Collection} and {@link Iterable}. @param <T> concrete {@link Class} type of the {@link Collection}. @param collection {@link Collection} in which to add the elements from the {@link ...
[ "Adds", "all", "elements", "from", "the", "given", "{", "@link", "Iterable", "}", "to", "the", "{", "@link", "Collection", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/CollectionUtils.java#L81-L90
xerial/snappy-java
src/main/java/org/xerial/snappy/Snappy.java
Snappy.isValidCompressedBuffer
public static boolean isValidCompressedBuffer(long inputAddr, long offset, long length) throws IOException { """ Returns true iff the contents of compressed buffer [offset, offset+length) can be uncompressed successfully. Does not return the uncompressed data. Takes time proportional to the input len...
java
public static boolean isValidCompressedBuffer(long inputAddr, long offset, long length) throws IOException { return impl.isValidCompressedBuffer(inputAddr, offset, length); }
[ "public", "static", "boolean", "isValidCompressedBuffer", "(", "long", "inputAddr", ",", "long", "offset", ",", "long", "length", ")", "throws", "IOException", "{", "return", "impl", ".", "isValidCompressedBuffer", "(", "inputAddr", ",", "offset", ",", "length", ...
Returns true iff the contents of compressed buffer [offset, offset+length) can be uncompressed successfully. Does not return the uncompressed data. Takes time proportional to the input length, but is usually at least a factor of four faster than actual decompression.
[ "Returns", "true", "iff", "the", "contents", "of", "compressed", "buffer", "[", "offset", "offset", "+", "length", ")", "can", "be", "uncompressed", "successfully", ".", "Does", "not", "return", "the", "uncompressed", "data", ".", "Takes", "time", "proportiona...
train
https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/Snappy.java#L361-L365
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VFSUtils.java
VFSUtils.copyStreamAndClose
public static void copyStreamAndClose(InputStream is, OutputStream os) throws IOException { """ Copy input stream to output stream and close them both @param is input stream @param os output stream @throws IOException for any error """ copyStreamAndClose(is, os, DEFAULT_BUFFER_SIZE); }
java
public static void copyStreamAndClose(InputStream is, OutputStream os) throws IOException { copyStreamAndClose(is, os, DEFAULT_BUFFER_SIZE); }
[ "public", "static", "void", "copyStreamAndClose", "(", "InputStream", "is", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "copyStreamAndClose", "(", "is", ",", "os", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "}" ]
Copy input stream to output stream and close them both @param is input stream @param os output stream @throws IOException for any error
[ "Copy", "input", "stream", "to", "output", "stream", "and", "close", "them", "both" ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VFSUtils.java#L384-L386
HubSpot/Singularity
SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java
SingularityMesosSchedulerClient.subscribe
public void subscribe(URI mesosMasterURI, SingularityMesosScheduler scheduler) throws URISyntaxException { """ The first call to mesos, needed to setup connection properly and identify a framework. @throws URISyntaxException if the URL provided was not a syntactically correct URL. """ FrameworkInfo fr...
java
public void subscribe(URI mesosMasterURI, SingularityMesosScheduler scheduler) throws URISyntaxException { FrameworkInfo frameworkInfo = buildFrameworkInfo(); if (mesosMasterURI == null || mesosMasterURI.getScheme().contains("zk")) { throw new IllegalArgumentException(String.format("Must use master addr...
[ "public", "void", "subscribe", "(", "URI", "mesosMasterURI", ",", "SingularityMesosScheduler", "scheduler", ")", "throws", "URISyntaxException", "{", "FrameworkInfo", "frameworkInfo", "=", "buildFrameworkInfo", "(", ")", ";", "if", "(", "mesosMasterURI", "==", "null",...
The first call to mesos, needed to setup connection properly and identify a framework. @throws URISyntaxException if the URL provided was not a syntactically correct URL.
[ "The", "first", "call", "to", "mesos", "needed", "to", "setup", "connection", "properly", "and", "identify", "a", "framework", "." ]
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/mesos/SingularityMesosSchedulerClient.java#L84-L112
3redronin/mu-server
src/main/java/io/muserver/rest/RestHandlerBuilder.java
RestHandlerBuilder.addCustomParamConverter
public <P> RestHandlerBuilder addCustomParamConverter(Class<P> paramClass, ParamConverter<P> converter) { """ <p>Registers a parameter converter class that convert strings to and from a custom class.</p> <p>This allows you to specify query string parameters, form values, header params and path params as custom cl...
java
public <P> RestHandlerBuilder addCustomParamConverter(Class<P> paramClass, ParamConverter<P> converter) { return addCustomParamConverterProvider(new ParamConverterProvider() { @Override public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations...
[ "public", "<", "P", ">", "RestHandlerBuilder", "addCustomParamConverter", "(", "Class", "<", "P", ">", "paramClass", ",", "ParamConverter", "<", "P", ">", "converter", ")", "{", "return", "addCustomParamConverterProvider", "(", "new", "ParamConverterProvider", "(", ...
<p>Registers a parameter converter class that convert strings to and from a custom class.</p> <p>This allows you to specify query string parameters, form values, header params and path params as custom classes.</p> <p>For more functionality, {@link #addCustomParamConverterProvider(ParamConverterProvider)} is also avail...
[ "<p", ">", "Registers", "a", "parameter", "converter", "class", "that", "convert", "strings", "to", "and", "from", "a", "custom", "class", ".", "<", "/", "p", ">", "<p", ">", "This", "allows", "you", "to", "specify", "query", "string", "parameters", "for...
train
https://github.com/3redronin/mu-server/blob/51598606a3082a121fbd785348ee9770b40308e6/src/main/java/io/muserver/rest/RestHandlerBuilder.java#L109-L119
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatter
@Nonnull public static DateTimeFormatter getDateTimeFormatter (@Nonnull @Nonempty final String sPattern, @Nonnull final ResolverStyle eResolverStyle) { """ Get the cached DateTimeFormatter using the provided resolver style. @param sPattern The pattern t...
java
@Nonnull public static DateTimeFormatter getDateTimeFormatter (@Nonnull @Nonempty final String sPattern, @Nonnull final ResolverStyle eResolverStyle) { return getInstance ().getFromCache (new DateTimeFormatterPattern (sPattern, eResolverStyle)); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatter", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ",", "@", "Nonnull", "final", "ResolverStyle", "eResolverStyle", ")", "{", "return", "getInstance", "(", ")", ".",...
Get the cached DateTimeFormatter using the provided resolver style. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @param eResolverStyle The resolver style to be used. May not be <code>null</code>. @return The compiled DateTimeFormatter and never <code>null</code>. @throws Illegal...
[ "Get", "the", "cached", "DateTimeFormatter", "using", "the", "provided", "resolver", "style", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L123-L128
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/UpdateIdentityPoolResult.java
UpdateIdentityPoolResult.withSupportedLoginProviders
public UpdateIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { """ <p> Optional key:value pairs mapping provider names to provider app IDs. </p> @param supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs. @return R...
java
public UpdateIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { setSupportedLoginProviders(supportedLoginProviders); return this; }
[ "public", "UpdateIdentityPoolResult", "withSupportedLoginProviders", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "supportedLoginProviders", ")", "{", "setSupportedLoginProviders", "(", "supportedLoginProviders", ")", ";", "return", "this", ...
<p> Optional key:value pairs mapping provider names to provider app IDs. </p> @param supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Optional", "key", ":", "value", "pairs", "mapping", "provider", "names", "to", "provider", "app", "IDs", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/UpdateIdentityPoolResult.java#L252-L255
dkpro/dkpro-statistics
dkpro-statistics-correlation/src/main/java/org/dkpro/statistics/correlation/PearsonCorrelation.java
PearsonCorrelation.computeCorrelation
public static double computeCorrelation(final List<Double> list1, final List<Double> list2) { """ Computes the correlation between two datasets. @param list1 The first dataset as a list. @param list2 The second dataset as a list. @return The correlation between the two datasets. """ final double[] d...
java
public static double computeCorrelation(final List<Double> list1, final List<Double> list2) { final double[] doubleArray1 = new double[list1.size()]; final double[] doubleArray2 = new double[list2.size()]; int off1 = 0; for (final double item : list1) { doubleArray1[off1...
[ "public", "static", "double", "computeCorrelation", "(", "final", "List", "<", "Double", ">", "list1", ",", "final", "List", "<", "Double", ">", "list2", ")", "{", "final", "double", "[", "]", "doubleArray1", "=", "new", "double", "[", "list1", ".", "siz...
Computes the correlation between two datasets. @param list1 The first dataset as a list. @param list2 The second dataset as a list. @return The correlation between the two datasets.
[ "Computes", "the", "correlation", "between", "two", "datasets", "." ]
train
https://github.com/dkpro/dkpro-statistics/blob/0b0e93dc49223984964411cbc6df420ba796a8cb/dkpro-statistics-correlation/src/main/java/org/dkpro/statistics/correlation/PearsonCorrelation.java#L41-L61
alkacon/opencms-core
src/org/opencms/gwt/CmsGwtActionElement.java
CmsGwtActionElement.exportMeta
public static String exportMeta(String name, String data) { """ Generates the HTML for a meta tag with given name and content.<p> @param name the name of the meta tag @param data the content of the meta tag @return the HTML for the meta tag """ String escName = CmsEncoder.escapeXml(name); ...
java
public static String exportMeta(String name, String data) { String escName = CmsEncoder.escapeXml(name); String escData = CmsEncoder.escapeXml(data); return ("<meta name=\"" + escName + "\" content=\"" + escData + "\" />"); }
[ "public", "static", "String", "exportMeta", "(", "String", "name", ",", "String", "data", ")", "{", "String", "escName", "=", "CmsEncoder", ".", "escapeXml", "(", "name", ")", ";", "String", "escData", "=", "CmsEncoder", ".", "escapeXml", "(", "data", ")",...
Generates the HTML for a meta tag with given name and content.<p> @param name the name of the meta tag @param data the content of the meta tag @return the HTML for the meta tag
[ "Generates", "the", "HTML", "for", "a", "meta", "tag", "with", "given", "name", "and", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtActionElement.java#L208-L213
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/sequence/SequenceElement.java
SequenceElement.setCodeLength
public void setCodeLength(short codeLength) { """ This method fills codes and points up to codeLength @param codeLength """ this.codeLength = codeLength; if (codes.size() < codeLength) { for (int i = 0; i < codeLength; i++) codes.add((byte) 0); } ...
java
public void setCodeLength(short codeLength) { this.codeLength = codeLength; if (codes.size() < codeLength) { for (int i = 0; i < codeLength; i++) codes.add((byte) 0); } if (points.size() < codeLength) { for (int i = 0; i < codeLength; i++) ...
[ "public", "void", "setCodeLength", "(", "short", "codeLength", ")", "{", "this", ".", "codeLength", "=", "codeLength", ";", "if", "(", "codes", ".", "size", "(", ")", "<", "codeLength", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "co...
This method fills codes and points up to codeLength @param codeLength
[ "This", "method", "fills", "codes", "and", "points", "up", "to", "codeLength" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/sequence/SequenceElement.java#L280-L314