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
fernandospr/javapns-jdk16
src/main/java/javapns/Push.java
Push.sendPayloads
private static PushedNotifications sendPayloads(Object keystore, String password, boolean production, Object payloadDevicePairs) throws CommunicationException, KeystoreException { """ Push a different preformatted payload for each device. @param keystore a keystore containing your private key and the certificat...
java
private static PushedNotifications sendPayloads(Object keystore, String password, boolean production, Object payloadDevicePairs) throws CommunicationException, KeystoreException { PushedNotifications notifications = new PushedNotifications(); if (payloadDevicePairs == null) return notifications; PushNotificationM...
[ "private", "static", "PushedNotifications", "sendPayloads", "(", "Object", "keystore", ",", "String", "password", ",", "boolean", "production", ",", "Object", "payloadDevicePairs", ")", "throws", "CommunicationException", ",", "KeystoreException", "{", "PushedNotification...
Push a different preformatted payload for each device. @param keystore a keystore containing your private key and the certificate signed by Apple ({@link java.io.File}, {@link java.io.InputStream}, byte[], {@link java.security.KeyStore} or {@link java.lang.String} for a file path) @param password the keystore's passwo...
[ "Push", "a", "different", "preformatted", "payload", "for", "each", "device", "." ]
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/Push.java#L291-L317
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunsInner.java
RunsInner.beginUpdateAsync
public Observable<RunInner> beginUpdateAsync(String resourceGroupName, String registryName, String runId) { """ Patch the run properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param runId The ru...
java
public Observable<RunInner> beginUpdateAsync(String resourceGroupName, String registryName, String runId) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, runId).map(new Func1<ServiceResponse<RunInner>, RunInner>() { @Override public RunInner call(ServiceResp...
[ "public", "Observable", "<", "RunInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "runId", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", ...
Patch the run properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param runId The run ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RunInner ob...
[ "Patch", "the", "run", "properties", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunsInner.java#L630-L637
jayantk/jklol
src/com/jayantkrish/jklol/tensor/SparseTensor.java
SparseTensor.relabelDimensions
@Override public SparseTensor relabelDimensions(int[] newDimensions) { """ Relabels the dimension numbers of {@code this} and returns the result. {@code newDimensions.length} must equal {@code this.getDimensionNumbers().length}. The {@code ith} entry in {@code this.getDimensionNumbers()} is relabeled as {@co...
java
@Override public SparseTensor relabelDimensions(int[] newDimensions) { Preconditions.checkArgument(newDimensions.length == numDimensions()); if (Ordering.natural().isOrdered(Ints.asList(newDimensions))) { // If the new dimension labels are in sorted order, then we // don't have to re-sort the outc...
[ "@", "Override", "public", "SparseTensor", "relabelDimensions", "(", "int", "[", "]", "newDimensions", ")", "{", "Preconditions", ".", "checkArgument", "(", "newDimensions", ".", "length", "==", "numDimensions", "(", ")", ")", ";", "if", "(", "Ordering", ".", ...
Relabels the dimension numbers of {@code this} and returns the result. {@code newDimensions.length} must equal {@code this.getDimensionNumbers().length}. The {@code ith} entry in {@code this.getDimensionNumbers()} is relabeled as {@code newDimensions[i]} in the result. @param newDimensions @return
[ "Relabels", "the", "dimension", "numbers", "of", "{", "@code", "this", "}", "and", "returns", "the", "result", ".", "{", "@code", "newDimensions", ".", "length", "}", "must", "equal", "{", "@code", "this", ".", "getDimensionNumbers", "()", ".", "length", "...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/SparseTensor.java#L1045-L1085
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.getTopic
public PubsubFuture<Topic> getTopic(final String project, final String topic) { """ Get a Pub/Sub topic. @param project The Google Cloud project. @param topic The name of the topic to get. @return A future that is completed when this request is completed. The future will be completed with {@code null} if t...
java
public PubsubFuture<Topic> getTopic(final String project, final String topic) { return getTopic(canonicalTopic(project, topic)); }
[ "public", "PubsubFuture", "<", "Topic", ">", "getTopic", "(", "final", "String", "project", ",", "final", "String", "topic", ")", "{", "return", "getTopic", "(", "canonicalTopic", "(", "project", ",", "topic", ")", ")", ";", "}" ]
Get a Pub/Sub topic. @param project The Google Cloud project. @param topic The name of the topic to get. @return A future that is completed when this request is completed. The future will be completed with {@code null} if the response is 404.
[ "Get", "a", "Pub", "/", "Sub", "topic", "." ]
train
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L306-L308
arquillian/arquillian-container-chameleon
arquillian-chameleon-runner/runner/src/main/java/org/arquillian/container/chameleon/runner/AnnotationExtractor.java
AnnotationExtractor.findAndSortAnnotations
static Annotation[] findAndSortAnnotations(Annotation annotation) { """ We need to sort annotations so the first one processed is ChameleonTarget so these properties has bigger preference that the inherit ones. @param annotation @return """ final Annotation[] metaAnnotations = annotation.annotationTy...
java
static Annotation[] findAndSortAnnotations(Annotation annotation) { final Annotation[] metaAnnotations = annotation.annotationType().getAnnotations(); Arrays.sort(metaAnnotations, new Comparator<Annotation>() { @Override public int compare(Annotation o1, Annotation o2) { ...
[ "static", "Annotation", "[", "]", "findAndSortAnnotations", "(", "Annotation", "annotation", ")", "{", "final", "Annotation", "[", "]", "metaAnnotations", "=", "annotation", ".", "annotationType", "(", ")", ".", "getAnnotations", "(", ")", ";", "Arrays", ".", ...
We need to sort annotations so the first one processed is ChameleonTarget so these properties has bigger preference that the inherit ones. @param annotation @return
[ "We", "need", "to", "sort", "annotations", "so", "the", "first", "one", "processed", "is", "ChameleonTarget", "so", "these", "properties", "has", "bigger", "preference", "that", "the", "inherit", "ones", "." ]
train
https://github.com/arquillian/arquillian-container-chameleon/blob/7e9bbd3eaab9b5dfab1fa6ffd8fb16c39b7cc856/arquillian-chameleon-runner/runner/src/main/java/org/arquillian/container/chameleon/runner/AnnotationExtractor.java#L40-L58
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java
JDBCRepositoryBuilder.setAutoVersioningEnabled
public void setAutoVersioningEnabled(boolean enabled, String className) { """ By default, JDBCRepository assumes that {@link com.amazon.carbonado.Version version numbers} are initialized and incremented by triggers installed on the database. Enabling automatic versioning here causes the JDBCRepository to manage...
java
public void setAutoVersioningEnabled(boolean enabled, String className) { if (mAutoVersioningMap == null) { mAutoVersioningMap = new HashMap<String, Boolean>(); } mAutoVersioningMap.put(className, enabled); }
[ "public", "void", "setAutoVersioningEnabled", "(", "boolean", "enabled", ",", "String", "className", ")", "{", "if", "(", "mAutoVersioningMap", "==", "null", ")", "{", "mAutoVersioningMap", "=", "new", "HashMap", "<", "String", ",", "Boolean", ">", "(", ")", ...
By default, JDBCRepository assumes that {@link com.amazon.carbonado.Version version numbers} are initialized and incremented by triggers installed on the database. Enabling automatic versioning here causes the JDBCRepository to manage these operations itself. @param enabled true to enable, false to disable @param clas...
[ "By", "default", "JDBCRepository", "assumes", "that", "{", "@link", "com", ".", "amazon", ".", "carbonado", ".", "Version", "version", "numbers", "}", "are", "initialized", "and", "incremented", "by", "triggers", "installed", "on", "the", "database", ".", "Ena...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepositoryBuilder.java#L329-L334
phax/ph-web
ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java
CSP2SourceList.addHash
@Nonnull public CSP2SourceList addHash (@Nonnull final EMessageDigestAlgorithm eMDAlgo, @Nonnull final String sHashBase64Value) { """ Add the provided Base64 encoded hash value. The {@value #HASH_PREFIX} and {@link #HASH_SUFFIX} are added automatically. @param eMDAlgo The message digest algorithm used. May ...
java
@Nonnull public CSP2SourceList addHash (@Nonnull final EMessageDigestAlgorithm eMDAlgo, @Nonnull final String sHashBase64Value) { ValueEnforcer.notNull (eMDAlgo, "MDAlgo"); ValueEnforcer.notEmpty (sHashBase64Value, "HashBase64Value"); String sAlgorithmName; switch (eMDAlgo) { case SHA_256...
[ "@", "Nonnull", "public", "CSP2SourceList", "addHash", "(", "@", "Nonnull", "final", "EMessageDigestAlgorithm", "eMDAlgo", ",", "@", "Nonnull", "final", "String", "sHashBase64Value", ")", "{", "ValueEnforcer", ".", "notNull", "(", "eMDAlgo", ",", "\"MDAlgo\"", ")"...
Add the provided Base64 encoded hash value. The {@value #HASH_PREFIX} and {@link #HASH_SUFFIX} are added automatically. @param eMDAlgo The message digest algorithm used. May only {@link EMessageDigestAlgorithm#SHA_256}, {@link EMessageDigestAlgorithm#SHA_384} or {@link EMessageDigestAlgorithm#SHA_512}. May not be <cod...
[ "Add", "the", "provided", "Base64", "encoded", "hash", "value", ".", "The", "{", "@value", "#HASH_PREFIX", "}", "and", "{", "@link", "#HASH_SUFFIX", "}", "are", "added", "automatically", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/csp/CSP2SourceList.java#L240-L264
maestrano/maestrano-java
src/main/java/com/maestrano/net/ConnecClient.java
ConnecClient.getInstanceEndpoint
public String getInstanceEndpoint(String entityName, String groupId, String id) { """ Return the path to the instance endpoint @param entity name @param customer group id @param entity id @return instance path """ String edp = getCollectionEndpoint(entityName, groupId); if (id != null && !id.isEm...
java
public String getInstanceEndpoint(String entityName, String groupId, String id) { String edp = getCollectionEndpoint(entityName, groupId); if (id != null && !id.isEmpty()) { edp += "/" + id; } return edp; }
[ "public", "String", "getInstanceEndpoint", "(", "String", "entityName", ",", "String", "groupId", ",", "String", "id", ")", "{", "String", "edp", "=", "getCollectionEndpoint", "(", "entityName", ",", "groupId", ")", ";", "if", "(", "id", "!=", "null", "&&", ...
Return the path to the instance endpoint @param entity name @param customer group id @param entity id @return instance path
[ "Return", "the", "path", "to", "the", "instance", "endpoint" ]
train
https://github.com/maestrano/maestrano-java/blob/e71c6d3172d7645529d678d1cb3ea9e0a59de314/src/main/java/com/maestrano/net/ConnecClient.java#L93-L101
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java
VelocityRenderer.render
@Override public void render(final WComponent component, final RenderContext context) { """ Paints the component in HTML using the Velocity Template. @param component the component to paint. @param context the context to send the XML output to. """ PrintWriter out = ((WebXmlRenderContext) context).getWr...
java
@Override public void render(final WComponent component, final RenderContext context) { PrintWriter out = ((WebXmlRenderContext) context).getWriter(); // If we are debugging the layout, write markers so that the html // designer can see where templates start and end. boolean debugLayout = ConfigurationPropert...
[ "@", "Override", "public", "void", "render", "(", "final", "WComponent", "component", ",", "final", "RenderContext", "context", ")", "{", "PrintWriter", "out", "=", "(", "(", "WebXmlRenderContext", ")", "context", ")", ".", "getWriter", "(", ")", ";", "// If...
Paints the component in HTML using the Velocity Template. @param component the component to paint. @param context the context to send the XML output to.
[ "Paints", "the", "component", "in", "HTML", "using", "the", "Velocity", "Template", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/VelocityRenderer.java#L122-L143
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java
ShareResourcesImpl.updateShare
public Share updateShare(long objectId, Share share) throws SmartsheetException { """ <p>Update a share.</p> <p>It mirrors to the following Smartsheet REST API method:</p> <p>PUT /workspaces/{workspaceId}/shares/{shareId}</p> <p>PUT /sheets/{sheetId}/shares/{shareId}</p> <p>PUT /sights/{sheetId}/shares/{shar...
java
public Share updateShare(long objectId, Share share) throws SmartsheetException { Util.throwIfNull(share); return this.updateResource(getMasterResourceType() + "/" + objectId + "/shares/" + share.getId(), Share.class, share); }
[ "public", "Share", "updateShare", "(", "long", "objectId", ",", "Share", "share", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "share", ")", ";", "return", "this", ".", "updateResource", "(", "getMasterResourceType", "(", ")", "+...
<p>Update a share.</p> <p>It mirrors to the following Smartsheet REST API method:</p> <p>PUT /workspaces/{workspaceId}/shares/{shareId}</p> <p>PUT /sheets/{sheetId}/shares/{shareId}</p> <p>PUT /sights/{sheetId}/shares/{shareId}</p> <p>PUT /reports/{reportId}/shares/{shareId}</p> @param objectId the ID of the object t...
[ "<p", ">", "Update", "a", "share", ".", "<", "/", "p", ">" ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java#L173-L176
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java
SignatureChecker.verifySignature
public boolean verifySignature(String message, String signature, PublicKey publicKey) { """ Does the actual Java cryptographic verification of the signature. This method does no handling of the many rare exceptions it is required to catch. This can also be used to verify the signature from the x-amz-sns-signa...
java
public boolean verifySignature(String message, String signature, PublicKey publicKey){ boolean result = false; try { byte[] sigbytes = Base64.decode(signature.getBytes()); Signature sigChecker = SIG_CHECKER.get(); sigChecker.initVerify(publicKey); sigCheck...
[ "public", "boolean", "verifySignature", "(", "String", "message", ",", "String", "signature", ",", "PublicKey", "publicKey", ")", "{", "boolean", "result", "=", "false", ";", "try", "{", "byte", "[", "]", "sigbytes", "=", "Base64", ".", "decode", "(", "sig...
Does the actual Java cryptographic verification of the signature. This method does no handling of the many rare exceptions it is required to catch. This can also be used to verify the signature from the x-amz-sns-signature http header @param message Exact string that was signed. In the case of the x-amz-sns-signatur...
[ "Does", "the", "actual", "Java", "cryptographic", "verification", "of", "the", "signature", ".", "This", "method", "does", "no", "handling", "of", "the", "many", "rare", "exceptions", "it", "is", "required", "to", "catch", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java#L147-L161
perwendel/spark
src/main/java/spark/RouteImpl.java
RouteImpl.create
public static RouteImpl create(final String path, final Route route) { """ Wraps the route in RouteImpl @param path the path @param route the route @return the wrapped route """ return create(path, DEFAULT_ACCEPT_TYPE, route); }
java
public static RouteImpl create(final String path, final Route route) { return create(path, DEFAULT_ACCEPT_TYPE, route); }
[ "public", "static", "RouteImpl", "create", "(", "final", "String", "path", ",", "final", "Route", "route", ")", "{", "return", "create", "(", "path", ",", "DEFAULT_ACCEPT_TYPE", ",", "route", ")", ";", "}" ]
Wraps the route in RouteImpl @param path the path @param route the route @return the wrapped route
[ "Wraps", "the", "route", "in", "RouteImpl" ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/RouteImpl.java#L53-L55
xwiki/xwiki-rendering
xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java
TocTreeBuilder.createChildListBlock
private ListBLock createChildListBlock(boolean numbered, Block parentBlock) { """ Create a new ListBlock and add it in the provided parent block. @param numbered indicate if the list has to be numbered or with bullets @param parentBlock the block where to add the new list block. @return the new list block. ...
java
private ListBLock createChildListBlock(boolean numbered, Block parentBlock) { ListBLock childListBlock = numbered ? new NumberedListBlock(Collections.emptyList()) : new BulletedListBlock(Collections.emptyList()); if (parentBlock != null) { parentBlock.addChild(childListBlock...
[ "private", "ListBLock", "createChildListBlock", "(", "boolean", "numbered", ",", "Block", "parentBlock", ")", "{", "ListBLock", "childListBlock", "=", "numbered", "?", "new", "NumberedListBlock", "(", "Collections", ".", "emptyList", "(", ")", ")", ":", "new", "...
Create a new ListBlock and add it in the provided parent block. @param numbered indicate if the list has to be numbered or with bullets @param parentBlock the block where to add the new list block. @return the new list block.
[ "Create", "a", "new", "ListBlock", "and", "add", "it", "in", "the", "provided", "parent", "block", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-toc/src/main/java/org/xwiki/rendering/internal/macro/toc/TocTreeBuilder.java#L205-L215
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java
TmdbLists.checkItemStatus
public boolean checkItemStatus(String listId, int mediaId) throws MovieDbException { """ Check to see if an ID is already on a list. @param listId @param mediaId @return true if the movie is on the list @throws MovieDbException """ TmdbParameters parameters = new TmdbParameters(); paramet...
java
public boolean checkItemStatus(String listId, int mediaId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, listId); parameters.add(Param.MOVIE_ID, mediaId); URL url = new ApiUrl(apiKey, MethodBase.LIST).subMethod(MethodSub.ITEM_STATUS...
[ "public", "boolean", "checkItemStatus", "(", "String", "listId", ",", "int", "mediaId", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID", ",",...
Check to see if an ID is already on a list. @param listId @param mediaId @return true if the movie is on the list @throws MovieDbException
[ "Check", "to", "see", "if", "an", "ID", "is", "already", "on", "a", "list", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbLists.java#L89-L102
box/box-java-sdk
src/main/java/com/box/sdk/MetadataTemplate.java
MetadataTemplate.getMetadataTemplate
public static MetadataTemplate getMetadataTemplate( BoxAPIConnection api, String templateName, String scope, String ... fields) { """ Gets the metadata template of specified template type. @param api the API connection to be used. @param templateName the metadata template type name. @param scope the...
java
public static MetadataTemplate getMetadataTemplate( BoxAPIConnection api, String templateName, String scope, String ... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (fields.length > 0) { builder.appendParam("fields", fields); } URL url = MET...
[ "public", "static", "MetadataTemplate", "getMetadataTemplate", "(", "BoxAPIConnection", "api", ",", "String", "templateName", ",", "String", "scope", ",", "String", "...", "fields", ")", "{", "QueryStringBuilder", "builder", "=", "new", "QueryStringBuilder", "(", ")...
Gets the metadata template of specified template type. @param api the API connection to be used. @param templateName the metadata template type name. @param scope the metadata template scope (global or enterprise). @param fields the fields to retrieve. @return the metadata template returned from the server.
[ "Gets", "the", "metadata", "template", "of", "specified", "template", "type", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L441-L452
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Mutation.java
Mutation.isConsolidated
public<V> boolean isConsolidated(Function<E,V> convertAdds, Function<K,V> convertDels) { """ Checks whether this mutation is consolidated in the sense of {@link #consolidate(com.google.common.base.Function, com.google.common.base.Function)}. This should only be used in assertions and tests due to the performance ...
java
public<V> boolean isConsolidated(Function<E,V> convertAdds, Function<K,V> convertDels) { int delBefore = getDeletions().size(); consolidate(convertAdds,convertDels); return getDeletions().size()==delBefore; }
[ "public", "<", "V", ">", "boolean", "isConsolidated", "(", "Function", "<", "E", ",", "V", ">", "convertAdds", ",", "Function", "<", "K", ",", "V", ">", "convertDels", ")", "{", "int", "delBefore", "=", "getDeletions", "(", ")", ".", "size", "(", ")"...
Checks whether this mutation is consolidated in the sense of {@link #consolidate(com.google.common.base.Function, com.google.common.base.Function)}. This should only be used in assertions and tests due to the performance penalty. @param convertAdds @param convertDels @param <V> @return
[ "Checks", "whether", "this", "mutation", "is", "consolidated", "in", "the", "sense", "of", "{", "@link", "#consolidate", "(", "com", ".", "google", ".", "common", ".", "base", ".", "Function", "com", ".", "google", ".", "common", ".", "base", ".", "Funct...
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Mutation.java#L158-L162
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/SubscriptionUsagesInner.java
SubscriptionUsagesInner.getAsync
public Observable<SubscriptionUsageInner> getAsync(String locationName, String usageName) { """ Gets a subscription usage metric. @param locationName The name of the region where the resource is located. @param usageName Name of usage metric to return. @throws IllegalArgumentException thrown if parameters fai...
java
public Observable<SubscriptionUsageInner> getAsync(String locationName, String usageName) { return getWithServiceResponseAsync(locationName, usageName).map(new Func1<ServiceResponse<SubscriptionUsageInner>, SubscriptionUsageInner>() { @Override public SubscriptionUsageInner call(ServiceR...
[ "public", "Observable", "<", "SubscriptionUsageInner", ">", "getAsync", "(", "String", "locationName", ",", "String", "usageName", ")", "{", "return", "getWithServiceResponseAsync", "(", "locationName", ",", "usageName", ")", ".", "map", "(", "new", "Func1", "<", ...
Gets a subscription usage metric. @param locationName The name of the region where the resource is located. @param usageName Name of usage metric to return. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SubscriptionUsageInner object
[ "Gets", "a", "subscription", "usage", "metric", "." ]
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/SubscriptionUsagesInner.java#L224-L231
SourcePond/fileobserver
fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/VirtualRoot.java
VirtualRoot.doAddRoot
private synchronized void doAddRoot(final WatchedDirectory pWatchedDirectory) { """ registered before another WatchedDirectory is being registered. """ final Object key = requireNonNull(pWatchedDirectory.getKey(), KEY_IS_NULL); final Path directory = requireNonNull(pWatchedDirectory.getDirector...
java
private synchronized void doAddRoot(final WatchedDirectory pWatchedDirectory) { final Object key = requireNonNull(pWatchedDirectory.getKey(), KEY_IS_NULL); final Path directory = requireNonNull(pWatchedDirectory.getDirectory(), DIRECTORY_IS_NULL); if (!isDirectory(directory)) { thro...
[ "private", "synchronized", "void", "doAddRoot", "(", "final", "WatchedDirectory", "pWatchedDirectory", ")", "{", "final", "Object", "key", "=", "requireNonNull", "(", "pWatchedDirectory", ".", "getKey", "(", ")", ",", "KEY_IS_NULL", ")", ";", "final", "Path", "d...
registered before another WatchedDirectory is being registered.
[ "registered", "before", "another", "WatchedDirectory", "is", "being", "registered", "." ]
train
https://github.com/SourcePond/fileobserver/blob/dfb3055ed35759a47f52f6cfdea49879c415fd6b/fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/VirtualRoot.java#L188-L210
threerings/narya
core/src/main/java/com/threerings/crowd/client/PlaceViewUtil.java
PlaceViewUtil.dispatchWillEnterPlace
public static void dispatchWillEnterPlace (Object root, PlaceObject plobj) { """ Dispatches a call to {@link PlaceView#willEnterPlace} to all UI elements in the hierarchy rooted at the component provided via the <code>root</code> parameter. @param root the component at which to start traversing the UI hierarch...
java
public static void dispatchWillEnterPlace (Object root, PlaceObject plobj) { // dispatch the call on this component if it implements PlaceView if (root instanceof PlaceView) { try { ((PlaceView)root).willEnterPlace(plobj); } catch (Exception e) { ...
[ "public", "static", "void", "dispatchWillEnterPlace", "(", "Object", "root", ",", "PlaceObject", "plobj", ")", "{", "// dispatch the call on this component if it implements PlaceView", "if", "(", "root", "instanceof", "PlaceView", ")", "{", "try", "{", "(", "(", "Plac...
Dispatches a call to {@link PlaceView#willEnterPlace} to all UI elements in the hierarchy rooted at the component provided via the <code>root</code> parameter. @param root the component at which to start traversing the UI hierarchy. @param plobj the place object that is about to be entered.
[ "Dispatches", "a", "call", "to", "{", "@link", "PlaceView#willEnterPlace", "}", "to", "all", "UI", "elements", "in", "the", "hierarchy", "rooted", "at", "the", "component", "provided", "via", "the", "<code", ">", "root<", "/", "code", ">", "parameter", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/client/PlaceViewUtil.java#L44-L64
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbBlob.java
MariaDbBlob.getBinaryStream
public InputStream getBinaryStream(final long pos, final long length) throws SQLException { """ Returns an <code>InputStream</code> object that contains a partial <code>Blob</code> value, starting with the byte specified by pos, which is length bytes in length. @param pos the offset to the first byte of th...
java
public InputStream getBinaryStream(final long pos, final long length) throws SQLException { if (pos < 1) { throw ExceptionMapper.getSqlException("Out of range (position should be > 0)"); } if (pos - 1 > this.length) { throw ExceptionMapper.getSqlException("Out of range (position > stream size)")...
[ "public", "InputStream", "getBinaryStream", "(", "final", "long", "pos", ",", "final", "long", "length", ")", "throws", "SQLException", "{", "if", "(", "pos", "<", "1", ")", "{", "throw", "ExceptionMapper", ".", "getSqlException", "(", "\"Out of range (position ...
Returns an <code>InputStream</code> object that contains a partial <code>Blob</code> value, starting with the byte specified by pos, which is length bytes in length. @param pos the offset to the first byte of the partial value to be retrieved. The first byte in the <code>Blob</code> is at position 1 @param length ...
[ "Returns", "an", "<code", ">", "InputStream<", "/", "code", ">", "object", "that", "contains", "a", "partial", "<code", ">", "Blob<", "/", "code", ">", "value", "starting", "with", "the", "byte", "specified", "by", "pos", "which", "is", "length", "bytes", ...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbBlob.java#L196-L208
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java
CPMeasurementUnitPersistenceImpl.fetchByG_K_T
@Override public CPMeasurementUnit fetchByG_K_T(long groupId, String key, int type) { """ Returns the cp measurement unit where groupId = &#63; and key = &#63; and type = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param groupId the group ID @param key the key @param ...
java
@Override public CPMeasurementUnit fetchByG_K_T(long groupId, String key, int type) { return fetchByG_K_T(groupId, key, type, true); }
[ "@", "Override", "public", "CPMeasurementUnit", "fetchByG_K_T", "(", "long", "groupId", ",", "String", "key", ",", "int", "type", ")", "{", "return", "fetchByG_K_T", "(", "groupId", ",", "key", ",", "type", ",", "true", ")", ";", "}" ]
Returns the cp measurement unit where groupId = &#63; and key = &#63; and type = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param groupId the group ID @param key the key @param type the type @return the matching cp measurement unit, or <code>null</code> if a matching cp measur...
[ "Returns", "the", "cp", "measurement", "unit", "where", "groupId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java#L2606-L2609
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java
Calc.getPsi
public static final double getPsi(AminoAcid a, AminoAcid b) throws StructureException { """ Calculate the psi angle. @param a an AminoAcid object @param b an AminoAcid object @return a double @throws StructureException if aminoacids not connected or if any of the 4 needed atoms missing """ if ( ...
java
public static final double getPsi(AminoAcid a, AminoAcid b) throws StructureException { if ( ! isConnected(a,b)) { throw new StructureException( "can not calc Psi - AminoAcids are not connected!"); } Atom a_N = a.getN(); Atom a_CA = a.getCA(); Atom a_C = a.getC(); Atom b_N = b.getN(); ...
[ "public", "static", "final", "double", "getPsi", "(", "AminoAcid", "a", ",", "AminoAcid", "b", ")", "throws", "StructureException", "{", "if", "(", "!", "isConnected", "(", "a", ",", "b", ")", ")", "{", "throw", "new", "StructureException", "(", "\"can not...
Calculate the psi angle. @param a an AminoAcid object @param b an AminoAcid object @return a double @throws StructureException if aminoacids not connected or if any of the 4 needed atoms missing
[ "Calculate", "the", "psi", "angle", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java#L308-L327
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/channel/AbstractChannel.java
AbstractChannel.initSslSocketFactory
private SSLSocketFactory initSslSocketFactory(KeyManager[] kms, TrustManager[] tms) throws InitializationException { """ get a {@link SSLSocketFactory} based on the {@link KeyManager} and {@link TrustManager} objects we got. @throws InitializationException """ SSLContext ctx = null; String verify ...
java
private SSLSocketFactory initSslSocketFactory(KeyManager[] kms, TrustManager[] tms) throws InitializationException { SSLContext ctx = null; String verify = System.getProperty(VERIFY_PEER_CERT_PROPERTY); // If VERIFY_PEER_PROPERTY is set to false, we don't want verification // of the other sides certifica...
[ "private", "SSLSocketFactory", "initSslSocketFactory", "(", "KeyManager", "[", "]", "kms", ",", "TrustManager", "[", "]", "tms", ")", "throws", "InitializationException", "{", "SSLContext", "ctx", "=", "null", ";", "String", "verify", "=", "System", ".", "getPro...
get a {@link SSLSocketFactory} based on the {@link KeyManager} and {@link TrustManager} objects we got. @throws InitializationException
[ "get", "a", "{", "@link", "SSLSocketFactory", "}", "based", "on", "the", "{", "@link", "KeyManager", "}", "and", "{", "@link", "TrustManager", "}", "objects", "we", "got", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/channel/AbstractChannel.java#L326-L360
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/Icon.java
Icon.initIcon
protected void initIcon(Icon baseIcon, int width, int height, int x, int y, boolean rotated) { """ Initializes this {@link Icon}. Called from the icon this one depends on, copying the <b>baseIcon</b> values. @param baseIcon the base icon @param width the width @param height the height @param x the x @param ...
java
protected void initIcon(Icon baseIcon, int width, int height, int x, int y, boolean rotated) { copyFrom(baseIcon); }
[ "protected", "void", "initIcon", "(", "Icon", "baseIcon", ",", "int", "width", ",", "int", "height", ",", "int", "x", ",", "int", "y", ",", "boolean", "rotated", ")", "{", "copyFrom", "(", "baseIcon", ")", ";", "}" ]
Initializes this {@link Icon}. Called from the icon this one depends on, copying the <b>baseIcon</b> values. @param baseIcon the base icon @param width the width @param height the height @param x the x @param y the y @param rotated the rotated
[ "Initializes", "this", "{", "@link", "Icon", "}", ".", "Called", "from", "the", "icon", "this", "one", "depends", "on", "copying", "the", "<b", ">", "baseIcon<", "/", "b", ">", "values", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/Icon.java#L301-L304
lucee/Lucee
loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java
CFMLEngineFactory.removeUpdate
private boolean removeUpdate() throws IOException, ServletException { """ updates the engine when a update is available @return has updated @throws IOException @throws ServletException """ final File patchDir = getPatchDirectory(); final File[] patches = patchDir.listFiles(new ExtensionFilter(new String...
java
private boolean removeUpdate() throws IOException, ServletException { final File patchDir = getPatchDirectory(); final File[] patches = patchDir.listFiles(new ExtensionFilter(new String[] { "rc", "rcs" })); for (int i = 0; i < patches.length; i++) if (!patches[i].delete()) patches[i].deleteOnExit(); _restart(...
[ "private", "boolean", "removeUpdate", "(", ")", "throws", "IOException", ",", "ServletException", "{", "final", "File", "patchDir", "=", "getPatchDirectory", "(", ")", ";", "final", "File", "[", "]", "patches", "=", "patchDir", ".", "listFiles", "(", "new", ...
updates the engine when a update is available @return has updated @throws IOException @throws ServletException
[ "updates", "the", "engine", "when", "a", "update", "is", "available" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java#L1082-L1090
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMFiles.java
JMFiles.readString
public static String readString(String filePath, String charsetName) { """ Read string string. @param filePath the file path @param charsetName the charset name @return the string """ return readString(getPath(filePath), charsetName); }
java
public static String readString(String filePath, String charsetName) { return readString(getPath(filePath), charsetName); }
[ "public", "static", "String", "readString", "(", "String", "filePath", ",", "String", "charsetName", ")", "{", "return", "readString", "(", "getPath", "(", "filePath", ")", ",", "charsetName", ")", ";", "}" ]
Read string string. @param filePath the file path @param charsetName the charset name @return the string
[ "Read", "string", "string", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMFiles.java#L173-L175
phax/ph-commons
ph-cli/src/main/java/com/helger/cli/HelpFormatter.java
HelpFormatter.printWrapped
public void printWrapped (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull final String sText) { """ Print the specified text to the specified PrintWriter. @param aPW The printWriter to write the help to @param nWidth The number of characters to display per line @param sText The text to be writte...
java
public void printWrapped (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull final String sText) { printWrapped (aPW, nWidth, 0, sText); }
[ "public", "void", "printWrapped", "(", "@", "Nonnull", "final", "PrintWriter", "aPW", ",", "final", "int", "nWidth", ",", "@", "Nonnull", "final", "String", "sText", ")", "{", "printWrapped", "(", "aPW", ",", "nWidth", ",", "0", ",", "sText", ")", ";", ...
Print the specified text to the specified PrintWriter. @param aPW The printWriter to write the help to @param nWidth The number of characters to display per line @param sText The text to be written to the PrintWriter
[ "Print", "the", "specified", "text", "to", "the", "specified", "PrintWriter", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-cli/src/main/java/com/helger/cli/HelpFormatter.java#L800-L803
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomDataWriter.java
AtomDataWriter.marshallEnum
private void marshallEnum(Object value, EnumType enumType) throws XMLStreamException { """ Marshall an enum value. @param value The value to marshall. Can be {@code null}. @param enumType The OData enum type. """ LOG.trace("Enum value: {} of type: {}", value, enumType); xmlWriter.writeCh...
java
private void marshallEnum(Object value, EnumType enumType) throws XMLStreamException { LOG.trace("Enum value: {} of type: {}", value, enumType); xmlWriter.writeCharacters(value.toString()); }
[ "private", "void", "marshallEnum", "(", "Object", "value", ",", "EnumType", "enumType", ")", "throws", "XMLStreamException", "{", "LOG", ".", "trace", "(", "\"Enum value: {} of type: {}\"", ",", "value", ",", "enumType", ")", ";", "xmlWriter", ".", "writeCharacter...
Marshall an enum value. @param value The value to marshall. Can be {@code null}. @param enumType The OData enum type.
[ "Marshall", "an", "enum", "value", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomDataWriter.java#L298-L301
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/RemoveFromListRepairer.java
RemoveFromListRepairer.repairCommand
public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final ReplaceInList repairAgainst) { """ Repairs a {@link RemoveFromList} in relation to a {@link ReplaceInList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired c...
java
public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final ReplaceInList repairAgainst) { return repairAddOrReplace(toRepair, repairAgainst.getPosition()); }
[ "public", "List", "<", "RemoveFromList", ">", "repairCommand", "(", "final", "RemoveFromList", "toRepair", ",", "final", "ReplaceInList", "repairAgainst", ")", "{", "return", "repairAddOrReplace", "(", "toRepair", ",", "repairAgainst", ".", "getPosition", "(", ")", ...
Repairs a {@link RemoveFromList} in relation to a {@link ReplaceInList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired command.
[ "Repairs", "a", "{", "@link", "RemoveFromList", "}", "in", "relation", "to", "a", "{", "@link", "ReplaceInList", "}", "command", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/RemoveFromListRepairer.java#L102-L104
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java
QueryableStateConfiguration.disabled
public static QueryableStateConfiguration disabled() { """ Gets the configuration describing the queryable state as deactivated. """ final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.ge...
java
public static QueryableStateConfiguration disabled() { final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue()); final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue()); return ...
[ "public", "static", "QueryableStateConfiguration", "disabled", "(", ")", "{", "final", "Iterator", "<", "Integer", ">", "proxyPorts", "=", "NetUtils", ".", "getPortRangeFromString", "(", "QueryableStateOptions", ".", "PROXY_PORT_RANGE", ".", "defaultValue", "(", ")", ...
Gets the configuration describing the queryable state as deactivated.
[ "Gets", "the", "configuration", "describing", "the", "queryable", "state", "as", "deactivated", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/QueryableStateConfiguration.java#L136-L140
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSoftwareModuleManagement.java
JpaSoftwareModuleManagement.assertMetaDataQuota
private void assertMetaDataQuota(final Long moduleId, final int requested) { """ Asserts the meta data quota for the software module with the given ID. @param moduleId The software module ID. @param requested Number of meta data entries to be created. """ final int maxMetaData = quotaManagement.g...
java
private void assertMetaDataQuota(final Long moduleId, final int requested) { final int maxMetaData = quotaManagement.getMaxMetaDataEntriesPerSoftwareModule(); QuotaHelper.assertAssignmentQuota(moduleId, requested, maxMetaData, SoftwareModuleMetadata.class, SoftwareModule.class, softwareM...
[ "private", "void", "assertMetaDataQuota", "(", "final", "Long", "moduleId", ",", "final", "int", "requested", ")", "{", "final", "int", "maxMetaData", "=", "quotaManagement", ".", "getMaxMetaDataEntriesPerSoftwareModule", "(", ")", ";", "QuotaHelper", ".", "assertAs...
Asserts the meta data quota for the software module with the given ID. @param moduleId The software module ID. @param requested Number of meta data entries to be created.
[ "Asserts", "the", "meta", "data", "quota", "for", "the", "software", "module", "with", "the", "given", "ID", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSoftwareModuleManagement.java#L548-L552
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatial/rectangleAlgebra/RectangleConstraintSolver.java
RectangleConstraintSolver.drawAlmostCentreRectangle
public String drawAlmostCentreRectangle(long horizon, HashMap<String, Rectangle> rect) { """ Output a Gnuplot-readable script that draws, for each given {@link RectangularRegion}, a rectangle which is close to the "center" of the {@link RectangularRegion}'s domain. @param horizon The maximum X and Y coordinate ...
java
public String drawAlmostCentreRectangle(long horizon, HashMap<String, Rectangle> rect){ String ret = ""; int j = 1; ret = "set xrange [0:" + horizon +"]"+ "\n"; ret += "set yrange [0:" + horizon +"]" + "\n"; int i = 0; for (String str : rect.keySet()) { //rec ret += "set obj " + j + " rect ...
[ "public", "String", "drawAlmostCentreRectangle", "(", "long", "horizon", ",", "HashMap", "<", "String", ",", "Rectangle", ">", "rect", ")", "{", "String", "ret", "=", "\"\"", ";", "int", "j", "=", "1", ";", "ret", "=", "\"set xrange [0:\"", "+", "horizon",...
Output a Gnuplot-readable script that draws, for each given {@link RectangularRegion}, a rectangle which is close to the "center" of the {@link RectangularRegion}'s domain. @param horizon The maximum X and Y coordinate to be used in the plot. @param rect The set of {@link RectangularRegion}s to draw. @return A Gnuplot ...
[ "Output", "a", "Gnuplot", "-", "readable", "script", "that", "draws", "for", "each", "given", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/rectangleAlgebra/RectangleConstraintSolver.java#L142-L164
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java
GeoPackageJavaProperties.getColorProperty
public static Color getColorProperty(String base, String property) { """ Get a required color property by base property and property name @param base base property @param property property @return property value """ return getColorProperty(base, property, true); }
java
public static Color getColorProperty(String base, String property) { return getColorProperty(base, property, true); }
[ "public", "static", "Color", "getColorProperty", "(", "String", "base", ",", "String", "property", ")", "{", "return", "getColorProperty", "(", "base", ",", "property", ",", "true", ")", ";", "}" ]
Get a required color property by base property and property name @param base base property @param property property @return property value
[ "Get", "a", "required", "color", "property", "by", "base", "property", "and", "property", "name" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java#L319-L321
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.executeBatchSQLKey
public static int[] executeBatchSQLKey(String sqlKey, Object[][] params) throws SQLStatementNotFoundException, YankSQLException { """ Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using t...
java
public static int[] executeBatchSQLKey(String sqlKey, Object[][] params) throws SQLStatementNotFoundException, YankSQLException { return executeBatchSQLKey(YankPoolManager.DEFAULT_POOL_NAME, sqlKey, params); }
[ "public", "static", "int", "[", "]", "executeBatchSQLKey", "(", "String", "sqlKey", ",", "Object", "[", "]", "[", "]", "params", ")", "throws", "SQLStatementNotFoundException", ",", "YankSQLException", "{", "return", "executeBatchSQLKey", "(", "YankPoolManager", "...
Batch executes the given INSERT, UPDATE, DELETE, REPLACE or UPSERT SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. @param sqlKey The SQL Key found in a properties file corresponding to the desired SQL statement value @param params A...
[ "Batch", "executes", "the", "given", "INSERT", "UPDATE", "DELETE", "REPLACE", "or", "UPSERT", "SQL", "statement", "matching", "the", "sqlKey", "String", "in", "a", "properties", "file", "loaded", "via", "Yank", ".", "addSQLStatements", "(", "...", ")", "using"...
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L714-L718
pebble/pebble-android-sdk
PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java
PebbleDictionary.addUint32
public void addUint32(final int key, final int i) { """ Associate the specified unsigned int with the provided key in the dictionary. If another key-value pair with the same key is already present in the dictionary, it will be replaced. @param key key with which the specified value is associated @param i va...
java
public void addUint32(final int key, final int i) { PebbleTuple t = PebbleTuple.create(key, PebbleTuple.TupleType.UINT, PebbleTuple.Width.WORD, i); addTuple(t); }
[ "public", "void", "addUint32", "(", "final", "int", "key", ",", "final", "int", "i", ")", "{", "PebbleTuple", "t", "=", "PebbleTuple", ".", "create", "(", "key", ",", "PebbleTuple", ".", "TupleType", ".", "UINT", ",", "PebbleTuple", ".", "Width", ".", ...
Associate the specified unsigned int with the provided key in the dictionary. If another key-value pair with the same key is already present in the dictionary, it will be replaced. @param key key with which the specified value is associated @param i value to be associated with the specified key
[ "Associate", "the", "specified", "unsigned", "int", "with", "the", "provided", "key", "in", "the", "dictionary", ".", "If", "another", "key", "-", "value", "pair", "with", "the", "same", "key", "is", "already", "present", "in", "the", "dictionary", "it", "...
train
https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L177-L180
Red5/red5-io
src/main/java/org/red5/io/utils/BufferUtils.java
BufferUtils.writeMediumInt
public static void writeMediumInt(IoBuffer out, int value) { """ Writes a Medium Int to the output buffer @param out Container to write to @param value Integer to write """ byte[] bytes = new byte[3]; bytes[0] = (byte) ((value >>> 16) & 0x000000FF); bytes[1] = (byte) ((value >>> 8...
java
public static void writeMediumInt(IoBuffer out, int value) { byte[] bytes = new byte[3]; bytes[0] = (byte) ((value >>> 16) & 0x000000FF); bytes[1] = (byte) ((value >>> 8) & 0x000000FF); bytes[2] = (byte) (value & 0x00FF); out.put(bytes); }
[ "public", "static", "void", "writeMediumInt", "(", "IoBuffer", "out", ",", "int", "value", ")", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "3", "]", ";", "bytes", "[", "0", "]", "=", "(", "byte", ")", "(", "(", "value", ">>>", "16",...
Writes a Medium Int to the output buffer @param out Container to write to @param value Integer to write
[ "Writes", "a", "Medium", "Int", "to", "the", "output", "buffer" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/utils/BufferUtils.java#L44-L50
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/API.java
API.validateFormatForViewAction
private static void validateFormatForViewAction(Format format) throws ApiException { """ Validates that the given format is supported for views and actions. @param format the format to validate. @throws ApiException if the format is not valid. @see #convertViewActionApiResponse(Format, String, ApiResponse) ...
java
private static void validateFormatForViewAction(Format format) throws ApiException { switch (format) { case JSON: case JSONP: case XML: case HTML: return; default: throw new ApiException(ApiException.Type.BAD_FORMAT, "The format OTHER should not be used with views and actions."); } }
[ "private", "static", "void", "validateFormatForViewAction", "(", "Format", "format", ")", "throws", "ApiException", "{", "switch", "(", "format", ")", "{", "case", "JSON", ":", "case", "JSONP", ":", "case", "XML", ":", "case", "HTML", ":", "return", ";", "...
Validates that the given format is supported for views and actions. @param format the format to validate. @throws ApiException if the format is not valid. @see #convertViewActionApiResponse(Format, String, ApiResponse)
[ "Validates", "that", "the", "given", "format", "is", "supported", "for", "views", "and", "actions", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/API.java#L609-L619
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java
XMLSerializer.writeDoubleAttribute
public void writeDoubleAttribute(String prefix, String namespaceURI, String localName, double value) throws Exception { """ Write double attribute. @param prefix the prefix @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception """ ...
java
public void writeDoubleAttribute(String prefix, String namespaceURI, String localName, double value) throws Exception { this.attribute(namespaceURI, localName, Double.toString(value)); }
[ "public", "void", "writeDoubleAttribute", "(", "String", "prefix", ",", "String", "namespaceURI", ",", "String", "localName", ",", "double", "value", ")", "throws", "Exception", "{", "this", ".", "attribute", "(", "namespaceURI", ",", "localName", ",", "Double",...
Write double attribute. @param prefix the prefix @param namespaceURI the namespace URI @param localName the local name @param value the value @throws Exception the exception
[ "Write", "double", "attribute", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLSerializer.java#L1681-L1684
phax/ph-css
ph-css/src/main/java/com/helger/css/reader/CSSReader.java
CSSReader.isValidCSS
public static boolean isValidCSS (@Nonnull final IReadableResource aRes, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion) { """ Check if the passed CSS resource can be parsed without error @param aRes The resou...
java
public static boolean isValidCSS (@Nonnull final IReadableResource aRes, @Nonnull final Charset aFallbackCharset, @Nonnull final ECSSVersion eVersion) { ValueEnforcer.notNull (aRes, "Resource"); ValueEnforcer.notNull (aFallbackCharset, "F...
[ "public", "static", "boolean", "isValidCSS", "(", "@", "Nonnull", "final", "IReadableResource", "aRes", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ",", "@", "Nonnull", "final", "ECSSVersion", "eVersion", ")", "{", "ValueEnforcer", ".", "notNull",...
Check if the passed CSS resource can be parsed without error @param aRes The resource to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used for reading the CSS file in case neither a <code>@charset</code> rule nor a BOM is present. May not be <code>null</code>. @param eVersion The ...
[ "Check", "if", "the", "passed", "CSS", "resource", "can", "be", "parsed", "without", "error" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/reader/CSSReader.java#L272-L287
h2oai/h2o-3
h2o-core/src/main/java/water/util/OSUtils.java
OSUtils.getTotalPhysicalMemory
public static long getTotalPhysicalMemory() { """ Safe call to obtain size of total physical memory. <p>It is platform dependent and returns size of machine physical memory in bytes</p> @return total size of machine physical memory in bytes or -1 if the attribute is not available. """ long memory = -...
java
public static long getTotalPhysicalMemory() { long memory = -1; try { MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); Object attribute = mBeanServer.getAttribute(new ObjectName("java.lang","type","OperatingSystem"), "TotalPhysicalMemorySize"); return (Long) attribute; } cat...
[ "public", "static", "long", "getTotalPhysicalMemory", "(", ")", "{", "long", "memory", "=", "-", "1", ";", "try", "{", "MBeanServer", "mBeanServer", "=", "ManagementFactory", ".", "getPlatformMBeanServer", "(", ")", ";", "Object", "attribute", "=", "mBeanServer"...
Safe call to obtain size of total physical memory. <p>It is platform dependent and returns size of machine physical memory in bytes</p> @return total size of machine physical memory in bytes or -1 if the attribute is not available.
[ "Safe", "call", "to", "obtain", "size", "of", "total", "physical", "memory", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/OSUtils.java#L17-L25
yatechorg/jedis-utils
src/main/java/org/yatech/jedis/collections/JedisSortedSet.java
JedisSortedSet.removeRangeByRank
public long removeRangeByRank(final long start, final long end) { """ Removes all elements in the sorted set with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at th...
java
public long removeRangeByRank(final long start, final long end) { return doWithJedis(new JedisCallable<Long>() { @Override public Long call(Jedis jedis) { return jedis.zremrangeByRank(getKey(), start, end); } }); }
[ "public", "long", "removeRangeByRank", "(", "final", "long", "start", ",", "final", "long", "end", ")", "{", "return", "doWithJedis", "(", "new", "JedisCallable", "<", "Long", ">", "(", ")", "{", "@", "Override", "public", "Long", "call", "(", "Jedis", "...
Removes all elements in the sorted set with rank between start and stop. Both start and stop are 0 -based indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the hig...
[ "Removes", "all", "elements", "in", "the", "sorted", "set", "with", "rank", "between", "start", "and", "stop", ".", "Both", "start", "and", "stop", "are", "0", "-", "based", "indexes", "with", "0", "being", "the", "element", "with", "the", "lowest", "sco...
train
https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisSortedSet.java#L321-L328
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createFor
Node createFor(Node init, Node cond, Node incr, Node body) { """ Returns a new FOR node. <p>Blocks have no type information, so this is functionally the same as calling {@code IR.forNode(init, cond, incr, body)}. It exists so that a pass can be consistent about always using {@code AstFactory} to create new no...
java
Node createFor(Node init, Node cond, Node incr, Node body) { return IR.forNode(init, cond, incr, body); }
[ "Node", "createFor", "(", "Node", "init", ",", "Node", "cond", ",", "Node", "incr", ",", "Node", "body", ")", "{", "return", "IR", ".", "forNode", "(", "init", ",", "cond", ",", "incr", ",", "body", ")", ";", "}" ]
Returns a new FOR node. <p>Blocks have no type information, so this is functionally the same as calling {@code IR.forNode(init, cond, incr, body)}. It exists so that a pass can be consistent about always using {@code AstFactory} to create new nodes.
[ "Returns", "a", "new", "FOR", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L154-L156
MTDdk/jawn
jawn-server/src/main/java/net/javapla/jawn/server/JawnFilter.java
JawnFilter.createServletRequest
private final static HttpServletRequest createServletRequest(final HttpServletRequest req, final String translatedPath) { """ Creates a new HttpServletRequest object. Useful, as we cannot modify an existing ServletRequest. Used when resources needs to have the {controller} stripped from the servletPath. @auth...
java
private final static HttpServletRequest createServletRequest(final HttpServletRequest req, final String translatedPath) { return new HttpServletRequestWrapper(req){ @Override public String getServletPath() { return translatedPath; } }; }
[ "private", "final", "static", "HttpServletRequest", "createServletRequest", "(", "final", "HttpServletRequest", "req", ",", "final", "String", "translatedPath", ")", "{", "return", "new", "HttpServletRequestWrapper", "(", "req", ")", "{", "@", "Override", "public", ...
Creates a new HttpServletRequest object. Useful, as we cannot modify an existing ServletRequest. Used when resources needs to have the {controller} stripped from the servletPath. @author MTD
[ "Creates", "a", "new", "HttpServletRequest", "object", ".", "Useful", "as", "we", "cannot", "modify", "an", "existing", "ServletRequest", ".", "Used", "when", "resources", "needs", "to", "have", "the", "{", "controller", "}", "stripped", "from", "the", "servle...
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-server/src/main/java/net/javapla/jawn/server/JawnFilter.java#L135-L142
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/util/Geometry.java
Geometry.getPathIntersect
public static Point2D getPathIntersect(final WiresConnection connection, final MultiPath path, final Point2D c, final int pointIndex) { """ Finds the intersection of the connector's end segment on a path. @param connection @param path @param c @param pointIndex @return """ final Point2DArray plis...
java
public static Point2D getPathIntersect(final WiresConnection connection, final MultiPath path, final Point2D c, final int pointIndex) { final Point2DArray plist = connection.getConnector().getLine().getPoint2DArray(); Point2D p = plist.get(pointIndex).copy(); final Point2D offsetP = ...
[ "public", "static", "Point2D", "getPathIntersect", "(", "final", "WiresConnection", "connection", ",", "final", "MultiPath", "path", ",", "final", "Point2D", "c", ",", "final", "int", "pointIndex", ")", "{", "final", "Point2DArray", "plist", "=", "connection", "...
Finds the intersection of the connector's end segment on a path. @param connection @param path @param c @param pointIndex @return
[ "Finds", "the", "intersection", "of", "the", "connector", "s", "end", "segment", "on", "a", "path", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/util/Geometry.java#L1179-L1214
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.deletePrivilege
public Boolean deletePrivilege(String id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Deletes a privilege @param id Id of the privilege to be deleted @return true if success @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnecti...
java
public Boolean deletePrivilege(String id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient(); OAuthClient oAuthClient = new OAuthClient(httpClient); URIBuilder url = new URIBuilder(...
[ "public", "Boolean", "deletePrivilege", "(", "String", "id", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "OneloginURLConnectionClient", "httpClient", "...
Deletes a privilege @param id Id of the privilege to be deleted @return true if success @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and throwOAuthProblemExcept...
[ "Deletes", "a", "privilege" ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L3416-L3440
JodaOrg/joda-time
src/main/java/org/joda/time/field/PreciseDateTimeField.java
PreciseDateTimeField.addWrapField
public long addWrapField(long instant, int amount) { """ Add to the component of the specified time instant, wrapping around within that component if necessary. @param instant the milliseconds from 1970-01-01T00:00:00Z to add to @param amount the amount of units to add (can be negative). @return the update...
java
public long addWrapField(long instant, int amount) { int thisValue = get(instant); int wrappedValue = FieldUtils.getWrappedValue (thisValue, amount, getMinimumValue(), getMaximumValue()); // copy code from set() to avoid repeat call to get() return instant + (wrappedValue - t...
[ "public", "long", "addWrapField", "(", "long", "instant", ",", "int", "amount", ")", "{", "int", "thisValue", "=", "get", "(", "instant", ")", ";", "int", "wrappedValue", "=", "FieldUtils", ".", "getWrappedValue", "(", "thisValue", ",", "amount", ",", "get...
Add to the component of the specified time instant, wrapping around within that component if necessary. @param instant the milliseconds from 1970-01-01T00:00:00Z to add to @param amount the amount of units to add (can be negative). @return the updated time instant.
[ "Add", "to", "the", "component", "of", "the", "specified", "time", "instant", "wrapping", "around", "within", "that", "component", "if", "necessary", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/field/PreciseDateTimeField.java#L95-L101
MenoData/Time4J
base/src/main/java/net/time4j/range/Months.java
Months.between
public static Months between(CalendarMonth m1, CalendarMonth m2) { """ /*[deutsch] <p>Bestimmt die Monatsdifferenz zwischen den angegebenen Kalendermonaten. </p> @param m1 first calendar month @param m2 second calendar month @return month difference """ PlainDate d1 = m1.atDayOfMonth(1); ...
java
public static Months between(CalendarMonth m1, CalendarMonth m2) { PlainDate d1 = m1.atDayOfMonth(1); PlainDate d2 = m2.atDayOfMonth(1); return Months.between(d1, d2); }
[ "public", "static", "Months", "between", "(", "CalendarMonth", "m1", ",", "CalendarMonth", "m2", ")", "{", "PlainDate", "d1", "=", "m1", ".", "atDayOfMonth", "(", "1", ")", ";", "PlainDate", "d2", "=", "m2", ".", "atDayOfMonth", "(", "1", ")", ";", "re...
/*[deutsch] <p>Bestimmt die Monatsdifferenz zwischen den angegebenen Kalendermonaten. </p> @param m1 first calendar month @param m2 second calendar month @return month difference
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Bestimmt", "die", "Monatsdifferenz", "zwischen", "den", "angegebenen", "Kalendermonaten", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/Months.java#L139-L145
openengsb/openengsb
components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java
EDBConverter.getEntryNameForMapKey
public static String getEntryNameForMapKey(String property, Integer index) { """ Returns the entry name for a map key in the EDB format. E.g. the map key for the property "map" with the index 0 would be "map.0.key". """ return getEntryNameForMap(property, true, index); }
java
public static String getEntryNameForMapKey(String property, Integer index) { return getEntryNameForMap(property, true, index); }
[ "public", "static", "String", "getEntryNameForMapKey", "(", "String", "property", ",", "Integer", "index", ")", "{", "return", "getEntryNameForMap", "(", "property", ",", "true", ",", "index", ")", ";", "}" ]
Returns the entry name for a map key in the EDB format. E.g. the map key for the property "map" with the index 0 would be "map.0.key".
[ "Returns", "the", "entry", "name", "for", "a", "map", "key", "in", "the", "EDB", "format", ".", "E", ".", "g", ".", "the", "map", "key", "for", "the", "property", "map", "with", "the", "index", "0", "would", "be", "map", ".", "0", ".", "key", "."...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java#L504-L506
arangodb/spring-data
src/main/java/com/arangodb/springframework/repository/query/derived/BindParameterBinding.java
BindParameterBinding.ignoreArgumentCase
private Object ignoreArgumentCase(final Object argument, final boolean shouldIgnoreCase) { """ Lowers case of a given argument if its type is String, Iterable<String> or String[] if shouldIgnoreCase is true @param argument @param shouldIgnoreCase @return """ if (!shouldIgnoreCase) { return argument; ...
java
private Object ignoreArgumentCase(final Object argument, final boolean shouldIgnoreCase) { if (!shouldIgnoreCase) { return argument; } if (argument instanceof String) { return ((String) argument).toLowerCase(); } final List<String> lowered = new LinkedList<>(); if (argument.getClass().isArray()) { ...
[ "private", "Object", "ignoreArgumentCase", "(", "final", "Object", "argument", ",", "final", "boolean", "shouldIgnoreCase", ")", "{", "if", "(", "!", "shouldIgnoreCase", ")", "{", "return", "argument", ";", "}", "if", "(", "argument", "instanceof", "String", "...
Lowers case of a given argument if its type is String, Iterable<String> or String[] if shouldIgnoreCase is true @param argument @param shouldIgnoreCase @return
[ "Lowers", "case", "of", "a", "given", "argument", "if", "its", "type", "is", "String", "Iterable<String", ">", "or", "String", "[]", "if", "shouldIgnoreCase", "is", "true" ]
train
https://github.com/arangodb/spring-data/blob/ff8ae53986b353964b9b90bd8199996d5aabf0c1/src/main/java/com/arangodb/springframework/repository/query/derived/BindParameterBinding.java#L184-L205
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/utils/ClassUtils.java
ClassUtils.getSourcePaths
public static List<String> getSourcePaths(Context context) throws PackageManager.NameNotFoundException, IOException { """ get all the dex path @param context the application context @return all the dex path @throws PackageManager.NameNotFoundException @throws IOException """ ApplicationInfo appli...
java
public static List<String> getSourcePaths(Context context) throws PackageManager.NameNotFoundException, IOException { ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 0); File sourceApk = new File(applicationInfo.sourceDir); List<String>...
[ "public", "static", "List", "<", "String", ">", "getSourcePaths", "(", "Context", "context", ")", "throws", "PackageManager", ".", "NameNotFoundException", ",", "IOException", "{", "ApplicationInfo", "applicationInfo", "=", "context", ".", "getPackageManager", "(", ...
get all the dex path @param context the application context @return all the dex path @throws PackageManager.NameNotFoundException @throws IOException
[ "get", "all", "the", "dex", "path" ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/utils/ClassUtils.java#L117-L151
networknt/light-4j
client/src/main/java/com/networknt/client/ssl/ClientX509ExtendedTrustManager.java
ClientX509ExtendedTrustManager.checkIdentity
private void checkIdentity(SSLSession session, X509Certificate cert) throws CertificateException { """ check server identify against hostnames. This method is used to enhance X509TrustManager to provide standard identity check. This method can be applied to both clients and servers. @param session @param ce...
java
private void checkIdentity(SSLSession session, X509Certificate cert) throws CertificateException { if (session == null) { throw new CertificateException("No handshake session"); } if (EndpointIdentificationAlgorithm.HTTPS == identityAlg) { String hostname = session.getPeerHost(); APINameChecker.verifyAn...
[ "private", "void", "checkIdentity", "(", "SSLSession", "session", ",", "X509Certificate", "cert", ")", "throws", "CertificateException", "{", "if", "(", "session", "==", "null", ")", "{", "throw", "new", "CertificateException", "(", "\"No handshake session\"", ")", ...
check server identify against hostnames. This method is used to enhance X509TrustManager to provide standard identity check. This method can be applied to both clients and servers. @param session @param cert @throws CertificateException
[ "check", "server", "identify", "against", "hostnames", ".", "This", "method", "is", "used", "to", "enhance", "X509TrustManager", "to", "provide", "standard", "identity", "check", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/ssl/ClientX509ExtendedTrustManager.java#L175-L184
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java
MessageFormat.findOtherSubMessage
private int findOtherSubMessage(int partIndex) { """ Finds the "other" sub-message. @param partIndex the index of the first PluralFormat argument style part. @return the "other" sub-message start part index. """ int count=msgPattern.countParts(); MessagePattern.Part part=msgPattern.getPart(pa...
java
private int findOtherSubMessage(int partIndex) { int count=msgPattern.countParts(); MessagePattern.Part part=msgPattern.getPart(partIndex); if(part.getType().hasNumericValue()) { ++partIndex; } // Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples ...
[ "private", "int", "findOtherSubMessage", "(", "int", "partIndex", ")", "{", "int", "count", "=", "msgPattern", ".", "countParts", "(", ")", ";", "MessagePattern", ".", "Part", "part", "=", "msgPattern", ".", "getPart", "(", "partIndex", ")", ";", "if", "("...
Finds the "other" sub-message. @param partIndex the index of the first PluralFormat argument style part. @return the "other" sub-message start part index.
[ "Finds", "the", "other", "sub", "-", "message", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1940-L1965
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.matchPattern
private final boolean matchPattern(byte[][] patterns, int bufferIndex) { """ Locate a feature in the file by match a byte pattern. @param patterns patterns to match @param bufferIndex start index @return true if the bytes at the position match a pattern """ boolean match = false; for (byte[] p...
java
private final boolean matchPattern(byte[][] patterns, int bufferIndex) { boolean match = false; for (byte[] pattern : patterns) { int index = 0; match = true; for (byte b : pattern) { if (b != m_buffer[bufferIndex + index]) { ...
[ "private", "final", "boolean", "matchPattern", "(", "byte", "[", "]", "[", "]", "patterns", ",", "int", "bufferIndex", ")", "{", "boolean", "match", "=", "false", ";", "for", "(", "byte", "[", "]", "pattern", ":", "patterns", ")", "{", "int", "index", ...
Locate a feature in the file by match a byte pattern. @param patterns patterns to match @param bufferIndex start index @return true if the bytes at the position match a pattern
[ "Locate", "a", "feature", "in", "the", "file", "by", "match", "a", "byte", "pattern", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L275-L297
OpenLiberty/open-liberty
dev/wlp.lib.extract/src/wlp/lib/extract/ShutdownHook.java
ShutdownHook.writeCygwinCleanup
private void writeCygwinCleanup(File file, BufferedWriter bw) throws IOException { """ Write logic for Cygwin cleanup script @param file - script File object @param bw - bufferedWriter to write into script file @throws IOException """ // Under cygwin, must explicitly kill the process that runs ...
java
private void writeCygwinCleanup(File file, BufferedWriter bw) throws IOException { // Under cygwin, must explicitly kill the process that runs // the server. It simply does not die on its own. And it's // JVM holds file locks which will prevent cleanup of extraction // directory. So kill...
[ "private", "void", "writeCygwinCleanup", "(", "File", "file", ",", "BufferedWriter", "bw", ")", "throws", "IOException", "{", "// Under cygwin, must explicitly kill the process that runs", "// the server. It simply does not die on its own. And it's", "// JVM holds file locks which will...
Write logic for Cygwin cleanup script @param file - script File object @param bw - bufferedWriter to write into script file @throws IOException
[ "Write", "logic", "for", "Cygwin", "cleanup", "script" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/ShutdownHook.java#L198-L207
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.eachByte
public static void eachByte(URL url, @ClosureParams(value = SimpleType.class, options = "byte") Closure closure) throws IOException { """ Reads the InputStream from this URL, passing each byte to the given closure. The URL stream will be closed before this method returns. @param url url to iterate over @...
java
public static void eachByte(URL url, @ClosureParams(value = SimpleType.class, options = "byte") Closure closure) throws IOException { InputStream is = url.openConnection().getInputStream(); IOGroovyMethods.eachByte(is, closure); }
[ "public", "static", "void", "eachByte", "(", "URL", "url", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"byte\"", ")", "Closure", "closure", ")", "throws", "IOException", "{", "InputStream", "is", "=", "u...
Reads the InputStream from this URL, passing each byte to the given closure. The URL stream will be closed before this method returns. @param url url to iterate over @param closure closure to apply to each byte @throws IOException if an IOException occurs. @see IOGroovyMethods#eachByte(java.io.InputStream, groovy...
[ "Reads", "the", "InputStream", "from", "this", "URL", "passing", "each", "byte", "to", "the", "given", "closure", ".", "The", "URL", "stream", "will", "be", "closed", "before", "this", "method", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L2338-L2341
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.switchMapSingle
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final <R> Flowable<R> switchMapSingle(@NonNull Function<? super T, ? extends SingleSource<? extends R>> mapper) { """ Maps the upstream items into {@link SingleSource}s and switches (su...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final <R> Flowable<R> switchMapSingle(@NonNull Function<? super T, ? extends SingleSource<? extends R>> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); retur...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "UNBOUNDED_IN", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "R", ">", "Flowable", "<", "R", ">", "switchMapSingle", "(", "@", ...
Maps the upstream items into {@link SingleSource}s and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one while failing immediately if this {@code Flowable} or any of the active inner {@code SingleSource}s fail. <p> <...
[ "Maps", "the", "upstream", "items", "into", "{" ]
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L14987-L14993
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/dialogs/JSpringPanel.java
JSpringPanel.constraintSouth
public void constraintSouth(JComponent target, JComponent top, JComponent bottom, int padV ) { """ Constrain it to the top of it's bottom panel and prevent it from getting crushed below it's size """ if( bottom == null ) { layout.putConstraint(SpringLayout.SOUTH, target, -padV, SpringLayout...
java
public void constraintSouth(JComponent target, JComponent top, JComponent bottom, int padV ) { if( bottom == null ) { layout.putConstraint(SpringLayout.SOUTH, target, -padV, SpringLayout.SOUTH, this); } else { Spring a = Spring.sum(Spring.constant(-padV),layout.getConstraint(Spri...
[ "public", "void", "constraintSouth", "(", "JComponent", "target", ",", "JComponent", "top", ",", "JComponent", "bottom", ",", "int", "padV", ")", "{", "if", "(", "bottom", "==", "null", ")", "{", "layout", ".", "putConstraint", "(", "SpringLayout", ".", "S...
Constrain it to the top of it's bottom panel and prevent it from getting crushed below it's size
[ "Constrain", "it", "to", "the", "top", "of", "it", "s", "bottom", "panel", "and", "prevent", "it", "from", "getting", "crushed", "below", "it", "s", "size" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/dialogs/JSpringPanel.java#L217-L230
vvakame/JsonPullParser
jsonpullparser-apt/src/main/java/net/vvakame/apt/AptUtil.java
AptUtil.getPackageName
public static String getPackageName(Elements elementUtils, Types typeUtils, TypeMirror type) { """ Returns the package name of the given {@link TypeMirror}. @param elementUtils @param typeUtils @param type @return the package name @author backpaper0 @author vvakame """ TypeVisitor<DeclaredType, Object>...
java
public static String getPackageName(Elements elementUtils, Types typeUtils, TypeMirror type) { TypeVisitor<DeclaredType, Object> tv = new SimpleTypeVisitor6<DeclaredType, Object>() { @Override public DeclaredType visitDeclared(DeclaredType t, Object p) { return t; } }; DeclaredType dt = type.accept(...
[ "public", "static", "String", "getPackageName", "(", "Elements", "elementUtils", ",", "Types", "typeUtils", ",", "TypeMirror", "type", ")", "{", "TypeVisitor", "<", "DeclaredType", ",", "Object", ">", "tv", "=", "new", "SimpleTypeVisitor6", "<", "DeclaredType", ...
Returns the package name of the given {@link TypeMirror}. @param elementUtils @param typeUtils @param type @return the package name @author backpaper0 @author vvakame
[ "Returns", "the", "package", "name", "of", "the", "given", "{" ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-apt/src/main/java/net/vvakame/apt/AptUtil.java#L200-L224
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/ConverterUtil.java
ConverterUtil.toProperties
public static Properties toProperties(Map<?, ?> _map) { """ Convertes a map to a Properties object. @param _map @return Properties object """ Properties props = new Properties(); props.putAll(_map); return props; }
java
public static Properties toProperties(Map<?, ?> _map) { Properties props = new Properties(); props.putAll(_map); return props; }
[ "public", "static", "Properties", "toProperties", "(", "Map", "<", "?", ",", "?", ">", "_map", ")", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "props", ".", "putAll", "(", "_map", ")", ";", "return", "props", ";", "}" ]
Convertes a map to a Properties object. @param _map @return Properties object
[ "Convertes", "a", "map", "to", "a", "Properties", "object", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/ConverterUtil.java#L60-L64
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java
JobHistoryService.getJobByJobID
public JobDetails getJobByJobID(QualifiedJobId jobId, boolean populateTasks) throws IOException { """ Returns a specific job's data by job ID @param jobId the fully qualified cluster + job identifier @param populateTasks if {@code true} populate the {@link TaskDetails} records for the job """ JobD...
java
public JobDetails getJobByJobID(QualifiedJobId jobId, boolean populateTasks) throws IOException { JobDetails job = null; JobKey key = idService.getJobKeyById(jobId); if (key != null) { byte[] historyKey = jobKeyConv.toBytes(key); Table historyTable = hbaseConnection.getTable(Tabl...
[ "public", "JobDetails", "getJobByJobID", "(", "QualifiedJobId", "jobId", ",", "boolean", "populateTasks", ")", "throws", "IOException", "{", "JobDetails", "job", "=", "null", ";", "JobKey", "key", "=", "idService", ".", "getJobKeyById", "(", "jobId", ")", ";", ...
Returns a specific job's data by job ID @param jobId the fully qualified cluster + job identifier @param populateTasks if {@code true} populate the {@link TaskDetails} records for the job
[ "Returns", "a", "specific", "job", "s", "data", "by", "job", "ID" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java#L424-L443
normanmaurer/niosmtp
src/main/java/me/normanmaurer/niosmtp/delivery/chain/EhloResponseListener.java
EhloResponseListener.initSupportedExtensions
private void initSupportedExtensions(SMTPClientSession session, SMTPResponse response) { """ Return all supported extensions which are included in the {@link SMTPResponse} @param response @return extensions """ Iterator<String> lines = response.getLines().iterator(); while(lines.hasNext()...
java
private void initSupportedExtensions(SMTPClientSession session, SMTPResponse response) { Iterator<String> lines = response.getLines().iterator(); while(lines.hasNext()) { String line = lines.next(); if (line.equalsIgnoreCase(PIPELINING_EXTENSION)) { session.a...
[ "private", "void", "initSupportedExtensions", "(", "SMTPClientSession", "session", ",", "SMTPResponse", "response", ")", "{", "Iterator", "<", "String", ">", "lines", "=", "response", ".", "getLines", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "...
Return all supported extensions which are included in the {@link SMTPResponse} @param response @return extensions
[ "Return", "all", "supported", "extensions", "which", "are", "included", "in", "the", "{", "@link", "SMTPResponse", "}" ]
train
https://github.com/normanmaurer/niosmtp/blob/817e775610fc74de3ea5a909d4b98d717d8aa4d4/src/main/java/me/normanmaurer/niosmtp/delivery/chain/EhloResponseListener.java#L153-L163
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/TransformationUtils.java
TransformationUtils.getWorldToRectangle
public static AffineTransformation getWorldToRectangle( Envelope worldEnvelope, Rectangle pixelRectangle ) { """ Get the affine transform that brings from the world envelope to the rectangle. @param worldEnvelope the envelope. @param pixelRectangle the destination rectangle. @return the transform. """ ...
java
public static AffineTransformation getWorldToRectangle( Envelope worldEnvelope, Rectangle pixelRectangle ) { int cols = (int) pixelRectangle.getWidth(); int rows = (int) pixelRectangle.getHeight(); double worldWidth = worldEnvelope.getWidth(); double worldHeight = worldEnvelope.getHeight...
[ "public", "static", "AffineTransformation", "getWorldToRectangle", "(", "Envelope", "worldEnvelope", ",", "Rectangle", "pixelRectangle", ")", "{", "int", "cols", "=", "(", "int", ")", "pixelRectangle", ".", "getWidth", "(", ")", ";", "int", "rows", "=", "(", "...
Get the affine transform that brings from the world envelope to the rectangle. @param worldEnvelope the envelope. @param pixelRectangle the destination rectangle. @return the transform.
[ "Get", "the", "affine", "transform", "that", "brings", "from", "the", "world", "envelope", "to", "the", "rectangle", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/TransformationUtils.java#L69-L94
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/alg/InputSanityCheck.java
InputSanityCheck.checkReshape
public static <T extends ImageGray<T>> T checkReshape(T target , ImageGray testImage , Class<T> targetType ) { """ Checks to see if the target image is null or if it is a different size than the test image. If it is null then a new image is returned, otherwise target is reshaped and returned. @param target ...
java
public static <T extends ImageGray<T>> T checkReshape(T target , ImageGray testImage , Class<T> targetType ) { if( target == null ) { return GeneralizedImageOps.createSingleBand(targetType, testImage.width, testImage.height); } else if( target.width != testImage.width || target.height != testImage.height ) { ...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "T", "checkReshape", "(", "T", "target", ",", "ImageGray", "testImage", ",", "Class", "<", "T", ">", "targetType", ")", "{", "if", "(", "target", "==", "null", ")", "{", "retur...
Checks to see if the target image is null or if it is a different size than the test image. If it is null then a new image is returned, otherwise target is reshaped and returned. @param target @param testImage @param targetType @param <T> @return
[ "Checks", "to", "see", "if", "the", "target", "image", "is", "null", "or", "if", "it", "is", "a", "different", "size", "than", "the", "test", "image", ".", "If", "it", "is", "null", "then", "a", "new", "image", "is", "returned", "otherwise", "target", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/alg/InputSanityCheck.java#L44-L52
GII/broccoli
broccoli-impl/src/main/java/com/hi3project/broccoli/bsdm/impl/grounding/AbstractFunctionalityGrounding.java
AbstractFunctionalityGrounding.executeWithValues
@Override public void executeWithValues(Collection<IAnnotatedValue> values, IAsyncMessageClient clientCallback) throws ModelException { """ /* It executes the functionality, using the given inputs and communicating the result via the given IAsyncMessageClient callback. The execution can be resolved in two w...
java
@Override public void executeWithValues(Collection<IAnnotatedValue> values, IAsyncMessageClient clientCallback) throws ModelException { // a new conversation ID is generated String conversationId = this.idGenerator.getSId(); if (null != this.getServiceImplementation()) { ...
[ "@", "Override", "public", "void", "executeWithValues", "(", "Collection", "<", "IAnnotatedValue", ">", "values", ",", "IAsyncMessageClient", "clientCallback", ")", "throws", "ModelException", "{", "// a new conversation ID is generated", "String", "conversationId", "=", ...
/* It executes the functionality, using the given inputs and communicating the result via the given IAsyncMessageClient callback. The execution can be resolved in two ways: using a functionality implementation (if there is any) or communicating throught the grounding.
[ "/", "*", "It", "executes", "the", "functionality", "using", "the", "given", "inputs", "and", "communicating", "the", "result", "via", "the", "given", "IAsyncMessageClient", "callback", ".", "The", "execution", "can", "be", "resolved", "in", "two", "ways", ":"...
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-impl/src/main/java/com/hi3project/broccoli/bsdm/impl/grounding/AbstractFunctionalityGrounding.java#L234-L270
indeedeng/util
varexport/src/main/java/com/indeed/util/varexport/VarExporter.java
VarExporter.dump
public void dump(final PrintWriter out, final boolean includeDoc) { """ Write all variables, one per line, to the given writer, in the format "name=value". Will escape values for compatibility with loading into {@link java.util.Properties}. @param out writer @param includeDoc true if documentation comments shou...
java
public void dump(final PrintWriter out, final boolean includeDoc) { visitVariables(new Visitor() { public void visit(Variable var) { var.write(out, includeDoc); } }); }
[ "public", "void", "dump", "(", "final", "PrintWriter", "out", ",", "final", "boolean", "includeDoc", ")", "{", "visitVariables", "(", "new", "Visitor", "(", ")", "{", "public", "void", "visit", "(", "Variable", "var", ")", "{", "var", ".", "write", "(", ...
Write all variables, one per line, to the given writer, in the format "name=value". Will escape values for compatibility with loading into {@link java.util.Properties}. @param out writer @param includeDoc true if documentation comments should be included
[ "Write", "all", "variables", "one", "per", "line", "to", "the", "given", "writer", "in", "the", "format", "name", "=", "value", ".", "Will", "escape", "values", "for", "compatibility", "with", "loading", "into", "{" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/varexport/src/main/java/com/indeed/util/varexport/VarExporter.java#L414-L420
banq/jdonframework
src/main/java/com/jdon/util/UtilDateTime.java
UtilDateTime.toSqlTime
public static java.sql.Time toSqlTime(int hour, int minute, int second) { """ Makes a java.sql.Time from separate ints for hour, minute, and second. @param hour The hour int @param minute The minute int @param second The second int @return A java.sql.Time made from separate ints for hour, minute, and sec...
java
public static java.sql.Time toSqlTime(int hour, int minute, int second) { java.util.Date newDate = toDate(0, 0, 0, hour, minute, second); if (newDate != null) return new java.sql.Time(newDate.getTime()); else return null; }
[ "public", "static", "java", ".", "sql", ".", "Time", "toSqlTime", "(", "int", "hour", ",", "int", "minute", ",", "int", "second", ")", "{", "java", ".", "util", ".", "Date", "newDate", "=", "toDate", "(", "0", ",", "0", ",", "0", ",", "hour", ","...
Makes a java.sql.Time from separate ints for hour, minute, and second. @param hour The hour int @param minute The minute int @param second The second int @return A java.sql.Time made from separate ints for hour, minute, and second.
[ "Makes", "a", "java", ".", "sql", ".", "Time", "from", "separate", "ints", "for", "hour", "minute", "and", "second", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L195-L202
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SpringUtils.java
SpringUtils.getSpringBean
public static Object getSpringBean(ApplicationContext appContext, String id) { """ Gets a bean by its id. @param appContext @param name @return """ try { Object bean = appContext.getBean(id); return bean; } catch (BeansException e) { return null; ...
java
public static Object getSpringBean(ApplicationContext appContext, String id) { try { Object bean = appContext.getBean(id); return bean; } catch (BeansException e) { return null; } }
[ "public", "static", "Object", "getSpringBean", "(", "ApplicationContext", "appContext", ",", "String", "id", ")", "{", "try", "{", "Object", "bean", "=", "appContext", ".", "getBean", "(", "id", ")", ";", "return", "bean", ";", "}", "catch", "(", "BeansExc...
Gets a bean by its id. @param appContext @param name @return
[ "Gets", "a", "bean", "by", "its", "id", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SpringUtils.java#L25-L32
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/filter/SubFileFilter.java
SubFileFilter.init
public void init(Record record, Record recordMain, String keyName, BaseField fldMainFile, String fldMainFileName, BaseField fldMainFile2, String fldMainFileName2, BaseField fldMainFile3, String fldMainFileName3, boolean bSetFilterIfNull, boolean bRefreshLastIfNotCurrent, boolean bAddNewHeaderOnAdd) { """ Construct...
java
public void init(Record record, Record recordMain, String keyName, BaseField fldMainFile, String fldMainFileName, BaseField fldMainFile2, String fldMainFileName2, BaseField fldMainFile3, String fldMainFileName3, boolean bSetFilterIfNull, boolean bRefreshLastIfNotCurrent, boolean bAddNewHeaderOnAdd) { // For this ...
[ "public", "void", "init", "(", "Record", "record", ",", "Record", "recordMain", ",", "String", "keyName", ",", "BaseField", "fldMainFile", ",", "String", "fldMainFileName", ",", "BaseField", "fldMainFile2", ",", "String", "fldMainFileName2", ",", "BaseField", "fld...
Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param recordMain The main record to create a sub-query for. @param fldMainFile First field in the key fields. @param fldMainFile2 Second field in the key fields. @param fldMainFile3 Third field in the key fields. @param...
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/filter/SubFileFilter.java#L160-L180
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.hasValue
public boolean hasValue(String property, String value) { """ Check if the property has the value @param property property name @param value property value @return true if property has the value """ boolean hasValue = false; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property,...
java
public boolean hasValue(String property, String value) { boolean hasValue = false; if (has()) { Map<String, Object> fieldValues = buildFieldValues(property, value); TResult result = getDao().queryForFieldValues(fieldValues); try { hasValue = result.getCount() > 0; } finally { result.close(); ...
[ "public", "boolean", "hasValue", "(", "String", "property", ",", "String", "value", ")", "{", "boolean", "hasValue", "=", "false", ";", "if", "(", "has", "(", ")", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "buildFieldValues"...
Check if the property has the value @param property property name @param value property value @return true if property has the value
[ "Check", "if", "the", "property", "has", "the", "value" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L284-L296
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java
EmbedBuilder.setAuthor
public EmbedBuilder setAuthor(String name, String url, String iconUrl) { """ Sets the author of the embed. @param name The name of the author. @param url The url of the author. @param iconUrl The url of the author's icon. @return The current instance in order to chain call methods. """ delegate.s...
java
public EmbedBuilder setAuthor(String name, String url, String iconUrl) { delegate.setAuthor(name, url, iconUrl); return this; }
[ "public", "EmbedBuilder", "setAuthor", "(", "String", "name", ",", "String", "url", ",", "String", "iconUrl", ")", "{", "delegate", ".", "setAuthor", "(", "name", ",", "url", ",", "iconUrl", ")", ";", "return", "this", ";", "}" ]
Sets the author of the embed. @param name The name of the author. @param url The url of the author. @param iconUrl The url of the author's icon. @return The current instance in order to chain call methods.
[ "Sets", "the", "author", "of", "the", "embed", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java#L372-L375
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/json/ObjectToJsonConverter.java
ObjectToJsonConverter.convertToJson
public Object convertToJson(Object pValue, List<String> pPathParts, JsonConvertOptions pOptions) throws AttributeNotFoundException { """ Convert the return value to a JSON object. @param pValue the value to convert @param pPathParts path parts to use for extraction @param pOptions options used...
java
public Object convertToJson(Object pValue, List<String> pPathParts, JsonConvertOptions pOptions) throws AttributeNotFoundException { Stack<String> extraStack = pPathParts != null ? EscapeUtil.reversePath(pPathParts) : new Stack<String>(); return extractObjectWithContext(pValue, extraStack, p...
[ "public", "Object", "convertToJson", "(", "Object", "pValue", ",", "List", "<", "String", ">", "pPathParts", ",", "JsonConvertOptions", "pOptions", ")", "throws", "AttributeNotFoundException", "{", "Stack", "<", "String", ">", "extraStack", "=", "pPathParts", "!="...
Convert the return value to a JSON object. @param pValue the value to convert @param pPathParts path parts to use for extraction @param pOptions options used for parsing @return the converter object. This either a subclass of {@link org.json.simple.JSONAware} or a basic data type like String or Long. @throws Attribu...
[ "Convert", "the", "return", "value", "to", "a", "JSON", "object", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/ObjectToJsonConverter.java#L108-L112
Netflix/karyon
karyon2-governator/src/main/java/netflix/karyon/Karyon.java
Karyon.forUdpServer
public static KaryonServer forUdpServer(UdpServer<?, ?> server, Module... modules) { """ Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link UdpServer} with it's own lifecycle. @param server UDP server @param modules Additional modules if any. @return {@link KaryonServer} which...
java
public static KaryonServer forUdpServer(UdpServer<?, ?> server, Module... modules) { return forUdpServer(server, toBootstrapModule(modules)); }
[ "public", "static", "KaryonServer", "forUdpServer", "(", "UdpServer", "<", "?", ",", "?", ">", "server", ",", "Module", "...", "modules", ")", "{", "return", "forUdpServer", "(", "server", ",", "toBootstrapModule", "(", "modules", ")", ")", ";", "}" ]
Creates a new {@link KaryonServer} which combines lifecycle of the passed {@link UdpServer} with it's own lifecycle. @param server UDP server @param modules Additional modules if any. @return {@link KaryonServer} which is to be used to start the created server.
[ "Creates", "a", "new", "{", "@link", "KaryonServer", "}", "which", "combines", "lifecycle", "of", "the", "passed", "{", "@link", "UdpServer", "}", "with", "it", "s", "own", "lifecycle", "." ]
train
https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-governator/src/main/java/netflix/karyon/Karyon.java#L231-L233
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeLong
public static int writeLong(byte[] array, int offset, long v) { """ Write a long to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written """ array[offset + 0] = (byte) (v >>> 56); array[offset + 1] = (byt...
java
public static int writeLong(byte[] array, int offset, long v) { array[offset + 0] = (byte) (v >>> 56); array[offset + 1] = (byte) (v >>> 48); array[offset + 2] = (byte) (v >>> 40); array[offset + 3] = (byte) (v >>> 32); array[offset + 4] = (byte) (v >>> 24); array[offset + 5] = (byte) (v >>> 16)...
[ "public", "static", "int", "writeLong", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "long", "v", ")", "{", "array", "[", "offset", "+", "0", "]", "=", "(", "byte", ")", "(", "v", ">>>", "56", ")", ";", "array", "[", "offset", "+"...
Write a long to the byte array at the given offset. @param array Array to write to @param offset Offset to write to @param v data @return number of bytes written
[ "Write", "a", "long", "to", "the", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L136-L146
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/FontLoader.java
FontLoader.loadFont
public LOADSTATUS loadFont(String path) throws VectorPrintException { """ Bottleneck method for loading fonts, calls {@link FontFactory#register(java.lang.String) } for iText, {@link GraphicsEnvironment#registerFont(java.awt.Font) } for awt. @param path the path to the font file ed @return @throws VectorPrint...
java
public LOADSTATUS loadFont(String path) throws VectorPrintException { try { File f = new File(path); LOADSTATUS stat = LOADSTATUS.NOT_LOADED; if (loadAWTFonts) { Font fo = Font.createFont(Font.TRUETYPE_FONT, f); GraphicsEnvironment.getLocalGraphicsEnvironment()....
[ "public", "LOADSTATUS", "loadFont", "(", "String", "path", ")", "throws", "VectorPrintException", "{", "try", "{", "File", "f", "=", "new", "File", "(", "path", ")", ";", "LOADSTATUS", "stat", "=", "LOADSTATUS", ".", "NOT_LOADED", ";", "if", "(", "loadAWTF...
Bottleneck method for loading fonts, calls {@link FontFactory#register(java.lang.String) } for iText, {@link GraphicsEnvironment#registerFont(java.awt.Font) } for awt. @param path the path to the font file ed @return @throws VectorPrintException
[ "Bottleneck", "method", "for", "loading", "fonts", "calls", "{" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/FontLoader.java#L115-L138
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java
SoapCallMapColumnFixture.callCheckServiceImpl
protected XmlHttpResponse callCheckServiceImpl(String urlSymbolKey, String soapAction) { """ Creates check response, calls service using configured check template and current row's values and calls SOAP service. @param urlSymbolKey key of symbol containing check service's URL. @param soapAction SOAPAction header...
java
protected XmlHttpResponse callCheckServiceImpl(String urlSymbolKey, String soapAction) { String url = getSymbol(urlSymbolKey).toString(); XmlHttpResponse response = getEnvironment().createInstance(getCheckResponseClass()); callSoapService(url, getCheckTemplateName(), soapAction, response); ...
[ "protected", "XmlHttpResponse", "callCheckServiceImpl", "(", "String", "urlSymbolKey", ",", "String", "soapAction", ")", "{", "String", "url", "=", "getSymbol", "(", "urlSymbolKey", ")", ".", "toString", "(", ")", ";", "XmlHttpResponse", "response", "=", "getEnvir...
Creates check response, calls service using configured check template and current row's values and calls SOAP service. @param urlSymbolKey key of symbol containing check service's URL. @param soapAction SOAPAction header value (null if no header is required). @return filled check response
[ "Creates", "check", "response", "calls", "service", "using", "configured", "check", "template", "and", "current", "row", "s", "values", "and", "calls", "SOAP", "service", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java#L69-L74
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.touchPost
public void touchPost(final long postId, final TimeZone tz) throws SQLException { """ "Touches" the last modified time for a post. @param postId The post id. @param tz The local time zone. @throws SQLException on database error or invalid post id. """ if(postId < 1L) { throw new SQLException(...
java
public void touchPost(final long postId, final TimeZone tz) throws SQLException { if(postId < 1L) { throw new SQLException("The post id must be specified for update"); } long modifiedTimestamp = System.currentTimeMillis(); int offset = tz.getOffset(modifiedTimestamp); Connection...
[ "public", "void", "touchPost", "(", "final", "long", "postId", ",", "final", "TimeZone", "tz", ")", "throws", "SQLException", "{", "if", "(", "postId", "<", "1L", ")", "{", "throw", "new", "SQLException", "(", "\"The post id must be specified for update\"", ")",...
"Touches" the last modified time for a post. @param postId The post id. @param tz The local time zone. @throws SQLException on database error or invalid post id.
[ "Touches", "the", "last", "modified", "time", "for", "a", "post", "." ]
train
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L1746-L1768
facebookarchive/hadoop-20
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorTaskTracker.java
SimulatorTaskTracker.processHeartbeatEvent
private List<SimulatorEvent> processHeartbeatEvent(HeartbeatEvent event) { """ Transmits a heartbeat event to the jobtracker and processes the response. @param event HeartbeatEvent to process @return list of new events generated in response """ if (LOG.isDebugEnabled()) { LOG.debug("Processing he...
java
private List<SimulatorEvent> processHeartbeatEvent(HeartbeatEvent event) { if (LOG.isDebugEnabled()) { LOG.debug("Processing heartbeat event " + event); } long now = event.getTimeStamp(); // Create the TaskTrackerStatus to report progressTaskStatuses(now); List<TaskStatus> taskSt...
[ "private", "List", "<", "SimulatorEvent", ">", "processHeartbeatEvent", "(", "HeartbeatEvent", "event", ")", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", "\"Processing heartbeat event \"", "+", "event", ")", ";", ...
Transmits a heartbeat event to the jobtracker and processes the response. @param event HeartbeatEvent to process @return list of new events generated in response
[ "Transmits", "a", "heartbeat", "event", "to", "the", "jobtracker", "and", "processes", "the", "response", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorTaskTracker.java#L589-L640
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/StatusCommand.java
StatusCommand.getSiteStatus
public static Status getSiteStatus(String site, String token) throws Exception { """ Retrieves the status of a Cadmium site into a {@link Status} Object. @param site The site uri of the Cadmium site to get the status from. @param token The Github API token used for authenticating the request. @return @throws...
java
public static Status getSiteStatus(String site, String token) throws Exception { HttpClient client = httpClient(); HttpGet get = new HttpGet(site + StatusCommand.JERSEY_ENDPOINT); addAuthHeader(token, get); HttpResponse response = client.execute(get); HttpEntity entity = response.getEntity...
[ "public", "static", "Status", "getSiteStatus", "(", "String", "site", ",", "String", "token", ")", "throws", "Exception", "{", "HttpClient", "client", "=", "httpClient", "(", ")", ";", "HttpGet", "get", "=", "new", "HttpGet", "(", "site", "+", "StatusCommand...
Retrieves the status of a Cadmium site into a {@link Status} Object. @param site The site uri of the Cadmium site to get the status from. @param token The Github API token used for authenticating the request. @return @throws Exception
[ "Retrieves", "the", "status", "of", "a", "Cadmium", "site", "into", "a", "{", "@link", "Status", "}", "Object", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/StatusCommand.java#L140-L153
aws/aws-sdk-java
aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java
SimpleDBUtils.decodeRealNumberRangeInt
public static int decodeRealNumberRangeInt(String value, int offsetValue) { """ Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function. @param value string representation of the integer value @param offsetValue offset value that was used in the orig...
java
public static int decodeRealNumberRangeInt(String value, int offsetValue) { long offsetNumber = Long.parseLong(value, 10); return (int) (offsetNumber - offsetValue); }
[ "public", "static", "int", "decodeRealNumberRangeInt", "(", "String", "value", ",", "int", "offsetValue", ")", "{", "long", "offsetNumber", "=", "Long", ".", "parseLong", "(", "value", ",", "10", ")", ";", "return", "(", "int", ")", "(", "offsetNumber", "-...
Decodes integer value from the string representation that was created by using encodeRealNumberRange(..) function. @param value string representation of the integer value @param offsetValue offset value that was used in the original encoding @return original integer value
[ "Decodes", "integer", "value", "from", "the", "string", "representation", "that", "was", "created", "by", "using", "encodeRealNumberRange", "(", "..", ")", "function", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java#L241-L244
phax/ph-javacc-maven-plugin
src/main/java/org/codehaus/mojo/javacc/ForkedJvm.java
ForkedJvm._getClassSource
private static File _getClassSource (final Class <?> type) { """ Gets the JAR file or directory that contains the specified class. @param type The class/interface to find, may be <code>null</code>. @return The absolute path to the class source location or <code>null</code> if unknown. """ if (type !=...
java
private static File _getClassSource (final Class <?> type) { if (type != null) { final String classResource = type.getName ().replace ('.', '/') + ".class"; return _getResourceSource (classResource, type.getClassLoader ()); } return null; }
[ "private", "static", "File", "_getClassSource", "(", "final", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "type", "!=", "null", ")", "{", "final", "String", "classResource", "=", "type", ".", "getName", "(", ")", ".", "replace", "(", "'", "'...
Gets the JAR file or directory that contains the specified class. @param type The class/interface to find, may be <code>null</code>. @return The absolute path to the class source location or <code>null</code> if unknown.
[ "Gets", "the", "JAR", "file", "or", "directory", "that", "contains", "the", "specified", "class", "." ]
train
https://github.com/phax/ph-javacc-maven-plugin/blob/99497a971fe59ab2289258ca7ddcfa40e651f19f/src/main/java/org/codehaus/mojo/javacc/ForkedJvm.java#L194-L202
Netflix/Hystrix
hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java
MethodProvider.unbride
public Method unbride(final Method bridgeMethod, Class<?> aClass) throws IOException, NoSuchMethodException, ClassNotFoundException { """ Finds generic method for the given bridge method. @param bridgeMethod the bridge method @param aClass the type where the bridge method is declared @return generic met...
java
public Method unbride(final Method bridgeMethod, Class<?> aClass) throws IOException, NoSuchMethodException, ClassNotFoundException { if (bridgeMethod.isBridge() && bridgeMethod.isSynthetic()) { if (cache.containsKey(bridgeMethod)) { return cache.get(bridgeMethod); } ...
[ "public", "Method", "unbride", "(", "final", "Method", "bridgeMethod", ",", "Class", "<", "?", ">", "aClass", ")", "throws", "IOException", ",", "NoSuchMethodException", ",", "ClassNotFoundException", "{", "if", "(", "bridgeMethod", ".", "isBridge", "(", ")", ...
Finds generic method for the given bridge method. @param bridgeMethod the bridge method @param aClass the type where the bridge method is declared @return generic method @throws IOException @throws NoSuchMethodException @throws ClassNotFoundException
[ "Finds", "generic", "method", "for", "the", "given", "bridge", "method", "." ]
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/MethodProvider.java#L232-L257
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.classifySentenceStdin
public boolean classifySentenceStdin(DocumentReaderAndWriter<IN> readerWriter) throws IOException { """ Classify stdin by senteces seperated by blank line @param readerWriter @return @throws IOException """ BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding...
java
public boolean classifySentenceStdin(DocumentReaderAndWriter<IN> readerWriter) throws IOException { BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding)); String line; String text = ""; String eol = "\n"; String sentence = "<s>"; while ((line...
[ "public", "boolean", "classifySentenceStdin", "(", "DocumentReaderAndWriter", "<", "IN", ">", "readerWriter", ")", "throws", "IOException", "{", "BufferedReader", "is", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "System", ".", "in", ",", "...
Classify stdin by senteces seperated by blank line @param readerWriter @return @throws IOException
[ "Classify", "stdin", "by", "senteces", "seperated", "by", "blank", "line" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1013-L1036
markushi/android-ui
src/main/java/at/markushi/ui/RevealColorView.java
RevealColorView.calculateScale
private float calculateScale(int x, int y) { """ calculates the required scale of the ink-view to fill the whole view @param x circle center x @param y circle center y @return """ final float centerX = getWidth() / 2f; final float centerY = getHeight() / 2f; final float maxDistance = (float) Math.sq...
java
private float calculateScale(int x, int y) { final float centerX = getWidth() / 2f; final float centerY = getHeight() / 2f; final float maxDistance = (float) Math.sqrt(centerX * centerX + centerY * centerY); final float deltaX = centerX - x; final float deltaY = centerY - y; final float distance = (float) ...
[ "private", "float", "calculateScale", "(", "int", "x", ",", "int", "y", ")", "{", "final", "float", "centerX", "=", "getWidth", "(", ")", "/", "2f", ";", "final", "float", "centerY", "=", "getHeight", "(", ")", "/", "2f", ";", "final", "float", "maxD...
calculates the required scale of the ink-view to fill the whole view @param x circle center x @param y circle center y @return
[ "calculates", "the", "required", "scale", "of", "the", "ink", "-", "view", "to", "fill", "the", "whole", "view" ]
train
https://github.com/markushi/android-ui/blob/a589fad7b74ace063c2b0e90741d43225b200a18/src/main/java/at/markushi/ui/RevealColorView.java#L207-L217
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/uac/LocalSubjectUserAccessControl.java
LocalSubjectUserAccessControl.convertUncheckedException
private RuntimeException convertUncheckedException(Exception e) { """ Converts unchecked exceptions to appropriate API exceptions. Specifically, if the subsystem fails to acquire the synchronization lock for a non-read operation it will throw a TimeoutException. This method converts that to a ServiceUnavailabl...
java
private RuntimeException convertUncheckedException(Exception e) { if (Throwables.getRootCause(e) instanceof TimeoutException) { _lockTimeoutMeter.mark(); throw new ServiceUnavailableException("Failed to acquire update lock, try again later", new Random().nextInt(5) + 1); } ...
[ "private", "RuntimeException", "convertUncheckedException", "(", "Exception", "e", ")", "{", "if", "(", "Throwables", ".", "getRootCause", "(", "e", ")", "instanceof", "TimeoutException", ")", "{", "_lockTimeoutMeter", ".", "mark", "(", ")", ";", "throw", "new",...
Converts unchecked exceptions to appropriate API exceptions. Specifically, if the subsystem fails to acquire the synchronization lock for a non-read operation it will throw a TimeoutException. This method converts that to a ServiceUnavailableException. All other exceptions are rethrown as-is. This method never retu...
[ "Converts", "unchecked", "exceptions", "to", "appropriate", "API", "exceptions", ".", "Specifically", "if", "the", "subsystem", "fails", "to", "acquire", "the", "synchronization", "lock", "for", "a", "non", "-", "read", "operation", "it", "will", "throw", "a", ...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/uac/LocalSubjectUserAccessControl.java#L628-L634
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java
AbstractTriangle3F.getGroundHeight
public double getGroundHeight(double x, double y, CoordinateSystem3D system) { """ Replies the height of the projection on the triangle that is representing a ground. <p> Assuming that the triangle is representing a face of a terrain/ground, this function compute the height of the ground just below the given po...
java
public double getGroundHeight(double x, double y, CoordinateSystem3D system) { assert(system!=null); int idx = system.getHeightCoordinateIndex(); assert(idx==1 || idx==2); Point3D p1 = getP1(); assert(p1!=null); Vector3D v = getNormal(); assert(v!=null); if (idx==1 && v.getY()==0.) return p1.getY();...
[ "public", "double", "getGroundHeight", "(", "double", "x", ",", "double", "y", ",", "CoordinateSystem3D", "system", ")", "{", "assert", "(", "system", "!=", "null", ")", ";", "int", "idx", "=", "system", ".", "getHeightCoordinateIndex", "(", ")", ";", "ass...
Replies the height of the projection on the triangle that is representing a ground. <p> Assuming that the triangle is representing a face of a terrain/ground, this function compute the height of the ground just below the given position. The input of this function is the coordinate of a point on the horizontal plane. @...
[ "Replies", "the", "height", "of", "the", "projection", "on", "the", "triangle", "that", "is", "representing", "a", "ground", ".", "<p", ">", "Assuming", "that", "the", "triangle", "is", "representing", "a", "face", "of", "a", "terrain", "/", "ground", "thi...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java#L2140-L2160
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java
Normalization.zeroMeanUnitVarianceSequence
public static JavaRDD<List<List<Writable>>> zeroMeanUnitVarianceSequence(Schema schema, JavaRDD<List<List<Writable>>> sequence) { """ Normalize the sequence by zero mean unit variance @param schema Schema of the data to normalize @param sequence Sequence data @return Normalized sequence ...
java
public static JavaRDD<List<List<Writable>>> zeroMeanUnitVarianceSequence(Schema schema, JavaRDD<List<List<Writable>>> sequence) { return zeroMeanUnitVarianceSequence(schema, sequence, null); }
[ "public", "static", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "zeroMeanUnitVarianceSequence", "(", "Schema", "schema", ",", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "sequence", ")", "{", "return", "z...
Normalize the sequence by zero mean unit variance @param schema Schema of the data to normalize @param sequence Sequence data @return Normalized sequence
[ "Normalize", "the", "sequence", "by", "zero", "mean", "unit", "variance" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java#L166-L169
OpenBEL/openbel-framework
org.openbel.framework.common/src/main/java/org/openbel/framework/common/BELUtilities.java
BELUtilities.hasItems
public static <K, V> boolean hasItems(final Map<K, V> m) { """ Returns {@code true} if the map is non-null and is non-empty, {@code false} otherwise. @param <K> Captured key type @param <V> Captured value type @param m Map of type {@code <K, V>}, may be null @return boolean """ return m != null ...
java
public static <K, V> boolean hasItems(final Map<K, V> m) { return m != null && !m.isEmpty(); }
[ "public", "static", "<", "K", ",", "V", ">", "boolean", "hasItems", "(", "final", "Map", "<", "K", ",", "V", ">", "m", ")", "{", "return", "m", "!=", "null", "&&", "!", "m", ".", "isEmpty", "(", ")", ";", "}" ]
Returns {@code true} if the map is non-null and is non-empty, {@code false} otherwise. @param <K> Captured key type @param <V> Captured value type @param m Map of type {@code <K, V>}, may be null @return boolean
[ "Returns", "{", "@code", "true", "}", "if", "the", "map", "is", "non", "-", "null", "and", "is", "non", "-", "empty", "{", "@code", "false", "}", "otherwise", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/BELUtilities.java#L647-L649
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/internal/path/ArrayPathToken.java
ArrayPathToken.checkArrayModel
protected boolean checkArrayModel(String currentPath, Object model, EvaluationContextImpl ctx) { """ Check if model is non-null and array. @param currentPath @param model @param ctx @return false if current evaluation call must be skipped, true otherwise @throws PathNotFoundException if model is null and eval...
java
protected boolean checkArrayModel(String currentPath, Object model, EvaluationContextImpl ctx) { if (model == null){ if (! isUpstreamDefinite()) { return false; } else { throw new PathNotFoundException("The path " + currentPath + " is null"); }...
[ "protected", "boolean", "checkArrayModel", "(", "String", "currentPath", ",", "Object", "model", ",", "EvaluationContextImpl", "ctx", ")", "{", "if", "(", "model", "==", "null", ")", "{", "if", "(", "!", "isUpstreamDefinite", "(", ")", ")", "{", "return", ...
Check if model is non-null and array. @param currentPath @param model @param ctx @return false if current evaluation call must be skipped, true otherwise @throws PathNotFoundException if model is null and evaluation must be interrupted @throws InvalidPathException if model is not an array and evaluation must be interru...
[ "Check", "if", "model", "is", "non", "-", "null", "and", "array", "." ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/internal/path/ArrayPathToken.java#L36-L52
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/modules/CmsModuleAddResourceTypeThread.java
CmsModuleAddResourceTypeThread.lockTemporary
private void lockTemporary(CmsResource resource) throws CmsException { """ Locks the given resource temporarily.<p> @param resource the resource to lock @throws CmsException if locking fails """ CmsObject cms = getCms(); CmsUser user = cms.getRequestContext().getCurrentUser(); Cm...
java
private void lockTemporary(CmsResource resource) throws CmsException { CmsObject cms = getCms(); CmsUser user = cms.getRequestContext().getCurrentUser(); CmsLock lock = cms.getLock(resource); if (!lock.isOwnedBy(user)) { cms.lockResourceTemporary(resource); } else if...
[ "private", "void", "lockTemporary", "(", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsObject", "cms", "=", "getCms", "(", ")", ";", "CmsUser", "user", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentUser", "(", ")", ";",...
Locks the given resource temporarily.<p> @param resource the resource to lock @throws CmsException if locking fails
[ "Locks", "the", "given", "resource", "temporarily", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/modules/CmsModuleAddResourceTypeThread.java#L531-L541
azkaban/azkaban
azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java
ProjectManagerServlet.ajaxGetPermissions
private void ajaxGetPermissions(final Project project, final HashMap<String, Object> ret) { """ this only returns user permissions, but not group permissions and proxy users """ final ArrayList<HashMap<String, Object>> permissions = new ArrayList<>(); for (final Pair<String, Permission> perm : ...
java
private void ajaxGetPermissions(final Project project, final HashMap<String, Object> ret) { final ArrayList<HashMap<String, Object>> permissions = new ArrayList<>(); for (final Pair<String, Permission> perm : project.getUserPermissions()) { final HashMap<String, Object> permObj = new HashMap<>(); ...
[ "private", "void", "ajaxGetPermissions", "(", "final", "Project", "project", ",", "final", "HashMap", "<", "String", ",", "Object", ">", "ret", ")", "{", "final", "ArrayList", "<", "HashMap", "<", "String", ",", "Object", ">", ">", "permissions", "=", "new...
this only returns user permissions, but not group permissions and proxy users
[ "this", "only", "returns", "user", "permissions", "but", "not", "group", "permissions", "and", "proxy", "users" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java#L1075-L1088
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.newHashMap
public static <K, V> HashMap<K, V> newHashMap(int size) { """ 新建一个HashMap @param <K> Key类型 @param <V> Value类型 @param size 初始大小,由于默认负载因子0.75,传入的size会实际初始大小为size / 0.75 @return HashMap对象 """ return newHashMap(size, false); }
java
public static <K, V> HashMap<K, V> newHashMap(int size) { return newHashMap(size, false); }
[ "public", "static", "<", "K", ",", "V", ">", "HashMap", "<", "K", ",", "V", ">", "newHashMap", "(", "int", "size", ")", "{", "return", "newHashMap", "(", "size", ",", "false", ")", ";", "}" ]
新建一个HashMap @param <K> Key类型 @param <V> Value类型 @param size 初始大小,由于默认负载因子0.75,传入的size会实际初始大小为size / 0.75 @return HashMap对象
[ "新建一个HashMap" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L94-L96
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/dialects/MSSQLDialect.java
MSSQLDialect.overrideDriverTypeConversion
@Override public Object overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value) { """ TDS converts a number of important data types to String. This isn't what we want, nor helpful. Here, we change them back. """ if (value instanceof String && !Util.blank(value)) { ...
java
@Override public Object overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value) { if (value instanceof String && !Util.blank(value)) { String typeName = mm.getColumnMetadata().get(attributeName).getTypeName(); if ("date".equalsIgnoreCase(typeName)) { ...
[ "@", "Override", "public", "Object", "overrideDriverTypeConversion", "(", "MetaModel", "mm", ",", "String", "attributeName", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "String", "&&", "!", "Util", ".", "blank", "(", "value", ")", ")"...
TDS converts a number of important data types to String. This isn't what we want, nor helpful. Here, we change them back.
[ "TDS", "converts", "a", "number", "of", "important", "data", "types", "to", "String", ".", "This", "isn", "t", "what", "we", "want", "nor", "helpful", ".", "Here", "we", "change", "them", "back", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/dialects/MSSQLDialect.java#L102-L113
aaberg/sql2o
core/src/main/java/org/sql2o/Query.java
Query.addToBatch
public Query addToBatch() { """ Adds a set of parameters to this <code>Query</code> object's batch of commands. <br/> If maxBatchRecords is more than 0, executeBatch is called upon adding that many commands to the batch. <br/> The current number of batched commands is accessible via the <code>getCurrentBat...
java
public Query addToBatch(){ try { buildPreparedStatement(false).addBatch(); if (this.maxBatchRecords > 0){ if(++this.currentBatchRecords % this.maxBatchRecords == 0) { this.executeBatch(); } } } catch (SQLException e)...
[ "public", "Query", "addToBatch", "(", ")", "{", "try", "{", "buildPreparedStatement", "(", "false", ")", ".", "addBatch", "(", ")", ";", "if", "(", "this", ".", "maxBatchRecords", ">", "0", ")", "{", "if", "(", "++", "this", ".", "currentBatchRecords", ...
Adds a set of parameters to this <code>Query</code> object's batch of commands. <br/> If maxBatchRecords is more than 0, executeBatch is called upon adding that many commands to the batch. <br/> The current number of batched commands is accessible via the <code>getCurrentBatchRecords()</code> method.
[ "Adds", "a", "set", "of", "parameters", "to", "this", "<code", ">", "Query<", "/", "code", ">", "object", "s", "batch", "of", "commands", ".", "<br", "/", ">" ]
train
https://github.com/aaberg/sql2o/blob/01d3490a6d2440cf60f973d23508ac4ed57a8e20/core/src/main/java/org/sql2o/Query.java#L805-L818
kikinteractive/ice
ice/src/main/java/com/kik/config/ice/ConfigSystem.java
ConfigSystem.configModuleWithOverrides
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, Named name, OverrideConsumer<C> overrideConsumer) { """ Generates a Guice Module for use with Injector creation. The generate Guice module binds a number of support classes to service a dynamically generate implementation of the pr...
java
public static <C> Module configModuleWithOverrides(final Class<C> configInterface, Named name, OverrideConsumer<C> overrideConsumer) { checkNotNull(configInterface); checkNotNull(name); checkNotNull(overrideConsumer); return configModuleWithOverrides(configInterface, Optional.ofNulla...
[ "public", "static", "<", "C", ">", "Module", "configModuleWithOverrides", "(", "final", "Class", "<", "C", ">", "configInterface", ",", "Named", "name", ",", "OverrideConsumer", "<", "C", ">", "overrideConsumer", ")", "{", "checkNotNull", "(", "configInterface",...
Generates a Guice Module for use with Injector creation. The generate Guice module binds a number of support classes to service a dynamically generate implementation of the provided configuration interface. This method further overrides the annotated defaults on the configuration class as per the code in the given over...
[ "Generates", "a", "Guice", "Module", "for", "use", "with", "Injector", "creation", ".", "The", "generate", "Guice", "module", "binds", "a", "number", "of", "support", "classes", "to", "service", "a", "dynamically", "generate", "implementation", "of", "the", "p...
train
https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/ConfigSystem.java#L128-L134
Bedework/bw-util
bw-util-config/src/main/java/org/bedework/util/config/ConfigBase.java
ConfigBase.startElement
private QName startElement(final XmlEmit xml, final Class c, final ConfInfo ci) throws Throwable { """ /* Emit a start element with a name and type. The type is the name of the actual class. """ QName qn; if (ci == null) { qn = new QName...
java
private QName startElement(final XmlEmit xml, final Class c, final ConfInfo ci) throws Throwable { QName qn; if (ci == null) { qn = new QName(ns, c.getName()); } else { qn = new QName(ns, ci.elementName()); } xml.openTag(qn, "ty...
[ "private", "QName", "startElement", "(", "final", "XmlEmit", "xml", ",", "final", "Class", "c", ",", "final", "ConfInfo", "ci", ")", "throws", "Throwable", "{", "QName", "qn", ";", "if", "(", "ci", "==", "null", ")", "{", "qn", "=", "new", "QName", "...
/* Emit a start element with a name and type. The type is the name of the actual class.
[ "/", "*", "Emit", "a", "start", "element", "with", "a", "name", "and", "type", ".", "The", "type", "is", "the", "name", "of", "the", "actual", "class", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-config/src/main/java/org/bedework/util/config/ConfigBase.java#L697-L711
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificateIssuerAsync
public ServiceFuture<IssuerBundle> updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback<IssuerBundle> serviceCallback) { """ Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This ope...
java
public ServiceFuture<IssuerBundle> updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback<IssuerBundle> serviceCallback) { return ServiceFuture.fromResponse(updateCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName), serviceCallback); }
[ "public", "ServiceFuture", "<", "IssuerBundle", ">", "updateCertificateIssuerAsync", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ",", "final", "ServiceCallback", "<", "IssuerBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", "fr...
Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param issuerName The name of t...
[ "Updates", "the", "specified", "certificate", "issuer", ".", "The", "UpdateCertificateIssuer", "operation", "performs", "an", "update", "on", "the", "specified", "certificate", "issuer", "entity", ".", "This", "operation", "requires", "the", "certificates", "/", "se...
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#L6124-L6126
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
StrTokenizer.addToken
private void addToken(final List<String> list, String tok) { """ Adds a token to a list, paying attention to the parameters we've set. @param list the list to add to @param tok the token to add """ if (StringUtils.isEmpty(tok)) { if (isIgnoreEmptyTokens()) { return; ...
java
private void addToken(final List<String> list, String tok) { if (StringUtils.isEmpty(tok)) { if (isIgnoreEmptyTokens()) { return; } if (isEmptyTokenAsNull()) { tok = null; } } list.add(tok); }
[ "private", "void", "addToken", "(", "final", "List", "<", "String", ">", "list", ",", "String", "tok", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "tok", ")", ")", "{", "if", "(", "isIgnoreEmptyTokens", "(", ")", ")", "{", "return", ";",...
Adds a token to a list, paying attention to the parameters we've set. @param list the list to add to @param tok the token to add
[ "Adds", "a", "token", "to", "a", "list", "paying", "attention", "to", "the", "parameters", "we", "ve", "set", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java#L671-L681
apache/groovy
src/main/groovy/groovy/lang/GroovyClassLoader.java
GroovyClassLoader.recompile
protected Class recompile(URL source, String className, Class oldClass) throws CompilationFailedException, IOException { """ (Re)Compiles the given source. This method starts the compilation of a given source, if the source has changed since the class was created. For this isSourceNewer is called. @param sou...
java
protected Class recompile(URL source, String className, Class oldClass) throws CompilationFailedException, IOException { if (source != null) { // found a source, compile it if newer if (oldClass == null || isSourceNewer(source, oldClass)) { String name = source.toExternal...
[ "protected", "Class", "recompile", "(", "URL", "source", ",", "String", "className", ",", "Class", "oldClass", ")", "throws", "CompilationFailedException", ",", "IOException", "{", "if", "(", "source", "!=", "null", ")", "{", "// found a source, compile it if newer"...
(Re)Compiles the given source. This method starts the compilation of a given source, if the source has changed since the class was created. For this isSourceNewer is called. @param source the source pointer for the compilation @param className the name of the class to be generated @param oldClass a possible former...
[ "(", "Re", ")", "Compiles", "the", "given", "source", ".", "This", "method", "starts", "the", "compilation", "of", "a", "given", "source", "if", "the", "source", "has", "changed", "since", "the", "class", "was", "created", ".", "For", "this", "isSourceNewe...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/GroovyClassLoader.java#L836-L855
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsValueFocusHandler.java
CmsValueFocusHandler.hideHelpBubbles
public void hideHelpBubbles(Widget formPanel, boolean hide) { """ Hides all help bubbles.<p> @param formPanel the form panel @param hide <code>true</code> to hide the help bubbles """ if (hide) { formPanel.addStyleName(I_CmsLayoutBundle.INSTANCE.form().hideHelpBubbles()); }...
java
public void hideHelpBubbles(Widget formPanel, boolean hide) { if (hide) { formPanel.addStyleName(I_CmsLayoutBundle.INSTANCE.form().hideHelpBubbles()); } else { formPanel.removeStyleName(I_CmsLayoutBundle.INSTANCE.form().hideHelpBubbles()); } }
[ "public", "void", "hideHelpBubbles", "(", "Widget", "formPanel", ",", "boolean", "hide", ")", "{", "if", "(", "hide", ")", "{", "formPanel", ".", "addStyleName", "(", "I_CmsLayoutBundle", ".", "INSTANCE", ".", "form", "(", ")", ".", "hideHelpBubbles", "(", ...
Hides all help bubbles.<p> @param formPanel the form panel @param hide <code>true</code> to hide the help bubbles
[ "Hides", "all", "help", "bubbles", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsValueFocusHandler.java#L119-L126
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.upgrade_sslGateway_serviceName_planCode_POST
public OvhOrderUpgradeOperationAndOrder upgrade_sslGateway_serviceName_planCode_POST(String serviceName, String planCode, Boolean autoPayWithPreferredPaymentMethod, Long quantity) throws IOException { """ Perform the requested upgrade of your service REST: POST /order/upgrade/sslGateway/{serviceName}/{planCode}...
java
public OvhOrderUpgradeOperationAndOrder upgrade_sslGateway_serviceName_planCode_POST(String serviceName, String planCode, Boolean autoPayWithPreferredPaymentMethod, Long quantity) throws IOException { String qPath = "/order/upgrade/sslGateway/{serviceName}/{planCode}"; StringBuilder sb = path(qPath, serviceName, pl...
[ "public", "OvhOrderUpgradeOperationAndOrder", "upgrade_sslGateway_serviceName_planCode_POST", "(", "String", "serviceName", ",", "String", "planCode", ",", "Boolean", "autoPayWithPreferredPaymentMethod", ",", "Long", "quantity", ")", "throws", "IOException", "{", "String", "q...
Perform the requested upgrade of your service REST: POST /order/upgrade/sslGateway/{serviceName}/{planCode} @param planCode [required] Plan code of the offer you want to upgrade to @param autoPayWithPreferredPaymentMethod [required] Indicates that order will be automatically paid with preferred payment method @param q...
[ "Perform", "the", "requested", "upgrade", "of", "your", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L4319-L4327