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
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.overlayString
public static String overlayString(String text, String overlay, int start, int end) { """ <p>Overlays part of a String with another String.</p> <pre> GosuStringUtil.overlayString(null, *, *, *) = NullPointerException GosuStringUtil.overlayString(*, null, *, *) = NullPointerException GosuS...
java
public static String overlayString(String text, String overlay, int start, int end) { return new StringBuffer(start + overlay.length() + text.length() - end + 1) .append(text.substring(0, start)) .append(overlay) .append(text.substring(end)) .toString(); }
[ "public", "static", "String", "overlayString", "(", "String", "text", ",", "String", "overlay", ",", "int", "start", ",", "int", "end", ")", "{", "return", "new", "StringBuffer", "(", "start", "+", "overlay", ".", "length", "(", ")", "+", "text", ".", ...
<p>Overlays part of a String with another String.</p> <pre> GosuStringUtil.overlayString(null, *, *, *) = NullPointerException GosuStringUtil.overlayString(*, null, *, *) = NullPointerException GosuStringUtil.overlayString("", "abc", 0, 0) = "abc" GosuStringUtil.overlayString("abcdef", null...
[ "<p", ">", "Overlays", "part", "of", "a", "String", "with", "another", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L3843-L3849
paymill/paymill-java
src/main/java/com/paymill/services/SubscriptionService.java
SubscriptionService.changeOfferChangeCaptureDateAndRefund
public Subscription changeOfferChangeCaptureDateAndRefund( String subscription, Offer offer ) { """ Change the offer of a subscription.<br> <br> The plan will be changed immediately. The next_capture_at will change to the current date (immediately). A refund will be given if due.<br> If the new amount is highe...
java
public Subscription changeOfferChangeCaptureDateAndRefund( String subscription, Offer offer ) { return changeOfferChangeCaptureDateAndRefund( new Subscription( subscription ), offer ); }
[ "public", "Subscription", "changeOfferChangeCaptureDateAndRefund", "(", "String", "subscription", ",", "Offer", "offer", ")", "{", "return", "changeOfferChangeCaptureDateAndRefund", "(", "new", "Subscription", "(", "subscription", ")", ",", "offer", ")", ";", "}" ]
Change the offer of a subscription.<br> <br> The plan will be changed immediately. The next_capture_at will change to the current date (immediately). A refund will be given if due.<br> If the new amount is higher than the old one, a pro-rata charge will occur. The next charge date is immediate i.e. the current date. If...
[ "Change", "the", "offer", "of", "a", "subscription", ".", "<br", ">", "<br", ">", "The", "plan", "will", "be", "changed", "immediately", ".", "The", "next_capture_at", "will", "change", "to", "the", "current", "date", "(", "immediately", ")", ".", "A", "...
train
https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/SubscriptionService.java#L420-L422
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java
IntegralImageOps.block_unsafe
public static long block_unsafe(GrayS64 integral , int x0 , int y0 , int x1 , int y1 ) { """ <p> Computes the value of a block inside an integral image without bounds checking. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param integral Integral image. @param x0 Lower bou...
java
public static long block_unsafe(GrayS64 integral , int x0 , int y0 , int x1 , int y1 ) { return ImplIntegralImageOps.block_unsafe(integral, x0, y0, x1, y1); }
[ "public", "static", "long", "block_unsafe", "(", "GrayS64", "integral", ",", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ")", "{", "return", "ImplIntegralImageOps", ".", "block_unsafe", "(", "integral", ",", "x0", ",", "y0", ",", ...
<p> Computes the value of a block inside an integral image without bounds checking. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param integral Integral image. @param x0 Lower bound of the block. Exclusive. @param y0 Lower bound of the block. Exclusive. @param x1 Upper bound of th...
[ "<p", ">", "Computes", "the", "value", "of", "a", "block", "inside", "an", "integral", "image", "without", "bounds", "checking", ".", "The", "block", "is", "defined", "as", "follows", ":", "x0", "&lt", ";", "x", "&le", ";", "x1", "and", "y0", "&lt", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java#L426-L429
wcm-io-caravan/caravan-commons
httpclient/src/main/java/io/wcm/caravan/commons/httpclient/impl/helpers/CertificateLoader.java
CertificateLoader.getTrustManagerFactory
public static TrustManagerFactory getTrustManagerFactory(String trustStoreFilename, StoreProperties storeProperties) throws IOException, GeneralSecurityException { """ Build TrustManagerFactory. @param trustStoreFilename Truststore file name @param storeProperties store properties @return TrustManagerFact...
java
public static TrustManagerFactory getTrustManagerFactory(String trustStoreFilename, StoreProperties storeProperties) throws IOException, GeneralSecurityException { InputStream is = getResourceAsStream(trustStoreFilename); if (is == null) { throw new FileNotFoundException("Certificate file not found:...
[ "public", "static", "TrustManagerFactory", "getTrustManagerFactory", "(", "String", "trustStoreFilename", ",", "StoreProperties", "storeProperties", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "InputStream", "is", "=", "getResourceAsStream", "(", "tr...
Build TrustManagerFactory. @param trustStoreFilename Truststore file name @param storeProperties store properties @return TrustManagerFactory @throws IOException @throws GeneralSecurityException
[ "Build", "TrustManagerFactory", "." ]
train
https://github.com/wcm-io-caravan/caravan-commons/blob/12e605bdfeb5a1ce7404e30d9f32274552cb8ce8/httpclient/src/main/java/io/wcm/caravan/commons/httpclient/impl/helpers/CertificateLoader.java#L164-L181
JakeWharton/NineOldAndroids
library/src/com/nineoldandroids/util/ReflectiveProperty.java
ReflectiveProperty.typesMatch
private boolean typesMatch(Class<V> valueType, Class getterType) { """ Utility method to check whether the type of the underlying field/method on the target object matches the type of the Property. The extra checks for primitive types are because generics will force the Property type to be a class, whereas the t...
java
private boolean typesMatch(Class<V> valueType, Class getterType) { if (getterType != valueType) { if (getterType.isPrimitive()) { return (getterType == float.class && valueType == Float.class) || (getterType == int.class && valueType == Integer.class) || ...
[ "private", "boolean", "typesMatch", "(", "Class", "<", "V", ">", "valueType", ",", "Class", "getterType", ")", "{", "if", "(", "getterType", "!=", "valueType", ")", "{", "if", "(", "getterType", ".", "isPrimitive", "(", ")", ")", "{", "return", "(", "g...
Utility method to check whether the type of the underlying field/method on the target object matches the type of the Property. The extra checks for primitive types are because generics will force the Property type to be a class, whereas the type of the underlying method/field will probably be a primitive type instead. ...
[ "Utility", "method", "to", "check", "whether", "the", "type", "of", "the", "underlying", "field", "/", "method", "on", "the", "target", "object", "matches", "the", "type", "of", "the", "Property", ".", "The", "extra", "checks", "for", "primitive", "types", ...
train
https://github.com/JakeWharton/NineOldAndroids/blob/d582f0ec8e79013e9fa96c07986160b52e662e63/library/src/com/nineoldandroids/util/ReflectiveProperty.java#L116-L131
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java
EncodingUtils.fromStorage
public static Object fromStorage(Object stored, Encoder encoder, Wrapper wrapper) { """ Decode object from storage format. @param stored Object in the storage format. @param encoder the {@link Encoder} used for data conversion. @param wrapper the {@link Wrapper} used to decorate the converted data. @return ...
java
public static Object fromStorage(Object stored, Encoder encoder, Wrapper wrapper) { if (encoder == null || wrapper == null) { throw new IllegalArgumentException("Both Encoder and Wrapper must be provided!"); } if (stored == null) return null; return encoder.fromStorage(wrapper.unwrap(st...
[ "public", "static", "Object", "fromStorage", "(", "Object", "stored", ",", "Encoder", "encoder", ",", "Wrapper", "wrapper", ")", "{", "if", "(", "encoder", "==", "null", "||", "wrapper", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Decode object from storage format. @param stored Object in the storage format. @param encoder the {@link Encoder} used for data conversion. @param wrapper the {@link Wrapper} used to decorate the converted data. @return Object decoded and unwrapped.
[ "Decode", "object", "from", "storage", "format", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java#L22-L28
gliga/ekstazi
org.ekstazi.core/src/main/java/org/ekstazi/asm/FieldVisitor.java
FieldVisitor.visitAnnotation
public AnnotationVisitor visitAnnotation(String desc, boolean visible) { """ Visits an annotation of the field. @param desc the class descriptor of the annotation class. @param visible <tt>true</tt> if the annotation is visible at runtime. @return a visitor to visit the annotation values, or <tt>null</tt> i...
java
public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (fv != null) { return fv.visitAnnotation(desc, visible); } return null; }
[ "public", "AnnotationVisitor", "visitAnnotation", "(", "String", "desc", ",", "boolean", "visible", ")", "{", "if", "(", "fv", "!=", "null", ")", "{", "return", "fv", ".", "visitAnnotation", "(", "desc", ",", "visible", ")", ";", "}", "return", "null", "...
Visits an annotation of the field. @param desc the class descriptor of the annotation class. @param visible <tt>true</tt> if the annotation is visible at runtime. @return a visitor to visit the annotation values, or <tt>null</tt> if this visitor is not interested in visiting this annotation.
[ "Visits", "an", "annotation", "of", "the", "field", "." ]
train
https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/asm/FieldVisitor.java#L92-L97
tvesalainen/util
util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java
LevenbergMarquardt.optimize
public boolean optimize( DenseMatrix64F initParam , DenseMatrix64F X , DenseMatrix64F Y ) { """ Finds the best fit parameters. @param initParam The initial set of parameters for the function. @param X The inputs to the function. @param Y The "observe...
java
public boolean optimize( DenseMatrix64F initParam , DenseMatrix64F X , DenseMatrix64F Y ) { if (X.numRows == 0) { return false; } configure(initParam,X,Y); // save the cost of the initial paramet...
[ "public", "boolean", "optimize", "(", "DenseMatrix64F", "initParam", ",", "DenseMatrix64F", "X", ",", "DenseMatrix64F", "Y", ")", "{", "if", "(", "X", ".", "numRows", "==", "0", ")", "{", "return", "false", ";", "}", "configure", "(", "initParam", ",", "...
Finds the best fit parameters. @param initParam The initial set of parameters for the function. @param X The inputs to the function. @param Y The "observed" output of the function @return true if it succeeded and false if it did not.
[ "Finds", "the", "best", "fit", "parameters", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java#L131-L152
rhuss/jolokia
agent/core/src/main/java/org/jolokia/request/JmxRequestFactory.java
JmxRequestFactory.createPostRequest
public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, ProcessingParameters pProcessingParams) { """ Create a single {@link JmxRequest}s from a JSON map representation of a request @param pRequestMap JSON representation of a {@link JmxRequest} @param pProcessingParams additional m...
java
public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, ProcessingParameters pProcessingParams) { try { ProcessingParameters paramsMerged = pProcessingParams.mergedParams((Map<String,String>) pRequestMap.get("config")); RequestType type = RequestType.getTypeB...
[ "public", "static", "<", "R", "extends", "JmxRequest", ">", "R", "createPostRequest", "(", "Map", "<", "String", ",", "?", ">", "pRequestMap", ",", "ProcessingParameters", "pProcessingParams", ")", "{", "try", "{", "ProcessingParameters", "paramsMerged", "=", "p...
Create a single {@link JmxRequest}s from a JSON map representation of a request @param pRequestMap JSON representation of a {@link JmxRequest} @param pProcessingParams additional map of operational parameters. Must not be null. @return the created {@link JmxRequest}
[ "Create", "a", "single", "{", "@link", "JmxRequest", "}", "s", "from", "a", "JSON", "map", "representation", "of", "a", "request" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/request/JmxRequestFactory.java#L113-L121
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.transposeConjugate
public static void transposeConjugate( ZMatrixRMaj mat ) { """ <p>Performs an "in-place" conjugate transpose.</p> @see #transpose(ZMatrixRMaj) @param mat The matrix that is to be transposed. Modified. """ if( mat.numCols == mat.numRows ){ TransposeAlgs_ZDRM.squareConjugate(mat); ...
java
public static void transposeConjugate( ZMatrixRMaj mat ) { if( mat.numCols == mat.numRows ){ TransposeAlgs_ZDRM.squareConjugate(mat); } else { ZMatrixRMaj b = new ZMatrixRMaj(mat.numCols,mat.numRows); transposeConjugate(mat, b); mat.reshape(b.numRows, b.nu...
[ "public", "static", "void", "transposeConjugate", "(", "ZMatrixRMaj", "mat", ")", "{", "if", "(", "mat", ".", "numCols", "==", "mat", ".", "numRows", ")", "{", "TransposeAlgs_ZDRM", ".", "squareConjugate", "(", "mat", ")", ";", "}", "else", "{", "ZMatrixRM...
<p>Performs an "in-place" conjugate transpose.</p> @see #transpose(ZMatrixRMaj) @param mat The matrix that is to be transposed. Modified.
[ "<p", ">", "Performs", "an", "in", "-", "place", "conjugate", "transpose", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L730-L739
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java
SslContextBuilder.keyManager
public SslContextBuilder keyManager(InputStream keyCertChainInputStream, InputStream keyInputStream) { """ Identifying certificate for this host. {@code keyCertChainInputStream} and {@code keyInputStream} may be {@code null} for client contexts, which disables mutual authentication. @param keyCertChainInputStr...
java
public SslContextBuilder keyManager(InputStream keyCertChainInputStream, InputStream keyInputStream) { return keyManager(keyCertChainInputStream, keyInputStream, null); }
[ "public", "SslContextBuilder", "keyManager", "(", "InputStream", "keyCertChainInputStream", ",", "InputStream", "keyInputStream", ")", "{", "return", "keyManager", "(", "keyCertChainInputStream", ",", "keyInputStream", ",", "null", ")", ";", "}" ]
Identifying certificate for this host. {@code keyCertChainInputStream} and {@code keyInputStream} may be {@code null} for client contexts, which disables mutual authentication. @param keyCertChainInputStream an input stream for an X.509 certificate chain in PEM format @param keyInputStream an input stream for a PKCS#8...
[ "Identifying", "certificate", "for", "this", "host", ".", "{", "@code", "keyCertChainInputStream", "}", "and", "{", "@code", "keyInputStream", "}", "may", "be", "{", "@code", "null", "}", "for", "client", "contexts", "which", "disables", "mutual", "authenticatio...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java#L235-L237
misberner/duzzt
processor/src/main/java/com/github/misberner/duzzt/automaton/DuzztState.java
DuzztState.addTransition
public void addTransition(DuzztAction action, DuzztState succ) { """ Adds a transition to this state. @param action the action on which to trigger this transition @param succ the successor state """ transitions.put(action, new DuzztTransition(action, succ)); }
java
public void addTransition(DuzztAction action, DuzztState succ) { transitions.put(action, new DuzztTransition(action, succ)); }
[ "public", "void", "addTransition", "(", "DuzztAction", "action", ",", "DuzztState", "succ", ")", "{", "transitions", ".", "put", "(", "action", ",", "new", "DuzztTransition", "(", "action", ",", "succ", ")", ")", ";", "}" ]
Adds a transition to this state. @param action the action on which to trigger this transition @param succ the successor state
[ "Adds", "a", "transition", "to", "this", "state", "." ]
train
https://github.com/misberner/duzzt/blob/3fb784c1a9142967141743587fe7ad3945d0ac28/processor/src/main/java/com/github/misberner/duzzt/automaton/DuzztState.java#L73-L75
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/OrchestrationShardingDataSourceFactory.java
OrchestrationShardingDataSourceFactory.createDataSource
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props, final OrchestrationConfiguration orchestrationConfig) throws SQLException { """ Create sharding data sourc...
java
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props, final OrchestrationConfiguration orchestrationConfig) throws SQLException { if (null == shardingRuleCon...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "ShardingRuleConfiguration", "shardingRuleConfig", ",", "final", "Properties", "props", ",", "final", "OrchestrationConfigura...
Create sharding data source. @param dataSourceMap data source map @param shardingRuleConfig sharding rule configuration @param orchestrationConfig orchestration configuration @param props properties for data source @return sharding data source @throws SQLException SQL exception
[ "Create", "sharding", "data", "source", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/OrchestrationShardingDataSourceFactory.java#L51-L58
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java
FactoryThresholdBinary.localNick
public static <T extends ImageGray<T>> InputToBinary<T> localNick(ConfigLength width, boolean down, float k, Class<T> inputType) { """ @see ThresholdNick @param width size of local region. Try 31 @param down Should it threshold up or down. @param k The Niblack factor. Recommend -0.1 to -0.2 @param inputTyp...
java
public static <T extends ImageGray<T>> InputToBinary<T> localNick(ConfigLength width, boolean down, float k, Class<T> inputType) { // if( BOverrideFactoryThresholdBinary.localNick != null ) // return BOverrideFactoryThresholdBinary.localNick.handle(width, k, down, inputType); return new InputToBinarySwitch<>(new...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InputToBinary", "<", "T", ">", "localNick", "(", "ConfigLength", "width", ",", "boolean", "down", ",", "float", "k", ",", "Class", "<", "T", ">", "inputType", ")", "{", "//\t\ti...
@see ThresholdNick @param width size of local region. Try 31 @param down Should it threshold up or down. @param k The Niblack factor. Recommend -0.1 to -0.2 @param inputType Type of input image @return Filter to binary
[ "@see", "ThresholdNick" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L92-L98
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java
ChannelUtils.defineEndPoint
private static EndPointInfo defineEndPoint(EndPointMgr epm, String name, String[] config) { """ Define a new endpoint definition using the input name and list of properties. @param name @param config @return EndPointInfo @throws IllegalArgumentException if input values are incorrect """ String h...
java
private static EndPointInfo defineEndPoint(EndPointMgr epm, String name, String[] config) { String host = null; String port = null; for (int i = 0; i < config.length; i++) { String key = ChannelUtils.extractKey(config[i]); if ("host".equalsIgnoreCase(key)) { ...
[ "private", "static", "EndPointInfo", "defineEndPoint", "(", "EndPointMgr", "epm", ",", "String", "name", ",", "String", "[", "]", "config", ")", "{", "String", "host", "=", "null", ";", "String", "port", "=", "null", ";", "for", "(", "int", "i", "=", "...
Define a new endpoint definition using the input name and list of properties. @param name @param config @return EndPointInfo @throws IllegalArgumentException if input values are incorrect
[ "Define", "a", "new", "endpoint", "definition", "using", "the", "input", "name", "and", "list", "of", "properties", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java#L977-L989
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(JSONArray expected, JSONArray actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONArray provided matches the expected JSONArray. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONArray @param actual JSONA...
java
public static void assertEquals(JSONArray expected, JSONArray actual, JSONCompareMode compareMode) throws JSONException { assertEquals("", expected, actual, compareMode); }
[ "public", "static", "void", "assertEquals", "(", "JSONArray", "expected", ",", "JSONArray", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "assertEquals", "(", "\"\"", ",", "expected", ",", "actual", ",", "compareMode", ")", ...
Asserts that the JSONArray provided matches the expected JSONArray. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONArray @param actual JSONArray to compare @param compareMode Specifies which comparison mode to use @throws JSONException JSON parsing error
[ "Asserts", "that", "the", "JSONArray", "provided", "matches", "the", "expected", "JSONArray", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L707-L710
skuzzle/TinyPlugz
tiny-plugz/src/main/java/de/skuzzle/tinyplugz/util/Require.java
Require.nonNullResult
@NonNull public static <T> T nonNullResult(@Nullable T result, String call) { """ Asserts that a method call yielded a non-null result. @param <T> Type of the object to test. @param result The result object. @param call A String description of the call, like "Object.calledMethod". @return The object whic...
java
@NonNull public static <T> T nonNullResult(@Nullable T result, String call) { if (result == null) { // XXX: IllegalStateException might not be the best choice throw new IllegalStateException(String.format( "call of '%s' yielded unexpected null value", call)); ...
[ "@", "NonNull", "public", "static", "<", "T", ">", "T", "nonNullResult", "(", "@", "Nullable", "T", "result", ",", "String", "call", ")", "{", "if", "(", "result", "==", "null", ")", "{", "// XXX: IllegalStateException might not be the best choice", "throw", "...
Asserts that a method call yielded a non-null result. @param <T> Type of the object to test. @param result The result object. @param call A String description of the call, like "Object.calledMethod". @return The object which was passed in. @throws IllegalStateException If {@code result} is <code>null</code>.
[ "Asserts", "that", "a", "method", "call", "yielded", "a", "non", "-", "null", "result", "." ]
train
https://github.com/skuzzle/TinyPlugz/blob/739858ed0ba5a0c75b6ccf18df9a4d5612374a4b/tiny-plugz/src/main/java/de/skuzzle/tinyplugz/util/Require.java#L108-L116
ZieIony/Carbon
carbon/src/main/java/carbon/animation/StateAnimator.java
StateAnimator.addState
public void addState(int[] specs, Animator animation, Animator.AnimatorListener listener) { """ Associates the given Animation with the provided drawable state specs so that it will be run when the View's drawable state matches the specs. @param specs drawable state specs to match against @param animation...
java
public void addState(int[] specs, Animator animation, Animator.AnimatorListener listener) { Tuple tuple = new Tuple(specs, animation, listener); animation.addListener(mAnimationListener); mTuples.add(tuple); }
[ "public", "void", "addState", "(", "int", "[", "]", "specs", ",", "Animator", "animation", ",", "Animator", ".", "AnimatorListener", "listener", ")", "{", "Tuple", "tuple", "=", "new", "Tuple", "(", "specs", ",", "animation", ",", "listener", ")", ";", "...
Associates the given Animation with the provided drawable state specs so that it will be run when the View's drawable state matches the specs. @param specs drawable state specs to match against @param animation The Animation to run when the specs match
[ "Associates", "the", "given", "Animation", "with", "the", "provided", "drawable", "state", "specs", "so", "that", "it", "will", "be", "run", "when", "the", "View", "s", "drawable", "state", "matches", "the", "specs", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/animation/StateAnimator.java#L55-L59
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NNStorage.java
NNStorage.writeTransactionIdFileToStorage
public void writeTransactionIdFileToStorage(long txid, FSImage image) throws IOException { """ Write a small file in all available storage directories that indicates that the namespace has reached some given transaction ID. This is used when the image is loaded to avoid accidental rollbacks in the case ...
java
public void writeTransactionIdFileToStorage(long txid, FSImage image) throws IOException { // Write txid marker in all storage directories List<StorageDirectory> badSDs = new ArrayList<StorageDirectory>(); for (StorageDirectory sd : storageDirs) { try { writeTransactionIdFile(sd, txid); ...
[ "public", "void", "writeTransactionIdFileToStorage", "(", "long", "txid", ",", "FSImage", "image", ")", "throws", "IOException", "{", "// Write txid marker in all storage directories", "List", "<", "StorageDirectory", ">", "badSDs", "=", "new", "ArrayList", "<", "Storag...
Write a small file in all available storage directories that indicates that the namespace has reached some given transaction ID. This is used when the image is loaded to avoid accidental rollbacks in the case where an edit log is fully deleted but there is no checkpoint. See TestNameEditsConfigs.testNameEditsConfigsFa...
[ "Write", "a", "small", "file", "in", "all", "available", "storage", "directories", "that", "indicates", "that", "the", "namespace", "has", "reached", "some", "given", "transaction", "ID", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NNStorage.java#L516-L534
op4j/op4j
src/main/java/org/op4j/functions/FnFunc.java
FnFunc.ifNotNullAndTrueThenElse
public static final <T,R> Function<T,R> ifNotNullAndTrueThenElse( final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,R> thenFunction, final IFunction<? super T,R> elseFunction) { """ <p> Builds a function that will execute the specified fu...
java
public static final <T,R> Function<T,R> ifNotNullAndTrueThenElse( final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,R> thenFunction, final IFunction<? super T,R> elseFunction) { return ifTrueThenElse(targetType, FnBoolean.and(FnObject....
[ "public", "static", "final", "<", "T", ",", "R", ">", "Function", "<", "T", ",", "R", ">", "ifNotNullAndTrueThenElse", "(", "final", "Type", "<", "T", ">", "targetType", ",", "final", "IFunction", "<", "?", "super", "T", ",", "Boolean", ">", "condition...
<p> Builds a function that will execute the specified function <tt>thenFunction</tt> only if the target object is not null and the result of executing <tt>condition</tt> on the target object is true, and will execute the specified function <tt>elseFunction</tt> otherwise. </p> <p> The built function can effectively cha...
[ "<p", ">", "Builds", "a", "function", "that", "will", "execute", "the", "specified", "function", "<tt", ">", "thenFunction<", "/", "tt", ">", "only", "if", "the", "target", "object", "is", "not", "null", "and", "the", "result", "of", "executing", "<tt", ...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnFunc.java#L396-L400
haraldk/TwelveMonkeys
imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/color/ColorSpaces.java
ColorSpaces.createColorSpace
public static ICC_ColorSpace createColorSpace(final ICC_Profile profile) { """ Creates an ICC color space from the given ICC color profile. <p /> For standard Java color spaces, the built-in instance is returned. Otherwise, color spaces are looked up from cache and created on demand. @param profile the ICC c...
java
public static ICC_ColorSpace createColorSpace(final ICC_Profile profile) { Validate.notNull(profile, "profile"); // Fix profile before lookup/create profileCleaner.fixProfile(profile); byte[] profileHeader = getProfileHeaderWithProfileId(profile); ICC_ColorSpace cs = getIntern...
[ "public", "static", "ICC_ColorSpace", "createColorSpace", "(", "final", "ICC_Profile", "profile", ")", "{", "Validate", ".", "notNull", "(", "profile", ",", "\"profile\"", ")", ";", "// Fix profile before lookup/create", "profileCleaner", ".", "fixProfile", "(", "prof...
Creates an ICC color space from the given ICC color profile. <p /> For standard Java color spaces, the built-in instance is returned. Otherwise, color spaces are looked up from cache and created on demand. @param profile the ICC color profile. May not be {@code null}. @return an ICC color space @throws IllegalArgument...
[ "Creates", "an", "ICC", "color", "space", "from", "the", "given", "ICC", "color", "profile", ".", "<p", "/", ">", "For", "standard", "Java", "color", "spaces", "the", "built", "-", "in", "instance", "is", "returned", ".", "Otherwise", "color", "spaces", ...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/color/ColorSpaces.java#L129-L143
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/Client.java
Client.wrapException
private IOException wrapException(InetSocketAddress addr, IOException exception) { """ Take an IOException and the address we were trying to connect to and return an IOException with the input exception as the cause. The new exception provides the stack trace of the place where the exception is thrown and some ...
java
private IOException wrapException(InetSocketAddress addr, IOException exception) { if (exception instanceof ConnectException) { // connection refused; include the host:port in the error return (ConnectException) new ConnectException("Call to " + addr + " failed on connection exception: " + exception).initCa...
[ "private", "IOException", "wrapException", "(", "InetSocketAddress", "addr", ",", "IOException", "exception", ")", "{", "if", "(", "exception", "instanceof", "ConnectException", ")", "{", "// connection refused; include the host:port in the error", "return", "(", "ConnectEx...
Take an IOException and the address we were trying to connect to and return an IOException with the input exception as the cause. The new exception provides the stack trace of the place where the exception is thrown and some extra diagnostics information. If the exception is ConnectException or SocketTimeoutException, ...
[ "Take", "an", "IOException", "and", "the", "address", "we", "were", "trying", "to", "connect", "to", "and", "return", "an", "IOException", "with", "the", "input", "exception", "as", "the", "cause", ".", "The", "new", "exception", "provides", "the", "stack", ...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/Client.java#L725-L738
BoltsFramework/Bolts-Android
bolts-tasks/src/main/java/bolts/Task.java
Task.continueWhile
public Task<Void> continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation) { """ Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation. """ return continueWhile(predicate, continuation, IMMEDIATE_EXECUTOR, nu...
java
public Task<Void> continueWhile(Callable<Boolean> predicate, Continuation<Void, Task<Void>> continuation) { return continueWhile(predicate, continuation, IMMEDIATE_EXECUTOR, null); }
[ "public", "Task", "<", "Void", ">", "continueWhile", "(", "Callable", "<", "Boolean", ">", "predicate", ",", "Continuation", "<", "Void", ",", "Task", "<", "Void", ">", ">", "continuation", ")", "{", "return", "continueWhile", "(", "predicate", ",", "conti...
Continues a task with the equivalent of a Task-based while loop, where the body of the loop is a task continuation.
[ "Continues", "a", "task", "with", "the", "equivalent", "of", "a", "Task", "-", "based", "while", "loop", "where", "the", "body", "of", "the", "loop", "is", "a", "task", "continuation", "." ]
train
https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L576-L579
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.addQuery
public QueryControllerQuery addQuery(String queryStr, String queryId) { """ Creates a new query and adds it to the vector QueryControllerEntity. @param queryStr The new query string, replacing any existing string. @param queryId The query id associated to the string. @return The query object. """ int ...
java
public QueryControllerQuery addQuery(String queryStr, String queryId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); if (position == -1) { // add to the collection for a new query. entities.add(query); fireElementAd...
[ "public", "QueryControllerQuery", "addQuery", "(", "String", "queryStr", ",", "String", "queryId", ")", "{", "int", "position", "=", "getElementPosition", "(", "queryId", ")", ";", "QueryControllerQuery", "query", "=", "new", "QueryControllerQuery", "(", "queryId", ...
Creates a new query and adds it to the vector QueryControllerEntity. @param queryStr The new query string, replacing any existing string. @param queryId The query id associated to the string. @return The query object.
[ "Creates", "a", "new", "query", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L130-L144
netty/netty
handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java
ReferenceCountedOpenSslEngine.writePlaintextData
private int writePlaintextData(final ByteBuffer src, int len) { """ Write plaintext data to the OpenSSL internal BIO Calling this function with src.remaining == 0 is undefined. """ final int pos = src.position(); final int limit = src.limit(); final int sslWrote; if (src.isD...
java
private int writePlaintextData(final ByteBuffer src, int len) { final int pos = src.position(); final int limit = src.limit(); final int sslWrote; if (src.isDirect()) { sslWrote = SSL.writeToSSL(ssl, bufferAddress(src) + pos, len); if (sslWrote > 0) { ...
[ "private", "int", "writePlaintextData", "(", "final", "ByteBuffer", "src", ",", "int", "len", ")", "{", "final", "int", "pos", "=", "src", ".", "position", "(", ")", ";", "final", "int", "limit", "=", "src", ".", "limit", "(", ")", ";", "final", "int...
Write plaintext data to the OpenSSL internal BIO Calling this function with src.remaining == 0 is undefined.
[ "Write", "plaintext", "data", "to", "the", "OpenSSL", "internal", "BIO" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java#L505-L534
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.stateIsTrue
@Throws(IllegalStateOfArgumentException.class) public static void stateIsTrue(final boolean expression, @Nonnull final String description) { """ Ensures that a given state is {@code true}. @param expression an expression that must be {@code true} to indicate a valid state @param description will be used in ...
java
@Throws(IllegalStateOfArgumentException.class) public static void stateIsTrue(final boolean expression, @Nonnull final String description) { if (!expression) { throw new IllegalStateOfArgumentException(description); } }
[ "@", "Throws", "(", "IllegalStateOfArgumentException", ".", "class", ")", "public", "static", "void", "stateIsTrue", "(", "final", "boolean", "expression", ",", "@", "Nonnull", "final", "String", "description", ")", "{", "if", "(", "!", "expression", ")", "{",...
Ensures that a given state is {@code true}. @param expression an expression that must be {@code true} to indicate a valid state @param description will be used in the error message to describe why the arguments caused an invalid state @throws IllegalStateOfArgumentException if the given arguments caused an invalid sta...
[ "Ensures", "that", "a", "given", "state", "is", "{", "@code", "true", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3308-L3313
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java
ServerDnsAliasesInner.createOrUpdateAsync
public Observable<ServerDnsAliasInner> createOrUpdateAsync(String resourceGroupName, String serverName, String dnsAliasName) { """ Creates a server dns alias. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the ...
java
public Observable<ServerDnsAliasInner> createOrUpdateAsync(String resourceGroupName, String serverName, String dnsAliasName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, dnsAliasName).map(new Func1<ServiceResponse<ServerDnsAliasInner>, ServerDnsAliasInner>() { @Over...
[ "public", "Observable", "<", "ServerDnsAliasInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "dnsAliasName", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "se...
Creates a server dns alias. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server that the alias is pointing to. @param dnsAliasName The name of the server DNS alias. @thr...
[ "Creates", "a", "server", "dns", "alias", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerDnsAliasesInner.java#L234-L241
hawtio/hawtio
hawtio-system/src/main/java/io/hawt/jmx/RBACRegistry.java
RBACRegistry.isSpecialClass
private String isSpecialClass(ObjectName nameObject, MBeanInfo mBeanInfo) { """ If some combination of {@link ObjectName} and MBean's class name is detected as <em>special</em>, we may cache the JSONified {@link MBeanInfo} as well @param nameObject @param mBeanInfo @return """ String domain = nameO...
java
private String isSpecialClass(ObjectName nameObject, MBeanInfo mBeanInfo) { String domain = nameObject.getDomain(); if ("org.apache.camel".equals(domain) && mBeanInfo.getClassName() != null) { // some real data in env with 12 Camel contexts deployed // - components (total: 102) ...
[ "private", "String", "isSpecialClass", "(", "ObjectName", "nameObject", ",", "MBeanInfo", "mBeanInfo", ")", "{", "String", "domain", "=", "nameObject", ".", "getDomain", "(", ")", ";", "if", "(", "\"org.apache.camel\"", ".", "equals", "(", "domain", ")", "&&",...
If some combination of {@link ObjectName} and MBean's class name is detected as <em>special</em>, we may cache the JSONified {@link MBeanInfo} as well @param nameObject @param mBeanInfo @return
[ "If", "some", "combination", "of", "{" ]
train
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/hawtio-system/src/main/java/io/hawt/jmx/RBACRegistry.java#L284-L304
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.getFunction
public static Method getFunction(String functionName) { """ get Method object implementing the given function @param functionName name of the searched function @return a Method object or null if not found """ Method method = FUNCTION_MAP.get(functionName); if (method != null) { return method;...
java
public static Method getFunction(String functionName) { Method method = FUNCTION_MAP.get(functionName); if (method != null) { return method; } String nameLower = functionName.toLowerCase(Locale.US); if (nameLower == functionName) { // Input name was in lower case, the function is not the...
[ "public", "static", "Method", "getFunction", "(", "String", "functionName", ")", "{", "Method", "method", "=", "FUNCTION_MAP", ".", "get", "(", "functionName", ")", ";", "if", "(", "method", "!=", "null", ")", "{", "return", "method", ";", "}", "String", ...
get Method object implementing the given function @param functionName name of the searched function @return a Method object or null if not found
[ "get", "Method", "object", "implementing", "the", "given", "function" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L58-L76
JavaMoney/jsr354-api
src/main/java/javax/money/MonetaryContext.java
MonetaryContext.from
public static MonetaryContext from(MonetaryContext monetaryContext, Class<? extends MonetaryAmount> amountClass) { """ Creates a new {@link }MonetaryContext). @param monetaryContext the base context, not null. @param amountClass the target amount class. @return a new corresponding MonetaryContext instance...
java
public static MonetaryContext from(MonetaryContext monetaryContext, Class<? extends MonetaryAmount> amountClass) { return MonetaryContextBuilder.of(amountClass).importContext(monetaryContext).build(); }
[ "public", "static", "MonetaryContext", "from", "(", "MonetaryContext", "monetaryContext", ",", "Class", "<", "?", "extends", "MonetaryAmount", ">", "amountClass", ")", "{", "return", "MonetaryContextBuilder", ".", "of", "(", "amountClass", ")", ".", "importContext",...
Creates a new {@link }MonetaryContext). @param monetaryContext the base context, not null. @param amountClass the target amount class. @return a new corresponding MonetaryContext instance.
[ "Creates", "a", "new", "{", "@link", "}", "MonetaryContext", ")", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/MonetaryContext.java#L143-L145
Waikato/moa
moa/src/main/java/moa/core/Utils.java
Utils.getFlag
public static boolean getFlag(String flag, String[] options) throws Exception { """ Checks if the given array contains the flag "-String". Stops searching at the first marker "--". If the flag is found, it is replaced with the empty string. @param flag the String indicating the flag. @param options the ...
java
public static boolean getFlag(String flag, String[] options) throws Exception { int pos = getOptionPos(flag, options); if (pos > -1) options[pos] = ""; return (pos > -1); }
[ "public", "static", "boolean", "getFlag", "(", "String", "flag", ",", "String", "[", "]", "options", ")", "throws", "Exception", "{", "int", "pos", "=", "getOptionPos", "(", "flag", ",", "options", ")", ";", "if", "(", "pos", ">", "-", "1", ")", "opt...
Checks if the given array contains the flag "-String". Stops searching at the first marker "--". If the flag is found, it is replaced with the empty string. @param flag the String indicating the flag. @param options the array of strings containing all the options. @return true if the flag was found @exception Exceptio...
[ "Checks", "if", "the", "given", "array", "contains", "the", "flag", "-", "String", ".", "Stops", "searching", "at", "the", "first", "marker", "--", ".", "If", "the", "flag", "is", "found", "it", "is", "replaced", "with", "the", "empty", "string", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/core/Utils.java#L482-L491
real-logic/agrona
agrona/src/main/java/org/agrona/SystemUtil.java
SystemUtil.parseDuration
public static long parseDuration(final String propertyName, final String propertyValue) { """ Parse a string representation of a time duration with an optional suffix of 's', 'ms', 'us', or 'ns' to indicate seconds, milliseconds, microseconds, or nanoseconds respectively. <p> If the resulting duration is greate...
java
public static long parseDuration(final String propertyName, final String propertyValue) { final char lastCharacter = propertyValue.charAt(propertyValue.length() - 1); if (Character.isDigit(lastCharacter)) { return Long.valueOf(propertyValue); } if (lastCharacter ...
[ "public", "static", "long", "parseDuration", "(", "final", "String", "propertyName", ",", "final", "String", "propertyValue", ")", "{", "final", "char", "lastCharacter", "=", "propertyValue", ".", "charAt", "(", "propertyValue", ".", "length", "(", ")", "-", "...
Parse a string representation of a time duration with an optional suffix of 's', 'ms', 'us', or 'ns' to indicate seconds, milliseconds, microseconds, or nanoseconds respectively. <p> If the resulting duration is greater than {@link Long#MAX_VALUE} then {@link Long#MAX_VALUE} is used. @param propertyName associated wi...
[ "Parse", "a", "string", "representation", "of", "a", "time", "duration", "with", "an", "optional", "suffix", "of", "s", "ms", "us", "or", "ns", "to", "indicate", "seconds", "milliseconds", "microseconds", "or", "nanoseconds", "respectively", ".", "<p", ">", ...
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/SystemUtil.java#L366-L407
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendExistsCriteria
private void appendExistsCriteria(ExistsCriteria c, StringBuffer buf) { """ Answer the SQL-Clause for an ExistsCriteria @param c ExistsCriteria """ Query subQuery = (Query) c.getValue(); buf.append(c.getClause()); appendSubQuery(subQuery, buf); }
java
private void appendExistsCriteria(ExistsCriteria c, StringBuffer buf) { Query subQuery = (Query) c.getValue(); buf.append(c.getClause()); appendSubQuery(subQuery, buf); }
[ "private", "void", "appendExistsCriteria", "(", "ExistsCriteria", "c", ",", "StringBuffer", "buf", ")", "{", "Query", "subQuery", "=", "(", "Query", ")", "c", ".", "getValue", "(", ")", ";", "buf", ".", "append", "(", "c", ".", "getClause", "(", ")", "...
Answer the SQL-Clause for an ExistsCriteria @param c ExistsCriteria
[ "Answer", "the", "SQL", "-", "Clause", "for", "an", "ExistsCriteria" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L711-L717
alkacon/opencms-core
src/org/opencms/search/CmsSearchUtil.java
CmsSearchUtil.getSolrRangeString
public static String getSolrRangeString(String from, String to) { """ Returns a string that represents a valid Solr query range. @param from Lower bound of the query range. @param to Upper bound of the query range. @return String that represents a Solr query range. """ // If a parameter is not in...
java
public static String getSolrRangeString(String from, String to) { // If a parameter is not initialized, use the asterisk '*' operator if (CmsStringUtil.isEmptyOrWhitespaceOnly(from)) { from = "*"; } if (CmsStringUtil.isEmptyOrWhitespaceOnly(to)) { to = "*"; ...
[ "public", "static", "String", "getSolrRangeString", "(", "String", "from", ",", "String", "to", ")", "{", "// If a parameter is not initialized, use the asterisk '*' operator", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "from", ")", ")", "{", "from...
Returns a string that represents a valid Solr query range. @param from Lower bound of the query range. @param to Upper bound of the query range. @return String that represents a Solr query range.
[ "Returns", "a", "string", "that", "represents", "a", "valid", "Solr", "query", "range", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchUtil.java#L277-L289
notnoop/java-apns
src/main/java/com/notnoop/apns/ApnsServiceBuilder.java
ApnsServiceBuilder.build
public ApnsService build() { """ Returns a fully initialized instance of {@link ApnsService}, according to the requested settings. @return a new instance of ApnsService """ checkInitialization(); ApnsService service; SSLSocketFactory sslFactory = sslContext.getSocketFactory(); ...
java
public ApnsService build() { checkInitialization(); ApnsService service; SSLSocketFactory sslFactory = sslContext.getSocketFactory(); ApnsFeedbackConnection feedback = new ApnsFeedbackConnection(sslFactory, feedbackHost, feedbackPort, proxy, readTimeout, connectTimeout, proxyUsername, p...
[ "public", "ApnsService", "build", "(", ")", "{", "checkInitialization", "(", ")", ";", "ApnsService", "service", ";", "SSLSocketFactory", "sslFactory", "=", "sslContext", ".", "getSocketFactory", "(", ")", ";", "ApnsFeedbackConnection", "feedback", "=", "new", "Ap...
Returns a fully initialized instance of {@link ApnsService}, according to the requested settings. @return a new instance of ApnsService
[ "Returns", "a", "fully", "initialized", "instance", "of", "{", "@link", "ApnsService", "}", "according", "to", "the", "requested", "settings", "." ]
train
https://github.com/notnoop/java-apns/blob/180a190d4cb49458441596ca7c69d50ec7f1dba5/src/main/java/com/notnoop/apns/ApnsServiceBuilder.java#L719-L747
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.updateAsync
public Observable<LabAccountInner> updateAsync(String resourceGroupName, String labAccountName, LabAccountFragment labAccount) { """ Modify properties of lab accounts. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab...
java
public Observable<LabAccountInner> updateAsync(String resourceGroupName, String labAccountName, LabAccountFragment labAccount) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labAccount).map(new Func1<ServiceResponse<LabAccountInner>, LabAccountInner>() { @Override ...
[ "public", "Observable", "<", "LabAccountInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "LabAccountFragment", "labAccount", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccou...
Modify properties of lab accounts. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labAccount Represents a lab account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LabAccountInner object
[ "Modify", "properties", "of", "lab", "accounts", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L1052-L1059
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.checkNull
public static Character checkNull(Character value, Character elseValue) { """ 检查Character是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Character} @since 1.0.8 """ return isNull(value) ? elseValue : value; }
java
public static Character checkNull(Character value, Character elseValue) { return isNull(value) ? elseValue : value; }
[ "public", "static", "Character", "checkNull", "(", "Character", "value", ",", "Character", "elseValue", ")", "{", "return", "isNull", "(", "value", ")", "?", "elseValue", ":", "value", ";", "}" ]
检查Character是否为null @param value 值 @param elseValue 为null返回的值 @return {@link Character} @since 1.0.8
[ "检查Character是否为null" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L1377-L1379
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java
NetworkConfig.setOrdererProperties
public void setOrdererProperties(String name, Properties properties) throws InvalidArgumentException { """ Set a specific orderer's properties. @param name The name of the orderer's property to set. @param properties The properties to set. @throws InvalidArgumentException """ setNodeProperti...
java
public void setOrdererProperties(String name, Properties properties) throws InvalidArgumentException { setNodeProperties("Orderer", name, orderers, properties); }
[ "public", "void", "setOrdererProperties", "(", "String", "name", ",", "Properties", "properties", ")", "throws", "InvalidArgumentException", "{", "setNodeProperties", "(", "\"Orderer\"", ",", "name", ",", "orderers", ",", "properties", ")", ";", "}" ]
Set a specific orderer's properties. @param name The name of the orderer's property to set. @param properties The properties to set. @throws InvalidArgumentException
[ "Set", "a", "specific", "orderer", "s", "properties", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/NetworkConfig.java#L187-L189
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AoImplCodeGen.java
AoImplCodeGen.writeResourceAdapter
private void writeResourceAdapter(Definition def, Writer out, int indent) throws IOException { """ Output ResourceAdapter method @param def definition @param out Writer @param indent space number @throws IOException ioException """ writeIndent(out, indent); out.write("/**\n"); wri...
java
private void writeResourceAdapter(Definition def, Writer out, int indent) throws IOException { writeIndent(out, indent); out.write("/**\n"); writeIndent(out, indent); out.write(" * Get the resource adapter\n"); writeIndent(out, indent); out.write(" *\n"); writeIndent(out, in...
[ "private", "void", "writeResourceAdapter", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "writeIndent", "(", "out", ",", "indent", ")", ";", "out", ".", "write", "(", "\"/**\\n\"", ")", ";", "write...
Output ResourceAdapter method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "ResourceAdapter", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/AoImplCodeGen.java#L208-L245
opengeospatial/teamengine
teamengine-spi/src/main/java/com/occamlab/te/spi/util/HtmlReport.java
HtmlReport.zipDir
public static void zipDir(File zipFile, File dirObj) throws Exception { """ Zips the directory and all of it's sub directories @param zipFile Path of zip file. @param dirObj Location of test result @throws Exception It will throw this exception if file not found. """ // File dirObj = new File(di...
java
public static void zipDir(File zipFile, File dirObj) throws Exception { // File dirObj = new File(dir); if (!dirObj.isDirectory()) { System.err.println(dirObj.getName() + " is not a directory"); System.exit(1); } try { ZipOutputStream out = ...
[ "public", "static", "void", "zipDir", "(", "File", "zipFile", ",", "File", "dirObj", ")", "throws", "Exception", "{", "// File dirObj = new File(dir);\r", "if", "(", "!", "dirObj", ".", "isDirectory", "(", ")", ")", "{", "System", ".", "err", ".", "println",...
Zips the directory and all of it's sub directories @param zipFile Path of zip file. @param dirObj Location of test result @throws Exception It will throw this exception if file not found.
[ "Zips", "the", "directory", "and", "all", "of", "it", "s", "sub", "directories" ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-spi/src/main/java/com/occamlab/te/spi/util/HtmlReport.java#L119-L141
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_dupl.java
Scs_dupl.cs_dupl
public static boolean cs_dupl(Scs A) { """ Removes and sums duplicate entries in a sparse matrix. @param A column-compressed matrix @return true if successful, false on error """ int i, j, p, q, nz = 0, n, m, Ap[], Ai[], w[]; float Ax[]; if (!Scs_util.CS_CSC(A)) ret...
java
public static boolean cs_dupl(Scs A) { int i, j, p, q, nz = 0, n, m, Ap[], Ai[], w[]; float Ax[]; if (!Scs_util.CS_CSC(A)) return (false); /* check inputs */ m = A.m; n = A.n; Ap = A.p; Ai = A.i; Ax = A.x; w = new int...
[ "public", "static", "boolean", "cs_dupl", "(", "Scs", "A", ")", "{", "int", "i", ",", "j", ",", "p", ",", "q", ",", "nz", "=", "0", ",", "n", ",", "m", ",", "Ap", "[", "]", ",", "Ai", "[", "]", ",", "w", "[", "]", ";", "float", "Ax", "[...
Removes and sums duplicate entries in a sparse matrix. @param A column-compressed matrix @return true if successful, false on error
[ "Removes", "and", "sums", "duplicate", "entries", "in", "a", "sparse", "matrix", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_dupl.java#L44-L74
wuman/JReadability
src/main/java/com/wuman/jreadability/Readability.java
Readability.scaleContentScore
private static Element scaleContentScore(Element node, float scale) { """ Scales the content score for an Element with a factor of scale. @param node @param scale @return """ int contentScore = getContentScore(node); contentScore *= scale; node.attr(CONTENT_SCORE, Integer.toString(...
java
private static Element scaleContentScore(Element node, float scale) { int contentScore = getContentScore(node); contentScore *= scale; node.attr(CONTENT_SCORE, Integer.toString(contentScore)); return node; }
[ "private", "static", "Element", "scaleContentScore", "(", "Element", "node", ",", "float", "scale", ")", "{", "int", "contentScore", "=", "getContentScore", "(", "node", ")", ";", "contentScore", "*=", "scale", ";", "node", ".", "attr", "(", "CONTENT_SCORE", ...
Scales the content score for an Element with a factor of scale. @param node @param scale @return
[ "Scales", "the", "content", "score", "for", "an", "Element", "with", "a", "factor", "of", "scale", "." ]
train
https://github.com/wuman/JReadability/blob/16c18c42402bd13c6e024c2fd3a86dd28ba53e74/src/main/java/com/wuman/jreadability/Readability.java#L864-L869
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/equals/EqualsHelper.java
EqualsHelper.identityEqual
public static <T> boolean identityEqual (@Nullable final T aObj1, @Nullable final T aObj2) { """ The only place where objects are compared by identity. @param aObj1 First object. May be <code>null</code>. @param aObj2 Second object. May be <code>null</code>. @return <code>true</code> if both objects are <co...
java
public static <T> boolean identityEqual (@Nullable final T aObj1, @Nullable final T aObj2) { return aObj1 == aObj2; }
[ "public", "static", "<", "T", ">", "boolean", "identityEqual", "(", "@", "Nullable", "final", "T", "aObj1", ",", "@", "Nullable", "final", "T", "aObj2", ")", "{", "return", "aObj1", "==", "aObj2", ";", "}" ]
The only place where objects are compared by identity. @param aObj1 First object. May be <code>null</code>. @param aObj2 Second object. May be <code>null</code>. @return <code>true</code> if both objects are <code>null</code> or reference the same object. @param <T> Type to check.
[ "The", "only", "place", "where", "objects", "are", "compared", "by", "identity", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/equals/EqualsHelper.java#L64-L67
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java
CmsJspContentAccessValueWrapper.createWrapper
public static CmsJspContentAccessValueWrapper createWrapper( CmsObject cms, I_CmsXmlContentValue value, I_CmsXmlContentValue parentValue, String valueName) { """ Factory method to create a new XML content value wrapper.<p> In case either parameter is <code>null</code>, the {@link...
java
public static CmsJspContentAccessValueWrapper createWrapper( CmsObject cms, I_CmsXmlContentValue value, I_CmsXmlContentValue parentValue, String valueName) { if ((value != null) && (cms != null)) { return new CmsJspContentAccessValueWrapper(cms, value); } ...
[ "public", "static", "CmsJspContentAccessValueWrapper", "createWrapper", "(", "CmsObject", "cms", ",", "I_CmsXmlContentValue", "value", ",", "I_CmsXmlContentValue", "parentValue", ",", "String", "valueName", ")", "{", "if", "(", "(", "value", "!=", "null", ")", "&&",...
Factory method to create a new XML content value wrapper.<p> In case either parameter is <code>null</code>, the {@link #NULL_VALUE_WRAPPER} is returned.<p> @param cms the current users OpenCms context @param value the value to warp @param parentValue the parent value, required to set the null value info @param valueN...
[ "Factory", "method", "to", "create", "a", "new", "XML", "content", "value", "wrapper", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java#L387-L404
m-m-m/util
io/src/main/java/net/sf/mmm/util/file/base/FileAccessPermissions.java
FileAccessPermissions.shiftMask
private int shiftMask(FileAccessClass fileModeClass, int bitMask) { """ This method shifts the given {@code bitMask} according to the given {@code fileModeClass}. @param fileModeClass is the class of access ( {@link FileAccessClass#USER}, {@link FileAccessClass#GROUP}, or {@link FileAccessClass#OTHERS}). @par...
java
private int shiftMask(FileAccessClass fileModeClass, int bitMask) { if (fileModeClass == FileAccessClass.USER) { return bitMask << 6; } else if (fileModeClass == FileAccessClass.GROUP) { return bitMask << 3; } else if (fileModeClass == FileAccessClass.OTHERS) { return bitMask; } t...
[ "private", "int", "shiftMask", "(", "FileAccessClass", "fileModeClass", ",", "int", "bitMask", ")", "{", "if", "(", "fileModeClass", "==", "FileAccessClass", ".", "USER", ")", "{", "return", "bitMask", "<<", "6", ";", "}", "else", "if", "(", "fileModeClass",...
This method shifts the given {@code bitMask} according to the given {@code fileModeClass}. @param fileModeClass is the class of access ( {@link FileAccessClass#USER}, {@link FileAccessClass#GROUP}, or {@link FileAccessClass#OTHERS}). @param bitMask is the bit-mask to shift. @return the shifted {@code bitMask}.
[ "This", "method", "shifts", "the", "given", "{", "@code", "bitMask", "}", "according", "to", "the", "given", "{", "@code", "fileModeClass", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/io/src/main/java/net/sf/mmm/util/file/base/FileAccessPermissions.java#L315-L325
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpMethodBase.java
HttpMethodBase.addRequestHeaders
protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { """ Generates all the required request {@link Header header}s to be submitted via the given {@link HttpConnection connection}. <p> This implementation adds <tt>User-Agent</tt>, <tt>Host</tt>, <tt>Co...
java
protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.addRequestHeaders(HttpState, " + "HttpConnection)"); addHostRequestHeader(state, conn); addCookieRequestHeader(state, conn); addProx...
[ "protected", "void", "addRequestHeaders", "(", "HttpState", "state", ",", "HttpConnection", "conn", ")", "throws", "IOException", ",", "HttpException", "{", "LOG", ".", "trace", "(", "\"enter HttpMethodBase.addRequestHeaders(HttpState, \"", "+", "\"HttpConnection)\"", ")"...
Generates all the required request {@link Header header}s to be submitted via the given {@link HttpConnection connection}. <p> This implementation adds <tt>User-Agent</tt>, <tt>Host</tt>, <tt>Cookie</tt>, <tt>Authorization</tt>, <tt>Proxy-Authorization</tt> and <tt>Proxy-Connection</tt> headers, when appropriate. </p>...
[ "Generates", "all", "the", "required", "request", "{", "@link", "Header", "header", "}", "s", "to", "be", "submitted", "via", "the", "given", "{", "@link", "HttpConnection", "connection", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpMethodBase.java#L1550-L1558
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/mappings/Mappings.java
Mappings.safeGet
public static <D, R> R safeGet(Mapping<? super D, R> mapping, D key, R fallback) { """ Safely retrieves a value from a mapping. If the mapping is <code>null</code> or returns a <code>null</code> value, the given fallback value is returned. @param mapping the mapping. @param key the key. @param fallback th...
java
public static <D, R> R safeGet(Mapping<? super D, R> mapping, D key, R fallback) { if (mapping == null) { return fallback; } R val = mapping.get(key); if (val == null) { return fallback; } return val; }
[ "public", "static", "<", "D", ",", "R", ">", "R", "safeGet", "(", "Mapping", "<", "?", "super", "D", ",", "R", ">", "mapping", ",", "D", "key", ",", "R", "fallback", ")", "{", "if", "(", "mapping", "==", "null", ")", "{", "return", "fallback", ...
Safely retrieves a value from a mapping. If the mapping is <code>null</code> or returns a <code>null</code> value, the given fallback value is returned. @param mapping the mapping. @param key the key. @param fallback the fallback value to return if either the mapping or the originally returned value are <code>null</co...
[ "Safely", "retrieves", "a", "value", "from", "a", "mapping", ".", "If", "the", "mapping", "is", "<code", ">", "null<", "/", "code", ">", "or", "returns", "a", "<code", ">", "null<", "/", "code", ">", "value", "the", "given", "fallback", "value", "is", ...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/mappings/Mappings.java#L230-L239
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.flushHotCacheSlot
private void flushHotCacheSlot(SlotReference slot) { """ Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no longer valid. """ // Iterate over a copy to avoid concurrent modification issues for (Map.Entry<DeckReference, TrackMetadata> en...
java
private void flushHotCacheSlot(SlotReference slot) { // Iterate over a copy to avoid concurrent modification issues for (Map.Entry<DeckReference, TrackMetadata> entry : new HashMap<DeckReference,TrackMetadata>(hotCache).entrySet()) { if (slot == SlotReference.getSlotReference(entry.getValue(...
[ "private", "void", "flushHotCacheSlot", "(", "SlotReference", "slot", ")", "{", "// Iterate over a copy to avoid concurrent modification issues", "for", "(", "Map", ".", "Entry", "<", "DeckReference", ",", "TrackMetadata", ">", "entry", ":", "new", "HashMap", "<", "De...
Discards any tracks from the hot cache that were loaded from a now-unmounted media slot, because they are no longer valid.
[ "Discards", "any", "tracks", "from", "the", "hot", "cache", "that", "were", "loaded", "from", "a", "now", "-", "unmounted", "media", "slot", "because", "they", "are", "no", "longer", "valid", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L715-L723
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ClassDescriptorConstraints.java
ClassDescriptorConstraints.checkPrimaryKey
private void checkPrimaryKey(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException { """ Checks whether given class descriptor has a primary key. @param classDef The class descriptor @param checkLevel The current check level (this constraint is only checked in strict) @exception Constra...
java
private void checkPrimaryKey(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException { if (CHECKLEVEL_NONE.equals(checkLevel)) { return; } if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_GENERATE_TABLE_INFO, true) && cla...
[ "private", "void", "checkPrimaryKey", "(", "ClassDescriptorDef", "classDef", ",", "String", "checkLevel", ")", "throws", "ConstraintException", "{", "if", "(", "CHECKLEVEL_NONE", ".", "equals", "(", "checkLevel", ")", ")", "{", "return", ";", "}", "if", "(", "...
Checks whether given class descriptor has a primary key. @param classDef The class descriptor @param checkLevel The current check level (this constraint is only checked in strict) @exception ConstraintException If the constraint has been violated
[ "Checks", "whether", "given", "class", "descriptor", "has", "a", "primary", "key", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ClassDescriptorConstraints.java#L390-L405
jenkinsci/jenkins
core/src/main/java/hudson/PluginWrapper.java
PluginWrapper.versionDependencyError
private void versionDependencyError(String message, String actual, String minimum) { """ Called when there appears to be a core or plugin version which is too old for a stated dependency. Normally records an error in {@link #dependencyErrors}. But if one or both versions {@link #isSnapshot}, just issue a warning...
java
private void versionDependencyError(String message, String actual, String minimum) { if (isSnapshot(actual) || isSnapshot(minimum)) { LOGGER.log(WARNING, "Suppressing dependency error in {0} v{1}: {2}", new Object[] {getLongName(), getVersion(), message}); } else { dependencyErro...
[ "private", "void", "versionDependencyError", "(", "String", "message", ",", "String", "actual", ",", "String", "minimum", ")", "{", "if", "(", "isSnapshot", "(", "actual", ")", "||", "isSnapshot", "(", "minimum", ")", ")", "{", "LOGGER", ".", "log", "(", ...
Called when there appears to be a core or plugin version which is too old for a stated dependency. Normally records an error in {@link #dependencyErrors}. But if one or both versions {@link #isSnapshot}, just issue a warning (JENKINS-52665).
[ "Called", "when", "there", "appears", "to", "be", "a", "core", "or", "plugin", "version", "which", "is", "too", "old", "for", "a", "stated", "dependency", ".", "Normally", "records", "an", "error", "in", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/PluginWrapper.java#L881-L887
lets-blade/blade
src/main/java/com/blade/server/netty/RouteMethodHandler.java
RouteMethodHandler.invokeHook
private boolean invokeHook(List<Route> hooks, RouteContext context) throws Exception { """ invoke hooks @param hooks webHook list @param context http request @return return invoke hook is abort """ for (Route hook : hooks) { if (hook.getTargetType() == RouteHandler.class) { ...
java
private boolean invokeHook(List<Route> hooks, RouteContext context) throws Exception { for (Route hook : hooks) { if (hook.getTargetType() == RouteHandler.class) { RouteHandler routeHandler = (RouteHandler) hook.getTarget(); routeHandler.handle(context); ...
[ "private", "boolean", "invokeHook", "(", "List", "<", "Route", ">", "hooks", ",", "RouteContext", "context", ")", "throws", "Exception", "{", "for", "(", "Route", "hook", ":", "hooks", ")", "{", "if", "(", "hook", ".", "getTargetType", "(", ")", "==", ...
invoke hooks @param hooks webHook list @param context http request @return return invoke hook is abort
[ "invoke", "hooks" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/server/netty/RouteMethodHandler.java#L348-L365
cdapio/tigon
tigon-queue/src/main/java/co/cask/tigon/data/transaction/queue/QueueEntryRow.java
QueueEntryRow.isQueueEntry
public static boolean isQueueEntry(byte[] queueRowPrefix, KeyValue keyValue) { """ Returns true if the given KeyValue row is a queue entry of the given queue based on queue row prefix """ return isQueueEntry(queueRowPrefix, keyValue.getBuffer(), keyValue.getRowOffset(), keyValue.getRowLength()); }
java
public static boolean isQueueEntry(byte[] queueRowPrefix, KeyValue keyValue) { return isQueueEntry(queueRowPrefix, keyValue.getBuffer(), keyValue.getRowOffset(), keyValue.getRowLength()); }
[ "public", "static", "boolean", "isQueueEntry", "(", "byte", "[", "]", "queueRowPrefix", ",", "KeyValue", "keyValue", ")", "{", "return", "isQueueEntry", "(", "queueRowPrefix", ",", "keyValue", ".", "getBuffer", "(", ")", ",", "keyValue", ".", "getRowOffset", "...
Returns true if the given KeyValue row is a queue entry of the given queue based on queue row prefix
[ "Returns", "true", "if", "the", "given", "KeyValue", "row", "is", "a", "queue", "entry", "of", "the", "given", "queue", "based", "on", "queue", "row", "prefix" ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-queue/src/main/java/co/cask/tigon/data/transaction/queue/QueueEntryRow.java#L134-L136
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuTexRefGetFormat
public static int cuTexRefGetFormat(int pFormat[], int pNumChannels[], CUtexref hTexRef) { """ Gets the format used by a texture reference. <pre> CUresult cuTexRefGetFormat ( CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef ) </pre> <div> <p>Gets the format used by a texture reference. Retu...
java
public static int cuTexRefGetFormat(int pFormat[], int pNumChannels[], CUtexref hTexRef) { return checkResult(cuTexRefGetFormatNative(pFormat, pNumChannels, hTexRef)); }
[ "public", "static", "int", "cuTexRefGetFormat", "(", "int", "pFormat", "[", "]", ",", "int", "pNumChannels", "[", "]", ",", "CUtexref", "hTexRef", ")", "{", "return", "checkResult", "(", "cuTexRefGetFormatNative", "(", "pFormat", ",", "pNumChannels", ",", "hTe...
Gets the format used by a texture reference. <pre> CUresult cuTexRefGetFormat ( CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef ) </pre> <div> <p>Gets the format used by a texture reference. Returns in <tt>*pFormat</tt> and <tt>*pNumChannels</tt> the format and number of components of the CUDA array boun...
[ "Gets", "the", "format", "used", "by", "a", "texture", "reference", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L10606-L10609
kaazing/gateway
service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyServiceHandler.java
HttpProxyServiceHandler.processRequestHeaders
private void processRequestHeaders(HttpAcceptSession acceptSession, HttpConnectSession connectSession) { """ /* Write all (except hop-by-hop) request headers from accept session to connect session. If the request is an upgrade one, let the Upgrade header go through as this service supports upgrade """ ...
java
private void processRequestHeaders(HttpAcceptSession acceptSession, HttpConnectSession connectSession) { boolean upgrade = processHopByHopHeaders(acceptSession, connectSession); // Add Connection: upgrade or Connection: close header if (upgrade) { connectSession.setWriteHeader(HEADE...
[ "private", "void", "processRequestHeaders", "(", "HttpAcceptSession", "acceptSession", ",", "HttpConnectSession", "connectSession", ")", "{", "boolean", "upgrade", "=", "processHopByHopHeaders", "(", "acceptSession", ",", "connectSession", ")", ";", "// Add Connection: upgr...
/* Write all (except hop-by-hop) request headers from accept session to connect session. If the request is an upgrade one, let the Upgrade header go through as this service supports upgrade
[ "/", "*", "Write", "all", "(", "except", "hop", "-", "by", "-", "hop", ")", "request", "headers", "from", "accept", "session", "to", "connect", "session", ".", "If", "the", "request", "is", "an", "upgrade", "one", "let", "the", "Upgrade", "header", "go...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyServiceHandler.java#L468-L488
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java
FieldDescriptorConstraints.ensureColumn
private void ensureColumn(FieldDescriptorDef fieldDef, String checkLevel) { """ Constraint that ensures that the field has a column property. If none is specified, then the name of the field is used. @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked i...
java
private void ensureColumn(FieldDescriptorDef fieldDef, String checkLevel) { if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_COLUMN)) { String javaname = fieldDef.getName(); if (fieldDef.isNested()) { int pos = javaname.indexOf(":...
[ "private", "void", "ensureColumn", "(", "FieldDescriptorDef", "fieldDef", ",", "String", "checkLevel", ")", "{", "if", "(", "!", "fieldDef", ".", "hasProperty", "(", "PropertyHelper", ".", "OJB_PROPERTY_COLUMN", ")", ")", "{", "String", "javaname", "=", "fieldDe...
Constraint that ensures that the field has a column property. If none is specified, then the name of the field is used. @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked in all levels)
[ "Constraint", "that", "ensures", "that", "the", "field", "has", "a", "column", "property", ".", "If", "none", "is", "specified", "then", "the", "name", "of", "the", "field", "is", "used", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L103-L139
finmath/finmath-lib
src/main/java/net/finmath/marketdata/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static double getSwapAnnuity(Schedule schedule, DiscountCurve discountCurve) { """ Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note: This method will consider evaluationTime being 0, see {@link net.finmath.marketdata.products.SwapAnnuity#getSwapAnnuity(doubl...
java
public static double getSwapAnnuity(Schedule schedule, DiscountCurve discountCurve) { double evaluationTime = 0.0; // Consider only payment time > 0 return getSwapAnnuity(evaluationTime, schedule, discountCurve, null); }
[ "public", "static", "double", "getSwapAnnuity", "(", "Schedule", "schedule", ",", "DiscountCurve", "discountCurve", ")", "{", "double", "evaluationTime", "=", "0.0", ";", "// Consider only payment time > 0", "return", "getSwapAnnuity", "(", "evaluationTime", ",", "sched...
Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note: This method will consider evaluationTime being 0, see {@link net.finmath.marketdata.products.SwapAnnuity#getSwapAnnuity(double, Schedule, DiscountCurve, AnalyticModel)}. @param schedule The schedule discretization, i.e., ...
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "swap", "annuity", "for", "a", "given", "schedule", "and", "discount", "curve", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/products/SwapAnnuity.java#L83-L86
eserating/siren4j
src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java
ReflectingConverter.isCollection
public boolean isCollection(Object obj, Field field) { """ Determine if the field is a Collection class and not a CollectionResource class which needs special treatment. @param field @return """ try { Object val = field.get(obj); boolean isCollResource = false; ...
java
public boolean isCollection(Object obj, Field field) { try { Object val = field.get(obj); boolean isCollResource = false; if (val != null) { isCollResource = CollectionResource.class.equals(val.getClass()); } return (!isCollResou...
[ "public", "boolean", "isCollection", "(", "Object", "obj", ",", "Field", "field", ")", "{", "try", "{", "Object", "val", "=", "field", ".", "get", "(", "obj", ")", ";", "boolean", "isCollResource", "=", "false", ";", "if", "(", "val", "!=", "null", "...
Determine if the field is a Collection class and not a CollectionResource class which needs special treatment. @param field @return
[ "Determine", "if", "the", "field", "is", "a", "Collection", "class", "and", "not", "a", "CollectionResource", "class", "which", "needs", "special", "treatment", "." ]
train
https://github.com/eserating/siren4j/blob/f12e3185076ad920352ec4f6eb2a071a3683505f/src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java#L971-L984
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/jni/Serial.java
Serial.write
public synchronized static void write(int fd, char ... data) throws IOException { """ <p>Sends an array of ASCII characters to the serial port/device identified by the given file descriptor.</p> @param fd The file descriptor of the serial port/device. @param data One or more ASCII characters (or an array) of...
java
public synchronized static void write(int fd, char ... data) throws IOException { // write the buffer contents to the serial port via JNI native method write(fd, StandardCharsets.US_ASCII, CharBuffer.wrap(data)); }
[ "public", "synchronized", "static", "void", "write", "(", "int", "fd", ",", "char", "...", "data", ")", "throws", "IOException", "{", "// write the buffer contents to the serial port via JNI native method", "write", "(", "fd", ",", "StandardCharsets", ".", "US_ASCII", ...
<p>Sends an array of ASCII characters to the serial port/device identified by the given file descriptor.</p> @param fd The file descriptor of the serial port/device. @param data One or more ASCII characters (or an array) of data to be transmitted. (variable-length-argument)
[ "<p", ">", "Sends", "an", "array", "of", "ASCII", "characters", "to", "the", "serial", "port", "/", "device", "identified", "by", "the", "given", "file", "descriptor", ".", "<", "/", "p", ">" ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/jni/Serial.java#L810-L814
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java
AiMaterial.getTextureInfo
public AiTextureInfo getTextureInfo(AiTextureType type, int index) { """ Returns all information related to a single texture. @param type the texture type @param index the index in the texture stack @return the texture information """ return new AiTextureInfo(type, index, getTextureFile(type, inde...
java
public AiTextureInfo getTextureInfo(AiTextureType type, int index) { return new AiTextureInfo(type, index, getTextureFile(type, index), getTextureUVIndex(type, index), getBlendFactor(type, index), getTextureOp(type, index), getTextureMapModeW(type, index), getT...
[ "public", "AiTextureInfo", "getTextureInfo", "(", "AiTextureType", "type", ",", "int", "index", ")", "{", "return", "new", "AiTextureInfo", "(", "type", ",", "index", ",", "getTextureFile", "(", "type", ",", "index", ")", ",", "getTextureUVIndex", "(", "type",...
Returns all information related to a single texture. @param type the texture type @param index the index in the texture stack @return the texture information
[ "Returns", "all", "information", "related", "to", "a", "single", "texture", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1159-L1165
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addPreQualifiedClassLink
public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, TypeElement typeElement, Content contentTree) { """ Add the class link. @param context the id of the context where the link will be added @param typeElement to link to @param contentTree the content tree to which the link will be added """ ...
java
public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, TypeElement typeElement, Content contentTree) { addPreQualifiedClassLink(context, typeElement, false, contentTree); }
[ "public", "void", "addPreQualifiedClassLink", "(", "LinkInfoImpl", ".", "Kind", "context", ",", "TypeElement", "typeElement", ",", "Content", "contentTree", ")", "{", "addPreQualifiedClassLink", "(", "context", ",", "typeElement", ",", "false", ",", "contentTree", "...
Add the class link. @param context the id of the context where the link will be added @param typeElement to link to @param contentTree the content tree to which the link will be added
[ "Add", "the", "class", "link", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1283-L1285
jbundle/jbundle
main/screen/src/main/java/org/jbundle/main/user/screen/UserLoginScreen.java
UserLoginScreen.addToolbars
public ToolScreen addToolbars() { """ Add the toolbars that belong with this screen. @return The new toolbar. """ ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null); new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConst...
java
public ToolScreen addToolbars() { ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null); new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.RESET);...
[ "public", "ToolScreen", "addToolbars", "(", ")", "{", "ToolScreen", "screen", "=", "new", "ToolScreen", "(", "null", ",", "this", ",", "null", ",", "ScreenConstants", ".", "DONT_DISPLAY_FIELD_DESC", ",", "null", ")", ";", "new", "SCannedBox", "(", "screen", ...
Add the toolbars that belong with this screen. @return The new toolbar.
[ "Add", "the", "toolbars", "that", "belong", "with", "this", "screen", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/screen/src/main/java/org/jbundle/main/user/screen/UserLoginScreen.java#L108-L118
deeplearning4j/deeplearning4j
nd4j/nd4j-serde/nd4j-grpc/src/main/java/org/nd4j/graph/GraphInferenceGrpcClient.java
GraphInferenceGrpcClient.output
public INDArray[] output(long graphId, Pair<String, INDArray>... inputs) { """ This method sends inference request to the GraphServer instance, and returns result as array of INDArrays @param graphId id of the graph @param inputs graph inputs with their string ides @return """ val operands = new Ope...
java
public INDArray[] output(long graphId, Pair<String, INDArray>... inputs) { val operands = new Operands(); for (val in:inputs) operands.addArgument(in.getFirst(), in.getSecond()); return output(graphId, operands).asArray(); }
[ "public", "INDArray", "[", "]", "output", "(", "long", "graphId", ",", "Pair", "<", "String", ",", "INDArray", ">", "...", "inputs", ")", "{", "val", "operands", "=", "new", "Operands", "(", ")", ";", "for", "(", "val", "in", ":", "inputs", ")", "o...
This method sends inference request to the GraphServer instance, and returns result as array of INDArrays @param graphId id of the graph @param inputs graph inputs with their string ides @return
[ "This", "method", "sends", "inference", "request", "to", "the", "GraphServer", "instance", "and", "returns", "result", "as", "array", "of", "INDArrays" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-serde/nd4j-grpc/src/main/java/org/nd4j/graph/GraphInferenceGrpcClient.java#L183-L189
apiman/apiman
common/config/src/main/java/io/apiman/common/config/ConfigFileConfiguration.java
ConfigFileConfiguration.findConfigUrlInDirectory
protected static URL findConfigUrlInDirectory(File directory, String configName) { """ Returns a URL to a file with the given name inside the given directory. """ if (directory.isDirectory()) { File cfile = new File(directory, configName); if (cfile.isFile()) { t...
java
protected static URL findConfigUrlInDirectory(File directory, String configName) { if (directory.isDirectory()) { File cfile = new File(directory, configName); if (cfile.isFile()) { try { return cfile.toURI().toURL(); } catch (Malformed...
[ "protected", "static", "URL", "findConfigUrlInDirectory", "(", "File", "directory", ",", "String", "configName", ")", "{", "if", "(", "directory", ".", "isDirectory", "(", ")", ")", "{", "File", "cfile", "=", "new", "File", "(", "directory", ",", "configName...
Returns a URL to a file with the given name inside the given directory.
[ "Returns", "a", "URL", "to", "a", "file", "with", "the", "given", "name", "inside", "the", "given", "directory", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/config/src/main/java/io/apiman/common/config/ConfigFileConfiguration.java#L46-L58
OpenTSDB/opentsdb
src/tsd/client/QueryUi.java
QueryUi.setOffsetWidth
private static void setOffsetWidth(final Widget widget, int width) { """ Properly sets the total width of a widget. This takes into account decorations such as border, margin, and padding. """ widget.setWidth(width + "px"); final int offset = widget.getOffsetWidth(); if (offset > 0) { width ...
java
private static void setOffsetWidth(final Widget widget, int width) { widget.setWidth(width + "px"); final int offset = widget.getOffsetWidth(); if (offset > 0) { width -= offset - width; if (width > 0) { widget.setWidth(width + "px"); } } }
[ "private", "static", "void", "setOffsetWidth", "(", "final", "Widget", "widget", ",", "int", "width", ")", "{", "widget", ".", "setWidth", "(", "width", "+", "\"px\"", ")", ";", "final", "int", "offset", "=", "widget", ".", "getOffsetWidth", "(", ")", ";...
Properly sets the total width of a widget. This takes into account decorations such as border, margin, and padding.
[ "Properly", "sets", "the", "total", "width", "of", "a", "widget", ".", "This", "takes", "into", "account", "decorations", "such", "as", "border", "margin", "and", "padding", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/client/QueryUi.java#L1413-L1422
KyoriPowered/text
api/src/main/java/net/kyori/text/TranslatableComponent.java
TranslatableComponent.make
public static TranslatableComponent make(final @NonNull String key, final @NonNull List<Component> args, final @NonNull Consumer<Builder> consumer) { """ Creates a translatable component by applying configuration from {@code consumer}. @param key the translation key @param args the translation arguments @para...
java
public static TranslatableComponent make(final @NonNull String key, final @NonNull List<Component> args, final @NonNull Consumer<Builder> consumer) { final Builder builder = builder(key).args(args); consumer.accept(builder); return builder.build(); }
[ "public", "static", "TranslatableComponent", "make", "(", "final", "@", "NonNull", "String", "key", ",", "final", "@", "NonNull", "List", "<", "Component", ">", "args", ",", "final", "@", "NonNull", "Consumer", "<", "Builder", ">", "consumer", ")", "{", "f...
Creates a translatable component by applying configuration from {@code consumer}. @param key the translation key @param args the translation arguments @param consumer the builder configurator @return the translatable component
[ "Creates", "a", "translatable", "component", "by", "applying", "configuration", "from", "{", "@code", "consumer", "}", "." ]
train
https://github.com/KyoriPowered/text/blob/4496c593bf89e8fb036dd6efe26f8ac60f7655c9/api/src/main/java/net/kyori/text/TranslatableComponent.java#L224-L228
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java
AbstractJaxbMojo.getEpisodeFile
protected File getEpisodeFile(final String episodeFileName) throws MojoExecutionException { """ Retrieves a File to the JAXB Episode (which is normally written during the XJC process). Moreover, ensures that the parent directory of that File is created, to enable writing the File. @param episodeFileName {@code...
java
protected File getEpisodeFile(final String episodeFileName) throws MojoExecutionException { // Get the execution ID final String executionID = getExecution() != null && getExecution().getExecutionId() != null ? getExecution().getExecutionId() : null; final Strin...
[ "protected", "File", "getEpisodeFile", "(", "final", "String", "episodeFileName", ")", "throws", "MojoExecutionException", "{", "// Get the execution ID", "final", "String", "executionID", "=", "getExecution", "(", ")", "!=", "null", "&&", "getExecution", "(", ")", ...
Retrieves a File to the JAXB Episode (which is normally written during the XJC process). Moreover, ensures that the parent directory of that File is created, to enable writing the File. @param episodeFileName {@code null} to indicate that the standard episode file name ("sun-jaxb.episode") should be used, and otherwis...
[ "Retrieves", "a", "File", "to", "the", "JAXB", "Episode", "(", "which", "is", "normally", "written", "during", "the", "XJC", "process", ")", ".", "Moreover", "ensures", "that", "the", "parent", "directory", "of", "that", "File", "is", "created", "to", "ena...
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java#L522-L574
threerings/nenya
core/src/main/java/com/threerings/media/tile/bundle/BundledTileSetRepository.java
BundledTileSetRepository.addBundle
protected void addBundle (HashIntMap<TileSet> idmap, HashMap<String, Integer> namemap, TileSetBundle bundle) { """ Adds the tilesets in the supplied bundle to our tileset mapping tables. Any tilesets with the same name or id will be overwritten. """ IMImageProvider improv...
java
protected void addBundle (HashIntMap<TileSet> idmap, HashMap<String, Integer> namemap, TileSetBundle bundle) { IMImageProvider improv = (_imgr == null) ? null : new IMImageProvider(_imgr, bundle); // map all of the tilesets in this bundle for (IntMa...
[ "protected", "void", "addBundle", "(", "HashIntMap", "<", "TileSet", ">", "idmap", ",", "HashMap", "<", "String", ",", "Integer", ">", "namemap", ",", "TileSetBundle", "bundle", ")", "{", "IMImageProvider", "improv", "=", "(", "_imgr", "==", "null", ")", "...
Adds the tilesets in the supplied bundle to our tileset mapping tables. Any tilesets with the same name or id will be overwritten.
[ "Adds", "the", "tilesets", "in", "the", "supplied", "bundle", "to", "our", "tileset", "mapping", "tables", ".", "Any", "tilesets", "with", "the", "same", "name", "or", "id", "will", "be", "overwritten", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/tile/bundle/BundledTileSetRepository.java#L142-L156
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
EntityREST.updateClassification
@PUT @Path("/guid/ { """ Updates classifications to an existing entity represented by a guid. @param guid globally unique identifier for the entity @return classification for the given entity guid """guid}/classifications") @Produces(Servlets.JSON_MEDIA_TYPE) public void updateClassification(@Pa...
java
@PUT @Path("/guid/{guid}/classifications") @Produces(Servlets.JSON_MEDIA_TYPE) public void updateClassification(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { AtlasPerfTracer perf = null; try { if (AtlasPerfTracer.isP...
[ "@", "PUT", "@", "Path", "(", "\"/guid/{guid}/classifications\"", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "void", "updateClassification", "(", "@", "PathParam", "(", "\"guid\"", ")", "final", "String", "guid", ",", "List", ...
Updates classifications to an existing entity represented by a guid. @param guid globally unique identifier for the entity @return classification for the given entity guid
[ "Updates", "classifications", "to", "an", "existing", "entity", "represented", "by", "a", "guid", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java#L355-L375
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/Icon.java
Icon.setUVs
public void setUVs(float u, float v, float U, float V) { """ Sets the u vs. @param u the u @param v the v @param U the u @param V the v """ minU = u; minV = v; maxU = U; maxV = V; }
java
public void setUVs(float u, float v, float U, float V) { minU = u; minV = v; maxU = U; maxV = V; }
[ "public", "void", "setUVs", "(", "float", "u", ",", "float", "v", ",", "float", "U", ",", "float", "V", ")", "{", "minU", "=", "u", ";", "minV", "=", "v", ";", "maxU", "=", "U", ";", "maxV", "=", "V", ";", "}" ]
Sets the u vs. @param u the u @param v the v @param U the u @param V the v
[ "Sets", "the", "u", "vs", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/Icon.java#L173-L179
landawn/AbacusUtil
src/com/landawn/abacus/util/StringUtil.java
StringUtil.removePattern
public static String removePattern(final String source, final String regex) { """ Removes each substring of the source String that matches the given regular expression using the DOTALL option. @param source the source string @param regex the regular expression to which this string is to be matched @return ...
java
public static String removePattern(final String source, final String regex) { return replacePattern(source, regex, N.EMPTY_STRING); }
[ "public", "static", "String", "removePattern", "(", "final", "String", "source", ",", "final", "String", "regex", ")", "{", "return", "replacePattern", "(", "source", ",", "regex", ",", "N", ".", "EMPTY_STRING", ")", ";", "}" ]
Removes each substring of the source String that matches the given regular expression using the DOTALL option. @param source the source string @param regex the regular expression to which this string is to be matched @return The resulting {@code String} @see String#replaceAll(String, String) @see Pattern#DOTALL @since...
[ "Removes", "each", "substring", "of", "the", "source", "String", "that", "matches", "the", "given", "regular", "expression", "using", "the", "DOTALL", "option", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/StringUtil.java#L1400-L1402
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdInCollectionCondition
protected void addIdInCollectionCondition(final Expression<?> property, final Collection<?> values) { """ Add a Field Search Condition that will check if the id field exists in an array of values. eg. {@code field IN (values)} @param property The field id as defined in the Entity mapping class. @param values ...
java
protected void addIdInCollectionCondition(final Expression<?> property, final Collection<?> values) { if (values == null || values.isEmpty()) { fieldConditions.add(getCriteriaBuilder().equal(property, -1)); } else { fieldConditions.add(property.in(values)); } }
[ "protected", "void", "addIdInCollectionCondition", "(", "final", "Expression", "<", "?", ">", "property", ",", "final", "Collection", "<", "?", ">", "values", ")", "{", "if", "(", "values", "==", "null", "||", "values", ".", "isEmpty", "(", ")", ")", "{"...
Add a Field Search Condition that will check if the id field exists in an array of values. eg. {@code field IN (values)} @param property The field id as defined in the Entity mapping class. @param values The List of Ids to be compared to.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "exists", "in", "an", "array", "of", "values", ".", "eg", ".", "{", "@code", "field", "IN", "(", "values", ")", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L302-L308
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getActualDataSourceName
public String getActualDataSourceName(final String actualTableName) { """ Get actual data source name. @param actualTableName actual table name @return actual data source name """ Optional<TableRule> tableRule = findTableRuleByActualTable(actualTableName); if (tableRule.isPresent()) { ...
java
public String getActualDataSourceName(final String actualTableName) { Optional<TableRule> tableRule = findTableRuleByActualTable(actualTableName); if (tableRule.isPresent()) { return tableRule.get().getActualDatasourceNames().iterator().next(); } if (!Strings.isNullOrEmpty(sh...
[ "public", "String", "getActualDataSourceName", "(", "final", "String", "actualTableName", ")", "{", "Optional", "<", "TableRule", ">", "tableRule", "=", "findTableRuleByActualTable", "(", "actualTableName", ")", ";", "if", "(", "tableRule", ".", "isPresent", "(", ...
Get actual data source name. @param actualTableName actual table name @return actual data source name
[ "Get", "actual", "data", "source", "name", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L471-L480
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/EncryptionProtectorsInner.java
EncryptionProtectorsInner.beginCreateOrUpdateAsync
public Observable<EncryptionProtectorInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, EncryptionProtectorInner parameters) { """ Updates an existing encryption protector. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value fro...
java
public Observable<EncryptionProtectorInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, EncryptionProtectorInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<EncryptionProtectorInner>, Encrypti...
[ "public", "Observable", "<", "EncryptionProtectorInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "EncryptionProtectorInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "r...
Updates an existing encryption protector. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param parameters The requested encryption protector resource state. @thro...
[ "Updates", "an", "existing", "encryption", "protector", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/EncryptionProtectorsInner.java#L411-L418
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java
JsonUtil.putStringList
public static void putStringList(Writer writer, List<String> values) throws IOException { """ Writes the given value with the given writer, sanitizing with {@link #sanitize(String)} as a valid JSON-formatted data. @param writer @param values @throws IOException @author vvakame """ if (values == null) { ...
java
public static void putStringList(Writer writer, List<String> values) throws IOException { if (values == null) { writer.write("null"); } else { startArray(writer); for (int i = 0; i < values.size(); i++) { put(writer, values.get(i)); if (i != values.size() - 1) { addSeparator(writer); } ...
[ "public", "static", "void", "putStringList", "(", "Writer", "writer", ",", "List", "<", "String", ">", "values", ")", "throws", "IOException", "{", "if", "(", "values", "==", "null", ")", "{", "writer", ".", "write", "(", "\"null\"", ")", ";", "}", "el...
Writes the given value with the given writer, sanitizing with {@link #sanitize(String)} as a valid JSON-formatted data. @param writer @param values @throws IOException @author vvakame
[ "Writes", "the", "given", "value", "with", "the", "given", "writer", "sanitizing", "with", "{" ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/util/JsonUtil.java#L160-L173
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkLVal
public Type checkLVal(LVal lval, Environment environment) { """ Type check a given lval assuming an initial environment. This returns the largest type which can be safely assigned to the lval. Observe that this type is determined by the declared type of the variable being assigned. @param expression @param e...
java
public Type checkLVal(LVal lval, Environment environment) { Type type; switch (lval.getOpcode()) { case EXPR_variablecopy: type = checkVariableLVal((Expr.VariableAccess) lval, environment); break; case EXPR_staticvariable: type = checkStaticVariableLVal((Expr.StaticVariableAccess) lval, environment); ...
[ "public", "Type", "checkLVal", "(", "LVal", "lval", ",", "Environment", "environment", ")", "{", "Type", "type", ";", "switch", "(", "lval", ".", "getOpcode", "(", ")", ")", "{", "case", "EXPR_variablecopy", ":", "type", "=", "checkVariableLVal", "(", "(",...
Type check a given lval assuming an initial environment. This returns the largest type which can be safely assigned to the lval. Observe that this type is determined by the declared type of the variable being assigned. @param expression @param environment @return @throws ResolutionError
[ "Type", "check", "a", "given", "lval", "assuming", "an", "initial", "environment", ".", "This", "returns", "the", "largest", "type", "which", "can", "be", "safely", "assigned", "to", "the", "lval", ".", "Observe", "that", "this", "type", "is", "determined", ...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L1104-L1133
bramp/unsafe
unsafe-unroller/src/main/java/net/bramp/unsafe/UnrolledUnsafeCopierBuilder.java
UnrolledUnsafeCopierBuilder.build
public UnsafeCopier build(Unsafe unsafe) throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { """ Constructs a new Copier using the passed in Unsafe instance @param unsafe The sun.misc.Unsafe instance this copier uses @return The new UnsageCopier...
java
public UnsafeCopier build(Unsafe unsafe) throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { checkArgument(offset >= 0, "Offset must be set"); checkArgument(length >= 0, "Length must be set"); checkNotNull(unsafe); Class<?> dynamicType ...
[ "public", "UnsafeCopier", "build", "(", "Unsafe", "unsafe", ")", "throws", "IllegalAccessException", ",", "InstantiationException", ",", "NoSuchMethodException", ",", "InvocationTargetException", "{", "checkArgument", "(", "offset", ">=", "0", ",", "\"Offset must be set\"...
Constructs a new Copier using the passed in Unsafe instance @param unsafe The sun.misc.Unsafe instance this copier uses @return The new UnsageCopier built with the specific parameters @throws IllegalAccessException @throws InstantiationException @throws NoSuchMethodException @throws InvocationTargetException @throws I...
[ "Constructs", "a", "new", "Copier", "using", "the", "passed", "in", "Unsafe", "instance" ]
train
https://github.com/bramp/unsafe/blob/805f54e2a8aee905003329556135b6c4059b4418/unsafe-unroller/src/main/java/net/bramp/unsafe/UnrolledUnsafeCopierBuilder.java#L76-L92
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policypatset_binding.java
policypatset_binding.get
public static policypatset_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch policypatset_binding resource of given name . """ policypatset_binding obj = new policypatset_binding(); obj.set_name(name); policypatset_binding response = (policypatset_binding) obj.g...
java
public static policypatset_binding get(nitro_service service, String name) throws Exception{ policypatset_binding obj = new policypatset_binding(); obj.set_name(name); policypatset_binding response = (policypatset_binding) obj.get_resource(service); return response; }
[ "public", "static", "policypatset_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "policypatset_binding", "obj", "=", "new", "policypatset_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")"...
Use this API to fetch policypatset_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "policypatset_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policypatset_binding.java#L103-L108
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FileRollEvent.java
FileRollEvent.dispatchToAppender
final void dispatchToAppender(final String message) { """ Convenience method dispatches this object to the source appender, which will result in the custom message being appended to the new file. @param message The custom logging message to be appended. """ // dispatch a copy, since events should be t...
java
final void dispatchToAppender(final String message) { // dispatch a copy, since events should be treated as being immutable final FoundationFileRollingAppender appender = this.getSource(); if (appender != null) { appender.append(new FileRollEvent(this, message)); } }
[ "final", "void", "dispatchToAppender", "(", "final", "String", "message", ")", "{", "// dispatch a copy, since events should be treated as being immutable", "final", "FoundationFileRollingAppender", "appender", "=", "this", ".", "getSource", "(", ")", ";", "if", "(", "app...
Convenience method dispatches this object to the source appender, which will result in the custom message being appended to the new file. @param message The custom logging message to be appended.
[ "Convenience", "method", "dispatches", "this", "object", "to", "the", "source", "appender", "which", "will", "result", "in", "the", "custom", "message", "being", "appended", "to", "the", "new", "file", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/FileRollEvent.java#L124-L130
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlInsertStatement.java
SqlInsertStatement.appendListOfValues
private void appendListOfValues(ClassDescriptor cld, StringBuffer stmt) { """ generates a values(?,) for a prepared insert statement. returns null if there are no fields @param stmt the StringBuffer """ FieldDescriptor[] fields = cld.getAllRwFields(); if(fields.length == 0) { ...
java
private void appendListOfValues(ClassDescriptor cld, StringBuffer stmt) { FieldDescriptor[] fields = cld.getAllRwFields(); if(fields.length == 0) { return; } stmt.append(" VALUES ("); for(int i = 0; i < fields.length; i++) { ...
[ "private", "void", "appendListOfValues", "(", "ClassDescriptor", "cld", ",", "StringBuffer", "stmt", ")", "{", "FieldDescriptor", "[", "]", "fields", "=", "cld", ".", "getAllRwFields", "(", ")", ";", "if", "(", "fields", ".", "length", "==", "0", ")", "{",...
generates a values(?,) for a prepared insert statement. returns null if there are no fields @param stmt the StringBuffer
[ "generates", "a", "values", "(", "?", ")", "for", "a", "prepared", "insert", "statement", ".", "returns", "null", "if", "there", "are", "no", "fields" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlInsertStatement.java#L89-L108
threerings/nenya
core/src/main/java/com/threerings/util/DirectionUtil.java
DirectionUtil.moveDirection
public static void moveDirection (Point p, int direction, int dx, int dy) { """ Move the specified point in the specified screen direction, adjusting by the specified adjustments. Fine directions are not supported. """ if (direction >= DIRECTION_COUNT) { throw new IllegalArgumentException(...
java
public static void moveDirection (Point p, int direction, int dx, int dy) { if (direction >= DIRECTION_COUNT) { throw new IllegalArgumentException("Fine coordinates not supported."); } switch (direction) { case NORTH: case NORTHWEST: case NORTHEAST: p.y -= dy; ...
[ "public", "static", "void", "moveDirection", "(", "Point", "p", ",", "int", "direction", ",", "int", "dx", ",", "int", "dy", ")", "{", "if", "(", "direction", ">=", "DIRECTION_COUNT", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Fine coordin...
Move the specified point in the specified screen direction, adjusting by the specified adjustments. Fine directions are not supported.
[ "Move", "the", "specified", "point", "in", "the", "specified", "screen", "direction", "adjusting", "by", "the", "specified", "adjustments", ".", "Fine", "directions", "are", "not", "supported", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/DirectionUtil.java#L264-L282
apereo/person-directory
person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java
AbstractQueryPersonAttributeDao.appendCanonicalizedAttributeToQuery
protected QB appendCanonicalizedAttributeToQuery(final QB queryBuilder, final String queryAttribute, final String dataAttribute, final List<Object> queryValues) { """ Append the attribute and its canonicalized value/s to the {@code queryBuilder}. Uses {@code queryAttribute} to determine whether or not the value/...
java
protected QB appendCanonicalizedAttributeToQuery(final QB queryBuilder, final String queryAttribute, final String dataAttribute, final List<Object> queryValues) { // All logging messages were previously in generateQuery() and were // copy/pasted verbatim final List<Object> canonicalizedQueryValu...
[ "protected", "QB", "appendCanonicalizedAttributeToQuery", "(", "final", "QB", "queryBuilder", ",", "final", "String", "queryAttribute", ",", "final", "String", "dataAttribute", ",", "final", "List", "<", "Object", ">", "queryValues", ")", "{", "// All logging messages...
Append the attribute and its canonicalized value/s to the {@code queryBuilder}. Uses {@code queryAttribute} to determine whether or not the value/s should be canonicalized. I.e. the behavior is controlled by {@link #setCaseInsensitiveQueryAttributes(java.util.Map)}. <p>This method is only concerned with canonicalizing...
[ "Append", "the", "attribute", "and", "its", "canonicalized", "value", "/", "s", "to", "the", "{", "@code", "queryBuilder", "}", ".", "Uses", "{", "@code", "queryAttribute", "}", "to", "determine", "whether", "or", "not", "the", "value", "/", "s", "should",...
train
https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractQueryPersonAttributeDao.java#L325-L341
jayantk/jklol
src/com/jayantkrish/jklol/models/parametric/TensorSufficientStatistics.java
TensorSufficientStatistics.incrementFeatureByIndex
public void incrementFeatureByIndex(double amount, int... key) { """ Increments the value of {@code index} by {@code amount}. @param index @param amount """ if (isDense) { statistics.incrementEntry(amount, key); } else { Tensor increment = SparseTensor.singleElement(getTensorDimensions(...
java
public void incrementFeatureByIndex(double amount, int... key) { if (isDense) { statistics.incrementEntry(amount, key); } else { Tensor increment = SparseTensor.singleElement(getTensorDimensions(), getTensorSizes(), key, amount); statisticsTensor = statisticsTensor.elementwiseAdditio...
[ "public", "void", "incrementFeatureByIndex", "(", "double", "amount", ",", "int", "...", "key", ")", "{", "if", "(", "isDense", ")", "{", "statistics", ".", "incrementEntry", "(", "amount", ",", "key", ")", ";", "}", "else", "{", "Tensor", "increment", "...
Increments the value of {@code index} by {@code amount}. @param index @param amount
[ "Increments", "the", "value", "of", "{", "@code", "index", "}", "by", "{", "@code", "amount", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/parametric/TensorSufficientStatistics.java#L227-L235
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java
WeightInitUtil.initWeights
public static INDArray initWeights(double fanIn, double fanOut, long[] shape, WeightInit initScheme, Distribution dist, INDArray paramView) { """ Initializes a matrix with the given weight initialization scheme. Note: Defaults to fortran ('f') order arrays for the weights. U...
java
public static INDArray initWeights(double fanIn, double fanOut, long[] shape, WeightInit initScheme, Distribution dist, INDArray paramView) { return initWeights(fanIn, fanOut, shape, initScheme, dist, DEFAULT_WEIGHT_INIT_ORDER, paramView); }
[ "public", "static", "INDArray", "initWeights", "(", "double", "fanIn", ",", "double", "fanOut", ",", "long", "[", "]", "shape", ",", "WeightInit", "initScheme", ",", "Distribution", "dist", ",", "INDArray", "paramView", ")", "{", "return", "initWeights", "(", ...
Initializes a matrix with the given weight initialization scheme. Note: Defaults to fortran ('f') order arrays for the weights. Use {@link #initWeights(long[], WeightInit, Distribution, char, INDArray)} to control this @param shape the shape of the matrix @param initScheme the scheme to use @return a matrix of th...
[ "Initializes", "a", "matrix", "with", "the", "given", "weight", "initialization", "scheme", ".", "Note", ":", "Defaults", "to", "fortran", "(", "f", ")", "order", "arrays", "for", "the", "weights", ".", "Use", "{", "@link", "#initWeights", "(", "long", "[]...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java#L75-L78
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java
PdfContext.translateRectangle
public void translateRectangle(Rectangle rect, float dx, float dy) { """ Translate this rectangle over the specified following distances. @param rect rectangle to move @param dx delta x @param dy delta y """ float width = rect.getWidth(); float height = rect.getHeight(); rect.setLeft(rect.getLeft() ...
java
public void translateRectangle(Rectangle rect, float dx, float dy) { float width = rect.getWidth(); float height = rect.getHeight(); rect.setLeft(rect.getLeft() + dx); rect.setBottom(rect.getBottom() + dy); rect.setRight(rect.getLeft() + dx + width); rect.setTop(rect.getBottom() + dy + height); }
[ "public", "void", "translateRectangle", "(", "Rectangle", "rect", ",", "float", "dx", ",", "float", "dy", ")", "{", "float", "width", "=", "rect", ".", "getWidth", "(", ")", ";", "float", "height", "=", "rect", ".", "getHeight", "(", ")", ";", "rect", ...
Translate this rectangle over the specified following distances. @param rect rectangle to move @param dx delta x @param dy delta y
[ "Translate", "this", "rectangle", "over", "the", "specified", "following", "distances", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L318-L325
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/result/ResultHierarchy.java
ResultHierarchy.fireResultAdded
private void fireResultAdded(Result child, Result parent) { """ Informs all registered {@link ResultListener} that a new result was added. @param child New child result added @param parent Parent result that was added to """ if(LOG.isDebugging()) { LOG.debug("Result added: " + child + " <- " + pa...
java
private void fireResultAdded(Result child, Result parent) { if(LOG.isDebugging()) { LOG.debug("Result added: " + child + " <- " + parent); } for(int i = listenerList.size(); --i >= 0;) { listenerList.get(i).resultAdded(child, parent); } }
[ "private", "void", "fireResultAdded", "(", "Result", "child", ",", "Result", "parent", ")", "{", "if", "(", "LOG", ".", "isDebugging", "(", ")", ")", "{", "LOG", ".", "debug", "(", "\"Result added: \"", "+", "child", "+", "\" <- \"", "+", "parent", ")", ...
Informs all registered {@link ResultListener} that a new result was added. @param child New child result added @param parent Parent result that was added to
[ "Informs", "all", "registered", "{", "@link", "ResultListener", "}", "that", "a", "new", "result", "was", "added", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/result/ResultHierarchy.java#L116-L123
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java
CrossTabColorShema.setColorForTotal
public void setColorForTotal(int row, int column, Color color) { """ Sets the color for the big total between the column and row @param row row index (starting from 1) @param column column index (starting from 1) @param color """ int mapC = (colors.length-1) - column; int mapR = (colors[0].length-1) -...
java
public void setColorForTotal(int row, int column, Color color){ int mapC = (colors.length-1) - column; int mapR = (colors[0].length-1) - row; colors[mapC][mapR]=color; }
[ "public", "void", "setColorForTotal", "(", "int", "row", ",", "int", "column", ",", "Color", "color", ")", "{", "int", "mapC", "=", "(", "colors", ".", "length", "-", "1", ")", "-", "column", ";", "int", "mapR", "=", "(", "colors", "[", "0", "]", ...
Sets the color for the big total between the column and row @param row row index (starting from 1) @param column column index (starting from 1) @param color
[ "Sets", "the", "color", "for", "the", "big", "total", "between", "the", "column", "and", "row" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/CrossTabColorShema.java#L103-L107
otto-de/edison-hal
src/main/java/de/otto/edison/hal/traverson/Traverson.java
Traverson.followLink
public Traverson followLink(final String rel, final Map<String, Object> vars) { """ Follow the first {@link Link} of the current resource, selected by its link-relation type. <p> Templated links are expanded to URIs using the specified template variables. </p> <p> Other than {...
java
public Traverson followLink(final String rel, final Map<String, Object> vars) { return followLink(rel, always(), vars); }
[ "public", "Traverson", "followLink", "(", "final", "String", "rel", ",", "final", "Map", "<", "String", ",", "Object", ">", "vars", ")", "{", "return", "followLink", "(", "rel", ",", "always", "(", ")", ",", "vars", ")", ";", "}" ]
Follow the first {@link Link} of the current resource, selected by its link-relation type. <p> Templated links are expanded to URIs using the specified template variables. </p> <p> Other than {@link #follow(String, Map)}, this method will ignore possibly embedded resources with the same link-relation type. Only if the ...
[ "Follow", "the", "first", "{", "@link", "Link", "}", "of", "the", "current", "resource", "selected", "by", "its", "link", "-", "relation", "type", ".", "<p", ">", "Templated", "links", "are", "expanded", "to", "URIs", "using", "the", "specified", "template...
train
https://github.com/otto-de/edison-hal/blob/1582d2b49d1f0d9103e03bf742f18afa9d166992/src/main/java/de/otto/edison/hal/traverson/Traverson.java#L531-L534
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java
AbstractExtractor.trimFunction
public T trimFunction(@NonNull SerializableFunction<HString, HString> trimFunction) { """ Trim function t. @param trimFunction the trim function @return the t """ this.trimFunction = trimFunction; return Cast.as(this); }
java
public T trimFunction(@NonNull SerializableFunction<HString, HString> trimFunction) { this.trimFunction = trimFunction; return Cast.as(this); }
[ "public", "T", "trimFunction", "(", "@", "NonNull", "SerializableFunction", "<", "HString", ",", "HString", ">", "trimFunction", ")", "{", "this", ".", "trimFunction", "=", "trimFunction", ";", "return", "Cast", ".", "as", "(", "this", ")", ";", "}" ]
Trim function t. @param trimFunction the trim function @return the t
[ "Trim", "function", "t", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java#L223-L226
apache/fluo
modules/accumulo/src/main/java/org/apache/fluo/accumulo/util/ByteArrayUtil.java
ByteArrayUtil.decodeLong
public static long decodeLong(byte[] ba, int offset) { """ Decode long from byte array at offset @param ba byte array @param offset Offset @return long value """ return ((((long) ba[offset + 0] << 56) + ((long) (ba[offset + 1] & 255) << 48) + ((long) (ba[offset + 2] & 255) << 40) + ((long) (ba...
java
public static long decodeLong(byte[] ba, int offset) { return ((((long) ba[offset + 0] << 56) + ((long) (ba[offset + 1] & 255) << 48) + ((long) (ba[offset + 2] & 255) << 40) + ((long) (ba[offset + 3] & 255) << 32) + ((long) (ba[offset + 4] & 255) << 24) + ((ba[offset + 5] & 255) << 16) + ((b...
[ "public", "static", "long", "decodeLong", "(", "byte", "[", "]", "ba", ",", "int", "offset", ")", "{", "return", "(", "(", "(", "(", "long", ")", "ba", "[", "offset", "+", "0", "]", "<<", "56", ")", "+", "(", "(", "long", ")", "(", "ba", "[",...
Decode long from byte array at offset @param ba byte array @param offset Offset @return long value
[ "Decode", "long", "from", "byte", "array", "at", "offset" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/accumulo/src/main/java/org/apache/fluo/accumulo/util/ByteArrayUtil.java#L76-L81
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java
GreenMailUtil.newMimeMessage
public static MimeMessage newMimeMessage(InputStream inputStream) { """ Convenience method which creates a new {@link MimeMessage} from an input stream. @return the created mime message. """ try { return new MimeMessage(Session.getDefaultInstance(new Properties()), inputStream); ...
java
public static MimeMessage newMimeMessage(InputStream inputStream) { try { return new MimeMessage(Session.getDefaultInstance(new Properties()), inputStream); } catch (MessagingException e) { throw new IllegalArgumentException("Can not generate mime message for input stream " +...
[ "public", "static", "MimeMessage", "newMimeMessage", "(", "InputStream", "inputStream", ")", "{", "try", "{", "return", "new", "MimeMessage", "(", "Session", ".", "getDefaultInstance", "(", "new", "Properties", "(", ")", ")", ",", "inputStream", ")", ";", "}",...
Convenience method which creates a new {@link MimeMessage} from an input stream. @return the created mime message.
[ "Convenience", "method", "which", "creates", "a", "new", "{", "@link", "MimeMessage", "}", "from", "an", "input", "stream", "." ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java#L70-L76
alkacon/opencms-core
src/org/opencms/staticexport/CmsStaticExportManager.java
CmsStaticExportManager.getVfsExportData
public CmsStaticExportData getVfsExportData(CmsObject cms, String vfsName) { """ Returns the export data for a requested resource, if null is returned no export is required.<p> @param cms an initialized cms context (should be initialized with the "Guest" user only @param vfsName the VFS name of the resource re...
java
public CmsStaticExportData getVfsExportData(CmsObject cms, String vfsName) { return getRfsExportData(cms, getRfsName(cms, vfsName)); }
[ "public", "CmsStaticExportData", "getVfsExportData", "(", "CmsObject", "cms", ",", "String", "vfsName", ")", "{", "return", "getRfsExportData", "(", "cms", ",", "getRfsName", "(", "cms", ",", "vfsName", ")", ")", ";", "}" ]
Returns the export data for a requested resource, if null is returned no export is required.<p> @param cms an initialized cms context (should be initialized with the "Guest" user only @param vfsName the VFS name of the resource requested @return the export data for the request, if null is returned no export is requir...
[ "Returns", "the", "export", "data", "for", "a", "requested", "resource", "if", "null", "is", "returned", "no", "export", "is", "required", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsStaticExportManager.java#L1511-L1514
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/stats/StatsInterface.java
StatsInterface.getPhotoStats
public Stats getPhotoStats(String photoId, Date date) throws FlickrException { """ Get the number of views, comments and favorites on a photo for a given date. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will ...
java
public Stats getPhotoStats(String photoId, Date date) throws FlickrException { return getStats(METHOD_GET_PHOTO_STATS, "photo_id", photoId, date); }
[ "public", "Stats", "getPhotoStats", "(", "String", "photoId", ",", "Date", "date", ")", "throws", "FlickrException", "{", "return", "getStats", "(", "METHOD_GET_PHOTO_STATS", ",", "\"photo_id\"", ",", "photoId", ",", "date", ")", ";", "}" ]
Get the number of views, comments and favorites on a photo for a given date. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will automatically be rounded down to the start of the day. @param photoId (Required) The id of ...
[ "Get", "the", "number", "of", "views", "comments", "and", "favorites", "on", "a", "photo", "for", "a", "given", "date", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/stats/StatsInterface.java#L202-L204
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.getCookieValue
public static String getCookieValue(Cookie[] cookies, String name) { """ Gets the value of a specific cookie from an array of cookies.<p> @param cookies the cookie array @param name the name of the cookie we want @return the cookie value, or null if cookie with the given name wasn't found """ f...
java
public static String getCookieValue(Cookie[] cookies, String name) { for (int i = 0; (cookies != null) && (i < cookies.length); i++) { if (name.equalsIgnoreCase(cookies[i].getName())) { return cookies[i].getValue(); } } return null; }
[ "public", "static", "String", "getCookieValue", "(", "Cookie", "[", "]", "cookies", ",", "String", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "(", "cookies", "!=", "null", ")", "&&", "(", "i", "<", "cookies", ".", "length", ")", ";", ...
Gets the value of a specific cookie from an array of cookies.<p> @param cookies the cookie array @param name the name of the cookie we want @return the cookie value, or null if cookie with the given name wasn't found
[ "Gets", "the", "value", "of", "a", "specific", "cookie", "from", "an", "array", "of", "cookies", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L560-L568
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/protocol/CommandArgsAccessor.java
CommandArgsAccessor.encodeFirstKey
@SuppressWarnings("unchecked") public static <K, V> ByteBuffer encodeFirstKey(CommandArgs<K, V> commandArgs) { """ Get the first encoded key for cluster command routing. @param commandArgs must not be null. @return the first encoded key or {@literal null}. """ for (SingularArgument singularArg...
java
@SuppressWarnings("unchecked") public static <K, V> ByteBuffer encodeFirstKey(CommandArgs<K, V> commandArgs) { for (SingularArgument singularArgument : commandArgs.singularArguments) { if (singularArgument instanceof CommandArgs.KeyArgument) { return commandArgs.codec.encodeKey...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "K", ",", "V", ">", "ByteBuffer", "encodeFirstKey", "(", "CommandArgs", "<", "K", ",", "V", ">", "commandArgs", ")", "{", "for", "(", "SingularArgument", "singularArgument", ":", "c...
Get the first encoded key for cluster command routing. @param commandArgs must not be null. @return the first encoded key or {@literal null}.
[ "Get", "the", "first", "encoded", "key", "for", "cluster", "command", "routing", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/protocol/CommandArgsAccessor.java#L39-L50
flow/commons
src/main/java/com/flowpowered/commons/ViewFrustum.java
ViewFrustum.intersectsCuboid
public boolean intersectsCuboid(Vector3f[] vertices, Vector3f position) { """ Checks if the frustum of this camera intersects the given cuboid vertices. @param vertices The cuboid local vertices to check the frustum against @param position The position of the cuboid @return Whether or not the frustum intersec...
java
public boolean intersectsCuboid(Vector3f[] vertices, Vector3f position) { return intersectsCuboid(vertices, position.getX(), position.getY(), position.getZ()); }
[ "public", "boolean", "intersectsCuboid", "(", "Vector3f", "[", "]", "vertices", ",", "Vector3f", "position", ")", "{", "return", "intersectsCuboid", "(", "vertices", ",", "position", ".", "getX", "(", ")", ",", "position", ".", "getY", "(", ")", ",", "posi...
Checks if the frustum of this camera intersects the given cuboid vertices. @param vertices The cuboid local vertices to check the frustum against @param position The position of the cuboid @return Whether or not the frustum intersects the cuboid
[ "Checks", "if", "the", "frustum", "of", "this", "camera", "intersects", "the", "given", "cuboid", "vertices", "." ]
train
https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/ViewFrustum.java#L227-L229
EdwardRaff/JSAT
JSAT/src/jsat/datatransform/WhitenedPCA.java
WhitenedPCA.getSVD
private SingularValueDecomposition getSVD(DataSet dataSet) { """ Gets a SVD for the covariance matrix of the data set @param dataSet the data set in question @return the SVD for the covariance """ Matrix cov = covarianceMatrix(meanVector(dataSet), dataSet); for(int i = 0; i < cov.rows(); i++)...
java
private SingularValueDecomposition getSVD(DataSet dataSet) { Matrix cov = covarianceMatrix(meanVector(dataSet), dataSet); for(int i = 0; i < cov.rows(); i++)//force it to be symmetric for(int j = 0; j < i; j++) cov.set(j, i, cov.get(i, j)); EigenValueDecomposition...
[ "private", "SingularValueDecomposition", "getSVD", "(", "DataSet", "dataSet", ")", "{", "Matrix", "cov", "=", "covarianceMatrix", "(", "meanVector", "(", "dataSet", ")", ",", "dataSet", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cov", "....
Gets a SVD for the covariance matrix of the data set @param dataSet the data set in question @return the SVD for the covariance
[ "Gets", "a", "SVD", "for", "the", "covariance", "matrix", "of", "the", "data", "set" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/datatransform/WhitenedPCA.java#L159-L176
alkacon/opencms-core
src/org/opencms/ui/dialogs/CmsPublishScheduledDialog.java
CmsPublishScheduledDialog.addToTempProject
private void addToTempProject(CmsObject adminCms, CmsObject userCms, CmsResource resource, CmsProject tmpProject) throws CmsException { """ Adds the given resource to the temporary project.<p> @param adminCms the admin cms context @param userCms the user cms context @param resource the resource @param tm...
java
private void addToTempProject(CmsObject adminCms, CmsObject userCms, CmsResource resource, CmsProject tmpProject) throws CmsException { // copy the resource to the project adminCms.copyResourceToProject(resource); // lock the resource in the current project CmsLock lock = userCms.g...
[ "private", "void", "addToTempProject", "(", "CmsObject", "adminCms", ",", "CmsObject", "userCms", ",", "CmsResource", "resource", ",", "CmsProject", "tmpProject", ")", "throws", "CmsException", "{", "// copy the resource to the project", "adminCms", ".", "copyResourceToPr...
Adds the given resource to the temporary project.<p> @param adminCms the admin cms context @param userCms the user cms context @param resource the resource @param tmpProject the temporary project @throws CmsException in case something goes wrong
[ "Adds", "the", "given", "resource", "to", "the", "temporary", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/CmsPublishScheduledDialog.java#L284-L306
baratine/baratine
web/src/main/java/com/caucho/v5/http/protocol/RequestHttp1.java
RequestHttp1.getHeaderBuffers
@Override public void getHeaderBuffers(String key, ArrayList<CharSegment> values) { """ Fills an ArrayList with the header values matching the key. @param values ArrayList which will contain the maching values. @param key the header key to select. """ int i = -1; while ((i = matchNextHeader(...
java
@Override public void getHeaderBuffers(String key, ArrayList<CharSegment> values) { int i = -1; while ((i = matchNextHeader(i + 1, key)) >= 0) { values.add(_headerValues[i]); } }
[ "@", "Override", "public", "void", "getHeaderBuffers", "(", "String", "key", ",", "ArrayList", "<", "CharSegment", ">", "values", ")", "{", "int", "i", "=", "-", "1", ";", "while", "(", "(", "i", "=", "matchNextHeader", "(", "i", "+", "1", ",", "key"...
Fills an ArrayList with the header values matching the key. @param values ArrayList which will contain the maching values. @param key the header key to select.
[ "Fills", "an", "ArrayList", "with", "the", "header", "values", "matching", "the", "key", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/http/protocol/RequestHttp1.java#L528-L536
kiegroup/droolsjbpm-integration
kie-server-parent/kie-server-remote/kie-server-client/src/main/java/org/kie/server/client/impl/AbstractKieServicesClientImpl.java
AbstractKieServicesClientImpl.initializeURI
protected String initializeURI(URL url, String servicePrefix) { """ Initializes the URL that will be used for web service access @param url URL of the server instance @return An URL that can be used for the web services """ if ( url == null ) { throw new IllegalArgumentException( "The u...
java
protected String initializeURI(URL url, String servicePrefix) { if ( url == null ) { throw new IllegalArgumentException( "The url may not be empty or null." ); } try { url.toURI(); } catch ( URISyntaxException urise ) { throw new IllegalArgumentExcepti...
[ "protected", "String", "initializeURI", "(", "URL", "url", ",", "String", "servicePrefix", ")", "{", "if", "(", "url", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The url may not be empty or null.\"", ")", ";", "}", "try", "{", ...
Initializes the URL that will be used for web service access @param url URL of the server instance @return An URL that can be used for the web services
[ "Initializes", "the", "URL", "that", "will", "be", "used", "for", "web", "service", "access" ]
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-server-parent/kie-server-remote/kie-server-client/src/main/java/org/kie/server/client/impl/AbstractKieServicesClientImpl.java#L101-L127
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/ExclusionChecker.java
ExclusionChecker.shouldBeExcluded
public boolean shouldBeExcluded(final Field field, final RandomizerContext context) { """ Given the current randomization context, should the field be excluded from being populated ? @param field the field to check @param context the current randomization context @return true if the field should be excluded, ...
java
public boolean shouldBeExcluded(final Field field, final RandomizerContext context) { if (isStatic(field)) { return true; } Set<Predicate<Field>> fieldExclusionPredicates = context.getParameters().getFieldExclusionPredicates(); for (Predicate<Field> fieldExclusionPredicate : ...
[ "public", "boolean", "shouldBeExcluded", "(", "final", "Field", "field", ",", "final", "RandomizerContext", "context", ")", "{", "if", "(", "isStatic", "(", "field", ")", ")", "{", "return", "true", ";", "}", "Set", "<", "Predicate", "<", "Field", ">", "...
Given the current randomization context, should the field be excluded from being populated ? @param field the field to check @param context the current randomization context @return true if the field should be excluded, false otherwise
[ "Given", "the", "current", "randomization", "context", "should", "the", "field", "be", "excluded", "from", "being", "populated", "?" ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/ExclusionChecker.java#L50-L61