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
Jasig/uPortal
uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java
FileSystemGroupStore.find
@Override public IEntityGroup find(String key) throws GroupsException { """ Returns an instance of the <code>IEntityGroup</code> from the data store. @return org.apereo.portal.groups.IEntityGroup @param key java.lang.String """ if (log.isDebugEnabled()) { log.debug(DEBUG_CLASS_NAME ...
java
@Override public IEntityGroup find(String key) throws GroupsException { if (log.isDebugEnabled()) { log.debug(DEBUG_CLASS_NAME + ".find(): group key: " + key); } String path = getFilePathFromKey(key); File f = new File(path); GroupHolder groupHolder = cacheGet(k...
[ "@", "Override", "public", "IEntityGroup", "find", "(", "String", "key", ")", "throws", "GroupsException", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "DEBUG_CLASS_NAME", "+", "\".find(): group key: \"", "+", "...
Returns an instance of the <code>IEntityGroup</code> from the data store. @return org.apereo.portal.groups.IEntityGroup @param key java.lang.String
[ "Returns", "an", "instance", "of", "the", "<code", ">", "IEntityGroup<", "/", "code", ">", "from", "the", "data", "store", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java#L240-L271
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/http/apache/utils/ApacheUtils.java
ApacheUtils.createResponse
public static HttpResponse createResponse(Request<?> request, HttpRequestBase method, org.apache.http.HttpResponse apacheHttpResponse, HttpContext context) throws IOException { """ Creates and in...
java
public static HttpResponse createResponse(Request<?> request, HttpRequestBase method, org.apache.http.HttpResponse apacheHttpResponse, HttpContext context) throws IOException { HttpResponse ht...
[ "public", "static", "HttpResponse", "createResponse", "(", "Request", "<", "?", ">", "request", ",", "HttpRequestBase", "method", ",", "org", ".", "apache", ".", "http", ".", "HttpResponse", "apacheHttpResponse", ",", "HttpContext", "context", ")", "throws", "IO...
Creates and initializes an HttpResponse object suitable to be passed to an HTTP response handler object. @param request Marshalled request object. @param method The HTTP method that was invoked to get the response. @param context The HTTP context associated with the request and response. @return The new, initialized ...
[ "Creates", "and", "initializes", "an", "HttpResponse", "object", "suitable", "to", "be", "passed", "to", "an", "HTTP", "response", "handler", "object", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/http/apache/utils/ApacheUtils.java#L69-L86
legsem/legstar-core2
legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java
EachHelper.iterableContext
private CharSequence iterableContext(final Iterable<Object> context, final Options options) throws IOException { """ Iterate over an iterable object. @param context The context object. @param options The helper options. @return The string output. @throws IOException If something goes wrong. """ ...
java
private CharSequence iterableContext(final Iterable<Object> context, final Options options) throws IOException { StringBuilder buffer = new StringBuilder(); if (options.isFalsy(context)) { buffer.append(options.inverse()); } else { Iterator<Object> iterator = context.iterator(); int ...
[ "private", "CharSequence", "iterableContext", "(", "final", "Iterable", "<", "Object", ">", "context", ",", "final", "Options", "options", ")", "throws", "IOException", "{", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "opt...
Iterate over an iterable object. @param context The context object. @param options The helper options. @return The string output. @throws IOException If something goes wrong.
[ "Iterate", "over", "an", "iterable", "object", "." ]
train
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-jaxb-generator/src/main/java/com/legstar/jaxb/generator/EachHelper.java#L80-L107
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/PackagesToContainingMavenArtifactsIndex.java
PackagesToContainingMavenArtifactsIndex.moduleContainsPackagesFromAPI
public boolean moduleContainsPackagesFromAPI(ProjectModel projectModel, MavenCoord apiCoords) { """ For given API artifact, finds the projects whose Java classes use artifact's classes, and links them in the graph. """ ArchiveCoordinateModel archive = new ArchiveCoordinateService(graphContext, Archive...
java
public boolean moduleContainsPackagesFromAPI(ProjectModel projectModel, MavenCoord apiCoords) { ArchiveCoordinateModel archive = new ArchiveCoordinateService(graphContext, ArchiveCoordinateModel.class).findSingle(apiCoords.getGroupId(), apiCoords.getArtifactId(), null); if (archive == null) ...
[ "public", "boolean", "moduleContainsPackagesFromAPI", "(", "ProjectModel", "projectModel", ",", "MavenCoord", "apiCoords", ")", "{", "ArchiveCoordinateModel", "archive", "=", "new", "ArchiveCoordinateService", "(", "graphContext", ",", "ArchiveCoordinateModel", ".", "class"...
For given API artifact, finds the projects whose Java classes use artifact's classes, and links them in the graph.
[ "For", "given", "API", "artifact", "finds", "the", "projects", "whose", "Java", "classes", "use", "artifact", "s", "classes", "and", "links", "them", "in", "the", "graph", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/PackagesToContainingMavenArtifactsIndex.java#L93-L108
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java
ClassFieldCache.get
ClassFields get(final Class<?> cls) { """ For a given resolved type, find the visible and accessible fields, resolve the types of any generically typed fields, and return the resolved fields. @param cls the cls @return the class fields """ ClassFields classFields = classToClassFields.get(cls); ...
java
ClassFields get(final Class<?> cls) { ClassFields classFields = classToClassFields.get(cls); if (classFields == null) { classToClassFields.put(cls, classFields = new ClassFields(cls, resolveTypes, onlySerializePublicFields, this)); } return classFields; ...
[ "ClassFields", "get", "(", "final", "Class", "<", "?", ">", "cls", ")", "{", "ClassFields", "classFields", "=", "classToClassFields", ".", "get", "(", "cls", ")", ";", "if", "(", "classFields", "==", "null", ")", "{", "classToClassFields", ".", "put", "(...
For a given resolved type, find the visible and accessible fields, resolve the types of any generically typed fields, and return the resolved fields. @param cls the cls @return the class fields
[ "For", "a", "given", "resolved", "type", "find", "the", "visible", "and", "accessible", "fields", "resolve", "the", "types", "of", "any", "generically", "typed", "fields", "and", "return", "the", "resolved", "fields", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java#L131-L138
gaixie/jibu-core
src/main/java/org/gaixie/jibu/utils/SQLBuilder.java
SQLBuilder.getSortClause
public static String getSortClause (String sql,Criteria crt) { """ 通过 criteria 生成排序的 sql 语句。数据库类型无关。 <p> 注意,如果结合分页,要保证在分页语句之前条用。</p> @param sql 要处理语句。 @param crt 传递排序信息。 @return 有效的 sql语句。 """ if (null == sql ) return null; if (null != crt && null != crt.getSort()) { String[...
java
public static String getSortClause (String sql,Criteria crt) { if (null == sql ) return null; if (null != crt && null != crt.getSort()) { String[] sorts = crt.getSort().split(","); String s = ""; for(String sort: sorts) { if(s.length()==0) ...
[ "public", "static", "String", "getSortClause", "(", "String", "sql", ",", "Criteria", "crt", ")", "{", "if", "(", "null", "==", "sql", ")", "return", "null", ";", "if", "(", "null", "!=", "crt", "&&", "null", "!=", "crt", ".", "getSort", "(", ")", ...
通过 criteria 生成排序的 sql 语句。数据库类型无关。 <p> 注意,如果结合分页,要保证在分页语句之前条用。</p> @param sql 要处理语句。 @param crt 传递排序信息。 @return 有效的 sql语句。
[ "通过", "criteria", "生成排序的", "sql", "语句。数据库类型无关。", "<p", ">", "注意,如果结合分页,要保证在分页语句之前条用。<", "/", "p", ">" ]
train
https://github.com/gaixie/jibu-core/blob/d5462f2883321c82d898c8752b7e5eba4b7dc184/src/main/java/org/gaixie/jibu/utils/SQLBuilder.java#L199-L214
auth0/auth0-java
src/main/java/com/auth0/client/mgmt/filter/PageFilter.java
PageFilter.withPage
public PageFilter withPage(int pageNumber, int amountPerPage) { """ Filter by page @param pageNumber the page number to retrieve. @param amountPerPage the amount of items per page to retrieve. @return this filter instance """ parameters.put("page", pageNumber); parameters.put("per_page"...
java
public PageFilter withPage(int pageNumber, int amountPerPage) { parameters.put("page", pageNumber); parameters.put("per_page", amountPerPage); return this; }
[ "public", "PageFilter", "withPage", "(", "int", "pageNumber", ",", "int", "amountPerPage", ")", "{", "parameters", ".", "put", "(", "\"page\"", ",", "pageNumber", ")", ";", "parameters", ".", "put", "(", "\"per_page\"", ",", "amountPerPage", ")", ";", "retur...
Filter by page @param pageNumber the page number to retrieve. @param amountPerPage the amount of items per page to retrieve. @return this filter instance
[ "Filter", "by", "page" ]
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/mgmt/filter/PageFilter.java#L14-L18
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java
JobOperations.terminateJob
public void terminateJob(String jobId, String terminateReason, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Terminates the specified job, marking it as completed. @param jobId The ID of the job. @param terminateReason The message to describe the reason the jo...
java
public void terminateJob(String jobId, String terminateReason, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobTerminateOptions options = new JobTerminateOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); ...
[ "public", "void", "terminateJob", "(", "String", "jobId", ",", "String", "terminateReason", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "JobTerminateOptions", "options", "=", "...
Terminates the specified job, marking it as completed. @param jobId The ID of the job. @param terminateReason The message to describe the reason the job has terminated. This text will appear when you call {@link JobExecutionInformation#terminateReason()}. @param additionalBehaviors A collection of {@link BatchClientBe...
[ "Terminates", "the", "specified", "job", "marking", "it", "as", "completed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java#L383-L389
jclawson/hazeltask
hazeltask-core/src/main/java/com/hazeltask/executor/DistributedFutureTracker.java
DistributedFutureTracker.errorFuture
public void errorFuture(UUID taskId, Exception e) { """ handles when a member leaves and hazelcast partition data is lost. We want to find the Futures that are waiting on lost data and error them """ DistributedFuture<GROUP, Serializable> future = remove(taskId); if(future != null) { ...
java
public void errorFuture(UUID taskId, Exception e) { DistributedFuture<GROUP, Serializable> future = remove(taskId); if(future != null) { future.setException(e); } }
[ "public", "void", "errorFuture", "(", "UUID", "taskId", ",", "Exception", "e", ")", "{", "DistributedFuture", "<", "GROUP", ",", "Serializable", ">", "future", "=", "remove", "(", "taskId", ")", ";", "if", "(", "future", "!=", "null", ")", "{", "future",...
handles when a member leaves and hazelcast partition data is lost. We want to find the Futures that are waiting on lost data and error them
[ "handles", "when", "a", "member", "leaves", "and", "hazelcast", "partition", "data", "is", "lost", ".", "We", "want", "to", "find", "the", "Futures", "that", "are", "waiting", "on", "lost", "data", "and", "error", "them" ]
train
https://github.com/jclawson/hazeltask/blob/801162bc54c5f1d5744a28a2844b24289d9495d7/hazeltask-core/src/main/java/com/hazeltask/executor/DistributedFutureTracker.java#L116-L121
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.listArpTable
public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { """ Gets the currently advertised ARP table associated with the express route circuit in a resource group. @param resourceGroupName The name of the resource grou...
java
public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return listArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().body(); }
[ "public", "ExpressRouteCircuitsArpTableListResultInner", "listArpTable", "(", "String", "resourceGroupName", ",", "String", "circuitName", ",", "String", "peeringName", ",", "String", "devicePath", ")", "{", "return", "listArpTableWithServiceResponseAsync", "(", "resourceGrou...
Gets the currently advertised ARP table associated with the express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @param peeringName The name of the peering. @param devicePath The path of the device. @throws Illegal...
[ "Gets", "the", "currently", "advertised", "ARP", "table", "associated", "with", "the", "express", "route", "circuit", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L878-L880
jriecken/gae-java-mini-profiler
src/main/java/ca/jimr/gae/profiler/resources/MiniProfilerResourceLoader.java
MiniProfilerResourceLoader.getResource
public String getResource(String resource, Map<String, String> replacements) { """ Get the specified resource (if it exists) and perform the specified string replacements on it. @param resource The name of the resource to load. @param replacements The map of string replacements to do. @return The text of...
java
public String getResource(String resource, Map<String, String> replacements) { String result = cache.get(resource); if (result == null) { try { InputStream is = MiniProfilerResourceLoader.class.getResourceAsStream(resource); try { result = new Scanner(is).useD...
[ "public", "String", "getResource", "(", "String", "resource", ",", "Map", "<", "String", ",", "String", ">", "replacements", ")", "{", "String", "result", "=", "cache", ".", "get", "(", "resource", ")", ";", "if", "(", "result", "==", "null", ")", "{",...
Get the specified resource (if it exists) and perform the specified string replacements on it. @param resource The name of the resource to load. @param replacements The map of string replacements to do. @return The text of the resource, or {@code null} if it could not be loaded.
[ "Get", "the", "specified", "resource", "(", "if", "it", "exists", ")", "and", "perform", "the", "specified", "string", "replacements", "on", "it", "." ]
train
https://github.com/jriecken/gae-java-mini-profiler/blob/184e3d2470104e066919960d6fbfe0cdc05921d5/src/main/java/ca/jimr/gae/profiler/resources/MiniProfilerResourceLoader.java#L52-L83
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java
TrajectoryEnvelopeSolver.createEnvelopes
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, String ... pathFiles) { """ Create a trajectory envelope for each given reference to a file containing a path. Robot IDs are assigned starting from the given integer. This method creates three envelopes for each path: the mai...
java
public HashMap<Integer,ArrayList<TrajectoryEnvelope>> createEnvelopes(int firstRobotID, String ... pathFiles) { //Default footprint, 2.7 (w) x 6.6 (l) Coordinate frontLeft = new Coordinate(5.3, 1.35); Coordinate frontRight = new Coordinate(5.3, -1.35); Coordinate backRight = new Coordinate(-1.3, -1.35); Coord...
[ "public", "HashMap", "<", "Integer", ",", "ArrayList", "<", "TrajectoryEnvelope", ">", ">", "createEnvelopes", "(", "int", "firstRobotID", ",", "String", "...", "pathFiles", ")", "{", "//Default footprint, 2.7 (w) x 6.6 (l)", "Coordinate", "frontLeft", "=", "new", "...
Create a trajectory envelope for each given reference to a file containing a path. Robot IDs are assigned starting from the given integer. This method creates three envelopes for each path: the main {@link TrajectoryEnvelope} covering the path; one {@link TrajectoryEnvelope} for the starting position of the robot; and ...
[ "Create", "a", "trajectory", "envelope", "for", "each", "given", "reference", "to", "a", "file", "containing", "a", "path", ".", "Robot", "IDs", "are", "assigned", "starting", "from", "the", "given", "integer", ".", "This", "method", "creates", "three", "env...
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelopeSolver.java#L339-L349
js-lib-com/dom
src/main/java/js/dom/w3c/DocumentImpl.java
DocumentImpl.evaluateXPathNodeListNS
EList evaluateXPathNodeListNS(Node contextNode, NamespaceContext namespaceContext, String expression, Object... args) { """ Name space aware variant of {@link #evaluateXPathNodeList(Node, String, Object...)}. @param contextNode evaluation context node, @param namespaceContext name space context maps prefixes t...
java
EList evaluateXPathNodeListNS(Node contextNode, NamespaceContext namespaceContext, String expression, Object... args) { if (args.length > 0) { expression = Strings.format(expression, args); } NodeList nodeList = null; try { XPath xpath = XPathFactory.newInstance().newXPath(); if (namespaceCont...
[ "EList", "evaluateXPathNodeListNS", "(", "Node", "contextNode", ",", "NamespaceContext", "namespaceContext", ",", "String", "expression", ",", "Object", "...", "args", ")", "{", "if", "(", "args", ".", "length", ">", "0", ")", "{", "expression", "=", "Strings"...
Name space aware variant of {@link #evaluateXPathNodeList(Node, String, Object...)}. @param contextNode evaluation context node, @param namespaceContext name space context maps prefixes to name space URIs, @param expression XPath expression with optional formatting tags, @param args optional formatting arguments. @ret...
[ "Name", "space", "aware", "variant", "of", "{", "@link", "#evaluateXPathNodeList", "(", "Node", "String", "Object", "...", ")", "}", "." ]
train
https://github.com/js-lib-com/dom/blob/8c7cd7c802977f210674dec7c2a8f61e8de05b63/src/main/java/js/dom/w3c/DocumentImpl.java#L350-L373
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/AnalyzeSpark.java
AnalyzeSpark.sampleFromColumnSequence
public static List<Writable> sampleFromColumnSequence(int count, String columnName, Schema schema, JavaRDD<List<List<Writable>>> sequenceData) { """ Randomly sample values from a single column, in all sequences. Values may be taken from any sequence (i.e., sequence order is not preserved) @...
java
public static List<Writable> sampleFromColumnSequence(int count, String columnName, Schema schema, JavaRDD<List<List<Writable>>> sequenceData) { JavaRDD<List<Writable>> flattenedSequence = sequenceData.flatMap(new SequenceFlatMapFunction()); return sampleFromColumn(count, columnName,...
[ "public", "static", "List", "<", "Writable", ">", "sampleFromColumnSequence", "(", "int", "count", ",", "String", "columnName", ",", "Schema", "schema", ",", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "sequenceData", ")", "{", "Ja...
Randomly sample values from a single column, in all sequences. Values may be taken from any sequence (i.e., sequence order is not preserved) @param count Number of values to sample @param columnName Name of the column to sample from @param schema Schema @param sequenceData Data to sample from @retur...
[ "Randomly", "sample", "values", "from", "a", "single", "column", "in", "all", "sequences", ".", "Values", "may", "be", "taken", "from", "any", "sequence", "(", "i", ".", "e", ".", "sequence", "order", "is", "not", "preserved", ")" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/AnalyzeSpark.java#L182-L186
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getSharingForDevice
public DeviceSharing getSharingForDevice(String deviceId, String shareId) throws ApiException { """ Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharing @throws ApiException If fail t...
java
public DeviceSharing getSharingForDevice(String deviceId, String shareId) throws ApiException { ApiResponse<DeviceSharing> resp = getSharingForDeviceWithHttpInfo(deviceId, shareId); return resp.getData(); }
[ "public", "DeviceSharing", "getSharingForDevice", "(", "String", "deviceId", ",", "String", "shareId", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceSharing", ">", "resp", "=", "getSharingForDeviceWithHttpInfo", "(", "deviceId", ",", "shareId", ")", ...
Get specific share of the given device id Get specific share of the given device id @param deviceId Device ID. (required) @param shareId Share ID. (required) @return DeviceSharing @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "specific", "share", "of", "the", "given", "device", "id", "Get", "specific", "share", "of", "the", "given", "device", "id" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L518-L521
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3f.java
Sphere3f.set
@Override public void set(double x, double y, double z, double radius1) { """ Change the frame of the sphere. @param x @param y @param z @param radius1 """ this.cx = x; this.cy = y; this.cz = z; this.radius = Math.abs(radius1); }
java
@Override public void set(double x, double y, double z, double radius1) { this.cx = x; this.cy = y; this.cz = z; this.radius = Math.abs(radius1); }
[ "@", "Override", "public", "void", "set", "(", "double", "x", ",", "double", "y", ",", "double", "z", ",", "double", "radius1", ")", "{", "this", ".", "cx", "=", "x", ";", "this", ".", "cy", "=", "y", ";", "this", ".", "cz", "=", "z", ";", "t...
Change the frame of the sphere. @param x @param y @param z @param radius1
[ "Change", "the", "frame", "of", "the", "sphere", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3f.java#L67-L73
brettonw/Bag
src/main/java/com/brettonw/bag/formats/MimeType.java
MimeType.getFromMimeType
public static String getFromMimeType (String mimeType, Supplier<String> notFound) { """ Returns a mime type with a known format reader from the given mime type. Some MIME types are application or vendor specific examples that use a standard underlying format, like XML. There are also examples of synonym types, l...
java
public static String getFromMimeType (String mimeType, Supplier<String> notFound) { mimeType = mimeType.toLowerCase (); return mimeTypeRemappings.containsKey (mimeType) ? mimeTypeRemappings.get (mimeType) : notFound.get (); }
[ "public", "static", "String", "getFromMimeType", "(", "String", "mimeType", ",", "Supplier", "<", "String", ">", "notFound", ")", "{", "mimeType", "=", "mimeType", ".", "toLowerCase", "(", ")", ";", "return", "mimeTypeRemappings", ".", "containsKey", "(", "mim...
Returns a mime type with a known format reader from the given mime type. Some MIME types are application or vendor specific examples that use a standard underlying format, like XML. There are also examples of synonym types, like "text/csv" and "application/csv" that we want to support.
[ "Returns", "a", "mime", "type", "with", "a", "known", "format", "reader", "from", "the", "given", "mime", "type", ".", "Some", "MIME", "types", "are", "application", "or", "vendor", "specific", "examples", "that", "use", "a", "standard", "underlying", "forma...
train
https://github.com/brettonw/Bag/blob/25c0ff74893b6c9a2c61bf0f97189ab82e0b2f56/src/main/java/com/brettonw/bag/formats/MimeType.java#L66-L69
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplace.java
CmsWorkplace.fillParamValues
public void fillParamValues(CmsWorkplaceSettings settings, HttpServletRequest request) { """ First sets site and project in the workplace settings, then fills all class parameter values from the data provided in the current request.<p> @param settings the workplace settings @param request the current request ...
java
public void fillParamValues(CmsWorkplaceSettings settings, HttpServletRequest request) { initSettings(settings, request); fillParamValues(request); }
[ "public", "void", "fillParamValues", "(", "CmsWorkplaceSettings", "settings", ",", "HttpServletRequest", "request", ")", "{", "initSettings", "(", "settings", ",", "request", ")", ";", "fillParamValues", "(", "request", ")", ";", "}" ]
First sets site and project in the workplace settings, then fills all class parameter values from the data provided in the current request.<p> @param settings the workplace settings @param request the current request
[ "First", "sets", "site", "and", "project", "in", "the", "workplace", "settings", "then", "fills", "all", "class", "parameter", "values", "from", "the", "data", "provided", "in", "the", "current", "request", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplace.java#L1478-L1482
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/application/exceptionhandling/AbstractLoggingExceptionHandler.java
AbstractLoggingExceptionHandler.uncaughtException
public final void uncaughtException(Thread thread, Throwable throwable) { """ Logs an exception and shows it to the user. <p/> Has infinite loop detection due to exception handling throwing an exception. An infinite loop can occur in different cases: <ul> <li> Case 1: The ExceptionHandler throws an exception...
java
public final void uncaughtException(Thread thread, Throwable throwable) { Boolean infiniteLoopDetected = alreadyHandlingExceptionOnThisThread.get(); if (infiniteLoopDetected != null && infiniteLoopDetected.booleanValue()) { // Preventing infinite loop case 2 (see javadoc) // The ...
[ "public", "final", "void", "uncaughtException", "(", "Thread", "thread", ",", "Throwable", "throwable", ")", "{", "Boolean", "infiniteLoopDetected", "=", "alreadyHandlingExceptionOnThisThread", ".", "get", "(", ")", ";", "if", "(", "infiniteLoopDetected", "!=", "nul...
Logs an exception and shows it to the user. <p/> Has infinite loop detection due to exception handling throwing an exception. An infinite loop can occur in different cases: <ul> <li> Case 1: The ExceptionHandler throws an exception, which is handled by the ExceptionHandler, which throws an exception, ... </li> <li> Cas...
[ "Logs", "an", "exception", "and", "shows", "it", "to", "the", "user", ".", "<p", "/", ">", "Has", "infinite", "loop", "detection", "due", "to", "exception", "handling", "throwing", "an", "exception", ".", "An", "infinite", "loop", "can", "occur", "in", "...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/exceptionhandling/AbstractLoggingExceptionHandler.java#L85-L120
lazy-koala/java-toolkit
fast-toolkit3d/src/main/java/com/thankjava/toolkit3d/core/mail/MailUtil.java
MailUtil.sendMail
public static void sendMail(MailContent mailContent, File attachment) throws MessagingException, UnsupportedEncodingException { """ 发送可带附件的邮件 @param mailContent @param attachment 目标附件File @return @throws MessagingException @throws UnsupportedEncodingException """ // 判断是否需要身份认证 Propertie...
java
public static void sendMail(MailContent mailContent, File attachment) throws MessagingException, UnsupportedEncodingException { // 判断是否需要身份认证 Properties pro = mailContent.getProperties(); // 如果需要身份认证,则创建一个密码验证器 AuthEntity authEntity = new MailUtil().new AuthEntity(mailContent.getAuthUser...
[ "public", "static", "void", "sendMail", "(", "MailContent", "mailContent", ",", "File", "attachment", ")", "throws", "MessagingException", ",", "UnsupportedEncodingException", "{", "// 判断是否需要身份认证", "Properties", "pro", "=", "mailContent", ".", "getProperties", "(", ")...
发送可带附件的邮件 @param mailContent @param attachment 目标附件File @return @throws MessagingException @throws UnsupportedEncodingException
[ "发送可带附件的邮件" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit3d/src/main/java/com/thankjava/toolkit3d/core/mail/MailUtil.java#L108-L148
jmxtrans/jmxtrans
jmxtrans-output/jmxtrans-output-logback/src/main/java/com/googlecode/jmxtrans/model/output/NagiosWriter.java
NagiosWriter.valueCheck
protected boolean valueCheck(double value, String simpleRange) { """ Check if a value is inside of a range defined in the thresholds. This check is based on Nagios range definition. http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT """ if (simpleRange.isEmpty()) { return false;...
java
protected boolean valueCheck(double value, String simpleRange) { if (simpleRange.isEmpty()) { return false; } if (simpleRange.endsWith(":")) { return value < Double.parseDouble(simpleRange.replace(":", "")); } if (simpleRange.startsWith("~:")) { return value > Double.parseDouble(simpleRange.replac...
[ "protected", "boolean", "valueCheck", "(", "double", "value", ",", "String", "simpleRange", ")", "{", "if", "(", "simpleRange", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "simpleRange", ".", "endsWith", "(", "\":\"", ")",...
Check if a value is inside of a range defined in the thresholds. This check is based on Nagios range definition. http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT
[ "Check", "if", "a", "value", "is", "inside", "of", "a", "range", "defined", "in", "the", "thresholds", ".", "This", "check", "is", "based", "on", "Nagios", "range", "definition", ".", "http", ":", "//", "nagiosplug", ".", "sourceforge", ".", "net", "/", ...
train
https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-output/jmxtrans-output-logback/src/main/java/com/googlecode/jmxtrans/model/output/NagiosWriter.java#L275-L301
chr78rm/tracelogger
src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java
AbstractTracer.readConfiguration
protected void readConfiguration(XPath xpath, Node node) throws XPathExpressionException, AbstractTracer.Exception { """ Reads the configuration for this particular tracer instance by evaluating the given node with the given xpath engine. @param xpath the xpath engine @param node the config node @throws javax...
java
protected void readConfiguration(XPath xpath, Node node) throws XPathExpressionException, AbstractTracer.Exception { this.autoflush = "true".equals((String) xpath.evaluate("./dns:AutoFlush/text()", node, XPathConstants.STRING)); this.bufferSize = Integer.parseInt((String) xpath.evaluate("./dns:BufSize/text()"...
[ "protected", "void", "readConfiguration", "(", "XPath", "xpath", ",", "Node", "node", ")", "throws", "XPathExpressionException", ",", "AbstractTracer", ".", "Exception", "{", "this", ".", "autoflush", "=", "\"true\"", ".", "equals", "(", "(", "String", ")", "x...
Reads the configuration for this particular tracer instance by evaluating the given node with the given xpath engine. @param xpath the xpath engine @param node the config node @throws javax.xml.xpath.XPathExpressionException indicates xpath problems @throws de.christofreichardt.diagnosis.AbstractTracer.Exception indic...
[ "Reads", "the", "configuration", "for", "this", "particular", "tracer", "instance", "by", "evaluating", "the", "given", "node", "with", "the", "given", "xpath", "engine", "." ]
train
https://github.com/chr78rm/tracelogger/blob/ad22452b20f8111ad4d367302c2b26a100a20200/src/main/java/de/christofreichardt/diagnosis/AbstractTracer.java#L310-L331
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_input_inputId_configuration_flowgger_GET
public OvhFlowggerConfiguration serviceName_input_inputId_configuration_flowgger_GET(String serviceName, String inputId) throws IOException { """ Returns the flowgger configuration REST: GET /dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger @param serviceName [required] Service name @param inpu...
java
public OvhFlowggerConfiguration serviceName_input_inputId_configuration_flowgger_GET(String serviceName, String inputId) throws IOException { String qPath = "/dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger"; StringBuilder sb = path(qPath, serviceName, inputId); String resp = exec(qPath, "GET", sb...
[ "public", "OvhFlowggerConfiguration", "serviceName_input_inputId_configuration_flowgger_GET", "(", "String", "serviceName", ",", "String", "inputId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger\"", "...
Returns the flowgger configuration REST: GET /dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger @param serviceName [required] Service name @param inputId [required] Input ID
[ "Returns", "the", "flowgger", "configuration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L293-L298
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/reflection/Reflection.java
Reflection.isAnnotationPresent
public static boolean isAnnotationPresent(final Method method, final Class<? extends Annotation> annotationType) { """ Utility method kept for backwards compatibility. Annotation checking used to be problematic on GWT. @param method might contain the specified annotation. Can be null. @param annotationType cla...
java
public static boolean isAnnotationPresent(final Method method, final Class<? extends Annotation> annotationType) { return method != null && method.isAnnotationPresent(annotationType); }
[ "public", "static", "boolean", "isAnnotationPresent", "(", "final", "Method", "method", ",", "final", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", ")", "{", "return", "method", "!=", "null", "&&", "method", ".", "isAnnotationPresent", "(", ...
Utility method kept for backwards compatibility. Annotation checking used to be problematic on GWT. @param method might contain the specified annotation. Can be null. @param annotationType class of the annotation that the method is checked against. @return true if method is annotated with the specified annotation.
[ "Utility", "method", "kept", "for", "backwards", "compatibility", ".", "Annotation", "checking", "used", "to", "be", "problematic", "on", "GWT", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/reflection/Reflection.java#L118-L120
playn/playn
core/src/playn/core/Scale.java
Scale.getScaledResources
public List<ScaledResource> getScaledResources(String path) { """ Returns an ordered series of scaled resources to try when loading an asset. The native resolution will be tried first, then that will be rounded up to the nearest whole integer and stepped down through all whole integers to {@code 1}. If the nativ...
java
public List<ScaledResource> getScaledResources(String path) { List<ScaledResource> rsrcs = new ArrayList<ScaledResource>(); rsrcs.add(new ScaledResource(this, computePath(path, factor))); for (float rscale = MathUtil.iceil(factor); rscale > 1; rscale -= 1) { if (rscale != factor) rsrcs.add( ne...
[ "public", "List", "<", "ScaledResource", ">", "getScaledResources", "(", "String", "path", ")", "{", "List", "<", "ScaledResource", ">", "rsrcs", "=", "new", "ArrayList", "<", "ScaledResource", ">", "(", ")", ";", "rsrcs", ".", "add", "(", "new", "ScaledRe...
Returns an ordered series of scaled resources to try when loading an asset. The native resolution will be tried first, then that will be rounded up to the nearest whole integer and stepped down through all whole integers to {@code 1}. If the native scale factor is {@code 2}, this will yield {@code 2, 1}. If the native ...
[ "Returns", "an", "ordered", "series", "of", "scaled", "resources", "to", "try", "when", "loading", "an", "asset", ".", "The", "native", "resolution", "will", "be", "tried", "first", "then", "that", "will", "be", "rounded", "up", "to", "the", "nearest", "wh...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Scale.java#L116-L125
buschmais/jqa-java-plugin
src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/ClassVisitor.java
ClassVisitor.getVisibility
private VisibilityModifier getVisibility(int flags) { """ Returns the AccessModifier for the flag pattern. @param flags the flags @return the AccessModifier """ if (hasFlag(flags, Opcodes.ACC_PRIVATE)) { return VisibilityModifier.PRIVATE; } else if (hasFlag(flags, Opcodes.ACC_P...
java
private VisibilityModifier getVisibility(int flags) { if (hasFlag(flags, Opcodes.ACC_PRIVATE)) { return VisibilityModifier.PRIVATE; } else if (hasFlag(flags, Opcodes.ACC_PROTECTED)) { return VisibilityModifier.PROTECTED; } else if (hasFlag(flags, Opcodes.ACC_PUBLIC)) { ...
[ "private", "VisibilityModifier", "getVisibility", "(", "int", "flags", ")", "{", "if", "(", "hasFlag", "(", "flags", ",", "Opcodes", ".", "ACC_PRIVATE", ")", ")", "{", "return", "VisibilityModifier", ".", "PRIVATE", ";", "}", "else", "if", "(", "hasFlag", ...
Returns the AccessModifier for the flag pattern. @param flags the flags @return the AccessModifier
[ "Returns", "the", "AccessModifier", "for", "the", "flag", "pattern", "." ]
train
https://github.com/buschmais/jqa-java-plugin/blob/4c050943e9c28cf1c4a08aa962d5b5bf03c4fe54/src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/ClassVisitor.java#L243-L253
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getColumn
public DColumn getColumn(String storeName, String rowKey, String colName) { """ Get a single column for a single row in the given store. If the given row or column is not found, null is returned. Otherwise, a {@link DColumn} containing the column name and value is returned. @param storeName Name of store to q...
java
public DColumn getColumn(String storeName, String rowKey, String colName) { List<String> colNames = new ArrayList<String>(1); colNames.add(colName); List<DColumn> columns = getColumns(storeName, rowKey, colNames); if(columns.size() == 0) return null; else return columns.get(...
[ "public", "DColumn", "getColumn", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "colName", ")", "{", "List", "<", "String", ">", "colNames", "=", "new", "ArrayList", "<", "String", ">", "(", "1", ")", ";", "colNames", ".", "add", ...
Get a single column for a single row in the given store. If the given row or column is not found, null is returned. Otherwise, a {@link DColumn} containing the column name and value is returned. @param storeName Name of store to query. @param rowKey Key of row to read. @param colName Name of column to fetch. @ret...
[ "Get", "a", "single", "column", "for", "a", "single", "row", "in", "the", "given", "store", ".", "If", "the", "given", "row", "or", "column", "is", "not", "found", "null", "is", "returned", ".", "Otherwise", "a", "{", "@link", "DColumn", "}", "containi...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L274-L280
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.createPool
public void createPool(String poolId, String virtualMachineSize, VirtualMachineConfiguration virtualMachineConfiguration, int targetDedicatedNodes) throws BatchErrorException, IOException { """ Adds a pool to the Batch account. @param poolId The ID of the pool. @param vi...
java
public void createPool(String poolId, String virtualMachineSize, VirtualMachineConfiguration virtualMachineConfiguration, int targetDedicatedNodes) throws BatchErrorException, IOException { createPool(poolId, virtualMachineSize, virtualMachineConfiguration, targetDedicated...
[ "public", "void", "createPool", "(", "String", "poolId", ",", "String", "virtualMachineSize", ",", "VirtualMachineConfiguration", "virtualMachineConfiguration", ",", "int", "targetDedicatedNodes", ")", "throws", "BatchErrorException", ",", "IOException", "{", "createPool", ...
Adds a pool to the Batch account. @param poolId The ID of the pool. @param virtualMachineSize The size of virtual machines in the pool. See <a href= "https://azure.microsoft.com/documentation/articles/virtual-machines-size-specs/">https://azure.microsoft.com/documentation/articles/virtual-machines-size-specs/</a> for ...
[ "Adds", "a", "pool", "to", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L381-L385
infinispan/infinispan
core/src/main/java/org/infinispan/configuration/cache/IndexingConfigurationBuilder.java
IndexingConfigurationBuilder.setProperty
public IndexingConfigurationBuilder setProperty(String key, Object value) { """ Defines a single value. Can be used multiple times to define all needed property values, but the full set is overridden by {@link #withProperties(Properties)}. <p> These properties are passed directly to the embedded Hibernate Searc...
java
public IndexingConfigurationBuilder setProperty(String key, Object value) { TypedProperties properties = attributes.attribute(PROPERTIES).get(); properties.put(key, value); attributes.attribute(PROPERTIES).set(properties); return this; }
[ "public", "IndexingConfigurationBuilder", "setProperty", "(", "String", "key", ",", "Object", "value", ")", "{", "TypedProperties", "properties", "=", "attributes", ".", "attribute", "(", "PROPERTIES", ")", ".", "get", "(", ")", ";", "properties", ".", "put", ...
Defines a single value. Can be used multiple times to define all needed property values, but the full set is overridden by {@link #withProperties(Properties)}. <p> These properties are passed directly to the embedded Hibernate Search engine, so for the complete and up to date documentation about available properties re...
[ "Defines", "a", "single", "value", ".", "Can", "be", "used", "multiple", "times", "to", "define", "all", "needed", "property", "values", "but", "the", "full", "set", "is", "overridden", "by", "{", "@link", "#withProperties", "(", "Properties", ")", "}", "....
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/IndexingConfigurationBuilder.java#L152-L157
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.readShort
public static final short readShort(byte[] array, int offset) { """ Read value from byte array @param array @param offset @return @see java.nio.ByteBuffer#getShort(short) """ if (array.length < offset + 2) { throw new IllegalArgumentException("no room in array"); } ...
java
public static final short readShort(byte[] array, int offset) { if (array.length < offset + 2) { throw new IllegalArgumentException("no room in array"); } return (short) (((array[offset]<<8) & 0xff00) + (array[offset + 1] & 0xff ))...
[ "public", "static", "final", "short", "readShort", "(", "byte", "[", "]", "array", ",", "int", "offset", ")", "{", "if", "(", "array", ".", "length", "<", "offset", "+", "2", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"no room in array\""...
Read value from byte array @param array @param offset @return @see java.nio.ByteBuffer#getShort(short)
[ "Read", "value", "from", "byte", "array" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L425-L434
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ReadablePeriodConverter.java
ReadablePeriodConverter.setInto
public void setInto(ReadWritablePeriod duration, Object object, Chronology chrono) { """ Extracts duration values from an object of this converter's type, and sets them into the given ReadWritablePeriod. @param duration duration to get modified @param object the object to convert, must not be null @param ch...
java
public void setInto(ReadWritablePeriod duration, Object object, Chronology chrono) { duration.setPeriod((ReadablePeriod) object); }
[ "public", "void", "setInto", "(", "ReadWritablePeriod", "duration", ",", "Object", "object", ",", "Chronology", "chrono", ")", "{", "duration", ".", "setPeriod", "(", "(", "ReadablePeriod", ")", "object", ")", ";", "}" ]
Extracts duration values from an object of this converter's type, and sets them into the given ReadWritablePeriod. @param duration duration to get modified @param object the object to convert, must not be null @param chrono the chronology to use @throws NullPointerException if the duration or object is null @throws ...
[ "Extracts", "duration", "values", "from", "an", "object", "of", "this", "converter", "s", "type", "and", "sets", "them", "into", "the", "given", "ReadWritablePeriod", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ReadablePeriodConverter.java#L57-L59
alkacon/opencms-core
src/org/opencms/loader/CmsDefaultTemplateContextProvider.java
CmsDefaultTemplateContextProvider.initMap
private Map<String, CmsTemplateContext> initMap() throws Exception { """ Loads the context map from the VFS.<p> @return the context map @throws Exception if something goes wrong """ Map<String, CmsTemplateContext> result = new LinkedHashMap<String, CmsTemplateContext>(); String path = g...
java
private Map<String, CmsTemplateContext> initMap() throws Exception { Map<String, CmsTemplateContext> result = new LinkedHashMap<String, CmsTemplateContext>(); String path = getConfigurationPropertyPath(); CmsResource resource = m_cms.readResource(path); CmsFile file = m_cms.readFil...
[ "private", "Map", "<", "String", ",", "CmsTemplateContext", ">", "initMap", "(", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "CmsTemplateContext", ">", "result", "=", "new", "LinkedHashMap", "<", "String", ",", "CmsTemplateContext", ">", "(", ...
Loads the context map from the VFS.<p> @return the context map @throws Exception if something goes wrong
[ "Loads", "the", "context", "map", "from", "the", "VFS", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsDefaultTemplateContextProvider.java#L220-L268
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/watermark/DateWatermark.java
DateWatermark.getInterval
private static int getInterval(long diffInMilliSecs, long hourInterval, int maxIntervals) { """ recalculate interval(in hours) if total number of partitions greater than maximum number of allowed partitions @param diffInMilliSecs difference in range @param hourInterval hour interval (ex: 24 hours) @param maxI...
java
private static int getInterval(long diffInMilliSecs, long hourInterval, int maxIntervals) { long dayInterval = TimeUnit.HOURS.toDays(hourInterval); int totalHours = DoubleMath.roundToInt((double) diffInMilliSecs / (60 * 60 * 1000), RoundingMode.CEILING); int totalIntervals = DoubleMath.roundToInt((double) t...
[ "private", "static", "int", "getInterval", "(", "long", "diffInMilliSecs", ",", "long", "hourInterval", ",", "int", "maxIntervals", ")", "{", "long", "dayInterval", "=", "TimeUnit", ".", "HOURS", ".", "toDays", "(", "hourInterval", ")", ";", "int", "totalHours...
recalculate interval(in hours) if total number of partitions greater than maximum number of allowed partitions @param diffInMilliSecs difference in range @param hourInterval hour interval (ex: 24 hours) @param maxIntervals max number of allowed partitions @return calculated interval in days
[ "recalculate", "interval", "(", "in", "hours", ")", "if", "total", "number", "of", "partitions", "greater", "than", "maximum", "number", "of", "allowed", "partitions" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/watermark/DateWatermark.java#L124-L133
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/Tensor.java
Tensor.unravelIndex
public static int[] unravelIndex(int configIx, int... dims) { """ Returns an integer array of the same length as dims that matches the configIx'th configuration if enumerated configurations in order such that the leftmost dimension changes slowest """ int numConfigs = IntArrays.prod(dims); ass...
java
public static int[] unravelIndex(int configIx, int... dims) { int numConfigs = IntArrays.prod(dims); assert configIx < numConfigs; int[] strides = getStrides(dims); return unravelIndexFromStrides(configIx, strides); }
[ "public", "static", "int", "[", "]", "unravelIndex", "(", "int", "configIx", ",", "int", "...", "dims", ")", "{", "int", "numConfigs", "=", "IntArrays", ".", "prod", "(", "dims", ")", ";", "assert", "configIx", "<", "numConfigs", ";", "int", "[", "]", ...
Returns an integer array of the same length as dims that matches the configIx'th configuration if enumerated configurations in order such that the leftmost dimension changes slowest
[ "Returns", "an", "integer", "array", "of", "the", "same", "length", "as", "dims", "that", "matches", "the", "configIx", "th", "configuration", "if", "enumerated", "configurations", "in", "order", "such", "that", "the", "leftmost", "dimension", "changes", "slowes...
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/Tensor.java#L54-L59
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/validation/SheetErrorFormatter.java
SheetErrorFormatter.getMessage
private String getMessage(final String[] codes, final Optional<String> defaultMessage) { """ 指定した引数の候補からメッセージを取得する。 @param codes メッセージコードの候補 @param defaultMessage メッセージコードが見つからない場合のメッセージ @return メッセージ @throws RuntimeException メッセージコード 'codes' で指定したメッセージキーが見つからない場合。 """ for(String code : codes) { ...
java
private String getMessage(final String[] codes, final Optional<String> defaultMessage) { for(String code : codes) { try { final Optional<String> message = messageResolver.getMessage(code); if(message.isPresent()) { return message.get(); ...
[ "private", "String", "getMessage", "(", "final", "String", "[", "]", "codes", ",", "final", "Optional", "<", "String", ">", "defaultMessage", ")", "{", "for", "(", "String", "code", ":", "codes", ")", "{", "try", "{", "final", "Optional", "<", "String", ...
指定した引数の候補からメッセージを取得する。 @param codes メッセージコードの候補 @param defaultMessage メッセージコードが見つからない場合のメッセージ @return メッセージ @throws RuntimeException メッセージコード 'codes' で指定したメッセージキーが見つからない場合。
[ "指定した引数の候補からメッセージを取得する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/validation/SheetErrorFormatter.java#L146-L164
jimmoores/quandl4j
core/src/main/java/com/jimmoores/quandl/util/PrettyPrinter.java
PrettyPrinter.toPrettyPrintedString
public static String toPrettyPrintedString(final Map<String, HeaderDefinition> multiHeaderDefinitionResult) { """ Pretty print a map of String to HeaderDefinition (see QuandlSession.getMultipleHeaderDefinition) Throws a QuandlRuntimeException if it can't render the JSONObject to a String. @param multiHeaderDef...
java
public static String toPrettyPrintedString(final Map<String, HeaderDefinition> multiHeaderDefinitionResult) { ArgumentChecker.notNull(multiHeaderDefinitionResult, "multiHeaderDefinitionResult"); StringBuilder sb = new StringBuilder(); int max = 0; for (String each : multiHeaderDefinitionResult.keySet())...
[ "public", "static", "String", "toPrettyPrintedString", "(", "final", "Map", "<", "String", ",", "HeaderDefinition", ">", "multiHeaderDefinitionResult", ")", "{", "ArgumentChecker", ".", "notNull", "(", "multiHeaderDefinitionResult", ",", "\"multiHeaderDefinitionResult\"", ...
Pretty print a map of String to HeaderDefinition (see QuandlSession.getMultipleHeaderDefinition) Throws a QuandlRuntimeException if it can't render the JSONObject to a String. @param multiHeaderDefinitionResult the pre-parsed JSON object to pretty-print, not null @return a String representation of the object, probably...
[ "Pretty", "print", "a", "map", "of", "String", "to", "HeaderDefinition", "(", "see", "QuandlSession", ".", "getMultipleHeaderDefinition", ")", "Throws", "a", "QuandlRuntimeException", "if", "it", "can", "t", "render", "the", "JSONObject", "to", "a", "String", "....
train
https://github.com/jimmoores/quandl4j/blob/5d67ae60279d889da93ae7aa3bf6b7d536f88822/core/src/main/java/com/jimmoores/quandl/util/PrettyPrinter.java#L77-L100
EdwardRaff/JSAT
JSAT/src/jsat/linear/Matrix.java
Matrix.getRowView
public Vec getRowView(final int r) { """ Obtains a vector that is backed by <i>this</i>, at very little memory cost. Mutations to this vector will alter the values stored in the matrix, and vice versa. @param r the row to obtain a view of @return a vector backed by the specified row of the matrix """ ...
java
public Vec getRowView(final int r) { final Matrix M = this; return new Vec() { private static final long serialVersionUID = 8484494698777822563L; @Override public int length() { return M.cols(); } @Over...
[ "public", "Vec", "getRowView", "(", "final", "int", "r", ")", "{", "final", "Matrix", "M", "=", "this", ";", "return", "new", "Vec", "(", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=", "8484494698777822563L", ";", "@", "Override",...
Obtains a vector that is backed by <i>this</i>, at very little memory cost. Mutations to this vector will alter the values stored in the matrix, and vice versa. @param r the row to obtain a view of @return a vector backed by the specified row of the matrix
[ "Obtains", "a", "vector", "that", "is", "backed", "by", "<i", ">", "this<", "/", "i", ">", "at", "very", "little", "memory", "cost", ".", "Mutations", "to", "this", "vector", "will", "alter", "the", "values", "stored", "in", "the", "matrix", "and", "vi...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/Matrix.java#L700-L746
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java
AutoscalerClient.insertAutoscaler
@BetaApi public final Operation insertAutoscaler(String zone, Autoscaler autoscalerResource) { """ Creates an autoscaler in the specified project using the data included in the request. <p>Sample code: <pre><code> try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) { ProjectZoneName zone ...
java
@BetaApi public final Operation insertAutoscaler(String zone, Autoscaler autoscalerResource) { InsertAutoscalerHttpRequest request = InsertAutoscalerHttpRequest.newBuilder() .setZone(zone) .setAutoscalerResource(autoscalerResource) .build(); return insertAutoscaler...
[ "@", "BetaApi", "public", "final", "Operation", "insertAutoscaler", "(", "String", "zone", ",", "Autoscaler", "autoscalerResource", ")", "{", "InsertAutoscalerHttpRequest", "request", "=", "InsertAutoscalerHttpRequest", ".", "newBuilder", "(", ")", ".", "setZone", "("...
Creates an autoscaler in the specified project using the data included in the request. <p>Sample code: <pre><code> try (AutoscalerClient autoscalerClient = AutoscalerClient.create()) { ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); Autoscaler autoscalerResource = Autoscaler.newBuilder().build(); Op...
[ "Creates", "an", "autoscaler", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalerClient.java#L547-L556
beanshell/beanshell
src/main/java/bsh/Reflect.java
Reflect.staticMethodImport
static BshMethod staticMethodImport(Class<?> baseClass, String methodName) { """ Find a static method member of baseClass, for the given name. @param baseClass class to query @param methodName method name to find @return a BshMethod wrapped Method. """ Invocable method = BshClassManager.memberCache....
java
static BshMethod staticMethodImport(Class<?> baseClass, String methodName) { Invocable method = BshClassManager.memberCache.get(baseClass) .findStaticMethod(methodName); if (null != method) return new BshMethod(method, null); return null; }
[ "static", "BshMethod", "staticMethodImport", "(", "Class", "<", "?", ">", "baseClass", ",", "String", "methodName", ")", "{", "Invocable", "method", "=", "BshClassManager", ".", "memberCache", ".", "get", "(", "baseClass", ")", ".", "findStaticMethod", "(", "m...
Find a static method member of baseClass, for the given name. @param baseClass class to query @param methodName method name to find @return a BshMethod wrapped Method.
[ "Find", "a", "static", "method", "member", "of", "baseClass", "for", "the", "given", "name", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Reflect.java#L365-L371
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java
PermissionUtil.checkPermission
public static boolean checkPermission(Member member, Permission... permissions) { """ Checks to see if the {@link net.dv8tion.jda.core.entities.Member Member} has the specified {@link net.dv8tion.jda.core.Permission Permissions} in the specified {@link net.dv8tion.jda.core.entities.Guild Guild}. This method prope...
java
public static boolean checkPermission(Member member, Permission... permissions) { Checks.notNull(member, "Member"); Checks.notNull(permissions, "Permissions"); long effectivePerms = getEffectivePermission(member); return isApplied(effectivePerms, Permission.ADMINISTRATOR.getRawValue...
[ "public", "static", "boolean", "checkPermission", "(", "Member", "member", ",", "Permission", "...", "permissions", ")", "{", "Checks", ".", "notNull", "(", "member", ",", "\"Member\"", ")", ";", "Checks", ".", "notNull", "(", "permissions", ",", "\"Permission...
Checks to see if the {@link net.dv8tion.jda.core.entities.Member Member} has the specified {@link net.dv8tion.jda.core.Permission Permissions} in the specified {@link net.dv8tion.jda.core.entities.Guild Guild}. This method properly deals with Owner status. <p><b>Note:</b> this is based on effective permissions, not li...
[ "Checks", "to", "see", "if", "the", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "entities", ".", "Member", "Member", "}", "has", "the", "specified", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "Permission...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java#L259-L267
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesFactory.java
HystrixPropertiesFactory.getThreadPoolProperties
public static HystrixThreadPoolProperties getThreadPoolProperties(HystrixThreadPoolKey key, HystrixThreadPoolProperties.Setter builder) { """ Get an instance of {@link HystrixThreadPoolProperties} with the given factory {@link HystrixPropertiesStrategy} implementation for each {@link HystrixThreadPool} instance. ...
java
public static HystrixThreadPoolProperties getThreadPoolProperties(HystrixThreadPoolKey key, HystrixThreadPoolProperties.Setter builder) { HystrixPropertiesStrategy hystrixPropertiesStrategy = HystrixPlugins.getInstance().getPropertiesStrategy(); String cacheKey = hystrixPropertiesStrategy.getThreadPoolP...
[ "public", "static", "HystrixThreadPoolProperties", "getThreadPoolProperties", "(", "HystrixThreadPoolKey", "key", ",", "HystrixThreadPoolProperties", ".", "Setter", "builder", ")", "{", "HystrixPropertiesStrategy", "hystrixPropertiesStrategy", "=", "HystrixPlugins", ".", "getIn...
Get an instance of {@link HystrixThreadPoolProperties} with the given factory {@link HystrixPropertiesStrategy} implementation for each {@link HystrixThreadPool} instance. @param key Pass-thru to {@link HystrixPropertiesStrategy#getThreadPoolProperties} implementation. @param builder Pass-thru to {@link HystrixPropert...
[ "Get", "an", "instance", "of", "{", "@link", "HystrixThreadPoolProperties", "}", "with", "the", "given", "factory", "{", "@link", "HystrixPropertiesStrategy", "}", "implementation", "for", "each", "{", "@link", "HystrixThreadPool", "}", "instance", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/properties/HystrixPropertiesFactory.java#L100-L125
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.stateIsTrue
@Throws(IllegalStateOfArgumentException.class) public static void stateIsTrue(final boolean expression, @Nonnull final String descriptionTemplate, final Object... descriptionTemplateArgs) { """ Ensures that a given state is {@code true} @param expression an expression that must be {@code true} to indicate ...
java
@Throws(IllegalStateOfArgumentException.class) public static void stateIsTrue(final boolean expression, @Nonnull final String descriptionTemplate, final Object... descriptionTemplateArgs) { if (!expression) { throw new IllegalStateOfArgumentException(descriptionTemplate, descriptionTemplateArgs); } }
[ "@", "Throws", "(", "IllegalStateOfArgumentException", ".", "class", ")", "public", "static", "void", "stateIsTrue", "(", "final", "boolean", "expression", ",", "@", "Nonnull", "final", "String", "descriptionTemplate", ",", "final", "Object", "...", "descriptionTemp...
Ensures that a given state is {@code true} @param expression an expression that must be {@code true} to indicate a valid state @param descriptionTemplate format string template that explains why the state is invalid @param descriptionTemplateArgs format string template arguments to explain why the state is invalid @th...
[ "Ensures", "that", "a", "given", "state", "is", "{", "@code", "true", "}" ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3327-L3333
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/BasePrepareStatement.java
BasePrepareStatement.setTimestamp
public void setTimestamp(final int parameterIndex, final Timestamp timestamp, final Calendar cal) throws SQLException { """ Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, using the given <code>Calendar</code> object. The driver uses the <code>Calendar</code> object to co...
java
public void setTimestamp(final int parameterIndex, final Timestamp timestamp, final Calendar cal) throws SQLException { if (timestamp == null) { setNull(parameterIndex, ColumnType.DATETIME); return; } TimeZone tz = cal != null ? cal.getTimeZone() : protocol.getTimeZone(); setParameter(...
[ "public", "void", "setTimestamp", "(", "final", "int", "parameterIndex", ",", "final", "Timestamp", "timestamp", ",", "final", "Calendar", "cal", ")", "throws", "SQLException", "{", "if", "(", "timestamp", "==", "null", ")", "{", "setNull", "(", "parameterInde...
Sets the designated parameter to the given <code>java.sql.Timestamp</code> value, using the given <code>Calendar</code> object. The driver uses the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value, which the driver then sends to the database. With a <code>Calendar</code> object, the drive...
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "<code", ">", "java", ".", "sql", ".", "Timestamp<", "/", "code", ">", "value", "using", "the", "given", "<code", ">", "Calendar<", "/", "code", ">", "object", ".", "The", "driver", "uses", ...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/BasePrepareStatement.java#L593-L601
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java
CPFriendlyURLEntryPersistenceImpl.removeByC_C
@Override public void removeByC_C(long classNameId, long classPK) { """ Removes all the cp friendly url entries where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk """ for (CPFriendlyURLEntry cpFriendlyURLEntry : findByC_C(cla...
java
@Override public void removeByC_C(long classNameId, long classPK) { for (CPFriendlyURLEntry cpFriendlyURLEntry : findByC_C(classNameId, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpFriendlyURLEntry); } }
[ "@", "Override", "public", "void", "removeByC_C", "(", "long", "classNameId", ",", "long", "classPK", ")", "{", "for", "(", "CPFriendlyURLEntry", "cpFriendlyURLEntry", ":", "findByC_C", "(", "classNameId", ",", "classPK", ",", "QueryUtil", ".", "ALL_POS", ",", ...
Removes all the cp friendly url entries where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk
[ "Removes", "all", "the", "cp", "friendly", "url", "entries", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L1975-L1981
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java
JsHdrsImpl.getMessageHandle
public SIMessageHandle getMessageHandle() { """ Get the message handle which uniquely identifies this message. @return An SIMessageHandle which identifies this message. """ // If the transient is not set, build the handle from the values in the message and cache it. if (cachedMessageHandle =...
java
public SIMessageHandle getMessageHandle() { // If the transient is not set, build the handle from the values in the message and cache it. if (cachedMessageHandle == null) { byte[] b = (byte[]) jmo.getField(JsHdrAccess.SYSTEMMESSAGESOURCEUUID); if (b != null) { cac...
[ "public", "SIMessageHandle", "getMessageHandle", "(", ")", "{", "// If the transient is not set, build the handle from the values in the message and cache it.", "if", "(", "cachedMessageHandle", "==", "null", ")", "{", "byte", "[", "]", "b", "=", "(", "byte", "[", "]", ...
Get the message handle which uniquely identifies this message. @return An SIMessageHandle which identifies this message.
[ "Get", "the", "message", "handle", "which", "uniquely", "identifies", "this", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java#L658-L671
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/GeometryService.java
GeometryService.isValid
@Deprecated public static boolean isValid(Geometry geometry, int[] index) { """ Validates a geometry, focusing on changes at a specific sub-level of the geometry. The sublevel is indicated by passing an array of indexes. The array should uniquely determine a coordinate or subgeometry (linear ring) by recursing ...
java
@Deprecated public static boolean isValid(Geometry geometry, int[] index) { return isValid(geometry, toIndex(geometry.getGeometryType(), index)); }
[ "@", "Deprecated", "public", "static", "boolean", "isValid", "(", "Geometry", "geometry", ",", "int", "[", "]", "index", ")", "{", "return", "isValid", "(", "geometry", ",", "toIndex", "(", "geometry", ".", "getGeometryType", "(", ")", ",", "index", ")", ...
Validates a geometry, focusing on changes at a specific sub-level of the geometry. The sublevel is indicated by passing an array of indexes. The array should uniquely determine a coordinate or subgeometry (linear ring) by recursing through the geometry tree. The only checks are on intersection and containment, we don't...
[ "Validates", "a", "geometry", "focusing", "on", "changes", "at", "a", "specific", "sub", "-", "level", "of", "the", "geometry", ".", "The", "sublevel", "is", "indicated", "by", "passing", "an", "array", "of", "indexes", ".", "The", "array", "should", "uniq...
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/GeometryService.java#L261-L264
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.restoreStorageAccount
public StorageBundle restoreStorageAccount(String vaultBaseUrl, byte[] storageBundleBackup) { """ Restores a backed up storage account to a vault. Restores a backed up storage account to a vault. This operation requires the storage/restore permission. @param vaultBaseUrl The vault name, for example https://myv...
java
public StorageBundle restoreStorageAccount(String vaultBaseUrl, byte[] storageBundleBackup) { return restoreStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageBundleBackup).toBlocking().single().body(); }
[ "public", "StorageBundle", "restoreStorageAccount", "(", "String", "vaultBaseUrl", ",", "byte", "[", "]", "storageBundleBackup", ")", "{", "return", "restoreStorageAccountWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "storageBundleBackup", ")", ".", "toBlocking", "...
Restores a backed up storage account to a vault. Restores a backed up storage account to a vault. This operation requires the storage/restore permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageBundleBackup The backup blob associated with a storage account. @throw...
[ "Restores", "a", "backed", "up", "storage", "account", "to", "a", "vault", ".", "Restores", "a", "backed", "up", "storage", "account", "to", "a", "vault", ".", "This", "operation", "requires", "the", "storage", "/", "restore", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L9608-L9610
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.traceAsync
public CompletableFuture<Object> traceAsync(final Consumer<HttpConfig> configuration) { """ Executes an asynchronous TRACE request on the configured URI (asynchronous alias to `trace(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specif...
java
public CompletableFuture<Object> traceAsync(final Consumer<HttpConfig> configuration) { return CompletableFuture.supplyAsync(() -> trace(configuration), getExecutor()); }
[ "public", "CompletableFuture", "<", "Object", ">", "traceAsync", "(", "final", "Consumer", "<", "HttpConfig", ">", "configuration", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "(", ")", "->", "trace", "(", "configuration", ")", ",", "getE...
Executes an asynchronous TRACE request on the configured URI (asynchronous alias to `trace(Consumer)`), with additional configuration provided by the configuration function. This method is generally used for Java-specific configuration. [source,java] ---- HttpBuilder http = HttpBuilder.configure(config -> { config.ge...
[ "Executes", "an", "asynchronous", "TRACE", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "trace", "(", "Consumer", ")", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", "function", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L2165-L2167
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/CalculateDateExtensions.java
CalculateDateExtensions.addSeconds
public static Date addSeconds(final Date date, final int addSeconds) { """ Adds seconds to the given Date object and returns it. Note: you can add negative values too for get date in past. @param date The Date object to add the seconds. @param addSeconds The seconds to add. @return The resulted Date object...
java
public static Date addSeconds(final Date date, final int addSeconds) { final Calendar dateOnCalendar = Calendar.getInstance(); dateOnCalendar.setTime(date); dateOnCalendar.add(Calendar.SECOND, addSeconds); return dateOnCalendar.getTime(); }
[ "public", "static", "Date", "addSeconds", "(", "final", "Date", "date", ",", "final", "int", "addSeconds", ")", "{", "final", "Calendar", "dateOnCalendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "dateOnCalendar", ".", "setTime", "(", "date", ")"...
Adds seconds to the given Date object and returns it. Note: you can add negative values too for get date in past. @param date The Date object to add the seconds. @param addSeconds The seconds to add. @return The resulted Date object.
[ "Adds", "seconds", "to", "the", "given", "Date", "object", "and", "returns", "it", ".", "Note", ":", "you", "can", "add", "negative", "values", "too", "for", "get", "date", "in", "past", "." ]
train
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/CalculateDateExtensions.java#L146-L152
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java
SyncGroupsInner.beginCreateOrUpdate
public SyncGroupInner beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { """ Creates or updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from t...
java
public SyncGroupInner beginCreateOrUpdate(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).toBlocking().single().body(); ...
[ "public", "SyncGroupInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ",", "SyncGroupInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceRespons...
Creates or updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hosted. @pa...
[ "Creates", "or", "updates", "a", "sync", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L1307-L1309
otto-de/edison-hal
src/main/java/de/otto/edison/hal/traverson/Traverson.java
Traverson.startWith
public Traverson startWith(final String uriTemplate, final Map<String, Object> vars) { """ Start traversal at the application/hal+json resource idenfied by {@code uri}. @param uriTemplate the {@code URI} of the initial HAL resource. @param vars uri-template variables used to build links. @return Traverson ini...
java
public Traverson startWith(final String uriTemplate, final Map<String, Object> vars) { return startWith(fromTemplate(uriTemplate).expand(vars)); }
[ "public", "Traverson", "startWith", "(", "final", "String", "uriTemplate", ",", "final", "Map", "<", "String", ",", "Object", ">", "vars", ")", "{", "return", "startWith", "(", "fromTemplate", "(", "uriTemplate", ")", ".", "expand", "(", "vars", ")", ")", ...
Start traversal at the application/hal+json resource idenfied by {@code uri}. @param uriTemplate the {@code URI} of the initial HAL resource. @param vars uri-template variables used to build links. @return Traverson initialized with the {@link HalRepresentation} identified by {@code uri}.
[ "Start", "traversal", "at", "the", "application", "/", "hal", "+", "json", "resource", "idenfied", "by", "{", "@code", "uri", "}", "." ]
train
https://github.com/otto-de/edison-hal/blob/1582d2b49d1f0d9103e03bf742f18afa9d166992/src/main/java/de/otto/edison/hal/traverson/Traverson.java#L272-L274
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java
StoreCallback.sessionExpiryTimeSet
public void sessionExpiryTimeSet(ISession session, long old, long newone) { """ Method sessionExpiryTimeSet <p> @param session @param old @param newone @see com.ibm.wsspi.session.IStoreCallback#sessionExpiryTimeSet(com.ibm.wsspi.session.ISession, long, long) """ _sessionStateEventDispatcher.sess...
java
public void sessionExpiryTimeSet(ISession session, long old, long newone) { _sessionStateEventDispatcher.sessionExpiryTimeSet(session, old, newone); }
[ "public", "void", "sessionExpiryTimeSet", "(", "ISession", "session", ",", "long", "old", ",", "long", "newone", ")", "{", "_sessionStateEventDispatcher", ".", "sessionExpiryTimeSet", "(", "session", ",", "old", ",", "newone", ")", ";", "}" ]
Method sessionExpiryTimeSet <p> @param session @param old @param newone @see com.ibm.wsspi.session.IStoreCallback#sessionExpiryTimeSet(com.ibm.wsspi.session.ISession, long, long)
[ "Method", "sessionExpiryTimeSet", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/StoreCallback.java#L252-L255
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/ClassPathUtils.java
ClassPathUtils.toFullyQualifiedName
@GwtIncompatible("incompatible method") public static String toFullyQualifiedName(final Class<?> context, final String resourceName) { """ Returns the fully qualified name for the resource with name {@code resourceName} relative to the given context. <p>Note that this method does not check whether the resou...
java
@GwtIncompatible("incompatible method") public static String toFullyQualifiedName(final Class<?> context, final String resourceName) { Validate.notNull(context, "Parameter '%s' must not be null!", "context" ); Validate.notNull(resourceName, "Parameter '%s' must not be null!", "resourceName"); ...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "String", "toFullyQualifiedName", "(", "final", "Class", "<", "?", ">", "context", ",", "final", "String", "resourceName", ")", "{", "Validate", ".", "notNull", "(", "context", ",",...
Returns the fully qualified name for the resource with name {@code resourceName} relative to the given context. <p>Note that this method does not check whether the resource actually exists. It only constructs the name. Null inputs are not allowed.</p> <pre> ClassPathUtils.toFullyQualifiedName(StringUtils.class, "Stri...
[ "Returns", "the", "fully", "qualified", "name", "for", "the", "resource", "with", "name", "{", "@code", "resourceName", "}", "relative", "to", "the", "given", "context", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/ClassPathUtils.java#L59-L64
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java
TmdbSearch.searchMovie
public ResultList<MovieInfo> searchMovie(String query, Integer page, String language, Boolean includeAdult, Integer searchYear, Integer primaryReleaseYear, SearchType searchType) throws MovieDbException { """ Search Movies This is a good start...
java
public ResultList<MovieInfo> searchMovie(String query, Integer page, String language, Boolean includeAdult, Integer searchYear, Integer primaryReleaseYear, SearchType searchType) throws MovieDbException { TmdbParameters parameters = new Tmd...
[ "public", "ResultList", "<", "MovieInfo", ">", "searchMovie", "(", "String", "query", ",", "Integer", "page", ",", "String", "language", ",", "Boolean", "includeAdult", ",", "Integer", "searchYear", ",", "Integer", "primaryReleaseYear", ",", "SearchType", "searchT...
Search Movies This is a good starting point to start finding movies on TMDb. @param query @param searchYear Limit the search to the provided year. Zero (0) will get all years @param language The language to include. Can be blank/null. @param includeAdult true or false to include adult titles in the search @param page ...
[ "Search", "Movies", "This", "is", "a", "good", "starting", "point", "to", "start", "finding", "movies", "on", "TMDb", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java#L136-L157
ansell/csvsum
src/main/java/com/github/ansell/csv/sum/JSONSummariser.java
JSONSummariser.parseForSummarise
private static List<String> parseForSummarise(final Reader input, final ObjectMapper inputMapper, final JDefaultDict<String, AtomicInteger> emptyCounts, final JDefaultDict<String, AtomicInteger> nonEmptyCounts, final JDefaultDict<String, AtomicBoolean> possibleIntegerFields, final JDefaultDict<String, Atomi...
java
private static List<String> parseForSummarise(final Reader input, final ObjectMapper inputMapper, final JDefaultDict<String, AtomicInteger> emptyCounts, final JDefaultDict<String, AtomicInteger> nonEmptyCounts, final JDefaultDict<String, AtomicBoolean> possibleIntegerFields, final JDefaultDict<String, Atomi...
[ "private", "static", "List", "<", "String", ">", "parseForSummarise", "(", "final", "Reader", "input", ",", "final", "ObjectMapper", "inputMapper", ",", "final", "JDefaultDict", "<", "String", ",", "AtomicInteger", ">", "emptyCounts", ",", "final", "JDefaultDict",...
Parse the given inputs to in-memory maps to allow for summarisation. @param input The {@link Reader} containing the inputs to be summarised. @param inputMapper The {@link ObjectMapper} to use to parse the file into memory @param emptyCounts A {@link JDefaultDict} to be populated with empty counts for each field @param...
[ "Parse", "the", "given", "inputs", "to", "in", "-", "memory", "maps", "to", "allow", "for", "summarisation", "." ]
train
https://github.com/ansell/csvsum/blob/6916f4d9ca48ceb940c668778626a3c9ce26587a/src/main/java/com/github/ansell/csv/sum/JSONSummariser.java#L360-L373
sahan/IckleBot
icklebot/src/main/java/com/lonepulse/icklebot/util/PermissionUtils.java
PermissionUtils.areAllGranted
public static boolean areAllGranted(Object context, Set<String> permissions) { """ <p>Takes a set of permissions and determines if all of them are granted.</p> <p>Use {@link Manifest.permission} to reference permission constants.</p> @param context the permissible {@link Context} @param permissions the ...
java
public static boolean areAllGranted(Object context, Set<String> permissions) { for (String permission : permissions) { if(ContextUtils.discover(context).checkCallingOrSelfPermission(permission) == PackageManager.PERMISSION_DENIED) { return false; } } return true; }
[ "public", "static", "boolean", "areAllGranted", "(", "Object", "context", ",", "Set", "<", "String", ">", "permissions", ")", "{", "for", "(", "String", "permission", ":", "permissions", ")", "{", "if", "(", "ContextUtils", ".", "discover", "(", "context", ...
<p>Takes a set of permissions and determines if all of them are granted.</p> <p>Use {@link Manifest.permission} to reference permission constants.</p> @param context the permissible {@link Context} @param permissions the set of {@link permission}s to test @return {@code true} if all the permissions are granted @si...
[ "<p", ">", "Takes", "a", "set", "of", "permissions", "and", "determines", "if", "all", "of", "them", "are", "granted", ".", "<", "/", "p", ">" ]
train
https://github.com/sahan/IckleBot/blob/a19003ceb3ad7c7ee508dc23a8cb31b5676aa499/icklebot/src/main/java/com/lonepulse/icklebot/util/PermissionUtils.java#L63-L74
MenoData/Time4J
base/src/main/java/net/time4j/engine/TimeAxis.java
TimeAxis.getRule
UnitRule<T> getRule(U unit) { """ <p>Liefert die chronologische Regel zur angegebenen Zeiteinheit. </p> @param unit time unit @return unit rule or {@code null} if not registered """ if (unit == null) { throw new NullPointerException("Missing chronological unit."); } ...
java
UnitRule<T> getRule(U unit) { if (unit == null) { throw new NullPointerException("Missing chronological unit."); } UnitRule<T> rule = this.unitRules.get(unit); if (rule == null) { if (unit instanceof BasicUnit) { rule = BasicUnit.class.cast(unit...
[ "UnitRule", "<", "T", ">", "getRule", "(", "U", "unit", ")", "{", "if", "(", "unit", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Missing chronological unit.\"", ")", ";", "}", "UnitRule", "<", "T", ">", "rule", "=", "this", ...
<p>Liefert die chronologische Regel zur angegebenen Zeiteinheit. </p> @param unit time unit @return unit rule or {@code null} if not registered
[ "<p", ">", "Liefert", "die", "chronologische", "Regel", "zur", "angegebenen", "Zeiteinheit", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/engine/TimeAxis.java#L555-L574
docusign/docusign-java-client
src/main/java/com/docusign/esign/client/auth/JWTUtils.java
JWTUtils.generateJWTAssertion
public static String generateJWTAssertion(String publicKeyFilename, String privateKeyFilename, String oAuthBasePath, String clientId, String userId, long expiresIn) throws JWTCreationException, IOException { """ Helper method to create a JWT token for the JWT flow @param publicKeyFilename the filename of the RSA ...
java
public static String generateJWTAssertion(String publicKeyFilename, String privateKeyFilename, String oAuthBasePath, String clientId, String userId, long expiresIn) throws JWTCreationException, IOException { String token = null; if (expiresIn <= 0L) { throw new IllegalArgumentException("expiresIn should be ...
[ "public", "static", "String", "generateJWTAssertion", "(", "String", "publicKeyFilename", ",", "String", "privateKeyFilename", ",", "String", "oAuthBasePath", ",", "String", "clientId", ",", "String", "userId", ",", "long", "expiresIn", ")", "throws", "JWTCreationExce...
Helper method to create a JWT token for the JWT flow @param publicKeyFilename the filename of the RSA public key @param privateKeyFilename the filename of the RSA private key @param oAuthBasePath DocuSign OAuth base path (account-d.docusign.com for the developer sandbox and account.docusign.com for the production platf...
[ "Helper", "method", "to", "create", "a", "JWT", "token", "for", "the", "JWT", "flow" ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/auth/JWTUtils.java#L83-L112
knowm/XChange
xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java
DateUtils.fromRfc1123DateString
public static Date fromRfc1123DateString(String rfc1123FormattedDate, Locale locale) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { """ Converts an rfc1123 formatted Date String to a Java Date rfc1123 format: EEE, dd MMM yyyy HH:mm:ss zzz @param rfc1123FormattedDate @return Date @th...
java
public static Date fromRfc1123DateString(String rfc1123FormattedDate, Locale locale) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { SimpleDateFormat rfc1123DateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", locale); try { return rfc1123DateFormat.parse(rf...
[ "public", "static", "Date", "fromRfc1123DateString", "(", "String", "rfc1123FormattedDate", ",", "Locale", "locale", ")", "throws", "com", ".", "fasterxml", ".", "jackson", ".", "databind", ".", "exc", ".", "InvalidFormatException", "{", "SimpleDateFormat", "rfc1123...
Converts an rfc1123 formatted Date String to a Java Date rfc1123 format: EEE, dd MMM yyyy HH:mm:ss zzz @param rfc1123FormattedDate @return Date @throws com.fasterxml.jackson.databind.exc.InvalidFormatException
[ "Converts", "an", "rfc1123", "formatted", "Date", "String", "to", "a", "Java", "Date", "rfc1123", "format", ":", "EEE", "dd", "MMM", "yyyy", "HH", ":", "mm", ":", "ss", "zzz" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java#L95-L105
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java
Schema.resolveSchema
private Schema resolveSchema(final Schema schema, final Map<String, Schema> knownRecordSchemas) { """ This method is to recursively resolves all name only record schema in the given schema. @param schema The schema needs to be resolved. @param knownRecordSchemas The mapping of the already resolved record schem...
java
private Schema resolveSchema(final Schema schema, final Map<String, Schema> knownRecordSchemas) { switch (schema.getType()) { case ARRAY: Schema componentSchema = resolveSchema(schema.getComponentSchema(), knownRecordSchemas); return (componentSchema == schema.getComponentSchema()) ? schema : ...
[ "private", "Schema", "resolveSchema", "(", "final", "Schema", "schema", ",", "final", "Map", "<", "String", ",", "Schema", ">", "knownRecordSchemas", ")", "{", "switch", "(", "schema", ".", "getType", "(", ")", ")", "{", "case", "ARRAY", ":", "Schema", "...
This method is to recursively resolves all name only record schema in the given schema. @param schema The schema needs to be resolved. @param knownRecordSchemas The mapping of the already resolved record schemas. @return A {@link Schema} that is structurally the same as the input schema, but with all name only record ...
[ "This", "method", "is", "to", "recursively", "resolves", "all", "name", "only", "record", "schema", "in", "the", "given", "schema", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java#L588-L623
apache/groovy
subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java
DateUtilExtensions.minus
public static java.sql.Date minus(java.sql.Date self, int days) { """ Subtract a number of days from this date and returns the new date. @param self a java.sql.Date @param days the number of days to subtract @return the new date @since 1.0 """ return new java.sql.Date(minus((Date) self, days).get...
java
public static java.sql.Date minus(java.sql.Date self, int days) { return new java.sql.Date(minus((Date) self, days).getTime()); }
[ "public", "static", "java", ".", "sql", ".", "Date", "minus", "(", "java", ".", "sql", ".", "Date", "self", ",", "int", "days", ")", "{", "return", "new", "java", ".", "sql", ".", "Date", "(", "minus", "(", "(", "Date", ")", "self", ",", "days", ...
Subtract a number of days from this date and returns the new date. @param self a java.sql.Date @param days the number of days to subtract @return the new date @since 1.0
[ "Subtract", "a", "number", "of", "days", "from", "this", "date", "and", "returns", "the", "new", "date", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-dateutil/src/main/java/org/apache/groovy/dateutil/extensions/DateUtilExtensions.java#L432-L434
calimero-project/calimero-core
src/tuwien/auto/calimero/link/KNXNetworkLinkIP.java
KNXNetworkLinkIP.newTunnelingLink
public static KNXNetworkLinkIP newTunnelingLink(final InetSocketAddress localEP, final InetSocketAddress remoteEP, final boolean useNAT, final KNXMediumSettings settings) throws KNXException, InterruptedException { """ Creates a new network link using KNXnet/IP tunneling (internally using a {@link KNXnetIPConnec...
java
public static KNXNetworkLinkIP newTunnelingLink(final InetSocketAddress localEP, final InetSocketAddress remoteEP, final boolean useNAT, final KNXMediumSettings settings) throws KNXException, InterruptedException { return new KNXNetworkLinkIP(TUNNELING, localEP, remoteEP, useNAT, settings); }
[ "public", "static", "KNXNetworkLinkIP", "newTunnelingLink", "(", "final", "InetSocketAddress", "localEP", ",", "final", "InetSocketAddress", "remoteEP", ",", "final", "boolean", "useNAT", ",", "final", "KNXMediumSettings", "settings", ")", "throws", "KNXException", ",",...
Creates a new network link using KNXnet/IP tunneling (internally using a {@link KNXnetIPConnection}) to a remote KNXnet/IP server endpoint. @param localEP the local control endpoint of the link to use, supply the wildcard address to use a local IP on the same subnet as <code>remoteEP</code> and an ephemeral port numbe...
[ "Creates", "a", "new", "network", "link", "using", "KNXnet", "/", "IP", "tunneling", "(", "internally", "using", "a", "{", "@link", "KNXnetIPConnection", "}", ")", "to", "a", "remote", "KNXnet", "/", "IP", "server", "endpoint", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/link/KNXNetworkLinkIP.java#L131-L135
javagl/CommonUI
src/main/java/de/javagl/common/ui/text/JTextComponents.java
JTextComponents.findNext
static Point findNext( String text, String query, int startIndex, boolean ignoreCase) { """ Find the next appearance of the given query in the given text, starting at the given index. The result will be a point <code>(startIndex, endIndex)</code> indicating the appearance, or <code>null</code> if none ...
java
static Point findNext( String text, String query, int startIndex, boolean ignoreCase) { int offset = StringUtils.indexOf( text, query, startIndex, ignoreCase); int length = query.length(); while (offset != -1) { return new Point(offset, offset ...
[ "static", "Point", "findNext", "(", "String", "text", ",", "String", "query", ",", "int", "startIndex", ",", "boolean", "ignoreCase", ")", "{", "int", "offset", "=", "StringUtils", ".", "indexOf", "(", "text", ",", "query", ",", "startIndex", ",", "ignoreC...
Find the next appearance of the given query in the given text, starting at the given index. The result will be a point <code>(startIndex, endIndex)</code> indicating the appearance, or <code>null</code> if none is found. @param text The text @param query The query @param startIndex The start index @param ignoreCase Wh...
[ "Find", "the", "next", "appearance", "of", "the", "given", "query", "in", "the", "given", "text", "starting", "at", "the", "given", "index", ".", "The", "result", "will", "be", "a", "point", "<code", ">", "(", "startIndex", "endIndex", ")", "<", "/", "...
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/text/JTextComponents.java#L65-L76
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/DatePicker.java
DatePicker.zSetPopupLocation
static void zSetPopupLocation(CustomPopup popup, int defaultX, int defaultY, JComponent picker, JComponent verticalFlipReference, int verticalFlipDistance, int bottomOverlapAllowed) { """ zSetPopupLocation, This calculates and sets the appropriate location for the popup windows, for both the DatePicke...
java
static void zSetPopupLocation(CustomPopup popup, int defaultX, int defaultY, JComponent picker, JComponent verticalFlipReference, int verticalFlipDistance, int bottomOverlapAllowed) { // Gather some variables that we will need. Window topWindowOrNull = SwingUtilities.getWindowAncestor(picker...
[ "static", "void", "zSetPopupLocation", "(", "CustomPopup", "popup", ",", "int", "defaultX", ",", "int", "defaultY", ",", "JComponent", "picker", ",", "JComponent", "verticalFlipReference", ",", "int", "verticalFlipDistance", ",", "int", "bottomOverlapAllowed", ")", ...
zSetPopupLocation, This calculates and sets the appropriate location for the popup windows, for both the DatePicker and the TimePicker.
[ "zSetPopupLocation", "This", "calculates", "and", "sets", "the", "appropriate", "location", "for", "the", "popup", "windows", "for", "both", "the", "DatePicker", "and", "the", "TimePicker", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/DatePicker.java#L757-L787
TNG/JGiven
jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java
Attachment.fromTextFile
@Deprecated public static Attachment fromTextFile( File file, MediaType mediaType, Charset charSet ) throws IOException { """ Creates a non-binary attachment from the given file. @throws IOException if an I/O error occurs @throws java.lang.IllegalArgumentException if mediaType is binary @deprecated use from...
java
@Deprecated public static Attachment fromTextFile( File file, MediaType mediaType, Charset charSet ) throws IOException { return fromText( Files.toString( file, charSet ), mediaType ); }
[ "@", "Deprecated", "public", "static", "Attachment", "fromTextFile", "(", "File", "file", ",", "MediaType", "mediaType", ",", "Charset", "charSet", ")", "throws", "IOException", "{", "return", "fromText", "(", "Files", ".", "toString", "(", "file", ",", "charS...
Creates a non-binary attachment from the given file. @throws IOException if an I/O error occurs @throws java.lang.IllegalArgumentException if mediaType is binary @deprecated use fromTextFile without charSet with a mediaType that has a specified charSet
[ "Creates", "a", "non", "-", "binary", "attachment", "from", "the", "given", "file", "." ]
train
https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java#L201-L204
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.isNameDeclOrSimpleAssignLhs
public static boolean isNameDeclOrSimpleAssignLhs(Node n, Node parent) { """ Determines whether this node is strictly on the left hand side of an assign or var initialization. Notably, this does not include all L-values, only statements where the node is used only as an L-value. @param n The node @param pare...
java
public static boolean isNameDeclOrSimpleAssignLhs(Node n, Node parent) { return (parent.isAssign() && parent.getFirstChild() == n) || NodeUtil.isNameDeclaration(parent); }
[ "public", "static", "boolean", "isNameDeclOrSimpleAssignLhs", "(", "Node", "n", ",", "Node", "parent", ")", "{", "return", "(", "parent", ".", "isAssign", "(", ")", "&&", "parent", ".", "getFirstChild", "(", ")", "==", "n", ")", "||", "NodeUtil", ".", "i...
Determines whether this node is strictly on the left hand side of an assign or var initialization. Notably, this does not include all L-values, only statements where the node is used only as an L-value. @param n The node @param parent Parent of the node @return True if n is the left hand of an assign
[ "Determines", "whether", "this", "node", "is", "strictly", "on", "the", "left", "hand", "side", "of", "an", "assign", "or", "var", "initialization", ".", "Notably", "this", "does", "not", "include", "all", "L", "-", "values", "only", "statements", "where", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L3309-L3312
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java
SheetResourcesImpl.getSheetAsFile
private void getSheetAsFile(long id, PaperSize paperSize, OutputStream outputStream, String contentType) throws SmartsheetException { """ Get a sheet as a file. Exceptions: - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any prob...
java
private void getSheetAsFile(long id, PaperSize paperSize, OutputStream outputStream, String contentType) throws SmartsheetException { Util.throwIfNull(outputStream, contentType); String path = "sheets/" + id; if (paperSize != null) { path += "?paperSize=" + paperSize; ...
[ "private", "void", "getSheetAsFile", "(", "long", "id", ",", "PaperSize", "paperSize", ",", "OutputStream", "outputStream", ",", "String", "contentType", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "outputStream", ",", "contentType", ...
Get a sheet as a file. Exceptions: - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ResourceNotFoundException : if the resource can not be found - ServiceUnavailableException : if the REST AP...
[ "Get", "a", "sheet", "as", "a", "file", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L987-L1015
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.setSeconds
public static <T extends java.util.Date> T setSeconds(final T date, final int amount) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Sets the seconds field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amo...
java
public static <T extends java.util.Date> T setSeconds(final T date, final int amount) { return set(date, Calendar.SECOND, amount); }
[ "public", "static", "<", "T", "extends", "java", ".", "util", ".", "Date", ">", "T", "setSeconds", "(", "final", "T", "date", ",", "final", "int", "amount", ")", "{", "return", "set", "(", "date", ",", "Calendar", ".", "SECOND", ",", "amount", ")", ...
Copied from Apache Commons Lang under Apache License v2. <br /> Sets the seconds field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumentException if t...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L787-L789
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java
CuratorZookeeperClient.startAdvancedTracer
public OperationTrace startAdvancedTracer(String name) { """ Start a new advanced tracer with more metrics being recorded @param name name of the event @return the new tracer ({@link OperationTrace#commit()} must be called) """ return new OperationTrace(name, tracer.get(), state.getSessionId...
java
public OperationTrace startAdvancedTracer(String name) { return new OperationTrace(name, tracer.get(), state.getSessionId()); }
[ "public", "OperationTrace", "startAdvancedTracer", "(", "String", "name", ")", "{", "return", "new", "OperationTrace", "(", "name", ",", "tracer", ".", "get", "(", ")", ",", "state", ".", "getSessionId", "(", ")", ")", ";", "}" ]
Start a new advanced tracer with more metrics being recorded @param name name of the event @return the new tracer ({@link OperationTrace#commit()} must be called)
[ "Start", "a", "new", "advanced", "tracer", "with", "more", "metrics", "being", "recorded" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/CuratorZookeeperClient.java#L250-L253
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/TextureAtlas.java
TextureAtlas.addTexture
public void addTexture(String name, BufferedImage image) throws TextureTooBigException { """ Adds the provided texture from the {@link java.awt.image.BufferedImage} into this {@link TextureAtlas}. @param name The name of this {@link Texture} @param image The {@link java.awt.image.BufferedImage} of the texture ...
java
public void addTexture(String name, BufferedImage image) throws TextureTooBigException { final RegionData data = findUsableRegion(image.getWidth(), image.getHeight()); if (data == null) { throw new TextureTooBigException(); } this.regions.put(name, data); final int[] ...
[ "public", "void", "addTexture", "(", "String", "name", ",", "BufferedImage", "image", ")", "throws", "TextureTooBigException", "{", "final", "RegionData", "data", "=", "findUsableRegion", "(", "image", ".", "getWidth", "(", ")", ",", "image", ".", "getHeight", ...
Adds the provided texture from the {@link java.awt.image.BufferedImage} into this {@link TextureAtlas}. @param name The name of this {@link Texture} @param image The {@link java.awt.image.BufferedImage} of the texture @throws com.flowpowered.caustic.api.util.TextureAtlas.TextureTooBigException
[ "Adds", "the", "provided", "texture", "from", "the", "{", "@link", "java", ".", "awt", ".", "image", ".", "BufferedImage", "}", "into", "this", "{", "@link", "TextureAtlas", "}", "." ]
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/TextureAtlas.java#L90-L99
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.addTemplate
public void addTemplate(PdfTemplate template, float a, float b, float c, float d, float e, float f) { """ Adds a template to this content. @param template the template @param a an element of the transformation matrix @param b an element of the transformation matrix @param c an element of the transformation m...
java
public void addTemplate(PdfTemplate template, float a, float b, float c, float d, float e, float f) { checkWriter(); checkNoPattern(template); PdfName name = writer.addDirectTemplateSimple(template, null); PageResources prs = getPageResources(); name = prs.addXObject(name, templa...
[ "public", "void", "addTemplate", "(", "PdfTemplate", "template", ",", "float", "a", ",", "float", "b", ",", "float", "c", ",", "float", "d", ",", "float", "e", ",", "float", "f", ")", "{", "checkWriter", "(", ")", ";", "checkNoPattern", "(", "template"...
Adds a template to this content. @param template the template @param a an element of the transformation matrix @param b an element of the transformation matrix @param c an element of the transformation matrix @param d an element of the transformation matrix @param e an element of the transformation matrix @param f an ...
[ "Adds", "a", "template", "to", "this", "content", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2049-L2063
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.beginRegenerateKeyAsync
public Observable<Void> beginRegenerateKeyAsync(String resourceGroupName, String accountName, KeyKind keyKind) { """ Regenerates an access key for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @para...
java
public Observable<Void> beginRegenerateKeyAsync(String resourceGroupName, String accountName, KeyKind keyKind) { return beginRegenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyKind).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceRes...
[ "public", "Observable", "<", "Void", ">", "beginRegenerateKeyAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "KeyKind", "keyKind", ")", "{", "return", "beginRegenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName"...
Regenerates an access key for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param keyKind The access key to regenerate. Possible values include: 'primary', 'secondary', 'primaryReadonly', 'secondaryReadonly...
[ "Regenerates", "an", "access", "key", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1904-L1911
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java
DefaultParser.handleUnknownToken
private void handleUnknownToken(String token) throws ParseException { """ Handles an unknown token. If the token starts with a dash an UnrecognizedOptionException is thrown. Otherwise the token is added to the arguments of the command line. If the stopAtNonOption flag is set, this stops the parsing and the rema...
java
private void handleUnknownToken(String token) throws ParseException { if (token.startsWith("-") && token.length() > 1 && !stopAtNonOption) { throw new UnrecognizedOptionException("Unrecognized option: " + token, token); } cmd.addArg(token); if (stopAtNonOption) ...
[ "private", "void", "handleUnknownToken", "(", "String", "token", ")", "throws", "ParseException", "{", "if", "(", "token", ".", "startsWith", "(", "\"-\"", ")", "&&", "token", ".", "length", "(", ")", ">", "1", "&&", "!", "stopAtNonOption", ")", "{", "th...
Handles an unknown token. If the token starts with a dash an UnrecognizedOptionException is thrown. Otherwise the token is added to the arguments of the command line. If the stopAtNonOption flag is set, this stops the parsing and the remaining tokens are added as-is in the arguments of the command line. @param token t...
[ "Handles", "an", "unknown", "token", ".", "If", "the", "token", "starts", "with", "a", "dash", "an", "UnrecognizedOptionException", "is", "thrown", ".", "Otherwise", "the", "token", "is", "added", "to", "the", "arguments", "of", "the", "command", "line", "."...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java#L343-L355
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java
LoginAbstractAzkabanServlet.logRequest
private void logRequest(final HttpServletRequest req, final Session session) { """ Log out request - the format should be close to Apache access log format """ final StringBuilder buf = new StringBuilder(); buf.append(getRealClientIpAddr(req)).append(" "); if (session != null && session.getUser() !...
java
private void logRequest(final HttpServletRequest req, final Session session) { final StringBuilder buf = new StringBuilder(); buf.append(getRealClientIpAddr(req)).append(" "); if (session != null && session.getUser() != null) { buf.append(session.getUser().getUserId()).append(" "); } else { ...
[ "private", "void", "logRequest", "(", "final", "HttpServletRequest", "req", ",", "final", "Session", "session", ")", "{", "final", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "getRealClientIpAddr", "(", "req",...
Log out request - the format should be close to Apache access log format
[ "Log", "out", "request", "-", "the", "format", "should", "be", "close", "to", "Apache", "access", "log", "format" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-web-server/src/main/java/azkaban/webapp/servlet/LoginAbstractAzkabanServlet.java#L137-L169
kochedykov/jlibmodbus
src/com/intelligt/modbus/jlibmodbus/master/ModbusMaster.java
ModbusMaster.writeSingleCoil
final public void writeSingleCoil(int serverAddress, int startAddress, boolean flag) throws ModbusProtocolException, ModbusNumberException, ModbusIOException { """ This function code is used to write a single output to either ON or OFF in a remote device. The requested ON/OFF state is specified by a c...
java
final public void writeSingleCoil(int serverAddress, int startAddress, boolean flag) throws ModbusProtocolException, ModbusNumberException, ModbusIOException { processRequest(ModbusRequestBuilder.getInstance().buildWriteSingleCoil(serverAddress, startAddress, flag)); }
[ "final", "public", "void", "writeSingleCoil", "(", "int", "serverAddress", ",", "int", "startAddress", ",", "boolean", "flag", ")", "throws", "ModbusProtocolException", ",", "ModbusNumberException", ",", "ModbusIOException", "{", "processRequest", "(", "ModbusRequestBui...
This function code is used to write a single output to either ON or OFF in a remote device. The requested ON/OFF state is specified by a constant in the request data field. A value of TRUE requests the output to be ON. A value of FALSE requests it to be OFF. The Request PDU specifies the address of the coil to be force...
[ "This", "function", "code", "is", "used", "to", "write", "a", "single", "output", "to", "either", "ON", "or", "OFF", "in", "a", "remote", "device", ".", "The", "requested", "ON", "/", "OFF", "state", "is", "specified", "by", "a", "constant", "in", "the...
train
https://github.com/kochedykov/jlibmodbus/blob/197cb39e2649e61a6fe3cb7dc91a701d847e14be/src/com/intelligt/modbus/jlibmodbus/master/ModbusMaster.java#L283-L286
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptTask.java
AptTask.setSrcExtensions
public void setSrcExtensions(String srcExts) { """ The srcExtensions attribute can be set to a comma-separated list of source filename extensions that are considered to be valid inputs to APT processing. The default value is "*.java". """ StringTokenizer tok = new StringTokenizer(srcExts, ","); while (to...
java
public void setSrcExtensions(String srcExts) { StringTokenizer tok = new StringTokenizer(srcExts, ","); while (tok.hasMoreTokens()) _srcExts.add(tok.nextToken()); }
[ "public", "void", "setSrcExtensions", "(", "String", "srcExts", ")", "{", "StringTokenizer", "tok", "=", "new", "StringTokenizer", "(", "srcExts", ",", "\",\"", ")", ";", "while", "(", "tok", ".", "hasMoreTokens", "(", ")", ")", "_srcExts", ".", "add", "("...
The srcExtensions attribute can be set to a comma-separated list of source filename extensions that are considered to be valid inputs to APT processing. The default value is "*.java".
[ "The", "srcExtensions", "attribute", "can", "be", "set", "to", "a", "comma", "-", "separated", "list", "of", "source", "filename", "extensions", "that", "are", "considered", "to", "be", "valid", "inputs", "to", "APT", "processing", ".", "The", "default", "va...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptTask.java#L57-L62
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.getReader
public static ExcelReader getReader(String bookFilePath, int sheetIndex) { """ 获取Excel读取器,通过调用{@link ExcelReader}的read或readXXX方法读取Excel内容 @param bookFilePath Excel文件路径,绝对路径或相对于ClassPath路径 @param sheetIndex sheet序号,0表示第一个sheet @return {@link ExcelReader} @since 3.1.1 """ try { return new ExcelReade...
java
public static ExcelReader getReader(String bookFilePath, int sheetIndex) { try { return new ExcelReader(bookFilePath, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); } }
[ "public", "static", "ExcelReader", "getReader", "(", "String", "bookFilePath", ",", "int", "sheetIndex", ")", "{", "try", "{", "return", "new", "ExcelReader", "(", "bookFilePath", ",", "sheetIndex", ")", ";", "}", "catch", "(", "NoClassDefFoundError", "e", ")"...
获取Excel读取器,通过调用{@link ExcelReader}的read或readXXX方法读取Excel内容 @param bookFilePath Excel文件路径,绝对路径或相对于ClassPath路径 @param sheetIndex sheet序号,0表示第一个sheet @return {@link ExcelReader} @since 3.1.1
[ "获取Excel读取器,通过调用", "{", "@link", "ExcelReader", "}", "的read或readXXX方法读取Excel内容" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L215-L221
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java
WebServiceEndpoint.getDefaultQName
private QName getDefaultQName(String localPart) { """ Get the default QName from local part. @param localPart @return """ if (StringUtils.hasText(defaultNamespaceUri)) { return new QName(defaultNamespaceUri, localPart, defaultPrefix); } else { throw new SoapHeaderExcep...
java
private QName getDefaultQName(String localPart) { if (StringUtils.hasText(defaultNamespaceUri)) { return new QName(defaultNamespaceUri, localPart, defaultPrefix); } else { throw new SoapHeaderException("Failed to add SOAP header '" + localPart + "', " + "because nei...
[ "private", "QName", "getDefaultQName", "(", "String", "localPart", ")", "{", "if", "(", "StringUtils", ".", "hasText", "(", "defaultNamespaceUri", ")", ")", "{", "return", "new", "QName", "(", "defaultNamespaceUri", ",", "localPart", ",", "defaultPrefix", ")", ...
Get the default QName from local part. @param localPart @return
[ "Get", "the", "default", "QName", "from", "local", "part", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java#L333-L340
datasalt/pangool
core/src/main/java/com/datasalt/pangool/io/Fields.java
Fields.createTupleField
public static Field createTupleField(String name, Schema schema) { """ Creates a field containing a Pangool Tuple. @param name Field's name @param schema The schema of the field @return the field @deprecated Use {@link Field#createTupleField(String, Schema)} instead} """ return Field.createTupleFie...
java
public static Field createTupleField(String name, Schema schema) { return Field.createTupleField(name, schema); }
[ "public", "static", "Field", "createTupleField", "(", "String", "name", ",", "Schema", "schema", ")", "{", "return", "Field", ".", "createTupleField", "(", "name", ",", "schema", ")", ";", "}" ]
Creates a field containing a Pangool Tuple. @param name Field's name @param schema The schema of the field @return the field @deprecated Use {@link Field#createTupleField(String, Schema)} instead}
[ "Creates", "a", "field", "containing", "a", "Pangool", "Tuple", "." ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/io/Fields.java#L145-L147
kaichunlin/android-transition
core/src/main/java/com/kaichunlin/transition/util/TransitionUtil.java
TransitionUtil.executeOnGlobalLayout
public static void executeOnGlobalLayout(@NonNull final View view, @NonNull final ViewTreeObserver.OnGlobalLayoutListener listener) { """ Helper that removes the drudgery of using ViewTreeObserver @param view @param listener """ ViewTreeObserver vto = view.getViewTreeObserver(); vto.addOnGl...
java
public static void executeOnGlobalLayout(@NonNull final View view, @NonNull final ViewTreeObserver.OnGlobalLayoutListener listener) { ViewTreeObserver vto = view.getViewTreeObserver(); vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public ...
[ "public", "static", "void", "executeOnGlobalLayout", "(", "@", "NonNull", "final", "View", "view", ",", "@", "NonNull", "final", "ViewTreeObserver", ".", "OnGlobalLayoutListener", "listener", ")", "{", "ViewTreeObserver", "vto", "=", "view", ".", "getViewTreeObserve...
Helper that removes the drudgery of using ViewTreeObserver @param view @param listener
[ "Helper", "that", "removes", "the", "drudgery", "of", "using", "ViewTreeObserver" ]
train
https://github.com/kaichunlin/android-transition/blob/7b53074206622f5cf5d82091d891a7ed8b9f06cd/core/src/main/java/com/kaichunlin/transition/util/TransitionUtil.java#L81-L97
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java
TrainsImpl.trainVersionAsync
public Observable<EnqueueTrainingResponse> trainVersionAsync(UUID appId, String versionId) { """ Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status...
java
public Observable<EnqueueTrainingResponse> trainVersionAsync(UUID appId, String versionId) { return trainVersionWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<EnqueueTrainingResponse>, EnqueueTrainingResponse>() { @Override public EnqueueTrainingResponse call(Se...
[ "public", "Observable", "<", "EnqueueTrainingResponse", ">", "trainVersionAsync", "(", "UUID", "appId", ",", "String", "versionId", ")", "{", "return", "trainVersionWithServiceResponseAsync", "(", "appId", ",", "versionId", ")", ".", "map", "(", "new", "Func1", "<...
Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are ...
[ "Sends", "a", "training", "request", "for", "a", "version", "of", "a", "specified", "LUIS", "app", ".", "This", "POST", "request", "initiates", "a", "request", "asynchronously", ".", "To", "determine", "whether", "the", "training", "request", "is", "successful...
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/TrainsImpl.java#L105-L112
actframework/actframework
src/main/java/act/data/ApacheMultipartParser.java
ApacheMultipartParser.getFileName
private String getFileName(Map /* String, String */ headers) { """ Retrieves the file name from the <code>Content-disposition</code> header. @param headers A <code>Map</code> containing the HTTP request headers. @return The file name for the current <code>encapsulation</code>. """ String fileName ...
java
private String getFileName(Map /* String, String */ headers) { String fileName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); if (cd != null) { String cdl = cd.toLowerCase(); if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) { Para...
[ "private", "String", "getFileName", "(", "Map", "/* String, String */", "headers", ")", "{", "String", "fileName", "=", "null", ";", "String", "cd", "=", "getHeader", "(", "headers", ",", "CONTENT_DISPOSITION", ")", ";", "if", "(", "cd", "!=", "null", ")", ...
Retrieves the file name from the <code>Content-disposition</code> header. @param headers A <code>Map</code> containing the HTTP request headers. @return The file name for the current <code>encapsulation</code>.
[ "Retrieves", "the", "file", "name", "from", "the", "<code", ">", "Content", "-", "disposition<", "/", "code", ">", "header", "." ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/data/ApacheMultipartParser.java#L169-L198
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.genNode
private void genNode(final Element ent, final ResourceXMLParser.Entity entity) { """ Gen "node" tag contents @param ent element @param entity entity """ for (final String nodeProp : nodeProps) { ent.addAttribute(nodeProp, notNull(entity.getProperty(nodeProp))); } genAttr...
java
private void genNode(final Element ent, final ResourceXMLParser.Entity entity) { for (final String nodeProp : nodeProps) { ent.addAttribute(nodeProp, notNull(entity.getProperty(nodeProp))); } genAttributes(ent, entity); }
[ "private", "void", "genNode", "(", "final", "Element", "ent", ",", "final", "ResourceXMLParser", ".", "Entity", "entity", ")", "{", "for", "(", "final", "String", "nodeProp", ":", "nodeProps", ")", "{", "ent", ".", "addAttribute", "(", "nodeProp", ",", "no...
Gen "node" tag contents @param ent element @param entity entity
[ "Gen", "node", "tag", "contents" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L253-L258
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java
UsersInner.beginCreateOrUpdate
public UserInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, UserInner user) { """ Creates a new user or updates an existing user's information on a data box edge/gateway device. @param deviceName The device name. @param name The user name. @param resourceGroupName The resour...
java
public UserInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, UserInner user) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, user).toBlocking().single().body(); }
[ "public", "UserInner", "beginCreateOrUpdate", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "UserInner", "user", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "res...
Creates a new user or updates an existing user's information on a data box edge/gateway device. @param deviceName The device name. @param name The user name. @param resourceGroupName The resource group name. @param user The user details. @throws IllegalArgumentException thrown if parameters fail the validation @throws...
[ "Creates", "a", "new", "user", "or", "updates", "an", "existing", "user", "s", "information", "on", "a", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java#L406-L408
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java
RpcConfigs.getBooleanValue
public static boolean getBooleanValue(String primaryKey, String secondaryKey) { """ Gets boolean value. @param primaryKey the primary key @param secondaryKey the secondary key @return the boolean value """ Object val = CFG.get(primaryKey); if (val == null) { val = CFG.get(sec...
java
public static boolean getBooleanValue(String primaryKey, String secondaryKey) { Object val = CFG.get(primaryKey); if (val == null) { val = CFG.get(secondaryKey); if (val == null) { throw new SofaRpcRuntimeException("Not found key: " + primaryKey + "/" + secondaryK...
[ "public", "static", "boolean", "getBooleanValue", "(", "String", "primaryKey", ",", "String", "secondaryKey", ")", "{", "Object", "val", "=", "CFG", ".", "get", "(", "primaryKey", ")", ";", "if", "(", "val", "==", "null", ")", "{", "val", "=", "CFG", "...
Gets boolean value. @param primaryKey the primary key @param secondaryKey the secondary key @return the boolean value
[ "Gets", "boolean", "value", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java#L184-L193
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.putObject
public PutObjectResponse putObject(String bucketName, String key, byte[] value, ObjectMetadata metadata) { """ Uploads the specified bytes and object metadata to Bos under the specified bucket and key name. @param bucketName The name of an existing bucket, to which you have Write permission. @param key The key...
java
public PutObjectResponse putObject(String bucketName, String key, byte[] value, ObjectMetadata metadata) { if (metadata.getContentLength() == -1) { metadata.setContentLength(value.length); } return this.putObject(new PutObjectRequest(bucketName, key, RestartableInputStream.wrap(value...
[ "public", "PutObjectResponse", "putObject", "(", "String", "bucketName", ",", "String", "key", ",", "byte", "[", "]", "value", ",", "ObjectMetadata", "metadata", ")", "{", "if", "(", "metadata", ".", "getContentLength", "(", ")", "==", "-", "1", ")", "{", ...
Uploads the specified bytes and object metadata to Bos under the specified bucket and key name. @param bucketName The name of an existing bucket, to which you have Write permission. @param key The key under which to store the specified file. @param value The bytes containing the value to be uploaded to Bos. @param met...
[ "Uploads", "the", "specified", "bytes", "and", "object", "metadata", "to", "Bos", "under", "the", "specified", "bucket", "and", "key", "name", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L862-L867
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
MetadataOperation.convertSchemaPattern
protected String convertSchemaPattern(final String pattern) { """ Convert wildchars and escape sequence of schema pattern from JDBC format to datanucleous/regex The schema pattern treats empty string also as wildchar """ if ((pattern == null) || pattern.isEmpty()) { return convertPattern("%", true);...
java
protected String convertSchemaPattern(final String pattern) { if ((pattern == null) || pattern.isEmpty()) { return convertPattern("%", true); } else { return convertPattern(pattern, true); } }
[ "protected", "String", "convertSchemaPattern", "(", "final", "String", "pattern", ")", "{", "if", "(", "(", "pattern", "==", "null", ")", "||", "pattern", ".", "isEmpty", "(", ")", ")", "{", "return", "convertPattern", "(", "\"%\"", ",", "true", ")", ";"...
Convert wildchars and escape sequence of schema pattern from JDBC format to datanucleous/regex The schema pattern treats empty string also as wildchar
[ "Convert", "wildchars", "and", "escape", "sequence", "of", "schema", "pattern", "from", "JDBC", "format", "to", "datanucleous", "/", "regex", "The", "schema", "pattern", "treats", "empty", "string", "also", "as", "wildchar" ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java#L76-L82
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.createOutput
private StreamingOutput createOutput(final JaxRx impl, final ResourcePath path) { """ Returns a stream output, depending on the query parameters. @param impl implementation @param path path info @return parameter map """ // check for command parameter String qu = path.getValue(Quer...
java
private StreamingOutput createOutput(final JaxRx impl, final ResourcePath path) { // check for command parameter String qu = path.getValue(QueryParameter.COMMAND); if (qu != null) { return impl.command(qu, path); } // check for run parameter qu = pa...
[ "private", "StreamingOutput", "createOutput", "(", "final", "JaxRx", "impl", ",", "final", "ResourcePath", "path", ")", "{", "// check for command parameter\r", "String", "qu", "=", "path", ".", "getValue", "(", "QueryParameter", ".", "COMMAND", ")", ";", "if", ...
Returns a stream output, depending on the query parameters. @param impl implementation @param path path info @return parameter map
[ "Returns", "a", "stream", "output", "depending", "on", "the", "query", "parameters", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L81-L103
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/Options.java
Options.addOption
public Options addOption(String opt, String description) { """ Add an option that only contains a short name. The option does not take an argument. @param opt Short single-character name of the option. @param description Self-documenting description @return the resulting Options instance @since 1.3 """ ...
java
public Options addOption(String opt, String description) { addOption(opt, null, false, description); return this; }
[ "public", "Options", "addOption", "(", "String", "opt", ",", "String", "description", ")", "{", "addOption", "(", "opt", ",", "null", ",", "false", ",", "description", ")", ";", "return", "this", ";", "}" ]
Add an option that only contains a short name. The option does not take an argument. @param opt Short single-character name of the option. @param description Self-documenting description @return the resulting Options instance @since 1.3
[ "Add", "an", "option", "that", "only", "contains", "a", "short", "name", ".", "The", "option", "does", "not", "take", "an", "argument", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/Options.java#L109-L113
dlemmermann/CalendarFX
CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java
RecurrenceIteratorFactory.createRecurrenceIterator
public static RecurrenceIterator createRecurrenceIterator( String rdata, DateValue dtStart, TimeZone tzid) throws ParseException { """ like {@link #createRecurrenceIterator(String, DateValue, TimeZone, boolean)} but defaults to strict parsing. """ return createRecurrenceIterato...
java
public static RecurrenceIterator createRecurrenceIterator( String rdata, DateValue dtStart, TimeZone tzid) throws ParseException { return createRecurrenceIterator(rdata, dtStart, tzid, true); }
[ "public", "static", "RecurrenceIterator", "createRecurrenceIterator", "(", "String", "rdata", ",", "DateValue", "dtStart", ",", "TimeZone", "tzid", ")", "throws", "ParseException", "{", "return", "createRecurrenceIterator", "(", "rdata", ",", "dtStart", ",", "tzid", ...
like {@link #createRecurrenceIterator(String, DateValue, TimeZone, boolean)} but defaults to strict parsing.
[ "like", "{" ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXRecurrence/src/main/java/com/google/ical/iter/RecurrenceIteratorFactory.java#L148-L152
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.setString
@PublicEvolving public void setString(ConfigOption<String> key, String value) { """ Adds the given value to the configuration object. The main key of the config option will be used to map the value. @param key the option specifying the key to be added @param value the value of the key/value pair to be adde...
java
@PublicEvolving public void setString(ConfigOption<String> key, String value) { setValueInternal(key.key(), value); }
[ "@", "PublicEvolving", "public", "void", "setString", "(", "ConfigOption", "<", "String", ">", "key", ",", "String", "value", ")", "{", "setValueInternal", "(", "key", ".", "key", "(", ")", ",", "value", ")", ";", "}" ]
Adds the given value to the configuration object. The main key of the config option will be used to map the value. @param key the option specifying the key to be added @param value the value of the key/value pair to be added
[ "Adds", "the", "given", "value", "to", "the", "configuration", "object", ".", "The", "main", "key", "of", "the", "config", "option", "will", "be", "used", "to", "map", "the", "value", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L190-L193
zaproxy/zaproxy
src/org/parosproxy/paros/extension/ExtensionLoader.java
ExtensionLoader.initViewAllExtension
private void initViewAllExtension(final View view, double progressFactor) { """ Init all extensions with the same View @param view the View that need to be applied """ if (view == null) { return; } final double factorPerc = progressFactor / getExtensionCount(); ...
java
private void initViewAllExtension(final View view, double progressFactor) { if (view == null) { return; } final double factorPerc = progressFactor / getExtensionCount(); for (int i = 0; i < getExtensionCount(); i++) { final Extension extension = ...
[ "private", "void", "initViewAllExtension", "(", "final", "View", "view", ",", "double", "progressFactor", ")", "{", "if", "(", "view", "==", "null", ")", "{", "return", ";", "}", "final", "double", "factorPerc", "=", "progressFactor", "/", "getExtensionCount",...
Init all extensions with the same View @param view the View that need to be applied
[ "Init", "all", "extensions", "with", "the", "same", "View" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/ExtensionLoader.java#L1331-L1354
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java
DisksInner.createOrUpdateAsync
public Observable<DiskInner> createOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk) { """ Creates or updates a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is c...
java
public Observable<DiskInner> createOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1<ServiceResponse<DiskInner>, DiskInner>() { @Override public DiskInner call(ServiceR...
[ "public", "Observable", "<", "DiskInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "diskName", ",", "DiskInner", "disk", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ",", ...
Creates or updates a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @param disk D...
[ "Creates", "or", "updates", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L171-L178
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getFullString
public final String getFullString(final int pos, final int len, String charsetName) { """ Return fix-length string from buffer without null-terminate checking. Fix bug #17 {@link https://github.com/AlibabaTech/canal/issues/17 } """ if (pos + len > limit || pos < 0) throw new IllegalArgumentException(...
java
public final String getFullString(final int pos, final int len, String charsetName) { if (pos + len > limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + (pos < 0 ? pos : (pos + len))); try { ...
[ "public", "final", "String", "getFullString", "(", "final", "int", "pos", ",", "final", "int", "len", ",", "String", "charsetName", ")", "{", "if", "(", "pos", "+", "len", ">", "limit", "||", "pos", "<", "0", ")", "throw", "new", "IllegalArgumentExceptio...
Return fix-length string from buffer without null-terminate checking. Fix bug #17 {@link https://github.com/AlibabaTech/canal/issues/17 }
[ "Return", "fix", "-", "length", "string", "from", "buffer", "without", "null", "-", "terminate", "checking", ".", "Fix", "bug", "#17", "{" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L1106-L1115
networknt/light-4j
dump/src/main/java/com/networknt/dump/BodyDumper.java
BodyDumper.putDumpInfoTo
@Override protected void putDumpInfoTo(Map<String, Object> result) { """ put bodyContent to result @param result a Map<String, Object> you want to put dumping info to. """ if(StringUtils.isNotBlank(this.bodyContent)) { result.put(DumpConstants.BODY, this.bodyContent); } }
java
@Override protected void putDumpInfoTo(Map<String, Object> result) { if(StringUtils.isNotBlank(this.bodyContent)) { result.put(DumpConstants.BODY, this.bodyContent); } }
[ "@", "Override", "protected", "void", "putDumpInfoTo", "(", "Map", "<", "String", ",", "Object", ">", "result", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "this", ".", "bodyContent", ")", ")", "{", "result", ".", "put", "(", "DumpConstan...
put bodyContent to result @param result a Map<String, Object> you want to put dumping info to.
[ "put", "bodyContent", "to", "result" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/dump/src/main/java/com/networknt/dump/BodyDumper.java#L51-L56
victims/victims-lib-java
src/main/java/com/redhat/victims/database/VictimsSQL.java
VictimsSQL.insertRecord
protected int insertRecord(Connection connection, String hash) throws SQLException { """ Insert a new record with the given hash and return the record id. @param hash @return A record id if it was created correctly, else return -1. @throws SQLException """ int id = -1; Prepared...
java
protected int insertRecord(Connection connection, String hash) throws SQLException { int id = -1; PreparedStatement ps = setObjects(connection, Query.INSERT_RECORD, hash); ps.execute(); ResultSet rs = ps.getGeneratedKeys(); try { while (rs.next()) { ...
[ "protected", "int", "insertRecord", "(", "Connection", "connection", ",", "String", "hash", ")", "throws", "SQLException", "{", "int", "id", "=", "-", "1", ";", "PreparedStatement", "ps", "=", "setObjects", "(", "connection", ",", "Query", ".", "INSERT_RECORD"...
Insert a new record with the given hash and return the record id. @param hash @return A record id if it was created correctly, else return -1. @throws SQLException
[ "Insert", "a", "new", "record", "with", "the", "given", "hash", "and", "return", "the", "record", "id", "." ]
train
https://github.com/victims/victims-lib-java/blob/ccd0e2fcc409bb6cdfc5de411c3bb202c9095f8b/src/main/java/com/redhat/victims/database/VictimsSQL.java#L230-L247
pmwmedia/tinylog
benchmarks/src/main/java/org/tinylog/benchmarks/api/WritingBenchmark.java
WritingBenchmark.byteBufferRandomAccessFile
@Benchmark @BenchmarkMode(Mode.AverageTime) public void byteBufferRandomAccessFile(final Configuration configuration) throws IOException { """ Benchmarks writing via {@link RandomAccessFile} with using a {@link ByteBuffer} for buffering. @param configuration Configuration with target file @throws IOExceptio...
java
@Benchmark @BenchmarkMode(Mode.AverageTime) public void byteBufferRandomAccessFile(final Configuration configuration) throws IOException { ByteBuffer buffer = ByteBuffer.allocate(BUFFER_CAPACITY); try (RandomAccessFile file = new RandomAccessFile(configuration.file, "rw")) { for (long i = 0; i < LINES; ++i) {...
[ "@", "Benchmark", "@", "BenchmarkMode", "(", "Mode", ".", "AverageTime", ")", "public", "void", "byteBufferRandomAccessFile", "(", "final", "Configuration", "configuration", ")", "throws", "IOException", "{", "ByteBuffer", "buffer", "=", "ByteBuffer", ".", "allocate...
Benchmarks writing via {@link RandomAccessFile} with using a {@link ByteBuffer} for buffering. @param configuration Configuration with target file @throws IOException Failed to write to target file
[ "Benchmarks", "writing", "via", "{", "@link", "RandomAccessFile", "}", "with", "using", "a", "{", "@link", "ByteBuffer", "}", "for", "buffering", "." ]
train
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/benchmarks/src/main/java/org/tinylog/benchmarks/api/WritingBenchmark.java#L184-L207
msgpack/msgpack-java
msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java
MessageBuffer.sliceAsByteBuffer
public ByteBuffer sliceAsByteBuffer(int index, int length) { """ Create a ByteBuffer view of the range [index, index+length) of this memory @param index @param length @return """ if (hasArray()) { return ByteBuffer.wrap((byte[]) base, (int) ((address - ARRAY_BYTE_BASE_OFFSET) + index),...
java
public ByteBuffer sliceAsByteBuffer(int index, int length) { if (hasArray()) { return ByteBuffer.wrap((byte[]) base, (int) ((address - ARRAY_BYTE_BASE_OFFSET) + index), length); } else { assert (!isUniversalBuffer); return DirectBufferAccess.newByteBuffer(...
[ "public", "ByteBuffer", "sliceAsByteBuffer", "(", "int", "index", ",", "int", "length", ")", "{", "if", "(", "hasArray", "(", ")", ")", "{", "return", "ByteBuffer", ".", "wrap", "(", "(", "byte", "[", "]", ")", "base", ",", "(", "int", ")", "(", "(...
Create a ByteBuffer view of the range [index, index+length) of this memory @param index @param length @return
[ "Create", "a", "ByteBuffer", "view", "of", "the", "range", "[", "index", "index", "+", "length", ")", "of", "this", "memory" ]
train
https://github.com/msgpack/msgpack-java/blob/16e370e348215a72a14c210b42d448d513aee015/msgpack-core/src/main/java/org/msgpack/core/buffer/MessageBuffer.java#L570-L579
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java
WaveformPreviewComponent.setPlaybackState
public synchronized void setPlaybackState(int player, long position, boolean playing) { """ Set the current playback state for a player. Will cause part of the component to be redrawn if the player state has changed (and we have the {@link TrackMetadata} we need to translate the time into a position in the co...
java
public synchronized void setPlaybackState(int player, long position, boolean playing) { if (getMonitoredPlayer() != 0 && player != getMonitoredPlayer()) { throw new IllegalStateException("Cannot setPlaybackState for another player when monitoring player " + getMonitoredPlayer()); } i...
[ "public", "synchronized", "void", "setPlaybackState", "(", "int", "player", ",", "long", "position", ",", "boolean", "playing", ")", "{", "if", "(", "getMonitoredPlayer", "(", ")", "!=", "0", "&&", "player", "!=", "getMonitoredPlayer", "(", ")", ")", "{", ...
Set the current playback state for a player. Will cause part of the component to be redrawn if the player state has changed (and we have the {@link TrackMetadata} we need to translate the time into a position in the component). This will be quickly overruled if a player is being monitored, but can be used in other con...
[ "Set", "the", "current", "playback", "state", "for", "a", "player", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java#L294-L314
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java
VMCommandLine.getVMBinary
@Pure public static String getVMBinary() { """ Replies the current java VM binary. @return the binary executable filename that was used to launch the virtual machine. """ final String javaHome = System.getProperty("java.home"); //$NON-NLS-1$ final File binDir = new File(new File(javaHome), "bin"); //$N...
java
@Pure public static String getVMBinary() { final String javaHome = System.getProperty("java.home"); //$NON-NLS-1$ final File binDir = new File(new File(javaHome), "bin"); //$NON-NLS-1$ if (binDir.isDirectory()) { File exec = new File(binDir, getExecutableFilename("javaw")); //$NON-NLS-1$ if (exec.isFile())...
[ "@", "Pure", "public", "static", "String", "getVMBinary", "(", ")", "{", "final", "String", "javaHome", "=", "System", ".", "getProperty", "(", "\"java.home\"", ")", ";", "//$NON-NLS-1$", "final", "File", "binDir", "=", "new", "File", "(", "new", "File", "...
Replies the current java VM binary. @return the binary executable filename that was used to launch the virtual machine.
[ "Replies", "the", "current", "java", "VM", "binary", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L138-L153