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
aws/aws-sdk-java
aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/GetLogRecordResult.java
GetLogRecordResult.withLogRecord
public GetLogRecordResult withLogRecord(java.util.Map<String, String> logRecord) { """ <p> The requested log event, as a JSON string. </p> @param logRecord The requested log event, as a JSON string. @return Returns a reference to this object so that method calls can be chained together. """ setL...
java
public GetLogRecordResult withLogRecord(java.util.Map<String, String> logRecord) { setLogRecord(logRecord); return this; }
[ "public", "GetLogRecordResult", "withLogRecord", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "logRecord", ")", "{", "setLogRecord", "(", "logRecord", ")", ";", "return", "this", ";", "}" ]
<p> The requested log event, as a JSON string. </p> @param logRecord The requested log event, as a JSON string. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "requested", "log", "event", "as", "a", "JSON", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/GetLogRecordResult.java#L71-L74
datasift/datasift-java
src/main/java/com/datasift/client/push/connectors/CouchDB.java
CouchDB.useSSL
public CouchDB useSSL(String yesOrNo) { """ /* Whether SSL should be used when connecting to the database. Possible values are: yes no @return this """ if (yesOrNo == null || !"yes".equals(yesOrNo) || !"no".equals(yesOrNo)) { throw new IllegalArgumentException("The strings yes or no a...
java
public CouchDB useSSL(String yesOrNo) { if (yesOrNo == null || !"yes".equals(yesOrNo) || !"no".equals(yesOrNo)) { throw new IllegalArgumentException("The strings yes or no are the only valid options for the use ssl " + "option"); } return setParam("use_ssl", yesOr...
[ "public", "CouchDB", "useSSL", "(", "String", "yesOrNo", ")", "{", "if", "(", "yesOrNo", "==", "null", "||", "!", "\"yes\"", ".", "equals", "(", "yesOrNo", ")", "||", "!", "\"no\"", ".", "equals", "(", "yesOrNo", ")", ")", "{", "throw", "new", "Illeg...
/* Whether SSL should be used when connecting to the database. Possible values are: yes no @return this
[ "/", "*", "Whether", "SSL", "should", "be", "used", "when", "connecting", "to", "the", "database", ".", "Possible", "values", "are", ":", "yes", "no" ]
train
https://github.com/datasift/datasift-java/blob/09de124f2a1a507ff6181e59875c6f325290850e/src/main/java/com/datasift/client/push/connectors/CouchDB.java#L85-L91
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SignatureSpi.java
SignatureSpi.engineSign
protected int engineSign(byte[] outbuf, int offset, int len) throws SignatureException { """ Finishes this signature operation and stores the resulting signature bytes in the provided buffer {@code outbuf}, starting at {@code offset}. The format of the signature depends on the underlying...
java
protected int engineSign(byte[] outbuf, int offset, int len) throws SignatureException { byte[] sig = engineSign(); if (len < sig.length) { throw new SignatureException ("partial signatures not returned"); } if (outbuf.length - ...
[ "protected", "int", "engineSign", "(", "byte", "[", "]", "outbuf", ",", "int", "offset", ",", "int", "len", ")", "throws", "SignatureException", "{", "byte", "[", "]", "sig", "=", "engineSign", "(", ")", ";", "if", "(", "len", "<", "sig", ".", "lengt...
Finishes this signature operation and stores the resulting signature bytes in the provided buffer {@code outbuf}, starting at {@code offset}. The format of the signature depends on the underlying signature scheme. <p>The signature implementation is reset to its initial state (the state it was in after a call to one of...
[ "Finishes", "this", "signature", "operation", "and", "stores", "the", "resulting", "signature", "bytes", "in", "the", "provided", "buffer", "{", "@code", "outbuf", "}", "starting", "at", "{", "@code", "offset", "}", ".", "The", "format", "of", "the", "signat...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SignatureSpi.java#L225-L239
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getFromLastExcl
@Nullable public static String getFromLastExcl (@Nullable final String sStr, @Nullable final String sSearch) { """ Get everything from the string from and excluding the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @r...
java
@Nullable public static String getFromLastExcl (@Nullable final String sStr, @Nullable final String sSearch) { return _getFromLast (sStr, sSearch, false); }
[ "@", "Nullable", "public", "static", "String", "getFromLastExcl", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "return", "_getFromLast", "(", "sStr", ",", "sSearch", ",", "false", ")", ";", ...
Get everything from the string from and excluding the passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @return <code>null</code> if the passed string does not contain the search string. If the search string is empty, the input string...
[ "Get", "everything", "from", "the", "string", "from", "and", "excluding", "the", "passed", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L5089-L5093
infinispan/infinispan
extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java
CacheStatisticManager.onPrepareCommand
public final void onPrepareCommand(GlobalTransaction globalTransaction, boolean local) { """ Invoked when a {@link org.infinispan.commands.tx.PrepareCommand} is received for a transaction. @param globalTransaction the global transaction to be prepared. @param local {@code true} if measurement occur...
java
public final void onPrepareCommand(GlobalTransaction globalTransaction, boolean local) { //NB: If I want to give up using the InboundInvocationHandler, I can create the remote transaction //here, just overriding the handlePrepareCommand TransactionStatistics txs = getTransactionStatistic(globalTransac...
[ "public", "final", "void", "onPrepareCommand", "(", "GlobalTransaction", "globalTransaction", ",", "boolean", "local", ")", "{", "//NB: If I want to give up using the InboundInvocationHandler, I can create the remote transaction", "//here, just overriding the handlePrepareCommand", "Tran...
Invoked when a {@link org.infinispan.commands.tx.PrepareCommand} is received for a transaction. @param globalTransaction the global transaction to be prepared. @param local {@code true} if measurement occurred in a local context.
[ "Invoked", "when", "a", "{", "@link", "org", ".", "infinispan", ".", "commands", ".", "tx", ".", "PrepareCommand", "}", "is", "received", "for", "a", "transaction", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java#L103-L113
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/ListUtil.java
ListUtil.listFindNoCase
public static int listFindNoCase(String list, String value, String delimiter, boolean trim) { """ finds a value inside a list, do not ignore case @param list list to search @param value value to find @param delimiter delimiter of the list @param trim trim the list or not @return position in list (0-n) or -1...
java
public static int listFindNoCase(String list, String value, String delimiter, boolean trim) { Array arr = trim ? listToArrayTrim(list, delimiter) : listToArray(list, delimiter); int len = arr.size(); for (int i = 1; i <= len; i++) { if (((String) arr.get(i, "")).equalsIgnoreCase(value)) return i - 1; } return...
[ "public", "static", "int", "listFindNoCase", "(", "String", "list", ",", "String", "value", ",", "String", "delimiter", ",", "boolean", "trim", ")", "{", "Array", "arr", "=", "trim", "?", "listToArrayTrim", "(", "list", ",", "delimiter", ")", ":", "listToA...
finds a value inside a list, do not ignore case @param list list to search @param value value to find @param delimiter delimiter of the list @param trim trim the list or not @return position in list (0-n) or -1
[ "finds", "a", "value", "inside", "a", "list", "do", "not", "ignore", "case" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ListUtil.java#L623-L630
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java
Sftp.init
public void init(String sshHost, int sshPort, String sshUser, String sshPass, Charset charset) { """ 构造 @param sshHost 远程主机 @param sshPort 远程主机端口 @param sshUser 远程主机用户名 @param sshPass 远程主机密码 @param charset 编码 """ this.host = sshHost; this.port = sshPort; this.user = sshUser; this.password = ...
java
public void init(String sshHost, int sshPort, String sshUser, String sshPass, Charset charset) { this.host = sshHost; this.port = sshPort; this.user = sshUser; this.password = sshPass; init(JschUtil.getSession(sshHost, sshPort, sshUser, sshPass), charset); }
[ "public", "void", "init", "(", "String", "sshHost", ",", "int", "sshPort", ",", "String", "sshUser", ",", "String", "sshPass", ",", "Charset", "charset", ")", "{", "this", ".", "host", "=", "sshHost", ";", "this", ".", "port", "=", "sshPort", ";", "thi...
构造 @param sshHost 远程主机 @param sshPort 远程主机端口 @param sshUser 远程主机用户名 @param sshPass 远程主机密码 @param charset 编码
[ "构造" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/Sftp.java#L106-L112
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java
LibraryCacheManager.writeLibraryToStreamInternal
private void writeLibraryToStreamInternal(final String libraryFileName, final DataOutput out) throws IOException { """ Writes data from the library with the given file name to the specified stream. @param libraryFileName the name of the library @param out the stream to write the data to @throws IOException ...
java
private void writeLibraryToStreamInternal(final String libraryFileName, final DataOutput out) throws IOException { if (libraryFileName == null) { throw new IOException("libraryName is null!"); } final Path storePath = new Path(this.libraryCachePath + "/" + libraryFileName); synchronized (this.fs) { if...
[ "private", "void", "writeLibraryToStreamInternal", "(", "final", "String", "libraryFileName", ",", "final", "DataOutput", "out", ")", "throws", "IOException", "{", "if", "(", "libraryFileName", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"library...
Writes data from the library with the given file name to the specified stream. @param libraryFileName the name of the library @param out the stream to write the data to @throws IOException thrown if an error occurs while writing the data
[ "Writes", "data", "from", "the", "library", "with", "the", "given", "file", "name", "to", "the", "specified", "stream", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/execution/librarycache/LibraryCacheManager.java#L514-L543
sriharshachilakapati/WebGL4J
webgl4j/src/main/java/com/shc/webgl4j/client/WebGL10.java
WebGL10.glBufferSubData
public static void glBufferSubData(int target, int offset, int size, float[] data) { """ <p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to {@code target}. Data starting at byte offset {@code offset} and extending for {@code size} bytes is copied to the da...
java
public static void glBufferSubData(int target, int offset, int size, float[] data) { checkContextCompatibility(); Float32Array dataBuffer = Float32ArrayNative.create(data.length); dataBuffer.set(data); nglBufferSubData(target, offset, size, dataBuffer); }
[ "public", "static", "void", "glBufferSubData", "(", "int", "target", ",", "int", "offset", ",", "int", "size", ",", "float", "[", "]", "data", ")", "{", "checkContextCompatibility", "(", ")", ";", "Float32Array", "dataBuffer", "=", "Float32ArrayNative", ".", ...
<p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to {@code target}. Data starting at byte offset {@code offset} and extending for {@code size} bytes is copied to the data store from the memory pointed to by {@code data}. An error is thrown if {@code offset} and {@...
[ "<p", ">", "{", "@code", "glBufferSubData", "}", "redefines", "some", "or", "all", "of", "the", "data", "store", "for", "the", "buffer", "object", "currently", "bound", "to", "{", "@code", "target", "}", ".", "Data", "starting", "at", "byte", "offset", "...
train
https://github.com/sriharshachilakapati/WebGL4J/blob/7daa425300b08b338b50cef2935289849c92d415/webgl4j/src/main/java/com/shc/webgl4j/client/WebGL10.java#L1073-L1079
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java
FhirTerser.getAllPopulatedChildElementsOfType
public <T extends IBase> List<T> getAllPopulatedChildElementsOfType(IBaseResource theResource, final Class<T> theType) { """ Returns a list containing all child elements (including the resource itself) which are <b>non-empty</b> and are either of the exact type specified, or are a subclass of that type. <p> For ...
java
public <T extends IBase> List<T> getAllPopulatedChildElementsOfType(IBaseResource theResource, final Class<T> theType) { final ArrayList<T> retVal = new ArrayList<T>(); BaseRuntimeElementCompositeDefinition<?> def = myContext.getResourceDefinition(theResource); visit(new IdentityHashMap<Object, Object>(), theReso...
[ "public", "<", "T", "extends", "IBase", ">", "List", "<", "T", ">", "getAllPopulatedChildElementsOfType", "(", "IBaseResource", "theResource", ",", "final", "Class", "<", "T", ">", "theType", ")", "{", "final", "ArrayList", "<", "T", ">", "retVal", "=", "n...
Returns a list containing all child elements (including the resource itself) which are <b>non-empty</b> and are either of the exact type specified, or are a subclass of that type. <p> For example, specifying a type of {@link StringDt} would return all non-empty string instances within the message. Specifying a type of ...
[ "Returns", "a", "list", "containing", "all", "child", "elements", "(", "including", "the", "resource", "itself", ")", "which", "are", "<b", ">", "non", "-", "empty<", "/", "b", ">", "and", "are", "either", "of", "the", "exact", "type", "specified", "or",...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java#L164-L181
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/RepositoryFileApi.java
RepositoryFileApi.updateFile
public RepositoryFile updateFile(Object projectIdOrPath, RepositoryFile file, String branchName, String commitMessage) throws GitLabApiException { """ Update existing file in repository <pre><code>GitLab Endpoint: PUT /projects/:id/repository/files</code></pre> file_path (required) - Full path to new file. E...
java
public RepositoryFile updateFile(Object projectIdOrPath, RepositoryFile file, String branchName, String commitMessage) throws GitLabApiException { Form formData = createForm(file, branchName, commitMessage); Response response; if (isApiVersion(ApiVersion.V3)) { response = put(Respon...
[ "public", "RepositoryFile", "updateFile", "(", "Object", "projectIdOrPath", ",", "RepositoryFile", "file", ",", "String", "branchName", ",", "String", "commitMessage", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "createForm", "(", "file", ",",...
Update existing file in repository <pre><code>GitLab Endpoint: PUT /projects/:id/repository/files</code></pre> file_path (required) - Full path to new file. Ex. lib/class.rb branch_name (required) - The name of branch encoding (optional) - 'text' or 'base64'. Text is default. content (required) - File content commit_...
[ "Update", "existing", "file", "in", "repository" ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryFileApi.java#L263-L276
lamydev/Android-Notification
core/src/zemin/notification/NotificationBoard.java
NotificationBoard.setRowMargin
public void setRowMargin(int l, int t, int r, int b) { """ Set the margin of each row. @param l @param t @param r @param b """ mRowMargin[0] = l; mRowMargin[1] = t; mRowMargin[2] = r; mRowMargin[3] = b; }
java
public void setRowMargin(int l, int t, int r, int b) { mRowMargin[0] = l; mRowMargin[1] = t; mRowMargin[2] = r; mRowMargin[3] = b; }
[ "public", "void", "setRowMargin", "(", "int", "l", ",", "int", "t", ",", "int", "r", ",", "int", "b", ")", "{", "mRowMargin", "[", "0", "]", "=", "l", ";", "mRowMargin", "[", "1", "]", "=", "t", ";", "mRowMargin", "[", "2", "]", "=", "r", ";"...
Set the margin of each row. @param l @param t @param r @param b
[ "Set", "the", "margin", "of", "each", "row", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L592-L594
square/dagger
core/src/main/java/dagger/internal/Linker.java
Linker.requestBinding
public Binding<?> requestBinding(String key, Object requiredBy, ClassLoader classLoader, boolean mustHaveInjections, boolean library) { """ Returns the binding if it exists immediately. Otherwise this returns null. If the returned binding didn't exist or was unlinked, it will be enqueued to be linked. @...
java
public Binding<?> requestBinding(String key, Object requiredBy, ClassLoader classLoader, boolean mustHaveInjections, boolean library) { assertLockHeld(); Binding<?> binding = null; for (Linker linker = this; linker != null; linker = linker.base) { binding = linker.bindings.get(key); if (b...
[ "public", "Binding", "<", "?", ">", "requestBinding", "(", "String", "key", ",", "Object", "requiredBy", ",", "ClassLoader", "classLoader", ",", "boolean", "mustHaveInjections", ",", "boolean", "library", ")", "{", "assertLockHeld", "(", ")", ";", "Binding", "...
Returns the binding if it exists immediately. Otherwise this returns null. If the returned binding didn't exist or was unlinked, it will be enqueued to be linked. @param mustHaveInjections true if the the referenced key requires either an {@code @Inject} annotation is produced by a {@code @Provides} method. This isn't...
[ "Returns", "the", "binding", "if", "it", "exists", "immediately", ".", "Otherwise", "this", "returns", "null", ".", "If", "the", "returned", "binding", "didn", "t", "exist", "or", "was", "unlinked", "it", "will", "be", "enqueued", "to", "be", "linked", "."...
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/core/src/main/java/dagger/internal/Linker.java#L272-L303
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/compound/AminoAcidCompoundSet.java
AminoAcidCompoundSet.addAmbiguousEquivalents
private void addAmbiguousEquivalents(String one, String two, String either) { """ helper method to initialize the equivalent sets for 2 amino acid compounds and their ambiguity compound """ Set<AminoAcidCompound> equivalents; AminoAcidCompound cOne, cTwo, cEither; equivalents = new HashSet<AminoAcidComp...
java
private void addAmbiguousEquivalents(String one, String two, String either) { Set<AminoAcidCompound> equivalents; AminoAcidCompound cOne, cTwo, cEither; equivalents = new HashSet<AminoAcidCompound>(); equivalents.add(cOne = aminoAcidCompoundCache.get(one)); equivalents.add(cTwo = aminoAcidCompoundCache.get(t...
[ "private", "void", "addAmbiguousEquivalents", "(", "String", "one", ",", "String", "two", ",", "String", "either", ")", "{", "Set", "<", "AminoAcidCompound", ">", "equivalents", ";", "AminoAcidCompound", "cOne", ",", "cTwo", ",", "cEither", ";", "equivalents", ...
helper method to initialize the equivalent sets for 2 amino acid compounds and their ambiguity compound
[ "helper", "method", "to", "initialize", "the", "equivalent", "sets", "for", "2", "amino", "acid", "compounds", "and", "their", "ambiguity", "compound" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/compound/AminoAcidCompoundSet.java#L171-L190
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java
WorkspaceUtils.assertValidArray
public static void assertValidArray(INDArray array, String msg) { """ Assert that the specified array is valid, in terms of workspaces: i.e., if it is attached (and not in a circular workspace), assert that the workspace is open, and that the data is not from an old generation. @param array Array to check @para...
java
public static void assertValidArray(INDArray array, String msg){ if(array == null || !array.isAttached()){ return; } val ws = array.data().getParentWorkspace(); if (ws.getWorkspaceType() != MemoryWorkspace.Type.CIRCULAR) { if (!ws.isScopeActive()) { ...
[ "public", "static", "void", "assertValidArray", "(", "INDArray", "array", ",", "String", "msg", ")", "{", "if", "(", "array", "==", "null", "||", "!", "array", ".", "isAttached", "(", ")", ")", "{", "return", ";", "}", "val", "ws", "=", "array", ".",...
Assert that the specified array is valid, in terms of workspaces: i.e., if it is attached (and not in a circular workspace), assert that the workspace is open, and that the data is not from an old generation. @param array Array to check @param msg Message (prefix) to include in the exception, if required. May be null
[ "Assert", "that", "the", "specified", "array", "is", "valid", "in", "terms", "of", "workspaces", ":", "i", ".", "e", ".", "if", "it", "is", "attached", "(", "and", "not", "in", "a", "circular", "workspace", ")", "assert", "that", "the", "workspace", "i...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/workspace/WorkspaceUtils.java#L109-L129
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java
RocksDBKeyedStateBackend.migrateStateValues
private <N, S extends State, SV> void migrateStateValues( StateDescriptor<S, SV> stateDesc, Tuple2<ColumnFamilyHandle, RegisteredKeyValueStateBackendMetaInfo<N, SV>> stateMetaInfo) throws Exception { """ Migrate only the state value, that is the "value" that is stored in RocksDB. We don't migrate the key here...
java
private <N, S extends State, SV> void migrateStateValues( StateDescriptor<S, SV> stateDesc, Tuple2<ColumnFamilyHandle, RegisteredKeyValueStateBackendMetaInfo<N, SV>> stateMetaInfo) throws Exception { if (stateDesc.getType() == StateDescriptor.Type.MAP) { throw new StateMigrationException("The new serializer f...
[ "private", "<", "N", ",", "S", "extends", "State", ",", "SV", ">", "void", "migrateStateValues", "(", "StateDescriptor", "<", "S", ",", "SV", ">", "stateDesc", ",", "Tuple2", "<", "ColumnFamilyHandle", ",", "RegisteredKeyValueStateBackendMetaInfo", "<", "N", "...
Migrate only the state value, that is the "value" that is stored in RocksDB. We don't migrate the key here, which is made up of key group, key, namespace and map key (in case of MapState).
[ "Migrate", "only", "the", "state", "value", "that", "is", "the", "value", "that", "is", "stored", "in", "RocksDB", ".", "We", "don", "t", "migrate", "the", "key", "here", "which", "is", "made", "up", "of", "key", "group", "key", "namespace", "and", "ma...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java#L541-L602
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/highavailability/YarnHighAvailabilityServices.java
YarnHighAvailabilityServices.forSingleJobAppMaster
public static YarnHighAvailabilityServices forSingleJobAppMaster( Configuration flinkConfig, org.apache.hadoop.conf.Configuration hadoopConfig) throws IOException { """ Creates the high-availability services for a single-job Flink YARN application, to be used in the Application Master that runs both Resourc...
java
public static YarnHighAvailabilityServices forSingleJobAppMaster( Configuration flinkConfig, org.apache.hadoop.conf.Configuration hadoopConfig) throws IOException { checkNotNull(flinkConfig, "flinkConfig"); checkNotNull(hadoopConfig, "hadoopConfig"); final HighAvailabilityMode mode = HighAvailabilityMode....
[ "public", "static", "YarnHighAvailabilityServices", "forSingleJobAppMaster", "(", "Configuration", "flinkConfig", ",", "org", ".", "apache", ".", "hadoop", ".", "conf", ".", "Configuration", "hadoopConfig", ")", "throws", "IOException", "{", "checkNotNull", "(", "flin...
Creates the high-availability services for a single-job Flink YARN application, to be used in the Application Master that runs both ResourceManager and JobManager. @param flinkConfig The Flink configuration. @param hadoopConfig The Hadoop configuration for the YARN cluster. @return The created high-availability serv...
[ "Creates", "the", "high", "-", "availability", "services", "for", "a", "single", "-", "job", "Flink", "YARN", "application", "to", "be", "used", "in", "the", "Application", "Master", "that", "runs", "both", "ResourceManager", "and", "JobManager", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/highavailability/YarnHighAvailabilityServices.java#L318-L336
kochedykov/jlibmodbus
src/com/intelligt/modbus/jlibmodbus/master/ModbusMaster.java
ModbusMaster.maskWriteRegister
final public void maskWriteRegister(int serverAddress, int startAddress, int and, int or) throws ModbusProtocolException, ModbusNumberException, ModbusIOException { """ This function code is used to modify the contents of a specified holding register using a combination of an AND mask, an OR mask, and...
java
final public void maskWriteRegister(int serverAddress, int startAddress, int and, int or) throws ModbusProtocolException, ModbusNumberException, ModbusIOException { processRequest(ModbusRequestBuilder.getInstance().buildMaskWriteRegister(serverAddress, startAddress, and, or)); }
[ "final", "public", "void", "maskWriteRegister", "(", "int", "serverAddress", ",", "int", "startAddress", ",", "int", "and", ",", "int", "or", ")", "throws", "ModbusProtocolException", ",", "ModbusNumberException", ",", "ModbusIOException", "{", "processRequest", "("...
This function code is used to modify the contents of a specified holding register using a combination of an AND mask, an OR mask, and the register's current contents. The function can be used to set or clear individual bits in the register. The request specifies the holding register to be written, the data to be used a...
[ "This", "function", "code", "is", "used", "to", "modify", "the", "contents", "of", "a", "specified", "holding", "register", "using", "a", "combination", "of", "an", "AND", "mask", "an", "OR", "mask", "and", "the", "register", "s", "current", "contents", "....
train
https://github.com/kochedykov/jlibmodbus/blob/197cb39e2649e61a6fe3cb7dc91a701d847e14be/src/com/intelligt/modbus/jlibmodbus/master/ModbusMaster.java#L462-L465
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.encodeParamsWithUri
public static String encodeParamsWithUri(String uri, HttpServletRequest req) { """ Encodes the given URI, with all parameters from the given request appended.<p> The result will be encoded using the <code>{@link CmsEncoder#encode(String)}</code> function.<p> @param req the request where to read the parameter...
java
public static String encodeParamsWithUri(String uri, HttpServletRequest req) { String result; String params = encodeParams(req); if (CmsStringUtil.isNotEmpty(params)) { result = CmsEncoder.encode(uri + "?") + params; } else { result = CmsEncoder.encode(uri); ...
[ "public", "static", "String", "encodeParamsWithUri", "(", "String", "uri", ",", "HttpServletRequest", "req", ")", "{", "String", "result", ";", "String", "params", "=", "encodeParams", "(", "req", ")", ";", "if", "(", "CmsStringUtil", ".", "isNotEmpty", "(", ...
Encodes the given URI, with all parameters from the given request appended.<p> The result will be encoded using the <code>{@link CmsEncoder#encode(String)}</code> function.<p> @param req the request where to read the parameters from @param uri the URI to encode @return the encoded URI, with all parameters from the gi...
[ "Encodes", "the", "given", "URI", "with", "all", "parameters", "from", "the", "given", "request", "appended", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L424-L434
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java
GuiStandardUtils.createStandardTextAreaHardNewLines
public static JTextArea createStandardTextAreaHardNewLines(String text) { """ An alternative to multi-line labels, for the presentation of several lines of text, and for which line breaks are determined solely by <code>aText</code>, and not by the control. @param text the text to be placed in the text area. ...
java
public static JTextArea createStandardTextAreaHardNewLines(String text) { JTextArea result = new JTextArea(text); result.setEditable(false); result.setMargin(new Insets(0, UIConstants.ONE_SPACE, 0, UIConstants.ONE_SPACE)); return result; }
[ "public", "static", "JTextArea", "createStandardTextAreaHardNewLines", "(", "String", "text", ")", "{", "JTextArea", "result", "=", "new", "JTextArea", "(", "text", ")", ";", "result", ".", "setEditable", "(", "false", ")", ";", "result", ".", "setMargin", "("...
An alternative to multi-line labels, for the presentation of several lines of text, and for which line breaks are determined solely by <code>aText</code>, and not by the control. @param text the text to be placed in the text area. @return <code>JTextArea</code> which is not editable and has improved spacing over the s...
[ "An", "alternative", "to", "multi", "-", "line", "labels", "for", "the", "presentation", "of", "several", "lines", "of", "text", "and", "for", "which", "line", "breaks", "are", "determined", "solely", "by", "<code", ">", "aText<", "/", "code", ">", "and", ...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L226-L231
knowm/XChange
xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseAccountServiceRaw.java
CoinbaseAccountServiceRaw.generateCoinbaseReceiveAddress
public CoinbaseAddress generateCoinbaseReceiveAddress(String callbackUrl, final String label) throws IOException { """ Authenticated resource that generates a new Bitcoin receive address for the user. @param callbackUrl Optional Callback URL to receive instant payment notifications whenever funds arrive ...
java
public CoinbaseAddress generateCoinbaseReceiveAddress(String callbackUrl, final String label) throws IOException { final CoinbaseAddressCallback callbackUrlParam = new CoinbaseAddressCallback(callbackUrl, label); final CoinbaseAddress generateReceiveAddress = coinbase.generateReceiveAddre...
[ "public", "CoinbaseAddress", "generateCoinbaseReceiveAddress", "(", "String", "callbackUrl", ",", "final", "String", "label", ")", "throws", "IOException", "{", "final", "CoinbaseAddressCallback", "callbackUrlParam", "=", "new", "CoinbaseAddressCallback", "(", "callbackUrl"...
Authenticated resource that generates a new Bitcoin receive address for the user. @param callbackUrl Optional Callback URL to receive instant payment notifications whenever funds arrive to this address. @param label Optional text label for the address which can be used to filter against when calling {@link #getCoinbas...
[ "Authenticated", "resource", "that", "generates", "a", "new", "Bitcoin", "receive", "address", "for", "the", "user", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseAccountServiceRaw.java#L209-L222
DDTH/ddth-kafka
src/main/java/com/github/ddth/kafka/KafkaClient.java
KafkaClient.sendMessage
public KafkaMessage sendMessage(ProducerType type, KafkaMessage message) { """ Sends a message, specifying {@link ProducerType}. @param type @param message @return a copy of message filled with partition number and offset """ String key = message.key(); ProducerRecord<String, byte[]> recor...
java
public KafkaMessage sendMessage(ProducerType type, KafkaMessage message) { String key = message.key(); ProducerRecord<String, byte[]> record = StringUtils.isEmpty(key) ? new ProducerRecord<>(message.topic(), message.content()) : new ProducerRecord<>(message.topic(), key, ...
[ "public", "KafkaMessage", "sendMessage", "(", "ProducerType", "type", ",", "KafkaMessage", "message", ")", "{", "String", "key", "=", "message", ".", "key", "(", ")", ";", "ProducerRecord", "<", "String", ",", "byte", "[", "]", ">", "record", "=", "StringU...
Sends a message, specifying {@link ProducerType}. @param type @param message @return a copy of message filled with partition number and offset
[ "Sends", "a", "message", "specifying", "{", "@link", "ProducerType", "}", "." ]
train
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/KafkaClient.java#L677-L692
codeprimate-software/cp-elements
src/main/java/org/cp/elements/process/support/RuntimeProcessExecutor.java
RuntimeProcessExecutor.doExecute
protected Process doExecute(String[] commandLine, File directory, Environment environment) throws IOException { """ Executes the {@code commandLine} with the Java {@link Runtime} class in the given {@link File directory} with the provided {@link Environment} configuration. @param commandLine array of {@link St...
java
protected Process doExecute(String[] commandLine, File directory, Environment environment) throws IOException { return Runtime.getRuntime().exec(commandLine, environment.toAssociativeArray(), directory); }
[ "protected", "Process", "doExecute", "(", "String", "[", "]", "commandLine", ",", "File", "directory", ",", "Environment", "environment", ")", "throws", "IOException", "{", "return", "Runtime", ".", "getRuntime", "(", ")", ".", "exec", "(", "commandLine", ",",...
Executes the {@code commandLine} with the Java {@link Runtime} class in the given {@link File directory} with the provided {@link Environment} configuration. @param commandLine array of {@link String} values constituting the program and its runtime arguments. @param directory {@link File directory} in which the progra...
[ "Executes", "the", "{", "@code", "commandLine", "}", "with", "the", "Java", "{", "@link", "Runtime", "}", "class", "in", "the", "given", "{", "@link", "File", "directory", "}", "with", "the", "provided", "{", "@link", "Environment", "}", "configuration", "...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/process/support/RuntimeProcessExecutor.java#L123-L125
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/support/JAXBUtils.java
JAXBUtils.convertDateToXMLGregorianCalendar
public static XMLGregorianCalendar convertDateToXMLGregorianCalendar(final Date date) { """ Convert {@link Date} to {@link XMLGregorianCalendar}. @param date XML entity """ try { GregorianCalendar cal = new GregorianCalendar(); cal.setTime(date); XMLGregorianCale...
java
public static XMLGregorianCalendar convertDateToXMLGregorianCalendar(final Date date) { try { GregorianCalendar cal = new GregorianCalendar(); cal.setTime(date); XMLGregorianCalendar calXml = DatatypeFactory.newInstance().newXMLGregorianCalendar( cal.get(C...
[ "public", "static", "XMLGregorianCalendar", "convertDateToXMLGregorianCalendar", "(", "final", "Date", "date", ")", "{", "try", "{", "GregorianCalendar", "cal", "=", "new", "GregorianCalendar", "(", ")", ";", "cal", ".", "setTime", "(", "date", ")", ";", "XMLGre...
Convert {@link Date} to {@link XMLGregorianCalendar}. @param date XML entity
[ "Convert", "{", "@link", "Date", "}", "to", "{", "@link", "XMLGregorianCalendar", "}", "." ]
train
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/support/JAXBUtils.java#L128-L145
apache/incubator-druid
extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/cache/CacheScheduler.java
CacheScheduler.createVersionedCache
public VersionedCache createVersionedCache(@Nullable EntryImpl<? extends ExtractionNamespace> entryId, String version) { """ This method should be used from {@link CacheGenerator#generateCache} implementations, to obtain a {@link VersionedCache} to be returned. @param entryId an object uniquely corresponding t...
java
public VersionedCache createVersionedCache(@Nullable EntryImpl<? extends ExtractionNamespace> entryId, String version) { updatesStarted.incrementAndGet(); return new VersionedCache(String.valueOf(entryId), version); }
[ "public", "VersionedCache", "createVersionedCache", "(", "@", "Nullable", "EntryImpl", "<", "?", "extends", "ExtractionNamespace", ">", "entryId", ",", "String", "version", ")", "{", "updatesStarted", ".", "incrementAndGet", "(", ")", ";", "return", "new", "Versio...
This method should be used from {@link CacheGenerator#generateCache} implementations, to obtain a {@link VersionedCache} to be returned. @param entryId an object uniquely corresponding to the {@link CacheScheduler.Entry}, for which VersionedCache is created @param version version, associated with the cache
[ "This", "method", "should", "be", "used", "from", "{", "@link", "CacheGenerator#generateCache", "}", "implementations", "to", "obtain", "a", "{", "@link", "VersionedCache", "}", "to", "be", "returned", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/cache/CacheScheduler.java#L469-L473
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/SuperToast.java
SuperToast.setGravity
public SuperToast setGravity(@Style.GravityStyle int gravity, int xOffset, int yOffset) { """ Sets the layout gravity, x, and y offsets for the SuperToast. @param gravity The desired Gravity @param xOffset The desired x (horizontal) offset @param yOffset The desired y (vertical) offset @return The current Su...
java
public SuperToast setGravity(@Style.GravityStyle int gravity, int xOffset, int yOffset) { this.mStyle.gravity = gravity; this.mStyle.xOffset = xOffset; this.mStyle.yOffset = yOffset; return this; }
[ "public", "SuperToast", "setGravity", "(", "@", "Style", ".", "GravityStyle", "int", "gravity", ",", "int", "xOffset", ",", "int", "yOffset", ")", "{", "this", ".", "mStyle", ".", "gravity", "=", "gravity", ";", "this", ".", "mStyle", ".", "xOffset", "="...
Sets the layout gravity, x, and y offsets for the SuperToast. @param gravity The desired Gravity @param xOffset The desired x (horizontal) offset @param yOffset The desired y (vertical) offset @return The current SuperToast instance @see #setGravity(int)
[ "Sets", "the", "layout", "gravity", "x", "and", "y", "offsets", "for", "the", "SuperToast", "." ]
train
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/SuperToast.java#L544-L549
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java
CommerceOrderNotePersistenceImpl.removeByC_R
@Override public void removeByC_R(long commerceOrderId, boolean restricted) { """ Removes all the commerce order notes where commerceOrderId = &#63; and restricted = &#63; from the database. @param commerceOrderId the commerce order ID @param restricted the restricted """ for (CommerceOrderNote commerce...
java
@Override public void removeByC_R(long commerceOrderId, boolean restricted) { for (CommerceOrderNote commerceOrderNote : findByC_R(commerceOrderId, restricted, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceOrderNote); } }
[ "@", "Override", "public", "void", "removeByC_R", "(", "long", "commerceOrderId", ",", "boolean", "restricted", ")", "{", "for", "(", "CommerceOrderNote", "commerceOrderNote", ":", "findByC_R", "(", "commerceOrderId", ",", "restricted", ",", "QueryUtil", ".", "ALL...
Removes all the commerce order notes where commerceOrderId = &#63; and restricted = &#63; from the database. @param commerceOrderId the commerce order ID @param restricted the restricted
[ "Removes", "all", "the", "commerce", "order", "notes", "where", "commerceOrderId", "=", "&#63", ";", "and", "restricted", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java#L1102-L1108
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.put
@Override public void put(String name, Scriptable start, Object value) { """ Sets the value of the named property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. T...
java
@Override public void put(String name, Scriptable start, Object value) { if (putImpl(name, 0, start, value)) return; if (start == this) throw Kit.codeBug(); start.put(name, start, value); }
[ "@", "Override", "public", "void", "put", "(", "String", "name", ",", "Scriptable", "start", ",", "Object", "value", ")", "{", "if", "(", "putImpl", "(", "name", ",", "0", ",", "start", ",", "value", ")", ")", "return", ";", "if", "(", "start", "==...
Sets the value of the named property, creating it if need be. If the property was created using defineProperty, the appropriate setter method is called. <p> If the property's attributes include READONLY, no action is taken. This method will actually set the property in the start object. @param name the name of the p...
[ "Sets", "the", "value", "of", "the", "named", "property", "creating", "it", "if", "need", "be", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L518-L526
aws/aws-sdk-java
aws-java-sdk-alexaforbusiness/src/main/java/com/amazonaws/services/alexaforbusiness/model/SkillDetails.java
SkillDetails.withReviews
public SkillDetails withReviews(java.util.Map<String, String> reviews) { """ <p> The list of reviews for the skill, including Key and Value pair. </p> @param reviews The list of reviews for the skill, including Key and Value pair. @return Returns a reference to this object so that method calls can be chaine...
java
public SkillDetails withReviews(java.util.Map<String, String> reviews) { setReviews(reviews); return this; }
[ "public", "SkillDetails", "withReviews", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "reviews", ")", "{", "setReviews", "(", "reviews", ")", ";", "return", "this", ";", "}" ]
<p> The list of reviews for the skill, including Key and Value pair. </p> @param reviews The list of reviews for the skill, including Key and Value pair. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "list", "of", "reviews", "for", "the", "skill", "including", "Key", "and", "Value", "pair", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-alexaforbusiness/src/main/java/com/amazonaws/services/alexaforbusiness/model/SkillDetails.java#L567-L570
vatbub/common
core/src/main/java/com/github/vatbub/common/core/Config.java
Config.readRemoteConfig
private void readRemoteConfig(URL remoteConfig, URL fallbackConfig, boolean cacheRemoteConfig, String cacheFileName) throws IOException { """ Reads the config from the remote url synchronously. If this fails for any reason and a cached config is available, the cached config is us...
java
private void readRemoteConfig(URL remoteConfig, URL fallbackConfig, boolean cacheRemoteConfig, String cacheFileName) throws IOException { // Check if offline cache exists checkForOfflineCacheOrLoadFallback(fallbackConfig, cacheFileName); if (!isOfflineMode()) ...
[ "private", "void", "readRemoteConfig", "(", "URL", "remoteConfig", ",", "URL", "fallbackConfig", ",", "boolean", "cacheRemoteConfig", ",", "String", "cacheFileName", ")", "throws", "IOException", "{", "// Check if offline cache exists", "checkForOfflineCacheOrLoadFallback", ...
Reads the config from the remote url synchronously. If this fails for any reason and a cached config is available, the cached config is used instead. If the remote config can't be read and no cached version is available, the fallbackConfig is used. @param remoteConfig The {@code URL} of the remote config to be re...
[ "Reads", "the", "config", "from", "the", "remote", "url", "synchronously", ".", "If", "this", "fails", "for", "any", "reason", "and", "a", "cached", "config", "is", "available", "the", "cached", "config", "is", "used", "instead", ".", "If", "the", "remote"...
train
https://github.com/vatbub/common/blob/8b9fd2ece0a23d520ce53b66c84cbd094e378443/core/src/main/java/com/github/vatbub/common/core/Config.java#L186-L192
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java
ReflectionUtils.getRequiredMethod
public static Method getRequiredMethod(Class type, String name, Class... argumentTypes) { """ Finds a method on the given type for the given name. @param type The type @param name The name @param argumentTypes The argument types @return An {@link Optional} contains the method or empty "...
java
public static Method getRequiredMethod(Class type, String name, Class... argumentTypes) { try { return type.getDeclaredMethod(name, argumentTypes); } catch (NoSuchMethodException e) { return findMethod(type, name, argumentTypes) .orElseThrow(() -> newNoSuchMethodE...
[ "public", "static", "Method", "getRequiredMethod", "(", "Class", "type", ",", "String", "name", ",", "Class", "...", "argumentTypes", ")", "{", "try", "{", "return", "type", ".", "getDeclaredMethod", "(", "name", ",", "argumentTypes", ")", ";", "}", "catch",...
Finds a method on the given type for the given name. @param type The type @param name The name @param argumentTypes The argument types @return An {@link Optional} contains the method or empty
[ "Finds", "a", "method", "on", "the", "given", "type", "for", "the", "given", "name", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L236-L243
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/JimfsFileStore.java
JimfsFileStore.getFileAttributeView
@Nullable <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { """ Returns an attribute view of the given type for the given file lookup callback, or {@code null} if the view type is not supported. """ state.checkOpen(); return attributes.getFileAttributeView(look...
java
@Nullable <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { state.checkOpen(); return attributes.getFileAttributeView(lookup, type); }
[ "@", "Nullable", "<", "V", "extends", "FileAttributeView", ">", "V", "getFileAttributeView", "(", "FileLookup", "lookup", ",", "Class", "<", "V", ">", "type", ")", "{", "state", ".", "checkOpen", "(", ")", ";", "return", "attributes", ".", "getFileAttributeV...
Returns an attribute view of the given type for the given file lookup callback, or {@code null} if the view type is not supported.
[ "Returns", "an", "attribute", "view", "of", "the", "given", "type", "for", "the", "given", "file", "lookup", "callback", "or", "{" ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/JimfsFileStore.java#L173-L177
nemerosa/ontrack
ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BranchController.java
BranchController.createTemplateInstance
@RequestMapping(value = "branches/ { """ Creates a branch template instance for one name. <p> <ul> <li>If the target branch does not exist, creates it.</li> <li>If the target branch exists: <ul> <li>If it is linked to the same definition, updates it.</li> <li>If it is linked to another definition, this is a...
java
@RequestMapping(value = "branches/{branchId}/template", method = RequestMethod.PUT) public Branch createTemplateInstance(@PathVariable ID branchId, @RequestBody @Valid BranchTemplateInstanceSingleRequest request) { return branchTemplateService.createTemplateInstance(branchId, request); }
[ "@", "RequestMapping", "(", "value", "=", "\"branches/{branchId}/template\"", ",", "method", "=", "RequestMethod", ".", "PUT", ")", "public", "Branch", "createTemplateInstance", "(", "@", "PathVariable", "ID", "branchId", ",", "@", "RequestBody", "@", "Valid", "Br...
Creates a branch template instance for one name. <p> <ul> <li>If the target branch does not exist, creates it.</li> <li>If the target branch exists: <ul> <li>If it is linked to the same definition, updates it.</li> <li>If it is linked to another definition, this is an error.</li> <li>If it is a normal branch, this is a...
[ "Creates", "a", "branch", "template", "instance", "for", "one", "name", ".", "<p", ">", "<ul", ">", "<li", ">", "If", "the", "target", "branch", "does", "not", "exist", "creates", "it", ".", "<", "/", "li", ">", "<li", ">", "If", "the", "target", "...
train
https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-ui/src/main/java/net/nemerosa/ontrack/boot/ui/BranchController.java#L407-L410
getsentry/sentry-java
sentry/src/main/java/io/sentry/event/UserBuilder.java
UserBuilder.withData
public UserBuilder withData(String name, Object value) { """ Adds to the extra data for the user. @param name Name of the data @param value Value of the data @return current instance of UserBuilder """ if (this.data == null) { this.data = new HashMap<>(); } this.data.p...
java
public UserBuilder withData(String name, Object value) { if (this.data == null) { this.data = new HashMap<>(); } this.data.put(name, value); return this; }
[ "public", "UserBuilder", "withData", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "this", ".", "data", "==", "null", ")", "{", "this", ".", "data", "=", "new", "HashMap", "<>", "(", ")", ";", "}", "this", ".", "data", ".", ...
Adds to the extra data for the user. @param name Name of the data @param value Value of the data @return current instance of UserBuilder
[ "Adds", "to", "the", "extra", "data", "for", "the", "user", "." ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/event/UserBuilder.java#L78-L85
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZooKeeperTreeTracker.java
ZooKeeperTreeTracker.waitForZkTxId
public long waitForZkTxId(long zkTxId, Object timeout) throws TimeoutException, InterruptedException { """ Waits no longer than the timeout provided (or forever if <code>null</code>) for this tracker to have seen at least the provided zookeeper transaction id @return the last known zkTxId (guaranteed to be &...
java
public long waitForZkTxId(long zkTxId, Object timeout) throws TimeoutException, InterruptedException { long endTime = ClockUtils.toEndTime(clock, timeout); synchronized(_lock) { while(_lastZkTxId < zkTxId) { ConcurrentUtils.awaitUntil(clock, _lock, endTime); } return ...
[ "public", "long", "waitForZkTxId", "(", "long", "zkTxId", ",", "Object", "timeout", ")", "throws", "TimeoutException", ",", "InterruptedException", "{", "long", "endTime", "=", "ClockUtils", ".", "toEndTime", "(", "clock", ",", "timeout", ")", ";", "synchronized...
Waits no longer than the timeout provided (or forever if <code>null</code>) for this tracker to have seen at least the provided zookeeper transaction id @return the last known zkTxId (guaranteed to be &gt;= to zkTxId)
[ "Waits", "no", "longer", "than", "the", "timeout", "provided", "(", "or", "forever", "if", "<code", ">", "null<", "/", "code", ">", ")", "for", "this", "tracker", "to", "have", "seen", "at", "least", "the", "provided", "zookeeper", "transaction", "id" ]
train
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZooKeeperTreeTracker.java#L184-L198
belaban/JGroups
src/org/jgroups/util/Bits.java
Bits.writeAsciiString
public static void writeAsciiString(AsciiString s, DataOutput out) throws IOException { """ Writes an AsciiString to buf. The length of the string is written first, followed by the chars (as single-byte values). @param s the string @param out the output stream """ short length=(short)(s != null? s.le...
java
public static void writeAsciiString(AsciiString s, DataOutput out) throws IOException { short length=(short)(s != null? s.length() : -1); out.writeShort(length); if(s != null) out.write(s.chars()); }
[ "public", "static", "void", "writeAsciiString", "(", "AsciiString", "s", ",", "DataOutput", "out", ")", "throws", "IOException", "{", "short", "length", "=", "(", "short", ")", "(", "s", "!=", "null", "?", "s", ".", "length", "(", ")", ":", "-", "1", ...
Writes an AsciiString to buf. The length of the string is written first, followed by the chars (as single-byte values). @param s the string @param out the output stream
[ "Writes", "an", "AsciiString", "to", "buf", ".", "The", "length", "of", "the", "string", "is", "written", "first", "followed", "by", "the", "chars", "(", "as", "single", "-", "byte", "values", ")", "." ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/Bits.java#L707-L712
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateStorageAccount
public StorageBundle updateStorageAccount(String vaultBaseUrl, String storageAccountName) { """ Updates the specified attributes associated with the given storage account. This operation requires the storage/set/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. ...
java
public StorageBundle updateStorageAccount(String vaultBaseUrl, String storageAccountName) { return updateStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).toBlocking().single().body(); }
[ "public", "StorageBundle", "updateStorageAccount", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ")", "{", "return", "updateStorageAccountWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "storageAccountName", ")", ".", "toBlocking", "(", ")", "."...
Updates the specified attributes associated with the given storage account. This operation requires the storage/set/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @throws IllegalArgumentException thrown if p...
[ "Updates", "the", "specified", "attributes", "associated", "with", "the", "given", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "set", "/", "update", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L10093-L10095
Erudika/para
para-core/src/main/java/com/erudika/para/core/App.java
App.setValidationConstraints
public void setValidationConstraints(Map<String, Map<String, Map<String, Map<String, ?>>>> validationConstraints) { """ Sets the validation constraints map. @param validationConstraints the constraints map """ this.validationConstraints = validationConstraints; }
java
public void setValidationConstraints(Map<String, Map<String, Map<String, Map<String, ?>>>> validationConstraints) { this.validationConstraints = validationConstraints; }
[ "public", "void", "setValidationConstraints", "(", "Map", "<", "String", ",", "Map", "<", "String", ",", "Map", "<", "String", ",", "Map", "<", "String", ",", "?", ">", ">", ">", ">", "validationConstraints", ")", "{", "this", ".", "validationConstraints",...
Sets the validation constraints map. @param validationConstraints the constraints map
[ "Sets", "the", "validation", "constraints", "map", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/core/App.java#L278-L280
apache/incubator-druid
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
ApproximateHistogram.shiftRight
protected void shiftRight(int start, int end) { """ Shifts the given range the histogram bins one slot to the right @param start index of the first bin to shift @param end index of the rightmost bin to shift into """ float prevVal = positions[start]; long prevCnt = bins[start]; for (int i = ...
java
protected void shiftRight(int start, int end) { float prevVal = positions[start]; long prevCnt = bins[start]; for (int i = start + 1; i <= end; ++i) { float tmpVal = positions[i]; long tmpCnt = bins[i]; positions[i] = prevVal; bins[i] = prevCnt; prevVal = tmpVal; pre...
[ "protected", "void", "shiftRight", "(", "int", "start", ",", "int", "end", ")", "{", "float", "prevVal", "=", "positions", "[", "start", "]", ";", "long", "prevCnt", "=", "bins", "[", "start", "]", ";", "for", "(", "int", "i", "=", "start", "+", "1...
Shifts the given range the histogram bins one slot to the right @param start index of the first bin to shift @param end index of the rightmost bin to shift into
[ "Shifts", "the", "given", "range", "the", "histogram", "bins", "one", "slot", "to", "the", "right" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java#L442-L457
real-logic/agrona
agrona/src/main/java/org/agrona/Strings.java
Strings.parseIntOrDefault
public static int parseIntOrDefault(final String value, final int defaultValue) { """ Parse an int from a String. If the String is null then return the defaultValue. @param value to be parsed @param defaultValue to be used if the String value is null. @return the int value of the string or the default ...
java
public static int parseIntOrDefault(final String value, final int defaultValue) { if (null == value) { return defaultValue; } return Integer.parseInt(value); }
[ "public", "static", "int", "parseIntOrDefault", "(", "final", "String", "value", ",", "final", "int", "defaultValue", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "defaultValue", ";", "}", "return", "Integer", ".", "parseInt", "(", "valu...
Parse an int from a String. If the String is null then return the defaultValue. @param value to be parsed @param defaultValue to be used if the String value is null. @return the int value of the string or the default on null.
[ "Parse", "an", "int", "from", "a", "String", ".", "If", "the", "String", "is", "null", "then", "return", "the", "defaultValue", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/Strings.java#L41-L49
jamesagnew/hapi-fhir
hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/Template.java
Template.parse
public static Template parse(String input) { """ Returns a new Template instance from a given input string. @param input the input string holding the Liquid source. @return a new Template instance from a given input string. """ return new Template(input, Tag.getTags(), Filter.getFilters()); ...
java
public static Template parse(String input) { return new Template(input, Tag.getTags(), Filter.getFilters()); }
[ "public", "static", "Template", "parse", "(", "String", "input", ")", "{", "return", "new", "Template", "(", "input", ",", "Tag", ".", "getTags", "(", ")", ",", "Filter", ".", "getFilters", "(", ")", ")", ";", "}" ]
Returns a new Template instance from a given input string. @param input the input string holding the Liquid source. @return a new Template instance from a given input string.
[ "Returns", "a", "new", "Template", "instance", "from", "a", "given", "input", "string", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/Template.java#L123-L125
JodaOrg/joda-time
src/main/java/org/joda/time/field/FieldUtils.java
FieldUtils.safeMultiplyToInt
public static int safeMultiplyToInt(long val1, long val2) { """ Multiply two values to return an int throwing an exception if overflow occurs. @param val1 the first value @param val2 the second value @return the new total @throws ArithmeticException if the value is too big or too small """ long...
java
public static int safeMultiplyToInt(long val1, long val2) { long val = FieldUtils.safeMultiply(val1, val2); return FieldUtils.safeToInt(val); }
[ "public", "static", "int", "safeMultiplyToInt", "(", "long", "val1", ",", "long", "val2", ")", "{", "long", "val", "=", "FieldUtils", ".", "safeMultiply", "(", "val1", ",", "val2", ")", ";", "return", "FieldUtils", ".", "safeToInt", "(", "val", ")", ";",...
Multiply two values to return an int throwing an exception if overflow occurs. @param val1 the first value @param val2 the second value @return the new total @throws ArithmeticException if the value is too big or too small
[ "Multiply", "two", "values", "to", "return", "an", "int", "throwing", "an", "exception", "if", "overflow", "occurs", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/field/FieldUtils.java#L240-L243
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyClientHandler.java
NettyClientHandler.sendPingFrame
private void sendPingFrame(ChannelHandlerContext ctx, SendPingCommand msg, ChannelPromise promise) { """ Sends a PING frame. If a ping operation is already outstanding, the callback in the message is registered to be called when the existing operation completes, and no new frame is sent. """ // Don'...
java
private void sendPingFrame(ChannelHandlerContext ctx, SendPingCommand msg, ChannelPromise promise) { // Don't check lifecycleManager.getShutdownStatus() since we want to allow pings after shutdown // but before termination. After termination, messages will no longer arrive because the // pipeline clea...
[ "private", "void", "sendPingFrame", "(", "ChannelHandlerContext", "ctx", ",", "SendPingCommand", "msg", ",", "ChannelPromise", "promise", ")", "{", "// Don't check lifecycleManager.getShutdownStatus() since we want to allow pings after shutdown", "// but before termination. After termi...
Sends a PING frame. If a ping operation is already outstanding, the callback in the message is registered to be called when the existing operation completes, and no new frame is sent.
[ "Sends", "a", "PING", "frame", ".", "If", "a", "ping", "operation", "is", "already", "outstanding", "the", "callback", "in", "the", "message", "is", "registered", "to", "be", "called", "when", "the", "existing", "operation", "completes", "and", "no", "new", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyClientHandler.java#L623-L675
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newLabel
public static Label newLabel (String text, String... styles) { """ Creates a label with the supplied text and style and optional additional styles. """ return setStyleNames(new Label(text), styles); }
java
public static Label newLabel (String text, String... styles) { return setStyleNames(new Label(text), styles); }
[ "public", "static", "Label", "newLabel", "(", "String", "text", ",", "String", "...", "styles", ")", "{", "return", "setStyleNames", "(", "new", "Label", "(", "text", ")", ",", "styles", ")", ";", "}" ]
Creates a label with the supplied text and style and optional additional styles.
[ "Creates", "a", "label", "with", "the", "supplied", "text", "and", "style", "and", "optional", "additional", "styles", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L178-L181
hawtio/hawtio
hawtio-util/src/main/java/io/hawt/util/introspect/support/ClassScanner.java
ClassScanner.findClassNames
public SortedSet<String> findClassNames(String search, Integer limit) { """ Searches for the available class names given the text search @return all the class names found on the current classpath using the given text search filter """ Map<Package, ClassLoader[]> packageMap = Packages.getPackageMap(g...
java
public SortedSet<String> findClassNames(String search, Integer limit) { Map<Package, ClassLoader[]> packageMap = Packages.getPackageMap(getClassLoaders(), ignorePackages); return findClassNamesInPackages(search, limit, packageMap); }
[ "public", "SortedSet", "<", "String", ">", "findClassNames", "(", "String", "search", ",", "Integer", "limit", ")", "{", "Map", "<", "Package", ",", "ClassLoader", "[", "]", ">", "packageMap", "=", "Packages", ".", "getPackageMap", "(", "getClassLoaders", "(...
Searches for the available class names given the text search @return all the class names found on the current classpath using the given text search filter
[ "Searches", "for", "the", "available", "class", "names", "given", "the", "text", "search" ]
train
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/hawtio-util/src/main/java/io/hawt/util/introspect/support/ClassScanner.java#L95-L98
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setEnterpriseCost
public void setEnterpriseCost(int index, Number value) { """ Set an enterprise field value. @param index field index @param value field value """ set(selectField(TaskFieldLists.ENTERPRISE_COST, index), value); }
java
public void setEnterpriseCost(int index, Number value) { set(selectField(TaskFieldLists.ENTERPRISE_COST, index), value); }
[ "public", "void", "setEnterpriseCost", "(", "int", "index", ",", "Number", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "ENTERPRISE_COST", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set an enterprise field value. @param index field index @param value field value
[ "Set", "an", "enterprise", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3837-L3840
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectComplementOfImpl_CustomFieldSerializer.java
OWLObjectComplementOfImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectComplementOfImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.g...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectComplementOfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectComplementOfImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectComplementOfImpl_CustomFieldSerializer.java#L69-L72
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java
PlainChangesLogImpl.findItemState
public ItemState findItemState(String id, Boolean isPersisted, int... states) throws IllegalPathException { """ Search for an item state of item with given id and filter parameters. @param id - item id @param states - filter only the given list states (ORed), or all if it's null @param isPersisted - filter...
java
public ItemState findItemState(String id, Boolean isPersisted, int... states) throws IllegalPathException { List<ItemState> allStates = getAllStates(); // search from the end for state for (int i = allStates.size() - 1; i >= 0; i--) { ItemState istate = allStates.get(i); boo...
[ "public", "ItemState", "findItemState", "(", "String", "id", ",", "Boolean", "isPersisted", ",", "int", "...", "states", ")", "throws", "IllegalPathException", "{", "List", "<", "ItemState", ">", "allStates", "=", "getAllStates", "(", ")", ";", "// search from t...
Search for an item state of item with given id and filter parameters. @param id - item id @param states - filter only the given list states (ORed), or all if it's null @param isPersisted - filter only persisted/not persisted, or all if it's null @return - filtered {@link ItemState} @throws IllegalPathException
[ "Search", "for", "an", "item", "state", "of", "item", "with", "given", "id", "and", "filter", "parameters", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/dataflow/PlainChangesLogImpl.java#L830-L860
apache/groovy
subprojects/groovy-yaml/src/main/java/groovy/yaml/YamlBuilder.java
YamlBuilder.invokeMethod
@Override public Object invokeMethod(String name, Object args) { """ A method call on the YAML builder instance will create a root object with only one key whose name is the name of the method being called. This method takes as arguments: <ul> <li>a closure</li> <li>a map (ie. named arguments)</li> <li>a...
java
@Override public Object invokeMethod(String name, Object args) { return jsonBuilder.invokeMethod(name, args); }
[ "@", "Override", "public", "Object", "invokeMethod", "(", "String", "name", ",", "Object", "args", ")", "{", "return", "jsonBuilder", ".", "invokeMethod", "(", "name", ",", "args", ")", ";", "}" ]
A method call on the YAML builder instance will create a root object with only one key whose name is the name of the method being called. This method takes as arguments: <ul> <li>a closure</li> <li>a map (ie. named arguments)</li> <li>a map and a closure</li> <li>or no argument at all</li> </ul> <p> Example with a clas...
[ "A", "method", "call", "on", "the", "YAML", "builder", "instance", "will", "create", "a", "root", "object", "with", "only", "one", "key", "whose", "name", "is", "the", "name", "of", "the", "method", "being", "called", ".", "This", "method", "takes", "as"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-yaml/src/main/java/groovy/yaml/YamlBuilder.java#L252-L255
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addEqualTo
public void addEqualTo(String attribute, Object value) { """ Adds and equals (=) criteria, customer_id = 10034 @param attribute The field name to be used @param value An object representing the value of the field """ // PAW // addSelectionCriteria(ValueCriteria.buildEqualToCriteria(attri...
java
public void addEqualTo(String attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildEqualToCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildEqualToCriteria(attribute, value, getUserAlias(attribute))); }
[ "public", "void", "addEqualTo", "(", "String", "attribute", ",", "Object", "value", ")", "{", "// PAW\r", "//\t\taddSelectionCriteria(ValueCriteria.buildEqualToCriteria(attribute, value, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildEqualToCriteria", ...
Adds and equals (=) criteria, customer_id = 10034 @param attribute The field name to be used @param value An object representing the value of the field
[ "Adds", "and", "equals", "(", "=", ")", "criteria", "customer_id", "=", "10034" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L290-L295
zackpollard/JavaTelegramBot-API
core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java
TelegramBot.answerCallbackQuery
public boolean answerCallbackQuery(String callbackQueryId, CallbackQueryResponse callbackQueryResponse) { """ This allows you to respond to a callback query with some text as a response. This will either show up as an alert or as a toast on the telegram client @param callbackQueryId The ID of the callbac...
java
public boolean answerCallbackQuery(String callbackQueryId, CallbackQueryResponse callbackQueryResponse) { if(callbackQueryId != null && callbackQueryResponse.getText() != null) { HttpResponse<String> response; JSONObject jsonResponse; try { MultipartBody re...
[ "public", "boolean", "answerCallbackQuery", "(", "String", "callbackQueryId", ",", "CallbackQueryResponse", "callbackQueryResponse", ")", "{", "if", "(", "callbackQueryId", "!=", "null", "&&", "callbackQueryResponse", ".", "getText", "(", ")", "!=", "null", ")", "{"...
This allows you to respond to a callback query with some text as a response. This will either show up as an alert or as a toast on the telegram client @param callbackQueryId The ID of the callback query you are responding to @param callbackQueryResponse The response that you would like to send in reply to this c...
[ "This", "allows", "you", "to", "respond", "to", "a", "callback", "query", "with", "some", "text", "as", "a", "response", ".", "This", "will", "either", "show", "up", "as", "an", "alert", "or", "as", "a", "toast", "on", "the", "telegram", "client" ]
train
https://github.com/zackpollard/JavaTelegramBot-API/blob/9d100f351824042ca5fc0ea735d1fa376a13e81d/core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java#L995-L1024
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/StringUtils.java
StringUtils.normalizeCharset
public static String normalizeCharset(String s, int offset, int length) { """ Convert alternate charset names (eg utf8) to normalized name (eg UTF-8). @param s the charset to normalize @param offset the offset in the charset @param length the length of the charset in the input param @return the normaliz...
java
public static String normalizeCharset(String s, int offset, int length) { String n = CHARSETS.get(s, offset, length); return (n == null) ? s.substring(offset, offset + length) : n; }
[ "public", "static", "String", "normalizeCharset", "(", "String", "s", ",", "int", "offset", ",", "int", "length", ")", "{", "String", "n", "=", "CHARSETS", ".", "get", "(", "s", ",", "offset", ",", "length", ")", ";", "return", "(", "n", "==", "null"...
Convert alternate charset names (eg utf8) to normalized name (eg UTF-8). @param s the charset to normalize @param offset the offset in the charset @param length the length of the charset in the input param @return the normalized charset (or null if not found)
[ "Convert", "alternate", "charset", "names", "(", "eg", "utf8", ")", "to", "normalized", "name", "(", "eg", "UTF", "-", "8", ")", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/StringUtils.java#L65-L68
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.createPublishJob
public void createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException { """ Creates a new publish job.<p> @param dbc the current database context @param publishJob the publish job to create @throws CmsException if something goes wrong """ getProjectDriver(dbc).cre...
java
public void createPublishJob(CmsDbContext dbc, CmsPublishJobInfoBean publishJob) throws CmsException { getProjectDriver(dbc).createPublishJob(dbc, publishJob); }
[ "public", "void", "createPublishJob", "(", "CmsDbContext", "dbc", ",", "CmsPublishJobInfoBean", "publishJob", ")", "throws", "CmsException", "{", "getProjectDriver", "(", "dbc", ")", ".", "createPublishJob", "(", "dbc", ",", "publishJob", ")", ";", "}" ]
Creates a new publish job.<p> @param dbc the current database context @param publishJob the publish job to create @throws CmsException if something goes wrong
[ "Creates", "a", "new", "publish", "job", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L1588-L1591
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.convertPixelToNorm
public static Point2D_F64 convertPixelToNorm(CameraModel param , Point2D_F64 pixel , Point2D_F64 norm ) { """ <p> Convenient function for converting from distorted image pixel coordinate to undistorted normalized image coordinates. If speed is a concern then {@link PinholePtoN_F64} should be used instead. </p> ...
java
public static Point2D_F64 convertPixelToNorm(CameraModel param , Point2D_F64 pixel , Point2D_F64 norm ) { return ImplPerspectiveOps_F64.convertPixelToNorm(param, pixel, norm); }
[ "public", "static", "Point2D_F64", "convertPixelToNorm", "(", "CameraModel", "param", ",", "Point2D_F64", "pixel", ",", "Point2D_F64", "norm", ")", "{", "return", "ImplPerspectiveOps_F64", ".", "convertPixelToNorm", "(", "param", ",", "pixel", ",", "norm", ")", ";...
<p> Convenient function for converting from distorted image pixel coordinate to undistorted normalized image coordinates. If speed is a concern then {@link PinholePtoN_F64} should be used instead. </p> NOTE: norm and pixel can be the same instance. @param param Intrinsic camera parameters @param pixel Pixel coordinat...
[ "<p", ">", "Convenient", "function", "for", "converting", "from", "distorted", "image", "pixel", "coordinate", "to", "undistorted", "normalized", "image", "coordinates", ".", "If", "speed", "is", "a", "concern", "then", "{", "@link", "PinholePtoN_F64", "}", "sho...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L445-L447
shrinkwrap/resolver
maven/api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/coordinate/MavenDependencies.java
MavenDependencies.createExclusion
public static MavenDependencyExclusion createExclusion(final String groupId, final String artifactId) throws IllegalArgumentException { """ Creates a new {@link MavenDependencyExclusion} instance from the specified, required arguments @param groupId A groupId of the new {@link MavenDependencyExclusion} ...
java
public static MavenDependencyExclusion createExclusion(final String groupId, final String artifactId) throws IllegalArgumentException { if (groupId == null || groupId.length() == 0) { throw new IllegalArgumentException("groupId must be specified"); } if (artifactId == null ||...
[ "public", "static", "MavenDependencyExclusion", "createExclusion", "(", "final", "String", "groupId", ",", "final", "String", "artifactId", ")", "throws", "IllegalArgumentException", "{", "if", "(", "groupId", "==", "null", "||", "groupId", ".", "length", "(", ")"...
Creates a new {@link MavenDependencyExclusion} instance from the specified, required arguments @param groupId A groupId of the new {@link MavenDependencyExclusion} instance. @param artifactId An artifactId of the new {@link MavenDependencyExclusion} instance. @return The new {@link MavenDependencyExclusion} instance....
[ "Creates", "a", "new", "{", "@link", "MavenDependencyExclusion", "}", "instance", "from", "the", "specified", "required", "arguments" ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/coordinate/MavenDependencies.java#L168-L178
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/MethodCanBeStatic.java
MethodCanBeStatic.fixQualifiers
private SuggestedFix fixQualifiers(VisitorState state, MethodSymbol sym, SuggestedFix f) { """ Replace instance references to the method with static access (e.g. `this.foo(...)` -> `EnclosingClass.foo(...)` and `this::foo` to `EnclosingClass::foo`). """ SuggestedFix.Builder builder = SuggestedFix.builder(...
java
private SuggestedFix fixQualifiers(VisitorState state, MethodSymbol sym, SuggestedFix f) { SuggestedFix.Builder builder = SuggestedFix.builder().merge(f); new TreeScanner<Void, Void>() { @Override public Void visitMemberSelect(MemberSelectTree tree, Void unused) { fixQualifier(tree, tree.get...
[ "private", "SuggestedFix", "fixQualifiers", "(", "VisitorState", "state", ",", "MethodSymbol", "sym", ",", "SuggestedFix", "f", ")", "{", "SuggestedFix", ".", "Builder", "builder", "=", "SuggestedFix", ".", "builder", "(", ")", ".", "merge", "(", "f", ")", "...
Replace instance references to the method with static access (e.g. `this.foo(...)` -> `EnclosingClass.foo(...)` and `this::foo` to `EnclosingClass::foo`).
[ "Replace", "instance", "references", "to", "the", "method", "with", "static", "access", "(", "e", ".", "g", ".", "this", ".", "foo", "(", "...", ")", "-", ">", "EnclosingClass", ".", "foo", "(", "...", ")", "and", "this", "::", "foo", "to", "Enclosin...
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/MethodCanBeStatic.java#L204-L226
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/encoder/MatrixUtil.java
MatrixUtil.maybeEmbedVersionInfo
static void maybeEmbedVersionInfo(Version version, ByteMatrix matrix) throws WriterException { """ See 8.10 of JISX0510:2004 (p.47) for how to embed version information. """ if (version.getVersionNumber() < 7) { // Version info is necessary if version >= 7. return; // Don't need version info. }...
java
static void maybeEmbedVersionInfo(Version version, ByteMatrix matrix) throws WriterException { if (version.getVersionNumber() < 7) { // Version info is necessary if version >= 7. return; // Don't need version info. } BitArray versionInfoBits = new BitArray(); makeVersionInfoBits(version, version...
[ "static", "void", "maybeEmbedVersionInfo", "(", "Version", "version", ",", "ByteMatrix", "matrix", ")", "throws", "WriterException", "{", "if", "(", "version", ".", "getVersionNumber", "(", ")", "<", "7", ")", "{", "// Version info is necessary if version >= 7.", "r...
See 8.10 of JISX0510:2004 (p.47) for how to embed version information.
[ "See", "8", ".", "10", "of", "JISX0510", ":", "2004", "(", "p", ".", "47", ")", "for", "how", "to", "embed", "version", "information", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/encoder/MatrixUtil.java#L198-L217
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/base/GenericDataSinkBase.java
GenericDataSinkBase.setGlobalOrder
public void setGlobalOrder(Ordering globalOrder, DataDistribution distribution) { """ Sets the order in which the sink must write its data. For any value other then <tt>NONE</tt>, this will cause the system to perform a global sort, or try to reuse an order from a previous operation. @param globalOrder The or...
java
public void setGlobalOrder(Ordering globalOrder, DataDistribution distribution) { this.localOrdering = globalOrder; setRangePartitioned(globalOrder, distribution); }
[ "public", "void", "setGlobalOrder", "(", "Ordering", "globalOrder", ",", "DataDistribution", "distribution", ")", "{", "this", ".", "localOrdering", "=", "globalOrder", ";", "setRangePartitioned", "(", "globalOrder", ",", "distribution", ")", ";", "}" ]
Sets the order in which the sink must write its data. For any value other then <tt>NONE</tt>, this will cause the system to perform a global sort, or try to reuse an order from a previous operation. @param globalOrder The order to write the data in. @param distribution The distribution to use for the range partitionin...
[ "Sets", "the", "order", "in", "which", "the", "sink", "must", "write", "its", "data", ".", "For", "any", "value", "other", "then", "<tt", ">", "NONE<", "/", "tt", ">", "this", "will", "cause", "the", "system", "to", "perform", "a", "global", "sort", ...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/base/GenericDataSinkBase.java#L167-L170
m-m-m/util
datatype/src/main/java/net/sf/mmm/util/datatype/api/phone/AreaCode.java
AreaCode.parseAreaCode
private static int parseAreaCode(String areaCode) { """ This method parses a {@link AreaCode} given as {@link String} to its {@link #getAreaCode() int representation}. @param areaCode is the {@link AreaCode} as {@link String}. @return the {@link AreaCode} as int. """ String normalized = areaCode; ...
java
private static int parseAreaCode(String areaCode) { String normalized = areaCode; if (normalized.startsWith("(0)")) { normalized = normalized.substring(3); } else if (normalized.startsWith("(1)")) { normalized = normalized.substring(3); } else if (normalized.startsWith("0")) { normali...
[ "private", "static", "int", "parseAreaCode", "(", "String", "areaCode", ")", "{", "String", "normalized", "=", "areaCode", ";", "if", "(", "normalized", ".", "startsWith", "(", "\"(0)\"", ")", ")", "{", "normalized", "=", "normalized", ".", "substring", "(",...
This method parses a {@link AreaCode} given as {@link String} to its {@link #getAreaCode() int representation}. @param areaCode is the {@link AreaCode} as {@link String}. @return the {@link AreaCode} as int.
[ "This", "method", "parses", "a", "{", "@link", "AreaCode", "}", "given", "as", "{", "@link", "String", "}", "to", "its", "{", "@link", "#getAreaCode", "()", "int", "representation", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/datatype/src/main/java/net/sf/mmm/util/datatype/api/phone/AreaCode.java#L58-L77
Stratio/stratio-cassandra
src/java/org/apache/cassandra/thrift/TCustomSocket.java
TCustomSocket.open
public void open() throws TTransportException { """ Connects the socket, creating a new socket object if necessary. """ if (isOpen()) { throw new TTransportException(TTransportException.ALREADY_OPEN, "Socket already connected."); } if (host.length() == 0) { throw new TTransportExceptio...
java
public void open() throws TTransportException { if (isOpen()) { throw new TTransportException(TTransportException.ALREADY_OPEN, "Socket already connected."); } if (host.length() == 0) { throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open null host."); } if (port <= ...
[ "public", "void", "open", "(", ")", "throws", "TTransportException", "{", "if", "(", "isOpen", "(", ")", ")", "{", "throw", "new", "TTransportException", "(", "TTransportException", ".", "ALREADY_OPEN", ",", "\"Socket already connected.\"", ")", ";", "}", "if", ...
Connects the socket, creating a new socket object if necessary.
[ "Connects", "the", "socket", "creating", "a", "new", "socket", "object", "if", "necessary", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/thrift/TCustomSocket.java#L166-L190
grpc/grpc-java
netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java
ProtocolNegotiators.serverTls
public static ProtocolNegotiator serverTls(final SslContext sslContext) { """ Create a server TLS handler for HTTP/2 capable of using ALPN/NPN. """ Preconditions.checkNotNull(sslContext, "sslContext"); return new ProtocolNegotiator() { @Override public ChannelHandler newHandler(GrpcHttp2Con...
java
public static ProtocolNegotiator serverTls(final SslContext sslContext) { Preconditions.checkNotNull(sslContext, "sslContext"); return new ProtocolNegotiator() { @Override public ChannelHandler newHandler(GrpcHttp2ConnectionHandler handler) { return new ServerTlsHandler(sslContext, handler);...
[ "public", "static", "ProtocolNegotiator", "serverTls", "(", "final", "SslContext", "sslContext", ")", "{", "Preconditions", ".", "checkNotNull", "(", "sslContext", ",", "\"sslContext\"", ")", ";", "return", "new", "ProtocolNegotiator", "(", ")", "{", "@", "Overrid...
Create a server TLS handler for HTTP/2 capable of using ALPN/NPN.
[ "Create", "a", "server", "TLS", "handler", "for", "HTTP", "/", "2", "capable", "of", "using", "ALPN", "/", "NPN", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java#L118-L135
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WMultiSelectPairRenderer.java
WMultiSelectPairRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WMultiSelectPair. @param component the WMultiSelectPair to paint. @param renderContext the RenderContext to paint to. """ WMultiSelectPair multiSelectPair = (WMultiSelectPair) compo...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WMultiSelectPair multiSelectPair = (WMultiSelectPair) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = multiSelectPair.isReadOnly(); xml.appendTagOpen("ui:multiselectpair"); x...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WMultiSelectPair", "multiSelectPair", "=", "(", "WMultiSelectPair", ")", "component", ";", "XmlStringBuilder", "xml...
Paints the given WMultiSelectPair. @param component the WMultiSelectPair to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WMultiSelectPair", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WMultiSelectPairRenderer.java#L29-L75
JodaOrg/joda-money
src/main/java/org/joda/money/BigMoney.java
BigMoney.multiplyRetainScale
public BigMoney multiplyRetainScale(double valueToMultiplyBy, RoundingMode roundingMode) { """ Returns a copy of this monetary value multiplied by the specified value using the specified rounding mode to adjust the scale of the result. <p> This multiplies this money by the specified value, retaining the scale o...
java
public BigMoney multiplyRetainScale(double valueToMultiplyBy, RoundingMode roundingMode) { return multiplyRetainScale(BigDecimal.valueOf(valueToMultiplyBy), roundingMode); }
[ "public", "BigMoney", "multiplyRetainScale", "(", "double", "valueToMultiplyBy", ",", "RoundingMode", "roundingMode", ")", "{", "return", "multiplyRetainScale", "(", "BigDecimal", ".", "valueOf", "(", "valueToMultiplyBy", ")", ",", "roundingMode", ")", ";", "}" ]
Returns a copy of this monetary value multiplied by the specified value using the specified rounding mode to adjust the scale of the result. <p> This multiplies this money by the specified value, retaining the scale of this money. This will frequently lose precision, hence the need for a rounding mode. For example, 'US...
[ "Returns", "a", "copy", "of", "this", "monetary", "value", "multiplied", "by", "the", "specified", "value", "using", "the", "specified", "rounding", "mode", "to", "adjust", "the", "scale", "of", "the", "result", ".", "<p", ">", "This", "multiplies", "this", ...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L1351-L1353
FDMediagroep/hamcrest-jsoup
src/main/java/nl/fd/hamcrest/jsoup/Selecting.java
Selecting.selecting
@Factory @SuppressWarnings("unchecked") public static Matcher<Element> selecting(final String cssExpression, final Matcher<Iterable<? super Element>> elementsMatcher) { """ Creates a {@link org.hamcrest.Matcher} for a JSoup {@link org.jsoup.nodes.Element} that has a list of child nodes matching the specif...
java
@Factory @SuppressWarnings("unchecked") public static Matcher<Element> selecting(final String cssExpression, final Matcher<Iterable<? super Element>> elementsMatcher) { return new Selecting(cssExpression, elementsMatcher); }
[ "@", "Factory", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Matcher", "<", "Element", ">", "selecting", "(", "final", "String", "cssExpression", ",", "final", "Matcher", "<", "Iterable", "<", "?", "super", "Element", ">", ">", "e...
Creates a {@link org.hamcrest.Matcher} for a JSoup {@link org.jsoup.nodes.Element} that has a list of child nodes matching the specified cssExpression that are matched by the specified elementsMatcher. @param cssExpression The Jsoup CSS expression used to selected a list of child nodes @param elementsMatcher the mat...
[ "Creates", "a", "{", "@link", "org", ".", "hamcrest", ".", "Matcher", "}", "for", "a", "JSoup", "{", "@link", "org", ".", "jsoup", ".", "nodes", ".", "Element", "}", "that", "has", "a", "list", "of", "child", "nodes", "matching", "the", "specified", ...
train
https://github.com/FDMediagroep/hamcrest-jsoup/blob/b7152dac6f834e40117fb7cfdd3149a268d95f7b/src/main/java/nl/fd/hamcrest/jsoup/Selecting.java#L31-L35
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ManagementWsDelegate.java
ManagementWsDelegate.uploadZippedApplicationTemplate
public void uploadZippedApplicationTemplate( File applicationFile ) throws ManagementWsException, IOException { """ Uploads a ZIP file and loads its application template. @param applicationFile a ZIP archive file @throws ManagementWsException if a problem occurred with the applications management @throws IOExce...
java
public void uploadZippedApplicationTemplate( File applicationFile ) throws ManagementWsException, IOException { if( applicationFile == null || ! applicationFile.exists() || ! applicationFile.isFile()) throw new IOException( "Expected an existing file as parameter." ); this.logger.finer( "Loading an app...
[ "public", "void", "uploadZippedApplicationTemplate", "(", "File", "applicationFile", ")", "throws", "ManagementWsException", ",", "IOException", "{", "if", "(", "applicationFile", "==", "null", "||", "!", "applicationFile", ".", "exists", "(", ")", "||", "!", "app...
Uploads a ZIP file and loads its application template. @param applicationFile a ZIP archive file @throws ManagementWsException if a problem occurred with the applications management @throws IOException if the file was not found or is invalid
[ "Uploads", "a", "ZIP", "file", "and", "loads", "its", "application", "template", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ManagementWsDelegate.java#L81-L105
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java
CachedXPathAPI.selectSingleNode
public Node selectSingleNode(Node contextNode, String str) throws TransformerException { """ Use an XPath string to select a single node. XPath namespace prefixes are resolved from the context node, which may not be what you want (see the next method). @param contextNode The node to start searching...
java
public Node selectSingleNode(Node contextNode, String str) throws TransformerException { return selectSingleNode(contextNode, str, contextNode); }
[ "public", "Node", "selectSingleNode", "(", "Node", "contextNode", ",", "String", "str", ")", "throws", "TransformerException", "{", "return", "selectSingleNode", "(", "contextNode", ",", "str", ",", "contextNode", ")", ";", "}" ]
Use an XPath string to select a single node. XPath namespace prefixes are resolved from the context node, which may not be what you want (see the next method). @param contextNode The node to start searching from. @param str A valid XPath string. @return The first node found that matches the XPath, or null. @throws Tr...
[ "Use", "an", "XPath", "string", "to", "select", "a", "single", "node", ".", "XPath", "namespace", "prefixes", "are", "resolved", "from", "the", "context", "node", "which", "may", "not", "be", "what", "you", "want", "(", "see", "the", "next", "method", ")...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/CachedXPathAPI.java#L121-L125
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/base64/Base64.java
Base64.decodeToFile
public static void decodeToFile (@Nonnull final String sDataToDecode, @Nonnull final File aFile) throws IOException { """ Convenience method for decoding data to a file. <p> As of v 2.3, if there is a error, the method will throw an IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned ...
java
public static void decodeToFile (@Nonnull final String sDataToDecode, @Nonnull final File aFile) throws IOException { try (final Base64OutputStream bos = new Base64OutputStream (FileHelper.getBufferedOutputStream (aFile), DECODE)) { bos.write (sDataToDecode.getBytes (PREFERRED_ENCODING)); } }
[ "public", "static", "void", "decodeToFile", "(", "@", "Nonnull", "final", "String", "sDataToDecode", ",", "@", "Nonnull", "final", "File", "aFile", ")", "throws", "IOException", "{", "try", "(", "final", "Base64OutputStream", "bos", "=", "new", "Base64OutputStre...
Convenience method for decoding data to a file. <p> As of v 2.3, if there is a error, the method will throw an IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it. </p> @param sDataToDecode Base64-encoded data as a string @param ...
[ "Convenience", "method", "for", "decoding", "data", "to", "a", "file", ".", "<p", ">", "As", "of", "v", "2", ".", "3", "if", "there", "is", "a", "error", "the", "method", "will", "throw", "an", "IOException", ".", "<b", ">", "This", "is", "new", "t...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/base64/Base64.java#L2390-L2396
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsMessages.java
CmsMessages.getDate
public String getDate(Date date, CmsDateTimeUtil.Format format) { """ Returns a formated date String from a Date value, the formatting based on the provided option and the locale based on this instance.<p> @param date the Date object to format as String @param format the format to use, see {@link CmsDateTime...
java
public String getDate(Date date, CmsDateTimeUtil.Format format) { return CmsDateTimeUtil.getDate(date, format); }
[ "public", "String", "getDate", "(", "Date", "date", ",", "CmsDateTimeUtil", ".", "Format", "format", ")", "{", "return", "CmsDateTimeUtil", ".", "getDate", "(", "date", ",", "format", ")", ";", "}" ]
Returns a formated date String from a Date value, the formatting based on the provided option and the locale based on this instance.<p> @param date the Date object to format as String @param format the format to use, see {@link CmsDateTimeUtil.Format} for possible values @return the formatted date
[ "Returns", "a", "formated", "date", "String", "from", "a", "Date", "value", "the", "formatting", "based", "on", "the", "provided", "option", "and", "the", "locale", "based", "on", "this", "instance", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsMessages.java#L234-L237
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java
ContentElement.addAutofilter
public void addAutofilter(final Table table, final int r1, final int c1, final int r2, final int c2) { """ Add an autofilter to a table @param table the table where the filter goes @param r1 first row index (0..n-1) @param c1 first col index @param r2 last row index @param c2 last col index ...
java
public void addAutofilter(final Table table, final int r1, final int c1, final int r2, final int c2) { if (this.autofilters == null) this.autofilters = new ArrayList<String>(); this.autofilters.add(this.positionUtil.toRangeAddress(table, r1, c1, r2, c2)); }
[ "public", "void", "addAutofilter", "(", "final", "Table", "table", ",", "final", "int", "r1", ",", "final", "int", "c1", ",", "final", "int", "r2", ",", "final", "int", "c2", ")", "{", "if", "(", "this", ".", "autofilters", "==", "null", ")", "this",...
Add an autofilter to a table @param table the table where the filter goes @param r1 first row index (0..n-1) @param c1 first col index @param r2 last row index @param c2 last col index
[ "Add", "an", "autofilter", "to", "a", "table" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L292-L296
dlemmermann/PreferencesFX
preferencesfx/src/main/java/com/dlsc/preferencesfx/util/Ascii.java
Ascii.endsWithIgnoreCase
public static boolean endsWithIgnoreCase(CharSequence seq, CharSequence suffix) { """ Returns if the character sequence {@code seq} ends with the character sequence {@code suffix} ignoring the case of any ASCII alphabetic characters between {@code 'a'} and {@code 'z'} or {@code 'A'} and {@code 'Z'} inclusive. ...
java
public static boolean endsWithIgnoreCase(CharSequence seq, CharSequence suffix) { return startsWithIgnoreCase(seq, suffix, seq.length() - suffix.length()); }
[ "public", "static", "boolean", "endsWithIgnoreCase", "(", "CharSequence", "seq", ",", "CharSequence", "suffix", ")", "{", "return", "startsWithIgnoreCase", "(", "seq", ",", "suffix", ",", "seq", ".", "length", "(", ")", "-", "suffix", ".", "length", "(", ")"...
Returns if the character sequence {@code seq} ends with the character sequence {@code suffix} ignoring the case of any ASCII alphabetic characters between {@code 'a'} and {@code 'z'} or {@code 'A'} and {@code 'Z'} inclusive. @since NEXT
[ "Returns", "if", "the", "character", "sequence", "{", "@code", "seq", "}", "ends", "with", "the", "character", "sequence", "{", "@code", "suffix", "}", "ignoring", "the", "case", "of", "any", "ASCII", "alphabetic", "characters", "between", "{", "@code", "a",...
train
https://github.com/dlemmermann/PreferencesFX/blob/e06a49663ec949c2f7eb56e6b5952c030ed42d33/preferencesfx/src/main/java/com/dlsc/preferencesfx/util/Ascii.java#L195-L197
jaxio/celerio
celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java
RelationCollisionUtil.getOneToManyIntermediateNamer
public Namer getOneToManyIntermediateNamer(Namer fromEntityNamer, ColumnConfig pointsOnToEntity, Namer toEntityNamer) { """ Compute the appropriate namer for the Java field @ManyToOne (with intermediate table) """ // new configuration Namer result = getOneToManyNamerFromConf(pointsOnToEntity.ge...
java
public Namer getOneToManyIntermediateNamer(Namer fromEntityNamer, ColumnConfig pointsOnToEntity, Namer toEntityNamer) { // new configuration Namer result = getOneToManyNamerFromConf(pointsOnToEntity.getOneToManyConfig(), toEntityNamer); // fallback if (result == null) { // N...
[ "public", "Namer", "getOneToManyIntermediateNamer", "(", "Namer", "fromEntityNamer", ",", "ColumnConfig", "pointsOnToEntity", ",", "Namer", "toEntityNamer", ")", "{", "// new configuration", "Namer", "result", "=", "getOneToManyNamerFromConf", "(", "pointsOnToEntity", ".", ...
Compute the appropriate namer for the Java field @ManyToOne (with intermediate table)
[ "Compute", "the", "appropriate", "namer", "for", "the", "Java", "field" ]
train
https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-engine/src/main/java/com/jaxio/celerio/factory/RelationCollisionUtil.java#L122-L133
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTableUI.java
SeaGlassTableUI.forceInstallRenderer
public static void forceInstallRenderer(JTable table, Class objectClass) { """ Static wrapper around {@link forceInstallRenderer(Class objectClass)}. @param table the table to install the renderer on. @param objectClass the class to install the renderer on. """ if (table.getUI() instanceof Se...
java
public static void forceInstallRenderer(JTable table, Class objectClass) { if (table.getUI() instanceof SeaGlassTableUI) { ((SeaGlassTableUI) table.getUI()).forceInstallRenderer(objectClass); } }
[ "public", "static", "void", "forceInstallRenderer", "(", "JTable", "table", ",", "Class", "objectClass", ")", "{", "if", "(", "table", ".", "getUI", "(", ")", "instanceof", "SeaGlassTableUI", ")", "{", "(", "(", "SeaGlassTableUI", ")", "table", ".", "getUI",...
Static wrapper around {@link forceInstallRenderer(Class objectClass)}. @param table the table to install the renderer on. @param objectClass the class to install the renderer on.
[ "Static", "wrapper", "around", "{", "@link", "forceInstallRenderer", "(", "Class", "objectClass", ")", "}", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTableUI.java#L169-L173
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java
DefaultElementProducer.loadTiff
@Override public void loadTiff(URL tiff, ImageProcessor imageProcessor, int... pages) throws VectorPrintException { """ Calls {@link loadTiff(InputStream, ImageProcessor, int... ) } @param tiff @param imageProcessor @param pages @throws VectorPrintException """ try { if (log.isLoggable(...
java
@Override public void loadTiff(URL tiff, ImageProcessor imageProcessor, int... pages) throws VectorPrintException { try { if (log.isLoggable(Level.FINE)) { log.fine(String.format("loading tiff from %s", String.valueOf(tiff))); } if ("file".equals(tiff.getProtocol())) { ...
[ "@", "Override", "public", "void", "loadTiff", "(", "URL", "tiff", ",", "ImageProcessor", "imageProcessor", ",", "int", "...", "pages", ")", "throws", "VectorPrintException", "{", "try", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINE", ...
Calls {@link loadTiff(InputStream, ImageProcessor, int... ) } @param tiff @param imageProcessor @param pages @throws VectorPrintException
[ "Calls", "{", "@link", "loadTiff", "(", "InputStream", "ImageProcessor", "int", "...", ")", "}" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java#L715-L729
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Annotation.java
Annotation.setFields
public void setFields(Map<String, String> fields) { """ Replaces the user defined fields associated with the annotation. This information can be used to store information about the annotation such as the event name, the associated user or any other relevant information. Existing fields will always be deleted. ...
java
public void setFields(Map<String, String> fields) { _fields.clear(); if (fields != null) { _fields.putAll(fields); } }
[ "public", "void", "setFields", "(", "Map", "<", "String", ",", "String", ">", "fields", ")", "{", "_fields", ".", "clear", "(", ")", ";", "if", "(", "fields", "!=", "null", ")", "{", "_fields", ".", "putAll", "(", "fields", ")", ";", "}", "}" ]
Replaces the user defined fields associated with the annotation. This information can be used to store information about the annotation such as the event name, the associated user or any other relevant information. Existing fields will always be deleted. @param fields The user defined fields. May be null.
[ "Replaces", "the", "user", "defined", "fields", "associated", "with", "the", "annotation", ".", "This", "information", "can", "be", "used", "to", "store", "information", "about", "the", "annotation", "such", "as", "the", "event", "name", "the", "associated", "...
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/Annotation.java#L258-L263
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/util/XMLContentHandler.java
XMLContentHandler.startElementRootNode
private void startElementRootNode(final Attributes attributes) { """ Invoked on rootNode element. @param attributes the DOM attributes of the root node element """ LOG.debug("Found rootNode"); try { this.rootNode = this.newNode(null, attributes); this.nodeStack.push...
java
private void startElementRootNode(final Attributes attributes) { LOG.debug("Found rootNode"); try { this.rootNode = this.newNode(null, attributes); this.nodeStack.push(this.rootNode); } catch (final RepositoryException e) { throw new AssertionError("Could not...
[ "private", "void", "startElementRootNode", "(", "final", "Attributes", "attributes", ")", "{", "LOG", ".", "debug", "(", "\"Found rootNode\"", ")", ";", "try", "{", "this", ".", "rootNode", "=", "this", ".", "newNode", "(", "null", ",", "attributes", ")", ...
Invoked on rootNode element. @param attributes the DOM attributes of the root node element
[ "Invoked", "on", "rootNode", "element", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/util/XMLContentHandler.java#L334-L343
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java
HttpUtil.forwardFormMultipartPost
public static Response forwardFormMultipartPost(URI uri, HttpServletRequest request, boolean forwardHeaders) throws URISyntaxException, HttpException, IllegalStateException, IOException, ServletException { """ Forward FormMultipartPost (HTTP POST) to uri based on given request @param uri uri ...
java
public static Response forwardFormMultipartPost(URI uri, HttpServletRequest request, boolean forwardHeaders) throws URISyntaxException, HttpException, IllegalStateException, IOException, ServletException { Header[] headersToForward = null; if (request != null && forwardHeaders) { he...
[ "public", "static", "Response", "forwardFormMultipartPost", "(", "URI", "uri", ",", "HttpServletRequest", "request", ",", "boolean", "forwardHeaders", ")", "throws", "URISyntaxException", ",", "HttpException", ",", "IllegalStateException", ",", "IOException", ",", "Serv...
Forward FormMultipartPost (HTTP POST) to uri based on given request @param uri uri The URI to forward to. @param request The original {@link HttpServletRequest} @param forwardHeaders Should headers of request should be forwarded @return The HTTP response as Response object. @throws URISyntaxException...
[ "Forward", "FormMultipartPost", "(", "HTTP", "POST", ")", "to", "uri", "based", "on", "given", "request" ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L1084-L1099
dhemery/hartley
src/main/java/com/dhemery/expressing/ImmediateExpressions.java
ImmediateExpressions.assertThat
public static <V> void assertThat(Sampler<V> variable, Matcher<? super V> criteria) { """ Assert that a sample of the variable satisfies the criteria. <p>Example:</p> <pre> {@code Sampler<Integer> threadCount = ...; ... assertThat(threadCount, is(9)); } """ assertThat(sampleOf(variable, criter...
java
public static <V> void assertThat(Sampler<V> variable, Matcher<? super V> criteria) { assertThat(sampleOf(variable, criteria)); }
[ "public", "static", "<", "V", ">", "void", "assertThat", "(", "Sampler", "<", "V", ">", "variable", ",", "Matcher", "<", "?", "super", "V", ">", "criteria", ")", "{", "assertThat", "(", "sampleOf", "(", "variable", ",", "criteria", ")", ")", ";", "}"...
Assert that a sample of the variable satisfies the criteria. <p>Example:</p> <pre> {@code Sampler<Integer> threadCount = ...; ... assertThat(threadCount, is(9)); }
[ "Assert", "that", "a", "sample", "of", "the", "variable", "satisfies", "the", "criteria", ".", "<p", ">", "Example", ":", "<", "/", "p", ">", "<pre", ">", "{", "@code" ]
train
https://github.com/dhemery/hartley/blob/7754bd6bc12695f2249601b8890da530a61fcf33/src/main/java/com/dhemery/expressing/ImmediateExpressions.java#L48-L50
westnordost/osmapi
src/main/java/de/westnordost/osmapi/OsmConnection.java
OsmConnection.makeRequest
public <T> T makeRequest(String call, String method, boolean authenticate, ApiRequestWriter writer, ApiResponseReader<T> reader) { """ Make a request to the Http Osm Api @param call HTTP path and URL parameters (if any) @param method HTTP method. Defaults to "GET" @param authenticate whether to make ...
java
public <T> T makeRequest(String call, String method, boolean authenticate, ApiRequestWriter writer, ApiResponseReader<T> reader) { HttpURLConnection connection = null; try { connection = sendRequest(call, method, authenticate, writer); handleResponseCode(connection); if(reader != null) return ...
[ "public", "<", "T", ">", "T", "makeRequest", "(", "String", "call", ",", "String", "method", ",", "boolean", "authenticate", ",", "ApiRequestWriter", "writer", ",", "ApiResponseReader", "<", "T", ">", "reader", ")", "{", "HttpURLConnection", "connection", "=",...
Make a request to the Http Osm Api @param call HTTP path and URL parameters (if any) @param method HTTP method. Defaults to "GET" @param authenticate whether to make this request as a logged in user @param writer the writer to send the request payload to the server. If null, no payload is sent @param reader the reader...
[ "Make", "a", "request", "to", "the", "Http", "Osm", "Api" ]
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/OsmConnection.java#L188-L214
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMultiRolePoolInstanceMetricsAsync
public Observable<Page<ResourceMetricInner>> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { """ Get metrics for a specific instance of a multi-role pool of an App Service Environment. Get metrics for a specific instance of a...
java
public Observable<Page<ResourceMetricInner>> listMultiRolePoolInstanceMetricsAsync(final String resourceGroupName, final String name, final String instance, final Boolean details) { return listMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details) .map(new F...
[ "public", "Observable", "<", "Page", "<", "ResourceMetricInner", ">", ">", "listMultiRolePoolInstanceMetricsAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "instance", ",", "final", "Boolean", "details", "...
Get metrics for a specific instance of a multi-role pool of an App Service Environment. Get metrics for a specific instance of a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param inst...
[ "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metrics", "for", "a", "specific", "instance", "of", "a", "multi", "-", "role", "pool", "of", "an", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L2870-L2878
stagemonitor/stagemonitor
stagemonitor-core/src/main/java/org/stagemonitor/core/elasticsearch/IndexSelector.java
IndexSelector.getIndexPatternOlderThanDays
public String getIndexPatternOlderThanDays(String prefix, int days) { """ Returns an Elasticsearch index pattern that only includes indices that are older than the specified amount of days <p> Your indices are ought to have the pattern [prefix]YYYY.MM.DD <p> See also https://www.elastic.co/guide/en/elasticsear...
java
public String getIndexPatternOlderThanDays(String prefix, int days) { // select all indices, then exclude months and days that are not older than the days parameter // Example: // stagemonitor-metrics-*,-stagemonitor-metrics-2015.10.*,-stagemonitor-metrics-2015.09.30 final StringBuilder indexPattern = new Strin...
[ "public", "String", "getIndexPatternOlderThanDays", "(", "String", "prefix", ",", "int", "days", ")", "{", "// select all indices, then exclude months and days that are not older than the days parameter", "// Example:", "// stagemonitor-metrics-*,-stagemonitor-metrics-2015.10.*,-stagemonit...
Returns an Elasticsearch index pattern that only includes indices that are older than the specified amount of days <p> Your indices are ought to have the pattern [prefix]YYYY.MM.DD <p> See also https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html @param prefix the index prefix e.g. 'stagemon...
[ "Returns", "an", "Elasticsearch", "index", "pattern", "that", "only", "includes", "indices", "that", "are", "older", "than", "the", "specified", "amount", "of", "days", "<p", ">", "Your", "indices", "are", "ought", "to", "have", "the", "pattern", "[", "prefi...
train
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/elasticsearch/IndexSelector.java#L30-L44
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/util/Util.java
Util.printQueries
public static void printQueries(List<JcQuery> queries, QueryToObserve toObserve, Format format) { """ map to CYPHER statements and map to JSON, print the mapping results to the output streams configured in QueriesPrintObserver @param queries @param toObserve @param format """ boolean titlePrinted = false...
java
public static void printQueries(List<JcQuery> queries, QueryToObserve toObserve, Format format) { boolean titlePrinted = false; ContentToObserve tob = QueriesPrintObserver.contentToObserve(toObserve); if (tob == ContentToObserve.CYPHER || tob == ContentToObserve.CYPHER_JSON) { titlePrinted = true; QueriesPr...
[ "public", "static", "void", "printQueries", "(", "List", "<", "JcQuery", ">", "queries", ",", "QueryToObserve", "toObserve", ",", "Format", "format", ")", "{", "boolean", "titlePrinted", "=", "false", ";", "ContentToObserve", "tob", "=", "QueriesPrintObserver", ...
map to CYPHER statements and map to JSON, print the mapping results to the output streams configured in QueriesPrintObserver @param queries @param toObserve @param format
[ "map", "to", "CYPHER", "statements", "and", "map", "to", "JSON", "print", "the", "mapping", "results", "to", "the", "output", "streams", "configured", "in", "QueriesPrintObserver" ]
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/util/Util.java#L104-L129
dmfs/http-client-interfaces
src/org/dmfs/httpclientinterfaces/headers/impl/StringHeaderValueConverter.java
StringHeaderValueConverter.valueString
@Override public String valueString(String headerValue) { """ {@inheritDoc} <p /> The given headerValue must not contain any characters that are not allowed in headers. Basically that means only characters in the ASCII range 0x20-0xff and the tab character (0x09) are allowed. <pre> field-value = *( fiel...
java
@Override public String valueString(String headerValue) { // make sure the value is valid for (int i = 0, count = headerValue.length(); i < count; ++i) { char c = headerValue.charAt(i); if ((c < 0x20 || c > 0xff) && c != 0x09) { throw new IllegalArgumentException(String.format("String '%s' contains...
[ "@", "Override", "public", "String", "valueString", "(", "String", "headerValue", ")", "{", "// make sure the value is valid", "for", "(", "int", "i", "=", "0", ",", "count", "=", "headerValue", ".", "length", "(", ")", ";", "i", "<", "count", ";", "++", ...
{@inheritDoc} <p /> The given headerValue must not contain any characters that are not allowed in headers. Basically that means only characters in the ASCII range 0x20-0xff and the tab character (0x09) are allowed. <pre> field-value = *( field-content / obs-fold ) field-content = field-vchar [ 1*( SP / HTAB ) fiel...
[ "{", "@inheritDoc", "}", "<p", "/", ">", "The", "given", "headerValue", "must", "not", "contain", "any", "characters", "that", "are", "not", "allowed", "in", "headers", ".", "Basically", "that", "means", "only", "characters", "in", "the", "ASCII", "range", ...
train
https://github.com/dmfs/http-client-interfaces/blob/10896c71270ccaf32ac4ed5d706dfa0001fd3862/src/org/dmfs/httpclientinterfaces/headers/impl/StringHeaderValueConverter.java#L60-L74
spring-cloud/spring-cloud-aws
spring-cloud-aws-context/src/main/java/org/springframework/cloud/aws/cache/memcached/SimpleSpringMemcached.java
SimpleSpringMemcached.putIfAbsent
@Override public ValueWrapper putIfAbsent(Object key, Object value) { """ <b>IMPORTANT:</b> This operation is not atomic as the underlying implementation (memcached) does not provide a way to do it. """ Assert.notNull(key, "key parameter is mandatory"); Assert.isAssignable(String.class, key.getClass()); ...
java
@Override public ValueWrapper putIfAbsent(Object key, Object value) { Assert.notNull(key, "key parameter is mandatory"); Assert.isAssignable(String.class, key.getClass()); ValueWrapper valueWrapper = get(key); if (valueWrapper == null) { try { this.memcachedClientIF.add((String) key, this.expiration, v...
[ "@", "Override", "public", "ValueWrapper", "putIfAbsent", "(", "Object", "key", ",", "Object", "value", ")", "{", "Assert", ".", "notNull", "(", "key", ",", "\"key parameter is mandatory\"", ")", ";", "Assert", ".", "isAssignable", "(", "String", ".", "class",...
<b>IMPORTANT:</b> This operation is not atomic as the underlying implementation (memcached) does not provide a way to do it.
[ "<b", ">", "IMPORTANT", ":", "<", "/", "b", ">", "This", "operation", "is", "not", "atomic", "as", "the", "underlying", "implementation", "(", "memcached", ")", "does", "not", "provide", "a", "way", "to", "do", "it", "." ]
train
https://github.com/spring-cloud/spring-cloud-aws/blob/26f7ca6c29ac66922f64b37c2bc5ce6f842462ee/spring-cloud-aws-context/src/main/java/org/springframework/cloud/aws/cache/memcached/SimpleSpringMemcached.java#L115-L136
qiniu/java-sdk
src/main/java/com/qiniu/streaming/UrlFactory.java
UrlFactory.rtmpPublishUrl
public String rtmpPublishUrl(String streamKey, int expireAfterSeconds) { """ 生成带有效期鉴权的RTMP推流地址 @param streamKey 流名称 @param expireAfterSeconds 流过期时间,单位秒 """ long expire = System.currentTimeMillis() / 1000 + expireAfterSeconds; String path = String.format("/%s/%s?e=%d", hub, streamKe...
java
public String rtmpPublishUrl(String streamKey, int expireAfterSeconds) { long expire = System.currentTimeMillis() / 1000 + expireAfterSeconds; String path = String.format("/%s/%s?e=%d", hub, streamKey, expire); String token; try { token = auth.sign(path); } catch (Exc...
[ "public", "String", "rtmpPublishUrl", "(", "String", "streamKey", ",", "int", "expireAfterSeconds", ")", "{", "long", "expire", "=", "System", ".", "currentTimeMillis", "(", ")", "/", "1000", "+", "expireAfterSeconds", ";", "String", "path", "=", "String", "."...
生成带有效期鉴权的RTMP推流地址 @param streamKey 流名称 @param expireAfterSeconds 流过期时间,单位秒
[ "生成带有效期鉴权的RTMP推流地址" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/streaming/UrlFactory.java#L74-L85
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.setBoolean
public void setBoolean(Element el, String key, boolean value) { """ sets a boolean value to a XML Element @param el Element to set value on it @param key key to set @param value value to set """ el.setAttribute(key, String.valueOf(value)); }
java
public void setBoolean(Element el, String key, boolean value) { el.setAttribute(key, String.valueOf(value)); }
[ "public", "void", "setBoolean", "(", "Element", "el", ",", "String", "key", ",", "boolean", "value", ")", "{", "el", ".", "setAttribute", "(", "key", ",", "String", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
sets a boolean value to a XML Element @param el Element to set value on it @param key key to set @param value value to set
[ "sets", "a", "boolean", "value", "to", "a", "XML", "Element" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L390-L392
couchbase/java-dcp-client
src/main/java/com/couchbase/client/dcp/state/SessionState.java
SessionState.rollbackToPosition
public void rollbackToPosition(short partition, long seqno) { """ Helper method to rollback the given partition to the given sequence number. <p> This will set the seqno AND REMOVE ALL ENTRIES from the failover log that are higher than the given sequence number! @param partition the partition to rollback @p...
java
public void rollbackToPosition(short partition, long seqno) { PartitionState ps = partitionStates.get(partition); ps.setStartSeqno(seqno); ps.setSnapshotStartSeqno(seqno); ps.setSnapshotEndSeqno(seqno); List<FailoverLogEntry> failoverLog = ps.getFailoverLog(); Iterator<FailoverLogEntry> flogIter...
[ "public", "void", "rollbackToPosition", "(", "short", "partition", ",", "long", "seqno", ")", "{", "PartitionState", "ps", "=", "partitionStates", ".", "get", "(", "partition", ")", ";", "ps", ".", "setStartSeqno", "(", "seqno", ")", ";", "ps", ".", "setSn...
Helper method to rollback the given partition to the given sequence number. <p> This will set the seqno AND REMOVE ALL ENTRIES from the failover log that are higher than the given sequence number! @param partition the partition to rollback @param seqno the sequence number where to roll it back to.
[ "Helper", "method", "to", "rollback", "the", "given", "partition", "to", "the", "given", "sequence", "number", ".", "<p", ">", "This", "will", "set", "the", "seqno", "AND", "REMOVE", "ALL", "ENTRIES", "from", "the", "failover", "log", "that", "are", "highe...
train
https://github.com/couchbase/java-dcp-client/blob/75359d8c081d6c575f8087cf7c28d24ab24c6421/src/main/java/com/couchbase/client/dcp/state/SessionState.java#L165-L182
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/widget/LoginButton.java
LoginButton.onActivityResult
public boolean onActivityResult(int requestCode, int resultCode, Intent data) { """ Provides an implementation for {@link Activity#onActivityResult onActivityResult} that updates the Session based on information returned during the authorization flow. The Activity containing this view should forward the resulti...
java
public boolean onActivityResult(int requestCode, int resultCode, Intent data) { Session session = sessionTracker.getSession(); if (session != null) { return session.onActivityResult((Activity)getContext(), requestCode, resultCode, data); } else { retur...
[ "public", "boolean", "onActivityResult", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "data", ")", "{", "Session", "session", "=", "sessionTracker", ".", "getSession", "(", ")", ";", "if", "(", "session", "!=", "null", ")", "{", "ret...
Provides an implementation for {@link Activity#onActivityResult onActivityResult} that updates the Session based on information returned during the authorization flow. The Activity containing this view should forward the resulting onActivityResult call here to update the Session state based on the contents of the resul...
[ "Provides", "an", "implementation", "for", "{", "@link", "Activity#onActivityResult", "onActivityResult", "}", "that", "updates", "the", "Session", "based", "on", "information", "returned", "during", "the", "authorization", "flow", ".", "The", "Activity", "containing"...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/widget/LoginButton.java#L579-L587
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java
Partitioner.createUserSpecifiedPartitions
private List<Partition> createUserSpecifiedPartitions() { """ Generate the partitions based on the lists specified by the user in job config """ List<Partition> partitions = new ArrayList<>(); List<String> watermarkPoints = state.getPropAsList(USER_SPECIFIED_PARTITIONS); boolean isEarlyStopped = ...
java
private List<Partition> createUserSpecifiedPartitions() { List<Partition> partitions = new ArrayList<>(); List<String> watermarkPoints = state.getPropAsList(USER_SPECIFIED_PARTITIONS); boolean isEarlyStopped = state.getPropAsBoolean(IS_EARLY_STOPPED); if (watermarkPoints == null || watermarkPoints.si...
[ "private", "List", "<", "Partition", ">", "createUserSpecifiedPartitions", "(", ")", "{", "List", "<", "Partition", ">", "partitions", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "String", ">", "watermarkPoints", "=", "state", ".", "getPropAsL...
Generate the partitions based on the lists specified by the user in job config
[ "Generate", "the", "partitions", "based", "on", "the", "lists", "specified", "by", "the", "user", "in", "job", "config" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java#L222-L276
restfb/restfb
src/main/java/com/restfb/util/UrlUtils.java
UrlUtils.removeQueryParameter
public static String removeQueryParameter(String url, String key) { """ Remove the given key from the url query string and return the new URL as String. @param url The URL from which parameters are extracted. @param key the key, that should be removed @return the modified URL as String """ String[] ...
java
public static String removeQueryParameter(String url, String key) { String[] urlParts = url.split("\\?"); if (urlParts.length == 2) { Map<String, List<String>> paramMap = extractParametersFromQueryString(urlParts[1]); if (paramMap.containsKey(key)) { String queryValue = paramMap.get(key).ge...
[ "public", "static", "String", "removeQueryParameter", "(", "String", "url", ",", "String", "key", ")", "{", "String", "[", "]", "urlParts", "=", "url", ".", "split", "(", "\"\\\\?\"", ")", ";", "if", "(", "urlParts", ".", "length", "==", "2", ")", "{",...
Remove the given key from the url query string and return the new URL as String. @param url The URL from which parameters are extracted. @param key the key, that should be removed @return the modified URL as String
[ "Remove", "the", "given", "key", "from", "the", "url", "query", "string", "and", "return", "the", "new", "URL", "as", "String", "." ]
train
https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/UrlUtils.java#L204-L223
apache/flink
flink-core/src/main/java/org/apache/flink/util/AbstractID.java
AbstractID.byteArrayToLong
private static long byteArrayToLong(byte[] ba, int offset) { """ Converts the given byte array to a long. @param ba the byte array to be converted @param offset the offset indicating at which byte inside the array the conversion shall begin @return the long variable """ long l = 0; for (int i = 0; i ...
java
private static long byteArrayToLong(byte[] ba, int offset) { long l = 0; for (int i = 0; i < SIZE_OF_LONG; ++i) { l |= (ba[offset + SIZE_OF_LONG - 1 - i] & 0xffL) << (i << 3); } return l; }
[ "private", "static", "long", "byteArrayToLong", "(", "byte", "[", "]", "ba", ",", "int", "offset", ")", "{", "long", "l", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "SIZE_OF_LONG", ";", "++", "i", ")", "{", "l", "|=", "(", ...
Converts the given byte array to a long. @param ba the byte array to be converted @param offset the offset indicating at which byte inside the array the conversion shall begin @return the long variable
[ "Converts", "the", "given", "byte", "array", "to", "a", "long", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/AbstractID.java#L193-L201
google/closure-templates
java/src/com/google/template/soy/internal/i18n/BidiFormatter.java
BidiFormatter.markAfter
public String markAfter(@Nullable Dir dir, String str, boolean isHtml) { """ Returns a Unicode bidi mark matching the context directionality (LRM or RLM) if either the overall or the exit directionality of a given string is opposite to the context directionality. Putting this after the string (including its dire...
java
public String markAfter(@Nullable Dir dir, String str, boolean isHtml) { if (dir == null) { dir = estimateDirection(str, isHtml); } // BidiUtils.getExitDir() is called only if needed (short-circuit). if (contextDir == Dir.LTR && (dir == Dir.RTL || BidiUtils.getExitDir(str, isHtml) == Dir.RTL)) { ...
[ "public", "String", "markAfter", "(", "@", "Nullable", "Dir", "dir", ",", "String", "str", ",", "boolean", "isHtml", ")", "{", "if", "(", "dir", "==", "null", ")", "{", "dir", "=", "estimateDirection", "(", "str", ",", "isHtml", ")", ";", "}", "// Bi...
Returns a Unicode bidi mark matching the context directionality (LRM or RLM) if either the overall or the exit directionality of a given string is opposite to the context directionality. Putting this after the string (including its directionality declaration wrapping) prevents it from "sticking" to other opposite-direc...
[ "Returns", "a", "Unicode", "bidi", "mark", "matching", "the", "context", "directionality", "(", "LRM", "or", "RLM", ")", "if", "either", "the", "overall", "or", "the", "exit", "directionality", "of", "a", "given", "string", "is", "opposite", "to", "the", "...
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/i18n/BidiFormatter.java#L223-L235
lukas-krecan/JsonUnit
json-unit/src/main/java/net/javacrumbs/jsonunit/JsonMatchers.java
JsonMatchers.jsonStringPartEquals
public static ConfigurableJsonMatcher<String> jsonStringPartEquals(String path, Object expected) { """ Is the part of the JSON equivalent? <p/> This method exist only for those cases, when you need to use it as Matcher&lt;String&gt; and Java refuses to do the type inference correctly. """ return jso...
java
public static ConfigurableJsonMatcher<String> jsonStringPartEquals(String path, Object expected) { return jsonPartEquals(path, expected); }
[ "public", "static", "ConfigurableJsonMatcher", "<", "String", ">", "jsonStringPartEquals", "(", "String", "path", ",", "Object", "expected", ")", "{", "return", "jsonPartEquals", "(", "path", ",", "expected", ")", ";", "}" ]
Is the part of the JSON equivalent? <p/> This method exist only for those cases, when you need to use it as Matcher&lt;String&gt; and Java refuses to do the type inference correctly.
[ "Is", "the", "part", "of", "the", "JSON", "equivalent?", "<p", "/", ">", "This", "method", "exist", "only", "for", "those", "cases", "when", "you", "need", "to", "use", "it", "as", "Matcher&lt", ";", "String&gt", ";", "and", "Java", "refuses", "to", "d...
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit/src/main/java/net/javacrumbs/jsonunit/JsonMatchers.java#L90-L92
podio/podio-java
src/main/java/com/podio/file/FileAPI.java
FileAPI.downloadFile
public void downloadFile(int fileId, java.io.File target, FileSize size) throws IOException { """ Downloads the file and saves it to given file @param fileId The id of the file to download @param target The target file to save the contents to @throws IOException If there was an error reading or writing ...
java
public void downloadFile(int fileId, java.io.File target, FileSize size) throws IOException { WebResource builder = getResourceFactory() .getFileResource("/" + fileId); if (size != null) { builder = builder.path("/" + size.name().toLowerCase()); } byte[] data = builder.get(byte[].class); FileUtils.w...
[ "public", "void", "downloadFile", "(", "int", "fileId", ",", "java", ".", "io", ".", "File", "target", ",", "FileSize", "size", ")", "throws", "IOException", "{", "WebResource", "builder", "=", "getResourceFactory", "(", ")", ".", "getFileResource", "(", "\"...
Downloads the file and saves it to given file @param fileId The id of the file to download @param target The target file to save the contents to @throws IOException If there was an error reading or writing the file
[ "Downloads", "the", "file", "and", "saves", "it", "to", "given", "file" ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/file/FileAPI.java#L40-L49
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.getColumnDefByName
private ColumnDef getColumnDefByName(CfDef columnFamily, ByteBuffer columnName) { """ Get specific ColumnDef in column family meta data by column name @param columnFamily - CfDef record @param columnName - column name represented as byte[] @return ColumnDef - found column definition """ for (Col...
java
private ColumnDef getColumnDefByName(CfDef columnFamily, ByteBuffer columnName) { for (ColumnDef columnDef : columnFamily.getColumn_metadata()) { byte[] currName = columnDef.getName(); if (ByteBufferUtil.compare(currName, columnName) == 0) { retur...
[ "private", "ColumnDef", "getColumnDefByName", "(", "CfDef", "columnFamily", ",", "ByteBuffer", "columnName", ")", "{", "for", "(", "ColumnDef", "columnDef", ":", "columnFamily", ".", "getColumn_metadata", "(", ")", ")", "{", "byte", "[", "]", "currName", "=", ...
Get specific ColumnDef in column family meta data by column name @param columnFamily - CfDef record @param columnName - column name represented as byte[] @return ColumnDef - found column definition
[ "Get", "specific", "ColumnDef", "in", "column", "family", "meta", "data", "by", "column", "name" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2877-L2890
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java
CommonHelper.areEqualsIgnoreCaseAndTrim
public static boolean areEqualsIgnoreCaseAndTrim(final String s1, final String s2) { """ Compare two String to see if they are equals ignoring the case and the blank spaces (both null is ok). @param s1 string @param s2 string @return if two String are equals ignoring the case and the blank spaces """ ...
java
public static boolean areEqualsIgnoreCaseAndTrim(final String s1, final String s2) { if (s1 == null && s2 == null) { return true; } else if (s1 != null && s2 != null) { return s1.trim().equalsIgnoreCase(s2.trim()); } else { return false; } }
[ "public", "static", "boolean", "areEqualsIgnoreCaseAndTrim", "(", "final", "String", "s1", ",", "final", "String", "s2", ")", "{", "if", "(", "s1", "==", "null", "&&", "s2", "==", "null", ")", "{", "return", "true", ";", "}", "else", "if", "(", "s1", ...
Compare two String to see if they are equals ignoring the case and the blank spaces (both null is ok). @param s1 string @param s2 string @return if two String are equals ignoring the case and the blank spaces
[ "Compare", "two", "String", "to", "see", "if", "they", "are", "equals", "ignoring", "the", "case", "and", "the", "blank", "spaces", "(", "both", "null", "is", "ok", ")", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java#L63-L71
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java
AuthorizationRequestManager.onFailure
@Override public void onFailure(Response response, Throwable t, JSONObject extendedInfo) { """ Called when request fails. @param response Contains detail regarding why the request failed @param t Exception that could have caused the request to fail. Null if no Exception thrown. """ if (i...
java
@Override public void onFailure(Response response, Throwable t, JSONObject extendedInfo) { if (isAuthorizationRequired(response)) { processResponseWrapper(response, true); } else { listener.onFailure(response, t, extendedInfo); } }
[ "@", "Override", "public", "void", "onFailure", "(", "Response", "response", ",", "Throwable", "t", ",", "JSONObject", "extendedInfo", ")", "{", "if", "(", "isAuthorizationRequired", "(", "response", ")", ")", "{", "processResponseWrapper", "(", "response", ",",...
Called when request fails. @param response Contains detail regarding why the request failed @param t Exception that could have caused the request to fail. Null if no Exception thrown.
[ "Called", "when", "request", "fails", "." ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java#L541-L548
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
SessionDataManager.getItem
public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException { """ Return item by absolute path in this transient storage then in workspace container. @param path - absolute path to the searched item @param pool - indicates does the item fall in pool @return existed item or null if not found...
java
public ItemImpl getItem(QPath path, boolean pool) throws RepositoryException { long start = 0; if (LOG.isDebugEnabled()) { start = System.currentTimeMillis(); LOG.debug("getItem(" + path.getAsString() + " ) >>>>>"); } ItemImpl item = null; try { r...
[ "public", "ItemImpl", "getItem", "(", "QPath", "path", ",", "boolean", "pool", ")", "throws", "RepositoryException", "{", "long", "start", "=", "0", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "start", "=", "System", ".", "currentTi...
Return item by absolute path in this transient storage then in workspace container. @param path - absolute path to the searched item @param pool - indicates does the item fall in pool @return existed item or null if not found @throws RepositoryException
[ "Return", "item", "by", "absolute", "path", "in", "this", "transient", "storage", "then", "in", "workspace", "container", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L546-L568
sstrickx/yahoofinance-api
src/main/java/yahoofinance/Stock.java
Stock.getSplitHistory
public List<HistoricalSplit> getSplitHistory(Calendar from, Calendar to) throws IOException { """ Requests the historical splits for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value </ul> @param from start date of the historical data @param to...
java
public List<HistoricalSplit> getSplitHistory(Calendar from, Calendar to) throws IOException { if(YahooFinance.HISTQUOTES2_ENABLED.equalsIgnoreCase("true")) { HistSplitsRequest histSplit = new HistSplitsRequest(this.symbol, from, to); this.setSplitHistory(histSplit.getResult()); }...
[ "public", "List", "<", "HistoricalSplit", ">", "getSplitHistory", "(", "Calendar", "from", ",", "Calendar", "to", ")", "throws", "IOException", "{", "if", "(", "YahooFinance", ".", "HISTQUOTES2_ENABLED", ".", "equalsIgnoreCase", "(", "\"true\"", ")", ")", "{", ...
Requests the historical splits for this stock with the following characteristics. <ul> <li> from: specified value <li> to: specified value </ul> @param from start date of the historical data @param to end date of the historical data @return a list of historical splits from this stock @...
[ "Requests", "the", "historical", "splits", "for", "this", "stock", "with", "the", "following", "characteristics", ".", "<ul", ">", "<li", ">", "from", ":", "specified", "value", "<li", ">", "to", ":", "specified", "value", "<", "/", "ul", ">" ]
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/Stock.java#L470-L479
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java
Connectors.addProjection
public synchronized void addProjection( String externalNodeKey, String projectedNodeKey, String alias, SessionCache systemSession) { """ Stores a mapping from an external node towards...
java
public synchronized void addProjection( String externalNodeKey, String projectedNodeKey, String alias, SessionCache systemSession) { Projection projection = new Projection(external...
[ "public", "synchronized", "void", "addProjection", "(", "String", "externalNodeKey", ",", "String", "projectedNodeKey", ",", "String", "alias", ",", "SessionCache", "systemSession", ")", "{", "Projection", "projection", "=", "new", "Projection", "(", "externalNodeKey"...
Stores a mapping from an external node towards an existing, internal node which will become a federated node. These projections are created via {@link org.modeshape.jcr.api.federation.FederationManager#createProjection(String, String, String, String)} and need to be stored so that parent back references (from the proje...
[ "Stores", "a", "mapping", "from", "an", "external", "node", "towards", "an", "existing", "internal", "node", "which", "will", "become", "a", "federated", "node", ".", "These", "projections", "are", "created", "via", "{", "@link", "org", ".", "modeshape", "."...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/Connectors.java#L379-L388
openbase/jul
visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java
Animations.createRotateTransition
public static RotateTransition createRotateTransition(final Node node, final double fromAngle, final double toAngle, final int cycleCount, final double duration, final Interpolator interpolator, final boolean autoReverse) { """ Method to create a RotateTransition with several parameters. @param node the node to...
java
public static RotateTransition createRotateTransition(final Node node, final double fromAngle, final double toAngle, final int cycleCount, final double duration, final Interpolator interpolator, final boolean autoReverse) { assert node != null; final RotateTransition rotateTransition = new Rota...
[ "public", "static", "RotateTransition", "createRotateTransition", "(", "final", "Node", "node", ",", "final", "double", "fromAngle", ",", "final", "double", "toAngle", ",", "final", "int", "cycleCount", ",", "final", "double", "duration", ",", "final", "Interpolat...
Method to create a RotateTransition with several parameters. @param node the node to which the transition should be applied. @param fromAngle the rotation angle where the transition should start. @param toAngle the rotation angle where the transition should end. @param cycleCount the number of times the animation shou...
[ "Method", "to", "create", "a", "RotateTransition", "with", "several", "parameters", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/animation/Animations.java#L89-L99