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
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java
GridGenerator.setDimension
public void setDimension(double min, double max) { """ Method sets the maximal 3d dimensions to given min and max values. """ this.minx = min; this.maxx = max; this.miny = min; this.maxy = max; this.minz = min; this.maxz = max; }
java
public void setDimension(double min, double max) { this.minx = min; this.maxx = max; this.miny = min; this.maxy = max; this.minz = min; this.maxz = max; }
[ "public", "void", "setDimension", "(", "double", "min", ",", "double", "max", ")", "{", "this", ".", "minx", "=", "min", ";", "this", ".", "maxx", "=", "max", ";", "this", ".", "miny", "=", "min", ";", "this", ".", "maxy", "=", "max", ";", "this"...
Method sets the maximal 3d dimensions to given min and max values.
[ "Method", "sets", "the", "maximal", "3d", "dimensions", "to", "given", "min", "and", "max", "values", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L74-L81
apache/spark
common/network-shuffle/src/main/java/org/apache/spark/network/sasl/ShuffleSecretManager.java
ShuffleSecretManager.registerApp
public void registerApp(String appId, ByteBuffer shuffleSecret) { """ Register an application with its secret specified as a byte buffer. """ registerApp(appId, JavaUtils.bytesToString(shuffleSecret)); }
java
public void registerApp(String appId, ByteBuffer shuffleSecret) { registerApp(appId, JavaUtils.bytesToString(shuffleSecret)); }
[ "public", "void", "registerApp", "(", "String", "appId", ",", "ByteBuffer", "shuffleSecret", ")", "{", "registerApp", "(", "appId", ",", "JavaUtils", ".", "bytesToString", "(", "shuffleSecret", ")", ")", ";", "}" ]
Register an application with its secret specified as a byte buffer.
[ "Register", "an", "application", "with", "its", "secret", "specified", "as", "a", "byte", "buffer", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/sasl/ShuffleSecretManager.java#L60-L62
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.L3_L93
@Pure public static Point2d L3_L93(double x, double y) { """ This function convert France Lambert III coordinate to France Lambert 93 coordinate. @param x is the coordinate in France Lambert III @param y is the coordinate in France Lambert III @return the France Lambert 93 coordinate. """ final Point2...
java
@Pure public static Point2d L3_L93(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_93_N, LAMBERT_93_C, LAMBERT_93...
[ "@", "Pure", "public", "static", "Point2d", "L3_L93", "(", "double", "x", ",", "double", "y", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "NTFLambert_NTFLambdaPhi", "(", "x", ",", "y", ",", "LAMBERT_3_N", ",", "LAMBERT_3_C", ",", "LAMBERT_3_XS", ",", ...
This function convert France Lambert III coordinate to France Lambert 93 coordinate. @param x is the coordinate in France Lambert III @param y is the coordinate in France Lambert III @return the France Lambert 93 coordinate.
[ "This", "function", "convert", "France", "Lambert", "III", "coordinate", "to", "France", "Lambert", "93", "coordinate", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L651-L664
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/manager/action/OriginateAction.java
OriginateAction.setVariables
public void setVariables(Map<String, String> variables) { """ Sets the variables to set on the originated call. @param variables a Map containing the variable names as key and their values as value. @since 0.2 """ if (this.variables != null) { this.variables.putAll(variables); ...
java
public void setVariables(Map<String, String> variables) { if (this.variables != null) { this.variables.putAll(variables); } else { this.variables = variables; } }
[ "public", "void", "setVariables", "(", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "if", "(", "this", ".", "variables", "!=", "null", ")", "{", "this", ".", "variables", ".", "putAll", "(", "variables", ")", ";", "}", "else", "{"...
Sets the variables to set on the originated call. @param variables a Map containing the variable names as key and their values as value. @since 0.2
[ "Sets", "the", "variables", "to", "set", "on", "the", "originated", "call", "." ]
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/action/OriginateAction.java#L458-L468
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/asset/AssetUtil.java
AssetUtil.getClassLoaderResourceName
public static String getClassLoaderResourceName(Package resourcePackage, String resourceName) { """ Helper to convert from java package name to class loader package name <br/> <br/> ie: javax.test + my.txt = javax/test/ + my.txt @param resourcePackage The base package @param resourceName The resource insid...
java
public static String getClassLoaderResourceName(Package resourcePackage, String resourceName) { String resourcePackaeName = resourcePackage.getName().replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH); return resourcePackaeName + DELIMITER_RESOURCE_PATH + resourceName; }
[ "public", "static", "String", "getClassLoaderResourceName", "(", "Package", "resourcePackage", ",", "String", "resourceName", ")", "{", "String", "resourcePackaeName", "=", "resourcePackage", ".", "getName", "(", ")", ".", "replaceAll", "(", "DELIMITER_CLASS_NAME_PATH",...
Helper to convert from java package name to class loader package name <br/> <br/> ie: javax.test + my.txt = javax/test/ + my.txt @param resourcePackage The base package @param resourceName The resource inside the package. @return {@link ClassLoader} resource location
[ "Helper", "to", "convert", "from", "java", "package", "name", "to", "class", "loader", "package", "name", "<br", "/", ">", "<br", "/", ">", "ie", ":", "javax", ".", "test", "+", "my", ".", "txt", "=", "javax", "/", "test", "/", "+", "my", ".", "t...
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/asset/AssetUtil.java#L92-L97
vanilladb/vanillacore
src/main/java/org/vanilladb/core/storage/metadata/statistics/SampledHistogramBuilder.java
SampledHistogramBuilder.newMaxDiffFreqHistogram
public Histogram newMaxDiffFreqHistogram(int numBkts, int numPcts) { """ Constructs a histogram with the "MaxDiff(V, F)" buckets for all fields. @param numBkts the number of buckets to construct for each field @param numPcts the number of value percentiles in each bucket @return a "MaxDiff(V, F)" histogram ...
java
public Histogram newMaxDiffFreqHistogram(int numBkts, int numPcts) { Map<String, BucketBuilder> initBbs = new HashMap<String, BucketBuilder>(); // initialize the first bucket builder for every field for (String fld : schema.fields()) initBbs.put(fld, new MaxDiffFreqBucketBuilder(frequencies(fld), num...
[ "public", "Histogram", "newMaxDiffFreqHistogram", "(", "int", "numBkts", ",", "int", "numPcts", ")", "{", "Map", "<", "String", ",", "BucketBuilder", ">", "initBbs", "=", "new", "HashMap", "<", "String", ",", "BucketBuilder", ">", "(", ")", ";", "// initiali...
Constructs a histogram with the "MaxDiff(V, F)" buckets for all fields. @param numBkts the number of buckets to construct for each field @param numPcts the number of value percentiles in each bucket @return a "MaxDiff(V, F)" histogram
[ "Constructs", "a", "histogram", "with", "the", "MaxDiff", "(", "V", "F", ")", "buckets", "for", "all", "fields", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/storage/metadata/statistics/SampledHistogramBuilder.java#L434-L441
jtmelton/appsensor
analysis-engines/appsensor-analysis-reference/src/main/java/org/owasp/appsensor/analysis/ReferenceEventAnalysisEngine.java
ReferenceEventAnalysisEngine.countEvents
protected int countEvents(Collection<Event> existingEvents, Event triggeringEvent, DetectionPoint configuredDetectionPoint) { """ Count the number of {@link Event}s over a time {@link Interval} specified in milliseconds. @param existingEvents set of {@link Event}s matching triggering {@link Event} id/user pulle...
java
protected int countEvents(Collection<Event> existingEvents, Event triggeringEvent, DetectionPoint configuredDetectionPoint) { int count = 0; long intervalInMillis = configuredDetectionPoint.getThreshold().getInterval().toMillis(); //grab the startTime to begin counting from based on the current time - interval ...
[ "protected", "int", "countEvents", "(", "Collection", "<", "Event", ">", "existingEvents", ",", "Event", "triggeringEvent", ",", "DetectionPoint", "configuredDetectionPoint", ")", "{", "int", "count", "=", "0", ";", "long", "intervalInMillis", "=", "configuredDetect...
Count the number of {@link Event}s over a time {@link Interval} specified in milliseconds. @param existingEvents set of {@link Event}s matching triggering {@link Event} id/user pulled from {@link Event} storage @param triggeringEvent the {@link Event} that triggered analysis @param configuredDetectionPoint the {@link ...
[ "Count", "the", "number", "of", "{", "@link", "Event", "}", "s", "over", "a", "time", "{", "@link", "Interval", "}", "specified", "in", "milliseconds", "." ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/analysis-engines/appsensor-analysis-reference/src/main/java/org/owasp/appsensor/analysis/ReferenceEventAnalysisEngine.java#L116-L144
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java
Calendar.getPreviousZoneTransitionTime
private static Long getPreviousZoneTransitionTime(TimeZone tz, long base, long duration) { """ Find the previous zone transition within the specified duration. Note: This method is only used when TimeZone is NOT a BasicTimeZone. @param tz The time zone. @param base The base time, inclusive. @param duration The...
java
private static Long getPreviousZoneTransitionTime(TimeZone tz, long base, long duration) { assert duration > 0; long upper = base; long lower = base - duration - 1; int offsetU = tz.getOffset(upper); int offsetL = tz.getOffset(lower); if (offsetU == offsetL) { ...
[ "private", "static", "Long", "getPreviousZoneTransitionTime", "(", "TimeZone", "tz", ",", "long", "base", ",", "long", "duration", ")", "{", "assert", "duration", ">", "0", ";", "long", "upper", "=", "base", ";", "long", "lower", "=", "base", "-", "duratio...
Find the previous zone transition within the specified duration. Note: This method is only used when TimeZone is NOT a BasicTimeZone. @param tz The time zone. @param base The base time, inclusive. @param duration The range of time evaluated. @return The time of the previous zone transition, or null if not available.
[ "Find", "the", "previous", "zone", "transition", "within", "the", "specified", "duration", ".", "Note", ":", "This", "method", "is", "only", "used", "when", "TimeZone", "is", "NOT", "a", "BasicTimeZone", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5396-L5407
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java
EmbedBuilder.addField
public EmbedBuilder addField(String name, String value, boolean inline) { """ Adds a field to the embed. @param name The name of the field. @param value The value of the field. @param inline Whether the field should be inline or not. @return The current instance in order to chain call methods. """ ...
java
public EmbedBuilder addField(String name, String value, boolean inline) { delegate.addField(name, value, inline); return this; }
[ "public", "EmbedBuilder", "addField", "(", "String", "name", ",", "String", "value", ",", "boolean", "inline", ")", "{", "delegate", ".", "addField", "(", "name", ",", "value", ",", "inline", ")", ";", "return", "this", ";", "}" ]
Adds a field to the embed. @param name The name of the field. @param value The value of the field. @param inline Whether the field should be inline or not. @return The current instance in order to chain call methods.
[ "Adds", "a", "field", "to", "the", "embed", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java#L624-L627
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.createOrUpdateByScope
public ManagementLockObjectInner createOrUpdateByScope(String scope, String lockName, ManagementLockObjectInner parameters) { """ Create or update a management lock by scope. @param scope The scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, ...
java
public ManagementLockObjectInner createOrUpdateByScope(String scope, String lockName, ManagementLockObjectInner parameters) { return createOrUpdateByScopeWithServiceResponseAsync(scope, lockName, parameters).toBlocking().single().body(); }
[ "public", "ManagementLockObjectInner", "createOrUpdateByScope", "(", "String", "scope", ",", "String", "lockName", ",", "ManagementLockObjectInner", "parameters", ")", "{", "return", "createOrUpdateByScopeWithServiceResponseAsync", "(", "scope", ",", "lockName", ",", "param...
Create or update a management lock by scope. @param scope The scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and '/subscriptions/{subscriptionId}/resourcegr...
[ "Create", "or", "update", "a", "management", "lock", "by", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L426-L428
facebookarchive/swift
swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java
ThriftCodecByteCodeGenerator.defineReadBridgeMethod
private void defineReadBridgeMethod() { """ Defines the generics bridge method with untyped args to the type specific read method. """ classDefinition.addMethod( new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "read", type(Object.class), arg("protocol", TProtocol.class)) ...
java
private void defineReadBridgeMethod() { classDefinition.addMethod( new MethodDefinition(a(PUBLIC, BRIDGE, SYNTHETIC), "read", type(Object.class), arg("protocol", TProtocol.class)) .addException(Exception.class) .loadThis() ...
[ "private", "void", "defineReadBridgeMethod", "(", ")", "{", "classDefinition", ".", "addMethod", "(", "new", "MethodDefinition", "(", "a", "(", "PUBLIC", ",", "BRIDGE", ",", "SYNTHETIC", ")", ",", "\"read\"", ",", "type", "(", "Object", ".", "class", ")", ...
Defines the generics bridge method with untyped args to the type specific read method.
[ "Defines", "the", "generics", "bridge", "method", "with", "untyped", "args", "to", "the", "type", "specific", "read", "method", "." ]
train
https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L1005-L1015
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/Util.java
Util.flipBitmapRangeAndCardinalityChange
@Deprecated public static int flipBitmapRangeAndCardinalityChange(long[] bitmap, int start, int end) { """ flip bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be mo...
java
@Deprecated public static int flipBitmapRangeAndCardinalityChange(long[] bitmap, int start, int end) { int cardbefore = cardinalityInBitmapWordRange(bitmap, start, end); flipBitmapRange(bitmap, start,end); int cardafter = cardinalityInBitmapWordRange(bitmap, start, end); return cardafter - cardbefore;...
[ "@", "Deprecated", "public", "static", "int", "flipBitmapRangeAndCardinalityChange", "(", "long", "[", "]", "bitmap", ",", "int", "start", ",", "int", "end", ")", "{", "int", "cardbefore", "=", "cardinalityInBitmapWordRange", "(", "bitmap", ",", "start", ",", ...
flip bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be modified (exclusive) @return cardinality change
[ "flip", "bits", "at", "start", "start", "+", "1", "...", "end", "-", "1", "and", "report", "the", "cardinality", "change" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/Util.java#L545-L551
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/util/FilterVirtualFileVisitor.java
FilterVirtualFileVisitor.checkAttributes
private static VisitorAttributes checkAttributes(VirtualFileFilter filter, VisitorAttributes attributes) { """ Check the attributes @param filter the filter @param attributes the attributes @return the attributes @throws IllegalArgumentException for a null filter """ if (filter == null) { ...
java
private static VisitorAttributes checkAttributes(VirtualFileFilter filter, VisitorAttributes attributes) { if (filter == null) { throw MESSAGES.nullArgument("filter"); } // Specified if (attributes != null) { return attributes; } // From the filter if (filter ...
[ "private", "static", "VisitorAttributes", "checkAttributes", "(", "VirtualFileFilter", "filter", ",", "VisitorAttributes", "attributes", ")", "{", "if", "(", "filter", "==", "null", ")", "{", "throw", "MESSAGES", ".", "nullArgument", "(", "\"filter\"", ")", ";", ...
Check the attributes @param filter the filter @param attributes the attributes @return the attributes @throws IllegalArgumentException for a null filter
[ "Check", "the", "attributes" ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/util/FilterVirtualFileVisitor.java#L57-L67
UrielCh/ovh-java-sdk
ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java
ApiOvhStore.partner_partnerId_product_POST
public OvhEditResponse partner_partnerId_product_POST(String partnerId, String category, String description, String name, String otherDetails) throws IOException { """ Create a new product for partner REST: POST /store/partner/{partnerId}/product @param partnerId [required] Id of the partner @param descriptio...
java
public OvhEditResponse partner_partnerId_product_POST(String partnerId, String category, String description, String name, String otherDetails) throws IOException { String qPath = "/store/partner/{partnerId}/product"; StringBuilder sb = path(qPath, partnerId); HashMap<String, Object>o = new HashMap<String, Object>...
[ "public", "OvhEditResponse", "partner_partnerId_product_POST", "(", "String", "partnerId", ",", "String", "category", ",", "String", "description", ",", "String", "name", ",", "String", "otherDetails", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/s...
Create a new product for partner REST: POST /store/partner/{partnerId}/product @param partnerId [required] Id of the partner @param description [required] Description of product @param name [required] Name of product @param otherDetails [required] Additional information @param category [required] Name of product categ...
[ "Create", "a", "new", "product", "for", "partner" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-store/src/main/java/net/minidev/ovh/api/ApiOvhStore.java#L548-L558
mojohaus/webstart
webstart-jnlp-servlet/src/main/java/jnlp/sample/servlet/ResourceCatalog.java
ResourceCatalog.prefixMatchLists
public boolean prefixMatchLists( String[] prefixes, String[] keys ) { """ /* Return true if at least one of the strings in 'prefixes' are a prefix to at least one of the 'keys'. """ // The prefixes are part of the server resources. If none is given, // everything matches if ( prefixes ...
java
public boolean prefixMatchLists( String[] prefixes, String[] keys ) { // The prefixes are part of the server resources. If none is given, // everything matches if ( prefixes == null ) { return true; } // If no os keyes was given, and the server resource is...
[ "public", "boolean", "prefixMatchLists", "(", "String", "[", "]", "prefixes", ",", "String", "[", "]", "keys", ")", "{", "// The prefixes are part of the server resources. If none is given,", "// everything matches", "if", "(", "prefixes", "==", "null", ")", "{", "ret...
/* Return true if at least one of the strings in 'prefixes' are a prefix to at least one of the 'keys'.
[ "/", "*", "Return", "true", "if", "at", "least", "one", "of", "the", "strings", "in", "prefixes", "are", "a", "prefix", "to", "at", "least", "one", "of", "the", "keys", "." ]
train
https://github.com/mojohaus/webstart/blob/38fdd1d21f063f21716cfcd61ebeabd963487576/webstart-jnlp-servlet/src/main/java/jnlp/sample/servlet/ResourceCatalog.java#L296-L319
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Interval.java
Interval.toInterval
public static <E extends Comparable<E>> Interval<E> toInterval(E a, E b, int flags) { """ Create an interval with the specified endpoints in the specified order, using the specified flags. Returns null if a does not come before b (invalid interval) @param a start endpoints @param b end endpoint @param flags ...
java
public static <E extends Comparable<E>> Interval<E> toInterval(E a, E b, int flags) { int comp = a.compareTo(b); if (comp <= 0) { return new Interval(a,b, flags); } else { return null; } }
[ "public", "static", "<", "E", "extends", "Comparable", "<", "E", ">", ">", "Interval", "<", "E", ">", "toInterval", "(", "E", "a", ",", "E", "b", ",", "int", "flags", ")", "{", "int", "comp", "=", "a", ".", "compareTo", "(", "b", ")", ";", "if"...
Create an interval with the specified endpoints in the specified order, using the specified flags. Returns null if a does not come before b (invalid interval) @param a start endpoints @param b end endpoint @param flags flags characterizing the interval @param <E> type of the interval endpoints @return Interval with en...
[ "Create", "an", "interval", "with", "the", "specified", "endpoints", "in", "the", "specified", "order", "using", "the", "specified", "flags", ".", "Returns", "null", "if", "a", "does", "not", "come", "before", "b", "(", "invalid", "interval", ")" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Interval.java#L353-L360
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.findAll
@Override public List<CPOptionCategory> findAll(int start, int end) { """ Returns a range of all the cp option categories. <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 s...
java
@Override public List<CPOptionCategory> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPOptionCategory", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp option categories. <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 result in the set. Setting both <code>...
[ "Returns", "a", "range", "of", "all", "the", "cp", "option", "categories", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L3452-L3455
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/JFapUtils.java
JFapUtils.debugTraceWsByteBufferInfo
public static void debugTraceWsByteBufferInfo(Object _this, TraceComponent _tc, WsByteBuffer buffer, String string) { """ Dumps useful info about a WsByteBuffer (stops short of its actual contents) @param _this @param _tc @param buffer @param string """ if (buffer != null) { StringBuff...
java
public static void debugTraceWsByteBufferInfo(Object _this, TraceComponent _tc, WsByteBuffer buffer, String string) { if (buffer != null) { StringBuffer sb = new StringBuffer(buffer.getClass().toString()); sb.append("@"); sb.append(Integer.toHexString(System.identityHashCode(bu...
[ "public", "static", "void", "debugTraceWsByteBufferInfo", "(", "Object", "_this", ",", "TraceComponent", "_tc", ",", "WsByteBuffer", "buffer", ",", "String", "string", ")", "{", "if", "(", "buffer", "!=", "null", ")", "{", "StringBuffer", "sb", "=", "new", "...
Dumps useful info about a WsByteBuffer (stops short of its actual contents) @param _this @param _tc @param buffer @param string
[ "Dumps", "useful", "info", "about", "a", "WsByteBuffer", "(", "stops", "short", "of", "its", "actual", "contents", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/JFapUtils.java#L115-L134
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java
PatternsImpl.getPatternsAsync
public Observable<List<PatternRuleInfo>> getPatternsAsync(UUID appId, String versionId, GetPatternsOptionalParameter getPatternsOptionalParameter) { """ Returns an application version's patterns. @param appId The application ID. @param versionId The version ID. @param getPatternsOptionalParameter the object r...
java
public Observable<List<PatternRuleInfo>> getPatternsAsync(UUID appId, String versionId, GetPatternsOptionalParameter getPatternsOptionalParameter) { return getPatternsWithServiceResponseAsync(appId, versionId, getPatternsOptionalParameter).map(new Func1<ServiceResponse<List<PatternRuleInfo>>, List<PatternRuleIn...
[ "public", "Observable", "<", "List", "<", "PatternRuleInfo", ">", ">", "getPatternsAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "GetPatternsOptionalParameter", "getPatternsOptionalParameter", ")", "{", "return", "getPatternsWithServiceResponseAsync", "("...
Returns an application version's patterns. @param appId The application ID. @param versionId The version ID. @param getPatternsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observ...
[ "Returns", "an", "application", "version", "s", "patterns", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java#L234-L241
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/ExternalTrxMessage.java
ExternalTrxMessage.transformMessage
public String transformMessage(String strXML, StreamSource streamTransformer) { """ Use XSLT to convert this source tree into a new tree. @param result If this is specified, transform the message to this result (and return null). @param source The source to convert. @param streamTransformer The (optional) input...
java
public String transformMessage(String strXML, StreamSource streamTransformer) { Reader reader = new StringReader(strXML); StreamSource source = new StreamSource(reader); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); try { ...
[ "public", "String", "transformMessage", "(", "String", "strXML", ",", "StreamSource", "streamTransformer", ")", "{", "Reader", "reader", "=", "new", "StringReader", "(", "strXML", ")", ";", "StreamSource", "source", "=", "new", "StreamSource", "(", "reader", ")"...
Use XSLT to convert this source tree into a new tree. @param result If this is specified, transform the message to this result (and return null). @param source The source to convert. @param streamTransformer The (optional) input stream that contains the XSLT document. If you don't supply a streamTransformer, you should...
[ "Use", "XSLT", "to", "convert", "this", "source", "tree", "into", "a", "new", "tree", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/ExternalTrxMessage.java#L259-L300
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java
ST_MakePoint.createPoint
public static Point createPoint(double x, double y) throws SQLException { """ Constructs POINT from two doubles. @param x X-coordinate @param y Y-coordinate @return The POINT constructed from the given coordinatesk @throws java.sql.SQLException """ return createPoint(x, y, Coordinate.NULL_ORDINAT...
java
public static Point createPoint(double x, double y) throws SQLException { return createPoint(x, y, Coordinate.NULL_ORDINATE); }
[ "public", "static", "Point", "createPoint", "(", "double", "x", ",", "double", "y", ")", "throws", "SQLException", "{", "return", "createPoint", "(", "x", ",", "y", ",", "Coordinate", ".", "NULL_ORDINATE", ")", ";", "}" ]
Constructs POINT from two doubles. @param x X-coordinate @param y Y-coordinate @return The POINT constructed from the given coordinatesk @throws java.sql.SQLException
[ "Constructs", "POINT", "from", "two", "doubles", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/ST_MakePoint.java#L56-L58
phax/ph-css
ph-css/src/main/java/com/helger/css/tools/MediaQueryTools.java
MediaQueryTools.getWrappedInMediaQuery
@Nullable public static CascadingStyleSheet getWrappedInMediaQuery (@Nonnull final CascadingStyleSheet aCSS, @Nonnull final CSSMediaQuery aMediaQuery, final boolean bAllowNestedMediaQueries) { "...
java
@Nullable public static CascadingStyleSheet getWrappedInMediaQuery (@Nonnull final CascadingStyleSheet aCSS, @Nonnull final CSSMediaQuery aMediaQuery, final boolean bAllowNestedMediaQueries) { ...
[ "@", "Nullable", "public", "static", "CascadingStyleSheet", "getWrappedInMediaQuery", "(", "@", "Nonnull", "final", "CascadingStyleSheet", "aCSS", ",", "@", "Nonnull", "final", "CSSMediaQuery", "aMediaQuery", ",", "final", "boolean", "bAllowNestedMediaQueries", ")", "{"...
Get the CSS wrapped in the specified media query. Note: all existing rule objects are reused, so modifying them also modifies the original CSS! @param aCSS The CSS to be wrapped. May not be <code>null</code>. @param aMediaQuery The media query to use. @param bAllowNestedMediaQueries if <code>true</code> nested media q...
[ "Get", "the", "CSS", "wrapped", "in", "the", "specified", "media", "query", ".", "Note", ":", "all", "existing", "rule", "objects", "are", "reused", "so", "modifying", "them", "also", "modifies", "the", "original", "CSS!" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/tools/MediaQueryTools.java#L118-L124
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newUserException
public static UserException newUserException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link UserException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identi...
java
public static UserException newUserException(Throwable cause, String message, Object... args) { return new UserException(format(message, args), cause); }
[ "public", "static", "UserException", "newUserException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "UserException", "(", "format", "(", "message", ",", "args", ")", ",", "cause", ")", ";", ...
Constructs and initializes a new {@link UserException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link UserException} was thrown. @param message {@link String} describing the {@lin...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "UserException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L943-L945
camunda/camunda-spin
dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java
DomXmlEnsure.ensureXPathNotEmpty
public static void ensureXPathNotEmpty(NodeList nodeList, String expression) { """ Ensure that the nodeList is either null or empty. @param nodeList the nodeList to ensure to be either null or empty @param expression the expression was used to fine the nodeList @throws SpinXPathException if the nodeList is ei...
java
public static void ensureXPathNotEmpty(NodeList nodeList, String expression) { if (nodeList == null || nodeList.getLength() == 0) { throw LOG.unableToFindXPathExpression(expression); } }
[ "public", "static", "void", "ensureXPathNotEmpty", "(", "NodeList", "nodeList", ",", "String", "expression", ")", "{", "if", "(", "nodeList", "==", "null", "||", "nodeList", ".", "getLength", "(", ")", "==", "0", ")", "{", "throw", "LOG", ".", "unableToFin...
Ensure that the nodeList is either null or empty. @param nodeList the nodeList to ensure to be either null or empty @param expression the expression was used to fine the nodeList @throws SpinXPathException if the nodeList is either null or empty
[ "Ensure", "that", "the", "nodeList", "is", "either", "null", "or", "empty", "." ]
train
https://github.com/camunda/camunda-spin/blob/cfe65161eb97fd5023a945cb97c47fbfe69e9fdd/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java#L85-L89
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/ComputationGraph.java
ComputationGraph.rnnSetPreviousState
public void rnnSetPreviousState(String layerName, Map<String, INDArray> state) { """ Set the state of the RNN layer, for use in {@link #rnnTimeStep(INDArray...)} @param layerName The name of the layer. @param state The state to set the specified layer to """ Layer l = verticesMap.get(layerName)...
java
public void rnnSetPreviousState(String layerName, Map<String, INDArray> state) { Layer l = verticesMap.get(layerName).getLayer(); if(l instanceof org.deeplearning4j.nn.layers.wrapper.BaseWrapperLayer){ l = ((org.deeplearning4j.nn.layers.wrapper.BaseWrapperLayer)l).getUnderlying(); } ...
[ "public", "void", "rnnSetPreviousState", "(", "String", "layerName", ",", "Map", "<", "String", ",", "INDArray", ">", "state", ")", "{", "Layer", "l", "=", "verticesMap", ".", "get", "(", "layerName", ")", ".", "getLayer", "(", ")", ";", "if", "(", "l"...
Set the state of the RNN layer, for use in {@link #rnnTimeStep(INDArray...)} @param layerName The name of the layer. @param state The state to set the specified layer to
[ "Set", "the", "state", "of", "the", "RNN", "layer", "for", "use", "in", "{", "@link", "#rnnTimeStep", "(", "INDArray", "...", ")", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/ComputationGraph.java#L3515-L3525
zaproxy/zaproxy
src/org/zaproxy/zap/extension/ascan/PolicyAllCategoryPanel.java
PolicyAllCategoryPanel.hasSameStatus
private boolean hasSameStatus(Plugin scanner, String status) { """ Tells whether or not the given {@code scanner} has the given {@code status}. <p> If the given {@code status} represents all statuses it returns always {@code true}. @param scanner the scanner that will be checked @param status the status to c...
java
private boolean hasSameStatus(Plugin scanner, String status) { if (status.equals(Constant.messages.getString("ascan.policy.table.quality.all"))) { return true; } return status.equals(View.getSingleton().getStatusUI(scanner.getStatus()).toString()); }
[ "private", "boolean", "hasSameStatus", "(", "Plugin", "scanner", ",", "String", "status", ")", "{", "if", "(", "status", ".", "equals", "(", "Constant", ".", "messages", ".", "getString", "(", "\"ascan.policy.table.quality.all\"", ")", ")", ")", "{", "return",...
Tells whether or not the given {@code scanner} has the given {@code status}. <p> If the given {@code status} represents all statuses it returns always {@code true}. @param scanner the scanner that will be checked @param status the status to check @return {@code true} if it has the same status, {@code false} otherwise....
[ "Tells", "whether", "or", "not", "the", "given", "{", "@code", "scanner", "}", "has", "the", "given", "{", "@code", "status", "}", ".", "<p", ">", "If", "the", "given", "{", "@code", "status", "}", "represents", "all", "statuses", "it", "returns", "alw...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/ascan/PolicyAllCategoryPanel.java#L333-L338
tvesalainen/util
util/src/main/java/org/vesalainen/util/AbstractStateMachine.java
AbstractStateMachine.addState
public void addState(String name, Runnable enter) { """ Creates named state with functional interface. @param name @param enter Called when state is entered. """ addState(name, (S) new AdhocState(name, enter, null, null)); }
java
public void addState(String name, Runnable enter) { addState(name, (S) new AdhocState(name, enter, null, null)); }
[ "public", "void", "addState", "(", "String", "name", ",", "Runnable", "enter", ")", "{", "addState", "(", "name", ",", "(", "S", ")", "new", "AdhocState", "(", "name", ",", "enter", ",", "null", ",", "null", ")", ")", ";", "}" ]
Creates named state with functional interface. @param name @param enter Called when state is entered.
[ "Creates", "named", "state", "with", "functional", "interface", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/AbstractStateMachine.java#L69-L72
facebookarchive/hadoop-20
src/core/org/apache/hadoop/filecache/DistributedCache.java
DistributedCache.addCacheFile
public static void addCacheFile(URI uri, Configuration conf) { """ Add a file to be localized to the conf @param uri The uri of the cache to be localized @param conf Configuration to add the cache to """ String files = conf.get("mapred.cache.files"); conf.set("mapred.cache.files", files == null ? uri...
java
public static void addCacheFile(URI uri, Configuration conf) { String files = conf.get("mapred.cache.files"); conf.set("mapred.cache.files", files == null ? uri.toString() : files + "," + uri.toString()); }
[ "public", "static", "void", "addCacheFile", "(", "URI", "uri", ",", "Configuration", "conf", ")", "{", "String", "files", "=", "conf", ".", "get", "(", "\"mapred.cache.files\"", ")", ";", "conf", ".", "set", "(", "\"mapred.cache.files\"", ",", "files", "==",...
Add a file to be localized to the conf @param uri The uri of the cache to be localized @param conf Configuration to add the cache to
[ "Add", "a", "file", "to", "be", "localized", "to", "the", "conf" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/filecache/DistributedCache.java#L945-L949
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java
LogicalZipFile.keyMatchesAtPosition
private static boolean keyMatchesAtPosition(final byte[] manifest, final byte[] key, final int pos) { """ Key matches at position. @param manifest the manifest @param key the key @param pos the position to try matching @return true if the key matches at this position """ if (pos + key.length +...
java
private static boolean keyMatchesAtPosition(final byte[] manifest, final byte[] key, final int pos) { if (pos + key.length + 1 > manifest.length || manifest[pos + key.length] != ':') { return false; } for (int i = 0; i < key.length; i++) { // Manifest keys are case insens...
[ "private", "static", "boolean", "keyMatchesAtPosition", "(", "final", "byte", "[", "]", "manifest", ",", "final", "byte", "[", "]", "key", ",", "final", "int", "pos", ")", "{", "if", "(", "pos", "+", "key", ".", "length", "+", "1", ">", "manifest", "...
Key matches at position. @param manifest the manifest @param key the key @param pos the position to try matching @return true if the key matches at this position
[ "Key", "matches", "at", "position", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java#L259-L270
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE
public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE(String billingAccount, String serviceName, Long dialplanId) throws IOException { """ Delete the given dialplan REST: DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId} @param billingAccount [required] The name...
java
public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE(String billingAccount, String serviceName, Long dialplanId) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}"; StringBuilder sb = path(qPath, billingAccount, serviceName, dialplanId)...
[ "public", "void", "billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "dialplanId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/ovhPabx/{servic...
Delete the given dialplan REST: DELETE /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param dialplanId [required]
[ "Delete", "the", "given", "dialplan" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7401-L7405
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.listFromTaskWithServiceResponseAsync
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders>> listFromTaskWithServiceResponseAsync(final String jobId, final String taskId) { """ Lists the files in a task's directory on its compute node. @param jobId The ID of the job that contains the task. @param taskId The ID of th...
java
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders>> listFromTaskWithServiceResponseAsync(final String jobId, final String taskId) { return listFromTaskSinglePageAsync(jobId, taskId) .concatMap(new Func1<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTas...
[ "public", "Observable", "<", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeFile", ">", ",", "FileListFromTaskHeaders", ">", ">", "listFromTaskWithServiceResponseAsync", "(", "final", "String", "jobId", ",", "final", "String", "taskId", ")", "{", "return", "li...
Lists the files in a task's directory on its compute node. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose files you want to list. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;NodeFile&gt; object
[ "Lists", "the", "files", "in", "a", "task", "s", "directory", "on", "its", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L1662-L1674
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java
ChangesHolder.writeField
private static void writeField(ObjectOutput out, Fieldable field) throws IOException { """ Serialize the Field into the given {@link ObjectOutput} @param out the stream in which we serialize the Field @param field the Field instance to serialize @throws IOException if the Field could not be serialized """ ...
java
private static void writeField(ObjectOutput out, Fieldable field) throws IOException { // Name out.writeUTF(field.name()); // Flags writeFlags(out, field); if (field.getBoost() != 1.0f) { // Boost out.writeFloat(field.getBoost()); } // Value wri...
[ "private", "static", "void", "writeField", "(", "ObjectOutput", "out", ",", "Fieldable", "field", ")", "throws", "IOException", "{", "// Name", "out", ".", "writeUTF", "(", "field", ".", "name", "(", ")", ")", ";", "// Flags", "writeFlags", "(", "out", ","...
Serialize the Field into the given {@link ObjectOutput} @param out the stream in which we serialize the Field @param field the Field instance to serialize @throws IOException if the Field could not be serialized
[ "Serialize", "the", "Field", "into", "the", "given", "{" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/ChangesHolder.java#L301-L314
google/j2objc
jre_emul/android/frameworks/base/core/java/android/text/Selection.java
Selection.setSelection
public static void setSelection(Spannable text, int start, int stop) { """ Set the selection anchor to <code>start</code> and the selection edge to <code>stop</code>. """ // int len = text.length(); // start = pin(start, 0, len); XXX remove unless we really need it // stop = pin(stop,...
java
public static void setSelection(Spannable text, int start, int stop) { // int len = text.length(); // start = pin(start, 0, len); XXX remove unless we really need it // stop = pin(stop, 0, len); int ostart = getSelectionStart(text); int oend = getSelectionEnd(text); if...
[ "public", "static", "void", "setSelection", "(", "Spannable", "text", ",", "int", "start", ",", "int", "stop", ")", "{", "// int len = text.length();", "// start = pin(start, 0, len); XXX remove unless we really need it", "// stop = pin(stop, 0, len);", "int", "ostart", "=",...
Set the selection anchor to <code>start</code> and the selection edge to <code>stop</code>.
[ "Set", "the", "selection", "anchor", "to", "<code", ">", "start<", "/", "code", ">", "and", "the", "selection", "edge", "to", "<code", ">", "stop<", "/", "code", ">", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/Selection.java#L65-L79
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/transform/ui/HtmlAnalysis.java
HtmlAnalysis.createHtmlAnalysisFile
public static void createHtmlAnalysisFile(DataAnalysis dataAnalysis, File output) throws Exception { """ Render a data analysis object as a HTML file. This will produce a summary table, along charts for numerical columns @param dataAnalysis Data analysis object to render @param output Output file (shoul...
java
public static void createHtmlAnalysisFile(DataAnalysis dataAnalysis, File output) throws Exception { String str = createHtmlAnalysisString(dataAnalysis); FileUtils.writeStringToFile(output, str, StandardCharsets.UTF_8); }
[ "public", "static", "void", "createHtmlAnalysisFile", "(", "DataAnalysis", "dataAnalysis", ",", "File", "output", ")", "throws", "Exception", "{", "String", "str", "=", "createHtmlAnalysisString", "(", "dataAnalysis", ")", ";", "FileUtils", ".", "writeStringToFile", ...
Render a data analysis object as a HTML file. This will produce a summary table, along charts for numerical columns @param dataAnalysis Data analysis object to render @param output Output file (should have extension .html)
[ "Render", "a", "data", "analysis", "object", "as", "a", "HTML", "file", ".", "This", "will", "produce", "a", "summary", "table", "along", "charts", "for", "numerical", "columns" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/transform/ui/HtmlAnalysis.java#L234-L239
shrinkwrap/descriptors
metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/Metadata.java
Metadata.addEnumValue
public void addEnumValue(final String enumName, final String enumValue) { """ Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new enumeration class will be created. @param enumName the enumeration class name. @param enumValue the new enumeration value. ...
java
public void addEnumValue(final String enumName, final String enumValue) { for (MetadataEnum instance : enumList) { if (instance.getName().equals(enumName) && instance.getNamespace().equals(getCurrentNamespace())) { instance.addValue(enumValue); return; } ...
[ "public", "void", "addEnumValue", "(", "final", "String", "enumName", ",", "final", "String", "enumValue", ")", "{", "for", "(", "MetadataEnum", "instance", ":", "enumList", ")", "{", "if", "(", "instance", ".", "getName", "(", ")", ".", "equals", "(", "...
Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new enumeration class will be created. @param enumName the enumeration class name. @param enumValue the new enumeration value.
[ "Adds", "a", "enumeration", "value", "to", "the", "specified", "enumeration", "name", ".", "If", "no", "enumeration", "class", "is", "found", "then", "a", "new", "enumeration", "class", "will", "be", "created", "." ]
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/Metadata.java#L118-L132
alkacon/opencms-core
src/org/opencms/security/CmsOrgUnitManager.java
CmsOrgUnitManager.setUsersOrganizationalUnit
public void setUsersOrganizationalUnit(CmsObject cms, String ouFqn, String userName) throws CmsException { """ Moves an user to the given organizational unit.<p> @param cms the opencms context @param ouFqn the full qualified name of the organizational unit to add the user to @param userName the name of the us...
java
public void setUsersOrganizationalUnit(CmsObject cms, String ouFqn, String userName) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); CmsUser user = cms.readUser(userName); m_securityManager.setUsersOrganizationalUnit(cms.getRequestContext(), orgUnit, us...
[ "public", "void", "setUsersOrganizationalUnit", "(", "CmsObject", "cms", ",", "String", "ouFqn", ",", "String", "userName", ")", "throws", "CmsException", "{", "CmsOrganizationalUnit", "orgUnit", "=", "readOrganizationalUnit", "(", "cms", ",", "ouFqn", ")", ";", "...
Moves an user to the given organizational unit.<p> @param cms the opencms context @param ouFqn the full qualified name of the organizational unit to add the user to @param userName the name of the user that is to be added to the organizational unit @throws CmsException if something goes wrong
[ "Moves", "an", "user", "to", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsOrgUnitManager.java#L356-L361
craftercms/core
src/main/java/org/craftercms/core/cache/impl/CacheRefresherImpl.java
CacheRefresherImpl.refreshItems
public void refreshItems(List<CacheItem> itemsToRefresh, Cache cache) { """ Refreshes the specified list of {@link org.craftercms.core.cache.CacheItem}s. """ for (CacheItem item : itemsToRefresh) { try { refreshItem(item, cache); } catch (Exception ex) { ...
java
public void refreshItems(List<CacheItem> itemsToRefresh, Cache cache) { for (CacheItem item : itemsToRefresh) { try { refreshItem(item, cache); } catch (Exception ex) { logger.error("Refresh for " + getScopeAndKeyString(item) + " failed", ex); ...
[ "public", "void", "refreshItems", "(", "List", "<", "CacheItem", ">", "itemsToRefresh", ",", "Cache", "cache", ")", "{", "for", "(", "CacheItem", "item", ":", "itemsToRefresh", ")", "{", "try", "{", "refreshItem", "(", "item", ",", "cache", ")", ";", "}"...
Refreshes the specified list of {@link org.craftercms.core.cache.CacheItem}s.
[ "Refreshes", "the", "specified", "list", "of", "{" ]
train
https://github.com/craftercms/core/blob/d3ec74d669d3f8cfcf995177615d5f126edfa237/src/main/java/org/craftercms/core/cache/impl/CacheRefresherImpl.java#L40-L48
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/MatcherLibrary.java
MatcherLibrary.getRelationFromStringMatchers
private char getRelationFromStringMatchers(String sourceLabel, String targetLabel) { """ Returns semantic relation holding between two labels as computed by string based matchers. @param sourceLabel the string of the source label @param targetLabel the string of the target label @return semantic relation hold...
java
private char getRelationFromStringMatchers(String sourceLabel, String targetLabel) { char relation = IMappingElement.IDK; int i = 0; while ((relation == IMappingElement.IDK) && (i < stringMatchers.size())) { relation = stringMatchers.get(i).match(sourceLabel, targetLabel); ...
[ "private", "char", "getRelationFromStringMatchers", "(", "String", "sourceLabel", ",", "String", "targetLabel", ")", "{", "char", "relation", "=", "IMappingElement", ".", "IDK", ";", "int", "i", "=", "0", ";", "while", "(", "(", "relation", "==", "IMappingElem...
Returns semantic relation holding between two labels as computed by string based matchers. @param sourceLabel the string of the source label @param targetLabel the string of the target label @return semantic relation holding between two labels as computed by string based matchers
[ "Returns", "semantic", "relation", "holding", "between", "two", "labels", "as", "computed", "by", "string", "based", "matchers", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/MatcherLibrary.java#L210-L218
elki-project/elki
elki-itemsets/src/main/java/de/lmu/ifi/dbs/elki/algorithm/itemsetmining/Itemset.java
Itemset.appendItemsTo
public StringBuilder appendItemsTo(StringBuilder buf, VectorFieldTypeInformation<BitVector> meta) { """ Only append the items to a string buffer. @param buf Buffer @param meta Relation metadata (for labels) @return String buffer for chaining. """ int it = this.iter(); if(this.iterValid(it)) { ...
java
public StringBuilder appendItemsTo(StringBuilder buf, VectorFieldTypeInformation<BitVector> meta) { int it = this.iter(); if(this.iterValid(it)) { while(true) { int v = this.iterDim(it); String lbl = (meta != null) ? meta.getLabel(v) : null; if(lbl == null) { buf.append(v...
[ "public", "StringBuilder", "appendItemsTo", "(", "StringBuilder", "buf", ",", "VectorFieldTypeInformation", "<", "BitVector", ">", "meta", ")", "{", "int", "it", "=", "this", ".", "iter", "(", ")", ";", "if", "(", "this", ".", "iterValid", "(", "it", ")", ...
Only append the items to a string buffer. @param buf Buffer @param meta Relation metadata (for labels) @return String buffer for chaining.
[ "Only", "append", "the", "items", "to", "a", "string", "buffer", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-itemsets/src/main/java/de/lmu/ifi/dbs/elki/algorithm/itemsetmining/Itemset.java#L235-L255
cdk/cdk
base/silent/src/main/java/org/openscience/cdk/silent/Bond.java
Bond.setAtom
@Override public void setAtom(IAtom atom, int position) { """ Sets an Atom in this bond. @param atom The atom to be set @param position The position in this bond where the atom is to be inserted @see #getAtom """ if (atoms[position] == null && atom != null) atomCount++; if (atoms[p...
java
@Override public void setAtom(IAtom atom, int position) { if (atoms[position] == null && atom != null) atomCount++; if (atoms[position] != null && atom == null) atomCount--; atoms[position] = atom; }
[ "@", "Override", "public", "void", "setAtom", "(", "IAtom", "atom", ",", "int", "position", ")", "{", "if", "(", "atoms", "[", "position", "]", "==", "null", "&&", "atom", "!=", "null", ")", "atomCount", "++", ";", "if", "(", "atoms", "[", "position"...
Sets an Atom in this bond. @param atom The atom to be set @param position The position in this bond where the atom is to be inserted @see #getAtom
[ "Sets", "an", "Atom", "in", "this", "bond", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/silent/src/main/java/org/openscience/cdk/silent/Bond.java#L325-L330
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/jackson/JacksonConfiguration.java
JacksonConfiguration.setGenerator
public void setGenerator(Map<JsonGenerator.Feature, Boolean> generator) { """ Sets the generator features to use. @param generator The generator features """ if (CollectionUtils.isNotEmpty(generator)) { this.generator = generator; } }
java
public void setGenerator(Map<JsonGenerator.Feature, Boolean> generator) { if (CollectionUtils.isNotEmpty(generator)) { this.generator = generator; } }
[ "public", "void", "setGenerator", "(", "Map", "<", "JsonGenerator", ".", "Feature", ",", "Boolean", ">", "generator", ")", "{", "if", "(", "CollectionUtils", ".", "isNotEmpty", "(", "generator", ")", ")", "{", "this", ".", "generator", "=", "generator", ";...
Sets the generator features to use. @param generator The generator features
[ "Sets", "the", "generator", "features", "to", "use", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/jackson/JacksonConfiguration.java#L275-L279
hal/core
gui/src/main/java/org/jboss/as/console/rebind/ProductConfigGenerator.java
ProductConfigGenerator.generateClass
private void generateClass(TreeLogger logger, GeneratorContext context) throws Throwable { """ Generate source code for new class. Class extends <code>HashMap</code>. @param logger Logger object @param context Generator context """ // get print writer that receives the source code PrintW...
java
private void generateClass(TreeLogger logger, GeneratorContext context) throws Throwable { // get print writer that receives the source code PrintWriter printWriter = context.tryCreate(logger, packageName, className); // print writer if null, source code has ALREADY been generated, return ...
[ "private", "void", "generateClass", "(", "TreeLogger", "logger", ",", "GeneratorContext", "context", ")", "throws", "Throwable", "{", "// get print writer that receives the source code", "PrintWriter", "printWriter", "=", "context", ".", "tryCreate", "(", "logger", ",", ...
Generate source code for new class. Class extends <code>HashMap</code>. @param logger Logger object @param context Generator context
[ "Generate", "source", "code", "for", "new", "class", ".", "Class", "extends", "<code", ">", "HashMap<", "/", "code", ">", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/rebind/ProductConfigGenerator.java#L85-L121
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java
GeneralizedParetoDistribution.logpdf
public static double logpdf(double x, double mu, double sigma, double xi) { """ PDF of GPD distribution @param x Value @param mu Location parameter mu @param sigma Scale parameter sigma @param xi Shape parameter xi (= -kappa) @return PDF at position x. """ x = (x - mu) / sigma; // Check support:...
java
public static double logpdf(double x, double mu, double sigma, double xi) { x = (x - mu) / sigma; // Check support: if(x < 0 || (xi < 0 && x > -1. / xi)) { return Double.NEGATIVE_INFINITY; } if(xi == 0) { return Double.POSITIVE_INFINITY; } return ((xi == -1) ? 0. : FastMath.log(1...
[ "public", "static", "double", "logpdf", "(", "double", "x", ",", "double", "mu", ",", "double", "sigma", ",", "double", "xi", ")", "{", "x", "=", "(", "x", "-", "mu", ")", "/", "sigma", ";", "// Check support:", "if", "(", "x", "<", "0", "||", "(...
PDF of GPD distribution @param x Value @param mu Location parameter mu @param sigma Scale parameter sigma @param xi Shape parameter xi (= -kappa) @return PDF at position x.
[ "PDF", "of", "GPD", "distribution" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/GeneralizedParetoDistribution.java#L143-L153
agmip/agmip-common-functions
src/main/java/org/agmip/translators/soil/WaterReserveCriteria.java
WaterReserveCriteria.shouldAggregateSoils
public boolean shouldAggregateSoils(HashMap<String, String> currentSoil, HashMap<String, String> previousSoil) { """ Criteria for merging soils ru is the maximum available water reserve (reserve utile) sdul is the field capacity slll is the wilting point (point de fletrissement permanent) slbdm is the bulk densi...
java
public boolean shouldAggregateSoils(HashMap<String, String> currentSoil, HashMap<String, String> previousSoil) { float ruCurrent; float ruPrevious; float resultFirstRule; float resultSecRule; boolean firstRule; boolean secRule; // ru in mm/m ruCurrent = (parseFloat(currentSoil.get(SLDUL)) - parseFloat(...
[ "public", "boolean", "shouldAggregateSoils", "(", "HashMap", "<", "String", ",", "String", ">", "currentSoil", ",", "HashMap", "<", "String", ",", "String", ">", "previousSoil", ")", "{", "float", "ruCurrent", ";", "float", "ruPrevious", ";", "float", "resultF...
Criteria for merging soils ru is the maximum available water reserve (reserve utile) sdul is the field capacity slll is the wilting point (point de fletrissement permanent) slbdm is the bulk density @param currentSoil @param previousSoil @return
[ "Criteria", "for", "merging", "soils", "ru", "is", "the", "maximum", "available", "water", "reserve", "(", "reserve", "utile", ")", "sdul", "is", "the", "field", "capacity", "slll", "is", "the", "wilting", "point", "(", "point", "de", "fletrissement", "perma...
train
https://github.com/agmip/agmip-common-functions/blob/4efa3042178841b026ca6fba9c96da02fbfb9a8e/src/main/java/org/agmip/translators/soil/WaterReserveCriteria.java#L62-L92
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ConnectionDescriptorImpl.java
ConnectionDescriptorImpl.setAddrs
public void setAddrs(InetAddress _remote, InetAddress _local) { """ Set the address information based on the input InetAddress objects. @param _remote @param _local """ this.addrRemote = _remote; this.addrLocal = _local; this.remoteHostName = null; this.remoteHostAddress = n...
java
public void setAddrs(InetAddress _remote, InetAddress _local) { this.addrRemote = _remote; this.addrLocal = _local; this.remoteHostName = null; this.remoteHostAddress = null; this.localHostName = null; this.localHostAddress = null; }
[ "public", "void", "setAddrs", "(", "InetAddress", "_remote", ",", "InetAddress", "_local", ")", "{", "this", ".", "addrRemote", "=", "_remote", ";", "this", ".", "addrLocal", "=", "_local", ";", "this", ".", "remoteHostName", "=", "null", ";", "this", ".",...
Set the address information based on the input InetAddress objects. @param _remote @param _local
[ "Set", "the", "address", "information", "based", "on", "the", "input", "InetAddress", "objects", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ConnectionDescriptorImpl.java#L155-L162
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/ReflectionUtil.java
ReflectionUtil.matchesParameters
@Pure @Inline(value = "ReflectionUtil.matchesParameters(($1).getParameterTypes(), ($2))", imported = { """ Replies if the parameters of the given method are matching the given values. @param method the method that contains the types. @param parameters the objects associated to the paramters. @return <code>tr...
java
@Pure @Inline(value = "ReflectionUtil.matchesParameters(($1).getParameterTypes(), ($2))", imported = {ReflectionUtil.class}) public static boolean matchesParameters(Method method, Object... parameters) { return matchesParameters(method.getParameterTypes(), parameters); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"ReflectionUtil.matchesParameters(($1).getParameterTypes(), ($2))\"", ",", "imported", "=", "{", "ReflectionUtil", ".", "class", "}", ")", "public", "static", "boolean", "matchesParameters", "(", "Method", "method", ","...
Replies if the parameters of the given method are matching the given values. @param method the method that contains the types. @param parameters the objects associated to the paramters. @return <code>true</code> if the values could be passed to the method. @since 7.1
[ "Replies", "if", "the", "parameters", "of", "the", "given", "method", "are", "matching", "the", "given", "values", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/ReflectionUtil.java#L827-L831
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.POST
public Optional<Response> POST(String partialUrl, Object payload) { """ Execute a POST call against the partial URL. @param partialUrl The partial URL to build @param payload The object to use for the POST @return The response to the POST """ URI uri = buildUri(partialUrl); return exe...
java
public Optional<Response> POST(String partialUrl, Object payload) { URI uri = buildUri(partialUrl); return executePostRequest(uri, payload); }
[ "public", "Optional", "<", "Response", ">", "POST", "(", "String", "partialUrl", ",", "Object", "payload", ")", "{", "URI", "uri", "=", "buildUri", "(", "partialUrl", ")", ";", "return", "executePostRequest", "(", "uri", ",", "payload", ")", ";", "}" ]
Execute a POST call against the partial URL. @param partialUrl The partial URL to build @param payload The object to use for the POST @return The response to the POST
[ "Execute", "a", "POST", "call", "against", "the", "partial", "URL", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L193-L197
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLReplacerListenerImpl.java
JQLReplacerListenerImpl.resolveFullyQualifiedColumnName
public static String resolveFullyQualifiedColumnName(SQLiteDatabaseSchema schema, SQLiteModelMethod method, String className, String columnName) { """ given a fully qualified property name, it will be transformed in associated column name. If class or property does not exist, an exception will be thrown @para...
java
public static String resolveFullyQualifiedColumnName(SQLiteDatabaseSchema schema, SQLiteModelMethod method, String className, String columnName) { Finder<SQLProperty> currentEntity = method.getEntity(); if (StringUtils.hasText(className)) { currentEntity = schema.getEntityBySimpleName(className); AssertKripto...
[ "public", "static", "String", "resolveFullyQualifiedColumnName", "(", "SQLiteDatabaseSchema", "schema", ",", "SQLiteModelMethod", "method", ",", "String", "className", ",", "String", "columnName", ")", "{", "Finder", "<", "SQLProperty", ">", "currentEntity", "=", "met...
given a fully qualified property name, it will be transformed in associated column name. If class or property does not exist, an exception will be thrown @param schema the schema @param method the method @param className the class name @param columnName the property name @return resolved name ex: "person.birth_date"
[ "given", "a", "fully", "qualified", "property", "name", "it", "will", "be", "transformed", "in", "associated", "column", "name", ".", "If", "class", "or", "property", "does", "not", "exist", "an", "exception", "will", "be", "thrown" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLReplacerListenerImpl.java#L268-L279
looly/hutool
hutool-core/src/main/java/cn/hutool/core/net/NetUtil.java
NetUtil.getUsableLocalPorts
public static TreeSet<Integer> getUsableLocalPorts(int numRequested, int minPort, int maxPort) { """ 获取多个本地可用端口<br> 来自org.springframework.util.SocketUtils @param minPort 端口最小值(包含) @param maxPort 端口最大值(包含) @return 可用的端口 @since 4.5.4 """ final TreeSet<Integer> availablePorts = new TreeSet<>(); int a...
java
public static TreeSet<Integer> getUsableLocalPorts(int numRequested, int minPort, int maxPort) { final TreeSet<Integer> availablePorts = new TreeSet<>(); int attemptCount = 0; while ((++attemptCount <= numRequested + 100) && availablePorts.size() < numRequested) { availablePorts.add(getUsableLocalPort(minP...
[ "public", "static", "TreeSet", "<", "Integer", ">", "getUsableLocalPorts", "(", "int", "numRequested", ",", "int", "minPort", ",", "int", "maxPort", ")", "{", "final", "TreeSet", "<", "Integer", ">", "availablePorts", "=", "new", "TreeSet", "<>", "(", ")", ...
获取多个本地可用端口<br> 来自org.springframework.util.SocketUtils @param minPort 端口最小值(包含) @param maxPort 端口最大值(包含) @return 可用的端口 @since 4.5.4
[ "获取多个本地可用端口<br", ">", "来自org", ".", "springframework", ".", "util", ".", "SocketUtils" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/net/NetUtil.java#L176-L188
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/xml/XMLElement.java
XMLElement.getAttribute
public String getAttribute(String name, String def) { """ Get the value specified for a given attribute on this element @param name The name of the attribute whose value should be retrieved @param def The default value to return if the attribute is specified @return The value given for the attribute """ ...
java
public String getAttribute(String name, String def) { String value = dom.getAttribute(name); if ((value == null) || (value.length() == 0)) { return def; } return value; }
[ "public", "String", "getAttribute", "(", "String", "name", ",", "String", "def", ")", "{", "String", "value", "=", "dom", ".", "getAttribute", "(", "name", ")", ";", "if", "(", "(", "value", "==", "null", ")", "||", "(", "value", ".", "length", "(", ...
Get the value specified for a given attribute on this element @param name The name of the attribute whose value should be retrieved @param def The default value to return if the attribute is specified @return The value given for the attribute
[ "Get", "the", "value", "specified", "for", "a", "given", "attribute", "on", "this", "element" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/xml/XMLElement.java#L75-L82
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/LiteCoreException.java
LiteCoreException.throwException
public static void throwException(int domain, int code, String msg) throws LiteCoreException { """ NOTE called to throw LiteCoreException from native code to Java """ throw new LiteCoreException(domain, code, msg); }
java
public static void throwException(int domain, int code, String msg) throws LiteCoreException { throw new LiteCoreException(domain, code, msg); }
[ "public", "static", "void", "throwException", "(", "int", "domain", ",", "int", "code", ",", "String", "msg", ")", "throws", "LiteCoreException", "{", "throw", "new", "LiteCoreException", "(", "domain", ",", "code", ",", "msg", ")", ";", "}" ]
NOTE called to throw LiteCoreException from native code to Java
[ "NOTE", "called", "to", "throw", "LiteCoreException", "from", "native", "code", "to", "Java" ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/LiteCoreException.java#L25-L27
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/http/Authentication.java
Authentication.setAccessToken
public void setAccessToken(String accessToken, String tokenType) throws HelloSignException { """ Sets the access token for the HelloSign client authentication. @param accessToken String @param tokenType String @throws HelloSignException if either the accessToken or tokenType are null """ if (acce...
java
public void setAccessToken(String accessToken, String tokenType) throws HelloSignException { if (accessToken == null) { throw new HelloSignException("Access Token cannot be null"); } if (tokenType == null) { throw new HelloSignException("Token Type cannot be null"); ...
[ "public", "void", "setAccessToken", "(", "String", "accessToken", ",", "String", "tokenType", ")", "throws", "HelloSignException", "{", "if", "(", "accessToken", "==", "null", ")", "{", "throw", "new", "HelloSignException", "(", "\"Access Token cannot be null\"", ")...
Sets the access token for the HelloSign client authentication. @param accessToken String @param tokenType String @throws HelloSignException if either the accessToken or tokenType are null
[ "Sets", "the", "access", "token", "for", "the", "HelloSign", "client", "authentication", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/http/Authentication.java#L125-L134
powermock/powermock
powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java
SuppressCode.suppressMethod
public static synchronized void suppressMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { """ Suppress a specific method call. Use this for overloaded methods. """ Method method = null; if (parameterTypes.length > 0) { method = Whitebox.getMethod(clazz, methodName, parameterTypes); ...
java
public static synchronized void suppressMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { Method method = null; if (parameterTypes.length > 0) { method = Whitebox.getMethod(clazz, methodName, parameterTypes); } else { method = WhiteboxImpl.findMethodOrThrowException(clazz, methodName, p...
[ "public", "static", "synchronized", "void", "suppressMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "{", "Method", "method", "=", "null", ";", "if", "(", "paramete...
Suppress a specific method call. Use this for overloaded methods.
[ "Suppress", "a", "specific", "method", "call", ".", "Use", "this", "for", "overloaded", "methods", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java#L235-L243
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java
CheckSumUtils.getChecksum
public static String getChecksum(InputStream is, String algorithm) throws IOException { """ Returns the checksum value of the input stream taking in count the algorithm passed in parameter @param is the input stream @param algorithm the checksum algorithm @return the checksum value @throws IOException if...
java
public static String getChecksum(InputStream is, String algorithm) throws IOException { if (algorithm.equals(JawrConstant.CRC32_ALGORITHM)) { return getCRC32Checksum(is); } else if (algorithm.equals(JawrConstant.MD5_ALGORITHM)) { return getMD5Checksum(is); } else { throw new BundlingProcessException("Th...
[ "public", "static", "String", "getChecksum", "(", "InputStream", "is", ",", "String", "algorithm", ")", "throws", "IOException", "{", "if", "(", "algorithm", ".", "equals", "(", "JawrConstant", ".", "CRC32_ALGORITHM", ")", ")", "{", "return", "getCRC32Checksum",...
Returns the checksum value of the input stream taking in count the algorithm passed in parameter @param is the input stream @param algorithm the checksum algorithm @return the checksum value @throws IOException if an exception occurs.
[ "Returns", "the", "checksum", "value", "of", "the", "input", "stream", "taking", "in", "count", "the", "algorithm", "passed", "in", "parameter" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/CheckSumUtils.java#L140-L150
OpenLiberty/open-liberty
dev/com.ibm.ws.crypto.passwordutil/src/com/ibm/ws/crypto/util/custom/CustomUtils.java
CustomUtils.findCustomEncryption
public static List<CustomManifest> findCustomEncryption(String extension) throws IOException { """ Find the URL of the jar file which includes specified class. If there is none, return empty array. @throws IOException """ List<File> dirs = listRootAndExtensionDirectories(); return findCusto...
java
public static List<CustomManifest> findCustomEncryption(String extension) throws IOException { List<File> dirs = listRootAndExtensionDirectories(); return findCustomEncryption(dirs, TOOL_EXTENSION_DIR + extension); }
[ "public", "static", "List", "<", "CustomManifest", ">", "findCustomEncryption", "(", "String", "extension", ")", "throws", "IOException", "{", "List", "<", "File", ">", "dirs", "=", "listRootAndExtensionDirectories", "(", ")", ";", "return", "findCustomEncryption", ...
Find the URL of the jar file which includes specified class. If there is none, return empty array. @throws IOException
[ "Find", "the", "URL", "of", "the", "jar", "file", "which", "includes", "specified", "class", ".", "If", "there", "is", "none", "return", "empty", "array", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.crypto.passwordutil/src/com/ibm/ws/crypto/util/custom/CustomUtils.java#L176-L179
enioka/jqm
jqm-all/jqm-client/jqm-api-client-core/src/main/java/com/enioka/jqm/api/Query.java
Query.addSortDesc
public Query addSortDesc(Sort column) { """ Adds a new column a the end of the sorting clause. @see #addSortAsc(Sort) """ this.sorts.add(new SortSpec(SortOrder.DESCENDING, column)); return this; }
java
public Query addSortDesc(Sort column) { this.sorts.add(new SortSpec(SortOrder.DESCENDING, column)); return this; }
[ "public", "Query", "addSortDesc", "(", "Sort", "column", ")", "{", "this", ".", "sorts", ".", "add", "(", "new", "SortSpec", "(", "SortOrder", ".", "DESCENDING", ",", "column", ")", ")", ";", "return", "this", ";", "}" ]
Adds a new column a the end of the sorting clause. @see #addSortAsc(Sort)
[ "Adds", "a", "new", "column", "a", "the", "end", "of", "the", "sorting", "clause", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-client/jqm-api-client-core/src/main/java/com/enioka/jqm/api/Query.java#L152-L156
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java
ExecutorManager.isFlowRunning
@Override public boolean isFlowRunning(final int projectId, final String flowId) { """ Checks whether the given flow has an active (running, non-dispatched) executions {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#isFlowRunning(int, java.lang.String) """ boolean isRunning = false; isR...
java
@Override public boolean isFlowRunning(final int projectId, final String flowId) { boolean isRunning = false; isRunning = isRunning || isFlowRunningHelper(projectId, flowId, this.queuedFlows.getAllEntries()); isRunning = isRunning || isFlowRunningHelper(projectId, f...
[ "@", "Override", "public", "boolean", "isFlowRunning", "(", "final", "int", "projectId", ",", "final", "String", "flowId", ")", "{", "boolean", "isRunning", "=", "false", ";", "isRunning", "=", "isRunning", "||", "isFlowRunningHelper", "(", "projectId", ",", "...
Checks whether the given flow has an active (running, non-dispatched) executions {@inheritDoc} @see azkaban.executor.ExecutorManagerAdapter#isFlowRunning(int, java.lang.String)
[ "Checks", "whether", "the", "given", "flow", "has", "an", "active", "(", "running", "non", "-", "dispatched", ")", "executions", "{", "@inheritDoc", "}" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/ExecutorManager.java#L497-L507
wcm-io-caravan/caravan-hal
resource/src/main/java/io/wcm/caravan/hal/resource/util/HalUtil.java
HalUtil.getAllLinks
public static ListMultimap<String, Link> getAllLinks(HalResource hal, Predicate<Pair<String, Link>> predicate) { """ Returns all links in a HAL resource and its embedded resources except CURI links fitting the given predicate. @param hal HAL resource @param predicate Predicate to filter @return Map of Relations...
java
public static ListMultimap<String, Link> getAllLinks(HalResource hal, Predicate<Pair<String, Link>> predicate) { return getAllLinks(hal, "self", predicate); }
[ "public", "static", "ListMultimap", "<", "String", ",", "Link", ">", "getAllLinks", "(", "HalResource", "hal", ",", "Predicate", "<", "Pair", "<", "String", ",", "Link", ">", ">", "predicate", ")", "{", "return", "getAllLinks", "(", "hal", ",", "\"self\"",...
Returns all links in a HAL resource and its embedded resources except CURI links fitting the given predicate. @param hal HAL resource @param predicate Predicate to filter @return Map of Relations and Links
[ "Returns", "all", "links", "in", "a", "HAL", "resource", "and", "its", "embedded", "resources", "except", "CURI", "links", "fitting", "the", "given", "predicate", "." ]
train
https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/resource/src/main/java/io/wcm/caravan/hal/resource/util/HalUtil.java#L62-L64
Bearded-Hen/Android-Bootstrap
AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java
AwesomeTextView.startFlashing
public void startFlashing(boolean forever, AnimationSpeed speed) { """ Starts a Flashing Animation on the AwesomeTextView @param forever whether the animation should be infinite or play once @param speed how fast the item should flash """ Animation fadeIn = new AlphaAnimation(0, 1); //se...
java
public void startFlashing(boolean forever, AnimationSpeed speed) { Animation fadeIn = new AlphaAnimation(0, 1); //set up extra variables fadeIn.setDuration(50); fadeIn.setRepeatMode(Animation.REVERSE); //default repeat count is 0, however if user wants, set it up to be infinite...
[ "public", "void", "startFlashing", "(", "boolean", "forever", ",", "AnimationSpeed", "speed", ")", "{", "Animation", "fadeIn", "=", "new", "AlphaAnimation", "(", "0", ",", "1", ")", ";", "//set up extra variables", "fadeIn", ".", "setDuration", "(", "50", ")",...
Starts a Flashing Animation on the AwesomeTextView @param forever whether the animation should be infinite or play once @param speed how fast the item should flash
[ "Starts", "a", "Flashing", "Animation", "on", "the", "AwesomeTextView" ]
train
https://github.com/Bearded-Hen/Android-Bootstrap/blob/b3d62cc1847e26d420c53c92665a4fe1e6ee7ecf/AndroidBootstrap/src/main/java/com/beardedhen/androidbootstrap/AwesomeTextView.java#L163-L178
Squarespace/cldr
core/src/main/java/com/squarespace/cldr/parse/WrapperPatternParser.java
WrapperPatternParser.parseWrapper
public List<Node> parseWrapper(String raw) { """ Parses a date-time wrapper format, e.g. "{1} at {0}" where 1 is the date and 0 is the time. See CLDR "dateTimeFormats". """ // holds literal text as we parse StringBuilder buf = new StringBuilder(); // indicates we're inside a quote. boolean in...
java
public List<Node> parseWrapper(String raw) { // holds literal text as we parse StringBuilder buf = new StringBuilder(); // indicates we're inside a quote. boolean inquote = false; // indicates we're inside a {x} tag. boolean intag = false; // length of input pattern int length = raw.l...
[ "public", "List", "<", "Node", ">", "parseWrapper", "(", "String", "raw", ")", "{", "// holds literal text as we parse", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "// indicates we're inside a quote.", "boolean", "inquote", "=", "false", ";"...
Parses a date-time wrapper format, e.g. "{1} at {0}" where 1 is the date and 0 is the time. See CLDR "dateTimeFormats".
[ "Parses", "a", "date", "-", "time", "wrapper", "format", "e", ".", "g", ".", "{", "1", "}", "at", "{", "0", "}", "where", "1", "is", "the", "date", "and", "0", "is", "the", "time", ".", "See", "CLDR", "dateTimeFormats", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/core/src/main/java/com/squarespace/cldr/parse/WrapperPatternParser.java#L16-L72
tvesalainen/util
util/src/main/java/org/vesalainen/util/concurrent/PredicateSynchronizer.java
PredicateSynchronizer.waitUntil
public boolean waitUntil(BooleanSupplier predicate, long timeout, TimeUnit unit) throws InterruptedException { """ Waits until predicate is true or after timeout. <p> If predicate is true returns immediately true. <p> If timeout passed returns false <p> If thread is interrupted throws InterruptedException @...
java
public boolean waitUntil(BooleanSupplier predicate, long timeout, TimeUnit unit) throws InterruptedException { if (predicate.getAsBoolean()) { return true; } long deadline = timeout > 0 ? System.currentTimeMillis() + unit.toMillis(timeout) : Long.MAX_VALUE; ...
[ "public", "boolean", "waitUntil", "(", "BooleanSupplier", "predicate", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "if", "(", "predicate", ".", "getAsBoolean", "(", ")", ")", "{", "return", "true", ";", "}", "...
Waits until predicate is true or after timeout. <p> If predicate is true returns immediately true. <p> If timeout passed returns false <p> If thread is interrupted throws InterruptedException @param predicate @param timeout @param unit @return @throws InterruptedException
[ "Waits", "until", "predicate", "is", "true", "or", "after", "timeout", ".", "<p", ">", "If", "predicate", "is", "true", "returns", "immediately", "true", ".", "<p", ">", "If", "timeout", "passed", "returns", "false", "<p", ">", "If", "thread", "is", "int...
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/PredicateSynchronizer.java#L67-L99
nextreports/nextreports-server
src/ro/nextreports/server/api/client/jdbc/Driver.java
Driver.parseURL
public static Properties parseURL(String url, Properties info) { """ Parse the driver URL and extract the properties. @param url the URL to parse @param info any existing properties already loaded in a <code>Properties</code> object @return the URL properties as a <code>Properties</code> object """ if...
java
public static Properties parseURL(String url, Properties info) { if ((url == null) || !url.toLowerCase().startsWith(driverPrefix)) { return null; // throws exception ?! } Properties props = new Properties(info); // take local copy of existing properties Enumeration<?> en = info.property...
[ "public", "static", "Properties", "parseURL", "(", "String", "url", ",", "Properties", "info", ")", "{", "if", "(", "(", "url", "==", "null", ")", "||", "!", "url", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "driverPrefix", ")", ")", "{", ...
Parse the driver URL and extract the properties. @param url the URL to parse @param info any existing properties already loaded in a <code>Properties</code> object @return the URL properties as a <code>Properties</code> object
[ "Parse", "the", "driver", "URL", "and", "extract", "the", "properties", "." ]
train
https://github.com/nextreports/nextreports-server/blob/cfce12f5c6d52cb6a739388d50142c6e2e07c55e/src/ro/nextreports/server/api/client/jdbc/Driver.java#L133-L167
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/operation/PartitionReplicaSyncRequest.java
PartitionReplicaSyncRequest.sendResponse
private void sendResponse(Collection<Operation> operations, ServiceNamespace ns) { """ Send a synchronization response to the caller replica containing the replication operations to be executed """ NodeEngine nodeEngine = getNodeEngine(); PartitionReplicaSyncResponse syncResponse = createRespo...
java
private void sendResponse(Collection<Operation> operations, ServiceNamespace ns) { NodeEngine nodeEngine = getNodeEngine(); PartitionReplicaSyncResponse syncResponse = createResponse(operations, ns); Address target = getCallerAddress(); ILogger logger = getLogger(); if (logger.i...
[ "private", "void", "sendResponse", "(", "Collection", "<", "Operation", ">", "operations", ",", "ServiceNamespace", "ns", ")", "{", "NodeEngine", "nodeEngine", "=", "getNodeEngine", "(", ")", ";", "PartitionReplicaSyncResponse", "syncResponse", "=", "createResponse", ...
Send a synchronization response to the caller replica containing the replication operations to be executed
[ "Send", "a", "synchronization", "response", "to", "the", "caller", "replica", "containing", "the", "replication", "operations", "to", "be", "executed" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/operation/PartitionReplicaSyncRequest.java#L192-L208
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.setOrAppend
public static <T> T[] setOrAppend(T[] buffer, int index, T value) { """ 将元素值设置为数组的某个位置,当给定的index大于数组长度,则追加 @param <T> 数组元素类型 @param buffer 已有数组 @param index 位置,大于长度追加,否则替换 @param value 新值 @return 新数组或原有数组 @since 4.1.2 """ if(index < buffer.length) { Array.set(buffer, index, value); return bu...
java
public static <T> T[] setOrAppend(T[] buffer, int index, T value) { if(index < buffer.length) { Array.set(buffer, index, value); return buffer; }else { return append(buffer, value); } }
[ "public", "static", "<", "T", ">", "T", "[", "]", "setOrAppend", "(", "T", "[", "]", "buffer", ",", "int", "index", ",", "T", "value", ")", "{", "if", "(", "index", "<", "buffer", ".", "length", ")", "{", "Array", ".", "set", "(", "buffer", ","...
将元素值设置为数组的某个位置,当给定的index大于数组长度,则追加 @param <T> 数组元素类型 @param buffer 已有数组 @param index 位置,大于长度追加,否则替换 @param value 新值 @return 新数组或原有数组 @since 4.1.2
[ "将元素值设置为数组的某个位置,当给定的index大于数组长度,则追加" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L417-L424
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/transport/DojoHttpTransport.java
DojoHttpTransport.beforeLayerModule
protected String beforeLayerModule(HttpServletRequest request, ModuleInfo info) { """ Handles {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#BEFORE_FIRST_LAYER_MODULE} and {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#BEFORE_SUBSEQUENT_LAYER_MODULE} layer li...
java
protected String beforeLayerModule(HttpServletRequest request, ModuleInfo info) { String result; String mid = info.getModuleId(); int idx = mid.indexOf("!"); //$NON-NLS-1$ if (info.isScript()) { result = "\"" + (idx == -1 ? mid : mid.substring(idx+1)) + "\":function(){"; //$NON-NLS-1$ //$NON-NLS-2$ }...
[ "protected", "String", "beforeLayerModule", "(", "HttpServletRequest", "request", ",", "ModuleInfo", "info", ")", "{", "String", "result", ";", "String", "mid", "=", "info", ".", "getModuleId", "(", ")", ";", "int", "idx", "=", "mid", ".", "indexOf", "(", ...
Handles {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#BEFORE_FIRST_LAYER_MODULE} and {@link com.ibm.jaggr.core.transport.IHttpTransport.LayerContributionType#BEFORE_SUBSEQUENT_LAYER_MODULE} layer listener events. @param request the http request object @param info the {@link com.ibm.jaggr.cor...
[ "Handles", "{", "@link", "com", ".", "ibm", ".", "jaggr", ".", "core", ".", "transport", ".", "IHttpTransport", ".", "LayerContributionType#BEFORE_FIRST_LAYER_MODULE", "}", "and", "{", "@link", "com", ".", "ibm", ".", "jaggr", ".", "core", ".", "transport", ...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/transport/DojoHttpTransport.java#L258-L268
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.renderedImage2WritableRaster
public static WritableRaster renderedImage2WritableRaster( RenderedImage renderedImage, boolean nullBorders ) { """ Creates a compatible {@link WritableRaster} from a {@link RenderedImage}. @param renderedImage the image to convert. @param nullBorders a flag that indicates if the borders should be set to null....
java
public static WritableRaster renderedImage2WritableRaster( RenderedImage renderedImage, boolean nullBorders ) { int width = renderedImage.getWidth(); int height = renderedImage.getHeight(); Raster data = renderedImage.getData(); WritableRaster writableRaster = data.createCompatibleWrita...
[ "public", "static", "WritableRaster", "renderedImage2WritableRaster", "(", "RenderedImage", "renderedImage", ",", "boolean", "nullBorders", ")", "{", "int", "width", "=", "renderedImage", ".", "getWidth", "(", ")", ";", "int", "height", "=", "renderedImage", ".", ...
Creates a compatible {@link WritableRaster} from a {@link RenderedImage}. @param renderedImage the image to convert. @param nullBorders a flag that indicates if the borders should be set to null. @return the converted writable raster.
[ "Creates", "a", "compatible", "{", "@link", "WritableRaster", "}", "from", "a", "{", "@link", "RenderedImage", "}", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L939-L958
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java
TIFFDirectory.getFieldAsByte
public byte getFieldAsByte(int tag, int index) { """ Returns the value of a particular index of a given tag as a byte. The caller is responsible for ensuring that the tag is present and has type TIFFField.TIFF_SBYTE, TIFF_BYTE, or TIFF_UNDEFINED. """ Integer i = (Integer)fieldIndex.get(Integer.valu...
java
public byte getFieldAsByte(int tag, int index) { Integer i = (Integer)fieldIndex.get(Integer.valueOf(tag)); byte [] b = fields[i.intValue()].getAsBytes(); return b[index]; }
[ "public", "byte", "getFieldAsByte", "(", "int", "tag", ",", "int", "index", ")", "{", "Integer", "i", "=", "(", "Integer", ")", "fieldIndex", ".", "get", "(", "Integer", ".", "valueOf", "(", "tag", ")", ")", ";", "byte", "[", "]", "b", "=", "fields...
Returns the value of a particular index of a given tag as a byte. The caller is responsible for ensuring that the tag is present and has type TIFFField.TIFF_SBYTE, TIFF_BYTE, or TIFF_UNDEFINED.
[ "Returns", "the", "value", "of", "a", "particular", "index", "of", "a", "given", "tag", "as", "a", "byte", ".", "The", "caller", "is", "responsible", "for", "ensuring", "that", "the", "tag", "is", "present", "and", "has", "type", "TIFFField", ".", "TIFF_...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java#L446-L450
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java
Schema.recordOf
public static Schema recordOf(String name, Iterable<Field> fields) { """ Creates a {@link Type#RECORD RECORD} {@link Schema} with the given name and {@link Field Fields}. The ordering of the fields inside the record would be the same as the {@link Iterable#iterator()} order. @param name Name of the record @pa...
java
public static Schema recordOf(String name, Iterable<Field> fields) { Preconditions.checkNotNull(name, "Record name cannot be null."); ImmutableMap.Builder<String, Field> fieldMapBuilder = ImmutableMap.builder(); for (Field field : fields) { fieldMapBuilder.put(field.getName(), field); } Map<St...
[ "public", "static", "Schema", "recordOf", "(", "String", "name", ",", "Iterable", "<", "Field", ">", "fields", ")", "{", "Preconditions", ".", "checkNotNull", "(", "name", ",", "\"Record name cannot be null.\"", ")", ";", "ImmutableMap", ".", "Builder", "<", "...
Creates a {@link Type#RECORD RECORD} {@link Schema} with the given name and {@link Field Fields}. The ordering of the fields inside the record would be the same as the {@link Iterable#iterator()} order. @param name Name of the record @param fields All the fields that the record contains. @return A {@link Schema} of {@...
[ "Creates", "a", "{", "@link", "Type#RECORD", "RECORD", "}", "{", "@link", "Schema", "}", "with", "the", "given", "name", "and", "{", "@link", "Field", "Fields", "}", ".", "The", "ordering", "of", "the", "fields", "inside", "the", "record", "would", "be",...
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java#L222-L231
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java
XHTMLManager.addBody
public static void addBody(Message message, XHTMLText xhtmlText) { """ Adds an XHTML body to the message. @param message the message that will receive the XHTML body @param xhtmlText the string to add as an XHTML body to the message """ XHTMLExtension xhtmlExtension = XHTMLExtension.from(message); ...
java
public static void addBody(Message message, XHTMLText xhtmlText) { XHTMLExtension xhtmlExtension = XHTMLExtension.from(message); if (xhtmlExtension == null) { // Create an XHTMLExtension and add it to the message xhtmlExtension = new XHTMLExtension(); message.addExten...
[ "public", "static", "void", "addBody", "(", "Message", "message", ",", "XHTMLText", "xhtmlText", ")", "{", "XHTMLExtension", "xhtmlExtension", "=", "XHTMLExtension", ".", "from", "(", "message", ")", ";", "if", "(", "xhtmlExtension", "==", "null", ")", "{", ...
Adds an XHTML body to the message. @param message the message that will receive the XHTML body @param xhtmlText the string to add as an XHTML body to the message
[ "Adds", "an", "XHTML", "body", "to", "the", "message", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/xhtmlim/XHTMLManager.java#L74-L83
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/util/MithraConfigurationManager.java
MithraConfigurationManager.parseConfiguration
public MithraRuntimeType parseConfiguration(InputStream mithraFileIs) { """ Parses the configuration file. Should only be called by MithraTestResource. Use readConfiguration to parse and initialize the configuration. @param mithraFileIs input stream containing the runtime configuration. @return the parsed confi...
java
public MithraRuntimeType parseConfiguration(InputStream mithraFileIs) { if(mithraFileIs == null) { throw new MithraBusinessException("Could not parse Mithra configuration, because the input stream is null."); } try { MithraRuntimeUnmarshaller u...
[ "public", "MithraRuntimeType", "parseConfiguration", "(", "InputStream", "mithraFileIs", ")", "{", "if", "(", "mithraFileIs", "==", "null", ")", "{", "throw", "new", "MithraBusinessException", "(", "\"Could not parse Mithra configuration, because the input stream is null.\"", ...
Parses the configuration file. Should only be called by MithraTestResource. Use readConfiguration to parse and initialize the configuration. @param mithraFileIs input stream containing the runtime configuration. @return the parsed configuration
[ "Parses", "the", "configuration", "file", ".", "Should", "only", "be", "called", "by", "MithraTestResource", ".", "Use", "readConfiguration", "to", "parse", "and", "initialize", "the", "configuration", "." ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/util/MithraConfigurationManager.java#L1101-L1128
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPost
protected <T> T doPost(String path, MultivaluedMap<String, String> formParams, Class<T> cls) throws ClientException { """ Submits a form and gets back a JSON object. Adds appropriate Accepts and Content Type headers. @param <T> the type of object that is expected in the response. @param path the API to call. ...
java
protected <T> T doPost(String path, MultivaluedMap<String, String> formParams, Class<T> cls) throws ClientException { return doPost(path, formParams, cls, null); }
[ "protected", "<", "T", ">", "T", "doPost", "(", "String", "path", ",", "MultivaluedMap", "<", "String", ",", "String", ">", "formParams", ",", "Class", "<", "T", ">", "cls", ")", "throws", "ClientException", "{", "return", "doPost", "(", "path", ",", "...
Submits a form and gets back a JSON object. Adds appropriate Accepts and Content Type headers. @param <T> the type of object that is expected in the response. @param path the API to call. @param formParams the form parameters to send. @param cls the type of object that is expected in the response. @return the object i...
[ "Submits", "a", "form", "and", "gets", "back", "a", "JSON", "object", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L442-L444
threerings/nenya
core/src/main/java/com/threerings/media/image/ImageUtil.java
ImageUtil.createCompatibleImage
public static BufferedImage createCompatibleImage (BufferedImage source, int width, int height) { """ Creates a new buffered image with the same sample model and color model as the source image but with the new width and height. """ WritableRaster raster = source.getRaster().createCompatibleWritableRa...
java
public static BufferedImage createCompatibleImage (BufferedImage source, int width, int height) { WritableRaster raster = source.getRaster().createCompatibleWritableRaster(width, height); return new BufferedImage(source.getColorModel(), raster, false, null); }
[ "public", "static", "BufferedImage", "createCompatibleImage", "(", "BufferedImage", "source", ",", "int", "width", ",", "int", "height", ")", "{", "WritableRaster", "raster", "=", "source", ".", "getRaster", "(", ")", ".", "createCompatibleWritableRaster", "(", "w...
Creates a new buffered image with the same sample model and color model as the source image but with the new width and height.
[ "Creates", "a", "new", "buffered", "image", "with", "the", "same", "sample", "model", "and", "color", "model", "as", "the", "source", "image", "but", "with", "the", "new", "width", "and", "height", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ImageUtil.java#L62-L66
lightblue-platform/lightblue-client
core/src/main/java/com/redhat/lightblue/client/Query.java
Query.withStringIgnoreCase
public static Query withStringIgnoreCase(String field, String value) { """ <pre> { field: <field>, regex: <^string$>, caseInsensitive: true, ... } </pre> """ return Query.withString(field, value, true); }
java
public static Query withStringIgnoreCase(String field, String value) { return Query.withString(field, value, true); }
[ "public", "static", "Query", "withStringIgnoreCase", "(", "String", "field", ",", "String", "value", ")", "{", "return", "Query", ".", "withString", "(", "field", ",", "value", ",", "true", ")", ";", "}" ]
<pre> { field: <field>, regex: <^string$>, caseInsensitive: true, ... } </pre>
[ "<pre", ">", "{", "field", ":", "<field", ">", "regex", ":", "<^string$", ">", "caseInsensitive", ":", "true", "...", "}", "<", "/", "pre", ">" ]
train
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/core/src/main/java/com/redhat/lightblue/client/Query.java#L211-L213
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/MutableRoaringBitmap.java
MutableRoaringBitmap.flip
@Deprecated public static MutableRoaringBitmap flip(MutableRoaringBitmap rb, final int rangeStart, final int rangeEnd) { """ Complements the bits in the given range, from rangeStart (inclusive) rangeEnd (exclusive). The given bitmap is unchanged. @param rb bitmap b...
java
@Deprecated public static MutableRoaringBitmap flip(MutableRoaringBitmap rb, final int rangeStart, final int rangeEnd) { if (rangeStart >= 0) { return flip(rb, (long) rangeStart, (long) rangeEnd); } // rangeStart being -ve and rangeEnd being positive is no...
[ "@", "Deprecated", "public", "static", "MutableRoaringBitmap", "flip", "(", "MutableRoaringBitmap", "rb", ",", "final", "int", "rangeStart", ",", "final", "int", "rangeEnd", ")", "{", "if", "(", "rangeStart", ">=", "0", ")", "{", "return", "flip", "(", "rb",...
Complements the bits in the given range, from rangeStart (inclusive) rangeEnd (exclusive). The given bitmap is unchanged. @param rb bitmap being negated @param rangeStart inclusive beginning of range @param rangeEnd exclusive ending of range @return a new Bitmap @deprecated use the version where longs specify the rang...
[ "Complements", "the", "bits", "in", "the", "given", "range", "from", "rangeStart", "(", "inclusive", ")", "rangeEnd", "(", "exclusive", ")", ".", "The", "given", "bitmap", "is", "unchanged", "." ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/MutableRoaringBitmap.java#L458-L467
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.maximumLayoutSize
@Override public Dimension maximumLayoutSize(Container target) { """ Returns the maximum dimensions for this layout given the components in the specified target container. @param target the container which needs to be laid out @see Container @see #minimumLayoutSize(Container) @see #preferredLayoutSize(C...
java
@Override public Dimension maximumLayoutSize(Container target) { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
[ "@", "Override", "public", "Dimension", "maximumLayoutSize", "(", "Container", "target", ")", "{", "return", "new", "Dimension", "(", "Integer", ".", "MAX_VALUE", ",", "Integer", ".", "MAX_VALUE", ")", ";", "}" ]
Returns the maximum dimensions for this layout given the components in the specified target container. @param target the container which needs to be laid out @see Container @see #minimumLayoutSize(Container) @see #preferredLayoutSize(Container) @return the maximum dimensions for this layout
[ "Returns", "the", "maximum", "dimensions", "for", "this", "layout", "given", "the", "components", "in", "the", "specified", "target", "container", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L1090-L1093
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.toleranceDistance
public static double toleranceDistance(int zoom, int pixelWidth, int pixelHeight) { """ Get the tolerance distance in meters for the zoom level and pixels length @param zoom zoom level @param pixelWidth pixel width @param pixelHeight pixel height @return tolerance distance in meters @since 2.0.0 ...
java
public static double toleranceDistance(int zoom, int pixelWidth, int pixelHeight) { return toleranceDistance(zoom, Math.max(pixelWidth, pixelHeight)); }
[ "public", "static", "double", "toleranceDistance", "(", "int", "zoom", ",", "int", "pixelWidth", ",", "int", "pixelHeight", ")", "{", "return", "toleranceDistance", "(", "zoom", ",", "Math", ".", "max", "(", "pixelWidth", ",", "pixelHeight", ")", ")", ";", ...
Get the tolerance distance in meters for the zoom level and pixels length @param zoom zoom level @param pixelWidth pixel width @param pixelHeight pixel height @return tolerance distance in meters @since 2.0.0
[ "Get", "the", "tolerance", "distance", "in", "meters", "for", "the", "zoom", "level", "and", "pixels", "length" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L754-L757
belaban/JGroups
src/org/jgroups/protocols/tom/SenderManager.java
SenderManager.addPropose
public long addPropose(MessageID messageID, Address from, long sequenceNumber) { """ Add a propose from a member in destination set @param messageID the message ID @param from the originator of the propose @param sequenceNumber the proposed sequence number @return NOT_READY if the final...
java
public long addPropose(MessageID messageID, Address from, long sequenceNumber) { MessageInfo messageInfo = sentMessages.get(messageID); if (messageInfo != null && messageInfo.addPropose(from, sequenceNumber)) { return messageInfo.getAndMarkFinalSent(); } return NOT_READY; ...
[ "public", "long", "addPropose", "(", "MessageID", "messageID", ",", "Address", "from", ",", "long", "sequenceNumber", ")", "{", "MessageInfo", "messageInfo", "=", "sentMessages", ".", "get", "(", "messageID", ")", ";", "if", "(", "messageInfo", "!=", "null", ...
Add a propose from a member in destination set @param messageID the message ID @param from the originator of the propose @param sequenceNumber the proposed sequence number @return NOT_READY if the final sequence number is not know, or the final sequence number
[ "Add", "a", "propose", "from", "a", "member", "in", "destination", "set" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/protocols/tom/SenderManager.java#L44-L50
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsPAM.java
KMedoidsPAM.initialMedoids
protected ArrayModifiableDBIDs initialMedoids(DistanceQuery<V> distQ, DBIDs ids) { """ Choose the initial medoids. @param distQ Distance query @param ids IDs to choose from @return Initial medoids """ if(getLogger().isStatistics()) { getLogger().statistics(new StringStatistic(getClass().getName(...
java
protected ArrayModifiableDBIDs initialMedoids(DistanceQuery<V> distQ, DBIDs ids) { if(getLogger().isStatistics()) { getLogger().statistics(new StringStatistic(getClass().getName() + ".initialization", initializer.toString())); } Duration initd = getLogger().newDuration(getClass().getName() + ".initial...
[ "protected", "ArrayModifiableDBIDs", "initialMedoids", "(", "DistanceQuery", "<", "V", ">", "distQ", ",", "DBIDs", "ids", ")", "{", "if", "(", "getLogger", "(", ")", ".", "isStatistics", "(", ")", ")", "{", "getLogger", "(", ")", ".", "statistics", "(", ...
Choose the initial medoids. @param distQ Distance query @param ids IDs to choose from @return Initial medoids
[ "Choose", "the", "initial", "medoids", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsPAM.java#L163-L174
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java
HTODDynacache.readDependencyByRange
public Result readDependencyByRange(int index, int length) { """ *********************************************************************** readDependencyByRange() This method is used by CacheMonitor to retrive the dependency ids from the disk. If index = 0, it starts the beginning. If index = 1, it means "next". ...
java
public Result readDependencyByRange(int index, int length) { Result result = getFromResultPool(); if (!this.disableDependencyId) { Result other = readByRange(DEP_ID_DATA, index, length, !CHECK_EXPIRED, !FILTER); result.copy(other); returnToResultPool(other); }...
[ "public", "Result", "readDependencyByRange", "(", "int", "index", ",", "int", "length", ")", "{", "Result", "result", "=", "getFromResultPool", "(", ")", ";", "if", "(", "!", "this", ".", "disableDependencyId", ")", "{", "Result", "other", "=", "readByRange"...
*********************************************************************** readDependencyByRange() This method is used by CacheMonitor to retrive the dependency ids from the disk. If index = 0, it starts the beginning. If index = 1, it means "next". If Index = -1, it means "previous". The length of the max number of templ...
[ "***********************************************************************", "readDependencyByRange", "()", "This", "method", "is", "used", "by", "CacheMonitor", "to", "retrive", "the", "dependency", "ids", "from", "the", "disk", ".", "If", "index", "=", "0", "it", "start...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/HTODDynacache.java#L1385-L1393
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.trimLeft
public UTF8String trimLeft(UTF8String trimString) { """ Based on the given trim string, trim this string starting from left end This method searches each character in the source string starting from the left end, removes the character if it is in the trim string, stops at the first character which is not in the ...
java
public UTF8String trimLeft(UTF8String trimString) { if (trimString == null) return null; // the searching byte position in the source string int srchIdx = 0; // the first beginning byte position of a non-matching character int trimIdx = 0; while (srchIdx < numBytes) { UTF8String searchCha...
[ "public", "UTF8String", "trimLeft", "(", "UTF8String", "trimString", ")", "{", "if", "(", "trimString", "==", "null", ")", "return", "null", ";", "// the searching byte position in the source string", "int", "srchIdx", "=", "0", ";", "// the first beginning byte positio...
Based on the given trim string, trim this string starting from left end This method searches each character in the source string starting from the left end, removes the character if it is in the trim string, stops at the first character which is not in the trim string, returns the new string. @param trimString the trim...
[ "Based", "on", "the", "given", "trim", "string", "trim", "this", "string", "starting", "from", "left", "end", "This", "method", "searches", "each", "character", "in", "the", "source", "string", "starting", "from", "the", "left", "end", "removes", "the", "cha...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L580-L607
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java
JsonService.getChild
public static JSONObject getChild(JSONObject jsonObject, String key) throws JSONException { """ Get a child JSON object from a parent JSON object. @param jsonObject The parent JSON object. @param key The name of the child object. @return Returns the child JSON object if it could be found, or null if the value...
java
public static JSONObject getChild(JSONObject jsonObject, String key) throws JSONException { checkArguments(jsonObject, key); JSONValue value = jsonObject.get(key); if (value != null) { if (value.isObject() != null) { return value.isObject(); } else if (value.isNull() != null) { return null; } ...
[ "public", "static", "JSONObject", "getChild", "(", "JSONObject", "jsonObject", ",", "String", "key", ")", "throws", "JSONException", "{", "checkArguments", "(", "jsonObject", ",", "key", ")", ";", "JSONValue", "value", "=", "jsonObject", ".", "get", "(", "key"...
Get a child JSON object from a parent JSON object. @param jsonObject The parent JSON object. @param key The name of the child object. @return Returns the child JSON object if it could be found, or null if the value was null. @throws JSONException In case something went wrong while searching for the child.
[ "Get", "a", "child", "JSON", "object", "from", "a", "parent", "JSON", "object", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java#L94-L106
lastaflute/lastaflute
src/main/java/org/lastaflute/web/login/TypicalLoginAssist.java
TypicalLoginAssist.buildRememberMeCookieValue
protected String buildRememberMeCookieValue(USER_ENTITY userEntity, USER_BEAN userBean, int expireDays) { """ Build the value for remember-me saved in cookie. <br> You can change access token's structure by override. #change_access_token @param userEntity The selected entity of login user. (NotNull) @param user...
java
protected String buildRememberMeCookieValue(USER_ENTITY userEntity, USER_BEAN userBean, int expireDays) { final String autoLoginKey = createRememberMeKey(userEntity, userBean); final String delimiter = getRememberMeDelimiter(); final HandyDate currentHandyDate = timeManager.currentHandyDate(); ...
[ "protected", "String", "buildRememberMeCookieValue", "(", "USER_ENTITY", "userEntity", ",", "USER_BEAN", "userBean", ",", "int", "expireDays", ")", "{", "final", "String", "autoLoginKey", "=", "createRememberMeKey", "(", "userEntity", ",", "userBean", ")", ";", "fin...
Build the value for remember-me saved in cookie. <br> You can change access token's structure by override. #change_access_token @param userEntity The selected entity of login user. (NotNull) @param userBean The user bean saved in session. (NotNull) @param expireDays The count of expired days from current times. (NotNul...
[ "Build", "the", "value", "for", "remember", "-", "me", "saved", "in", "cookie", ".", "<br", ">", "You", "can", "change", "access", "token", "s", "structure", "by", "override", ".", "#change_access_token" ]
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/login/TypicalLoginAssist.java#L451-L457
netty/netty
codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java
ByteToMessageDecoder.decodeRemovalReentryProtection
final void decodeRemovalReentryProtection(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { """ Decode the from one {@link ByteBuf} to an other. This method will be called till either the input {@link ByteBuf} has nothing to read when return from this method or till nothing w...
java
final void decodeRemovalReentryProtection(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception { decodeState = STATE_CALLING_CHILD_DECODE; try { decode(ctx, in, out); } finally { boolean removePending = decodeState == STATE_HANDLER_REMOVED...
[ "final", "void", "decodeRemovalReentryProtection", "(", "ChannelHandlerContext", "ctx", ",", "ByteBuf", "in", ",", "List", "<", "Object", ">", "out", ")", "throws", "Exception", "{", "decodeState", "=", "STATE_CALLING_CHILD_DECODE", ";", "try", "{", "decode", "(",...
Decode the from one {@link ByteBuf} to an other. This method will be called till either the input {@link ByteBuf} has nothing to read when return from this method or till nothing was read from the input {@link ByteBuf}. @param ctx the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belo...
[ "Decode", "the", "from", "one", "{", "@link", "ByteBuf", "}", "to", "an", "other", ".", "This", "method", "will", "be", "called", "till", "either", "the", "input", "{", "@link", "ByteBuf", "}", "has", "nothing", "to", "read", "when", "return", "from", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java#L498-L510
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.removeMultiValuesForKey
@SuppressWarnings( { """ Remove a collection of unique values from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value cast to a string. <p/> If the multi-value...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public void removeMultiValuesForKey(final String key, final ArrayList<String> values) { postAsyncSafely("removeMultiValuesForKey", new Runnable() { @Override public void run() { _handleMultiValues(values, key, Constants.CO...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "void", "removeMultiValuesForKey", "(", "final", "String", "key", ",", "final", "ArrayList", "<", "String", ">", "values", ")", "{", "postAsyncSafely", "(", "\"removeMu...
Remove a collection of unique values from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value cast to a string. <p/> If the multi-value property is empty after the remove...
[ "Remove", "a", "collection", "of", "unique", "values", "from", "a", "multi", "-", "value", "user", "profile", "property", "<p", "/", ">", "If", "the", "key", "currently", "contains", "a", "scalar", "value", "prior", "to", "performing", "the", "remove", "op...
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L3463-L3471
reactor/reactor-netty
src/main/java/reactor/netty/http/client/HttpClient.java
HttpClient.doOnRequest
public final HttpClient doOnRequest(BiConsumer<? super HttpClientRequest, ? super Connection> doOnRequest) { """ Setup a callback called when {@link HttpClientRequest} is about to be sent. @param doOnRequest a consumer observing connected events @return a new {@link HttpClient} """ Objects.requireNonNu...
java
public final HttpClient doOnRequest(BiConsumer<? super HttpClientRequest, ? super Connection> doOnRequest) { Objects.requireNonNull(doOnRequest, "doOnRequest"); return new HttpClientDoOn(this, doOnRequest, null, null, null); }
[ "public", "final", "HttpClient", "doOnRequest", "(", "BiConsumer", "<", "?", "super", "HttpClientRequest", ",", "?", "super", "Connection", ">", "doOnRequest", ")", "{", "Objects", ".", "requireNonNull", "(", "doOnRequest", ",", "\"doOnRequest\"", ")", ";", "ret...
Setup a callback called when {@link HttpClientRequest} is about to be sent. @param doOnRequest a consumer observing connected events @return a new {@link HttpClient}
[ "Setup", "a", "callback", "called", "when", "{", "@link", "HttpClientRequest", "}", "is", "about", "to", "be", "sent", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/client/HttpClient.java#L516-L519
alkacon/opencms-core
src/org/opencms/ui/apps/scheduler/CmsJobTable.java
CmsJobTable.getJobInfo
public static CmsResourceInfo getJobInfo(String name, String className) { """ Returns the resource info box to the given job.<p> @param name the job name @param className the job class @return the info box component """ return new CmsResourceInfo(name, className, new CmsCssIcon(OpenCmsTheme.ICO...
java
public static CmsResourceInfo getJobInfo(String name, String className) { return new CmsResourceInfo(name, className, new CmsCssIcon(OpenCmsTheme.ICON_JOB)); }
[ "public", "static", "CmsResourceInfo", "getJobInfo", "(", "String", "name", ",", "String", "className", ")", "{", "return", "new", "CmsResourceInfo", "(", "name", ",", "className", ",", "new", "CmsCssIcon", "(", "OpenCmsTheme", ".", "ICON_JOB", ")", ")", ";", ...
Returns the resource info box to the given job.<p> @param name the job name @param className the job class @return the info box component
[ "Returns", "the", "resource", "info", "box", "to", "the", "given", "job", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/scheduler/CmsJobTable.java#L579-L582
tvesalainen/util
util/src/main/java/org/vesalainen/text/CamelCase.java
CamelCase.delimited
public static final String delimited(String text, String delim) { """ Returns Camel-Case if delim = '-' @param text @param delim @return """ return stream(text).collect(Collectors.joining(delim)); }
java
public static final String delimited(String text, String delim) { return stream(text).collect(Collectors.joining(delim)); }
[ "public", "static", "final", "String", "delimited", "(", "String", "text", ",", "String", "delim", ")", "{", "return", "stream", "(", "text", ")", ".", "collect", "(", "Collectors", ".", "joining", "(", "delim", ")", ")", ";", "}" ]
Returns Camel-Case if delim = '-' @param text @param delim @return
[ "Returns", "Camel", "-", "Case", "if", "delim", "=", "-" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/text/CamelCase.java#L79-L82
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java
Apptentive.canShowMessageCenter
public static void canShowMessageCenter(BooleanCallback callback) { """ Our SDK must connect to our server at least once to download initial configuration for Message Center. Call this method to see whether or not Message Center can be displayed. This task is performed asynchronously. @param callback Called a...
java
public static void canShowMessageCenter(BooleanCallback callback) { dispatchConversationTask(new ConversationDispatchTask(callback, DispatchQueue.mainQueue()) { @Override protected boolean execute(Conversation conversation) { return ApptentiveInternal.canShowMessageCenterInternal(conversation); } }, "c...
[ "public", "static", "void", "canShowMessageCenter", "(", "BooleanCallback", "callback", ")", "{", "dispatchConversationTask", "(", "new", "ConversationDispatchTask", "(", "callback", ",", "DispatchQueue", ".", "mainQueue", "(", ")", ")", "{", "@", "Override", "prote...
Our SDK must connect to our server at least once to download initial configuration for Message Center. Call this method to see whether or not Message Center can be displayed. This task is performed asynchronously. @param callback Called after we check to see if Message Center can be displayed, but before it is display...
[ "Our", "SDK", "must", "connect", "to", "our", "server", "at", "least", "once", "to", "download", "initial", "configuration", "for", "Message", "Center", ".", "Call", "this", "method", "to", "see", "whether", "or", "not", "Message", "Center", "can", "be", "...
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java#L970-L977
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java
DataFactory.getObject
public static Object getObject(final AnnotationData pAnnotation, final BitUtils pBit) { """ Method to read and object from the bytes tab @param pAnnotation all information data @param pBit bytes tab @return an object """ Object obj = null; Class<?> clazz = pAnnotation.getField().getType(); if (cl...
java
public static Object getObject(final AnnotationData pAnnotation, final BitUtils pBit) { Object obj = null; Class<?> clazz = pAnnotation.getField().getType(); if (clazz.equals(Integer.class)) { obj = getInteger(pAnnotation, pBit); } else if (clazz.equals(Float.class)) { obj = getFloat(pAnnotation, pBit); ...
[ "public", "static", "Object", "getObject", "(", "final", "AnnotationData", "pAnnotation", ",", "final", "BitUtils", "pBit", ")", "{", "Object", "obj", "=", "null", ";", "Class", "<", "?", ">", "clazz", "=", "pAnnotation", ".", "getField", "(", ")", ".", ...
Method to read and object from the bytes tab @param pAnnotation all information data @param pBit bytes tab @return an object
[ "Method", "to", "read", "and", "object", "from", "the", "bytes", "tab" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java#L145-L161
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/BrownianBridge.java
BrownianBridge.doGenerateBrownianMotion
private void doGenerateBrownianMotion() { """ Lazy initialization of brownianIncrement. Synchronized to ensure thread safety of lazy init. """ if(brownianIncrements != null) { return; // Nothing to do } BrownianMotion generator = new BrownianMotion(timeDiscretization, numberOfFactors, numberOfPaths...
java
private void doGenerateBrownianMotion() { if(brownianIncrements != null) { return; // Nothing to do } BrownianMotion generator = new BrownianMotion(timeDiscretization, numberOfFactors, numberOfPaths, seed); // Allocate memory brownianIncrements = new RandomVariableInterface[generator.getTimeDiscretizat...
[ "private", "void", "doGenerateBrownianMotion", "(", ")", "{", "if", "(", "brownianIncrements", "!=", "null", ")", "{", "return", ";", "// Nothing to do", "}", "BrownianMotion", "generator", "=", "new", "BrownianMotion", "(", "timeDiscretization", ",", "numberOfFacto...
Lazy initialization of brownianIncrement. Synchronized to ensure thread safety of lazy init.
[ "Lazy", "initialization", "of", "brownianIncrement", ".", "Synchronized", "to", "ensure", "thread", "safety", "of", "lazy", "init", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/BrownianBridge.java#L113-L145
Alluxio/alluxio
core/common/src/main/java/alluxio/grpc/GrpcManagedChannelPool.java
GrpcManagedChannelPool.shutdownManagedChannel
private void shutdownManagedChannel(ChannelKey channelKey, long shutdownTimeoutMs) { """ Shuts down the managed channel for given key. (Should be called with {@code mLock} acquired.) @param channelKey channel key @param shutdownTimeoutMs shutdown timeout in miliseconds """ ManagedChannel managedChan...
java
private void shutdownManagedChannel(ChannelKey channelKey, long shutdownTimeoutMs) { ManagedChannel managedChannel = mChannels.get(channelKey).get(); managedChannel.shutdown(); try { managedChannel.awaitTermination(shutdownTimeoutMs, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { ...
[ "private", "void", "shutdownManagedChannel", "(", "ChannelKey", "channelKey", ",", "long", "shutdownTimeoutMs", ")", "{", "ManagedChannel", "managedChannel", "=", "mChannels", ".", "get", "(", "channelKey", ")", ".", "get", "(", ")", ";", "managedChannel", ".", ...
Shuts down the managed channel for given key. (Should be called with {@code mLock} acquired.) @param channelKey channel key @param shutdownTimeoutMs shutdown timeout in miliseconds
[ "Shuts", "down", "the", "managed", "channel", "for", "given", "key", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/grpc/GrpcManagedChannelPool.java#L96-L109
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/MessageFormat.java
MessageFormat.setFormat
public void setFormat(int formatElementIndex, Format newFormat) { """ Sets the format to use for the format element with the given format element index within the previously set pattern string. The format element index is the zero-based number of the format element counting from the start of the pattern string....
java
public void setFormat(int formatElementIndex, Format newFormat) { if (formatElementIndex > maxOffset) { throw new ArrayIndexOutOfBoundsException(maxOffset, formatElementIndex); } formats[formatElementIndex] = newFormat; }
[ "public", "void", "setFormat", "(", "int", "formatElementIndex", ",", "Format", "newFormat", ")", "{", "if", "(", "formatElementIndex", ">", "maxOffset", ")", "{", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "maxOffset", ",", "formatElementIndex", ")", ...
Sets the format to use for the format element with the given format element index within the previously set pattern string. The format element index is the zero-based number of the format element counting from the start of the pattern string. <p> Since the order of format elements in a pattern string often changes duri...
[ "Sets", "the", "format", "to", "use", "for", "the", "format", "element", "with", "the", "given", "format", "element", "index", "within", "the", "previously", "set", "pattern", "string", ".", "The", "format", "element", "index", "is", "the", "zero", "-", "b...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/MessageFormat.java#L692-L697
foundation-runtime/monitoring
monitoring-api/src/main/java/com/cisco/oss/foundation/monitoring/ServerInfo.java
ServerInfo.sendAttributeChangeNotification
@Override public void sendAttributeChangeNotification(String msg, String attributeName, String attributeType, Object oldValue, Object newValue) { """ Sends a notification to registered clients about the change in value of an attribute. @param msg A ...
java
@Override public void sendAttributeChangeNotification(String msg, String attributeName, String attributeType, Object oldValue, Object newValue) { LOGGER.debug("Sending Notification " + (attrNotificationSeq + 1) + ":" + msg + ":" + attributeName...
[ "@", "Override", "public", "void", "sendAttributeChangeNotification", "(", "String", "msg", ",", "String", "attributeName", ",", "String", "attributeType", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "LOGGER", ".", "debug", "(", "\"Sending Noti...
Sends a notification to registered clients about the change in value of an attribute. @param msg A String containing the message of the notification. @param attributeName A String giving the name of the attribute. @param attributeType A String containing the type of the attribute. @param oldValue An obj...
[ "Sends", "a", "notification", "to", "registered", "clients", "about", "the", "change", "in", "value", "of", "an", "attribute", "." ]
train
https://github.com/foundation-runtime/monitoring/blob/a85ec72dc5558f787704fb13d9125a5803403ee5/monitoring-api/src/main/java/com/cisco/oss/foundation/monitoring/ServerInfo.java#L117-L127
protegeproject/jpaul
src/main/java/jpaul/Graphs/BinTreeUtil.java
BinTreeUtil.inOrder
public static <T> void inOrder(T root, BinTreeNavigator<T> binTreeNav, Action<T> action) { """ Executes an action on all nodes from a tree, in inorder. For trees with sharing, the same tree node object will be visited multiple times. @param root Binary tree root. @param binTreeNav Binary tree navigator....
java
public static <T> void inOrder(T root, BinTreeNavigator<T> binTreeNav, Action<T> action) { for(Iterator<T> it = inOrder(root, binTreeNav); it.hasNext(); ) { T treeVertex = it.next(); action.action(treeVertex); } }
[ "public", "static", "<", "T", ">", "void", "inOrder", "(", "T", "root", ",", "BinTreeNavigator", "<", "T", ">", "binTreeNav", ",", "Action", "<", "T", ">", "action", ")", "{", "for", "(", "Iterator", "<", "T", ">", "it", "=", "inOrder", "(", "root"...
Executes an action on all nodes from a tree, in inorder. For trees with sharing, the same tree node object will be visited multiple times. @param root Binary tree root. @param binTreeNav Binary tree navigator. @param action Action to execute on each tree node.
[ "Executes", "an", "action", "on", "all", "nodes", "from", "a", "tree", "in", "inorder", ".", "For", "trees", "with", "sharing", "the", "same", "tree", "node", "object", "will", "be", "visited", "multiple", "times", "." ]
train
https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/Graphs/BinTreeUtil.java#L35-L40
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/SemanticHeadFinder.java
SemanticHeadFinder.postOperationFix
@Override protected int postOperationFix(int headIdx, Tree[] daughterTrees) { """ Overwrite the postOperationFix method: a, b and c -> we want a to be the head """ if (headIdx >= 2) { String prevLab = tlp.basicCategory(daughterTrees[headIdx - 1].value()); if (prevLab.equals("CC") || prevL...
java
@Override protected int postOperationFix(int headIdx, Tree[] daughterTrees) { if (headIdx >= 2) { String prevLab = tlp.basicCategory(daughterTrees[headIdx - 1].value()); if (prevLab.equals("CC") || prevLab.equals("CONJP")) { int newHeadIdx = headIdx - 2; Tree t = daughterTrees[ne...
[ "@", "Override", "protected", "int", "postOperationFix", "(", "int", "headIdx", ",", "Tree", "[", "]", "daughterTrees", ")", "{", "if", "(", "headIdx", ">=", "2", ")", "{", "String", "prevLab", "=", "tlp", ".", "basicCategory", "(", "daughterTrees", "[", ...
Overwrite the postOperationFix method: a, b and c -> we want a to be the head
[ "Overwrite", "the", "postOperationFix", "method", ":", "a", "b", "and", "c", "-", ">", "we", "want", "a", "to", "be", "the", "head" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/SemanticHeadFinder.java#L157-L176
brianwhu/xillium
base/src/main/java/org/xillium/base/text/Balanced.java
Balanced.indexOf
public static int indexOf(String text, char target) { """ Returns the index within this string of the first occurrence of the specified character, similar to String.indexOf(). However, any occurrence of the specified character enclosed between balanced parentheses/brackets/braces is ignored. @param text a Stri...
java
public static int indexOf(String text, char target) { return indexOf(text, 0, text.length(), target, null); }
[ "public", "static", "int", "indexOf", "(", "String", "text", ",", "char", "target", ")", "{", "return", "indexOf", "(", "text", ",", "0", ",", "text", ".", "length", "(", ")", ",", "target", ",", "null", ")", ";", "}" ]
Returns the index within this string of the first occurrence of the specified character, similar to String.indexOf(). However, any occurrence of the specified character enclosed between balanced parentheses/brackets/braces is ignored. @param text a String @param target the character to search for @return the index of ...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "first", "occurrence", "of", "the", "specified", "character", "similar", "to", "String", ".", "indexOf", "()", ".", "However", "any", "occurrence", "of", "the", "specified", "character", "encl...
train
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/text/Balanced.java#L94-L96
ppicas/custom-typeface
library/src/main/java/cat/ppicas/customtypeface/CustomTypefaceSpan.java
CustomTypefaceSpan.applyToText
public static void applyToText(CharSequence charSequence, Typeface typeface) { """ Applies a {@link CustomTypefaceSpan} along the whole passed {@link CharSequence}. The {@code charSequence} must implement {@link Spannable}, otherwise this method won't do anything. @param charSequence a {@code CharSequence} im...
java
public static void applyToText(CharSequence charSequence, Typeface typeface) { applyToText(charSequence, typeface, 0, charSequence.length()); }
[ "public", "static", "void", "applyToText", "(", "CharSequence", "charSequence", ",", "Typeface", "typeface", ")", "{", "applyToText", "(", "charSequence", ",", "typeface", ",", "0", ",", "charSequence", ".", "length", "(", ")", ")", ";", "}" ]
Applies a {@link CustomTypefaceSpan} along the whole passed {@link CharSequence}. The {@code charSequence} must implement {@link Spannable}, otherwise this method won't do anything. @param charSequence a {@code CharSequence} implementing {@code Spannable} to apply the styles @param typeface the {@code Typeface} th...
[ "Applies", "a", "{", "@link", "CustomTypefaceSpan", "}", "along", "the", "whole", "passed", "{", "@link", "CharSequence", "}", ".", "The", "{", "@code", "charSequence", "}", "must", "implement", "{", "@link", "Spannable", "}", "otherwise", "this", "method", ...
train
https://github.com/ppicas/custom-typeface/blob/3a2a68cc8584a72076c545a8b7c9f741f6002241/library/src/main/java/cat/ppicas/customtypeface/CustomTypefaceSpan.java#L86-L88
atomix/atomix
utils/src/main/java/io/atomix/utils/logging/ContextualLoggerFactory.java
ContextualLoggerFactory.getLogger
public static ContextualLogger getLogger(Class clazz, LoggerContext context) { """ Returns a contextual logger. @param clazz the contextual logger class @param context the logger context @return the logger """ return new ContextualLogger(LoggerFactory.getLogger(clazz), context); }
java
public static ContextualLogger getLogger(Class clazz, LoggerContext context) { return new ContextualLogger(LoggerFactory.getLogger(clazz), context); }
[ "public", "static", "ContextualLogger", "getLogger", "(", "Class", "clazz", ",", "LoggerContext", "context", ")", "{", "return", "new", "ContextualLogger", "(", "LoggerFactory", ".", "getLogger", "(", "clazz", ")", ",", "context", ")", ";", "}" ]
Returns a contextual logger. @param clazz the contextual logger class @param context the logger context @return the logger
[ "Returns", "a", "contextual", "logger", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/logging/ContextualLoggerFactory.java#L43-L45
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Float checkNull(Float value, float elseValue) { """ 检查Float是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Float} @since 1.0.8 """ return checkNull(value, Float.valueOf(elseValue)); }
java
public static Float checkNull(Float value, float elseValue) { return checkNull(value, Float.valueOf(elseValue)); }
[ "public", "static", "Float", "checkNull", "(", "Float", "value", ",", "float", "elseValue", ")", "{", "return", "checkNull", "(", "value", ",", "Float", ".", "valueOf", "(", "elseValue", ")", ")", ";", "}" ]
检查Float是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Float} @since 1.0.8
[ "检查Float是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1308-L1310
landawn/AbacusUtil
src/com/landawn/abacus/util/SQLExecutor.java
SQLExecutor.beginTransaction
public SQLTransaction beginTransaction(IsolationLevel isolationLevel, boolean forUpdateOnly) { """ The connection opened in the transaction will be automatically closed after the transaction is committed or rolled back. DON'T close it again by calling the close method. @param isolationLevel @param forUpdateOn...
java
public SQLTransaction beginTransaction(IsolationLevel isolationLevel, boolean forUpdateOnly) { N.checkArgNotNull(isolationLevel, "isolationLevel"); isolationLevel = isolationLevel == IsolationLevel.DEFAULT ? _defaultIsolationLevel : isolationLevel; final String ttid = getTransactionThread...
[ "public", "SQLTransaction", "beginTransaction", "(", "IsolationLevel", "isolationLevel", ",", "boolean", "forUpdateOnly", ")", "{", "N", ".", "checkArgNotNull", "(", "isolationLevel", ",", "\"isolationLevel\"", ")", ";", "isolationLevel", "=", "isolationLevel", "==", ...
The connection opened in the transaction will be automatically closed after the transaction is committed or rolled back. DON'T close it again by calling the close method. @param isolationLevel @param forUpdateOnly @return
[ "The", "connection", "opened", "in", "the", "transaction", "will", "be", "automatically", "closed", "after", "the", "transaction", "is", "committed", "or", "rolled", "back", ".", "DON", "T", "close", "it", "again", "by", "calling", "the", "close", "method", ...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/SQLExecutor.java#L3187-L3210