repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
cdk/cdk
base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java
ReactionEngine.initiateDictionary
private EntryReact initiateDictionary(String nameDict, IReactionProcess reaction) { """ Open the Dictionary OWLReact. @param nameDict Name of the Dictionary @param reaction The IReactionProcess @return The entry for this reaction """ DictionaryDatabase db = new DictionaryDatabase(); ...
java
private EntryReact initiateDictionary(String nameDict, IReactionProcess reaction) { DictionaryDatabase db = new DictionaryDatabase(); dictionary = db.getDictionary(nameDict); String entryString = reaction.getSpecification().getSpecificationReference(); entryString = entryString.substring...
[ "private", "EntryReact", "initiateDictionary", "(", "String", "nameDict", ",", "IReactionProcess", "reaction", ")", "{", "DictionaryDatabase", "db", "=", "new", "DictionaryDatabase", "(", ")", ";", "dictionary", "=", "db", ".", "getDictionary", "(", "nameDict", ")...
Open the Dictionary OWLReact. @param nameDict Name of the Dictionary @param reaction The IReactionProcess @return The entry for this reaction
[ "Open", "the", "Dictionary", "OWLReact", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/reaction/src/main/java/org/openscience/cdk/reaction/ReactionEngine.java#L102-L109
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java
Decimal.fromBigDecimal
public static Decimal fromBigDecimal(BigDecimal bd, int precision, int scale) { """ then `precision` is checked. if precision overflow, it will return `null` """ bd = bd.setScale(scale, RoundingMode.HALF_UP); if (bd.precision() > precision) { return null; } long longVal = -1; if (precision <= MAX...
java
public static Decimal fromBigDecimal(BigDecimal bd, int precision, int scale) { bd = bd.setScale(scale, RoundingMode.HALF_UP); if (bd.precision() > precision) { return null; } long longVal = -1; if (precision <= MAX_COMPACT_PRECISION) { longVal = bd.movePointRight(scale).longValueExact(); } return ...
[ "public", "static", "Decimal", "fromBigDecimal", "(", "BigDecimal", "bd", ",", "int", "precision", ",", "int", "scale", ")", "{", "bd", "=", "bd", ".", "setScale", "(", "scale", ",", "RoundingMode", ".", "HALF_UP", ")", ";", "if", "(", "bd", ".", "prec...
then `precision` is checked. if precision overflow, it will return `null`
[ "then", "precision", "is", "checked", ".", "if", "precision", "overflow", "it", "will", "return", "null" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/Decimal.java#L158-L169
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainAccessFactory.java
DomainAccessFactory.createDomainAccess
public static IDomainAccess createDomainAccess(IDBAccess dbAccess, String domainName) { """ Create a domain accessor. @param dbAccess the graph database connection @param domainName @return """ return IDomainAccessFactory.INSTANCE.createDomainAccess(dbAccess, domainName); }
java
public static IDomainAccess createDomainAccess(IDBAccess dbAccess, String domainName) { return IDomainAccessFactory.INSTANCE.createDomainAccess(dbAccess, domainName); }
[ "public", "static", "IDomainAccess", "createDomainAccess", "(", "IDBAccess", "dbAccess", ",", "String", "domainName", ")", "{", "return", "IDomainAccessFactory", ".", "INSTANCE", ".", "createDomainAccess", "(", "dbAccess", ",", "domainName", ")", ";", "}" ]
Create a domain accessor. @param dbAccess the graph database connection @param domainName @return
[ "Create", "a", "domain", "accessor", "." ]
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainAccessFactory.java#L34-L36
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/JSONWorldDataHelper.java
JSONWorldDataHelper.buildAchievementStats
public static void buildAchievementStats(JsonObject json, EntityPlayerMP player) { """ Builds the basic achievement world data to be used as observation signals by the listener. @param json a JSON object into which the achievement stats will be added. """ StatisticsManagerServer sfw = player.getStatFi...
java
public static void buildAchievementStats(JsonObject json, EntityPlayerMP player) { StatisticsManagerServer sfw = player.getStatFile(); json.addProperty("DistanceTravelled", sfw.readStat((StatBase)StatList.WALK_ONE_CM) + sfw.readStat((StatBase)StatList.SWIM_ONE_CM) ...
[ "public", "static", "void", "buildAchievementStats", "(", "JsonObject", "json", ",", "EntityPlayerMP", "player", ")", "{", "StatisticsManagerServer", "sfw", "=", "player", ".", "getStatFile", "(", ")", ";", "json", ".", "addProperty", "(", "\"DistanceTravelled\"", ...
Builds the basic achievement world data to be used as observation signals by the listener. @param json a JSON object into which the achievement stats will be added.
[ "Builds", "the", "basic", "achievement", "world", "data", "to", "be", "used", "as", "observation", "signals", "by", "the", "listener", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/JSONWorldDataHelper.java#L100-L119
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/zip/ZipExtensions.java
ZipExtensions.extractZipEntry
public static void extractZipEntry(final ZipFile zipFile, final ZipEntry target, final File toDirectory) throws IOException { """ Extract zip entry. @param zipFile the zip file @param target the target @param toDirectory the to directory @throws IOException Signals that an I/O exception has occurred. ...
java
public static void extractZipEntry(final ZipFile zipFile, final ZipEntry target, final File toDirectory) throws IOException { final File fileToExtract = new File(toDirectory, target.getName()); new File(fileToExtract.getParent()).mkdirs(); try (InputStream is = zipFile.getInputStream(target); BufferedInput...
[ "public", "static", "void", "extractZipEntry", "(", "final", "ZipFile", "zipFile", ",", "final", "ZipEntry", "target", ",", "final", "File", "toDirectory", ")", "throws", "IOException", "{", "final", "File", "fileToExtract", "=", "new", "File", "(", "toDirectory...
Extract zip entry. @param zipFile the zip file @param target the target @param toDirectory the to directory @throws IOException Signals that an I/O exception has occurred.
[ "Extract", "zip", "entry", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/zip/ZipExtensions.java#L94-L115
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/datepicker/Datepicker.java
Datepicker.addLabel
protected void addLabel(ResponseWriter rw, String clientId, String fieldId) throws IOException { """ Renders the optional label. This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param clientId the id used by the label to refernce the input f...
java
protected void addLabel(ResponseWriter rw, String clientId, String fieldId) throws IOException { String label = getLabel(); if (!isRenderLabel()) { label = null; } if (label != null) { rw.startElement("label", this); rw.writeAttribute("for", clientId, "for"); new CoreRenderer().generateErrorAndRequi...
[ "protected", "void", "addLabel", "(", "ResponseWriter", "rw", ",", "String", "clientId", ",", "String", "fieldId", ")", "throws", "IOException", "{", "String", "label", "=", "getLabel", "(", ")", ";", "if", "(", "!", "isRenderLabel", "(", ")", ")", "{", ...
Renders the optional label. This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param clientId the id used by the label to refernce the input field @throws IOException may be thrown by the response writer
[ "Renders", "the", "optional", "label", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/datepicker/Datepicker.java#L227-L244
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java
SelectionPageGenerator.displaySelectionPage
public void displaySelectionPage(HttpServletRequest request, HttpServletResponse response, SocialTaiRequest socialTaiRequest) throws IOException { """ Generates the sign in page to allow a user to select from the configured social login services. If no services are configured, the user is redirected to an error p...
java
public void displaySelectionPage(HttpServletRequest request, HttpServletResponse response, SocialTaiRequest socialTaiRequest) throws IOException { setRequestAndConfigInformation(request, response, socialTaiRequest); if (selectableConfigs == null || selectableConfigs.isEmpty()) { sendDisplayE...
[ "public", "void", "displaySelectionPage", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "SocialTaiRequest", "socialTaiRequest", ")", "throws", "IOException", "{", "setRequestAndConfigInformation", "(", "request", ",", "response", ",", ...
Generates the sign in page to allow a user to select from the configured social login services. If no services are configured, the user is redirected to an error page. @param request @param response @param socialTaiRequest @throws IOException
[ "Generates", "the", "sign", "in", "page", "to", "allow", "a", "user", "to", "select", "from", "the", "configured", "social", "login", "services", ".", "If", "no", "services", "are", "configured", "the", "user", "is", "redirected", "to", "an", "error", "pag...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/SelectionPageGenerator.java#L89-L96
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.sortByProperty
public static <T> List<T> sortByProperty(Collection<T> collection, String property) { """ 根据Bean的属性排序 @param <T> 元素类型 @param collection 集合,会被转换为List @param property 属性名 @return 排序后的List @since 4.0.6 """ return sort(collection, new PropertyComparator<>(property)); }
java
public static <T> List<T> sortByProperty(Collection<T> collection, String property) { return sort(collection, new PropertyComparator<>(property)); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "sortByProperty", "(", "Collection", "<", "T", ">", "collection", ",", "String", "property", ")", "{", "return", "sort", "(", "collection", ",", "new", "PropertyComparator", "<>", "(", "property", ...
根据Bean的属性排序 @param <T> 元素类型 @param collection 集合,会被转换为List @param property 属性名 @return 排序后的List @since 4.0.6
[ "根据Bean的属性排序" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L2112-L2114
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java
ManagementGraph.getGroupVerticesInReverseTopologicalOrder
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder() { """ Returns a list of group vertices sorted in reverse topological order. @return a list of group vertices sorted in reverse topological order """ final List<ManagementGroupVertex> reverseTopologicalSort = new ArrayList<Mana...
java
public List<ManagementGroupVertex> getGroupVerticesInReverseTopologicalOrder() { final List<ManagementGroupVertex> reverseTopologicalSort = new ArrayList<ManagementGroupVertex>(); final Deque<ManagementGroupVertex> noOutgoingEdges = new ArrayDeque<ManagementGroupVertex>(); final Map<ManagementGroupVertex, Intege...
[ "public", "List", "<", "ManagementGroupVertex", ">", "getGroupVerticesInReverseTopologicalOrder", "(", ")", "{", "final", "List", "<", "ManagementGroupVertex", ">", "reverseTopologicalSort", "=", "new", "ArrayList", "<", "ManagementGroupVertex", ">", "(", ")", ";", "f...
Returns a list of group vertices sorted in reverse topological order. @return a list of group vertices sorted in reverse topological order
[ "Returns", "a", "list", "of", "group", "vertices", "sorted", "in", "reverse", "topological", "order", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L372-L405
wildfly/wildfly-core
protocol/src/main/java/org/jboss/as/protocol/mgmt/FutureManagementChannel.java
FutureManagementChannel.openChannel
protected Channel openChannel(final Connection connection, final String serviceType, final OptionMap options) throws IOException { """ Open a channel. @param connection the connection @param serviceType the service type @param options the channel options @return the opened channel @throws IOException if the...
java
protected Channel openChannel(final Connection connection, final String serviceType, final OptionMap options) throws IOException { return openChannel(connection, serviceType, options, null); }
[ "protected", "Channel", "openChannel", "(", "final", "Connection", "connection", ",", "final", "String", "serviceType", ",", "final", "OptionMap", "options", ")", "throws", "IOException", "{", "return", "openChannel", "(", "connection", ",", "serviceType", ",", "o...
Open a channel. @param connection the connection @param serviceType the service type @param options the channel options @return the opened channel @throws IOException if there is a remoting problem opening the channel or it cannot be opened in a reasonable amount of time
[ "Open", "a", "channel", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/FutureManagementChannel.java#L152-L154
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitExpressionDef
public T visitExpressionDef(ExpressionDef elm, C context) { """ Visit a ExpressionDef. This method will be called for every node in the tree that is a ExpressionDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result """ visitElement(elm.getExp...
java
public T visitExpressionDef(ExpressionDef elm, C context) { visitElement(elm.getExpression(), context); return null; }
[ "public", "T", "visitExpressionDef", "(", "ExpressionDef", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getExpression", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a ExpressionDef. This method will be called for every node in the tree that is a ExpressionDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "ExpressionDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "ExpressionDef", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L316-L319
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/spatialite/ImportExportUtils.java
ImportExportUtils.executeShapefileImportQueries
public static void executeShapefileImportQueries( final ASpatialDb db, String tableName, String shpPath, String encoding, int srid, ESpatialiteGeometryType geometryType ) throws Exception { """ Import a shapefile into the database using a temporary virtual table. @param db the database. @param tabl...
java
public static void executeShapefileImportQueries( final ASpatialDb db, String tableName, String shpPath, String encoding, int srid, ESpatialiteGeometryType geometryType ) throws Exception { SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyyMMddHHmmss"); if (encoding == null || enco...
[ "public", "static", "void", "executeShapefileImportQueries", "(", "final", "ASpatialDb", "db", ",", "String", "tableName", ",", "String", "shpPath", ",", "String", "encoding", ",", "int", "srid", ",", "ESpatialiteGeometryType", "geometryType", ")", "throws", "Except...
Import a shapefile into the database using a temporary virtual table. @param db the database. @param tableName the name for the new table. @param shpPath the shp to import. @param encoding the encoding. If <code>null</code>, UTF-8 is used. @param srid the epsg code for the file. @param geometryType the geometry type o...
[ "Import", "a", "shapefile", "into", "the", "database", "using", "a", "temporary", "virtual", "table", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/spatialite/ImportExportUtils.java#L45-L90
oboehm/jfachwert
src/main/java/de/jfachwert/post/Adresse.java
Adresse.of
public static Adresse of(Ort ort, String strasse) { """ Liefert eine Adresse mit den uebergebenen Parametern. @param ort Ort @param strasse Strasse mit oder ohne Hausnummer @return Adresse """ List<String> splitted = toStrasseHausnummer(strasse); return of(ort, splitted.get(0), splitte...
java
public static Adresse of(Ort ort, String strasse) { List<String> splitted = toStrasseHausnummer(strasse); return of(ort, splitted.get(0), splitted.get(1)); }
[ "public", "static", "Adresse", "of", "(", "Ort", "ort", ",", "String", "strasse", ")", "{", "List", "<", "String", ">", "splitted", "=", "toStrasseHausnummer", "(", "strasse", ")", ";", "return", "of", "(", "ort", ",", "splitted", ".", "get", "(", "0",...
Liefert eine Adresse mit den uebergebenen Parametern. @param ort Ort @param strasse Strasse mit oder ohne Hausnummer @return Adresse
[ "Liefert", "eine", "Adresse", "mit", "den", "uebergebenen", "Parametern", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/post/Adresse.java#L142-L145
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/builder/FieldAccessor.java
FieldAccessor.hasAnnotationByGroup
public <A extends Annotation> boolean hasAnnotationByGroup(final Class<A> annoClass, final Class<?>... groups) { """ グループを指定して指定したアノテーションを持つかどうか判定します。 @param <A> 取得対象のアノテーションのタイプ @param annoClass 判定対象のアノテーションのグループ @param groups グループ(クラスタイプ)による絞り込み。属性groupsが存在する場合に、絞り込みます。 @return 指定したアノテーションが見つからない場合は、サイズ0のリ...
java
public <A extends Annotation> boolean hasAnnotationByGroup(final Class<A> annoClass, final Class<?>... groups) { return getAnnotationsByGroup(annoClass, groups).size() > 0; }
[ "public", "<", "A", "extends", "Annotation", ">", "boolean", "hasAnnotationByGroup", "(", "final", "Class", "<", "A", ">", "annoClass", ",", "final", "Class", "<", "?", ">", "...", "groups", ")", "{", "return", "getAnnotationsByGroup", "(", "annoClass", ",",...
グループを指定して指定したアノテーションを持つかどうか判定します。 @param <A> 取得対象のアノテーションのタイプ @param annoClass 判定対象のアノテーションのグループ @param groups グループ(クラスタイプ)による絞り込み。属性groupsが存在する場合に、絞り込みます。 @return 指定したアノテーションが見つからない場合は、サイズ0のリストを返します。
[ "グループを指定して指定したアノテーションを持つかどうか判定します。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/builder/FieldAccessor.java#L161-L165
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/LongStream.java
LongStream.dropWhile
@NotNull public LongStream dropWhile(@NotNull final LongPredicate predicate) { """ Drops elements while the predicate is true and returns the rest. <p>This is an intermediate operation. <p>Example: <pre> predicate: (a) -&gt; a &lt; 3 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [3, 4, 1, 2, 3, 4] </pre>...
java
@NotNull public LongStream dropWhile(@NotNull final LongPredicate predicate) { return new LongStream(params, new LongDropWhile(iterator, predicate)); }
[ "@", "NotNull", "public", "LongStream", "dropWhile", "(", "@", "NotNull", "final", "LongPredicate", "predicate", ")", "{", "return", "new", "LongStream", "(", "params", ",", "new", "LongDropWhile", "(", "iterator", ",", "predicate", ")", ")", ";", "}" ]
Drops elements while the predicate is true and returns the rest. <p>This is an intermediate operation. <p>Example: <pre> predicate: (a) -&gt; a &lt; 3 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [3, 4, 1, 2, 3, 4] </pre> @param predicate the predicate used to drop elements @return the new {@code LongStream}
[ "Drops", "elements", "while", "the", "predicate", "is", "true", "and", "returns", "the", "rest", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/LongStream.java#L775-L778
io7m/jcanephora
com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLProjectionMatrices.java
JCGLProjectionMatrices.perspectiveProjectionRH
public static Matrix4x4D perspectiveProjectionRH( final double z_near, final double z_far, final double aspect, final double horizontal_fov) { """ <p>Calculate a matrix that will produce a perspective projection based on the given view frustum parameters, the aspect ratio of the viewport and a gi...
java
public static Matrix4x4D perspectiveProjectionRH( final double z_near, final double z_far, final double aspect, final double horizontal_fov) { final double x_max = z_near * StrictMath.tan(horizontal_fov / 2.0); final double x_min = -x_max; final double y_max = x_max / aspect; final dou...
[ "public", "static", "Matrix4x4D", "perspectiveProjectionRH", "(", "final", "double", "z_near", ",", "final", "double", "z_far", ",", "final", "double", "aspect", ",", "final", "double", "horizontal_fov", ")", "{", "final", "double", "x_max", "=", "z_near", "*", ...
<p>Calculate a matrix that will produce a perspective projection based on the given view frustum parameters, the aspect ratio of the viewport and a given horizontal field of view in radians. Note that {@code fov_radians} represents the full horizontal field of view: the angle at the base of the triangle formed by the f...
[ "<p", ">", "Calculate", "a", "matrix", "that", "will", "produce", "a", "perspective", "projection", "based", "on", "the", "given", "view", "frustum", "parameters", "the", "aspect", "ratio", "of", "the", "viewport", "and", "a", "given", "horizontal", "field", ...
train
https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLProjectionMatrices.java#L172-L183
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/util/NetworkLocationIgnorer.java
NetworkLocationIgnorer.shouldIgnore
public boolean shouldIgnore(final String pProvider, final long pTime) { """ Whether we should ignore this location. @param pProvider the provider that provided the location @param pTime the time of the location @return true if we should ignore this location, false if not """ if (LocationManager.GPS_P...
java
public boolean shouldIgnore(final String pProvider, final long pTime) { if (LocationManager.GPS_PROVIDER.equals(pProvider)) { mLastGps = pTime; } else { if (pTime < mLastGps + Configuration.getInstance().getGpsWaitTime()) { return true; } } return false; }
[ "public", "boolean", "shouldIgnore", "(", "final", "String", "pProvider", ",", "final", "long", "pTime", ")", "{", "if", "(", "LocationManager", ".", "GPS_PROVIDER", ".", "equals", "(", "pProvider", ")", ")", "{", "mLastGps", "=", "pTime", ";", "}", "else"...
Whether we should ignore this location. @param pProvider the provider that provided the location @param pTime the time of the location @return true if we should ignore this location, false if not
[ "Whether", "we", "should", "ignore", "this", "location", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/NetworkLocationIgnorer.java#L30-L41
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionsTable.java
ExtensionsTable.functionAvailable
public boolean functionAvailable(String ns, String funcName) throws javax.xml.transform.TransformerException { """ Execute the function-available() function. @param ns the URI of namespace in which the function is needed @param funcName the function name being tested @return whether the given ...
java
public boolean functionAvailable(String ns, String funcName) throws javax.xml.transform.TransformerException { boolean isAvailable = false; if (null != ns) { ExtensionHandler extNS = (ExtensionHandler) m_extensionFunctionNamespaces.get(ns); if (extNS != null) ...
[ "public", "boolean", "functionAvailable", "(", "String", "ns", ",", "String", "funcName", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "boolean", "isAvailable", "=", "false", ";", "if", "(", "null", "!=", "ns", ")",...
Execute the function-available() function. @param ns the URI of namespace in which the function is needed @param funcName the function name being tested @return whether the given function is available or not. @throws javax.xml.transform.TransformerException
[ "Execute", "the", "function", "-", "available", "()", "function", ".", "@param", "ns", "the", "URI", "of", "namespace", "in", "which", "the", "function", "is", "needed", "@param", "funcName", "the", "function", "name", "being", "tested" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionsTable.java#L108-L121
dadoonet/fscrawler
framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java
FsCrawlerUtil.isIndexable
public static boolean isIndexable(boolean directory, String filename, List<String> includes, List<String> excludes) { """ We check if we can index the file or if we should ignore it @param directory true if the current file is a directory, false in other case (actual file) @param filename The filename to scan ...
java
public static boolean isIndexable(boolean directory, String filename, List<String> includes, List<String> excludes) { logger.debug("directory = [{}], filename = [{}], includes = [{}], excludes = [{}]", directory, filename, includes, excludes); boolean isIndexable = isIndexable(filename, includes, exclu...
[ "public", "static", "boolean", "isIndexable", "(", "boolean", "directory", ",", "String", "filename", ",", "List", "<", "String", ">", "includes", ",", "List", "<", "String", ">", "excludes", ")", "{", "logger", ".", "debug", "(", "\"directory = [{}], filename...
We check if we can index the file or if we should ignore it @param directory true if the current file is a directory, false in other case (actual file) @param filename The filename to scan @param includes include rules, may be empty not null @param excludes exclude rules, may be empty not null
[ "We", "check", "if", "we", "can", "index", "the", "file", "or", "if", "we", "should", "ignore", "it" ]
train
https://github.com/dadoonet/fscrawler/blob/cca00a14e21ef9986aa30e19b160463aed6bf921/framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java#L180-L192
jbundle/osgi
obr/src/main/java/org/jbundle/util/osgi/obr/ObrClassFinderService.java
ObrClassFinderService.getRepositoryAdmin
public RepositoryAdmin getRepositoryAdmin(BundleContext context, ObrClassFinderService autoStartNotify) throws InvalidSyntaxException { """ Get the repository admin service. @param context @return @throws InvalidSyntaxException """ RepositoryAdmin admin = null; ServiceReference[] ref = co...
java
public RepositoryAdmin getRepositoryAdmin(BundleContext context, ObrClassFinderService autoStartNotify) throws InvalidSyntaxException { RepositoryAdmin admin = null; ServiceReference[] ref = context.getServiceReferences(RepositoryAdmin.class.getName(), null); if ((ref != null) && (ref.le...
[ "public", "RepositoryAdmin", "getRepositoryAdmin", "(", "BundleContext", "context", ",", "ObrClassFinderService", "autoStartNotify", ")", "throws", "InvalidSyntaxException", "{", "RepositoryAdmin", "admin", "=", "null", ";", "ServiceReference", "[", "]", "ref", "=", "co...
Get the repository admin service. @param context @return @throws InvalidSyntaxException
[ "Get", "the", "repository", "admin", "service", "." ]
train
https://github.com/jbundle/osgi/blob/beb02aef78736a4f799aaac001c8f0327bf0536c/obr/src/main/java/org/jbundle/util/osgi/obr/ObrClassFinderService.java#L70-L88
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/SelectionCriteria.java
SelectionCriteria.setAlias
public void setAlias(String alias) { """ Sets the alias. By default the entire attribute path participates in the alias @param alias The name of the alias to set """ m_alias = alias; String attributePath = (String)getAttribute(); boolean allPathsAliased = true; m_userAlias = new UserAlias(alias, a...
java
public void setAlias(String alias) { m_alias = alias; String attributePath = (String)getAttribute(); boolean allPathsAliased = true; m_userAlias = new UserAlias(alias, attributePath, allPathsAliased); }
[ "public", "void", "setAlias", "(", "String", "alias", ")", "{", "m_alias", "=", "alias", ";", "String", "attributePath", "=", "(", "String", ")", "getAttribute", "(", ")", ";", "boolean", "allPathsAliased", "=", "true", ";", "m_userAlias", "=", "new", "Use...
Sets the alias. By default the entire attribute path participates in the alias @param alias The name of the alias to set
[ "Sets", "the", "alias", ".", "By", "default", "the", "entire", "attribute", "path", "participates", "in", "the", "alias" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/SelectionCriteria.java#L215-L222
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java
SarlLinkFactory.getLinkForPrimitive
@SuppressWarnings("static-method") protected void getLinkForPrimitive(Content link, LinkInfo linkInfo, Type type) { """ Build the link for the primitive. @param link the link. @param linkInfo the information on the link. @param type the type. """ link.addContent(type.typeName()); }
java
@SuppressWarnings("static-method") protected void getLinkForPrimitive(Content link, LinkInfo linkInfo, Type type) { link.addContent(type.typeName()); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "void", "getLinkForPrimitive", "(", "Content", "link", ",", "LinkInfo", "linkInfo", ",", "Type", "type", ")", "{", "link", ".", "addContent", "(", "type", ".", "typeName", "(", ")", ")", ";...
Build the link for the primitive. @param link the link. @param linkInfo the information on the link. @param type the type.
[ "Build", "the", "link", "for", "the", "primitive", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java#L64-L67
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ServletStartedListener.java
ServletStartedListener.setModuleSecurityMetaData
private void setModuleSecurityMetaData(Container moduleContainer, SecurityMetadata securityMetadataFromDD) { """ Sets the given security metadata on the deployed module's web module metadata for retrieval later. @param deployedModule the deployed module to get the web module metadata @param securityMetadataFro...
java
private void setModuleSecurityMetaData(Container moduleContainer, SecurityMetadata securityMetadataFromDD) { try { WebModuleMetaData wmmd = moduleContainer.adapt(WebModuleMetaData.class); wmmd.setSecurityMetaData(securityMetadataFromDD); } catch (UnableToAdaptException e) { ...
[ "private", "void", "setModuleSecurityMetaData", "(", "Container", "moduleContainer", ",", "SecurityMetadata", "securityMetadataFromDD", ")", "{", "try", "{", "WebModuleMetaData", "wmmd", "=", "moduleContainer", ".", "adapt", "(", "WebModuleMetaData", ".", "class", ")", ...
Sets the given security metadata on the deployed module's web module metadata for retrieval later. @param deployedModule the deployed module to get the web module metadata @param securityMetadataFromDD the security metadata processed from the deployment descriptor
[ "Sets", "the", "given", "security", "metadata", "on", "the", "deployed", "module", "s", "web", "module", "metadata", "for", "retrieval", "later", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ServletStartedListener.java#L460-L469
litsec/eidas-opensaml
opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/RequestedAttributeTemplates.java
RequestedAttributeTemplates.PERSON_IDENTIFIER
public static RequestedAttribute PERSON_IDENTIFIER(Boolean isRequired, boolean includeFriendlyName) { """ Creates a {@code RequestedAttribute} object for the PersonIdentifier attribute. @param isRequired flag to tell whether the attribute is required @param includeFriendlyName flag that tells whether the fri...
java
public static RequestedAttribute PERSON_IDENTIFIER(Boolean isRequired, boolean includeFriendlyName) { return create(AttributeConstants.EIDAS_PERSON_IDENTIFIER_ATTRIBUTE_NAME, includeFriendlyName ? AttributeConstants.EIDAS_PERSON_IDENTIFIER_ATTRIBUTE_FRIENDLY_NAME : null, Attribute.URI_REFERENCE, isRequi...
[ "public", "static", "RequestedAttribute", "PERSON_IDENTIFIER", "(", "Boolean", "isRequired", ",", "boolean", "includeFriendlyName", ")", "{", "return", "create", "(", "AttributeConstants", ".", "EIDAS_PERSON_IDENTIFIER_ATTRIBUTE_NAME", ",", "includeFriendlyName", "?", "Attr...
Creates a {@code RequestedAttribute} object for the PersonIdentifier attribute. @param isRequired flag to tell whether the attribute is required @param includeFriendlyName flag that tells whether the friendly name should be included @return a {@code RequestedAttribute} object representing the PersonIdentifier attribut...
[ "Creates", "a", "{", "@code", "RequestedAttribute", "}", "object", "for", "the", "PersonIdentifier", "attribute", "." ]
train
https://github.com/litsec/eidas-opensaml/blob/522ba6dba433a9524cb8a02464cc3b087b47a2b7/opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/RequestedAttributeTemplates.java#L41-L45
Netflix/zuul
zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsManager.java
ErrorStatsManager.putStats
public void putStats(String route, String cause) { """ updates count for the given route and error cause @param route @param cause """ if (route == null) route = "UNKNOWN_ROUTE"; route = route.replace("/", "_"); ConcurrentHashMap<String, ErrorStatsData> statsMap = routeMap.get(route);...
java
public void putStats(String route, String cause) { if (route == null) route = "UNKNOWN_ROUTE"; route = route.replace("/", "_"); ConcurrentHashMap<String, ErrorStatsData> statsMap = routeMap.get(route); if (statsMap == null) { statsMap = new ConcurrentHashMap<String, ErrorStat...
[ "public", "void", "putStats", "(", "String", "route", ",", "String", "cause", ")", "{", "if", "(", "route", "==", "null", ")", "route", "=", "\"UNKNOWN_ROUTE\"", ";", "route", "=", "route", ".", "replace", "(", "\"/\"", ",", "\"_\"", ")", ";", "Concurr...
updates count for the given route and error cause @param route @param cause
[ "updates", "count", "for", "the", "given", "route", "and", "error", "cause" ]
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/zuul/stats/ErrorStatsManager.java#L65-L84
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShipmentItemPersistenceImpl.java
CommerceShipmentItemPersistenceImpl.findAll
@Override public List<CommerceShipmentItem> findAll(int start, int end) { """ Returns a range of all the commerce shipment items. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the r...
java
@Override public List<CommerceShipmentItem> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceShipmentItem", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce shipment items. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <co...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "shipment", "items", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShipmentItemPersistenceImpl.java#L1671-L1674
mongodb/stitch-android-sdk
android/examples/todo/src/main/java/com/mongodb/stitch/android/examples/todo/TodoAdapter.java
TodoAdapter.onBindViewHolder
@Override public void onBindViewHolder(@NonNull final TodoItemViewHolder holder, final int position) { """ Replace the contents of a view (invoked by the layout manager) """ final TodoItem item = todoItems.get(position); holder.taskTextView.setText(item.getTask()); holder.taskCheckbox.setChecked...
java
@Override public void onBindViewHolder(@NonNull final TodoItemViewHolder holder, final int position) { final TodoItem item = todoItems.get(position); holder.taskTextView.setText(item.getTask()); holder.taskCheckbox.setChecked(item.getChecked()); }
[ "@", "Override", "public", "void", "onBindViewHolder", "(", "@", "NonNull", "final", "TodoItemViewHolder", "holder", ",", "final", "int", "position", ")", "{", "final", "TodoItem", "item", "=", "todoItems", ".", "get", "(", "position", ")", ";", "holder", "....
Replace the contents of a view (invoked by the layout manager)
[ "Replace", "the", "contents", "of", "a", "view", "(", "invoked", "by", "the", "layout", "manager", ")" ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/android/examples/todo/src/main/java/com/mongodb/stitch/android/examples/todo/TodoAdapter.java#L54-L60
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/evaluation/EvaluationTools.java
EvaluationTools.exportevaluationCalibrationToHtmlFile
public static void exportevaluationCalibrationToHtmlFile(EvaluationCalibration ec, File file) throws IOException { """ Given a {@link EvaluationCalibration} instance, export the charts to a stand-alone HTML file @param ec EvaluationCalibration instance to export HTML charts for @param file File to export to ...
java
public static void exportevaluationCalibrationToHtmlFile(EvaluationCalibration ec, File file) throws IOException { String asHtml = evaluationCalibrationToHtml(ec); FileUtils.writeStringToFile(file, asHtml); }
[ "public", "static", "void", "exportevaluationCalibrationToHtmlFile", "(", "EvaluationCalibration", "ec", ",", "File", "file", ")", "throws", "IOException", "{", "String", "asHtml", "=", "evaluationCalibrationToHtml", "(", "ec", ")", ";", "FileUtils", ".", "writeString...
Given a {@link EvaluationCalibration} instance, export the charts to a stand-alone HTML file @param ec EvaluationCalibration instance to export HTML charts for @param file File to export to
[ "Given", "a", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/evaluation/EvaluationTools.java#L202-L205
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java
HornSchunckPyramid.safe
protected static float safe( int x , int y , GrayF32 image ) { """ Ensures pixel values are inside the image. If output it is assigned to the nearest pixel inside the image """ if( x < 0 ) x = 0; else if( x >= image.width ) x = image.width-1; if( y < 0 ) y = 0; else if( y >= image.height ) y = image.h...
java
protected static float safe( int x , int y , GrayF32 image ) { if( x < 0 ) x = 0; else if( x >= image.width ) x = image.width-1; if( y < 0 ) y = 0; else if( y >= image.height ) y = image.height-1; return image.unsafe_get(x,y); }
[ "protected", "static", "float", "safe", "(", "int", "x", ",", "int", "y", ",", "GrayF32", "image", ")", "{", "if", "(", "x", "<", "0", ")", "x", "=", "0", ";", "else", "if", "(", "x", ">=", "image", ".", "width", ")", "x", "=", "image", ".", ...
Ensures pixel values are inside the image. If output it is assigned to the nearest pixel inside the image
[ "Ensures", "pixel", "values", "are", "inside", "the", "image", ".", "If", "output", "it", "is", "assigned", "to", "the", "nearest", "pixel", "inside", "the", "image" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/flow/HornSchunckPyramid.java#L360-L367
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/ConvertBitmap.java
ConvertBitmap.interleavedToBitmap
public static <T extends ImageInterleaved<T>> void interleavedToBitmap(T input, Bitmap output, byte[] storage) { """ Converts {@link ImageInterleaved} image into Bitmap. @see #declareStorage(android.graphics.Bitmap, byte[]) @param input Input Planar image. @param output Output Bitmap image. @param storage...
java
public static <T extends ImageInterleaved<T>> void interleavedToBitmap(T input, Bitmap output, byte[] storage) { if( output.getWidth() != input.getWidth() || output.getHeight() != input.getHeight() ) { throw new IllegalArgumentException("Image shapes are not the same"); } if( storage == null ) storage = d...
[ "public", "static", "<", "T", "extends", "ImageInterleaved", "<", "T", ">", ">", "void", "interleavedToBitmap", "(", "T", "input", ",", "Bitmap", "output", ",", "byte", "[", "]", "storage", ")", "{", "if", "(", "output", ".", "getWidth", "(", ")", "!="...
Converts {@link ImageInterleaved} image into Bitmap. @see #declareStorage(android.graphics.Bitmap, byte[]) @param input Input Planar image. @param output Output Bitmap image. @param storage Byte array used for internal storage. If null it will be declared internally.
[ "Converts", "{", "@link", "ImageInterleaved", "}", "image", "into", "Bitmap", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/ConvertBitmap.java#L338-L354
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java
ActiveConnectionMultimap.put
public void put(String identifier, ActiveConnectionRecord record) { """ Stores the given connection record in the list of active connections associated with the object having the given identifier. @param identifier The identifier of the object being connected to. @param record The record associated with t...
java
public void put(String identifier, ActiveConnectionRecord record) { synchronized (records) { // Get set of active connection records, creating if necessary Set<ActiveConnectionRecord> connections = records.get(identifier); if (connections == null) { connectio...
[ "public", "void", "put", "(", "String", "identifier", ",", "ActiveConnectionRecord", "record", ")", "{", "synchronized", "(", "records", ")", "{", "// Get set of active connection records, creating if necessary", "Set", "<", "ActiveConnectionRecord", ">", "connections", "...
Stores the given connection record in the list of active connections associated with the object having the given identifier. @param identifier The identifier of the object being connected to. @param record The record associated with the active connection.
[ "Stores", "the", "given", "connection", "record", "in", "the", "list", "of", "active", "connections", "associated", "with", "the", "object", "having", "the", "given", "identifier", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionMultimap.java#L53-L67
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.withCloseable
public static <T, U extends AutoCloseable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws Exception { """ Allows this AutoCloseable to be used within the closure, ensuring that it is closed once the closure has been executed and before this method returns. <p> As with t...
java
public static <T, U extends AutoCloseable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws Exception { Throwable thrown = null; try { return action.call(self); } catch (Throwable e) { thrown = e; throw e; } fina...
[ "public", "static", "<", "T", ",", "U", "extends", "AutoCloseable", ">", "T", "withCloseable", "(", "U", "self", ",", "@", "ClosureParams", "(", "value", "=", "FirstParam", ".", "class", ")", "Closure", "<", "T", ">", "action", ")", "throws", "Exception"...
Allows this AutoCloseable to be used within the closure, ensuring that it is closed once the closure has been executed and before this method returns. <p> As with the try-with-resources statement, if multiple exceptions are thrown the exception from the closure will be returned and the exception from closing will be ad...
[ "Allows", "this", "AutoCloseable", "to", "be", "used", "within", "the", "closure", "ensuring", "that", "it", "is", "closed", "once", "the", "closure", "has", "been", "executed", "and", "before", "this", "method", "returns", ".", "<p", ">", "As", "with", "t...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L1638-L1655
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/APIClient.java
APIClient.updateApiKey
public JSONObject updateApiKey(String key, List<String> acls) throws AlgoliaException { """ Update an api key @param acls the list of ACL for this key. Defined by an array of strings that can contains the following values: - search: allow to search (https and http) - addObject: allows to add/update an object...
java
public JSONObject updateApiKey(String key, List<String> acls) throws AlgoliaException { return this.updateApiKey(key, acls, RequestOptions.empty); }
[ "public", "JSONObject", "updateApiKey", "(", "String", "key", ",", "List", "<", "String", ">", "acls", ")", "throws", "AlgoliaException", "{", "return", "this", ".", "updateApiKey", "(", "key", ",", "acls", ",", "RequestOptions", ".", "empty", ")", ";", "}...
Update an api key @param acls the list of ACL for this key. Defined by an array of strings that can contains the following values: - search: allow to search (https and http) - addObject: allows to add/update an object in the index (https only) - deleteObject : allows to delete an existing object (https only) - deleteI...
[ "Update", "an", "api", "key" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/APIClient.java#L735-L737
jenkinsci/jenkins
core/src/main/java/hudson/model/RSS.java
RSS.forwardToRss
public static <E> void forwardToRss(String title, String url, Collection<? extends E> entries, FeedAdapter<E> adapter, StaplerRequest req, HttpServletResponse rsp) throws IOException, ServletException { """ Sends the RSS feed to the client. @param title Title of the feed. @param url URL of the model object t...
java
public static <E> void forwardToRss(String title, String url, Collection<? extends E> entries, FeedAdapter<E> adapter, StaplerRequest req, HttpServletResponse rsp) throws IOException, ServletException { req.setAttribute("adapter",adapter); req.setAttribute("title",title); req.setAttribute("url",...
[ "public", "static", "<", "E", ">", "void", "forwardToRss", "(", "String", "title", ",", "String", "url", ",", "Collection", "<", "?", "extends", "E", ">", "entries", ",", "FeedAdapter", "<", "E", ">", "adapter", ",", "StaplerRequest", "req", ",", "HttpSe...
Sends the RSS feed to the client. @param title Title of the feed. @param url URL of the model object that owns this feed. Relative to the context root. @param entries Entries to be listed in the RSS feed. @param adapter Controls how to render entries to RSS.
[ "Sends", "the", "RSS", "feed", "to", "the", "client", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/RSS.java#L75-L87
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.loadVar
public static InsnList loadVar(Variable variable) { """ Copies a local variable on to the stack. @param variable variable within the local variable table to load from @return instructions to load a local variable on to the stack @throws NullPointerException if any argument is {@code null} @throws IllegalArgume...
java
public static InsnList loadVar(Variable variable) { Validate.notNull(variable); InsnList ret = new InsnList(); switch (variable.getType().getSort()) { case Type.BOOLEAN: case Type.BYTE: case Type.CHAR: case Type.SHORT: case Type.INT: ...
[ "public", "static", "InsnList", "loadVar", "(", "Variable", "variable", ")", "{", "Validate", ".", "notNull", "(", "variable", ")", ";", "InsnList", "ret", "=", "new", "InsnList", "(", ")", ";", "switch", "(", "variable", ".", "getType", "(", ")", ".", ...
Copies a local variable on to the stack. @param variable variable within the local variable table to load from @return instructions to load a local variable on to the stack @throws NullPointerException if any argument is {@code null} @throws IllegalArgumentException if {@code variable} has been released
[ "Copies", "a", "local", "variable", "on", "to", "the", "stack", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L388-L421
kopihao/peasy-recyclerview
peasy-recyclerview/src/main/java/com/kopirealm/peasyrecyclerview/PeasyViewHolder.java
PeasyViewHolder.bindWith
<T> void bindWith(final PeasyRecyclerView<T> binder, final int viewType) { """ Will bind onClick and setOnLongClickListener here @param binder {@link PeasyViewHolder} itself @param viewType viewType ID """ this.itemView.setOnClickListener(new View.OnClickListener() { @Override ...
java
<T> void bindWith(final PeasyRecyclerView<T> binder, final int viewType) { this.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int position = getLayoutPosition(); position = (position <= binder.getLastItemI...
[ "<", "T", ">", "void", "bindWith", "(", "final", "PeasyRecyclerView", "<", "T", ">", "binder", ",", "final", "int", "viewType", ")", "{", "this", ".", "itemView", ".", "setOnClickListener", "(", "new", "View", ".", "OnClickListener", "(", ")", "{", "@", ...
Will bind onClick and setOnLongClickListener here @param binder {@link PeasyViewHolder} itself @param viewType viewType ID
[ "Will", "bind", "onClick", "and", "setOnLongClickListener", "here" ]
train
https://github.com/kopihao/peasy-recyclerview/blob/a26071849e5d5b5b1febe685f205558b49908f87/peasy-recyclerview/src/main/java/com/kopirealm/peasyrecyclerview/PeasyViewHolder.java#L55-L79
FilteredPush/event_date_qc
src/main/java/org/filteredpush/qc/date/DateUtils.java
DateUtils.extractDateFromVerbatim
public static Map<String,String> extractDateFromVerbatim(String verbatimEventDate) { """ Attempt to extract a date or date range in standard format from a provided verbatim date string. @param verbatimEventDate a string containing a verbatim event date. @return a map with result and resultState as keys @de...
java
public static Map<String,String> extractDateFromVerbatim(String verbatimEventDate) { return extractDateFromVerbatim(verbatimEventDate, DateUtils.YEAR_BEFORE_SUSPECT); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "extractDateFromVerbatim", "(", "String", "verbatimEventDate", ")", "{", "return", "extractDateFromVerbatim", "(", "verbatimEventDate", ",", "DateUtils", ".", "YEAR_BEFORE_SUSPECT", ")", ";", "}" ]
Attempt to extract a date or date range in standard format from a provided verbatim date string. @param verbatimEventDate a string containing a verbatim event date. @return a map with result and resultState as keys @deprecated @see #extractDateFromVerbatimER(String) replacement method.
[ "Attempt", "to", "extract", "a", "date", "or", "date", "range", "in", "standard", "format", "from", "a", "provided", "verbatim", "date", "string", "." ]
train
https://github.com/FilteredPush/event_date_qc/blob/52957a71b94b00b767e37924f976e2c7e8868ff3/src/main/java/org/filteredpush/qc/date/DateUtils.java#L243-L245
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/MetaTagHandlerImpl.java
MetaTagHandlerImpl.createMetaRuleset
protected MetaRuleset createMetaRuleset(Class type) { """ Extend this method in order to add your own rules. @param type @return """ ParameterCheck.notNull("type", type); return new MetaRulesetImpl(this.tag, type); }
java
protected MetaRuleset createMetaRuleset(Class type) { ParameterCheck.notNull("type", type); return new MetaRulesetImpl(this.tag, type); }
[ "protected", "MetaRuleset", "createMetaRuleset", "(", "Class", "type", ")", "{", "ParameterCheck", ".", "notNull", "(", "\"type\"", ",", "type", ")", ";", "return", "new", "MetaRulesetImpl", "(", "this", ".", "tag", ",", "type", ")", ";", "}" ]
Extend this method in order to add your own rules. @param type @return
[ "Extend", "this", "method", "in", "order", "to", "add", "your", "own", "rules", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/MetaTagHandlerImpl.java#L46-L51
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java
RendererUtils.toResourceUri
static public String toResourceUri(FacesContext facesContext, Object o) { """ Coerces an object into a resource URI, calling the view-handler. """ if (o == null) { return null; } String uri = o.toString(); // *** EL Coercion problem *** // If icon o...
java
static public String toResourceUri(FacesContext facesContext, Object o) { if (o == null) { return null; } String uri = o.toString(); // *** EL Coercion problem *** // If icon or image attribute was declared with #{resource[]} and that expression ...
[ "static", "public", "String", "toResourceUri", "(", "FacesContext", "facesContext", ",", "Object", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "String", "uri", "=", "o", ".", "toString", "(", ")", ";", "// *** EL ...
Coerces an object into a resource URI, calling the view-handler.
[ "Coerces", "an", "object", "into", "a", "resource", "URI", "calling", "the", "view", "-", "handler", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/RendererUtils.java#L1571-L1614
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java
MapBasedXPathVariableResolverQName.addAllFrom
@Nonnull public EChange addAllFrom (@Nonnull final MapBasedXPathVariableResolver aOther, final boolean bOverwrite) { """ Add all variables from the other variable resolver into this resolver. This methods creates a QName with an empty namespace URI. @param aOther The variable resolver to import the variable...
java
@Nonnull public EChange addAllFrom (@Nonnull final MapBasedXPathVariableResolver aOther, final boolean bOverwrite) { ValueEnforcer.notNull (aOther, "Other"); EChange eChange = EChange.UNCHANGED; for (final Map.Entry <String, ?> aEntry : aOther.getAllVariables ().entrySet ()) { // Local part on...
[ "@", "Nonnull", "public", "EChange", "addAllFrom", "(", "@", "Nonnull", "final", "MapBasedXPathVariableResolver", "aOther", ",", "final", "boolean", "bOverwrite", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aOther", ",", "\"Other\"", ")", ";", "EChange", "e...
Add all variables from the other variable resolver into this resolver. This methods creates a QName with an empty namespace URI. @param aOther The variable resolver to import the variable from. May not be <code>null</code>. @param bOverwrite if <code>true</code> existing variables will be overwritten with the new vari...
[ "Add", "all", "variables", "from", "the", "other", "variable", "resolver", "into", "this", "resolver", ".", "This", "methods", "creates", "a", "QName", "with", "an", "empty", "namespace", "URI", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java#L142-L159
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/spi/ServiceProviderFinderFactory.java
ServiceProviderFinderFactory._getServiceProviderFinderFromInitParam
private static ServiceProviderFinder _getServiceProviderFinderFromInitParam(ExternalContext context) { """ Gets a ServiceProviderFinder from the web.xml config param. @param context @return """ String initializerClassName = context.getInitParameter(SERVICE_PROVIDER_FINDER_PARAM); if (initiali...
java
private static ServiceProviderFinder _getServiceProviderFinderFromInitParam(ExternalContext context) { String initializerClassName = context.getInitParameter(SERVICE_PROVIDER_FINDER_PARAM); if (initializerClassName != null) { try { // get Class object ...
[ "private", "static", "ServiceProviderFinder", "_getServiceProviderFinderFromInitParam", "(", "ExternalContext", "context", ")", "{", "String", "initializerClassName", "=", "context", ".", "getInitParameter", "(", "SERVICE_PROVIDER_FINDER_PARAM", ")", ";", "if", "(", "initia...
Gets a ServiceProviderFinder from the web.xml config param. @param context @return
[ "Gets", "a", "ServiceProviderFinder", "from", "the", "web", ".", "xml", "config", "param", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/spi/ServiceProviderFinderFactory.java#L103-L127
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.hexDump
public static String hexDump(ByteBuf buffer) { """ Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a> of the specified buffer's readable bytes. """ return hexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
java
public static String hexDump(ByteBuf buffer) { return hexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
[ "public", "static", "String", "hexDump", "(", "ByteBuf", "buffer", ")", "{", "return", "hexDump", "(", "buffer", ",", "buffer", ".", "readerIndex", "(", ")", ",", "buffer", ".", "readableBytes", "(", ")", ")", ";", "}" ]
Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a> of the specified buffer's readable bytes.
[ "Returns", "a", "<a", "href", "=", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Hex_dump", ">", "hex", "dump<", "/", "a", ">", "of", "the", "specified", "buffer", "s", "readable", "bytes", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L113-L115
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.L3_L4
@Pure public static Point2d L3_L4(double x, double y) { """ This function convert France Lambert III coordinate to France Lambert IV coordinate. @param x is the coordinate in France Lambert III @param y is the coordinate in France Lambert III @return the France Lambert IV coordinate. """ final Point2d...
java
@Pure public static Point2d L3_L4(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_4_N, LAMBERT_4_C, LAMBERT_4_XS,...
[ "@", "Pure", "public", "static", "Point2d", "L3_L4", "(", "double", "x", ",", "double", "y", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "NTFLambert_NTFLambdaPhi", "(", "x", ",", "y", ",", "LAMBERT_3_N", ",", "LAMBERT_3_C", ",", "LAMBERT_3_XS", ",", ...
This function convert France Lambert III coordinate to France Lambert IV coordinate. @param x is the coordinate in France Lambert III @param y is the coordinate in France Lambert III @return the France Lambert IV coordinate.
[ "This", "function", "convert", "France", "Lambert", "III", "coordinate", "to", "France", "Lambert", "IV", "coordinate", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L628-L641
shevek/jarjar
jarjar-gradle/src/main/java/org/anarres/gradle/plugin/jarjar/JarjarTask.java
JarjarTask.from
public void from(@Nonnull String dependencyNotation, Closure configClosure) { """ Processes a dependency specified by name. @param dependencyNotation The dependency, in a notation described in {@link DependencyHandler}. @param configClosure The closure to use to configure the dependency. @see DependencyHandle...
java
public void from(@Nonnull String dependencyNotation, Closure configClosure) { from(getProject().getDependencies().create(dependencyNotation, configClosure)); }
[ "public", "void", "from", "(", "@", "Nonnull", "String", "dependencyNotation", ",", "Closure", "configClosure", ")", "{", "from", "(", "getProject", "(", ")", ".", "getDependencies", "(", ")", ".", "create", "(", "dependencyNotation", ",", "configClosure", ")"...
Processes a dependency specified by name. @param dependencyNotation The dependency, in a notation described in {@link DependencyHandler}. @param configClosure The closure to use to configure the dependency. @see DependencyHandler
[ "Processes", "a", "dependency", "specified", "by", "name", "." ]
train
https://github.com/shevek/jarjar/blob/59b9f04970d078184a0d1ac4eeb548215b8e2bc2/jarjar-gradle/src/main/java/org/anarres/gradle/plugin/jarjar/JarjarTask.java#L188-L190
google/closure-templates
java/src/com/google/template/soy/jbcsrc/internal/ClassData.java
ClassData.checkClass
public void checkClass() { """ Runs the {@link CheckClassAdapter} on this class in basic analysis mode. <p>Basic anaylsis mode can flag verification errors that don't depend on knowing complete type information for the classes and methods being called. This is useful for flagging simple generation mistakes (e...
java
public void checkClass() { ClassNode cv = new ClassNode(); new ClassReader(data).accept(new CheckClassAdapter(cv, true /* check data flow */), 0); // double check our fields while we are here. checkState(type.internalName().equals(cv.name)); checkState(numberOfFields == cv.fields.size()); }
[ "public", "void", "checkClass", "(", ")", "{", "ClassNode", "cv", "=", "new", "ClassNode", "(", ")", ";", "new", "ClassReader", "(", "data", ")", ".", "accept", "(", "new", "CheckClassAdapter", "(", "cv", ",", "true", "/* check data flow */", ")", ",", "...
Runs the {@link CheckClassAdapter} on this class in basic analysis mode. <p>Basic anaylsis mode can flag verification errors that don't depend on knowing complete type information for the classes and methods being called. This is useful for flagging simple generation mistakes (e.g. stack underflows, method return type...
[ "Runs", "the", "{", "@link", "CheckClassAdapter", "}", "on", "this", "class", "in", "basic", "analysis", "mode", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/internal/ClassData.java#L87-L93
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/HeapCache.java
HeapCache.entryInRefreshProbationAccessed
private boolean entryInRefreshProbationAccessed(final Entry<K, V> e, final long now) { """ Entry was refreshed before, reset timer and make entry visible again. """ long nrt = e.getRefreshProbationNextRefreshTime(); if (nrt > now) { reviveRefreshedEntry(e, nrt); return true; } retu...
java
private boolean entryInRefreshProbationAccessed(final Entry<K, V> e, final long now) { long nrt = e.getRefreshProbationNextRefreshTime(); if (nrt > now) { reviveRefreshedEntry(e, nrt); return true; } return false; }
[ "private", "boolean", "entryInRefreshProbationAccessed", "(", "final", "Entry", "<", "K", ",", "V", ">", "e", ",", "final", "long", "now", ")", "{", "long", "nrt", "=", "e", ".", "getRefreshProbationNextRefreshTime", "(", ")", ";", "if", "(", "nrt", ">", ...
Entry was refreshed before, reset timer and make entry visible again.
[ "Entry", "was", "refreshed", "before", "reset", "timer", "and", "make", "entry", "visible", "again", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/HeapCache.java#L1393-L1400
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java
Director.getServerPackageFeatureLicense
public Set<InstallLicense> getServerPackageFeatureLicense(File archive, boolean offlineOnly, Locale locale) throws InstallException { """ Gets the licenses for the specified archive file @param archive the archive file @param offlineOnly if features should be only retrieved locally @param locale Locale for th...
java
public Set<InstallLicense> getServerPackageFeatureLicense(File archive, boolean offlineOnly, Locale locale) throws InstallException { String aName = archive.getAbsolutePath().toLowerCase(); ServerPackageAsset spa = null; if (ServerPackageZipAsset.validType(aName)) { spa = new ServerP...
[ "public", "Set", "<", "InstallLicense", ">", "getServerPackageFeatureLicense", "(", "File", "archive", ",", "boolean", "offlineOnly", ",", "Locale", "locale", ")", "throws", "InstallException", "{", "String", "aName", "=", "archive", ".", "getAbsolutePath", "(", "...
Gets the licenses for the specified archive file @param archive the archive file @param offlineOnly if features should be only retrieved locally @param locale Locale for the licenses @return A set of InstallLicesese for the features in the archive file @throws InstallException
[ "Gets", "the", "licenses", "for", "the", "specified", "archive", "file" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L719-L731
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyHTTPUtils.java
MyHTTPUtils.getContentPost
public static String getContentPost(String stringUrl, Map<String, String> parameters, String input, String charset) throws IOException { """ Post content / get response @param stringUrl URL to use @param parameters HTTP headers @param input Input data (payload) @param charset Charset in the input ...
java
public static String getContentPost(String stringUrl, Map<String, String> parameters, String input, String charset) throws IOException { return getContentPost(stringUrl, parameters, input, charset, false); }
[ "public", "static", "String", "getContentPost", "(", "String", "stringUrl", ",", "Map", "<", "String", ",", "String", ">", "parameters", ",", "String", "input", ",", "String", "charset", ")", "throws", "IOException", "{", "return", "getContentPost", "(", "stri...
Post content / get response @param stringUrl URL to use @param parameters HTTP headers @param input Input data (payload) @param charset Charset in the input @return response HTTP response @throws IOException I/O error happened
[ "Post", "content", "/", "get", "response" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyHTTPUtils.java#L136-L139
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/message/Http2PushPromise.java
Http2PushPromise.setHeader
public void setHeader(String name, String value) { """ Sets a header value for a given header name. This replaces the value of an already existing header. @param name name of the header @param value value of the header """ httpRequest.headers().set(name, value); }
java
public void setHeader(String name, String value) { httpRequest.headers().set(name, value); }
[ "public", "void", "setHeader", "(", "String", "name", ",", "String", "value", ")", "{", "httpRequest", ".", "headers", "(", ")", ".", "set", "(", "name", ",", "value", ")", ";", "}" ]
Sets a header value for a given header name. This replaces the value of an already existing header. @param name name of the header @param value value of the header
[ "Sets", "a", "header", "value", "for", "a", "given", "header", "name", ".", "This", "replaces", "the", "value", "of", "an", "already", "existing", "header", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/message/Http2PushPromise.java#L140-L142
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.matchAndExtractAll
public static final Function<String,List<String>> matchAndExtractAll(final String regex, final int... groups) { """ <p> Matches the entire target String against the specified regular expression and extracts the specified groups from it (as specified by <tt>java.util.regex.Matcher</tt>. </p> <p> Regular expres...
java
public static final Function<String,List<String>> matchAndExtractAll(final String regex, final int... groups) { return new MatchAndExtractAll(regex, VarArgsUtil.asRequiredIntegerList(groups)); }
[ "public", "static", "final", "Function", "<", "String", ",", "List", "<", "String", ">", ">", "matchAndExtractAll", "(", "final", "String", "regex", ",", "final", "int", "...", "groups", ")", "{", "return", "new", "MatchAndExtractAll", "(", "regex", ",", "...
<p> Matches the entire target String against the specified regular expression and extracts the specified groups from it (as specified by <tt>java.util.regex.Matcher</tt>. </p> <p> Regular expressions must conform to the <tt>java.util.regex.Pattern</tt> format. </p> @param regex the regular expression to match against ...
[ "<p", ">", "Matches", "the", "entire", "target", "String", "against", "the", "specified", "regular", "expression", "and", "extracts", "the", "specified", "groups", "from", "it", "(", "as", "specified", "by", "<tt", ">", "java", ".", "util", ".", "regex", "...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L2003-L2005
pravega/pravega
controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java
StreamMetadataTasks.manualScale
public CompletableFuture<ScaleResponse> manualScale(String scope, String stream, List<Long> segmentsToSeal, List<Map.Entry<Double, Double>> newRanges, long scaleTimestamp, OperationContext context) { """ ...
java
public CompletableFuture<ScaleResponse> manualScale(String scope, String stream, List<Long> segmentsToSeal, List<Map.Entry<Double, Double>> newRanges, long scaleTimestamp, OperationContext context) { ...
[ "public", "CompletableFuture", "<", "ScaleResponse", ">", "manualScale", "(", "String", "scope", ",", "String", "stream", ",", "List", "<", "Long", ">", "segmentsToSeal", ",", "List", "<", "Map", ".", "Entry", "<", "Double", ",", "Double", ">", ">", "newRa...
Helper method to perform scale operation against an scale request. This method posts a request in the request stream and then starts the scale operation while tracking it's progress. Eventually, after scale completion, it sends a response to the caller. @param scope scope. @param stream stream name. @...
[ "Helper", "method", "to", "perform", "scale", "operation", "against", "an", "scale", "request", ".", "This", "method", "posts", "a", "request", "in", "the", "request", "stream", "and", "then", "starts", "the", "scale", "operation", "while", "tracking", "it", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java#L532-L564
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/DateContext.java
DateContext.changeDate
public Date changeDate(Date date, int delta) { """ Roll a date forward or back a given number of days. Only the days are modified in the associated date. If the delta is positive, then the date is rolled forward the given number of days. If the delta is negative, then the date is rolled backward the given numbe...
java
public Date changeDate(Date date, int delta) { return adjustDate(date, Calendar.DATE, delta); }
[ "public", "Date", "changeDate", "(", "Date", "date", ",", "int", "delta", ")", "{", "return", "adjustDate", "(", "date", ",", "Calendar", ".", "DATE", ",", "delta", ")", ";", "}" ]
Roll a date forward or back a given number of days. Only the days are modified in the associated date. If the delta is positive, then the date is rolled forward the given number of days. If the delta is negative, then the date is rolled backward the given number of days. @param date The initial date from which to star...
[ "Roll", "a", "date", "forward", "or", "back", "a", "given", "number", "of", "days", ".", "Only", "the", "days", "are", "modified", "in", "the", "associated", "date", ".", "If", "the", "delta", "is", "positive", "then", "the", "date", "is", "rolled", "f...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/DateContext.java#L411-L413
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/InMemoryRegistry.java
InMemoryRegistry.getApiIndex
private String getApiIndex(String orgId, String apiId, String version) { """ Generates an in-memory key for an api, used to index the client for later quick retrieval. @param orgId @param apiId @param version @return a api key """ return "API::" + orgId + "|" + apiId + "|" + version; //$NON-NLS-1$...
java
private String getApiIndex(String orgId, String apiId, String version) { return "API::" + orgId + "|" + apiId + "|" + version; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ }
[ "private", "String", "getApiIndex", "(", "String", "orgId", ",", "String", "apiId", ",", "String", "version", ")", "{", "return", "\"API::\"", "+", "orgId", "+", "\"|\"", "+", "apiId", "+", "\"|\"", "+", "version", ";", "//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$...
Generates an in-memory key for an api, used to index the client for later quick retrieval. @param orgId @param apiId @param version @return a api key
[ "Generates", "an", "in", "-", "memory", "key", "for", "an", "api", "used", "to", "index", "the", "client", "for", "later", "quick", "retrieval", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/InMemoryRegistry.java#L339-L341
bingoohuang/excel2javabeans
src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java
BeansToExcelOnTemplate.writeRows
@SuppressWarnings("unchecked") private void writeRows(Cell templateCell, List<Object> items) { """ 根据JavaBean列表,向Excel中写入多行。 @param templateCell 模板单元格。 @param items 写入JavaBean列表。 """ val tmplRow = templateCell.getRow(); val fromRow = tmplRow.getRowNum(); val tmplCol = te...
java
@SuppressWarnings("unchecked") private void writeRows(Cell templateCell, List<Object> items) { val tmplRow = templateCell.getRow(); val fromRow = tmplRow.getRowNum(); val tmplCol = templateCell.getColumnIndex(); for (int i = 0, ii = items.size(); i < ii; ++i) { val item ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "writeRows", "(", "Cell", "templateCell", ",", "List", "<", "Object", ">", "items", ")", "{", "val", "tmplRow", "=", "templateCell", ".", "getRow", "(", ")", ";", "val", "fromRow", "=",...
根据JavaBean列表,向Excel中写入多行。 @param templateCell 模板单元格。 @param items 写入JavaBean列表。
[ "根据JavaBean列表,向Excel中写入多行。" ]
train
https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java#L221-L256
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java
DiscordApiImpl.removeObjectListeners
public void removeObjectListeners(Class<?> objectClass, long objectId) { """ Remove all listeners attached to an object. @param objectClass The class of the object. @param objectId The id of the object. """ if (objectClass == null) { return; } synchronized (objectListene...
java
public void removeObjectListeners(Class<?> objectClass, long objectId) { if (objectClass == null) { return; } synchronized (objectListeners) { Map<Long, Map<Class<? extends ObjectAttachableListener>, Map<ObjectAttachableListener, ListenerManagerImpl<? ...
[ "public", "void", "removeObjectListeners", "(", "Class", "<", "?", ">", "objectClass", ",", "long", "objectId", ")", "{", "if", "(", "objectClass", "==", "null", ")", "{", "return", ";", "}", "synchronized", "(", "objectListeners", ")", "{", "Map", "<", ...
Remove all listeners attached to an object. @param objectClass The class of the object. @param objectId The id of the object.
[ "Remove", "all", "listeners", "attached", "to", "an", "object", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java#L975-L999
elki-project/elki
elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/vafile/VALPNormDistance.java
VALPNormDistance.getPartialMaxDist
public double getPartialMaxDist(int dimension, int vp) { """ Get the maximum distance contribution of a single dimension. @param dimension Dimension @param vp Vector position @return Increment """ final int qp = queryApprox.getApproximation(dimension); if(vp < qp) { return lookup[dimension][...
java
public double getPartialMaxDist(int dimension, int vp) { final int qp = queryApprox.getApproximation(dimension); if(vp < qp) { return lookup[dimension][vp]; } else if(vp > qp) { return lookup[dimension][vp + 1]; } else { return Math.max(lookup[dimension][vp], lookup[dimension][...
[ "public", "double", "getPartialMaxDist", "(", "int", "dimension", ",", "int", "vp", ")", "{", "final", "int", "qp", "=", "queryApprox", ".", "getApproximation", "(", "dimension", ")", ";", "if", "(", "vp", "<", "qp", ")", "{", "return", "lookup", "[", ...
Get the maximum distance contribution of a single dimension. @param dimension Dimension @param vp Vector position @return Increment
[ "Get", "the", "maximum", "distance", "contribution", "of", "a", "single", "dimension", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-various/src/main/java/de/lmu/ifi/dbs/elki/index/vafile/VALPNormDistance.java#L106-L117
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java
CommonUtils.listEquals
public static <T> boolean listEquals(List<T> left, List<T> right) { """ 比较list元素是否一致,忽略顺序 @param left 左边List @param right 右边List @param <T> 元素类型 @return 是否一致 """ if (left == null) { return right == null; } else { if (right == null) { return false...
java
public static <T> boolean listEquals(List<T> left, List<T> right) { if (left == null) { return right == null; } else { if (right == null) { return false; } if (left.size() != right.size()) { return false; } ...
[ "public", "static", "<", "T", ">", "boolean", "listEquals", "(", "List", "<", "T", ">", "left", ",", "List", "<", "T", ">", "right", ")", "{", "if", "(", "left", "==", "null", ")", "{", "return", "right", "==", "null", ";", "}", "else", "{", "i...
比较list元素是否一致,忽略顺序 @param left 左边List @param right 右边List @param <T> 元素类型 @return 是否一致
[ "比较list元素是否一致,忽略顺序" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/CommonUtils.java#L236-L254
craftercms/commons
utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java
PGPUtils.createKeyPair
public static void createKeyPair(int length, String identity, char[] password, OutputStream privateKeyStream, OutputStream publicKeyStream) throws Exception { """ Creates a private/public PGP key pair. @param length length in bytes for ...
java
public static void createKeyPair(int length, String identity, char[] password, OutputStream privateKeyStream, OutputStream publicKeyStream) throws Exception { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(ALGORITHM,...
[ "public", "static", "void", "createKeyPair", "(", "int", "length", ",", "String", "identity", ",", "char", "[", "]", "password", ",", "OutputStream", "privateKeyStream", ",", "OutputStream", "publicKeyStream", ")", "throws", "Exception", "{", "KeyPairGenerator", "...
Creates a private/public PGP key pair. @param length length in bytes for the keys @param identity name used for the keys @param password passphrase used for the private key @param privateKeyStream stream to receive the encoded private key @param publicKeyStream stream to receive the encoded public key @throws NoSuchPro...
[ "Creates", "a", "private", "/", "public", "PGP", "key", "pair", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java#L96-L125
googlemaps/google-maps-services-java
src/main/java/com/google/maps/PlacesApi.java
PlacesApi.textSearchNextPage
public static TextSearchRequest textSearchNextPage(GeoApiContext context, String nextPageToken) { """ Retrieves the next page of Text Search results. The nextPageToken, returned in a PlacesSearchResponse when there are more pages of results, encodes all of the original Text Search Request parameters, which are t...
java
public static TextSearchRequest textSearchNextPage(GeoApiContext context, String nextPageToken) { TextSearchRequest request = new TextSearchRequest(context); request.pageToken(nextPageToken); return request; }
[ "public", "static", "TextSearchRequest", "textSearchNextPage", "(", "GeoApiContext", "context", ",", "String", "nextPageToken", ")", "{", "TextSearchRequest", "request", "=", "new", "TextSearchRequest", "(", "context", ")", ";", "request", ".", "pageToken", "(", "ne...
Retrieves the next page of Text Search results. The nextPageToken, returned in a PlacesSearchResponse when there are more pages of results, encodes all of the original Text Search Request parameters, which are thus not required on this call. @param context The context on which to make Geo API requests. @param nextPage...
[ "Retrieves", "the", "next", "page", "of", "Text", "Search", "results", ".", "The", "nextPageToken", "returned", "in", "a", "PlacesSearchResponse", "when", "there", "are", "more", "pages", "of", "results", "encodes", "all", "of", "the", "original", "Text", "Sea...
train
https://github.com/googlemaps/google-maps-services-java/blob/23d20d1930f80e310d856d2da51d72ee0db4476b/src/main/java/com/google/maps/PlacesApi.java#L85-L89
amilcar-sr/JustifiedTextView
library/src/main/java/com/codesgood/views/JustifiedTextView.java
JustifiedTextView.getJustifiedText
private String getJustifiedText(String text) { """ Retrieves a String with appropriate spaces to justify the text in the TextView. @param text Text to be justified @return Justified text """ String[] words = text.split(NORMAL_SPACE); for (String word : words) { boolean contains...
java
private String getJustifiedText(String text) { String[] words = text.split(NORMAL_SPACE); for (String word : words) { boolean containsNewLine = (word.contains("\n") || word.contains("\r")); if (fitsInSentence(word, currentSentence, true)) { addWord(word, contain...
[ "private", "String", "getJustifiedText", "(", "String", "text", ")", "{", "String", "[", "]", "words", "=", "text", ".", "split", "(", "NORMAL_SPACE", ")", ";", "for", "(", "String", "word", ":", "words", ")", "{", "boolean", "containsNewLine", "=", "(",...
Retrieves a String with appropriate spaces to justify the text in the TextView. @param text Text to be justified @return Justified text
[ "Retrieves", "a", "String", "with", "appropriate", "spaces", "to", "justify", "the", "text", "in", "the", "TextView", "." ]
train
https://github.com/amilcar-sr/JustifiedTextView/blob/8fd91b4cfb225f973096519eae8295c3d7e8d49f/library/src/main/java/com/codesgood/views/JustifiedTextView.java#L106-L128
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeSkip
private Status executeSkip(Stmt.Skip stmt, CallStack frame, EnclosingScope scope) { """ Execute a skip statement at a given point in the function or method body @param stmt --- The skip statement to execute @param frame --- The current stack frame @return """ // skip ! return Status.NEXT; }
java
private Status executeSkip(Stmt.Skip stmt, CallStack frame, EnclosingScope scope) { // skip ! return Status.NEXT; }
[ "private", "Status", "executeSkip", "(", "Stmt", ".", "Skip", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "// skip !", "return", "Status", ".", "NEXT", ";", "}" ]
Execute a skip statement at a given point in the function or method body @param stmt --- The skip statement to execute @param frame --- The current stack frame @return
[ "Execute", "a", "skip", "statement", "at", "a", "given", "point", "in", "the", "function", "or", "method", "body" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L469-L472
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/FastMathCalc.java
FastMathCalc.splitMult
private static void splitMult(double a[], double b[], double ans[]) { """ Multiply two numbers in split form. @param a first term of multiplication @param b second term of multiplication @param ans placeholder where to put the result """ ans[0] = a[0] * b[0]; ans[1] = a[0] * b[1] + a[1] * b[...
java
private static void splitMult(double a[], double b[], double ans[]) { ans[0] = a[0] * b[0]; ans[1] = a[0] * b[1] + a[1] * b[0] + a[1] * b[1]; /* Resplit */ resplit(ans); }
[ "private", "static", "void", "splitMult", "(", "double", "a", "[", "]", ",", "double", "b", "[", "]", ",", "double", "ans", "[", "]", ")", "{", "ans", "[", "0", "]", "=", "a", "[", "0", "]", "*", "b", "[", "0", "]", ";", "ans", "[", "1", ...
Multiply two numbers in split form. @param a first term of multiplication @param b second term of multiplication @param ans placeholder where to put the result
[ "Multiply", "two", "numbers", "in", "split", "form", "." ]
train
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMathCalc.java#L363-L369
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/BasicRecordStoreLoader.java
BasicRecordStoreLoader.loadValues
@Override public Future<?> loadValues(List<Data> keys, boolean replaceExistingValues) { """ {@inheritDoc} <p> Offloads the value loading task to the {@link ExecutionService#MAP_LOADER_EXECUTOR} executor. """ Callable task = new GivenKeysLoaderTask(keys, replaceExistingValues); return exe...
java
@Override public Future<?> loadValues(List<Data> keys, boolean replaceExistingValues) { Callable task = new GivenKeysLoaderTask(keys, replaceExistingValues); return executeTask(MAP_LOADER_EXECUTOR, task); }
[ "@", "Override", "public", "Future", "<", "?", ">", "loadValues", "(", "List", "<", "Data", ">", "keys", ",", "boolean", "replaceExistingValues", ")", "{", "Callable", "task", "=", "new", "GivenKeysLoaderTask", "(", "keys", ",", "replaceExistingValues", ")", ...
{@inheritDoc} <p> Offloads the value loading task to the {@link ExecutionService#MAP_LOADER_EXECUTOR} executor.
[ "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/BasicRecordStoreLoader.java#L73-L77
meltmedia/cadmium
deployer/src/main/java/com/meltmedia/cadmium/deployer/jboss7/JBossAdminApi.java
JBossAdminApi.uploadWar
public String uploadWar(String warName, File warFile) throws Exception { """ /* curl -v --digest -u "admin" -F "file=@git/cadmium/test.cadmium.localhost.war;filename=test.cadmium.localhost.war" http://localhost:9990/management/add-content result: {"outcome" : "success", "result" : { "BYTES_VALUE" : "SbejgggTNOuH...
java
public String uploadWar(String warName, File warFile) throws Exception { HttpPost post = new HttpPost("http://"+host+":"+port+"/management/add-content"); try { MultipartEntity entity = new MultipartEntity(); entity.addPart("filename", new StringBody(warName)); entity.addPart("attachment", ne...
[ "public", "String", "uploadWar", "(", "String", "warName", ",", "File", "warFile", ")", "throws", "Exception", "{", "HttpPost", "post", "=", "new", "HttpPost", "(", "\"http://\"", "+", "host", "+", "\":\"", "+", "port", "+", "\"/management/add-content\"", ")",...
/* curl -v --digest -u "admin" -F "file=@git/cadmium/test.cadmium.localhost.war;filename=test.cadmium.localhost.war" http://localhost:9990/management/add-content result: {"outcome" : "success", "result" : { "BYTES_VALUE" : "SbejgggTNOuHdke5k6EeKdB8Zfo=" }}
[ "/", "*", "curl", "-", "v", "--", "digest", "-", "u", "admin", "-", "F", "file", "=" ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/deployer/src/main/java/com/meltmedia/cadmium/deployer/jboss7/JBossAdminApi.java#L175-L208
aws/aws-sdk-java
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingCriteria.java
FindingCriteria.withCriterion
public FindingCriteria withCriterion(java.util.Map<String, Condition> criterion) { """ Represents a map of finding properties that match specified conditions and values when querying findings. @param criterion Represents a map of finding properties that match specified conditions and values when querying findi...
java
public FindingCriteria withCriterion(java.util.Map<String, Condition> criterion) { setCriterion(criterion); return this; }
[ "public", "FindingCriteria", "withCriterion", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Condition", ">", "criterion", ")", "{", "setCriterion", "(", "criterion", ")", ";", "return", "this", ";", "}" ]
Represents a map of finding properties that match specified conditions and values when querying findings. @param criterion Represents a map of finding properties that match specified conditions and values when querying findings. @return Returns a reference to this object so that method calls can be chained together.
[ "Represents", "a", "map", "of", "finding", "properties", "that", "match", "specified", "conditions", "and", "values", "when", "querying", "findings", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/FindingCriteria.java#L61-L64
yannrichet/rsession
src/main/java/org/math/R/StartRserve.java
StartRserve.checkLocalRserve
public static boolean checkLocalRserve() { """ checks whether Rserve is running and if that's not the case it attempts to start it using the defaults for the platform where it is run on. This method is meant to be set-and-forget and cover most default setups. For special setups you may get more control over R w...
java
public static boolean checkLocalRserve() { if (isRserveRunning()) { return true; } if (RserveDaemon.isWindows()) { Log.Out.println("Windows: query registry to find where R is installed ..."); String installPath = null; try { Process...
[ "public", "static", "boolean", "checkLocalRserve", "(", ")", "{", "if", "(", "isRserveRunning", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "RserveDaemon", ".", "isWindows", "(", ")", ")", "{", "Log", ".", "Out", ".", "println", "(", "...
checks whether Rserve is running and if that's not the case it attempts to start it using the defaults for the platform where it is run on. This method is meant to be set-and-forget and cover most default setups. For special setups you may get more control over R with <code>launchRserve</code> instead. @return is ok ?
[ "checks", "whether", "Rserve", "is", "running", "and", "if", "that", "s", "not", "the", "case", "it", "attempts", "to", "start", "it", "using", "the", "defaults", "for", "the", "platform", "where", "it", "is", "run", "on", ".", "This", "method", "is", ...
train
https://github.com/yannrichet/rsession/blob/acaa47f4da1644e0d067634130c0e88e38cb9035/src/main/java/org/math/R/StartRserve.java#L461-L504
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/concurrent/CopyJob.java
CopyJob.copy
private void copy( final InputStream is, final OutputStream os ) throws IOException { """ Copies all data from <b>is</b> to <b>os</b> until job is killed @param is input stream to read data from @param os output stream to write data to @throws IOException if I/O error occurs """ final byte[] buffer = ...
java
private void copy( final InputStream is, final OutputStream os ) throws IOException { final byte[] buffer = new byte[ 512 ]; int countOfBytes = -1; while ( !this.terminated ) { while ( is.available() <= 0 ) { synchronized( this ) { try...
[ "private", "void", "copy", "(", "final", "InputStream", "is", ",", "final", "OutputStream", "os", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "512", "]", ";", "int", "countOfBytes", "=", "-", "1", ";...
Copies all data from <b>is</b> to <b>os</b> until job is killed @param is input stream to read data from @param os output stream to write data to @throws IOException if I/O error occurs
[ "Copies", "all", "data", "from", "<b", ">", "is<", "/", "b", ">", "to", "<b", ">", "os<", "/", "b", ">", "until", "job", "is", "killed" ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/concurrent/CopyJob.java#L143-L169
GerdHolz/TOVAL
src/de/invation/code/toval/misc/ListUtils.java
ListUtils.divideObjectListPos
public static List<List<Object>> divideObjectListPos(List<Object> list, Integer... positions) { """ Divides the given object-list using the boundaries in <code>cuts</code>. <br> Cuts are interpreted in an inclusive way, which means that a single cut at position i divides the given list in 0...i-1 + i...n<br> T...
java
public static List<List<Object>> divideObjectListPos(List<Object> list, Integer... positions) { return divideListPos(list, positions); }
[ "public", "static", "List", "<", "List", "<", "Object", ">", ">", "divideObjectListPos", "(", "List", "<", "Object", ">", "list", ",", "Integer", "...", "positions", ")", "{", "return", "divideListPos", "(", "list", ",", "positions", ")", ";", "}" ]
Divides the given object-list using the boundaries in <code>cuts</code>. <br> Cuts are interpreted in an inclusive way, which means that a single cut at position i divides the given list in 0...i-1 + i...n<br> This method deals with both cut positions including and excluding start and end-indexes<br> @param list List ...
[ "Divides", "the", "given", "object", "-", "list", "using", "the", "boundaries", "in", "<code", ">", "cuts<", "/", "code", ">", ".", "<br", ">", "Cuts", "are", "interpreted", "in", "an", "inclusive", "way", "which", "means", "that", "a", "single", "cut", ...
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/ListUtils.java#L302-L304
OpenLiberty/open-liberty
dev/com.ibm.json4j/src/com/ibm/json/java/internal/Serializer.java
Serializer.rightAlignedZero
private String rightAlignedZero(String s, int len) { """ Method to generate a string with a particular width. Alignment is done using zeroes if it does not meet the width requirements. @param s The string to write @param len The minimum length it should be, and to align with zeroes if length is smaller. @retur...
java
private String rightAlignedZero(String s, int len) { if (len == s.length()) return s; StringBuffer sb = new StringBuffer(s); while (sb.length() < len) { sb.insert(0, '0'); } return sb.toString(); }
[ "private", "String", "rightAlignedZero", "(", "String", "s", ",", "int", "len", ")", "{", "if", "(", "len", "==", "s", ".", "length", "(", ")", ")", "return", "s", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "s", ")", ";", "while", ...
Method to generate a string with a particular width. Alignment is done using zeroes if it does not meet the width requirements. @param s The string to write @param len The minimum length it should be, and to align with zeroes if length is smaller. @return A string properly aligned/correct width.
[ "Method", "to", "generate", "a", "string", "with", "a", "particular", "width", ".", "Alignment", "is", "done", "using", "zeroes", "if", "it", "does", "not", "meet", "the", "width", "requirements", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.json4j/src/com/ibm/json/java/internal/Serializer.java#L129-L141
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.installationTemplate_templateName_partitionScheme_schemeName_GET
public OvhTemplatePartitioningSchemes installationTemplate_templateName_partitionScheme_schemeName_GET(String templateName, String schemeName) throws IOException { """ Get this object properties REST: GET /me/installationTemplate/{templateName}/partitionScheme/{schemeName} @param templateName [required] This t...
java
public OvhTemplatePartitioningSchemes installationTemplate_templateName_partitionScheme_schemeName_GET(String templateName, String schemeName) throws IOException { String qPath = "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}"; StringBuilder sb = path(qPath, templateName, schemeName); Strin...
[ "public", "OvhTemplatePartitioningSchemes", "installationTemplate_templateName_partitionScheme_schemeName_GET", "(", "String", "templateName", ",", "String", "schemeName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/installationTemplate/{templateName}/partitionS...
Get this object properties REST: GET /me/installationTemplate/{templateName}/partitionScheme/{schemeName} @param templateName [required] This template name @param schemeName [required] name of this partitioning scheme
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3587-L3592
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/InstrumentedFileSystemUtils.java
InstrumentedFileSystemUtils.replaceScheme
public static FileStatus replaceScheme(FileStatus st, String replace, String replacement) { """ Replace the scheme of the input {@link FileStatus} if it matches the string to replace. """ if (replace != null && replace.equals(replacement)) { return st; } try { return new FileStatus(st.g...
java
public static FileStatus replaceScheme(FileStatus st, String replace, String replacement) { if (replace != null && replace.equals(replacement)) { return st; } try { return new FileStatus(st.getLen(), st.isDir(), st.getReplication(), st.getBlockSize(), st.getModificationTime(), st.getAc...
[ "public", "static", "FileStatus", "replaceScheme", "(", "FileStatus", "st", ",", "String", "replace", ",", "String", "replacement", ")", "{", "if", "(", "replace", "!=", "null", "&&", "replace", ".", "equals", "(", "replacement", ")", ")", "{", "return", "...
Replace the scheme of the input {@link FileStatus} if it matches the string to replace.
[ "Replace", "the", "scheme", "of", "the", "input", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/InstrumentedFileSystemUtils.java#L89-L100
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getImploded
@Nonnull public static <ELEMENTTYPE> String getImploded (@Nullable final ELEMENTTYPE [] aElements, @Nonnegative final int nOfs, @Nonnegative final int nLen) { """ Get a concatenated String from all elements of the...
java
@Nonnull public static <ELEMENTTYPE> String getImploded (@Nullable final ELEMENTTYPE [] aElements, @Nonnegative final int nOfs, @Nonnegative final int nLen) { return getImplodedMapped (aElements, nOfs, nLen, Stri...
[ "@", "Nonnull", "public", "static", "<", "ELEMENTTYPE", ">", "String", "getImploded", "(", "@", "Nullable", "final", "ELEMENTTYPE", "[", "]", "aElements", ",", "@", "Nonnegative", "final", "int", "nOfs", ",", "@", "Nonnegative", "final", "int", "nLen", ")", ...
Get a concatenated String from all elements of the passed array, without a separator. @param aElements The container to convert. May be <code>null</code> or empty. @param nOfs The offset to start from. @param nLen The number of elements to implode. @return The concatenated string. @param <ELEMENTTYPE> The type of elem...
[ "Get", "a", "concatenated", "String", "from", "all", "elements", "of", "the", "passed", "array", "without", "a", "separator", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L1188-L1194
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java
NameNode.getBlocks
public BlocksWithLocations getBlocks(DatanodeInfo datanode, long size) throws IOException { """ return a list of blocks & their locations on <code>datanode</code> whose total size is <code>size</code> @param datanode on which blocks are located @param size total size of blocks """ if(size <= 0) { ...
java
public BlocksWithLocations getBlocks(DatanodeInfo datanode, long size) throws IOException { if(size <= 0) { throw new IllegalArgumentException( "Unexpected not positive size: "+size); } return namesystem.getBlocks(datanode, size); }
[ "public", "BlocksWithLocations", "getBlocks", "(", "DatanodeInfo", "datanode", ",", "long", "size", ")", "throws", "IOException", "{", "if", "(", "size", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Unexpected not positive size: \"", "+",...
return a list of blocks & their locations on <code>datanode</code> whose total size is <code>size</code> @param datanode on which blocks are located @param size total size of blocks
[ "return", "a", "list", "of", "blocks", "&", "their", "locations", "on", "<code", ">", "datanode<", "/", "code", ">", "whose", "total", "size", "is", "<code", ">", "size<", "/", "code", ">" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java#L750-L758
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java
DateRangeParam.setRangeFromDatesInclusive
public void setRangeFromDatesInclusive(String theLowerBound, String theUpperBound) { """ Sets the range from a pair of dates, inclusive on both ends @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. "2011-02-22" or "2011-02-22T13:12:00Z". Will be ...
java
public void setRangeFromDatesInclusive(String theLowerBound, String theUpperBound) { DateParam lowerBound = theLowerBound != null ? new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound) : null; DateParam upperBound = theUpperBound != null ? new DateParam(LESSTHAN_OR_EQUALS, theUpperBound) : null; if (is...
[ "public", "void", "setRangeFromDatesInclusive", "(", "String", "theLowerBound", ",", "String", "theUpperBound", ")", "{", "DateParam", "lowerBound", "=", "theLowerBound", "!=", "null", "?", "new", "DateParam", "(", "GREATERTHAN_OR_EQUALS", ",", "theLowerBound", ")", ...
Sets the range from a pair of dates, inclusive on both ends @param theLowerBound A qualified date param representing the lower date bound (optionally may include time), e.g. "2011-02-22" or "2011-02-22T13:12:00Z". Will be treated inclusively. Either theLowerBound or theUpperBound may both be populated, or one may be n...
[ "Sets", "the", "range", "from", "a", "pair", "of", "dates", "inclusive", "on", "both", "ends" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L446-L458
mockito/mockito
src/main/java/org/mockito/internal/util/reflection/GenericTypeExtractor.java
GenericTypeExtractor.findGenericInterface
private static Type findGenericInterface(Class<?> sourceClass, Class<?> targetBaseInterface) { """ Finds generic interface implementation based on the source class and the target interface. Returns null if not found. Recurses the interface hierarchy. """ for (int i = 0; i < sourceClass.getInterfaces()...
java
private static Type findGenericInterface(Class<?> sourceClass, Class<?> targetBaseInterface) { for (int i = 0; i < sourceClass.getInterfaces().length; i++) { Class<?> inter = sourceClass.getInterfaces()[i]; if (inter == targetBaseInterface) { return sourceClass.getGeneric...
[ "private", "static", "Type", "findGenericInterface", "(", "Class", "<", "?", ">", "sourceClass", ",", "Class", "<", "?", ">", "targetBaseInterface", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sourceClass", ".", "getInterfaces", "(", ")",...
Finds generic interface implementation based on the source class and the target interface. Returns null if not found. Recurses the interface hierarchy.
[ "Finds", "generic", "interface", "implementation", "based", "on", "the", "source", "class", "and", "the", "target", "interface", ".", "Returns", "null", "if", "not", "found", ".", "Recurses", "the", "interface", "hierarchy", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/util/reflection/GenericTypeExtractor.java#L60-L73
JM-Lab/utils-java9
src/main/java/kr/jm/utils/helper/JMJson.java
JMJson.withJsonString
public static <T> T withJsonString(String jsonString, Class<T> c) { """ With json string t. @param <T> the type parameter @param jsonString the json string @param c the c @return the t """ return withBytes(jsonString.getBytes(), c); }
java
public static <T> T withJsonString(String jsonString, Class<T> c) { return withBytes(jsonString.getBytes(), c); }
[ "public", "static", "<", "T", ">", "T", "withJsonString", "(", "String", "jsonString", ",", "Class", "<", "T", ">", "c", ")", "{", "return", "withBytes", "(", "jsonString", ".", "getBytes", "(", ")", ",", "c", ")", ";", "}" ]
With json string t. @param <T> the type parameter @param jsonString the json string @param c the c @return the t
[ "With", "json", "string", "t", "." ]
train
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/helper/JMJson.java#L203-L205
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java
ASTElementFactory.getMethod
public ASTMethod getMethod(ExecutableElement executableElement) { """ Build an ASTMethod from the provided ExecutableElement @param executableElement required input element @return ASTMethod """ ImmutableList<ASTParameter> parameters = getParameters(executableElement.getParameters()); ASTA...
java
public ASTMethod getMethod(ExecutableElement executableElement) { ImmutableList<ASTParameter> parameters = getParameters(executableElement.getParameters()); ASTAccessModifier modifier = buildAccessModifier(executableElement); ImmutableSet<ASTType> throwsTypes = buildASTElementTypes(executableEl...
[ "public", "ASTMethod", "getMethod", "(", "ExecutableElement", "executableElement", ")", "{", "ImmutableList", "<", "ASTParameter", ">", "parameters", "=", "getParameters", "(", "executableElement", ".", "getParameters", "(", ")", ")", ";", "ASTAccessModifier", "modifi...
Build an ASTMethod from the provided ExecutableElement @param executableElement required input element @return ASTMethod
[ "Build", "an", "ASTMethod", "from", "the", "provided", "ExecutableElement" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java#L213-L220
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java
PortablePositionNavigator.findPositionForReading
static PortablePosition findPositionForReading( PortableNavigatorContext ctx, String pathString, PortablePathCursor path) throws IOException { """ Main method that enables navigating in the Portable byte stream to find the element specified in the path. The path may be: - simple -> which means that i...
java
static PortablePosition findPositionForReading( PortableNavigatorContext ctx, String pathString, PortablePathCursor path) throws IOException { // just a a single attribute path - e.g. reading a field PortablePosition result = findPositionForReadingAssumingSingleAttributePath(ctx, pathString,...
[ "static", "PortablePosition", "findPositionForReading", "(", "PortableNavigatorContext", "ctx", ",", "String", "pathString", ",", "PortablePathCursor", "path", ")", "throws", "IOException", "{", "// just a a single attribute path - e.g. reading a field", "PortablePosition", "resu...
Main method that enables navigating in the Portable byte stream to find the element specified in the path. The path may be: - simple -> which means that it includes a single attribute only, like "name" - nested -> which means that it includes more than a single attribute separated with a dot (.). like person.name <p> T...
[ "Main", "method", "that", "enables", "navigating", "in", "the", "Portable", "byte", "stream", "to", "find", "the", "element", "specified", "in", "the", "path", ".", "The", "path", "may", "be", ":", "-", "simple", "-", ">", "which", "means", "that", "it",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L75-L84
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java
ParameterFormatter.isDelimPair
private static boolean isDelimPair(final char curChar, final String messagePattern, final int curCharIndex) { """ 22 bytes (allows immediate JVM inlining: < 35 bytes) LOG4J2-1096 """ return curChar == DELIM_START && messagePattern.charAt(curCharIndex + 1) == DELIM_STOP; }
java
private static boolean isDelimPair(final char curChar, final String messagePattern, final int curCharIndex) { return curChar == DELIM_START && messagePattern.charAt(curCharIndex + 1) == DELIM_STOP; }
[ "private", "static", "boolean", "isDelimPair", "(", "final", "char", "curChar", ",", "final", "String", "messagePattern", ",", "final", "int", "curCharIndex", ")", "{", "return", "curChar", "==", "DELIM_START", "&&", "messagePattern", ".", "charAt", "(", "curCha...
22 bytes (allows immediate JVM inlining: < 35 bytes) LOG4J2-1096
[ "22", "bytes", "(", "allows", "immediate", "JVM", "inlining", ":", "<", "35", "bytes", ")", "LOG4J2", "-", "1096" ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterFormatter.java#L270-L272
javagl/CommonUI
src/main/java/de/javagl/common/ui/GridBagLayouts.java
GridBagLayouts.addRow
public static void addRow( Container container, int row, int extraSpaceColumn, Component ... components) { """ Add the given components as a new row in the given container, which must have a <code>GridBagLayout</code>. @param container The container @param row The row @param extraSpaceColu...
java
public static void addRow( Container container, int row, int extraSpaceColumn, Component ... components) { if (!(container.getLayout() instanceof GridBagLayout)) { throw new IllegalArgumentException( "Container does not have a " + ...
[ "public", "static", "void", "addRow", "(", "Container", "container", ",", "int", "row", ",", "int", "extraSpaceColumn", ",", "Component", "...", "components", ")", "{", "if", "(", "!", "(", "container", ".", "getLayout", "(", ")", "instanceof", "GridBagLayou...
Add the given components as a new row in the given container, which must have a <code>GridBagLayout</code>. @param container The container @param row The row @param extraSpaceColumn The index of the column that should receive any extra space @param components The components to add @throws IllegalArgumentException If t...
[ "Add", "the", "given", "components", "as", "a", "new", "row", "in", "the", "given", "container", "which", "must", "have", "a", "<code", ">", "GridBagLayout<", "/", "code", ">", "." ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/GridBagLayouts.java#L52-L82
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/WebUtils.java
WebUtils.doPost
public static String doPost(String url, Map<String, String> params, String charset, int connectTimeout, int readTimeout, String proxyHost, int proxyPort) throws IOException { """ 执行HTTP POST请求,可使用代理proxy。 @param url 请求地址 @param params 请求参数 @param...
java
public static String doPost(String url, Map<String, String> params, String charset, int connectTimeout, int readTimeout, String proxyHost, int proxyPort) throws IOException { String ctype = "application/x-www-form-urlencoded;charset=" + charset; ...
[ "public", "static", "String", "doPost", "(", "String", "url", ",", "Map", "<", "String", ",", "String", ">", "params", ",", "String", "charset", ",", "int", "connectTimeout", ",", "int", "readTimeout", ",", "String", "proxyHost", ",", "int", "proxyPort", "...
执行HTTP POST请求,可使用代理proxy。 @param url 请求地址 @param params 请求参数 @param charset 字符集,如UTF-8, GBK, GB2312 @param connectTimeout 连接超时时间 @param readTimeout 请求超时时间 @param proxyHost 代理host,传null表示不使用代理 @param proxyPort 代理端口,传0表示不使用代理 @return 响应字符串 @throws IOException
[ "执行HTTP", "POST请求,可使用代理proxy。" ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/WebUtils.java#L107-L117
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.listIntents
public List<IntentClassifier> listIntents(UUID appId, String versionId, ListIntentsOptionalParameter listIntentsOptionalParameter) { """ Gets information about the intent models. @param appId The application ID. @param versionId The version ID. @param listIntentsOptionalParameter the object representing the o...
java
public List<IntentClassifier> listIntents(UUID appId, String versionId, ListIntentsOptionalParameter listIntentsOptionalParameter) { return listIntentsWithServiceResponseAsync(appId, versionId, listIntentsOptionalParameter).toBlocking().single().body(); }
[ "public", "List", "<", "IntentClassifier", ">", "listIntents", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListIntentsOptionalParameter", "listIntentsOptionalParameter", ")", "{", "return", "listIntentsWithServiceResponseAsync", "(", "appId", ",", "versionId",...
Gets information about the intent models. @param appId The application ID. @param versionId The version ID. @param listIntentsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorRespon...
[ "Gets", "information", "about", "the", "intent", "models", "." ]
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#L754-L756
facebook/fresco
animated-base/src/main/java/com/facebook/fresco/animation/drawable/animator/AnimatedDrawableValueAnimatorHelper.java
AnimatedDrawableValueAnimatorHelper.createValueAnimator
@Nullable public static ValueAnimator createValueAnimator(Drawable drawable, int maxDurationMs) { """ Create a value animator for the given animation drawable and max animation duration in ms. @param drawable the drawable to create the animator for @param maxDurationMs the max duration in ms @return the ani...
java
@Nullable public static ValueAnimator createValueAnimator(Drawable drawable, int maxDurationMs) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { return null; } if (drawable instanceof AnimatedDrawable2) { return AnimatedDrawable2ValueAnimatorHelper.createValueAnimator( ...
[ "@", "Nullable", "public", "static", "ValueAnimator", "createValueAnimator", "(", "Drawable", "drawable", ",", "int", "maxDurationMs", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", "<", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB", ")", "{",...
Create a value animator for the given animation drawable and max animation duration in ms. @param drawable the drawable to create the animator for @param maxDurationMs the max duration in ms @return the animator to use
[ "Create", "a", "value", "animator", "for", "the", "given", "animation", "drawable", "and", "max", "animation", "duration", "in", "ms", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/animated-base/src/main/java/com/facebook/fresco/animation/drawable/animator/AnimatedDrawableValueAnimatorHelper.java#L31-L43
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.fillPublishList
public CmsPublishList fillPublishList(CmsRequestContext context, CmsPublishList publishList) throws CmsException { """ Fills the given publish list with the the VFS resources that actually get published.<p> Please refer to the source code of this method for the rules on how to decide whether a new/changed/dele...
java
public CmsPublishList fillPublishList(CmsRequestContext context, CmsPublishList publishList) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.fillPublishList(dbc, publishList); checkPublishPermissions(dbc, publishList); ...
[ "public", "CmsPublishList", "fillPublishList", "(", "CmsRequestContext", "context", ",", "CmsPublishList", "publishList", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "try", "{", ...
Fills the given publish list with the the VFS resources that actually get published.<p> Please refer to the source code of this method for the rules on how to decide whether a new/changed/deleted <code>{@link CmsResource}</code> object can be published or not.<p> @param context the current request context @param publ...
[ "Fills", "the", "given", "publish", "list", "with", "the", "the", "VFS", "resources", "that", "actually", "get", "published", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L1839-L1867
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/orientation/OrientationHistogramSift.java
OrientationHistogramSift.computeWeight
double computeWeight( double deltaX , double deltaY , double sigma ) { """ Computes the weight based on a centered Gaussian shaped function. Interpolation is used to speed up the process """ // the exact equation // return Math.exp(-0.5 * ((deltaX * deltaX + deltaY * deltaY) / (sigma * sigma))); // appr...
java
double computeWeight( double deltaX , double deltaY , double sigma ) { // the exact equation // return Math.exp(-0.5 * ((deltaX * deltaX + deltaY * deltaY) / (sigma * sigma))); // approximation below. when validating this approach it produced results that were within // floating point tolerance of the exact so...
[ "double", "computeWeight", "(", "double", "deltaX", ",", "double", "deltaY", ",", "double", "sigma", ")", "{", "// the exact equation", "//\t\treturn Math.exp(-0.5 * ((deltaX * deltaX + deltaY * deltaY) / (sigma * sigma)));", "// approximation below. when validating this approach it p...
Computes the weight based on a centered Gaussian shaped function. Interpolation is used to speed up the process
[ "Computes", "the", "weight", "based", "on", "a", "centered", "Gaussian", "shaped", "function", ".", "Interpolation", "is", "used", "to", "speed", "up", "the", "process" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/orientation/OrientationHistogramSift.java#L298-L309
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java
EventHandlers.handleUIEvent
public void handleUIEvent(String callbackKey, JSObject result) { """ This method is called from Javascript, passing in the previously created callback key, and the event object. The current implementation is receiving the LatLng object that the Javascript MouseEvent contains. <p> It may be more useful to retur...
java
public void handleUIEvent(String callbackKey, JSObject result) { if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof UIEventHandler) { ((UIEventHandler) handlers.get(callbackKey)).handle(result); } else if (handlers.containsKey(callbackKey) && handlers.get(callbackK...
[ "public", "void", "handleUIEvent", "(", "String", "callbackKey", ",", "JSObject", "result", ")", "{", "if", "(", "handlers", ".", "containsKey", "(", "callbackKey", ")", "&&", "handlers", ".", "get", "(", "callbackKey", ")", "instanceof", "UIEventHandler", ")"...
This method is called from Javascript, passing in the previously created callback key, and the event object. The current implementation is receiving the LatLng object that the Javascript MouseEvent contains. <p> It may be more useful to return the MouseEvent and let clients go from there, but there is only the stop() m...
[ "This", "method", "is", "called", "from", "Javascript", "passing", "in", "the", "previously", "created", "callback", "key", "and", "the", "event", "object", ".", "The", "current", "implementation", "is", "receiving", "the", "LatLng", "object", "that", "the", "...
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java#L96-L104
seedstack/business
core/src/main/java/org/seedstack/business/internal/utils/FieldUtils.java
FieldUtils.getFieldValue
public static Object getFieldValue(Object candidate, Field field) { """ Return the value contained in the specified field of the candidate object. @param candidate the object to retrieve the value of. @param field the field. @return the value contained in the field of the candidate. """ try { ...
java
public static Object getFieldValue(Object candidate, Field field) { try { return ReflectUtils.getValue(ReflectUtils.makeAccessible(field), candidate); } catch (Exception e) { throw BusinessException.wrap(e, BusinessErrorCode.ERROR_ACCESSING_FIELD) .put("classN...
[ "public", "static", "Object", "getFieldValue", "(", "Object", "candidate", ",", "Field", "field", ")", "{", "try", "{", "return", "ReflectUtils", ".", "getValue", "(", "ReflectUtils", ".", "makeAccessible", "(", "field", ")", ",", "candidate", ")", ";", "}",...
Return the value contained in the specified field of the candidate object. @param candidate the object to retrieve the value of. @param field the field. @return the value contained in the field of the candidate.
[ "Return", "the", "value", "contained", "in", "the", "specified", "field", "of", "the", "candidate", "object", "." ]
train
https://github.com/seedstack/business/blob/55b3e861fe152e9b125ebc69daa91a682deeae8a/core/src/main/java/org/seedstack/business/internal/utils/FieldUtils.java#L43-L51
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getReader
public static BufferedReader getReader(File file, String charsetName) throws IORuntimeException { """ 获得一个文件读取器 @param file 文件 @param charsetName 字符集 @return BufferedReader对象 @throws IORuntimeException IO异常 """ return IoUtil.getReader(getInputStream(file), charsetName); }
java
public static BufferedReader getReader(File file, String charsetName) throws IORuntimeException { return IoUtil.getReader(getInputStream(file), charsetName); }
[ "public", "static", "BufferedReader", "getReader", "(", "File", "file", ",", "String", "charsetName", ")", "throws", "IORuntimeException", "{", "return", "IoUtil", ".", "getReader", "(", "getInputStream", "(", "file", ")", ",", "charsetName", ")", ";", "}" ]
获得一个文件读取器 @param file 文件 @param charsetName 字符集 @return BufferedReader对象 @throws IORuntimeException IO异常
[ "获得一个文件读取器" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1993-L1995
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.getPropertiesFromTask
public void getPropertiesFromTask(String jobId, String taskId, String filePath, FileGetPropertiesFromTaskOptions fileGetPropertiesFromTaskOptions) { """ Gets the properties of the specified task file. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose file you want to...
java
public void getPropertiesFromTask(String jobId, String taskId, String filePath, FileGetPropertiesFromTaskOptions fileGetPropertiesFromTaskOptions) { getPropertiesFromTaskWithServiceResponseAsync(jobId, taskId, filePath, fileGetPropertiesFromTaskOptions).toBlocking().single().body(); }
[ "public", "void", "getPropertiesFromTask", "(", "String", "jobId", ",", "String", "taskId", ",", "String", "filePath", ",", "FileGetPropertiesFromTaskOptions", "fileGetPropertiesFromTaskOptions", ")", "{", "getPropertiesFromTaskWithServiceResponseAsync", "(", "jobId", ",", ...
Gets the properties of the specified task file. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose file you want to get the properties of. @param filePath The path to the task file that you want to get the properties of. @param fileGetPropertiesFromTaskOptions Additional para...
[ "Gets", "the", "properties", "of", "the", "specified", "task", "file", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L742-L744
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java
DefaultCumulatives.addDim
@Override public void addDim(List<IntVar> c, int[] cUse, IntVar[] dUse) { """ Add a dimension. @param c the resource capacity of each of the nodes @param cUse the resource usage of each of the cSlices @param dUse the resource usage of each of the dSlices """ capacities.add(c); cUsages...
java
@Override public void addDim(List<IntVar> c, int[] cUse, IntVar[] dUse) { capacities.add(c); cUsages.add(cUse); dUsages.add(dUse); }
[ "@", "Override", "public", "void", "addDim", "(", "List", "<", "IntVar", ">", "c", ",", "int", "[", "]", "cUse", ",", "IntVar", "[", "]", "dUse", ")", "{", "capacities", ".", "add", "(", "c", ")", ";", "cUsages", ".", "add", "(", "cUse", ")", "...
Add a dimension. @param c the resource capacity of each of the nodes @param cUse the resource usage of each of the cSlices @param dUse the resource usage of each of the dSlices
[ "Add", "a", "dimension", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/view/DefaultCumulatives.java#L62-L67
alkacon/opencms-core
src/org/opencms/ui/util/table/CmsTableUtil.java
CmsTableUtil.createIconButton
public static Button createIconButton(Resource icon, String caption) { """ Creates an icon button.<p> @param icon the resource for the icon @param caption the caption @return the created button """ Button button = new Button(); button.addStyleName(OpenCmsTheme.BUTTON_TABLE_ICON); ...
java
public static Button createIconButton(Resource icon, String caption) { Button button = new Button(); button.addStyleName(OpenCmsTheme.BUTTON_TABLE_ICON); button.addStyleName(ValoTheme.BUTTON_BORDERLESS); button.setIcon(icon); button.setDescription(caption); return butto...
[ "public", "static", "Button", "createIconButton", "(", "Resource", "icon", ",", "String", "caption", ")", "{", "Button", "button", "=", "new", "Button", "(", ")", ";", "button", ".", "addStyleName", "(", "OpenCmsTheme", ".", "BUTTON_TABLE_ICON", ")", ";", "b...
Creates an icon button.<p> @param icon the resource for the icon @param caption the caption @return the created button
[ "Creates", "an", "icon", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/util/table/CmsTableUtil.java#L56-L65
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/XMLResource.java
XMLResource.postResource
@POST @Consumes( { """ This method will be called when an HTTP client sends a POST request to an existing resource to add a resource. Content-Type must be 'text/xml'. @param system The implementation system. @param resource The resource name. @param headers HTTP header attributes. @param input The i...
java
@POST @Consumes({ MediaType.TEXT_XML, MediaType.APPLICATION_XML }) public Response postResource(@PathParam(JaxRxConstants.SYSTEM) final String system, @PathParam(JaxRxConstants.RESOURCE) final String resource, @Context final HttpHeaders headers, final InputStream input) { fi...
[ "@", "POST", "@", "Consumes", "(", "{", "MediaType", ".", "TEXT_XML", ",", "MediaType", ".", "APPLICATION_XML", "}", ")", "public", "Response", "postResource", "(", "@", "PathParam", "(", "JaxRxConstants", ".", "SYSTEM", ")", "final", "String", "system", ","...
This method will be called when an HTTP client sends a POST request to an existing resource to add a resource. Content-Type must be 'text/xml'. @param system The implementation system. @param resource The resource name. @param headers HTTP header attributes. @param input The input stream. @return The {@link Response} ...
[ "This", "method", "will", "be", "called", "when", "an", "HTTP", "client", "sends", "a", "POST", "request", "to", "an", "existing", "resource", "to", "add", "a", "resource", ".", "Content", "-", "Type", "must", "be", "text", "/", "xml", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/XMLResource.java#L123-L134
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLWriteServiceContext.java
SSLWriteServiceContext.checkForErrors
private IOException checkForErrors(long numBytes, boolean async) { """ Check the status of the buffers set by the caller taking into account the JITAllocation size if the buffers are null or verifying there is space available in the the buffers based on the size of data requested. @param numBytes @param asyn...
java
private IOException checkForErrors(long numBytes, boolean async) { IOException exception = null; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "checkForErrors: numBytes=" + numBytes + " buffers=" + SSLUtils.getBufferTraceInfo(getBuff...
[ "private", "IOException", "checkForErrors", "(", "long", "numBytes", ",", "boolean", "async", ")", "{", "IOException", "exception", "=", "null", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")"...
Check the status of the buffers set by the caller taking into account the JITAllocation size if the buffers are null or verifying there is space available in the the buffers based on the size of data requested. @param numBytes @param async @return IOException if an inconsistency/error is found in the request, null oth...
[ "Check", "the", "status", "of", "the", "buffers", "set", "by", "the", "caller", "taking", "into", "account", "the", "JITAllocation", "size", "if", "the", "buffers", "are", "null", "or", "verifying", "there", "is", "space", "available", "in", "the", "the", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLWriteServiceContext.java#L404-L431
tvesalainen/util
util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java
ChannelHelper.writeAll
public static void writeAll(WritableByteChannel ch, ByteBuffer bb) throws IOException { """ Writes to ch until no remaining left or throws IOException @param ch @param bb @throws IOException """ int count = 0; while (bb.hasRemaining()) { int rc = ch.write(bb); ...
java
public static void writeAll(WritableByteChannel ch, ByteBuffer bb) throws IOException { int count = 0; while (bb.hasRemaining()) { int rc = ch.write(bb); if (rc == 0) { count++; } if (count > 100) ...
[ "public", "static", "void", "writeAll", "(", "WritableByteChannel", "ch", ",", "ByteBuffer", "bb", ")", "throws", "IOException", "{", "int", "count", "=", "0", ";", "while", "(", "bb", ".", "hasRemaining", "(", ")", ")", "{", "int", "rc", "=", "ch", "....
Writes to ch until no remaining left or throws IOException @param ch @param bb @throws IOException
[ "Writes", "to", "ch", "until", "no", "remaining", "left", "or", "throws", "IOException" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java#L308-L323
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/MBlockPos.java
MBlockPos.getAllInBox
public static Iterable<MBlockPos> getAllInBox(MBlockPos from, MBlockPos to) { """ Create an {@link Iterable} that returns all positions in the box specified by the given corners. @param from the first corner @param to the second corner @return the iterable """ return new BlockIterator(from, to).asIterab...
java
public static Iterable<MBlockPos> getAllInBox(MBlockPos from, MBlockPos to) { return new BlockIterator(from, to).asIterable(); }
[ "public", "static", "Iterable", "<", "MBlockPos", ">", "getAllInBox", "(", "MBlockPos", "from", ",", "MBlockPos", "to", ")", "{", "return", "new", "BlockIterator", "(", "from", ",", "to", ")", ".", "asIterable", "(", ")", ";", "}" ]
Create an {@link Iterable} that returns all positions in the box specified by the given corners. @param from the first corner @param to the second corner @return the iterable
[ "Create", "an", "{", "@link", "Iterable", "}", "that", "returns", "all", "positions", "in", "the", "box", "specified", "by", "the", "given", "corners", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/MBlockPos.java#L334-L337
google/truth
extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopes.java
FieldScopes.fromSetFields
public static FieldScope fromSetFields( Message firstMessage, Message secondMessage, Message... rest) { """ Creates a {@link FieldScope} covering the fields set in every message in the provided list of messages, with the same semantics as in {@link #fromSetFields(Message)}. <p>This can be thought of as t...
java
public static FieldScope fromSetFields( Message firstMessage, Message secondMessage, Message... rest) { return fromSetFields(asList(firstMessage, secondMessage, rest)); }
[ "public", "static", "FieldScope", "fromSetFields", "(", "Message", "firstMessage", ",", "Message", "secondMessage", ",", "Message", "...", "rest", ")", "{", "return", "fromSetFields", "(", "asList", "(", "firstMessage", ",", "secondMessage", ",", "rest", ")", ")...
Creates a {@link FieldScope} covering the fields set in every message in the provided list of messages, with the same semantics as in {@link #fromSetFields(Message)}. <p>This can be thought of as the union of the {@link FieldScope}s for each individual message, or the {@link FieldScope} for the merge of all the messag...
[ "Creates", "a", "{", "@link", "FieldScope", "}", "covering", "the", "fields", "set", "in", "every", "message", "in", "the", "provided", "list", "of", "messages", "with", "the", "same", "semantics", "as", "in", "{", "@link", "#fromSetFields", "(", "Message", ...
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopes.java#L79-L82
box/box-java-sdk
src/main/java/com/box/sdk/BoxFile.java
BoxFile.setClassification
public String setClassification(String classificationType) { """ Attempts to add classification to a file. If classification already exists then do update. @param classificationType the metadata classification type. @return the metadata classification type on the file. """ Metadata metadata = new M...
java
public String setClassification(String classificationType) { Metadata metadata = new Metadata().add(Metadata.CLASSIFICATION_KEY, classificationType); Metadata classification = null; try { classification = this.createMetadata(Metadata.CLASSIFICATION_TEMPLATE_KEY, "enterprise", metada...
[ "public", "String", "setClassification", "(", "String", "classificationType", ")", "{", "Metadata", "metadata", "=", "new", "Metadata", "(", ")", ".", "add", "(", "Metadata", ".", "CLASSIFICATION_KEY", ",", "classificationType", ")", ";", "Metadata", "classificati...
Attempts to add classification to a file. If classification already exists then do update. @param classificationType the metadata classification type. @return the metadata classification type on the file.
[ "Attempts", "to", "add", "classification", "to", "a", "file", ".", "If", "classification", "already", "exists", "then", "do", "update", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L1113-L1130
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java
MultiLanguageTextProcessor.getMultiLanguageTextByLanguage
public static String getMultiLanguageTextByLanguage(final Locale locale, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { """ Get the multiLanguageText for a locale in a multiLanguageText type. This is equivalent to calling {@link #getMultiLanguageTextByLanguage(String, MultiLang...
java
public static String getMultiLanguageTextByLanguage(final Locale locale, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { return getMultiLanguageTextByLanguage(locale.getLanguage(), multiLanguageText); }
[ "public", "static", "String", "getMultiLanguageTextByLanguage", "(", "final", "Locale", "locale", ",", "final", "MultiLanguageTextOrBuilder", "multiLanguageText", ")", "throws", "NotAvailableException", "{", "return", "getMultiLanguageTextByLanguage", "(", "locale", ".", "g...
Get the multiLanguageText for a locale in a multiLanguageText type. This is equivalent to calling {@link #getMultiLanguageTextByLanguage(String, MultiLanguageTextOrBuilder)} but the language code is extracted from the locale by calling {@link Locale#getLanguage()}. @param locale the locale from which the language...
[ "Get", "the", "multiLanguageText", "for", "a", "locale", "in", "a", "multiLanguageText", "type", ".", "This", "is", "equivalent", "to", "calling", "{", "@link", "#getMultiLanguageTextByLanguage", "(", "String", "MultiLanguageTextOrBuilder", ")", "}", "but", "the", ...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java#L244-L246
upwork/java-upwork
src/com/Upwork/api/Routers/Snapshot.java
Snapshot.updateByContract
public JSONObject updateByContract(String contractId, String ts, HashMap<String, String> params) throws JSONException { """ Update snapshot by specific contract @param contractId Contract ID @param ts Timestamp @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}...
java
public JSONObject updateByContract(String contractId, String ts, HashMap<String, String> params) throws JSONException { return oClient.put("/team/v3/snapshots/contracts/" + contractId + "/" + ts, params); }
[ "public", "JSONObject", "updateByContract", "(", "String", "contractId", ",", "String", "ts", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "put", "(", "\"/team/v3/snapshots/contracts/\"...
Update snapshot by specific contract @param contractId Contract ID @param ts Timestamp @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Update", "snapshot", "by", "specific", "contract" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Snapshot.java#L67-L69
jurmous/etcd4j
src/main/java/mousio/etcd4j/transport/EtcdNettyConfig.java
EtcdNettyConfig.setEventLoopGroup
public EtcdNettyConfig setEventLoopGroup(EventLoopGroup eventLoopGroup, boolean managed) { """ Set a custom event loop group. For use within existing netty architectures @param eventLoopGroup eventLoopGroup to set. @param managed whether event loop group will be closed when etcd client close, true represent ye...
java
public EtcdNettyConfig setEventLoopGroup(EventLoopGroup eventLoopGroup, boolean managed) { if (this.eventLoopGroup != null && this.managedEventLoopGroup) { // if i manage it, close the old when new one come this.eventLoopGroup.shutdownGracefully(); } this.eventLoopGroup = eventLoopGroup; this.mana...
[ "public", "EtcdNettyConfig", "setEventLoopGroup", "(", "EventLoopGroup", "eventLoopGroup", ",", "boolean", "managed", ")", "{", "if", "(", "this", ".", "eventLoopGroup", "!=", "null", "&&", "this", ".", "managedEventLoopGroup", ")", "{", "// if i manage it, close the ...
Set a custom event loop group. For use within existing netty architectures @param eventLoopGroup eventLoopGroup to set. @param managed whether event loop group will be closed when etcd client close, true represent yes @return itself for chaining.
[ "Set", "a", "custom", "event", "loop", "group", ".", "For", "use", "within", "existing", "netty", "architectures" ]
train
https://github.com/jurmous/etcd4j/blob/ffb1d574cf85bbab025dd566ce250f1860bbcbc7/src/main/java/mousio/etcd4j/transport/EtcdNettyConfig.java#L99-L106