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
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/OJBSearchFilter.java
OJBSearchFilter.matchValue
public void matchValue(String elementName, String value, int oper) { """ Change the search filter to one that specifies an element to not match one single value. The old search filter is deleted. @param elementName is the name of the element to be matched @param value is the value to not be matched @param o...
java
public void matchValue(String elementName, String value, int oper) { // Delete the old search criteria criteria = new Criteria(); if (oper != NOT_IN) { criteria.addEqualTo(elementName, value); } else { criteria.addNotEqual...
[ "public", "void", "matchValue", "(", "String", "elementName", ",", "String", "value", ",", "int", "oper", ")", "{", "// Delete the old search criteria\r", "criteria", "=", "new", "Criteria", "(", ")", ";", "if", "(", "oper", "!=", "NOT_IN", ")", "{", "criter...
Change the search filter to one that specifies an element to not match one single value. The old search filter is deleted. @param elementName is the name of the element to be matched @param value is the value to not be matched @param oper is the IN or NOT_IN operator to indicate how to matche
[ "Change", "the", "search", "filter", "to", "one", "that", "specifies", "an", "element", "to", "not", "match", "one", "single", "value", ".", "The", "old", "search", "filter", "is", "deleted", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/OJBSearchFilter.java#L156-L170
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
@SuppressWarnings("unchecked") public static List<Boolean> getAt(boolean[] array, ObjectRange range) { """ Support the subscript operator with an ObjectRange for a byte array @param array a byte array @param range an ObjectRange indicating the indices for the items to retrieve @return list of the retrieve...
java
@SuppressWarnings("unchecked") public static List<Boolean> getAt(boolean[] array, ObjectRange range) { return primitiveArrayGet(array, range); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "Boolean", ">", "getAt", "(", "boolean", "[", "]", "array", ",", "ObjectRange", "range", ")", "{", "return", "primitiveArrayGet", "(", "array", ",", "range", ")", ";", "}"...
Support the subscript operator with an ObjectRange for a byte array @param array a byte array @param range an ObjectRange indicating the indices for the items to retrieve @return list of the retrieved bytes @since 1.0
[ "Support", "the", "subscript", "operator", "with", "an", "ObjectRange", "for", "a", "byte", "array" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L13925-L13928
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.runDML
protected VoltTable runDML(String dml, boolean transformDml) { """ Optionally, modifies queries in such a way that PostgreSQL results will match VoltDB results; and then passes the remaining work to the base class version. """ String modifiedDml = (transformDml ? transformDML(dml) : dml); pri...
java
protected VoltTable runDML(String dml, boolean transformDml) { String modifiedDml = (transformDml ? transformDML(dml) : dml); printTransformedSql(dml, modifiedDml); return super.runDML(modifiedDml); }
[ "protected", "VoltTable", "runDML", "(", "String", "dml", ",", "boolean", "transformDml", ")", "{", "String", "modifiedDml", "=", "(", "transformDml", "?", "transformDML", "(", "dml", ")", ":", "dml", ")", ";", "printTransformedSql", "(", "dml", ",", "modifi...
Optionally, modifies queries in such a way that PostgreSQL results will match VoltDB results; and then passes the remaining work to the base class version.
[ "Optionally", "modifies", "queries", "in", "such", "a", "way", "that", "PostgreSQL", "results", "will", "match", "VoltDB", "results", ";", "and", "then", "passes", "the", "remaining", "work", "to", "the", "base", "class", "version", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L1066-L1070
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/io/MatrixVectorWriter.java
MatrixVectorWriter.printPattern
public void printPattern(int[] index, int offset) { """ Prints the coordinates to the underlying stream. One index on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based. """ int size = index.length; for (int i = 0; i < size; ++i) ...
java
public void printPattern(int[] index, int offset) { int size = index.length; for (int i = 0; i < size; ++i) format(Locale.ENGLISH, "%10d%n", index[i] + offset); }
[ "public", "void", "printPattern", "(", "int", "[", "]", "index", ",", "int", "offset", ")", "{", "int", "size", "=", "index", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "++", "i", ")", "format", "(", "Loca...
Prints the coordinates to the underlying stream. One index on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.
[ "Prints", "the", "coordinates", "to", "the", "underlying", "stream", ".", "One", "index", "on", "each", "line", ".", "The", "offset", "is", "added", "to", "each", "index", "typically", "this", "can", "transform", "from", "a", "0", "-", "based", "indicing",...
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/io/MatrixVectorWriter.java#L400-L404
kuujo/vertigo
util/src/main/java/net/kuujo/vertigo/io/FileSender.java
FileSender.sendFile
public FileSender sendFile(String filePath, final Handler<AsyncResult<Void>> doneHandler) { """ Sends a file on the output port. @param filePath The path to the file to send. @param doneHandler An asynchronous handler to be called once the file has been sent. @return The file sender. """ final File fi...
java
public FileSender sendFile(String filePath, final Handler<AsyncResult<Void>> doneHandler) { final File file = new File(filePath); output.vertx().fileSystem().exists(file.getAbsolutePath(), new Handler<AsyncResult<Boolean>>() { @Override public void handle(AsyncResult<Boolean> result) { if (r...
[ "public", "FileSender", "sendFile", "(", "String", "filePath", ",", "final", "Handler", "<", "AsyncResult", "<", "Void", ">", ">", "doneHandler", ")", "{", "final", "File", "file", "=", "new", "File", "(", "filePath", ")", ";", "output", ".", "vertx", "(...
Sends a file on the output port. @param filePath The path to the file to send. @param doneHandler An asynchronous handler to be called once the file has been sent. @return The file sender.
[ "Sends", "a", "file", "on", "the", "output", "port", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/util/src/main/java/net/kuujo/vertigo/io/FileSender.java#L92-L121
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayScript
public static String getDisplayScript(String localeID, ULocale displayLocale) { """ <strong>[icu]</strong> Returns a locale's script localized for display in the provided locale. @param localeID the id of the locale whose script will be displayed. @param displayLocale the locale in which to display the name. @r...
java
public static String getDisplayScript(String localeID, ULocale displayLocale) { return getDisplayScriptInternal(new ULocale(localeID), displayLocale); }
[ "public", "static", "String", "getDisplayScript", "(", "String", "localeID", ",", "ULocale", "displayLocale", ")", "{", "return", "getDisplayScriptInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "displayLocale", ")", ";", "}" ]
<strong>[icu]</strong> Returns a locale's script localized for display in the provided locale. @param localeID the id of the locale whose script will be displayed. @param displayLocale the locale in which to display the name. @return the localized script name.
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "locale", "s", "script", "localized", "for", "display", "in", "the", "provided", "locale", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1534-L1536
google/closure-compiler
src/com/google/javascript/jscomp/FileInstrumentationData.java
FileInstrumentationData.putBranchNode
void putBranchNode(int lineNumber, int branchNumber, Node block) { """ Store a node to be instrumented later for branch coverage. @param lineNumber 1-based line number @param branchNumber 1-based branch number @param block the node of the conditional block. """ Preconditions.checkArgument( lineN...
java
void putBranchNode(int lineNumber, int branchNumber, Node block) { Preconditions.checkArgument( lineNumber > 0, "Expected non-zero positive integer as line number: %s", lineNumber); Preconditions.checkArgument( branchNumber > 0, "Expected non-zero positive integer as branch number: %s", branchNu...
[ "void", "putBranchNode", "(", "int", "lineNumber", ",", "int", "branchNumber", ",", "Node", "block", ")", "{", "Preconditions", ".", "checkArgument", "(", "lineNumber", ">", "0", ",", "\"Expected non-zero positive integer as line number: %s\"", ",", "lineNumber", ")",...
Store a node to be instrumented later for branch coverage. @param lineNumber 1-based line number @param branchNumber 1-based branch number @param block the node of the conditional block.
[ "Store", "a", "node", "to", "be", "instrumented", "later", "for", "branch", "coverage", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FileInstrumentationData.java#L124-L131
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java
ImageLoading.saveHq
public static void saveHq(Bitmap src, String fileName) throws ImageSaveException { """ Saving image in jpeg to file with better quality 90 @param src source image @param fileName destination file name @throws ImageSaveException if it is unable to save image """ saveJpeg(src, fileName, JPEG_QU...
java
public static void saveHq(Bitmap src, String fileName) throws ImageSaveException { saveJpeg(src, fileName, JPEG_QUALITY_HQ); }
[ "public", "static", "void", "saveHq", "(", "Bitmap", "src", ",", "String", "fileName", ")", "throws", "ImageSaveException", "{", "saveJpeg", "(", "src", ",", "fileName", ",", "JPEG_QUALITY_HQ", ")", ";", "}" ]
Saving image in jpeg to file with better quality 90 @param src source image @param fileName destination file name @throws ImageSaveException if it is unable to save image
[ "Saving", "image", "in", "jpeg", "to", "file", "with", "better", "quality", "90" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L310-L312
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java
MapExtensions.operator_plus
@Pure @Inline(value = "$3.union($1, $4.singletonMap($2.getKey(), $2.getValue()))", imported = { """ Add the given pair to a given map for obtaining a new map. <p> The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. </p> ...
java
@Pure @Inline(value = "$3.union($1, $4.singletonMap($2.getKey(), $2.getValue()))", imported = { MapExtensions.class, Collections.class }) public static <K, V> Map<K, V> operator_plus(Map<K, V> left, final Pair<? extends K, ? extends V> right) { return union(left, Collections.singletonMap(right.getKey(), right.ge...
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"$3.union($1, $4.singletonMap($2.getKey(), $2.getValue()))\"", ",", "imported", "=", "{", "MapExtensions", ".", "class", ",", "Collections", ".", "class", "}", ")", "public", "static", "<", "K", ",", "V", ">", "...
Add the given pair to a given map for obtaining a new map. <p> The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. </p> <p> Even if the key of the right operand exists in the left operand, the value in the right operand is preferred. <...
[ "Add", "the", "given", "pair", "to", "a", "given", "map", "for", "obtaining", "a", "new", "map", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java#L162-L167
threerings/nenya
core/src/main/java/com/threerings/miso/client/SceneBlock.java
SceneBlock.getBaseTile
public BaseTile getBaseTile (int tx, int ty) { """ Returns the base tile at the specified coordinates or null if there's no tile at said coordinates. """ BaseTile tile = _base[index(tx, ty)]; if (tile == null && _defset != null) { tile = (BaseTile)_defset.getTile( T...
java
public BaseTile getBaseTile (int tx, int ty) { BaseTile tile = _base[index(tx, ty)]; if (tile == null && _defset != null) { tile = (BaseTile)_defset.getTile( TileUtil.getTileHash(tx, ty) % _defset.getTileCount()); } return tile; }
[ "public", "BaseTile", "getBaseTile", "(", "int", "tx", ",", "int", "ty", ")", "{", "BaseTile", "tile", "=", "_base", "[", "index", "(", "tx", ",", "ty", ")", "]", ";", "if", "(", "tile", "==", "null", "&&", "_defset", "!=", "null", ")", "{", "til...
Returns the base tile at the specified coordinates or null if there's no tile at said coordinates.
[ "Returns", "the", "base", "tile", "at", "the", "specified", "coordinates", "or", "null", "if", "there", "s", "no", "tile", "at", "said", "coordinates", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L288-L296
jbossws/jbossws-spi
src/main/java/org/jboss/wsf/spi/SPIProvider.java
SPIProvider.getSPI
public <T> T getSPI(Class<T> spiType) { """ Gets the specified SPI, using the current thread context classloader @param <T> type of spi class @param spiType spi class to retrieve @return object """ return getSPI(spiType, SecurityActions.getContextClassLoader()); }
java
public <T> T getSPI(Class<T> spiType) { return getSPI(spiType, SecurityActions.getContextClassLoader()); }
[ "public", "<", "T", ">", "T", "getSPI", "(", "Class", "<", "T", ">", "spiType", ")", "{", "return", "getSPI", "(", "spiType", ",", "SecurityActions", ".", "getContextClassLoader", "(", ")", ")", ";", "}" ]
Gets the specified SPI, using the current thread context classloader @param <T> type of spi class @param spiType spi class to retrieve @return object
[ "Gets", "the", "specified", "SPI", "using", "the", "current", "thread", "context", "classloader" ]
train
https://github.com/jbossws/jbossws-spi/blob/845e66c18679ce3aaf76f849822110b4650a9d78/src/main/java/org/jboss/wsf/spi/SPIProvider.java#L59-L62
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/optheader/OptionalHeader.java
OptionalHeader.newInstance
public static OptionalHeader newInstance(byte[] headerbytes, long offset) throws IOException { """ Creates and returns a new instance of the optional header. @param headerbytes the bytes that make up the optional header @param offset the file offset to the beginning of the optional header @return instanc...
java
public static OptionalHeader newInstance(byte[] headerbytes, long offset) throws IOException { OptionalHeader header = new OptionalHeader(headerbytes, offset); header.read(); return header; }
[ "public", "static", "OptionalHeader", "newInstance", "(", "byte", "[", "]", "headerbytes", ",", "long", "offset", ")", "throws", "IOException", "{", "OptionalHeader", "header", "=", "new", "OptionalHeader", "(", "headerbytes", ",", "offset", ")", ";", "header", ...
Creates and returns a new instance of the optional header. @param headerbytes the bytes that make up the optional header @param offset the file offset to the beginning of the optional header @return instance of the optional header @throws IOException if headerbytes can not be read
[ "Creates", "and", "returns", "a", "new", "instance", "of", "the", "optional", "header", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/optheader/OptionalHeader.java#L177-L182
mbenson/uelbox
src/main/java/uelbox/IterableELResolver.java
IterableELResolver.getValue
@Override public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { """ Like {@link ListELResolver}, returns {@code null} for an illegal index. """ Iterator<?> pos; try { pos = s...
java
@Override public Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { Iterator<?> pos; try { pos = seek(context, base, property); } catch(PropertyNotFoundException e) { ...
[ "@", "Override", "public", "Object", "getValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ")", "throws", "NullPointerException", ",", "PropertyNotFoundException", ",", "ELException", "{", "Iterator", "<", "?", ">", "pos", ";...
Like {@link ListELResolver}, returns {@code null} for an illegal index.
[ "Like", "{" ]
train
https://github.com/mbenson/uelbox/blob/b0c2df2c738295bddfd3c16a916e67c9c7c512ef/src/main/java/uelbox/IterableELResolver.java#L53-L64
zandero/settings
src/main/java/com/zandero/settings/Settings.java
Settings.getInt
public int getInt(String name) { """ Get setting as integer @param name setting key @return setting value as integer @throws IllegalArgumentException is setting is not present or can not be converted to an integer """ Object value = super.get(name); if (value instanceof Integer) { return (Integ...
java
public int getInt(String name) { Object value = super.get(name); if (value instanceof Integer) { return (Integer) value; } if (value == null) { throw new IllegalArgumentException("Setting: '" + name + "', not found!"); } try { return Integer.parseInt(value.toString()); } catch (NumberFormat...
[ "public", "int", "getInt", "(", "String", "name", ")", "{", "Object", "value", "=", "super", ".", "get", "(", "name", ")", ";", "if", "(", "value", "instanceof", "Integer", ")", "{", "return", "(", "Integer", ")", "value", ";", "}", "if", "(", "val...
Get setting as integer @param name setting key @return setting value as integer @throws IllegalArgumentException is setting is not present or can not be converted to an integer
[ "Get", "setting", "as", "integer" ]
train
https://github.com/zandero/settings/blob/802b44f41bc75e7eb2761028db8c73b7e59620c7/src/main/java/com/zandero/settings/Settings.java#L68-L86
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/assistant/ContextRuleAssistant.java
ContextRuleAssistant.putSetting
public void putSetting(String name, String value) throws IllegalRuleException { """ Puts the setting value. @param name the name @param value the value @throws IllegalRuleException if an unknown setting name is found """ if (StringUtils.isEmpty(name)) { throw new IllegalRuleException("...
java
public void putSetting(String name, String value) throws IllegalRuleException { if (StringUtils.isEmpty(name)) { throw new IllegalRuleException("Default setting name can not be null"); } DefaultSettingType settingType = DefaultSettingType.resolve(name); if (settingType == nul...
[ "public", "void", "putSetting", "(", "String", "name", ",", "String", "value", ")", "throws", "IllegalRuleException", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "name", ")", ")", "{", "throw", "new", "IllegalRuleException", "(", "\"Default setting name ...
Puts the setting value. @param name the name @param value the value @throws IllegalRuleException if an unknown setting name is found
[ "Puts", "the", "setting", "value", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/assistant/ContextRuleAssistant.java#L199-L208
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.getObjectUrl
public String getObjectUrl(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { """ Gets obje...
java
public String getObjectUrl(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { Request reques...
[ "public", "String", "getObjectUrl", "(", "String", "bucketName", ",", "String", "objectName", ")", "throws", "InvalidBucketNameException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "InvalidKeyException", ",", "NoResponseExce...
Gets object's URL in given bucket. The URL is ONLY useful to retrieve the object's data if the object has public read permissions. <p><b>Example:</b> <pre>{@code String url = minioClient.getObjectUrl("my-bucketname", "my-objectname"); System.out.println(url); }</pre> @param bucketName Bucket name. @param objectName ...
[ "Gets", "object", "s", "URL", "in", "given", "bucket", ".", "The", "URL", "is", "ONLY", "useful", "to", "retrieve", "the", "object", "s", "data", "if", "the", "object", "has", "public", "read", "permissions", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L1560-L1568
jsurfer/JsonSurfer
jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java
JsonSurfer.collectOne
public Object collectOne(InputStream inputStream, String... paths) { """ Collect the first matched value and stop parsing immediately @param inputStream Json inpustream @param paths JsonPath @return Value """ return collectOne(inputStream, compile(paths)); }
java
public Object collectOne(InputStream inputStream, String... paths) { return collectOne(inputStream, compile(paths)); }
[ "public", "Object", "collectOne", "(", "InputStream", "inputStream", ",", "String", "...", "paths", ")", "{", "return", "collectOne", "(", "inputStream", ",", "compile", "(", "paths", ")", ")", ";", "}" ]
Collect the first matched value and stop parsing immediately @param inputStream Json inpustream @param paths JsonPath @return Value
[ "Collect", "the", "first", "matched", "value", "and", "stop", "parsing", "immediately" ]
train
https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L477-L479
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/PairtreeFactory.java
PairtreeFactory.getPairtree
public Pairtree getPairtree(final String aBucket, final String aAccessKey, final String aSecretKey) { """ Creates a Pairtree using the supplied bucket and AWS credentials. @param aBucket An S3 bucket @param aAccessKey An AWS access key @param aSecretKey An AWS secret key @return A Pairtree """ re...
java
public Pairtree getPairtree(final String aBucket, final String aAccessKey, final String aSecretKey) { return new S3Pairtree(myVertx, aBucket, aAccessKey, aSecretKey); }
[ "public", "Pairtree", "getPairtree", "(", "final", "String", "aBucket", ",", "final", "String", "aAccessKey", ",", "final", "String", "aSecretKey", ")", "{", "return", "new", "S3Pairtree", "(", "myVertx", ",", "aBucket", ",", "aAccessKey", ",", "aSecretKey", "...
Creates a Pairtree using the supplied bucket and AWS credentials. @param aBucket An S3 bucket @param aAccessKey An AWS access key @param aSecretKey An AWS secret key @return A Pairtree
[ "Creates", "a", "Pairtree", "using", "the", "supplied", "bucket", "and", "AWS", "credentials", "." ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/PairtreeFactory.java#L188-L190
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java
RoadNetworkConstants.setPreferredAttributeValuesForTrafficDirection
public static void setPreferredAttributeValuesForTrafficDirection(TrafficDirection direction, List<String> values) { """ Set the preferred values of traffic direction used in the attributes for the traffic direction on the roads. @param direction a direction @param values are the values for the given directio...
java
public static void setPreferredAttributeValuesForTrafficDirection(TrafficDirection direction, List<String> values) { int i = 0; for (final String value : values) { setPreferredAttributeValueForTrafficDirection(direction, i, value); ++i; } setPreferredAttributeValueForTrafficDirection(direction, i, null); ...
[ "public", "static", "void", "setPreferredAttributeValuesForTrafficDirection", "(", "TrafficDirection", "direction", ",", "List", "<", "String", ">", "values", ")", "{", "int", "i", "=", "0", ";", "for", "(", "final", "String", "value", ":", "values", ")", "{",...
Set the preferred values of traffic direction used in the attributes for the traffic direction on the roads. @param direction a direction @param values are the values for the given direction.
[ "Set", "the", "preferred", "values", "of", "traffic", "direction", "used", "in", "the", "attributes", "for", "the", "traffic", "direction", "on", "the", "roads", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L589-L596
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Drawer.setStickyFooterItemAtPosition
public void setStickyFooterItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { """ Set a footerDrawerItem at a specific position @param drawerItem @param position """ if (mDrawerBuilder.mStickyDrawerItems != null && mDrawerBuilder.mStickyDrawerItems.size() > position) { mDra...
java
public void setStickyFooterItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { if (mDrawerBuilder.mStickyDrawerItems != null && mDrawerBuilder.mStickyDrawerItems.size() > position) { mDrawerBuilder.mStickyDrawerItems.set(position, drawerItem); } DrawerUtils.rebuildSticky...
[ "public", "void", "setStickyFooterItemAtPosition", "(", "@", "NonNull", "IDrawerItem", "drawerItem", ",", "int", "position", ")", "{", "if", "(", "mDrawerBuilder", ".", "mStickyDrawerItems", "!=", "null", "&&", "mDrawerBuilder", ".", "mStickyDrawerItems", ".", "size...
Set a footerDrawerItem at a specific position @param drawerItem @param position
[ "Set", "a", "footerDrawerItem", "at", "a", "specific", "position" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L889-L895
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java
Util.getIntProperty
public static int getIntProperty(Map<String, Object> properties, String key, int defaultVal) { """ Get integer type property value from a property map. <p> If {@code properties} is null or property value is null, default value is returned @param properties map of properties @param key property name @...
java
public static int getIntProperty(Map<String, Object> properties, String key, int defaultVal) { if (properties == null) { return defaultVal; } Object propertyVal = properties.get(key); if (propertyVal == null) { return defaultVal; } if (!(proper...
[ "public", "static", "int", "getIntProperty", "(", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "key", ",", "int", "defaultVal", ")", "{", "if", "(", "properties", "==", "null", ")", "{", "return", "defaultVal", ";", "}", "Object...
Get integer type property value from a property map. <p> If {@code properties} is null or property value is null, default value is returned @param properties map of properties @param key property name @param defaultVal default value of the property @return integer value of the property,
[ "Get", "integer", "type", "property", "value", "from", "a", "property", "map", ".", "<p", ">", "If", "{", "@code", "properties", "}", "is", "null", "or", "property", "value", "is", "null", "default", "value", "is", "returned" ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java#L407-L424
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getRolesBatch
public OneLoginResponse<Role> getRolesBatch(int batchSize) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Get a batch of Roles. @param batchSize Size of the Batch @return OneLoginResponse of Role (Batch) @throws OAuthSystemException - if there is a IOException reading paramet...
java
public OneLoginResponse<Role> getRolesBatch(int batchSize) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getRolesBatch(batchSize, null); }
[ "public", "OneLoginResponse", "<", "Role", ">", "getRolesBatch", "(", "int", "batchSize", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "getRolesBatch", "(", "batchSize", ",", "null", ")", ";", "}" ]
Get a batch of Roles. @param batchSize Size of the Batch @return OneLoginResponse of Role (Batch) @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthPro...
[ "Get", "a", "batch", "of", "Roles", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L1739-L1741
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java
FastTrackUtility.getLong
public static final long getLong(byte[] data, int offset) { """ This method reads an eight byte integer from the input array. @param data the input array @param offset offset of integer data in the array @return integer value """ if (data.length != 8) { throw new UnexpectedStructureEx...
java
public static final long getLong(byte[] data, int offset) { if (data.length != 8) { throw new UnexpectedStructureException(); } long result = 0; int i = offset; for (int shiftBy = 0; shiftBy < 64; shiftBy += 8) { result |= ((long) (data[i] & 0xff)) << shif...
[ "public", "static", "final", "long", "getLong", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "if", "(", "data", ".", "length", "!=", "8", ")", "{", "throw", "new", "UnexpectedStructureException", "(", ")", ";", "}", "long", "result", ...
This method reads an eight byte integer from the input array. @param data the input array @param offset offset of integer data in the array @return integer value
[ "This", "method", "reads", "an", "eight", "byte", "integer", "from", "the", "input", "array", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L107-L122
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java
IndexElasticsearchUpdater.createIndex
public static void createIndex(RestClient client, String index, boolean force) throws Exception { """ Create a new index in Elasticsearch. Read also _settings.json if exists in default classpath dir. @param client Elasticsearch client @param index Index name @param force Remove index if exists (Warning: remove ...
java
public static void createIndex(RestClient client, String index, boolean force) throws Exception { String settings = IndexSettingsReader.readSettings(index); createIndexWithSettings(client, index, settings, force); }
[ "public", "static", "void", "createIndex", "(", "RestClient", "client", ",", "String", "index", ",", "boolean", "force", ")", "throws", "Exception", "{", "String", "settings", "=", "IndexSettingsReader", ".", "readSettings", "(", "index", ")", ";", "createIndexW...
Create a new index in Elasticsearch. Read also _settings.json if exists in default classpath dir. @param client Elasticsearch client @param index Index name @param force Remove index if exists (Warning: remove all data) @throws Exception if the elasticsearch API call is failing
[ "Create", "a", "new", "index", "in", "Elasticsearch", ".", "Read", "also", "_settings", ".", "json", "if", "exists", "in", "default", "classpath", "dir", "." ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java#L222-L225
qiniu/java-sdk
src/main/java/com/qiniu/cdn/CdnManager.java
CdnManager.refreshUrlsAndDirs
public CdnResult.RefreshResult refreshUrlsAndDirs(String[] urls, String[] dirs) throws QiniuException { """ 刷新文件外链和目录,外链每次不超过100个,目录每次不超过10个 刷新目录需要额外开通权限,可以联系七牛技术支持处理 参考文档:<a href="http://developer.qiniu.com/fusion/api/cache-refresh">缓存刷新</a> @param urls 待刷新文件外链列表 @param dirs 待刷新目录列表 @return 刷新请求的回复 """...
java
public CdnResult.RefreshResult refreshUrlsAndDirs(String[] urls, String[] dirs) throws QiniuException { //check params if (urls != null && urls.length > MAX_API_REFRESH_URL_COUNT) { throw new QiniuException(new Exception("url count exceeds the max refresh limit per request")); } ...
[ "public", "CdnResult", ".", "RefreshResult", "refreshUrlsAndDirs", "(", "String", "[", "]", "urls", ",", "String", "[", "]", "dirs", ")", "throws", "QiniuException", "{", "//check params", "if", "(", "urls", "!=", "null", "&&", "urls", ".", "length", ">", ...
刷新文件外链和目录,外链每次不超过100个,目录每次不超过10个 刷新目录需要额外开通权限,可以联系七牛技术支持处理 参考文档:<a href="http://developer.qiniu.com/fusion/api/cache-refresh">缓存刷新</a> @param urls 待刷新文件外链列表 @param dirs 待刷新目录列表 @return 刷新请求的回复
[ "刷新文件外链和目录,外链每次不超过100个,目录每次不超过10个", "刷新目录需要额外开通权限,可以联系七牛技术支持处理", "参考文档:<a", "href", "=", "http", ":", "//", "developer", ".", "qiniu", ".", "com", "/", "fusion", "/", "api", "/", "cache", "-", "refresh", ">", "缓存刷新<", "/", "a", ">" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/cdn/CdnManager.java#L94-L115
op4j/op4j-jodatime
src/main/java/org/op4j/jodatime/functions/FnJodaString.java
FnJodaString.localTimeToStr
public static final Function<LocalTime, String> localTimeToStr(final FormatType formatType, final String format) { """ <p> It converts the input {@link LocalTime} into a {@link String} by means of the given pattern or style (depending on the value of formatType parameter). </p> @param formatType the format {...
java
public static final Function<LocalTime, String> localTimeToStr(final FormatType formatType, final String format) { return new LocalTimeToStr(formatType, format); }
[ "public", "static", "final", "Function", "<", "LocalTime", ",", "String", ">", "localTimeToStr", "(", "final", "FormatType", "formatType", ",", "final", "String", "format", ")", "{", "return", "new", "LocalTimeToStr", "(", "formatType", ",", "format", ")", ";"...
<p> It converts the input {@link LocalTime} into a {@link String} by means of the given pattern or style (depending on the value of formatType parameter). </p> @param formatType the format {@link FormatType} @param format string with the format used for the output @return the {@link String} created from the input and ...
[ "<p", ">", "It", "converts", "the", "input", "{", "@link", "LocalTime", "}", "into", "a", "{", "@link", "String", "}", "by", "means", "of", "the", "given", "pattern", "or", "style", "(", "depending", "on", "the", "value", "of", "formatType", "parameter",...
train
https://github.com/op4j/op4j-jodatime/blob/26e5b8cda8553fb3b5a4a64b3109dbbf5df21194/src/main/java/org/op4j/jodatime/functions/FnJodaString.java#L157-L159
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_store/FSSpecStore.java
FSSpecStore.writeSpecToFile
protected void writeSpecToFile(Path specPath, Spec spec) throws IOException { """ * Serialize and write Spec to a file. @param specPath Spec file name. @param spec Spec object to write. @throws IOException """ byte[] serializedSpec = this.specSerDe.serialize(spec); try (FSDataOutputStream os = fs.c...
java
protected void writeSpecToFile(Path specPath, Spec spec) throws IOException { byte[] serializedSpec = this.specSerDe.serialize(spec); try (FSDataOutputStream os = fs.create(specPath, true)) { os.write(serializedSpec); } }
[ "protected", "void", "writeSpecToFile", "(", "Path", "specPath", ",", "Spec", "spec", ")", "throws", "IOException", "{", "byte", "[", "]", "serializedSpec", "=", "this", ".", "specSerDe", ".", "serialize", "(", "spec", ")", ";", "try", "(", "FSDataOutputStre...
* Serialize and write Spec to a file. @param specPath Spec file name. @param spec Spec object to write. @throws IOException
[ "*", "Serialize", "and", "write", "Spec", "to", "a", "file", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_store/FSSpecStore.java#L318-L323
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_util.java
Dcs_util.cs_sprealloc
public static boolean cs_sprealloc(Dcs A, int nzmax) { """ Change the max # of entries a sparse matrix can hold. @param A column-compressed matrix @param nzmax new maximum number of entries @return true if successful, false on error """ if (A == null) return (false); if (n...
java
public static boolean cs_sprealloc(Dcs A, int nzmax) { if (A == null) return (false); if (nzmax <= 0) nzmax = (Dcs_util.CS_CSC(A)) ? (A.p[A.n]) : A.nz; int[] Ainew = new int[nzmax]; int length = Math.min(nzmax, A.i.length); System.arraycopy(A.i, 0, ...
[ "public", "static", "boolean", "cs_sprealloc", "(", "Dcs", "A", ",", "int", "nzmax", ")", "{", "if", "(", "A", "==", "null", ")", "return", "(", "false", ")", ";", "if", "(", "nzmax", "<=", "0", ")", "nzmax", "=", "(", "Dcs_util", ".", "CS_CSC", ...
Change the max # of entries a sparse matrix can hold. @param A column-compressed matrix @param nzmax new maximum number of entries @return true if successful, false on error
[ "Change", "the", "max", "#", "of", "entries", "a", "sparse", "matrix", "can", "hold", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_util.java#L74-L97
drewnoakes/metadata-extractor
Source/com/drew/metadata/exif/GpsDirectory.java
GpsDirectory.getGeoLocation
@Nullable public GeoLocation getGeoLocation() { """ Parses various tags in an attempt to obtain a single object representing the latitude and longitude at which this image was captured. @return The geographical location of this image, if possible, otherwise null """ Rational[] latitudes = getRa...
java
@Nullable public GeoLocation getGeoLocation() { Rational[] latitudes = getRationalArray(TAG_LATITUDE); Rational[] longitudes = getRationalArray(TAG_LONGITUDE); String latitudeRef = getString(TAG_LATITUDE_REF); String longitudeRef = getString(TAG_LONGITUDE_REF); // Make s...
[ "@", "Nullable", "public", "GeoLocation", "getGeoLocation", "(", ")", "{", "Rational", "[", "]", "latitudes", "=", "getRationalArray", "(", "TAG_LATITUDE", ")", ";", "Rational", "[", "]", "longitudes", "=", "getRationalArray", "(", "TAG_LONGITUDE", ")", ";", "...
Parses various tags in an attempt to obtain a single object representing the latitude and longitude at which this image was captured. @return The geographical location of this image, if possible, otherwise null
[ "Parses", "various", "tags", "in", "an", "attempt", "to", "obtain", "a", "single", "object", "representing", "the", "latitude", "and", "longitude", "at", "which", "this", "image", "was", "captured", "." ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/GpsDirectory.java#L174-L198
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.intBinaryOperator
public static IntBinaryOperator intBinaryOperator(CheckedIntBinaryOperator operator, Consumer<Throwable> handler) { """ Wrap a {@link CheckedIntBinaryOperator} in a {@link IntBinaryOperator} with a custom handler for checked exceptions. <p> Example: <code><pre> IntStream.of(1, 2, 3).reduce(Unchecked.intBinary...
java
public static IntBinaryOperator intBinaryOperator(CheckedIntBinaryOperator operator, Consumer<Throwable> handler) { return (i1, i2) -> { try { return operator.applyAsInt(i1, i2); } catch (Throwable e) { handler.accept(e); thro...
[ "public", "static", "IntBinaryOperator", "intBinaryOperator", "(", "CheckedIntBinaryOperator", "operator", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "(", "i1", ",", "i2", ")", "->", "{", "try", "{", "return", "operator", ".", "appl...
Wrap a {@link CheckedIntBinaryOperator} in a {@link IntBinaryOperator} with a custom handler for checked exceptions. <p> Example: <code><pre> IntStream.of(1, 2, 3).reduce(Unchecked.intBinaryOperator( (i1, i2) -> { if (i2 &lt; 0) throw new Exception("Only positive numbers allowed"); return i1 + i2; }, e -> { throw new ...
[ "Wrap", "a", "{", "@link", "CheckedIntBinaryOperator", "}", "in", "a", "{", "@link", "IntBinaryOperator", "}", "with", "a", "custom", "handler", "for", "checked", "exceptions", ".", "<p", ">", "Example", ":", "<code", ">", "<pre", ">", "IntStream", ".", "o...
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L547-L558
VoltDB/voltdb
src/frontend/org/voltdb/client/VoltBulkLoader/VoltBulkLoader.java
VoltBulkLoader.setFlushInterval
public synchronized void setFlushInterval(long delay, long seconds) { """ Set periodic flush interval and initial delay in seconds. @param delay Initial delay in seconds @param seconds Interval in seconds, passing <code>seconds <= 0</code> value will cancel periodic flush """ if (m_flush != null) {...
java
public synchronized void setFlushInterval(long delay, long seconds) { if (m_flush != null) { m_flush.cancel(false); m_flush = null; } if (seconds > 0) { m_flush = m_ses.scheduleAtFixedRate(new Runnable() { @Override public void ...
[ "public", "synchronized", "void", "setFlushInterval", "(", "long", "delay", ",", "long", "seconds", ")", "{", "if", "(", "m_flush", "!=", "null", ")", "{", "m_flush", ".", "cancel", "(", "false", ")", ";", "m_flush", "=", "null", ";", "}", "if", "(", ...
Set periodic flush interval and initial delay in seconds. @param delay Initial delay in seconds @param seconds Interval in seconds, passing <code>seconds <= 0</code> value will cancel periodic flush
[ "Set", "periodic", "flush", "interval", "and", "initial", "delay", "in", "seconds", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/VoltBulkLoader/VoltBulkLoader.java#L275-L292
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/SeaGlassGraphicsUtils.java
SeaGlassGraphicsUtils.paintText
public void paintText(SynthContext ss, Graphics g, String text, int x, int y, int mnemonicIndex) { """ Paints text at the specified location. This will not attempt to render the text as html nor will it offset by the insets of the component. @param ss SynthContext @param g Graphics used to render string in....
java
public void paintText(SynthContext ss, Graphics g, String text, int x, int y, int mnemonicIndex) { if (text != null) { Graphics2D g2d = (Graphics2D) g.create(); g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); JComponent c =...
[ "public", "void", "paintText", "(", "SynthContext", "ss", ",", "Graphics", "g", ",", "String", "text", ",", "int", "x", ",", "int", "y", ",", "int", "mnemonicIndex", ")", "{", "if", "(", "text", "!=", "null", ")", "{", "Graphics2D", "g2d", "=", "(", ...
Paints text at the specified location. This will not attempt to render the text as html nor will it offset by the insets of the component. @param ss SynthContext @param g Graphics used to render string in. @param text Text to render @param x X location to draw text at. @param y Upper left corner to draw text at. @para...
[ "Paints", "text", "at", "the", "specified", "location", ".", "This", "will", "not", "attempt", "to", "render", "the", "text", "as", "html", "nor", "will", "it", "offset", "by", "the", "insets", "of", "the", "component", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/SeaGlassGraphicsUtils.java#L211-L233
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/types/Parser.java
Parser.peekExpect
public void peekExpect(final char expectedChar) throws ParseException { """ Get the next character, throwing a {@link ParseException} if the next character is not the expected character. @param expectedChar The expected next character. @throws ParseException If the next character is not the expected next ch...
java
public void peekExpect(final char expectedChar) throws ParseException { if (position == string.length()) { throw new ParseException(this, "Expected '" + expectedChar + "'; reached end of string"); } final char next = string.charAt(position); if (next != expectedChar) { ...
[ "public", "void", "peekExpect", "(", "final", "char", "expectedChar", ")", "throws", "ParseException", "{", "if", "(", "position", "==", "string", ".", "length", "(", ")", ")", "{", "throw", "new", "ParseException", "(", "this", ",", "\"Expected '\"", "+", ...
Get the next character, throwing a {@link ParseException} if the next character is not the expected character. @param expectedChar The expected next character. @throws ParseException If the next character is not the expected next character.
[ "Get", "the", "next", "character", "throwing", "a", "{", "@link", "ParseException", "}", "if", "the", "next", "character", "is", "not", "the", "expected", "character", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/types/Parser.java#L152-L160
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addIn
public void addIn(String attribute, Collection values) { """ Adds IN criteria, customer_id in(1,10,33,44) large values are split into multiple InCriteria IN (1,10) OR IN(33, 44) @param attribute The field name to be used @param values The value Collection """ List list = splitInCriteria(a...
java
public void addIn(String attribute, Collection values) { List list = splitInCriteria(attribute, values, false, IN_LIMIT); int index = 0; InCriteria inCrit; Criteria allInCritaria; inCrit = (InCriteria) list.get(index); allInCritaria = new Criteria(inCrit); ...
[ "public", "void", "addIn", "(", "String", "attribute", ",", "Collection", "values", ")", "{", "List", "list", "=", "splitInCriteria", "(", "attribute", ",", "values", ",", "false", ",", "IN_LIMIT", ")", ";", "int", "index", "=", "0", ";", "InCriteria", "...
Adds IN criteria, customer_id in(1,10,33,44) large values are split into multiple InCriteria IN (1,10) OR IN(33, 44) @param attribute The field name to be used @param values The value Collection
[ "Adds", "IN", "criteria", "customer_id", "in", "(", "1", "10", "33", "44", ")", "large", "values", "are", "split", "into", "multiple", "InCriteria", "IN", "(", "1", "10", ")", "OR", "IN", "(", "33", "44", ")" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L766-L783
twitter/scalding
scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java
ScroogeReadSupport.prepareForRead
@Override public RecordMaterializer<T> prepareForRead(Configuration configuration, Map<String, String> keyValueMetaData, MessageType fileSchema, ReadSupport.ReadContext readContext) { """ Overriding to fall back to get de...
java
@Override public RecordMaterializer<T> prepareForRead(Configuration configuration, Map<String, String> keyValueMetaData, MessageType fileSchema, ReadSupport.ReadContext readContext) { ThriftMetaData thriftMetaData = Thrift...
[ "@", "Override", "public", "RecordMaterializer", "<", "T", ">", "prepareForRead", "(", "Configuration", "configuration", ",", "Map", "<", "String", ",", "String", ">", "keyValueMetaData", ",", "MessageType", "fileSchema", ",", "ReadSupport", ".", "ReadContext", "r...
Overriding to fall back to get descriptor from the {@link #thriftClass} if thrift metadata is not present @return
[ "Overriding", "to", "fall", "back", "to", "get", "descriptor", "from", "the", "{", "@link", "#thriftClass", "}", "if", "thrift", "metadata", "is", "not", "present" ]
train
https://github.com/twitter/scalding/blob/428b5507279655676e507d52c669c3cbc7812dc0/scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java#L196-L222
messagebird/java-rest-api
api/src/main/java/com/messagebird/objects/Message.java
Message.createBinarySMS
static public Message createBinarySMS(String originator, String header, String body, List<BigInteger> recipients) { """ Factory to create Binary SMS message @param originator @param header @param body @param recipients @return """ return Message.createBinarySMS(originator, header, body, receipie...
java
static public Message createBinarySMS(String originator, String header, String body, List<BigInteger> recipients) { return Message.createBinarySMS(originator, header, body, receipientsAsCommaSeperated(recipients)); }
[ "static", "public", "Message", "createBinarySMS", "(", "String", "originator", ",", "String", "header", ",", "String", "body", ",", "List", "<", "BigInteger", ">", "recipients", ")", "{", "return", "Message", ".", "createBinarySMS", "(", "originator", ",", "he...
Factory to create Binary SMS message @param originator @param header @param body @param recipients @return
[ "Factory", "to", "create", "Binary", "SMS", "message" ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/objects/Message.java#L88-L90
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/CopySource.java
CopySource.serializeCopyEntity
public static void serializeCopyEntity(State state, CopyEntity copyEntity) { """ Serialize a {@link List} of {@link CopyEntity}s into a {@link State} at {@link #SERIALIZED_COPYABLE_FILE} """ state.setProp(SERIALIZED_COPYABLE_FILE, CopyEntity.serialize(copyEntity)); state.setProp(COPY_ENTITY_CLASS, copy...
java
public static void serializeCopyEntity(State state, CopyEntity copyEntity) { state.setProp(SERIALIZED_COPYABLE_FILE, CopyEntity.serialize(copyEntity)); state.setProp(COPY_ENTITY_CLASS, copyEntity.getClass().getName()); }
[ "public", "static", "void", "serializeCopyEntity", "(", "State", "state", ",", "CopyEntity", "copyEntity", ")", "{", "state", ".", "setProp", "(", "SERIALIZED_COPYABLE_FILE", ",", "CopyEntity", ".", "serialize", "(", "copyEntity", ")", ")", ";", "state", ".", ...
Serialize a {@link List} of {@link CopyEntity}s into a {@link State} at {@link #SERIALIZED_COPYABLE_FILE}
[ "Serialize", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/CopySource.java#L511-L514
samskivert/samskivert
src/main/java/com/samskivert/servlet/user/UserManager.java
UserManager.effectLogin
public void effectLogin ( User user, int expires, HttpServletRequest req, HttpServletResponse rsp) throws PersistenceException { """ If a user is already known to be authenticated for one reason or other, this method can be used to give them the appropriate authentication cookies to effect their l...
java
public void effectLogin ( User user, int expires, HttpServletRequest req, HttpServletResponse rsp) throws PersistenceException { String authcode = _repository.registerSession(user, Math.max(expires, 1)); Cookie acookie = new Cookie(_userAuthCookie, authcode); // strip the hos...
[ "public", "void", "effectLogin", "(", "User", "user", ",", "int", "expires", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "rsp", ")", "throws", "PersistenceException", "{", "String", "authcode", "=", "_repository", ".", "registerSession", "(", "us...
If a user is already known to be authenticated for one reason or other, this method can be used to give them the appropriate authentication cookies to effect their login. @param expires the number of days in which to expire the session cookie, 0 means expire at the end of the browser session.
[ "If", "a", "user", "is", "already", "known", "to", "be", "authenticated", "for", "one", "reason", "or", "other", "this", "method", "can", "be", "used", "to", "give", "them", "the", "appropriate", "authentication", "cookies", "to", "effect", "their", "login",...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/user/UserManager.java#L290-L306
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java
ExamplesImpl.deleteAsync
public Observable<OperationStatus> deleteAsync(UUID appId, String versionId, int exampleId) { """ Deletes the labeled example with the specified ID. @param appId The application ID. @param versionId The version ID. @param exampleId The example ID. @throws IllegalArgumentException thrown if parameters fail th...
java
public Observable<OperationStatus> deleteAsync(UUID appId, String versionId, int exampleId) { return deleteWithServiceResponseAsync(appId, versionId, exampleId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationStatus call(ServiceResponse<Oper...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "int", "exampleId", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "exampleId", ")", ".", "map"...
Deletes the labeled example with the specified ID. @param appId The application ID. @param versionId The version ID. @param exampleId The example ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationStatus object
[ "Deletes", "the", "labeled", "example", "with", "the", "specified", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java#L487-L494
blinkfox/zealot
src/main/java/com/blinkfox/zealot/config/ZealotConfigManager.java
ZealotConfigManager.initLoad
public void initLoad(AbstractZealotConfig zealotConfig, String xmlLocations, String handlerLocations) { """ 初始化加载Zealot的配置信息到缓存中. @param zealotConfig 配置类实例 @param xmlLocations zealot的XML文件所在的位置,多个用逗号隔开 @param handlerLocations zealot的自定义handler处理器所在的位置,多个用逗号隔开 """ this.xmlLocations = xmlLocations; ...
java
public void initLoad(AbstractZealotConfig zealotConfig, String xmlLocations, String handlerLocations) { this.xmlLocations = xmlLocations; this.handlerLocations = handlerLocations; this.initLoad(zealotConfig); }
[ "public", "void", "initLoad", "(", "AbstractZealotConfig", "zealotConfig", ",", "String", "xmlLocations", ",", "String", "handlerLocations", ")", "{", "this", ".", "xmlLocations", "=", "xmlLocations", ";", "this", ".", "handlerLocations", "=", "handlerLocations", ";...
初始化加载Zealot的配置信息到缓存中. @param zealotConfig 配置类实例 @param xmlLocations zealot的XML文件所在的位置,多个用逗号隔开 @param handlerLocations zealot的自定义handler处理器所在的位置,多个用逗号隔开
[ "初始化加载Zealot的配置信息到缓存中", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/config/ZealotConfigManager.java#L103-L107
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/Application.java
Application.registerTemplateEngine
public void registerTemplateEngine(Class<? extends TemplateEngine> engineClass) { """ Registers a template engine if no other engine has been registered. @param engineClass """ if (templateEngine != null) { log.debug("Template engine already registered, ignoring '{}'", engineClass.getNam...
java
public void registerTemplateEngine(Class<? extends TemplateEngine> engineClass) { if (templateEngine != null) { log.debug("Template engine already registered, ignoring '{}'", engineClass.getName()); return; } try { TemplateEngine engine = engineClass.newInsta...
[ "public", "void", "registerTemplateEngine", "(", "Class", "<", "?", "extends", "TemplateEngine", ">", "engineClass", ")", "{", "if", "(", "templateEngine", "!=", "null", ")", "{", "log", ".", "debug", "(", "\"Template engine already registered, ignoring '{}'\"", ","...
Registers a template engine if no other engine has been registered. @param engineClass
[ "Registers", "a", "template", "engine", "if", "no", "other", "engine", "has", "been", "registered", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/Application.java#L181-L193
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java
AbstractAggregatorImpl.exceptionResponse
protected void exceptionResponse(HttpServletRequest req, HttpServletResponse resp, Throwable t, int status) { """ Sets response status and headers for an error response based on the information in the specified exception. If development mode is enabled, then returns a 200 status with a console.error() message sp...
java
protected void exceptionResponse(HttpServletRequest req, HttpServletResponse resp, Throwable t, int status) { final String sourceMethod = "exceptionResponse"; //$NON-NLS-1$ resp.addHeader("Cache-control", "no-store"); //$NON-NLS-1$ //$NON-NLS-2$ Level logLevel = (t instanceof BadRequestException || t instanceo...
[ "protected", "void", "exceptionResponse", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ",", "Throwable", "t", ",", "int", "status", ")", "{", "final", "String", "sourceMethod", "=", "\"exceptionResponse\"", ";", "//$NON-NLS-1$\r", "resp", "....
Sets response status and headers for an error response based on the information in the specified exception. If development mode is enabled, then returns a 200 status with a console.error() message specifying the exception message @param req the request object @param resp The response object @param t The exception obje...
[ "Sets", "response", "status", "and", "headers", "for", "an", "error", "response", "based", "on", "the", "information", "in", "the", "specified", "exception", ".", "If", "development", "mode", "is", "enabled", "then", "returns", "a", "200", "status", "with", ...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L997-L1026
dita-ot/dita-ot
src/main/java/org/dita/dost/util/FilterUtils.java
FilterUtils.getLabelValue
private String getLabelValue(final QName propName, final String attrPropsValue) { """ Get labelled props value. @param propName attribute name @param attrPropsValue attribute value @return props value, {@code null} if not available """ if (attrPropsValue != null) { int propStart = -1; ...
java
private String getLabelValue(final QName propName, final String attrPropsValue) { if (attrPropsValue != null) { int propStart = -1; if (attrPropsValue.startsWith(propName + "(") || attrPropsValue.contains(" " + propName + "(")) { propStart = attrPropsValue.indexOf(propNam...
[ "private", "String", "getLabelValue", "(", "final", "QName", "propName", ",", "final", "String", "attrPropsValue", ")", "{", "if", "(", "attrPropsValue", "!=", "null", ")", "{", "int", "propStart", "=", "-", "1", ";", "if", "(", "attrPropsValue", ".", "sta...
Get labelled props value. @param propName attribute name @param attrPropsValue attribute value @return props value, {@code null} if not available
[ "Get", "labelled", "props", "value", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FilterUtils.java#L373-L388
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java
PdfContext.fillEllipse
public void fillEllipse(Rectangle rect, Color color) { """ Draw an elliptical interior with this color. @param rect rectangle in which ellipse should fit @param color colour to use for filling """ template.saveState(); setFill(color); template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(),...
java
public void fillEllipse(Rectangle rect, Color color) { template.saveState(); setFill(color); template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(), origX + rect.getRight(), origY + rect.getTop()); template.fill(); template.restoreState(); }
[ "public", "void", "fillEllipse", "(", "Rectangle", "rect", ",", "Color", "color", ")", "{", "template", ".", "saveState", "(", ")", ";", "setFill", "(", "color", ")", ";", "template", ".", "ellipse", "(", "origX", "+", "rect", ".", "getLeft", "(", ")",...
Draw an elliptical interior with this color. @param rect rectangle in which ellipse should fit @param color colour to use for filling
[ "Draw", "an", "elliptical", "interior", "with", "this", "color", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L286-L293
apereo/cas
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/BaseTicketCatalogConfigurer.java
BaseTicketCatalogConfigurer.buildTicketDefinition
protected TicketDefinition buildTicketDefinition(final TicketCatalog plan, final String prefix, final Class impl) { """ Build ticket definition ticket. @param plan the plan @param prefix the prefix @param impl the @return the ticket definition """ if (plan.contains(prefix)) { retu...
java
protected TicketDefinition buildTicketDefinition(final TicketCatalog plan, final String prefix, final Class impl) { if (plan.contains(prefix)) { return plan.find(prefix); } return new DefaultTicketDefinition(impl, prefix, Ordered.LOWEST_PRECEDENCE); }
[ "protected", "TicketDefinition", "buildTicketDefinition", "(", "final", "TicketCatalog", "plan", ",", "final", "String", "prefix", ",", "final", "Class", "impl", ")", "{", "if", "(", "plan", ".", "contains", "(", "prefix", ")", ")", "{", "return", "plan", "....
Build ticket definition ticket. @param plan the plan @param prefix the prefix @param impl the @return the ticket definition
[ "Build", "ticket", "definition", "ticket", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/BaseTicketCatalogConfigurer.java#L36-L41
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/watermarker/PartitionLevelWatermarker.java
PartitionLevelWatermarker.onGetWorkunitsEnd
@Override public void onGetWorkunitsEnd(List<WorkUnit> workunits) { """ Adds watermark workunits to <code>workunits</code>. A watermark workunit is a dummy workunit that is skipped by extractor/converter/writer. It stores a map of watermarks. The map has one entry per partition with partition watermark as value...
java
@Override public void onGetWorkunitsEnd(List<WorkUnit> workunits) { try (AutoReturnableObject<IMetaStoreClient> client = this.pool.getClient()) { for (Map.Entry<String, Map<String, Long>> tableWatermark : this.expectedHighWatermarks.entrySet()) { String tableKey = tableWatermark.getKey(); M...
[ "@", "Override", "public", "void", "onGetWorkunitsEnd", "(", "List", "<", "WorkUnit", ">", "workunits", ")", "{", "try", "(", "AutoReturnableObject", "<", "IMetaStoreClient", ">", "client", "=", "this", ".", "pool", ".", "getClient", "(", ")", ")", "{", "f...
Adds watermark workunits to <code>workunits</code>. A watermark workunit is a dummy workunit that is skipped by extractor/converter/writer. It stores a map of watermarks. The map has one entry per partition with partition watermark as value. <ul> <li>Add one NoOp watermark workunit for each {@link Table} <li>The workun...
[ "Adds", "watermark", "workunits", "to", "<code", ">", "workunits<", "/", "code", ">", ".", "A", "watermark", "workunit", "is", "a", "dummy", "workunit", "that", "is", "skipped", "by", "extractor", "/", "converter", "/", "writer", ".", "It", "stores", "a", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/watermarker/PartitionLevelWatermarker.java#L299-L336
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java
WSubordinateControlRenderer.paintRule
private void paintRule(final Rule rule, final XmlStringBuilder xml) { """ Paints a single rule. @param rule the rule to paint. @param xml the writer to send the output to """ if (rule.getCondition() == null) { throw new SystemException("Rule cannot be painted as it has no condition"); } paintCond...
java
private void paintRule(final Rule rule, final XmlStringBuilder xml) { if (rule.getCondition() == null) { throw new SystemException("Rule cannot be painted as it has no condition"); } paintCondition(rule.getCondition(), xml); for (Action action : rule.getOnTrue()) { paintAction(action, "ui:onTrue", xml);...
[ "private", "void", "paintRule", "(", "final", "Rule", "rule", ",", "final", "XmlStringBuilder", "xml", ")", "{", "if", "(", "rule", ".", "getCondition", "(", ")", "==", "null", ")", "{", "throw", "new", "SystemException", "(", "\"Rule cannot be painted as it h...
Paints a single rule. @param rule the rule to paint. @param xml the writer to send the output to
[ "Paints", "a", "single", "rule", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSubordinateControlRenderer.java#L59-L73
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getOperand
public ValueType getOperand(StackConsumer ins, ConstantPoolGen cpg, int i) throws DataflowAnalysisException { """ Get the <i>i</i>th operand used by given instruction. @param ins the instruction, which must be a StackConsumer @param cpg the ConstantPoolGen @param i index of operand to get: 0 for the first ...
java
public ValueType getOperand(StackConsumer ins, ConstantPoolGen cpg, int i) throws DataflowAnalysisException { int numOperands = ins.consumeStack(cpg); if (numOperands == Const.UNPREDICTABLE) { throw new DataflowAnalysisException("Unpredictable stack consumption in " + ins); } ...
[ "public", "ValueType", "getOperand", "(", "StackConsumer", "ins", ",", "ConstantPoolGen", "cpg", ",", "int", "i", ")", "throws", "DataflowAnalysisException", "{", "int", "numOperands", "=", "ins", ".", "consumeStack", "(", "cpg", ")", ";", "if", "(", "numOpera...
Get the <i>i</i>th operand used by given instruction. @param ins the instruction, which must be a StackConsumer @param cpg the ConstantPoolGen @param i index of operand to get: 0 for the first operand, etc. @return the <i>i</i>th operand used by the given instruction @throws DataflowAnalysisException
[ "Get", "the", "<i", ">", "i<", "/", "i", ">", "th", "operand", "used", "by", "given", "instruction", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L445-L451
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createRegexEntityModelAsync
public Observable<UUID> createRegexEntityModelAsync(UUID appId, String versionId, RegexModelCreateObject regexEntityExtractorCreateObj) { """ Adds a regex entity model to the application version. @param appId The application ID. @param versionId The version ID. @param regexEntityExtractorCreateObj A model obj...
java
public Observable<UUID> createRegexEntityModelAsync(UUID appId, String versionId, RegexModelCreateObject regexEntityExtractorCreateObj) { return createRegexEntityModelWithServiceResponseAsync(appId, versionId, regexEntityExtractorCreateObj).map(new Func1<ServiceResponse<UUID>, UUID>() { @Override ...
[ "public", "Observable", "<", "UUID", ">", "createRegexEntityModelAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "RegexModelCreateObject", "regexEntityExtractorCreateObj", ")", "{", "return", "createRegexEntityModelWithServiceResponseAsync", "(", "appId", ","...
Adds a regex entity model to the application version. @param appId The application ID. @param versionId The version ID. @param regexEntityExtractorCreateObj A model object containing the name and regex pattern for the new regex entity extractor. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Adds", "a", "regex", "entity", "model", "to", "the", "application", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L7324-L7331
grpc/grpc-java
api/src/main/java/io/grpc/Status.java
Status.withDescription
public Status withDescription(String description) { """ Create a derived instance of {@link Status} with the given description. Leading and trailing whitespace may be removed; this may change in the future. """ if (Objects.equal(this.description, description)) { return this; } return new St...
java
public Status withDescription(String description) { if (Objects.equal(this.description, description)) { return this; } return new Status(this.code, description, this.cause); }
[ "public", "Status", "withDescription", "(", "String", "description", ")", "{", "if", "(", "Objects", ".", "equal", "(", "this", ".", "description", ",", "description", ")", ")", "{", "return", "this", ";", "}", "return", "new", "Status", "(", "this", "."...
Create a derived instance of {@link Status} with the given description. Leading and trailing whitespace may be removed; this may change in the future.
[ "Create", "a", "derived", "instance", "of", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/Status.java#L466-L471
Netflix/spectator
spectator-ext-ipc/src/main/java/com/netflix/spectator/ipc/IpcLogEntry.java
IpcLogEntry.addRequestHeader
public IpcLogEntry addRequestHeader(String name, String value) { """ Add a request header value. For special headers in {@link NetflixHeader} it will automatically fill in the more specific fields based on the header values. """ if (clientAsg == null && name.equalsIgnoreCase(NetflixHeader.ASG.headerName()...
java
public IpcLogEntry addRequestHeader(String name, String value) { if (clientAsg == null && name.equalsIgnoreCase(NetflixHeader.ASG.headerName())) { withClientAsg(value); } else if (clientZone == null && name.equalsIgnoreCase(NetflixHeader.Zone.headerName())) { withClientZone(value); } else if (...
[ "public", "IpcLogEntry", "addRequestHeader", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "clientAsg", "==", "null", "&&", "name", ".", "equalsIgnoreCase", "(", "NetflixHeader", ".", "ASG", ".", "headerName", "(", ")", ")", ")", "{",...
Add a request header value. For special headers in {@link NetflixHeader} it will automatically fill in the more specific fields based on the header values.
[ "Add", "a", "request", "header", "value", ".", "For", "special", "headers", "in", "{" ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-ext-ipc/src/main/java/com/netflix/spectator/ipc/IpcLogEntry.java#L503-L516
tvesalainen/util
rpm/src/main/java/org/vesalainen/pm/rpm/RPMBuilder.java
RPMBuilder.addFile
@Override public FileBuilder addFile(ByteBuffer content, Path target) throws IOException { """ Add file to package from content @param content @param target Target path like /opt/application/bin/foo @return @throws IOException """ checkTarget(target); FileBuilder fb = new FileBuilder();...
java
@Override public FileBuilder addFile(ByteBuffer content, Path target) throws IOException { checkTarget(target); FileBuilder fb = new FileBuilder(); fb.content = content; fb.target = target; fb.size = content.limit(); fb.compressFilename(); fileBuilders.add...
[ "@", "Override", "public", "FileBuilder", "addFile", "(", "ByteBuffer", "content", ",", "Path", "target", ")", "throws", "IOException", "{", "checkTarget", "(", "target", ")", ";", "FileBuilder", "fb", "=", "new", "FileBuilder", "(", ")", ";", "fb", ".", "...
Add file to package from content @param content @param target Target path like /opt/application/bin/foo @return @throws IOException
[ "Add", "file", "to", "package", "from", "content" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/rpm/src/main/java/org/vesalainen/pm/rpm/RPMBuilder.java#L364-L375
voldemort/voldemort
src/java/voldemort/utils/ByteUtils.java
ByteUtils.writeShort
public static void writeShort(byte[] bytes, short value, int offset) { """ Write a short to the byte array starting at the given offset @param bytes The byte array @param value The short to write @param offset The offset to begin writing at """ bytes[offset] = (byte) (0xFF & (value >> 8)); ...
java
public static void writeShort(byte[] bytes, short value, int offset) { bytes[offset] = (byte) (0xFF & (value >> 8)); bytes[offset + 1] = (byte) (0xFF & value); }
[ "public", "static", "void", "writeShort", "(", "byte", "[", "]", "bytes", ",", "short", "value", ",", "int", "offset", ")", "{", "bytes", "[", "offset", "]", "=", "(", "byte", ")", "(", "0xFF", "&", "(", "value", ">>", "8", ")", ")", ";", "bytes"...
Write a short to the byte array starting at the given offset @param bytes The byte array @param value The short to write @param offset The offset to begin writing at
[ "Write", "a", "short", "to", "the", "byte", "array", "starting", "at", "the", "given", "offset" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/ByteUtils.java#L238-L241
mapsforge/mapsforge
mapsforge-samples-android/src/main/java/org/mapsforge/samples/android/cluster/Cluster.java
Cluster.addItem
public synchronized void addItem(T item) { """ add item to cluster object @param item GeoItem object to be added. """ synchronized (items) { items.add(item); } // clusterMarker.setMarkerBitmap(); if (center == null) { center = item.getLatLong(); ...
java
public synchronized void addItem(T item) { synchronized (items) { items.add(item); } // clusterMarker.setMarkerBitmap(); if (center == null) { center = item.getLatLong(); } else { // computing the centroid double lat = 0, lon = 0; ...
[ "public", "synchronized", "void", "addItem", "(", "T", "item", ")", "{", "synchronized", "(", "items", ")", "{", "items", ".", "add", "(", "item", ")", ";", "}", "// clusterMarker.setMarkerBitmap();", "if", "(", "center", "==", "null", ")", "{", "ce...
add item to cluster object @param item GeoItem object to be added.
[ "add", "item", "to", "cluster", "object" ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-samples-android/src/main/java/org/mapsforge/samples/android/cluster/Cluster.java#L73-L99
Jasig/uPortal
uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java
PagsService.getPagsDefinitionByName
public IPersonAttributesGroupDefinition getPagsDefinitionByName(IPerson person, String name) { """ Returns the specified definitions, provided (1) it exists and (2) the user may view it. @param person @return """ IPersonAttributesGroupDefinition rslt = getPagsGroupDefByName(name); if (rslt ...
java
public IPersonAttributesGroupDefinition getPagsDefinitionByName(IPerson person, String name) { IPersonAttributesGroupDefinition rslt = getPagsGroupDefByName(name); if (rslt == null) { // Better to produce exception? I'm thinking not, but open-minded. return null; } ...
[ "public", "IPersonAttributesGroupDefinition", "getPagsDefinitionByName", "(", "IPerson", "person", ",", "String", "name", ")", "{", "IPersonAttributesGroupDefinition", "rslt", "=", "getPagsGroupDefByName", "(", "name", ")", ";", "if", "(", "rslt", "==", "null", ")", ...
Returns the specified definitions, provided (1) it exists and (2) the user may view it. @param person @return
[ "Returns", "the", "specified", "definitions", "provided", "(", "1", ")", "it", "exists", "and", "(", "2", ")", "the", "user", "may", "view", "it", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-pags/src/main/java/org/apereo/portal/groups/pags/dao/PagsService.java#L88-L102
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java
TupleCombiner.getTuples
public Collection<Tuple> getTuples( FunctionInputDef inputDef) { """ Returns all valid N-tuples of values for the included input variables. """ List<VarDef> combinedVars = getCombinedVars( inputDef); return getCombinedTuples( combinedVars, getTuples( combinedVars, getTupleSize())); }
java
public Collection<Tuple> getTuples( FunctionInputDef inputDef) { List<VarDef> combinedVars = getCombinedVars( inputDef); return getCombinedTuples( combinedVars, getTuples( combinedVars, getTupleSize())); }
[ "public", "Collection", "<", "Tuple", ">", "getTuples", "(", "FunctionInputDef", "inputDef", ")", "{", "List", "<", "VarDef", ">", "combinedVars", "=", "getCombinedVars", "(", "inputDef", ")", ";", "return", "getCombinedTuples", "(", "combinedVars", ",", "getTup...
Returns all valid N-tuples of values for the included input variables.
[ "Returns", "all", "valid", "N", "-", "tuples", "of", "values", "for", "the", "included", "input", "variables", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java#L241-L245
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java
ModelSerializer.restoreMultiLayerNetwork
public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull InputStream is, boolean loadUpdater) throws IOException { """ Load a MultiLayerNetwork from InputStream from an input stream<br> Note: the input stream is read fully and closed by this method. Consequently, the input stream cannot be re...
java
public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull InputStream is, boolean loadUpdater) throws IOException { checkInputStream(is); File tmpFile = null; try{ tmpFile = tempFileFromStream(is); return restoreMultiLayerNetwork(tmpFile, loadUpdater)...
[ "public", "static", "MultiLayerNetwork", "restoreMultiLayerNetwork", "(", "@", "NonNull", "InputStream", "is", ",", "boolean", "loadUpdater", ")", "throws", "IOException", "{", "checkInputStream", "(", "is", ")", ";", "File", "tmpFile", "=", "null", ";", "try", ...
Load a MultiLayerNetwork from InputStream from an input stream<br> Note: the input stream is read fully and closed by this method. Consequently, the input stream cannot be re-used. @param is the inputstream to load from @return the loaded multi layer network @throws IOException @see #restoreMultiLayerNetworkAndNormali...
[ "Load", "a", "MultiLayerNetwork", "from", "InputStream", "from", "an", "input", "stream<br", ">", "Note", ":", "the", "input", "stream", "is", "read", "fully", "and", "closed", "by", "this", "method", ".", "Consequently", "the", "input", "stream", "cannot", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ModelSerializer.java#L341-L354
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.updateRule
public RuleDescription updateRule(String topicName, String subscriptionName, RuleDescription ruleDescription) throws ServiceBusException, InterruptedException { """ Updates an existing rule. @param topicName - Name of the topic. @param subscriptionName - Name of the subscription. @param ruleDescription - A {@li...
java
public RuleDescription updateRule(String topicName, String subscriptionName, RuleDescription ruleDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateRuleAsync(topicName, subscriptionName, ruleDescription)); }
[ "public", "RuleDescription", "updateRule", "(", "String", "topicName", ",", "String", "subscriptionName", ",", "RuleDescription", "ruleDescription", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "t...
Updates an existing rule. @param topicName - Name of the topic. @param subscriptionName - Name of the subscription. @param ruleDescription - A {@link RuleDescription} object describing the attributes with which the rule will be updated. @return {@link RuleDescription} of the updated rule. @throws MessagingEntityNotFoun...
[ "Updates", "an", "existing", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L489-L491
seam/faces
impl/src/main/java/org/jboss/seam/faces/view/SeamViewDeclarationLanguage.java
SeamViewDeclarationLanguage.getViewMetadata
@Override public ViewMetadata getViewMetadata(FacesContext context, String viewId) { """ If non-null, wrap the {@link ViewMetadata} returned by the delegate in a new instance of {@link SeamViewMetadata}. """ ViewMetadata metadata = delegate.getViewMetadata(context, viewId); if (metadata != ...
java
@Override public ViewMetadata getViewMetadata(FacesContext context, String viewId) { ViewMetadata metadata = delegate.getViewMetadata(context, viewId); if (metadata != null) { return new SeamViewMetadata(metadata); } else { return null; } }
[ "@", "Override", "public", "ViewMetadata", "getViewMetadata", "(", "FacesContext", "context", ",", "String", "viewId", ")", "{", "ViewMetadata", "metadata", "=", "delegate", ".", "getViewMetadata", "(", "context", ",", "viewId", ")", ";", "if", "(", "metadata", ...
If non-null, wrap the {@link ViewMetadata} returned by the delegate in a new instance of {@link SeamViewMetadata}.
[ "If", "non", "-", "null", "wrap", "the", "{" ]
train
https://github.com/seam/faces/blob/2fdedbc7070318c2c58bfffb8a26f1ea1d0ee1e3/impl/src/main/java/org/jboss/seam/faces/view/SeamViewDeclarationLanguage.java#L54-L62
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java
SyncAgentsInner.listByServerAsync
public Observable<Page<SyncAgentInner>> listByServerAsync(final String resourceGroupName, final String serverName) { """ Lists sync agents in a server. @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....
java
public Observable<Page<SyncAgentInner>> listByServerAsync(final String resourceGroupName, final String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName) .map(new Func1<ServiceResponse<Page<SyncAgentInner>>, Page<SyncAgentInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "SyncAgentInner", ">", ">", "listByServerAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "se...
Lists sync agents in a server. @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 on which the sync agent is hosted. @throws IllegalArgumentException thrown if paramete...
[ "Lists", "sync", "agents", "in", "a", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java#L767-L775
CodeNarc/CodeNarc
src/main/java/org/codenarc/util/AstUtil.java
AstUtil.isMethodCall
public static boolean isMethodCall(Expression expression, String methodObject, String methodName, int numArguments) { """ Return true only if the expression is a MethodCallExpression representing a method call for the specified method object (receiver), method name, and with the specified number of arguments. @p...
java
public static boolean isMethodCall(Expression expression, String methodObject, String methodName, int numArguments) { return expression instanceof MethodCallExpression && isMethodCall((MethodCallExpression) expression, methodObject, methodName, numArguments); }
[ "public", "static", "boolean", "isMethodCall", "(", "Expression", "expression", ",", "String", "methodObject", ",", "String", "methodName", ",", "int", "numArguments", ")", "{", "return", "expression", "instanceof", "MethodCallExpression", "&&", "isMethodCall", "(", ...
Return true only if the expression is a MethodCallExpression representing a method call for the specified method object (receiver), method name, and with the specified number of arguments. @param expression - the AST expression @param methodObject - the name of the method object (receiver) @param methodName - the name ...
[ "Return", "true", "only", "if", "the", "expression", "is", "a", "MethodCallExpression", "representing", "a", "method", "call", "for", "the", "specified", "method", "object", "(", "receiver", ")", "method", "name", "and", "with", "the", "specified", "number", "...
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/util/AstUtil.java#L324-L326
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/util/TypeUtil.java
TypeUtil.isTypeOrSubTypeOf
public static boolean isTypeOrSubTypeOf(Type subType, Type superType) { """ Determines if a type is the same or a subtype for another type. @param subType the supposed sub type @param superType the supposed super type @return true if the first type is the same or a subtype for the second type """ ...
java
public static boolean isTypeOrSubTypeOf(Type subType, Type superType) { Class<?> sub = getRawClass(subType); Class<?> sup = getRawClass(superType); return sup.isAssignableFrom(sub); }
[ "public", "static", "boolean", "isTypeOrSubTypeOf", "(", "Type", "subType", ",", "Type", "superType", ")", "{", "Class", "<", "?", ">", "sub", "=", "getRawClass", "(", "subType", ")", ";", "Class", "<", "?", ">", "sup", "=", "getRawClass", "(", "superTyp...
Determines if a type is the same or a subtype for another type. @param subType the supposed sub type @param superType the supposed super type @return true if the first type is the same or a subtype for the second type
[ "Determines", "if", "a", "type", "is", "the", "same", "or", "a", "subtype", "for", "another", "type", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/util/TypeUtil.java#L140-L145
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.reboot
public void reboot(String poolId, String nodeId) { """ Restarts the specified compute node. You can restart a node only if it is in an idle or running state. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node that you want to restart. @throws IllegalArgu...
java
public void reboot(String poolId, String nodeId) { rebootWithServiceResponseAsync(poolId, nodeId).toBlocking().single().body(); }
[ "public", "void", "reboot", "(", "String", "poolId", ",", "String", "nodeId", ")", "{", "rebootWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ")", ";", "}" ]
Restarts the specified compute node. You can restart a node only if it is in an idle or running state. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node that you want to restart. @throws IllegalArgumentException thrown if parameters fail the validation @throws Ba...
[ "Restarts", "the", "specified", "compute", "node", ".", "You", "can", "restart", "a", "node", "only", "if", "it", "is", "in", "an", "idle", "or", "running", "state", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L1064-L1066
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201902/creativeservice/GetImageCreatives.java
GetImageCreatives.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { CreativeServiceInterface creativeService = adManagerServices.get(session, CreativeServiceInterface.class); // Create a statement to select creatives. StatementBuilder statemen...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "CreativeServiceInterface", "creativeService", "=", "adManagerServices", ".", "get", "(", "session", ",", ...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/creativeservice/GetImageCreatives.java#L51-L85
a-schild/jave2
jave-core/src/main/java/ws/schild/jave/ScreenExtractor.java
ScreenExtractor.render
public void render(MultimediaObject multimediaObject, int width, int height, int seconds, File target, int quality) throws EncoderException { """ Generate a single screenshot from source video. @param multimediaObject Source MultimediaObject @see MultimediaObject @param width Output width @param h...
java
public void render(MultimediaObject multimediaObject, int width, int height, int seconds, File target, int quality) throws EncoderException { File inputFile = multimediaObject.getFile(); target = target.getAbsoluteFile(); target.getParentFile().mkdirs(); try { ...
[ "public", "void", "render", "(", "MultimediaObject", "multimediaObject", ",", "int", "width", ",", "int", "height", ",", "int", "seconds", ",", "File", "target", ",", "int", "quality", ")", "throws", "EncoderException", "{", "File", "inputFile", "=", "multimed...
Generate a single screenshot from source video. @param multimediaObject Source MultimediaObject @see MultimediaObject @param width Output width @param height Output height @param seconds Interval in seconds between screens @param target Destination of output image @param quality The range is between 1-31 with 31 being...
[ "Generate", "a", "single", "screenshot", "from", "source", "video", "." ]
train
https://github.com/a-schild/jave2/blob/1e7d6a1ca7c27cc63570f1aabb5c84ee124f3e26/jave-core/src/main/java/ws/schild/jave/ScreenExtractor.java#L147-L211
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegister.java
HiveRegister.addOrAlterPartition
public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException { """ Add a partition to a table if not exists, or alter a partition if exists. @param table the {@link HiveTable} to which the partition belongs. @param partition a {@link HivePartition} to which the existing partitio...
java
public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException { if (!addPartitionIfNotExists(table, partition)) { alterPartition(table, partition); } }
[ "public", "void", "addOrAlterPartition", "(", "HiveTable", "table", ",", "HivePartition", "partition", ")", "throws", "IOException", "{", "if", "(", "!", "addPartitionIfNotExists", "(", "table", ",", "partition", ")", ")", "{", "alterPartition", "(", "table", ",...
Add a partition to a table if not exists, or alter a partition if exists. @param table the {@link HiveTable} to which the partition belongs. @param partition a {@link HivePartition} to which the existing partition should be updated. @throws IOException
[ "Add", "a", "partition", "to", "a", "table", "if", "not", "exists", "or", "alter", "a", "partition", "if", "exists", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegister.java#L285-L289
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/Timecode.java
Timecode.getInstance
public static final Timecode getInstance(final String smpte, final Timebase timebase) { """ Part a Timecode encoded in the SMPTE style (<code>[dd:]hh:mm:ss:ff</code> - or <code>[dd:]hh:mm:ss;ff</code> for drop-frame timecode) alongside a timebase. @param smpte the SMPTE-encoded timecode @param timebase the...
java
public static final Timecode getInstance(final String smpte, final Timebase timebase) { return TimecodeBuilder.fromSMPTE(smpte).withRate(timebase).build(); }
[ "public", "static", "final", "Timecode", "getInstance", "(", "final", "String", "smpte", ",", "final", "Timebase", "timebase", ")", "{", "return", "TimecodeBuilder", ".", "fromSMPTE", "(", "smpte", ")", ".", "withRate", "(", "timebase", ")", ".", "build", "(...
Part a Timecode encoded in the SMPTE style (<code>[dd:]hh:mm:ss:ff</code> - or <code>[dd:]hh:mm:ss;ff</code> for drop-frame timecode) alongside a timebase. @param smpte the SMPTE-encoded timecode @param timebase the timebase to interpret the SMPTE timecode in @return a parsed timecode object @throws RuntimeException...
[ "Part", "a", "Timecode", "encoded", "in", "the", "SMPTE", "style", "(", "<code", ">", "[", "dd", ":", "]", "hh", ":", "mm", ":", "ss", ":", "ff<", "/", "code", ">", "-", "or", "<code", ">", "[", "dd", ":", "]", "hh", ":", "mm", ":", "ss", "...
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/Timecode.java#L859-L862
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.squaredNorm
public SDVariable squaredNorm(SDVariable x, int... dimensions) { """ Squared L2 norm: see {@link #norm2(String, SDVariable, int...)} """ return squaredNorm(null, x, false, dimensions); }
java
public SDVariable squaredNorm(SDVariable x, int... dimensions) { return squaredNorm(null, x, false, dimensions); }
[ "public", "SDVariable", "squaredNorm", "(", "SDVariable", "x", ",", "int", "...", "dimensions", ")", "{", "return", "squaredNorm", "(", "null", ",", "x", ",", "false", ",", "dimensions", ")", ";", "}" ]
Squared L2 norm: see {@link #norm2(String, SDVariable, int...)}
[ "Squared", "L2", "norm", ":", "see", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L2490-L2492
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getMailCarrierInfo
public void getMailCarrierInfo(int[] ids, Callback<List<MailCarrier>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on mail carriers API go <a href="https://wiki.guildwars2.com/wiki/API:2/mailcarriers">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response...
java
public void getMailCarrierInfo(int[] ids, Callback<List<MailCarrier>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getMailCarrierInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getMailCarrierInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "MailCarrier", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", ...
For more info on mail carriers API go <a href="https://wiki.guildwars2.com/wiki/API:2/mailcarriers">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of mail carrier id @param callback c...
[ "For", "more", "info", "on", "mail", "carriers", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "mailcarriers", ">", "here<", "/", "a", ">", "<br", "/", ">", "Giv...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1776-L1779
taimos/dvalin
interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/MessageCryptoUtil.java
MessageCryptoUtil.main
@SuppressWarnings("resource") public static void main(String[] args) { """ start this to generate an AES key or (de/en)crypt data @param args the CLI arguments """ try { System.out.println("Select (k=generate key; c=crypt; d=decrypt):"); System.out.println(); Scanner scan = new Scanner(System.in...
java
@SuppressWarnings("resource") public static void main(String[] args) { try { System.out.println("Select (k=generate key; c=crypt; d=decrypt):"); System.out.println(); Scanner scan = new Scanner(System.in, "UTF-8"); if (!scan.hasNextLine()) { return; } switch (scan.nextLine()) { case "k": ...
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "try", "{", "System", ".", "out", ".", "println", "(", "\"Select (k=generate key; c=crypt; d=decrypt):\"", ")", ";", "System", "."...
start this to generate an AES key or (de/en)crypt data @param args the CLI arguments
[ "start", "this", "to", "generate", "an", "AES", "key", "or", "(", "de", "/", "en", ")", "crypt", "data" ]
train
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/MessageCryptoUtil.java#L141-L170
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.subColumnNameAsBytes
private ByteBuffer subColumnNameAsBytes(String superColumn, String columnFamily) { """ Converts sub-column name into ByteBuffer according to comparator type @param superColumn - sub-column name from parser @param columnFamily - column family name from parser @return ByteBuffer bytes - into which column name was...
java
private ByteBuffer subColumnNameAsBytes(String superColumn, String columnFamily) { CfDef columnFamilyDef = getCfDef(columnFamily); return subColumnNameAsBytes(superColumn, columnFamilyDef); }
[ "private", "ByteBuffer", "subColumnNameAsBytes", "(", "String", "superColumn", ",", "String", "columnFamily", ")", "{", "CfDef", "columnFamilyDef", "=", "getCfDef", "(", "columnFamily", ")", ";", "return", "subColumnNameAsBytes", "(", "superColumn", ",", "columnFamily...
Converts sub-column name into ByteBuffer according to comparator type @param superColumn - sub-column name from parser @param columnFamily - column family name from parser @return ByteBuffer bytes - into which column name was converted according to comparator type
[ "Converts", "sub", "-", "column", "name", "into", "ByteBuffer", "according", "to", "comparator", "type" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2617-L2621
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationcertpolicy_binding.java
authenticationcertpolicy_binding.get
public static authenticationcertpolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch authenticationcertpolicy_binding resource of given name . """ authenticationcertpolicy_binding obj = new authenticationcertpolicy_binding(); obj.set_name(name); authenticati...
java
public static authenticationcertpolicy_binding get(nitro_service service, String name) throws Exception{ authenticationcertpolicy_binding obj = new authenticationcertpolicy_binding(); obj.set_name(name); authenticationcertpolicy_binding response = (authenticationcertpolicy_binding) obj.get_resource(service); re...
[ "public", "static", "authenticationcertpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationcertpolicy_binding", "obj", "=", "new", "authenticationcertpolicy_binding", "(", ")", ";", "obj", ".", ...
Use this API to fetch authenticationcertpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "authenticationcertpolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationcertpolicy_binding.java#L136-L141
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsFormatterConfiguration.java
CmsFormatterConfiguration.getDefaultFormatter
public I_CmsFormatterBean getDefaultFormatter(final String containerTypes, final int containerWidth) { """ Selects the best matching formatter for the provided type and width from this configuration.<p> This method first tries to find the formatter for the provided container type. If this fails, it returns the...
java
public I_CmsFormatterBean getDefaultFormatter(final String containerTypes, final int containerWidth) { Optional<I_CmsFormatterBean> result = Iterables.tryFind( m_allFormatters, new MatchesTypeOrWidth(containerTypes, containerWidth)); return result.orNull(); }
[ "public", "I_CmsFormatterBean", "getDefaultFormatter", "(", "final", "String", "containerTypes", ",", "final", "int", "containerWidth", ")", "{", "Optional", "<", "I_CmsFormatterBean", ">", "result", "=", "Iterables", ".", "tryFind", "(", "m_allFormatters", ",", "ne...
Selects the best matching formatter for the provided type and width from this configuration.<p> This method first tries to find the formatter for the provided container type. If this fails, it returns the width based formatter that matched the container width.<p> @param containerTypes the container types (comma separ...
[ "Selects", "the", "best", "matching", "formatter", "for", "the", "provided", "type", "and", "width", "from", "this", "configuration", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsFormatterConfiguration.java#L298-L304
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getSubscriptionUsages
public Usages getSubscriptionUsages(final String subscriptionCode, final String addOnCode, final QueryParams params) { """ Get Subscription Addon Usages <p> @param subscriptionCode The recurly id of the {@link Subscription } @param addOnCode recurly id of {@link AddOn} @return {@link Usages} for the specifie...
java
public Usages getSubscriptionUsages(final String subscriptionCode, final String addOnCode, final QueryParams params) { return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionCode + AddOn.ADDONS_RESOURCE + ...
[ "public", "Usages", "getSubscriptionUsages", "(", "final", "String", "subscriptionCode", ",", "final", "String", "addOnCode", ",", "final", "QueryParams", "params", ")", "{", "return", "doGET", "(", "Subscription", ".", "SUBSCRIPTION_RESOURCE", "+", "\"/\"", "+", ...
Get Subscription Addon Usages <p> @param subscriptionCode The recurly id of the {@link Subscription } @param addOnCode recurly id of {@link AddOn} @return {@link Usages} for the specified subscription and addOn
[ "Get", "Subscription", "Addon", "Usages", "<p", ">" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L728-L736
ralscha/extclassgenerator
src/main/java/ch/rasc/extclassgenerator/ModelGenerator.java
ModelGenerator.generateJavascript
public static String generateJavascript(ModelBean model, OutputFormat format, boolean debug) { """ Creates JS code based on the provided {@link ModelBean} in the specified {@link OutputFormat}. Code can be generated in pretty or compressed format. The generated code is cached unless debug is true. A second ca...
java
public static String generateJavascript(ModelBean model, OutputFormat format, boolean debug) { OutputConfig outputConfig = new OutputConfig(); outputConfig.setOutputFormat(format); outputConfig.setDebug(debug); return generateJavascript(model, outputConfig); }
[ "public", "static", "String", "generateJavascript", "(", "ModelBean", "model", ",", "OutputFormat", "format", ",", "boolean", "debug", ")", "{", "OutputConfig", "outputConfig", "=", "new", "OutputConfig", "(", ")", ";", "outputConfig", ".", "setOutputFormat", "(",...
Creates JS code based on the provided {@link ModelBean} in the specified {@link OutputFormat}. Code can be generated in pretty or compressed format. The generated code is cached unless debug is true. A second call to this method with the same model name and format will return the code from the cache. @param model gene...
[ "Creates", "JS", "code", "based", "on", "the", "provided", "{", "@link", "ModelBean", "}", "in", "the", "specified", "{", "@link", "OutputFormat", "}", ".", "Code", "can", "be", "generated", "in", "pretty", "or", "compressed", "format", ".", "The", "genera...
train
https://github.com/ralscha/extclassgenerator/blob/6f106cf5ca83ef004225a3512e2291dfd028cf07/src/main/java/ch/rasc/extclassgenerator/ModelGenerator.java#L279-L285
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformPreview.java
WaveformPreview.segmentColor
@SuppressWarnings("WeakerAccess") public Color segmentColor(final int segment, final boolean front) { """ Determine the color of the waveform given an index into it. @param segment the index of the first waveform byte to examine @param front if {@code true} the front (brighter) segment of a color waveform ...
java
@SuppressWarnings("WeakerAccess") public Color segmentColor(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int backHeight = segmentHeight(segment, false); if (backHeight == 0) { ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "Color", "segmentColor", "(", "final", "int", "segment", ",", "final", "boolean", "front", ")", "{", "final", "ByteBuffer", "bytes", "=", "getData", "(", ")", ";", "if", "(", "isColor", ")", ...
Determine the color of the waveform given an index into it. @param segment the index of the first waveform byte to examine @param front if {@code true} the front (brighter) segment of a color waveform preview is returned, otherwise the back (dimmer) segment is returned. Has no effect for blue previews. @return the co...
[ "Determine", "the", "color", "of", "the", "waveform", "given", "an", "index", "into", "it", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformPreview.java#L244-L262
coursera/courier
idea-plugin/src/org/coursera/courier/CourierBraceMatcher.java
CourierBraceMatcher.getPairs
@Override public BracePair[] getPairs() { """ Returns the array of definitions for brace pairs that need to be matched when editing code in the language. @return the array of brace pair definitions. """ return new BracePair[] { new BracePair(CourierTypes.OPEN_BRACE, CourierTypes.CLOSE_BRACE, tr...
java
@Override public BracePair[] getPairs() { return new BracePair[] { new BracePair(CourierTypes.OPEN_BRACE, CourierTypes.CLOSE_BRACE, true), new BracePair(CourierTypes.OPEN_BRACKET, CourierTypes.CLOSE_BRACKET, false), new BracePair(CourierTypes.OPEN_PAREN, CourierTypes.CLOSE_PAREN, false) //...
[ "@", "Override", "public", "BracePair", "[", "]", "getPairs", "(", ")", "{", "return", "new", "BracePair", "[", "]", "{", "new", "BracePair", "(", "CourierTypes", ".", "OPEN_BRACE", ",", "CourierTypes", ".", "CLOSE_BRACE", ",", "true", ")", ",", "new", "...
Returns the array of definitions for brace pairs that need to be matched when editing code in the language. @return the array of brace pair definitions.
[ "Returns", "the", "array", "of", "definitions", "for", "brace", "pairs", "that", "need", "to", "be", "matched", "when", "editing", "code", "in", "the", "language", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/idea-plugin/src/org/coursera/courier/CourierBraceMatcher.java#L20-L28
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/local/LocalExtensionStorage.java
LocalExtensionStorage.loadDescriptor
private DefaultLocalExtension loadDescriptor(File descriptor) throws InvalidExtensionException { """ Local extension descriptor from a file. @param descriptor the descriptor file @return the extension descriptor @throws InvalidExtensionException error when trying to load extension descriptor """ F...
java
private DefaultLocalExtension loadDescriptor(File descriptor) throws InvalidExtensionException { FileInputStream fis; try { fis = new FileInputStream(descriptor); } catch (FileNotFoundException e) { throw new InvalidExtensionException("Failed to open descriptor for re...
[ "private", "DefaultLocalExtension", "loadDescriptor", "(", "File", "descriptor", ")", "throws", "InvalidExtensionException", "{", "FileInputStream", "fis", ";", "try", "{", "fis", "=", "new", "FileInputStream", "(", "descriptor", ")", ";", "}", "catch", "(", "File...
Local extension descriptor from a file. @param descriptor the descriptor file @return the extension descriptor @throws InvalidExtensionException error when trying to load extension descriptor
[ "Local", "extension", "descriptor", "from", "a", "file", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/repository/internal/local/LocalExtensionStorage.java#L159-L188
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java
ConsumerUtil.validateIssuer
boolean validateIssuer(String consumerConfigId, String issuers, String tokenIssuer) throws InvalidClaimException { """ Verifies that tokenIssuer is one of the values specified in the comma-separated issuers string. """ boolean isIssuer = false; if (issuers == null || issuers.isEmpty()) { String msg = T...
java
boolean validateIssuer(String consumerConfigId, String issuers, String tokenIssuer) throws InvalidClaimException { boolean isIssuer = false; if (issuers == null || issuers.isEmpty()) { String msg = Tr.formatMessage(tc, "JWT_TRUSTED_ISSUERS_NULL", new Object[] { tokenIssuer, consumerConfigId }); throw new...
[ "boolean", "validateIssuer", "(", "String", "consumerConfigId", ",", "String", "issuers", ",", "String", "tokenIssuer", ")", "throws", "InvalidClaimException", "{", "boolean", "isIssuer", "=", "false", ";", "if", "(", "issuers", "==", "null", "||", "issuers", "....
Verifies that tokenIssuer is one of the values specified in the comma-separated issuers string.
[ "Verifies", "that", "tokenIssuer", "is", "one", "of", "the", "values", "specified", "in", "the", "comma", "-", "separated", "issuers", "string", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java#L406-L432
OpenLiberty/open-liberty
dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java
AbstractMBeanIntrospector.formatPrimitiveArrayString
String formatPrimitiveArrayString(String string, String indent) { """ Reformat the string produced by {@link Arrays.toString} to put each element of the array on its own line with its index in front. @param string the output of {@code Arrays.toString} @param the current indent level of the formatted report ...
java
String formatPrimitiveArrayString(String string, String indent) { StringBuilder sb = new StringBuilder(); indent += INDENT; // Split the data based on the command white space String[] data = string.substring(1, string.length() - 2).split(", "); for (int i = 0; i < data.length; i...
[ "String", "formatPrimitiveArrayString", "(", "String", "string", ",", "String", "indent", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "indent", "+=", "INDENT", ";", "// Split the data based on the command white space", "String", "[", ...
Reformat the string produced by {@link Arrays.toString} to put each element of the array on its own line with its index in front. @param string the output of {@code Arrays.toString} @param the current indent level of the formatted report @return the formatted array
[ "Reformat", "the", "string", "produced", "by", "{", "@link", "Arrays", ".", "toString", "}", "to", "put", "each", "element", "of", "the", "array", "on", "its", "own", "line", "with", "its", "index", "in", "front", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java#L221-L232
codegist/crest
core/src/main/java/org/codegist/crest/util/Pairs.java
Pairs.toPair
public static EncodedPair toPair(String name, String value, Charset charset, boolean encoded) throws UnsupportedEncodingException { """ <p>Returns a EncodedPair with the given name/value.</p> <p>The encoded flag indicates if name/value need to be encoded with the given charset.</p> @param name name to encode if ...
java
public static EncodedPair toPair(String name, String value, Charset charset, boolean encoded) throws UnsupportedEncodingException { String nameEncoded; String valueEncoded; if(encoded){ nameEncoded = name; valueEncoded = value; }else{ nameEncoded = enc...
[ "public", "static", "EncodedPair", "toPair", "(", "String", "name", ",", "String", "value", ",", "Charset", "charset", ",", "boolean", "encoded", ")", "throws", "UnsupportedEncodingException", "{", "String", "nameEncoded", ";", "String", "valueEncoded", ";", "if",...
<p>Returns a EncodedPair with the given name/value.</p> <p>The encoded flag indicates if name/value need to be encoded with the given charset.</p> @param name name to encode if encoded is set to true @param value value to encode if encoded is set to true @param charset charset to use while encoding the name/value if en...
[ "<p", ">", "Returns", "a", "EncodedPair", "with", "the", "given", "name", "/", "value", ".", "<", "/", "p", ">", "<p", ">", "The", "encoded", "flag", "indicates", "if", "name", "/", "value", "need", "to", "be", "encoded", "with", "the", "given", "cha...
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/util/Pairs.java#L81-L92
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java
AbstractDateFunction.getDateValueOffset
protected int getDateValueOffset(String offsetString, char c) { """ Parse offset string and add or subtract date offset value. @param offsetString @param c @return """ ArrayList<Character> charList = new ArrayList<Character>(); int index = offsetString.indexOf(c); if (index != -1)...
java
protected int getDateValueOffset(String offsetString, char c) { ArrayList<Character> charList = new ArrayList<Character>(); int index = offsetString.indexOf(c); if (index != -1) { for (int i = index-1; i >= 0; i--) { if (Character.isDigit(offsetString.charAt(i))) { ...
[ "protected", "int", "getDateValueOffset", "(", "String", "offsetString", ",", "char", "c", ")", "{", "ArrayList", "<", "Character", ">", "charList", "=", "new", "ArrayList", "<", "Character", ">", "(", ")", ";", "int", "index", "=", "offsetString", ".", "i...
Parse offset string and add or subtract date offset value. @param offsetString @param c @return
[ "Parse", "offset", "string", "and", "add", "or", "subtract", "date", "offset", "value", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/core/AbstractDateFunction.java#L56-L82
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10Attribute
public static String escapeXml10Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { """ <p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value. </p> <p> This method will perform an escape operation a...
java
public static String escapeXml10Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { return escapeXml(text, XmlEscapeSymbols.XML10_ATTRIBUTE_SYMBOLS, type, level); }
[ "public", "static", "String", "escapeXml10Attribute", "(", "final", "String", "text", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "{", "return", "escapeXml", "(", "text", ",", "XmlEscapeSymbols", ".", "XML10_ATTRIBUTE_SYMBOLS...
<p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values. </p...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "0", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "meant", "to", "be", "an", "XML", "attribute", "value", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L598-L600
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.getUserInfo
public UserInfo getUserInfo(String username) throws Exception { """ Get the UserInfo for a specified username @param username username @return the UserInfo @throws Exception """ DirContext dir = context(); ArrayList roleList = new ArrayList(getUserRoles(username)); String credentials...
java
public UserInfo getUserInfo(String username) throws Exception { DirContext dir = context(); ArrayList roleList = new ArrayList(getUserRoles(username)); String credentials = getUserCredentials(username); return new UserInfo(username, Credential.getCredential(credentials), roleList); ...
[ "public", "UserInfo", "getUserInfo", "(", "String", "username", ")", "throws", "Exception", "{", "DirContext", "dir", "=", "context", "(", ")", ";", "ArrayList", "roleList", "=", "new", "ArrayList", "(", "getUserRoles", "(", "username", ")", ")", ";", "Strin...
Get the UserInfo for a specified username @param username username @return the UserInfo @throws Exception
[ "Get", "the", "UserInfo", "for", "a", "specified", "username" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L64-L70
icode/ameba
src/main/java/ameba/i18n/Messages.java
Messages.getResourceBundle
public static ResourceBundle getResourceBundle(String bundleName, Locale locale) { """ <p>getResourceBundle.</p> @param bundleName a {@link java.lang.String} object. @param locale a {@link java.util.Locale} object. @return a {@link java.util.ResourceBundle} object. """ ResourceBundle bundle = ...
java
public static ResourceBundle getResourceBundle(String bundleName, Locale locale) { ResourceBundle bundle = null; boolean isDev = false; if (Ameba.getApp() != null) { isDev = Ameba.getApp().getMode().isDev(); BUNDLE_CONTROL.noCache = isDev; } if (!isDev) {...
[ "public", "static", "ResourceBundle", "getResourceBundle", "(", "String", "bundleName", ",", "Locale", "locale", ")", "{", "ResourceBundle", "bundle", "=", "null", ";", "boolean", "isDev", "=", "false", ";", "if", "(", "Ameba", ".", "getApp", "(", ")", "!=",...
<p>getResourceBundle.</p> @param bundleName a {@link java.lang.String} object. @param locale a {@link java.util.Locale} object. @return a {@link java.util.ResourceBundle} object.
[ "<p", ">", "getResourceBundle", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/i18n/Messages.java#L102-L131
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/declarative/utils/DeclarativePipelineUtils.java
DeclarativePipelineUtils.createBuildInfoId
public static String createBuildInfoId(Run build, String customBuildName, String customBuildNumber) { """ Create build info id: <buildname>_<buildnumber>. @param build - Step's build. @param customBuildName - Step's custom build name if exist. @param customBuildNumber - Step's custom build numbe...
java
public static String createBuildInfoId(Run build, String customBuildName, String customBuildNumber) { return StringUtils.defaultIfEmpty(customBuildName, BuildUniqueIdentifierHelper.getBuildName(build)) + "_" + StringUtils.defaultIfEmpty(customBuildNumber, BuildUniqueIdentifierHelper.getBuildNumb...
[ "public", "static", "String", "createBuildInfoId", "(", "Run", "build", ",", "String", "customBuildName", ",", "String", "customBuildNumber", ")", "{", "return", "StringUtils", ".", "defaultIfEmpty", "(", "customBuildName", ",", "BuildUniqueIdentifierHelper", ".", "ge...
Create build info id: <buildname>_<buildnumber>. @param build - Step's build. @param customBuildName - Step's custom build name if exist. @param customBuildNumber - Step's custom build number if exist. @return build info id: <buildname>_<buildnumber>.
[ "Create", "build", "info", "id", ":", "<buildname", ">", "_<buildnumber", ">", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/declarative/utils/DeclarativePipelineUtils.java#L101-L104
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ScanResult.java
ScanResult.setItems
public void setItems(java.util.Collection<java.util.Map<String, AttributeValue>> items) { """ <p> An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute. </p> @param items An array of item attributes that match the ...
java
public void setItems(java.util.Collection<java.util.Map<String, AttributeValue>> items) { if (items == null) { this.items = null; return; } this.items = new java.util.ArrayList<java.util.Map<String, AttributeValue>>(items); }
[ "public", "void", "setItems", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", ">", "items", ")", "{", "if", "(", "items", "==", "null", ")", "{", "this", ".", "items", "=...
<p> An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute. </p> @param items An array of item attributes that match the scan criteria. Each element in this array consists of an attribute name and the value for that attribute.
[ "<p", ">", "An", "array", "of", "item", "attributes", "that", "match", "the", "scan", "criteria", ".", "Each", "element", "in", "this", "array", "consists", "of", "an", "attribute", "name", "and", "the", "value", "for", "that", "attribute", ".", "<", "/"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/ScanResult.java#L116-L123
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/CacheManagerBuilder.java
CacheManagerBuilder.withCache
public <K, V> CacheManagerBuilder<T> withCache(String alias, Builder<? extends CacheConfiguration<K, V>> configurationBuilder) { """ Convenience method to add a {@link CacheConfiguration} linked to the specified alias to the returned builder by building it from the provided {@link Builder}. @param alias the ca...
java
public <K, V> CacheManagerBuilder<T> withCache(String alias, Builder<? extends CacheConfiguration<K, V>> configurationBuilder) { return withCache(alias, configurationBuilder.build()); }
[ "public", "<", "K", ",", "V", ">", "CacheManagerBuilder", "<", "T", ">", "withCache", "(", "String", "alias", ",", "Builder", "<", "?", "extends", "CacheConfiguration", "<", "K", ",", "V", ">", ">", "configurationBuilder", ")", "{", "return", "withCache", ...
Convenience method to add a {@link CacheConfiguration} linked to the specified alias to the returned builder by building it from the provided {@link Builder}. @param alias the cache alias @param configurationBuilder the {@code Builder} to get {@code CacheConfiguration} from @param <K> the cache key type @param <V> the...
[ "Convenience", "method", "to", "add", "a", "{", "@link", "CacheConfiguration", "}", "linked", "to", "the", "specified", "alias", "to", "the", "returned", "builder", "by", "building", "it", "from", "the", "provided", "{", "@link", "Builder", "}", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheManagerBuilder.java#L150-L152
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPDUtility.java
MPDUtility.getDuration
public static final Duration getDuration(double value, TimeUnit type) { """ Reads a duration value. This method relies on the fact that the units of the duration have been specified elsewhere. @param value Duration value @param type type of units of the duration @return Duration instance """ double...
java
public static final Duration getDuration(double value, TimeUnit type) { double duration; // Value is given in 1/10 of minute switch (type) { case MINUTES: case ELAPSED_MINUTES: { duration = value / 10; break; } case HOURS: ...
[ "public", "static", "final", "Duration", "getDuration", "(", "double", "value", ",", "TimeUnit", "type", ")", "{", "double", "duration", ";", "// Value is given in 1/10 of minute", "switch", "(", "type", ")", "{", "case", "MINUTES", ":", "case", "ELAPSED_MINUTES",...
Reads a duration value. This method relies on the fact that the units of the duration have been specified elsewhere. @param value Duration value @param type type of units of the duration @return Duration instance
[ "Reads", "a", "duration", "value", ".", "This", "method", "relies", "on", "the", "fact", "that", "the", "units", "of", "the", "duration", "have", "been", "specified", "elsewhere", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPDUtility.java#L271-L334
landawn/AbacusUtil
src/com/landawn/abacus/util/IntList.java
IntList.noneMatch
public <E extends Exception> boolean noneMatch(Try.IntPredicate<E> filter) throws E { """ Returns whether no elements of this List match the provided predicate. @param filter @return """ return noneMatch(0, size(), filter); }
java
public <E extends Exception> boolean noneMatch(Try.IntPredicate<E> filter) throws E { return noneMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "noneMatch", "(", "Try", ".", "IntPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "noneMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether no elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "no", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/IntList.java#L1035-L1037
hdbeukel/james-extensions
src/main/java/org/jamesframework/ext/permutation/neigh/SingleSwapNeighbourhood.java
SingleSwapNeighbourhood.getAllMoves
@Override public List<SingleSwapMove> getAllMoves(PermutationSolution solution) { """ Create a list of all possible single swap moves. A move is generated for each pair of distinct positions i,j (i&lt;j) in the given permutation. @param solution permutation solution to which the move is to be applied @ret...
java
@Override public List<SingleSwapMove> getAllMoves(PermutationSolution solution) { // initialize list List<SingleSwapMove> moves = new ArrayList<>(); int n = solution.size(); for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ moves.add(new SingleSwapMove(i, ...
[ "@", "Override", "public", "List", "<", "SingleSwapMove", ">", "getAllMoves", "(", "PermutationSolution", "solution", ")", "{", "// initialize list", "List", "<", "SingleSwapMove", ">", "moves", "=", "new", "ArrayList", "<>", "(", ")", ";", "int", "n", "=", ...
Create a list of all possible single swap moves. A move is generated for each pair of distinct positions i,j (i&lt;j) in the given permutation. @param solution permutation solution to which the move is to be applied @return list of all possible single swap moves
[ "Create", "a", "list", "of", "all", "possible", "single", "swap", "moves", ".", "A", "move", "is", "generated", "for", "each", "pair", "of", "distinct", "positions", "i", "j", "(", "i&lt", ";", "j", ")", "in", "the", "given", "permutation", "." ]
train
https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/permutation/neigh/SingleSwapNeighbourhood.java#L65-L76
indeedeng/util
varexport/src/main/java/com/indeed/util/varexport/VarExporter.java
VarExporter.forNamespace
public static synchronized VarExporter forNamespace(@Nonnull final Class<?> clazz, final boolean declaredFieldsOnly) { """ Load an exporter with a specified class. @param clazz Class type from which variables will be exported. @param declaredFieldsOnly if true, will not export any variable belonging to superclas...
java
public static synchronized VarExporter forNamespace(@Nonnull final Class<?> clazz, final boolean declaredFieldsOnly) { return getInstance(clazz.getSimpleName(), clazz, declaredFieldsOnly); }
[ "public", "static", "synchronized", "VarExporter", "forNamespace", "(", "@", "Nonnull", "final", "Class", "<", "?", ">", "clazz", ",", "final", "boolean", "declaredFieldsOnly", ")", "{", "return", "getInstance", "(", "clazz", ".", "getSimpleName", "(", ")", ",...
Load an exporter with a specified class. @param clazz Class type from which variables will be exported. @param declaredFieldsOnly if true, will not export any variable belonging to superclasses of {@code clazz}. @return exporter for the given class will be created if never before accessed.
[ "Load", "an", "exporter", "with", "a", "specified", "class", "." ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/varexport/src/main/java/com/indeed/util/varexport/VarExporter.java#L88-L90
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.conditionsRule
public static Rule conditionsRule(final Set<Condition> conditions, String key, String value) { """ Create a rule: predicate(conditions) => new state(results) @param conditions conditions @param key key @param value value @return rule """ HashMap<String, String> results = new HashMap...
java
public static Rule conditionsRule(final Set<Condition> conditions, String key, String value) { HashMap<String, String> results = new HashMap<>(); results.put(key, value); return conditionsRule(conditions, results); }
[ "public", "static", "Rule", "conditionsRule", "(", "final", "Set", "<", "Condition", ">", "conditions", ",", "String", "key", ",", "String", "value", ")", "{", "HashMap", "<", "String", ",", "String", ">", "results", "=", "new", "HashMap", "<>", "(", ")"...
Create a rule: predicate(conditions) => new state(results) @param conditions conditions @param key key @param value value @return rule
[ "Create", "a", "rule", ":", "predicate", "(", "conditions", ")", "=", ">", "new", "state", "(", "results", ")" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L126-L130
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java
S3Versions.withPrefix
public static S3Versions withPrefix(AmazonS3 s3, String bucketName, String prefix) { """ Constructs an iterable that covers the versions in an Amazon S3 bucket where the object key begins with the given prefix. @param s3 The Amazon S3 client. @param bucketName The bucket name. @param prefix T...
java
public static S3Versions withPrefix(AmazonS3 s3, String bucketName, String prefix) { S3Versions versions = new S3Versions(s3, bucketName); versions.prefix = prefix; return versions; }
[ "public", "static", "S3Versions", "withPrefix", "(", "AmazonS3", "s3", ",", "String", "bucketName", ",", "String", "prefix", ")", "{", "S3Versions", "versions", "=", "new", "S3Versions", "(", "s3", ",", "bucketName", ")", ";", "versions", ".", "prefix", "=",...
Constructs an iterable that covers the versions in an Amazon S3 bucket where the object key begins with the given prefix. @param s3 The Amazon S3 client. @param bucketName The bucket name. @param prefix The prefix. @return An iterator for object version summaries.
[ "Constructs", "an", "iterable", "that", "covers", "the", "versions", "in", "an", "Amazon", "S3", "bucket", "where", "the", "object", "key", "begins", "with", "the", "given", "prefix", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/iterable/S3Versions.java#L77-L82
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/DocBookUtilities.java
DocBookUtilities.processConditions
public static void processConditions(final String condition, final Document doc, final String defaultCondition) { """ Check the XML Document and it's children for condition statements. If any are found then check if the condition matches the passed condition string. If they don't match then remove the nodes. ...
java
public static void processConditions(final String condition, final Document doc, final String defaultCondition) { processConditions(condition, doc, defaultCondition, true); }
[ "public", "static", "void", "processConditions", "(", "final", "String", "condition", ",", "final", "Document", "doc", ",", "final", "String", "defaultCondition", ")", "{", "processConditions", "(", "condition", ",", "doc", ",", "defaultCondition", ",", "true", ...
Check the XML Document and it's children for condition statements. If any are found then check if the condition matches the passed condition string. If they don't match then remove the nodes. @param condition The condition regex to be tested against. @param doc The Document to check for conditional...
[ "Check", "the", "XML", "Document", "and", "it", "s", "children", "for", "condition", "statements", ".", "If", "any", "are", "found", "then", "check", "if", "the", "condition", "matches", "the", "passed", "condition", "string", ".", "If", "they", "don", "t"...
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/DocBookUtilities.java#L3196-L3198
square/jna-gmp
jnagmp/src/main/java/com/squareup/jnagmp/Gmp.java
Gmp.exactDivide
public static BigInteger exactDivide(BigInteger dividend, BigInteger divisor) { """ Divide dividend by divisor. This method only returns correct answers when the division produces no remainder. Correct answers should not be expected when the divison would result in a remainder. @return dividend / divisor @th...
java
public static BigInteger exactDivide(BigInteger dividend, BigInteger divisor) { if (divisor.signum() == 0) { throw new ArithmeticException("BigInteger divide by zero"); } return INSTANCE.get().exactDivImpl(dividend, divisor); }
[ "public", "static", "BigInteger", "exactDivide", "(", "BigInteger", "dividend", ",", "BigInteger", "divisor", ")", "{", "if", "(", "divisor", ".", "signum", "(", ")", "==", "0", ")", "{", "throw", "new", "ArithmeticException", "(", "\"BigInteger divide by zero\"...
Divide dividend by divisor. This method only returns correct answers when the division produces no remainder. Correct answers should not be expected when the divison would result in a remainder. @return dividend / divisor @throws ArithmeticException if divisor is zero
[ "Divide", "dividend", "by", "divisor", ".", "This", "method", "only", "returns", "correct", "answers", "when", "the", "division", "produces", "no", "remainder", ".", "Correct", "answers", "should", "not", "be", "expected", "when", "the", "divison", "would", "r...
train
https://github.com/square/jna-gmp/blob/192d26d97d6773bc3c68ccfa97450f4257d54838/jnagmp/src/main/java/com/squareup/jnagmp/Gmp.java#L165-L170
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/ConfusionMatrix.java
ConfusionMatrix.add
public synchronized void add(T actual, T predicted, int count) { """ Increments the entry specified by actual and predicted by count. """ if (matrix.containsKey(actual)) { matrix.get(actual).add(predicted, count); } else { Multiset<T> counts = HashMultiset.create(); ...
java
public synchronized void add(T actual, T predicted, int count) { if (matrix.containsKey(actual)) { matrix.get(actual).add(predicted, count); } else { Multiset<T> counts = HashMultiset.create(); counts.add(predicted, count); matrix.put(actual, counts); ...
[ "public", "synchronized", "void", "add", "(", "T", "actual", ",", "T", "predicted", ",", "int", "count", ")", "{", "if", "(", "matrix", ".", "containsKey", "(", "actual", ")", ")", "{", "matrix", ".", "get", "(", "actual", ")", ".", "add", "(", "pr...
Increments the entry specified by actual and predicted by count.
[ "Increments", "the", "entry", "specified", "by", "actual", "and", "predicted", "by", "count", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/ConfusionMatrix.java#L64-L72
lucasweb78/aws-v4-signer-java
src/main/java/uk/co/lucasweb/aws/v4/signer/CanonicalRequest.java
CanonicalRequest.extractQueryParameters
private static List<Parameter> extractQueryParameters(String rawQuery) { """ Extract parameters from a query string, preserving encoding. <p> We can't use Apache HTTP Client's URLEncodedUtils.parse, mainly because we don't want to decode names/values. @param rawQuery the query to parse @return The list of ...
java
private static List<Parameter> extractQueryParameters(String rawQuery) { List<Parameter> results = new ArrayList<>(); int endIndex = rawQuery.length() - 1; int index = 0; while (0 <= index && index <= endIndex) { /* * Ideally we should first look for '&', then lo...
[ "private", "static", "List", "<", "Parameter", ">", "extractQueryParameters", "(", "String", "rawQuery", ")", "{", "List", "<", "Parameter", ">", "results", "=", "new", "ArrayList", "<>", "(", ")", ";", "int", "endIndex", "=", "rawQuery", ".", "length", "(...
Extract parameters from a query string, preserving encoding. <p> We can't use Apache HTTP Client's URLEncodedUtils.parse, mainly because we don't want to decode names/values. @param rawQuery the query to parse @return The list of parameters, in the order they were found.
[ "Extract", "parameters", "from", "a", "query", "string", "preserving", "encoding", ".", "<p", ">", "We", "can", "t", "use", "Apache", "HTTP", "Client", "s", "URLEncodedUtils", ".", "parse", "mainly", "because", "we", "don", "t", "want", "to", "decode", "na...
train
https://github.com/lucasweb78/aws-v4-signer-java/blob/731a5f3974fa5d28361d67c54f6186d763bd9440/src/main/java/uk/co/lucasweb/aws/v4/signer/CanonicalRequest.java#L133-L169
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/message/record/RecordMessageHeader.java
RecordMessageHeader.isMatchHint
public boolean isMatchHint(String strKeyArea, Object objKeyData) { """ Does this key area hint match my hint? @param strKeyArea The key area to match. @param objKeyData The data to match. @return true if match. """ if (m_mapHints != null) if (objKeyData.equals(m_mapHints.get(strKeyArea))...
java
public boolean isMatchHint(String strKeyArea, Object objKeyData) { if (m_mapHints != null) if (objKeyData.equals(m_mapHints.get(strKeyArea))) return true; // Match; return false; // No match }
[ "public", "boolean", "isMatchHint", "(", "String", "strKeyArea", ",", "Object", "objKeyData", ")", "{", "if", "(", "m_mapHints", "!=", "null", ")", "if", "(", "objKeyData", ".", "equals", "(", "m_mapHints", ".", "get", "(", "strKeyArea", ")", ")", ")", "...
Does this key area hint match my hint? @param strKeyArea The key area to match. @param objKeyData The data to match. @return true if match.
[ "Does", "this", "key", "area", "hint", "match", "my", "hint?" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/message/record/RecordMessageHeader.java#L181-L187
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getUserApps
public List<App> getUserApps(long id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Gets a list of apps accessible by a user, not including personal apps. @param id Id of the user @return List of Apps @throws OAuthSystemException - if there is a IOException reading paramete...
java
public List<App> getUserApps(long id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_APPS_FOR_USER_URL, Long.toString(id))); OneloginURLConnectionClient httpClient = new OneloginURLConnectionC...
[ "public", "List", "<", "App", ">", "getUserApps", "(", "long", "id", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "URIBuilder", "url", "=", "new...
Gets a list of apps accessible by a user, not including personal apps. @param id Id of the user @return List of Apps @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceRespons...
[ "Gets", "a", "list", "of", "apps", "accessible", "by", "a", "user", "not", "including", "personal", "apps", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L548-L578