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
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/runtime/ScriptRunner.java
ScriptRunner.run
public TaskResponse run(Element m, TaskRequest req) { """ Invokes the script defined by the specified element with the specified <code>TaskRequest</code>. @param m An <code>Element</code> that defines a Task. @param req A <code>TaskRequest</code> prepared externally. @return The <code>TaskResponse</code> tha...
java
public TaskResponse run(Element m, TaskRequest req) { // Assertions. if (m == null) { String msg = "Argument 'm [Element]' cannot be null."; throw new IllegalArgumentException(msg); } return run(compileTask(m), req); }
[ "public", "TaskResponse", "run", "(", "Element", "m", ",", "TaskRequest", "req", ")", "{", "// Assertions.", "if", "(", "m", "==", "null", ")", "{", "String", "msg", "=", "\"Argument 'm [Element]' cannot be null.\"", ";", "throw", "new", "IllegalArgumentException"...
Invokes the script defined by the specified element with the specified <code>TaskRequest</code>. @param m An <code>Element</code> that defines a Task. @param req A <code>TaskRequest</code> prepared externally. @return The <code>TaskResponse</code> that results from invoking the specified script.
[ "Invokes", "the", "script", "defined", "by", "the", "specified", "element", "with", "the", "specified", "<code", ">", "TaskRequest<", "/", "code", ">", "." ]
train
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/runtime/ScriptRunner.java#L171-L181
pravega/pravega
controller/src/main/java/io/pravega/controller/fault/SegmentMonitorLeader.java
SegmentMonitorLeader.takeLeadership
@Override @Synchronized public void takeLeadership(CuratorFramework client) throws Exception { """ This function is called when the current instance is made the leader. The leadership is relinquished when this function exits. @param client The curator client. @throws Exception On any error. ...
java
@Override @Synchronized public void takeLeadership(CuratorFramework client) throws Exception { log.info("Obtained leadership to monitor the Host to Segment Container Mapping"); //Attempt a rebalance whenever leadership is obtained to ensure no host events are missed. hostsChange.release...
[ "@", "Override", "@", "Synchronized", "public", "void", "takeLeadership", "(", "CuratorFramework", "client", ")", "throws", "Exception", "{", "log", ".", "info", "(", "\"Obtained leadership to monitor the Host to Segment Container Mapping\"", ")", ";", "//Attempt a rebalanc...
This function is called when the current instance is made the leader. The leadership is relinquished when this function exits. @param client The curator client. @throws Exception On any error. This would result in leadership being relinquished.
[ "This", "function", "is", "called", "when", "the", "current", "instance", "is", "made", "the", "leader", ".", "The", "leadership", "is", "relinquished", "when", "this", "function", "exits", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/fault/SegmentMonitorLeader.java#L108-L173
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <R> Func0<Observable<R>> toAsync(final Func0<? extends R> func, final Scheduler scheduler) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.s.png" al...
java
public static <R> Func0<Observable<R>> toAsync(final Func0<? extends R> func, final Scheduler scheduler) { return new Func0<Observable<R>>() { @Override public Observable<R> call() { return startCallable(func, scheduler); } }; }
[ "public", "static", "<", "R", ">", "Func0", "<", "Observable", "<", "R", ">", ">", "toAsync", "(", "final", "Func0", "<", "?", "extends", "R", ">", "func", ",", "final", "Scheduler", "scheduler", ")", "{", "return", "new", "Func0", "<", "Observable", ...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.s.png" alt=""> @param <R> the result type @param func the function to convert @param scheduler the Scheduler used to call the ...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L779-L786
box/box-java-sdk
src/main/java/com/box/sdk/BoxTrash.java
BoxTrash.restoreFolder
public BoxFolder.Info restoreFolder(String folderID) { """ Restores a trashed folder back to its original location. @param folderID the ID of the trashed folder. @return info about the restored folder. """ URL url = RESTORE_FOLDER_URL_TEMPLATE.build(this.api.getBaseURL(), folderID); ...
java
public BoxFolder.Info restoreFolder(String folderID) { URL url = RESTORE_FOLDER_URL_TEMPLATE.build(this.api.getBaseURL(), folderID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "POST"); JsonObject requestJSON = new JsonObject() .add("", ""); request.setBody(r...
[ "public", "BoxFolder", ".", "Info", "restoreFolder", "(", "String", "folderID", ")", "{", "URL", "url", "=", "RESTORE_FOLDER_URL_TEMPLATE", ".", "build", "(", "this", ".", "api", ".", "getBaseURL", "(", ")", ",", "folderID", ")", ";", "BoxAPIRequest", "reque...
Restores a trashed folder back to its original location. @param folderID the ID of the trashed folder. @return info about the restored folder.
[ "Restores", "a", "trashed", "folder", "back", "to", "its", "original", "location", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L97-L108
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.validIndex
public static <T extends Collection<?>> T validIndex(final T collection, final int index) { """ <p>Validates that the index is within the bounds of the argument collection; otherwise throwing an exception.</p> <pre>Validate.validIndex(myCollection, 2);</pre> <p>If the index is invalid, then the message of t...
java
public static <T extends Collection<?>> T validIndex(final T collection, final int index) { return validIndex(collection, index, DEFAULT_VALID_INDEX_COLLECTION_EX_MESSAGE, Integer.valueOf(index)); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "validIndex", "(", "final", "T", "collection", ",", "final", "int", "index", ")", "{", "return", "validIndex", "(", "collection", ",", "index", ",", "DEFAULT_VALID_INDEX_COLLECTI...
<p>Validates that the index is within the bounds of the argument collection; otherwise throwing an exception.</p> <pre>Validate.validIndex(myCollection, 2);</pre> <p>If the index is invalid, then the message of the exception is &quot;The validated collection index is invalid: &quot; followed by the index.</p> @param...
[ "<p", ">", "Validates", "that", "the", "index", "is", "within", "the", "bounds", "of", "the", "argument", "collection", ";", "otherwise", "throwing", "an", "exception", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L724-L726
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
NetworkEnvironmentConfiguration.calculateNewNetworkBufferMemory
private static long calculateNewNetworkBufferMemory(Configuration config, long networkBufSize, long maxJvmHeapMemory) { """ Calculates the amount of memory used for network buffers based on the total memory to use and the according configuration parameters. <p>The following configuration parameters are involve...
java
private static long calculateNewNetworkBufferMemory(Configuration config, long networkBufSize, long maxJvmHeapMemory) { float networkBufFraction = config.getFloat(TaskManagerOptions.NETWORK_BUFFERS_MEMORY_FRACTION); long networkBufMin = MemorySize.parse(config.getString(TaskManagerOptions.NETWORK_BUFFERS_MEMORY_MIN...
[ "private", "static", "long", "calculateNewNetworkBufferMemory", "(", "Configuration", "config", ",", "long", "networkBufSize", ",", "long", "maxJvmHeapMemory", ")", "{", "float", "networkBufFraction", "=", "config", ".", "getFloat", "(", "TaskManagerOptions", ".", "NE...
Calculates the amount of memory used for network buffers based on the total memory to use and the according configuration parameters. <p>The following configuration parameters are involved: <ul> <li>{@link TaskManagerOptions#NETWORK_BUFFERS_MEMORY_FRACTION},</li> <li>{@link TaskManagerOptions#NETWORK_BUFFERS_MEMORY_MI...
[ "Calculates", "the", "amount", "of", "memory", "used", "for", "network", "buffers", "based", "on", "the", "total", "memory", "to", "use", "and", "the", "according", "configuration", "parameters", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java#L278-L298
zxing/zxing
core/src/main/java/com/google/zxing/oned/ITFReader.java
ITFReader.validateQuietZone
private void validateQuietZone(BitArray row, int startPattern) throws NotFoundException { """ The start & end patterns must be pre/post fixed by a quiet zone. This zone must be at least 10 times the width of a narrow line. Scan back until we either get to the start of the barcode or match the necessary number o...
java
private void validateQuietZone(BitArray row, int startPattern) throws NotFoundException { int quietCount = this.narrowLineWidth * 10; // expect to find this many pixels of quiet zone // if there are not so many pixel at all let's try as many as possible quietCount = quietCount < startPattern ? quietCount...
[ "private", "void", "validateQuietZone", "(", "BitArray", "row", ",", "int", "startPattern", ")", "throws", "NotFoundException", "{", "int", "quietCount", "=", "this", ".", "narrowLineWidth", "*", "10", ";", "// expect to find this many pixels of quiet zone", "// if ther...
The start & end patterns must be pre/post fixed by a quiet zone. This zone must be at least 10 times the width of a narrow line. Scan back until we either get to the start of the barcode or match the necessary number of quiet zone pixels. Note: Its assumed the row is reversed when using this method to find quiet zone...
[ "The", "start", "&", "end", "patterns", "must", "be", "pre", "/", "post", "fixed", "by", "a", "quiet", "zone", ".", "This", "zone", "must", "be", "at", "least", "10", "times", "the", "width", "of", "a", "narrow", "line", ".", "Scan", "back", "until",...
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/oned/ITFReader.java#L228-L245
molgenis/molgenis
molgenis-data-cache/src/main/java/org/molgenis/data/cache/l2/L2Cache.java
L2Cache.get
public Entity get(Repository<Entity> repository, Object id) { """ Retrieves an entity from the cache or the underlying repository. @param repository the underlying repository @param id the ID of the entity to retrieve @return the retrieved Entity, or null if the entity is not present. @throws com.google.comm...
java
public Entity get(Repository<Entity> repository, Object id) { LoadingCache<Object, Optional<Map<String, Object>>> cache = getEntityCache(repository); EntityType entityType = repository.getEntityType(); return cache.getUnchecked(id).map(e -> entityHydration.hydrate(e, entityType)).orElse(null); }
[ "public", "Entity", "get", "(", "Repository", "<", "Entity", ">", "repository", ",", "Object", "id", ")", "{", "LoadingCache", "<", "Object", ",", "Optional", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "cache", "=", "getEntityCache", "(", ...
Retrieves an entity from the cache or the underlying repository. @param repository the underlying repository @param id the ID of the entity to retrieve @return the retrieved Entity, or null if the entity is not present. @throws com.google.common.util.concurrent.UncheckedExecutionException if the repository throws an e...
[ "Retrieves", "an", "entity", "from", "the", "cache", "or", "the", "underlying", "repository", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-cache/src/main/java/org/molgenis/data/cache/l2/L2Cache.java#L87-L91
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.importKeyAsync
public ServiceFuture<KeyBundle> importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map<String, String> tags, final ServiceCallback<KeyBundle> serviceCallback) { """ Imports an externally created key, stores it, and returns key parameters and attributes to ...
java
public ServiceFuture<KeyBundle> importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map<String, String> tags, final ServiceCallback<KeyBundle> serviceCallback) { return ServiceFuture.fromResponse(importKeyWithServiceResponseAsync(vaultBaseUrl, keyName, k...
[ "public", "ServiceFuture", "<", "KeyBundle", ">", "importKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "JsonWebKey", "key", ",", "Boolean", "hsm", ",", "KeyAttributes", "keyAttributes", ",", "Map", "<", "String", ",", "String", ">", ...
Imports an externally created key, stores it, and returns key parameters and attributes to the client. The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key. This operation requires the keys/import permissio...
[ "Imports", "an", "externally", "created", "key", "stores", "it", "and", "returns", "key", "parameters", "and", "attributes", "to", "the", "client", ".", "The", "import", "key", "operation", "may", "be", "used", "to", "import", "any", "key", "type", "into", ...
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#L994-L996
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java
DubiousListCollection.getFieldFromStack
@Nullable private static XField getFieldFromStack(final OpcodeStack stk, final String signature) { """ return the field object that the current method was called on, by finding the reference down in the stack based on the number of parameters @param stk the opcode stack where fields are stored @param s...
java
@Nullable private static XField getFieldFromStack(final OpcodeStack stk, final String signature) { int parmCount = SignatureUtils.getNumParameters(signature); if (stk.getStackDepth() > parmCount) { OpcodeStack.Item itm = stk.getStackItem(parmCount); return itm.getXField(); } return null; }
[ "@", "Nullable", "private", "static", "XField", "getFieldFromStack", "(", "final", "OpcodeStack", "stk", ",", "final", "String", "signature", ")", "{", "int", "parmCount", "=", "SignatureUtils", ".", "getNumParameters", "(", "signature", ")", ";", "if", "(", "...
return the field object that the current method was called on, by finding the reference down in the stack based on the number of parameters @param stk the opcode stack where fields are stored @param signature the signature of the called method @return the field annotation for the field whose method was executed
[ "return", "the", "field", "object", "that", "the", "current", "method", "was", "called", "on", "by", "finding", "the", "reference", "down", "in", "the", "stack", "based", "on", "the", "number", "of", "parameters" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java#L229-L237
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readNormalDay
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay) { """ This method extracts data for a normal working day from an MSPDI file. @param calendar Calendar data @param weekDay Day data """ int dayNumber = weekDay.getDayType().intValue(); Day d...
java
private void readNormalDay(ProjectCalendar calendar, Project.Calendars.Calendar.WeekDays.WeekDay weekDay) { int dayNumber = weekDay.getDayType().intValue(); Day day = Day.getInstance(dayNumber); calendar.setWorkingDay(day, BooleanHelper.getBoolean(weekDay.isDayWorking())); ProjectCalendarHour...
[ "private", "void", "readNormalDay", "(", "ProjectCalendar", "calendar", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "WeekDays", ".", "WeekDay", "weekDay", ")", "{", "int", "dayNumber", "=", "weekDay", ".", "getDayType", "(", ")", ".", "intValue", ...
This method extracts data for a normal working day from an MSPDI file. @param calendar Calendar data @param weekDay Day data
[ "This", "method", "extracts", "data", "for", "a", "normal", "working", "day", "from", "an", "MSPDI", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L516-L542
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/ReceiptTemplateBuilder.java
ReceiptTemplateBuilder.addQuickReply
public ReceiptTemplateBuilder addQuickReply(String title, String payload) { """ Adds a {@link QuickReply} to the current object. @param title the quick reply button label. It can't be empty. @param payload the payload sent back when the button is pressed. It can't be empty. @return this builder. @see <a h...
java
public ReceiptTemplateBuilder addQuickReply(String title, String payload) { this.messageBuilder.addQuickReply(title, payload); return this; }
[ "public", "ReceiptTemplateBuilder", "addQuickReply", "(", "String", "title", ",", "String", "payload", ")", "{", "this", ".", "messageBuilder", ".", "addQuickReply", "(", "title", ",", "payload", ")", ";", "return", "this", ";", "}" ]
Adds a {@link QuickReply} to the current object. @param title the quick reply button label. It can't be empty. @param payload the payload sent back when the button is pressed. It can't be empty. @return this builder. @see <a href= "https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replie...
[ "Adds", "a", "{", "@link", "QuickReply", "}", "to", "the", "current", "object", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/ReceiptTemplateBuilder.java#L245-L248
Appendium/objectlabkit
datecalc-jdk8/src/main/java/net/objectlab/kit/datecalc/jdk8/Jdk8WorkingWeek.java
Jdk8WorkingWeek.withWorkingDayFromDateTimeConstant
public Jdk8WorkingWeek withWorkingDayFromDateTimeConstant(final boolean working, final DayOfWeek givenDayOfWeek) { """ Return a new JodaWorkingWeek if the status for the given day has changed. @param working true if working day @param givenDayOfWeek e.g. DateTimeConstants.MONDAY, DateTimeConstants.TUESDAY, e...
java
public Jdk8WorkingWeek withWorkingDayFromDateTimeConstant(final boolean working, final DayOfWeek givenDayOfWeek) { final int dayOfWeek = jdk8ToCalendarDayConstant(givenDayOfWeek); return new Jdk8WorkingWeek(super.withWorkingDayFromCalendar(working, dayOfWeek)); }
[ "public", "Jdk8WorkingWeek", "withWorkingDayFromDateTimeConstant", "(", "final", "boolean", "working", ",", "final", "DayOfWeek", "givenDayOfWeek", ")", "{", "final", "int", "dayOfWeek", "=", "jdk8ToCalendarDayConstant", "(", "givenDayOfWeek", ")", ";", "return", "new",...
Return a new JodaWorkingWeek if the status for the given day has changed. @param working true if working day @param givenDayOfWeek e.g. DateTimeConstants.MONDAY, DateTimeConstants.TUESDAY, etc
[ "Return", "a", "new", "JodaWorkingWeek", "if", "the", "status", "for", "the", "given", "day", "has", "changed", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-jdk8/src/main/java/net/objectlab/kit/datecalc/jdk8/Jdk8WorkingWeek.java#L84-L87
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/CMakeAnalyzer.java
CMakeAnalyzer.analyzeSetVersionCommand
private void analyzeSetVersionCommand(Dependency dependency, Engine engine, String contents) { """ Extracts the version information from the contents. If more then one version is found additional dependencies are added to the dependency list. @param dependency the dependency being analyzed @param engine the ...
java
private void analyzeSetVersionCommand(Dependency dependency, Engine engine, String contents) { Dependency currentDep = dependency; final Matcher m = SET_VERSION.matcher(contents); int count = 0; while (m.find()) { count++; LOGGER.debug("Found project command matc...
[ "private", "void", "analyzeSetVersionCommand", "(", "Dependency", "dependency", ",", "Engine", "engine", ",", "String", "contents", ")", "{", "Dependency", "currentDep", "=", "dependency", ";", "final", "Matcher", "m", "=", "SET_VERSION", ".", "matcher", "(", "c...
Extracts the version information from the contents. If more then one version is found additional dependencies are added to the dependency list. @param dependency the dependency being analyzed @param engine the dependency-check engine @param contents the version information
[ "Extracts", "the", "version", "information", "from", "the", "contents", ".", "If", "more", "then", "one", "version", "is", "found", "additional", "dependencies", "are", "added", "to", "the", "dependency", "list", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/CMakeAnalyzer.java#L186-L223
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.nameIncrDecr
@Deprecated public static Object nameIncrDecr(Scriptable scopeChain, String id, int incrDecrMask) { """ The method is only present for compatibility. @deprecated Use {@link #nameIncrDecr(Scriptable, String, Context, int)} instead """ return nameIncrDecr(scop...
java
@Deprecated public static Object nameIncrDecr(Scriptable scopeChain, String id, int incrDecrMask) { return nameIncrDecr(scopeChain, id, Context.getContext(), incrDecrMask); }
[ "@", "Deprecated", "public", "static", "Object", "nameIncrDecr", "(", "Scriptable", "scopeChain", ",", "String", "id", ",", "int", "incrDecrMask", ")", "{", "return", "nameIncrDecr", "(", "scopeChain", ",", "id", ",", "Context", ".", "getContext", "(", ")", ...
The method is only present for compatibility. @deprecated Use {@link #nameIncrDecr(Scriptable, String, Context, int)} instead
[ "The", "method", "is", "only", "present", "for", "compatibility", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L2963-L2968
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.orthoSymmetricLH
public Matrix4x3f orthoSymmetricLH(float width, float height, float zNear, float zFar) { """ Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix. <p> This method is equivalent to calling {@link #orthoLH(f...
java
public Matrix4x3f orthoSymmetricLH(float width, float height, float zNear, float zFar) { return orthoSymmetricLH(width, height, zNear, zFar, false, this); }
[ "public", "Matrix4x3f", "orthoSymmetricLH", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ")", "{", "return", "orthoSymmetricLH", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ",", "this...
Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix. <p> This method is equivalent to calling {@link #orthoLH(float, float, float, float, float, float) orthoLH()} with <code>left=-width/2</code>, <code>right=+wid...
[ "Apply", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/", "code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5520-L5522
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.getMetadataWithChildren
public DbxEntry./*@Nullable*/WithChildren getMetadataWithChildren(String path, boolean includeMediaInfo) throws DbxException { """ Get the metadata for a given path; if the path refers to a folder, get all the children's metadata as well. <pre> DbxClientV1 dbxClient = ... DbxEntry entry = dbxClient.g...
java
public DbxEntry./*@Nullable*/WithChildren getMetadataWithChildren(String path, boolean includeMediaInfo) throws DbxException { return getMetadataWithChildrenBase(path, includeMediaInfo, DbxEntry.WithChildren.ReaderMaybeDeleted); }
[ "public", "DbxEntry", ".", "/*@Nullable*/", "WithChildren", "getMetadataWithChildren", "(", "String", "path", ",", "boolean", "includeMediaInfo", ")", "throws", "DbxException", "{", "return", "getMetadataWithChildrenBase", "(", "path", ",", "includeMediaInfo", ",", "Dbx...
Get the metadata for a given path; if the path refers to a folder, get all the children's metadata as well. <pre> DbxClientV1 dbxClient = ... DbxEntry entry = dbxClient.getMetadata("/Photos"); if (entry == null) { System.out.println("No file or folder at that path."); } else { System.out.print(entry.toStringMultiline(...
[ "Get", "the", "metadata", "for", "a", "given", "path", ";", "if", "the", "path", "refers", "to", "a", "folder", "get", "all", "the", "children", "s", "metadata", "as", "well", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L174-L178
radkovo/jStyleParser
src/main/java/cz/vutbr/web/domassign/MultiMap.java
MultiMap.put
public void put(E el, P pseudo, D data) { """ Sets the data for the specified element and pseudo-element. @param el the element to which the data belongs @param pseudo a pseudo-element or null of none is required @param data data to be set """ if (pseudo == null) mainMap.put(el, data); ...
java
public void put(E el, P pseudo, D data) { if (pseudo == null) mainMap.put(el, data); else { HashMap<P, D> map = pseudoMaps.get(el); if (map == null) { map = new HashMap<P, D>(); pseudoMaps.put(el, map); ...
[ "public", "void", "put", "(", "E", "el", ",", "P", "pseudo", ",", "D", "data", ")", "{", "if", "(", "pseudo", "==", "null", ")", "mainMap", ".", "put", "(", "el", ",", "data", ")", ";", "else", "{", "HashMap", "<", "P", ",", "D", ">", "map", ...
Sets the data for the specified element and pseudo-element. @param el the element to which the data belongs @param pseudo a pseudo-element or null of none is required @param data data to be set
[ "Sets", "the", "data", "for", "the", "specified", "element", "and", "pseudo", "-", "element", "." ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/domassign/MultiMap.java#L134-L148
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/markdown/Emitter.java
Emitter._emitMarkedLines
private void _emitMarkedLines (final MarkdownHCStack aOut, final Line aLines) { """ Writes a set of markdown lines into the StringBuilder. @param aOut The StringBuilder to write to. @param aLines The lines to write. """ final StringBuilder aIn = new StringBuilder (); Line aLine = aLines; whil...
java
private void _emitMarkedLines (final MarkdownHCStack aOut, final Line aLines) { final StringBuilder aIn = new StringBuilder (); Line aLine = aLines; while (aLine != null) { if (!aLine.m_bIsEmpty) { aIn.append (aLine.m_sValue.substring (aLine.m_nLeading, aLine.m_sValue.length () - a...
[ "private", "void", "_emitMarkedLines", "(", "final", "MarkdownHCStack", "aOut", ",", "final", "Line", "aLines", ")", "{", "final", "StringBuilder", "aIn", "=", "new", "StringBuilder", "(", ")", ";", "Line", "aLine", "=", "aLines", ";", "while", "(", "aLine",...
Writes a set of markdown lines into the StringBuilder. @param aOut The StringBuilder to write to. @param aLines The lines to write.
[ "Writes", "a", "set", "of", "markdown", "lines", "into", "the", "StringBuilder", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/markdown/Emitter.java#L955-L977
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.mapFirst
public LongStreamEx mapFirst(LongUnaryOperator mapper) { """ Returns a stream where the first element is the replaced with the result of applying the given function while the other elements are left intact. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. @param map...
java
public LongStreamEx mapFirst(LongUnaryOperator mapper) { return delegate(new PairSpliterator.PSOfLong((a, b) -> b, mapper, spliterator(), PairSpliterator.MODE_MAP_FIRST)); }
[ "public", "LongStreamEx", "mapFirst", "(", "LongUnaryOperator", "mapper", ")", "{", "return", "delegate", "(", "new", "PairSpliterator", ".", "PSOfLong", "(", "(", "a", ",", "b", ")", "->", "b", ",", "mapper", ",", "spliterator", "(", ")", ",", "PairSplite...
Returns a stream where the first element is the replaced with the result of applying the given function while the other elements are left intact. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. @param mapper a <a href="package-summary.html#NonInterference">non-interfering </a>...
[ "Returns", "a", "stream", "where", "the", "first", "element", "is", "the", "replaced", "with", "the", "result", "of", "applying", "the", "given", "function", "while", "the", "other", "elements", "are", "left", "intact", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L234-L237
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/hook/AmLogServerEndPoint.java
AmLogServerEndPoint.onClose
@OnClose public void onClose(Session session, CloseReason closeReason) { """ Websocket connection close. @param session session @param closeReason closeReason """ logger.info("WebSocket closed. : SessionId={}, Reason={}", session.getId(), closeReason.toString()); AmLogSe...
java
@OnClose public void onClose(Session session, CloseReason closeReason) { logger.info("WebSocket closed. : SessionId={}, Reason={}", session.getId(), closeReason.toString()); AmLogServerAdapter.getInstance().onClose(session); }
[ "@", "OnClose", "public", "void", "onClose", "(", "Session", "session", ",", "CloseReason", "closeReason", ")", "{", "logger", ".", "info", "(", "\"WebSocket closed. : SessionId={}, Reason={}\"", ",", "session", ".", "getId", "(", ")", ",", "closeReason", ".", "...
Websocket connection close. @param session session @param closeReason closeReason
[ "Websocket", "connection", "close", "." ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/hook/AmLogServerEndPoint.java#L59-L65
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F4.andThen
public F4<P1, P2, P3, P4, R> andThen( final Func4<? super P1, ? super P2, ? super P3, ? super P4, ? extends R>... fs ) { """ Returns a composed function that applied, in sequence, this function and all functions specified one by one. If applying anyone of the functions throws an exception...
java
public F4<P1, P2, P3, P4, R> andThen( final Func4<? super P1, ? super P2, ? super P3, ? super P4, ? extends R>... fs ) { if (0 == fs.length) { return this; } final Func4<P1, P2, P3, P4, R> me = this; return new F4<P1, P2, P3, P4, R...
[ "public", "F4", "<", "P1", ",", "P2", ",", "P3", ",", "P4", ",", "R", ">", "andThen", "(", "final", "Func4", "<", "?", "super", "P1", ",", "?", "super", "P2", ",", "?", "super", "P3", ",", "?", "super", "P4", ",", "?", "extends", "R", ">", ...
Returns a composed function that applied, in sequence, this function and all functions specified one by one. If applying anyone of the functions throws an exception, it is relayed to the caller of the composed function. If an exception is thrown out, the following functions will not be applied. <p>When apply the compos...
[ "Returns", "a", "composed", "function", "that", "applied", "in", "sequence", "this", "function", "and", "all", "functions", "specified", "one", "by", "one", ".", "If", "applying", "anyone", "of", "the", "functions", "throws", "an", "exception", "it", "is", "...
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L1574-L1592
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/Predicates.java
Predicates.greaterEqual
public static Predicate greaterEqual(String attribute, Comparable value) { """ Creates a <b>greater than or equal to</b> predicate that will pass items if the value stored under the given item {@code attribute} is greater than or equal to the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attri...
java
public static Predicate greaterEqual(String attribute, Comparable value) { return new GreaterLessPredicate(attribute, value, true, false); }
[ "public", "static", "Predicate", "greaterEqual", "(", "String", "attribute", ",", "Comparable", "value", ")", "{", "return", "new", "GreaterLessPredicate", "(", "attribute", ",", "value", ",", "true", ",", "false", ")", ";", "}" ]
Creates a <b>greater than or equal to</b> predicate that will pass items if the value stored under the given item {@code attribute} is greater than or equal to the given {@code value}. <p> See also <i>Special Attributes</i>, <i>Attribute Paths</i>, <i>Handling of {@code null}</i> and <i>Implicit Type Conversion</i> sec...
[ "Creates", "a", "<b", ">", "greater", "than", "or", "equal", "to<", "/", "b", ">", "predicate", "that", "will", "pass", "items", "if", "the", "value", "stored", "under", "the", "given", "item", "{", "@code", "attribute", "}", "is", "greater", "than", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/Predicates.java#L360-L362
b3log/latke
latke-core/src/main/java/org/b3log/latke/Latkes.java
Latkes.setLatkeProperty
public static void setLatkeProperty(final String key, final String value) { """ Sets latke.props with the specified key and value. @param key the specified key @param value the specified value """ if (null == key) { LOGGER.log(Level.WARN, "latke.props can not set null key"); ...
java
public static void setLatkeProperty(final String key, final String value) { if (null == key) { LOGGER.log(Level.WARN, "latke.props can not set null key"); return; } if (null == value) { LOGGER.log(Level.WARN, "latke.props can not set null value"); ...
[ "public", "static", "void", "setLatkeProperty", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "if", "(", "null", "==", "key", ")", "{", "LOGGER", ".", "log", "(", "Level", ".", "WARN", ",", "\"latke.props can not set null key\"", ...
Sets latke.props with the specified key and value. @param key the specified key @param value the specified value
[ "Sets", "latke", ".", "props", "with", "the", "specified", "key", "and", "value", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/Latkes.java#L178-L191
wildfly/wildfly-core
embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java
SystemPropertyContext.resolveBaseDir
Path resolveBaseDir(final String name, final String dirName) { """ Resolves the base directory. If the system property is set that value will be used. Otherwise the path is resolved from the home directory. @param name the system property name @param dirName the directory name relative to the base director...
java
Path resolveBaseDir(final String name, final String dirName) { final String currentDir = SecurityActions.getPropertyPrivileged(name); if (currentDir == null) { return jbossHomeDir.resolve(dirName); } return Paths.get(currentDir); }
[ "Path", "resolveBaseDir", "(", "final", "String", "name", ",", "final", "String", "dirName", ")", "{", "final", "String", "currentDir", "=", "SecurityActions", ".", "getPropertyPrivileged", "(", "name", ")", ";", "if", "(", "currentDir", "==", "null", ")", "...
Resolves the base directory. If the system property is set that value will be used. Otherwise the path is resolved from the home directory. @param name the system property name @param dirName the directory name relative to the base directory @return the resolved base directory
[ "Resolves", "the", "base", "directory", ".", "If", "the", "system", "property", "is", "set", "that", "value", "will", "be", "used", ".", "Otherwise", "the", "path", "is", "resolved", "from", "the", "home", "directory", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java#L151-L157
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java
SftpClient.get
public SftpFileAttributes get(String remote, OutputStream local, long position) throws SftpStatusException, SshException, TransferCancelledException { """ Download the remote file into an OutputStream. @param remote @param local @param position the position from which to start reading the remote file ...
java
public SftpFileAttributes get(String remote, OutputStream local, long position) throws SftpStatusException, SshException, TransferCancelledException { return get(remote, local, null, position); }
[ "public", "SftpFileAttributes", "get", "(", "String", "remote", ",", "OutputStream", "local", ",", "long", "position", ")", "throws", "SftpStatusException", ",", "SshException", ",", "TransferCancelledException", "{", "return", "get", "(", "remote", ",", "local", ...
Download the remote file into an OutputStream. @param remote @param local @param position the position from which to start reading the remote file @return the downloaded file's attributes @throws SftpStatusException @throws SshException @throws TransferCancelledException
[ "Download", "the", "remote", "file", "into", "an", "OutputStream", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpClient.java#L1556-L1560
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/CollectionsInner.java
CollectionsInner.listMetrics
public List<MetricInner> listMetrics(String resourceGroupName, String accountName, String databaseRid, String collectionRid, String filter) { """ Retrieves the metrics determined by the given filter for the given database account and collection. @param resourceGroupName Name of an Azure resource group. @param ...
java
public List<MetricInner> listMetrics(String resourceGroupName, String accountName, String databaseRid, String collectionRid, String filter) { return listMetricsWithServiceResponseAsync(resourceGroupName, accountName, databaseRid, collectionRid, filter).toBlocking().single().body(); }
[ "public", "List", "<", "MetricInner", ">", "listMetrics", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "databaseRid", ",", "String", "collectionRid", ",", "String", "filter", ")", "{", "return", "listMetricsWithServiceResponseAsync"...
Retrieves the metrics determined by the given filter for the given database account and collection. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param databaseRid Cosmos DB database rid. @param collectionRid Cosmos DB collection rid. @param filter An OD...
[ "Retrieves", "the", "metrics", "determined", "by", "the", "given", "filter", "for", "the", "given", "database", "account", "and", "collection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/CollectionsInner.java#L82-L84
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/MultimapJoiner.java
MultimapJoiner.appendTo
public StringBuilder appendTo(StringBuilder builder, Map<?, ? extends Collection<?>> map) { """ Appends the string representation of each entry of {@code map}, using the previously configured separator and key-value separator, to {@code builder}. Identical to {@link #appendTo(Appendable, Map)}, except that it do...
java
public StringBuilder appendTo(StringBuilder builder, Map<?, ? extends Collection<?>> map) { return appendTo(builder, map.entrySet()); }
[ "public", "StringBuilder", "appendTo", "(", "StringBuilder", "builder", ",", "Map", "<", "?", ",", "?", "extends", "Collection", "<", "?", ">", ">", "map", ")", "{", "return", "appendTo", "(", "builder", ",", "map", ".", "entrySet", "(", ")", ")", ";",...
Appends the string representation of each entry of {@code map}, using the previously configured separator and key-value separator, to {@code builder}. Identical to {@link #appendTo(Appendable, Map)}, except that it does not throw {@link IOException}.
[ "Appends", "the", "string", "representation", "of", "each", "entry", "of", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/MultimapJoiner.java#L71-L73
moparisthebest/beehive
beehive-ejb-control/src/main/java/org/apache/beehive/controls/system/ejb/internal/EJBJarDescriptorHandler.java
EJBJarDescriptorHandler.insertEJBRefsInEJBJar
private void insertEJBRefsInEJBJar(Document document, EJBInfo ejbInfo, String ejbLinkValue, List ejbList) { """ Insert EJB references in all of the descriptors of the EJB's in the supplied list @param document DOM tree of an ejb-jar.xml file. @param ejbInfo Contains information about the EJB control...
java
private void insertEJBRefsInEJBJar(Document document, EJBInfo ejbInfo, String ejbLinkValue, List ejbList) { for (Object ejb : ejbList) { if (ejbInfo.isLocal()) insertEJBLocalRefInEJBJar((Element)ejb, ejbInfo, ejbLinkValue, document); else insertEJBRefInEJB...
[ "private", "void", "insertEJBRefsInEJBJar", "(", "Document", "document", ",", "EJBInfo", "ejbInfo", ",", "String", "ejbLinkValue", ",", "List", "ejbList", ")", "{", "for", "(", "Object", "ejb", ":", "ejbList", ")", "{", "if", "(", "ejbInfo", ".", "isLocal", ...
Insert EJB references in all of the descriptors of the EJB's in the supplied list @param document DOM tree of an ejb-jar.xml file. @param ejbInfo Contains information about the EJB control. @param ejbLinkValue The ejb-link value for the EJBs. @param ejbList The list of EJB's
[ "Insert", "EJB", "references", "in", "all", "of", "the", "descriptors", "of", "the", "EJB", "s", "in", "the", "supplied", "list" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-ejb-control/src/main/java/org/apache/beehive/controls/system/ejb/internal/EJBJarDescriptorHandler.java#L93-L100
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/HexString.java
HexString.binToHex
public static void binToHex(byte[] bin, int start, int length, StringBuffer hex) { """ Converts a binary value held in a byte array into a hex string, in the given StringBuffer, using exactly two characters per byte of input. @param bin The byte array containing the binary value. @param start The offset i...
java
public static void binToHex(byte[] bin, int start, int length, StringBuffer hex) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "binToHex", new Object[]{bin, Integer.valueOf(start), Integer.valueOf(length), hex}); /* Constant for binary to Hex conversion ...
[ "public", "static", "void", "binToHex", "(", "byte", "[", "]", "bin", ",", "int", "start", ",", "int", "length", ",", "StringBuffer", "hex", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "...
Converts a binary value held in a byte array into a hex string, in the given StringBuffer, using exactly two characters per byte of input. @param bin The byte array containing the binary value. @param start The offset into the byte array for conversion to start.. @param length The number of bytes to convert. @para...
[ "Converts", "a", "binary", "value", "held", "in", "a", "byte", "array", "into", "a", "hex", "string", "in", "the", "given", "StringBuffer", "using", "exactly", "two", "characters", "per", "byte", "of", "input", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/HexString.java#L38-L61
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbMemberTagsHandler.java
OjbMemberTagsHandler.memberTagValue
public String memberTagValue(Properties attributes) throws XDocletException { """ Returns the value of the tag/parameter combination for the current member tag @param attributes The attributes of the template tag @return Description of the Returned Value @exception XDocletExcep...
java
public String memberTagValue(Properties attributes) throws XDocletException { if (getCurrentField() != null) { // setting field to true will override the for_class value. attributes.setProperty("field", "true"); return getExpandedDelimitedTagValue(attributes, FOR_FIE...
[ "public", "String", "memberTagValue", "(", "Properties", "attributes", ")", "throws", "XDocletException", "{", "if", "(", "getCurrentField", "(", ")", "!=", "null", ")", "{", "// setting field to true will override the for_class value.\r", "attributes", ".", "setProperty"...
Returns the value of the tag/parameter combination for the current member tag @param attributes The attributes of the template tag @return Description of the Returned Value @exception XDocletException Description of Exception @doc.tag type="content" @doc.param ...
[ "Returns", "the", "value", "of", "the", "tag", "/", "parameter", "combination", "for", "the", "current", "member", "tag" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbMemberTagsHandler.java#L423-L436
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/util/Strings.java
Strings.joinStrings
public static String joinStrings(List<String> strings, boolean fixCase, char withChar) { """ Generic string joining function. @param strings Strings to be joined @param fixCase does it need to fix word case @param withChar char to join strings with. @return joined-string """ if (strings == null || ...
java
public static String joinStrings(List<String> strings, boolean fixCase, char withChar) { if (strings == null || strings.size() == 0) { return ""; } StringBuilder result = null; for (String s : strings) { if (fixCase) { s = fixCase(s); }...
[ "public", "static", "String", "joinStrings", "(", "List", "<", "String", ">", "strings", ",", "boolean", "fixCase", ",", "char", "withChar", ")", "{", "if", "(", "strings", "==", "null", "||", "strings", ".", "size", "(", ")", "==", "0", ")", "{", "r...
Generic string joining function. @param strings Strings to be joined @param fixCase does it need to fix word case @param withChar char to join strings with. @return joined-string
[ "Generic", "string", "joining", "function", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/debug/cli/util/Strings.java#L40-L57
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java
EmailAddressValidator._hasMXRecord
private static boolean _hasMXRecord (@Nonnull final String sHostName) { """ Check if the passed host name has an MX record. @param sHostName The host name to check. @return <code>true</code> if an MX record was found, <code>false</code> if not (or if an exception occurred) """ try { final R...
java
private static boolean _hasMXRecord (@Nonnull final String sHostName) { try { final Record [] aRecords = new Lookup (sHostName, Type.MX).run (); return aRecords != null && aRecords.length > 0; } catch (final Exception ex) { // Do not log this message, as this method is potentiall...
[ "private", "static", "boolean", "_hasMXRecord", "(", "@", "Nonnull", "final", "String", "sHostName", ")", "{", "try", "{", "final", "Record", "[", "]", "aRecords", "=", "new", "Lookup", "(", "sHostName", ",", "Type", ".", "MX", ")", ".", "run", "(", ")...
Check if the passed host name has an MX record. @param sHostName The host name to check. @return <code>true</code> if an MX record was found, <code>false</code> if not (or if an exception occurred)
[ "Check", "if", "the", "passed", "host", "name", "has", "an", "MX", "record", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/util/EmailAddressValidator.java#L81-L101
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/AnnotationsUtil.java
AnnotationsUtil.getAnnotation
public static <T extends Annotation> T getAnnotation(AnnotatedElement annotatedType, Class<T> annotationClass) { """ Small utility to easily get an annotation and will throw an exception if not provided. @param annotatedType The source type to tcheck the annotation on @param annotationClass The annotation to...
java
public static <T extends Annotation> T getAnnotation(AnnotatedElement annotatedType, Class<T> annotationClass) { return getAnnotation(annotatedType, annotationClass, null); }
[ "public", "static", "<", "T", "extends", "Annotation", ">", "T", "getAnnotation", "(", "AnnotatedElement", "annotatedType", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "return", "getAnnotation", "(", "annotatedType", ",", "annotationClass", ",", "n...
Small utility to easily get an annotation and will throw an exception if not provided. @param annotatedType The source type to tcheck the annotation on @param annotationClass The annotation to look for @param <T> The annotation subtype @return The annotation that was requested @throws ODataSystemExceptio...
[ "Small", "utility", "to", "easily", "get", "an", "annotation", "and", "will", "throw", "an", "exception", "if", "not", "provided", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/AnnotationsUtil.java#L57-L59
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java
StorageAccountCredentialsInner.createOrUpdateAsync
public Observable<StorageAccountCredentialInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) { """ Creates or updates the storage account credential. @param deviceName The device name. @param name The storage account cred...
java
public Observable<StorageAccountCredentialInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, StorageAccountCredentialInner storageAccountCredential) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, storageAccountCredential).map(new Func1<Serv...
[ "public", "Observable", "<", "StorageAccountCredentialInner", ">", "createOrUpdateAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "StorageAccountCredentialInner", "storageAccountCredential", ")", "{", "return", "createOrU...
Creates or updates the storage account credential. @param deviceName The device name. @param name The storage account credential name. @param resourceGroupName The resource group name. @param storageAccountCredential The storage account credential. @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Creates", "or", "updates", "the", "storage", "account", "credential", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java#L351-L358
citrusframework/citrus
modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/SftpClient.java
SftpClient.createDir
protected FtpMessage createDir(CommandType ftpCommand) { """ Execute mkDir command and create new directory. @param ftpCommand @return """ try { sftp.mkdir(ftpCommand.getArguments()); return FtpMessage.result(FTPReply.PATHNAME_CREATED, "Pathname created", true); } catc...
java
protected FtpMessage createDir(CommandType ftpCommand) { try { sftp.mkdir(ftpCommand.getArguments()); return FtpMessage.result(FTPReply.PATHNAME_CREATED, "Pathname created", true); } catch (SftpException e) { throw new CitrusRuntimeException("Failed to execute ftp com...
[ "protected", "FtpMessage", "createDir", "(", "CommandType", "ftpCommand", ")", "{", "try", "{", "sftp", ".", "mkdir", "(", "ftpCommand", ".", "getArguments", "(", ")", ")", ";", "return", "FtpMessage", ".", "result", "(", "FTPReply", ".", "PATHNAME_CREATED", ...
Execute mkDir command and create new directory. @param ftpCommand @return
[ "Execute", "mkDir", "command", "and", "create", "new", "directory", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ftp/src/main/java/com/consol/citrus/ftp/client/SftpClient.java#L97-L104
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbors-client/src/main/java/org/deeplearning4j/nearestneighbor/client/NearestNeighborsClient.java
NearestNeighborsClient.knnNew
public NearestNeighborsResults knnNew(int k, INDArray arr) throws Exception { """ Run a k nearest neighbors search on a NEW data point @param k the number of results to retrieve @param arr the array to run the search on. Note that this must be a row vector @return @throws Exception """ Base64NDA...
java
public NearestNeighborsResults knnNew(int k, INDArray arr) throws Exception { Base64NDArrayBody base64NDArrayBody = Base64NDArrayBody.builder().k(k).ndarray(Nd4jBase64.base64String(arr)).build(); HttpRequestWithBody req = Unirest.post(url + "/knnnew"); req.header("accept...
[ "public", "NearestNeighborsResults", "knnNew", "(", "int", "k", ",", "INDArray", "arr", ")", "throws", "Exception", "{", "Base64NDArrayBody", "base64NDArrayBody", "=", "Base64NDArrayBody", ".", "builder", "(", ")", ".", "k", "(", "k", ")", ".", "ndarray", "(",...
Run a k nearest neighbors search on a NEW data point @param k the number of results to retrieve @param arr the array to run the search on. Note that this must be a row vector @return @throws Exception
[ "Run", "a", "k", "nearest", "neighbors", "search", "on", "a", "NEW", "data", "point" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/deeplearning4j-nearestneighbors-client/src/main/java/org/deeplearning4j/nearestneighbor/client/NearestNeighborsClient.java#L111-L123
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/RandomCompat.java
RandomCompat.doubles
@NotNull public DoubleStream doubles(long streamSize, final double randomNumberOrigin, final double randomNumberBound) { """ Returns a stream producing the given {@code streamSize} number of pseudorandom {@code double} values, each conforming to the given origin (inclusive) and bound (exclusive)....
java
@NotNull public DoubleStream doubles(long streamSize, final double randomNumberOrigin, final double randomNumberBound) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles(randomNumb...
[ "@", "NotNull", "public", "DoubleStream", "doubles", "(", "long", "streamSize", ",", "final", "double", "randomNumberOrigin", ",", "final", "double", "randomNumberBound", ")", "{", "if", "(", "streamSize", "<", "0L", ")", "throw", "new", "IllegalArgumentException"...
Returns a stream producing the given {@code streamSize} number of pseudorandom {@code double} values, each conforming to the given origin (inclusive) and bound (exclusive). @param streamSize the number of values to generate @param randomNumberOrigin the origin (inclusive) of each random value @param randomNumberBound...
[ "Returns", "a", "stream", "producing", "the", "given", "{", "@code", "streamSize", "}", "number", "of", "pseudorandom", "{", "@code", "double", "}", "values", "each", "conforming", "to", "the", "given", "origin", "(", "inclusive", ")", "and", "bound", "(", ...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/RandomCompat.java#L237-L245
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/response/ResponseBuilder.java
ResponseBuilder.withStandardCard
public ResponseBuilder withStandardCard(String cardTitle, String cardText, Image image) { """ Sets a standard {@link Card} on the response with the specified title, content and image @param cardTitle title for card @param cardText text in the card @param image image @return response builder """ t...
java
public ResponseBuilder withStandardCard(String cardTitle, String cardText, Image image) { this.card = StandardCard.builder() .withText(cardText) .withImage(image) .withTitle(cardTitle) .build(); return this; }
[ "public", "ResponseBuilder", "withStandardCard", "(", "String", "cardTitle", ",", "String", "cardText", ",", "Image", "image", ")", "{", "this", ".", "card", "=", "StandardCard", ".", "builder", "(", ")", ".", "withText", "(", "cardText", ")", ".", "withImag...
Sets a standard {@link Card} on the response with the specified title, content and image @param cardTitle title for card @param cardText text in the card @param image image @return response builder
[ "Sets", "a", "standard", "{", "@link", "Card", "}", "on", "the", "response", "with", "the", "specified", "title", "content", "and", "image" ]
train
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/response/ResponseBuilder.java#L134-L141
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsMessages.java
CmsMessages.getDateTime
public String getDateTime(Date date, CmsDateTimeUtil.Format format) { """ Returns a formated date and time 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 {@lin...
java
public String getDateTime(Date date, CmsDateTimeUtil.Format format) { return CmsDateTimeUtil.getDateTime(date, format); }
[ "public", "String", "getDateTime", "(", "Date", "date", ",", "CmsDateTimeUtil", ".", "Format", "format", ")", "{", "return", "CmsDateTimeUtil", ".", "getDateTime", "(", "date", ",", "format", ")", ";", "}" ]
Returns a formated date and time 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 and time
[ "Returns", "a", "formated", "date", "and", "time", "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#L275-L278
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_mailingList_mailingListAddress_PUT
public void organizationName_service_exchangeService_mailingList_mailingListAddress_PUT(String organizationName, String exchangeService, String mailingListAddress, OvhMailingList body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/ma...
java
public void organizationName_service_exchangeService_mailingList_mailingListAddress_PUT(String organizationName, String exchangeService, String mailingListAddress, OvhMailingList body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress}"; ...
[ "public", "void", "organizationName_service_exchangeService_mailingList_mailingListAddress_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "mailingListAddress", ",", "OvhMailingList", "body", ")", "throws", "IOException", "{", "String",...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress} @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of you...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1340-L1344
Alluxio/alluxio
core/common/src/main/java/alluxio/util/webui/UIFileInfo.java
UIFileInfo.addBlock
public void addBlock(String tierAlias, long blockId, long blockSize, long blockLastAccessTimeMs) { """ Adds a block to the file information. @param tierAlias the tier alias @param blockId the block id @param blockSize the block size @param blockLastAccessTimeMs the last access time (in milliseconds) """ ...
java
public void addBlock(String tierAlias, long blockId, long blockSize, long blockLastAccessTimeMs) { UIFileBlockInfo block = new UIFileBlockInfo(blockId, blockSize, blockLastAccessTimeMs, tierAlias, mAlluxioConfiguration); List<UIFileBlockInfo> blocksOnTier = mBlocksOnTier.get(tierAlias); ...
[ "public", "void", "addBlock", "(", "String", "tierAlias", ",", "long", "blockId", ",", "long", "blockSize", ",", "long", "blockLastAccessTimeMs", ")", "{", "UIFileBlockInfo", "block", "=", "new", "UIFileBlockInfo", "(", "blockId", ",", "blockSize", ",", "blockLa...
Adds a block to the file information. @param tierAlias the tier alias @param blockId the block id @param blockSize the block size @param blockLastAccessTimeMs the last access time (in milliseconds)
[ "Adds", "a", "block", "to", "the", "file", "information", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/webui/UIFileInfo.java#L189-L202
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.getJobs
public Map<String, Job> getJobs(FolderJob folder) throws IOException { """ Get a list of all the defined jobs on the server (in the given folder) @param folder {@link FolderJob} @return list of defined jobs (summary level, for details @see Job#details @throws IOException in case of an error. """ r...
java
public Map<String, Job> getJobs(FolderJob folder) throws IOException { return getJobs(folder, null); }
[ "public", "Map", "<", "String", ",", "Job", ">", "getJobs", "(", "FolderJob", "folder", ")", "throws", "IOException", "{", "return", "getJobs", "(", "folder", ",", "null", ")", ";", "}" ]
Get a list of all the defined jobs on the server (in the given folder) @param folder {@link FolderJob} @return list of defined jobs (summary level, for details @see Job#details @throws IOException in case of an error.
[ "Get", "a", "list", "of", "all", "the", "defined", "jobs", "on", "the", "server", "(", "in", "the", "given", "folder", ")" ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L140-L142
Netflix/governator
governator-legacy/src/main/java/com/netflix/governator/guice/Grapher.java
Grapher.toFile
public void toFile(File file) throws Exception { """ Writes the "Dot" graph to a given file. @param file file to write to """ PrintWriter out = new PrintWriter(file, "UTF-8"); try { out.write(graph()); } finally { Closeables.close(out, true); }...
java
public void toFile(File file) throws Exception { PrintWriter out = new PrintWriter(file, "UTF-8"); try { out.write(graph()); } finally { Closeables.close(out, true); } }
[ "public", "void", "toFile", "(", "File", "file", ")", "throws", "Exception", "{", "PrintWriter", "out", "=", "new", "PrintWriter", "(", "file", ",", "\"UTF-8\"", ")", ";", "try", "{", "out", ".", "write", "(", "graph", "(", ")", ")", ";", "}", "final...
Writes the "Dot" graph to a given file. @param file file to write to
[ "Writes", "the", "Dot", "graph", "to", "a", "given", "file", "." ]
train
https://github.com/Netflix/governator/blob/c1f4bb1518e759c61f2e9cad8a896ec6beba0294/governator-legacy/src/main/java/com/netflix/governator/guice/Grapher.java#L131-L139
Harium/keel
src/main/java/com/harium/keel/catalano/core/DoublePoint.java
DoublePoint.Divide
public DoublePoint Divide(DoublePoint point1, DoublePoint point2) { """ Divides values of two points. @param point1 DoublePoint. @param point2 DoublePoint. @return A new DoublePoint with the division operation. """ DoublePoint result = new DoublePoint(point1); result.Divide(point2); ...
java
public DoublePoint Divide(DoublePoint point1, DoublePoint point2) { DoublePoint result = new DoublePoint(point1); result.Divide(point2); return result; }
[ "public", "DoublePoint", "Divide", "(", "DoublePoint", "point1", ",", "DoublePoint", "point2", ")", "{", "DoublePoint", "result", "=", "new", "DoublePoint", "(", "point1", ")", ";", "result", ".", "Divide", "(", "point2", ")", ";", "return", "result", ";", ...
Divides values of two points. @param point1 DoublePoint. @param point2 DoublePoint. @return A new DoublePoint with the division operation.
[ "Divides", "values", "of", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/DoublePoint.java#L238-L242
airlift/slice
src/main/java/io/airlift/slice/SliceUtf8.java
SliceUtf8.getCodePointBefore
public static int getCodePointBefore(Slice utf8, int position) { """ Gets the UTF-8 encoded code point before the {@code position}. <p> Note: This method does not explicitly check for valid UTF-8, and may return incorrect results or throw an exception for invalid UTF-8. """ byte unsignedByte = utf8....
java
public static int getCodePointBefore(Slice utf8, int position) { byte unsignedByte = utf8.getByte(position - 1); if (!isContinuationByte(unsignedByte)) { return unsignedByte & 0xFF; } if (!isContinuationByte(utf8.getByte(position - 2))) { return getCodePointAt...
[ "public", "static", "int", "getCodePointBefore", "(", "Slice", "utf8", ",", "int", "position", ")", "{", "byte", "unsignedByte", "=", "utf8", ".", "getByte", "(", "position", "-", "1", ")", ";", "if", "(", "!", "isContinuationByte", "(", "unsignedByte", ")...
Gets the UTF-8 encoded code point before the {@code position}. <p> Note: This method does not explicitly check for valid UTF-8, and may return incorrect results or throw an exception for invalid UTF-8.
[ "Gets", "the", "UTF", "-", "8", "encoded", "code", "point", "before", "the", "{" ]
train
https://github.com/airlift/slice/blob/7166cb0319e3655f8ba15f5a7ccf3d2f721c1242/src/main/java/io/airlift/slice/SliceUtf8.java#L1020-L1038
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayNameWithDialect
public static String getDisplayNameWithDialect(String localeID, ULocale displayLocale) { """ <strong>[icu]</strong> Returns the locale ID localized for display in the provided locale. If a dialect name is present in the locale data, then it is returned. This is a cover for the ICU4C API. @param localeID the loc...
java
public static String getDisplayNameWithDialect(String localeID, ULocale displayLocale) { return getDisplayNameWithDialectInternal(new ULocale(localeID), displayLocale); }
[ "public", "static", "String", "getDisplayNameWithDialect", "(", "String", "localeID", ",", "ULocale", "displayLocale", ")", "{", "return", "getDisplayNameWithDialectInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "displayLocale", ")", ";", "}" ]
<strong>[icu]</strong> Returns the locale ID localized for display in the provided locale. If a dialect name is present in the locale data, then it is returned. This is a cover for the ICU4C API. @param localeID the locale whose name is to be displayed. @param displayLocale the locale in which to display the locale nam...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "the", "locale", "ID", "localized", "for", "display", "in", "the", "provided", "locale", ".", "If", "a", "dialect", "name", "is", "present", "in", "the", "locale", "data", "then", "it...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1838-L1840
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterWriter.java
GrassRasterWriter.createEmptyHeader
private boolean createEmptyHeader( String filePath, int rows ) { """ creates the space for the header of the rasterfile, filling the spaces with zeroes. After the compression the values will be rewritten @param filePath @param rows @return """ try { RandomAccessFile theCreatedFile = ...
java
private boolean createEmptyHeader( String filePath, int rows ) { try { RandomAccessFile theCreatedFile = new RandomAccessFile(filePath, "rw"); rowaddresses = new long[rows + 1]; // the size of a long theCreatedFile.write(4); // write the addresses of...
[ "private", "boolean", "createEmptyHeader", "(", "String", "filePath", ",", "int", "rows", ")", "{", "try", "{", "RandomAccessFile", "theCreatedFile", "=", "new", "RandomAccessFile", "(", "filePath", ",", "\"rw\"", ")", ";", "rowaddresses", "=", "new", "long", ...
creates the space for the header of the rasterfile, filling the spaces with zeroes. After the compression the values will be rewritten @param filePath @param rows @return
[ "creates", "the", "space", "for", "the", "header", "of", "the", "rasterfile", "filling", "the", "spaces", "with", "zeroes", ".", "After", "the", "compression", "the", "values", "will", "be", "rewritten" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/io/GrassRasterWriter.java#L188-L213
Impetus/Kundera
src/kundera-cassandra/cassandra-pelops/src/main/java/com/impetus/client/cassandra/pelops/PelopsUtils.java
PelopsUtils.generatePoolName
public static String generatePoolName(String node, int port, String keyspace) { """ Generate pool name. @param persistenceUnit the persistence unit @param puProperties @return the string """ return node + ":" + port + ":" + keyspace; }
java
public static String generatePoolName(String node, int port, String keyspace) { return node + ":" + port + ":" + keyspace; }
[ "public", "static", "String", "generatePoolName", "(", "String", "node", ",", "int", "port", ",", "String", "keyspace", ")", "{", "return", "node", "+", "\":\"", "+", "port", "+", "\":\"", "+", "keyspace", ";", "}" ]
Generate pool name. @param persistenceUnit the persistence unit @param puProperties @return the string
[ "Generate", "pool", "name", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-pelops/src/main/java/com/impetus/client/cassandra/pelops/PelopsUtils.java#L42-L45
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java
CryptoHelper.createSignatureFor
@Deprecated byte[] createSignatureFor(String algorithm, byte[] secretBytes, byte[] contentBytes) throws NoSuchAlgorithmException, InvalidKeyException { """ Create signature. @param algorithm algorithm name. @param secretBytes algorithm secret. @param contentBytes the content to be signed. @return the sig...
java
@Deprecated byte[] createSignatureFor(String algorithm, byte[] secretBytes, byte[] contentBytes) throws NoSuchAlgorithmException, InvalidKeyException { final Mac mac = Mac.getInstance(algorithm); mac.init(new SecretKeySpec(secretBytes, algorithm)); return mac.doFinal(contentBytes); }
[ "@", "Deprecated", "byte", "[", "]", "createSignatureFor", "(", "String", "algorithm", ",", "byte", "[", "]", "secretBytes", ",", "byte", "[", "]", "contentBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", "{", "final", "Mac", "mac",...
Create signature. @param algorithm algorithm name. @param secretBytes algorithm secret. @param contentBytes the content to be signed. @return the signature bytes. @throws NoSuchAlgorithmException if the algorithm is not supported. @throws InvalidKeyException if the given key is inappropriate for initializing the speci...
[ "Create", "signature", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/algorithms/CryptoHelper.java#L158-L163
Netflix/servo
servo-core/src/main/java/com/netflix/servo/monitor/Monitors.java
Monitors.registerObject
public static void registerObject(String id, Object obj) { """ Register an object with the default registry. Equivalent to {@code DefaultMonitorRegistry.getInstance().register(Monitors.newObjectMonitor(id, obj))}. """ DefaultMonitorRegistry.getInstance().register(newObjectMonitor(id, obj)); }
java
public static void registerObject(String id, Object obj) { DefaultMonitorRegistry.getInstance().register(newObjectMonitor(id, obj)); }
[ "public", "static", "void", "registerObject", "(", "String", "id", ",", "Object", "obj", ")", "{", "DefaultMonitorRegistry", ".", "getInstance", "(", ")", ".", "register", "(", "newObjectMonitor", "(", "id", ",", "obj", ")", ")", ";", "}" ]
Register an object with the default registry. Equivalent to {@code DefaultMonitorRegistry.getInstance().register(Monitors.newObjectMonitor(id, obj))}.
[ "Register", "an", "object", "with", "the", "default", "registry", ".", "Equivalent", "to", "{" ]
train
https://github.com/Netflix/servo/blob/d67b5afce8c50bd9e9e31c288dbf4b78fb2ac815/servo-core/src/main/java/com/netflix/servo/monitor/Monitors.java#L215-L217
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceBuilder.java
ServiceBuilder.withStreamSegmentStore
public ServiceBuilder withStreamSegmentStore(Function<ComponentSetup, StreamSegmentStore> streamSegmentStoreCreator) { """ Attaches the given StreamSegmentStore creator to this ServiceBuilder. The given Function will not be invoked right away; it will be called when needed. @param streamSegmentStoreCreator The...
java
public ServiceBuilder withStreamSegmentStore(Function<ComponentSetup, StreamSegmentStore> streamSegmentStoreCreator) { Preconditions.checkNotNull(streamSegmentStoreCreator, "streamSegmentStoreCreator"); this.streamSegmentStoreCreator = streamSegmentStoreCreator; return this; }
[ "public", "ServiceBuilder", "withStreamSegmentStore", "(", "Function", "<", "ComponentSetup", ",", "StreamSegmentStore", ">", "streamSegmentStoreCreator", ")", "{", "Preconditions", ".", "checkNotNull", "(", "streamSegmentStoreCreator", ",", "\"streamSegmentStoreCreator\"", "...
Attaches the given StreamSegmentStore creator to this ServiceBuilder. The given Function will not be invoked right away; it will be called when needed. @param streamSegmentStoreCreator The Function to attach. @return This ServiceBuilder.
[ "Attaches", "the", "given", "StreamSegmentStore", "creator", "to", "this", "ServiceBuilder", ".", "The", "given", "Function", "will", "not", "be", "invoked", "right", "away", ";", "it", "will", "be", "called", "when", "needed", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceBuilder.java#L222-L226
to2mbn/JMCCC
jmccc/src/main/java/org/to2mbn/jmccc/version/parsing/Versions.java
Versions.resolveVersion
public static Version resolveVersion(MinecraftDirectory minecraftDir, String version) throws IOException { """ Resolves the version. @param minecraftDir the minecraft directory @param version the version name @return the version object, or null if the version does not exist @throws IOException if an I/O erro...
java
public static Version resolveVersion(MinecraftDirectory minecraftDir, String version) throws IOException { Objects.requireNonNull(minecraftDir); Objects.requireNonNull(version); if (doesVersionExist(minecraftDir, version)) { try { return getVersionParser().parseVersion(resolveVersionHierarchy(version, min...
[ "public", "static", "Version", "resolveVersion", "(", "MinecraftDirectory", "minecraftDir", ",", "String", "version", ")", "throws", "IOException", "{", "Objects", ".", "requireNonNull", "(", "minecraftDir", ")", ";", "Objects", ".", "requireNonNull", "(", "version"...
Resolves the version. @param minecraftDir the minecraft directory @param version the version name @return the version object, or null if the version does not exist @throws IOException if an I/O error has occurred during resolving version @throws NullPointerException if <code>minecraftDir==null || version==null</code>
[ "Resolves", "the", "version", "." ]
train
https://github.com/to2mbn/JMCCC/blob/17e5b1b56ff18255cfd60976dca1a24598946647/jmccc/src/main/java/org/to2mbn/jmccc/version/parsing/Versions.java#L36-L49
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/JoinPoint.java
JoinPoint.listenInlineOnAllDone
public static void listenInlineOnAllDone(Runnable listener, ISynchronizationPoint<?>... synchPoints) { """ Shortcut method to create a JoinPoint waiting for the given synchronization points, start the JoinPoint, and add the given listener to be called when the JoinPoint is unblocked. The JoinPoint is not unblock...
java
public static void listenInlineOnAllDone(Runnable listener, ISynchronizationPoint<?>... synchPoints) { JoinPoint<NoException> jp = new JoinPoint<>(); jp.addToJoin(synchPoints.length); Runnable jpr = new Runnable() { @Override public void run() { jp.joined(); } }; for (int i = 0; i < sync...
[ "public", "static", "void", "listenInlineOnAllDone", "(", "Runnable", "listener", ",", "ISynchronizationPoint", "<", "?", ">", "...", "synchPoints", ")", "{", "JoinPoint", "<", "NoException", ">", "jp", "=", "new", "JoinPoint", "<>", "(", ")", ";", "jp", "."...
Shortcut method to create a JoinPoint waiting for the given synchronization points, start the JoinPoint, and add the given listener to be called when the JoinPoint is unblocked. The JoinPoint is not unblocked until all synchronization points are unblocked. If any has error or is cancel, the error or cancellation reason...
[ "Shortcut", "method", "to", "create", "a", "JoinPoint", "waiting", "for", "the", "given", "synchronization", "points", "start", "the", "JoinPoint", "and", "add", "the", "given", "listener", "to", "be", "called", "when", "the", "JoinPoint", "is", "unblocked", "...
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/JoinPoint.java#L291-L304
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Query.java
Query.addInsidePolygon
public Query addInsidePolygon(float latitude, float longitude) { """ Add a point to the polygon of geo-search (requires a minimum of three points to define a valid polygon) At indexing, you should specify geoloc of an object with the _geoloc attribute (in the form "_geoloc":{"lat":48.853409, "lng":2.348800} or "...
java
public Query addInsidePolygon(float latitude, float longitude) { if (insidePolygon == null) { insidePolygon = "insidePolygon=" + latitude + "," + longitude; } else if (insidePolygon.length() > 14) { insidePolygon += "," + latitude + "," + longitude; } return this; }
[ "public", "Query", "addInsidePolygon", "(", "float", "latitude", ",", "float", "longitude", ")", "{", "if", "(", "insidePolygon", "==", "null", ")", "{", "insidePolygon", "=", "\"insidePolygon=\"", "+", "latitude", "+", "\",\"", "+", "longitude", ";", "}", "...
Add a point to the polygon of geo-search (requires a minimum of three points to define a valid polygon) At indexing, you should specify geoloc of an object with the _geoloc attribute (in the form "_geoloc":{"lat":48.853409, "lng":2.348800} or "_geoloc":[{"lat":48.853409, "lng":2.348800},{"lat":48.547456, "lng":2.972075...
[ "Add", "a", "point", "to", "the", "polygon", "of", "geo", "-", "search", "(", "requires", "a", "minimum", "of", "three", "points", "to", "define", "a", "valid", "polygon", ")", "At", "indexing", "you", "should", "specify", "geoloc", "of", "an", "object",...
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Query.java#L542-L549
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.addElement
public static Element addElement(Element parent, String name) { """ Adds an xml element to the given parent and sets the appropriate namespace and prefix.<p> @param parent the parent node to add the element @param name the name of the new element @return the created element with the given name which was ad...
java
public static Element addElement(Element parent, String name) { return parent.addElement(new QName(name, Namespace.get("D", DEFAULT_NAMESPACE))); }
[ "public", "static", "Element", "addElement", "(", "Element", "parent", ",", "String", "name", ")", "{", "return", "parent", ".", "addElement", "(", "new", "QName", "(", "name", ",", "Namespace", ".", "get", "(", "\"D\"", ",", "DEFAULT_NAMESPACE", ")", ")",...
Adds an xml element to the given parent and sets the appropriate namespace and prefix.<p> @param parent the parent node to add the element @param name the name of the new element @return the created element with the given name which was added to the given parent
[ "Adds", "an", "xml", "element", "to", "the", "given", "parent", "and", "sets", "the", "appropriate", "namespace", "and", "prefix", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L406-L409
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/Manager.java
Manager.registerEncryptionKey
@InterfaceAudience.Public public boolean registerEncryptionKey(Object keyOrPassword, String databaseName) { """ This method has been superseded by {@link #openDatabase(String, DatabaseOptions)}. Registers an encryption key for a database. This must be called _before_ opening an encrypted database, or befor...
java
@InterfaceAudience.Public public boolean registerEncryptionKey(Object keyOrPassword, String databaseName) { if (databaseName == null) return false; if (keyOrPassword != null) { encryptionKeys.put(databaseName, keyOrPassword); } else encryptionKeys.remove(d...
[ "@", "InterfaceAudience", ".", "Public", "public", "boolean", "registerEncryptionKey", "(", "Object", "keyOrPassword", ",", "String", "databaseName", ")", "{", "if", "(", "databaseName", "==", "null", ")", "return", "false", ";", "if", "(", "keyOrPassword", "!="...
This method has been superseded by {@link #openDatabase(String, DatabaseOptions)}. Registers an encryption key for a database. This must be called _before_ opening an encrypted database, or before creating a database that's to be encrypted. If the key is incorrect (or no key is given for an encrypted database), the su...
[ "This", "method", "has", "been", "superseded", "by", "{", "@link", "#openDatabase", "(", "String", "DatabaseOptions", ")", "}", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/Manager.java#L366-L375
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.countByG_C
@Override public int countByG_C(long groupId, String couponCode) { """ Returns the number of commerce discounts where groupId = &#63; and couponCode = &#63;. @param groupId the group ID @param couponCode the coupon code @return the number of matching commerce discounts """ FinderPath finderPath = FINDE...
java
@Override public int countByG_C(long groupId, String couponCode) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C; Object[] finderArgs = new Object[] { groupId, couponCode }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBun...
[ "@", "Override", "public", "int", "countByG_C", "(", "long", "groupId", ",", "String", "couponCode", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_G_C", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "groupId", ...
Returns the number of commerce discounts where groupId = &#63; and couponCode = &#63;. @param groupId the group ID @param couponCode the coupon code @return the number of matching commerce discounts
[ "Returns", "the", "number", "of", "commerce", "discounts", "where", "groupId", "=", "&#63", ";", "and", "couponCode", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L3235-L3296
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
NodeImpl.versionHistory
public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException, RepositoryException { """ For internal use. Doesn't check the InvalidItemStateException and may return unpooled VersionHistory object. @param pool boolean, true if result should be pooled in Session @...
java
public VersionHistoryImpl versionHistory(boolean pool) throws UnsupportedRepositoryOperationException, RepositoryException { if (!this.isNodeType(Constants.MIX_VERSIONABLE)) { throw new UnsupportedRepositoryOperationException("Node is not mix:versionable " + getPath()); } Prop...
[ "public", "VersionHistoryImpl", "versionHistory", "(", "boolean", "pool", ")", "throws", "UnsupportedRepositoryOperationException", ",", "RepositoryException", "{", "if", "(", "!", "this", ".", "isNodeType", "(", "Constants", ".", "MIX_VERSIONABLE", ")", ")", "{", "...
For internal use. Doesn't check the InvalidItemStateException and may return unpooled VersionHistory object. @param pool boolean, true if result should be pooled in Session @return VersionHistoryImpl @throws UnsupportedRepositoryOperationException if versions is nopt supported @throws RepositoryException if error occu...
[ "For", "internal", "use", ".", "Doesn", "t", "check", "the", "InvalidItemStateException", "and", "may", "return", "unpooled", "VersionHistory", "object", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java#L2600-L2618
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.crossRatios
public static double crossRatios( Point3D_F64 a0 , Point3D_F64 a1 , Point3D_F64 a2 , Point3D_F64 a3) { """ Computes the cross-ratio between 4 points. This is an invariant under projective geometry. @param a0 Point @param a1 Point @param a2 Point @param a3 Point @return cross ratio """ double d01 = a0.di...
java
public static double crossRatios( Point3D_F64 a0 , Point3D_F64 a1 , Point3D_F64 a2 , Point3D_F64 a3) { double d01 = a0.distance(a1); double d23 = a2.distance(a3); double d02 = a0.distance(a2); double d13 = a1.distance(a3); return (d01*d23)/(d02*d13); }
[ "public", "static", "double", "crossRatios", "(", "Point3D_F64", "a0", ",", "Point3D_F64", "a1", ",", "Point3D_F64", "a2", ",", "Point3D_F64", "a3", ")", "{", "double", "d01", "=", "a0", ".", "distance", "(", "a1", ")", ";", "double", "d23", "=", "a2", ...
Computes the cross-ratio between 4 points. This is an invariant under projective geometry. @param a0 Point @param a1 Point @param a2 Point @param a3 Point @return cross ratio
[ "Computes", "the", "cross", "-", "ratio", "between", "4", "points", ".", "This", "is", "an", "invariant", "under", "projective", "geometry", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L720-L727
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/html/HtmlUtils.java
HtmlUtils.generateAttribute
public static String generateAttribute(String attributeName, String value) { """ Generate the HTML code for an attribute. @param attributeName the name of the attribute. @param value the value of the attribute. @return the HTML attribute. """ return SgmlUtils.generateAttribute(attributeName, value); ...
java
public static String generateAttribute(String attributeName, String value) { return SgmlUtils.generateAttribute(attributeName, value); }
[ "public", "static", "String", "generateAttribute", "(", "String", "attributeName", ",", "String", "value", ")", "{", "return", "SgmlUtils", ".", "generateAttribute", "(", "attributeName", ",", "value", ")", ";", "}" ]
Generate the HTML code for an attribute. @param attributeName the name of the attribute. @param value the value of the attribute. @return the HTML attribute.
[ "Generate", "the", "HTML", "code", "for", "an", "attribute", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/html/HtmlUtils.java#L216-L219
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
Types.asSuper
public Type asSuper(Type t, Symbol sym) { """ Return the (most specific) base type of t that starts with the given symbol. If none exists, return null. Caveat Emptor: Since javac represents the class of all arrays with a singleton symbol Symtab.arrayClass, which by being a singleton cannot hold any discrimin...
java
public Type asSuper(Type t, Symbol sym) { /* Some examples: * * (Enum<E>, Comparable) => Comparable<E> * (c.s.s.d.AttributeTree.ValueKind, Enum) => Enum<c.s.s.d.AttributeTree.ValueKind> * (c.s.s.t.ExpressionTree, c.s.s.t.Tree) => c.s.s.t.Tree * (j.u.List<capture#160 ...
[ "public", "Type", "asSuper", "(", "Type", "t", ",", "Symbol", "sym", ")", "{", "/* Some examples:\n *\n * (Enum<E>, Comparable) => Comparable<E>\n * (c.s.s.d.AttributeTree.ValueKind, Enum) => Enum<c.s.s.d.AttributeTree.ValueKind>\n * (c.s.s.t.ExpressionTree, c.s...
Return the (most specific) base type of t that starts with the given symbol. If none exists, return null. Caveat Emptor: Since javac represents the class of all arrays with a singleton symbol Symtab.arrayClass, which by being a singleton cannot hold any discriminant, this method could yield surprising answers when in...
[ "Return", "the", "(", "most", "specific", ")", "base", "type", "of", "t", "that", "starts", "with", "the", "given", "symbol", ".", "If", "none", "exists", "return", "null", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L1853-L1866
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDriver.java
JDBCDriver.getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { """ Gets information about the possible properties for this driver. <p> The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to c...
java
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { if (!acceptsURL(url)) { return new DriverPropertyInfo[0]; } String[] choices = new String[] { "true", "false" }; DriverPropertyInfo[] pinfo = new DriverPropertyInfo[...
[ "public", "DriverPropertyInfo", "[", "]", "getPropertyInfo", "(", "String", "url", ",", "Properties", "info", ")", "{", "if", "(", "!", "acceptsURL", "(", "url", ")", ")", "{", "return", "new", "DriverPropertyInfo", "[", "0", "]", ";", "}", "String", "["...
Gets information about the possible properties for this driver. <p> The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, a...
[ "Gets", "information", "about", "the", "possible", "properties", "for", "this", "driver", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCDriver.java#L389-L434
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/state/ConstructState.java
ConstructState.addOverwriteProperties
public void addOverwriteProperties(Map<String, String> properties) { """ Add a set of properties that will overwrite properties in the {@link WorkUnitState}. @param properties Properties to override. """ Map<String, String> previousOverwriteProps = getOverwritePropertiesMap(); previousOverwriteProps.p...
java
public void addOverwriteProperties(Map<String, String> properties) { Map<String, String> previousOverwriteProps = getOverwritePropertiesMap(); previousOverwriteProps.putAll(properties); setProp(OVERWRITE_PROPS_KEY, serializeMap(previousOverwriteProps)); }
[ "public", "void", "addOverwriteProperties", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "Map", "<", "String", ",", "String", ">", "previousOverwriteProps", "=", "getOverwritePropertiesMap", "(", ")", ";", "previousOverwriteProps", ".", ...
Add a set of properties that will overwrite properties in the {@link WorkUnitState}. @param properties Properties to override.
[ "Add", "a", "set", "of", "properties", "that", "will", "overwrite", "properties", "in", "the", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/state/ConstructState.java#L61-L65
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/EventSubscriptionDeclaration.java
EventSubscriptionDeclaration.createSubscriptionForExecution
public EventSubscriptionEntity createSubscriptionForExecution(ExecutionEntity execution) { """ Creates and inserts a subscription entity depending on the message type of this declaration. """ EventSubscriptionEntity eventSubscriptionEntity = new EventSubscriptionEntity(execution, eventType); String ev...
java
public EventSubscriptionEntity createSubscriptionForExecution(ExecutionEntity execution) { EventSubscriptionEntity eventSubscriptionEntity = new EventSubscriptionEntity(execution, eventType); String eventName = resolveExpressionOfEventName(execution); eventSubscriptionEntity.setEventName(eventName); if...
[ "public", "EventSubscriptionEntity", "createSubscriptionForExecution", "(", "ExecutionEntity", "execution", ")", "{", "EventSubscriptionEntity", "eventSubscriptionEntity", "=", "new", "EventSubscriptionEntity", "(", "execution", ",", "eventType", ")", ";", "String", "eventNam...
Creates and inserts a subscription entity depending on the message type of this declaration.
[ "Creates", "and", "inserts", "a", "subscription", "entity", "depending", "on", "the", "message", "type", "of", "this", "declaration", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/EventSubscriptionDeclaration.java#L152-L166
aicer/hibiscus-http-client
src/main/java/org/aicer/hibiscus/http/client/HttpClient.java
HttpClient.addNameValuePair
public final HttpClient addNameValuePair(final String param, final Integer value) { """ Used by Entity-Enclosing HTTP Requests to send Name-Value pairs in the body of the request @param param Name of Parameter @param value Value of Parameter @return """ return addNameValuePair(param, value.toStrin...
java
public final HttpClient addNameValuePair(final String param, final Integer value) { return addNameValuePair(param, value.toString()); }
[ "public", "final", "HttpClient", "addNameValuePair", "(", "final", "String", "param", ",", "final", "Integer", "value", ")", "{", "return", "addNameValuePair", "(", "param", ",", "value", ".", "toString", "(", ")", ")", ";", "}" ]
Used by Entity-Enclosing HTTP Requests to send Name-Value pairs in the body of the request @param param Name of Parameter @param value Value of Parameter @return
[ "Used", "by", "Entity", "-", "Enclosing", "HTTP", "Requests", "to", "send", "Name", "-", "Value", "pairs", "in", "the", "body", "of", "the", "request" ]
train
https://github.com/aicer/hibiscus-http-client/blob/a037e3cf8d4bb862d38a55a090778736a48d67cc/src/main/java/org/aicer/hibiscus/http/client/HttpClient.java#L269-L271
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java
Bean.setPin
public void setPin(int pin, boolean active) { """ Set the Bean's security code. @param pin the 6 digit pin as a number, e.g. <code>123456</code> @param active true to enable authenticated mode, false to disable the current pin """ Buffer buffer = new Buffer(); buffer.writeIntLe(pin); ...
java
public void setPin(int pin, boolean active) { Buffer buffer = new Buffer(); buffer.writeIntLe(pin); buffer.writeByte(active ? 1 : 0); sendMessage(BeanMessageID.BT_SET_PIN, buffer); }
[ "public", "void", "setPin", "(", "int", "pin", ",", "boolean", "active", ")", "{", "Buffer", "buffer", "=", "new", "Buffer", "(", ")", ";", "buffer", ".", "writeIntLe", "(", "pin", ")", ";", "buffer", ".", "writeByte", "(", "active", "?", "1", ":", ...
Set the Bean's security code. @param pin the 6 digit pin as a number, e.g. <code>123456</code> @param active true to enable authenticated mode, false to disable the current pin
[ "Set", "the", "Bean", "s", "security", "code", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java#L986-L991
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.queryProperties
public MetadataQueryEnvelope queryProperties(String dtid, Integer count, Integer offset, String filter, Boolean includeTimestamp) throws ApiException { """ Query device properties across devices. Query device properties across devices. @param dtid Device Type ID. (required) @param count Max results count. (opti...
java
public MetadataQueryEnvelope queryProperties(String dtid, Integer count, Integer offset, String filter, Boolean includeTimestamp) throws ApiException { ApiResponse<MetadataQueryEnvelope> resp = queryPropertiesWithHttpInfo(dtid, count, offset, filter, includeTimestamp); return resp.getData(); }
[ "public", "MetadataQueryEnvelope", "queryProperties", "(", "String", "dtid", ",", "Integer", "count", ",", "Integer", "offset", ",", "String", "filter", ",", "Boolean", "includeTimestamp", ")", "throws", "ApiException", "{", "ApiResponse", "<", "MetadataQueryEnvelope"...
Query device properties across devices. Query device properties across devices. @param dtid Device Type ID. (required) @param count Max results count. (optional) @param offset Result starting offset. (optional) @param filter Query filter. Comma-separated key&#x3D;value pairs (optional) @param includeTimestamp Include t...
[ "Query", "device", "properties", "across", "devices", ".", "Query", "device", "properties", "across", "devices", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L1421-L1424
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
JsonPath.read
@SuppressWarnings( { """ Creates a new JsonPath and applies it to the provided Json string @param json a json string @param jsonPath the json path @param filters filters to be applied to the filter place holders [?] in the path @param <T> expected return type @return list of objects matched by th...
java
@SuppressWarnings({"unchecked"}) public static <T> T read(String json, String jsonPath, Predicate... filters) { return new ParseContextImpl().parse(json).read(jsonPath, filters); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "static", "<", "T", ">", "T", "read", "(", "String", "json", ",", "String", "jsonPath", ",", "Predicate", "...", "filters", ")", "{", "return", "new", "ParseContextImpl", "(", ")", "...
Creates a new JsonPath and applies it to the provided Json string @param json a json string @param jsonPath the json path @param filters filters to be applied to the filter place holders [?] in the path @param <T> expected return type @return list of objects matched by the given path
[ "Creates", "a", "new", "JsonPath", "and", "applies", "it", "to", "the", "provided", "Json", "string" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L496-L499
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/MutableClock.java
MutableClock.of
public static MutableClock of(Instant instant, ZoneId zone) { """ Obtains a new {@code MutableClock} set to the specified instant, converting to date and time using the specified time-zone. @param instant the initial value for the clock, not null @param zone the time-zone to use, not null @return a new {@cod...
java
public static MutableClock of(Instant instant, ZoneId zone) { Objects.requireNonNull(instant, "instant"); Objects.requireNonNull(zone, "zone"); return new MutableClock(new InstantHolder(instant), zone); }
[ "public", "static", "MutableClock", "of", "(", "Instant", "instant", ",", "ZoneId", "zone", ")", "{", "Objects", ".", "requireNonNull", "(", "instant", ",", "\"instant\"", ")", ";", "Objects", ".", "requireNonNull", "(", "zone", ",", "\"zone\"", ")", ";", ...
Obtains a new {@code MutableClock} set to the specified instant, converting to date and time using the specified time-zone. @param instant the initial value for the clock, not null @param zone the time-zone to use, not null @return a new {@code MutableClock}, not null
[ "Obtains", "a", "new", "{", "@code", "MutableClock", "}", "set", "to", "the", "specified", "instant", "converting", "to", "date", "and", "time", "using", "the", "specified", "time", "-", "zone", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/MutableClock.java#L149-L153
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/VFSStoreResource.java
VFSStoreResource.read
@Override public InputStream read() throws EFapsException { """ Returns for the file the input stream. @return input stream of the file with the content @throws EFapsException on error """ StoreResourceInputStream in = null; try { final FileObject file = this.manage...
java
@Override public InputStream read() throws EFapsException { StoreResourceInputStream in = null; try { final FileObject file = this.manager.resolveFile(this.storeFileName + VFSStoreResource.EXTENSION_NORMAL); if (!file.isReadable()) { VFSStoreReso...
[ "@", "Override", "public", "InputStream", "read", "(", ")", "throws", "EFapsException", "{", "StoreResourceInputStream", "in", "=", "null", ";", "try", "{", "final", "FileObject", "file", "=", "this", ".", "manager", ".", "resolveFile", "(", "this", ".", "st...
Returns for the file the input stream. @return input stream of the file with the content @throws EFapsException on error
[ "Returns", "for", "the", "file", "the", "input", "stream", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/VFSStoreResource.java#L348-L368
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readFile
public CmsFile readFile(CmsDbContext dbc, CmsResource resource) throws CmsException { """ Reads a file resource (including it's binary content) from the VFS, using the specified resource filter.<p> In case you do not need the file content, use <code>{@link #readResource(CmsDbContext, String, CmsResourceFilter...
java
public CmsFile readFile(CmsDbContext dbc, CmsResource resource) throws CmsException { if (resource.isFolder()) { throw new CmsVfsResourceNotFoundException( Messages.get().container( Messages.ERR_ACCESS_FOLDER_AS_FILE_1, dbc.removeSiteRoot(reso...
[ "public", "CmsFile", "readFile", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "if", "(", "resource", ".", "isFolder", "(", ")", ")", "{", "throw", "new", "CmsVfsResourceNotFoundException", "(", "Messages", ".", ...
Reads a file resource (including it's binary content) from the VFS, using the specified resource filter.<p> In case you do not need the file content, use <code>{@link #readResource(CmsDbContext, String, CmsResourceFilter)}</code> instead.<p> The specified filter controls what kind of resources should be "found" durin...
[ "Reads", "a", "file", "resource", "(", "including", "it", "s", "binary", "content", ")", "from", "the", "VFS", "using", "the", "specified", "resource", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L6824-L6847
alkacon/opencms-core
src/org/opencms/search/CmsSearchUtil.java
CmsSearchUtil.getDateCreatedTimeRangeFilterQuery
public static String getDateCreatedTimeRangeFilterQuery(String searchField, long startTime, long endTime) { """ Returns a time interval as Solr compatible query string. @param searchField the field to search for. @param startTime the lower limit of the interval. @param endTime the upper limit of the interval. ...
java
public static String getDateCreatedTimeRangeFilterQuery(String searchField, long startTime, long endTime) { String sStartTime = null; String sEndTime = null; // Convert startTime to ISO 8601 format if ((startTime > Long.MIN_VALUE) && (startTime < Long.MAX_VALUE)) { sStartTi...
[ "public", "static", "String", "getDateCreatedTimeRangeFilterQuery", "(", "String", "searchField", ",", "long", "startTime", ",", "long", "endTime", ")", "{", "String", "sStartTime", "=", "null", ";", "String", "sEndTime", "=", "null", ";", "// Convert startTime to I...
Returns a time interval as Solr compatible query string. @param searchField the field to search for. @param startTime the lower limit of the interval. @param endTime the upper limit of the interval. @return Solr compatible query string.
[ "Returns", "a", "time", "interval", "as", "Solr", "compatible", "query", "string", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchUtil.java#L209-L229
davetcc/tcMenu
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/uimodel/UIMenuItem.java
UIMenuItem.safeIntFromProperty
protected int safeIntFromProperty(StringProperty strProp, String field, List<FieldError> errorsBuilder, int min, int max) { """ Gets the integer value from a text field property and validates it again the conditions provided. It must be a number and within the ranges provided...
java
protected int safeIntFromProperty(StringProperty strProp, String field, List<FieldError> errorsBuilder, int min, int max) { String s = strProp.get(); if (StringHelper.isStringEmptyOrNull(s)) { return 0; } int val = 0; try { ...
[ "protected", "int", "safeIntFromProperty", "(", "StringProperty", "strProp", ",", "String", "field", ",", "List", "<", "FieldError", ">", "errorsBuilder", ",", "int", "min", ",", "int", "max", ")", "{", "String", "s", "=", "strProp", ".", "get", "(", ")", ...
Gets the integer value from a text field property and validates it again the conditions provided. It must be a number and within the ranges provided. @param strProp the property to convert @param field the field to report errors against @param errorsBuilder the list of errors recorded so far @param min the minimum valu...
[ "Gets", "the", "integer", "value", "from", "a", "text", "field", "property", "and", "validates", "it", "again", "the", "conditions", "provided", ".", "It", "must", "be", "a", "number", "and", "within", "the", "ranges", "provided", "." ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/uimodel/UIMenuItem.java#L224-L241
pravega/pravega
segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/admin/commands/BookKeeperCommand.java
BookKeeperCommand.createContext
protected Context createContext() throws DurableDataLogException { """ Creates a new Context to be used by the BookKeeper command. @return A new Context. @throws DurableDataLogException If the BookKeeperLogFactory could not be initialized. """ val serviceConfig = getServiceConfig(); val bkC...
java
protected Context createContext() throws DurableDataLogException { val serviceConfig = getServiceConfig(); val bkConfig = getCommandArgs().getState().getConfigBuilder() .include(BookKeeperConfig.builder().with(BookKeeperConfig.ZK_ADDRESS, serviceConfig.getZkURL()))...
[ "protected", "Context", "createContext", "(", ")", "throws", "DurableDataLogException", "{", "val", "serviceConfig", "=", "getServiceConfig", "(", ")", ";", "val", "bkConfig", "=", "getCommandArgs", "(", ")", ".", "getState", "(", ")", ".", "getConfigBuilder", "...
Creates a new Context to be used by the BookKeeper command. @return A new Context. @throws DurableDataLogException If the BookKeeperLogFactory could not be initialized.
[ "Creates", "a", "new", "Context", "to", "be", "used", "by", "the", "BookKeeper", "command", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/admin/commands/BookKeeperCommand.java#L57-L73
k3po/k3po
lang/src/main/java/org/kaazing/k3po/lang/el/FunctionMapper.java
FunctionMapper.resolveFunction
public Method resolveFunction(String prefix, String localName) { """ Resolves a Function via prefix and local name. @param prefix of the function @param localName of the function @return an instance of a Method """ FunctionMapperSpi functionMapperSpi = findFunctionMapperSpi(prefix); return f...
java
public Method resolveFunction(String prefix, String localName) { FunctionMapperSpi functionMapperSpi = findFunctionMapperSpi(prefix); return functionMapperSpi.resolveFunction(localName); }
[ "public", "Method", "resolveFunction", "(", "String", "prefix", ",", "String", "localName", ")", "{", "FunctionMapperSpi", "functionMapperSpi", "=", "findFunctionMapperSpi", "(", "prefix", ")", ";", "return", "functionMapperSpi", ".", "resolveFunction", "(", "localNam...
Resolves a Function via prefix and local name. @param prefix of the function @param localName of the function @return an instance of a Method
[ "Resolves", "a", "Function", "via", "prefix", "and", "local", "name", "." ]
train
https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/lang/src/main/java/org/kaazing/k3po/lang/el/FunctionMapper.java#L66-L69
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.getAncestor
public static Element getAncestor(Element element, Tag tag) { """ Returns the given element or it's closest ancestor with the given tag name.<p> Returns <code>null</code> if no appropriate element was found.<p> @param element the element @param tag the tag name @return the matching element """ ...
java
public static Element getAncestor(Element element, Tag tag) { if ((element == null) || (tag == null)) { return null; } if (element.getTagName().equalsIgnoreCase(tag.name())) { return element; } if (element.getTagName().equalsIgnoreCase(Tag.body.name())) {...
[ "public", "static", "Element", "getAncestor", "(", "Element", "element", ",", "Tag", "tag", ")", "{", "if", "(", "(", "element", "==", "null", ")", "||", "(", "tag", "==", "null", ")", ")", "{", "return", "null", ";", "}", "if", "(", "element", "."...
Returns the given element or it's closest ancestor with the given tag name.<p> Returns <code>null</code> if no appropriate element was found.<p> @param element the element @param tag the tag name @return the matching element
[ "Returns", "the", "given", "element", "or", "it", "s", "closest", "ancestor", "with", "the", "given", "tag", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1161-L1173
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/internal/AttachmentController.java
AttachmentController.createMessageProcessor
public MessageProcessor createMessageProcessor(@NonNull MessageToSend message, @Nullable List<Attachment> attachments, @NonNull String conversationId, @NonNull String profileId) { """ Create instance of message processor to handle sending process of a message with attachments. @param message Message to s...
java
public MessageProcessor createMessageProcessor(@NonNull MessageToSend message, @Nullable List<Attachment> attachments, @NonNull String conversationId, @NonNull String profileId) { return new MessageProcessor(conversationId, profileId, message, attachments, maxPartSize, log); }
[ "public", "MessageProcessor", "createMessageProcessor", "(", "@", "NonNull", "MessageToSend", "message", ",", "@", "Nullable", "List", "<", "Attachment", ">", "attachments", ",", "@", "NonNull", "String", "conversationId", ",", "@", "NonNull", "String", "profileId",...
Create instance of message processor to handle sending process of a message with attachments. @param message Message to send. @param attachments Attachments to upload with a message. @param conversationId Unique conversation id. @param profileId User profile id. @return Message processor
[ "Create", "instance", "of", "message", "processor", "to", "handle", "sending", "process", "of", "a", "message", "with", "attachments", "." ]
train
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/internal/AttachmentController.java#L84-L86
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.saveDetailPages
private void saveDetailPages( List<CmsDetailPageInfo> detailPages, CmsResource resource, CmsUUID newId, CmsClientSitemapEntry updateEntry) throws CmsException { """ Saves the detail page information of a sitemap to the sitemap's configuration file.<p> @param detailPages saves...
java
private void saveDetailPages( List<CmsDetailPageInfo> detailPages, CmsResource resource, CmsUUID newId, CmsClientSitemapEntry updateEntry) throws CmsException { CmsObject cms = getCmsObject(); if (updateEntry != null) { for (CmsDetailPageInfo info : detai...
[ "private", "void", "saveDetailPages", "(", "List", "<", "CmsDetailPageInfo", ">", "detailPages", ",", "CmsResource", "resource", ",", "CmsUUID", "newId", ",", "CmsClientSitemapEntry", "updateEntry", ")", "throws", "CmsException", "{", "CmsObject", "cms", "=", "getCm...
Saves the detail page information of a sitemap to the sitemap's configuration file.<p> @param detailPages saves the detailpage configuration @param resource the configuration file resource @param newId the structure id to use for new detail page entries @param updateEntry the new detail page entry @throws CmsExceptio...
[ "Saves", "the", "detail", "page", "information", "of", "a", "sitemap", "to", "the", "sitemap", "s", "configuration", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L3010-L3028
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.rotateZYX
public Matrix3f rotateZYX(Vector3f angles) { """ Apply rotation of <code>angles.z</code> radians about the Z axis, followed by a rotation of <code>angles.y</code> radians about the Y axis and followed by a rotation of <code>angles.x</code> radians about the X axis. <p> When used with a right-handed coordinate s...
java
public Matrix3f rotateZYX(Vector3f angles) { return rotateZYX(angles.z, angles.y, angles.x); }
[ "public", "Matrix3f", "rotateZYX", "(", "Vector3f", "angles", ")", "{", "return", "rotateZYX", "(", "angles", ".", "z", ",", "angles", ".", "y", ",", "angles", ".", "x", ")", ";", "}" ]
Apply rotation of <code>angles.z</code> radians about the Z axis, followed by a rotation of <code>angles.y</code> radians about the Y axis and followed by a rotation of <code>angles.x</code> radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter...
[ "Apply", "rotation", "of", "<code", ">", "angles", ".", "z<", "/", "code", ">", "radians", "about", "the", "Z", "axis", "followed", "by", "a", "rotation", "of", "<code", ">", "angles", ".", "y<", "/", "code", ">", "radians", "about", "the", "Y", "axi...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L2107-L2109
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/LockedMessageEnumerationImpl.java
LockedMessageEnumerationImpl.deleteMessages
private void deleteMessages(JsMessage[] messagesToDelete, SITransaction transaction) throws SISessionUnavailableException, SISessionDroppedException, SIConnectionUnavailableException, SIConnectionDroppedException, SIResourceException, SIConnectionLostException, SILimitExceededException, ...
java
private void deleteMessages(JsMessage[] messagesToDelete, SITransaction transaction) throws SISessionUnavailableException, SISessionDroppedException, SIConnectionUnavailableException, SIConnectionDroppedException, SIResourceException, SIConnectionLostException, SILimitExceededException, ...
[ "private", "void", "deleteMessages", "(", "JsMessage", "[", "]", "messagesToDelete", ",", "SITransaction", "transaction", ")", "throws", "SISessionUnavailableException", ",", "SISessionDroppedException", ",", "SIConnectionUnavailableException", ",", "SIConnectionDroppedExceptio...
This private method actually performs the delete by asking the conversation helper to flow the request across the wire. However, this method does not obtain any locks required to perform this operation and as such should be called by a method that does do this. @param messagesToDelete @param transaction @throws SICom...
[ "This", "private", "method", "actually", "performs", "the", "delete", "by", "asking", "the", "conversation", "helper", "to", "flow", "the", "request", "across", "the", "wire", ".", "However", "this", "method", "does", "not", "obtain", "any", "locks", "required...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/impl/LockedMessageEnumerationImpl.java#L371-L407
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java
ImmutableList.subList
@Override public ImmutableList<E> subList(int fromIndex, int toIndex) { """ Returns an immutable list of the elements between the specified {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the empty immutable list is returned.) """ chec...
java
@Override public ImmutableList<E> subList(int fromIndex, int toIndex) { checkPositionIndexes(fromIndex, toIndex, size()); int length = toIndex - fromIndex; if (length == size()) { return this; } switch (length) { case 0: return of(); case 1: return of(get(fromInde...
[ "@", "Override", "public", "ImmutableList", "<", "E", ">", "subList", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "checkPositionIndexes", "(", "fromIndex", ",", "toIndex", ",", "size", "(", ")", ")", ";", "int", "length", "=", "toIndex", "-...
Returns an immutable list of the elements between the specified {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the empty immutable list is returned.)
[ "Returns", "an", "immutable", "list", "of", "the", "elements", "between", "the", "specified", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java#L360-L375
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/HELM1Utils.java
HELM1Utils.convertConnection
private static String convertConnection(String notation, String source, String target, Map<String, String> convertIds) throws HELM1ConverterException { """ method to convert the polymers ids of the connection @param notation connection description in HELM @param source polymer id of source @param target polym...
java
private static String convertConnection(String notation, String source, String target, Map<String, String> convertIds) throws HELM1ConverterException { try { String test = notation.replace(source, "one"); test = test.replace(target, "two"); test = test.replace("one", convertIds.get(source)); ...
[ "private", "static", "String", "convertConnection", "(", "String", "notation", ",", "String", "source", ",", "String", "target", ",", "Map", "<", "String", ",", "String", ">", "convertIds", ")", "throws", "HELM1ConverterException", "{", "try", "{", "String", "...
method to convert the polymers ids of the connection @param notation connection description in HELM @param source polymer id of source @param target polymer id of target @param convertIds Map of old polymer ids with the new polymer ids @return connection description in HELM with the changed polymer ids according to th...
[ "method", "to", "convert", "the", "polymers", "ids", "of", "the", "connection" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/HELM1Utils.java#L333-L345
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.addRow
public static void addRow(Matrix A, int i, int start, int to, double c) { """ Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+ c @param A the matrix to perform he update on @param i the row to update @param start the first index of the row to update from (inclusive) @param to t...
java
public static void addRow(Matrix A, int i, int start, int to, double c) { for(int j = start; j < to; j++) A.increment(i, j, c); }
[ "public", "static", "void", "addRow", "(", "Matrix", "A", ",", "int", "i", ",", "int", "start", ",", "int", "to", ",", "double", "c", ")", "{", "for", "(", "int", "j", "=", "start", ";", "j", "<", "to", ";", "j", "++", ")", "A", ".", "increme...
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+ c @param A the matrix to perform he update on @param i the row to update @param start the first index of the row to update from (inclusive) @param to the last index of the row to update (exclusive) @param c the constant to add to each elem...
[ "Updates", "the", "values", "of", "row", "<tt", ">", "i<", "/", "tt", ">", "in", "the", "given", "matrix", "to", "be", "A", "[", "i", ":", "]", "=", "A", "[", "i", ":", "]", "+", "c" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L32-L36
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/Util.java
Util.writeFully
public static void writeFully(ByteBuffer buffer, WritableByteChannel channel) throws IOException { """ Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the documentation is vague, so this keeps going until we are sure. @param buffer the data to be written @...
java
public static void writeFully(ByteBuffer buffer, WritableByteChannel channel) throws IOException { while (buffer.hasRemaining()) { channel.write(buffer); } }
[ "public", "static", "void", "writeFully", "(", "ByteBuffer", "buffer", ",", "WritableByteChannel", "channel", ")", "throws", "IOException", "{", "while", "(", "buffer", ".", "hasRemaining", "(", ")", ")", "{", "channel", ".", "write", "(", "buffer", ")", ";"...
Writes the entire remaining contents of the buffer to the channel. May complete in one operation, but the documentation is vague, so this keeps going until we are sure. @param buffer the data to be written @param channel the channel to which we want to write data @throws IOException if there is a problem writing to t...
[ "Writes", "the", "entire", "remaining", "contents", "of", "the", "buffer", "to", "the", "channel", ".", "May", "complete", "in", "one", "operation", "but", "the", "documentation", "is", "vague", "so", "this", "keeps", "going", "until", "we", "are", "sure", ...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/Util.java#L348-L352
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_line_serviceName_block_POST
public void billingAccount_line_serviceName_block_POST(String billingAccount, String serviceName, OvhLineBlockingMode mode) throws IOException { """ Block the line. By default it will block incoming and outgoing calls (except for emergency numbers) REST: POST /telephony/{billingAccount}/line/{serviceName}/block...
java
public void billingAccount_line_serviceName_block_POST(String billingAccount, String serviceName, OvhLineBlockingMode mode) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/block"; StringBuilder sb = path(qPath, billingAccount, serviceName); HashMap<String, Object>o = new HashMa...
[ "public", "void", "billingAccount_line_serviceName_block_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhLineBlockingMode", "mode", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/line/{serviceName}/block\...
Block the line. By default it will block incoming and outgoing calls (except for emergency numbers) REST: POST /telephony/{billingAccount}/line/{serviceName}/block @param mode [required] The block mode : outgoing, incoming, both (default: both) @param billingAccount [required] The name of your billingAccount @param se...
[ "Block", "the", "line", ".", "By", "default", "it", "will", "block", "incoming", "and", "outgoing", "calls", "(", "except", "for", "emergency", "numbers", ")" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L1900-L1906
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
TypeUtils.getTypeArguments
public static Map<TypeVariable<?>, Type> getTypeArguments(final Type type, final Class<?> toClass) { """ <p>Gets the type arguments of a class/interface based on a subtype. For instance, this method will determine that both of the parameters for the interface {@link Map} are {@link Object} for the subtype {@lin...
java
public static Map<TypeVariable<?>, Type> getTypeArguments(final Type type, final Class<?> toClass) { return getTypeArguments(type, toClass, null); }
[ "public", "static", "Map", "<", "TypeVariable", "<", "?", ">", ",", "Type", ">", "getTypeArguments", "(", "final", "Type", "type", ",", "final", "Class", "<", "?", ">", "toClass", ")", "{", "return", "getTypeArguments", "(", "type", ",", "toClass", ",", ...
<p>Gets the type arguments of a class/interface based on a subtype. For instance, this method will determine that both of the parameters for the interface {@link Map} are {@link Object} for the subtype {@link java.util.Properties Properties} even though the subtype does not directly implement the {@code Map} interface....
[ "<p", ">", "Gets", "the", "type", "arguments", "of", "a", "class", "/", "interface", "based", "on", "a", "subtype", ".", "For", "instance", "this", "method", "will", "determine", "that", "both", "of", "the", "parameters", "for", "the", "interface", "{", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java#L789-L791
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/NotificationsApi.java
NotificationsApi.unsubscribeWithHttpInfo
public ApiResponse<Void> unsubscribeWithHttpInfo() throws ApiException { """ CometD unsubscribe unscubscribe from channels, see https://docs.cometd.org/current/reference/#_bayeux_meta_unsubscribe @return ApiResponse&lt;Void&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserializ...
java
public ApiResponse<Void> unsubscribeWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = unsubscribeValidateBeforeCall(null, null); return apiClient.execute(call); }
[ "public", "ApiResponse", "<", "Void", ">", "unsubscribeWithHttpInfo", "(", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "unsubscribeValidateBeforeCall", "(", "null", ",", "null", ")", ";", "return", "apiC...
CometD unsubscribe unscubscribe from channels, see https://docs.cometd.org/current/reference/#_bayeux_meta_unsubscribe @return ApiResponse&lt;Void&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "CometD", "unsubscribe", "unscubscribe", "from", "channels", "see", "https", ":", "//", "docs", ".", "cometd", ".", "org", "/", "current", "/", "reference", "/", "#_bayeux_meta_unsubscribe" ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/NotificationsApi.java#L782-L785
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.deleteFromConference
public void deleteFromConference( String connId, String dnToDrop, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { """ Delete the specified DN from the conference call. This operation can only be performed by the own...
java
public void deleteFromConference( String connId, String dnToDrop, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsiddeletefromconferenceData deleteData = new Voi...
[ "public", "void", "deleteFromConference", "(", "String", "connId", ",", "String", "dnToDrop", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicecallsiddeletefromconferenceData", "d...
Delete the specified DN from the conference call. This operation can only be performed by the owner of the conference call. @param connId The connection ID of the conference. @param dnToDrop The DN of the party to drop from the conference. @param reasons Information on causes for, and results of, actions taken by the u...
[ "Delete", "the", "specified", "DN", "from", "the", "conference", "call", ".", "This", "operation", "can", "only", "be", "performed", "by", "the", "owner", "of", "the", "conference", "call", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L917-L937
Claudenw/junit-contracts
junit/src/main/java/org/xenei/junit/contract/ContractSuite.java
ContractSuite.addAnnotatedClasses
private List<Runner> addAnnotatedClasses(final Class<?> baseClass, final RunnerBuilder builder, final ContractTestMap contractTestMap, final Object baseObj) throws InitializationError { """ Add annotated classes to the test @param baseClass the base test class @param builder The builder to use @...
java
private List<Runner> addAnnotatedClasses(final Class<?> baseClass, final RunnerBuilder builder, final ContractTestMap contractTestMap, final Object baseObj) throws InitializationError { final List<Runner> runners = new ArrayList<Runner>(); final ContractImpl impl = getContractImpl( baseClass...
[ "private", "List", "<", "Runner", ">", "addAnnotatedClasses", "(", "final", "Class", "<", "?", ">", "baseClass", ",", "final", "RunnerBuilder", "builder", ",", "final", "ContractTestMap", "contractTestMap", ",", "final", "Object", "baseObj", ")", "throws", "Init...
Add annotated classes to the test @param baseClass the base test class @param builder The builder to use @param contractTestMap The ContractTest map. @param baseObj this is the instance object that we will use to get the producer instance. @return the list of runners @throws InitializationError
[ "Add", "annotated", "classes", "to", "the", "test" ]
train
https://github.com/Claudenw/junit-contracts/blob/47e7294dbff374cdd875b3aafe28db48a37fe4d4/junit/src/main/java/org/xenei/junit/contract/ContractSuite.java#L268-L289
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ResourceClaim.java
ResourceClaim.takeQueueTicket
static String takeQueueTicket(ZooKeeper zookeeper, String lockNode) throws InterruptedException, KeeperException { """ Take a ticket for the queue. If the ticket was already claimed by another process, this method retries until it succeeds. @param zookeeper ZooKeeper connection to use. @param lockNode Path to...
java
static String takeQueueTicket(ZooKeeper zookeeper, String lockNode) throws InterruptedException, KeeperException { // The ticket number includes a random component to decrease the chances of collision. Collision is handled // neatly, but it saves a few actions if there is no need to retry ticket acquisi...
[ "static", "String", "takeQueueTicket", "(", "ZooKeeper", "zookeeper", ",", "String", "lockNode", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "// The ticket number includes a random component to decrease the chances of collision. Collision is handled", "// neat...
Take a ticket for the queue. If the ticket was already claimed by another process, this method retries until it succeeds. @param zookeeper ZooKeeper connection to use. @param lockNode Path to the znode representing the locking queue. @return The claimed ticket.
[ "Take", "a", "ticket", "for", "the", "queue", ".", "If", "the", "ticket", "was", "already", "claimed", "by", "another", "process", "this", "method", "retries", "until", "it", "succeeds", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/ResourceClaim.java#L185-L194
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/SdkHttpUtils.java
SdkHttpUtils.encodeParameters
public static String encodeParameters(SignableRequest<?> request) { """ Creates an encoded query string from all the parameters in the specified request. @param request The request containing the parameters to encode. @return Null if no parameters were present, otherwise the encoded query string for the p...
java
public static String encodeParameters(SignableRequest<?> request) { final Map<String, List<String>> requestParams = request.getParameters(); if (requestParams.isEmpty()) return null; final List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); for (Entry<String, List<St...
[ "public", "static", "String", "encodeParameters", "(", "SignableRequest", "<", "?", ">", "request", ")", "{", "final", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "requestParams", "=", "request", ".", "getParameters", "(", ")", ";", "if", ...
Creates an encoded query string from all the parameters in the specified request. @param request The request containing the parameters to encode. @return Null if no parameters were present, otherwise the encoded query string for the parameters present in the specified request.
[ "Creates", "an", "encoded", "query", "string", "from", "all", "the", "parameters", "in", "the", "specified", "request", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/SdkHttpUtils.java#L159-L176
derari/cthul
log-cal10n/src/main/java/org/cthul/log/CLocLogConfiguration.java
CLocLogConfiguration.getClassLogger
public <E extends Enum<?>> CLocLogger<E> getClassLogger(int i) { """ Chooses a logger based on the class name of the caller of this method. {@code i == 0} identifies the caller of this method, for {@code i > 0}, the stack is walked upwards. @param i @return a logger """ if (i < 0) { thr...
java
public <E extends Enum<?>> CLocLogger<E> getClassLogger(int i) { if (i < 0) { throw new IllegalArgumentException("Expected value >= 0, got " + i); } return getLogger(slfLogger(i+1)); }
[ "public", "<", "E", "extends", "Enum", "<", "?", ">", ">", "CLocLogger", "<", "E", ">", "getClassLogger", "(", "int", "i", ")", "{", "if", "(", "i", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Expected value >= 0, got \"", "+"...
Chooses a logger based on the class name of the caller of this method. {@code i == 0} identifies the caller of this method, for {@code i > 0}, the stack is walked upwards. @param i @return a logger
[ "Chooses", "a", "logger", "based", "on", "the", "class", "name", "of", "the", "caller", "of", "this", "method", ".", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/log-cal10n/src/main/java/org/cthul/log/CLocLogConfiguration.java#L73-L78
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/result/renderer/RendererFactory.java
RendererFactory.isRendererMatch
private RendererSelection isRendererMatch(RendererBeanDescriptor<?> rendererDescriptor, Renderable renderable, RendererSelection bestMatch) { """ Checks if a particular renderer (descriptor) is a good match for a particular renderer. @param rendererDescriptor the renderer (descriptor) to check. @...
java
private RendererSelection isRendererMatch(RendererBeanDescriptor<?> rendererDescriptor, Renderable renderable, RendererSelection bestMatch) { final Class<? extends Renderable> renderableType = rendererDescriptor.getRenderableType(); if (ReflectionUtils.is(renderable.getClass(), renderableTyp...
[ "private", "RendererSelection", "isRendererMatch", "(", "RendererBeanDescriptor", "<", "?", ">", "rendererDescriptor", ",", "Renderable", "renderable", ",", "RendererSelection", "bestMatch", ")", "{", "final", "Class", "<", "?", "extends", "Renderable", ">", "renderab...
Checks if a particular renderer (descriptor) is a good match for a particular renderer. @param rendererDescriptor the renderer (descriptor) to check. @param renderable the renderable that needs rendering. @param bestMatchingDescriptor the currently "best matching" renderer (descriptor), or null if no other renderers m...
[ "Checks", "if", "a", "particular", "renderer", "(", "descriptor", ")", "is", "a", "good", "match", "for", "a", "particular", "renderer", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/result/renderer/RendererFactory.java#L164-L185
dbracewell/mango
src/main/java/com/davidbracewell/string/StringUtils.java
StringUtils.randomString
public static String randomString(int length, int min, int max, @NonNull CharMatcher validChar) { """ Generates a random string of a given length @param length The length of the string @param min The min character in the string @param max The max character in the string @param validChar CharPr...
java
public static String randomString(int length, int min, int max, @NonNull CharMatcher validChar) { if (length <= 0) { return EMPTY; } Random random = new Random(); int maxRandom = max - min; char[] array = new char[length]; for (int i = 0; i < array.length; i++) { ch...
[ "public", "static", "String", "randomString", "(", "int", "length", ",", "int", "min", ",", "int", "max", ",", "@", "NonNull", "CharMatcher", "validChar", ")", "{", "if", "(", "length", "<=", "0", ")", "{", "return", "EMPTY", ";", "}", "Random", "rando...
Generates a random string of a given length @param length The length of the string @param min The min character in the string @param max The max character in the string @param validChar CharPredicate that must match for a character to be returned in the string @return A string of random characters
[ "Generates", "a", "random", "string", "of", "a", "given", "length" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/string/StringUtils.java#L401-L418
ralscha/wampspring
src/main/java/ch/rasc/wampspring/config/WampSession.java
WampSession.registerDestructionCallback
public void registerDestructionCallback(String name, Runnable callback) { """ Register a callback to execute on destruction of the specified attribute. The callback is executed when the session is closed. @param name the name of the attribute to register the callback for @param callback the destruction callback...
java
public void registerDestructionCallback(String name, Runnable callback) { synchronized (getSessionMutex()) { if (isSessionCompleted()) { throw new IllegalStateException( "Session id=" + getWebSocketSessionId() + " already completed"); } setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, callback...
[ "public", "void", "registerDestructionCallback", "(", "String", "name", ",", "Runnable", "callback", ")", "{", "synchronized", "(", "getSessionMutex", "(", ")", ")", "{", "if", "(", "isSessionCompleted", "(", ")", ")", "{", "throw", "new", "IllegalStateException...
Register a callback to execute on destruction of the specified attribute. The callback is executed when the session is closed. @param name the name of the attribute to register the callback for @param callback the destruction callback to be executed
[ "Register", "a", "callback", "to", "execute", "on", "destruction", "of", "the", "specified", "attribute", ".", "The", "callback", "is", "executed", "when", "the", "session", "is", "closed", "." ]
train
https://github.com/ralscha/wampspring/blob/7571bb6773b848c580b29890587eb35397bfe5b5/src/main/java/ch/rasc/wampspring/config/WampSession.java#L108-L116
googleapis/google-cloud-java
google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java
CloudTasksClient.setIamPolicy
public final Policy setIamPolicy(QueueName resource, Policy policy) { """ Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing policy. <p>Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud ...
java
public final Policy setIamPolicy(QueueName resource, Policy policy) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource(resource == null ? null : resource.toString()) .setPolicy(policy) .build(); return setIamPolicy(request); }
[ "public", "final", "Policy", "setIamPolicy", "(", "QueueName", "resource", ",", "Policy", "policy", ")", "{", "SetIamPolicyRequest", "request", "=", "SetIamPolicyRequest", ".", "newBuilder", "(", ")", ".", "setResource", "(", "resource", "==", "null", "?", "null...
Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. Replaces any existing policy. <p>Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. <p>Authorization requires the following [Google IAM](https://cloud.google...
[ "Sets", "the", "access", "control", "policy", "for", "a", "[", "Queue", "]", "[", "google", ".", "cloud", ".", "tasks", ".", "v2", ".", "Queue", "]", ".", "Replaces", "any", "existing", "policy", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java#L1273-L1281
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java
ProxyTask.getNextStringParam
public String getNextStringParam(InputStream in, String strName, Map<String, Object> properties) { """ Get the next (String) param. Typically this is overidden in the concrete implementation. @param strName The param name (in most implementations this is optional). @param properties The temporary remote session...
java
public String getNextStringParam(InputStream in, String strName, Map<String, Object> properties) { String string = null; if (properties != null) if (properties.get(strName) != null) string = properties.get(strName).toString(); if (NULL.equals(string)) ...
[ "public", "String", "getNextStringParam", "(", "InputStream", "in", ",", "String", "strName", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "String", "string", "=", "null", ";", "if", "(", "properties", "!=", "null", ")", "if", "...
Get the next (String) param. Typically this is overidden in the concrete implementation. @param strName The param name (in most implementations this is optional). @param properties The temporary remote session properties @return The next param as a string.
[ "Get", "the", "next", "(", "String", ")", "param", ".", "Typically", "this", "is", "overidden", "in", "the", "concrete", "implementation", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java#L245-L254
vipshop/vjtools
vjstar/src/main/java/com/vip/vjstar/gc/CleanUpScheduler.java
CleanUpScheduler.getCurrentDateByPlan
public static Date getCurrentDateByPlan(String plan, String pattern) { """ return current date time by specified hour:minute @param plan format: hh:mm """ try { FastDateFormat format = FastDateFormat.getInstance(pattern); Date end = format.parse(plan); Calendar today = Calendar.getInstance(); ...
java
public static Date getCurrentDateByPlan(String plan, String pattern) { try { FastDateFormat format = FastDateFormat.getInstance(pattern); Date end = format.parse(plan); Calendar today = Calendar.getInstance(); end = DateUtils.setYears(end, (today.get(Calendar.YEAR))); end = DateUtils.setMonths(end, tod...
[ "public", "static", "Date", "getCurrentDateByPlan", "(", "String", "plan", ",", "String", "pattern", ")", "{", "try", "{", "FastDateFormat", "format", "=", "FastDateFormat", ".", "getInstance", "(", "pattern", ")", ";", "Date", "end", "=", "format", ".", "pa...
return current date time by specified hour:minute @param plan format: hh:mm
[ "return", "current", "date", "time", "by", "specified", "hour", ":", "minute" ]
train
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjstar/src/main/java/com/vip/vjstar/gc/CleanUpScheduler.java#L99-L111
rnorth/visible-assertions
src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java
VisibleAssertions.assertVisiblyEquals
public static void assertVisiblyEquals(String message, Object expected, Object actual) { """ Assert that an actual value is visibly equal to an expected value, following conversion to a String via toString(). <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be sho...
java
public static void assertVisiblyEquals(String message, Object expected, Object actual) { String expectedInQuotes = inQuotesIfNotNull(expected); String actualInQuotes = inQuotesIfNotNull(actual); if (areBothNull(expected, actual)) { pass(message); } else if (isObjectEquals(S...
[ "public", "static", "void", "assertVisiblyEquals", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "String", "expectedInQuotes", "=", "inQuotesIfNotNull", "(", "expected", ")", ";", "String", "actualInQuotes", "=", "inQuotes...
Assert that an actual value is visibly equal to an expected value, following conversion to a String via toString(). <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be shown. @param message message to display alongside the assertion outcome @param expected the expected...
[ "Assert", "that", "an", "actual", "value", "is", "visibly", "equal", "to", "an", "expected", "value", "following", "conversion", "to", "a", "String", "via", "toString", "()", ".", "<p", ">", "If", "the", "assertion", "passes", "a", "green", "tick", "will",...
train
https://github.com/rnorth/visible-assertions/blob/6d7a7724db40ac0e9f87279553f814b790310b3b/src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java#L187-L199