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
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectLineSegmentTriangle
public static boolean intersectLineSegmentTriangle(Vector3fc p0, Vector3fc p1, Vector3fc v0, Vector3fc v1, Vector3fc v2, float epsilon, Vector3f intersectionPoint) { """ Determine whether the line segment with the end points <code>p0</code> and <code>p1</code> intersects the triangle consisting of the three verti...
java
public static boolean intersectLineSegmentTriangle(Vector3fc p0, Vector3fc p1, Vector3fc v0, Vector3fc v1, Vector3fc v2, float epsilon, Vector3f intersectionPoint) { return intersectLineSegmentTriangle(p0.x(), p0.y(), p0.z(), p1.x(), p1.y(), p1.z(), v0.x(), v0.y(), v0.z(), v1.x(), v1.y(), v1.z(), v2.x(), v2.y()...
[ "public", "static", "boolean", "intersectLineSegmentTriangle", "(", "Vector3fc", "p0", ",", "Vector3fc", "p1", ",", "Vector3fc", "v0", ",", "Vector3fc", "v1", ",", "Vector3fc", "v2", ",", "float", "epsilon", ",", "Vector3f", "intersectionPoint", ")", "{", "retur...
Determine whether the line segment with the end points <code>p0</code> and <code>p1</code> intersects the triangle consisting of the three vertices <code>(v0X, v0Y, v0Z)</code>, <code>(v1X, v1Y, v1Z)</code> and <code>(v2X, v2Y, v2Z)</code>, regardless of the winding order of the triangle or the direction of the line se...
[ "Determine", "whether", "the", "line", "segment", "with", "the", "end", "points", "<code", ">", "p0<", "/", "code", ">", "and", "<code", ">", "p1<", "/", "code", ">", "intersects", "the", "triangle", "consisting", "of", "the", "three", "vertices", "<code",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L3335-L3337
zxing/zxing
core/src/main/java/com/google/zxing/aztec/detector/Detector.java
Detector.getMatrixCenter
private Point getMatrixCenter() { """ Finds a candidate center point of an Aztec code from an image @return the center point """ ResultPoint pointA; ResultPoint pointB; ResultPoint pointC; ResultPoint pointD; //Get a white rectangle that can be the border of the matrix in center bull's...
java
private Point getMatrixCenter() { ResultPoint pointA; ResultPoint pointB; ResultPoint pointC; ResultPoint pointD; //Get a white rectangle that can be the border of the matrix in center bull's eye or try { ResultPoint[] cornerPoints = new WhiteRectangleDetector(image).detect(); poi...
[ "private", "Point", "getMatrixCenter", "(", ")", "{", "ResultPoint", "pointA", ";", "ResultPoint", "pointB", ";", "ResultPoint", "pointC", ";", "ResultPoint", "pointD", ";", "//Get a white rectangle that can be the border of the matrix in center bull's eye or", "try", "{", ...
Finds a candidate center point of an Aztec code from an image @return the center point
[ "Finds", "a", "candidate", "center", "point", "of", "an", "Aztec", "code", "from", "an", "image" ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/aztec/detector/Detector.java#L294-L350
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Assert.java
Assert.isTrue
public static void isTrue(boolean expression, String message, Object... values) { """ <p> Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a pri...
java
public static void isTrue(boolean expression, String message, Object... values) { if (!expression) { throw new IllegalArgumentException(String.format(message, values)); } }
[ "public", "static", "void", "isTrue", "(", "boolean", "expression", ",", "String", "message", ",", "Object", "...", "values", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "...
<p> Validate that the argument condition is {@code true}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression. </p> <pre> Assert.isTrue(i &gt;...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "true", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Assert.java#L78-L80
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java
KnowledgeOperations.getInputList
public static List<Object> getInputList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { """ Gets an input (all) list. @param message the message @param operation the operation @param runtime the runtime engine @return the input (all) list """ return getInputList(m...
java
public static List<Object> getInputList(Message message, KnowledgeOperation operation, KnowledgeRuntimeEngine runtime) { return getInputList(message, operation.getInputExpressionMappings(), runtime); }
[ "public", "static", "List", "<", "Object", ">", "getInputList", "(", "Message", "message", ",", "KnowledgeOperation", "operation", ",", "KnowledgeRuntimeEngine", "runtime", ")", "{", "return", "getInputList", "(", "message", ",", "operation", ".", "getInputExpressio...
Gets an input (all) list. @param message the message @param operation the operation @param runtime the runtime engine @return the input (all) list
[ "Gets", "an", "input", "(", "all", ")", "list", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/operation/KnowledgeOperations.java#L190-L192
UrielCh/ovh-java-sdk
ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java
ApiOvhCaascontainers.serviceName_registry_credentials_credentialsId_PUT
public OvhRegistryCredentials serviceName_registry_credentials_credentialsId_PUT(String serviceName, String credentialsId, OvhInputCustomSsl body) throws IOException { """ Update the registry credentials. REST: PUT /caas/containers/{serviceName}/registry/credentials/{credentialsId} @param body [required] Crede...
java
public OvhRegistryCredentials serviceName_registry_credentials_credentialsId_PUT(String serviceName, String credentialsId, OvhInputCustomSsl body) throws IOException { String qPath = "/caas/containers/{serviceName}/registry/credentials/{credentialsId}"; StringBuilder sb = path(qPath, serviceName, credentialsId); ...
[ "public", "OvhRegistryCredentials", "serviceName_registry_credentials_credentialsId_PUT", "(", "String", "serviceName", ",", "String", "credentialsId", ",", "OvhInputCustomSsl", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/containers/{serviceName}...
Update the registry credentials. REST: PUT /caas/containers/{serviceName}/registry/credentials/{credentialsId} @param body [required] Credentials providing authentication to an external registry @param credentialsId [required] credentials id @param serviceName [required] service name API beta
[ "Update", "the", "registry", "credentials", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java#L279-L284
mangstadt/biweekly
src/main/java/biweekly/component/VFreeBusy.java
VFreeBusy.addFreeBusy
public FreeBusy addFreeBusy(FreeBusyType type, Date start, Date end) { """ Adds a single time period for which the person is free or busy (for example, "free" between 1pm-3pm). This method will look for an existing property that has the given {@link FreeBusyType} and add the time period to it, or create a new p...
java
public FreeBusy addFreeBusy(FreeBusyType type, Date start, Date end) { FreeBusy found = findByFreeBusyType(type); found.getValues().add(new Period(start, end)); return found; }
[ "public", "FreeBusy", "addFreeBusy", "(", "FreeBusyType", "type", ",", "Date", "start", ",", "Date", "end", ")", "{", "FreeBusy", "found", "=", "findByFreeBusyType", "(", "type", ")", ";", "found", ".", "getValues", "(", ")", ".", "add", "(", "new", "Per...
Adds a single time period for which the person is free or busy (for example, "free" between 1pm-3pm). This method will look for an existing property that has the given {@link FreeBusyType} and add the time period to it, or create a new property is one cannot be found. @param type the availability type (e.g. "free" or "...
[ "Adds", "a", "single", "time", "period", "for", "which", "the", "person", "is", "free", "or", "busy", "(", "for", "example", "free", "between", "1pm", "-", "3pm", ")", ".", "This", "method", "will", "look", "for", "an", "existing", "property", "that", ...
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/VFreeBusy.java#L552-L556
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.consent_campaignName_decision_PUT
public void consent_campaignName_decision_PUT(String campaignName, Boolean value) throws IOException { """ Update decision of a consent campaign REST: PUT /me/consent/{campaignName}/decision @param campaignName [required] Consent campaign name @param value [required] Decision value """ String qPath = "/...
java
public void consent_campaignName_decision_PUT(String campaignName, Boolean value) throws IOException { String qPath = "/me/consent/{campaignName}/decision"; StringBuilder sb = path(qPath, campaignName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "value", value); exec(qPath, "PUT", sb...
[ "public", "void", "consent_campaignName_decision_PUT", "(", "String", "campaignName", ",", "Boolean", "value", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/consent/{campaignName}/decision\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
Update decision of a consent campaign REST: PUT /me/consent/{campaignName}/decision @param campaignName [required] Consent campaign name @param value [required] Decision value
[ "Update", "decision", "of", "a", "consent", "campaign" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1576-L1582
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/dam/impl/TransformedRenditionHandler.java
TransformedRenditionHandler.rotateMapWidth
private long rotateMapWidth(long width, long height) { """ Swaps width with height if rotated 90° clock-wise or counter clock-wise @param width Rendition width @param height Rendition height @return Width """ if (rotation != null && (rotation == ROTATE_90 || rotation == ROTATE_270)) { return heigh...
java
private long rotateMapWidth(long width, long height) { if (rotation != null && (rotation == ROTATE_90 || rotation == ROTATE_270)) { return height; } else { return width; } }
[ "private", "long", "rotateMapWidth", "(", "long", "width", ",", "long", "height", ")", "{", "if", "(", "rotation", "!=", "null", "&&", "(", "rotation", "==", "ROTATE_90", "||", "rotation", "==", "ROTATE_270", ")", ")", "{", "return", "height", ";", "}", ...
Swaps width with height if rotated 90° clock-wise or counter clock-wise @param width Rendition width @param height Rendition height @return Width
[ "Swaps", "width", "with", "height", "if", "rotated", "90°", "clock", "-", "wise", "or", "counter", "clock", "-", "wise" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/dam/impl/TransformedRenditionHandler.java#L134-L141
to2mbn/JMCCC
jmccc-yggdrasil-authenticator/src/main/java/org/to2mbn/jmccc/auth/yggdrasil/YggdrasilAuthenticator.java
YggdrasilAuthenticator.refreshWithPassword
public synchronized void refreshWithPassword(PasswordProvider passwordProvider, String clientToken) throws AuthenticationException { """ Refreshes the current session manually using password. @param passwordProvider the password provider @param clientToken the client token @throws AuthenticationException If a...
java
public synchronized void refreshWithPassword(PasswordProvider passwordProvider, String clientToken) throws AuthenticationException { Objects.requireNonNull(passwordProvider); Objects.requireNonNull(clientToken); String username = passwordProvider.getUsername(); String password = passwordProvider.getPassword();...
[ "public", "synchronized", "void", "refreshWithPassword", "(", "PasswordProvider", "passwordProvider", ",", "String", "clientToken", ")", "throws", "AuthenticationException", "{", "Objects", ".", "requireNonNull", "(", "passwordProvider", ")", ";", "Objects", ".", "requi...
Refreshes the current session manually using password. @param passwordProvider the password provider @param clientToken the client token @throws AuthenticationException If an exception occurs during the authentication
[ "Refreshes", "the", "current", "session", "manually", "using", "password", "." ]
train
https://github.com/to2mbn/JMCCC/blob/17e5b1b56ff18255cfd60976dca1a24598946647/jmccc-yggdrasil-authenticator/src/main/java/org/to2mbn/jmccc/auth/yggdrasil/YggdrasilAuthenticator.java#L362-L387
apache/flink
flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java
JarManifestParser.findFirstManifestAttribute
private static Optional<String> findFirstManifestAttribute(File jarFile, String... attributes) throws IOException { """ Returns the value of the first manifest attribute found in the provided JAR file. @param jarFile JAR file to parse @param attributes Attributes to check @return Optional holding value of ...
java
private static Optional<String> findFirstManifestAttribute(File jarFile, String... attributes) throws IOException { if (attributes.length == 0) { return Optional.empty(); } try (JarFile f = new JarFile(jarFile)) { return findFirstManifestAttribute(f, attributes); } }
[ "private", "static", "Optional", "<", "String", ">", "findFirstManifestAttribute", "(", "File", "jarFile", ",", "String", "...", "attributes", ")", "throws", "IOException", "{", "if", "(", "attributes", ".", "length", "==", "0", ")", "{", "return", "Optional",...
Returns the value of the first manifest attribute found in the provided JAR file. @param jarFile JAR file to parse @param attributes Attributes to check @return Optional holding value of first found attribute @throws IOException If there is an error accessing the JAR
[ "Returns", "the", "value", "of", "the", "first", "manifest", "attribute", "found", "in", "the", "provided", "JAR", "file", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L119-L126
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java
JobSchedulesImpl.updateAsync
public Observable<Void> updateAsync(String jobScheduleId, JobScheduleUpdateParameter jobScheduleUpdateParameter, JobScheduleUpdateOptions jobScheduleUpdateOptions) { """ Updates the properties of the specified job schedule. This fully replaces all the updatable properties of the job schedule. For example, if the ...
java
public Observable<Void> updateAsync(String jobScheduleId, JobScheduleUpdateParameter jobScheduleUpdateParameter, JobScheduleUpdateOptions jobScheduleUpdateOptions) { return updateWithServiceResponseAsync(jobScheduleId, jobScheduleUpdateParameter, jobScheduleUpdateOptions).map(new Func1<ServiceResponseWithHeader...
[ "public", "Observable", "<", "Void", ">", "updateAsync", "(", "String", "jobScheduleId", ",", "JobScheduleUpdateParameter", "jobScheduleUpdateParameter", ",", "JobScheduleUpdateOptions", "jobScheduleUpdateOptions", ")", "{", "return", "updateWithServiceResponseAsync", "(", "j...
Updates the properties of the specified job schedule. This fully replaces all the updatable properties of the job schedule. For example, if the schedule property is not specified with this request, then the Batch service will remove the existing schedule. Changes to a job schedule only impact jobs created by the schedu...
[ "Updates", "the", "properties", "of", "the", "specified", "job", "schedule", ".", "This", "fully", "replaces", "all", "the", "updatable", "properties", "of", "the", "job", "schedule", ".", "For", "example", "if", "the", "schedule", "property", "is", "not", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobSchedulesImpl.java#L1216-L1223
js-lib-com/commons
src/main/java/js/util/Params.java
Params.EQ
public static void EQ(long parameter, long expected, String name) throws IllegalArgumentException { """ Test if numeric parameter has expected value. @param parameter invocation numeric parameter, @param expected expected value, @param name the name of invocation parameter. @throws IllegalArgumentException i...
java
public static void EQ(long parameter, long expected, String name) throws IllegalArgumentException { if (parameter != expected) { throw new IllegalArgumentException(String.format("%s is not %d.", name, expected)); } }
[ "public", "static", "void", "EQ", "(", "long", "parameter", ",", "long", "expected", ",", "String", "name", ")", "throws", "IllegalArgumentException", "{", "if", "(", "parameter", "!=", "expected", ")", "{", "throw", "new", "IllegalArgumentException", "(", "St...
Test if numeric parameter has expected value. @param parameter invocation numeric parameter, @param expected expected value, @param name the name of invocation parameter. @throws IllegalArgumentException if <code>parameter</code> has not expected value.
[ "Test", "if", "numeric", "parameter", "has", "expected", "value", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Params.java#L289-L293
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFile
public static boolean copyFile(final File source, final File destination) throws IOException, FileIsADirectoryException { """ Copies the given source file to the given destination file. @param source The source file. @param destination The destination file. @return 's true if the file is copied, otherwi...
java
public static boolean copyFile(final File source, final File destination) throws IOException, FileIsADirectoryException { return copyFile(source, destination, true); }
[ "public", "static", "boolean", "copyFile", "(", "final", "File", "source", ",", "final", "File", "destination", ")", "throws", "IOException", ",", "FileIsADirectoryException", "{", "return", "copyFile", "(", "source", ",", "destination", ",", "true", ")", ";", ...
Copies the given source file to the given destination file. @param source The source file. @param destination The destination file. @return 's true if the file is copied, otherwise false. @throws IOException Is thrown if an error occurs by reading or writing. @throws FileIsADirectoryException Is thrown if the destin...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "file", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L484-L488
aws/aws-sdk-java
aws-java-sdk-sqs/src/main/java/com/amazonaws/services/sqs/model/GetQueueAttributesResult.java
GetQueueAttributesResult.withAttributes
public GetQueueAttributesResult withAttributes(java.util.Map<String, String> attributes) { """ <p> A map of attributes to their respective values. </p> @param attributes A map of attributes to their respective values. @return Returns a reference to this object so that method calls can be chained together. ...
java
public GetQueueAttributesResult withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "GetQueueAttributesResult", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> A map of attributes to their respective values. </p> @param attributes A map of attributes to their respective values. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "map", "of", "attributes", "to", "their", "respective", "values", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sqs/src/main/java/com/amazonaws/services/sqs/model/GetQueueAttributesResult.java#L74-L77
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartBinder.java
SmartBinder.invokeVirtual
public SmartHandle invokeVirtual(Lookup lookup, String name) throws NoSuchMethodException, IllegalAccessException { """ Terminate this binder by looking up the named virtual method on the first argument's type. Perform the actual method lookup using the given Lookup object. @param lookup the Lookup to use for...
java
public SmartHandle invokeVirtual(Lookup lookup, String name) throws NoSuchMethodException, IllegalAccessException { return new SmartHandle(start, binder.invokeVirtual(lookup, name)); }
[ "public", "SmartHandle", "invokeVirtual", "(", "Lookup", "lookup", ",", "String", "name", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", "{", "return", "new", "SmartHandle", "(", "start", ",", "binder", ".", "invokeVirtual", "(", "lookup", ...
Terminate this binder by looking up the named virtual method on the first argument's type. Perform the actual method lookup using the given Lookup object. @param lookup the Lookup to use for handle lookups @param name the name of the target virtual method @return a SmartHandle with this binder's starting signature, ...
[ "Terminate", "this", "binder", "by", "looking", "up", "the", "named", "virtual", "method", "on", "the", "first", "argument", "s", "type", ".", "Perform", "the", "actual", "method", "lookup", "using", "the", "given", "Lookup", "object", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartBinder.java#L981-L983
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/KeywordParser.java
KeywordParser.isValidSentiment
private boolean isValidSentiment(final String type, final Double score, final Integer mixed) { """ Return true if at least one of the values is not null/empty. @param type the sentiment type @param score the sentiment score @param mixed whether the sentiment is mixed @return true if at least one of the val...
java
private boolean isValidSentiment(final String type, final Double score, final Integer mixed) { return !StringUtils.isBlank(type) || score != null || mixed != null; }
[ "private", "boolean", "isValidSentiment", "(", "final", "String", "type", ",", "final", "Double", "score", ",", "final", "Integer", "mixed", ")", "{", "return", "!", "StringUtils", ".", "isBlank", "(", "type", ")", "||", "score", "!=", "null", "||", "mixed...
Return true if at least one of the values is not null/empty. @param type the sentiment type @param score the sentiment score @param mixed whether the sentiment is mixed @return true if at least one of the values is not null/empty
[ "Return", "true", "if", "at", "least", "one", "of", "the", "values", "is", "not", "null", "/", "empty", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/KeywordParser.java#L128-L132
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDQL.java
ParserDQL.XStartsWithPredicateRightPart
private ExpressionLogical XStartsWithPredicateRightPart(Expression left) { """ Scan the right-side string value, return a STARTS WITH Expression for generating XML @param a ExpressionColumn """ readThis(Tokens.WITH); if (token.tokenType == Tokens.QUESTION) { // handle user parameter cas...
java
private ExpressionLogical XStartsWithPredicateRightPart(Expression left) { readThis(Tokens.WITH); if (token.tokenType == Tokens.QUESTION) { // handle user parameter case Expression right = XreadRowValuePredicand(); if (left.isParam() && right.isParam()) { // again make sure...
[ "private", "ExpressionLogical", "XStartsWithPredicateRightPart", "(", "Expression", "left", ")", "{", "readThis", "(", "Tokens", ".", "WITH", ")", ";", "if", "(", "token", ".", "tokenType", "==", "Tokens", ".", "QUESTION", ")", "{", "// handle user parameter case"...
Scan the right-side string value, return a STARTS WITH Expression for generating XML @param a ExpressionColumn
[ "Scan", "the", "right", "-", "side", "string", "value", "return", "a", "STARTS", "WITH", "Expression", "for", "generating", "XML" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDQL.java#L3384-L3405
micwin/ticino
events/src/main/java/net/micwin/ticino/events/EventScope.java
EventScope.registerInternal
private void registerInternal(final Object receiver, final Method method, final Class<? extends T> eventClass) { """ Registers a receiver to an internal map. @param receiver @param method @param eventClass """ List<ReceiverDescriptor> receivers = this.receiverMap.get(eventClass); if (receivers == nul...
java
private void registerInternal(final Object receiver, final Method method, final Class<? extends T> eventClass) { List<ReceiverDescriptor> receivers = this.receiverMap.get(eventClass); if (receivers == null) { receivers = new LinkedList<ReceiverDescriptor>(); this.receiverMap.put(eventClass, receivers); } ...
[ "private", "void", "registerInternal", "(", "final", "Object", "receiver", ",", "final", "Method", "method", ",", "final", "Class", "<", "?", "extends", "T", ">", "eventClass", ")", "{", "List", "<", "ReceiverDescriptor", ">", "receivers", "=", "this", ".", ...
Registers a receiver to an internal map. @param receiver @param method @param eventClass
[ "Registers", "a", "receiver", "to", "an", "internal", "map", "." ]
train
https://github.com/micwin/ticino/blob/4d143093500cd2fb9767ebe8cd05ddda23e35613/events/src/main/java/net/micwin/ticino/events/EventScope.java#L201-L214
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/FilterCellFastStr.java
FilterCellFastStr.findNextCellWithLength
public FilterCellFastStr findNextCellWithLength(int hashcode, int length) { """ Find the next cell, for a given string hashcode, which may come after this cell in the address tree. @param hashcode The next string hashcodein the URL Address that is to be tested for inclusion in the address tree @param lengt...
java
public FilterCellFastStr findNextCellWithLength(int hashcode, int length) { if (nextCell == null) { return null; } FilterCellFastStr x = (FilterCellFastStr) nextCell.get(hashcode); if (x != null) { if (x.getHashLength() != length) { return null; ...
[ "public", "FilterCellFastStr", "findNextCellWithLength", "(", "int", "hashcode", ",", "int", "length", ")", "{", "if", "(", "nextCell", "==", "null", ")", "{", "return", "null", ";", "}", "FilterCellFastStr", "x", "=", "(", "FilterCellFastStr", ")", "nextCell"...
Find the next cell, for a given string hashcode, which may come after this cell in the address tree. @param hashcode The next string hashcodein the URL Address that is to be tested for inclusion in the address tree @param length the length of the string. If the hashcode and length match an entry for the next cell, the...
[ "Find", "the", "next", "cell", "for", "a", "given", "string", "hashcode", "which", "may", "come", "after", "this", "cell", "in", "the", "address", "tree", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/tcpchannel/internal/FilterCellFastStr.java#L81-L95
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractPathElement3F.java
AbstractPathElement3F.newInstance
@Pure public static AbstractPathElement3F newInstance(PathElementType type, double lastX, double lastY, double lastZ, double[] coords) { """ Create an instance of path element. @param type is the type of the new element. @param lastX is the coordinate of the last point. @param lastY is the coordinate of the ...
java
@Pure public static AbstractPathElement3F newInstance(PathElementType type, double lastX, double lastY, double lastZ, double[] coords) { switch(type) { case MOVE_TO: return new MovePathElement3f(coords[0], coords[1], coords[2]); case LINE_TO: return new LinePathElement3f(lastX, lastY, lastZ, coords[0], coo...
[ "@", "Pure", "public", "static", "AbstractPathElement3F", "newInstance", "(", "PathElementType", "type", ",", "double", "lastX", ",", "double", "lastY", ",", "double", "lastZ", ",", "double", "[", "]", "coords", ")", "{", "switch", "(", "type", ")", "{", "...
Create an instance of path element. @param type is the type of the new element. @param lastX is the coordinate of the last point. @param lastY is the coordinate of the last point. @param lastZ is the coordinate of the last point. @param coords are the coordinates. @return the instance of path element.
[ "Create", "an", "instance", "of", "path", "element", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractPathElement3F.java#L46-L62
Arello-Mobile/Moxy
moxy/src/main/java/com/arellomobile/mvp/PresentersCounter.java
PresentersCounter.injectPresenter
public void injectPresenter(MvpPresenter<?> presenter, String delegateTag) { """ Save delegate tag when it inject presenter to delegate's object @param presenter Injected presenter @param delegateTag Delegate tag """ Set<String> delegateTags = mConnections.get(presenter); if (delegateTags == null...
java
public void injectPresenter(MvpPresenter<?> presenter, String delegateTag) { Set<String> delegateTags = mConnections.get(presenter); if (delegateTags == null) { delegateTags = new HashSet<>(); mConnections.put(presenter, delegateTags); } delegateTags.add(delegateTag); Set<MvpPresenter> presenters = mT...
[ "public", "void", "injectPresenter", "(", "MvpPresenter", "<", "?", ">", "presenter", ",", "String", "delegateTag", ")", "{", "Set", "<", "String", ">", "delegateTags", "=", "mConnections", ".", "get", "(", "presenter", ")", ";", "if", "(", "delegateTags", ...
Save delegate tag when it inject presenter to delegate's object @param presenter Injected presenter @param delegateTag Delegate tag
[ "Save", "delegate", "tag", "when", "it", "inject", "presenter", "to", "delegate", "s", "object" ]
train
https://github.com/Arello-Mobile/Moxy/blob/83c608de22a55864f0cdd8c1eee878e72afa3e71/moxy/src/main/java/com/arellomobile/mvp/PresentersCounter.java#L27-L42
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/LingoSimilarity.java
LingoSimilarity.calculate
public static float calculate(Map<String, Integer> features1, Map<String, Integer> features2) { """ Evaluate the LINGO similarity between two key,value sty;e fingerprints. The value will range from 0.0 to 1.0. @param features1 @param features2 @return similarity """ TreeSet<String> keys = new T...
java
public static float calculate(Map<String, Integer> features1, Map<String, Integer> features2) { TreeSet<String> keys = new TreeSet<String>(features1.keySet()); keys.addAll(features2.keySet()); float sum = 0.0f; for (String key : keys) { Integer c1 = features1.get(key); ...
[ "public", "static", "float", "calculate", "(", "Map", "<", "String", ",", "Integer", ">", "features1", ",", "Map", "<", "String", ",", "Integer", ">", "features2", ")", "{", "TreeSet", "<", "String", ">", "keys", "=", "new", "TreeSet", "<", "String", "...
Evaluate the LINGO similarity between two key,value sty;e fingerprints. The value will range from 0.0 to 1.0. @param features1 @param features2 @return similarity
[ "Evaluate", "the", "LINGO", "similarity", "between", "two", "key", "value", "sty", ";", "e", "fingerprints", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/LingoSimilarity.java#L54-L69
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java
OutputHandler.styleChannel
public void styleChannel(String channel, Style style) { """ Style the tag for a particular channel this style @param channel The channel to style @param style The style to use """ if(this.channelStyles == null){ this.channelStyles = new HashMap<String,Style>(); } this.channelStyles.put(...
java
public void styleChannel(String channel, Style style){ if(this.channelStyles == null){ this.channelStyles = new HashMap<String,Style>(); } this.channelStyles.put(channel.toLowerCase(),style); }
[ "public", "void", "styleChannel", "(", "String", "channel", ",", "Style", "style", ")", "{", "if", "(", "this", ".", "channelStyles", "==", "null", ")", "{", "this", ".", "channelStyles", "=", "new", "HashMap", "<", "String", ",", "Style", ">", "(", ")...
Style the tag for a particular channel this style @param channel The channel to style @param style The style to use
[ "Style", "the", "tag", "for", "a", "particular", "channel", "this", "style" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/OutputHandler.java#L93-L98
fcrepo4/fcrepo4
fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java
ContentExposingResource.createUpdateResponse
@SuppressWarnings("resource") protected Response createUpdateResponse(final FedoraResource resource, final boolean created) { """ Create the appropriate response after a create or update request is processed. When a resource is created, examine the Prefer and Accept headers to determine whether to include a r...
java
@SuppressWarnings("resource") protected Response createUpdateResponse(final FedoraResource resource, final boolean created) { addCacheControlHeaders(servletResponse, resource, session); addResourceLinkHeaders(resource, created); addExternalContentHeaders(resource); addAclHeader(resou...
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "protected", "Response", "createUpdateResponse", "(", "final", "FedoraResource", "resource", ",", "final", "boolean", "created", ")", "{", "addCacheControlHeaders", "(", "servletResponse", ",", "resource", ",", "sessi...
Create the appropriate response after a create or update request is processed. When a resource is created, examine the Prefer and Accept headers to determine whether to include a representation. By default, the URI for the created resource is return as plain text. If a minimal response is requested, then no body is ret...
[ "Create", "the", "appropriate", "response", "after", "a", "create", "or", "update", "request", "is", "processed", ".", "When", "a", "resource", "is", "created", "examine", "the", "Prefer", "and", "Accept", "headers", "to", "determine", "whether", "to", "includ...
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java#L882-L914
apache/groovy
src/main/groovy/groovy/transform/stc/ClosureSignatureHint.java
ClosureSignatureHint.findClassNode
protected ClassNode findClassNode(final SourceUnit sourceUnit, final CompilationUnit compilationUnit, final String className) { """ Finds a class node given a string representing the type. Performs a lookup in the compilation unit to check if it is done in the same source unit. @param sourceUnit source unit @par...
java
protected ClassNode findClassNode(final SourceUnit sourceUnit, final CompilationUnit compilationUnit, final String className) { if (className.endsWith("[]")) { return findClassNode(sourceUnit, compilationUnit, className.substring(0, className.length() - 2)).makeArray(); } ClassNode c...
[ "protected", "ClassNode", "findClassNode", "(", "final", "SourceUnit", "sourceUnit", ",", "final", "CompilationUnit", "compilationUnit", ",", "final", "String", "className", ")", "{", "if", "(", "className", ".", "endsWith", "(", "\"[]\"", ")", ")", "{", "return...
Finds a class node given a string representing the type. Performs a lookup in the compilation unit to check if it is done in the same source unit. @param sourceUnit source unit @param compilationUnit compilation unit @param className the name of the class we want to get a {@link org.codehaus.groovy.ast.ClassNode} for @...
[ "Finds", "a", "class", "node", "given", "a", "string", "representing", "the", "type", ".", "Performs", "a", "lookup", "in", "the", "compilation", "unit", "to", "check", "if", "it", "is", "done", "in", "the", "same", "source", "unit", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/transform/stc/ClosureSignatureHint.java#L129-L142
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java
DateFormat.getDateTimeInstance
static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, Locale locale) { """ Creates a {@link DateFormat} object that can be used to format dates and times in the calendar system specified by <code>cal</code>. @param cal Th...
java
static final public DateFormat getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, Locale locale) { return getDateTimeInstance(dateStyle, timeStyle, ULocale.forLocale(locale)); }
[ "static", "final", "public", "DateFormat", "getDateTimeInstance", "(", "Calendar", "cal", ",", "int", "dateStyle", ",", "int", "timeStyle", ",", "Locale", "locale", ")", "{", "return", "getDateTimeInstance", "(", "dateStyle", ",", "timeStyle", ",", "ULocale", "....
Creates a {@link DateFormat} object that can be used to format dates and times in the calendar system specified by <code>cal</code>. @param cal The calendar system for which a date/time format is desired. @param dateStyle The type of date format desired. This can be {@link DateFormat#SHORT}, {@link DateFormat#MEDIU...
[ "Creates", "a", "{", "@link", "DateFormat", "}", "object", "that", "can", "be", "used", "to", "format", "dates", "and", "times", "in", "the", "calendar", "system", "specified", "by", "<code", ">", "cal<", "/", "code", ">", ".", "@param", "cal", "The", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L1828-L1832
i-net-software/jlessc
src/com/inet/lib/less/LessExtendMap.java
LessExtendMap.add
void add( LessExtend lessExtend, String[] mainSelector ) { """ Is calling on formatting if an extends was include. @param lessExtend the extend @param mainSelector the selectors in which the extend is placed. """ if( mainSelector == null || mainSelector[0].startsWith( "@media" ) ) { mainS...
java
void add( LessExtend lessExtend, String[] mainSelector ) { if( mainSelector == null || mainSelector[0].startsWith( "@media" ) ) { mainSelector = lessExtend.getSelectors(); } else { mainSelector = SelectorUtils.merge( mainSelector, lessExtend.getSelectors() ); } St...
[ "void", "add", "(", "LessExtend", "lessExtend", ",", "String", "[", "]", "mainSelector", ")", "{", "if", "(", "mainSelector", "==", "null", "||", "mainSelector", "[", "0", "]", ".", "startsWith", "(", "\"@media\"", ")", ")", "{", "mainSelector", "=", "le...
Is calling on formatting if an extends was include. @param lessExtend the extend @param mainSelector the selectors in which the extend is placed.
[ "Is", "calling", "on", "formatting", "if", "an", "extends", "was", "include", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/LessExtendMap.java#L79-L100
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java
ImageLoading.saveLq
public static void saveLq(Bitmap src, String fileName) throws ImageSaveException { """ Saving image in jpeg to file with quality 55 @param src source image @param fileName destination file name @throws ImageSaveException if it is unable to save image """ saveJpeg(src, fileName, JPEG_QUALITY_L...
java
public static void saveLq(Bitmap src, String fileName) throws ImageSaveException { saveJpeg(src, fileName, JPEG_QUALITY_LOW); }
[ "public", "static", "void", "saveLq", "(", "Bitmap", "src", ",", "String", "fileName", ")", "throws", "ImageSaveException", "{", "saveJpeg", "(", "src", ",", "fileName", ",", "JPEG_QUALITY_LOW", ")", ";", "}" ]
Saving image in jpeg to file with quality 55 @param src source image @param fileName destination file name @throws ImageSaveException if it is unable to save image
[ "Saving", "image", "in", "jpeg", "to", "file", "with", "quality", "55" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L299-L301
cfg4j/cfg4j
cfg4j-core/src/main/java/org/cfg4j/source/context/propertiesprovider/JsonBasedPropertiesProvider.java
JsonBasedPropertiesProvider.getProperties
@Override public Properties getProperties(InputStream inputStream) { """ Get {@link Properties} for a given {@code inputStream} treating it as a JSON file. @param inputStream input stream representing JSON file @return properties representing values from {@code inputStream} @throws IllegalStateException whe...
java
@Override public Properties getProperties(InputStream inputStream) { requireNonNull(inputStream); Properties properties = new Properties(); try { JSONTokener tokener = new JSONTokener(inputStream); if (tokener.end()) { return properties; } if (tokener.nextClean() == '"')...
[ "@", "Override", "public", "Properties", "getProperties", "(", "InputStream", "inputStream", ")", "{", "requireNonNull", "(", "inputStream", ")", ";", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "try", "{", "JSONTokener", "tokener", "=",...
Get {@link Properties} for a given {@code inputStream} treating it as a JSON file. @param inputStream input stream representing JSON file @return properties representing values from {@code inputStream} @throws IllegalStateException when unable to read properties
[ "Get", "{", "@link", "Properties", "}", "for", "a", "given", "{", "@code", "inputStream", "}", "treating", "it", "as", "a", "JSON", "file", "." ]
train
https://github.com/cfg4j/cfg4j/blob/47d4f63e5fc820c62631e557adc34a29d8ab396d/cfg4j-core/src/main/java/org/cfg4j/source/context/propertiesprovider/JsonBasedPropertiesProvider.java#L43-L71
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.ellipsoidVincentyFormulaDeg
public static double ellipsoidVincentyFormulaDeg(double f, double lat1, double lon1, double lat2, double lon2) { """ Compute the approximate great-circle distance of two points. <p> Reference: <p> T. Vincenty<br> Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations<...
java
public static double ellipsoidVincentyFormulaDeg(double f, double lat1, double lon1, double lat2, double lon2) { return ellipsoidVincentyFormulaRad(f, deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2)); }
[ "public", "static", "double", "ellipsoidVincentyFormulaDeg", "(", "double", "f", ",", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ")", "{", "return", "ellipsoidVincentyFormulaRad", "(", "f", ",", "deg2rad", "(", "lat1...
Compute the approximate great-circle distance of two points. <p> Reference: <p> T. Vincenty<br> Direct and inverse solutions of geodesics on the ellipsoid with application of nested equations<br> Survey review 23 176, 1975 @param f Ellipsoid flattening @param lat1 Latitude of first point in degree @param lon1 Longitud...
[ "Compute", "the", "approximate", "great", "-", "circle", "distance", "of", "two", "points", ".", "<p", ">", "Reference", ":", "<p", ">", "T", ".", "Vincenty<br", ">", "Direct", "and", "inverse", "solutions", "of", "geodesics", "on", "the", "ellipsoid", "wi...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L315-L317
OpenLiberty/open-liberty
dev/com.ibm.ws.app.manager.springboot/src/com/ibm/ws/app/manager/springboot/container/config/ConfigElement.java
ConfigElement.setExtraAttribute
public void setExtraAttribute(String name, String value) { """ Sets an attribute on this element that does not have an explicit setter. @param name the name @param value the value """ if (extraAttributes == null) { extraAttributes = new HashMap<QName, Object>(); } if (v...
java
public void setExtraAttribute(String name, String value) { if (extraAttributes == null) { extraAttributes = new HashMap<QName, Object>(); } if (value == null) { extraAttributes.remove(new QName(null, name)); } else { extraAttributes.put(new QName(null,...
[ "public", "void", "setExtraAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "extraAttributes", "==", "null", ")", "{", "extraAttributes", "=", "new", "HashMap", "<", "QName", ",", "Object", ">", "(", ")", ";", "}", "if", ...
Sets an attribute on this element that does not have an explicit setter. @param name the name @param value the value
[ "Sets", "an", "attribute", "on", "this", "element", "that", "does", "not", "have", "an", "explicit", "setter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.app.manager.springboot/src/com/ibm/ws/app/manager/springboot/container/config/ConfigElement.java#L55-L64
Impetus/Kundera
src/kundera-cassandra/cassandra-ds-driver/src/main/java/com/impetus/kundera/client/cassandra/dsdriver/DSClient.java
DSClient.createSelectQuery
private StringBuilder createSelectQuery(Object rowId, EntityMetadata metadata, String tableName) { """ Creates the select query. @param rowId the row id @param metadata the metadata @param tableName the table name @return the string builder """ MetamodelImpl metaModel = (MetamodelI...
java
private StringBuilder createSelectQuery(Object rowId, EntityMetadata metadata, String tableName) { MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(metadata.getPersistenceUnit()); CQLTranslator translator = new CQLTranslator(); String ...
[ "private", "StringBuilder", "createSelectQuery", "(", "Object", "rowId", ",", "EntityMetadata", "metadata", ",", "String", "tableName", ")", "{", "MetamodelImpl", "metaModel", "=", "(", "MetamodelImpl", ")", "kunderaMetadata", ".", "getApplicationMetadata", "(", ")", ...
Creates the select query. @param rowId the row id @param metadata the metadata @param tableName the table name @return the string builder
[ "Creates", "the", "select", "query", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-ds-driver/src/main/java/com/impetus/kundera/client/cassandra/dsdriver/DSClient.java#L177-L193
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/reflection/GobblinConstructorUtils.java
GobblinConstructorUtils.invokeFirstConstructor
@SafeVarargs public static <T> T invokeFirstConstructor(Class<T> cls, List<Object>... constructorArgs) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { """ Convenience method on top of {@link ConstructorUtils#invokeConstructor(Class, Object[])} that ...
java
@SafeVarargs public static <T> T invokeFirstConstructor(Class<T> cls, List<Object>... constructorArgs) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { for (List<Object> args : constructorArgs) { Class<?>[] parameterTypes = new Class[args.size...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "T", "invokeFirstConstructor", "(", "Class", "<", "T", ">", "cls", ",", "List", "<", "Object", ">", "...", "constructorArgs", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "In...
Convenience method on top of {@link ConstructorUtils#invokeConstructor(Class, Object[])} that returns a new instance of the <code>cls</code> based on a constructor priority order. Each {@link List} in the <code>constructorArgs</code> array contains the arguments for a constructor of <code>cls</code>. The first construc...
[ "Convenience", "method", "on", "top", "of", "{", "@link", "ConstructorUtils#invokeConstructor", "(", "Class", "Object", "[]", ")", "}", "that", "returns", "a", "new", "instance", "of", "the", "<code", ">", "cls<", "/", "code", ">", "based", "on", "a", "con...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/reflection/GobblinConstructorUtils.java#L46-L62
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.executeLocalCommand
@Given("^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$") public void executeLocalCommand(String command, String foo, Integer exitStatus, String bar, String envVar) throws Exception { """ Executes the command specified in local system @param command ...
java
@Given("^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$") public void executeLocalCommand(String command, String foo, Integer exitStatus, String bar, String envVar) throws Exception { if (exitStatus == null) { exitStatus = 0; } ...
[ "@", "Given", "(", "\"^I run '(.+?)' locally( with exit status '(.+?)')?( and save the value in environment variable '(.+?)')?$\"", ")", "public", "void", "executeLocalCommand", "(", "String", "command", ",", "String", "foo", ",", "Integer", "exitStatus", ",", "String", "bar", ...
Executes the command specified in local system @param command command to be run locally @param foo regex needed to match method @param exitStatus command exit status @param bar regex needed to match method @param envVar environment variable name @throws Exception exception
[ "Executes", "the", "command", "specified", "in", "local", "system" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L107-L117
casbin/jcasbin
src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java
ManagementEnforcer.hasNamedGroupingPolicy
public boolean hasNamedGroupingPolicy(String ptype, List<String> params) { """ hasNamedGroupingPolicy determines whether a named role inheritance rule exists. @param ptype the policy type, can be "g", "g2", "g3", .. @param params the "g" policy rule. @return whether the rule exists. """ return mod...
java
public boolean hasNamedGroupingPolicy(String ptype, List<String> params) { return model.hasPolicy("g", ptype, params); }
[ "public", "boolean", "hasNamedGroupingPolicy", "(", "String", "ptype", ",", "List", "<", "String", ">", "params", ")", "{", "return", "model", ".", "hasPolicy", "(", "\"g\"", ",", "ptype", ",", "params", ")", ";", "}" ]
hasNamedGroupingPolicy determines whether a named role inheritance rule exists. @param ptype the policy type, can be "g", "g2", "g3", .. @param params the "g" policy rule. @return whether the rule exists.
[ "hasNamedGroupingPolicy", "determines", "whether", "a", "named", "role", "inheritance", "rule", "exists", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/main/ManagementEnforcer.java#L400-L402
alkacon/opencms-core
src/org/opencms/relations/CmsLinkUpdateUtil.java
CmsLinkUpdateUtil.updateAttribute
private static void updateAttribute(Element parent, String attrName, String value) { """ Updates the given xml element attribute with the given value.<p> @param parent the element to set the attribute for @param attrName the attribute name @param value the value to set, or <code>null</code> to remove """ ...
java
private static void updateAttribute(Element parent, String attrName, String value) { if (parent != null) { Attribute attribute = parent.attribute(attrName); if (value != null) { if (attribute == null) { parent.addAttribute(attrName, value); ...
[ "private", "static", "void", "updateAttribute", "(", "Element", "parent", ",", "String", "attrName", ",", "String", "value", ")", "{", "if", "(", "parent", "!=", "null", ")", "{", "Attribute", "attribute", "=", "parent", ".", "attribute", "(", "attrName", ...
Updates the given xml element attribute with the given value.<p> @param parent the element to set the attribute for @param attrName the attribute name @param value the value to set, or <code>null</code> to remove
[ "Updates", "the", "given", "xml", "element", "attribute", "with", "the", "given", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsLinkUpdateUtil.java#L142-L159
box/box-java-sdk
src/main/java/com/box/sdk/BoxUser.java
BoxUser.createEnterpriseUser
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name, CreateUserParams params) { """ Provisions a new user in an enterprise with additional user information. @param api the API connection to be used by the created user. @param login the email address the u...
java
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name, CreateUserParams params) { JsonObject requestJSON = new JsonObject(); requestJSON.add("login", login); requestJSON.add("name", name); if (params != null) { if (params.ge...
[ "public", "static", "BoxUser", ".", "Info", "createEnterpriseUser", "(", "BoxAPIConnection", "api", ",", "String", "login", ",", "String", "name", ",", "CreateUserParams", "params", ")", "{", "JsonObject", "requestJSON", "=", "new", "JsonObject", "(", ")", ";", ...
Provisions a new user in an enterprise with additional user information. @param api the API connection to be used by the created user. @param login the email address the user will use to login. @param name the name of the user. @param params additional user information. @return the created user's info.
[ "Provisions", "a", "new", "user", "in", "an", "enterprise", "with", "additional", "user", "information", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxUser.java#L120-L158
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildSerializedFormSummaries
public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) throws DocletException { """ Build the serialized form summaries. @param node the XML element that specifies which components to document @param serializedTree content tree to which the documentation will be added @thro...
java
public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) throws DocletException { Content serializedSummariesTree = writer.getSerializedSummariesHeader(); for (PackageElement pkg : configuration.packages) { currentPackage = pkg; buildChildren(nod...
[ "public", "void", "buildSerializedFormSummaries", "(", "XMLNode", "node", ",", "Content", "serializedTree", ")", "throws", "DocletException", "{", "Content", "serializedSummariesTree", "=", "writer", ".", "getSerializedSummariesHeader", "(", ")", ";", "for", "(", "Pac...
Build the serialized form summaries. @param node the XML element that specifies which components to document @param serializedTree content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "serialized", "form", "summaries", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L175-L184
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newPostRequest
public static Request newPostRequest(Session session, String graphPath, GraphObject graphObject, Callback callback) { """ Creates a new Request configured to post a GraphObject to a particular graph path, to either create or update the object at that path. @param session the Session to use, or null; if non-nu...
java
public static Request newPostRequest(Session session, String graphPath, GraphObject graphObject, Callback callback) { Request request = new Request(session, graphPath, null, HttpMethod.POST , callback); request.setGraphObject(graphObject); return request; }
[ "public", "static", "Request", "newPostRequest", "(", "Session", "session", ",", "String", "graphPath", ",", "GraphObject", "graphObject", ",", "Callback", "callback", ")", "{", "Request", "request", "=", "new", "Request", "(", "session", ",", "graphPath", ",", ...
Creates a new Request configured to post a GraphObject to a particular graph path, to either create or update the object at that path. @param session the Session to use, or null; if non-null, the session must be in an opened state @param graphPath the graph path to retrieve, create, or delete @param graphObject the Gr...
[ "Creates", "a", "new", "Request", "configured", "to", "post", "a", "GraphObject", "to", "a", "particular", "graph", "path", "to", "either", "create", "or", "update", "the", "object", "at", "that", "path", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L260-L264
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/widgets/visualization/JobGraphLinkPainter.java
JobGraphLinkPainter.endLink
public boolean endLink(final Object endVertex, final MouseEvent mouseEvent) { """ If startVertex is non-null this method will attempt to end the link-painting at the given endVertex @return true if a link drawing was ended or false if it wasn't started """ logger.debug("endLink({})", endVertex); ...
java
public boolean endLink(final Object endVertex, final MouseEvent mouseEvent) { logger.debug("endLink({})", endVertex); boolean result = false; if (_startVertex != null && endVertex != null) { if (mouseEvent.getButton() == MouseEvent.BUTTON1) { final boolean created = c...
[ "public", "boolean", "endLink", "(", "final", "Object", "endVertex", ",", "final", "MouseEvent", "mouseEvent", ")", "{", "logger", ".", "debug", "(", "\"endLink({})\"", ",", "endVertex", ")", ";", "boolean", "result", "=", "false", ";", "if", "(", "_startVer...
If startVertex is non-null this method will attempt to end the link-painting at the given endVertex @return true if a link drawing was ended or false if it wasn't started
[ "If", "startVertex", "is", "non", "-", "null", "this", "method", "will", "attempt", "to", "end", "the", "link", "-", "painting", "at", "the", "given", "endVertex" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/widgets/visualization/JobGraphLinkPainter.java#L188-L202
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.getAllVarsDeclaredInFunction
static void getAllVarsDeclaredInFunction( final Map<String, Var> nameVarMap, final List<Var> orderedVars, AbstractCompiler compiler, ScopeCreator scopeCreator, final Scope scope) { """ Records a mapping of names to vars of everything reachable in a function. Should only be called wit...
java
static void getAllVarsDeclaredInFunction( final Map<String, Var> nameVarMap, final List<Var> orderedVars, AbstractCompiler compiler, ScopeCreator scopeCreator, final Scope scope) { checkState(nameVarMap.isEmpty()); checkState(orderedVars.isEmpty()); checkState(scope.isFunction...
[ "static", "void", "getAllVarsDeclaredInFunction", "(", "final", "Map", "<", "String", ",", "Var", ">", "nameVarMap", ",", "final", "List", "<", "Var", ">", "orderedVars", ",", "AbstractCompiler", "compiler", ",", "ScopeCreator", "scopeCreator", ",", "final", "Sc...
Records a mapping of names to vars of everything reachable in a function. Should only be called with a function scope. Does not enter new control flow areas aka embedded functions. @param nameVarMap an empty map that gets populated with the keys being variable names and values being variable objects @param orderedVars...
[ "Records", "a", "mapping", "of", "names", "to", "vars", "of", "everything", "reachable", "in", "a", "function", ".", "Should", "only", "be", "called", "with", "a", "function", "scope", ".", "Does", "not", "enter", "new", "control", "flow", "areas", "aka", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L5935-L5972
RKumsher/utils
src/main/java/com/github/rkumsher/number/RandomNumberUtils.java
RandomNumberUtils.randomIntLessThan
public static int randomIntLessThan(int maxExclusive) { """ Returns a random int that is less than the given int. @param maxExclusive the value that returned int must be less than @return the random int @throws IllegalArgumentException if maxExclusive is less than or equal to {@link Integer#MIN_VALUE} ""...
java
public static int randomIntLessThan(int maxExclusive) { checkArgument( maxExclusive > Integer.MIN_VALUE, "Cannot produce int less than %s", Integer.MIN_VALUE); return randomInt(Integer.MIN_VALUE, maxExclusive); }
[ "public", "static", "int", "randomIntLessThan", "(", "int", "maxExclusive", ")", "{", "checkArgument", "(", "maxExclusive", ">", "Integer", ".", "MIN_VALUE", ",", "\"Cannot produce int less than %s\"", ",", "Integer", ".", "MIN_VALUE", ")", ";", "return", "randomInt...
Returns a random int that is less than the given int. @param maxExclusive the value that returned int must be less than @return the random int @throws IllegalArgumentException if maxExclusive is less than or equal to {@link Integer#MIN_VALUE}
[ "Returns", "a", "random", "int", "that", "is", "less", "than", "the", "given", "int", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/number/RandomNumberUtils.java#L82-L86
indeedeng/util
urlparsing/src/main/java/com/indeed/util/urlparsing/ParseUtils.java
ParseUtils.parseTimestampFromUIDString
public static long parseTimestampFromUIDString(String s, final int start, final int end) { """ Parses out the timestamp portion of the uid Strings used in the logrepo """ long ret = 0; for (int i = start; i < end && i < start + 9; i++) { ret <<= 5; char c = s.charAt(i); ...
java
public static long parseTimestampFromUIDString(String s, final int start, final int end) { long ret = 0; for (int i = start; i < end && i < start + 9; i++) { ret <<= 5; char c = s.charAt(i); if (c >= '0' && c <= '9') { ret |= c - '0'; } els...
[ "public", "static", "long", "parseTimestampFromUIDString", "(", "String", "s", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "long", "ret", "=", "0", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", "&&", "i", ...
Parses out the timestamp portion of the uid Strings used in the logrepo
[ "Parses", "out", "the", "timestamp", "portion", "of", "the", "uid", "Strings", "used", "in", "the", "logrepo" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/urlparsing/src/main/java/com/indeed/util/urlparsing/ParseUtils.java#L180-L196
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/common/CoGProperties.java
CoGProperties.getTcpPortRange
public String getTcpPortRange() { """ Returns the tcp port range. It first checks the 'GLOBUS_TCP_PORT_RANGE' system property. If that system property is not set then 'org.globus.tcp.port.range' system property is checked. If that system property is not set then it returns the value specified in the configurat...
java
public String getTcpPortRange() { String value = null; value = System.getProperty("GLOBUS_TCP_PORT_RANGE"); if (value != null) { return value; } value = System.getProperty("org.globus.tcp.port.range"); if (value != null) { return value; } return getProperty("tcp.port.range", null); }
[ "public", "String", "getTcpPortRange", "(", ")", "{", "String", "value", "=", "null", ";", "value", "=", "System", ".", "getProperty", "(", "\"GLOBUS_TCP_PORT_RANGE\"", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ";", "}", "v...
Returns the tcp port range. It first checks the 'GLOBUS_TCP_PORT_RANGE' system property. If that system property is not set then 'org.globus.tcp.port.range' system property is checked. If that system property is not set then it returns the value specified in the configuration file. Returns null if the port range is not...
[ "Returns", "the", "tcp", "port", "range", ".", "It", "first", "checks", "the", "GLOBUS_TCP_PORT_RANGE", "system", "property", ".", "If", "that", "system", "property", "is", "not", "set", "then", "org", ".", "globus", ".", "tcp", ".", "port", ".", "range", ...
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/common/CoGProperties.java#L408-L419
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java
WaveformPreviewComponent.delegatingRepaint
@SuppressWarnings("SameParameterValue") private void delegatingRepaint(int x, int y, int width, int height) { """ Determine whether we should use the normal repaint process, or delegate that to another component that is hosting us in a soft-loaded manner to save memory. @param x the left edge of the region...
java
@SuppressWarnings("SameParameterValue") private void delegatingRepaint(int x, int y, int width, int height) { final RepaintDelegate delegate = repaintDelegate.get(); if (delegate != null) { //logger.info("Delegating repaint: " + x + ", " + y + ", " + width + ", " + height); d...
[ "@", "SuppressWarnings", "(", "\"SameParameterValue\"", ")", "private", "void", "delegatingRepaint", "(", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ")", "{", "final", "RepaintDelegate", "delegate", "=", "repaintDelegate", ".", "ge...
Determine whether we should use the normal repaint process, or delegate that to another component that is hosting us in a soft-loaded manner to save memory. @param x the left edge of the region that we want to have redrawn @param y the top edge of the region that we want to have redrawn @param width the width of the r...
[ "Determine", "whether", "we", "should", "use", "the", "normal", "repaint", "process", "or", "delegate", "that", "to", "another", "component", "that", "is", "hosting", "us", "in", "a", "soft", "-", "loaded", "manner", "to", "save", "memory", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java#L225-L235
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/TimeMeasure.java
TimeMeasure.getElapsedFormatted
String getElapsedFormatted(DateFormat _dateFormat, long _elapsedTime) { """ Same as above, used for proper unit testing. @param _dateFormat @param _elapsedTime @return formatted string """ Date elapsedTime = new Date(_elapsedTime); DateFormat sdf = _dateFormat; if (_dateFormat == nu...
java
String getElapsedFormatted(DateFormat _dateFormat, long _elapsedTime) { Date elapsedTime = new Date(_elapsedTime); DateFormat sdf = _dateFormat; if (_dateFormat == null) { sdf = new SimpleDateFormat("HH:mm:ss.SSS"); } sdf.setTimeZone(TimeZone.getTimeZone("UTC")); // ...
[ "String", "getElapsedFormatted", "(", "DateFormat", "_dateFormat", ",", "long", "_elapsedTime", ")", "{", "Date", "elapsedTime", "=", "new", "Date", "(", "_elapsedTime", ")", ";", "DateFormat", "sdf", "=", "_dateFormat", ";", "if", "(", "_dateFormat", "==", "n...
Same as above, used for proper unit testing. @param _dateFormat @param _elapsedTime @return formatted string
[ "Same", "as", "above", "used", "for", "proper", "unit", "testing", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/TimeMeasure.java#L89-L99
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.findByGroupId
@Override public List<CommerceWishList> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the commerce wish lists where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not prima...
java
@Override public List<CommerceWishList> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWishList", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce wish lists where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "wish", "lists", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L1533-L1536
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java
JPAUtils.copyCriteriaNoSelection
public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) { """ Copy Criteria without Selection @param from source Criteria @param to destination Criteria """ // Copy Roots for (Root<?> root : from.getRoots()) { Root<?> dest = to.from(root.getJava...
java
public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) { // Copy Roots for (Root<?> root : from.getRoots()) { Root<?> dest = to.from(root.getJavaType()); dest.alias(getOrCreateAlias(root)); copyJoins(root, dest); } if ...
[ "public", "static", "void", "copyCriteriaNoSelection", "(", "CriteriaQuery", "<", "?", ">", "from", ",", "CriteriaQuery", "<", "?", ">", "to", ")", "{", "// Copy Roots", "for", "(", "Root", "<", "?", ">", "root", ":", "from", ".", "getRoots", "(", ")", ...
Copy Criteria without Selection @param from source Criteria @param to destination Criteria
[ "Copy", "Criteria", "without", "Selection" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/utils/JPAUtils.java#L254-L268
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET
public OvhHourlyConsumption serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET(String serviceName, Long datacenterId, Long filerId) throws IOException { """ Hourly consumption associated with this Filer REST: GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourly...
java
public OvhHourlyConsumption serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET(String serviceName, Long datacenterId, Long filerId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourlyConsumption"; StringBuilder sb = path(qPath, ser...
[ "public", "OvhHourlyConsumption", "serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET", "(", "String", "serviceName", ",", "Long", "datacenterId", ",", "Long", "filerId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{service...
Hourly consumption associated with this Filer REST: GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourlyConsumption @param serviceName [required] Domain of the service @param datacenterId [required] @param filerId [required] Filer Id
[ "Hourly", "consumption", "associated", "with", "this", "Filer" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L2238-L2243
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/spi/MediaSource.java
MediaSource.resolveAllRenditions
private boolean resolveAllRenditions(Media media, Asset asset, MediaArgs mediaArgs) { """ Iterates over all defined media format and tries to find a matching rendition for each of them in combination with the other media args. @param media Media @param asset Asset @param mediaArgs Media args @return true if f...
java
private boolean resolveAllRenditions(Media media, Asset asset, MediaArgs mediaArgs) { boolean allMandatory = mediaArgs.isMediaFormatsMandatory(); boolean allResolved = true; boolean anyResolved = false; List<Rendition> resolvedRenditions = new ArrayList<>(); for (MediaFormat mediaFormat : mediaArgs....
[ "private", "boolean", "resolveAllRenditions", "(", "Media", "media", ",", "Asset", "asset", ",", "MediaArgs", "mediaArgs", ")", "{", "boolean", "allMandatory", "=", "mediaArgs", ".", "isMediaFormatsMandatory", "(", ")", ";", "boolean", "allResolved", "=", "true", ...
Iterates over all defined media format and tries to find a matching rendition for each of them in combination with the other media args. @param media Media @param asset Asset @param mediaArgs Media args @return true if for all mandatory or for at least one media formats a rendition could be found.
[ "Iterates", "over", "all", "defined", "media", "format", "and", "tries", "to", "find", "a", "matching", "rendition", "for", "each", "of", "them", "in", "combination", "with", "the", "other", "media", "args", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/spi/MediaSource.java#L337-L365
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferParallelAggregation.java
BufferParallelAggregation.or
public static MutableRoaringBitmap or(ImmutableRoaringBitmap... bitmaps) { """ Computes the bitwise union of the input bitmaps @param bitmaps the input bitmaps @return the union of the bitmaps """ SortedMap<Short, List<MappeableContainer>> grouped = groupByKey(bitmaps); short[] keys = new short[group...
java
public static MutableRoaringBitmap or(ImmutableRoaringBitmap... bitmaps) { SortedMap<Short, List<MappeableContainer>> grouped = groupByKey(bitmaps); short[] keys = new short[grouped.size()]; MappeableContainer[] values = new MappeableContainer[grouped.size()]; List<List<MappeableContainer>> slices = new...
[ "public", "static", "MutableRoaringBitmap", "or", "(", "ImmutableRoaringBitmap", "...", "bitmaps", ")", "{", "SortedMap", "<", "Short", ",", "List", "<", "MappeableContainer", ">", ">", "grouped", "=", "groupByKey", "(", "bitmaps", ")", ";", "short", "[", "]",...
Computes the bitwise union of the input bitmaps @param bitmaps the input bitmaps @return the union of the bitmaps
[ "Computes", "the", "bitwise", "union", "of", "the", "input", "bitmaps" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferParallelAggregation.java#L169-L183
apache/flink
flink-core/src/main/java/org/apache/flink/util/FileUtils.java
FileUtils.readAllBytes
public static byte[] readAllBytes(java.nio.file.Path path) throws IOException { """ Reads all the bytes from a file. The method ensures that the file is closed when all bytes have been read or an I/O error, or other runtime exception, is thrown. <p>This is an implementation that follow {@link java.nio.file.Fi...
java
public static byte[] readAllBytes(java.nio.file.Path path) throws IOException { try (SeekableByteChannel channel = Files.newByteChannel(path); InputStream in = Channels.newInputStream(channel)) { long size = channel.size(); if (size > (long) MAX_BUFFER_SIZE) { throw new OutOfMemoryError("Required array ...
[ "public", "static", "byte", "[", "]", "readAllBytes", "(", "java", ".", "nio", ".", "file", ".", "Path", "path", ")", "throws", "IOException", "{", "try", "(", "SeekableByteChannel", "channel", "=", "Files", ".", "newByteChannel", "(", "path", ")", ";", ...
Reads all the bytes from a file. The method ensures that the file is closed when all bytes have been read or an I/O error, or other runtime exception, is thrown. <p>This is an implementation that follow {@link java.nio.file.Files#readAllBytes(java.nio.file.Path)}, and the difference is that it limits the size of the d...
[ "Reads", "all", "the", "bytes", "from", "a", "file", ".", "The", "method", "ensures", "that", "the", "file", "is", "closed", "when", "all", "bytes", "have", "been", "read", "or", "an", "I", "/", "O", "error", "or", "other", "runtime", "exception", "is"...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/FileUtils.java#L143-L154
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/LocalWeightedHistogramRotRect.java
LocalWeightedHistogramRotRect.computeHistogramBorder
protected void computeHistogramBorder(T image, RectangleRotate_F32 region) { """ Computes the histogram and skips pixels which are outside the image border """ for( int i = 0; i < samplePts.size(); i++ ) { Point2D_F32 p = samplePts.get(i); squareToImageSample(p.x, p.y, region); // make sure its in...
java
protected void computeHistogramBorder(T image, RectangleRotate_F32 region) { for( int i = 0; i < samplePts.size(); i++ ) { Point2D_F32 p = samplePts.get(i); squareToImageSample(p.x, p.y, region); // make sure its inside the image if( !BoofMiscOps.checkInside(image, imageX, imageY)) { sampleHistIndex...
[ "protected", "void", "computeHistogramBorder", "(", "T", "image", ",", "RectangleRotate_F32", "region", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "samplePts", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Point2D_F32", "p", "=", ...
Computes the histogram and skips pixels which are outside the image border
[ "Computes", "the", "histogram", "and", "skips", "pixels", "which", "are", "outside", "the", "image", "border" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/LocalWeightedHistogramRotRect.java#L176-L195
banq/jdonframework
src/main/java/com/jdon/util/UtilDateTime.java
UtilDateTime.toDate
public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second) { """ Makes a Date from separate ints for month, day, year, hour, minute, and second. @param month The month int @param day The day int @param year The year int @param hour The hour int @param minute Th...
java
public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second) { Calendar calendar = Calendar.getInstance(); try { calendar.set(year, month - 1, day, hour, minute, second); } catch (Exception e) { return null; } return new java.util.Date(calendar.getTime().g...
[ "public", "static", "java", ".", "util", ".", "Date", "toDate", "(", "int", "month", ",", "int", "day", ",", "int", "year", ",", "int", "hour", ",", "int", "minute", ",", "int", "second", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getIn...
Makes a Date from separate ints for month, day, year, hour, minute, and second. @param month The month int @param day The day int @param year The year int @param hour The hour int @param minute The minute int @param second The second int @return A Date made from separate ints for month, day, year, hour, minute, and se...
[ "Makes", "a", "Date", "from", "separate", "ints", "for", "month", "day", "year", "hour", "minute", "and", "second", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L410-L419
super-csv/super-csv
super-csv/src/main/java/org/supercsv/io/CsvBeanReader.java
CsvBeanReader.invokeSetter
private static void invokeSetter(final Object bean, final Method setMethod, final Object fieldValue) { """ Invokes the setter on the bean with the supplied value. @param bean the bean @param setMethod the setter method for the field @param fieldValue the field value to set @throws SuperCsvException if th...
java
private static void invokeSetter(final Object bean, final Method setMethod, final Object fieldValue) { try { setMethod.setAccessible(true); setMethod.invoke(bean, fieldValue); } catch(final Exception e) { throw new SuperCsvReflectionException(String.format("error invoking method %s()", setMethod.getName(...
[ "private", "static", "void", "invokeSetter", "(", "final", "Object", "bean", ",", "final", "Method", "setMethod", ",", "final", "Object", "fieldValue", ")", "{", "try", "{", "setMethod", ".", "setAccessible", "(", "true", ")", ";", "setMethod", ".", "invoke"...
Invokes the setter on the bean with the supplied value. @param bean the bean @param setMethod the setter method for the field @param fieldValue the field value to set @throws SuperCsvException if there was an exception invoking the setter
[ "Invokes", "the", "setter", "on", "the", "bean", "with", "the", "supplied", "value", "." ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/io/CsvBeanReader.java#L133-L141
google/closure-compiler
src/com/google/javascript/jscomp/ProcessTweaks.java
ProcessTweaks.collectTweaks
private CollectTweaksResult collectTweaks(Node root) { """ Finds all calls to goog.tweak functions and emits warnings/errors if any of the calls have issues. @return A map of {@link TweakInfo} structures, keyed by tweak ID. """ CollectTweaks pass = new CollectTweaks(); NodeTraversal.traverse(compiler...
java
private CollectTweaksResult collectTweaks(Node root) { CollectTweaks pass = new CollectTweaks(); NodeTraversal.traverse(compiler, root, pass); Map<String, TweakInfo> tweakInfos = pass.allTweaks; for (TweakInfo tweakInfo : tweakInfos.values()) { tweakInfo.emitAllWarnings(); } return new Co...
[ "private", "CollectTweaksResult", "collectTweaks", "(", "Node", "root", ")", "{", "CollectTweaks", "pass", "=", "new", "CollectTweaks", "(", ")", ";", "NodeTraversal", ".", "traverse", "(", "compiler", ",", "root", ",", "pass", ")", ";", "Map", "<", "String"...
Finds all calls to goog.tweak functions and emits warnings/errors if any of the calls have issues. @return A map of {@link TweakInfo} structures, keyed by tweak ID.
[ "Finds", "all", "calls", "to", "goog", ".", "tweak", "functions", "and", "emits", "warnings", "/", "errors", "if", "any", "of", "the", "calls", "have", "issues", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessTweaks.java#L310-L319
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.fetchByC_S
@Override public CPInstance fetchByC_S(long CPDefinitionId, String sku) { """ Returns the cp instance where CPDefinitionId = &#63; and sku = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param sku the sku @return the matching c...
java
@Override public CPInstance fetchByC_S(long CPDefinitionId, String sku) { return fetchByC_S(CPDefinitionId, sku, true); }
[ "@", "Override", "public", "CPInstance", "fetchByC_S", "(", "long", "CPDefinitionId", ",", "String", "sku", ")", "{", "return", "fetchByC_S", "(", "CPDefinitionId", ",", "sku", ",", "true", ")", ";", "}" ]
Returns the cp instance where CPDefinitionId = &#63; and sku = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param sku the sku @return the matching cp instance, or <code>null</code> if a matching cp instance could not be found
[ "Returns", "the", "cp", "instance", "where", "CPDefinitionId", "=", "&#63", ";", "and", "sku", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "cache",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L4369-L4372
samskivert/samskivert
src/main/java/com/samskivert/swing/Controller.java
Controller.handleAction
public boolean handleAction (Component source, String command, Object arg) { """ A convenience method for constructing and immediately handling an event on this controller (via {@link #handleAction(ActionEvent)}). @return true if the controller knew how to handle the action, false otherwise. """ r...
java
public boolean handleAction (Component source, String command, Object arg) { return handleAction(new CommandEvent(source, command, arg)); }
[ "public", "boolean", "handleAction", "(", "Component", "source", ",", "String", "command", ",", "Object", "arg", ")", "{", "return", "handleAction", "(", "new", "CommandEvent", "(", "source", ",", "command", ",", "arg", ")", ")", ";", "}" ]
A convenience method for constructing and immediately handling an event on this controller (via {@link #handleAction(ActionEvent)}). @return true if the controller knew how to handle the action, false otherwise.
[ "A", "convenience", "method", "for", "constructing", "and", "immediately", "handling", "an", "event", "on", "this", "controller", "(", "via", "{", "@link", "#handleAction", "(", "ActionEvent", ")", "}", ")", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/Controller.java#L324-L327
playn/playn
core/src/playn/core/json/JsonObject.java
JsonObject.getLong
public long getLong(String key, long default_) { """ Returns the {@link Long} at the given key, or the default if it does not exist or is the wrong type. """ Object o = get(key); return o instanceof Number ? ((Number) o).longValue() : default_; }
java
public long getLong(String key, long default_) { Object o = get(key); return o instanceof Number ? ((Number) o).longValue() : default_; }
[ "public", "long", "getLong", "(", "String", "key", ",", "long", "default_", ")", "{", "Object", "o", "=", "get", "(", "key", ")", ";", "return", "o", "instanceof", "Number", "?", "(", "(", "Number", ")", "o", ")", ".", "longValue", "(", ")", ":", ...
Returns the {@link Long} at the given key, or the default if it does not exist or is the wrong type.
[ "Returns", "the", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonObject.java#L139-L142
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/SuperPositionQCP.java
SuperPositionQCP.innerProduct
private void innerProduct(Point3d[] coords1, Point3d[] coords2) { """ Calculates the inner product between two coordinate sets x and y (optionally weighted, if weights set through {@link #set(Point3d[], Point3d[], double[])}). It also calculates an upper bound of the most positive root of the key matrix. http:...
java
private void innerProduct(Point3d[] coords1, Point3d[] coords2) { double x1, x2, y1, y2, z1, z2; double g1 = 0.0, g2 = 0.0; Sxx = 0; Sxy = 0; Sxz = 0; Syx = 0; Syy = 0; Syz = 0; Szx = 0; Szy = 0; Szz = 0; if (weight != null) { wsum = 0; for (int i = 0; i < coords1.length; i++) { wsu...
[ "private", "void", "innerProduct", "(", "Point3d", "[", "]", "coords1", ",", "Point3d", "[", "]", "coords2", ")", "{", "double", "x1", ",", "x2", ",", "y1", ",", "y2", ",", "z1", ",", "z2", ";", "double", "g1", "=", "0.0", ",", "g2", "=", "0.0", ...
Calculates the inner product between two coordinate sets x and y (optionally weighted, if weights set through {@link #set(Point3d[], Point3d[], double[])}). It also calculates an upper bound of the most positive root of the key matrix. http://theobald.brandeis.edu/qcp/qcprot.c @param coords1 @param coords2 @return
[ "Calculates", "the", "inner", "product", "between", "two", "coordinate", "sets", "x", "and", "y", "(", "optionally", "weighted", "if", "weights", "set", "through", "{", "@link", "#set", "(", "Point3d", "[]", "Point3d", "[]", "double", "[]", ")", "}", ")", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/SuperPositionQCP.java#L320-L385
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.sum
public static Range sum(Range range1, Range range2) { """ Determines the range that can contain both ranges. If one of the ranges in contained in the other, the bigger range is returned. @param range1 a range @param range2 another range @return the bigger range """ if (range1.getMinimum().doubleV...
java
public static Range sum(Range range1, Range range2) { if (range1.getMinimum().doubleValue() <= range2.getMinimum().doubleValue()) { if (range1.getMaximum().doubleValue() >= range2.getMaximum().doubleValue()) { return range1; } else { return range(range1.ge...
[ "public", "static", "Range", "sum", "(", "Range", "range1", ",", "Range", "range2", ")", "{", "if", "(", "range1", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "<=", "range2", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "...
Determines the range that can contain both ranges. If one of the ranges in contained in the other, the bigger range is returned. @param range1 a range @param range2 another range @return the bigger range
[ "Determines", "the", "range", "that", "can", "contain", "both", "ranges", ".", "If", "one", "of", "the", "ranges", "in", "contained", "in", "the", "other", "the", "bigger", "range", "is", "returned", "." ]
train
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L84-L99
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java
FactoryDescribeRegionPoint.surfColorStable
public static <T extends ImageBase<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfColorStable(ConfigSurfDescribe.Stability config, ImageType<T> imageType) { """ Color variant of the SURF descriptor which has been designed for stability. @see DescribePointSurfPlanar @param config SURF...
java
public static <T extends ImageBase<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfColorStable(ConfigSurfDescribe.Stability config, ImageType<T> imageType) { Class bandType = imageType.getImageClass(); Class<II> integralType = GIntegralImageOps.getIntegralType(bandType); DescribePointSur...
[ "public", "static", "<", "T", "extends", "ImageBase", "<", "T", ">", ",", "II", "extends", "ImageGray", "<", "II", ">", ">", "DescribeRegionPoint", "<", "T", ",", "BrightFeature", ">", "surfColorStable", "(", "ConfigSurfDescribe", ".", "Stability", "config", ...
Color variant of the SURF descriptor which has been designed for stability. @see DescribePointSurfPlanar @param config SURF configuration. Pass in null for default options. @param imageType Type of input image. @return SURF color description extractor
[ "Color", "variant", "of", "the", "SURF", "descriptor", "which", "has", "been", "designed", "for", "stability", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/describe/FactoryDescribeRegionPoint.java#L127-L142
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.newFeatureCallGenerator
protected PyFeatureCallGenerator newFeatureCallGenerator(IExtraLanguageGeneratorContext context, IAppendable it) { """ Generate a feature call. @param context the generation context. @param it the code receiver. @return the generator """ return new PyFeatureCallGenerator(context, (ExtraLanguageAppendabl...
java
protected PyFeatureCallGenerator newFeatureCallGenerator(IExtraLanguageGeneratorContext context, IAppendable it) { return new PyFeatureCallGenerator(context, (ExtraLanguageAppendable) it); }
[ "protected", "PyFeatureCallGenerator", "newFeatureCallGenerator", "(", "IExtraLanguageGeneratorContext", "context", ",", "IAppendable", "it", ")", "{", "return", "new", "PyFeatureCallGenerator", "(", "context", ",", "(", "ExtraLanguageAppendable", ")", "it", ")", ";", "...
Generate a feature call. @param context the generation context. @param it the code receiver. @return the generator
[ "Generate", "a", "feature", "call", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L1028-L1030
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java
EnforceTrifocalGeometry.process
public void process( Point3D_F64 e2 , Point3D_F64 e3 , DMatrixRMaj A ) { """ Computes a trifocal tensor which minimizes the algebraic error given the two epipoles and the linear constraint matrix. The epipoles are from a previously computed trifocal tensor. @param e2 Epipole of first image in the second imag...
java
public void process( Point3D_F64 e2 , Point3D_F64 e3 , DMatrixRMaj A ) { // construct the linear system that the solution which solves the unknown square // matrices in the camera matrices constructE(e2, e3); // Computes U, which is used to map the 18 unknowns onto the 27 trifocal unknowns svdU.decompose(E);...
[ "public", "void", "process", "(", "Point3D_F64", "e2", ",", "Point3D_F64", "e3", ",", "DMatrixRMaj", "A", ")", "{", "// construct the linear system that the solution which solves the unknown square", "// matrices in the camera matrices", "constructE", "(", "e2", ",", "e3", ...
Computes a trifocal tensor which minimizes the algebraic error given the two epipoles and the linear constraint matrix. The epipoles are from a previously computed trifocal tensor. @param e2 Epipole of first image in the second image @param e3 Epipole of first image in the third image @param A Linear constraint matri...
[ "Computes", "a", "trifocal", "tensor", "which", "minimizes", "the", "algebraic", "error", "given", "the", "two", "epipoles", "and", "the", "linear", "constraint", "matrix", ".", "The", "epipoles", "are", "from", "a", "previously", "computed", "trifocal", "tensor...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/trifocal/EnforceTrifocalGeometry.java#L85-L117
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/tools/Tools.java
Tools.correctText
public static String correctText(String contents, JLanguageTool lt) throws IOException { """ Automatically applies suggestions to the text, as suggested by the rules that match. Note: if there is more than one suggestion, always the first one is applied, and others are ignored silently. @param contents Strin...
java
public static String correctText(String contents, JLanguageTool lt) throws IOException { List<RuleMatch> ruleMatches = lt.check(contents); if (ruleMatches.isEmpty()) { return contents; } return correctTextFromMatches(contents, ruleMatches); }
[ "public", "static", "String", "correctText", "(", "String", "contents", ",", "JLanguageTool", "lt", ")", "throws", "IOException", "{", "List", "<", "RuleMatch", ">", "ruleMatches", "=", "lt", ".", "check", "(", "contents", ")", ";", "if", "(", "ruleMatches",...
Automatically applies suggestions to the text, as suggested by the rules that match. Note: if there is more than one suggestion, always the first one is applied, and others are ignored silently. @param contents String to be corrected @param lt Initialized LanguageTool object @return Corrected text as String.
[ "Automatically", "applies", "suggestions", "to", "the", "text", "as", "suggested", "by", "the", "rules", "that", "match", ".", "Note", ":", "if", "there", "is", "more", "than", "one", "suggestion", "always", "the", "first", "one", "is", "applied", "and", "...
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/tools/Tools.java#L214-L220
agmip/translator-agmip
src/main/java/org/agmip/translators/agmip/AceWeatherAdaptor.java
AceWeatherAdaptor.formatNumStr
private String formatNumStr(int bits, String str) { """ Format the number with maximum length and type @param bits Maximum length of the output string @param str String for number value @return formated string of number """ String ret; String[] inputStr = str.split("\\."); if (str...
java
private String formatNumStr(int bits, String str) { String ret; String[] inputStr = str.split("\\."); if (str.trim().equals("")) { ret = String.format("%" + bits + "s", ""); } else if (str.length() <= bits) { ret = String.format("%1$" + bits + "s", str); ...
[ "private", "String", "formatNumStr", "(", "int", "bits", ",", "String", "str", ")", "{", "String", "ret", ";", "String", "[", "]", "inputStr", "=", "str", ".", "split", "(", "\"\\\\.\"", ")", ";", "if", "(", "str", ".", "trim", "(", ")", ".", "equa...
Format the number with maximum length and type @param bits Maximum length of the output string @param str String for number value @return formated string of number
[ "Format", "the", "number", "with", "maximum", "length", "and", "type" ]
train
https://github.com/agmip/translator-agmip/blob/61cb6a16db927380b459eea6f8db12aade367573/src/main/java/org/agmip/translators/agmip/AceWeatherAdaptor.java#L186-L203
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java
DiscreteFourierTransformOps.multiplyComplex
public static void multiplyComplex( InterleavedF32 complexA , InterleavedF32 complexB , InterleavedF32 complexC ) { """ Performs element-wise complex multiplication between two complex images. @param complexA (Input) Complex image @param complexB (Input) Complex image @param complexC (Output) Complex image ...
java
public static void multiplyComplex( InterleavedF32 complexA , InterleavedF32 complexB , InterleavedF32 complexC ) { InputSanityCheck.checkSameShape(complexA, complexB,complexC); for( int y = 0; y < complexA.height; y++ ) { int indexA = complexA.startIndex + y*complexA.stride; int indexB = complexB.startInd...
[ "public", "static", "void", "multiplyComplex", "(", "InterleavedF32", "complexA", ",", "InterleavedF32", "complexB", ",", "InterleavedF32", "complexC", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "complexA", ",", "complexB", ",", "complexC", ")", ";", ...
Performs element-wise complex multiplication between two complex images. @param complexA (Input) Complex image @param complexB (Input) Complex image @param complexC (Output) Complex image
[ "Performs", "element", "-", "wise", "complex", "multiplication", "between", "two", "complex", "images", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/fft/DiscreteFourierTransformOps.java#L459-L480
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.wsBefore
public Javalin wsBefore(@NotNull String path, @NotNull Consumer<WsHandler> wsHandler) { """ Adds a WebSocket before handler for the specified path to the instance. """ return addWsHandler(WsHandlerType.WS_BEFORE, path, wsHandler); }
java
public Javalin wsBefore(@NotNull String path, @NotNull Consumer<WsHandler> wsHandler) { return addWsHandler(WsHandlerType.WS_BEFORE, path, wsHandler); }
[ "public", "Javalin", "wsBefore", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "WsHandler", ">", "wsHandler", ")", "{", "return", "addWsHandler", "(", "WsHandlerType", ".", "WS_BEFORE", ",", "path", ",", "wsHandler", ")", ";", ...
Adds a WebSocket before handler for the specified path to the instance.
[ "Adds", "a", "WebSocket", "before", "handler", "for", "the", "specified", "path", "to", "the", "instance", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L541-L543
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newAgent
public Agent newAgent(QualifiedName ag, String label) { """ Creates a new {@link Agent} with provided identifier and label @param ag a {@link QualifiedName} for the agent @param label a String for the label property (see {@link HasLabel#getLabel()} @return an object of type {@link Agent} """ Agent res = ne...
java
public Agent newAgent(QualifiedName ag, String label) { Agent res = newAgent(ag); if (label != null) res.getLabel().add(newInternationalizedString(label)); return res; }
[ "public", "Agent", "newAgent", "(", "QualifiedName", "ag", ",", "String", "label", ")", "{", "Agent", "res", "=", "newAgent", "(", "ag", ")", ";", "if", "(", "label", "!=", "null", ")", "res", ".", "getLabel", "(", ")", ".", "add", "(", "newInternati...
Creates a new {@link Agent} with provided identifier and label @param ag a {@link QualifiedName} for the agent @param label a String for the label property (see {@link HasLabel#getLabel()} @return an object of type {@link Agent}
[ "Creates", "a", "new", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L459-L464
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/fiducial/VisualizeFiducial.java
VisualizeFiducial.drawCube
public static void drawCube(Se3_F64 targetToCamera, CameraPinholeBrown intrinsic, double width, double heightScale, int lineThickness, Graphics2D g2, double scale) { """ Draws a flat cube to show where the square fiducial is on the image """ g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, Rend...
java
public static void drawCube(Se3_F64 targetToCamera, CameraPinholeBrown intrinsic, double width, double heightScale, int lineThickness, Graphics2D g2, double scale) { g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING...
[ "public", "static", "void", "drawCube", "(", "Se3_F64", "targetToCamera", ",", "CameraPinholeBrown", "intrinsic", ",", "double", "width", ",", "double", "heightScale", ",", "int", "lineThickness", ",", "Graphics2D", "g2", ",", "double", "scale", ")", "{", "g2", ...
Draws a flat cube to show where the square fiducial is on the image
[ "Draws", "a", "flat", "cube", "to", "show", "where", "the", "square", "fiducial", "is", "on", "the", "image" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/fiducial/VisualizeFiducial.java#L86-L137
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/sparse/Chebyshev.java
Chebyshev.setEigenvalues
public void setEigenvalues(double eigmin, double eigmax) { """ Sets the eigenvalue estimates. @param eigmin Smallest eigenvalue. Must be positive @param eigmax Largest eigenvalue. Must be positive """ this.eigmin = eigmin; this.eigmax = eigmax; if (eigmin <= 0) throw ...
java
public void setEigenvalues(double eigmin, double eigmax) { this.eigmin = eigmin; this.eigmax = eigmax; if (eigmin <= 0) throw new IllegalArgumentException("eigmin <= 0"); if (eigmax <= 0) throw new IllegalArgumentException("eigmax <= 0"); if (eigmin > eig...
[ "public", "void", "setEigenvalues", "(", "double", "eigmin", ",", "double", "eigmax", ")", "{", "this", ".", "eigmin", "=", "eigmin", ";", "this", ".", "eigmax", "=", "eigmax", ";", "if", "(", "eigmin", "<=", "0", ")", "throw", "new", "IllegalArgumentExc...
Sets the eigenvalue estimates. @param eigmin Smallest eigenvalue. Must be positive @param eigmax Largest eigenvalue. Must be positive
[ "Sets", "the", "eigenvalue", "estimates", "." ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/sparse/Chebyshev.java#L78-L88
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdate.java
NonAtomicVolatileUpdate.expressionFromUnaryTree
private static Matcher<UnaryTree> expressionFromUnaryTree( final Matcher<ExpressionTree> exprMatcher) { """ Extracts the expression from a UnaryTree and applies a matcher to it. """ return new Matcher<UnaryTree>() { @Override public boolean matches(UnaryTree tree, VisitorState state) { ...
java
private static Matcher<UnaryTree> expressionFromUnaryTree( final Matcher<ExpressionTree> exprMatcher) { return new Matcher<UnaryTree>() { @Override public boolean matches(UnaryTree tree, VisitorState state) { return exprMatcher.matches(tree.getExpression(), state); } }; }
[ "private", "static", "Matcher", "<", "UnaryTree", ">", "expressionFromUnaryTree", "(", "final", "Matcher", "<", "ExpressionTree", ">", "exprMatcher", ")", "{", "return", "new", "Matcher", "<", "UnaryTree", ">", "(", ")", "{", "@", "Override", "public", "boolea...
Extracts the expression from a UnaryTree and applies a matcher to it.
[ "Extracts", "the", "expression", "from", "a", "UnaryTree", "and", "applies", "a", "matcher", "to", "it", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/NonAtomicVolatileUpdate.java#L57-L65
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/remote/RemoteProxyController.java
RemoteProxyController.translateOperationForProxy
public ModelNode translateOperationForProxy(final ModelNode op) { """ Translate the operation address. @param op the operation @return the new operation """ return translateOperationForProxy(op, PathAddress.pathAddress(op.get(OP_ADDR))); }
java
public ModelNode translateOperationForProxy(final ModelNode op) { return translateOperationForProxy(op, PathAddress.pathAddress(op.get(OP_ADDR))); }
[ "public", "ModelNode", "translateOperationForProxy", "(", "final", "ModelNode", "op", ")", "{", "return", "translateOperationForProxy", "(", "op", ",", "PathAddress", ".", "pathAddress", "(", "op", ".", "get", "(", "OP_ADDR", ")", ")", ")", ";", "}" ]
Translate the operation address. @param op the operation @return the new operation
[ "Translate", "the", "operation", "address", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/RemoteProxyController.java#L251-L253
pizza/MaterialTabs
sample/src/io/karim/materialtabs/sample/TabsActivity.java
TabsActivity.getDrawable
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private static Drawable getDrawable(Context context, @DrawableRes int drawableResId) { """ Convenience to use the new getDrawable(...) on Lollipop and the deprecated one on preLollipop. """ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ...
java
@TargetApi(Build.VERSION_CODES.LOLLIPOP) private static Drawable getDrawable(Context context, @DrawableRes int drawableResId) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return context.getDrawable(drawableResId); } else { return context.getResources().getDr...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "private", "static", "Drawable", "getDrawable", "(", "Context", "context", ",", "@", "DrawableRes", "int", "drawableResId", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_IN...
Convenience to use the new getDrawable(...) on Lollipop and the deprecated one on preLollipop.
[ "Convenience", "to", "use", "the", "new", "getDrawable", "(", "...", ")", "on", "Lollipop", "and", "the", "deprecated", "one", "on", "preLollipop", "." ]
train
https://github.com/pizza/MaterialTabs/blob/24c9bf922f29f0fbb201fb6b8f13d915fd87d322/sample/src/io/karim/materialtabs/sample/TabsActivity.java#L322-L329
audit4j/audit4j-core
src/main/java/org/audit4j/core/ValidationManager.java
ValidationManager.validateConfigurations
static void validateConfigurations(Configuration conf) throws ValidationException { """ Validate configurations. @param conf the conf @throws ValidationException the validation exception """ if (null == conf.getHandlers()) { Log.error( "Handler should not be null, ...
java
static void validateConfigurations(Configuration conf) throws ValidationException { if (null == conf.getHandlers()) { Log.error( "Handler should not be null, One or more handler implementation shuld be configured in the configuration", ErrorGuide.getGuide(Erro...
[ "static", "void", "validateConfigurations", "(", "Configuration", "conf", ")", "throws", "ValidationException", "{", "if", "(", "null", "==", "conf", ".", "getHandlers", "(", ")", ")", "{", "Log", ".", "error", "(", "\"Handler should not be null, One or more handler...
Validate configurations. @param conf the conf @throws ValidationException the validation exception
[ "Validate", "configurations", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/ValidationManager.java#L70-L83
SonarSource/sonarqube
sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java
ScannerPluginInstaller.listInstalledPlugins
private InstalledPlugin[] listInstalledPlugins() { """ Gets information about the plugins installed on server (filename, checksum) """ Profiler profiler = Profiler.create(LOG).startInfo("Load plugins index"); GetRequest getRequest = new GetRequest(PLUGINS_WS_URL); InstalledPlugins installedPlugins;...
java
private InstalledPlugin[] listInstalledPlugins() { Profiler profiler = Profiler.create(LOG).startInfo("Load plugins index"); GetRequest getRequest = new GetRequest(PLUGINS_WS_URL); InstalledPlugins installedPlugins; try (Reader reader = wsClient.call(getRequest).contentReader()) { installedPlugins...
[ "private", "InstalledPlugin", "[", "]", "listInstalledPlugins", "(", ")", "{", "Profiler", "profiler", "=", "Profiler", ".", "create", "(", "LOG", ")", ".", "startInfo", "(", "\"Load plugins index\"", ")", ";", "GetRequest", "getRequest", "=", "new", "GetRequest...
Gets information about the plugins installed on server (filename, checksum)
[ "Gets", "information", "about", "the", "plugins", "installed", "on", "server", "(", "filename", "checksum", ")" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java#L99-L111
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java
ClassPathBuilder.probeCodeBaseForResource
private boolean probeCodeBaseForResource(DiscoveredCodeBase discoveredCodeBase, String resourceName) { """ Probe a codebase to see if a given source exists in that code base. @param resourceName name of a resource @return true if the resource exists in the codebase, false if not """ ICodeBaseEntry...
java
private boolean probeCodeBaseForResource(DiscoveredCodeBase discoveredCodeBase, String resourceName) { ICodeBaseEntry resource = discoveredCodeBase.getCodeBase().lookupResource(resourceName); return resource != null; }
[ "private", "boolean", "probeCodeBaseForResource", "(", "DiscoveredCodeBase", "discoveredCodeBase", ",", "String", "resourceName", ")", "{", "ICodeBaseEntry", "resource", "=", "discoveredCodeBase", ".", "getCodeBase", "(", ")", ".", "lookupResource", "(", "resourceName", ...
Probe a codebase to see if a given source exists in that code base. @param resourceName name of a resource @return true if the resource exists in the codebase, false if not
[ "Probe", "a", "codebase", "to", "see", "if", "a", "given", "source", "exists", "in", "that", "code", "base", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java#L366-L369
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.deleteList
public StatusCode deleteList(String sessionId, String listId) throws MovieDbException { """ This method lets users delete a list that they created. A valid session id is required. @param sessionId sessionId @param listId listId @return @throws MovieDbException exception """ return tmdbList.delet...
java
public StatusCode deleteList(String sessionId, String listId) throws MovieDbException { return tmdbList.deleteList(sessionId, listId); }
[ "public", "StatusCode", "deleteList", "(", "String", "sessionId", ",", "String", "listId", ")", "throws", "MovieDbException", "{", "return", "tmdbList", ".", "deleteList", "(", "sessionId", ",", "listId", ")", ";", "}" ]
This method lets users delete a list that they created. A valid session id is required. @param sessionId sessionId @param listId listId @return @throws MovieDbException exception
[ "This", "method", "lets", "users", "delete", "a", "list", "that", "they", "created", ".", "A", "valid", "session", "id", "is", "required", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L788-L790
SG-O/miIO
src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java
Vacuum.cleanAreaFromMap
public boolean cleanAreaFromMap(int x0, int y0, int x1, int y1, int passes) throws CommandExecutionException { """ Clean the specified area on the map. @param x0 The x position of the first point defining the area in pixel. 512 pixel is the center of the map. @param y0 The y position of the first point defining ...
java
public boolean cleanAreaFromMap(int x0, int y0, int x1, int y1, int passes) throws CommandExecutionException { y0 = (y0 - 512) * -1 + 512; y1 = (y1 - 512) * -1 + 512; return cleanArea(x0 * 0.05f, y0 * 0.05f, x1 * 0.05f, y1 * 0.05f, passes); }
[ "public", "boolean", "cleanAreaFromMap", "(", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ",", "int", "passes", ")", "throws", "CommandExecutionException", "{", "y0", "=", "(", "y0", "-", "512", ")", "*", "-", "1", "+", "512", ...
Clean the specified area on the map. @param x0 The x position of the first point defining the area in pixel. 512 pixel is the center of the map. @param y0 The y position of the first point defining the area in pixel. 512 pixel is the center of the map. @param x1 The x position of the second point defining the area in p...
[ "Clean", "the", "specified", "area", "on", "the", "map", "." ]
train
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java#L320-L324
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java
HttpMessage.setDateField
public void setDateField(String name, long date) { """ Sets the value of a date field. Header or Trailer fields are set depending on message state. @param name the field name @param date the field date value """ if (_state!=__MSG_EDITABLE) return; _header.putDateField(name,date);...
java
public void setDateField(String name, long date) { if (_state!=__MSG_EDITABLE) return; _header.putDateField(name,date); }
[ "public", "void", "setDateField", "(", "String", "name", ",", "long", "date", ")", "{", "if", "(", "_state", "!=", "__MSG_EDITABLE", ")", "return", ";", "_header", ".", "putDateField", "(", "name", ",", "date", ")", ";", "}" ]
Sets the value of a date field. Header or Trailer fields are set depending on message state. @param name the field name @param date the field date value
[ "Sets", "the", "value", "of", "a", "date", "field", ".", "Header", "or", "Trailer", "fields", "are", "set", "depending", "on", "message", "state", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L398-L403
Red5/red5-io
src/main/java/org/red5/io/flv/meta/MetaService.java
MetaService.injectMetaData
private static ITag injectMetaData(IMetaData<?, ?> meta, ITag tag) { """ Injects metadata (other than Cue points) into a tag @param meta Metadata @param tag Tag @return New tag with injected metadata """ IoBuffer bb = IoBuffer.allocate(1000); bb.setAutoExpand(true); Output out = ...
java
private static ITag injectMetaData(IMetaData<?, ?> meta, ITag tag) { IoBuffer bb = IoBuffer.allocate(1000); bb.setAutoExpand(true); Output out = new Output(bb); Serializer.serialize(out, "onMetaData"); Serializer.serialize(out, meta); IoBuffer tmpBody = out.buf().flip(); ...
[ "private", "static", "ITag", "injectMetaData", "(", "IMetaData", "<", "?", ",", "?", ">", "meta", ",", "ITag", "tag", ")", "{", "IoBuffer", "bb", "=", "IoBuffer", ".", "allocate", "(", "1000", ")", ";", "bb", ".", "setAutoExpand", "(", "true", ")", "...
Injects metadata (other than Cue points) into a tag @param meta Metadata @param tag Tag @return New tag with injected metadata
[ "Injects", "metadata", "(", "other", "than", "Cue", "points", ")", "into", "a", "tag" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/flv/meta/MetaService.java#L211-L221
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java
JUnit3FloatingPointComparisonWithoutDelta.isFloatingPoint
private boolean isFloatingPoint(VisitorState state, Type type) { """ Determines if the type is a floating-point type, including reference types. """ Type trueType = unboxedTypeOrType(state, type); return (trueType.getKind() == TypeKind.DOUBLE) || (trueType.getKind() == TypeKind.FLOAT); }
java
private boolean isFloatingPoint(VisitorState state, Type type) { Type trueType = unboxedTypeOrType(state, type); return (trueType.getKind() == TypeKind.DOUBLE) || (trueType.getKind() == TypeKind.FLOAT); }
[ "private", "boolean", "isFloatingPoint", "(", "VisitorState", "state", ",", "Type", "type", ")", "{", "Type", "trueType", "=", "unboxedTypeOrType", "(", "state", ",", "type", ")", ";", "return", "(", "trueType", ".", "getKind", "(", ")", "==", "TypeKind", ...
Determines if the type is a floating-point type, including reference types.
[ "Determines", "if", "the", "type", "is", "a", "floating", "-", "point", "type", "including", "reference", "types", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java#L125-L128
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/CheckInstrumentableClassAdapter.java
CheckInstrumentableClassAdapter.isInstrumentableMethod
public boolean isInstrumentableMethod(int access, String methodName, String descriptor) { """ Indicate whether or not the target method is instrumentable. @param access the method property flags @param methodName the name of the method @return true if the method is not synthetic, is not native, and is no...
java
public boolean isInstrumentableMethod(int access, String methodName, String descriptor) { if ((access & Opcodes.ACC_SYNTHETIC) != 0) { return false; } if ((access & Opcodes.ACC_NATIVE) != 0) { return false; } if ((access & Opcodes.ACC_ABSTRACT) != 0) { ...
[ "public", "boolean", "isInstrumentableMethod", "(", "int", "access", ",", "String", "methodName", ",", "String", "descriptor", ")", "{", "if", "(", "(", "access", "&", "Opcodes", ".", "ACC_SYNTHETIC", ")", "!=", "0", ")", "{", "return", "false", ";", "}", ...
Indicate whether or not the target method is instrumentable. @param access the method property flags @param methodName the name of the method @return true if the method is not synthetic, is not native, and is not named toString or hashCode.
[ "Indicate", "whether", "or", "not", "the", "target", "method", "is", "instrumentable", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/bci/CheckInstrumentableClassAdapter.java#L108-L125
unbescape/unbescape
src/main/java/org/unbescape/csv/CsvEscape.java
CsvEscape.escapeCsv
public static void escapeCsv(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform a CSV <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> This method is <strong>thread-safe</strong>. </p> @param ...
java
public static void escapeCsv(final char[] text, final int offset, final int len, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen = (text == ...
[ "public", "static", "void", "escapeCsv", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{"...
<p> Perform a CSV <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> This method is <strong>thread-safe</strong>. </p> @param text the <tt>char[]</tt> to be escaped. @param offset the position in <tt>text</tt> at which the escape operation should start. @param len the number of characters in <tt>te...
[ "<p", ">", "Perform", "a", "CSV", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "is", "<strong", ">", "thread",...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/csv/CsvEscape.java#L210-L231
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java
MSPDIWriter.writePredecessor
private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag) { """ This method writes a single predecessor link to the MSPDI file. @param taskID The task UID @param type The predecessor type @param lag The lag duration @return A new link to be added to the MSPD...
java
private Project.Tasks.Task.PredecessorLink writePredecessor(Integer taskID, RelationType type, Duration lag) { Project.Tasks.Task.PredecessorLink link = m_factory.createProjectTasksTaskPredecessorLink(); link.setPredecessorUID(NumberHelper.getBigInteger(taskID)); link.setType(BigInteger.valueOf(ty...
[ "private", "Project", ".", "Tasks", ".", "Task", ".", "PredecessorLink", "writePredecessor", "(", "Integer", "taskID", ",", "RelationType", "type", ",", "Duration", "lag", ")", "{", "Project", ".", "Tasks", ".", "Task", ".", "PredecessorLink", "link", "=", "...
This method writes a single predecessor link to the MSPDI file. @param taskID The task UID @param type The predecessor type @param lag The lag duration @return A new link to be added to the MSPDI file
[ "This", "method", "writes", "a", "single", "predecessor", "link", "to", "the", "MSPDI", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIWriter.java#L1408-L1434
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java
FloatStyle.appendXMLHelper
void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException { """ A helper to create the XML representation of the float style @param util a util @param appendable the destination @param numberStyleName the style name ("curren...
java
void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException { this.numberStyle.appendXMLHelper(util, appendable, numberStyleName, number); }
[ "void", "appendXMLHelper", "(", "final", "XMLUtil", "util", ",", "final", "Appendable", "appendable", ",", "final", "String", "numberStyleName", ",", "final", "CharSequence", "number", ")", "throws", "IOException", "{", "this", ".", "numberStyle", ".", "appendXMLH...
A helper to create the XML representation of the float style @param util a util @param appendable the destination @param numberStyleName the style name ("currency-style", ...) @param number the number itslef @throws IOException if an I/O error occurs
[ "A", "helper", "to", "create", "the", "XML", "representation", "of", "the", "float", "style" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java#L104-L106
aspectran/aspectran
core/src/main/java/com/aspectran/core/adapter/BasicResponseAdapter.java
BasicResponseAdapter.setHeader
@Override public void setHeader(String name, String value) { """ Set the given single header value under the given header name. @param name the header name @param value the header value to set """ touchHeaders().set(name, value); }
java
@Override public void setHeader(String name, String value) { touchHeaders().set(name, value); }
[ "@", "Override", "public", "void", "setHeader", "(", "String", "name", ",", "String", "value", ")", "{", "touchHeaders", "(", ")", ".", "set", "(", "name", ",", "value", ")", ";", "}" ]
Set the given single header value under the given header name. @param name the header name @param value the header value to set
[ "Set", "the", "given", "single", "header", "value", "under", "the", "given", "header", "name", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/adapter/BasicResponseAdapter.java#L124-L127
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java
ForkJoinDynamicTaskMapper.createDynamicForkTask
@VisibleForTesting Task createDynamicForkTask(WorkflowTask taskToSchedule, Workflow workflowInstance, String taskId, List<WorkflowTask> dynForkTasks) { """ This method creates a FORK task and adds the list of dynamic fork tasks keyed by "forkedTaskDefs" and their names keyed by "forkedTasks" into {@link Task#...
java
@VisibleForTesting Task createDynamicForkTask(WorkflowTask taskToSchedule, Workflow workflowInstance, String taskId, List<WorkflowTask> dynForkTasks) { Task forkDynamicTask = new Task(); forkDynamicTask.setTaskType(SystemTaskType.FORK.name()); forkDynamicTask.setTaskDefName(SystemTaskType.FO...
[ "@", "VisibleForTesting", "Task", "createDynamicForkTask", "(", "WorkflowTask", "taskToSchedule", ",", "Workflow", "workflowInstance", ",", "String", "taskId", ",", "List", "<", "WorkflowTask", ">", "dynForkTasks", ")", "{", "Task", "forkDynamicTask", "=", "new", "T...
This method creates a FORK task and adds the list of dynamic fork tasks keyed by "forkedTaskDefs" and their names keyed by "forkedTasks" into {@link Task#getInputData()} @param taskToSchedule A {@link WorkflowTask} representing {@link TaskType#FORK_JOIN_DYNAMIC} @param workflowInstance: A instance of the {@link Wor...
[ "This", "method", "creates", "a", "FORK", "task", "and", "adds", "the", "list", "of", "dynamic", "fork", "tasks", "keyed", "by", "forkedTaskDefs", "and", "their", "names", "keyed", "by", "forkedTasks", "into", "{", "@link", "Task#getInputData", "()", "}" ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java#L178-L197
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Property.java
Property.checkAppURL
private static String checkAppURL(String originalAppURL, String newAppURL, String s) { """ A helper method to getAppURL, which checks the provided URL, and if it is valid, overrides the initially provided one. @param originalAppURL - the original and currently set app url @param newAppURL - the new app u...
java
private static String checkAppURL(String originalAppURL, String newAppURL, String s) { if (newAppURL != null && !"".equals(newAppURL)) { if (!newAppURL.toLowerCase().startsWith("http") && !newAppURL.toLowerCase().startsWith("file")) { newAppURL = "http://" + newAppURL; } ...
[ "private", "static", "String", "checkAppURL", "(", "String", "originalAppURL", ",", "String", "newAppURL", ",", "String", "s", ")", "{", "if", "(", "newAppURL", "!=", "null", "&&", "!", "\"\"", ".", "equals", "(", "newAppURL", ")", ")", "{", "if", "(", ...
A helper method to getAppURL, which checks the provided URL, and if it is valid, overrides the initially provided one. @param originalAppURL - the original and currently set app url @param newAppURL - the new app url to check @param s - the location being checked (for reporting) @return String: the m...
[ "A", "helper", "method", "to", "getAppURL", "which", "checks", "the", "provided", "URL", "and", "if", "it", "is", "valid", "overrides", "the", "initially", "provided", "one", "." ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L232-L245
jhalterman/lyra
src/main/java/net/jodah/lyra/config/RetryPolicy.java
RetryPolicy.withBackoff
@Override public RetryPolicy withBackoff(Duration interval, Duration maxInterval) { """ Sets the {@code interval} to pause for between attempts, exponentially backing of to the {@code maxInterval} multiplying successive intervals by a factor of 2. @throws NullPointerException if {@code interval} or {@code ma...
java
@Override public RetryPolicy withBackoff(Duration interval, Duration maxInterval) { return super.withBackoff(interval, maxInterval); }
[ "@", "Override", "public", "RetryPolicy", "withBackoff", "(", "Duration", "interval", ",", "Duration", "maxInterval", ")", "{", "return", "super", ".", "withBackoff", "(", "interval", ",", "maxInterval", ")", ";", "}" ]
Sets the {@code interval} to pause for between attempts, exponentially backing of to the {@code maxInterval} multiplying successive intervals by a factor of 2. @throws NullPointerException if {@code interval} or {@code maxInterval} are null @throws IllegalArgumentException if {@code interval} is <= 0 or {@code interva...
[ "Sets", "the", "{", "@code", "interval", "}", "to", "pause", "for", "between", "attempts", "exponentially", "backing", "of", "to", "the", "{", "@code", "maxInterval", "}", "multiplying", "successive", "intervals", "by", "a", "factor", "of", "2", "." ]
train
https://github.com/jhalterman/lyra/blob/ce347a69357fef1b34e92d92a4f9e68792d81255/src/main/java/net/jodah/lyra/config/RetryPolicy.java#L88-L91
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java
MetricContext.addNotificationTarget
public UUID addNotificationTarget(Function<Notification, Void> target) { """ Add a target for {@link org.apache.gobblin.metrics.notification.Notification}s. @param target A {@link com.google.common.base.Function} that will be run every time there is a new {@link org.apache.gobblin.metrics.notification.Notificati...
java
public UUID addNotificationTarget(Function<Notification, Void> target) { UUID uuid = UUID.randomUUID(); if(this.notificationTargets.containsKey(uuid)) { throw new RuntimeException("Failed to create notification target."); } this.notificationTargets.put(uuid, target); return uuid; }
[ "public", "UUID", "addNotificationTarget", "(", "Function", "<", "Notification", ",", "Void", ">", "target", ")", "{", "UUID", "uuid", "=", "UUID", ".", "randomUUID", "(", ")", ";", "if", "(", "this", ".", "notificationTargets", ".", "containsKey", "(", "u...
Add a target for {@link org.apache.gobblin.metrics.notification.Notification}s. @param target A {@link com.google.common.base.Function} that will be run every time there is a new {@link org.apache.gobblin.metrics.notification.Notification} in this context. @return a key for this notification target. Can be used to remo...
[ "Add", "a", "target", "for", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java#L581-L591
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/mtloader/MatcherThread.java
MatcherThread.handleUpdate
protected void handleUpdate(T oldObject, T newObject) { """ If the comparator decides that the (non-key) attributes do no match, this method is called. Default implementation is to call preprocessMatch, followed by executor.addForUpdate @param oldObject The existing version of the object (typically from the da...
java
protected void handleUpdate(T oldObject, T newObject) { this.preprocessMatch(oldObject, newObject); executor.addForUpdate(oldObject, newObject); }
[ "protected", "void", "handleUpdate", "(", "T", "oldObject", ",", "T", "newObject", ")", "{", "this", ".", "preprocessMatch", "(", "oldObject", ",", "newObject", ")", ";", "executor", ".", "addForUpdate", "(", "oldObject", ",", "newObject", ")", ";", "}" ]
If the comparator decides that the (non-key) attributes do no match, this method is called. Default implementation is to call preprocessMatch, followed by executor.addForUpdate @param oldObject The existing version of the object (typically from the database) @param newObject The new version of the object (typically fr...
[ "If", "the", "comparator", "decides", "that", "the", "(", "non", "-", "key", ")", "attributes", "do", "no", "match", "this", "method", "is", "called", ".", "Default", "implementation", "is", "to", "call", "preprocessMatch", "followed", "by", "executor", ".",...
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/mtloader/MatcherThread.java#L210-L214
GoogleCloudPlatform/bigdata-interop
bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/AbstractBigQueryInputFormat.java
AbstractBigQueryInputFormat.cleanupJob
public static void cleanupJob(Configuration configuration, JobID jobId) throws IOException { """ Cleans up relevant temporary resources associated with a job which used the GsonBigQueryInputFormat; this should be called explicitly after the completion of the entire job. Possibly cleans up intermediate export tab...
java
public static void cleanupJob(Configuration configuration, JobID jobId) throws IOException { String exportPathRoot = BigQueryConfiguration.getTemporaryPathRoot(configuration, jobId); configuration.set(BigQueryConfiguration.TEMP_GCS_PATH_KEY, exportPathRoot); Bigquery bigquery = null; try { bigquer...
[ "public", "static", "void", "cleanupJob", "(", "Configuration", "configuration", ",", "JobID", "jobId", ")", "throws", "IOException", "{", "String", "exportPathRoot", "=", "BigQueryConfiguration", ".", "getTemporaryPathRoot", "(", "configuration", ",", "jobId", ")", ...
Cleans up relevant temporary resources associated with a job which used the GsonBigQueryInputFormat; this should be called explicitly after the completion of the entire job. Possibly cleans up intermediate export tables if configured to use one due to specifying a BigQuery "query" for the input. Cleans up the GCS direc...
[ "Cleans", "up", "relevant", "temporary", "resources", "associated", "with", "a", "job", "which", "used", "the", "GsonBigQueryInputFormat", ";", "this", "should", "be", "called", "explicitly", "after", "the", "completion", "of", "the", "entire", "job", ".", "Poss...
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/AbstractBigQueryInputFormat.java#L207-L217
pravega/pravega
client/src/main/java/io/pravega/client/stream/impl/ModelHelper.java
ModelHelper.decode
public static Controller.StreamCut decode(final String scope, final String stream, Map<Long, Long> streamCut) { """ Creates a stream cut object. @param scope scope @param stream stream @param streamCut map of segment to position @return stream cut """ return Controller.StreamCut.newBuilder...
java
public static Controller.StreamCut decode(final String scope, final String stream, Map<Long, Long> streamCut) { return Controller.StreamCut.newBuilder().setStreamInfo(createStreamInfo(scope, stream)).putAllCut(streamCut).build(); }
[ "public", "static", "Controller", ".", "StreamCut", "decode", "(", "final", "String", "scope", ",", "final", "String", "stream", ",", "Map", "<", "Long", ",", "Long", ">", "streamCut", ")", "{", "return", "Controller", ".", "StreamCut", ".", "newBuilder", ...
Creates a stream cut object. @param scope scope @param stream stream @param streamCut map of segment to position @return stream cut
[ "Creates", "a", "stream", "cut", "object", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/stream/impl/ModelHelper.java#L321-L323
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/apploader/impl/GuiceInjectorBootstrap.java
GuiceInjectorBootstrap.createInjector
public static Injector createInjector(final PropertyFile configuration, final GuiceSetup setup) { """ Creates an Injector by taking a preloaded service.properties and a pre-constructed GuiceSetup @param properties @param setup @return """ return new GuiceBuilder().withConfig(configuration).withSetup(s...
java
public static Injector createInjector(final PropertyFile configuration, final GuiceSetup setup) { return new GuiceBuilder().withConfig(configuration).withSetup(setup).build(); }
[ "public", "static", "Injector", "createInjector", "(", "final", "PropertyFile", "configuration", ",", "final", "GuiceSetup", "setup", ")", "{", "return", "new", "GuiceBuilder", "(", ")", ".", "withConfig", "(", "configuration", ")", ".", "withSetup", "(", "setup...
Creates an Injector by taking a preloaded service.properties and a pre-constructed GuiceSetup @param properties @param setup @return
[ "Creates", "an", "Injector", "by", "taking", "a", "preloaded", "service", ".", "properties", "and", "a", "pre", "-", "constructed", "GuiceSetup" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/apploader/impl/GuiceInjectorBootstrap.java#L57-L60
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java
AbstractRedisStorage.retrieveCalendar
public Calendar retrieveCalendar(String name, T jedis) throws JobPersistenceException { """ Retrieve a calendar @param name the name of the calendar to be retrieved @param jedis a thread-safe Redis connection @return the desired calendar if it exists; null otherwise """ final String calendarHashKey ...
java
public Calendar retrieveCalendar(String name, T jedis) throws JobPersistenceException{ final String calendarHashKey = redisSchema.calendarHashKey(name); Calendar calendar; try{ final Map<String, String> calendarMap = jedis.hgetAll(calendarHashKey); if(calendarMap == null ...
[ "public", "Calendar", "retrieveCalendar", "(", "String", "name", ",", "T", "jedis", ")", "throws", "JobPersistenceException", "{", "final", "String", "calendarHashKey", "=", "redisSchema", ".", "calendarHashKey", "(", "name", ")", ";", "Calendar", "calendar", ";",...
Retrieve a calendar @param name the name of the calendar to be retrieved @param jedis a thread-safe Redis connection @return the desired calendar if it exists; null otherwise
[ "Retrieve", "a", "calendar" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java#L393-L411
codescape/bitvunit
bitvunit-core/src/main/java/de/codescape/bitvunit/ruleset/XmlRuleSet.java
XmlRuleSet.addRule
private void addRule(String className, Priority priority) { """ Instantiates and adds an instance of a {@link Rule} with the given class name to the list of rules contained in this {@link RuleSet} and configures the {@link Priority} accordingly. @param className class name of the {@link Rule} to be added @par...
java
private void addRule(String className, Priority priority) { Rule rule; try { rule = (Rule) Class.forName(className).newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { throw new XmlRuleSetException("Could not instantiate r...
[ "private", "void", "addRule", "(", "String", "className", ",", "Priority", "priority", ")", "{", "Rule", "rule", ";", "try", "{", "rule", "=", "(", "Rule", ")", "Class", ".", "forName", "(", "className", ")", ".", "newInstance", "(", ")", ";", "}", "...
Instantiates and adds an instance of a {@link Rule} with the given class name to the list of rules contained in this {@link RuleSet} and configures the {@link Priority} accordingly. @param className class name of the {@link Rule} to be added @param priority priority of the {@link Rule} to be added
[ "Instantiates", "and", "adds", "an", "instance", "of", "a", "{", "@link", "Rule", "}", "with", "the", "given", "class", "name", "to", "the", "list", "of", "rules", "contained", "in", "this", "{", "@link", "RuleSet", "}", "and", "configures", "the", "{", ...
train
https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/ruleset/XmlRuleSet.java#L92-L101
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.getByElasticPool
public DatabaseInner getByElasticPool(String resourceGroupName, String serverName, String elasticPoolName, String databaseName) { """ Gets a database inside of an elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource M...
java
public DatabaseInner getByElasticPool(String resourceGroupName, String serverName, String elasticPoolName, String databaseName) { return getByElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, databaseName).toBlocking().single().body(); }
[ "public", "DatabaseInner", "getByElasticPool", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "elasticPoolName", ",", "String", "databaseName", ")", "{", "return", "getByElasticPoolWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Gets a database inside of an elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param elasticPoolName The name of the elastic pool to be retrieved. @par...
[ "Gets", "a", "database", "inside", "of", "an", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L1342-L1344
lessthanoptimal/ddogleg
src/org/ddogleg/clustering/gmm/GaussianGmm_F64.java
GaussianGmm_F64.addMean
public void addMean( double[] point , double responsibility ) { """ Helper function for computing Gaussian parameters. Adds the point to mean and weight. """ for (int i = 0; i < mean.numRows; i++) { mean.data[i] += responsibility*point[i]; } weight += responsibility; }
java
public void addMean( double[] point , double responsibility ) { for (int i = 0; i < mean.numRows; i++) { mean.data[i] += responsibility*point[i]; } weight += responsibility; }
[ "public", "void", "addMean", "(", "double", "[", "]", "point", ",", "double", "responsibility", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "mean", ".", "numRows", ";", "i", "++", ")", "{", "mean", ".", "data", "[", "i", "]", "+=...
Helper function for computing Gaussian parameters. Adds the point to mean and weight.
[ "Helper", "function", "for", "computing", "Gaussian", "parameters", ".", "Adds", "the", "point", "to", "mean", "and", "weight", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/clustering/gmm/GaussianGmm_F64.java#L62-L67
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getHostingEnvironmentDetectorResponse
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { """ Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the...
java
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName, startTime, endTime,...
[ "public", "DetectorResponseInner", "getHostingEnvironmentDetectorResponse", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "detectorName", ",", "DateTime", "startTime", ",", "DateTime", "endTime", ",", "String", "timeGrain", ")", "{", "return"...
Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the resource group to which the resource belongs. @param name App Service Environment Name @param detectorName Detector Resource Name @param startTime Start Time @param endTime End Time @param timeGra...
[ "Get", "Hosting", "Environment", "Detector", "Response", ".", "Get", "Hosting", "Environment", "Detector", "Response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L432-L434