repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
NetworkEnvironmentConfiguration.calculateNumberOfNetworkBuffers
@SuppressWarnings("deprecation") private static int calculateNumberOfNetworkBuffers(Configuration configuration, long maxJvmHeapMemory) { final int numberOfNetworkBuffers; if (!hasNewNetworkConfig(configuration)) { // fallback: number of network buffers numberOfNetworkBuffers = configuration.getInteger(TaskM...
java
@SuppressWarnings("deprecation") private static int calculateNumberOfNetworkBuffers(Configuration configuration, long maxJvmHeapMemory) { final int numberOfNetworkBuffers; if (!hasNewNetworkConfig(configuration)) { // fallback: number of network buffers numberOfNetworkBuffers = configuration.getInteger(TaskM...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "static", "int", "calculateNumberOfNetworkBuffers", "(", "Configuration", "configuration", ",", "long", "maxJvmHeapMemory", ")", "{", "final", "int", "numberOfNetworkBuffers", ";", "if", "(", "!", "hasNe...
Calculates the number of network buffers based on configuration and jvm heap size. @param configuration configuration object @param maxJvmHeapMemory the maximum JVM heap size (in bytes) @return the number of network buffers
[ "Calculates", "the", "number", "of", "network", "buffers", "based", "on", "configuration", "and", "jvm", "heap", "size", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java#L387-L413
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java
FeatureInfoBuilder.buildResultsInfoMessage
public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance, LatLng clickLocation) { return buildResultsInfoMessage(results, tolerance, clickLocation, null); }
java
public String buildResultsInfoMessage(FeatureIndexResults results, double tolerance, LatLng clickLocation) { return buildResultsInfoMessage(results, tolerance, clickLocation, null); }
[ "public", "String", "buildResultsInfoMessage", "(", "FeatureIndexResults", "results", ",", "double", "tolerance", ",", "LatLng", "clickLocation", ")", "{", "return", "buildResultsInfoMessage", "(", "results", ",", "tolerance", ",", "clickLocation", ",", "null", ")", ...
Build a feature results information message @param results feature index results @param tolerance distance tolerance @param clickLocation map click location @return results message or null if no results
[ "Build", "a", "feature", "results", "information", "message" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/FeatureInfoBuilder.java#L319-L321
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java
MongoDBClient.onFlushBatch
private void onFlushBatch(Map<String, BulkWriteOperation> bulkWriteOperationMap) { if (!bulkWriteOperationMap.isEmpty()) { for (BulkWriteOperation builder : bulkWriteOperationMap.values()) { try { builder.execute(getWriteCon...
java
private void onFlushBatch(Map<String, BulkWriteOperation> bulkWriteOperationMap) { if (!bulkWriteOperationMap.isEmpty()) { for (BulkWriteOperation builder : bulkWriteOperationMap.values()) { try { builder.execute(getWriteCon...
[ "private", "void", "onFlushBatch", "(", "Map", "<", "String", ",", "BulkWriteOperation", ">", "bulkWriteOperationMap", ")", "{", "if", "(", "!", "bulkWriteOperationMap", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "BulkWriteOperation", "builder", ":", "bul...
On flush batch. @param bulkWriteOperationMap the bulk write operation map
[ "On", "flush", "batch", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java#L1329-L1352
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_serviceMonitoring_monitoringId_alert_email_alertId_GET
public OvhEmailAlert serviceName_serviceMonitoring_monitoringId_alert_email_alertId_GET(String serviceName, Long monitoringId, Long alertId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}"; StringBuilder sb = path(qPath, serviceName, monit...
java
public OvhEmailAlert serviceName_serviceMonitoring_monitoringId_alert_email_alertId_GET(String serviceName, Long monitoringId, Long alertId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}"; StringBuilder sb = path(qPath, serviceName, monit...
[ "public", "OvhEmailAlert", "serviceName_serviceMonitoring_monitoringId_alert_email_alertId_GET", "(", "String", "serviceName", ",", "Long", "monitoringId", ",", "Long", "alertId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/serv...
Get this object properties REST: GET /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId} @param serviceName [required] The internal name of your dedicated server @param monitoringId [required] This monitoring id @param alertId [required] This monitoring id
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2192-L2197
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/TopicManagerImpl.java
TopicManagerImpl.isInconsistenceContext
boolean isInconsistenceContext(String topic, Session session) { return null == topic || null == session || topic.isEmpty(); }
java
boolean isInconsistenceContext(String topic, Session session) { return null == topic || null == session || topic.isEmpty(); }
[ "boolean", "isInconsistenceContext", "(", "String", "topic", ",", "Session", "session", ")", "{", "return", "null", "==", "topic", "||", "null", "==", "session", "||", "topic", ".", "isEmpty", "(", ")", ";", "}" ]
Return if argument is inconsistent for context : topic and session null or empty @param topic @param session @return
[ "Return", "if", "argument", "is", "inconsistent", "for", "context", ":", "topic", "and", "session", "null", "or", "empty" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/TopicManagerImpl.java#L119-L121
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java
BackendCleanup.truncateInternalProperties
private static void truncateInternalProperties(String tableName, Statement ddlStatement, Connection connection) throws SQLException { try (PreparedStatement preparedStatement = connection.prepareStatement("delete from internal_properties where kee not in (?,?)")) { preparedStatement.setString(1, InternalPrope...
java
private static void truncateInternalProperties(String tableName, Statement ddlStatement, Connection connection) throws SQLException { try (PreparedStatement preparedStatement = connection.prepareStatement("delete from internal_properties where kee not in (?,?)")) { preparedStatement.setString(1, InternalPrope...
[ "private", "static", "void", "truncateInternalProperties", "(", "String", "tableName", ",", "Statement", "ddlStatement", ",", "Connection", "connection", ")", "throws", "SQLException", "{", "try", "(", "PreparedStatement", "preparedStatement", "=", "connection", ".", ...
Internal property {@link InternalProperties#DEFAULT_ORGANIZATION} must never be deleted.
[ "Internal", "property", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/platform/BackendCleanup.java#L232-L240
walkmod/walkmod-core
src/main/java/org/walkmod/util/location/LocationAttributes.java
LocationAttributes.addLocationAttributes
public static Attributes addLocationAttributes(Locator locator, Attributes attrs) { if (locator == null || attrs.getIndex(URI, SRC_ATTR) != -1) { return attrs; } AttributesImpl newAttrs = attrs instanceof AttributesImpl ? (AttributesImpl) attrs : new AttributesImpl(attrs); return newAttrs; }
java
public static Attributes addLocationAttributes(Locator locator, Attributes attrs) { if (locator == null || attrs.getIndex(URI, SRC_ATTR) != -1) { return attrs; } AttributesImpl newAttrs = attrs instanceof AttributesImpl ? (AttributesImpl) attrs : new AttributesImpl(attrs); return newAttrs; }
[ "public", "static", "Attributes", "addLocationAttributes", "(", "Locator", "locator", ",", "Attributes", "attrs", ")", "{", "if", "(", "locator", "==", "null", "||", "attrs", ".", "getIndex", "(", "URI", ",", "SRC_ATTR", ")", "!=", "-", "1", ")", "{", "r...
Add location attributes to a set of SAX attributes. @param locator the <code>Locator</code> (can be null) @param attrs the <code>Attributes</code> where locator information should be added @return Location enabled Attributes.
[ "Add", "location", "attributes", "to", "a", "set", "of", "SAX", "attributes", "." ]
train
https://github.com/walkmod/walkmod-core/blob/fa79b836894fa00ca4b3e2bd26326a44b778f46f/src/main/java/org/walkmod/util/location/LocationAttributes.java#L67-L74
assertthat/selenium-shutterbug
src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java
Shutterbug.shootPage
public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll) { return shootPage(driver, scroll, DEFAULT_SCROLL_TIMEOUT); }
java
public static PageSnapshot shootPage(WebDriver driver, ScrollStrategy scroll) { return shootPage(driver, scroll, DEFAULT_SCROLL_TIMEOUT); }
[ "public", "static", "PageSnapshot", "shootPage", "(", "WebDriver", "driver", ",", "ScrollStrategy", "scroll", ")", "{", "return", "shootPage", "(", "driver", ",", "scroll", ",", "DEFAULT_SCROLL_TIMEOUT", ")", ";", "}" ]
To be used when screen shooting the page and need to scroll while making screen shots, either vertically or horizontally or both directions (Chrome). @param driver WebDriver instance @param scroll ScrollStrategy How you need to scroll @return PageSnapshot instance
[ "To", "be", "used", "when", "screen", "shooting", "the", "page", "and", "need", "to", "scroll", "while", "making", "screen", "shots", "either", "vertically", "or", "horizontally", "or", "both", "directions", "(", "Chrome", ")", "." ]
train
https://github.com/assertthat/selenium-shutterbug/blob/770d9b92423200d262c9ab70e40405921d81e262/src/main/java/com/assertthat/selenium_shutterbug/core/Shutterbug.java#L57-L59
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/type/TrackedTypeFactory.java
TrackedTypeFactory.build
public static Type build(final Type type, final Type source) { if (!TypeUtils.isAssignable(type, source)) { throw new IllegalArgumentException(String.format( "Can't track type %s generics because it's not assignable to %s", TypeToStringUtils.toStringType(type)...
java
public static Type build(final Type type, final Type source) { if (!TypeUtils.isAssignable(type, source)) { throw new IllegalArgumentException(String.format( "Can't track type %s generics because it's not assignable to %s", TypeToStringUtils.toStringType(type)...
[ "public", "static", "Type", "build", "(", "final", "Type", "type", ",", "final", "Type", "source", ")", "{", "if", "(", "!", "TypeUtils", ".", "isAssignable", "(", "type", ",", "source", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "St...
Sub type must be either {@link ParameterizedType} or {@link WildcardType} containing parameterized types, because otherwise tracking is impossible (no source to track from) and so orignial type is simply returned as is. <p> In case of arrays, internal components are directly compared. @param type type to track gener...
[ "Sub", "type", "must", "be", "either", "{", "@link", "ParameterizedType", "}", "or", "{", "@link", "WildcardType", "}", "containing", "parameterized", "types", "because", "otherwise", "tracking", "is", "impossible", "(", "no", "source", "to", "track", "from", ...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/type/TrackedTypeFactory.java#L39-L72
samskivert/pythagoras
src/main/java/pythagoras/f/Matrix4.java
Matrix4.setToRotation
public Matrix4 setToRotation (float angle, IVector3 axis) { return setToRotation(angle, axis.x(), axis.y(), axis.z()); }
java
public Matrix4 setToRotation (float angle, IVector3 axis) { return setToRotation(angle, axis.x(), axis.y(), axis.z()); }
[ "public", "Matrix4", "setToRotation", "(", "float", "angle", ",", "IVector3", "axis", ")", "{", "return", "setToRotation", "(", "angle", ",", "axis", ".", "x", "(", ")", ",", "axis", ".", "y", "(", ")", ",", "axis", ".", "z", "(", ")", ")", ";", ...
Sets this to a rotation matrix. @return a reference to this matrix, for chaining.
[ "Sets", "this", "to", "a", "rotation", "matrix", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Matrix4.java#L202-L204
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getFloat
public static float getFloat(JsonObject object, String field, float defaultValue) { final JsonValue value = object.get(field); if (value == null || value.isNull()) { return defaultValue; } else { return value.asFloat(); } }
java
public static float getFloat(JsonObject object, String field, float defaultValue) { final JsonValue value = object.get(field); if (value == null || value.isNull()) { return defaultValue; } else { return value.asFloat(); } }
[ "public", "static", "float", "getFloat", "(", "JsonObject", "object", ",", "String", "field", ",", "float", "defaultValue", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "if", "(", "value", "==", "null", "||"...
Returns a field in a Json object as a float. @param object the Json Object @param field the field in the Json object to return @param defaultValue a default value for the field if the field value is null @return the Json field value as a float
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "a", "float", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L151-L158
alkacon/opencms-core
src/org/opencms/ade/upload/CmsUploadService.java
CmsUploadService.isDeletedResource
private boolean isDeletedResource(String path, boolean rootPath) { CmsObject cms = getCmsObject(); CmsResource res = null; try { if (rootPath) { String origSiteRoot = cms.getRequestContext().getSiteRoot(); try { cms.getRequestConte...
java
private boolean isDeletedResource(String path, boolean rootPath) { CmsObject cms = getCmsObject(); CmsResource res = null; try { if (rootPath) { String origSiteRoot = cms.getRequestContext().getSiteRoot(); try { cms.getRequestConte...
[ "private", "boolean", "isDeletedResource", "(", "String", "path", ",", "boolean", "rootPath", ")", "{", "CmsObject", "cms", "=", "getCmsObject", "(", ")", ";", "CmsResource", "res", "=", "null", ";", "try", "{", "if", "(", "rootPath", ")", "{", "String", ...
Checks if a the resource exists but is marked as deleted.<p> @param path the path @param rootPath in case the path is a root path @return true is the resource exists but is marked as deleted
[ "Checks", "if", "a", "the", "resource", "exists", "but", "is", "marked", "as", "deleted", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/upload/CmsUploadService.java#L169-L190
vakinge/jeesuite-libs
jeesuite-common/src/main/java/com/jeesuite/common/util/DateUtils.java
DateUtils.formatDateStr
public static String formatDateStr(String dateStr, String... patterns) { String pattern = TIMESTAMP_PATTERN; if (patterns != null && patterns.length > 0 && StringUtils.isNotBlank(patterns[0])) { pattern = patterns[0]; } return DateFormatUtils.format(parseDate(...
java
public static String formatDateStr(String dateStr, String... patterns) { String pattern = TIMESTAMP_PATTERN; if (patterns != null && patterns.length > 0 && StringUtils.isNotBlank(patterns[0])) { pattern = patterns[0]; } return DateFormatUtils.format(parseDate(...
[ "public", "static", "String", "formatDateStr", "(", "String", "dateStr", ",", "String", "...", "patterns", ")", "{", "String", "pattern", "=", "TIMESTAMP_PATTERN", ";", "if", "(", "patterns", "!=", "null", "&&", "patterns", ".", "length", ">", "0", "&&", "...
格式化日期字符串<br> generate by: vakin jiang at 2012-3-7 @param dateStr @param patterns @return
[ "格式化日期字符串<br", ">", "generate", "by", ":", "vakin", "jiang", "at", "2012", "-", "3", "-", "7" ]
train
https://github.com/vakinge/jeesuite-libs/blob/c48fe2c7fbd294892cf4030dbec96e744dd3e386/jeesuite-common/src/main/java/com/jeesuite/common/util/DateUtils.java#L159-L166
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/io/MatrixVectorWriter.java
MatrixVectorWriter.printCoordinate
public void printCoordinate(int[] row, int[] column, long[] data, int offset) { int size = row.length; if (size != column.length || size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) ...
java
public void printCoordinate(int[] row, int[] column, long[] data, int offset) { int size = row.length; if (size != column.length || size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) ...
[ "public", "void", "printCoordinate", "(", "int", "[", "]", "row", ",", "int", "[", "]", "column", ",", "long", "[", "]", "data", ",", "int", "offset", ")", "{", "int", "size", "=", "row", ".", "length", ";", "if", "(", "size", "!=", "column", "."...
Prints the coordinate format to the underlying stream. One index pair and entry on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based.
[ "Prints", "the", "coordinate", "format", "to", "the", "underlying", "stream", ".", "One", "index", "pair", "and", "entry", "on", "each", "line", ".", "The", "offset", "is", "added", "to", "each", "index", "typically", "this", "can", "transform", "from", "a...
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/io/MatrixVectorWriter.java#L370-L378
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java
AuditUtils.organizationCreated
public static AuditEntryBean organizationCreated(OrganizationBean bean, ISecurityContext securityContext) { AuditEntryBean entry = newEntry(bean.getId(), AuditEntityType.Organization, securityContext); entry.setEntityId(null); entry.setEntityVersion(null); entry.setWhat(AuditEntryType.Cr...
java
public static AuditEntryBean organizationCreated(OrganizationBean bean, ISecurityContext securityContext) { AuditEntryBean entry = newEntry(bean.getId(), AuditEntityType.Organization, securityContext); entry.setEntityId(null); entry.setEntityVersion(null); entry.setWhat(AuditEntryType.Cr...
[ "public", "static", "AuditEntryBean", "organizationCreated", "(", "OrganizationBean", "bean", ",", "ISecurityContext", "securityContext", ")", "{", "AuditEntryBean", "entry", "=", "newEntry", "(", "bean", ".", "getId", "(", ")", ",", "AuditEntityType", ".", "Organiz...
Creates an {@link AuditEntryBean} for the 'organization created' event. @param bean the bean @param securityContext the security context @return the audit entry
[ "Creates", "an", "{" ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java#L188-L194
kite-sdk/kite
kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java
Compatibility.checkAndWarn
public static void checkAndWarn(String namespace, String datasetName, Schema schema) { try { checkDatasetName(namespace, datasetName); checkSchema(schema); } catch (IllegalArgumentException e) { LOG.warn(e.getMessage()); } catch (IllegalStateException e) { LOG.warn(e.getMessage()); ...
java
public static void checkAndWarn(String namespace, String datasetName, Schema schema) { try { checkDatasetName(namespace, datasetName); checkSchema(schema); } catch (IllegalArgumentException e) { LOG.warn(e.getMessage()); } catch (IllegalStateException e) { LOG.warn(e.getMessage()); ...
[ "public", "static", "void", "checkAndWarn", "(", "String", "namespace", ",", "String", "datasetName", ",", "Schema", "schema", ")", "{", "try", "{", "checkDatasetName", "(", "namespace", ",", "datasetName", ")", ";", "checkSchema", "(", "schema", ")", ";", "...
Checks the name and schema for known compatibility issues and warns. If the column names are not compatible across components, this will warn the user. @param namespace a String namespace @param datasetName a String dataset name @param schema a {@link Schema}
[ "Checks", "the", "name", "and", "schema", "for", "known", "compatibility", "issues", "and", "warns", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Compatibility.java#L82-L91
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/ranges/Densify.java
Densify.canBeMerged
private boolean canBeMerged(DenseRange<T> current, DenseRange<T> next) { return Order.of(comparator, current.end(), Optional.of(next.begin())) == Order.EQ || current.overlaps(next); }
java
private boolean canBeMerged(DenseRange<T> current, DenseRange<T> next) { return Order.of(comparator, current.end(), Optional.of(next.begin())) == Order.EQ || current.overlaps(next); }
[ "private", "boolean", "canBeMerged", "(", "DenseRange", "<", "T", ">", "current", ",", "DenseRange", "<", "T", ">", "next", ")", "{", "return", "Order", ".", "of", "(", "comparator", ",", "current", ".", "end", "(", ")", ",", "Optional", ".", "of", "...
<code> |-----------| |-----| </code> or <code> |-----------| |------| </code> @param current the current range @param next the next range @return true if the two ranges can be merged
[ "<code", ">", "|", "-----------", "|", "|", "-----", "|", "<", "/", "code", ">", "or", "<code", ">", "|", "-----------", "|", "|", "------", "|", "<", "/", "code", ">" ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/ranges/Densify.java#L72-L74
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkElementPresence
protected void checkElementPresence(PageElement pageElement, boolean present) throws FailureException { if (present) { try { Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator(pageElement))); } catch (final Exception e) { ...
java
protected void checkElementPresence(PageElement pageElement, boolean present) throws FailureException { if (present) { try { Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator(pageElement))); } catch (final Exception e) { ...
[ "protected", "void", "checkElementPresence", "(", "PageElement", "pageElement", ",", "boolean", "present", ")", "throws", "FailureException", "{", "if", "(", "present", ")", "{", "try", "{", "Context", ".", "waitUntil", "(", "ExpectedConditions", ".", "presenceOfE...
Checks if an html element (PageElement) is displayed. @param pageElement Is target element @param present Is target element supposed to be present @throws FailureException if the scenario encounters a functional error. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_TO_FIND_ELEMENT} message...
[ "Checks", "if", "an", "html", "element", "(", "PageElement", ")", "is", "displayed", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L426-L440
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/NormOps_DDRM.java
NormOps_DDRM.fastElementP
public static double fastElementP(DMatrixD1 A , double p ) { if( p == 2 ) { return fastNormF(A); } else { double total = 0; int size = A.getNumElements(); for( int i = 0; i < size; i++ ) { double a = A.get(i); total += Ma...
java
public static double fastElementP(DMatrixD1 A , double p ) { if( p == 2 ) { return fastNormF(A); } else { double total = 0; int size = A.getNumElements(); for( int i = 0; i < size; i++ ) { double a = A.get(i); total += Ma...
[ "public", "static", "double", "fastElementP", "(", "DMatrixD1", "A", ",", "double", "p", ")", "{", "if", "(", "p", "==", "2", ")", "{", "return", "fastNormF", "(", "A", ")", ";", "}", "else", "{", "double", "total", "=", "0", ";", "int", "size", ...
Same as {@link #elementP} but runs faster by not mitigating overflow/underflow related problems. @param A Matrix. Not modified. @param p p value. @return The norm's value.
[ "Same", "as", "{", "@link", "#elementP", "}", "but", "runs", "faster", "by", "not", "mitigating", "overflow", "/", "underflow", "related", "problems", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/NormOps_DDRM.java#L259-L275
bazaarvoice/emodb
event/src/main/java/com/bazaarvoice/emodb/event/db/astyanax/AstyanaxEventId.java
AstyanaxEventId.computeChecksum
private static int computeChecksum(byte[] buf, int offset, int length, String channel) { Hasher hasher = Hashing.murmur3_32().newHasher(); hasher.putBytes(buf, offset, length); hasher.putUnencodedChars(channel); return hasher.hash().asInt() & 0xffff; }
java
private static int computeChecksum(byte[] buf, int offset, int length, String channel) { Hasher hasher = Hashing.murmur3_32().newHasher(); hasher.putBytes(buf, offset, length); hasher.putUnencodedChars(channel); return hasher.hash().asInt() & 0xffff; }
[ "private", "static", "int", "computeChecksum", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ",", "String", "channel", ")", "{", "Hasher", "hasher", "=", "Hashing", ".", "murmur3_32", "(", ")", ".", "newHasher", "(", ")", ";...
Computes a 16-bit checksum of the contents of the specific ByteBuffer and channel name.
[ "Computes", "a", "16", "-", "bit", "checksum", "of", "the", "contents", "of", "the", "specific", "ByteBuffer", "and", "channel", "name", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/event/src/main/java/com/bazaarvoice/emodb/event/db/astyanax/AstyanaxEventId.java#L75-L80
jbundle/jbundle
thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/JHtmlView.java
JHtmlView.linkActivated
public void linkActivated(URL url, BaseApplet applet, int iOptions) { m_editorPane.linkActivated(url, applet, iOptions); }
java
public void linkActivated(URL url, BaseApplet applet, int iOptions) { m_editorPane.linkActivated(url, applet, iOptions); }
[ "public", "void", "linkActivated", "(", "URL", "url", ",", "BaseApplet", "applet", ",", "int", "iOptions", ")", "{", "m_editorPane", ".", "linkActivated", "(", "url", ",", "applet", ",", "iOptions", ")", ";", "}" ]
Follows the reference in an link. The given url is the requested reference. By default this calls <a href="#setPage">setPage</a>, and if an exception is thrown the original previous document is restored and a beep sounded. If an attempt was made to follow a link, but it represented a malformed url, this method will b...
[ "Follows", "the", "reference", "in", "an", "link", ".", "The", "given", "url", "is", "the", "requested", "reference", ".", "By", "default", "this", "calls", "<a", "href", "=", "#setPage", ">", "setPage<", "/", "a", ">", "and", "if", "an", "exception", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/JHtmlView.java#L225-L228
google/identity-toolkit-java-client
src/main/java/com/google/identitytoolkit/GitkitClient.java
GitkitClient.getOobResponse
public OobResponse getOobResponse(HttpServletRequest req) throws GitkitServerException { String gitkitToken = lookupCookie(req, cookieName); return getOobResponse(req, gitkitToken); }
java
public OobResponse getOobResponse(HttpServletRequest req) throws GitkitServerException { String gitkitToken = lookupCookie(req, cookieName); return getOobResponse(req, gitkitToken); }
[ "public", "OobResponse", "getOobResponse", "(", "HttpServletRequest", "req", ")", "throws", "GitkitServerException", "{", "String", "gitkitToken", "=", "lookupCookie", "(", "req", ",", "cookieName", ")", ";", "return", "getOobResponse", "(", "req", ",", "gitkitToken...
Gets out-of-band response. Used by oob endpoint for ResetPassword and ChangeEmail operation. The web site needs to send user an email containing the oobUrl in the response. The user needs to click the oobUrl to finish the operation. @param req http request for the oob endpoint @return the oob response. @throws GitkitS...
[ "Gets", "out", "-", "of", "-", "band", "response", ".", "Used", "by", "oob", "endpoint", "for", "ResetPassword", "and", "ChangeEmail", "operation", ".", "The", "web", "site", "needs", "to", "send", "user", "an", "email", "containing", "the", "oobUrl", "in"...
train
https://github.com/google/identity-toolkit-java-client/blob/61dda1aabbd541ad5e431e840fd266bfca5f8a4a/src/main/java/com/google/identitytoolkit/GitkitClient.java#L444-L448
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.getCreditHistory
public void getCreditHistory(final String bucket, final String afterId, final int length, @NonNull final CreditHistoryOrder order, BranchListResponseListener callback) { ServerRequest req = new ServerRequestGetRewardHistory(context_, bucket, afterId, length, order, callback); ...
java
public void getCreditHistory(final String bucket, final String afterId, final int length, @NonNull final CreditHistoryOrder order, BranchListResponseListener callback) { ServerRequest req = new ServerRequestGetRewardHistory(context_, bucket, afterId, length, order, callback); ...
[ "public", "void", "getCreditHistory", "(", "final", "String", "bucket", ",", "final", "String", "afterId", ",", "final", "int", "length", ",", "@", "NonNull", "final", "CreditHistoryOrder", "order", ",", "BranchListResponseListener", "callback", ")", "{", "ServerR...
<p>Gets the credit history of the specified bucket and triggers a callback to handle the response.</p> @param bucket A {@link String} value containing the name of the referral bucket that the code will belong to. @param afterId A {@link String} value containing the ID of the history record to begin after. This allo...
[ "<p", ">", "Gets", "the", "credit", "history", "of", "the", "specified", "bucket", "and", "triggers", "a", "callback", "to", "handle", "the", "response", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1994-L2000
javagl/Common
src/main/java/de/javagl/common/xml/XmlUtils.java
XmlUtils.getFirstChild
public static Node getFirstChild(Node node, String childNodeName) { NodeList childNodes = node.getChildNodes(); for (int i=0; i<childNodes.getLength(); i++) { Node child = childNodes.item(i); String childName = child.getNodeName(); if (childName.equ...
java
public static Node getFirstChild(Node node, String childNodeName) { NodeList childNodes = node.getChildNodes(); for (int i=0; i<childNodes.getLength(); i++) { Node child = childNodes.item(i); String childName = child.getNodeName(); if (childName.equ...
[ "public", "static", "Node", "getFirstChild", "(", "Node", "node", ",", "String", "childNodeName", ")", "{", "NodeList", "childNodes", "=", "node", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "childNodes", ".", ...
Returns the first child of the given node with the given name (ignoring upper/lower case), or <code>null</code> if no such child is found. @param node The node @param childNodeName The child node name @return The child with the given name, or <code>null</code>
[ "Returns", "the", "first", "child", "of", "the", "given", "node", "with", "the", "given", "name", "(", "ignoring", "upper", "/", "lower", "case", ")", "or", "<code", ">", "null<", "/", "code", ">", "if", "no", "such", "child", "is", "found", "." ]
train
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L388-L401
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/factory/feature/tracker/FactoryPointTracker.java
FactoryPointTracker.combined_ST_SURF_KLT
public static <I extends ImageGray<I>, D extends ImageGray<D>> PointTracker<I> combined_ST_SURF_KLT(ConfigGeneralDetector configExtract, PkltConfig kltConfig, int reactivateThreshold, ConfigSurfDescribe.Stability configDescribe, ConfigSlidingIntegral configOrientation, ...
java
public static <I extends ImageGray<I>, D extends ImageGray<D>> PointTracker<I> combined_ST_SURF_KLT(ConfigGeneralDetector configExtract, PkltConfig kltConfig, int reactivateThreshold, ConfigSurfDescribe.Stability configDescribe, ConfigSlidingIntegral configOrientation, ...
[ "public", "static", "<", "I", "extends", "ImageGray", "<", "I", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "PointTracker", "<", "I", ">", "combined_ST_SURF_KLT", "(", "ConfigGeneralDetector", "configExtract", ",", "PkltConfig", "kltConfig", ","...
Creates a tracker which detects Shi-Tomasi corner features, describes them with SURF, and nominally tracks them using KLT. @see ShiTomasiCornerIntensity @see DescribePointSurf @see boofcv.abst.feature.tracker.DdaManagerDetectDescribePoint @param configExtract Configuration for extracting features @param kltConfig Con...
[ "Creates", "a", "tracker", "which", "detects", "Shi", "-", "Tomasi", "corner", "features", "describes", "them", "with", "SURF", "and", "nominally", "tracks", "them", "using", "KLT", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/feature/tracker/FactoryPointTracker.java#L422-L455
threerings/nenya
tools/src/main/java/com/threerings/media/tile/tools/MapFileTileSetIDBroker.java
MapFileTileSetIDBroker.writeMapFile
public static void writeMapFile (BufferedWriter bout, HashMap<String, Integer> map) throws IOException { String[] lines = new String[map.size()]; Iterator<String> iter = map.keySet().iterator(); for (int ii = 0; iter.hasNext(); ii++) { String key = iter.next(); ...
java
public static void writeMapFile (BufferedWriter bout, HashMap<String, Integer> map) throws IOException { String[] lines = new String[map.size()]; Iterator<String> iter = map.keySet().iterator(); for (int ii = 0; iter.hasNext(); ii++) { String key = iter.next(); ...
[ "public", "static", "void", "writeMapFile", "(", "BufferedWriter", "bout", ",", "HashMap", "<", "String", ",", "Integer", ">", "map", ")", "throws", "IOException", "{", "String", "[", "]", "lines", "=", "new", "String", "[", "map", ".", "size", "(", ")",...
Writes out a mapping from strings to integers in a manner that can be read back in via {@link #readMapFile}.
[ "Writes", "out", "a", "mapping", "from", "strings", "to", "integers", "in", "a", "manner", "that", "can", "be", "read", "back", "in", "via", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/tools/src/main/java/com/threerings/media/tile/tools/MapFileTileSetIDBroker.java#L162-L178
stapler/stapler
core/src/main/java/org/kohsuke/stapler/Stapler.java
Stapler.invoke
public void invoke(HttpServletRequest req, HttpServletResponse rsp, Object root, String url) throws IOException, ServletException { RequestImpl sreq = new RequestImpl(this, req, new ArrayList<AncestorImpl>(), new TokenList(url)); RequestImpl oreq = CURRENT_REQUEST.get(); CURRENT_REQUEST.set(sreq...
java
public void invoke(HttpServletRequest req, HttpServletResponse rsp, Object root, String url) throws IOException, ServletException { RequestImpl sreq = new RequestImpl(this, req, new ArrayList<AncestorImpl>(), new TokenList(url)); RequestImpl oreq = CURRENT_REQUEST.get(); CURRENT_REQUEST.set(sreq...
[ "public", "void", "invoke", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "rsp", ",", "Object", "root", ",", "String", "url", ")", "throws", "IOException", ",", "ServletException", "{", "RequestImpl", "sreq", "=", "new", "RequestImpl", "(", "this...
Performs stapler processing on the given root object and request URL.
[ "Performs", "stapler", "processing", "on", "the", "given", "root", "object", "and", "request", "URL", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/Stapler.java#L666-L681
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_ipMigration_duration_GET
public OvhOrder dedicated_server_serviceName_ipMigration_duration_GET(String serviceName, String duration, String ip, String token) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/ipMigration/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "ip", ip); quer...
java
public OvhOrder dedicated_server_serviceName_ipMigration_duration_GET(String serviceName, String duration, String ip, String token) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/ipMigration/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "ip", ip); quer...
[ "public", "OvhOrder", "dedicated_server_serviceName_ipMigration_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "String", "ip", ",", "String", "token", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serv...
Get prices and contracts information REST: GET /order/dedicated/server/{serviceName}/ipMigration/{duration} @param ip [required] The IP to move to this server @param token [required] IP migration token @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2572-L2579
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java
ChainedIoHandler.messageReceived
@Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); }
java
@Override public void messageReceived(IoSession session, Object message) throws Exception { chain.execute(null, session, message); }
[ "@", "Override", "public", "void", "messageReceived", "(", "IoSession", "session", ",", "Object", "message", ")", "throws", "Exception", "{", "chain", ".", "execute", "(", "null", ",", "session", ",", "message", ")", ";", "}" ]
Handles the specified <tt>messageReceived</tt> event with the {@link IoHandlerCommand} or {@link IoHandlerChain} you specified in the constructor.
[ "Handles", "the", "specified", "<tt", ">", "messageReceived<", "/", "tt", ">", "event", "with", "the", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/handler/chain/ChainedIoHandler.java#L64-L68
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/tools/Tools.java
Tools.selectRules
public static void selectRules(JLanguageTool lt, List<String> disabledRuleIds, List<String> enabledRuleIds, boolean useEnabledOnly) { Set<String> disabledRuleIdsSet = new HashSet<>(); disabledRuleIdsSet.addAll(disabledRuleIds); Set<String> enabledRuleIdsSet = new HashSet<>(); enabledRuleIdsSet.addAll(en...
java
public static void selectRules(JLanguageTool lt, List<String> disabledRuleIds, List<String> enabledRuleIds, boolean useEnabledOnly) { Set<String> disabledRuleIdsSet = new HashSet<>(); disabledRuleIdsSet.addAll(disabledRuleIds); Set<String> enabledRuleIdsSet = new HashSet<>(); enabledRuleIdsSet.addAll(en...
[ "public", "static", "void", "selectRules", "(", "JLanguageTool", "lt", ",", "List", "<", "String", ">", "disabledRuleIds", ",", "List", "<", "String", ">", "enabledRuleIds", ",", "boolean", "useEnabledOnly", ")", "{", "Set", "<", "String", ">", "disabledRuleId...
Enable and disable rules of the given LanguageTool instance. @param lt LanguageTool object @param disabledRuleIds ids of the rules to be disabled @param enabledRuleIds ids of the rules to be enabled @param useEnabledOnly if set to {@code true}, disable all rules except those enabled explicitly
[ "Enable", "and", "disable", "rules", "of", "the", "given", "LanguageTool", "instance", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/tools/Tools.java#L286-L292
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java
SystemInputJson.asValueDef
private static VarValueDef asValueDef( String valueName, JsonObject json) { try { VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName)); // Get the type of this value boolean failure = json.getBoolean( FAILURE_KEY, false); boolean once = json.getBoolean( ONCE_K...
java
private static VarValueDef asValueDef( String valueName, JsonObject json) { try { VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName)); // Get the type of this value boolean failure = json.getBoolean( FAILURE_KEY, false); boolean once = json.getBoolean( ONCE_K...
[ "private", "static", "VarValueDef", "asValueDef", "(", "String", "valueName", ",", "JsonObject", "json", ")", "{", "try", "{", "VarValueDef", "valueDef", "=", "new", "VarValueDef", "(", "ObjectUtils", ".", "toObject", "(", "valueName", ")", ")", ";", "// Get t...
Returns the value definition represented by the given JSON object.
[ "Returns", "the", "value", "definition", "represented", "by", "the", "given", "JSON", "object", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java#L342-L380
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.invalidateAndSet
@Override public Object invalidateAndSet(com.ibm.ws.cache.EntryInfo ei, Object value, boolean coordinate) { final String methodName = "invalidateAndSet()"; Object oldValue = null; Object id = null; if (ei != null && value != null) { id = ei.getIdObject(); com....
java
@Override public Object invalidateAndSet(com.ibm.ws.cache.EntryInfo ei, Object value, boolean coordinate) { final String methodName = "invalidateAndSet()"; Object oldValue = null; Object id = null; if (ei != null && value != null) { id = ei.getIdObject(); com....
[ "@", "Override", "public", "Object", "invalidateAndSet", "(", "com", ".", "ibm", ".", "ws", ".", "cache", ".", "EntryInfo", "ei", ",", "Object", "value", ",", "boolean", "coordinate", ")", "{", "final", "String", "methodName", "=", "\"invalidateAndSet()\"", ...
Puts an entry into the cache. If the entry already exists in the cache, this method will ALSO update the same. Called by DistributedMap @param ei The EntryInfo object @param value The value of the object @param coordinate Indicates that the value should be set in other caches caching this value. (No effect on CoreCac...
[ "Puts", "an", "entry", "into", "the", "cache", ".", "If", "the", "entry", "already", "exists", "in", "the", "cache", "this", "method", "will", "ALSO", "update", "the", "same", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L439-L455
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Drawer.addItemAtPosition
public void addItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { mDrawerBuilder.getItemAdapter().add(position, drawerItem); }
java
public void addItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { mDrawerBuilder.getItemAdapter().add(position, drawerItem); }
[ "public", "void", "addItemAtPosition", "(", "@", "NonNull", "IDrawerItem", "drawerItem", ",", "int", "position", ")", "{", "mDrawerBuilder", ".", "getItemAdapter", "(", ")", ".", "add", "(", "position", ",", "drawerItem", ")", ";", "}" ]
Add a drawerItem at a specific position @param drawerItem @param position
[ "Add", "a", "drawerItem", "at", "a", "specific", "position" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L733-L735
radkovo/jStyleParser
src/main/java/cz/vutbr/web/domassign/Analyzer.java
Analyzer.assingDeclarationsToDOM
protected DeclarationMap assingDeclarationsToDOM(Document doc, MediaSpec media, final boolean inherit) { // classify the rules classifyAllSheets(media); // resulting map DeclarationMap declarations = new DeclarationMap(); // if the holder is empty skip evaluation if(rules!=null && !rul...
java
protected DeclarationMap assingDeclarationsToDOM(Document doc, MediaSpec media, final boolean inherit) { // classify the rules classifyAllSheets(media); // resulting map DeclarationMap declarations = new DeclarationMap(); // if the holder is empty skip evaluation if(rules!=null && !rul...
[ "protected", "DeclarationMap", "assingDeclarationsToDOM", "(", "Document", "doc", ",", "MediaSpec", "media", ",", "final", "boolean", "inherit", ")", "{", "// classify the rules", "classifyAllSheets", "(", "media", ")", ";", "// resulting map", "DeclarationMap", "declar...
Creates map of declarations assigned to each element of a DOM tree @param doc DOM document @param media Media type to be used for declarations @param inherit Inheritance (cascade propagation of values) @return Map of elements as keys and their declarations
[ "Creates", "map", "of", "declarations", "assigned", "to", "each", "element", "of", "a", "DOM", "tree" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/domassign/Analyzer.java#L200-L230
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java
HadoopInputs.readHadoopFile
public static <K, V> HadoopInputFormat<K, V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K, V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath, JobConf job) { // set input path in JobConf org.apache.hadoop.mapred.FileInputFormat.addInputPath(job, new org.apache.hadoop.fs.Path(inputPath...
java
public static <K, V> HadoopInputFormat<K, V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K, V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath, JobConf job) { // set input path in JobConf org.apache.hadoop.mapred.FileInputFormat.addInputPath(job, new org.apache.hadoop.fs.Path(inputPath...
[ "public", "static", "<", "K", ",", "V", ">", "HadoopInputFormat", "<", "K", ",", "V", ">", "readHadoopFile", "(", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "FileInputFormat", "<", "K", ",", "V", ">", "mapredInputFormat", ",", "Class", "<...
Creates a Flink {@link InputFormat} that wraps the given Hadoop {@link org.apache.hadoop.mapred.FileInputFormat}. @return A Flink InputFormat that wraps the Hadoop FileInputFormat.
[ "Creates", "a", "Flink", "{", "@link", "InputFormat", "}", "that", "wraps", "the", "given", "Hadoop", "{", "@link", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "FileInputFormat", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java#L50-L55
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/Barcode.java
Barcode.createImageWithBarcode
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { try { return Image.getInstance(createTemplateWithBarcode(cb, barColor, textColor)); } catch (Exception e) { throw new ExceptionConverter(e); } }
java
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { try { return Image.getInstance(createTemplateWithBarcode(cb, barColor, textColor)); } catch (Exception e) { throw new ExceptionConverter(e); } }
[ "public", "Image", "createImageWithBarcode", "(", "PdfContentByte", "cb", ",", "Color", "barColor", ",", "Color", "textColor", ")", "{", "try", "{", "return", "Image", ".", "getInstance", "(", "createTemplateWithBarcode", "(", "cb", ",", "barColor", ",", "textCo...
Creates an <CODE>Image</CODE> with the barcode. @param cb the <CODE>PdfContentByte</CODE> to create the <CODE>Image</CODE>. It serves no other use @param barColor the color of the bars. It can be <CODE>null</CODE> @param textColor the color of the text. It can be <CODE>null</CODE> @return the <CODE>Image</CODE> @see #p...
[ "Creates", "an", "<CODE", ">", "Image<", "/", "CODE", ">", "with", "the", "barcode", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/Barcode.java#L422-L429
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyEvalContinue
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { int y = previousOutput; for (int i = 0; i < part.size; i++) { y = multiply(y,x) ^ (part.data[i]&0xFF); } return y; }
java
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { int y = previousOutput; for (int i = 0; i < part.size; i++) { y = multiply(y,x) ^ (part.data[i]&0xFF); } return y; }
[ "public", "int", "polyEvalContinue", "(", "int", "previousOutput", ",", "GrowQueue_I8", "part", ",", "int", "x", ")", "{", "int", "y", "=", "previousOutput", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "part", ".", "size", ";", "i", "++", ...
Continue evaluating a polynomial which has been broken up into multiple arrays. @param previousOutput Output from the evaluation of the prior part of the polynomial @param part Additional segment of the polynomial @param x Point it's being evaluated at @return results
[ "Continue", "evaluating", "a", "polynomial", "which", "has", "been", "broken", "up", "into", "multiple", "arrays", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L335-L342
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java
FactoryThresholdBinary.localSauvola
public static <T extends ImageGray<T>> InputToBinary<T> localSauvola(ConfigLength width, boolean down, float k, Class<T> inputType) { if( BOverrideFactoryThresholdBinary.localSauvola != null ) return BOverrideFactoryThresholdBinary.localSauvola.handle(width, k, down, inputType); InputToBinary<GrayF32> sauvola...
java
public static <T extends ImageGray<T>> InputToBinary<T> localSauvola(ConfigLength width, boolean down, float k, Class<T> inputType) { if( BOverrideFactoryThresholdBinary.localSauvola != null ) return BOverrideFactoryThresholdBinary.localSauvola.handle(width, k, down, inputType); InputToBinary<GrayF32> sauvola...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InputToBinary", "<", "T", ">", "localSauvola", "(", "ConfigLength", "width", ",", "boolean", "down", ",", "float", "k", ",", "Class", "<", "T", ">", "inputType", ")", "{", "if",...
@see ThresholdSauvola @param width Width of square region. @param down Should it threshold up or down. @param k User specified threshold adjustment factor. Must be positive. Try 0.3 @param inputType Type of input image @return Filter to binary
[ "@see", "ThresholdSauvola" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L68-L81
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java
TraceNLS.getFormattedMessage
public String getFormattedMessage(String key, Object[] args, String defaultString) { return resolver.getMessage(caller, null, ivBundleName, key, args, defaultString, true, null, false); }
java
public String getFormattedMessage(String key, Object[] args, String defaultString) { return resolver.getMessage(caller, null, ivBundleName, key, args, defaultString, true, null, false); }
[ "public", "String", "getFormattedMessage", "(", "String", "key", ",", "Object", "[", "]", "args", ",", "String", "defaultString", ")", "{", "return", "resolver", ".", "getMessage", "(", "caller", ",", "null", ",", "ivBundleName", ",", "key", ",", "args", "...
Return the message obtained by looking up the localized text indicated by the key in the ResourceBundle wrapped by this instance, then formatting the message using the specified arguments as substitution parameters. <p> The message is formatted using the java.text.MessageFormat class. Substitution parameters are handle...
[ "Return", "the", "message", "obtained", "by", "looking", "up", "the", "localized", "text", "indicated", "by", "the", "key", "in", "the", "ResourceBundle", "wrapped", "by", "this", "instance", "then", "formatting", "the", "message", "using", "the", "specified", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java#L184-L186
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/ComponentAnnotationLoader.java
ComponentAnnotationLoader.initialize
public void initialize(ComponentManager manager, ClassLoader classLoader) { try { // Find all declared components by retrieving the list defined in COMPONENT_LIST. List<ComponentDeclaration> componentDeclarations = getDeclaredComponents(classLoader, COMPONENT_LIST); // F...
java
public void initialize(ComponentManager manager, ClassLoader classLoader) { try { // Find all declared components by retrieving the list defined in COMPONENT_LIST. List<ComponentDeclaration> componentDeclarations = getDeclaredComponents(classLoader, COMPONENT_LIST); // F...
[ "public", "void", "initialize", "(", "ComponentManager", "manager", ",", "ClassLoader", "classLoader", ")", "{", "try", "{", "// Find all declared components by retrieving the list defined in COMPONENT_LIST.", "List", "<", "ComponentDeclaration", ">", "componentDeclarations", "...
Loads all components defined using annotations. @param manager the component manager to use to dynamically register components @param classLoader the classloader to use to look for the Component list declaration file ( {@code META-INF/components.txt})
[ "Loads", "all", "components", "defined", "using", "annotations", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/ComponentAnnotationLoader.java#L99-L126
carewebframework/carewebframework-core
org.carewebframework.messaging-parent/org.carewebframework.messaging.amqp-parent/org.carewebframework.messaging.amqp.rabbitmq/src/main/java/org/carewebframework/messaging/amqp/rabbitmq/Broker.java
Broker.sendMessage
public void sendMessage(String channel, Message message) { ensureChannel(channel); admin.getRabbitTemplate().convertAndSend(exchange.getName(), channel, message); }
java
public void sendMessage(String channel, Message message) { ensureChannel(channel); admin.getRabbitTemplate().convertAndSend(exchange.getName(), channel, message); }
[ "public", "void", "sendMessage", "(", "String", "channel", ",", "Message", "message", ")", "{", "ensureChannel", "(", "channel", ")", ";", "admin", ".", "getRabbitTemplate", "(", ")", ".", "convertAndSend", "(", "exchange", ".", "getName", "(", ")", ",", "...
Sends an event to the default exchange. @param channel Name of the channel. @param message Message to send.
[ "Sends", "an", "event", "to", "the", "default", "exchange", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.messaging-parent/org.carewebframework.messaging.amqp-parent/org.carewebframework.messaging.amqp.rabbitmq/src/main/java/org/carewebframework/messaging/amqp/rabbitmq/Broker.java#L104-L107
h2oai/h2o-3
h2o-automl/src/main/java/ai/h2o/automl/AutoML.java
AutoML.pollAndUpdateProgress
private void pollAndUpdateProgress(Stage stage, String name, WorkAllocations.Work work, Job parentJob, Job subJob) { pollAndUpdateProgress(stage, name, work, parentJob, subJob, false); }
java
private void pollAndUpdateProgress(Stage stage, String name, WorkAllocations.Work work, Job parentJob, Job subJob) { pollAndUpdateProgress(stage, name, work, parentJob, subJob, false); }
[ "private", "void", "pollAndUpdateProgress", "(", "Stage", "stage", ",", "String", "name", ",", "WorkAllocations", ".", "Work", "work", ",", "Job", "parentJob", ",", "Job", "subJob", ")", "{", "pollAndUpdateProgress", "(", "stage", ",", "name", ",", "work", "...
***************** Jobs Build / Configure / Run / Poll section (model agnostic, kind of...) *****************//
[ "*****************", "Jobs", "Build", "/", "Configure", "/", "Run", "/", "Poll", "section", "(", "model", "agnostic", "kind", "of", "...", ")", "*****************", "//" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-automl/src/main/java/ai/h2o/automl/AutoML.java#L555-L557
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java
NodePingUtil.pingHttpClient
static void pingHttpClient(URI connection, PingCallback callback, HttpServerExchange exchange, UndertowClient client, XnioSsl xnioSsl, OptionMap options) { final XnioIoThread thread = exchange.getIoThread(); final RequestExchangeListener exchangeListener = new RequestExchangeListener(callback, NodeHeal...
java
static void pingHttpClient(URI connection, PingCallback callback, HttpServerExchange exchange, UndertowClient client, XnioSsl xnioSsl, OptionMap options) { final XnioIoThread thread = exchange.getIoThread(); final RequestExchangeListener exchangeListener = new RequestExchangeListener(callback, NodeHeal...
[ "static", "void", "pingHttpClient", "(", "URI", "connection", ",", "PingCallback", "callback", ",", "HttpServerExchange", "exchange", ",", "UndertowClient", "client", ",", "XnioSsl", "xnioSsl", ",", "OptionMap", "options", ")", "{", "final", "XnioIoThread", "thread"...
Try to ping a server using the undertow client. @param connection the connection URI @param callback the ping callback @param exchange the http servers exchange @param client the undertow client @param xnioSsl the ssl setup @param options the options
[ "Try", "to", "ping", "a", "server", "using", "the", "undertow", "client", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java#L103-L111
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/util/UrlUtilities.java
UrlUtilities.createBuddyIconUrl
@Deprecated public static String createBuddyIconUrl(int iconFarm, int iconServer, String id) { return createBuddyIconUrl("http", iconFarm, iconServer, id); }
java
@Deprecated public static String createBuddyIconUrl(int iconFarm, int iconServer, String id) { return createBuddyIconUrl("http", iconFarm, iconServer, id); }
[ "@", "Deprecated", "public", "static", "String", "createBuddyIconUrl", "(", "int", "iconFarm", ",", "int", "iconServer", ",", "String", "id", ")", "{", "return", "createBuddyIconUrl", "(", "\"http\"", ",", "iconFarm", ",", "iconServer", ",", "id", ")", ";", ...
Construct the BuddyIconUrl with {@code http} scheme. <p> If none available, return the <a href="http://www.flickr.com/images/buddyicon.jpg">default</a>, or an URL assembled from farm, iconserver and nsid. @see <a href="http://flickr.com/services/api/misc.buddyicons.html">Flickr Documentation</a> @param iconFarm @param...
[ "Construct", "the", "BuddyIconUrl", "with", "{", "@code", "http", "}", "scheme", ".", "<p", ">", "If", "none", "available", "return", "the", "<a", "href", "=", "http", ":", "//", "www", ".", "flickr", ".", "com", "/", "images", "/", "buddyicon", ".", ...
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/UrlUtilities.java#L182-L185
apache/groovy
src/main/java/org/codehaus/groovy/transform/trait/Traits.java
Traits.getAsType
@SuppressWarnings("unchecked") public static <T> T getAsType(Object self, Class<T> clazz) { if (self instanceof GeneratedGroovyProxy) { Object proxyTarget = ((GeneratedGroovyProxy)self).getProxyTarget(); if (clazz.isAssignableFrom(proxyTarget.getClass())) { return (T)...
java
@SuppressWarnings("unchecked") public static <T> T getAsType(Object self, Class<T> clazz) { if (self instanceof GeneratedGroovyProxy) { Object proxyTarget = ((GeneratedGroovyProxy)self).getProxyTarget(); if (clazz.isAssignableFrom(proxyTarget.getClass())) { return (T)...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getAsType", "(", "Object", "self", ",", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "self", "instanceof", "GeneratedGroovyProxy", ")", "{", "Object", "...
Converts a class implementing some trait into a target class. If the trait is a dynamic proxy and that the target class is assignable to the target object of the proxy, then the target object is returned. Otherwise, falls back to {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#asType(java.lang.Object, Class)} @...
[ "Converts", "a", "class", "implementing", "some", "trait", "into", "a", "target", "class", ".", "If", "the", "trait", "is", "a", "dynamic", "proxy", "and", "that", "the", "target", "class", "is", "assignable", "to", "the", "target", "object", "of", "the", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/trait/Traits.java#L253-L262
apache/incubator-heron
heron/packing/src/java/org/apache/heron/packing/binpacking/FirstFitDecreasingPacking.java
FirstFitDecreasingPacking.removeInstancesFromContainers
private void removeInstancesFromContainers(PackingPlanBuilder packingPlanBuilder, Map<String, Integer> componentsToScaleDown) { List<ResourceRequirement> resourceRequirements = getSortedInstances(componentsToScaleDown.keySet()); InstanceCountScorer instance...
java
private void removeInstancesFromContainers(PackingPlanBuilder packingPlanBuilder, Map<String, Integer> componentsToScaleDown) { List<ResourceRequirement> resourceRequirements = getSortedInstances(componentsToScaleDown.keySet()); InstanceCountScorer instance...
[ "private", "void", "removeInstancesFromContainers", "(", "PackingPlanBuilder", "packingPlanBuilder", ",", "Map", "<", "String", ",", "Integer", ">", "componentsToScaleDown", ")", "{", "List", "<", "ResourceRequirement", ">", "resourceRequirements", "=", "getSortedInstance...
Removes instances from containers during scaling down @param packingPlanBuilder existing packing plan @param componentsToScaleDown scale down factor for the components.
[ "Removes", "instances", "from", "containers", "during", "scaling", "down" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/packing/src/java/org/apache/heron/packing/binpacking/FirstFitDecreasingPacking.java#L257-L280
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.scalarSet
public SDVariable scalarSet(String name, SDVariable in, Number set) { SDVariable ret = f().scalarSet(in, set); return updateVariableNameAndReference(ret, name); }
java
public SDVariable scalarSet(String name, SDVariable in, Number set) { SDVariable ret = f().scalarSet(in, set); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "scalarSet", "(", "String", "name", ",", "SDVariable", "in", ",", "Number", "set", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "scalarSet", "(", "in", ",", "set", ")", ";", "return", "updateVariableNameAndReference", "("...
Return a variable with equal shape to the input, but all elements set to value 'set' @param name Name of the output variable @param in Input variable @param set Value to set @return Output variable
[ "Return", "a", "variable", "with", "equal", "shape", "to", "the", "input", "but", "all", "elements", "set", "to", "value", "set" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L2005-L2008
h2oai/h2o-3
h2o-core/src/main/java/water/util/VecUtils.java
VecUtils.UUIDToStringVec
public static Vec UUIDToStringVec(Vec src) { if( !src.isUUID() ) throw new H2OIllegalArgumentException("UUIDToStringVec() conversion only works on UUID columns"); Vec res = new MRTask() { @Override public void map(Chunk chk, NewChunk newChk) { if (chk instanceof C0DChunk) { // all NAs fo...
java
public static Vec UUIDToStringVec(Vec src) { if( !src.isUUID() ) throw new H2OIllegalArgumentException("UUIDToStringVec() conversion only works on UUID columns"); Vec res = new MRTask() { @Override public void map(Chunk chk, NewChunk newChk) { if (chk instanceof C0DChunk) { // all NAs fo...
[ "public", "static", "Vec", "UUIDToStringVec", "(", "Vec", "src", ")", "{", "if", "(", "!", "src", ".", "isUUID", "(", ")", ")", "throw", "new", "H2OIllegalArgumentException", "(", "\"UUIDToStringVec() conversion only works on UUID columns\"", ")", ";", "Vec", "res...
Create a new {@link Vec} of string values from a UUID {@link Vec}. String {@link Vec} is the standard hexadecimal representations of a UUID. @param src a UUID {@link Vec} @return a string {@link Vec}
[ "Create", "a", "new", "{", "@link", "Vec", "}", "of", "string", "values", "from", "a", "UUID", "{", "@link", "Vec", "}", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/VecUtils.java#L367-L386
maguro/aunit
junit/src/main/java/com/toolazydogs/aunit/Assert.java
Assert.assertTree
public static void assertTree(String message, String rootText, String preorder, Tree tree) { assertNotNull("tree should be non-null", tree); assertEquals(message + " (asserting type of root)", rootText, tree.getText()); assertPreordered(message, preorder, tree); }
java
public static void assertTree(String message, String rootText, String preorder, Tree tree) { assertNotNull("tree should be non-null", tree); assertEquals(message + " (asserting type of root)", rootText, tree.getText()); assertPreordered(message, preorder, tree); }
[ "public", "static", "void", "assertTree", "(", "String", "message", ",", "String", "rootText", ",", "String", "preorder", ",", "Tree", "tree", ")", "{", "assertNotNull", "(", "\"tree should be non-null\"", ",", "tree", ")", ";", "assertEquals", "(", "message", ...
Asserts a parse tree. @param message the message to display on failure. @param rootText the text of the root of the tree. @param preorder the preorder traversal of the tree. @param tree an ANTLR tree to assert on.
[ "Asserts", "a", "parse", "tree", "." ]
train
https://github.com/maguro/aunit/blob/1f972e35b28327e5e2e7881befc928df0546d74c/junit/src/main/java/com/toolazydogs/aunit/Assert.java#L324-L329
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/TextWriterWriterInterface.java
TextWriterWriterInterface.writeObject
@SuppressWarnings("unchecked") public final void writeObject(TextWriterStream out, String label, Object object) throws IOException { write(out, label, (O) object); }
java
@SuppressWarnings("unchecked") public final void writeObject(TextWriterStream out, String label, Object object) throws IOException { write(out, label, (O) object); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "void", "writeObject", "(", "TextWriterStream", "out", ",", "String", "label", ",", "Object", "object", ")", "throws", "IOException", "{", "write", "(", "out", ",", "label", ",", "(", "O"...
Non-type-checking version. @param out Output stream @param label Label to prefix @param object object to output @throws IOException on IO errors
[ "Non", "-", "type", "-", "checking", "version", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/TextWriterWriterInterface.java#L52-L55
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java
SparkDl4jMultiLayer.scoreExamples
public JavaDoubleRDD scoreExamples(RDD<DataSet> data, boolean includeRegularizationTerms, int batchSize) { return scoreExamples(data.toJavaRDD(), includeRegularizationTerms, batchSize); }
java
public JavaDoubleRDD scoreExamples(RDD<DataSet> data, boolean includeRegularizationTerms, int batchSize) { return scoreExamples(data.toJavaRDD(), includeRegularizationTerms, batchSize); }
[ "public", "JavaDoubleRDD", "scoreExamples", "(", "RDD", "<", "DataSet", ">", "data", ",", "boolean", "includeRegularizationTerms", ",", "int", "batchSize", ")", "{", "return", "scoreExamples", "(", "data", ".", "toJavaRDD", "(", ")", ",", "includeRegularizationTer...
{@code RDD<DataSet>} overload of {@link #scoreExamples(JavaRDD, boolean, int)}
[ "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java#L418-L420
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/transform/TransformerRegistry.java
TransformerRegistry.resolveServer
public OperationTransformerRegistry resolveServer(final ModelVersion mgmtVersion, final ModelNode subsystems) { return resolveServer(mgmtVersion, resolveVersions(subsystems)); }
java
public OperationTransformerRegistry resolveServer(final ModelVersion mgmtVersion, final ModelNode subsystems) { return resolveServer(mgmtVersion, resolveVersions(subsystems)); }
[ "public", "OperationTransformerRegistry", "resolveServer", "(", "final", "ModelVersion", "mgmtVersion", ",", "final", "ModelNode", "subsystems", ")", "{", "return", "resolveServer", "(", "mgmtVersion", ",", "resolveVersions", "(", "subsystems", ")", ")", ";", "}" ]
Resolve the server registry. @param mgmtVersion the mgmt version @param subsystems the subsystems @return the transformer registry
[ "Resolve", "the", "server", "registry", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformerRegistry.java#L224-L226
javamelody/javamelody
javamelody-core/src/main/java/net/bull/javamelody/internal/web/html/HtmlCounterReport.java
HtmlCounterReport.htmlEncodeRequestName
static String htmlEncodeRequestName(String requestId, String requestName) { if (requestId.startsWith(Counter.SQL_COUNTER_NAME)) { final String htmlEncoded = htmlEncodeButNotSpace(requestName); // highlight SQL keywords return SQL_KEYWORDS_PATTERN.matcher(htmlEncoded) .replaceAll("<span class='sqlKe...
java
static String htmlEncodeRequestName(String requestId, String requestName) { if (requestId.startsWith(Counter.SQL_COUNTER_NAME)) { final String htmlEncoded = htmlEncodeButNotSpace(requestName); // highlight SQL keywords return SQL_KEYWORDS_PATTERN.matcher(htmlEncoded) .replaceAll("<span class='sqlKe...
[ "static", "String", "htmlEncodeRequestName", "(", "String", "requestId", ",", "String", "requestName", ")", "{", "if", "(", "requestId", ".", "startsWith", "(", "Counter", ".", "SQL_COUNTER_NAME", ")", ")", "{", "final", "String", "htmlEncoded", "=", "htmlEncode...
Encode le nom d'une requête pour affichage en html, sans encoder les espaces en nbsp (insécables), et highlight les mots clés SQL. @param requestId Id de la requête @param requestName Nom de la requête à encoder @return String
[ "Encode", "le", "nom", "d", "une", "requête", "pour", "affichage", "en", "html", "sans", "encoder", "les", "espaces", "en", "nbsp", "(", "insécables", ")", "et", "highlight", "les", "mots", "clés", "SQL", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-core/src/main/java/net/bull/javamelody/internal/web/html/HtmlCounterReport.java#L367-L376
aws/aws-sdk-java
aws-java-sdk-iot1clickdevices/src/main/java/com/amazonaws/services/iot1clickdevices/model/DeviceDescription.java
DeviceDescription.withTags
public DeviceDescription withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public DeviceDescription withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "DeviceDescription", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags currently associated with the AWS IoT 1-Click device. </p> @param tags The tags currently associated with the AWS IoT 1-Click device. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "currently", "associated", "with", "the", "AWS", "IoT", "1", "-", "Click", "device", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot1clickdevices/src/main/java/com/amazonaws/services/iot1clickdevices/model/DeviceDescription.java#L379-L382
igniterealtime/Smack
smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java
Roster.createItemAndRequestSubscription
public void createItemAndRequestSubscription(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { createItem(jid, name, groups); sendSubscriptionRequest(jid); }
java
public void createItemAndRequestSubscription(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { createItem(jid, name, groups); sendSubscriptionRequest(jid); }
[ "public", "void", "createItemAndRequestSubscription", "(", "BareJid", "jid", ",", "String", "name", ",", "String", "[", "]", "groups", ")", "throws", "NotLoggedInException", ",", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "Int...
Creates a new roster entry and presence subscription. The server will asynchronously update the roster with the subscription status. @param jid the XMPP address of the contact (e.g. johndoe@jabber.org) @param name the nickname of the user. @param groups the list of group names the entry will belong to, or <tt>null</...
[ "Creates", "a", "new", "roster", "entry", "and", "presence", "subscription", ".", "The", "server", "will", "asynchronously", "update", "the", "roster", "with", "the", "subscription", "status", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java#L707-L711
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java
RubyBundleAuditAnalyzer.launchBundleAudit
private Process launchBundleAudit(File folder) throws AnalysisException { if (!folder.isDirectory()) { throw new AnalysisException(String.format("%s should have been a directory.", folder.getAbsolutePath())); } final List<String> args = new ArrayList<>(); final String bundleA...
java
private Process launchBundleAudit(File folder) throws AnalysisException { if (!folder.isDirectory()) { throw new AnalysisException(String.format("%s should have been a directory.", folder.getAbsolutePath())); } final List<String> args = new ArrayList<>(); final String bundleA...
[ "private", "Process", "launchBundleAudit", "(", "File", "folder", ")", "throws", "AnalysisException", "{", "if", "(", "!", "folder", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "AnalysisException", "(", "String", ".", "format", "(", "\"%s should ha...
Launch bundle-audit. @param folder directory that contains bundle audit @return a handle to the process @throws AnalysisException thrown when there is an issue launching bundle audit
[ "Launch", "bundle", "-", "audit", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java#L138-L164
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathFunctionResolver.java
MapBasedXPathFunctionResolver.addUniqueFunction
@Nonnull public EChange addUniqueFunction (@Nonnull final String sNamespaceURI, @Nonnull final String sLocalPart, @Nonnegative final int nArity, @Nonnull final XPathFunction aFunction) { return addUniqueF...
java
@Nonnull public EChange addUniqueFunction (@Nonnull final String sNamespaceURI, @Nonnull final String sLocalPart, @Nonnegative final int nArity, @Nonnull final XPathFunction aFunction) { return addUniqueF...
[ "@", "Nonnull", "public", "EChange", "addUniqueFunction", "(", "@", "Nonnull", "final", "String", "sNamespaceURI", ",", "@", "Nonnull", "final", "String", "sLocalPart", ",", "@", "Nonnegative", "final", "int", "nArity", ",", "@", "Nonnull", "final", "XPathFuncti...
Add a new function. @param sNamespaceURI The namespace URI of the function @param sLocalPart The local part of the function @param nArity The number of parameters of the function @param aFunction The function to be used. May not be <code>null</code>. @return {@link EChange}
[ "Add", "a", "new", "function", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathFunctionResolver.java#L84-L91
kkopacz/agiso-core
bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ThreadUtils.java
ThreadUtils.putAttribute
public static Object putAttribute(String key, Object attribute, boolean inheritable) { if(inheritable) { Object value = inheritableAttributeHolder.get().put(key, attribute); if(value == null) { value = localAttributeHolder.get().remove(key); } else { localAttributeHolder.get().remove(key); } re...
java
public static Object putAttribute(String key, Object attribute, boolean inheritable) { if(inheritable) { Object value = inheritableAttributeHolder.get().put(key, attribute); if(value == null) { value = localAttributeHolder.get().remove(key); } else { localAttributeHolder.get().remove(key); } re...
[ "public", "static", "Object", "putAttribute", "(", "String", "key", ",", "Object", "attribute", ",", "boolean", "inheritable", ")", "{", "if", "(", "inheritable", ")", "{", "Object", "value", "=", "inheritableAttributeHolder", ".", "get", "(", ")", ".", "put...
Umieszcza wartość atrybutu pod określonym kluczem w zasięgu wątku określonym parametrem wywołania <code>inheritable</code>. @param key Klucz, pod którym atrybut zostanie umieszczony @param attribute Wartość atrybutu do umieszczenia w zasięgu wątku @param inheritable Wartość logiczna określająca, czy atrybut ma być dzi...
[ "Umieszcza", "wartość", "atrybutu", "pod", "określonym", "kluczem", "w", "zasięgu", "wątku", "określonym", "parametrem", "wywołania", "<code", ">", "inheritable<", "/", "code", ">", "." ]
train
https://github.com/kkopacz/agiso-core/blob/b994ec0146be1fe3f10829d69cd719bdbdebe1c5/bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ThreadUtils.java#L127-L145
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution1D.java
KerasConvolution1D.setWeights
@Override public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException { this.weights = new HashMap<>(); if (weights.containsKey(conf.getKERAS_PARAM_NAME_W())) { INDArray kerasParamValue = weights.get(conf.getKERAS_PARAM_NAME_W()); INDArray ...
java
@Override public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException { this.weights = new HashMap<>(); if (weights.containsKey(conf.getKERAS_PARAM_NAME_W())) { INDArray kerasParamValue = weights.get(conf.getKERAS_PARAM_NAME_W()); INDArray ...
[ "@", "Override", "public", "void", "setWeights", "(", "Map", "<", "String", ",", "INDArray", ">", "weights", ")", "throws", "InvalidKerasConfigurationException", "{", "this", ".", "weights", "=", "new", "HashMap", "<>", "(", ")", ";", "if", "(", "weights", ...
Set weights for layer. @param weights Map from parameter name to INDArray.
[ "Set", "weights", "for", "layer", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/convolutional/KerasConvolution1D.java#L177-L222
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java
DockerAgentUtils.getImageIdFromAgent
public static String getImageIdFromAgent(Launcher launcher, final String imageTag, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() { public String call() throws IOException { return Docke...
java
public static String getImageIdFromAgent(Launcher launcher, final String imageTag, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() { public String call() throws IOException { return Docke...
[ "public", "static", "String", "getImageIdFromAgent", "(", "Launcher", "launcher", ",", "final", "String", "imageTag", ",", "final", "String", "host", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "launcher", ".", "getChannel", "(", ")",...
Get image ID from imageTag on the current agent. @param imageTag @return
[ "Get", "image", "ID", "from", "imageTag", "on", "the", "current", "agent", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java#L278-L284
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.scaleAround
public Matrix3x2f scaleAround(float sx, float sy, float ox, float oy) { return scaleAround(sx, sy, ox, oy, this); }
java
public Matrix3x2f scaleAround(float sx, float sy, float ox, float oy) { return scaleAround(sx, sy, ox, oy, this); }
[ "public", "Matrix3x2f", "scaleAround", "(", "float", "sx", ",", "float", "sy", ",", "float", "ox", ",", "float", "oy", ")", "{", "return", "scaleAround", "(", "sx", ",", "sy", ",", "ox", ",", "oy", ",", "this", ")", ";", "}" ]
Apply scaling to this matrix by scaling the base axes by the given sx and sy factors while using <code>(ox, oy)</code> as the scaling origin. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</co...
[ "Apply", "scaling", "to", "this", "matrix", "by", "scaling", "the", "base", "axes", "by", "the", "given", "sx", "and", "sy", "factors", "while", "using", "<code", ">", "(", "ox", "oy", ")", "<", "/", "code", ">", "as", "the", "scaling", "origin", "."...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L1431-L1433
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/cache/JMapperCache.java
JMapperCache.relationalMapperName
private static String relationalMapperName(Class<?> configuredClass, String resource){ String className = configuredClass.getName().replaceAll("\\.",""); if(isEmpty(resource)) return className; if(!isPath(resource)) return write(className, String.valueOf(resource.hashCode())); String[]dep = r...
java
private static String relationalMapperName(Class<?> configuredClass, String resource){ String className = configuredClass.getName().replaceAll("\\.",""); if(isEmpty(resource)) return className; if(!isPath(resource)) return write(className, String.valueOf(resource.hashCode())); String[]dep = r...
[ "private", "static", "String", "relationalMapperName", "(", "Class", "<", "?", ">", "configuredClass", ",", "String", "resource", ")", "{", "String", "className", "=", "configuredClass", ".", "getName", "(", ")", ".", "replaceAll", "(", "\"\\\\.\"", ",", "\"\"...
Returns a unique name that identify this relationalMapper. @param configuredClass configured class @param resource resource to analyze @return Returns a string that represents the identifier for this relationalMapper instance
[ "Returns", "a", "unique", "name", "that", "identify", "this", "relationalMapper", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/cache/JMapperCache.java#L215-L229
buschmais/jqa-javaee6-plugin
src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/WebXmlScannerPlugin.java
WebXmlScannerPlugin.setAsyncSupported
private void setAsyncSupported(AsyncSupportedDescriptor asyncSupportedDescriptor, TrueFalseType asyncSupported) { if (asyncSupported != null) { asyncSupportedDescriptor.setAsyncSupported(asyncSupported.isValue()); } }
java
private void setAsyncSupported(AsyncSupportedDescriptor asyncSupportedDescriptor, TrueFalseType asyncSupported) { if (asyncSupported != null) { asyncSupportedDescriptor.setAsyncSupported(asyncSupported.isValue()); } }
[ "private", "void", "setAsyncSupported", "(", "AsyncSupportedDescriptor", "asyncSupportedDescriptor", ",", "TrueFalseType", "asyncSupported", ")", "{", "if", "(", "asyncSupported", "!=", "null", ")", "{", "asyncSupportedDescriptor", ".", "setAsyncSupported", "(", "asyncSup...
Set the value for an async supported on the given descriptor. @param asyncSupportedDescriptor The async supported descriptor. @param asyncSupported The value.
[ "Set", "the", "value", "for", "an", "async", "supported", "on", "the", "given", "descriptor", "." ]
train
https://github.com/buschmais/jqa-javaee6-plugin/blob/f5776604d9255206807e5aca90b8767bde494e14/src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/WebXmlScannerPlugin.java#L480-L484
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockInlineChecksumReader.java
BlockInlineChecksumReader.getPosFromBlockOffset
public static long getPosFromBlockOffset(long offsetInBlock, int bytesPerChecksum, int checksumSize) { // We only support to read full chunks, so offsetInBlock must be the boundary // of the chunks. assert offsetInBlock % bytesPerChecksum == 0; // The position in the file will be the same as the f...
java
public static long getPosFromBlockOffset(long offsetInBlock, int bytesPerChecksum, int checksumSize) { // We only support to read full chunks, so offsetInBlock must be the boundary // of the chunks. assert offsetInBlock % bytesPerChecksum == 0; // The position in the file will be the same as the f...
[ "public", "static", "long", "getPosFromBlockOffset", "(", "long", "offsetInBlock", ",", "int", "bytesPerChecksum", ",", "int", "checksumSize", ")", "{", "// We only support to read full chunks, so offsetInBlock must be the boundary", "// of the chunks.", "assert", "offsetInBlock"...
Translate from block offset to position in file. @param offsetInBlock @param bytesPerChecksum @param checksumSize @return
[ "Translate", "from", "block", "offset", "to", "position", "in", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockInlineChecksumReader.java#L164-L172
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java
JanusConfig.getSystemProperty
public static String getSystemProperty(String name, String defaultValue) { String value; value = System.getProperty(name, null); if (value != null) { return value; } value = System.getenv(name); if (value != null) { return value; } ...
java
public static String getSystemProperty(String name, String defaultValue) { String value; value = System.getProperty(name, null); if (value != null) { return value; } value = System.getenv(name); if (value != null) { return value; } ...
[ "public", "static", "String", "getSystemProperty", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", ";", "value", "=", "System", ".", "getProperty", "(", "name", ",", "null", ")", ";", "if", "(", "value", "!=", "null", "...
Replies the value of the system property. @param name - name of the property. @param defaultValue - value to reply if the these is no property found @return the value, or defaultValue.
[ "Replies", "the", "value", "of", "the", "system", "property", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/JanusConfig.java#L320-L331
fuinorg/units4j
src/main/java/org/fuin/units4j/Units4JUtils.java
Units4JUtils.assertCauseCauseMessage
public static void assertCauseCauseMessage(final Throwable ex, final String expectedMessage) { assertThat(ex.getCause()).isNotNull(); assertThat(ex.getCause().getCause()).isNotNull(); assertThat(ex.getCause().getCause().getMessage()).isEqualTo(expectedMessage); }
java
public static void assertCauseCauseMessage(final Throwable ex, final String expectedMessage) { assertThat(ex.getCause()).isNotNull(); assertThat(ex.getCause().getCause()).isNotNull(); assertThat(ex.getCause().getCause().getMessage()).isEqualTo(expectedMessage); }
[ "public", "static", "void", "assertCauseCauseMessage", "(", "final", "Throwable", "ex", ",", "final", "String", "expectedMessage", ")", "{", "assertThat", "(", "ex", ".", "getCause", "(", ")", ")", ".", "isNotNull", "(", ")", ";", "assertThat", "(", "ex", ...
Verifies that the cause of a cause of an exception contains an expected message. @param ex Exception with the cause/cause to check, @param expectedMessage Message of the cause/cause.
[ "Verifies", "that", "the", "cause", "of", "a", "cause", "of", "an", "exception", "contains", "an", "expected", "message", "." ]
train
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/Units4JUtils.java#L286-L290
javagl/ND
nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java
IntTupleDistanceFunctions.computeChebyshev
static int computeChebyshev(IntTuple t0, IntTuple t1) { Utils.checkForEqualSize(t0, t1); int max = 0; for (int i=0; i<t0.getSize(); i++) { int d = t0.get(i)-t1.get(i); max = Math.max(max, Math.abs(d)); } return max; }
java
static int computeChebyshev(IntTuple t0, IntTuple t1) { Utils.checkForEqualSize(t0, t1); int max = 0; for (int i=0; i<t0.getSize(); i++) { int d = t0.get(i)-t1.get(i); max = Math.max(max, Math.abs(d)); } return max; }
[ "static", "int", "computeChebyshev", "(", "IntTuple", "t0", ",", "IntTuple", "t1", ")", "{", "Utils", ".", "checkForEqualSize", "(", "t0", ",", "t1", ")", ";", "int", "max", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "t0", "....
Computes the Chebyshev distance between the given tuples @param t0 The first tuple @param t1 The second tuple @return The distance @throws IllegalArgumentException If the given tuples do not have the same {@link Tuple#getSize() size}
[ "Computes", "the", "Chebyshev", "distance", "between", "the", "given", "tuples" ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java#L313-L323
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.randomBufferedImage
public static BufferedImage randomBufferedImage(final int width, final int height, final int imageType) { final BufferedImage img = new BufferedImage(width, height, imageType); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setRGB(x, y, RandomExtensions.newRandomPixel()); ...
java
public static BufferedImage randomBufferedImage(final int width, final int height, final int imageType) { final BufferedImage img = new BufferedImage(width, height, imageType); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { img.setRGB(x, y, RandomExtensions.newRandomPixel()); ...
[ "public", "static", "BufferedImage", "randomBufferedImage", "(", "final", "int", "width", ",", "final", "int", "height", ",", "final", "int", "imageType", ")", "{", "final", "BufferedImage", "img", "=", "new", "BufferedImage", "(", "width", ",", "height", ",",...
Generates a random {@link BufferedImage} with the given parameters. @param width the width @param height the height @param imageType the type of the image @return The generated {@link BufferedImage}.
[ "Generates", "a", "random", "{", "@link", "BufferedImage", "}", "with", "the", "given", "parameters", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L242-L254
KyoriPowered/text
api/src/main/java/net/kyori/text/TranslatableComponent.java
TranslatableComponent.of
public static TranslatableComponent of(final @NonNull String key, final @Nullable TextColor color, final @NonNull List<Component> args) { return of(key, color, Collections.emptySet(), args); }
java
public static TranslatableComponent of(final @NonNull String key, final @Nullable TextColor color, final @NonNull List<Component> args) { return of(key, color, Collections.emptySet(), args); }
[ "public", "static", "TranslatableComponent", "of", "(", "final", "@", "NonNull", "String", "key", ",", "final", "@", "Nullable", "TextColor", "color", ",", "final", "@", "NonNull", "List", "<", "Component", ">", "args", ")", "{", "return", "of", "(", "key"...
Creates a translatable component with a translation key and arguments. @param key the translation key @param color the color @param args the translation arguments @return the translatable component
[ "Creates", "a", "translatable", "component", "with", "a", "translation", "key", "and", "arguments", "." ]
train
https://github.com/KyoriPowered/text/blob/4496c593bf89e8fb036dd6efe26f8ac60f7655c9/api/src/main/java/net/kyori/text/TranslatableComponent.java#L169-L171
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/components/factories/JComponentFactory.java
JComponentFactory.newJSplitPane
public static JSplitPane newJSplitPane(Component newLeftComponent, Component newRightComponent) { return newJSplitPane(JSplitPane.HORIZONTAL_SPLIT, newLeftComponent, newRightComponent); }
java
public static JSplitPane newJSplitPane(Component newLeftComponent, Component newRightComponent) { return newJSplitPane(JSplitPane.HORIZONTAL_SPLIT, newLeftComponent, newRightComponent); }
[ "public", "static", "JSplitPane", "newJSplitPane", "(", "Component", "newLeftComponent", ",", "Component", "newRightComponent", ")", "{", "return", "newJSplitPane", "(", "JSplitPane", ".", "HORIZONTAL_SPLIT", ",", "newLeftComponent", ",", "newRightComponent", ")", ";", ...
Factory method for create new {@link JSplitPane} object @param newLeftComponent the <code>Component</code> that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane @param newRightComponent the <code>Component</code> that will appear on the right of a horizontally-split pane, ...
[ "Factory", "method", "for", "create", "new", "{", "@link", "JSplitPane", "}", "object" ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/components/factories/JComponentFactory.java#L83-L86
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.PATCH
public <T> Optional<T> PATCH(String partialUrl, Object payload, GenericType<T> returnType) { URI uri = buildUri(partialUrl); return executePatchRequest(uri, payload, null, null, returnType); }
java
public <T> Optional<T> PATCH(String partialUrl, Object payload, GenericType<T> returnType) { URI uri = buildUri(partialUrl); return executePatchRequest(uri, payload, null, null, returnType); }
[ "public", "<", "T", ">", "Optional", "<", "T", ">", "PATCH", "(", "String", "partialUrl", ",", "Object", "payload", ",", "GenericType", "<", "T", ">", "returnType", ")", "{", "URI", "uri", "=", "buildUri", "(", "partialUrl", ")", ";", "return", "execut...
Execute a PATCH call against the partial URL. @param <T> The type parameter used for the return object @param partialUrl The partial URL to build @param payload The object to use for the PATCH @param returnType The expected return type @return The return type
[ "Execute", "a", "PATCH", "call", "against", "the", "partial", "URL", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L275-L279
OpenLiberty/open-liberty
dev/com.ibm.ws.crypto.ltpakeyutil/src/com/ibm/ws/crypto/ltpakeyutil/LTPAKeyFileUtilityImpl.java
LTPAKeyFileUtilityImpl.addLTPAKeysToFile
protected void addLTPAKeysToFile(OutputStream os, Properties ltpaProps) throws Exception { try { // Write the ltpa key propeperties to ltpaProps.store(os, null); } catch (IOException e) { throw e; } finally { if (os != null) try { ...
java
protected void addLTPAKeysToFile(OutputStream os, Properties ltpaProps) throws Exception { try { // Write the ltpa key propeperties to ltpaProps.store(os, null); } catch (IOException e) { throw e; } finally { if (os != null) try { ...
[ "protected", "void", "addLTPAKeysToFile", "(", "OutputStream", "os", ",", "Properties", "ltpaProps", ")", "throws", "Exception", "{", "try", "{", "// Write the ltpa key propeperties to", "ltpaProps", ".", "store", "(", "os", ",", "null", ")", ";", "}", "catch", ...
Write the LTPA key properties to the given OutputStream. This method will close the OutputStream. @param keyImportFile The import file to be created @param ltpaProps The properties containing the LTPA keys @throws TokenException @throws IOException
[ "Write", "the", "LTPA", "key", "properties", "to", "the", "given", "OutputStream", ".", "This", "method", "will", "close", "the", "OutputStream", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.crypto.ltpakeyutil/src/com/ibm/ws/crypto/ltpakeyutil/LTPAKeyFileUtilityImpl.java#L109-L124
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/OfferService.java
OfferService.processFailedReceivedDeleted
private void processFailedReceivedDeleted(long[] failedMap, Block[] sent) { synchronized (receivedAndDeletedBlockList) { // Blocks that do not belong to an Inode are saved for // retransmisions for (int i = sent.length - 1 ; i >= 0; i--) { if(!LightWeightBitSet.get(failedMap, i)){ ...
java
private void processFailedReceivedDeleted(long[] failedMap, Block[] sent) { synchronized (receivedAndDeletedBlockList) { // Blocks that do not belong to an Inode are saved for // retransmisions for (int i = sent.length - 1 ; i >= 0; i--) { if(!LightWeightBitSet.get(failedMap, i)){ ...
[ "private", "void", "processFailedReceivedDeleted", "(", "long", "[", "]", "failedMap", ",", "Block", "[", "]", "sent", ")", "{", "synchronized", "(", "receivedAndDeletedBlockList", ")", "{", "// Blocks that do not belong to an Inode are saved for", "// retransmisions", "f...
Adds blocks of incremental block report back to the receivedAndDeletedBlockList when the blocks are to be retried later (when sending to standby) @param failed
[ "Adds", "blocks", "of", "incremental", "block", "report", "back", "to", "the", "receivedAndDeletedBlockList", "when", "the", "blocks", "are", "to", "be", "retried", "later", "(", "when", "sending", "to", "standby", ")" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/OfferService.java#L511-L529
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java
JScreen.createScreenComponent
public JComponent createScreenComponent(Converter fieldInfo) { int iRows = 1; int iColumns = fieldInfo.getMaxLength(); if (iColumns > 40) { iRows = 3; iColumns = 30; } String strDefault = fieldInfo.toString(); if (strDefault == null) ...
java
public JComponent createScreenComponent(Converter fieldInfo) { int iRows = 1; int iColumns = fieldInfo.getMaxLength(); if (iColumns > 40) { iRows = 3; iColumns = 30; } String strDefault = fieldInfo.toString(); if (strDefault == null) ...
[ "public", "JComponent", "createScreenComponent", "(", "Converter", "fieldInfo", ")", "{", "int", "iRows", "=", "1", ";", "int", "iColumns", "=", "fieldInfo", ".", "getMaxLength", "(", ")", ";", "if", "(", "iColumns", ">", "40", ")", "{", "iRows", "=", "3...
Add the screen controls to the second column of the grid. Create a default component for this fieldInfo. @param fieldInfo the field to create a control for. @return The component.
[ "Add", "the", "screen", "controls", "to", "the", "second", "column", "of", "the", "grid", ".", "Create", "a", "default", "component", "for", "this", "fieldInfo", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java#L298-L325
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java
ClassificationValueSelect.executeOneCompleteStmt
protected boolean executeOneCompleteStmt(final String _complStmt, final List<Instance> _instances) throws EFapsException { final boolean ret = false; ConnectionResource con = null; try { con = Context.getThreadContext().getConn...
java
protected boolean executeOneCompleteStmt(final String _complStmt, final List<Instance> _instances) throws EFapsException { final boolean ret = false; ConnectionResource con = null; try { con = Context.getThreadContext().getConn...
[ "protected", "boolean", "executeOneCompleteStmt", "(", "final", "String", "_complStmt", ",", "final", "List", "<", "Instance", ">", "_instances", ")", "throws", "EFapsException", "{", "final", "boolean", "ret", "=", "false", ";", "ConnectionResource", "con", "=", ...
Method to execute one statement against the eFaps-DataBase. @param _complStmt ststement @param _instances list of instances @return true it values where found @throws EFapsException on error
[ "Method", "to", "execute", "one", "statement", "against", "the", "eFaps", "-", "DataBase", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/value/ClassificationValueSelect.java#L259-L293
LearnLib/automatalib
util/src/main/java/net/automatalib/util/minimizer/Minimizer.java
Minimizer.addAllToSplitterQueue
private void addAllToSplitterQueue(Collection<Block<S, L>> blocks) { for (Block<S, L> block : blocks) { addToSplitterQueue(block); } }
java
private void addAllToSplitterQueue(Collection<Block<S, L>> blocks) { for (Block<S, L> block : blocks) { addToSplitterQueue(block); } }
[ "private", "void", "addAllToSplitterQueue", "(", "Collection", "<", "Block", "<", "S", ",", "L", ">", ">", "blocks", ")", "{", "for", "(", "Block", "<", "S", ",", "L", ">", "block", ":", "blocks", ")", "{", "addToSplitterQueue", "(", "block", ")", ";...
Adds all but the largest block of a given collection to the splitter queue.
[ "Adds", "all", "but", "the", "largest", "block", "of", "a", "given", "collection", "to", "the", "splitter", "queue", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/minimizer/Minimizer.java#L454-L458
sundrio/sundrio
annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java
ToPojo.readAnnotationProperty
private static String readAnnotationProperty(String ref, TypeDef source, Property property) { return convertReference(ref, source, ((ClassRef)property.getTypeRef()).getDefinition()); }
java
private static String readAnnotationProperty(String ref, TypeDef source, Property property) { return convertReference(ref, source, ((ClassRef)property.getTypeRef()).getDefinition()); }
[ "private", "static", "String", "readAnnotationProperty", "(", "String", "ref", ",", "TypeDef", "source", ",", "Property", "property", ")", "{", "return", "convertReference", "(", "ref", ",", "source", ",", "(", "(", "ClassRef", ")", "property", ".", "getTypeRe...
Returns the string representation of the code that reads a primitive array property. @param ref The reference. @param source The type of the reference. @param property The property to read. @return The code.
[ "Returns", "the", "string", "representation", "of", "the", "code", "that", "reads", "a", "primitive", "array", "property", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/annotations/builder/src/main/java/io/sundr/builder/internal/functions/ToPojo.java#L675-L677
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSWrapperCommon.java
EJSWrapperCommon.getFieldValue
private static Object getFieldValue(FieldClassValue fieldClassValue, Object obj) { try { return fieldClassValue.get(obj.getClass()).get(obj); } catch (IllegalAccessException e) { // FieldClassValueFactory returns ClassValue that make the Field // accessible, so this s...
java
private static Object getFieldValue(FieldClassValue fieldClassValue, Object obj) { try { return fieldClassValue.get(obj.getClass()).get(obj); } catch (IllegalAccessException e) { // FieldClassValueFactory returns ClassValue that make the Field // accessible, so this s...
[ "private", "static", "Object", "getFieldValue", "(", "FieldClassValue", "fieldClassValue", ",", "Object", "obj", ")", "{", "try", "{", "return", "fieldClassValue", ".", "get", "(", "obj", ".", "getClass", "(", ")", ")", ".", "get", "(", "obj", ")", ";", ...
Get the value of a field from an object. @param fieldClassValue the Field class value @param obj the object @return the field value
[ "Get", "the", "value", "of", "a", "field", "from", "an", "object", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSWrapperCommon.java#L468-L476
zxing/zxing
core/src/main/java/com/google/zxing/oned/ITFReader.java
ITFReader.decodeEnd
private int[] decodeEnd(BitArray row) throws NotFoundException { // For convenience, reverse the row and then // search from 'the start' for the end block row.reverse(); try { int endStart = skipWhiteSpace(row); int[] endPattern; try { endPattern = findGuardPattern(row, endSta...
java
private int[] decodeEnd(BitArray row) throws NotFoundException { // For convenience, reverse the row and then // search from 'the start' for the end block row.reverse(); try { int endStart = skipWhiteSpace(row); int[] endPattern; try { endPattern = findGuardPattern(row, endSta...
[ "private", "int", "[", "]", "decodeEnd", "(", "BitArray", "row", ")", "throws", "NotFoundException", "{", "// For convenience, reverse the row and then", "// search from 'the start' for the end block", "row", ".", "reverse", "(", ")", ";", "try", "{", "int", "endStart",...
Identify where the end of the middle / payload section ends. @param row row of black/white values to search @return Array, containing index of start of 'end block' and end of 'end block'
[ "Identify", "where", "the", "end", "of", "the", "middle", "/", "payload", "section", "ends", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/oned/ITFReader.java#L271-L302
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/DBObject.java
DBObject.addFieldValue
public void addFieldValue(String fieldName, String value) { Utils.require(!Utils.isEmpty(fieldName), "fieldName"); if (fieldName.charAt(0) == '_') { setSystemField(fieldName, value); } else { List<String> currValues = m_valueMap.get(fieldName); ...
java
public void addFieldValue(String fieldName, String value) { Utils.require(!Utils.isEmpty(fieldName), "fieldName"); if (fieldName.charAt(0) == '_') { setSystemField(fieldName, value); } else { List<String> currValues = m_valueMap.get(fieldName); ...
[ "public", "void", "addFieldValue", "(", "String", "fieldName", ",", "String", "value", ")", "{", "Utils", ".", "require", "(", "!", "Utils", ".", "isEmpty", "(", "fieldName", ")", ",", "\"fieldName\"", ")", ";", "if", "(", "fieldName", ".", "charAt", "("...
Add the given value to the field with the given name. For a system field, its existing value, if any, is replaced. If a null or empty field is added for an SV scalar, the field is nullified. @param fieldName Name of a field. @param value Value to add to field. Ignored if null or empty.
[ "Add", "the", "given", "value", "to", "the", "field", "with", "the", "given", "name", ".", "For", "a", "system", "field", "its", "existing", "value", "if", "any", "is", "replaced", ".", "If", "a", "null", "or", "empty", "field", "is", "added", "for", ...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L403-L416
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseDouble
public static double parseDouble (@Nullable final String sStr, final double dDefault) { // parseDouble throws a NPE if parameter is null if (sStr != null && sStr.length () > 0) try { // Single point where we replace "," with "." for parsing! return Double.parseDouble (_getUnifiedDe...
java
public static double parseDouble (@Nullable final String sStr, final double dDefault) { // parseDouble throws a NPE if parameter is null if (sStr != null && sStr.length () > 0) try { // Single point where we replace "," with "." for parsing! return Double.parseDouble (_getUnifiedDe...
[ "public", "static", "double", "parseDouble", "(", "@", "Nullable", "final", "String", "sStr", ",", "final", "double", "dDefault", ")", "{", "// parseDouble throws a NPE if parameter is null", "if", "(", "sStr", "!=", "null", "&&", "sStr", ".", "length", "(", ")"...
Parse the given {@link String} as double. @param sStr The string to parse. May be <code>null</code>. @param dDefault The default value to be returned if the passed object could not be converted to a valid value. @return The default value if the string does not represent a valid value.
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "double", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L484-L498
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java
GenericRepository.findPropertyCount
@Transactional public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) { return findPropertyCount(entity, sp, newArrayList(attributes)); }
java
@Transactional public int findPropertyCount(E entity, SearchParameters sp, Attribute<?, ?>... attributes) { return findPropertyCount(entity, sp, newArrayList(attributes)); }
[ "@", "Transactional", "public", "int", "findPropertyCount", "(", "E", "entity", ",", "SearchParameters", "sp", ",", "Attribute", "<", "?", ",", "?", ">", "...", "attributes", ")", "{", "return", "findPropertyCount", "(", "entity", ",", "sp", ",", "newArrayLi...
Count the number of E instances. @param entity a sample entity whose non-null properties may be used as search hint @param sp carries additional search information @param attributes the list of attributes to the property @return the number of entities matching the search.
[ "Count", "the", "number", "of", "E", "instances", "." ]
train
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L392-L395
buyi/RecyclerViewPagerIndicator
recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java
RecyclerTitlePageIndicator.calcBounds
private Rect calcBounds(int index, Paint paint) { //Calculate the text bounds Rect bounds = new Rect(); CharSequence title = getTitle(index); bounds.right = (int) paint.measureText(title, 0, title.length()); bounds.bottom = (int) (paint.descent() - paint.ascent()); return...
java
private Rect calcBounds(int index, Paint paint) { //Calculate the text bounds Rect bounds = new Rect(); CharSequence title = getTitle(index); bounds.right = (int) paint.measureText(title, 0, title.length()); bounds.bottom = (int) (paint.descent() - paint.ascent()); return...
[ "private", "Rect", "calcBounds", "(", "int", "index", ",", "Paint", "paint", ")", "{", "//Calculate the text bounds", "Rect", "bounds", "=", "new", "Rect", "(", ")", ";", "CharSequence", "title", "=", "getTitle", "(", "index", ")", ";", "bounds", ".", "rig...
Calculate the bounds for a view's title @param index @param paint @return
[ "Calculate", "the", "bounds", "for", "a", "view", "s", "title" ]
train
https://github.com/buyi/RecyclerViewPagerIndicator/blob/b3b5283801b60d40f7325c7f590c945262194fad/recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/indicator/RecyclerTitlePageIndicator.java#L698-L705
yasserg/crawler4j
crawler4j/src/main/java/edu/uci/ics/crawler4j/crawler/CrawlController.java
CrawlController.startNonBlocking
public <T extends WebCrawler> void startNonBlocking(Class<T> clazz, int numberOfCrawlers) { start(new DefaultWebCrawlerFactory<>(clazz), numberOfCrawlers, false); }
java
public <T extends WebCrawler> void startNonBlocking(Class<T> clazz, int numberOfCrawlers) { start(new DefaultWebCrawlerFactory<>(clazz), numberOfCrawlers, false); }
[ "public", "<", "T", "extends", "WebCrawler", ">", "void", "startNonBlocking", "(", "Class", "<", "T", ">", "clazz", ",", "int", "numberOfCrawlers", ")", "{", "start", "(", "new", "DefaultWebCrawlerFactory", "<>", "(", "clazz", ")", ",", "numberOfCrawlers", "...
Start the crawling session and return immediately. This method utilizes default crawler factory that creates new crawler using Java reflection @param clazz the class that implements the logic for crawler threads @param numberOfCrawlers the number of concurrent threads that will be contributing in this crawling session...
[ "Start", "the", "crawling", "session", "and", "return", "immediately", ".", "This", "method", "utilizes", "default", "crawler", "factory", "that", "creates", "new", "crawler", "using", "Java", "reflection" ]
train
https://github.com/yasserg/crawler4j/blob/4fcddc86414d1831973aff94050af55c7aeff3bc/crawler4j/src/main/java/edu/uci/ics/crawler4j/crawler/CrawlController.java#L265-L267
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_POST
public OvhInstanceDetail project_serviceName_instance_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkParams[] networks, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPath = "/cloud/project/{servi...
java
public OvhInstanceDetail project_serviceName_instance_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkParams[] networks, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPath = "/cloud/project/{servi...
[ "public", "OvhInstanceDetail", "project_serviceName_instance_POST", "(", "String", "serviceName", ",", "String", "flavorId", ",", "String", "groupId", ",", "String", "imageId", ",", "Boolean", "monthlyBilling", ",", "String", "name", ",", "OvhNetworkParams", "[", "]",...
Create a new instance REST: POST /cloud/project/{serviceName}/instance @param flavorId [required] Instance flavor id @param groupId [required] Start instance in group @param imageId [required] Instance image id @param monthlyBilling [required] Active monthly billing @param name [required] Instance name @param networks...
[ "Create", "a", "new", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1791-L1807
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java
DumpFileCreator.createDumpFile
public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) { URI uri = URI.create(urlString); String path = uri.getPath(); if (path == null) { log.warn("Cannot create dump file for URI: " + uri); return null; } String name = PATTERN_FIRST_LAS...
java
public File createDumpFile(final File dir, final String extension, final String urlString, final String additionalInfo) { URI uri = URI.create(urlString); String path = uri.getPath(); if (path == null) { log.warn("Cannot create dump file for URI: " + uri); return null; } String name = PATTERN_FIRST_LAS...
[ "public", "File", "createDumpFile", "(", "final", "File", "dir", ",", "final", "String", "extension", ",", "final", "String", "urlString", ",", "final", "String", "additionalInfo", ")", "{", "URI", "uri", "=", "URI", ".", "create", "(", "urlString", ")", "...
Computes the best file to save the response to the current page.
[ "Computes", "the", "best", "file", "to", "save", "the", "response", "to", "the", "current", "page", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/DumpFileCreator.java#L52-L85
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java
VelocityUtil.toWriter
public static void toWriter(String templateFileName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) { final VelocityContext context = new VelocityContext(); parseRequest(context, request); parseSession(context, request.getSession(false)); Writer writer = nu...
java
public static void toWriter(String templateFileName, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) { final VelocityContext context = new VelocityContext(); parseRequest(context, request); parseSession(context, request.getSession(false)); Writer writer = nu...
[ "public", "static", "void", "toWriter", "(", "String", "templateFileName", ",", "javax", ".", "servlet", ".", "http", ".", "HttpServletRequest", "request", ",", "javax", ".", "servlet", ".", "http", ".", "HttpServletResponse", "response", ")", "{", "final", "V...
生成内容写到响应内容中<br> 模板的变量来自于Request的Attribute对象 @param templateFileName 模板文件 @param request 请求对象,用于获取模板中的变量值 @param response 响应对象
[ "生成内容写到响应内容中<br", ">", "模板的变量来自于Request的Attribute对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L214-L228
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.cut
public static void cut(Image srcImage, ImageOutputStream destImageStream, Rectangle rectangle) throws IORuntimeException { writeJpg(cut(srcImage, rectangle), destImageStream); }
java
public static void cut(Image srcImage, ImageOutputStream destImageStream, Rectangle rectangle) throws IORuntimeException { writeJpg(cut(srcImage, rectangle), destImageStream); }
[ "public", "static", "void", "cut", "(", "Image", "srcImage", ",", "ImageOutputStream", "destImageStream", ",", "Rectangle", "rectangle", ")", "throws", "IORuntimeException", "{", "writeJpg", "(", "cut", "(", "srcImage", ",", "rectangle", ")", ",", "destImageStream...
图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param destImageStream 切片后的图像输出流 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.1.0 @throws IORuntimeException IO异常
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")", ",此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L319-L321
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java
AbstractGpxParserWpt.endElement
@Override public void endElement(String uri, String localName, String qName) throws SAXException { // currentElement represents the last string encountered in the document setCurrentElement(getElementNames().pop()); if (getCurrentElement().equalsIgnoreCase(GPXTags.WPT)) { //if <...
java
@Override public void endElement(String uri, String localName, String qName) throws SAXException { // currentElement represents the last string encountered in the document setCurrentElement(getElementNames().pop()); if (getCurrentElement().equalsIgnoreCase(GPXTags.WPT)) { //if <...
[ "@", "Override", "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "// currentElement represents the last string encountered in the document", "setCurrentElement", "(", "getElementNa...
Fires whenever an XML end markup is encountered. It catches attributes of the waypoint and saves them in corresponding values[]. @param uri URI of the local element @param localName Name of the local element (without prefix) @param qName qName of the local element (with prefix) @throws SAXException Any SAX exception, ...
[ "Fires", "whenever", "an", "XML", "end", "markup", "is", "encountered", ".", "It", "catches", "attributes", "of", "the", "waypoint", "and", "saves", "them", "in", "corresponding", "values", "[]", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/AbstractGpxParserWpt.java#L86-L110
rollbar/rollbar-java
rollbar-android/src/main/java/com/rollbar/android/Rollbar.java
Rollbar.log
public void log(String message, Map<String, Object> custom, Level level) { log(null, custom, message, level); }
java
public void log(String message, Map<String, Object> custom, Level level) { log(null, custom, message, level); }
[ "public", "void", "log", "(", "String", "message", ",", "Map", "<", "String", ",", "Object", ">", "custom", ",", "Level", "level", ")", "{", "log", "(", "null", ",", "custom", ",", "message", ",", "level", ")", ";", "}" ]
Record a message with extra information attached at the specified level. @param message the message. @param custom the extra information. @param level the level.
[ "Record", "a", "message", "with", "extra", "information", "attached", "at", "the", "specified", "level", "." ]
train
https://github.com/rollbar/rollbar-java/blob/5eb4537d1363722b51cfcce55b427cbd8489f17b/rollbar-android/src/main/java/com/rollbar/android/Rollbar.java#L776-L778
mozilla/rhino
src/org/mozilla/javascript/Parser.java
Parser.createDestructuringAssignment
Node createDestructuringAssignment(int type, Node left, Node right) { String tempName = currentScriptOrFn.getNextTempName(); Node result = destructuringAssignmentHelper(type, left, right, tempName); Node comma = result.getLastChild(); comma.addChildToBack(createName(tempN...
java
Node createDestructuringAssignment(int type, Node left, Node right) { String tempName = currentScriptOrFn.getNextTempName(); Node result = destructuringAssignmentHelper(type, left, right, tempName); Node comma = result.getLastChild(); comma.addChildToBack(createName(tempN...
[ "Node", "createDestructuringAssignment", "(", "int", "type", ",", "Node", "left", ",", "Node", "right", ")", "{", "String", "tempName", "=", "currentScriptOrFn", ".", "getNextTempName", "(", ")", ";", "Node", "result", "=", "destructuringAssignmentHelper", "(", ...
Given a destructuring assignment with a left hand side parsed as an array or object literal and a right hand side expression, rewrite as a series of assignments to the variables defined in left from property accesses to the expression on the right. @param type declaration type: Token.VAR or Token.LET or -1 @param left ...
[ "Given", "a", "destructuring", "assignment", "with", "a", "left", "hand", "side", "parsed", "as", "an", "array", "or", "object", "literal", "and", "a", "right", "hand", "side", "expression", "rewrite", "as", "a", "series", "of", "assignments", "to", "the", ...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Parser.java#L3996-L4004
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceUtils.java
ResourceUtils.getResourceUri
public static String getResourceUri(Resource resource) { try { return resource.getURI().toString(); } catch (FileNotFoundException e) { return resource.getDescription(); } catch (IOException e) { throw new RuntimeException("Could not create URI for resource: "...
java
public static String getResourceUri(Resource resource) { try { return resource.getURI().toString(); } catch (FileNotFoundException e) { return resource.getDescription(); } catch (IOException e) { throw new RuntimeException("Could not create URI for resource: "...
[ "public", "static", "String", "getResourceUri", "(", "Resource", "resource", ")", "{", "try", "{", "return", "resource", ".", "getURI", "(", ")", ".", "toString", "(", ")", ";", "}", "catch", "(", "FileNotFoundException", "e", ")", "{", "return", "resource...
First tries {@link Resource#getURI()} and if that fails with a FileNotFoundException then {@link Resource#getDescription()} is returned.
[ "First", "tries", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ResourceUtils.java#L29-L37
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/compression/CompressedDataBuffer.java
CompressedDataBuffer.readUnknown
public static DataBuffer readUnknown(DataInputStream s, AllocationMode allocMode, long length, DataType type) { // if buffer is uncompressed, it'll be valid buffer, so we'll just return it if (type != DataType.COMPRESSED) { DataBuffer buffer = Nd4j.createBuffer(type, length, false); ...
java
public static DataBuffer readUnknown(DataInputStream s, AllocationMode allocMode, long length, DataType type) { // if buffer is uncompressed, it'll be valid buffer, so we'll just return it if (type != DataType.COMPRESSED) { DataBuffer buffer = Nd4j.createBuffer(type, length, false); ...
[ "public", "static", "DataBuffer", "readUnknown", "(", "DataInputStream", "s", ",", "AllocationMode", "allocMode", ",", "long", "length", ",", "DataType", "type", ")", "{", "// if buffer is uncompressed, it'll be valid buffer, so we'll just return it", "if", "(", "type", "...
Drop-in replacement wrapper for BaseDataBuffer.read() method, aware of CompressedDataBuffer @param s @return
[ "Drop", "-", "in", "replacement", "wrapper", "for", "BaseDataBuffer", ".", "read", "()", "method", "aware", "of", "CompressedDataBuffer" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/compression/CompressedDataBuffer.java#L97-L129
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.shapeEquals
public static boolean shapeEquals(int[] shape1, int[] shape2) { if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) { return Arrays.equals(shape1, shape2); } if (isRowVectorShape(shape1) && isRowVectorShape(shape2)) { int[] shape1Comp = squeeze(shape1); ...
java
public static boolean shapeEquals(int[] shape1, int[] shape2) { if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) { return Arrays.equals(shape1, shape2); } if (isRowVectorShape(shape1) && isRowVectorShape(shape2)) { int[] shape1Comp = squeeze(shape1); ...
[ "public", "static", "boolean", "shapeEquals", "(", "int", "[", "]", "shape1", ",", "int", "[", "]", "shape2", ")", "{", "if", "(", "isColumnVectorShape", "(", "shape1", ")", "&&", "isColumnVectorShape", "(", "shape2", ")", ")", "{", "return", "Arrays", "...
Returns whether 2 shapes are equals by checking for dimension semantics as well as array equality @param shape1 the first shape for comparison @param shape2 the second shape for comparison @return whether the shapes are equivalent
[ "Returns", "whether", "2", "shapes", "are", "equals", "by", "checking", "for", "dimension", "semantics", "as", "well", "as", "array", "equality" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L1494-L1521
UrielCh/ovh-java-sdk
ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java
ApiOvhRouter.serviceName_vpn_id_PUT
public void serviceName_vpn_id_PUT(String serviceName, Long id, OvhVpn body) throws IOException { String qPath = "/router/{serviceName}/vpn/{id}"; StringBuilder sb = path(qPath, serviceName, id); exec(qPath, "PUT", sb.toString(), body); }
java
public void serviceName_vpn_id_PUT(String serviceName, Long id, OvhVpn body) throws IOException { String qPath = "/router/{serviceName}/vpn/{id}"; StringBuilder sb = path(qPath, serviceName, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_vpn_id_PUT", "(", "String", "serviceName", ",", "Long", "id", ",", "OvhVpn", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/router/{serviceName}/vpn/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPat...
Alter this object properties REST: PUT /router/{serviceName}/vpn/{id} @param body [required] New object properties @param serviceName [required] The internal name of your Router offer @param id [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L90-L94
landawn/AbacusUtil
src/com/landawn/abacus/android/util/SQLiteExecutor.java
SQLiteExecutor.toList
static <T> List<T> toList(Class<T> targetClass, Cursor cursor) { return toList(targetClass, cursor, 0, Integer.MAX_VALUE); }
java
static <T> List<T> toList(Class<T> targetClass, Cursor cursor) { return toList(targetClass, cursor, 0, Integer.MAX_VALUE); }
[ "static", "<", "T", ">", "List", "<", "T", ">", "toList", "(", "Class", "<", "T", ">", "targetClass", ",", "Cursor", "cursor", ")", "{", "return", "toList", "(", "targetClass", ",", "cursor", ",", "0", ",", "Integer", ".", "MAX_VALUE", ")", ";", "}...
Returns values from all rows associated with the specified <code>targetClass</code> if the specified <code>targetClass</code> is an entity class, otherwise, only returns values from first column. @param targetClass entity class or specific column type. @param cursor @return
[ "Returns", "values", "from", "all", "rows", "associated", "with", "the", "specified", "<code", ">", "targetClass<", "/", "code", ">", "if", "the", "specified", "<code", ">", "targetClass<", "/", "code", ">", "is", "an", "entity", "class", "otherwise", "only"...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/android/util/SQLiteExecutor.java#L269-L271
indeedeng/util
util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java
Quicksortables.heapSort
public static void heapSort(Quicksortable q, int size) { q = reverseQuicksortable(q); makeHeap(q, size); sortheap(q, size); }
java
public static void heapSort(Quicksortable q, int size) { q = reverseQuicksortable(q); makeHeap(q, size); sortheap(q, size); }
[ "public", "static", "void", "heapSort", "(", "Quicksortable", "q", ",", "int", "size", ")", "{", "q", "=", "reverseQuicksortable", "(", "q", ")", ";", "makeHeap", "(", "q", ",", "size", ")", ";", "sortheap", "(", "q", ",", "size", ")", ";", "}" ]
sorts the elements in q using the heapsort method @param q The quicksortable to heapsort. @param size The size of the quicksortable.
[ "sorts", "the", "elements", "in", "q", "using", "the", "heapsort", "method" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java#L241-L245
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.cmdline/src/com/ibm/ws/kernel/feature/internal/generator/ManifestFileProcessor.java
ManifestFileProcessor.getUsrProductFeatureDefinitions
private Map<String, ProvisioningFeatureDefinition> getUsrProductFeatureDefinitions() { Map<String, ProvisioningFeatureDefinition> features = null; File userDir = Utils.getUserDir(); if (userDir != null && userDir.exists()) { File userFeatureDir = new File(userDir, USER_FEATURE_DIR); ...
java
private Map<String, ProvisioningFeatureDefinition> getUsrProductFeatureDefinitions() { Map<String, ProvisioningFeatureDefinition> features = null; File userDir = Utils.getUserDir(); if (userDir != null && userDir.exists()) { File userFeatureDir = new File(userDir, USER_FEATURE_DIR); ...
[ "private", "Map", "<", "String", ",", "ProvisioningFeatureDefinition", ">", "getUsrProductFeatureDefinitions", "(", ")", "{", "Map", "<", "String", ",", "ProvisioningFeatureDefinition", ">", "features", "=", "null", ";", "File", "userDir", "=", "Utils", ".", "getU...
Retrieves a Map of feature definitions in default usr product extension location @return Null if the user directory cannot be found. An empty map if the features manifests cannot be found. A Map of product extension features if all goes well.
[ "Retrieves", "a", "Map", "of", "feature", "definitions", "in", "default", "usr", "product", "extension", "location" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.cmdline/src/com/ibm/ws/kernel/feature/internal/generator/ManifestFileProcessor.java#L287-L313
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.updateLastLoginDate
public void updateLastLoginDate(CmsDbContext dbc, CmsUser user) throws CmsException { m_monitor.clearUserCache(user); // set the last login time to the current time user.setLastlogin(System.currentTimeMillis()); dbc.setAttribute(ATTRIBUTE_LOGIN, user.getName()); getUserDriver(db...
java
public void updateLastLoginDate(CmsDbContext dbc, CmsUser user) throws CmsException { m_monitor.clearUserCache(user); // set the last login time to the current time user.setLastlogin(System.currentTimeMillis()); dbc.setAttribute(ATTRIBUTE_LOGIN, user.getName()); getUserDriver(db...
[ "public", "void", "updateLastLoginDate", "(", "CmsDbContext", "dbc", ",", "CmsUser", "user", ")", "throws", "CmsException", "{", "m_monitor", ".", "clearUserCache", "(", "user", ")", ";", "// set the last login time to the current time", "user", ".", "setLastlogin", "...
Updates the last login date on the given user to the current time.<p> @param dbc the current database context @param user the user to be updated @throws CmsException if operation was not successful
[ "Updates", "the", "last", "login", "date", "on", "the", "given", "user", "to", "the", "current", "time", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L9399-L9426
alkacon/opencms-core
src/org/opencms/jsp/CmsJspNavBuilder.java
CmsJspNavBuilder.getDefaultFile
@Deprecated public static String getDefaultFile(CmsObject cms, String folder) { if (folder.endsWith("/")) { try { CmsResource defaultFile = cms.readDefaultFile(folder); if (defaultFile != null) { return cms.getSitePath(defaultFile); ...
java
@Deprecated public static String getDefaultFile(CmsObject cms, String folder) { if (folder.endsWith("/")) { try { CmsResource defaultFile = cms.readDefaultFile(folder); if (defaultFile != null) { return cms.getSitePath(defaultFile); ...
[ "@", "Deprecated", "public", "static", "String", "getDefaultFile", "(", "CmsObject", "cms", ",", "String", "folder", ")", "{", "if", "(", "folder", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "try", "{", "CmsResource", "defaultFile", "=", "cms", ".", "...
Returns the full name (including VFS path) of the default file for this navigation element or <code>null</code> if the navigation element is not a folder.<p> The default file of a folder is determined by the value of the property <code>default-file</code> or the system wide property setting.<p> @param cms the CMS obj...
[ "Returns", "the", "full", "name", "(", "including", "VFS", "path", ")", "of", "the", "default", "file", "for", "this", "navigation", "element", "or", "<code", ">", "null<", "/", "code", ">", "if", "the", "navigation", "element", "is", "not", "a", "folder...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspNavBuilder.java#L202-L217