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
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.updateStreamRecording
public void updateStreamRecording(String domain, String app, String stream, String recording) { """ Update stream recording in live stream service @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The request...
java
public void updateStreamRecording(String domain, String app, String stream, String recording) { UpdateStreamRecordingRequest request = new UpdateStreamRecordingRequest() .withDomain(domain) .withApp(app) .withStream(stream) .withRecording(recording...
[ "public", "void", "updateStreamRecording", "(", "String", "domain", ",", "String", "app", ",", "String", "stream", ",", "String", "recording", ")", "{", "UpdateStreamRecordingRequest", "request", "=", "new", "UpdateStreamRecordingRequest", "(", ")", ".", "withDomain...
Update stream recording in live stream service @param domain The requested domain which the specific stream belongs to @param app The requested app which the specific stream belongs to @param stream The requested stream which need to update the recording @param recording The new recording's name
[ "Update", "stream", "recording", "in", "live", "stream", "service" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1664-L1671
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.domainName
public static Validator<CharSequence> domainName(@NonNull final Context context) { """ Creates and returns a validator, which allows to validate texts to ensure, that they represent valid domain names. Empty texts are also accepted. @param context The context, which should be used to retrieve the error messag...
java
public static Validator<CharSequence> domainName(@NonNull final Context context) { return new DomainNameValidator(context, R.string.default_error_message); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "domainName", "(", "@", "NonNull", "final", "Context", "context", ")", "{", "return", "new", "DomainNameValidator", "(", "context", ",", "R", ".", "string", ".", "default_error_message", ")", ";", "}" ...
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid domain names. Empty texts are also accepted. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @return The validato...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "represent", "valid", "domain", "names", ".", "Empty", "texts", "are", "also", "accepted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L1012-L1014
kiegroup/drools
drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java
SegmentUtilities.createSegmentMemory
public static void createSegmentMemory(LeftTupleSource tupleSource, InternalWorkingMemory wm) { """ Initialises the NodeSegment memory for all nodes in the segment. """ Memory mem = wm.getNodeMemory((MemoryFactory) tupleSource); SegmentMemory smem = mem.getSegmentMemory(); if ( smem == ...
java
public static void createSegmentMemory(LeftTupleSource tupleSource, InternalWorkingMemory wm) { Memory mem = wm.getNodeMemory((MemoryFactory) tupleSource); SegmentMemory smem = mem.getSegmentMemory(); if ( smem == null ) { createSegmentMemory(tupleSource, mem, wm); } }
[ "public", "static", "void", "createSegmentMemory", "(", "LeftTupleSource", "tupleSource", ",", "InternalWorkingMemory", "wm", ")", "{", "Memory", "mem", "=", "wm", ".", "getNodeMemory", "(", "(", "MemoryFactory", ")", "tupleSource", ")", ";", "SegmentMemory", "sme...
Initialises the NodeSegment memory for all nodes in the segment.
[ "Initialises", "the", "NodeSegment", "memory", "for", "all", "nodes", "in", "the", "segment", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/phreak/SegmentUtilities.java#L64-L70
lucee/Lucee
core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java
ResourceUtil.getExtension
public static String getExtension(Resource res, String defaultValue) { """ get the Extension of a file @param res @return extension of file """ return getExtension(res.getName(), defaultValue); }
java
public static String getExtension(Resource res, String defaultValue) { return getExtension(res.getName(), defaultValue); }
[ "public", "static", "String", "getExtension", "(", "Resource", "res", ",", "String", "defaultValue", ")", "{", "return", "getExtension", "(", "res", ".", "getName", "(", ")", ",", "defaultValue", ")", ";", "}" ]
get the Extension of a file @param res @return extension of file
[ "get", "the", "Extension", "of", "a", "file" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java#L840-L842
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java
PaginationAction.takeRemainingAsync
public RequestFuture<List<T>> takeRemainingAsync(int amount) { """ Convenience method to retrieve an amount of entities from this pagination action. <br>Unlike {@link #takeAsync(int)} this does not include already cached entities. @param amount The maximum amount to retrieve @return {@link net.dv8tion.jda...
java
public RequestFuture<List<T>> takeRemainingAsync(int amount) { return takeAsync0(amount, (task, list) -> forEachRemainingAsync(val -> { list.add(val); return list.size() < amount; }, task::completeExceptionally)); }
[ "public", "RequestFuture", "<", "List", "<", "T", ">", ">", "takeRemainingAsync", "(", "int", "amount", ")", "{", "return", "takeAsync0", "(", "amount", ",", "(", "task", ",", "list", ")", "->", "forEachRemainingAsync", "(", "val", "->", "{", "list", "."...
Convenience method to retrieve an amount of entities from this pagination action. <br>Unlike {@link #takeAsync(int)} this does not include already cached entities. @param amount The maximum amount to retrieve @return {@link net.dv8tion.jda.core.requests.RequestFuture RequestFuture} - Type: {@link java.util.List List...
[ "Convenience", "method", "to", "retrieve", "an", "amount", "of", "entities", "from", "this", "pagination", "action", ".", "<br", ">", "Unlike", "{", "@link", "#takeAsync", "(", "int", ")", "}", "this", "does", "not", "include", "already", "cached", "entities...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java#L348-L354
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/reader/TiffReader.java
TiffReader.getTiffITValidation
public ValidationResult getTiffITValidation(int profile) { """ Gets the result of the validation. @param profile the TiffIT profile (0: default, 1: P1, 2: P2) @return the validation result """ TiffITProfile bpit = new TiffITProfile(tiffModel, profile); bpit.validate(); return bpit.getValidation...
java
public ValidationResult getTiffITValidation(int profile) { TiffITProfile bpit = new TiffITProfile(tiffModel, profile); bpit.validate(); return bpit.getValidation(); }
[ "public", "ValidationResult", "getTiffITValidation", "(", "int", "profile", ")", "{", "TiffITProfile", "bpit", "=", "new", "TiffITProfile", "(", "tiffModel", ",", "profile", ")", ";", "bpit", ".", "validate", "(", ")", ";", "return", "bpit", ".", "getValidatio...
Gets the result of the validation. @param profile the TiffIT profile (0: default, 1: P1, 2: P2) @return the validation result
[ "Gets", "the", "result", "of", "the", "validation", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/TiffReader.java#L152-L156
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asString
public static String asString(String expression, Node node) throws XPathExpressionException { """ Evaluates the specified XPath expression and returns the result as a string. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly via...
java
public static String asString(String expression, Node node) throws XPathExpressionException { return evaluateAsString(expression, node, xpath()); }
[ "public", "static", "String", "asString", "(", "String", "expression", ",", "Node", "node", ")", "throws", "XPathExpressionException", "{", "return", "evaluateAsString", "(", "expression", ",", "node", ",", "xpath", "(", ")", ")", ";", "}" ]
Evaluates the specified XPath expression and returns the result as a string. <p> This method can be expensive as a new xpath is instantiated per invocation. Consider passing in the xpath explicitly via { {@link #asDouble(String, Node, XPath)} instead. Note {@link XPath} is not thread-safe and not reentrant. @param ex...
[ "Evaluates", "the", "specified", "XPath", "expression", "and", "returns", "the", "result", "as", "a", "string", ".", "<p", ">", "This", "method", "can", "be", "expensive", "as", "a", "new", "xpath", "is", "instantiated", "per", "invocation", ".", "Consider",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L243-L246
lucee/Lucee
core/src/main/java/lucee/runtime/converter/JSConverter.java
JSConverter._serializeStruct
private String _serializeStruct(String name, Struct struct, StringBuilder sb, Set<Object> done) throws ConverterException { """ serialize a Struct @param name @param struct Struct to serialize @param done @param sb2 @return serialized struct @throws ConverterException """ if (useShortcuts) sb.append("...
java
private String _serializeStruct(String name, Struct struct, StringBuilder sb, Set<Object> done) throws ConverterException { if (useShortcuts) sb.append("{};"); else sb.append("new Object();"); Iterator<Entry<Key, Object>> it = struct.entryIterator(); Entry<Key, Object> e; while (it.hasNext()) { e = it.next()...
[ "private", "String", "_serializeStruct", "(", "String", "name", ",", "Struct", "struct", ",", "StringBuilder", "sb", ",", "Set", "<", "Object", ">", "done", ")", "throws", "ConverterException", "{", "if", "(", "useShortcuts", ")", "sb", ".", "append", "(", ...
serialize a Struct @param name @param struct Struct to serialize @param done @param sb2 @return serialized struct @throws ConverterException
[ "serialize", "a", "Struct" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/converter/JSConverter.java#L218-L232
jamesdbloom/mockserver
mockserver-core/src/main/java/org/mockserver/model/HttpResponse.java
HttpResponse.withCookie
public HttpResponse withCookie(NottableString name, NottableString value) { """ Adds one cookie to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values ...
java
public HttpResponse withCookie(NottableString name, NottableString value) { this.cookies.withEntry(name, value); return this; }
[ "public", "HttpResponse", "withCookie", "(", "NottableString", "name", ",", "NottableString", "value", ")", "{", "this", ".", "cookies", ".", "withEntry", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds one cookie to match on or to not match on using the NottableString, each NottableString can either be a positive matching value, such as string("match"), or a value to not match on, such as not("do not match"), the string values passed to the NottableString can be a plain string or a regex (for more details of the...
[ "Adds", "one", "cookie", "to", "match", "on", "or", "to", "not", "match", "on", "using", "the", "NottableString", "each", "NottableString", "can", "either", "be", "a", "positive", "matching", "value", "such", "as", "string", "(", "match", ")", "or", "a", ...
train
https://github.com/jamesdbloom/mockserver/blob/8b84fdd877e57b4eb780c9f8c8b1d65bcb448025/mockserver-core/src/main/java/org/mockserver/model/HttpResponse.java#L365-L368
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java
SchedulerStateManagerAdaptor.setSchedulerLocation
public Boolean setSchedulerLocation( Scheduler.SchedulerLocation location, String topologyName) { """ Set the scheduler location for the given topology @return Boolean - Success or Failure """ return awaitResult(delegate.setSchedulerLocation(location, topologyName)); }
java
public Boolean setSchedulerLocation( Scheduler.SchedulerLocation location, String topologyName) { return awaitResult(delegate.setSchedulerLocation(location, topologyName)); }
[ "public", "Boolean", "setSchedulerLocation", "(", "Scheduler", ".", "SchedulerLocation", "location", ",", "String", "topologyName", ")", "{", "return", "awaitResult", "(", "delegate", ".", "setSchedulerLocation", "(", "location", ",", "topologyName", ")", ")", ";", ...
Set the scheduler location for the given topology @return Boolean - Success or Failure
[ "Set", "the", "scheduler", "location", "for", "the", "given", "topology" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java#L141-L145
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java
MultiMap.getValue
public Object getValue(Object name,int i) { """ Get a value from a multiple value. If the value is not a multivalue, then index 0 retrieves the value or null. @param name The entry key. @param i Index of element to get. @return Unmodifieable List of values. """ Object l=super.get(name); if...
java
public Object getValue(Object name,int i) { Object l=super.get(name); if (i==0 && LazyList.size(l)==0) return null; return LazyList.get(l,i); }
[ "public", "Object", "getValue", "(", "Object", "name", ",", "int", "i", ")", "{", "Object", "l", "=", "super", ".", "get", "(", "name", ")", ";", "if", "(", "i", "==", "0", "&&", "LazyList", ".", "size", "(", "l", ")", "==", "0", ")", "return",...
Get a value from a multiple value. If the value is not a multivalue, then index 0 retrieves the value or null. @param name The entry key. @param i Index of element to get. @return Unmodifieable List of values.
[ "Get", "a", "value", "from", "a", "multiple", "value", ".", "If", "the", "value", "is", "not", "a", "multivalue", "then", "index", "0", "retrieves", "the", "value", "or", "null", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java#L77-L83
cycorp/api-suite
core-api/src/main/java/com/cyc/query/exception/QueryException.java
QueryException.fromThrowable
public static QueryException fromThrowable(String message, Throwable cause) { """ Converts a Throwable to a QueryException with the specified detail message. If the Throwable is a QueryException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; othe...
java
public static QueryException fromThrowable(String message, Throwable cause) { return (cause instanceof QueryException && Objects.equals(message, cause.getMessage())) ? (QueryException) cause : new QueryException(message, cause); }
[ "public", "static", "QueryException", "fromThrowable", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "(", "cause", "instanceof", "QueryException", "&&", "Objects", ".", "equals", "(", "message", ",", "cause", ".", "getMessage", "(", ...
Converts a Throwable to a QueryException with the specified detail message. If the Throwable is a QueryException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in a new QueryException with the detail message. @param cause ...
[ "Converts", "a", "Throwable", "to", "a", "QueryException", "with", "the", "specified", "detail", "message", ".", "If", "the", "Throwable", "is", "a", "QueryException", "and", "if", "the", "Throwable", "s", "message", "is", "identical", "to", "the", "one", "s...
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/query/exception/QueryException.java#L59-L63
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ExtractJobConfiguration.java
ExtractJobConfiguration.of
public static ExtractJobConfiguration of( TableId sourceTable, List<String> destinationUris, String format) { """ Returns a BigQuery Extract Job configuration for the given source table, format and destination URIs. """ return newBuilder(sourceTable, destinationUris).setFormat(format).build(); }
java
public static ExtractJobConfiguration of( TableId sourceTable, List<String> destinationUris, String format) { return newBuilder(sourceTable, destinationUris).setFormat(format).build(); }
[ "public", "static", "ExtractJobConfiguration", "of", "(", "TableId", "sourceTable", ",", "List", "<", "String", ">", "destinationUris", ",", "String", "format", ")", "{", "return", "newBuilder", "(", "sourceTable", ",", "destinationUris", ")", ".", "setFormat", ...
Returns a BigQuery Extract Job configuration for the given source table, format and destination URIs.
[ "Returns", "a", "BigQuery", "Extract", "Job", "configuration", "for", "the", "given", "source", "table", "format", "and", "destination", "URIs", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ExtractJobConfiguration.java#L281-L284
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormat.java
DateTimeFormat.createFormatterForStyleIndex
private static DateTimeFormatter createFormatterForStyleIndex(int dateStyle, int timeStyle) { """ Gets the formatter for the specified style. @param dateStyle the date style @param timeStyle the time style @return the formatter """ int index = ((dateStyle << 2) + dateStyle) + timeStyle; // (dat...
java
private static DateTimeFormatter createFormatterForStyleIndex(int dateStyle, int timeStyle) { int index = ((dateStyle << 2) + dateStyle) + timeStyle; // (dateStyle * 5 + timeStyle); // Should never happen but do a double check... if (index >= cStyleCache.length()) { return createDat...
[ "private", "static", "DateTimeFormatter", "createFormatterForStyleIndex", "(", "int", "dateStyle", ",", "int", "timeStyle", ")", "{", "int", "index", "=", "(", "(", "dateStyle", "<<", "2", ")", "+", "dateStyle", ")", "+", "timeStyle", ";", "// (dateStyle * 5 + t...
Gets the formatter for the specified style. @param dateStyle the date style @param timeStyle the time style @return the formatter
[ "Gets", "the", "formatter", "for", "the", "specified", "style", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormat.java#L729-L743
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java
DatabaseTableAuditingPoliciesInner.createOrUpdateAsync
public Observable<DatabaseTableAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseTableAuditingPolicyInner parameters) { """ Creates or updates a database's table auditing policy. Table auditing is deprecated, use blob auditing instead. @param reso...
java
public Observable<DatabaseTableAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseTableAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceRes...
[ "public", "Observable", "<", "DatabaseTableAuditingPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "DatabaseTableAuditingPolicyInner", "parameters", ")", "{", "return", "createOrU...
Creates or updates a database's table auditing policy. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @par...
[ "Creates", "or", "updates", "a", "database", "s", "table", "auditing", "policy", ".", "Table", "auditing", "is", "deprecated", "use", "blob", "auditing", "instead", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java#L206-L213
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UPropertyAliases.java
UPropertyAliases.getPropertyName
public String getPropertyName(int property, int nameChoice) { """ Returns a property name given a property enum. Multiple names may be available for each property; the nameChoice selects among them. """ int valueMapIndex=findProperty(property); if(valueMapIndex==0) { throw new Ill...
java
public String getPropertyName(int property, int nameChoice) { int valueMapIndex=findProperty(property); if(valueMapIndex==0) { throw new IllegalArgumentException( "Invalid property enum "+property+" (0x"+Integer.toHexString(property)+")"); } return getName...
[ "public", "String", "getPropertyName", "(", "int", "property", ",", "int", "nameChoice", ")", "{", "int", "valueMapIndex", "=", "findProperty", "(", "property", ")", ";", "if", "(", "valueMapIndex", "==", "0", ")", "{", "throw", "new", "IllegalArgumentExceptio...
Returns a property name given a property enum. Multiple names may be available for each property; the nameChoice selects among them.
[ "Returns", "a", "property", "name", "given", "a", "property", "enum", ".", "Multiple", "names", "may", "be", "available", "for", "each", "property", ";", "the", "nameChoice", "selects", "among", "them", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UPropertyAliases.java#L243-L250
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/resources/HistoryResource.java
HistoryResource.jobHistory
@GET @Produces(APPLICATION_JSON) @Path("jobs/ { """ Returns the {@link TaskStatusEvents} for the specified job. @param jobId The ID of the job. @return The history of the jobs. @throws HeliosException If an unexpected error occurs. """id}") @Timed @ExceptionMetered public TaskStatusEvents jo...
java
@GET @Produces(APPLICATION_JSON) @Path("jobs/{id}") @Timed @ExceptionMetered public TaskStatusEvents jobHistory(@PathParam("id") @Valid final JobId jobId) throws HeliosException { if (!jobId.isFullyQualified()) { throw badRequest("Invalid id"); } try { final List<TaskStatusEvent>...
[ "@", "GET", "@", "Produces", "(", "APPLICATION_JSON", ")", "@", "Path", "(", "\"jobs/{id}\"", ")", "@", "Timed", "@", "ExceptionMetered", "public", "TaskStatusEvents", "jobHistory", "(", "@", "PathParam", "(", "\"id\"", ")", "@", "Valid", "final", "JobId", "...
Returns the {@link TaskStatusEvents} for the specified job. @param jobId The ID of the job. @return The history of the jobs. @throws HeliosException If an unexpected error occurs.
[ "Returns", "the", "{", "@link", "TaskStatusEvents", "}", "for", "the", "specified", "job", "." ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/resources/HistoryResource.java#L64-L82
Netflix/Hystrix
hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/closure/AbstractClosureFactory.java
AbstractClosureFactory.createClosure
Closure createClosure(String rootMethodName, final Object closureObj) throws Exception { """ Creates closure. @param rootMethodName the name of external method within which closure is created. @param closureObj the instance of specific anonymous class @return new {@link Closure} instance @throws Exceptio...
java
Closure createClosure(String rootMethodName, final Object closureObj) throws Exception { if (!isClosureCommand(closureObj)) { throw new RuntimeException(format(ERROR_TYPE_MESSAGE, rootMethodName, getClosureCommandType().getName()).getMessage()); } Method closureMe...
[ "Closure", "createClosure", "(", "String", "rootMethodName", ",", "final", "Object", "closureObj", ")", "throws", "Exception", "{", "if", "(", "!", "isClosureCommand", "(", "closureObj", ")", ")", "{", "throw", "new", "RuntimeException", "(", "format", "(", "E...
Creates closure. @param rootMethodName the name of external method within which closure is created. @param closureObj the instance of specific anonymous class @return new {@link Closure} instance @throws Exception
[ "Creates", "closure", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/command/closure/AbstractClosureFactory.java#L63-L70
algolia/instantsearch-android
core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java
Searcher.removeFacetRefinement
@NonNull @SuppressWarnings( { """ Removes a facet refinement for the next queries. <p> <b>This method resets the current page to 0.</b> @param attribute the attribute to refine on. @param value the facet's value to refine with. @return this {@link Searcher} for chaining. """"WeakerAccess", "unus...
java
@NonNull @SuppressWarnings({"WeakerAccess", "unused"}) // For library users public Searcher removeFacetRefinement(@NonNull String attribute, @NonNull String value) { List<String> attributeRefinements = getOrCreateRefinements(attribute); attributeRefinements.remove(value); rebuildQueryFac...
[ "@", "NonNull", "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "public", "Searcher", "removeFacetRefinement", "(", "@", "NonNull", "String", "attribute", ",", "@", "NonNull", "String", "value", ")", "{",...
Removes a facet refinement for the next queries. <p> <b>This method resets the current page to 0.</b> @param attribute the attribute to refine on. @param value the facet's value to refine with. @return this {@link Searcher} for chaining.
[ "Removes", "a", "facet", "refinement", "for", "the", "next", "queries", ".", "<p", ">", "<b", ">", "This", "method", "resets", "the", "current", "page", "to", "0", ".", "<", "/", "b", ">" ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L589-L597
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsProcessOutputHandler.java
WindowsProcessOutputHandler.getFaxJobStatus
public FaxJobStatus getFaxJobStatus(FaxClientSpi faxClientSpi,ProcessOutput processOutput) { """ This function extracts the fax job status from the process output. @param faxClientSpi The fax client SPI @param processOutput The process output @return The fax job status """ //get output ...
java
public FaxJobStatus getFaxJobStatus(FaxClientSpi faxClientSpi,ProcessOutput processOutput) { //get output String output=WindowsFaxClientSpiHelper.getOutputPart(processOutput,Fax4jExeConstants.FAX_JOB_STATUS_OUTPUT_PREFIX.toString()); FaxJobStatus faxJobStatus=null; if(output!=null) ...
[ "public", "FaxJobStatus", "getFaxJobStatus", "(", "FaxClientSpi", "faxClientSpi", ",", "ProcessOutput", "processOutput", ")", "{", "//get output", "String", "output", "=", "WindowsFaxClientSpiHelper", ".", "getOutputPart", "(", "processOutput", ",", "Fax4jExeConstants", "...
This function extracts the fax job status from the process output. @param faxClientSpi The fax client SPI @param processOutput The process output @return The fax job status
[ "This", "function", "extracts", "the", "fax", "job", "status", "from", "the", "process", "output", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsProcessOutputHandler.java#L65-L78
h2oai/h2o-3
h2o-core/src/main/java/water/nbhm/NonBlockingIdentityHashMap.java
NonBlockingIdentityHashMap.replace
public boolean replace ( TypeK key, TypeV oldValue, TypeV newValue ) { """ Atomically do a <code>put(key,newValue)</code> if-and-only-if the key is mapped a value which is <code>equals</code> to <code>oldValue</code>. @throws NullPointerException if the specified key or value is null """ return putI...
java
public boolean replace ( TypeK key, TypeV oldValue, TypeV newValue ) { return putIfMatch( key, newValue, oldValue ) == oldValue; }
[ "public", "boolean", "replace", "(", "TypeK", "key", ",", "TypeV", "oldValue", ",", "TypeV", "newValue", ")", "{", "return", "putIfMatch", "(", "key", ",", "newValue", ",", "oldValue", ")", "==", "oldValue", ";", "}" ]
Atomically do a <code>put(key,newValue)</code> if-and-only-if the key is mapped a value which is <code>equals</code> to <code>oldValue</code>. @throws NullPointerException if the specified key or value is null
[ "Atomically", "do", "a", "<code", ">", "put", "(", "key", "newValue", ")", "<", "/", "code", ">", "if", "-", "and", "-", "only", "-", "if", "the", "key", "is", "mapped", "a", "value", "which", "is", "<code", ">", "equals<", "/", "code", ">", "to"...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/nbhm/NonBlockingIdentityHashMap.java#L354-L356
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdNotInArrayCondition
protected void addIdNotInArrayCondition(final String propertyName, final String[] values) throws NumberFormatException { """ Add a Field Search Condition that will check if the id field does not exist in an array of id values that are represented as a String. eg. {@code field NOT IN (values)} @param propertyNa...
java
protected void addIdNotInArrayCondition(final String propertyName, final String[] values) throws NumberFormatException { final Set<Integer> idValues = new HashSet<Integer>(); for (final String value : values) { idValues.add(Integer.parseInt(value.trim())); } addIdNotInCollect...
[ "protected", "void", "addIdNotInArrayCondition", "(", "final", "String", "propertyName", ",", "final", "String", "[", "]", "values", ")", "throws", "NumberFormatException", "{", "final", "Set", "<", "Integer", ">", "idValues", "=", "new", "HashSet", "<", "Intege...
Add a Field Search Condition that will check if the id field does not exist in an array of id values that are represented as a String. eg. {@code field NOT IN (values)} @param propertyName The name of the field id as defined in the Entity mapping class. @param values The array of Ids to be compared to. @throws N...
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "does", "not", "exist", "in", "an", "array", "of", "id", "values", "that", "are", "represented", "as", "a", "String", ".", "eg", ".", "{", "@code", "field"...
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L396-L402
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.findByCommerceCurrencyId
@Override public List<CommercePriceList> findByCommerceCurrencyId( long commerceCurrencyId, int start, int end) { """ Returns a range of all the commerce price lists where commerceCurrencyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</co...
java
@Override public List<CommercePriceList> findByCommerceCurrencyId( long commerceCurrencyId, int start, int end) { return findByCommerceCurrencyId(commerceCurrencyId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommercePriceList", ">", "findByCommerceCurrencyId", "(", "long", "commerceCurrencyId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCommerceCurrencyId", "(", "commerceCurrencyId", ",", "start", ",", "...
Returns a range of all the commerce price lists where commerceCurrencyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first resul...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "price", "lists", "where", "commerceCurrencyId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L2566-L2570
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/update/nvd/ProcessTask.java
ProcessTask.importJSON
protected void importJSON(File file) throws ParserConfigurationException, IOException, SQLException, DatabaseException, ClassNotFoundException, UpdateException { """ Imports the NVD CVE JSON File into the database. @param file the file containing the NVD CVE JSON @throws ParserConfigurationExceptio...
java
protected void importJSON(File file) throws ParserConfigurationException, IOException, SQLException, DatabaseException, ClassNotFoundException, UpdateException { final NvdCveParser parser = new NvdCveParser(settings, cveDB); parser.parse(file); }
[ "protected", "void", "importJSON", "(", "File", "file", ")", "throws", "ParserConfigurationException", ",", "IOException", ",", "SQLException", ",", "DatabaseException", ",", "ClassNotFoundException", ",", "UpdateException", "{", "final", "NvdCveParser", "parser", "=", ...
Imports the NVD CVE JSON File into the database. @param file the file containing the NVD CVE JSON @throws ParserConfigurationException is thrown if there is a parser configuration exception @throws IOException is thrown if there is a IO Exception @throws SQLException is thrown if there is a SQL exception @throws Datab...
[ "Imports", "the", "NVD", "CVE", "JSON", "File", "into", "the", "database", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/update/nvd/ProcessTask.java#L135-L140
datacleaner/DataCleaner
desktop/api/src/main/java/org/datacleaner/widgets/ComboButton.java
ComboButton.addButton
public AbstractButton addButton(final String text, final String iconImagePath, final boolean toggleButton) { """ Adds a button to this {@link ComboButton} @param text the text of the button @param iconImagePath the icon path of the button @param toggleButton whether or not this button should be a toggle bu...
java
public AbstractButton addButton(final String text, final String iconImagePath, final boolean toggleButton) { final ImageIcon icon = ImageManager.get().getImageIcon(iconImagePath, IconUtils.ICON_SIZE_MEDIUM); return addButton(text, icon, toggleButton); }
[ "public", "AbstractButton", "addButton", "(", "final", "String", "text", ",", "final", "String", "iconImagePath", ",", "final", "boolean", "toggleButton", ")", "{", "final", "ImageIcon", "icon", "=", "ImageManager", ".", "get", "(", ")", ".", "getImageIcon", "...
Adds a button to this {@link ComboButton} @param text the text of the button @param iconImagePath the icon path of the button @param toggleButton whether or not this button should be a toggle button (true) or a regular button (false) @return
[ "Adds", "a", "button", "to", "this", "{", "@link", "ComboButton", "}" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/api/src/main/java/org/datacleaner/widgets/ComboButton.java#L176-L179
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java
GuacamoleWebSocketTunnelListener.closeConnection
private void closeConnection(Session session, int guacamoleStatusCode, int webSocketCode) { """ Sends the given numeric Guacamole and WebSocket status codes on the given WebSocket connection and closes the connection. @param session The outbound WebSocket connection to close. @param guacamoleS...
java
private void closeConnection(Session session, int guacamoleStatusCode, int webSocketCode) { try { String message = Integer.toString(guacamoleStatusCode); session.close(new CloseStatus(webSocketCode, message)); } catch (IOException e) { logger.debu...
[ "private", "void", "closeConnection", "(", "Session", "session", ",", "int", "guacamoleStatusCode", ",", "int", "webSocketCode", ")", "{", "try", "{", "String", "message", "=", "Integer", ".", "toString", "(", "guacamoleStatusCode", ")", ";", "session", ".", "...
Sends the given numeric Guacamole and WebSocket status codes on the given WebSocket connection and closes the connection. @param session The outbound WebSocket connection to close. @param guacamoleStatusCode The numeric Guacamole status code to send. @param webSocketCode The numeric WebSocket status code to send.
[ "Sends", "the", "given", "numeric", "Guacamole", "and", "WebSocket", "status", "codes", "on", "the", "given", "WebSocket", "connection", "and", "closes", "the", "connection", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java#L92-L103
sporniket/core
sporniket-core-lang/src/main/java/com/sporniket/libre/lang/functor/FunctorFactory.java
FunctorFactory.instanciateFunctorWithParameterAsAMethodWrapper
public static FunctorWithParameter instanciateFunctorWithParameterAsAMethodWrapper(final Object instance, final Method method) throws Exception { """ Create a functor with parameter, wrapping a call to another method. @param instance null is allowed, for wrapping static method calls @param method the met...
java
public static FunctorWithParameter instanciateFunctorWithParameterAsAMethodWrapper(final Object instance, final Method method) throws Exception { if (null == method) { throw new NullPointerException("Method is null"); } if (method.getParameterTypes().length != 1 || !Map.class.equals(method.getPara...
[ "public", "static", "FunctorWithParameter", "instanciateFunctorWithParameterAsAMethodWrapper", "(", "final", "Object", "instance", ",", "final", "Method", "method", ")", "throws", "Exception", "{", "if", "(", "null", "==", "method", ")", "{", "throw", "new", "NullPo...
Create a functor with parameter, wrapping a call to another method. @param instance null is allowed, for wrapping static method calls @param method the method to call. @return a Functor with parameter that call the specified method on the specified instance. @throws Exception if there is a problem to deal with.
[ "Create", "a", "functor", "with", "parameter", "wrapping", "a", "call", "to", "another", "method", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-lang/src/main/java/com/sporniket/libre/lang/functor/FunctorFactory.java#L140-L163
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/ErrorReportingServlet.java
ErrorReportingServlet.doGet
@Override final protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { """ Any error that occurs during a <code>doGet</code> is caught and reported here. """ resp.setBufferSize(BUFFER_SIZE); getCount.incrementAndGet(); try { reportingDoGet(req, r...
java
@Override final protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setBufferSize(BUFFER_SIZE); getCount.incrementAndGet(); try { reportingDoGet(req, resp); } catch (ThreadDeath t) { throw t; } catch (RuntimeException | ServletException | I...
[ "@", "Override", "final", "protected", "void", "doGet", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", "{", "resp", ".", "setBufferSize", "(", "BUFFER_SIZE", ")", ";", "getCount", ".", ...
Any error that occurs during a <code>doGet</code> is caught and reported here.
[ "Any", "error", "that", "occurs", "during", "a", "<code", ">", "doGet<", "/", "code", ">", "is", "caught", "and", "reported", "here", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/ErrorReportingServlet.java#L115-L130
Netflix/spectator
spectator-ext-placeholders/src/main/java/com/netflix/spectator/placeholders/DefaultPlaceholderId.java
DefaultPlaceholderId.createWithFactories
static DefaultPlaceholderId createWithFactories(String name, Iterable<TagFactory> tagFactories, Registry registry) { """ Creates a new id with the specified name and collection of factories. @param name the name of the new id @param tagFactories the possibly empty collection of factories to be attached to th...
java
static DefaultPlaceholderId createWithFactories(String name, Iterable<TagFactory> tagFactories, Registry registry) { if (tagFactories == null) { return new DefaultPlaceholderId(name, registry); } else { FactorySorterAndDeduplicator sorter = new FactorySorterAndDeduplicator(tagFactories); retu...
[ "static", "DefaultPlaceholderId", "createWithFactories", "(", "String", "name", ",", "Iterable", "<", "TagFactory", ">", "tagFactories", ",", "Registry", "registry", ")", "{", "if", "(", "tagFactories", "==", "null", ")", "{", "return", "new", "DefaultPlaceholderI...
Creates a new id with the specified name and collection of factories. @param name the name of the new id @param tagFactories the possibly empty collection of factories to be attached to the new id @param registry the registry to use when resolving to an {@link Id} @return the newly created id
[ "Creates", "a", "new", "id", "with", "the", "specified", "name", "and", "collection", "of", "factories", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-ext-placeholders/src/main/java/com/netflix/spectator/placeholders/DefaultPlaceholderId.java#L94-L102
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java
WebpackCache.getCompiled
public File getCompiled(AssetInfo asset, File starter) throws IOException, ServiceException { """ Starter file will be compiled, but asset used to compute output path. """ File file; synchronized(WebpackCache.class) { file = webpackAssets.get(asset); if (file == null || ...
java
public File getCompiled(AssetInfo asset, File starter) throws IOException, ServiceException { File file; synchronized(WebpackCache.class) { file = webpackAssets.get(asset); if (file == null || !file.exists() || file.lastModified() < asset.getFile().lastModified() ...
[ "public", "File", "getCompiled", "(", "AssetInfo", "asset", ",", "File", "starter", ")", "throws", "IOException", ",", "ServiceException", "{", "File", "file", ";", "synchronized", "(", "WebpackCache", ".", "class", ")", "{", "file", "=", "webpackAssets", ".",...
Starter file will be compiled, but asset used to compute output path.
[ "Starter", "file", "will", "be", "compiled", "but", "asset", "used", "to", "compute", "output", "path", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/node/WebpackCache.java#L144-L156
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.rotateAround
public Matrix4d rotateAround(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) { """ /* (non-Javadoc) @see org.joml.Matrix4dc#rotateAround(org.joml.Quaterniondc, double, double, double, org.joml.Matrix4d) """ if ((properties & PROPERTY_IDENTITY) != 0) return rotationAround...
java
public Matrix4d rotateAround(Quaterniondc quat, double ox, double oy, double oz, Matrix4d dest) { if ((properties & PROPERTY_IDENTITY) != 0) return rotationAround(quat, ox, oy, oz); else if ((properties & PROPERTY_AFFINE) != 0) return rotateAroundAffine(quat, ox, oy, oz, this); ...
[ "public", "Matrix4d", "rotateAround", "(", "Quaterniondc", "quat", ",", "double", "ox", ",", "double", "oy", ",", "double", "oz", ",", "Matrix4d", "dest", ")", "{", "if", "(", "(", "properties", "&", "PROPERTY_IDENTITY", ")", "!=", "0", ")", "return", "r...
/* (non-Javadoc) @see org.joml.Matrix4dc#rotateAround(org.joml.Quaterniondc, double, double, double, org.joml.Matrix4d)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L5059-L5065
cycorp/api-suite
core-api/src/main/java/com/cyc/kb/wrapper/BinaryPredicateWrapper.java
BinaryPredicateWrapper.addFact
@Override public Fact addFact(Context ctx, Object arg1, Object arg2) throws KbTypeException, CreateException { """ ====| Public methods |==================================================================// """ return wrapped().addFact(ctx, arg1, arg2); }
java
@Override public Fact addFact(Context ctx, Object arg1, Object arg2) throws KbTypeException, CreateException { return wrapped().addFact(ctx, arg1, arg2); }
[ "@", "Override", "public", "Fact", "addFact", "(", "Context", "ctx", ",", "Object", "arg1", ",", "Object", "arg2", ")", "throws", "KbTypeException", ",", "CreateException", "{", "return", "wrapped", "(", ")", ".", "addFact", "(", "ctx", ",", "arg1", ",", ...
====| Public methods |==================================================================//
[ "====", "|", "Public", "methods", "|", "==================================================================", "//" ]
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/kb/wrapper/BinaryPredicateWrapper.java#L45-L49
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/DefaultClusterManager.java
DefaultClusterManager.findDeploymentAddress
private void findDeploymentAddress(final String deploymentID, Handler<AsyncResult<String>> resultHandler) { """ Locates the internal address of the node on which a deployment is deployed. """ context.execute(new Action<String>() { @Override public String perform() { synchronized (deploy...
java
private void findDeploymentAddress(final String deploymentID, Handler<AsyncResult<String>> resultHandler) { context.execute(new Action<String>() { @Override public String perform() { synchronized (deployments) { JsonObject locatedInfo = null; Collection<String> sdeploymentsIn...
[ "private", "void", "findDeploymentAddress", "(", "final", "String", "deploymentID", ",", "Handler", "<", "AsyncResult", "<", "String", ">", ">", "resultHandler", ")", "{", "context", ".", "execute", "(", "new", "Action", "<", "String", ">", "(", ")", "{", ...
Locates the internal address of the node on which a deployment is deployed.
[ "Locates", "the", "internal", "address", "of", "the", "node", "on", "which", "a", "deployment", "is", "deployed", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/cluster/manager/impl/DefaultClusterManager.java#L1155-L1176
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java
SRTServletRequest.finish
public void finish() //280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause. { """ Close this request. This method must be called after the request has been processed. """ if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 ...
java
public void finish() //280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause. { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"finish", "entry"); } if (WCCustomProperti...
[ "public", "void", "finish", "(", ")", "//280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer removed throws clause.", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ...
Close this request. This method must be called after the request has been processed.
[ "Close", "this", "request", ".", "This", "method", "must", "be", "called", "after", "the", "request", "has", "been", "processed", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletRequest.java#L2700-L2738
lucee/Lucee
core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java
LDAPClient.setCredential
public void setCredential(String username, String password) { """ sets username password for the connection @param username @param password """ if (username != null) { env.put("java.naming.security.principal", username); env.put("java.naming.security.credentials", password); } else { env....
java
public void setCredential(String username, String password) { if (username != null) { env.put("java.naming.security.principal", username); env.put("java.naming.security.credentials", password); } else { env.remove("java.naming.security.principal"); env.remove("java.naming.security.credentials"); ...
[ "public", "void", "setCredential", "(", "String", "username", ",", "String", "password", ")", "{", "if", "(", "username", "!=", "null", ")", "{", "env", ".", "put", "(", "\"java.naming.security.principal\"", ",", "username", ")", ";", "env", ".", "put", "(...
sets username password for the connection @param username @param password
[ "sets", "username", "password", "for", "the", "connection" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/ldap/LDAPClient.java#L114-L123
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/CocoaPodsAnalyzer.java
CocoaPodsAnalyzer.analyzePodfileLockDependencies
private void analyzePodfileLockDependencies(Dependency podfileLock, Engine engine) throws AnalysisException { """ Analyzes the podfile.lock file to extract evidence for the dependency. @param podfileLock the dependency to analyze @param engine the analysis engine @throws AnalysisException thrown i...
java
private void analyzePodfileLockDependencies(Dependency podfileLock, Engine engine) throws AnalysisException { engine.removeDependency(podfileLock); final String contents; try { contents = FileUtils.readFileToString(podfileLock.getActualFile(), Charset.defaultCharset()); ...
[ "private", "void", "analyzePodfileLockDependencies", "(", "Dependency", "podfileLock", ",", "Engine", "engine", ")", "throws", "AnalysisException", "{", "engine", ".", "removeDependency", "(", "podfileLock", ")", ";", "final", "String", "contents", ";", "try", "{", ...
Analyzes the podfile.lock file to extract evidence for the dependency. @param podfileLock the dependency to analyze @param engine the analysis engine @throws AnalysisException thrown if there is an error analyzing the dependency
[ "Analyzes", "the", "podfile", ".", "lock", "file", "to", "extract", "evidence", "for", "the", "dependency", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/CocoaPodsAnalyzer.java#L165-L197
prestodb/presto
presto-thrift-connector/src/main/java/com/facebook/presto/connector/thrift/ThriftMetadata.java
ThriftMetadata.getTableMetadataInternal
private Optional<ThriftTableMetadata> getTableMetadataInternal(SchemaTableName schemaTableName) { """ this method makes actual thrift request and should be called only by cache load method """ requireNonNull(schemaTableName, "schemaTableName is null"); PrestoThriftNullableTableMetadata thriftTa...
java
private Optional<ThriftTableMetadata> getTableMetadataInternal(SchemaTableName schemaTableName) { requireNonNull(schemaTableName, "schemaTableName is null"); PrestoThriftNullableTableMetadata thriftTableMetadata = getTableMetadata(schemaTableName); if (thriftTableMetadata.getTableMetadata() ...
[ "private", "Optional", "<", "ThriftTableMetadata", ">", "getTableMetadataInternal", "(", "SchemaTableName", "schemaTableName", ")", "{", "requireNonNull", "(", "schemaTableName", ",", "\"schemaTableName is null\"", ")", ";", "PrestoThriftNullableTableMetadata", "thriftTableMeta...
this method makes actual thrift request and should be called only by cache load method
[ "this", "method", "makes", "actual", "thrift", "request", "and", "should", "be", "called", "only", "by", "cache", "load", "method" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-thrift-connector/src/main/java/com/facebook/presto/connector/thrift/ThriftMetadata.java#L198-L210
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWebWorkerMetricsWithServiceResponseAsync
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { """ Get metrics for a worker pool of a AppServiceEnvironment (App Service Environm...
java
public Observable<ServiceResponse<Page<ResourceMetricInner>>> listWebWorkerMetricsWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { return listWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolN...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ResourceMetricInner", ">", ">", ">", "listWebWorkerMetricsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "workerPoolName",...
Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). Get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param workerPoolNa...
[ "Get", "metrics", "for", "a", "worker", "pool", "of", "a", "AppServiceEnvironment", "(", "App", "Service", "Environment", ")", ".", "Get", "metrics", "for", "a", "worker", "pool", "of", "a", "AppServiceEnvironment", "(", "App", "Service", "Environment", ")", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L6270-L6282
scribejava/scribejava
scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth20Service.java
OAuth20Service.getAuthorizationUrl
public String getAuthorizationUrl(Map<String, String> additionalParams) { """ Returns the URL where you should redirect your users to authenticate your application. @param additionalParams any additional GET params to add to the URL @return the URL where you should redirect your users """ return cr...
java
public String getAuthorizationUrl(Map<String, String> additionalParams) { return createAuthorizationUrlBuilder() .additionalParams(additionalParams) .build(); }
[ "public", "String", "getAuthorizationUrl", "(", "Map", "<", "String", ",", "String", ">", "additionalParams", ")", "{", "return", "createAuthorizationUrlBuilder", "(", ")", ".", "additionalParams", "(", "additionalParams", ")", ".", "build", "(", ")", ";", "}" ]
Returns the URL where you should redirect your users to authenticate your application. @param additionalParams any additional GET params to add to the URL @return the URL where you should redirect your users
[ "Returns", "the", "URL", "where", "you", "should", "redirect", "your", "users", "to", "authenticate", "your", "application", "." ]
train
https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-core/src/main/java/com/github/scribejava/core/oauth/OAuth20Service.java#L331-L335
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java
CmsXmlContentPropertyHelper.convertIdsToPaths
protected static String convertIdsToPaths(CmsObject cms, String value) { """ Converts a string containing zero or more structure ids into a string containing the corresponding VFS paths.<p> @param cms the CmsObject to use for the VFS operations @param value a string representation of a list of ids @return a...
java
protected static String convertIdsToPaths(CmsObject cms, String value) { if (value == null) { return null; } // represent vfslists as lists of path in JSON List<String> ids = CmsStringUtil.splitAsList(value, CmsXmlContentProperty.PROP_SEPARATOR); List<String> paths =...
[ "protected", "static", "String", "convertIdsToPaths", "(", "CmsObject", "cms", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "// represent vfslists as lists of path in JSON", "List", "<", "String", ">",...
Converts a string containing zero or more structure ids into a string containing the corresponding VFS paths.<p> @param cms the CmsObject to use for the VFS operations @param value a string representation of a list of ids @return a string representation of a list of paths
[ "Converts", "a", "string", "containing", "zero", "or", "more", "structure", "ids", "into", "a", "string", "containing", "the", "corresponding", "VFS", "paths", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java#L799-L818
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/internal/LettuceAssert.java
LettuceAssert.noNullElements
public static void noNullElements(Collection<?> c, String message) { """ Assert that a {@link java.util.Collection} has no null elements. @param c the collection to check @param message the exception message to use if the assertion fails @throws IllegalArgumentException if the {@link Collection} contains a {@...
java
public static void noNullElements(Collection<?> c, String message) { if (c != null) { for (Object element : c) { if (element == null) { throw new IllegalArgumentException(message); } } } }
[ "public", "static", "void", "noNullElements", "(", "Collection", "<", "?", ">", "c", ",", "String", "message", ")", "{", "if", "(", "c", "!=", "null", ")", "{", "for", "(", "Object", "element", ":", "c", ")", "{", "if", "(", "element", "==", "null"...
Assert that a {@link java.util.Collection} has no null elements. @param c the collection to check @param message the exception message to use if the assertion fails @throws IllegalArgumentException if the {@link Collection} contains a {@code null} element
[ "Assert", "that", "a", "{", "@link", "java", ".", "util", ".", "Collection", "}", "has", "no", "null", "elements", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/internal/LettuceAssert.java#L112-L120
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/ListUtil.java
ListUtil.contains
@Pure public static <E> boolean contains(List<E> list, Comparator<? super E> comparator, E data) { """ Replies if the given element is inside the list, using a dichotomic algorithm. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the...
java
@Pure public static <E> boolean contains(List<E> list, Comparator<? super E> comparator, E data) { assert list != null; assert comparator != null; assert data != null; int first = 0; int last = list.size() - 1; while (last >= first) { final int center = (first + last) / 2; final E dt = list.get(cente...
[ "@", "Pure", "public", "static", "<", "E", ">", "boolean", "contains", "(", "List", "<", "E", ">", "list", ",", "Comparator", "<", "?", "super", "E", ">", "comparator", ",", "E", "data", ")", "{", "assert", "list", "!=", "null", ";", "assert", "com...
Replies if the given element is inside the list, using a dichotomic algorithm. <p>This function ensure that the comparator is invoked as: <code>comparator(data, dataAlreadyInList)</code>. @param <E> is the type of the elements in the list. @param list is the list to explore. @param comparator is the comparator of ele...
[ "Replies", "if", "the", "given", "element", "is", "inside", "the", "list", "using", "a", "dichotomic", "algorithm", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/ListUtil.java#L150-L170
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.calculateGroundResolution
public static double calculateGroundResolution(double latitude, long mapSize) { """ Calculates the distance on the ground that is represented by a single pixel on the map. @param latitude the latitude coordinate at which the resolution should be calculated. @param mapSize precomputed size of map. @return the...
java
public static double calculateGroundResolution(double latitude, long mapSize) { return Math.cos(latitude * (Math.PI / 180)) * EARTH_CIRCUMFERENCE / mapSize; }
[ "public", "static", "double", "calculateGroundResolution", "(", "double", "latitude", ",", "long", "mapSize", ")", "{", "return", "Math", ".", "cos", "(", "latitude", "*", "(", "Math", ".", "PI", "/", "180", ")", ")", "*", "EARTH_CIRCUMFERENCE", "/", "mapS...
Calculates the distance on the ground that is represented by a single pixel on the map. @param latitude the latitude coordinate at which the resolution should be calculated. @param mapSize precomputed size of map. @return the ground resolution at the given latitude and map size.
[ "Calculates", "the", "distance", "on", "the", "ground", "that", "is", "represented", "by", "a", "single", "pixel", "on", "the", "map", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L74-L76
jcuda/jcuda
JCudaJava/src/main/java/jcuda/cuDoubleComplex.java
cuDoubleComplex.cuCmplx
public static cuDoubleComplex cuCmplx (double r, double i) { """ Creates a new complex number consisting of the given real and imaginary part. @param r The real part of the complex number @param i The imaginary part of the complex number @return A complex number with the given real and imaginary part """...
java
public static cuDoubleComplex cuCmplx (double r, double i) { cuDoubleComplex res = new cuDoubleComplex(); res.x = r; res.y = i; return res; }
[ "public", "static", "cuDoubleComplex", "cuCmplx", "(", "double", "r", ",", "double", "i", ")", "{", "cuDoubleComplex", "res", "=", "new", "cuDoubleComplex", "(", ")", ";", "res", ".", "x", "=", "r", ";", "res", ".", "y", "=", "i", ";", "return", "res...
Creates a new complex number consisting of the given real and imaginary part. @param r The real part of the complex number @param i The imaginary part of the complex number @return A complex number with the given real and imaginary part
[ "Creates", "a", "new", "complex", "number", "consisting", "of", "the", "given", "real", "and", "imaginary", "part", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/cuDoubleComplex.java#L77-L83
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java
PublicanPODocBookBuilder.addPOTEntry
protected void addPOTEntry(final String tag, final String source, final StringBuilder potFile) { """ Add an entry to a POT file. @param tag The XML element name. @param source The original source string. @param potFile The POT file to add to. """ addPOEntry(tag, source, "", false, potFile); ...
java
protected void addPOTEntry(final String tag, final String source, final StringBuilder potFile) { addPOEntry(tag, source, "", false, potFile); }
[ "protected", "void", "addPOTEntry", "(", "final", "String", "tag", ",", "final", "String", "source", ",", "final", "StringBuilder", "potFile", ")", "{", "addPOEntry", "(", "tag", ",", "source", ",", "\"\"", ",", "false", ",", "potFile", ")", ";", "}" ]
Add an entry to a POT file. @param tag The XML element name. @param source The original source string. @param potFile The POT file to add to.
[ "Add", "an", "entry", "to", "a", "POT", "file", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java#L1452-L1454
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/web/Dashboard.java
Dashboard.addWidget
public Widget addWidget(String widgetId, int columnId) { """ Add a widget with the given parameters, and return the newly created {@link Widget} object if one wants to add parameters to it. <p>The widget ids are listed by the web service /api/widgets @param widgetId id of an existing widget @param columnId ...
java
public Widget addWidget(String widgetId, int columnId) { if (columnId < 1) { throw new IllegalArgumentException("Widget column starts with 1"); } Widget widget = new Widget(widgetId); widgetsByColumn.put(columnId, widget); return widget; }
[ "public", "Widget", "addWidget", "(", "String", "widgetId", ",", "int", "columnId", ")", "{", "if", "(", "columnId", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Widget column starts with 1\"", ")", ";", "}", "Widget", "widget", "=",...
Add a widget with the given parameters, and return the newly created {@link Widget} object if one wants to add parameters to it. <p>The widget ids are listed by the web service /api/widgets @param widgetId id of an existing widget @param columnId column starts with 1. The widget is ignored if the column id does not m...
[ "Add", "a", "widget", "with", "the", "given", "parameters", "and", "return", "the", "newly", "created", "{", "@link", "Widget", "}", "object", "if", "one", "wants", "to", "add", "parameters", "to", "it", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/web/Dashboard.java#L65-L73
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryFieldUtil.java
BigQueryFieldUtil.validateNestedRepeatedType
public static void validateNestedRepeatedType(Class<?> parameterType, Field field) { """ A field of type Collection<Collection> cannot be marshalled into bigquery data format as parameterized types nested more than one level cannot be determined at runtime. So cannot be marshalled. """ if (isCollectionOr...
java
public static void validateNestedRepeatedType(Class<?> parameterType, Field field) { if (isCollectionOrArray(parameterType)) { throw new IllegalArgumentException( " Cannot marshal a nested collection or array field " + field.getName()); } }
[ "public", "static", "void", "validateNestedRepeatedType", "(", "Class", "<", "?", ">", "parameterType", ",", "Field", "field", ")", "{", "if", "(", "isCollectionOrArray", "(", "parameterType", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\" C...
A field of type Collection<Collection> cannot be marshalled into bigquery data format as parameterized types nested more than one level cannot be determined at runtime. So cannot be marshalled.
[ "A", "field", "of", "type", "Collection<Collection", ">", "cannot", "be", "marshalled", "into", "bigquery", "data", "format", "as", "parameterized", "types", "nested", "more", "than", "one", "level", "cannot", "be", "determined", "at", "runtime", ".", "So", "c...
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryFieldUtil.java#L195-L200
GeoLatte/geolatte-common-hibernate
src/main/java/org/geolatte/common/automapper/TableRef.java
TableRef.valueOf
public static TableRef valueOf(String catalog, String schema, String tableName) { """ Creates an instance from catalog, schema and table names <p/> <p>if the catalog or schema parameter is an empty String, the catalog or schema will be set to <code>null</code>.</p> @param catalog the table catalog @param ...
java
public static TableRef valueOf(String catalog, String schema, String tableName) { return new TableRef(catalog, schema, tableName); }
[ "public", "static", "TableRef", "valueOf", "(", "String", "catalog", ",", "String", "schema", ",", "String", "tableName", ")", "{", "return", "new", "TableRef", "(", "catalog", ",", "schema", ",", "tableName", ")", ";", "}" ]
Creates an instance from catalog, schema and table names <p/> <p>if the catalog or schema parameter is an empty String, the catalog or schema will be set to <code>null</code>.</p> @param catalog the table catalog @param schema the table schema @param tableName the table name @return a <code>TableRef</code> for th...
[ "Creates", "an", "instance", "from", "catalog", "schema", "and", "table", "names", "<p", "/", ">", "<p", ">", "if", "the", "catalog", "or", "schema", "parameter", "is", "an", "empty", "String", "the", "catalog", "or", "schema", "will", "be", "set", "to",...
train
https://github.com/GeoLatte/geolatte-common-hibernate/blob/2e871c70e506df2485d91152fbd0955c94de1d39/src/main/java/org/geolatte/common/automapper/TableRef.java#L47-L49
mojohaus/flatten-maven-plugin
src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java
FlattenMojo.createFlattenedDependencies
protected void createFlattenedDependencies( Model effectiveModel, List<Dependency> flattenedDependencies ) { """ Collects the resolved {@link Dependency dependencies} from the given <code>effectiveModel</code>. @param effectiveModel is the effective POM {@link Model} to process. @param flattenedDependencies is...
java
protected void createFlattenedDependencies( Model effectiveModel, List<Dependency> flattenedDependencies ) { getLog().debug( "Resolving dependencies of " + effectiveModel.getId() ); // this.project.getDependencies() already contains the inherited dependencies but also those from profiles //...
[ "protected", "void", "createFlattenedDependencies", "(", "Model", "effectiveModel", ",", "List", "<", "Dependency", ">", "flattenedDependencies", ")", "{", "getLog", "(", ")", ".", "debug", "(", "\"Resolving dependencies of \"", "+", "effectiveModel", ".", "getId", ...
Collects the resolved {@link Dependency dependencies} from the given <code>effectiveModel</code>. @param effectiveModel is the effective POM {@link Model} to process. @param flattenedDependencies is the {@link List} where to add the collected {@link Dependency dependencies}.
[ "Collects", "the", "resolved", "{", "@link", "Dependency", "dependencies", "}", "from", "the", "given", "<code", ">", "effectiveModel<", "/", "code", ">", "." ]
train
https://github.com/mojohaus/flatten-maven-plugin/blob/df25d03a4d6c06c4de5cfd9f52dfbe72e823e403/src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java#L891-L906
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Animation.java
Animation.renderInUse
public void renderInUse(int x, int y) { """ Render the appropriate frame when the spriteSheet backing this Animation is in use. @param x The x position to draw the animation at @param y The y position to draw the animation at """ if (frames.size() == 0) { return; } if (autoUpdate...
java
public void renderInUse(int x, int y){ if (frames.size() == 0) { return; } if (autoUpdate) { long now = getTime(); long delta = now - lastUpdate; if (firstUpdate) { delta = 0; firstUpdate = false; } lastUpdate = now; next...
[ "public", "void", "renderInUse", "(", "int", "x", ",", "int", "y", ")", "{", "if", "(", "frames", ".", "size", "(", ")", "==", "0", ")", "{", "return", ";", "}", "if", "(", "autoUpdate", ")", "{", "long", "now", "=", "getTime", "(", ")", ";", ...
Render the appropriate frame when the spriteSheet backing this Animation is in use. @param x The x position to draw the animation at @param y The y position to draw the animation at
[ "Render", "the", "appropriate", "frame", "when", "the", "spriteSheet", "backing", "this", "Animation", "is", "in", "use", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Animation.java#L390-L408
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.moveAsync
public Observable<Void> moveAsync(String resourceGroupName, String workflowName, WorkflowInner move) { """ Moves an existing workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param move The workflow to move. @throws IllegalArgumentException thrown if paramete...
java
public Observable<Void> moveAsync(String resourceGroupName, String workflowName, WorkflowInner move) { return moveWithServiceResponseAsync(resourceGroupName, workflowName, move).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { ...
[ "public", "Observable", "<", "Void", ">", "moveAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "WorkflowInner", "move", ")", "{", "return", "moveWithServiceResponseAsync", "(", "resourceGroupName", ",", "workflowName", ",", "move", ")...
Moves an existing workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param move The workflow to move. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Moves", "an", "existing", "workflow", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L1519-L1526
tvesalainen/util
util/src/main/java/org/vesalainen/ui/Scaler.java
Scaler.getLevelFor
public ScaleLevel getLevelFor(Font font, FontRenderContext frc, DoubleTransform transformer, boolean horizontal, double xy, Rectangle2D bounds) { """ Returns highest level where drawn labels don't overlap @param font @param frc @param transformer @param horizontal @param xy Lines x/y constant value @param bo...
java
public ScaleLevel getLevelFor(Font font, FontRenderContext frc, DoubleTransform transformer, boolean horizontal, double xy, Rectangle2D bounds) { return getXYLevel(font, frc, horizontal ? transformer : DoubleTransform.swap().andThen(transformer), xy, bounds); }
[ "public", "ScaleLevel", "getLevelFor", "(", "Font", "font", ",", "FontRenderContext", "frc", ",", "DoubleTransform", "transformer", ",", "boolean", "horizontal", ",", "double", "xy", ",", "Rectangle2D", "bounds", ")", "{", "return", "getXYLevel", "(", "font", ",...
Returns highest level where drawn labels don't overlap @param font @param frc @param transformer @param horizontal @param xy Lines x/y constant value @param bounds Accumulates label bounds here if not null. @return
[ "Returns", "highest", "level", "where", "drawn", "labels", "don", "t", "overlap" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/Scaler.java#L174-L177
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.catalysisPrecedes
public static Pattern catalysisPrecedes(Blacklist blacklist) { """ Pattern for detecting two EntityReferences are controlling consecutive reactions, where output of one reaction is input to the other. @param blacklist to detect ubiquitous small molecules @return the pattern """ Pattern p = new Pattern(S...
java
public static Pattern catalysisPrecedes(Blacklist blacklist) { Pattern p = new Pattern(SequenceEntityReference.class, "first ER"); p.add(linkedER(true), "first ER", "first generic ER"); p.add(erToPE(), "first generic ER", "first simple controller PE"); p.add(linkToComplex(), "first simple controller PE", "firs...
[ "public", "static", "Pattern", "catalysisPrecedes", "(", "Blacklist", "blacklist", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "SequenceEntityReference", ".", "class", ",", "\"first ER\"", ")", ";", "p", ".", "add", "(", "linkedER", "(", "true", ")...
Pattern for detecting two EntityReferences are controlling consecutive reactions, where output of one reaction is input to the other. @param blacklist to detect ubiquitous small molecules @return the pattern
[ "Pattern", "for", "detecting", "two", "EntityReferences", "are", "controlling", "consecutive", "reactions", "where", "output", "of", "one", "reaction", "is", "input", "to", "the", "other", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L352-L413
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/sdx_network_config.java
sdx_network_config.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ sdx_network_config_responses result = (sdx_network_config_responses) se...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { sdx_network_config_responses result = (sdx_network_config_responses) service.get_payload_formatter().string_to_resource(sdx_network_config_responses.class, response); if(result.errorcode != 0) { i...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "sdx_network_config_responses", "result", "=", "(", "sdx_network_config_responses", ")", "service", ".", "get_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/sdx_network_config.java#L308-L325
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/webapp/AbstractFacesInitializer.java
AbstractFacesInitializer._dispatchApplicationEvent
private void _dispatchApplicationEvent(ServletContext servletContext, Class<? extends SystemEvent> eventClass) { """ Eventually we can use our plugin infrastructure for this as well it would be a cleaner interception point than the base class but for now this position is valid as well <p/> Note we add it for n...
java
private void _dispatchApplicationEvent(ServletContext servletContext, Class<? extends SystemEvent> eventClass) { FacesContext facesContext = FacesContext.getCurrentInstance(); Application application = facesContext.getApplication(); application.publishEvent(facesContext, eventClass, Applicat...
[ "private", "void", "_dispatchApplicationEvent", "(", "ServletContext", "servletContext", ",", "Class", "<", "?", "extends", "SystemEvent", ">", "eventClass", ")", "{", "FacesContext", "facesContext", "=", "FacesContext", ".", "getCurrentInstance", "(", ")", ";", "Ap...
Eventually we can use our plugin infrastructure for this as well it would be a cleaner interception point than the base class but for now this position is valid as well <p/> Note we add it for now here because the application factory object leaves no possibility to have a destroy interceptor and applications are per we...
[ "Eventually", "we", "can", "use", "our", "plugin", "infrastructure", "for", "this", "as", "well", "it", "would", "be", "a", "cleaner", "interception", "point", "than", "the", "base", "class", "but", "for", "now", "this", "position", "is", "valid", "as", "w...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/webapp/AbstractFacesInitializer.java#L340-L345
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.deleteSharingForDevice
public DeviceSharingId deleteSharingForDevice(String deviceId, String shareId) throws ApiException { """ Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharingId @throws ApiExcept...
java
public DeviceSharingId deleteSharingForDevice(String deviceId, String shareId) throws ApiException { ApiResponse<DeviceSharingId> resp = deleteSharingForDeviceWithHttpInfo(deviceId, shareId); return resp.getData(); }
[ "public", "DeviceSharingId", "deleteSharingForDevice", "(", "String", "deviceId", ",", "String", "shareId", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceSharingId", ">", "resp", "=", "deleteSharingForDeviceWithHttpInfo", "(", "deviceId", ",", "shareId"...
Delete specific share of the given device id Delete specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharingId @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Delete", "specific", "share", "of", "the", "given", "device", "id", "Delete", "specific", "share", "of", "the", "given", "device", "id" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L261-L264
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java
DocumentListUrl.updateDocumentListUrl
public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields) { """ Get Resource Url for UpdateDocumentList @param documentListName Name of content documentListName to delete @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data re...
java
public static MozuUrl updateDocumentListUrl(String documentListName, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}?responseFields={responseFields}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("responseFie...
[ "public", "static", "MozuUrl", "updateDocumentListUrl", "(", "String", "documentListName", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}?responseFields={responseFields}\"",...
Get Resource Url for UpdateDocumentList @param documentListName Name of content documentListName to delete @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update da...
[ "Get", "Resource", "Url", "for", "UpdateDocumentList" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/content/DocumentListUrl.java#L64-L70
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationaction.java
authorizationaction.get
public static authorizationaction get(nitro_service service, String name) throws Exception { """ Use this API to fetch authorizationaction resource of given name . """ authorizationaction obj = new authorizationaction(); obj.set_name(name); authorizationaction response = (authorizationaction) obj.get_res...
java
public static authorizationaction get(nitro_service service, String name) throws Exception{ authorizationaction obj = new authorizationaction(); obj.set_name(name); authorizationaction response = (authorizationaction) obj.get_resource(service); return response; }
[ "public", "static", "authorizationaction", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authorizationaction", "obj", "=", "new", "authorizationaction", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ...
Use this API to fetch authorizationaction resource of given name .
[ "Use", "this", "API", "to", "fetch", "authorizationaction", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authorization/authorizationaction.java#L109-L114
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
StatementManager.bindStatementValue
private int bindStatementValue(PreparedStatement stmt, int index, Object attributeOrQuery, Object value, ClassDescriptor cld) throws SQLException { """ bind attribute and value @param stmt @param index @param attributeOrQuery @param value @param cld @return @throws SQLException """ ...
java
private int bindStatementValue(PreparedStatement stmt, int index, Object attributeOrQuery, Object value, ClassDescriptor cld) throws SQLException { FieldDescriptor fld = null; // if value is a subQuery bind it if (value instanceof Query) { Query subQuer...
[ "private", "int", "bindStatementValue", "(", "PreparedStatement", "stmt", ",", "int", "index", ",", "Object", "attributeOrQuery", ",", "Object", "value", ",", "ClassDescriptor", "cld", ")", "throws", "SQLException", "{", "FieldDescriptor", "fld", "=", "null", ";",...
bind attribute and value @param stmt @param index @param attributeOrQuery @param value @param cld @return @throws SQLException
[ "bind", "attribute", "and", "value" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L189-L236
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newActedOnBehalfOf
public ActedOnBehalfOf newActedOnBehalfOf(QualifiedName id, QualifiedName delegate, QualifiedName responsible) { """ A factory method to create an instance of a delegation {@link ActedOnBehalfOf} @param id identifier for the delegation association between delegate and responsible @param delegate identifier for t...
java
public ActedOnBehalfOf newActedOnBehalfOf(QualifiedName id, QualifiedName delegate, QualifiedName responsible) { ActedOnBehalfOf res=newActedOnBehalfOf(id, delegate, responsible, null,null); return res; }
[ "public", "ActedOnBehalfOf", "newActedOnBehalfOf", "(", "QualifiedName", "id", ",", "QualifiedName", "delegate", ",", "QualifiedName", "responsible", ")", "{", "ActedOnBehalfOf", "res", "=", "newActedOnBehalfOf", "(", "id", ",", "delegate", ",", "responsible", ",", ...
A factory method to create an instance of a delegation {@link ActedOnBehalfOf} @param id identifier for the delegation association between delegate and responsible @param delegate identifier for the agent associated with an activity, acting on behalf of the responsible agent @param responsible identifier for the agent,...
[ "A", "factory", "method", "to", "create", "an", "instance", "of", "a", "delegation", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L373-L376
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/ReflectUtils.java
ReflectUtils.getPropertySetterMethod
public static Method getPropertySetterMethod(Class clazz, String property, Class propertyClazz) { """ 得到set方法 @param clazz 类 @param property 属性 @param propertyClazz 属性 @return Method 方法对象 """ String methodName = "set" + property.substring(0, 1).toUpperCase() + property.substring(1); ...
java
public static Method getPropertySetterMethod(Class clazz, String property, Class propertyClazz) { String methodName = "set" + property.substring(0, 1).toUpperCase() + property.substring(1); try { return clazz.getMethod(methodName, propertyClazz); } catch (NoSuchMethodException e) { ...
[ "public", "static", "Method", "getPropertySetterMethod", "(", "Class", "clazz", ",", "String", "property", ",", "Class", "propertyClazz", ")", "{", "String", "methodName", "=", "\"set\"", "+", "property", ".", "substring", "(", "0", ",", "1", ")", ".", "toUp...
得到set方法 @param clazz 类 @param property 属性 @param propertyClazz 属性 @return Method 方法对象
[ "得到set方法" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/ReflectUtils.java#L126-L133
cdapio/tigon
tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/flow/FlowletProgramRunner.java
FlowletProgramRunner.createServiceHook
private Service createServiceHook(String flowletName, Iterable<ConsumerSupplier<?>> consumerSuppliers, AtomicReference<FlowletProgramController> controller) { """ Create a initializer to be executed during the flowlet driver initialization. """ final List<String> streams...
java
private Service createServiceHook(String flowletName, Iterable<ConsumerSupplier<?>> consumerSuppliers, AtomicReference<FlowletProgramController> controller) { final List<String> streams = Lists.newArrayList(); for (ConsumerSupplier<?> consumerSupplier : consumerSuppliers) { ...
[ "private", "Service", "createServiceHook", "(", "String", "flowletName", ",", "Iterable", "<", "ConsumerSupplier", "<", "?", ">", ">", "consumerSuppliers", ",", "AtomicReference", "<", "FlowletProgramController", ">", "controller", ")", "{", "final", "List", "<", ...
Create a initializer to be executed during the flowlet driver initialization.
[ "Create", "a", "initializer", "to", "be", "executed", "during", "the", "flowlet", "driver", "initialization", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/flow/FlowletProgramRunner.java#L569-L594
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java
CommercePriceEntryPersistenceImpl.fetchByC_C
@Override public CommercePriceEntry fetchByC_C(long commercePriceListId, String CPInstanceUuid) { """ Returns the commerce price entry where commercePriceListId = &#63; and CPInstanceUuid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param commercePriceListId the comm...
java
@Override public CommercePriceEntry fetchByC_C(long commercePriceListId, String CPInstanceUuid) { return fetchByC_C(commercePriceListId, CPInstanceUuid, true); }
[ "@", "Override", "public", "CommercePriceEntry", "fetchByC_C", "(", "long", "commercePriceListId", ",", "String", "CPInstanceUuid", ")", "{", "return", "fetchByC_C", "(", "commercePriceListId", ",", "CPInstanceUuid", ",", "true", ")", ";", "}" ]
Returns the commerce price entry where commercePriceListId = &#63; and CPInstanceUuid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param commercePriceListId the commerce price list ID @param CPInstanceUuid the cp instance uuid @return the matching commerce price entry, or <cod...
[ "Returns", "the", "commerce", "price", "entry", "where", "commercePriceListId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", ...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L3660-L3664
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeArrayDeque.java
KTypeArrayDeque.descendingForEach
private void descendingForEach(KTypeProcedure<? super KType> procedure, int fromIndex, final int toIndex) { """ Applies <code>procedure</code> to a slice of the deque, <code>toIndex</code>, exclusive, down to <code>fromIndex</code>, inclusive. """ if (fromIndex == toIndex) return; final KType[]...
java
private void descendingForEach(KTypeProcedure<? super KType> procedure, int fromIndex, final int toIndex) { if (fromIndex == toIndex) return; final KType[] buffer = Intrinsics.<KType[]> cast(this.buffer); int i = toIndex; do { i = oneLeft(i, buffer.length); procedure.apply(buffer[i]);...
[ "private", "void", "descendingForEach", "(", "KTypeProcedure", "<", "?", "super", "KType", ">", "procedure", ",", "int", "fromIndex", ",", "final", "int", "toIndex", ")", "{", "if", "(", "fromIndex", "==", "toIndex", ")", "return", ";", "final", "KType", "...
Applies <code>procedure</code> to a slice of the deque, <code>toIndex</code>, exclusive, down to <code>fromIndex</code>, inclusive.
[ "Applies", "<code", ">", "procedure<", "/", "code", ">", "to", "a", "slice", "of", "the", "deque", "<code", ">", "toIndex<", "/", "code", ">", "exclusive", "down", "to", "<code", ">", "fromIndex<", "/", "code", ">", "inclusive", "." ]
train
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeArrayDeque.java#L720-L730
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.addTag
public GitlabTag addTag(Serializable projectId, String tagName, String ref, String message, String releaseDescription) throws IOException { """ Create tag in specific project @param projectId @param tagName @param ref @param message @param releaseDescription @return @throws IOException on gitlab api call ...
java
public GitlabTag addTag(Serializable projectId, String tagName, String ref, String message, String releaseDescription) throws IOException { String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabTag.URL; return dispatch() .with("tag_name", tagName) ...
[ "public", "GitlabTag", "addTag", "(", "Serializable", "projectId", ",", "String", "tagName", ",", "String", "ref", ",", "String", "message", ",", "String", "releaseDescription", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "...
Create tag in specific project @param projectId @param tagName @param ref @param message @param releaseDescription @return @throws IOException on gitlab api call error
[ "Create", "tag", "in", "specific", "project" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3389-L3397
gitblit/fathom
fathom-core/src/main/java/fathom/utils/RequireUtil.java
RequireUtil.allowInstance
public static boolean allowInstance(Settings settings, Object object) { """ Determines if this object may be used in the current runtime environment. Fathom settings are considered as well as runtime modes. @param settings @param object @return true if the object may be used """ Preconditions.ch...
java
public static boolean allowInstance(Settings settings, Object object) { Preconditions.checkNotNull(object, "Can not check runtime permissions on a null instance!"); if (object instanceof Method) { return allowMethod(settings, (Method) object); } return allowClass(settings,...
[ "public", "static", "boolean", "allowInstance", "(", "Settings", "settings", ",", "Object", "object", ")", "{", "Preconditions", ".", "checkNotNull", "(", "object", ",", "\"Can not check runtime permissions on a null instance!\"", ")", ";", "if", "(", "object", "insta...
Determines if this object may be used in the current runtime environment. Fathom settings are considered as well as runtime modes. @param settings @param object @return true if the object may be used
[ "Determines", "if", "this", "object", "may", "be", "used", "in", "the", "current", "runtime", "environment", ".", "Fathom", "settings", "are", "considered", "as", "well", "as", "runtime", "modes", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-core/src/main/java/fathom/utils/RequireUtil.java#L55-L64
alkacon/opencms-core
src/org/opencms/ade/detailpage/CmsDetailPageUtil.java
CmsDetailPageUtil.getBestUrlName
public static String getBestUrlName(CmsObject cms, CmsUUID id) throws CmsException { """ Returns either the newest URL name for a structure id, or the structure id as a string if there is no URL name.<p> @param cms the current CMS context @param id the structure id of a resource @return the best URL name f...
java
public static String getBestUrlName(CmsObject cms, CmsUUID id) throws CmsException { // this is currently only used for static export Locale locale = cms.getRequestContext().getLocale(); List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(); String urlName = cms.r...
[ "public", "static", "String", "getBestUrlName", "(", "CmsObject", "cms", ",", "CmsUUID", "id", ")", "throws", "CmsException", "{", "// this is currently only used for static export", "Locale", "locale", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getLocale",...
Returns either the newest URL name for a structure id, or the structure id as a string if there is no URL name.<p> @param cms the current CMS context @param id the structure id of a resource @return the best URL name for the structure id @throws CmsException if something goes wrong
[ "Returns", "either", "the", "newest", "URL", "name", "for", "a", "structure", "id", "or", "the", "structure", "id", "as", "a", "string", "if", "there", "is", "no", "URL", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/detailpage/CmsDetailPageUtil.java#L101-L111
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java
CacheMetricsRegistrar.bindCacheToRegistry
public boolean bindCacheToRegistry(Cache cache, Tag... tags) { """ Attempt to bind the specified {@link Cache} to the registry. Return {@code true} if the cache is supported and was bound to the registry, {@code false} otherwise. @param cache the cache to handle @param tags the tags to associate with the metric...
java
public boolean bindCacheToRegistry(Cache cache, Tag... tags) { MeterBinder meterBinder = getMeterBinder(unwrapIfNecessary(cache), Tags.of(tags)); if (meterBinder != null) { meterBinder.bindTo(this.registry); return true; } return false; }
[ "public", "boolean", "bindCacheToRegistry", "(", "Cache", "cache", ",", "Tag", "...", "tags", ")", "{", "MeterBinder", "meterBinder", "=", "getMeterBinder", "(", "unwrapIfNecessary", "(", "cache", ")", ",", "Tags", ".", "of", "(", "tags", ")", ")", ";", "i...
Attempt to bind the specified {@link Cache} to the registry. Return {@code true} if the cache is supported and was bound to the registry, {@code false} otherwise. @param cache the cache to handle @param tags the tags to associate with the metrics of that cache @return {@code true} if the {@code cache} is supported and ...
[ "Attempt", "to", "bind", "the", "specified", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/cache/CacheMetricsRegistrar.java#L63-L70
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DifferenceEvaluators.java
DifferenceEvaluators.chain
public static DifferenceEvaluator chain(final DifferenceEvaluator... evaluators) { """ Combines multiple DifferenceEvaluators so that the result of the first Evaluator will be passed to the next Evaluator. """ return new DifferenceEvaluator() { @Override public Comparis...
java
public static DifferenceEvaluator chain(final DifferenceEvaluator... evaluators) { return new DifferenceEvaluator() { @Override public ComparisonResult evaluate(Comparison comparison, ComparisonResult orig) { ComparisonResult finalResult = orig; fo...
[ "public", "static", "DifferenceEvaluator", "chain", "(", "final", "DifferenceEvaluator", "...", "evaluators", ")", "{", "return", "new", "DifferenceEvaluator", "(", ")", "{", "@", "Override", "public", "ComparisonResult", "evaluate", "(", "Comparison", "comparison", ...
Combines multiple DifferenceEvaluators so that the result of the first Evaluator will be passed to the next Evaluator.
[ "Combines", "multiple", "DifferenceEvaluators", "so", "that", "the", "result", "of", "the", "first", "Evaluator", "will", "be", "passed", "to", "the", "next", "Evaluator", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DifferenceEvaluators.java#L112-L125
looly/hutool
hutool-db/src/main/java/cn/hutool/db/meta/MetaUtil.java
MetaUtil.getTables
public static List<String> getTables(DataSource ds, String schema, String tableName, TableType... types) { """ 获得所有表名 @param ds 数据源 @param schema 表数据库名,对于Oracle为用户名 @param tableName 表名 @param types 表类型 @return 表名列表 @since 3.3.1 """ final List<String> tables = new ArrayList<String>(); Connection c...
java
public static List<String> getTables(DataSource ds, String schema, String tableName, TableType... types) { final List<String> tables = new ArrayList<String>(); Connection conn = null; ResultSet rs = null; try { conn = ds.getConnection(); final DatabaseMetaData metaData = conn.getMetaData(); rs =...
[ "public", "static", "List", "<", "String", ">", "getTables", "(", "DataSource", "ds", ",", "String", "schema", ",", "String", "tableName", ",", "TableType", "...", "types", ")", "{", "final", "List", "<", "String", ">", "tables", "=", "new", "ArrayList", ...
获得所有表名 @param ds 数据源 @param schema 表数据库名,对于Oracle为用户名 @param tableName 表名 @param types 表类型 @return 表名列表 @since 3.3.1
[ "获得所有表名" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/meta/MetaUtil.java#L70-L94
triceo/splitlog
splitlog-api/src/main/java/com/github/triceo/splitlog/api/LogWatchBuilder.java
LogWatchBuilder.withDelayBetweenReads
public LogWatchBuilder withDelayBetweenReads(final int length, final TimeUnit unit) { """ Specify the delay between attempts to read the file. @param length Length of time. @param unit Unit of that length. @return This. """ this.delayBetweenReads = LogWatchBuilder.getDelay(length, unit); ...
java
public LogWatchBuilder withDelayBetweenReads(final int length, final TimeUnit unit) { this.delayBetweenReads = LogWatchBuilder.getDelay(length, unit); return this; }
[ "public", "LogWatchBuilder", "withDelayBetweenReads", "(", "final", "int", "length", ",", "final", "TimeUnit", "unit", ")", "{", "this", ".", "delayBetweenReads", "=", "LogWatchBuilder", ".", "getDelay", "(", "length", ",", "unit", ")", ";", "return", "this", ...
Specify the delay between attempts to read the file. @param length Length of time. @param unit Unit of that length. @return This.
[ "Specify", "the", "delay", "between", "attempts", "to", "read", "the", "file", "." ]
train
https://github.com/triceo/splitlog/blob/4e1b188e8c814119f5cf7343bbc53917843d68a2/splitlog-api/src/main/java/com/github/triceo/splitlog/api/LogWatchBuilder.java#L314-L317
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosConfiguration.java
MesosConfiguration.createDriver
public SchedulerDriver createDriver(Scheduler scheduler, boolean implicitAcknowledgements) { """ Create the Mesos scheduler driver based on this configuration. @param scheduler the scheduler to use. @param implicitAcknowledgements whether to configure the driver for implicit acknowledgements. @return a schedule...
java
public SchedulerDriver createDriver(Scheduler scheduler, boolean implicitAcknowledgements) { MesosSchedulerDriver schedulerDriver; if (this.credential().isDefined()) { schedulerDriver = new MesosSchedulerDriver(scheduler, frameworkInfo.build(), this.masterUrl(), implicitAcknowledgements, this.credential...
[ "public", "SchedulerDriver", "createDriver", "(", "Scheduler", "scheduler", ",", "boolean", "implicitAcknowledgements", ")", "{", "MesosSchedulerDriver", "schedulerDriver", ";", "if", "(", "this", ".", "credential", "(", ")", ".", "isDefined", "(", ")", ")", "{", ...
Create the Mesos scheduler driver based on this configuration. @param scheduler the scheduler to use. @param implicitAcknowledgements whether to configure the driver for implicit acknowledgements. @return a scheduler driver.
[ "Create", "the", "Mesos", "scheduler", "driver", "based", "on", "this", "configuration", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosConfiguration.java#L108-L121
apache/incubator-heron
heron/api/src/java/org/apache/heron/api/windowing/triggers/WatermarkTimeTriggerPolicy.java
WatermarkTimeTriggerPolicy.handleWaterMarkEvent
private void handleWaterMarkEvent(Event<T> event) { """ Invokes the trigger all pending windows up to the watermark timestamp. The end ts of the window is set in the eviction policy context so that the events falling within that window can be processed. """ long watermarkTs = event.getTimestamp(); l...
java
private void handleWaterMarkEvent(Event<T> event) { long watermarkTs = event.getTimestamp(); long windowEndTs = nextWindowEndTs; LOG.fine(String.format("Window end ts %d Watermark ts %d", windowEndTs, watermarkTs)); while (windowEndTs <= watermarkTs) { long currentCount = windowManager.getEventCou...
[ "private", "void", "handleWaterMarkEvent", "(", "Event", "<", "T", ">", "event", ")", "{", "long", "watermarkTs", "=", "event", ".", "getTimestamp", "(", ")", ";", "long", "windowEndTs", "=", "nextWindowEndTs", ";", "LOG", ".", "fine", "(", "String", ".", ...
Invokes the trigger all pending windows up to the watermark timestamp. The end ts of the window is set in the eviction policy context so that the events falling within that window can be processed.
[ "Invokes", "the", "trigger", "all", "pending", "windows", "up", "to", "the", "watermark", "timestamp", ".", "The", "end", "ts", "of", "the", "window", "is", "set", "in", "the", "eviction", "policy", "context", "so", "that", "the", "events", "falling", "wit...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/api/windowing/triggers/WatermarkTimeTriggerPolicy.java#L67-L93
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.waitForView
public boolean waitForView(Object tag) { """ Waits for a View matching the specified tag. Default timeout is 20 seconds. @param tag the {@link View#getTag() tag} of the {@link View} to wait for @return {@code true} if the {@link View} is displayed and {@code false} if it is not displayed before the timeout ...
java
public boolean waitForView(Object tag){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "waitForView("+tag+")"); } return waitForView(tag, 0, Timeout.getLargeTimeout(), true); }
[ "public", "boolean", "waitForView", "(", "Object", "tag", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"waitForView(\"", "+", "tag", "+", "\")\"", ")", ";", "}", "return"...
Waits for a View matching the specified tag. Default timeout is 20 seconds. @param tag the {@link View#getTag() tag} of the {@link View} to wait for @return {@code true} if the {@link View} is displayed and {@code false} if it is not displayed before the timeout
[ "Waits", "for", "a", "View", "matching", "the", "specified", "tag", ".", "Default", "timeout", "is", "20", "seconds", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L506-L512
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java
StructureTools.getAtomsInContact
public static AtomContactSet getAtomsInContact(Chain chain, double cutoff) { """ Returns the set of intra-chain contacts for the given chain for all non-H atoms of non-hetatoms, i.e. the contact map. Uses a geometric hashing algorithm that speeds up the calculation without need of full distance matrix. The pars...
java
public static AtomContactSet getAtomsInContact(Chain chain, double cutoff) { return getAtomsInContact(chain, (String[]) null, cutoff); }
[ "public", "static", "AtomContactSet", "getAtomsInContact", "(", "Chain", "chain", ",", "double", "cutoff", ")", "{", "return", "getAtomsInContact", "(", "chain", ",", "(", "String", "[", "]", ")", "null", ",", "cutoff", ")", ";", "}" ]
Returns the set of intra-chain contacts for the given chain for all non-H atoms of non-hetatoms, i.e. the contact map. Uses a geometric hashing algorithm that speeds up the calculation without need of full distance matrix. The parsing mode {@link FileParsingParameters#setAlignSeqRes(boolean)} needs to be set to true fo...
[ "Returns", "the", "set", "of", "intra", "-", "chain", "contacts", "for", "the", "given", "chain", "for", "all", "non", "-", "H", "atoms", "of", "non", "-", "hetatoms", "i", ".", "e", ".", "the", "contact", "map", ".", "Uses", "a", "geometric", "hashi...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L1435-L1437
CloudSlang/cs-actions
cs-amazon/src/main/java/io/cloudslang/content/amazon/utils/InputsUtil.java
InputsUtil.getEnforcedBooleanCondition
public static boolean getEnforcedBooleanCondition(String input, boolean enforcedBoolean) { """ If enforcedBoolean is "true" and string input is: null, empty, many empty chars, TrUe, tRuE... but not "false" then returns "true". If enforcedBoolean is "false" and string input is: null, empty, many empty chars, FaLs...
java
public static boolean getEnforcedBooleanCondition(String input, boolean enforcedBoolean) { return (enforcedBoolean) ? isTrueOrFalse(input) == Boolean.parseBoolean(input) : Boolean.parseBoolean(input); }
[ "public", "static", "boolean", "getEnforcedBooleanCondition", "(", "String", "input", ",", "boolean", "enforcedBoolean", ")", "{", "return", "(", "enforcedBoolean", ")", "?", "isTrueOrFalse", "(", "input", ")", "==", "Boolean", ".", "parseBoolean", "(", "input", ...
If enforcedBoolean is "true" and string input is: null, empty, many empty chars, TrUe, tRuE... but not "false" then returns "true". If enforcedBoolean is "false" and string input is: null, empty, many empty chars, FaLsE, fAlSe... but not "true" then returns "false" This behavior is needed for inputs like: "imageNoReboo...
[ "If", "enforcedBoolean", "is", "true", "and", "string", "input", "is", ":", "null", "empty", "many", "empty", "chars", "TrUe", "tRuE", "...", "but", "not", "false", "then", "returns", "true", ".", "If", "enforcedBoolean", "is", "false", "and", "string", "i...
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/utils/InputsUtil.java#L295-L297
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.deepCopyArrayAtOffset
public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) { """ Copies the array of the specified type from the given field offset in the source object to the same location in the copy, visiting the array during the copy so that its contents are also copied @param sour...
java
public final void deepCopyArrayAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) { deepCopyArrayAtOffset(source, copy, fieldClass, offset, new IdentityHashMap<Object, Object>(100)); }
[ "public", "final", "void", "deepCopyArrayAtOffset", "(", "Object", "source", ",", "Object", "copy", ",", "Class", "<", "?", ">", "fieldClass", ",", "long", "offset", ")", "{", "deepCopyArrayAtOffset", "(", "source", ",", "copy", ",", "fieldClass", ",", "offs...
Copies the array of the specified type from the given field offset in the source object to the same location in the copy, visiting the array during the copy so that its contents are also copied @param source The object to copy from @param copy The target object @param fieldClass The declared type of array at the given ...
[ "Copies", "the", "array", "of", "the", "specified", "type", "from", "the", "given", "field", "offset", "in", "the", "source", "object", "to", "the", "same", "location", "in", "the", "copy", "visiting", "the", "array", "during", "the", "copy", "so", "that",...
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L454-L456
eclipse/xtext-lib
org.eclipse.xtend.lib.macro/src/org/eclipse/xtend/lib/macro/file/Path.java
Path.getParent
public Path getParent() { """ Returns the parent of this path or null if this path is the root path. @return the parent of this path or null if this path is the root path. """ if (!isAbsolute()) throw new IllegalStateException("path is not absolute: " + toString()); if (segments.isEmpty()) return ...
java
public Path getParent() { if (!isAbsolute()) throw new IllegalStateException("path is not absolute: " + toString()); if (segments.isEmpty()) return null; return new Path(segments.subList(0, segments.size()-1), true); }
[ "public", "Path", "getParent", "(", ")", "{", "if", "(", "!", "isAbsolute", "(", ")", ")", "throw", "new", "IllegalStateException", "(", "\"path is not absolute: \"", "+", "toString", "(", ")", ")", ";", "if", "(", "segments", ".", "isEmpty", "(", ")", "...
Returns the parent of this path or null if this path is the root path. @return the parent of this path or null if this path is the root path.
[ "Returns", "the", "parent", "of", "this", "path", "or", "null", "if", "this", "path", "is", "the", "root", "path", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtend.lib.macro/src/org/eclipse/xtend/lib/macro/file/Path.java#L134-L140
aol/cyclops
cyclops/src/main/java/cyclops/companion/Streams.java
Streams.xMatch
public static <T> boolean xMatch(final Stream<T> stream, final int num, final Predicate<? super T> c) { """ Check that there are specified number of matches of predicate in the Stream <pre> {@code assertTrue(Streams.xMatch(Stream.of(1,2,3,5,6,7),3, i->i>4)); } </pre> """ return stream.filter(t ...
java
public static <T> boolean xMatch(final Stream<T> stream, final int num, final Predicate<? super T> c) { return stream.filter(t -> c.test(t)) .collect(java.util.stream.Collectors.counting()) == num; }
[ "public", "static", "<", "T", ">", "boolean", "xMatch", "(", "final", "Stream", "<", "T", ">", "stream", ",", "final", "int", "num", ",", "final", "Predicate", "<", "?", "super", "T", ">", "c", ")", "{", "return", "stream", ".", "filter", "(", "t",...
Check that there are specified number of matches of predicate in the Stream <pre> {@code assertTrue(Streams.xMatch(Stream.of(1,2,3,5,6,7),3, i->i>4)); } </pre>
[ "Check", "that", "there", "are", "specified", "number", "of", "matches", "of", "predicate", "in", "the", "Stream" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Streams.java#L1878-L1882
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.setInternalState
public static void setInternalState(Object object, Object value, Class<?> where) { """ Set the value of a field using reflection at at specific place in the class hierarchy (<tt>where</tt>). This first field assignable to <tt>object</tt> will then be set to <tt>value</tt>. @param object the object to modify ...
java
public static void setInternalState(Object object, Object value, Class<?> where) { WhiteboxImpl.setInternalState(object, value, where); }
[ "public", "static", "void", "setInternalState", "(", "Object", "object", ",", "Object", "value", ",", "Class", "<", "?", ">", "where", ")", "{", "WhiteboxImpl", ".", "setInternalState", "(", "object", ",", "value", ",", "where", ")", ";", "}" ]
Set the value of a field using reflection at at specific place in the class hierarchy (<tt>where</tt>). This first field assignable to <tt>object</tt> will then be set to <tt>value</tt>. @param object the object to modify @param value the new value of the field @param where the class in the hierarchy where the field i...
[ "Set", "the", "value", "of", "a", "field", "using", "reflection", "at", "at", "specific", "place", "in", "the", "class", "hierarchy", "(", "<tt", ">", "where<", "/", "tt", ">", ")", ".", "This", "first", "field", "assignable", "to", "<tt", ">", "object...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L222-L224
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java
TransactionableResourceManager.canEnrollChangeToGlobalTx
public boolean canEnrollChangeToGlobalTx(final SessionImpl session, final PlainChangesLog changes) { """ Checks if a global Tx has been started if so the session and its change will be dynamically enrolled @param session the session to enlist in case a Global Tx has been started @param changes the changes to enl...
java
public boolean canEnrollChangeToGlobalTx(final SessionImpl session, final PlainChangesLog changes) { try { int status; if (tm != null && (status = tm.getStatus()) != Status.STATUS_NO_TRANSACTION) { if (status != Status.STATUS_ACTIVE && status != Status.STATUS_PREPAR...
[ "public", "boolean", "canEnrollChangeToGlobalTx", "(", "final", "SessionImpl", "session", ",", "final", "PlainChangesLog", "changes", ")", "{", "try", "{", "int", "status", ";", "if", "(", "tm", "!=", "null", "&&", "(", "status", "=", "tm", ".", "getStatus",...
Checks if a global Tx has been started if so the session and its change will be dynamically enrolled @param session the session to enlist in case a Global Tx has been started @param changes the changes to enlist in case a Global Tx has been started @return <code>true</code> if a global Tx has been started and the sessi...
[ "Checks", "if", "a", "global", "Tx", "has", "been", "started", "if", "so", "the", "session", "and", "its", "change", "will", "be", "dynamically", "enrolled" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java#L209-L244
arxanchain/java-common
src/main/java/com/arxanfintech/common/util/ByteUtil.java
ByteUtil.encodeDataList
public static byte[] encodeDataList(Object... args) { """ encode the values and concatenate together @param args Object @return byte[] """ ByteArrayOutputStream baos = new ByteArrayOutputStream(); for (Object arg : args) { byte[] val = encodeValFor32Bits(arg); try {...
java
public static byte[] encodeDataList(Object... args) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); for (Object arg : args) { byte[] val = encodeValFor32Bits(arg); try { baos.write(val); } catch (IOException e) { throw new E...
[ "public", "static", "byte", "[", "]", "encodeDataList", "(", "Object", "...", "args", ")", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "for", "(", "Object", "arg", ":", "args", ")", "{", "byte", "[", "]", "va...
encode the values and concatenate together @param args Object @return byte[]
[ "encode", "the", "values", "and", "concatenate", "together" ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L362-L373
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/model/MapViewPosition.java
MapViewPosition.moveCenterAndZoom
public void moveCenterAndZoom(double moveHorizontal, double moveVertical, byte zoomLevelDiff, boolean animated) { """ Moves the center position of the map by the given amount of pixels. @param moveHorizontal the amount of pixels to move this MapViewPosition horizontally. @param moveVertical the amount of pix...
java
public void moveCenterAndZoom(double moveHorizontal, double moveVertical, byte zoomLevelDiff, boolean animated) { synchronized (this) { long mapSize = MercatorProjection.getMapSize(this.zoomLevel, this.displayModel.getTileSize()); double pixelX = MercatorProjection.longitudeToPixelX(this...
[ "public", "void", "moveCenterAndZoom", "(", "double", "moveHorizontal", ",", "double", "moveVertical", ",", "byte", "zoomLevelDiff", ",", "boolean", "animated", ")", "{", "synchronized", "(", "this", ")", "{", "long", "mapSize", "=", "MercatorProjection", ".", "...
Moves the center position of the map by the given amount of pixels. @param moveHorizontal the amount of pixels to move this MapViewPosition horizontally. @param moveVertical the amount of pixels to move this MapViewPosition vertically. @param zoomLevelDiff the difference in desired zoom level. @param animated ...
[ "Moves", "the", "center", "position", "of", "the", "map", "by", "the", "given", "amount", "of", "pixels", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/model/MapViewPosition.java#L317-L333
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.multCols
public static void multCols(DMatrixRMaj A , double values[] ) { """ Multiplies every element in column i by value[i]. @param A Matrix. Modified. @param values array. Not modified. """ if( values.length < A.numCols ) { throw new IllegalArgumentException("Not enough elements in values.");...
java
public static void multCols(DMatrixRMaj A , double values[] ) { if( values.length < A.numCols ) { throw new IllegalArgumentException("Not enough elements in values."); } int index = 0; for (int row = 0; row < A.numRows; row++) { for (int col = 0; col < A.numCols;...
[ "public", "static", "void", "multCols", "(", "DMatrixRMaj", "A", ",", "double", "values", "[", "]", ")", "{", "if", "(", "values", ".", "length", "<", "A", ".", "numCols", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Not enough elements in v...
Multiplies every element in column i by value[i]. @param A Matrix. Modified. @param values array. Not modified.
[ "Multiplies", "every", "element", "in", "column", "i", "by", "value", "[", "i", "]", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1786-L1797
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_util.java
Scs_util.cs_dalloc
public static Scsd cs_dalloc(int m, int n) { """ Allocate a Scsd object (a Sulmage-Mendelsohn decomposition). @param m number of rows of the matrix A to be analyzed @param n number of columns of the matrix A to be analyzed @return Sulmage-Mendelsohn decomposition """ Scsd S; S = new Sc...
java
public static Scsd cs_dalloc(int m, int n) { Scsd S; S = new Scsd(); S.p = new int[m]; S.r = new int[m + 6]; S.q = new int[n]; S.s = new int[n + 6]; S.cc = new int[5]; S.rr = new int[5]; return S; }
[ "public", "static", "Scsd", "cs_dalloc", "(", "int", "m", ",", "int", "n", ")", "{", "Scsd", "S", ";", "S", "=", "new", "Scsd", "(", ")", ";", "S", ".", "p", "=", "new", "int", "[", "m", "]", ";", "S", ".", "r", "=", "new", "int", "[", "m...
Allocate a Scsd object (a Sulmage-Mendelsohn decomposition). @param m number of rows of the matrix A to be analyzed @param n number of columns of the matrix A to be analyzed @return Sulmage-Mendelsohn decomposition
[ "Allocate", "a", "Scsd", "object", "(", "a", "Sulmage", "-", "Mendelsohn", "decomposition", ")", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_util.java#L108-L118
Ordinastie/MalisisCore
src/main/java/net/malisis/core/client/gui/component/container/UITabGroup.java
UITabGroup.addTab
public UITab addTab(UITab tab, UIContainer container) { """ Adds a {@link UITab} and its corresponding {@link UIContainer} to this {@link UITabGroup}.<br> Also sets the width of this {@code UITabGroup}. @param tab tab to add to the UITabGroup @param container {@link UIContainer} linked to the {@link UITab} @...
java
public UITab addTab(UITab tab, UIContainer container) { if (tab.isActive()) activeTab = tab; add(tab); tab.setContainer(container); tab.setActive(false); listTabs.put(tab, container); updateSize(); if (attachedContainer != null) { setupTabContainer(container); calculateTabPosition(); } r...
[ "public", "UITab", "addTab", "(", "UITab", "tab", ",", "UIContainer", "container", ")", "{", "if", "(", "tab", ".", "isActive", "(", ")", ")", "activeTab", "=", "tab", ";", "add", "(", "tab", ")", ";", "tab", ".", "setContainer", "(", "container", ")...
Adds a {@link UITab} and its corresponding {@link UIContainer} to this {@link UITabGroup}.<br> Also sets the width of this {@code UITabGroup}. @param tab tab to add to the UITabGroup @param container {@link UIContainer} linked to the {@link UITab} @return this {@link UITab}
[ "Adds", "a", "{", "@link", "UITab", "}", "and", "its", "corresponding", "{", "@link", "UIContainer", "}", "to", "this", "{", "@link", "UITabGroup", "}", ".", "<br", ">", "Also", "sets", "the", "width", "of", "this", "{", "@code", "UITabGroup", "}", "."...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/component/container/UITabGroup.java#L188-L205
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java
LocalPDBDirectory.getLastModifiedTime
private Date getLastModifiedTime(URL url) { """ Get the last modified time of the file in given url by retrieveing the "Last-Modified" header. Note that this only works for http URLs @param url @return the last modified date or null if it couldn't be retrieved (in that case a warning will be logged) """ ...
java
private Date getLastModifiedTime(URL url) { // see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java Date date = null; try { String lastModified = url.openConnection().getHeaderField("Last-Modified"); logger.debug("Last modified date of server file ({}) is {...
[ "private", "Date", "getLastModifiedTime", "(", "URL", "url", ")", "{", "// see http://stackoverflow.com/questions/2416872/how-do-you-obtain-modified-date-from-a-remote-file-java", "Date", "date", "=", "null", ";", "try", "{", "String", "lastModified", "=", "url", ".", "open...
Get the last modified time of the file in given url by retrieveing the "Last-Modified" header. Note that this only works for http URLs @param url @return the last modified date or null if it couldn't be retrieved (in that case a warning will be logged)
[ "Get", "the", "last", "modified", "time", "of", "the", "file", "in", "given", "url", "by", "retrieveing", "the", "Last", "-", "Modified", "header", ".", "Note", "that", "this", "only", "works", "for", "http", "URLs" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java#L576-L601
google/closure-templates
java/src/com/google/template/soy/jbcsrc/internal/InnerClasses.java
InnerClasses.registerAsInnerClass
public void registerAsInnerClass(ClassVisitor visitor, TypeInfo innerClass) { """ Registers this factory as an inner class on the given class writer. <p>Registering an inner class is confusing. The inner class needs to call this and so does the outer class. Confirmed by running ASMIfier. Also, failure to call ...
java
public void registerAsInnerClass(ClassVisitor visitor, TypeInfo innerClass) { checkRegistered(innerClass); doRegister(visitor, innerClass); }
[ "public", "void", "registerAsInnerClass", "(", "ClassVisitor", "visitor", ",", "TypeInfo", "innerClass", ")", "{", "checkRegistered", "(", "innerClass", ")", ";", "doRegister", "(", "visitor", ",", "innerClass", ")", ";", "}" ]
Registers this factory as an inner class on the given class writer. <p>Registering an inner class is confusing. The inner class needs to call this and so does the outer class. Confirmed by running ASMIfier. Also, failure to call visitInnerClass on both classes either breaks reflective apis (like class.getSimpleName()/...
[ "Registers", "this", "factory", "as", "an", "inner", "class", "on", "the", "given", "class", "writer", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/internal/InnerClasses.java#L97-L100
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/map/geotools/grid/GridFontParam.java
GridFontParam.postConstruct
public void postConstruct() { """ Initialize default values and validate that config is correct. """ Assert.isTrue(this.name != null, "name parameter cannot be null"); Assert.isTrue(this.style != null, "style parameter cannot be null"); Assert.isTrue(this.size > 1, "size must be greater...
java
public void postConstruct() { Assert.isTrue(this.name != null, "name parameter cannot be null"); Assert.isTrue(this.style != null, "style parameter cannot be null"); Assert.isTrue(this.size > 1, "size must be greater than 1"); Font baseFont = null; for (String fontName: this.nam...
[ "public", "void", "postConstruct", "(", ")", "{", "Assert", ".", "isTrue", "(", "this", ".", "name", "!=", "null", ",", "\"name parameter cannot be null\"", ")", ";", "Assert", ".", "isTrue", "(", "this", ".", "style", "!=", "null", ",", "\"style parameter c...
Initialize default values and validate that config is correct.
[ "Initialize", "default", "values", "and", "validate", "that", "config", "is", "correct", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/grid/GridFontParam.java#L37-L59
lviggiano/owner
owner/src/main/java/org/aeonbits/owner/ConfigFactory.java
ConfigFactory.setProperty
public static String setProperty(String key, String value) { """ Set a property in the ConfigFactory. Those properties will be used to expand variables specified in the `@Source` annotation, or by the ConfigFactory to configure its own behavior. @param key the key for the property. @param value the value fo...
java
public static String setProperty(String key, String value) { return INSTANCE.setProperty(key, value); }
[ "public", "static", "String", "setProperty", "(", "String", "key", ",", "String", "value", ")", "{", "return", "INSTANCE", ".", "setProperty", "(", "key", ",", "value", ")", ";", "}" ]
Set a property in the ConfigFactory. Those properties will be used to expand variables specified in the `@Source` annotation, or by the ConfigFactory to configure its own behavior. @param key the key for the property. @param value the value for the property. @return the old value. @since 1.0.4
[ "Set", "a", "property", "in", "the", "ConfigFactory", ".", "Those", "properties", "will", "be", "used", "to", "expand", "variables", "specified", "in", "the", "@Source", "annotation", "or", "by", "the", "ConfigFactory", "to", "configure", "its", "own", "behavi...
train
https://github.com/lviggiano/owner/blob/1223ecfbe3c275b3b7c5ec13e9238c9bb888754f/owner/src/main/java/org/aeonbits/owner/ConfigFactory.java#L85-L87
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPagesNotContainingTemplateNames
public Iterable<Page> getPagesNotContainingTemplateNames(List<String> templateNames) throws WikiApiException { """ Return an iterable containing all pages that do NOT contain a template the name of which equals of the given Strings. @param templateNames the names of the template that we want to match @return...
java
public Iterable<Page> getPagesNotContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPages(templateNames, false); }
[ "public", "Iterable", "<", "Page", ">", "getPagesNotContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPages", "(", "templateNames", ",", "false", ")", ";", "}" ]
Return an iterable containing all pages that do NOT contain a template the name of which equals of the given Strings. @param templateNames the names of the template that we want to match @return An iterable with the page objects that do NOT contain any of the the specified templates @throws WikiApiException If there w...
[ "Return", "an", "iterable", "containing", "all", "pages", "that", "do", "NOT", "contain", "a", "template", "the", "name", "of", "which", "equals", "of", "the", "given", "Strings", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L527-L529
baratine/baratine
framework/src/main/java/com/caucho/v5/util/ThreadDump.java
ThreadDump.getThreadDump
public String getThreadDump(int depth, boolean onlyActive) { """ Returns dump of threads. Optionally uses cached dump. @param onlyActive if true only running threads are logged """ ThreadMXBean threadBean = ManagementFactory.getThreadMXBean(); long []ids = threadBean.getAllThreadIds(); ThreadInf...
java
public String getThreadDump(int depth, boolean onlyActive) { ThreadMXBean threadBean = ManagementFactory.getThreadMXBean(); long []ids = threadBean.getAllThreadIds(); ThreadInfo []info = threadBean.getThreadInfo(ids, depth); StringBuilder sb = new StringBuilder(); sb.append("Thread Dump generate...
[ "public", "String", "getThreadDump", "(", "int", "depth", ",", "boolean", "onlyActive", ")", "{", "ThreadMXBean", "threadBean", "=", "ManagementFactory", ".", "getThreadMXBean", "(", ")", ";", "long", "[", "]", "ids", "=", "threadBean", ".", "getAllThreadIds", ...
Returns dump of threads. Optionally uses cached dump. @param onlyActive if true only running threads are logged
[ "Returns", "dump", "of", "threads", ".", "Optionally", "uses", "cached", "dump", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/util/ThreadDump.java#L105-L128
huangp/entityunit
src/main/java/com/github/huangp/entityunit/entity/EntityClass.java
EntityClass.from
public static EntityClass from(final Class clazz, final ScanOption scanOption) { """ Factory method. @param clazz the class to wrap @param scanOption whether consider optional OneToOne as required @return a wrapper for the entity class """ try { return CACHE.get(CacheKey.of(clazz, sc...
java
public static EntityClass from(final Class clazz, final ScanOption scanOption) { try { return CACHE.get(CacheKey.of(clazz, scanOption), new Callable<EntityClass>() { @Override public EntityClass call() throws Exception { return createEntityClass(cl...
[ "public", "static", "EntityClass", "from", "(", "final", "Class", "clazz", ",", "final", "ScanOption", "scanOption", ")", "{", "try", "{", "return", "CACHE", ".", "get", "(", "CacheKey", ".", "of", "(", "clazz", ",", "scanOption", ")", ",", "new", "Calla...
Factory method. @param clazz the class to wrap @param scanOption whether consider optional OneToOne as required @return a wrapper for the entity class
[ "Factory", "method", "." ]
train
https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/entity/EntityClass.java#L137-L148
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/PvmExecutionImpl.java
PvmExecutionImpl.dispatchDelayedEventsAndPerformOperation
public void dispatchDelayedEventsAndPerformOperation(final Callback<PvmExecutionImpl, Void> continuation) { """ Dispatches the current delayed variable events and performs the given atomic operation if the current state was not changed. @param continuation the atomic operation continuation which should be exec...
java
public void dispatchDelayedEventsAndPerformOperation(final Callback<PvmExecutionImpl, Void> continuation) { PvmExecutionImpl execution = this; if (execution.getDelayedEvents().isEmpty()) { continueExecutionIfNotCanceled(continuation, execution); return; } continueIfExecutionDoesNotAffectNe...
[ "public", "void", "dispatchDelayedEventsAndPerformOperation", "(", "final", "Callback", "<", "PvmExecutionImpl", ",", "Void", ">", "continuation", ")", "{", "PvmExecutionImpl", "execution", "=", "this", ";", "if", "(", "execution", ".", "getDelayedEvents", "(", ")",...
Dispatches the current delayed variable events and performs the given atomic operation if the current state was not changed. @param continuation the atomic operation continuation which should be executed
[ "Dispatches", "the", "current", "delayed", "variable", "events", "and", "performs", "the", "given", "atomic", "operation", "if", "the", "current", "state", "was", "not", "changed", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/PvmExecutionImpl.java#L1937-L1958
Alluxio/alluxio
core/common/src/main/java/alluxio/util/CommonUtils.java
CommonUtils.getUnixGroups
public static List<String> getUnixGroups(String user) throws IOException { """ Gets the current user's group list from Unix by running the command 'groups' NOTE. For non-existing user it will return EMPTY list. This method may return duplicate groups. @param user user name @return the groups list that the {@c...
java
public static List<String> getUnixGroups(String user) throws IOException { String result; List<String> groups = new ArrayList<>(); try { result = ShellUtils.execCommand(ShellUtils.getGroupsForUserCommand(user)); } catch (ExitCodeException e) { // if we didn't get the group - just return empt...
[ "public", "static", "List", "<", "String", ">", "getUnixGroups", "(", "String", "user", ")", "throws", "IOException", "{", "String", "result", ";", "List", "<", "String", ">", "groups", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "result", ...
Gets the current user's group list from Unix by running the command 'groups' NOTE. For non-existing user it will return EMPTY list. This method may return duplicate groups. @param user user name @return the groups list that the {@code user} belongs to. The primary group is returned first
[ "Gets", "the", "current", "user", "s", "group", "list", "from", "Unix", "by", "running", "the", "command", "groups", "NOTE", ".", "For", "non", "-", "existing", "user", "it", "will", "return", "EMPTY", "list", ".", "This", "method", "may", "return", "dup...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/CommonUtils.java#L246-L262
awin/rabbiteasy
rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageReader.java
MessageReader.readBodyAsObject
@SuppressWarnings("unchecked") public <T> T readBodyAsObject(Class<T> type) { """ Extracts the message body and interprets it as the XML representation of an object of the given type. @param type The type (class) of the object @return The message body as an object of the specified type """ ...
java
@SuppressWarnings("unchecked") public <T> T readBodyAsObject(Class<T> type) { Charset charset = readCharset(); InputStream inputStream = new ByteArrayInputStream(message.getBodyContent()); InputStreamReader inputReader = new InputStreamReader(inputStream, charset); StreamSource ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "readBodyAsObject", "(", "Class", "<", "T", ">", "type", ")", "{", "Charset", "charset", "=", "readCharset", "(", ")", ";", "InputStream", "inputStream", "=", "new", "ByteArr...
Extracts the message body and interprets it as the XML representation of an object of the given type. @param type The type (class) of the object @return The message body as an object of the specified type
[ "Extracts", "the", "message", "body", "and", "interprets", "it", "as", "the", "XML", "representation", "of", "an", "object", "of", "the", "given", "type", "." ]
train
https://github.com/awin/rabbiteasy/blob/c161efda6c0f7ef319aedf09dfe40a4a90165510/rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageReader.java#L143-L160
google/closure-templates
java/src/com/google/template/soy/SoyFileSet.java
SoyFileSet.compileForServerRendering
private ServerCompilationPrimitives compileForServerRendering() { """ Runs common compiler logic shared by tofu and jbcsrc backends. """ ParseResult result = parse(); throwIfErrorsPresent(); SoyFileSetNode soyTree = result.fileSet(); TemplateRegistry registry = result.registry(); // Clear ...
java
private ServerCompilationPrimitives compileForServerRendering() { ParseResult result = parse(); throwIfErrorsPresent(); SoyFileSetNode soyTree = result.fileSet(); TemplateRegistry registry = result.registry(); // Clear the SoyDoc strings because they use unnecessary memory, unless we have a cache, ...
[ "private", "ServerCompilationPrimitives", "compileForServerRendering", "(", ")", "{", "ParseResult", "result", "=", "parse", "(", ")", ";", "throwIfErrorsPresent", "(", ")", ";", "SoyFileSetNode", "soyTree", "=", "result", ".", "fileSet", "(", ")", ";", "TemplateR...
Runs common compiler logic shared by tofu and jbcsrc backends.
[ "Runs", "common", "compiler", "logic", "shared", "by", "tofu", "and", "jbcsrc", "backends", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/SoyFileSet.java#L857-L871
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/grid/GridBuffer.java
GridBuffer.newBufferStartsAt
public int newBufferStartsAt(int iTargetPosition, GridList gridList) { """ Shift the current cache to the current records and setup a new buffer. @param iTargetPosition The new target position. @param gridList The gridList to update with buffer items before I free them. @return The new physical position of this...
java
public int newBufferStartsAt(int iTargetPosition, GridList gridList) { //**NOTE** This can be improved by moving any overlapping records in the old buffer to the new buffer // Discard the entire current buffer if (gridList != null) this.moveBufferToAccessList(gridList); for (int inde...
[ "public", "int", "newBufferStartsAt", "(", "int", "iTargetPosition", ",", "GridList", "gridList", ")", "{", "//**NOTE** This can be improved by moving any overlapping records in the old buffer to the new buffer", "// Discard the entire current buffer", "if", "(", "gridList", "!=", ...
Shift the current cache to the current records and setup a new buffer. @param iTargetPosition The new target position. @param gridList The gridList to update with buffer items before I free them. @return The new physical position of this target position.
[ "Shift", "the", "current", "cache", "to", "the", "current", "records", "and", "setup", "a", "new", "buffer", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/grid/GridBuffer.java#L174-L192
apache/groovy
src/main/java/org/codehaus/groovy/ast/ClassNode.java
ClassNode.hasPossibleStaticMethod
public boolean hasPossibleStaticMethod(String name, Expression arguments) { """ Returns true if the given method has a possibly matching static method with the given name and arguments. @param name the name of the method of interest @param arguments the arguments to match against @return true if a matchi...
java
public boolean hasPossibleStaticMethod(String name, Expression arguments) { return ClassNodeUtils.hasPossibleStaticMethod(this, name, arguments, false); }
[ "public", "boolean", "hasPossibleStaticMethod", "(", "String", "name", ",", "Expression", "arguments", ")", "{", "return", "ClassNodeUtils", ".", "hasPossibleStaticMethod", "(", "this", ",", "name", ",", "arguments", ",", "false", ")", ";", "}" ]
Returns true if the given method has a possibly matching static method with the given name and arguments. @param name the name of the method of interest @param arguments the arguments to match against @return true if a matching method was found
[ "Returns", "true", "if", "the", "given", "method", "has", "a", "possibly", "matching", "static", "method", "with", "the", "given", "name", "and", "arguments", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/ast/ClassNode.java#L1399-L1401
alkacon/opencms-core
src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java
CmsContentEditor.updateEditorValues
void updateEditorValues(CmsEntity previous, CmsEntity updated) { """ Updates the editor values.<p> @param previous the previous entity state @param updated the updated entity state """ if (!m_isDirectEdit && updated.getId().equals(m_entityId)) { // only apply the changes to the same...
java
void updateEditorValues(CmsEntity previous, CmsEntity updated) { if (!m_isDirectEdit && updated.getId().equals(m_entityId)) { // only apply the changes to the same locale entity updateEditorValues(previous, updated, getEntity(), Collections.<String> emptyList()); } }
[ "void", "updateEditorValues", "(", "CmsEntity", "previous", ",", "CmsEntity", "updated", ")", "{", "if", "(", "!", "m_isDirectEdit", "&&", "updated", ".", "getId", "(", ")", ".", "equals", "(", "m_entityId", ")", ")", "{", "// only apply the changes to the same ...
Updates the editor values.<p> @param previous the previous entity state @param updated the updated entity state
[ "Updates", "the", "editor", "values", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java#L2084-L2090