repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java
StereoTool.isColinear
public static boolean isColinear(Point3d ptA, Point3d ptB, Point3d ptC) { """ Checks the three supplied points to see if they fall on the same line. It does this by finding the normal to an arbitrary pair of lines between the points (in fact, A-B and A-C) and checking that its length is 0. @param ptA @param ...
java
public static boolean isColinear(Point3d ptA, Point3d ptB, Point3d ptC) { Vector3d vectorAB = new Vector3d(); Vector3d vectorAC = new Vector3d(); Vector3d normal = new Vector3d(); StereoTool.getRawNormal(ptA, ptB, ptC, normal, vectorAB, vectorAC); return isColinear(normal); ...
[ "public", "static", "boolean", "isColinear", "(", "Point3d", "ptA", ",", "Point3d", "ptB", ",", "Point3d", "ptC", ")", "{", "Vector3d", "vectorAB", "=", "new", "Vector3d", "(", ")", ";", "Vector3d", "vectorAC", "=", "new", "Vector3d", "(", ")", ";", "Vec...
Checks the three supplied points to see if they fall on the same line. It does this by finding the normal to an arbitrary pair of lines between the points (in fact, A-B and A-C) and checking that its length is 0. @param ptA @param ptB @param ptC @return true if the tree points are on a straight line
[ "Checks", "the", "three", "supplied", "points", "to", "see", "if", "they", "fall", "on", "the", "same", "line", ".", "It", "does", "this", "by", "finding", "the", "normal", "to", "an", "arbitrary", "pair", "of", "lines", "between", "the", "points", "(", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L344-L351
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
@SuppressWarnings("unchecked") public static List<Short> getAt(short[] array, ObjectRange range) { """ Support the subscript operator with an ObjectRange for a short array @param array a short array @param range an ObjectRange indicating the indices for the items to retrieve @return list of the retrieved ...
java
@SuppressWarnings("unchecked") public static List<Short> getAt(short[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "Short", ">", "getAt", "(", "short", "[", "]", "array", ",", "ObjectRange", "range", ")", "{", "return", "primitiveArrayGet", "(", "array", ",", "range", ")", ";", "}" ]
Support the subscript operator with an ObjectRange for a short array @param array a short array @param range an ObjectRange indicating the indices for the items to retrieve @return list of the retrieved shorts @since 1.0
[ "Support", "the", "subscript", "operator", "with", "an", "ObjectRange", "for", "a", "short", "array" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L13860-L13863
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ConnMetaCodeGen.java
ConnMetaCodeGen.writeClassBody
@Override public void writeClassBody(Definition def, Writer out) throws IOException { """ Output Metadata class @param def definition @param out Writer @throws IOException ioException """ out.write("public class " + getClassName(def) + " implements ConnectionMetaData"); writeLeftCurlyBrack...
java
@Override public void writeClassBody(Definition def, Writer out) throws IOException { out.write("public class " + getClassName(def) + " implements ConnectionMetaData"); writeLeftCurlyBracket(out, 0); int indent = 1; writeDefaultConstructor(def, out, indent); writeEIS(def, out, ind...
[ "@", "Override", "public", "void", "writeClassBody", "(", "Definition", "def", ",", "Writer", "out", ")", "throws", "IOException", "{", "out", ".", "write", "(", "\"public class \"", "+", "getClassName", "(", "def", ")", "+", "\" implements ConnectionMetaData\"", ...
Output Metadata class @param def definition @param out Writer @throws IOException ioException
[ "Output", "Metadata", "class" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ConnMetaCodeGen.java#L43-L57
LMAX-Exchange/disruptor
src/main/java/com/lmax/disruptor/dsl/Disruptor.java
Disruptor.handleEventsWith
@SuppressWarnings("varargs") @SafeVarargs public final EventHandlerGroup<T> handleEventsWith(final EventHandler<? super T>... handlers) { """ <p>Set up event handlers to handle events from the ring buffer. These handlers will process events as soon as they become available, in parallel.</p> <p>This met...
java
@SuppressWarnings("varargs") @SafeVarargs public final EventHandlerGroup<T> handleEventsWith(final EventHandler<? super T>... handlers) { return createEventProcessors(new Sequence[0], handlers); }
[ "@", "SuppressWarnings", "(", "\"varargs\"", ")", "@", "SafeVarargs", "public", "final", "EventHandlerGroup", "<", "T", ">", "handleEventsWith", "(", "final", "EventHandler", "<", "?", "super", "T", ">", "...", "handlers", ")", "{", "return", "createEventProcess...
<p>Set up event handlers to handle events from the ring buffer. These handlers will process events as soon as they become available, in parallel.</p> <p>This method can be used as the start of a chain. For example if the handler <code>A</code> must process events before handler <code>B</code>:</p> <pre><code>dw.handle...
[ "<p", ">", "Set", "up", "event", "handlers", "to", "handle", "events", "from", "the", "ring", "buffer", ".", "These", "handlers", "will", "process", "events", "as", "soon", "as", "they", "become", "available", "in", "parallel", ".", "<", "/", "p", ">" ]
train
https://github.com/LMAX-Exchange/disruptor/blob/4266d00c5250190313446fdd7c8aa7a4edb5c818/src/main/java/com/lmax/disruptor/dsl/Disruptor.java#L163-L168
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/XLSXReader.java
XLSXReader.readExcel
public static void readExcel(File file, Integer scale, int limit, ExcelHandler callback) throws ReadExcelException { """ 用于读取limit行之后处理读取的数据(通过回调函数处理) @param file Excel文件 @param scale 指定若数值中含有小数则保留几位小数,四舍五入,null或者&lt;=0表示不四舍五入 @param limit 指定最多读取多少数据行,&lt;= 0表示不限制,若指定了limit则在达到限制后会移除旧元素再...
java
public static void readExcel(File file, Integer scale, int limit, ExcelHandler callback) throws ReadExcelException { OPCPackage p = null; XLSXReader reader = null; try { p = OPCPackage.open(file, PackageAccess.READ); reader = new XLSXReader(p, scale, limit, ca...
[ "public", "static", "void", "readExcel", "(", "File", "file", ",", "Integer", "scale", ",", "int", "limit", ",", "ExcelHandler", "callback", ")", "throws", "ReadExcelException", "{", "OPCPackage", "p", "=", "null", ";", "XLSXReader", "reader", "=", "null", "...
用于读取limit行之后处理读取的数据(通过回调函数处理) @param file Excel文件 @param scale 指定若数值中含有小数则保留几位小数,四舍五入,null或者&lt;=0表示不四舍五入 @param limit 指定最多读取多少数据行,&lt;= 0表示不限制,若指定了limit则在达到限制后会移除旧元素再放入新的元素 @param callback 指定{@link #datas}达到{@link #limit}限制时执行的回调函数, 若为null则表示不执行回调函数。 注意:在{@link #datas}未达到指定限制而文件数据已经完全读取完毕的情况下也会调用回调函数(若有回调函数...
[ "用于读取limit行之后处理读取的数据", "(", "通过回调函数处理", ")" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/XLSXReader.java#L494-L513
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.WSG84_L3
@Pure public static Point2d WSG84_L3(double lambda, double phi) { """ This function convert WSG84 GPS coordinate to France Lambert III coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert III coordinates. """ final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, ph...
java
@Pure public static Point2d WSG84_L3(double lambda, double phi) { final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); }
[ "@", "Pure", "public", "static", "Point2d", "WSG84_L3", "(", "double", "lambda", ",", "double", "phi", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "WSG84_NTFLamdaPhi", "(", "lambda", ",", "phi", ")", ";", "return", "NTFLambdaPhi_NTFLambert", "(", "ntfLa...
This function convert WSG84 GPS coordinate to France Lambert III coordinate. @param lambda in degrees. @param phi in degrees. @return the France Lambert III coordinates.
[ "This", "function", "convert", "WSG84", "GPS", "coordinate", "to", "France", "Lambert", "III", "coordinate", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1097-L1106
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.forceReboot
public RedisForceRebootResponseInner forceReboot(String resourceGroupName, String name, RedisRebootParameters parameters) { """ Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. @param resourceGroupName The name of the resource grou...
java
public RedisForceRebootResponseInner forceReboot(String resourceGroupName, String name, RedisRebootParameters parameters) { return forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().body(); }
[ "public", "RedisForceRebootResponseInner", "forceReboot", "(", "String", "resourceGroupName", ",", "String", "name", ",", "RedisRebootParameters", "parameters", ")", "{", "return", "forceRebootWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "parameter...
Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param parameters Specifies which Redis node(s) to reboot. @throws IllegalArgumentException...
[ "Reboot", "specified", "Redis", "node", "(", "s", ")", ".", "This", "operation", "requires", "write", "permission", "to", "the", "cache", "resource", ".", "There", "can", "be", "potential", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L1244-L1246
TGIO/RNCryptorNative
jncryptor/src/main/java/org/cryptonode/jncryptor/AES256JNCryptor.java
AES256JNCryptor.arraysEqual
static boolean arraysEqual(byte[] array1, byte[] array2) { """ Compares arrays for equality in constant time. This avoids certain types of timing attacks. @param array1 the first array @param array2 the second array @return whether the arrays match """ if (array1.length != array2.length) { retu...
java
static boolean arraysEqual(byte[] array1, byte[] array2) { if (array1.length != array2.length) { return false; } boolean isEqual = true; for (int i = 0; i < array1.length; i++) { if (array1[i] != array2[i]) { isEqual = false; } } return isEqual; }
[ "static", "boolean", "arraysEqual", "(", "byte", "[", "]", "array1", ",", "byte", "[", "]", "array2", ")", "{", "if", "(", "array1", ".", "length", "!=", "array2", ".", "length", ")", "{", "return", "false", ";", "}", "boolean", "isEqual", "=", "true...
Compares arrays for equality in constant time. This avoids certain types of timing attacks. @param array1 the first array @param array2 the second array @return whether the arrays match
[ "Compares", "arrays", "for", "equality", "in", "constant", "time", ".", "This", "avoids", "certain", "types", "of", "timing", "attacks", "." ]
train
https://github.com/TGIO/RNCryptorNative/blob/5209f10b988e4033c0b769a40b0d6cc99ea16af7/jncryptor/src/main/java/org/cryptonode/jncryptor/AES256JNCryptor.java#L453-L465
strator-dev/greenpepper
greenpepper-open/extensions-external/php/src/main/java/com/greenpepper/phpsud/compiler/CompilerWrapper.java
CompilerWrapper.addField
public void addField(String fieldName, Class<?> fieldType, boolean isPublic, boolean isStatic, boolean isFinal, String initCode) throws CannotCompileException, NotFoundException { """ <p>addField.</p> @param fieldName a {@link java.lang.String} object. @param fieldType a {@link java.lang.Class} object. @param...
java
public void addField(String fieldName, Class<?> fieldType, boolean isPublic, boolean isStatic, boolean isFinal, String initCode) throws CannotCompileException, NotFoundException { CtField f = new CtField(resolve(fieldType), fieldName, clazz); int modifiers = 0; modifiers += isPublic ? Modifier.PUBLIC : Modifier.P...
[ "public", "void", "addField", "(", "String", "fieldName", ",", "Class", "<", "?", ">", "fieldType", ",", "boolean", "isPublic", ",", "boolean", "isStatic", ",", "boolean", "isFinal", ",", "String", "initCode", ")", "throws", "CannotCompileException", ",", "Not...
<p>addField.</p> @param fieldName a {@link java.lang.String} object. @param fieldType a {@link java.lang.Class} object. @param isPublic a boolean. @param isStatic a boolean. @param isFinal a boolean. @param initCode a {@link java.lang.String} object. @throws javassist.CannotCompileException if any. @throws javassist.N...
[ "<p", ">", "addField", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/extensions-external/php/src/main/java/com/greenpepper/phpsud/compiler/CompilerWrapper.java#L144-L161
gresrun/jesque
src/main/java/net/greghaines/jesque/worker/WorkerPoolImpl.java
WorkerPoolImpl.recoverFromException
protected void recoverFromException(final String curQueue, final Exception ex) { """ Handle an exception that was thrown from inside {@link #poll()}. @param curQueue the name of the queue that was being processed when the exception was thrown @param ex the exception that was thrown """ final Recove...
java
protected void recoverFromException(final String curQueue, final Exception ex) { final RecoveryStrategy recoveryStrategy = this.exceptionHandlerRef.get().onException(this, ex, curQueue); switch (recoveryStrategy) { case RECONNECT: if (ex instanceof JedisNoScriptException) { ...
[ "protected", "void", "recoverFromException", "(", "final", "String", "curQueue", ",", "final", "Exception", "ex", ")", "{", "final", "RecoveryStrategy", "recoveryStrategy", "=", "this", ".", "exceptionHandlerRef", ".", "get", "(", ")", ".", "onException", "(", "...
Handle an exception that was thrown from inside {@link #poll()}. @param curQueue the name of the queue that was being processed when the exception was thrown @param ex the exception that was thrown
[ "Handle", "an", "exception", "that", "was", "thrown", "from", "inside", "{", "@link", "#poll", "()", "}", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/worker/WorkerPoolImpl.java#L555-L582
Cleveroad/BubbleAnimationLayout
library/src/main/java/com/cleveroad/bubbleanimation/DrawableUtils.java
DrawableUtils.between
public static boolean between(float value, float start, float end) { """ Checks if value belongs to range <code>[start, end]</code> @param value value @param start start of range @param end end of range @return true if value belogs to range, false otherwise """ if (start > end) { fl...
java
public static boolean between(float value, float start, float end) { if (start > end) { float tmp = start; start = end; end = tmp; } return value >= start && value <= end; }
[ "public", "static", "boolean", "between", "(", "float", "value", ",", "float", "start", ",", "float", "end", ")", "{", "if", "(", "start", ">", "end", ")", "{", "float", "tmp", "=", "start", ";", "start", "=", "end", ";", "end", "=", "tmp", ";", ...
Checks if value belongs to range <code>[start, end]</code> @param value value @param start start of range @param end end of range @return true if value belogs to range, false otherwise
[ "Checks", "if", "value", "belongs", "to", "range", "<code", ">", "[", "start", "end", "]", "<", "/", "code", ">" ]
train
https://github.com/Cleveroad/BubbleAnimationLayout/blob/6b2c3668e8c2bf415066474b46df7b87877e494b/library/src/main/java/com/cleveroad/bubbleanimation/DrawableUtils.java#L34-L41
kkopacz/agiso-core
bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java
ObjectUtils.compareChecker
@SuppressWarnings("unchecked") public static final boolean compareChecker(Comparable<?> object1, Comparable<?> object2) { """ Porównuje dwa obiekty typu {@link Comparable} wykorzystując metodę <code> comapreTo</code> obiektu przezkazanego prarametrem wywołania <code>object1</code>. Zwraca <code>true</code> jeśl...
java
@SuppressWarnings("unchecked") public static final boolean compareChecker(Comparable<?> object1, Comparable<?> object2) { if(null == object1 || null == object2) { return object1 == object2; } else { return 0 == ((Comparable<Object>)object1).compareTo((Comparable<Object>)object2); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "final", "boolean", "compareChecker", "(", "Comparable", "<", "?", ">", "object1", ",", "Comparable", "<", "?", ">", "object2", ")", "{", "if", "(", "null", "==", "object1", "||", "nul...
Porównuje dwa obiekty typu {@link Comparable} wykorzystując metodę <code> comapreTo</code> obiektu przezkazanego prarametrem wywołania <code>object1</code>. Zwraca <code>true</code> jeśli oba przekazane do porównania obiekty nie są określone (mają wartość <code>null</code>).
[ "Porównuje", "dwa", "obiekty", "typu", "{" ]
train
https://github.com/kkopacz/agiso-core/blob/b994ec0146be1fe3f10829d69cd719bdbdebe1c5/bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java#L249-L256
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Spies.java
Spies.spyRes
public static <T1, T2, T3> TriPredicate<T1, T2, T3> spyRes(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result) { """ Proxies a ternary predicate spying for result. @param <T1> the predicate first parameter type @param <T2> the predicate second parameter type @param <T3> the predicate third parameter type...
java
public static <T1, T2, T3> TriPredicate<T1, T2, T3> spyRes(TriPredicate<T1, T2, T3> predicate, Box<Boolean> result) { return spy(predicate, result, Box.<T1>empty(), Box.<T2>empty(), Box.<T3>empty()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ">", "TriPredicate", "<", "T1", ",", "T2", ",", "T3", ">", "spyRes", "(", "TriPredicate", "<", "T1", ",", "T2", ",", "T3", ">", "predicate", ",", "Box", "<", "Boolean", ">", "result", ")", "{",...
Proxies a ternary predicate spying for result. @param <T1> the predicate first parameter type @param <T2> the predicate second parameter type @param <T3> the predicate third parameter type @param predicate the predicate that will be spied @param result a box that will be containing spied result @return the proxied pre...
[ "Proxies", "a", "ternary", "predicate", "spying", "for", "result", "." ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Spies.java#L401-L403
vkostyukov/la4j
src/main/java/org/la4j/Matrix.java
Matrix.setRow
public void setRow(int i, double value) { """ <p> Sets all elements of the specified row of this matrix to given {@code value}. </p> @param i the row index @param value the element's new value """ VectorIterator it = iteratorOfRow(i); while (it.hasNext()) { it.next(); ...
java
public void setRow(int i, double value) { VectorIterator it = iteratorOfRow(i); while (it.hasNext()) { it.next(); it.set(value); } }
[ "public", "void", "setRow", "(", "int", "i", ",", "double", "value", ")", "{", "VectorIterator", "it", "=", "iteratorOfRow", "(", "i", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "it", ".", "next", "(", ")", ";", "it", ".", ...
<p> Sets all elements of the specified row of this matrix to given {@code value}. </p> @param i the row index @param value the element's new value
[ "<p", ">", "Sets", "all", "elements", "of", "the", "specified", "row", "of", "this", "matrix", "to", "given", "{", "@code", "value", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Matrix.java#L441-L448
apache/groovy
src/main/groovy/groovy/lang/MetaClassImpl.java
MetaClassImpl.getProperty
public Object getProperty(Object object, String property) { """ <p>Retrieves a property on the given object for the specified arguments. @param object The Object which the property is being retrieved from @param property The name of the property @return The properties value """ return getPrope...
java
public Object getProperty(Object object, String property) { return getProperty(theClass, object, property, false, false); }
[ "public", "Object", "getProperty", "(", "Object", "object", ",", "String", "property", ")", "{", "return", "getProperty", "(", "theClass", ",", "object", ",", "property", ",", "false", ",", "false", ")", ";", "}" ]
<p>Retrieves a property on the given object for the specified arguments. @param object The Object which the property is being retrieved from @param property The name of the property @return The properties value
[ "<p", ">", "Retrieves", "a", "property", "on", "the", "given", "object", "for", "the", "specified", "arguments", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/MetaClassImpl.java#L3857-L3859
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.updateConsumerDisclosure
public ConsumerDisclosure updateConsumerDisclosure(String accountId, String langCode, ConsumerDisclosure consumerDisclosure) throws ApiException { """ Update Consumer Disclosure. @param accountId The external account number (int) or account ID Guid. (required) @param langCode The simple type enumeration the la...
java
public ConsumerDisclosure updateConsumerDisclosure(String accountId, String langCode, ConsumerDisclosure consumerDisclosure) throws ApiException { return updateConsumerDisclosure(accountId, langCode, consumerDisclosure, null); }
[ "public", "ConsumerDisclosure", "updateConsumerDisclosure", "(", "String", "accountId", ",", "String", "langCode", ",", "ConsumerDisclosure", "consumerDisclosure", ")", "throws", "ApiException", "{", "return", "updateConsumerDisclosure", "(", "accountId", ",", "langCode", ...
Update Consumer Disclosure. @param accountId The external account number (int) or account ID Guid. (required) @param langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Bulgarian (bg), Czech (cs), Chinese Simpli...
[ "Update", "Consumer", "Disclosure", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L2653-L2655
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java
ToggleComment.getTextBlockFromSelection
private IRegion getTextBlockFromSelection(ITextSelection selection, IDocument document) { """ Creates a region describing the text block (something that starts at the beginning of a line) completely containing the current selection. @param selection The selection to use @param document The document @return t...
java
private IRegion getTextBlockFromSelection(ITextSelection selection, IDocument document) { try { IRegion line= document.getLineInformationOfOffset(selection.getOffset()); int length= selection.getLength() == 0 ? line.getLength() : selection.getLength() + (selection.getOffset() - line.getOffset()); return new...
[ "private", "IRegion", "getTextBlockFromSelection", "(", "ITextSelection", "selection", ",", "IDocument", "document", ")", "{", "try", "{", "IRegion", "line", "=", "document", ".", "getLineInformationOfOffset", "(", "selection", ".", "getOffset", "(", ")", ")", ";"...
Creates a region describing the text block (something that starts at the beginning of a line) completely containing the current selection. @param selection The selection to use @param document The document @return the region describing the text block comprising the given selection
[ "Creates", "a", "region", "describing", "the", "text", "block", "(", "something", "that", "starts", "at", "the", "beginning", "of", "a", "line", ")", "completely", "containing", "the", "current", "selection", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/commands/ToggleComment.java#L199-L212
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.hasRoleForResource
public boolean hasRoleForResource(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) { """ Checks if the given user has the given role for the given resource.<p> @param context the current request context @param user the user to check @param role the role to check @param resource th...
java
public boolean hasRoleForResource(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result; try { result = hasRoleForResource(dbc, user, role, resource); } finally { ...
[ "public", "boolean", "hasRoleForResource", "(", "CmsRequestContext", "context", ",", "CmsUser", "user", ",", "CmsRole", "role", ",", "CmsResource", "resource", ")", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";...
Checks if the given user has the given role for the given resource.<p> @param context the current request context @param user the user to check @param role the role to check @param resource the resource to check the role for @return <code>true</code> if the given user has the given role for the given resource
[ "Checks", "if", "the", "given", "user", "has", "the", "given", "role", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L3177-L3187
RestComm/jss7
m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UAManagementImpl.java
M3UAManagementImpl.createAs
public As createAs(String asName, Functionality functionality, ExchangeType exchangeType, IPSPType ipspType, RoutingContext rc, TrafficModeType trafficMode, int minAspActiveForLoadbalance, NetworkAppearance na) throws Exception { """ <p> Create new {@link AsImpl} </p> <p> Command is m3u...
java
public As createAs(String asName, Functionality functionality, ExchangeType exchangeType, IPSPType ipspType, RoutingContext rc, TrafficModeType trafficMode, int minAspActiveForLoadbalance, NetworkAppearance na) throws Exception { As as = this.getAs(asName); if (as != null) { ...
[ "public", "As", "createAs", "(", "String", "asName", ",", "Functionality", "functionality", ",", "ExchangeType", "exchangeType", ",", "IPSPType", "ipspType", ",", "RoutingContext", "rc", ",", "TrafficModeType", "trafficMode", ",", "int", "minAspActiveForLoadbalance", ...
<p> Create new {@link AsImpl} </p> <p> Command is m3ua as create <as-name> <AS | SGW | IPSP> mode <SE | DE> ipspType <client | server > rc <routing-context> traffic-mode <traffic mode> min-asp <minimum asp active for TrafficModeType.Loadshare> network-appearance <network appearance> </p> <p> where mode is optional, by ...
[ "<p", ">", "Create", "new", "{", "@link", "AsImpl", "}", "<", "/", "p", ">", "<p", ">", "Command", "is", "m3ua", "as", "create", "<as", "-", "name", ">", "<AS", "|", "SGW", "|", "IPSP", ">", "mode", "<SE", "|", "DE", ">", "ipspType", "<client", ...
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/m3ua/impl/src/main/java/org/restcomm/protocols/ss7/m3ua/impl/M3UAManagementImpl.java#L422-L465
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java
BroxWarpingSpacial.interpolateFlowScale
protected void interpolateFlowScale(int widthNew, int heightNew) { """ Provides an initial estimate for the flow by interpolating values from the previous layer. """ // warping isn't done until later so use those images as temporary storage GrayF32 enlargedU = warpDeriv2X; GrayF32 enlargedV = warpDeriv2Y...
java
protected void interpolateFlowScale(int widthNew, int heightNew) { // warping isn't done until later so use those images as temporary storage GrayF32 enlargedU = warpDeriv2X; GrayF32 enlargedV = warpDeriv2Y; // use the previous low resolution flow estimate to initialize the new image interpolateFlowScale(flo...
[ "protected", "void", "interpolateFlowScale", "(", "int", "widthNew", ",", "int", "heightNew", ")", "{", "// warping isn't done until later so use those images as temporary storage", "GrayF32", "enlargedU", "=", "warpDeriv2X", ";", "GrayF32", "enlargedV", "=", "warpDeriv2Y", ...
Provides an initial estimate for the flow by interpolating values from the previous layer.
[ "Provides", "an", "initial", "estimate", "for", "the", "flow", "by", "interpolating", "values", "from", "the", "previous", "layer", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/BroxWarpingSpacial.java#L218-L233
javafxports/javafxmobile-plugin
src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java
ApkBuilder.sealApk
public void sealApk() throws ApkCreationException, SealedApkException { """ Seals the APK, and signs it if necessary. @throws ApkCreationException @throws ApkCreationException if an error occurred @throws SealedApkException if the APK is already sealed. """ if (mIsSealed) { throw new Sea...
java
public void sealApk() throws ApkCreationException, SealedApkException { if (mIsSealed) { throw new SealedApkException("APK is already sealed"); } // close and sign the application package. try { mBuilder.close(); mIsSealed = true; } catch (Exc...
[ "public", "void", "sealApk", "(", ")", "throws", "ApkCreationException", ",", "SealedApkException", "{", "if", "(", "mIsSealed", ")", "{", "throw", "new", "SealedApkException", "(", "\"APK is already sealed\"", ")", ";", "}", "// close and sign the application package."...
Seals the APK, and signs it if necessary. @throws ApkCreationException @throws ApkCreationException if an error occurred @throws SealedApkException if the APK is already sealed.
[ "Seals", "the", "APK", "and", "signs", "it", "if", "necessary", "." ]
train
https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L841-L855
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.clickLongOnScreen
public void clickLongOnScreen(float x, float y) { """ Long clicks the specified coordinates. @param x the x coordinate @param y the y coordinate """ if(config.commandLogging){ Log.d(config.commandLoggingTag, "clickLongOnScreen("+x+", "+y+")"); } clicker.clickLongOnScreen(x, y, 0, null); }
java
public void clickLongOnScreen(float x, float y) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "clickLongOnScreen("+x+", "+y+")"); } clicker.clickLongOnScreen(x, y, 0, null); }
[ "public", "void", "clickLongOnScreen", "(", "float", "x", ",", "float", "y", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"clickLongOnScreen(\"", "+", "x", "+", "\", \"", ...
Long clicks the specified coordinates. @param x the x coordinate @param y the y coordinate
[ "Long", "clicks", "the", "specified", "coordinates", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L1170-L1176
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.formatPluralCurrency
public static String formatPluralCurrency(final Number value) { """ <p> Formats a monetary amount with currency plural names, for example, "US dollar" or "US dollars" for America. </p> @param value Number to be formatted @return String representing the monetary amount """ DecimalFormat decf = c...
java
public static String formatPluralCurrency(final Number value) { DecimalFormat decf = context.get().getPluralCurrencyFormat(); return stripZeros(decf, decf.format(value)); }
[ "public", "static", "String", "formatPluralCurrency", "(", "final", "Number", "value", ")", "{", "DecimalFormat", "decf", "=", "context", ".", "get", "(", ")", ".", "getPluralCurrencyFormat", "(", ")", ";", "return", "stripZeros", "(", "decf", ",", "decf", "...
<p> Formats a monetary amount with currency plural names, for example, "US dollar" or "US dollars" for America. </p> @param value Number to be formatted @return String representing the monetary amount
[ "<p", ">", "Formats", "a", "monetary", "amount", "with", "currency", "plural", "names", "for", "example", "US", "dollar", "or", "US", "dollars", "for", "America", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L965-L969
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.beginUpdateInstancesAsync
public Observable<OperationStatusResponseInner> beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { """ Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmSca...
java
public Observable<OperationStatusResponseInner> beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<OperationStatusResponseInner>, ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "beginUpdateInstancesAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "beginUpdateInstancesWithServiceResponseAs...
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. @throws IllegalArgumentException thrown if parameters fail t...
[ "Upgrades", "one", "or", "more", "virtual", "machines", "to", "the", "latest", "SKU", "set", "in", "the", "VM", "scale", "set", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L2820-L2827
tzaeschke/zoodb
src/org/zoodb/internal/server/index/LLIndexPage.java
LLIndexPage.locatePageForKey
public LLIndexPage locatePageForKey(long key, long value, boolean allowCreate) { """ Locate the (first) page that could contain the given key. In the inner pages, the keys are the minimum values of the sub-page. The value is the according minimum value of the first key of the sub-page. @param key @return Page ...
java
public LLIndexPage locatePageForKey(long key, long value, boolean allowCreate) { if (isLeaf) { return this; } if (nEntries == -1 && !allowCreate) { return null; } //The stored value[i] is the min-values of the according page[i+1} int pos = binarySearch(0, nEntries, key, value); if (pos...
[ "public", "LLIndexPage", "locatePageForKey", "(", "long", "key", ",", "long", "value", ",", "boolean", "allowCreate", ")", "{", "if", "(", "isLeaf", ")", "{", "return", "this", ";", "}", "if", "(", "nEntries", "==", "-", "1", "&&", "!", "allowCreate", ...
Locate the (first) page that could contain the given key. In the inner pages, the keys are the minimum values of the sub-page. The value is the according minimum value of the first key of the sub-page. @param key @return Page for that key
[ "Locate", "the", "(", "first", ")", "page", "that", "could", "contain", "the", "given", "key", ".", "In", "the", "inner", "pages", "the", "keys", "are", "the", "minimum", "values", "of", "the", "sub", "-", "page", ".", "The", "value", "is", "the", "a...
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/server/index/LLIndexPage.java#L177-L197
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/ProjectionInvocationHandler.java
ProjectionInvocationHandler.injectMeAttribute
private static void injectMeAttribute(final DOMAccess me, final Object target, final Class<?> projectionInterface) { """ Find the "me" attribute (which is a replacement for "this") and inject the projection proxy instance. @param me @param target """ //final Class<?> projectionInterface = me.getPr...
java
private static void injectMeAttribute(final DOMAccess me, final Object target, final Class<?> projectionInterface) { //final Class<?> projectionInterface = me.getProjectionInterface(); for (Field field : target.getClass().getDeclaredFields()) { if (!isValidMeField(field, projectionInterface)...
[ "private", "static", "void", "injectMeAttribute", "(", "final", "DOMAccess", "me", ",", "final", "Object", "target", ",", "final", "Class", "<", "?", ">", "projectionInterface", ")", "{", "//final Class<?> projectionInterface = me.getProjectionInterface();", "for", "(",...
Find the "me" attribute (which is a replacement for "this") and inject the projection proxy instance. @param me @param target
[ "Find", "the", "me", "attribute", "(", "which", "is", "a", "replacement", "for", "this", ")", "and", "inject", "the", "projection", "proxy", "instance", "." ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/ProjectionInvocationHandler.java#L830-L847
carewebframework/carewebframework-vista
org.carewebframework.vista.plugin-parent/org.carewebframework.vista.plugin.documents/src/main/java/org/carewebframework/vista/plugin/documents/DocumentListRenderer.java
DocumentListRenderer.addCell
private void addCell(Listitem item, Object value) { """ Add a cell to the list item containing the specified text value. @param item List item to receive new cell. @param value Text to include in the new cell. """ createCell(item, value, null, null); }
java
private void addCell(Listitem item, Object value) { createCell(item, value, null, null); }
[ "private", "void", "addCell", "(", "Listitem", "item", ",", "Object", "value", ")", "{", "createCell", "(", "item", ",", "value", ",", "null", ",", "null", ")", ";", "}" ]
Add a cell to the list item containing the specified text value. @param item List item to receive new cell. @param value Text to include in the new cell.
[ "Add", "a", "cell", "to", "the", "list", "item", "containing", "the", "specified", "text", "value", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.plugin-parent/org.carewebframework.vista.plugin.documents/src/main/java/org/carewebframework/vista/plugin/documents/DocumentListRenderer.java#L72-L74
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.clearText
protected void clearText(PageElement pageElement, Object... args) throws TechnicalException, FailureException { """ Update a html input text with "". @param pageElement Is target element @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a techn...
java
protected void clearText(PageElement pageElement, Object... args) throws TechnicalException, FailureException { clearText(pageElement, null, args); }
[ "protected", "void", "clearText", "(", "PageElement", "pageElement", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "clearText", "(", "pageElement", ",", "null", ",", "args", ")", ";", "}" ]
Update a html input text with "". @param pageElement Is target element @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_E...
[ "Update", "a", "html", "input", "text", "with", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L244-L246
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/slider2/Slider2Renderer.java
Slider2Renderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:slider2. @param context the FacesContext. @param component the current b:slider2. @throws IOException thrown if something goes wrong when writing the HTM...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } Slider2 slider = (Slider2) component; ResponseWriter rw = context.getResponseWriter(); encodeHTML(slider, context, rw); }
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "Slider2", "slider",...
This methods generates the HTML code of the current b:slider2. @param context the FacesContext. @param component the current b:slider2. @throws IOException thrown if something goes wrong when writing the HTML code.
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "slider2", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/slider2/Slider2Renderer.java#L73-L81
geomajas/geomajas-project-server
plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java
FeatureSourceRetriever.asFeature
protected SimpleFeature asFeature(Object possibleFeature) throws LayerException { """ Convert the given feature object to a {@link SimpleFeature}. @param possibleFeature feature object to convert @return converted feature @throws LayerException object could not be converted """ if (possibleFeature insta...
java
protected SimpleFeature asFeature(Object possibleFeature) throws LayerException { if (possibleFeature instanceof SimpleFeature) { return (SimpleFeature) possibleFeature; } else { throw new LayerException(ExceptionCode.INVALID_FEATURE_OBJECT, possibleFeature.getClass().getName()); } }
[ "protected", "SimpleFeature", "asFeature", "(", "Object", "possibleFeature", ")", "throws", "LayerException", "{", "if", "(", "possibleFeature", "instanceof", "SimpleFeature", ")", "{", "return", "(", "SimpleFeature", ")", "possibleFeature", ";", "}", "else", "{", ...
Convert the given feature object to a {@link SimpleFeature}. @param possibleFeature feature object to convert @return converted feature @throws LayerException object could not be converted
[ "Convert", "the", "given", "feature", "object", "to", "a", "{", "@link", "SimpleFeature", "}", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/shapeinmem/FeatureSourceRetriever.java#L140-L146
jenkinsci/ssh-slaves-plugin
src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
SSHLauncher.reportTransportLoss
private boolean reportTransportLoss(Connection c, TaskListener listener) { """ If the SSH connection as a whole is lost, report that information. """ Throwable cause = c.getReasonClosedCause(); if (cause != null) { cause.printStackTrace(listener.error("Socket connection to SSH serve...
java
private boolean reportTransportLoss(Connection c, TaskListener listener) { Throwable cause = c.getReasonClosedCause(); if (cause != null) { cause.printStackTrace(listener.error("Socket connection to SSH server was lost")); } return cause != null; }
[ "private", "boolean", "reportTransportLoss", "(", "Connection", "c", ",", "TaskListener", "listener", ")", "{", "Throwable", "cause", "=", "c", ".", "getReasonClosedCause", "(", ")", ";", "if", "(", "cause", "!=", "null", ")", "{", "cause", ".", "printStackT...
If the SSH connection as a whole is lost, report that information.
[ "If", "the", "SSH", "connection", "as", "a", "whole", "is", "lost", "report", "that", "information", "." ]
train
https://github.com/jenkinsci/ssh-slaves-plugin/blob/95f528730fc1e01b25983459927b7516ead3ee00/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L1014-L1021
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.deleteSharedProjectGroupLink
public void deleteSharedProjectGroupLink(GitlabGroup group, GitlabProject project) throws IOException { """ Delete a shared project link within a group. @param group The group. @param project The project. @throws IOException on gitlab api call error """ deleteSharedProjectGroupLink(group.getId()...
java
public void deleteSharedProjectGroupLink(GitlabGroup group, GitlabProject project) throws IOException { deleteSharedProjectGroupLink(group.getId(), project.getId()); }
[ "public", "void", "deleteSharedProjectGroupLink", "(", "GitlabGroup", "group", ",", "GitlabProject", "project", ")", "throws", "IOException", "{", "deleteSharedProjectGroupLink", "(", "group", ".", "getId", "(", ")", ",", "project", ".", "getId", "(", ")", ")", ...
Delete a shared project link within a group. @param group The group. @param project The project. @throws IOException on gitlab api call error
[ "Delete", "a", "shared", "project", "link", "within", "a", "group", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3904-L3906
apache/incubator-druid
extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/BloomKFilter.java
BloomKFilter.getNumSetBits
public static int getNumSetBits(ByteBuffer bfBuffer, int start) { """ ByteBuffer based copy of logic of {@link BloomKFilter#getNumSetBits()} @param bfBuffer @param start @return """ ByteBuffer view = bfBuffer.duplicate().order(ByteOrder.BIG_ENDIAN); view.position(start); int numLongs = view.getI...
java
public static int getNumSetBits(ByteBuffer bfBuffer, int start) { ByteBuffer view = bfBuffer.duplicate().order(ByteOrder.BIG_ENDIAN); view.position(start); int numLongs = view.getInt(1 + start); int setBits = 0; for (int i = 0, pos = START_OF_SERIALIZED_LONGS + start; i < numLongs; i++, pos += Lon...
[ "public", "static", "int", "getNumSetBits", "(", "ByteBuffer", "bfBuffer", ",", "int", "start", ")", "{", "ByteBuffer", "view", "=", "bfBuffer", ".", "duplicate", "(", ")", ".", "order", "(", "ByteOrder", ".", "BIG_ENDIAN", ")", ";", "view", ".", "position...
ByteBuffer based copy of logic of {@link BloomKFilter#getNumSetBits()} @param bfBuffer @param start @return
[ "ByteBuffer", "based", "copy", "of", "logic", "of", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/filter/BloomKFilter.java#L336-L346
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.java
NTLMUtilities.extractTargetInfoFromType2Message
public static byte[] extractTargetInfoFromType2Message(byte[] msg, Integer msgFlags) { """ Extracts the target information block from the type 2 message. @param msg the type 2 message byte array @param msgFlags the flags if null then flags are extracted from the type 2 message @return the target ...
java
public static byte[] extractTargetInfoFromType2Message(byte[] msg, Integer msgFlags) { int flags = msgFlags == null ? extractFlagsFromType2Message(msg) : msgFlags; if (!ByteUtilities.isFlagSet(flags, FLAG_NEGOTIATE_TARGET_INFO)) return null; int pos = 40...
[ "public", "static", "byte", "[", "]", "extractTargetInfoFromType2Message", "(", "byte", "[", "]", "msg", ",", "Integer", "msgFlags", ")", "{", "int", "flags", "=", "msgFlags", "==", "null", "?", "extractFlagsFromType2Message", "(", "msg", ")", ":", "msgFlags",...
Extracts the target information block from the type 2 message. @param msg the type 2 message byte array @param msgFlags the flags if null then flags are extracted from the type 2 message @return the target info
[ "Extracts", "the", "target", "information", "block", "from", "the", "type", "2", "message", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.java#L330-L341
janus-project/guava.janusproject.io
guava/src/com/google/common/util/concurrent/MoreExecutors.java
MoreExecutors.newThread
static Thread newThread(String name, Runnable runnable) { """ Creates a thread using {@link #platformThreadFactory}, and sets its name to {@code name} unless changing the name is forbidden by the security manager. """ checkNotNull(name); checkNotNull(runnable); Thread result = platformThreadFactor...
java
static Thread newThread(String name, Runnable runnable) { checkNotNull(name); checkNotNull(runnable); Thread result = platformThreadFactory().newThread(runnable); try { result.setName(name); } catch (SecurityException e) { // OK if we can't set the name in this environment. } ret...
[ "static", "Thread", "newThread", "(", "String", "name", ",", "Runnable", "runnable", ")", "{", "checkNotNull", "(", "name", ")", ";", "checkNotNull", "(", "runnable", ")", ";", "Thread", "result", "=", "platformThreadFactory", "(", ")", ".", "newThread", "("...
Creates a thread using {@link #platformThreadFactory}, and sets its name to {@code name} unless changing the name is forbidden by the security manager.
[ "Creates", "a", "thread", "using", "{" ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/util/concurrent/MoreExecutors.java#L813-L823
icode/ameba
src/main/java/ameba/db/ebean/support/ModelResourceStructure.java
ModelResourceStructure.applyRowCountHeader
protected void applyRowCountHeader(MultivaluedMap<String, Object> headerParams, Query query, FutureRowCount rowCount) { """ <p>applyRowCountHeader.</p> @param headerParams a {@link javax.ws.rs.core.MultivaluedMap} object. @param query a {@link io.ebean.Query} object. @param rowCount a {@link io.ebe...
java
protected void applyRowCountHeader(MultivaluedMap<String, Object> headerParams, Query query, FutureRowCount rowCount) { ModelInterceptor.applyRowCountHeader(headerParams, query, rowCount); }
[ "protected", "void", "applyRowCountHeader", "(", "MultivaluedMap", "<", "String", ",", "Object", ">", "headerParams", ",", "Query", "query", ",", "FutureRowCount", "rowCount", ")", "{", "ModelInterceptor", ".", "applyRowCountHeader", "(", "headerParams", ",", "query...
<p>applyRowCountHeader.</p> @param headerParams a {@link javax.ws.rs.core.MultivaluedMap} object. @param query a {@link io.ebean.Query} object. @param rowCount a {@link io.ebean.FutureRowCount} object.
[ "<p", ">", "applyRowCountHeader", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/support/ModelResourceStructure.java#L1042-L1044
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java
CredentialReference.getAttributeBuilder
public static ObjectTypeAttributeDefinition.Builder getAttributeBuilder(String name, String xmlName, boolean allowNull, CapabilityReferenceRecorder capabilityStoreReferenceRecorder) { """ Get an attribute builder for a credential-reference...
java
public static ObjectTypeAttributeDefinition.Builder getAttributeBuilder(String name, String xmlName, boolean allowNull, CapabilityReferenceRecorder capabilityStoreReferenceRecorder) { if (capabilityStoreReferenceRecorder == null) { ...
[ "public", "static", "ObjectTypeAttributeDefinition", ".", "Builder", "getAttributeBuilder", "(", "String", "name", ",", "String", "xmlName", ",", "boolean", "allowNull", ",", "CapabilityReferenceRecorder", "capabilityStoreReferenceRecorder", ")", "{", "if", "(", "capabili...
Get an attribute builder for a credential-reference attribute with the specified characteristics, optionally configured to {@link org.jboss.as.controller.AbstractAttributeDefinitionBuilder#setCapabilityReference(CapabilityReferenceRecorder)} register a requirement} for a {@link #CREDENTIAL_STORE_CAPABILITY credential s...
[ "Get", "an", "attribute", "builder", "for", "a", "credential", "-", "reference", "attribute", "with", "the", "specified", "characteristics", "optionally", "configured", "to", "{", "@link", "org", ".", "jboss", ".", "as", ".", "controller", ".", "AbstractAttribut...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java#L243-L254
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/HttpURI.java
HttpURI.createHttpURI
public static HttpURI createHttpURI(String scheme, String host, int port, String path, String param, String query, String fragment) { """ Construct a normalized URI. Port is not set if it is the default port. @param scheme the URI scheme @param host the URI hose @param port the URI port @param pat...
java
public static HttpURI createHttpURI(String scheme, String host, int port, String path, String param, String query, String fragment) { if (port == 80 && HttpScheme.HTTP.is(scheme)) port = 0; if (port == 443 && HttpScheme.HTTPS.is(scheme)) port = 0; return new HttpURI(schem...
[ "public", "static", "HttpURI", "createHttpURI", "(", "String", "scheme", ",", "String", "host", ",", "int", "port", ",", "String", "path", ",", "String", "param", ",", "String", "query", ",", "String", "fragment", ")", "{", "if", "(", "port", "==", "80",...
Construct a normalized URI. Port is not set if it is the default port. @param scheme the URI scheme @param host the URI hose @param port the URI port @param path the URI path @param param the URI param @param query the URI query @param fragment the URI fragment @return the normalized URI
[ "Construct", "a", "normalized", "URI", ".", "Port", "is", "not", "set", "if", "it", "is", "the", "default", "port", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/HttpURI.java#L74-L80
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.listByResource
public List<EventSubscriptionInner> listByResource(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { """ List all event subscriptions for a specific topic. List all event subscriptions that have been created for a specific topic. @param resourceGroupName The na...
java
public List<EventSubscriptionInner> listByResource(String resourceGroupName, String providerNamespace, String resourceTypeName, String resourceName) { return listByResourceWithServiceResponseAsync(resourceGroupName, providerNamespace, resourceTypeName, resourceName).toBlocking().single().body(); }
[ "public", "List", "<", "EventSubscriptionInner", ">", "listByResource", "(", "String", "resourceGroupName", ",", "String", "providerNamespace", ",", "String", "resourceTypeName", ",", "String", "resourceName", ")", "{", "return", "listByResourceWithServiceResponseAsync", ...
List all event subscriptions for a specific topic. List all event subscriptions that have been created for a specific topic. @param resourceGroupName The name of the resource group within the user's subscription. @param providerNamespace Namespace of the provider of the topic @param resourceTypeName Name of the resour...
[ "List", "all", "event", "subscriptions", "for", "a", "specific", "topic", ".", "List", "all", "event", "subscriptions", "that", "have", "been", "created", "for", "a", "specific", "topic", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L1566-L1568
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java
JMultiFieldPanel.setControlValue
public void setControlValue(Object objValue, Component component) { """ Set this control to this value. @param objValue The value to set the component to. @param component The component to set to this value. """ Convert converter = null; if (component instanceof ScreenComponent) c...
java
public void setControlValue(Object objValue, Component component) { Convert converter = null; if (component instanceof ScreenComponent) converter = ((ScreenComponent)component).getConverter(); if (converter == null) converter = m_converter; if (component inst...
[ "public", "void", "setControlValue", "(", "Object", "objValue", ",", "Component", "component", ")", "{", "Convert", "converter", "=", "null", ";", "if", "(", "component", "instanceof", "ScreenComponent", ")", "converter", "=", "(", "(", "ScreenComponent", ")", ...
Set this control to this value. @param objValue The value to set the component to. @param component The component to set to this value.
[ "Set", "this", "control", "to", "this", "value", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JMultiFieldPanel.java#L161-L173
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/meta/InodeLockManager.java
InodeLockManager.lockInode
public LockResource lockInode(InodeView inode, LockMode mode) { """ Acquires an inode lock. @param inode the inode to lock @param mode the mode to lock in @return a lock resource which must be closed to release the lock """ return mInodeLocks.get(inode.getId(), mode); }
java
public LockResource lockInode(InodeView inode, LockMode mode) { return mInodeLocks.get(inode.getId(), mode); }
[ "public", "LockResource", "lockInode", "(", "InodeView", "inode", ",", "LockMode", "mode", ")", "{", "return", "mInodeLocks", ".", "get", "(", "inode", ".", "getId", "(", ")", ",", "mode", ")", ";", "}" ]
Acquires an inode lock. @param inode the inode to lock @param mode the mode to lock in @return a lock resource which must be closed to release the lock
[ "Acquires", "an", "inode", "lock", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/meta/InodeLockManager.java#L121-L123
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java
DefaultShardManagerBuilder.setContextMap
public DefaultShardManagerBuilder setContextMap(IntFunction<? extends ConcurrentMap<String, String>> provider) { """ Sets the {@link org.slf4j.MDC MDC} mappings provider to use in JDA. <br>If sharding is enabled JDA will automatically add a {@code jda.shard} context with the format {@code [SHARD_ID / TOTAL]} whe...
java
public DefaultShardManagerBuilder setContextMap(IntFunction<? extends ConcurrentMap<String, String>> provider) { this.contextProvider = provider; if (provider != null) this.enableContext = true; return this; }
[ "public", "DefaultShardManagerBuilder", "setContextMap", "(", "IntFunction", "<", "?", "extends", "ConcurrentMap", "<", "String", ",", "String", ">", ">", "provider", ")", "{", "this", ".", "contextProvider", "=", "provider", ";", "if", "(", "provider", "!=", ...
Sets the {@link org.slf4j.MDC MDC} mappings provider to use in JDA. <br>If sharding is enabled JDA will automatically add a {@code jda.shard} context with the format {@code [SHARD_ID / TOTAL]} where {@code SHARD_ID} and {@code TOTAL} are the shard configuration. Additionally it will provide context for the id via {@cod...
[ "Sets", "the", "{", "@link", "org", ".", "slf4j", ".", "MDC", "MDC", "}", "mappings", "provider", "to", "use", "in", "JDA", ".", "<br", ">", "If", "sharding", "is", "enabled", "JDA", "will", "automatically", "add", "a", "{", "@code", "jda", ".", "sha...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java#L167-L173
umano/AndroidSlidingUpPanel
library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java
ViewDragHelper.forceSettleCapturedViewAt
private boolean forceSettleCapturedViewAt(int finalLeft, int finalTop, int xvel, int yvel) { """ Settle the captured view at the given (left, top) position. @param finalLeft Target left position for the captured view @param finalTop Target top position for the captured view @param xvel Horizontal velocity @p...
java
private boolean forceSettleCapturedViewAt(int finalLeft, int finalTop, int xvel, int yvel) { final int startLeft = mCapturedView.getLeft(); final int startTop = mCapturedView.getTop(); final int dx = finalLeft - startLeft; final int dy = finalTop - startTop; if (dx == 0 && dy ==...
[ "private", "boolean", "forceSettleCapturedViewAt", "(", "int", "finalLeft", ",", "int", "finalTop", ",", "int", "xvel", ",", "int", "yvel", ")", "{", "final", "int", "startLeft", "=", "mCapturedView", ".", "getLeft", "(", ")", ";", "final", "int", "startTop"...
Settle the captured view at the given (left, top) position. @param finalLeft Target left position for the captured view @param finalTop Target top position for the captured view @param xvel Horizontal velocity @param yvel Vertical velocity @return true if animation should continue through {@link #continueSettling(bool...
[ "Settle", "the", "captured", "view", "at", "the", "given", "(", "left", "top", ")", "position", "." ]
train
https://github.com/umano/AndroidSlidingUpPanel/blob/45a460435b07e764138a700328836cafc1ed5c42/library/src/main/java/com/sothree/slidinguppanel/ViewDragHelper.java#L607-L625
MythTV-Clients/MythTV-Service-API
src/main/java/org/mythtv/services/api/ServerVersionQuery.java
ServerVersionQuery.getMythVersion
public static ApiVersion getMythVersion(String baseUri, long connectTimeout, TimeUnit timeUnit) throws IOException { """ Gets the api version of the given backend @param baseUri the backend services api url @param connectTimeout connection timeout @param timeUnit connection timeout unit @return the Api versi...
java
public static ApiVersion getMythVersion(String baseUri, long connectTimeout, TimeUnit timeUnit) throws IOException { OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(connectTimeout, timeUnit); return getMythVersion(baseUri, client); }
[ "public", "static", "ApiVersion", "getMythVersion", "(", "String", "baseUri", ",", "long", "connectTimeout", ",", "TimeUnit", "timeUnit", ")", "throws", "IOException", "{", "OkHttpClient", "client", "=", "new", "OkHttpClient", "(", ")", ";", "client", ".", "setC...
Gets the api version of the given backend @param baseUri the backend services api url @param connectTimeout connection timeout @param timeUnit connection timeout unit @return the Api version @throws IOException if an error occurs
[ "Gets", "the", "api", "version", "of", "the", "given", "backend" ]
train
https://github.com/MythTV-Clients/MythTV-Service-API/blob/7951954f767515550738f1b064d6c97099e6df15/src/main/java/org/mythtv/services/api/ServerVersionQuery.java#L43-L47
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/AddAliasCommand.java
AddAliasCommand.addNewAliasToList
private ModelNode addNewAliasToList(ModelNode list, String alias) { """ Adds new alias to a LIST ModelNode of existing aliases. @param list LIST ModelNode of aliases @param alias @return LIST ModelNode with the added aliases """ // check for empty string if (alias == null || alias.equals(...
java
private ModelNode addNewAliasToList(ModelNode list, String alias) { // check for empty string if (alias == null || alias.equals("")) return list ; // check for undefined list (AS7-3476) if (!list.isDefined()) { list.setEmptyList(); } ModelNode n...
[ "private", "ModelNode", "addNewAliasToList", "(", "ModelNode", "list", ",", "String", "alias", ")", "{", "// check for empty string", "if", "(", "alias", "==", "null", "||", "alias", ".", "equals", "(", "\"\"", ")", ")", "return", "list", ";", "// check for un...
Adds new alias to a LIST ModelNode of existing aliases. @param list LIST ModelNode of aliases @param alias @return LIST ModelNode with the added aliases
[ "Adds", "new", "alias", "to", "a", "LIST", "ModelNode", "of", "existing", "aliases", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/AddAliasCommand.java#L97-L121
korpling/ANNIS
annis-service/src/main/java/annis/administration/AdministrationDao.java
AdministrationDao.listIndexDefinitions
public List<String> listIndexDefinitions(boolean used, List<String> tables) { """ /* Returns the CREATE INDEX statement for all indexes on the Annis tables, that are not auto-created by PostgreSQL (primary keys and unique constraints). @param used If True, return used indexes. If False, return unused indexes...
java
public List<String> listIndexDefinitions(boolean used, List<String> tables) { String scansOp = used ? "!=" : "="; String sql = "SELECT pg_get_indexdef(x.indexrelid) AS indexdef " + "FROM pg_index x, pg_class c " + "WHERE x.indexrelid = c.oid " + "AND c.relname IN ( " + StringUtils.repe...
[ "public", "List", "<", "String", ">", "listIndexDefinitions", "(", "boolean", "used", ",", "List", "<", "String", ">", "tables", ")", "{", "String", "scansOp", "=", "used", "?", "\"!=\"", ":", "\"=\"", ";", "String", "sql", "=", "\"SELECT pg_get_indexdef(x.i...
/* Returns the CREATE INDEX statement for all indexes on the Annis tables, that are not auto-created by PostgreSQL (primary keys and unique constraints). @param used If True, return used indexes. If False, return unused indexes (scan count is 0).
[ "/", "*", "Returns", "the", "CREATE", "INDEX", "statement", "for", "all", "indexes", "on", "the", "Annis", "tables", "that", "are", "not", "auto", "-", "created", "by", "PostgreSQL", "(", "primary", "keys", "and", "unique", "constraints", ")", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/administration/AdministrationDao.java#L1808-L1819
Sproutigy/Java-Commons-Binary
src/main/java/com/sproutigy/commons/binary/Binary.java
Binary.asBase64
public String asBase64() throws IOException { """ Represent as Base 64 with standard dialect and standard padding @return Base 64 encoded string """ return asBase64(BaseEncoding.Dialect.STANDARD, BaseEncoding.Padding.STANDARD); }
java
public String asBase64() throws IOException { return asBase64(BaseEncoding.Dialect.STANDARD, BaseEncoding.Padding.STANDARD); }
[ "public", "String", "asBase64", "(", ")", "throws", "IOException", "{", "return", "asBase64", "(", "BaseEncoding", ".", "Dialect", ".", "STANDARD", ",", "BaseEncoding", ".", "Padding", ".", "STANDARD", ")", ";", "}" ]
Represent as Base 64 with standard dialect and standard padding @return Base 64 encoded string
[ "Represent", "as", "Base", "64", "with", "standard", "dialect", "and", "standard", "padding" ]
train
https://github.com/Sproutigy/Java-Commons-Binary/blob/547ab53d16e454d53ed5cef1d1ee514ec2d7c726/src/main/java/com/sproutigy/commons/binary/Binary.java#L316-L318
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcPreparedStatement.java
WSJdbcPreparedStatement.addBatch
private Object addBatch(Object implObject, Method method, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, SQLException { """ Invokes addBatch after replacing the parameter with the DB2 impl object if proxied. @param implO...
java
private Object addBatch(Object implObject, Method method, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, SQLException { Object sqljPstmt = args[0]; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); ...
[ "private", "Object", "addBatch", "(", "Object", "implObject", ",", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "IllegalAccessException", ",", "IllegalArgumentException", ",", "InvocationTargetException", ",", "SQLException", "{", "Object", "s...
Invokes addBatch after replacing the parameter with the DB2 impl object if proxied. @param implObject the instance on which the operation is invoked. @param method the method that is invoked. @param args the parameters to the method. @throws IllegalAccessException if the method is inaccessible. @throws IllegalArgumen...
[ "Invokes", "addBatch", "after", "replacing", "the", "parameter", "with", "the", "DB2", "impl", "object", "if", "proxied", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcPreparedStatement.java#L201-L219
fabric8io/kubernetes-client
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ApiVersionUtil.java
ApiVersionUtil.apiVersion
public static <T> String apiVersion(T item, String apiVersion) { """ Returns the api version falling back to the items apiGroupVersion if not null. @param <T> type of parameter @param item item to be processed @param apiVersion apiVersion string @return returns api version """ if (item instanceof HasMe...
java
public static <T> String apiVersion(T item, String apiVersion) { if (item instanceof HasMetadata && Utils.isNotNullOrEmpty(((HasMetadata) item).getApiVersion())) { return trimVersion(((HasMetadata) item).getApiVersion()); } else if (apiVersion != null && !apiVersion.isEmpty()) { return trimVersion(a...
[ "public", "static", "<", "T", ">", "String", "apiVersion", "(", "T", "item", ",", "String", "apiVersion", ")", "{", "if", "(", "item", "instanceof", "HasMetadata", "&&", "Utils", ".", "isNotNullOrEmpty", "(", "(", "(", "HasMetadata", ")", "item", ")", "....
Returns the api version falling back to the items apiGroupVersion if not null. @param <T> type of parameter @param item item to be processed @param apiVersion apiVersion string @return returns api version
[ "Returns", "the", "api", "version", "falling", "back", "to", "the", "items", "apiGroupVersion", "if", "not", "null", "." ]
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/ApiVersionUtil.java#L45-L52
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java
Postconditions.checkPostconditionsI
public static int checkPostconditionsI( final int value, final ContractIntConditionType... conditions) throws PostconditionViolationException { """ An {@code int} specialized version of {@link #checkPostconditions(Object, ContractConditionType[])} @param value The value @param conditions The ...
java
public static int checkPostconditionsI( final int value, final ContractIntConditionType... conditions) throws PostconditionViolationException { final Violations violations = innerCheckAllInt(value, conditions); if (violations != null) { throw failed(null, Integer.valueOf(value), violations);...
[ "public", "static", "int", "checkPostconditionsI", "(", "final", "int", "value", ",", "final", "ContractIntConditionType", "...", "conditions", ")", "throws", "PostconditionViolationException", "{", "final", "Violations", "violations", "=", "innerCheckAllInt", "(", "val...
An {@code int} specialized version of {@link #checkPostconditions(Object, ContractConditionType[])} @param value The value @param conditions The conditions the value must obey @return value @throws PostconditionViolationException If any of the conditions are false
[ "An", "{", "@code", "int", "}", "specialized", "version", "of", "{", "@link", "#checkPostconditions", "(", "Object", "ContractConditionType", "[]", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java#L98-L108
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
Node.getSubscriptionsAsOwner
public List<Subscription> getSubscriptionsAsOwner() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Get the subscriptions currently associated with this node as owner. @return List of {@link Subscription} @throws XMPPErrorException @throws ...
java
public List<Subscription> getSubscriptionsAsOwner() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getSubscriptionsAsOwner(null, null); }
[ "public", "List", "<", "Subscription", ">", "getSubscriptionsAsOwner", "(", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "getSubscriptionsAsOwner", "(", "null", ",", "null", ")...
Get the subscriptions currently associated with this node as owner. @return List of {@link Subscription} @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException @see #getSubscriptionsAsOwner(List, Collection) @since 4.1
[ "Get", "the", "subscriptions", "currently", "associated", "with", "this", "node", "as", "owner", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java#L171-L174
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.blockReplication
public int blockReplication(String[] argv, int idx) throws IOException { """ Enable/Disable Block Replication. Usage: java DFSAdmin -blockReplication enable/disable """ DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return ...
java
public int blockReplication(String[] argv, int idx) throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return -1; } String option = argv[idx]; boolean isEnable = true; if (option.equals("enable")) { ...
[ "public", "int", "blockReplication", "(", "String", "[", "]", "argv", ",", "int", "idx", ")", "throws", "IOException", "{", "DistributedFileSystem", "dfs", "=", "getDFS", "(", ")", ";", "if", "(", "dfs", "==", "null", ")", "{", "System", ".", "out", "....
Enable/Disable Block Replication. Usage: java DFSAdmin -blockReplication enable/disable
[ "Enable", "/", "Disable", "Block", "Replication", ".", "Usage", ":", "java", "DFSAdmin", "-", "blockReplication", "enable", "/", "disable" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L744-L764
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigServerFactory.java
XMLConfigServerFactory.newInstance
public static ConfigServerImpl newInstance(CFMLEngineImpl engine, Map<String, CFMLFactory> initContextes, Map<String, CFMLFactory> contextes, Resource configDir) throws SAXException, ClassException, PageException, IOException, TagLibException, FunctionLibException, BundleException { """ creates a new ServletC...
java
public static ConfigServerImpl newInstance(CFMLEngineImpl engine, Map<String, CFMLFactory> initContextes, Map<String, CFMLFactory> contextes, Resource configDir) throws SAXException, ClassException, PageException, IOException, TagLibException, FunctionLibException, BundleException { boolean isCLI = SystemUtil.is...
[ "public", "static", "ConfigServerImpl", "newInstance", "(", "CFMLEngineImpl", "engine", ",", "Map", "<", "String", ",", "CFMLFactory", ">", "initContextes", ",", "Map", "<", "String", ",", "CFMLFactory", ">", "contextes", ",", "Resource", "configDir", ")", "thro...
creates a new ServletConfig Impl Object @param engine @param initContextes @param contextes @param configDir @return new Instance @throws SAXException @throws ClassNotFoundException @throws PageException @throws IOException @throws TagLibException @throws FunctionLibException @throws BundleException
[ "creates", "a", "new", "ServletConfig", "Impl", "Object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigServerFactory.java#L69-L121
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedBreakIterator.java
RuleBasedBreakIterator.compileRules
public static void compileRules(String rules, OutputStream ruleBinary) throws IOException { """ Compile a set of source break rules into the binary state tables used by the break iterator engine. Creating a break iterator from precompiled rules is much faster than creating one from source rules. Binary break...
java
public static void compileRules(String rules, OutputStream ruleBinary) throws IOException { RBBIRuleBuilder.compileRules(rules, ruleBinary); }
[ "public", "static", "void", "compileRules", "(", "String", "rules", ",", "OutputStream", "ruleBinary", ")", "throws", "IOException", "{", "RBBIRuleBuilder", ".", "compileRules", "(", "rules", ",", "ruleBinary", ")", ";", "}" ]
Compile a set of source break rules into the binary state tables used by the break iterator engine. Creating a break iterator from precompiled rules is much faster than creating one from source rules. Binary break rules are not guaranteed to be compatible between different versions of ICU. @param rules The source ...
[ "Compile", "a", "set", "of", "source", "break", "rules", "into", "the", "binary", "state", "tables", "used", "by", "the", "break", "iterator", "engine", ".", "Creating", "a", "break", "iterator", "from", "precompiled", "rules", "is", "much", "faster", "than"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedBreakIterator.java#L317-L319
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/PatientXmlReader.java
PatientXmlReader.convertSyntaxException
private NaaccrIOException convertSyntaxException(ConversionException ex) { """ We don't want to expose the conversion exceptions, so let's translate them into our own exception... """ String msg = ex.get("message"); // reading a file that has bad tags is very common, so let's try to get a bett...
java
private NaaccrIOException convertSyntaxException(ConversionException ex) { String msg = ex.get("message"); // reading a file that has bad tags is very common, so let's try to get a better error message in that case: if (CannotResolveClassException.class.getName().equals(ex.get("cause-exception"...
[ "private", "NaaccrIOException", "convertSyntaxException", "(", "ConversionException", "ex", ")", "{", "String", "msg", "=", "ex", ".", "get", "(", "\"message\"", ")", ";", "// reading a file that has bad tags is very common, so let's try to get a better error message in that case...
We don't want to expose the conversion exceptions, so let's translate them into our own exception...
[ "We", "don", "t", "want", "to", "expose", "the", "conversion", "exceptions", "so", "let", "s", "translate", "them", "into", "our", "own", "exception", "..." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/PatientXmlReader.java#L413-L430
ModeShape/modeshape
modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java
ModeShapeRestClient.getNodeTypes
public NodeTypes getNodeTypes() { """ Returns all the node types that are available in the repository from {@code repoUrl} @return a {@link NodeTypes} instance; never {@code null} """ String url = jsonRestClient.appendToURL(ITEMS_METHOD, NODE_TYPES_SEGMENT); JSONRestClient.Response response ...
java
public NodeTypes getNodeTypes() { String url = jsonRestClient.appendToURL(ITEMS_METHOD, NODE_TYPES_SEGMENT); JSONRestClient.Response response = jsonRestClient.doGet(url); if (!response.isOK()) { throw new RuntimeException(JdbcI18n.invalidServerResponse.text(url, response.asString()))...
[ "public", "NodeTypes", "getNodeTypes", "(", ")", "{", "String", "url", "=", "jsonRestClient", ".", "appendToURL", "(", "ITEMS_METHOD", ",", "NODE_TYPES_SEGMENT", ")", ";", "JSONRestClient", ".", "Response", "response", "=", "jsonRestClient", ".", "doGet", "(", "...
Returns all the node types that are available in the repository from {@code repoUrl} @return a {@link NodeTypes} instance; never {@code null}
[ "Returns", "all", "the", "node", "types", "that", "are", "available", "in", "the", "repository", "from", "{", "@code", "repoUrl", "}" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc/src/main/java/org/modeshape/jdbc/rest/ModeShapeRestClient.java#L110-L117
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.getSecurityPolicy
public GetSecurityPolicyResponse getSecurityPolicy(GetSecurityPolicyRequest request) { """ Get your live security policy by live security policy name. @param request The request object containing all parameters for getting live security policy. @return Your live security policy. """ checkNotNull(re...
java
public GetSecurityPolicyResponse getSecurityPolicy(GetSecurityPolicyRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string."); InternalRequest internalRe...
[ "public", "GetSecurityPolicyResponse", "getSecurityPolicy", "(", "GetSecurityPolicyRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getName", "(", ")",...
Get your live security policy by live security policy name. @param request The request object containing all parameters for getting live security policy. @return Your live security policy.
[ "Get", "your", "live", "security", "policy", "by", "live", "security", "policy", "name", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1267-L1275
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/jsonrpc/HttpJsonRpcClient.java
HttpJsonRpcClient.doGet
public RequestResponse doGet(String url, Map<String, Object> headers, Map<String, Object> urlParams) { """ Perform a GET request. @param url @param headers @param urlParams @return """ RequestResponse requestResponse = initRequestResponse("GET", url, headers, urlParams, null); ...
java
public RequestResponse doGet(String url, Map<String, Object> headers, Map<String, Object> urlParams) { RequestResponse requestResponse = initRequestResponse("GET", url, headers, urlParams, null); Request.Builder requestBuilder = buildRequest(url, headers, urlParams).get(); return doC...
[ "public", "RequestResponse", "doGet", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "headers", ",", "Map", "<", "String", ",", "Object", ">", "urlParams", ")", "{", "RequestResponse", "requestResponse", "=", "initRequestResponse", "(", ...
Perform a GET request. @param url @param headers @param urlParams @return
[ "Perform", "a", "GET", "request", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/jsonrpc/HttpJsonRpcClient.java#L198-L203
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getCellByName
public Cell getCellByName(String table, String cellName) { """ Returns the Cell (associated to <i>table</i>) whose name is cellName, or null if this Cells object contains no cell whose name is cellName. @param cellName the name of the Cell we want to retrieve from this Cells object. @return the Cell whose nam...
java
public Cell getCellByName(String table, String cellName) { for (Cell c : getCellsByTable(table)) { if (c.getCellName().equals(cellName)) { return c; } } return null; }
[ "public", "Cell", "getCellByName", "(", "String", "table", ",", "String", "cellName", ")", "{", "for", "(", "Cell", "c", ":", "getCellsByTable", "(", "table", ")", ")", "{", "if", "(", "c", ".", "getCellName", "(", ")", ".", "equals", "(", "cellName", ...
Returns the Cell (associated to <i>table</i>) whose name is cellName, or null if this Cells object contains no cell whose name is cellName. @param cellName the name of the Cell we want to retrieve from this Cells object. @return the Cell whose name is cellName contained in this Cells object. null if no cell named cell...
[ "Returns", "the", "Cell", "(", "associated", "to", "<i", ">", "table<", "/", "i", ">", ")", "whose", "name", "is", "cellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", "cell", "whose", "name", "is", "cellName", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L329-L337
grpc/grpc-java
auth/src/main/java/io/grpc/auth/ClientAuthInterceptor.java
ClientAuthInterceptor.serviceUri
private URI serviceUri(Channel channel, MethodDescriptor<?, ?> method) throws StatusException { """ Generate a JWT-specific service URI. The URI is simply an identifier with enough information for a service to know that the JWT was intended for it. The URI will commonly be verified with a simple string equality ...
java
private URI serviceUri(Channel channel, MethodDescriptor<?, ?> method) throws StatusException { String authority = channel.authority(); if (authority == null) { throw Status.UNAUTHENTICATED.withDescription("Channel has no authority").asException(); } // Always use HTTPS, by definition. final S...
[ "private", "URI", "serviceUri", "(", "Channel", "channel", ",", "MethodDescriptor", "<", "?", ",", "?", ">", "method", ")", "throws", "StatusException", "{", "String", "authority", "=", "channel", ".", "authority", "(", ")", ";", "if", "(", "authority", "=...
Generate a JWT-specific service URI. The URI is simply an identifier with enough information for a service to know that the JWT was intended for it. The URI will commonly be verified with a simple string equality check.
[ "Generate", "a", "JWT", "-", "specific", "service", "URI", ".", "The", "URI", "is", "simply", "an", "identifier", "with", "enough", "information", "for", "a", "service", "to", "know", "that", "the", "JWT", "was", "intended", "for", "it", ".", "The", "URI...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/auth/src/main/java/io/grpc/auth/ClientAuthInterceptor.java#L97-L118
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java
FactoryMultiView.pnp_N
public static EstimateNofPnP pnp_N(EnumPNP which , int numIterations ) { """ Creates an estimator for the PnP problem that uses only three observations, which is the minimal case and known as P3P. <p>NOTE: Observations are in normalized image coordinates NOT pixels.</p> @param which The algorithm which is t...
java
public static EstimateNofPnP pnp_N(EnumPNP which , int numIterations ) { MotionTransformPoint<Se3_F64, Point3D_F64> motionFit = FitSpecialEuclideanOps_F64.fitPoints3D(); switch( which ) { case P3P_GRUNERT: P3PGrunert grunert = new P3PGrunert(PolynomialOps.createRootFinder(5, RootFinderType.STURM)); ret...
[ "public", "static", "EstimateNofPnP", "pnp_N", "(", "EnumPNP", "which", ",", "int", "numIterations", ")", "{", "MotionTransformPoint", "<", "Se3_F64", ",", "Point3D_F64", ">", "motionFit", "=", "FitSpecialEuclideanOps_F64", ".", "fitPoints3D", "(", ")", ";", "swit...
Creates an estimator for the PnP problem that uses only three observations, which is the minimal case and known as P3P. <p>NOTE: Observations are in normalized image coordinates NOT pixels.</p> @param which The algorithm which is to be returned. @param numIterations Number of iterations. Only used by some algorithms ...
[ "Creates", "an", "estimator", "for", "the", "PnP", "problem", "that", "uses", "only", "three", "observations", "which", "is", "the", "minimal", "case", "and", "known", "as", "P3P", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java#L440-L463
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.prepareFindById
private <T extends IEntity> IntuitMessage prepareFindById(T entity) throws FMSException { """ Common method to prepare the request params for findById operation for both sync and async calls @param entity the entity @return IntuitMessage the intuit message @throws FMSException """ Class<?> object...
java
private <T extends IEntity> IntuitMessage prepareFindById(T entity) throws FMSException { Class<?> objectClass = entity.getClass(); String entityName = objectClass.getSimpleName(); Object rid = null; Method m; try { m = objectClass.getMethod("getId"); rid...
[ "private", "<", "T", "extends", "IEntity", ">", "IntuitMessage", "prepareFindById", "(", "T", "entity", ")", "throws", "FMSException", "{", "Class", "<", "?", ">", "objectClass", "=", "entity", ".", "getClass", "(", ")", ";", "String", "entityName", "=", "...
Common method to prepare the request params for findById operation for both sync and async calls @param entity the entity @return IntuitMessage the intuit message @throws FMSException
[ "Common", "method", "to", "prepare", "the", "request", "params", "for", "findById", "operation", "for", "both", "sync", "and", "async", "calls" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L1139-L1173
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java
DoubleUtils.clipRecklessly
public static double clipRecklessly(double val, double bounds) { """ Clips the given value within the given bounds. If {@code -bounds <= val <= bounds}, {@code val} is returned unchanged. Otherwise, {@code -bounds} is returned if {@code val<bounds} and {@code bounds} is returned if {@code val>bounds}. {@code b...
java
public static double clipRecklessly(double val, double bounds) { if (val > bounds) { return bounds; } else if (val < -bounds) { return -bounds; } else { return val; } }
[ "public", "static", "double", "clipRecklessly", "(", "double", "val", ",", "double", "bounds", ")", "{", "if", "(", "val", ">", "bounds", ")", "{", "return", "bounds", ";", "}", "else", "if", "(", "val", "<", "-", "bounds", ")", "{", "return", "-", ...
Clips the given value within the given bounds. If {@code -bounds <= val <= bounds}, {@code val} is returned unchanged. Otherwise, {@code -bounds} is returned if {@code val<bounds} and {@code bounds} is returned if {@code val>bounds}. {@code bounds} must be non-negative, but this is not enforced, so prefer using {@lin...
[ "Clips", "the", "given", "value", "within", "the", "given", "bounds", ".", "If", "{", "@code", "-", "bounds", "<", "=", "val", "<", "=", "bounds", "}", "{", "@code", "val", "}", "is", "returned", "unchanged", ".", "Otherwise", "{", "@code", "-", "bou...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java#L300-L308
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.withReader
public static <T> T withReader(Reader reader, @ClosureParams(FirstParam.class) Closure<T> closure) throws IOException { """ Allows this reader to be used within the closure, ensuring that it is closed before this method returns. @param reader the reader which is used and then closed @param closure the closur...
java
public static <T> T withReader(Reader reader, @ClosureParams(FirstParam.class) Closure<T> closure) throws IOException { try { T result = closure.call(reader); Reader temp = reader; reader = null; temp.close(); return result; } finally { ...
[ "public", "static", "<", "T", ">", "T", "withReader", "(", "Reader", "reader", ",", "@", "ClosureParams", "(", "FirstParam", ".", "class", ")", "Closure", "<", "T", ">", "closure", ")", "throws", "IOException", "{", "try", "{", "T", "result", "=", "clo...
Allows this reader to be used within the closure, ensuring that it is closed before this method returns. @param reader the reader which is used and then closed @param closure the closure that the writer is passed into @return the value returned by the closure @throws IOException if an IOException occurs. @since 1.5.2
[ "Allows", "this", "reader", "to", "be", "used", "within", "the", "closure", "ensuring", "that", "it", "is", "closed", "before", "this", "method", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L1159-L1171
Wadpam/guja
guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java
GeneratedDContactDaoImpl.queryByPrimaryCustomIndex
public Iterable<DContact> queryByPrimaryCustomIndex(Object parent, java.lang.String primaryCustomIndex) { """ query-by method for field primaryCustomIndex @param primaryCustomIndex the specified attribute @return an Iterable of DContacts for the specified primaryCustomIndex """ return queryByField(parent...
java
public Iterable<DContact> queryByPrimaryCustomIndex(Object parent, java.lang.String primaryCustomIndex) { return queryByField(parent, DContactMapper.Field.PRIMARYCUSTOMINDEX.getFieldName(), primaryCustomIndex); }
[ "public", "Iterable", "<", "DContact", ">", "queryByPrimaryCustomIndex", "(", "Object", "parent", ",", "java", ".", "lang", ".", "String", "primaryCustomIndex", ")", "{", "return", "queryByField", "(", "parent", ",", "DContactMapper", ".", "Field", ".", "PRIMARY...
query-by method for field primaryCustomIndex @param primaryCustomIndex the specified attribute @return an Iterable of DContacts for the specified primaryCustomIndex
[ "query", "-", "by", "method", "for", "field", "primaryCustomIndex" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java#L250-L252
3pillarlabs/spring-data-simpledb
spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/core/domain/DomainManager.java
DomainManager.dropDomain
protected void dropDomain(final String domainName, final AmazonSimpleDB sdb) { """ Running the delete-domain command over & over again on the same domain, or if the domain does NOT exist will NOT result in a Amazon Exception @param domainName """ try { LOGGER.debug("Dropping domain: {}", domainName); ...
java
protected void dropDomain(final String domainName, final AmazonSimpleDB sdb) { try { LOGGER.debug("Dropping domain: {}", domainName); DeleteDomainRequest request = new DeleteDomainRequest(domainName); sdb.deleteDomain(request); LOGGER.debug("Dropped domain: {}", domainName); } catch(AmazonClientExceptio...
[ "protected", "void", "dropDomain", "(", "final", "String", "domainName", ",", "final", "AmazonSimpleDB", "sdb", ")", "{", "try", "{", "LOGGER", ".", "debug", "(", "\"Dropping domain: {}\"", ",", "domainName", ")", ";", "DeleteDomainRequest", "request", "=", "new...
Running the delete-domain command over & over again on the same domain, or if the domain does NOT exist will NOT result in a Amazon Exception @param domainName
[ "Running", "the", "delete", "-", "domain", "command", "over", "&", "over", "again", "on", "the", "same", "domain", "or", "if", "the", "domain", "does", "NOT", "exist", "will", "NOT", "result", "in", "a", "Amazon", "Exception" ]
train
https://github.com/3pillarlabs/spring-data-simpledb/blob/f1e0eb4e48ec4674d3966e8f5bc04c95031f93ae/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/core/domain/DomainManager.java#L62-L71
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java
ElementKindVisitor6.visitType
@Override public R visitType(TypeElement e, P p) { """ Visits a type element, dispatching to the visit method for the specific {@linkplain ElementKind kind} of type, {@code ANNOTATION_TYPE}, {@code CLASS}, {@code ENUM}, or {@code INTERFACE}. @param e {@inheritDoc} @param p {@inheritDoc} @return the re...
java
@Override public R visitType(TypeElement e, P p) { ElementKind k = e.getKind(); switch(k) { case ANNOTATION_TYPE: return visitTypeAsAnnotationType(e, p); case CLASS: return visitTypeAsClass(e, p); case ENUM: return visitTypeAsEnum(e, p); ...
[ "@", "Override", "public", "R", "visitType", "(", "TypeElement", "e", ",", "P", "p", ")", "{", "ElementKind", "k", "=", "e", ".", "getKind", "(", ")", ";", "switch", "(", "k", ")", "{", "case", "ANNOTATION_TYPE", ":", "return", "visitTypeAsAnnotationType...
Visits a type element, dispatching to the visit method for the specific {@linkplain ElementKind kind} of type, {@code ANNOTATION_TYPE}, {@code CLASS}, {@code ENUM}, or {@code INTERFACE}. @param e {@inheritDoc} @param p {@inheritDoc} @return the result of the kind-specific visit method
[ "Visits", "a", "type", "element", "dispatching", "to", "the", "visit", "method", "for", "the", "specific", "{", "@linkplain", "ElementKind", "kind", "}", "of", "type", "{", "@code", "ANNOTATION_TYPE", "}", "{", "@code", "CLASS", "}", "{", "@code", "ENUM", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java#L137-L156
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java
FacesImpl.detectWithUrlAsync
public Observable<List<DetectedFace>> detectWithUrlAsync(String url, DetectWithUrlOptionalParameter detectWithUrlOptionalParameter) { """ Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes. @param url Publicly reachable URL of an image @param detec...
java
public Observable<List<DetectedFace>> detectWithUrlAsync(String url, DetectWithUrlOptionalParameter detectWithUrlOptionalParameter) { return detectWithUrlWithServiceResponseAsync(url, detectWithUrlOptionalParameter).map(new Func1<ServiceResponse<List<DetectedFace>>, List<DetectedFace>>() { @Override...
[ "public", "Observable", "<", "List", "<", "DetectedFace", ">", ">", "detectWithUrlAsync", "(", "String", "url", ",", "DetectWithUrlOptionalParameter", "detectWithUrlOptionalParameter", ")", "{", "return", "detectWithUrlWithServiceResponseAsync", "(", "url", ",", "detectWi...
Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes. @param url Publicly reachable URL of an image @param detectWithUrlOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException throw...
[ "Detect", "human", "faces", "in", "an", "image", "and", "returns", "face", "locations", "and", "optionally", "with", "faceIds", "landmarks", "and", "attributes", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java#L682-L689
Samsung/GearVRf
GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java
CursorManager.setScene
public void setScene(GVRScene scene) { """ Use this method to set a {@link GVRScene}. This call replaces the currently set {@link GVRScene} (if one was set either using the constructor or a previous {@link CursorManager#setScene(GVRScene)} call). <br/> <br/> If the provided {@link GVRScene} matches the curr...
java
public void setScene(GVRScene scene) { if (this.scene == scene) { //do nothing return return; } //cleanup on the currently set scene if there is one if (this.scene != null) { // false to remove updateCursorsInScene(this.scene, false); ...
[ "public", "void", "setScene", "(", "GVRScene", "scene", ")", "{", "if", "(", "this", ".", "scene", "==", "scene", ")", "{", "//do nothing return", "return", ";", "}", "//cleanup on the currently set scene if there is one", "if", "(", "this", ".", "scene", "!=", ...
Use this method to set a {@link GVRScene}. This call replaces the currently set {@link GVRScene} (if one was set either using the constructor or a previous {@link CursorManager#setScene(GVRScene)} call). <br/> <br/> If the provided {@link GVRScene} matches the currently set {@link GVRScene} then this call has no effec...
[ "Use", "this", "method", "to", "set", "a", "{", "@link", "GVRScene", "}", ".", "This", "call", "replaces", "the", "currently", "set", "{", "@link", "GVRScene", "}", "(", "if", "one", "was", "set", "either", "using", "the", "constructor", "or", "a", "pr...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L336-L357
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildMapClickMessage
private String buildMapClickMessage(LatLng latLng, double zoom, BoundingBox boundingBox, double tolerance, Projection projection) { """ Perform a query based upon the map click location and build a info message @param latLng location @param zoom current zoom level @param boundingBox click bounding...
java
private String buildMapClickMessage(LatLng latLng, double zoom, BoundingBox boundingBox, double tolerance, Projection projection) { String message = null; // Verify the features are indexed and we are getting information if (isIndexed() && (maxFeaturesInfo || featuresInfo)) { if (i...
[ "private", "String", "buildMapClickMessage", "(", "LatLng", "latLng", ",", "double", "zoom", ",", "BoundingBox", "boundingBox", ",", "double", "tolerance", ",", "Projection", "projection", ")", "{", "String", "message", "=", "null", ";", "// Verify the features are ...
Perform a query based upon the map click location and build a info message @param latLng location @param zoom current zoom level @param boundingBox click bounding box @param tolerance tolerance distance @param projection desired geometry projection @return information message on what was clicked, or nul...
[ "Perform", "a", "query", "based", "upon", "the", "map", "click", "location", "and", "build", "a", "info", "message" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L417-L450
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java
LdapConnection.getAncestorDNs
public List<String> getAncestorDNs(String DN, int level) throws WIMException { """ Get a list of all ancestor distinguished names for the input distinguished name. For example; if the input distinguished name was "uid=user,o=ibm,c=us" the results would be ["o=ibm,c=us", "c=us"]. @param DN The distinguished nam...
java
public List<String> getAncestorDNs(String DN, int level) throws WIMException { if (DN == null || DN.trim().length() == 0) { return null; } try { NameParser nameParser = getNameParser(); Name name = nameParser.parse(DN); int size = name.size(); ...
[ "public", "List", "<", "String", ">", "getAncestorDNs", "(", "String", "DN", ",", "int", "level", ")", "throws", "WIMException", "{", "if", "(", "DN", "==", "null", "||", "DN", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", ...
Get a list of all ancestor distinguished names for the input distinguished name. For example; if the input distinguished name was "uid=user,o=ibm,c=us" the results would be ["o=ibm,c=us", "c=us"]. @param DN The distinguished name to get the ancestor distinguished names for. @param level the number of levels to return....
[ "Get", "a", "list", "of", "all", "ancestor", "distinguished", "names", "for", "the", "input", "distinguished", "name", ".", "For", "example", ";", "if", "the", "input", "distinguished", "name", "was", "uid", "=", "user", "o", "=", "ibm", "c", "=", "us", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java#L1932-L1955
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java
ReflectionUtils.setField
public static void setField(Class<?> type, String fieldName, Object value) { """ Sets the field with the specified name on the given class type to the given value. This method assumes the field is a static (class) member field. @param type the Class type on which the field is declared and defined. @param fiel...
java
public static void setField(Class<?> type, String fieldName, Object value) { try { setField(null, getField(type, fieldName), value); } catch (FieldNotFoundException e) { throw new IllegalArgumentException(String.format("Field with name (%1$s) does not exist on class type (%2$s)!", fieldN...
[ "public", "static", "void", "setField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ",", "Object", "value", ")", "{", "try", "{", "setField", "(", "null", ",", "getField", "(", "type", ",", "fieldName", ")", ",", "value", ")", ";...
Sets the field with the specified name on the given class type to the given value. This method assumes the field is a static (class) member field. @param type the Class type on which the field is declared and defined. @param fieldName a String indicating the name of the field on which to set the value. @param value th...
[ "Sets", "the", "field", "with", "the", "specified", "name", "on", "the", "given", "class", "type", "to", "the", "given", "value", ".", "This", "method", "assumes", "the", "field", "is", "a", "static", "(", "class", ")", "member", "field", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java#L181-L189
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java
ContinuousDistributions.studentsCdf
public static double studentsCdf(double x, int df) { """ Calculates the probability from -INF to X under Student's Distribution Ported to PHP from Javascript implementation found at http://www.math.ucla.edu/~tom/distributions/tDist.html @param x @param df @return """ if(df<=0) { throw...
java
public static double studentsCdf(double x, int df) { if(df<=0) { throw new IllegalArgumentException("The degrees of freedom need to be positive."); } double A = df/2.0; double S = A+0.5; double Z = df/(df + x*x); double BT = Math.exp(logGamma(S)-logGamma(0.5)...
[ "public", "static", "double", "studentsCdf", "(", "double", "x", ",", "int", "df", ")", "{", "if", "(", "df", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The degrees of freedom need to be positive.\"", ")", ";", "}", "double", "A",...
Calculates the probability from -INF to X under Student's Distribution Ported to PHP from Javascript implementation found at http://www.math.ucla.edu/~tom/distributions/tDist.html @param x @param df @return
[ "Calculates", "the", "probability", "from", "-", "INF", "to", "X", "under", "Student", "s", "Distribution", "Ported", "to", "PHP", "from", "Javascript", "implementation", "found", "at", "http", ":", "//", "www", ".", "math", ".", "ucla", ".", "edu", "/", ...
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java#L160-L186
apache/groovy
src/main/java/org/codehaus/groovy/ast/ClassNode.java
ClassNode.getMethod
public MethodNode getMethod(String name, Parameter[] parameters) { """ Finds a method matching the given name and parameters in this class or any parent class. @return the method matching the given name and parameters or null """ for (MethodNode method : getMethods(name)) { if (paramete...
java
public MethodNode getMethod(String name, Parameter[] parameters) { for (MethodNode method : getMethods(name)) { if (parametersEqual(method.getParameters(), parameters)) { return method; } } return null; }
[ "public", "MethodNode", "getMethod", "(", "String", "name", ",", "Parameter", "[", "]", "parameters", ")", "{", "for", "(", "MethodNode", "method", ":", "getMethods", "(", "name", ")", ")", "{", "if", "(", "parametersEqual", "(", "method", ".", "getParamet...
Finds a method matching the given name and parameters in this class or any parent class. @return the method matching the given name and parameters or null
[ "Finds", "a", "method", "matching", "the", "given", "name", "and", "parameters", "in", "this", "class", "or", "any", "parent", "class", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/ast/ClassNode.java#L944-L951
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/LiveEventsInner.java
LiveEventsInner.beginResetAsync
public Observable<Void> beginResetAsync(String resourceGroupName, String accountName, String liveEventName) { """ Reset Live Event. Resets an existing Live Event. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param ...
java
public Observable<Void> beginResetAsync(String resourceGroupName, String accountName, String liveEventName) { return beginResetWithServiceResponseAsync(resourceGroupName, accountName, liveEventName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse...
[ "public", "Observable", "<", "Void", ">", "beginResetAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "liveEventName", ")", "{", "return", "beginResetWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", ...
Reset Live Event. Resets an existing Live Event. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param liveEventName The name of the Live Event. @throws IllegalArgumentException thrown if parameters fail the validation @return ...
[ "Reset", "Live", "Event", ".", "Resets", "an", "existing", "Live", "Event", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/implementation/LiveEventsInner.java#L1763-L1770
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java
IOUtils.writeStream
public static boolean writeStream(String filePath, InputStream stream) throws IOException { """ write file @param filePath @param stream @return @see {@link #writeStream(String, InputStream, boolean)} """ return writeStream(filePath, stream, false); }
java
public static boolean writeStream(String filePath, InputStream stream) throws IOException { return writeStream(filePath, stream, false); }
[ "public", "static", "boolean", "writeStream", "(", "String", "filePath", ",", "InputStream", "stream", ")", "throws", "IOException", "{", "return", "writeStream", "(", "filePath", ",", "stream", ",", "false", ")", ";", "}" ]
write file @param filePath @param stream @return @see {@link #writeStream(String, InputStream, boolean)}
[ "write", "file" ]
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/IOUtils.java#L1186-L1188
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.getAllLifetimeStatisticsAsync
public Observable<PoolStatistics> getAllLifetimeStatisticsAsync(PoolGetAllLifetimeStatisticsOptions poolGetAllLifetimeStatisticsOptions) { """ Gets lifetime summary statistics for all of the pools in the specified account. Statistics are aggregated across all pools that have ever existed in the account, from acco...
java
public Observable<PoolStatistics> getAllLifetimeStatisticsAsync(PoolGetAllLifetimeStatisticsOptions poolGetAllLifetimeStatisticsOptions) { return getAllLifetimeStatisticsWithServiceResponseAsync(poolGetAllLifetimeStatisticsOptions).map(new Func1<ServiceResponseWithHeaders<PoolStatistics, PoolGetAllLifetimeStati...
[ "public", "Observable", "<", "PoolStatistics", ">", "getAllLifetimeStatisticsAsync", "(", "PoolGetAllLifetimeStatisticsOptions", "poolGetAllLifetimeStatisticsOptions", ")", "{", "return", "getAllLifetimeStatisticsWithServiceResponseAsync", "(", "poolGetAllLifetimeStatisticsOptions", ")...
Gets lifetime summary statistics for all of the pools in the specified account. Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics. The statistics may not be immediately available. The Batch service performs periodic roll-up ...
[ "Gets", "lifetime", "summary", "statistics", "for", "all", "of", "the", "pools", "in", "the", "specified", "account", ".", "Statistics", "are", "aggregated", "across", "all", "pools", "that", "have", "ever", "existed", "in", "the", "account", "from", "account"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L590-L597
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toNavigableMap
public <K, V> NavigableMap<K, V> toNavigableMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { """ Returns a {@link NavigableMap} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href=...
java
public <K, V> NavigableMap<K, V> toNavigableMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { NavigableMap<K, V> map = isParallel() ? new ConcurrentSkipListMap<>() : new TreeMap<>(); return toMapThrowing(keyMapper, valMapper, map); }
[ "public", "<", "K", ",", "V", ">", "NavigableMap", "<", "K", ",", "V", ">", "toNavigableMap", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keyMapper", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ...
Returns a {@link NavigableMap} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Object)}), an {@code Illega...
[ "Returns", "a", "{", "@link", "NavigableMap", "}", "whose", "keys", "and", "values", "are", "the", "result", "of", "applying", "the", "provided", "mapping", "functions", "to", "the", "input", "elements", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1218-L1222
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.readNameToken
protected LexNameToken readNameToken(String message) throws LexException, ParserException { """ Return the last token as a name, and advance by one token. This is similar to calling {@link #lastNameToken} followed by nextToken, and returning the result of the lastNameToken. @param message The message to th...
java
protected LexNameToken readNameToken(String message) throws LexException, ParserException { LexToken tok = reader.getLast(); nextToken(); if (tok instanceof LexNameToken) { LexNameToken name = (LexNameToken) tok; if (name.old) { throwMessage(2295, "Can't use old name here", tok); } ret...
[ "protected", "LexNameToken", "readNameToken", "(", "String", "message", ")", "throws", "LexException", ",", "ParserException", "{", "LexToken", "tok", "=", "reader", ".", "getLast", "(", ")", ";", "nextToken", "(", ")", ";", "if", "(", "tok", "instanceof", "...
Return the last token as a name, and advance by one token. This is similar to calling {@link #lastNameToken} followed by nextToken, and returning the result of the lastNameToken. @param message The message to throw if the last token is not a name. @return The last token as a LexNameToken. @throws LexException @throws ...
[ "Return", "the", "last", "token", "as", "a", "name", "and", "advance", "by", "one", "token", ".", "This", "is", "similar", "to", "calling", "{", "@link", "#lastNameToken", "}", "followed", "by", "nextToken", "and", "returning", "the", "result", "of", "the"...
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L290-L320
sirthias/pegdown
src/main/java/org/pegdown/PegDownProcessor.java
PegDownProcessor.markdownToHtml
public String markdownToHtml(String markdownSource, LinkRenderer linkRenderer) { """ Converts the given markdown source to HTML. If the input cannot be parsed within the configured parsing timeout the method returns null. @param markdownSource the markdown source to convert @param linkRenderer the LinkRendere...
java
public String markdownToHtml(String markdownSource, LinkRenderer linkRenderer) { return markdownToHtml(markdownSource.toCharArray(), linkRenderer); }
[ "public", "String", "markdownToHtml", "(", "String", "markdownSource", ",", "LinkRenderer", "linkRenderer", ")", "{", "return", "markdownToHtml", "(", "markdownSource", ".", "toCharArray", "(", ")", ",", "linkRenderer", ")", ";", "}" ]
Converts the given markdown source to HTML. If the input cannot be parsed within the configured parsing timeout the method returns null. @param markdownSource the markdown source to convert @param linkRenderer the LinkRenderer to use @return the HTML
[ "Converts", "the", "given", "markdown", "source", "to", "HTML", ".", "If", "the", "input", "cannot", "be", "parsed", "within", "the", "configured", "parsing", "timeout", "the", "method", "returns", "null", "." ]
train
https://github.com/sirthias/pegdown/blob/19ca3d3d2bea5df19eb885260ab24f1200a16452/src/main/java/org/pegdown/PegDownProcessor.java#L125-L127
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.renameFiles
public static void renameFiles(File[] filePath, String prefix, String suffix, int start) { """ 批量重命名文件 @param filePath 文件数组 @param prefix 文件前缀 @param suffix 文件后缀 @param start 开始位置 """ String[] fileNames = new String[filePath.length]; for (int i = 0; i < fileNames.length; i++) { ...
java
public static void renameFiles(File[] filePath, String prefix, String suffix, int start) { String[] fileNames = new String[filePath.length]; for (int i = 0; i < fileNames.length; i++) { fileNames[i] = prefix + (start++) + suffix; } renameFiles(filePath, fileNames); }
[ "public", "static", "void", "renameFiles", "(", "File", "[", "]", "filePath", ",", "String", "prefix", ",", "String", "suffix", ",", "int", "start", ")", "{", "String", "[", "]", "fileNames", "=", "new", "String", "[", "filePath", ".", "length", "]", "...
批量重命名文件 @param filePath 文件数组 @param prefix 文件前缀 @param suffix 文件后缀 @param start 开始位置
[ "批量重命名文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L619-L625
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/RemotePDPProvider.java
RemotePDPProvider.getPDPDomainNamesForPDB
@Override public SortedSet<String> getPDPDomainNamesForPDB(String pdbId) throws IOException { """ Get a list of all PDP domains for a given PDB entry @param pdbId PDB ID @return Set of domain names, e.g. "PDP:4HHBAa" @throws IOException if the server cannot be reached """ SortedSet<String> results = null...
java
@Override public SortedSet<String> getPDPDomainNamesForPDB(String pdbId) throws IOException{ SortedSet<String> results = null; try { URL u = new URL(server + "getPDPDomainNamesForPDB?pdbId="+pdbId); logger.info("Fetching {}",u); InputStream response = URLConnectionTools.getInputStream(u); String xml = ...
[ "@", "Override", "public", "SortedSet", "<", "String", ">", "getPDPDomainNamesForPDB", "(", "String", "pdbId", ")", "throws", "IOException", "{", "SortedSet", "<", "String", ">", "results", "=", "null", ";", "try", "{", "URL", "u", "=", "new", "URL", "(", ...
Get a list of all PDP domains for a given PDB entry @param pdbId PDB ID @return Set of domain names, e.g. "PDP:4HHBAa" @throws IOException if the server cannot be reached
[ "Get", "a", "list", "of", "all", "PDP", "domains", "for", "a", "given", "PDB", "entry" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/RemotePDPProvider.java#L245-L260
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generatePrivateKey
public static PrivateKey generatePrivateKey(KeyStore keyStore, String alias, char[] password) { """ 生成私钥,仅用于非对称加密 @param keyStore {@link KeyStore} @param alias 别名 @param password 密码 @return 私钥 {@link PrivateKey} """ return KeyUtil.generatePrivateKey(keyStore, alias, password); }
java
public static PrivateKey generatePrivateKey(KeyStore keyStore, String alias, char[] password) { return KeyUtil.generatePrivateKey(keyStore, alias, password); }
[ "public", "static", "PrivateKey", "generatePrivateKey", "(", "KeyStore", "keyStore", ",", "String", "alias", ",", "char", "[", "]", "password", ")", "{", "return", "KeyUtil", ".", "generatePrivateKey", "(", "keyStore", ",", "alias", ",", "password", ")", ";", ...
生成私钥,仅用于非对称加密 @param keyStore {@link KeyStore} @param alias 别名 @param password 密码 @return 私钥 {@link PrivateKey}
[ "生成私钥,仅用于非对称加密" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L166-L168
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/route/Route.java
Route.GET
public static Route GET(String uriPattern, RouteHandler routeHandler) { """ Create a {@code GET} route. @param uriPattern @param routeHandler @return """ return new Route(HttpConstants.Method.GET, uriPattern, routeHandler); }
java
public static Route GET(String uriPattern, RouteHandler routeHandler) { return new Route(HttpConstants.Method.GET, uriPattern, routeHandler); }
[ "public", "static", "Route", "GET", "(", "String", "uriPattern", ",", "RouteHandler", "routeHandler", ")", "{", "return", "new", "Route", "(", "HttpConstants", ".", "Method", ".", "GET", ",", "uriPattern", ",", "routeHandler", ")", ";", "}" ]
Create a {@code GET} route. @param uriPattern @param routeHandler @return
[ "Create", "a", "{", "@code", "GET", "}", "route", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/route/Route.java#L70-L72
google/flogger
api/src/main/java/com/google/common/flogger/LogSite.java
LogSite.injectedLogSite
@Deprecated public static LogSite injectedLogSite( String internalClassName, String methodName, int encodedLineNumber, @Nullable String sourceFileName) { """ Creates a log site injected from constants held a class' constant pool. <p> Used for compile-time log site injection, and by the ...
java
@Deprecated public static LogSite injectedLogSite( String internalClassName, String methodName, int encodedLineNumber, @Nullable String sourceFileName) { return new InjectedLogSite(internalClassName, methodName, encodedLineNumber, sourceFileName); }
[ "@", "Deprecated", "public", "static", "LogSite", "injectedLogSite", "(", "String", "internalClassName", ",", "String", "methodName", ",", "int", "encodedLineNumber", ",", "@", "Nullable", "String", "sourceFileName", ")", "{", "return", "new", "InjectedLogSite", "("...
Creates a log site injected from constants held a class' constant pool. <p> Used for compile-time log site injection, and by the agent. @param internalClassName Slash separated class name obtained from the class constant pool. @param methodName Method name obtained from the class constant pool. @param encodedLineNumbe...
[ "Creates", "a", "log", "site", "injected", "from", "constants", "held", "a", "class", "constant", "pool", ".", "<p", ">", "Used", "for", "compile", "-", "time", "log", "site", "injection", "and", "by", "the", "agent", "." ]
train
https://github.com/google/flogger/blob/a164967a93a9f4ce92f34319fc0cc7c91a57321c/api/src/main/java/com/google/common/flogger/LogSite.java#L142-L149
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/TcasesJson.java
TcasesJson.writeGenerators
public static void writeGenerators( IGeneratorSet generators, OutputStream outputStream) { """ Writes a JSON document describing the given generator definitions to the given output stream. """ try( GeneratorSetJsonWriter writer = new GeneratorSetJsonWriter( outputStream)) { writer.write( genera...
java
public static void writeGenerators( IGeneratorSet generators, OutputStream outputStream) { try( GeneratorSetJsonWriter writer = new GeneratorSetJsonWriter( outputStream)) { writer.write( generators); } catch( Exception e) { throw new RuntimeException( "Can't write generator def...
[ "public", "static", "void", "writeGenerators", "(", "IGeneratorSet", "generators", ",", "OutputStream", "outputStream", ")", "{", "try", "(", "GeneratorSetJsonWriter", "writer", "=", "new", "GeneratorSetJsonWriter", "(", "outputStream", ")", ")", "{", "writer", ".",...
Writes a JSON document describing the given generator definitions to the given output stream.
[ "Writes", "a", "JSON", "document", "describing", "the", "given", "generator", "definitions", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/TcasesJson.java#L78-L88
kazocsaba/imageviewer
src/main/java/hu/kazocsaba/imageviewer/PixelModel.java
PixelModel.set
public void set(int x, int y) { """ Changes the pixel stored in this model. If either coordinate is negative, the new value of the model will be (-1, -1). @param x the new x coordinate @param y the new y coordinate """ if (x<0 || y<0) { x=-1; y=-1; } if (this.x!=x || this.y!=y) { this.x=x; ...
java
public void set(int x, int y) { if (x<0 || y<0) { x=-1; y=-1; } if (this.x!=x || this.y!=y) { this.x=x; this.y=y; fireChange(); } }
[ "public", "void", "set", "(", "int", "x", ",", "int", "y", ")", "{", "if", "(", "x", "<", "0", "||", "y", "<", "0", ")", "{", "x", "=", "-", "1", ";", "y", "=", "-", "1", ";", "}", "if", "(", "this", ".", "x", "!=", "x", "||", "this",...
Changes the pixel stored in this model. If either coordinate is negative, the new value of the model will be (-1, -1). @param x the new x coordinate @param y the new y coordinate
[ "Changes", "the", "pixel", "stored", "in", "this", "model", ".", "If", "either", "coordinate", "is", "negative", "the", "new", "value", "of", "the", "model", "will", "be", "(", "-", "1", "-", "1", ")", "." ]
train
https://github.com/kazocsaba/imageviewer/blob/59b8834c9dbf87bd9ca0898da3458ae592e3851e/src/main/java/hu/kazocsaba/imageviewer/PixelModel.java#L52-L62
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.lucene/src/main/java/org/carewebframework/help/lucene/HelpSearchService.java
HelpSearchService.unindexHelpModule
@Override public void unindexHelpModule(HelpModule helpModule) { """ Removes the index for a help module. @param helpModule Help module whose index is to be removed. """ try { log.info("Removing index for help module " + helpModule.getLocalizedId()); Term term = new Term(...
java
@Override public void unindexHelpModule(HelpModule helpModule) { try { log.info("Removing index for help module " + helpModule.getLocalizedId()); Term term = new Term("module", helpModule.getLocalizedId()); writer.deleteDocuments(term); writer.commit(); ...
[ "@", "Override", "public", "void", "unindexHelpModule", "(", "HelpModule", "helpModule", ")", "{", "try", "{", "log", ".", "info", "(", "\"Removing index for help module \"", "+", "helpModule", ".", "getLocalizedId", "(", ")", ")", ";", "Term", "term", "=", "n...
Removes the index for a help module. @param helpModule Help module whose index is to be removed.
[ "Removes", "the", "index", "for", "a", "help", "module", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.lucene/src/main/java/org/carewebframework/help/lucene/HelpSearchService.java#L285-L296
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java
LuisRuntimeManager.authenticate
public static LuisRuntimeAPI authenticate(String baseUrl, final String luisAuthoringKey) { """ Initializes an instance of Language Understanding (LUIS) Runtime API client. @param baseUrl the base URL of the service @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.lui...
java
public static LuisRuntimeAPI authenticate(String baseUrl, final String luisAuthoringKey) { ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() { @Override public void applyCredentialsFilter(OkHttpClient.Builder builder) { builder.addNetworkI...
[ "public", "static", "LuisRuntimeAPI", "authenticate", "(", "String", "baseUrl", ",", "final", "String", "luisAuthoringKey", ")", "{", "ServiceClientCredentials", "serviceClientCredentials", "=", "new", "ServiceClientCredentials", "(", ")", "{", "@", "Override", "public"...
Initializes an instance of Language Understanding (LUIS) Runtime API client. @param baseUrl the base URL of the service @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) @return the Language Understanding (LUIS) Runtime API client
[ "Initializes", "an", "instance", "of", "Language", "Understanding", "(", "LUIS", ")", "Runtime", "API", "client", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java#L43-L71
apache/incubator-druid
sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java
Calcites.createSqlType
public static RelDataType createSqlType(final RelDataTypeFactory typeFactory, final SqlTypeName typeName) { """ Like RelDataTypeFactory.createSqlType, but creates types that align best with how Druid represents them. """ return createSqlTypeWithNullability(typeFactory, typeName, false); }
java
public static RelDataType createSqlType(final RelDataTypeFactory typeFactory, final SqlTypeName typeName) { return createSqlTypeWithNullability(typeFactory, typeName, false); }
[ "public", "static", "RelDataType", "createSqlType", "(", "final", "RelDataTypeFactory", "typeFactory", ",", "final", "SqlTypeName", "typeName", ")", "{", "return", "createSqlTypeWithNullability", "(", "typeFactory", ",", "typeName", ",", "false", ")", ";", "}" ]
Like RelDataTypeFactory.createSqlType, but creates types that align best with how Druid represents them.
[ "Like", "RelDataTypeFactory", ".", "createSqlType", "but", "creates", "types", "that", "align", "best", "with", "how", "Druid", "represents", "them", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java#L179-L182
apache/flink
flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java
JarManifestParser.findOnlyEntryClass
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { """ Returns a JAR file with its entry class as specified in the manifest. @param jarFiles JAR files to parse @throws NoSuchElementException if no JAR file contains an entry class attribute @throws IllegalArgumentEx...
java
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>(); for (File jarFile : jarFiles) { findEntryClass(jarFile) .ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr...
[ "static", "JarFileWithEntryClass", "findOnlyEntryClass", "(", "Iterable", "<", "File", ">", "jarFiles", ")", "throws", "IOException", "{", "List", "<", "JarFileWithEntryClass", ">", "jarsWithEntryClasses", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ...
Returns a JAR file with its entry class as specified in the manifest. @param jarFiles JAR files to parse @throws NoSuchElementException if no JAR file contains an entry class attribute @throws IllegalArgumentException if multiple JAR files contain an entry class manifest attribute
[ "Returns", "a", "JAR", "file", "with", "its", "entry", "class", "as", "specified", "in", "the", "manifest", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L72-L88
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java
ClassReloadingStrategy.enableBootstrapInjection
public ClassReloadingStrategy enableBootstrapInjection(File folder) { """ Enables bootstrap injection for this class reloading strategy. @param folder The folder to save jar files in that are appended to the bootstrap class path. @return A class reloading strategy with bootstrap injection enabled. """ ...
java
public ClassReloadingStrategy enableBootstrapInjection(File folder) { return new ClassReloadingStrategy(instrumentation, strategy, new BootstrapInjection.Enabled(folder), preregisteredTypes); }
[ "public", "ClassReloadingStrategy", "enableBootstrapInjection", "(", "File", "folder", ")", "{", "return", "new", "ClassReloadingStrategy", "(", "instrumentation", ",", "strategy", ",", "new", "BootstrapInjection", ".", "Enabled", "(", "folder", ")", ",", "preregister...
Enables bootstrap injection for this class reloading strategy. @param folder The folder to save jar files in that are appended to the bootstrap class path. @return A class reloading strategy with bootstrap injection enabled.
[ "Enables", "bootstrap", "injection", "for", "this", "class", "reloading", "strategy", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L279-L281
paylogic/java-fogbugz
src/main/java/org/paylogic/fogbugz/FogbugzManager.java
FogbugzManager.getCaseById
public FogbugzCase getCaseById(int id) throws InvalidResponseException, NoSuchCaseException { """ Retrieves a case using the Fogbugz API by caseId. @param id the id of the case to fetch. @return FogbugzCase if all is well, else null. """ List<FogbugzCase> caseList = this.searchForCases(Integer.toStri...
java
public FogbugzCase getCaseById(int id) throws InvalidResponseException, NoSuchCaseException { List<FogbugzCase> caseList = this.searchForCases(Integer.toString(id)); if (caseList.size() > 1) { throw new InvalidResponseException("Expected one case, found multiple, aborting."); } ...
[ "public", "FogbugzCase", "getCaseById", "(", "int", "id", ")", "throws", "InvalidResponseException", ",", "NoSuchCaseException", "{", "List", "<", "FogbugzCase", ">", "caseList", "=", "this", ".", "searchForCases", "(", "Integer", ".", "toString", "(", "id", ")"...
Retrieves a case using the Fogbugz API by caseId. @param id the id of the case to fetch. @return FogbugzCase if all is well, else null.
[ "Retrieves", "a", "case", "using", "the", "Fogbugz", "API", "by", "caseId", "." ]
train
https://github.com/paylogic/java-fogbugz/blob/75651d82b2476e9ba2a0805311e18ee36882c2df/src/main/java/org/paylogic/fogbugz/FogbugzManager.java#L121-L127
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.deletePrediction
public void deletePrediction(UUID projectId, List<String> ids) { """ Delete a set of predicted images and their associated prediction results. @param projectId The project id @param ids The prediction ids. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudEx...
java
public void deletePrediction(UUID projectId, List<String> ids) { deletePredictionWithServiceResponseAsync(projectId, ids).toBlocking().single().body(); }
[ "public", "void", "deletePrediction", "(", "UUID", "projectId", ",", "List", "<", "String", ">", "ids", ")", "{", "deletePredictionWithServiceResponseAsync", "(", "projectId", ",", "ids", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body"...
Delete a set of predicted images and their associated prediction results. @param projectId The project id @param ids The prediction ids. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException al...
[ "Delete", "a", "set", "of", "predicted", "images", "and", "their", "associated", "prediction", "results", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3086-L3088
scaleset/scaleset-geo
src/main/java/com/scaleset/geo/math/GoogleMapsTileMath.java
GoogleMapsTileMath.lngLatToMeters
public Geometry lngLatToMeters(Geometry geometry) { """ Converts geometry from lat/lon (EPSG:4326)) to Spherical Mercator (EPSG:3857) @param geometry the geometry to convert @return the geometry transformed to EPSG:3857 """ GeometryTransformer transformer = new GeometryTransformer() { ...
java
public Geometry lngLatToMeters(Geometry geometry) { GeometryTransformer transformer = new GeometryTransformer() { @Override protected CoordinateSequence transformCoordinates(CoordinateSequence coords, Geometry parent) { Coordinate[] newCoords = new Coordinate[coords.size(...
[ "public", "Geometry", "lngLatToMeters", "(", "Geometry", "geometry", ")", "{", "GeometryTransformer", "transformer", "=", "new", "GeometryTransformer", "(", ")", "{", "@", "Override", "protected", "CoordinateSequence", "transformCoordinates", "(", "CoordinateSequence", ...
Converts geometry from lat/lon (EPSG:4326)) to Spherical Mercator (EPSG:3857) @param geometry the geometry to convert @return the geometry transformed to EPSG:3857
[ "Converts", "geometry", "from", "lat", "/", "lon", "(", "EPSG", ":", "4326", "))", "to", "Spherical", "Mercator", "(", "EPSG", ":", "3857", ")" ]
train
https://github.com/scaleset/scaleset-geo/blob/5cff2349668037dc287928a6c1a1f67c76d96b02/src/main/java/com/scaleset/geo/math/GoogleMapsTileMath.java#L109-L123
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/ExtendedServerBlobAuditingPoliciesInner.java
ExtendedServerBlobAuditingPoliciesInner.getAsync
public Observable<ExtendedServerBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { """ Gets an extended server's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API o...
java
public Observable<ExtendedServerBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ExtendedServerBlobAuditingPolicyInner>, ExtendedServerBlobAuditingPolicyInner>() { @Overrid...
[ "public", "Observable", "<", "ExtendedServerBlobAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", ...
Gets an extended server's blob auditing policy. @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. @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Gets", "an", "extended", "server", "s", "blob", "auditing", "policy", "." ]
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/ExtendedServerBlobAuditingPoliciesInner.java#L106-L113
bwkimmel/java-util
src/main/java/ca/eandb/util/ByteArray.java
ByteArray.setAll
public void setAll(int index, Collection<? extends Byte> items) { """ Sets a range of elements of this array. @param index The index of the first element to set. @param items The values to set. @throws IndexOutOfBoundsException if <code>index &lt; 0 || index + items.size() &gt; size()</code>. """ ...
java
public void setAll(int index, Collection<? extends Byte> items) { rangeCheck(index, index + items.size()); for (byte e : items) { elements[index++] = e; } }
[ "public", "void", "setAll", "(", "int", "index", ",", "Collection", "<", "?", "extends", "Byte", ">", "items", ")", "{", "rangeCheck", "(", "index", ",", "index", "+", "items", ".", "size", "(", ")", ")", ";", "for", "(", "byte", "e", ":", "items",...
Sets a range of elements of this array. @param index The index of the first element to set. @param items The values to set. @throws IndexOutOfBoundsException if <code>index &lt; 0 || index + items.size() &gt; size()</code>.
[ "Sets", "a", "range", "of", "elements", "of", "this", "array", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/ByteArray.java#L291-L296
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/Languages.java
Languages.setLanguageCookie
public void setLanguageCookie(String language, RouteContext routeContext) { """ Sets the application language cookie. <p> If the language does not match a registered language or language component an exception is thrown. </p> @param language @param routeContext @throws PippoRuntimeException """ ...
java
public void setLanguageCookie(String language, RouteContext routeContext) { String lang = getLanguageOrDefault(language); if (lang.equals(language)) { Cookie cookie = generateLanguageCookie(language); routeContext.getResponse().cookie(cookie); } else { throw n...
[ "public", "void", "setLanguageCookie", "(", "String", "language", ",", "RouteContext", "routeContext", ")", "{", "String", "lang", "=", "getLanguageOrDefault", "(", "language", ")", ";", "if", "(", "lang", ".", "equals", "(", "language", ")", ")", "{", "Cook...
Sets the application language cookie. <p> If the language does not match a registered language or language component an exception is thrown. </p> @param language @param routeContext @throws PippoRuntimeException
[ "Sets", "the", "application", "language", "cookie", ".", "<p", ">", "If", "the", "language", "does", "not", "match", "a", "registered", "language", "or", "language", "component", "an", "exception", "is", "thrown", ".", "<", "/", "p", ">" ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/Languages.java#L158-L166
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
CqlConfigHelper.setInputWhereClauses
public static void setInputWhereClauses(Configuration conf, String clauses) { """ Set the CQL user defined where clauses for the input of this job. @param conf Job configuration you are about to run @param clauses """ if (clauses == null || clauses.isEmpty()) return; co...
java
public static void setInputWhereClauses(Configuration conf, String clauses) { if (clauses == null || clauses.isEmpty()) return; conf.set(INPUT_CQL_WHERE_CLAUSE_CONFIG, clauses); }
[ "public", "static", "void", "setInputWhereClauses", "(", "Configuration", "conf", ",", "String", "clauses", ")", "{", "if", "(", "clauses", "==", "null", "||", "clauses", ".", "isEmpty", "(", ")", ")", "return", ";", "conf", ".", "set", "(", "INPUT_CQL_WHE...
Set the CQL user defined where clauses for the input of this job. @param conf Job configuration you are about to run @param clauses
[ "Set", "the", "CQL", "user", "defined", "where", "clauses", "for", "the", "input", "of", "this", "job", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java#L124-L130
tdunning/t-digest
core/src/main/java/com/tdunning/math/stats/Comparison.java
Comparison.compareChi2
@SuppressWarnings("WeakerAccess") public static double compareChi2(TDigest dist1, TDigest dist2, double[] qCuts) { """ Use a log-likelihood ratio test to compare two distributions. This is done by estimating counts in quantile ranges from each distribution and then comparing those counts using a multinomial ...
java
@SuppressWarnings("WeakerAccess") public static double compareChi2(TDigest dist1, TDigest dist2, double[] qCuts) { double[][] count = new double[2][]; count[0] = new double[qCuts.length + 1]; count[1] = new double[qCuts.length + 1]; double oldQ = 0; double oldQ2 = 0; ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "static", "double", "compareChi2", "(", "TDigest", "dist1", ",", "TDigest", "dist2", ",", "double", "[", "]", "qCuts", ")", "{", "double", "[", "]", "[", "]", "count", "=", "new", "double", ...
Use a log-likelihood ratio test to compare two distributions. This is done by estimating counts in quantile ranges from each distribution and then comparing those counts using a multinomial test. The result should be asymptotically chi^2 distributed if the data comes from the same distribution, but this isn't so much u...
[ "Use", "a", "log", "-", "likelihood", "ratio", "test", "to", "compare", "two", "distributions", ".", "This", "is", "done", "by", "estimating", "counts", "in", "quantile", "ranges", "from", "each", "distribution", "and", "then", "comparing", "those", "counts", ...
train
https://github.com/tdunning/t-digest/blob/0820b016fefc1f66fe3b089cec9b4ba220da4ef1/core/src/main/java/com/tdunning/math/stats/Comparison.java#L48-L75