repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
FasterXML/jackson-jr
jr-objects/src/main/java/com/fasterxml/jackson/jr/type/TypeBindings.java
TypeBindings.withUnboundVariable
public TypeBindings withUnboundVariable(String name) { """ Method for creating an instance that has same bindings as this object, plus an indicator for additional type variable that may be unbound within this context; this is needed to resolve recursive self-references. """ int len = (_unboundVariabl...
java
public TypeBindings withUnboundVariable(String name) { int len = (_unboundVariables == null) ? 0 : _unboundVariables.length; String[] names = (len == 0) ? new String[1] : Arrays.copyOf(_unboundVariables, len+1); names[len] = name; return new TypeBindings(_names, _typ...
[ "public", "TypeBindings", "withUnboundVariable", "(", "String", "name", ")", "{", "int", "len", "=", "(", "_unboundVariables", "==", "null", ")", "?", "0", ":", "_unboundVariables", ".", "length", ";", "String", "[", "]", "names", "=", "(", "len", "==", ...
Method for creating an instance that has same bindings as this object, plus an indicator for additional type variable that may be unbound within this context; this is needed to resolve recursive self-references.
[ "Method", "for", "creating", "an", "instance", "that", "has", "same", "bindings", "as", "this", "object", "plus", "an", "indicator", "for", "additional", "type", "variable", "that", "may", "be", "unbound", "within", "this", "context", ";", "this", "is", "nee...
train
https://github.com/FasterXML/jackson-jr/blob/62ca7a82bd90a9be77028e0b62364307d7532837/jr-objects/src/main/java/com/fasterxml/jackson/jr/type/TypeBindings.java#L78-L85
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/CmsGalleryTreeItem.java
CmsGalleryTreeItem.createListWidget
private CmsListItemWidget createListWidget(CmsGalleryFolderEntry galleryFolder) { """ Creates the list item widget for the given folder.<p> @param galleryFolder the gallery folder @return the list item widget """ String title; if (galleryFolder.getOwnProperties().containsKey(CmsClientPro...
java
private CmsListItemWidget createListWidget(CmsGalleryFolderEntry galleryFolder) { String title; if (galleryFolder.getOwnProperties().containsKey(CmsClientProperty.PROPERTY_TITLE)) { title = galleryFolder.getOwnProperties().get(CmsClientProperty.PROPERTY_TITLE).getStructureValue(); }...
[ "private", "CmsListItemWidget", "createListWidget", "(", "CmsGalleryFolderEntry", "galleryFolder", ")", "{", "String", "title", ";", "if", "(", "galleryFolder", ".", "getOwnProperties", "(", ")", ".", "containsKey", "(", "CmsClientProperty", ".", "PROPERTY_TITLE", ")"...
Creates the list item widget for the given folder.<p> @param galleryFolder the gallery folder @return the list item widget
[ "Creates", "the", "list", "item", "widget", "for", "the", "given", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/CmsGalleryTreeItem.java#L240-L306
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java
RocksDBIncrementalRestoreOperation.restoreInstanceDirectoryFromPath
private void restoreInstanceDirectoryFromPath(Path source, String instanceRocksDBPath) throws IOException { """ This recreates the new working directory of the recovered RocksDB instance and links/copies the contents from a local state. """ FileSystem fileSystem = source.getFileSystem(); final FileStatu...
java
private void restoreInstanceDirectoryFromPath(Path source, String instanceRocksDBPath) throws IOException { FileSystem fileSystem = source.getFileSystem(); final FileStatus[] fileStatuses = fileSystem.listStatus(source); if (fileStatuses == null) { throw new IOException("Cannot list file statues. Directory ...
[ "private", "void", "restoreInstanceDirectoryFromPath", "(", "Path", "source", ",", "String", "instanceRocksDBPath", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "source", ".", "getFileSystem", "(", ")", ";", "final", "FileStatus", "[", "]", ...
This recreates the new working directory of the recovered RocksDB instance and links/copies the contents from a local state.
[ "This", "recreates", "the", "new", "working", "directory", "of", "the", "recovered", "RocksDB", "instance", "and", "links", "/", "copies", "the", "contents", "from", "a", "local", "state", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/restore/RocksDBIncrementalRestoreOperation.java#L456-L479
wisdom-framework/wisdom
core/application-configuration/src/main/java/org/wisdom/configuration/ApplicationConfigurationImpl.java
ApplicationConfigurationImpl.getFileWithDefault
@Override public File getFileWithDefault(String key, String file) { """ Get a File property or a default value when property cannot be found in any configuration file. The file object is constructed using <code>new File(basedir, value)</code>. @param key the key @param file the default file @return the...
java
@Override public File getFileWithDefault(String key, String file) { String value = get(key); if (value == null) { return new File(baseDirectory, file); } else { return new File(baseDirectory, value); } }
[ "@", "Override", "public", "File", "getFileWithDefault", "(", "String", "key", ",", "String", "file", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "new", "File", "(", "baseDirector...
Get a File property or a default value when property cannot be found in any configuration file. The file object is constructed using <code>new File(basedir, value)</code>. @param key the key @param file the default file @return the file object
[ "Get", "a", "File", "property", "or", "a", "default", "value", "when", "property", "cannot", "be", "found", "in", "any", "configuration", "file", ".", "The", "file", "object", "is", "constructed", "using", "<code", ">", "new", "File", "(", "basedir", "valu...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/application-configuration/src/main/java/org/wisdom/configuration/ApplicationConfigurationImpl.java#L291-L299
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/LoadBalancerBackendAddressPoolsInner.java
LoadBalancerBackendAddressPoolsInner.getAsync
public Observable<BackendAddressPoolInner> getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { """ Gets load balancer backend address pool. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param backendAdd...
java
public Observable<BackendAddressPoolInner> getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { return getWithServiceResponseAsync(resourceGroupName, loadBalancerName, backendAddressPoolName).map(new Func1<ServiceResponse<BackendAddressPoolInner>, BackendAddressPoolInner>...
[ "public", "Observable", "<", "BackendAddressPoolInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "String", "backendAddressPoolName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "load...
Gets load balancer backend address pool. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param backendAddressPoolName The name of the backend address pool. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable t...
[ "Gets", "load", "balancer", "backend", "address", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/LoadBalancerBackendAddressPoolsInner.java#L233-L240
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/index/composites/CompositesIndex.java
CompositesIndex.getIndexComparator
public static CellNameType getIndexComparator(CFMetaData baseMetadata, ColumnDefinition cfDef) { """ Check SecondaryIndex.getIndexComparator if you want to know why this is static """ if (cfDef.type.isCollection() && cfDef.type.isMultiCell()) { switch (((CollectionType)cfDef.type).k...
java
public static CellNameType getIndexComparator(CFMetaData baseMetadata, ColumnDefinition cfDef) { if (cfDef.type.isCollection() && cfDef.type.isMultiCell()) { switch (((CollectionType)cfDef.type).kind) { case LIST: return CompositesIndexOnCo...
[ "public", "static", "CellNameType", "getIndexComparator", "(", "CFMetaData", "baseMetadata", ",", "ColumnDefinition", "cfDef", ")", "{", "if", "(", "cfDef", ".", "type", ".", "isCollection", "(", ")", "&&", "cfDef", ".", "type", ".", "isMultiCell", "(", ")", ...
Check SecondaryIndex.getIndexComparator if you want to know why this is static
[ "Check", "SecondaryIndex", ".", "getIndexComparator", "if", "you", "want", "to", "know", "why", "this", "is", "static" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/index/composites/CompositesIndex.java#L91-L120
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.createShapeInformation
public static DataBuffer createShapeInformation(int[] shape, int[] stride, long offset, int elementWiseStride, char order) { """ Creates the shape information buffer given the shape,stride @param shape the shape for the buffer @param stride the stride for the buffer @param offset the offset for the buffer @pa...
java
public static DataBuffer createShapeInformation(int[] shape, int[] stride, long offset, int elementWiseStride, char order) { if (shape.length != stride.length) throw new IllegalStateException("Shape and stride must be the same length"); int rank = shape.length; int shapeBuffer[] = n...
[ "public", "static", "DataBuffer", "createShapeInformation", "(", "int", "[", "]", "shape", ",", "int", "[", "]", "stride", ",", "long", "offset", ",", "int", "elementWiseStride", ",", "char", "order", ")", "{", "if", "(", "shape", ".", "length", "!=", "s...
Creates the shape information buffer given the shape,stride @param shape the shape for the buffer @param stride the stride for the buffer @param offset the offset for the buffer @param elementWiseStride the element wise stride for the buffer @param order the order for the buffer @return the shape information buffer giv...
[ "Creates", "the", "shape", "information", "buffer", "given", "the", "shape", "stride" ]
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#L3170-L3192
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java
SoftAllocationUrl.getSoftAllocationUrl
public static MozuUrl getSoftAllocationUrl(String responseFields, Integer softAllocationId) { """ Get Resource Url for GetSoftAllocation @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to re...
java
public static MozuUrl getSoftAllocationUrl(String responseFields, Integer softAllocationId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/softallocations/{softAllocationId}?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl...
[ "public", "static", "MozuUrl", "getSoftAllocationUrl", "(", "String", "responseFields", ",", "Integer", "softAllocationId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/softallocations/{softAllocationId}?responseFields={re...
Get Resource Url for GetSoftAllocation @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. @param softAllocationId...
[ "Get", "Resource", "Url", "for", "GetSoftAllocation" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SoftAllocationUrl.java#L42-L48
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemcpyArrayToArray
public static int cudaMemcpyArrayToArray(cudaArray dst, long wOffsetDst, long hOffsetDst, cudaArray src, long wOffsetSrc, long hOffsetSrc, long count, int cudaMemcpyKind_kind) { """ Copies data between host and device. <pre> cudaError_t cudaMemcpyArrayToArray ( cudaArray_t dst, size_t wOffsetDst, size_t hOf...
java
public static int cudaMemcpyArrayToArray(cudaArray dst, long wOffsetDst, long hOffsetDst, cudaArray src, long wOffsetSrc, long hOffsetSrc, long count, int cudaMemcpyKind_kind) { return checkResult(cudaMemcpyArrayToArrayNative(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, cudaMemcpyKind_...
[ "public", "static", "int", "cudaMemcpyArrayToArray", "(", "cudaArray", "dst", ",", "long", "wOffsetDst", ",", "long", "hOffsetDst", ",", "cudaArray", "src", ",", "long", "wOffsetSrc", ",", "long", "hOffsetSrc", ",", "long", "count", ",", "int", "cudaMemcpyKind_k...
Copies data between host and device. <pre> cudaError_t cudaMemcpyArrayToArray ( cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind = cudaMemcpyDeviceToDevice ) </pre> <div> <p>Copies data between host and device. Copies ...
[ "Copies", "data", "between", "host", "and", "device", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L4889-L4892
derari/cthul
matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedMatcher.java
NestedMatcher.nestedMatch
protected boolean nestedMatch(Matcher<?> matcher, Object item, Description mismatch) { """ Invokes {@link #quickMatch(org.hamcrest.Matcher, java.lang.Object, org.hamcrest.Description)} for {@code m}, enclosed in parantheses if necessary. @param matcher @param item @param mismatch @return """ ret...
java
protected boolean nestedMatch(Matcher<?> matcher, Object item, Description mismatch) { return Nested.matches(this, matcher, item, mismatch); }
[ "protected", "boolean", "nestedMatch", "(", "Matcher", "<", "?", ">", "matcher", ",", "Object", "item", ",", "Description", "mismatch", ")", "{", "return", "Nested", ".", "matches", "(", "this", ",", "matcher", ",", "item", ",", "mismatch", ")", ";", "}"...
Invokes {@link #quickMatch(org.hamcrest.Matcher, java.lang.Object, org.hamcrest.Description)} for {@code m}, enclosed in parantheses if necessary. @param matcher @param item @param mismatch @return
[ "Invokes", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedMatcher.java#L50-L52
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listModelsAsync
public Observable<List<ModelInfoResponse>> listModelsAsync(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter) { """ Gets information about the application version models. @param appId The application ID. @param versionId The version ID. @param listModelsOptionalParameter th...
java
public Observable<List<ModelInfoResponse>> listModelsAsync(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter) { return listModelsWithServiceResponseAsync(appId, versionId, listModelsOptionalParameter).map(new Func1<ServiceResponse<List<ModelInfoResponse>>, List<ModelInfoRespo...
[ "public", "Observable", "<", "List", "<", "ModelInfoResponse", ">", ">", "listModelsAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListModelsOptionalParameter", "listModelsOptionalParameter", ")", "{", "return", "listModelsWithServiceResponseAsync", "(", ...
Gets information about the application version models. @param appId The application ID. @param versionId The version ID. @param listModelsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return...
[ "Gets", "information", "about", "the", "application", "version", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2472-L2479
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateTime
public void updateTime(String columnLabel, Time x) throws SQLException { """ <!-- start generic documentation --> Updates the designated column with a <code>java.sql.Time</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update ...
java
public void updateTime(String columnLabel, Time x) throws SQLException { updateTime(findColumn(columnLabel), x); }
[ "public", "void", "updateTime", "(", "String", "columnLabel", ",", "Time", "x", ")", "throws", "SQLException", "{", "updateTime", "(", "findColumn", "(", "columnLabel", ")", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with a <code>java.sql.Time</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> ...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "a", "<code", ">", "java", ".", "sql", ".", "Time<", "/", "code", ">", "value", ".", "The", "updater", "methods", "are", "used", "to", "update",...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L3641-L3643
grpc/grpc-java
alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java
RpcProtocolVersionsUtil.isGreaterThanOrEqualTo
@VisibleForTesting static boolean isGreaterThanOrEqualTo(Version first, Version second) { """ Returns true if first Rpc Protocol Version is greater than or equal to the second one. Returns false otherwise. """ if ((first.getMajor() > second.getMajor()) || (first.getMajor() == second.getMajor() &...
java
@VisibleForTesting static boolean isGreaterThanOrEqualTo(Version first, Version second) { if ((first.getMajor() > second.getMajor()) || (first.getMajor() == second.getMajor() && first.getMinor() >= second.getMinor())) { return true; } return false; }
[ "@", "VisibleForTesting", "static", "boolean", "isGreaterThanOrEqualTo", "(", "Version", "first", ",", "Version", "second", ")", "{", "if", "(", "(", "first", ".", "getMajor", "(", ")", ">", "second", ".", "getMajor", "(", ")", ")", "||", "(", "first", "...
Returns true if first Rpc Protocol Version is greater than or equal to the second one. Returns false otherwise.
[ "Returns", "true", "if", "first", "Rpc", "Protocol", "Version", "is", "greater", "than", "or", "equal", "to", "the", "second", "one", ".", "Returns", "false", "otherwise", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/alts/src/main/java/io/grpc/alts/internal/RpcProtocolVersionsUtil.java#L53-L60
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.unsubscribeAllDeletedResources
public void unsubscribeAllDeletedResources(CmsRequestContext context, String poolName, long deletedTo) throws CmsException { """ Unsubscribes all deleted resources that were deleted before the specified time stamp.<p> @param context the request context @param poolName the name of the database pool to use ...
java
public void unsubscribeAllDeletedResources(CmsRequestContext context, String poolName, long deletedTo) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.unsubscribeAllDeletedResources(dbc, poolName, deletedTo); } catch (Exce...
[ "public", "void", "unsubscribeAllDeletedResources", "(", "CmsRequestContext", "context", ",", "String", "poolName", ",", "long", "deletedTo", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")"...
Unsubscribes all deleted resources that were deleted before the specified time stamp.<p> @param context the request context @param poolName the name of the database pool to use @param deletedTo the time stamp to which the resources have been deleted @throws CmsException if something goes wrong
[ "Unsubscribes", "all", "deleted", "resources", "that", "were", "deleted", "before", "the", "specified", "time", "stamp", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6331-L6344
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/Compound.java
Compound.field2inout
public void field2inout(Object o, String field, Object comp, String inout) { """ Maps a field to an In and Out field @param o the object @param field the field name @param comp the component @param inout the field tagged with In and Out """ controller.mapInField(o, field, comp, inout); co...
java
public void field2inout(Object o, String field, Object comp, String inout) { controller.mapInField(o, field, comp, inout); controller.mapOutField(comp, inout, o, field); }
[ "public", "void", "field2inout", "(", "Object", "o", ",", "String", "field", ",", "Object", "comp", ",", "String", "inout", ")", "{", "controller", ".", "mapInField", "(", "o", ",", "field", ",", "comp", ",", "inout", ")", ";", "controller", ".", "mapO...
Maps a field to an In and Out field @param o the object @param field the field name @param comp the component @param inout the field tagged with In and Out
[ "Maps", "a", "field", "to", "an", "In", "and", "Out", "field" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/Compound.java#L167-L170
uniform-java/uniform
src/main/java/net/uniform/impl/ElementWithOptions.java
ElementWithOptions.addOptionToGroup
public ElementWithOptions addOptionToGroup(Option option, String groupId) { """ Adds an option to the group of this element with the given id. If the group is not found, it's created with null text. @param option New option with unique value in this element @param groupId Id of the option group @return This e...
java
public ElementWithOptions addOptionToGroup(Option option, String groupId) { if (option == null) { throw new IllegalArgumentException("Option cannot be null"); } for (OptionGroup group : optionGroups.values()) { if (group.hasValue(option.getValue())) { ...
[ "public", "ElementWithOptions", "addOptionToGroup", "(", "Option", "option", ",", "String", "groupId", ")", "{", "if", "(", "option", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Option cannot be null\"", ")", ";", "}", "for", "(",...
Adds an option to the group of this element with the given id. If the group is not found, it's created with null text. @param option New option with unique value in this element @param groupId Id of the option group @return This element
[ "Adds", "an", "option", "to", "the", "group", "of", "this", "element", "with", "the", "given", "id", ".", "If", "the", "group", "is", "not", "found", "it", "s", "created", "with", "null", "text", "." ]
train
https://github.com/uniform-java/uniform/blob/0b84f0db562253165bc06c69f631e464dca0cb48/src/main/java/net/uniform/impl/ElementWithOptions.java#L106-L127
gallandarakhneorg/afc
advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java
Log4jIntegrationModule.provideRootLogger
@SuppressWarnings("static-method") @Singleton @Provides public Logger provideRootLogger(ConfigurationFactory configFactory, Provider<Log4jIntegrationConfig> config) { """ Provide the root logger. @param configFactory the factory of configurations. @param config the logger configuration. @return the root lo...
java
@SuppressWarnings("static-method") @Singleton @Provides public Logger provideRootLogger(ConfigurationFactory configFactory, Provider<Log4jIntegrationConfig> config) { final Logger root = Logger.getRootLogger(); // Reroute JUL SLF4JBridgeHandler.removeHandlersForRootLogger(); SLF4JBridgeHandler.install(); f...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "@", "Singleton", "@", "Provides", "public", "Logger", "provideRootLogger", "(", "ConfigurationFactory", "configFactory", ",", "Provider", "<", "Log4jIntegrationConfig", ">", "config", ")", "{", "final", "Logger"...
Provide the root logger. @param configFactory the factory of configurations. @param config the logger configuration. @return the root logger.
[ "Provide", "the", "root", "logger", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java#L89-L102
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
TypeAnnotationPosition.typeCast
public static TypeAnnotationPosition typeCast(final List<TypePathEntry> location, final int type_index) { """ Create a {@code TypeAnnotationPosition} for a type cast. @param location The type path. @param type_index The index into an intersection type. """ return typeCast(l...
java
public static TypeAnnotationPosition typeCast(final List<TypePathEntry> location, final int type_index) { return typeCast(location, null, type_index, -1); }
[ "public", "static", "TypeAnnotationPosition", "typeCast", "(", "final", "List", "<", "TypePathEntry", ">", "location", ",", "final", "int", "type_index", ")", "{", "return", "typeCast", "(", "location", ",", "null", ",", "type_index", ",", "-", "1", ")", ";"...
Create a {@code TypeAnnotationPosition} for a type cast. @param location The type path. @param type_index The index into an intersection type.
[ "Create", "a", "{", "@code", "TypeAnnotationPosition", "}", "for", "a", "type", "cast", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java#L878-L882
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java
XSLTAttributeDef.processPREFIX_URLLIST
StringVector processPREFIX_URLLIST( StylesheetHandler handler, String uri, String name, String rawName, String value) throws org.xml.sax.SAXException { """ Process an attribute string of type T_URLLIST into a vector of prefixes that may be resolved to URLs. @param handler non-null referen...
java
StringVector processPREFIX_URLLIST( StylesheetHandler handler, String uri, String name, String rawName, String value) throws org.xml.sax.SAXException { StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f"); int nStrings = tokenizer.countTokens(); StringVector strings =...
[ "StringVector", "processPREFIX_URLLIST", "(", "StylesheetHandler", "handler", ",", "String", "uri", ",", "String", "name", ",", "String", "rawName", ",", "String", "value", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "StringTokenizer"...
Process an attribute string of type T_URLLIST into a vector of prefixes that may be resolved to URLs. @param handler non-null reference to current StylesheetHandler that is constructing the Templates. @param uri The Namespace URI, or an empty string. @param name The local name (without prefix), or empty string if not ...
[ "Process", "an", "attribute", "string", "of", "type", "T_URLLIST", "into", "a", "vector", "of", "prefixes", "that", "may", "be", "resolved", "to", "URLs", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1228-L1250
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_virtuozzo_serviceName_upgrade_duration_GET
public OvhOrder license_virtuozzo_serviceName_upgrade_duration_GET(String serviceName, String duration, OvhOrderableVirtuozzoContainerNumberEnum containerNumber) throws IOException { """ Get prices and contracts information REST: GET /order/license/virtuozzo/{serviceName}/upgrade/{duration} @param containerNum...
java
public OvhOrder license_virtuozzo_serviceName_upgrade_duration_GET(String serviceName, String duration, OvhOrderableVirtuozzoContainerNumberEnum containerNumber) throws IOException { String qPath = "/order/license/virtuozzo/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); ...
[ "public", "OvhOrder", "license_virtuozzo_serviceName_upgrade_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhOrderableVirtuozzoContainerNumberEnum", "containerNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/license/...
Get prices and contracts information REST: GET /order/license/virtuozzo/{serviceName}/upgrade/{duration} @param containerNumber [required] How much container is this license able to manage ... @param serviceName [required] The name of your Virtuozzo license @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#L1070-L1076
esigate/esigate
esigate-core/src/main/java/org/esigate/Driver.java
Driver.performRendering
private String performRendering(String pageUrl, DriverRequest originalRequest, CloseableHttpResponse response, String body, Renderer[] renderers) throws IOException, HttpErrorPage { """ Performs rendering (apply a render list) on an http response body (as a String). @param pageUrl The remove url fr...
java
private String performRendering(String pageUrl, DriverRequest originalRequest, CloseableHttpResponse response, String body, Renderer[] renderers) throws IOException, HttpErrorPage { // Start rendering RenderEvent renderEvent = new RenderEvent(pageUrl, originalRequest, response); // C...
[ "private", "String", "performRendering", "(", "String", "pageUrl", ",", "DriverRequest", "originalRequest", ",", "CloseableHttpResponse", "response", ",", "String", "body", ",", "Renderer", "[", "]", "renderers", ")", "throws", "IOException", ",", "HttpErrorPage", "...
Performs rendering (apply a render list) on an http response body (as a String). @param pageUrl The remove url from which the body was retrieved. @param originalRequest The request received by esigate. @param response The Http Reponse. @param body The body of the Http Response which will be rendered. @param renderers ...
[ "Performs", "rendering", "(", "apply", "a", "render", "list", ")", "on", "an", "http", "response", "body", "(", "as", "a", "String", ")", "." ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/Driver.java#L399-L418
Waikato/moa
moa/src/main/java/moa/classifiers/lazy/neighboursearch/EuclideanDistance.java
EuclideanDistance.updateDistance
protected double updateDistance(double currDist, double diff) { """ Updates the current distance calculated so far with the new difference between two attributes. The difference between the attributes was calculated with the difference(int,double,double) method. @param currDist the current distance calculated...
java
protected double updateDistance(double currDist, double diff) { double result; result = currDist; result += diff * diff; return result; }
[ "protected", "double", "updateDistance", "(", "double", "currDist", ",", "double", "diff", ")", "{", "double", "result", ";", "result", "=", "currDist", ";", "result", "+=", "diff", "*", "diff", ";", "return", "result", ";", "}" ]
Updates the current distance calculated so far with the new difference between two attributes. The difference between the attributes was calculated with the difference(int,double,double) method. @param currDist the current distance calculated so far @param diff the difference between two new attributes @return the up...
[ "Updates", "the", "current", "distance", "calculated", "so", "far", "with", "the", "new", "difference", "between", "two", "attributes", ".", "The", "difference", "between", "the", "attributes", "was", "calculated", "with", "the", "difference", "(", "int", "doubl...
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/lazy/neighboursearch/EuclideanDistance.java#L138-L145
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java
JvmTypesBuilder.newTypeRef
@Deprecated public JvmTypeReference newTypeRef(JvmType type, JvmTypeReference... typeArgs) { """ Creates a new {@link JvmTypeReference} pointing to the given class and containing the given type arguments. @param type the type the reference shall point to. @param typeArgs type arguments @return the newly cr...
java
@Deprecated public JvmTypeReference newTypeRef(JvmType type, JvmTypeReference... typeArgs) { return references.createTypeRef(type, typeArgs); }
[ "@", "Deprecated", "public", "JvmTypeReference", "newTypeRef", "(", "JvmType", "type", ",", "JvmTypeReference", "...", "typeArgs", ")", "{", "return", "references", ".", "createTypeRef", "(", "type", ",", "typeArgs", ")", ";", "}" ]
Creates a new {@link JvmTypeReference} pointing to the given class and containing the given type arguments. @param type the type the reference shall point to. @param typeArgs type arguments @return the newly created {@link JvmTypeReference} @deprecated use {@link JvmTypeReferenceBuilder#typeRef(JvmType, JvmTypeRefere...
[ "Creates", "a", "new", "{", "@link", "JvmTypeReference", "}", "pointing", "to", "the", "given", "class", "and", "containing", "the", "given", "type", "arguments", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/jvmmodel/JvmTypesBuilder.java#L1333-L1336
box/box-java-sdk
src/main/java/com/box/sdk/BoxUser.java
BoxUser.getUsersInfoForType
private static Iterable<BoxUser.Info> getUsersInfoForType(final BoxAPIConnection api, final String filterTerm, final String userType, final String externalAppUserId, final String... fields) { """ Helper method to abstract out the common logic from the various users methods. @param api th...
java
private static Iterable<BoxUser.Info> getUsersInfoForType(final BoxAPIConnection api, final String filterTerm, final String userType, final String externalAppUserId, final String... fields) { return new Iterable<BoxUser.Info>() { public Iterator<BoxUser.Info> iterator() { Q...
[ "private", "static", "Iterable", "<", "BoxUser", ".", "Info", ">", "getUsersInfoForType", "(", "final", "BoxAPIConnection", "api", ",", "final", "String", "filterTerm", ",", "final", "String", "userType", ",", "final", "String", "externalAppUserId", ",", "final", ...
Helper method to abstract out the common logic from the various users methods. @param api the API connection to be used when retrieving the users. @param filterTerm The filter term to lookup users by (login for external, login or name for managed) @param userType The type of users we want...
[ "Helper", "method", "to", "abstract", "out", "the", "common", "logic", "from", "the", "various", "users", "methods", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxUser.java#L251-L272
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java
CoreRemoteMongoCollectionImpl.updateOne
public RemoteUpdateResult updateOne(final Bson filter, final Bson update) { """ Update a single document in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @param update a document describing the update, which may not be null. Th...
java
public RemoteUpdateResult updateOne(final Bson filter, final Bson update) { return updateOne(filter, update, new RemoteUpdateOptions()); }
[ "public", "RemoteUpdateResult", "updateOne", "(", "final", "Bson", "filter", ",", "final", "Bson", "update", ")", "{", "return", "updateOne", "(", "filter", ",", "update", ",", "new", "RemoteUpdateOptions", "(", ")", ")", ";", "}" ]
Update a single document in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @param update a document describing the update, which may not be null. The update to apply must include only update operators. @return the result of the update o...
[ "Update", "a", "single", "document", "in", "the", "collection", "according", "to", "the", "specified", "arguments", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L396-L398
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java
SDNN.batchNorm
public SDVariable batchNorm(SDVariable input, SDVariable mean, SDVariable variance, SDVariable gamma, SDVariable beta, double epsilon, int... axis) { """ Batch norm operation. @see #batchNorm(String, SDVariable, SDVariable, SDVariable, SDVariable, ...
java
public SDVariable batchNorm(SDVariable input, SDVariable mean, SDVariable variance, SDVariable gamma, SDVariable beta, double epsilon, int... axis) { return batchNorm(null, input, mean, variance, gamma, beta, true, true, epsilon, axis); }
[ "public", "SDVariable", "batchNorm", "(", "SDVariable", "input", ",", "SDVariable", "mean", ",", "SDVariable", "variance", ",", "SDVariable", "gamma", ",", "SDVariable", "beta", ",", "double", "epsilon", ",", "int", "...", "axis", ")", "{", "return", "batchNor...
Batch norm operation. @see #batchNorm(String, SDVariable, SDVariable, SDVariable, SDVariable, SDVariable, double, int...)
[ "Batch", "norm", "operation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L31-L35
stapler/stapler
core/src/main/java/org/kohsuke/stapler/lang/KlassNavigator.java
KlassNavigator.getArrayElement
public Object getArrayElement(Object o, int index) throws IndexOutOfBoundsException { """ Given an instance for which the type reported {@code isArray()==true}, obtains the element of the specified index. @see #isArray(Object) """ if (o instanceof List) return ((List)o).get(index); ...
java
public Object getArrayElement(Object o, int index) throws IndexOutOfBoundsException { if (o instanceof List) return ((List)o).get(index); return Array.get(o,index); }
[ "public", "Object", "getArrayElement", "(", "Object", "o", ",", "int", "index", ")", "throws", "IndexOutOfBoundsException", "{", "if", "(", "o", "instanceof", "List", ")", "return", "(", "(", "List", ")", "o", ")", ".", "get", "(", "index", ")", ";", "...
Given an instance for which the type reported {@code isArray()==true}, obtains the element of the specified index. @see #isArray(Object)
[ "Given", "an", "instance", "for", "which", "the", "type", "reported", "{" ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/lang/KlassNavigator.java#L120-L124
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java
BigDecimalExtensions.operator_minus
@Pure @Inline(value="$1.subtract($2)") public static BigDecimal operator_minus(BigDecimal a, BigDecimal b) { """ The binary <code>minus</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.subtract(b)</code> @throws Nul...
java
@Pure @Inline(value="$1.subtract($2)") public static BigDecimal operator_minus(BigDecimal a, BigDecimal b) { return a.subtract(b); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"$1.subtract($2)\"", ")", "public", "static", "BigDecimal", "operator_minus", "(", "BigDecimal", "a", ",", "BigDecimal", "b", ")", "{", "return", "a", ".", "subtract", "(", "b", ")", ";", "}" ]
The binary <code>minus</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.subtract(b)</code> @throws NullPointerException if {@code a} or {@code b} is <code>null</code>.
[ "The", "binary", "<code", ">", "minus<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java#L66-L70
line/armeria
core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java
ServerSentEvents.fromPublisher
public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<? extends ServerSentEvent> contentPublisher) { """ Creates a new Server-Sent Events stream from the specified {@link Publisher}. @param headers the HTTP headers supposed to send @param contentPu...
java
public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<? extends ServerSentEvent> contentPublisher) { return fromPublisher(headers, contentPublisher, HttpHeaders.EMPTY_HEADERS); }
[ "public", "static", "HttpResponse", "fromPublisher", "(", "HttpHeaders", "headers", ",", "Publisher", "<", "?", "extends", "ServerSentEvent", ">", "contentPublisher", ")", "{", "return", "fromPublisher", "(", "headers", ",", "contentPublisher", ",", "HttpHeaders", "...
Creates a new Server-Sent Events stream from the specified {@link Publisher}. @param headers the HTTP headers supposed to send @param contentPublisher the {@link Publisher} which publishes the objects supposed to send as contents
[ "Creates", "a", "new", "Server", "-", "Sent", "Events", "stream", "from", "the", "specified", "{", "@link", "Publisher", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java#L97-L100
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/Img.java
Img.calcRotatedSize
private static Rectangle calcRotatedSize(int width, int height, int degree) { """ 计算旋转后的图片尺寸 @param width 宽度 @param height 高度 @param degree 旋转角度 @return 计算后目标尺寸 @since 4.1.20 """ if (degree >= 90) { if (degree / 90 % 2 == 1) { int temp = height; height = width; width = temp; } ...
java
private static Rectangle calcRotatedSize(int width, int height, int degree) { if (degree >= 90) { if (degree / 90 % 2 == 1) { int temp = height; height = width; width = temp; } degree = degree % 90; } double r = Math.sqrt(height * height + width * width) / 2; double len = 2 * Math...
[ "private", "static", "Rectangle", "calcRotatedSize", "(", "int", "width", ",", "int", "height", ",", "int", "degree", ")", "{", "if", "(", "degree", ">=", "90", ")", "{", "if", "(", "degree", "/", "90", "%", "2", "==", "1", ")", "{", "int", "temp",...
计算旋转后的图片尺寸 @param width 宽度 @param height 高度 @param degree 旋转角度 @return 计算后目标尺寸 @since 4.1.20
[ "计算旋转后的图片尺寸" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/Img.java#L636-L656
aws/aws-sdk-java
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/AddTagsToVaultRequest.java
AddTagsToVaultRequest.withTags
public AddTagsToVaultRequest withTags(java.util.Map<String, String> tags) { """ <p> The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string. </p> @param tags The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty st...
java
public AddTagsToVaultRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "AddTagsToVaultRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string. </p> @param tags The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string. @return Returns a reference to this object so that method calls can be chained toget...
[ "<p", ">", "The", "tags", "to", "add", "to", "the", "vault", ".", "Each", "tag", "is", "composed", "of", "a", "key", "and", "a", "value", ".", "The", "value", "can", "be", "an", "empty", "string", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/AddTagsToVaultRequest.java#L184-L187
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXClient.java
JMXClient.addNotificationListener
public boolean addNotificationListener(String mbeanName, NotificationListener listener) throws Exception { """ /* Adds listener as notification and connection notification listener. @return true if successful, false otherwise @throws java.lang.Exception """ if (isConnected()) { ObjectNam...
java
public boolean addNotificationListener(String mbeanName, NotificationListener listener) throws Exception { if (isConnected()) { ObjectName objectName = new ObjectName(mbeanName); jmxc.addConnectionNotificationListener(listener, null, null); mbsc.addNotificationListener(object...
[ "public", "boolean", "addNotificationListener", "(", "String", "mbeanName", ",", "NotificationListener", "listener", ")", "throws", "Exception", "{", "if", "(", "isConnected", "(", ")", ")", "{", "ObjectName", "objectName", "=", "new", "ObjectName", "(", "mbeanNam...
/* Adds listener as notification and connection notification listener. @return true if successful, false otherwise @throws java.lang.Exception
[ "/", "*", "Adds", "listener", "as", "notification", "and", "connection", "notification", "listener", "." ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXClient.java#L96-L105
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java
StorageAccountsInner.listByAccountAsync
public Observable<Page<StorageAccountInformationInner>> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { """ Gets the first page of Azure Storage accounts, if an...
java
public Observable<Page<StorageAccountInformationInner>> listByAccountAsync(final String resourceGroupName, final String accountName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { return listByAccountWithServiceResponseAsync(resource...
[ "public", "Observable", "<", "Page", "<", "StorageAccountInformationInner", ">", ">", "listByAccountAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ",", "final", "String", "filter", ",", "final", "Integer", "top", ",", "...
Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @param filter The OData filte...
[ "Gets", "the", "first", "page", "of", "Azure", "Storage", "accounts", "if", "any", "linked", "to", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "The", "response", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/StorageAccountsInner.java#L303-L311
revelc/formatter-maven-plugin
src/main/java/net/revelc/code/formatter/FormatterMojo.java
FormatterMojo.readFileAsString
private String readFileAsString(File file) throws java.io.IOException { """ Read the given file and return the content as a string. @param file the file @return the string @throws IOException Signals that an I/O exception has occurred. """ StringBuilder fileData = new StringBuilder(1000); ...
java
private String readFileAsString(File file) throws java.io.IOException { StringBuilder fileData = new StringBuilder(1000); try (BufferedReader reader = new BufferedReader(ReaderFactory.newReader(file, this.encoding))) { char[] buf = new char[1024]; int numRead = 0; whi...
[ "private", "String", "readFileAsString", "(", "File", "file", ")", "throws", "java", ".", "io", ".", "IOException", "{", "StringBuilder", "fileData", "=", "new", "StringBuilder", "(", "1000", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "Buf...
Read the given file and return the content as a string. @param file the file @return the string @throws IOException Signals that an I/O exception has occurred.
[ "Read", "the", "given", "file", "and", "return", "the", "content", "as", "a", "string", "." ]
train
https://github.com/revelc/formatter-maven-plugin/blob/a237073ce6220e73ad6b1faef412fe0660485cf4/src/main/java/net/revelc/code/formatter/FormatterMojo.java#L597-L609
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java
BaseMessageFilter.setMessageReceiver
public void setMessageReceiver(BaseMessageReceiver messageReceiver, Integer intID) { """ Set the message receiver for this filter. @param messageReceiver The message receiver. """ if ((messageReceiver != null) || (intID != null)) if ((m_intID != null) || (m_messageReceiver != null)) ...
java
public void setMessageReceiver(BaseMessageReceiver messageReceiver, Integer intID) { if ((messageReceiver != null) || (intID != null)) if ((m_intID != null) || (m_messageReceiver != null)) Util.getLogger().warning("BaseMessageFilter/setMessageReceiver()----Error - Filter added tw...
[ "public", "void", "setMessageReceiver", "(", "BaseMessageReceiver", "messageReceiver", ",", "Integer", "intID", ")", "{", "if", "(", "(", "messageReceiver", "!=", "null", ")", "||", "(", "intID", "!=", "null", ")", ")", "if", "(", "(", "m_intID", "!=", "nu...
Set the message receiver for this filter. @param messageReceiver The message receiver.
[ "Set", "the", "message", "receiver", "for", "this", "filter", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L373-L380
jpelzer/pelzer-util
src/main/java/com/pelzer/util/json/JSONUtil.java
JSONUtil.fromJSON
public static JSONObject fromJSON(String json) { """ Parses the given JSON and looks for the "_i" key, which is then looked up against calls to {@link #register(JSONObject)}, and then returns the result of {@link #fromJSON(String, Class)} """ int index1 = json.lastIndexOf("\"_i\":\""); if (index1 < 0...
java
public static JSONObject fromJSON(String json) { int index1 = json.lastIndexOf("\"_i\":\""); if (index1 < 0) throw new JsonParseException("Unable to find _i key."); index1 += 6; int index2 = json.indexOf("\"", index1 + 1); if (index2 < 0) throw new JsonParseException("Unable to find end ...
[ "public", "static", "JSONObject", "fromJSON", "(", "String", "json", ")", "{", "int", "index1", "=", "json", ".", "lastIndexOf", "(", "\"\\\"_i\\\":\\\"\"", ")", ";", "if", "(", "index1", "<", "0", ")", "throw", "new", "JsonParseException", "(", "\"Unable to...
Parses the given JSON and looks for the "_i" key, which is then looked up against calls to {@link #register(JSONObject)}, and then returns the result of {@link #fromJSON(String, Class)}
[ "Parses", "the", "given", "JSON", "and", "looks", "for", "the", "_i", "key", "which", "is", "then", "looked", "up", "against", "calls", "to", "{" ]
train
https://github.com/jpelzer/pelzer-util/blob/ec14f2573fd977d1442dba5d1507a264f5ea9aa6/src/main/java/com/pelzer/util/json/JSONUtil.java#L40-L60
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/PropertyMap.java
PropertyMap.getBoolean
public boolean getBoolean(String key, boolean def) { """ Returns the default value if the given key isn't in this PropertyMap or if the the value isn't equal to "true", ignoring case. @param key Key of property to read @param def Default value """ String value = getString(key); if (value =...
java
public boolean getBoolean(String key, boolean def) { String value = getString(key); if (value == null) { return def; } else { return "true".equalsIgnoreCase(value); } }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "def", ")", "{", "String", "value", "=", "getString", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "def", ";", "}", "else", "{", "return", "\"true...
Returns the default value if the given key isn't in this PropertyMap or if the the value isn't equal to "true", ignoring case. @param key Key of property to read @param def Default value
[ "Returns", "the", "default", "value", "if", "the", "given", "key", "isn", "t", "in", "this", "PropertyMap", "or", "if", "the", "the", "value", "isn", "t", "equal", "to", "true", "ignoring", "case", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/PropertyMap.java#L400-L408
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.reimageComputeNode
public void reimageComputeNode(String poolId, String nodeId) throws BatchErrorException, IOException { """ Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link ...
java
public void reimageComputeNode(String poolId, String nodeId) throws BatchErrorException, IOException { reimageComputeNode(poolId, nodeId, null, null); }
[ "public", "void", "reimageComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ")", "throws", "BatchErrorException", ",", "IOException", "{", "reimageComputeNode", "(", "poolId", ",", "nodeId", ",", "null", ",", "null", ")", ";", "}" ]
Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#RUNNING Running} state.</p> @param poolId The ID of t...
[ "Reinstalls", "the", "operating", "system", "on", "the", "specified", "compute", "node", ".", "<p", ">", "You", "can", "reimage", "a", "compute", "node", "only", "when", "it", "is", "in", "the", "{", "@link", "com", ".", "microsoft", ".", "azure", ".", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L323-L325
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrRequestHandler.java
JawrRequestHandler.initConfigPropertiesSource
private ConfigPropertiesSource initConfigPropertiesSource(ServletContext context, Properties configProps) throws ServletException { """ Initialize the config properties source that will provide with all configuration options. @param context the servlet context @param configProps the config properties @r...
java
private ConfigPropertiesSource initConfigPropertiesSource(ServletContext context, Properties configProps) throws ServletException { String configLocation = getInitParameter("configLocation"); String configPropsSourceClass = getInitParameter("configPropertiesSourceClass"); if (null == configProps && null == co...
[ "private", "ConfigPropertiesSource", "initConfigPropertiesSource", "(", "ServletContext", "context", ",", "Properties", "configProps", ")", "throws", "ServletException", "{", "String", "configLocation", "=", "getInitParameter", "(", "\"configLocation\"", ")", ";", "String",...
Initialize the config properties source that will provide with all configuration options. @param context the servlet context @param configProps the config properties @return the config properties source @throws ServletException if an exception occurs
[ "Initialize", "the", "config", "properties", "source", "that", "will", "provide", "with", "all", "configuration", "options", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrRequestHandler.java#L421-L458
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/DistributedAvatarFileSystem.java
DistributedAvatarFileSystem.getNewNameNode
@Override ClientProtocol getNewNameNode(ClientProtocol rpcNamenode, Configuration conf) throws IOException { """ This method ensures that when {@link DFSClient#getNewNameNodeIfNeeded(int)} runs, it still keeps the {@link DFSClient#namenode} object a type of {@link FailoverClientProtocol} """ Clie...
java
@Override ClientProtocol getNewNameNode(ClientProtocol rpcNamenode, Configuration conf) throws IOException { ClientProtocol namenode = DFSClient.createNamenode(rpcNamenode, conf); if (failoverClient == null) { failoverClient = new FailoverClientProtocol(namenode, failoverHandler); } ...
[ "@", "Override", "ClientProtocol", "getNewNameNode", "(", "ClientProtocol", "rpcNamenode", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "ClientProtocol", "namenode", "=", "DFSClient", ".", "createNamenode", "(", "rpcNamenode", ",", "conf", ")", "...
This method ensures that when {@link DFSClient#getNewNameNodeIfNeeded(int)} runs, it still keeps the {@link DFSClient#namenode} object a type of {@link FailoverClientProtocol}
[ "This", "method", "ensures", "that", "when", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/DistributedAvatarFileSystem.java#L295-L305
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.fromWKT
public static GeographyPointValue fromWKT(String param) { """ Create a GeographyPointValue from a well-known text string. @param param A well-known text string. @return A new instance of GeographyPointValue. """ if (param == null) { throw new IllegalArgumentException("Null well known te...
java
public static GeographyPointValue fromWKT(String param) { if (param == null) { throw new IllegalArgumentException("Null well known text argument to GeographyPointValue constructor."); } Matcher m = wktPattern.matcher(param); if (m.find()) { // Add 0.0 to avoid -0....
[ "public", "static", "GeographyPointValue", "fromWKT", "(", "String", "param", ")", "{", "if", "(", "param", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Null well known text argument to GeographyPointValue constructor.\"", ")", ";", "}", ...
Create a GeographyPointValue from a well-known text string. @param param A well-known text string. @return A new instance of GeographyPointValue.
[ "Create", "a", "GeographyPointValue", "from", "a", "well", "-", "known", "text", "string", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L91-L110
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java
UnitQuaternions.orientationAngle
public static double orientationAngle(Point3d[] fixed, Point3d[] moved, boolean centered) { """ The angle of the relative orientation of the two sets of points in 3D. Equivalent to {@link #angle(Quat4d)} of the unit quaternion obtained by {@link #relativeOrientation(Point3d[], Point3d[])}. @param fixed ar...
java
public static double orientationAngle(Point3d[] fixed, Point3d[] moved, boolean centered) { if (!centered) { fixed = CalcPoint.clonePoint3dArray(fixed); moved = CalcPoint.clonePoint3dArray(moved); CalcPoint.center(fixed); CalcPoint.center(moved); } return orientationAngle(fixed, moved); }
[ "public", "static", "double", "orientationAngle", "(", "Point3d", "[", "]", "fixed", ",", "Point3d", "[", "]", "moved", ",", "boolean", "centered", ")", "{", "if", "(", "!", "centered", ")", "{", "fixed", "=", "CalcPoint", ".", "clonePoint3dArray", "(", ...
The angle of the relative orientation of the two sets of points in 3D. Equivalent to {@link #angle(Quat4d)} of the unit quaternion obtained by {@link #relativeOrientation(Point3d[], Point3d[])}. @param fixed array of Point3d. Original coordinates will not be modified. @param moved array of Point3d. Original coordinate...
[ "The", "angle", "of", "the", "relative", "orientation", "of", "the", "two", "sets", "of", "points", "in", "3D", ".", "Equivalent", "to", "{", "@link", "#angle", "(", "Quat4d", ")", "}", "of", "the", "unit", "quaternion", "obtained", "by", "{", "@link", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/UnitQuaternions.java#L178-L187
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/CUtil.java
CUtil.sameSet
public static boolean sameSet(final Object[] a, final Vector b) { """ Compares the contents of an array and a Vector for set equality. Assumes input array and vector are sets (i.e. no duplicate entries) """ if (a == null || b == null || a.length != b.size()) { return false; } if (a.length ==...
java
public static boolean sameSet(final Object[] a, final Vector b) { if (a == null || b == null || a.length != b.size()) { return false; } if (a.length == 0) { return true; } // Convert the array into a set final Hashtable t = new Hashtable(); for (final Object element : a) { ...
[ "public", "static", "boolean", "sameSet", "(", "final", "Object", "[", "]", "a", ",", "final", "Vector", "b", ")", "{", "if", "(", "a", "==", "null", "||", "b", "==", "null", "||", "a", ".", "length", "!=", "b", ".", "size", "(", ")", ")", "{",...
Compares the contents of an array and a Vector for set equality. Assumes input array and vector are sets (i.e. no duplicate entries)
[ "Compares", "the", "contents", "of", "an", "array", "and", "a", "Vector", "for", "set", "equality", ".", "Assumes", "input", "array", "and", "vector", "are", "sets", "(", "i", ".", "e", ".", "no", "duplicate", "entries", ")" ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/CUtil.java#L464-L483
lucee/Lucee
core/src/main/java/lucee/intergral/fusiondebug/server/FDControllerImpl.java
FDControllerImpl.getByNativeIdentifier
private FDThreadImpl getByNativeIdentifier(String name, CFMLFactoryImpl factory, String id) { """ checks a single CFMLFactory for the thread @param name @param factory @param id @return matching thread or null """ Map<Integer, PageContextImpl> pcs = factory.getActivePageContexts(); Iterator<PageContext...
java
private FDThreadImpl getByNativeIdentifier(String name, CFMLFactoryImpl factory, String id) { Map<Integer, PageContextImpl> pcs = factory.getActivePageContexts(); Iterator<PageContextImpl> it = pcs.values().iterator(); PageContextImpl pc; while (it.hasNext()) { pc = it.next(); if (equals(pc, id)) return ...
[ "private", "FDThreadImpl", "getByNativeIdentifier", "(", "String", "name", ",", "CFMLFactoryImpl", "factory", ",", "String", "id", ")", "{", "Map", "<", "Integer", ",", "PageContextImpl", ">", "pcs", "=", "factory", ".", "getActivePageContexts", "(", ")", ";", ...
checks a single CFMLFactory for the thread @param name @param factory @param id @return matching thread or null
[ "checks", "a", "single", "CFMLFactory", "for", "the", "thread" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/intergral/fusiondebug/server/FDControllerImpl.java#L167-L177
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java
Text.isDescendant
public static boolean isDescendant(String path, String descendant) { """ Determines if the <code>descendant</code> path is hierarchical a descendant of <code>path</code>. @param path the current path @param descendant the potential descendant @return <code>true</code> if the <code>descendant</code> is a de...
java
public static boolean isDescendant(String path, String descendant) { return !path.equals(descendant) && descendant.startsWith(path) && descendant.charAt(path.length()) == '/'; }
[ "public", "static", "boolean", "isDescendant", "(", "String", "path", ",", "String", "descendant", ")", "{", "return", "!", "path", ".", "equals", "(", "descendant", ")", "&&", "descendant", ".", "startsWith", "(", "path", ")", "&&", "descendant", ".", "ch...
Determines if the <code>descendant</code> path is hierarchical a descendant of <code>path</code>. @param path the current path @param descendant the potential descendant @return <code>true</code> if the <code>descendant</code> is a descendant; <code>false</code> otherwise.
[ "Determines", "if", "the", "<code", ">", "descendant<", "/", "code", ">", "path", "is", "hierarchical", "a", "descendant", "of", "<code", ">", "path<", "/", "code", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java#L717-L720
google/closure-compiler
src/com/google/javascript/jscomp/Es6ToEs3Util.java
Es6ToEs3Util.createType
static JSType createType(boolean shouldCreate, JSTypeRegistry registry, JSTypeNative typeName) { """ Returns the JSType as specified by the typeName. Returns null if shouldCreate is false. """ if (!shouldCreate) { return null; } return registry.getNativeType(typeName); }
java
static JSType createType(boolean shouldCreate, JSTypeRegistry registry, JSTypeNative typeName) { if (!shouldCreate) { return null; } return registry.getNativeType(typeName); }
[ "static", "JSType", "createType", "(", "boolean", "shouldCreate", ",", "JSTypeRegistry", "registry", ",", "JSTypeNative", "typeName", ")", "{", "if", "(", "!", "shouldCreate", ")", "{", "return", "null", ";", "}", "return", "registry", ".", "getNativeType", "(...
Returns the JSType as specified by the typeName. Returns null if shouldCreate is false.
[ "Returns", "the", "JSType", "as", "specified", "by", "the", "typeName", ".", "Returns", "null", "if", "shouldCreate", "is", "false", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6ToEs3Util.java#L108-L113
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/warden/WardenNotifier.java
WardenNotifier.addAnnotationSuspendedUser
protected void addAnnotationSuspendedUser(NotificationContext context, SubSystem subSystem) { """ Add annotation for user suspension to the <tt>triggers.warden</tt> metric.. @param context The notification context. Cannot be null. @param subSystem The subsystem for which the user is being suspended. Ca...
java
protected void addAnnotationSuspendedUser(NotificationContext context, SubSystem subSystem) { Alert alert = context.getAlert(); PrincipalUser wardenUser = getWardenUser(alert.getName()); Metric metric = null; Map<Long, Double> datapoints = new HashMap<>(); metric = new Metric(C...
[ "protected", "void", "addAnnotationSuspendedUser", "(", "NotificationContext", "context", ",", "SubSystem", "subSystem", ")", "{", "Alert", "alert", "=", "context", ".", "getAlert", "(", ")", ";", "PrincipalUser", "wardenUser", "=", "getWardenUser", "(", "alert", ...
Add annotation for user suspension to the <tt>triggers.warden</tt> metric.. @param context The notification context. Cannot be null. @param subSystem The subsystem for which the user is being suspended. Cannot be null.
[ "Add", "annotation", "for", "user", "suspension", "to", "the", "<tt", ">", "triggers", ".", "warden<", "/", "tt", ">", "metric", ".." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/warden/WardenNotifier.java#L146-L169
michael-rapp/AndroidMaterialDialog
example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java
PreferenceFragment.createNegativeButtonListener
private OnClickListener createNegativeButtonListener() { """ Creates and returns a listener, which allows to show a toast, when the negative button of a dialog has been clicked. @return The listener, which has been created, as an instance of the class {@link OnClickListener} """ return new OnClick...
java
private OnClickListener createNegativeButtonListener() { return new OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Toast.makeText(getActivity(), R.string.negative_button_toast, Toast.LENGTH_SHORT) .show(); ...
[ "private", "OnClickListener", "createNegativeButtonListener", "(", ")", "{", "return", "new", "OnClickListener", "(", ")", "{", "@", "Override", "public", "void", "onClick", "(", "DialogInterface", "dialog", ",", "int", "which", ")", "{", "Toast", ".", "makeText...
Creates and returns a listener, which allows to show a toast, when the negative button of a dialog has been clicked. @return The listener, which has been created, as an instance of the class {@link OnClickListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "show", "a", "toast", "when", "the", "negative", "button", "of", "a", "dialog", "has", "been", "clicked", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/example/src/main/java/de/mrapp/android/dialog/example/PreferenceFragment.java#L753-L763
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/config/ServiceDirectoryConfig.java
ServiceDirectoryConfig.getInt
public int getInt(String name, int defaultVal) { """ Get the property object as int, or return defaultVal if property is not defined. @param name property name. @param defaultVal default property value. @return property value as int, return defaultVal if property is undefined. """ if(this.confi...
java
public int getInt(String name, int defaultVal){ if(this.configuration.containsKey(name)){ return this.configuration.getInt(name); } else { return defaultVal; } }
[ "public", "int", "getInt", "(", "String", "name", ",", "int", "defaultVal", ")", "{", "if", "(", "this", ".", "configuration", ".", "containsKey", "(", "name", ")", ")", "{", "return", "this", ".", "configuration", ".", "getInt", "(", "name", ")", ";",...
Get the property object as int, or return defaultVal if property is not defined. @param name property name. @param defaultVal default property value. @return property value as int, return defaultVal if property is undefined.
[ "Get", "the", "property", "object", "as", "int", "or", "return", "defaultVal", "if", "property", "is", "not", "defined", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/config/ServiceDirectoryConfig.java#L207-L213
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/reflection/EntityClassReader.java
EntityClassReader.parseAsPropertyType
public Object parseAsPropertyType(String stringToParse, String propertyPath) { """ <p> Parses a given string into an object whose class corresponds with the type of the property given. For example, if you give the method "4", and you ask it to parse like "width", and width is of the type Long, you will receive ...
java
public Object parseAsPropertyType(String stringToParse, String propertyPath) { Class propertyType = getPropertyType(propertyPath); if (propertyType == null) { return null; } NumberTransformer parser = transformers.get(propertyType); return parser == null ? stringToPa...
[ "public", "Object", "parseAsPropertyType", "(", "String", "stringToParse", ",", "String", "propertyPath", ")", "{", "Class", "propertyType", "=", "getPropertyType", "(", "propertyPath", ")", ";", "if", "(", "propertyType", "==", "null", ")", "{", "return", "null...
<p> Parses a given string into an object whose class corresponds with the type of the property given. For example, if you give the method "4", and you ask it to parse like "width", and width is of the type Long, you will receive an object of the type Long. If the property of the underlying class has a primitive type as...
[ "<p", ">", "Parses", "a", "given", "string", "into", "an", "object", "whose", "class", "corresponds", "with", "the", "type", "of", "the", "property", "given", ".", "For", "example", "if", "you", "give", "the", "method", "4", "and", "you", "ask", "it", ...
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/reflection/EntityClassReader.java#L486-L494
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/proxy/cglib/CglibLazyInitializer.java
CglibLazyInitializer.getProxyFactory
public static Class getProxyFactory(Class persistentClass, Class[] interfaces) throws PersistenceException { """ Gets the proxy factory. @param persistentClass the persistent class @param interfaces the interfaces @return the proxy factory @throws PersistenceException the persistence exception """ ...
java
public static Class getProxyFactory(Class persistentClass, Class[] interfaces) throws PersistenceException { Enhancer e = new Enhancer(); e.setSuperclass(interfaces.length == 1 ? persistentClass : null); e.setInterfaces(interfaces); e.setCallbackTypes(new Class[] { InvocationHan...
[ "public", "static", "Class", "getProxyFactory", "(", "Class", "persistentClass", ",", "Class", "[", "]", "interfaces", ")", "throws", "PersistenceException", "{", "Enhancer", "e", "=", "new", "Enhancer", "(", ")", ";", "e", ".", "setSuperclass", "(", "interfac...
Gets the proxy factory. @param persistentClass the persistent class @param interfaces the interfaces @return the proxy factory @throws PersistenceException the persistence exception
[ "Gets", "the", "proxy", "factory", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/proxy/cglib/CglibLazyInitializer.java#L189-L199
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/DateContext.java
DateContext.compareDate
public boolean compareDate(Date date1, Date date2) { """ Compare one date to another for equality in year, month and date. Note that this ignores all other values including the time. If either value is <code>null</code>, including if both are <code>null</code>, then <code>false</code> is returned. @param da...
java
public boolean compareDate(Date date1, Date date2) { if (date1 == null || date2 == null) { return false; } boolean result; GregorianCalendar cal1 = new GregorianCalendar(); GregorianCalendar cal2 = new GregorianCalendar(); cal1.setTime(date1); ...
[ "public", "boolean", "compareDate", "(", "Date", "date1", ",", "Date", "date2", ")", "{", "if", "(", "date1", "==", "null", "||", "date2", "==", "null", ")", "{", "return", "false", ";", "}", "boolean", "result", ";", "GregorianCalendar", "cal1", "=", ...
Compare one date to another for equality in year, month and date. Note that this ignores all other values including the time. If either value is <code>null</code>, including if both are <code>null</code>, then <code>false</code> is returned. @param date1 The first date to compare. @param date2 The second date to comp...
[ "Compare", "one", "date", "to", "another", "for", "equality", "in", "year", "month", "and", "date", ".", "Note", "that", "this", "ignores", "all", "other", "values", "including", "the", "time", ".", "If", "either", "value", "is", "<code", ">", "null<", "...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/DateContext.java#L485-L505
OpenLiberty/open-liberty
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java
StaxUtils.copy
public static void copy(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { """ Copies the reader to the writer. The start and end document methods must be handled on the writer manually. @param reader @param writer @throws XMLStreamException """ copy(reader, writer, false...
java
public static void copy(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException { copy(reader, writer, false, false); }
[ "public", "static", "void", "copy", "(", "XMLStreamReader", "reader", ",", "XMLStreamWriter", "writer", ")", "throws", "XMLStreamException", "{", "copy", "(", "reader", ",", "writer", ",", "false", ",", "false", ")", ";", "}" ]
Copies the reader to the writer. The start and end document methods must be handled on the writer manually. @param reader @param writer @throws XMLStreamException
[ "Copies", "the", "reader", "to", "the", "writer", ".", "The", "start", "and", "end", "document", "methods", "must", "be", "handled", "on", "the", "writer", "manually", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/staxutils/StaxUtils.java#L729-L731
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CrxApi.java
CrxApi.postPackageServiceJsonAsync
public com.squareup.okhttp.Call postPackageServiceJsonAsync(String path, String cmd, String groupName, String packageName, String packageVersion, String charset_, Boolean force, Boolean recursive, File _package, final ApiCallback<String> callback) throws ApiException { """ (asynchronously) @param path (require...
java
public com.squareup.okhttp.Call postPackageServiceJsonAsync(String path, String cmd, String groupName, String packageName, String packageVersion, String charset_, Boolean force, Boolean recursive, File _package, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener pro...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postPackageServiceJsonAsync", "(", "String", "path", ",", "String", "cmd", ",", "String", "groupName", ",", "String", "packageName", ",", "String", "packageVersion", ",", "String", "charset_", ",", ...
(asynchronously) @param path (required) @param cmd (required) @param groupName (optional) @param packageName (optional) @param packageVersion (optional) @param charset_ (optional) @param force (optional) @param recursive (optional) @param _package (optional) @param callback The callback to be executed when th...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/CrxApi.java#L574-L599
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectLineSegmentAab
public static int intersectLineSegmentAab(Vector3dc p0, Vector3dc p1, Vector3dc min, Vector3dc max, Vector2d result) { """ Determine whether the undirected line segment with the end points <code>p0</code> and <code>p1</code> intersects the axis-aligned box given as its minimum corner <code>min</code> and maximum ...
java
public static int intersectLineSegmentAab(Vector3dc p0, Vector3dc p1, Vector3dc min, Vector3dc max, Vector2d result) { return intersectLineSegmentAab(p0.x(), p0.y(), p0.z(), p1.x(), p1.y(), p1.z(), min.x(), min.y(), min.z(), max.x(), max.y(), max.z(), result); }
[ "public", "static", "int", "intersectLineSegmentAab", "(", "Vector3dc", "p0", ",", "Vector3dc", "p1", ",", "Vector3dc", "min", ",", "Vector3dc", "max", ",", "Vector2d", "result", ")", "{", "return", "intersectLineSegmentAab", "(", "p0", ".", "x", "(", ")", "...
Determine whether the undirected line segment with the end points <code>p0</code> and <code>p1</code> intersects the axis-aligned box given as its minimum corner <code>min</code> and maximum corner <code>max</code>, and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + p0 * (p1 - p0)</i...
[ "Determine", "whether", "the", "undirected", "line", "segment", "with", "the", "end", "points", "<code", ">", "p0<", "/", "code", ">", "and", "<code", ">", "p1<", "/", "code", ">", "intersects", "the", "axis", "-", "aligned", "box", "given", "as", "its",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L2569-L2571
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/RecursiveXPathBuilder.java
RecursiveXPathBuilder.setNamespaceContext
public void setNamespaceContext(Map<String, String> prefix2uri) { """ Establish a namespace context that will be used in for the XPath. <p>Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.</p> @param prefix2uri maps from pre...
java
public void setNamespaceContext(Map<String, String> prefix2uri) { this.prefix2uri = prefix2uri == null ? Collections.<String, String> emptyMap() : Collections.unmodifiableMap(prefix2uri); }
[ "public", "void", "setNamespaceContext", "(", "Map", "<", "String", ",", "String", ">", "prefix2uri", ")", "{", "this", ".", "prefix2uri", "=", "prefix2uri", "==", "null", "?", "Collections", ".", "<", "String", ",", "String", ">", "emptyMap", "(", ")", ...
Establish a namespace context that will be used in for the XPath. <p>Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.</p> @param prefix2uri maps from prefix to namespace URI.
[ "Establish", "a", "namespace", "context", "that", "will", "be", "used", "in", "for", "the", "XPath", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/RecursiveXPathBuilder.java#L45-L49
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/ParsedAddressGrouping.java
ParsedAddressGrouping.getNetworkPrefixLength
public static Integer getNetworkPrefixLength(int bitsPerSegment, int segmentPrefixLength, int segmentIndex) { """ Translates a non-null segment prefix length into an address prefix length. When calling this for the first segment with a non-null prefix length, this gives the overall prefix length. <p> Across an ...
java
public static Integer getNetworkPrefixLength(int bitsPerSegment, int segmentPrefixLength, int segmentIndex) { int increment = (bitsPerSegment == 8) ? segmentIndex << 3 : ((bitsPerSegment == 16) ? segmentIndex << 4 : segmentIndex * bitsPerSegment); return increment + segmentPrefixLength; }
[ "public", "static", "Integer", "getNetworkPrefixLength", "(", "int", "bitsPerSegment", ",", "int", "segmentPrefixLength", ",", "int", "segmentIndex", ")", "{", "int", "increment", "=", "(", "bitsPerSegment", "==", "8", ")", "?", "segmentIndex", "<<", "3", ":", ...
Translates a non-null segment prefix length into an address prefix length. When calling this for the first segment with a non-null prefix length, this gives the overall prefix length. <p> Across an address prefixes are: IPv6: (null):...:(null):(1 to 16):(0):...:(0) or IPv4: ...(null).(1 to 8).(0)...
[ "Translates", "a", "non", "-", "null", "segment", "prefix", "length", "into", "an", "address", "prefix", "length", ".", "When", "calling", "this", "for", "the", "first", "segment", "with", "a", "non", "-", "null", "prefix", "length", "this", "gives", "the"...
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/ParsedAddressGrouping.java#L101-L104
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/util/WindowUtils.java
WindowUtils.installWeakWindowFocusListener
public static void installWeakWindowFocusListener(JComponent component, WindowFocusListener focusListener) { """ Installs a {@link WindowFocusListener} on the given {@link JComponent}'s parent {@link Window}. If the {@code JComponent} doesn't yet have a parent, then the listener will be installed when the compon...
java
public static void installWeakWindowFocusListener(JComponent component, WindowFocusListener focusListener) { WindowListener weakFocusListener = createWeakWindowFocusListener(focusListener); AncestorListener ancestorListener = createAncestorListener(component, weakFocusListener); component.ad...
[ "public", "static", "void", "installWeakWindowFocusListener", "(", "JComponent", "component", ",", "WindowFocusListener", "focusListener", ")", "{", "WindowListener", "weakFocusListener", "=", "createWeakWindowFocusListener", "(", "focusListener", ")", ";", "AncestorListener"...
Installs a {@link WindowFocusListener} on the given {@link JComponent}'s parent {@link Window}. If the {@code JComponent} doesn't yet have a parent, then the listener will be installed when the component is added to a container. @param component the component who's parent frame to listen to focus changes on. @para...
[ "Installs", "a", "{", "@link", "WindowFocusListener", "}", "on", "the", "given", "{", "@link", "JComponent", "}", "s", "parent", "{", "@link", "Window", "}", ".", "If", "the", "{", "@code", "JComponent", "}", "doesn", "t", "yet", "have", "a", "parent", ...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/util/WindowUtils.java#L185-L190
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java
ErrorUtils.printParseError
public static String printParseError(ParseError error, Formatter<InvalidInputError> formatter) { """ Pretty prints the given parse error showing its location in the given input buffer. @param error the parse error @param formatter the formatter for InvalidInputErrors @return the pretty print text ...
java
public static String printParseError(ParseError error, Formatter<InvalidInputError> formatter) { checkArgNotNull(error, "error"); checkArgNotNull(formatter, "formatter"); String message = error.getErrorMessage() != null ? error.getErrorMessage() : error instanceof InvalidInputErr...
[ "public", "static", "String", "printParseError", "(", "ParseError", "error", ",", "Formatter", "<", "InvalidInputError", ">", "formatter", ")", "{", "checkArgNotNull", "(", "error", ",", "\"error\"", ")", ";", "checkArgNotNull", "(", "formatter", ",", "\"formatter...
Pretty prints the given parse error showing its location in the given input buffer. @param error the parse error @param formatter the formatter for InvalidInputErrors @return the pretty print text
[ "Pretty", "prints", "the", "given", "parse", "error", "showing", "its", "location", "in", "the", "given", "input", "buffer", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java#L112-L120
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseLongObj
@Nullable public static Long parseLongObj (@Nullable final Object aObject, @Nullable final Long aDefault) { """ Parse the given {@link Object} as {@link Long} with radix {@value #DEFAULT_RADIX}. @param aObject The object to parse. May be <code>null</code>. @param aDefault The default value to be returned ...
java
@Nullable public static Long parseLongObj (@Nullable final Object aObject, @Nullable final Long aDefault) { return parseLongObj (aObject, DEFAULT_RADIX, aDefault); }
[ "@", "Nullable", "public", "static", "Long", "parseLongObj", "(", "@", "Nullable", "final", "Object", "aObject", ",", "@", "Nullable", "final", "Long", "aDefault", ")", "{", "return", "parseLongObj", "(", "aObject", ",", "DEFAULT_RADIX", ",", "aDefault", ")", ...
Parse the given {@link Object} as {@link Long} with radix {@value #DEFAULT_RADIX}. @param aObject The object to parse. May be <code>null</code>. @param aDefault The default value to be returned if the passed object cannot be converted to a Long. May be <code>null</code>. @return <code>aDefault</code> if the object doe...
[ "Parse", "the", "given", "{", "@link", "Object", "}", "as", "{", "@link", "Long", "}", "with", "radix", "{", "@value", "#DEFAULT_RADIX", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L1075-L1079
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/caching/module/StandardCache.java
StandardCache.createCache
public static <K, V> Cache<K, V> createCache(String cacheName) { """ Retrieves a cache from the current layer or creates it. Only a root request will be able to embed the constructed cache in the application. @param cacheName cache service ID @return """ return createCache(cacheName, DEFAULT_TTL, DEFAU...
java
public static <K, V> Cache<K, V> createCache(String cacheName) { return createCache(cacheName, DEFAULT_TTL, DEFAULT_CLEANUP_INTERVAL/*, application, layer*/); }
[ "public", "static", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "createCache", "(", "String", "cacheName", ")", "{", "return", "createCache", "(", "cacheName", ",", "DEFAULT_TTL", ",", "DEFAULT_CLEANUP_INTERVAL", "/*, application, layer*/", ")",...
Retrieves a cache from the current layer or creates it. Only a root request will be able to embed the constructed cache in the application. @param cacheName cache service ID @return
[ "Retrieves", "a", "cache", "from", "the", "current", "layer", "or", "creates", "it", ".", "Only", "a", "root", "request", "will", "be", "able", "to", "embed", "the", "constructed", "cache", "in", "the", "application", "." ]
train
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/caching/module/StandardCache.java#L404-L406
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.setElementAt
public void setElementAt(Node node, int index) { """ Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector. @param node Node...
java
public void setElementAt(Node node, int index) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); if (null == m_map) { m_map = new Node[m_blocksize]; m_mapSize = m_blocksize; ...
[ "public", "void", "setElementAt", "(", "Node", "node", ",", "int", "index", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESET_NOT_MUTABLE", ...
Sets the component at the specified index of this vector to be the specified object. The previous component at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector. @param node Node to set @param index Index of where to set the node
[ "Sets", "the", "component", "at", "the", "specified", "index", "of", "this", "vector", "to", "be", "the", "specified", "object", ".", "The", "previous", "component", "at", "that", "position", "is", "discarded", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L1258-L1270
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/FormatUtils.java
FormatUtils.condenseFileSize
public static String condenseFileSize(long bytes, String precision) throws IllegalFormatException { """ Condense a file size in bytes to it's highest form (i.e. KB, MB, GB, etc) @param bytes the size in bytes @param precision the precision constant {@code ONE_DIGIT}, {@code TWO_DIGIT}, {@code THREE_DI...
java
public static String condenseFileSize(long bytes, String precision) throws IllegalFormatException { // Kilobyte Check float kilo = bytes / 1024f; float mega = kilo / 1024f; float giga = mega / 1024f; float tera = giga / 1024f; float peta = tera / 1024f; // Deter...
[ "public", "static", "String", "condenseFileSize", "(", "long", "bytes", ",", "String", "precision", ")", "throws", "IllegalFormatException", "{", "// Kilobyte Check", "float", "kilo", "=", "bytes", "/", "1024f", ";", "float", "mega", "=", "kilo", "/", "1024f", ...
Condense a file size in bytes to it's highest form (i.e. KB, MB, GB, etc) @param bytes the size in bytes @param precision the precision constant {@code ONE_DIGIT}, {@code TWO_DIGIT}, {@code THREE_DIGIT} @return the condensed string
[ "Condense", "a", "file", "size", "in", "bytes", "to", "it", "s", "highest", "form", "(", "i", ".", "e", ".", "KB", "MB", "GB", "etc", ")" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/FormatUtils.java#L93-L116
playn/playn
html/src/playn/super/java/nio/ByteBuffer.java
ByteBuffer.putInt
public final ByteBuffer putInt (int baseOffset, int value) { """ Writes the given int to the specified index of this buffer. <p> The int is converted to bytes using the current byte order. The position is not changed. </p> @param index the index, must not be negative and equal or less than {@code limit - 4}....
java
public final ByteBuffer putInt (int baseOffset, int value) { if (order == ByteOrder.BIG_ENDIAN) { for (int i = 3; i >= 0; i--) { byteArray.set(baseOffset + i, (byte)(value & 0xFF)); value = value >> 8; } } else { for (int i = 0; i <= 3; i++) { ...
[ "public", "final", "ByteBuffer", "putInt", "(", "int", "baseOffset", ",", "int", "value", ")", "{", "if", "(", "order", "==", "ByteOrder", ".", "BIG_ENDIAN", ")", "{", "for", "(", "int", "i", "=", "3", ";", "i", ">=", "0", ";", "i", "--", ")", "{...
Writes the given int to the specified index of this buffer. <p> The int is converted to bytes using the current byte order. The position is not changed. </p> @param index the index, must not be negative and equal or less than {@code limit - 4}. @param value the int to write. @return this buffer. @exception IndexOutOfB...
[ "Writes", "the", "given", "int", "to", "the", "specified", "index", "of", "this", "buffer", ".", "<p", ">", "The", "int", "is", "converted", "to", "bytes", "using", "the", "current", "byte", "order", ".", "The", "position", "is", "not", "changed", ".", ...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/html/src/playn/super/java/nio/ByteBuffer.java#L802-L815
square/dagger
core/src/main/java/dagger/internal/Keys.java
Keys.get
private static String get(Type type, Annotation annotation) { """ Returns a key for {@code type} annotated by {@code annotation}. """ type = boxIfPrimitive(type); if (annotation == null && type instanceof Class && !((Class<?>) type).isArray()) { return ((Class<?>) type).getName(); } Strin...
java
private static String get(Type type, Annotation annotation) { type = boxIfPrimitive(type); if (annotation == null && type instanceof Class && !((Class<?>) type).isArray()) { return ((Class<?>) type).getName(); } StringBuilder result = new StringBuilder(); if (annotation != null) { result...
[ "private", "static", "String", "get", "(", "Type", "type", ",", "Annotation", "annotation", ")", "{", "type", "=", "boxIfPrimitive", "(", "type", ")", ";", "if", "(", "annotation", "==", "null", "&&", "type", "instanceof", "Class", "&&", "!", "(", "(", ...
Returns a key for {@code type} annotated by {@code annotation}.
[ "Returns", "a", "key", "for", "{" ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/core/src/main/java/dagger/internal/Keys.java#L71-L82
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.replaceAll
public StrBuilder replaceAll(final char search, final char replace) { """ Replaces the search character with the replace character throughout the builder. @param search the search character @param replace the replace character @return this, to enable chaining """ if (search != replace) { ...
java
public StrBuilder replaceAll(final char search, final char replace) { if (search != replace) { for (int i = 0; i < size; i++) { if (buffer[i] == search) { buffer[i] = replace; } } } return this; }
[ "public", "StrBuilder", "replaceAll", "(", "final", "char", "search", ",", "final", "char", "replace", ")", "{", "if", "(", "search", "!=", "replace", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "i...
Replaces the search character with the replace character throughout the builder. @param search the search character @param replace the replace character @return this, to enable chaining
[ "Replaces", "the", "search", "character", "with", "the", "replace", "character", "throughout", "the", "builder", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1967-L1976
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/ClusterSampling.java
ClusterSampling.xbarVariance
public static double xbarVariance(TransposeDataCollection sampleDataCollection, int populationM, double Nbar) { """ Calculates Variance for Xbar @param sampleDataCollection @param populationM @param Nbar @return """ double xbarVariance = 0.0; int sampleM = sampleDataCollection.si...
java
public static double xbarVariance(TransposeDataCollection sampleDataCollection, int populationM, double Nbar) { double xbarVariance = 0.0; int sampleM = sampleDataCollection.size(); double mean = mean(sampleDataCollection); for(Map.Entry<Object, FlatDataCollect...
[ "public", "static", "double", "xbarVariance", "(", "TransposeDataCollection", "sampleDataCollection", ",", "int", "populationM", ",", "double", "Nbar", ")", "{", "double", "xbarVariance", "=", "0.0", ";", "int", "sampleM", "=", "sampleDataCollection", ".", "size", ...
Calculates Variance for Xbar @param sampleDataCollection @param populationM @param Nbar @return
[ "Calculates", "Variance", "for", "Xbar" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/ClusterSampling.java#L103-L122
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.defineSliders
private void defineSliders(UIDefaults d) { """ Initialize the slider settings. @param d the UI defaults map. """ // Rossi: slider inner color changed from gray to "white" d.put("sliderTrackBorderBase", new Color(0x709ad0)); // d.put("sliderTrackInteriorBase", new Color(0x709ad0)); // bl...
java
private void defineSliders(UIDefaults d) { // Rossi: slider inner color changed from gray to "white" d.put("sliderTrackBorderBase", new Color(0x709ad0)); // d.put("sliderTrackInteriorBase", new Color(0x709ad0)); // blue better? d.put("sliderTrackInteriorBase", Color.WHITE); // Light blue be...
[ "private", "void", "defineSliders", "(", "UIDefaults", "d", ")", "{", "// Rossi: slider inner color changed from gray to \"white\"", "d", ".", "put", "(", "\"sliderTrackBorderBase\"", ",", "new", "Color", "(", "0x709ad0", ")", ")", ";", "// d.put(\"sliderTrackInter...
Initialize the slider settings. @param d the UI defaults map.
[ "Initialize", "the", "slider", "settings", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L1782-L1828
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/overlay/PathOverlay.java
PathOverlay.addGreatCircle
public void addGreatCircle(final GeoPoint startPoint, final GeoPoint endPoint, final int numberOfPoints) { """ Draw a great circle. @param startPoint start point of the great circle @param endPoint end point of the great circle @param numberOfPoints number of points to calculate along the path """ // adap...
java
public void addGreatCircle(final GeoPoint startPoint, final GeoPoint endPoint, final int numberOfPoints) { // adapted from page http://compastic.blogspot.co.uk/2011/07/how-to-draw-great-circle-on-map-in.html // which was adapted from page http://maps.forum.nu/gm_flight_path.html // convert to radians final dou...
[ "public", "void", "addGreatCircle", "(", "final", "GeoPoint", "startPoint", ",", "final", "GeoPoint", "endPoint", ",", "final", "int", "numberOfPoints", ")", "{", "//\tadapted from page http://compastic.blogspot.co.uk/2011/07/how-to-draw-great-circle-on-map-in.html", "//\twhich w...
Draw a great circle. @param startPoint start point of the great circle @param endPoint end point of the great circle @param numberOfPoints number of points to calculate along the path
[ "Draw", "a", "great", "circle", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/overlay/PathOverlay.java#L125-L154
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/ClassParser.java
ClassParser.checkConstantTag
private void checkConstantTag(Constant constant, int expectedTag) throws InvalidClassFileFormatException { """ Check that a constant has the expected tag. @param constant the constant to check @param expectedTag the expected constant tag @throws InvalidClassFileFormatException if the constant's tag does no...
java
private void checkConstantTag(Constant constant, int expectedTag) throws InvalidClassFileFormatException { if (constant.tag != expectedTag) { throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry); } }
[ "private", "void", "checkConstantTag", "(", "Constant", "constant", ",", "int", "expectedTag", ")", "throws", "InvalidClassFileFormatException", "{", "if", "(", "constant", ".", "tag", "!=", "expectedTag", ")", "{", "throw", "new", "InvalidClassFileFormatException", ...
Check that a constant has the expected tag. @param constant the constant to check @param expectedTag the expected constant tag @throws InvalidClassFileFormatException if the constant's tag does not match the expected tag
[ "Check", "that", "a", "constant", "has", "the", "expected", "tag", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/ClassParser.java#L364-L368
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java
JavacFileManager.isValidFile
private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) { """ container is a directory, a zip file, or a non-existent path. """ JavaFileObject.Kind kind = getKind(s); return fileKinds.contains(kind); }
java
private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) { JavaFileObject.Kind kind = getKind(s); return fileKinds.contains(kind); }
[ "private", "boolean", "isValidFile", "(", "String", "s", ",", "Set", "<", "JavaFileObject", ".", "Kind", ">", "fileKinds", ")", "{", "JavaFileObject", ".", "Kind", "kind", "=", "getKind", "(", "s", ")", ";", "return", "fileKinds", ".", "contains", "(", "...
container is a directory, a zip file, or a non-existent path.
[ "container", "is", "a", "directory", "a", "zip", "file", "or", "a", "non", "-", "existent", "path", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java#L613-L616
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.L2_WSG84
@Pure public static GeodesicPosition L2_WSG84(double x, double y) { """ This function convert France Lambert II coordinate to geographic WSG84 Data. @param x is the coordinate in France Lambert II @param y is the coordinate in France Lambert II @return lambda and phi in geographic WSG84 in degrees. """ ...
java
@Pure public static GeodesicPosition L2_WSG84(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_2_N, LAMBERT_2_C, LAMBERT_2_XS, LAMBERT_2_YS); return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY()); }
[ "@", "Pure", "public", "static", "GeodesicPosition", "L2_WSG84", "(", "double", "x", ",", "double", "y", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "NTFLambert_NTFLambdaPhi", "(", "x", ",", "y", ",", "LAMBERT_2_N", ",", "LAMBERT_2_C", ",", "LAMBERT_2_X...
This function convert France Lambert II coordinate to geographic WSG84 Data. @param x is the coordinate in France Lambert II @param y is the coordinate in France Lambert II @return lambda and phi in geographic WSG84 in degrees.
[ "This", "function", "convert", "France", "Lambert", "II", "coordinate", "to", "geographic", "WSG84", "Data", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L419-L427
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/QuickSelectDBIDs.java
QuickSelectDBIDs.quickSelect
public static void quickSelect(ArrayModifiableDBIDs data, Comparator<? super DBIDRef> comparator, int rank) { """ QuickSelect is essentially quicksort, except that we only "sort" that half of the array that we are interested in. Note: the array is <b>modified</b> by this. @param data Data to process @param...
java
public static void quickSelect(ArrayModifiableDBIDs data, Comparator<? super DBIDRef> comparator, int rank) { quickSelect(data, comparator, 0, data.size(), rank); }
[ "public", "static", "void", "quickSelect", "(", "ArrayModifiableDBIDs", "data", ",", "Comparator", "<", "?", "super", "DBIDRef", ">", "comparator", ",", "int", "rank", ")", "{", "quickSelect", "(", "data", ",", "comparator", ",", "0", ",", "data", ".", "si...
QuickSelect is essentially quicksort, except that we only "sort" that half of the array that we are interested in. Note: the array is <b>modified</b> by this. @param data Data to process @param comparator Comparator to use @param rank Rank position that we are interested in (integer!)
[ "QuickSelect", "is", "essentially", "quicksort", "except", "that", "we", "only", "sort", "that", "half", "of", "the", "array", "that", "we", "are", "interested", "in", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/ids/QuickSelectDBIDs.java#L88-L90
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/internal/document/DefinitionsDocument.java
DefinitionsDocument.buildDefinitionTitle
private void buildDefinitionTitle(MarkupDocBuilder markupDocBuilder, String title, String anchor) { """ Builds definition title @param markupDocBuilder the markupDocBuilder do use for output @param title definition title @param anchor optional anchor (null => auto-generate from title) ...
java
private void buildDefinitionTitle(MarkupDocBuilder markupDocBuilder, String title, String anchor) { markupDocBuilder.sectionTitleWithAnchorLevel2(title, anchor); }
[ "private", "void", "buildDefinitionTitle", "(", "MarkupDocBuilder", "markupDocBuilder", ",", "String", "title", ",", "String", "anchor", ")", "{", "markupDocBuilder", ".", "sectionTitleWithAnchorLevel2", "(", "title", ",", "anchor", ")", ";", "}" ]
Builds definition title @param markupDocBuilder the markupDocBuilder do use for output @param title definition title @param anchor optional anchor (null => auto-generate from title)
[ "Builds", "definition", "title" ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/internal/document/DefinitionsDocument.java#L182-L184
emfjson/emfjson-jackson
src/main/java/org/emfjson/jackson/annotations/JsonAnnotations.java
JsonAnnotations.getTypeProperty
public static EcoreTypeInfo getTypeProperty(final EClassifier classifier) { """ Returns the property that should be use to store the type information of the classifier. @param classifier @return the type information property """ String property = getValue(classifier, "JsonType", "property"); String use...
java
public static EcoreTypeInfo getTypeProperty(final EClassifier classifier) { String property = getValue(classifier, "JsonType", "property"); String use = getValue(classifier, "JsonType", "use"); ValueReader<String, EClass> valueReader = EcoreTypeInfo.defaultValueReader; ValueWriter<EClass, String> valueWriter =...
[ "public", "static", "EcoreTypeInfo", "getTypeProperty", "(", "final", "EClassifier", "classifier", ")", "{", "String", "property", "=", "getValue", "(", "classifier", ",", "\"JsonType\"", ",", "\"property\"", ")", ";", "String", "use", "=", "getValue", "(", "cla...
Returns the property that should be use to store the type information of the classifier. @param classifier @return the type information property
[ "Returns", "the", "property", "that", "should", "be", "use", "to", "store", "the", "type", "information", "of", "the", "classifier", "." ]
train
https://github.com/emfjson/emfjson-jackson/blob/5f4488d1b07d499003351606cf76ee0c4ac39964/src/main/java/org/emfjson/jackson/annotations/JsonAnnotations.java#L71-L106
alkacon/opencms-core
src/org/opencms/ui/components/codemirror/CmsCodeMirror.java
CmsCodeMirror.registerUndoRedo
public void registerUndoRedo(Button undo, Button redo) { """ Registers the given buttons as undo redo buttons.<p> @param undo the undo button @param redo the redo button """ if (getState().m_enableUndoRedo) { throw new RuntimeException("Undo/redo already registered."); } ...
java
public void registerUndoRedo(Button undo, Button redo) { if (getState().m_enableUndoRedo) { throw new RuntimeException("Undo/redo already registered."); } undo.setId(HTML_ID_PREFIX + m_componentId + "-undo"); redo.setId(HTML_ID_PREFIX + m_componentId + "-redo"); getS...
[ "public", "void", "registerUndoRedo", "(", "Button", "undo", ",", "Button", "redo", ")", "{", "if", "(", "getState", "(", ")", ".", "m_enableUndoRedo", ")", "{", "throw", "new", "RuntimeException", "(", "\"Undo/redo already registered.\"", ")", ";", "}", "undo...
Registers the given buttons as undo redo buttons.<p> @param undo the undo button @param redo the redo button
[ "Registers", "the", "given", "buttons", "as", "undo", "redo", "buttons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/codemirror/CmsCodeMirror.java#L564-L573
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/security/KeyStoreUtil.java
KeyStoreUtil.updateWithServerPems
public static void updateWithServerPems(KeyStore pKeyStore, File pServerCert, File pServerKey, String pKeyAlgo, char[] pPassword) throws IOException, CertificateException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException { """ Update a key store with the keys found in a server PEM a...
java
public static void updateWithServerPems(KeyStore pKeyStore, File pServerCert, File pServerKey, String pKeyAlgo, char[] pPassword) throws IOException, CertificateException, NoSuchAlgorithmException, InvalidKeySpecException, KeyStoreException { InputStream is = new FileInputStream(pServerCert); ...
[ "public", "static", "void", "updateWithServerPems", "(", "KeyStore", "pKeyStore", ",", "File", "pServerCert", ",", "File", "pServerKey", ",", "String", "pKeyAlgo", ",", "char", "[", "]", "pPassword", ")", "throws", "IOException", ",", "CertificateException", ",", ...
Update a key store with the keys found in a server PEM and its key file. @param pKeyStore keystore to update @param pServerCert server certificate @param pServerKey server key @param pKeyAlgo algorithm used in the keystore (e.g. "RSA") @param pPassword password to use for the key file. must not be null, use <c...
[ "Update", "a", "key", "store", "with", "the", "keys", "found", "in", "a", "server", "PEM", "and", "its", "key", "file", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/security/KeyStoreUtil.java#L79-L104
cloudendpoints/endpoints-management-java
endpoints-control/src/main/java/com/google/api/control/model/PathTemplate.java
PathTemplate.parentTemplate
public PathTemplate parentTemplate() { """ Returns a template for the parent of this template. @throws ValidationException if the template has no parent. """ int i = segments.size(); Segment seg = segments.get(--i); if (seg.kind() == SegmentKind.END_BINDING) { while (i > 0 && segments.get(...
java
public PathTemplate parentTemplate() { int i = segments.size(); Segment seg = segments.get(--i); if (seg.kind() == SegmentKind.END_BINDING) { while (i > 0 && segments.get(--i).kind() != SegmentKind.BINDING) {} } if (i == 0) { throw new ValidationException("template does not have a parent...
[ "public", "PathTemplate", "parentTemplate", "(", ")", "{", "int", "i", "=", "segments", ".", "size", "(", ")", ";", "Segment", "seg", "=", "segments", ".", "get", "(", "--", "i", ")", ";", "if", "(", "seg", ".", "kind", "(", ")", "==", "SegmentKind...
Returns a template for the parent of this template. @throws ValidationException if the template has no parent.
[ "Returns", "a", "template", "for", "the", "parent", "of", "this", "template", "." ]
train
https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/model/PathTemplate.java#L262-L272
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java
GlobalConfiguration.loadConfigurationWithDynamicProperties
public static Configuration loadConfigurationWithDynamicProperties(Configuration dynamicProperties) { """ Loads the global configuration and adds the given dynamic properties configuration. @param dynamicProperties The given dynamic properties @return Returns the loaded global configuration with dynamic prope...
java
public static Configuration loadConfigurationWithDynamicProperties(Configuration dynamicProperties) { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(dynamicProperties); } return loadConfiguration(configDir, dynamicProperties); }
[ "public", "static", "Configuration", "loadConfigurationWithDynamicProperties", "(", "Configuration", "dynamicProperties", ")", "{", "final", "String", "configDir", "=", "System", ".", "getenv", "(", "ConfigConstants", ".", "ENV_FLINK_CONF_DIR", ")", ";", "if", "(", "c...
Loads the global configuration and adds the given dynamic properties configuration. @param dynamicProperties The given dynamic properties @return Returns the loaded global configuration with dynamic properties
[ "Loads", "the", "global", "configuration", "and", "adds", "the", "given", "dynamic", "properties", "configuration", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L131-L138
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.getHybridConnectionPlanLimitAsync
public Observable<HybridConnectionLimitsInner> getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { """ Get the maximum number of Hybrid Connections allowed in an App Service plan. Get the maximum number of Hybrid Connections allowed in an App Service plan. @param resourceGroupName Name o...
java
public Observable<HybridConnectionLimitsInner> getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { return getHybridConnectionPlanLimitWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<HybridConnectionLimitsInner>, HybridConnectionLimitsInner>() { ...
[ "public", "Observable", "<", "HybridConnectionLimitsInner", ">", "getHybridConnectionPlanLimitAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getHybridConnectionPlanLimitWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ...
Get the maximum number of Hybrid Connections allowed in an App Service plan. Get the maximum number of Hybrid Connections allowed in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @throws IllegalArgumentException thrown ...
[ "Get", "the", "maximum", "number", "of", "Hybrid", "Connections", "allowed", "in", "an", "App", "Service", "plan", ".", "Get", "the", "maximum", "number", "of", "Hybrid", "Connections", "allowed", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L1616-L1623
BioPAX/Paxtools
sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java
L3ToSBGNPDConverter.createProcessAndConnections
private void createProcessAndConnections(Conversion cnv, ConversionDirectionType direction) { """ /* Creates a representation for Conversion. @param cnv the conversion @param direction direction of the conversion to create """ assert cnv.getConversionDirection() == null || cnv.getConversionDirection(...
java
private void createProcessAndConnections(Conversion cnv, ConversionDirectionType direction) { assert cnv.getConversionDirection() == null || cnv.getConversionDirection().equals(direction) || cnv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE); // create the process for the conversion in ...
[ "private", "void", "createProcessAndConnections", "(", "Conversion", "cnv", ",", "ConversionDirectionType", "direction", ")", "{", "assert", "cnv", ".", "getConversionDirection", "(", ")", "==", "null", "||", "cnv", ".", "getConversionDirection", "(", ")", ".", "e...
/* Creates a representation for Conversion. @param cnv the conversion @param direction direction of the conversion to create
[ "/", "*", "Creates", "a", "representation", "for", "Conversion", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L924-L965
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/raytrace/Raytrace.java
Raytrace.getClosestHit
public static RayTraceResult getClosestHit(RayTraceResult.Type hitType, Point src, RayTraceResult result1, RayTraceResult result2) { """ Gets the closest {@link RayTraceResult} to the source. @param src the src @param result1 the mop1 @param result2 the mop2 @return the closest """ if (result1 == null)...
java
public static RayTraceResult getClosestHit(RayTraceResult.Type hitType, Point src, RayTraceResult result1, RayTraceResult result2) { if (result1 == null) return result2; if (result2 == null) return result1; if (result1.typeOfHit == RayTraceResult.Type.MISS && result2.typeOfHit == hitType) return result...
[ "public", "static", "RayTraceResult", "getClosestHit", "(", "RayTraceResult", ".", "Type", "hitType", ",", "Point", "src", ",", "RayTraceResult", "result1", ",", "RayTraceResult", "result2", ")", "{", "if", "(", "result1", "==", "null", ")", "return", "result2",...
Gets the closest {@link RayTraceResult} to the source. @param src the src @param result1 the mop1 @param result2 the mop2 @return the closest
[ "Gets", "the", "closest", "{", "@link", "RayTraceResult", "}", "to", "the", "source", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/raytrace/Raytrace.java#L195-L210
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.listFromTask
public PagedList<NodeFile> listFromTask(final String jobId, final String taskId) { """ Lists the files in a task's directory on its compute node. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose files you want to list. @throws IllegalArgumentException thrown if par...
java
public PagedList<NodeFile> listFromTask(final String jobId, final String taskId) { ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders> response = listFromTaskSinglePageAsync(jobId, taskId).toBlocking().single(); return new PagedList<NodeFile>(response.body()) { @Override ...
[ "public", "PagedList", "<", "NodeFile", ">", "listFromTask", "(", "final", "String", "jobId", ",", "final", "String", "taskId", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeFile", ">", ",", "FileListFromTaskHeaders", ">", "response", "=", "list...
Lists the files in a task's directory on its compute node. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose files you want to list. @throws IllegalArgumentException thrown if parameters fail the validation @throws BatchErrorException thrown if the request is rejected by ser...
[ "Lists", "the", "files", "in", "a", "task", "s", "directory", "on", "its", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L1605-L1613
apache/incubator-druid
core/src/main/java/org/apache/druid/timeline/SegmentId.java
SegmentId.iterateAllPossibleParsings
public static Iterable<SegmentId> iterateAllPossibleParsings(String segmentId) { """ Returns a (potentially empty) lazy iteration of all possible valid parsings of the given segment id string into {@code SegmentId} objects. Warning: most of the parsing work is repeated each time {@link Iterable#iterator()} of ...
java
public static Iterable<SegmentId> iterateAllPossibleParsings(String segmentId) { List<String> splits = DELIMITER_SPLITTER.splitToList(segmentId); String probableDataSource = tryExtractMostProbableDataSource(segmentId); // Iterate parsings with the most probably data source first to allow the users of iter...
[ "public", "static", "Iterable", "<", "SegmentId", ">", "iterateAllPossibleParsings", "(", "String", "segmentId", ")", "{", "List", "<", "String", ">", "splits", "=", "DELIMITER_SPLITTER", ".", "splitToList", "(", "segmentId", ")", ";", "String", "probableDataSourc...
Returns a (potentially empty) lazy iteration of all possible valid parsings of the given segment id string into {@code SegmentId} objects. Warning: most of the parsing work is repeated each time {@link Iterable#iterator()} of this iterable is consumed, so it should be consumed only once if possible.
[ "Returns", "a", "(", "potentially", "empty", ")", "lazy", "iteration", "of", "all", "possible", "valid", "parsings", "of", "the", "given", "segment", "id", "string", "into", "{", "@code", "SegmentId", "}", "objects", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/timeline/SegmentId.java#L133-L158
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_PUT
public void packName_PUT(String packName, OvhPackAdsl body) throws IOException { """ Alter this object properties REST: PUT /pack/xdsl/{packName} @param body [required] New object properties @param packName [required] The internal name of your pack """ String qPath = "/pack/xdsl/{packName}"; StringBui...
java
public void packName_PUT(String packName, OvhPackAdsl body) throws IOException { String qPath = "/pack/xdsl/{packName}"; StringBuilder sb = path(qPath, packName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "packName_PUT", "(", "String", "packName", ",", "OvhPackAdsl", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "packName", ")", ";", "...
Alter this object properties REST: PUT /pack/xdsl/{packName} @param body [required] New object properties @param packName [required] The internal name of your pack
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L486-L490
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.createInOutputStream
public OutputStream createInOutputStream(OutputStream os, String linkId) { """ This method returns an instrumented proxy output stream, to wrap the supplied output stream, which will record the written data. The optional link id can be used to initiate a link with the specified id (and disassociate the trace fr...
java
public OutputStream createInOutputStream(OutputStream os, String linkId) { return new InstrumentedOutputStream(collector(), Direction.In, os, linkId); }
[ "public", "OutputStream", "createInOutputStream", "(", "OutputStream", "os", ",", "String", "linkId", ")", "{", "return", "new", "InstrumentedOutputStream", "(", "collector", "(", ")", ",", "Direction", ".", "In", ",", "os", ",", "linkId", ")", ";", "}" ]
This method returns an instrumented proxy output stream, to wrap the supplied output stream, which will record the written data. The optional link id can be used to initiate a link with the specified id (and disassociate the trace from the current thread). @param os The original output stream @param linkId The optiona...
[ "This", "method", "returns", "an", "instrumented", "proxy", "output", "stream", "to", "wrap", "the", "supplied", "output", "stream", "which", "will", "record", "the", "written", "data", ".", "The", "optional", "link", "id", "can", "be", "used", "to", "initia...
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L606-L608
apiman/apiman
manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java
GatewayClient.parseStackTrace
protected static StackTraceElement[] parseStackTrace(String stacktrace) { """ Parses a stack trace from the given string. @param stacktrace """ try (BufferedReader reader = new BufferedReader(new StringReader(stacktrace))) { List<StackTraceElement> elements = new ArrayList<>(); ...
java
protected static StackTraceElement[] parseStackTrace(String stacktrace) { try (BufferedReader reader = new BufferedReader(new StringReader(stacktrace))) { List<StackTraceElement> elements = new ArrayList<>(); String line; // Example lines: // \tat io.apiman.gatewa...
[ "protected", "static", "StackTraceElement", "[", "]", "parseStackTrace", "(", "String", "stacktrace", ")", "{", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "StringReader", "(", "stacktrace", ")", ")", ")", "{", "List", "<"...
Parses a stack trace from the given string. @param stacktrace
[ "Parses", "a", "stack", "trace", "from", "the", "given", "string", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/gateway/src/main/java/io/apiman/manager/api/gateway/rest/GatewayClient.java#L309-L339
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_volume_volumeId_PUT
public OvhVolume project_serviceName_volume_volumeId_PUT(String serviceName, String volumeId, String description, String name) throws IOException { """ Update a volume REST: PUT /cloud/project/{serviceName}/volume/{volumeId} @param description [required] Volume description @param name [required] Volume name ...
java
public OvhVolume project_serviceName_volume_volumeId_PUT(String serviceName, String volumeId, String description, String name) throws IOException { String qPath = "/cloud/project/{serviceName}/volume/{volumeId}"; StringBuilder sb = path(qPath, serviceName, volumeId); HashMap<String, Object>o = new HashMap<String,...
[ "public", "OvhVolume", "project_serviceName_volume_volumeId_PUT", "(", "String", "serviceName", ",", "String", "volumeId", ",", "String", "description", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/volum...
Update a volume REST: PUT /cloud/project/{serviceName}/volume/{volumeId} @param description [required] Volume description @param name [required] Volume name @param serviceName [required] Project id @param volumeId [required] Volume id
[ "Update", "a", "volume" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1135-L1143
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.beginCreateOrUpdateAsync
public Observable<EventSubscriptionInner> beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { """ Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based on the specifie...
java
public Observable<EventSubscriptionInner> beginCreateOrUpdateAsync(String scope, String eventSubscriptionName, EventSubscriptionInner eventSubscriptionInfo) { return beginCreateOrUpdateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionInfo).map(new Func1<ServiceResponse<EventSubscriptionIn...
[ "public", "Observable", "<", "EventSubscriptionInner", ">", "beginCreateOrUpdateAsync", "(", "String", "scope", ",", "String", "eventSubscriptionName", ",", "EventSubscriptionInner", "eventSubscriptionInfo", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "("...
Create or update an event subscription. Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @param scope The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource grou...
[ "Create", "or", "update", "an", "event", "subscription", ".", "Asynchronously", "creates", "a", "new", "event", "subscription", "or", "updates", "an", "existing", "event", "subscription", "based", "on", "the", "specified", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L342-L349
apache/flink
flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java
MemorySegment.putIntLittleEndian
public final void putIntLittleEndian(int index, int value) { """ Writes the given int value (32bit, 4 bytes) to the given position in little endian byte order. This method's speed depends on the system's native byte order, and it is possibly slower than {@link #putInt(int, int)}. For most cases (such as transie...
java
public final void putIntLittleEndian(int index, int value) { if (LITTLE_ENDIAN) { putInt(index, value); } else { putInt(index, Integer.reverseBytes(value)); } }
[ "public", "final", "void", "putIntLittleEndian", "(", "int", "index", ",", "int", "value", ")", "{", "if", "(", "LITTLE_ENDIAN", ")", "{", "putInt", "(", "index", ",", "value", ")", ";", "}", "else", "{", "putInt", "(", "index", ",", "Integer", ".", ...
Writes the given int value (32bit, 4 bytes) to the given position in little endian byte order. This method's speed depends on the system's native byte order, and it is possibly slower than {@link #putInt(int, int)}. For most cases (such as transient storage in memory or serialization for I/O and network), it suffices t...
[ "Writes", "the", "given", "int", "value", "(", "32bit", "4", "bytes", ")", "to", "the", "given", "position", "in", "little", "endian", "byte", "order", ".", "This", "method", "s", "speed", "depends", "on", "the", "system", "s", "native", "byte", "order",...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java#L790-L796
sockeqwe/AdapterDelegates
library/src/main/java/com/hannesdorfmann/adapterdelegates4/AdapterDelegatesManager.java
AdapterDelegatesManager.getItemViewType
public int getItemViewType(@NonNull T items, int position) { """ Must be called from {@link RecyclerView.Adapter#getItemViewType(int)}. Internally it scans all the registered {@link AdapterDelegate} and picks the right one to return the ViewType integer. @param items Adapter's data source @param position t...
java
public int getItemViewType(@NonNull T items, int position) { if (items == null) { throw new NullPointerException("Items datasource is null!"); } int delegatesCount = delegates.size(); for (int i = 0; i < delegatesCount; i++) { AdapterDelegate<T> delegate = deleg...
[ "public", "int", "getItemViewType", "(", "@", "NonNull", "T", "items", ",", "int", "position", ")", "{", "if", "(", "items", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Items datasource is null!\"", ")", ";", "}", "int", "delegate...
Must be called from {@link RecyclerView.Adapter#getItemViewType(int)}. Internally it scans all the registered {@link AdapterDelegate} and picks the right one to return the ViewType integer. @param items Adapter's data source @param position the position in adapters data source @return the ViewType (integer). Return...
[ "Must", "be", "called", "from", "{", "@link", "RecyclerView", ".", "Adapter#getItemViewType", "(", "int", ")", "}", ".", "Internally", "it", "scans", "all", "the", "registered", "{", "@link", "AdapterDelegate", "}", "and", "picks", "the", "right", "one", "to...
train
https://github.com/sockeqwe/AdapterDelegates/blob/d18dc609415e5d17a3354bddf4bae62440e017af/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AdapterDelegatesManager.java#L214-L234
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java
GremlinQueryOptimizer.copyWithNewLeafNode
public static GroovyExpression copyWithNewLeafNode(AbstractFunctionExpression expr, GroovyExpression newLeaf) { """ Recursively copies and follows the caller hierarchy of the expression until we come to a function call with a null caller. The caller of that expression is set to newLeaf. @param expr @param n...
java
public static GroovyExpression copyWithNewLeafNode(AbstractFunctionExpression expr, GroovyExpression newLeaf) { AbstractFunctionExpression result = (AbstractFunctionExpression)expr.copy(); //remove leading anonymous traversal expression, if there is one if(FACTORY.isLeafAnonymousTraversalExpr...
[ "public", "static", "GroovyExpression", "copyWithNewLeafNode", "(", "AbstractFunctionExpression", "expr", ",", "GroovyExpression", "newLeaf", ")", "{", "AbstractFunctionExpression", "result", "=", "(", "AbstractFunctionExpression", ")", "expr", ".", "copy", "(", ")", ";...
Recursively copies and follows the caller hierarchy of the expression until we come to a function call with a null caller. The caller of that expression is set to newLeaf. @param expr @param newLeaf @return the updated (/copied) expression
[ "Recursively", "copies", "and", "follows", "the", "caller", "hierarchy", "of", "the", "expression", "until", "we", "come", "to", "a", "function", "call", "with", "a", "null", "caller", ".", "The", "caller", "of", "that", "expression", "is", "set", "to", "n...
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/GremlinQueryOptimizer.java#L242-L260
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_promotionCode_generate_POST
public OvhTask packName_promotionCode_generate_POST(String packName) throws IOException { """ Creates a task to generate a new promotion code REST: POST /pack/xdsl/{packName}/promotionCode/generate @param packName [required] The internal name of your pack """ String qPath = "/pack/xdsl/{packName}/promoti...
java
public OvhTask packName_promotionCode_generate_POST(String packName) throws IOException { String qPath = "/pack/xdsl/{packName}/promotionCode/generate"; StringBuilder sb = path(qPath, packName); String resp = exec(qPath, "POST", sb.toString(), null); return convertTo(resp, OvhTask.class); }
[ "public", "OvhTask", "packName_promotionCode_generate_POST", "(", "String", "packName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}/promotionCode/generate\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "packName", ...
Creates a task to generate a new promotion code REST: POST /pack/xdsl/{packName}/promotionCode/generate @param packName [required] The internal name of your pack
[ "Creates", "a", "task", "to", "generate", "a", "new", "promotion", "code" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L801-L806
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/PoissonDistribution.java
PoissonDistribution.poissonPDFm1
public static double poissonPDFm1(double x_plus_1, double lambda) { """ Compute the poisson distribution PDF with an offset of + 1 <p> pdf(x_plus_1 - 1, lambda) @param x_plus_1 x+1 @param lambda Lambda @return pdf """ if(Double.isInfinite(lambda)) { return 0.; } if(x_plus_1 > 1) { ...
java
public static double poissonPDFm1(double x_plus_1, double lambda) { if(Double.isInfinite(lambda)) { return 0.; } if(x_plus_1 > 1) { return rawProbability(x_plus_1 - 1, lambda); } if(lambda > Math.abs(x_plus_1 - 1) * MathUtil.LOG2 * Double.MAX_EXPONENT / 1e-14) { return FastMath.exp...
[ "public", "static", "double", "poissonPDFm1", "(", "double", "x_plus_1", ",", "double", "lambda", ")", "{", "if", "(", "Double", ".", "isInfinite", "(", "lambda", ")", ")", "{", "return", "0.", ";", "}", "if", "(", "x_plus_1", ">", "1", ")", "{", "re...
Compute the poisson distribution PDF with an offset of + 1 <p> pdf(x_plus_1 - 1, lambda) @param x_plus_1 x+1 @param lambda Lambda @return pdf
[ "Compute", "the", "poisson", "distribution", "PDF", "with", "an", "offset", "of", "+", "1", "<p", ">", "pdf", "(", "x_plus_1", "-", "1", "lambda", ")" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/PoissonDistribution.java#L288-L301
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.toLegacyType
public static String toLegacyType(String keyword, String value) { """ <strong>[icu]</strong> Converts the specified keyword value (BCP 47 Unicode locale extension type, or legacy type or type alias) to the canonical legacy type. For example, the legacy type "phonebook" is returned for the input BCP 47 Unicode l...
java
public static String toLegacyType(String keyword, String value) { String legacyType = KeyTypeData.toLegacyType(keyword, value, null, null); if (legacyType == null) { // Checks if the specified locale type is well-formed with the legacy locale syntax. // // Note: ...
[ "public", "static", "String", "toLegacyType", "(", "String", "keyword", ",", "String", "value", ")", "{", "String", "legacyType", "=", "KeyTypeData", ".", "toLegacyType", "(", "keyword", ",", "value", ",", "null", ",", "null", ")", ";", "if", "(", "legacyT...
<strong>[icu]</strong> Converts the specified keyword value (BCP 47 Unicode locale extension type, or legacy type or type alias) to the canonical legacy type. For example, the legacy type "phonebook" is returned for the input BCP 47 Unicode locale extension type "phonebk" with the keyword "collation" (or "co"). <p> Whe...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Converts", "the", "specified", "keyword", "value", "(", "BCP", "47", "Unicode", "locale", "extension", "type", "or", "legacy", "type", "or", "type", "alias", ")", "to", "the", "canonical", "legac...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L3416-L3433
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java
MultiMap.addValues
public void addValues(Object name, String[] values) { """ Add values to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry. @param name The entry key. @param values The String array of multiple values. """ Object lo = super.get(name); ...
java
public void addValues(Object name, String[] values) { Object lo = super.get(name); Object ln = LazyList.addCollection(lo,Arrays.asList(values)); if (lo!=ln) super.put(name,ln); }
[ "public", "void", "addValues", "(", "Object", "name", ",", "String", "[", "]", "values", ")", "{", "Object", "lo", "=", "super", ".", "get", "(", "name", ")", ";", "Object", "ln", "=", "LazyList", ".", "addCollection", "(", "lo", ",", "Arrays", ".", ...
Add values to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry. @param name The entry key. @param values The String array of multiple values.
[ "Add", "values", "to", "multi", "valued", "entry", ".", "If", "the", "entry", "is", "single", "valued", "it", "is", "converted", "to", "the", "first", "value", "of", "a", "multi", "valued", "entry", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java#L213-L219
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java
FtpFileUtil.executeCommandOnFTPServer
public static String executeCommandOnFTPServer(String hostName, Integer port, String userName, String password, String command, String commandArgs) { """ Execute command with supplied arguments on the FTP server. @param hostName the FTP server host name to connect @param port the port to connect @pa...
java
public static String executeCommandOnFTPServer(String hostName, Integer port, String userName, String password, String command, String commandArgs) { String result = null; if (StringUtils.isNotBlank(command)) { FTPClient ftpClient = new FTPClient(); String errorMessa...
[ "public", "static", "String", "executeCommandOnFTPServer", "(", "String", "hostName", ",", "Integer", "port", ",", "String", "userName", ",", "String", "password", ",", "String", "command", ",", "String", "commandArgs", ")", "{", "String", "result", "=", "null",...
Execute command with supplied arguments on the FTP server. @param hostName the FTP server host name to connect @param port the port to connect @param userName the user name @param password the password @param command the command to execute. @param commandArgs the command argument(s), if any. @return reply string from F...
[ "Execute", "command", "with", "supplied", "arguments", "on", "the", "FTP", "server", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java#L55-L82
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/GPXRead.java
GPXRead.readGPX
public static void readGPX(Connection connection, String fileName, String tableReference, boolean deleteTables) throws IOException, SQLException { """ Copy data from GPX File into a new table in specified connection. @param connection Active connection @param tableReference [[catalog.]schema.]table reference ...
java
public static void readGPX(Connection connection, String fileName, String tableReference, boolean deleteTables) throws IOException, SQLException { File file = URIUtilities.fileFromString(fileName); if (FileUtil.isFileImportable(file, "gpx")) { GPXDriverFunction gpxdf = new GPXDriverFunction(...
[ "public", "static", "void", "readGPX", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ",", "boolean", "deleteTables", ")", "throws", "IOException", ",", "SQLException", "{", "File", "file", "=", "URIUtilities", ".", ...
Copy data from GPX File into a new table in specified connection. @param connection Active connection @param tableReference [[catalog.]schema.]table reference @param fileName File path of the SHP file @param deleteTables true to delete the existing tables @throws java.io.IOException @throws java.sql.SQLException
[ "Copy", "data", "from", "GPX", "File", "into", "a", "new", "table", "in", "specified", "connection", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/GPXRead.java#L63-L69
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java
BinaryRowProtocol.getInternalBoolean
public boolean getInternalBoolean(ColumnInformation columnInfo) throws SQLException { """ Get boolean from raw binary format. @param columnInfo column information @return boolean value @throws SQLException if column type doesn't permit conversion """ if (lastValueWasNull()) { return false; }...
java
public boolean getInternalBoolean(ColumnInformation columnInfo) throws SQLException { if (lastValueWasNull()) { return false; } switch (columnInfo.getColumnType()) { case BIT: return parseBit() != 0; case TINYINT: return getInternalTinyInt(columnInfo) != 0; case SMALL...
[ "public", "boolean", "getInternalBoolean", "(", "ColumnInformation", "columnInfo", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "false", ";", "}", "switch", "(", "columnInfo", ".", "getColumnType", "(", ")", ...
Get boolean from raw binary format. @param columnInfo column information @return boolean value @throws SQLException if column type doesn't permit conversion
[ "Get", "boolean", "from", "raw", "binary", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/BinaryRowProtocol.java#L1077-L1105
craftercms/core
src/main/java/org/craftercms/core/cache/impl/store/MapCacheStoreAdapter.java
MapCacheStoreAdapter.addScope
public void addScope(String scope, int maxItemsInMemory) throws Exception { """ Adds a new scope. The scope is an instance of {@link ConcurrentHashMap}. @param scope the name of the scope @param maxItemsInMemory the maximum number of items in memory, before they are evicted @throws Exception ""...
java
public void addScope(String scope, int maxItemsInMemory) throws Exception { // Ignore maxItemsInMemory, since we don't run an eviction algorithm. scopeCaches.put(scope, new ConcurrentHashMap<Object, CacheItem>()); }
[ "public", "void", "addScope", "(", "String", "scope", ",", "int", "maxItemsInMemory", ")", "throws", "Exception", "{", "// Ignore maxItemsInMemory, since we don't run an eviction algorithm.", "scopeCaches", ".", "put", "(", "scope", ",", "new", "ConcurrentHashMap", "<", ...
Adds a new scope. The scope is an instance of {@link ConcurrentHashMap}. @param scope the name of the scope @param maxItemsInMemory the maximum number of items in memory, before they are evicted @throws Exception
[ "Adds", "a", "new", "scope", ".", "The", "scope", "is", "an", "instance", "of", "{", "@link", "ConcurrentHashMap", "}", "." ]
train
https://github.com/craftercms/core/blob/d3ec74d669d3f8cfcf995177615d5f126edfa237/src/main/java/org/craftercms/core/cache/impl/store/MapCacheStoreAdapter.java#L83-L86