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
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.convertDateToTime
public static Time convertDateToTime(Date date, Time elseValue) { """ 将日期转换成时间 @param date {@link Date} @param elseValue 日期为空返回默认时间 @return {@link Time} @since 1.1.1 """ return Checker.isNull(date) ? elseValue : new Time(date.getTime()); }
java
public static Time convertDateToTime(Date date, Time elseValue) { return Checker.isNull(date) ? elseValue : new Time(date.getTime()); }
[ "public", "static", "Time", "convertDateToTime", "(", "Date", "date", ",", "Time", "elseValue", ")", "{", "return", "Checker", ".", "isNull", "(", "date", ")", "?", "elseValue", ":", "new", "Time", "(", "date", ".", "getTime", "(", ")", ")", ";", "}" ]
将日期转换成时间 @param date {@link Date} @param elseValue 日期为空返回默认时间 @return {@link Time} @since 1.1.1
[ "将日期转换成时间" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L104-L106
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/context/GenericsContext.java
GenericsContext.couldRequireKnownOuterGenerics
private boolean couldRequireKnownOuterGenerics(final GenericsContext root, final Type type) { """ Inner class could use outer class generics, and if outer class is known (in current hierarchy), we can assume to use it's generics (correct for most cases, but may be corner cases). @param root correct context for...
java
private boolean couldRequireKnownOuterGenerics(final GenericsContext root, final Type type) { final Type outer = TypeUtils.getOuter(type); // inner class may use generics of the root class return outer != null && genericsInfo.getComposingTypes().contains(root.resolveClass(outer)); }
[ "private", "boolean", "couldRequireKnownOuterGenerics", "(", "final", "GenericsContext", "root", ",", "final", "Type", "type", ")", "{", "final", "Type", "outer", "=", "TypeUtils", ".", "getOuter", "(", "type", ")", ";", "// inner class may use generics of the root cl...
Inner class could use outer class generics, and if outer class is known (in current hierarchy), we can assume to use it's generics (correct for most cases, but may be corner cases). @param root correct context for type resolution @param type type to check @return true if type is inner and outer class is present in cur...
[ "Inner", "class", "could", "use", "outer", "class", "generics", "and", "if", "outer", "class", "is", "known", "(", "in", "current", "hierarchy", ")", "we", "can", "assume", "to", "use", "it", "s", "generics", "(", "correct", "for", "most", "cases", "but"...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/context/GenericsContext.java#L288-L292
primefaces-extensions/core
src/main/java/org/primefaces/extensions/util/RequestParameterBuilder.java
RequestParameterBuilder.paramJson
public RequestParameterBuilder paramJson(String name, Object value) throws UnsupportedEncodingException { """ Adds a request parameter to the URL without specifying a data type of the given parameter value. Parameter's value is converted to JSON notation when adding. Furthermore, it will be encoded according to t...
java
public RequestParameterBuilder paramJson(String name, Object value) throws UnsupportedEncodingException { return paramJson(name, value, null); }
[ "public", "RequestParameterBuilder", "paramJson", "(", "String", "name", ",", "Object", "value", ")", "throws", "UnsupportedEncodingException", "{", "return", "paramJson", "(", "name", ",", "value", ",", "null", ")", ";", "}" ]
Adds a request parameter to the URL without specifying a data type of the given parameter value. Parameter's value is converted to JSON notation when adding. Furthermore, it will be encoded according to the acquired encoding. @param name name of the request parameter @param value value of the request parameter @return...
[ "Adds", "a", "request", "parameter", "to", "the", "URL", "without", "specifying", "a", "data", "type", "of", "the", "given", "parameter", "value", ".", "Parameter", "s", "value", "is", "converted", "to", "JSON", "notation", "when", "adding", ".", "Furthermor...
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/util/RequestParameterBuilder.java#L101-L103
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java
ComponentsInner.createOrUpdate
public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { """ Creates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation....
java
public ApplicationInsightsComponentInner createOrUpdate(String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, insightProperties).toBlocking().single().body(); }
[ "public", "ApplicationInsightsComponentInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ApplicationInsightsComponentInner", "insightProperties", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName",...
Creates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param insightProperties Proper...
[ "Creates", "(", "or", "updates", ")", "an", "Application", "Insights", "component", ".", "Note", ":", "You", "cannot", "specify", "a", "different", "value", "for", "InstrumentationKey", "nor", "AppId", "in", "the", "Put", "operation", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java#L519-L521
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.registerIdConvention
@SuppressWarnings("unchecked") public <TEntity> DocumentConventions registerIdConvention(Class<TEntity> clazz, BiFunction<String, TEntity, String> function) { """ Register an id convention for a single type (and all of its derived types. Note that you can still fall back to the DocumentIdGenerator if you want...
java
@SuppressWarnings("unchecked") public <TEntity> DocumentConventions registerIdConvention(Class<TEntity> clazz, BiFunction<String, TEntity, String> function) { assertNotFrozen(); _listOfRegisteredIdConventions.stream() .filter(x -> x.first.equals(clazz)) .findFirst() ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "TEntity", ">", "DocumentConventions", "registerIdConvention", "(", "Class", "<", "TEntity", ">", "clazz", ",", "BiFunction", "<", "String", ",", "TEntity", ",", "String", ">", "function", ")", ...
Register an id convention for a single type (and all of its derived types. Note that you can still fall back to the DocumentIdGenerator if you want. @param <TEntity> Entity class @param clazz Class @param function Function to use @return document conventions
[ "Register", "an", "id", "convention", "for", "a", "single", "type", "(", "and", "all", "of", "its", "derived", "types", ".", "Note", "that", "you", "can", "still", "fall", "back", "to", "the", "DocumentIdGenerator", "if", "you", "want", "." ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L375-L395
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/Collectors.java
Collectors.averagingInt
@NotNull public static <T> Collector<T, ?, Double> averagingInt(@NotNull final ToIntFunction<? super T> mapper) { """ Returns a {@code Collector} that calculates average of integer-valued input elements. @param <T> the type of the input elements @param mapper the mapping function which extracts value from...
java
@NotNull public static <T> Collector<T, ?, Double> averagingInt(@NotNull final ToIntFunction<? super T> mapper) { return averagingHelper(new BiConsumer<long[], T>() { @Override public void accept(long[] t, T u) { t[0]++; // count t[1] += mapper.applyAs...
[ "@", "NotNull", "public", "static", "<", "T", ">", "Collector", "<", "T", ",", "?", ",", "Double", ">", "averagingInt", "(", "@", "NotNull", "final", "ToIntFunction", "<", "?", "super", "T", ">", "mapper", ")", "{", "return", "averagingHelper", "(", "n...
Returns a {@code Collector} that calculates average of integer-valued input elements. @param <T> the type of the input elements @param mapper the mapping function which extracts value from element to calculate result @return a {@code Collector} @since 1.1.3
[ "Returns", "a", "{", "@code", "Collector", "}", "that", "calculates", "average", "of", "integer", "-", "valued", "input", "elements", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Collectors.java#L487-L496
apache/incubator-gobblin
gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/source/extractor/extract/google/GoogleCommon.java
GoogleCommon.newTransport
public static HttpTransport newTransport(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException { """ Provides HttpTransport. If both proxyUrl and postStr is defined, it provides transport with Proxy. @param proxyUrl Optional. @param portStr Optional. String type for...
java
public static HttpTransport newTransport(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException { if (!StringUtils.isEmpty(proxyUrl) && !StringUtils.isEmpty(portStr)) { return new NetHttpTransport.Builder() .trustCertificates(Googl...
[ "public", "static", "HttpTransport", "newTransport", "(", "String", "proxyUrl", ",", "String", "portStr", ")", "throws", "NumberFormatException", ",", "GeneralSecurityException", ",", "IOException", "{", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "proxyUrl"...
Provides HttpTransport. If both proxyUrl and postStr is defined, it provides transport with Proxy. @param proxyUrl Optional. @param portStr Optional. String type for port so that user can easily pass null. (e.g: state.getProp(key)) @return @throws NumberFormatException @throws GeneralSecurityException @throws IOExcepti...
[ "Provides", "HttpTransport", ".", "If", "both", "proxyUrl", "and", "postStr", "is", "defined", "it", "provides", "transport", "with", "Proxy", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/source/extractor/extract/google/GoogleCommon.java#L218-L226
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InboundNatRulesInner.java
InboundNatRulesInner.createOrUpdate
public InboundNatRuleInner createOrUpdate(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { """ Creates or updates a load balancer inbound nat rule. @param resourceGroupName The name of the resource group. @param loadBalancerName The n...
java
public InboundNatRuleInner createOrUpdate(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters).toBlocking().la...
[ "public", "InboundNatRuleInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "String", "inboundNatRuleName", ",", "InboundNatRuleInner", "inboundNatRuleParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "...
Creates or updates a load balancer inbound nat rule. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param inboundNatRuleName The name of the inbound nat rule. @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule o...
[ "Creates", "or", "updates", "a", "load", "balancer", "inbound", "nat", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InboundNatRulesInner.java#L572-L574
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.enforceAbsoluteQuadraticConstraints
public static boolean enforceAbsoluteQuadraticConstraints( DMatrix4x4 Q , boolean zeroCenter, boolean zeroSkew ) { """ If the solution to the absolute quadratic was computed using a linear methods it will not exactly have the required structure. This forces the structure to match. <ol> <li>Positive diagonal ele...
java
public static boolean enforceAbsoluteQuadraticConstraints( DMatrix4x4 Q , boolean zeroCenter, boolean zeroSkew ) { // see if it's potentially just off by a sign if( Q.a33 < 0 ) CommonOps_DDF4.scale(-1,Q); DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) ...
[ "public", "static", "boolean", "enforceAbsoluteQuadraticConstraints", "(", "DMatrix4x4", "Q", ",", "boolean", "zeroCenter", ",", "boolean", "zeroSkew", ")", "{", "// see if it's potentially just off by a sign", "if", "(", "Q", ".", "a33", "<", "0", ")", "CommonOps_DDF...
If the solution to the absolute quadratic was computed using a linear methods it will not exactly have the required structure. This forces the structure to match. <ol> <li>Positive diagonal elements</li> <li>(Optional) zero principle point</li> <li>(Optional) zero skew</li> <li>Q = H*diag([1 1 1 0])*H<sup>T</sup> and H...
[ "If", "the", "solution", "to", "the", "absolute", "quadratic", "was", "computed", "using", "a", "linear", "methods", "it", "will", "not", "exactly", "have", "the", "required", "structure", ".", "This", "forces", "the", "structure", "to", "match", ".", "<ol",...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1431-L1454
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Retryer.java
Retryer.fibonacciWait
public Retryer<R> fibonacciWait(final long multiplier, final long maximumWait) { """ Sets the wait strategy which sleeps for an increasing amount of time after the first failed attempt, and in Fibonacci increments after each failed attempt up to the {@code maximumTime}. The wait time between the retries can be c...
java
public Retryer<R> fibonacciWait(final long multiplier, final long maximumWait) { return withWaitStrategy(new WaitStrategy() { @Override public long computeSleepTime(int previousAttemptNumber, long delaySinceFirstAttemptInMillis) { long fib = fib(previousAttem...
[ "public", "Retryer", "<", "R", ">", "fibonacciWait", "(", "final", "long", "multiplier", ",", "final", "long", "maximumWait", ")", "{", "return", "withWaitStrategy", "(", "new", "WaitStrategy", "(", ")", "{", "@", "Override", "public", "long", "computeSleepTim...
Sets the wait strategy which sleeps for an increasing amount of time after the first failed attempt, and in Fibonacci increments after each failed attempt up to the {@code maximumTime}. The wait time between the retries can be controlled by the multiplier. nextWaitTime = fibonacciIncrement * {@code multiplier}. @param...
[ "Sets", "the", "wait", "strategy", "which", "sleeps", "for", "an", "increasing", "amount", "of", "time", "after", "the", "first", "failed", "attempt", "and", "in", "Fibonacci", "increments", "after", "each", "failed", "attempt", "up", "to", "the", "{", "@cod...
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Retryer.java#L570-L602
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.updateCertificateAsync
public Observable<AppServiceCertificateResourceInner> updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResource keyVaultCertificate) { """ Creates or updates a certificate and associates with key vault secret. Creates or updates a certificate and...
java
public Observable<AppServiceCertificateResourceInner> updateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificatePatchResource keyVaultCertificate) { return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCerti...
[ "public", "Observable", "<", "AppServiceCertificateResourceInner", ">", "updateCertificateAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "String", "name", ",", "AppServiceCertificatePatchResource", "keyVaultCertificate", ")", "{", "ret...
Creates or updates a certificate and associates with key vault secret. Creates or updates a certificate and associates with key vault secret. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param name Name of the certificate...
[ "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", ".", "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1511-L1518
j256/simplejmx
src/main/java/com/j256/simplejmx/common/ObjectNameUtil.java
ObjectNameUtil.makeObjectName
public static ObjectName makeObjectName(JmxResource jmxResource, Object obj) { """ Constructs an object-name from a jmx-resource and a object which is not self-naming. @param jmxResource Annotation from the class for which we are creating our ObjectName. @param obj Object for which we are creating our Object...
java
public static ObjectName makeObjectName(JmxResource jmxResource, Object obj) { String domainName = jmxResource.domainName(); if (isEmpty(domainName)) { throw new IllegalArgumentException( "Could not create ObjectName because domain name not specified in @JmxResource"); } String beanName = getBeanName(jm...
[ "public", "static", "ObjectName", "makeObjectName", "(", "JmxResource", "jmxResource", ",", "Object", "obj", ")", "{", "String", "domainName", "=", "jmxResource", ".", "domainName", "(", ")", ";", "if", "(", "isEmpty", "(", "domainName", ")", ")", "{", "thro...
Constructs an object-name from a jmx-resource and a object which is not self-naming. @param jmxResource Annotation from the class for which we are creating our ObjectName. @param obj Object for which we are creating our ObjectName @throws IllegalArgumentException If we had problems building the name
[ "Constructs", "an", "object", "-", "name", "from", "a", "jmx", "-", "resource", "and", "a", "object", "which", "is", "not", "self", "-", "naming", "." ]
train
https://github.com/j256/simplejmx/blob/1a04f52512dfa0a711ba0cc7023c604dbc82a352/src/main/java/com/j256/simplejmx/common/ObjectNameUtil.java#L76-L87
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MilestonesApi.java
MilestonesApi.createGroupMilestone
public Milestone createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException { """ Create a group milestone. @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance @param title the title for the mile...
java
public Milestone createGroupMilestone(Object groupIdOrPath, String title, String description, Date dueDate, Date startDate) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("description", description) ...
[ "public", "Milestone", "createGroupMilestone", "(", "Object", "groupIdOrPath", ",", "String", "title", ",", "String", "description", ",", "Date", "dueDate", ",", "Date", "startDate", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", ...
Create a group milestone. @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance @param title the title for the milestone @param description the description for the milestone @param dueDate the due date for the milestone @param startDate the start date for the milestone @return t...
[ "Create", "a", "group", "milestone", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L176-L185
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java
PRNGFixes.generateSeed
private static byte[] generateSeed() { """ Generates a device- and invocation-specific seed to be mixed into the Linux PRNG. """ try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedB...
java
private static byte[] generateSeed() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.w...
[ "private", "static", "byte", "[", "]", "generateSeed", "(", ")", "{", "try", "{", "ByteArrayOutputStream", "seedBuffer", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "DataOutputStream", "seedBufferOut", "=", "new", "DataOutputStream", "(", "seedBuffer", ")"...
Generates a device- and invocation-specific seed to be mixed into the Linux PRNG.
[ "Generates", "a", "device", "-", "and", "invocation", "-", "specific", "seed", "to", "be", "mixed", "into", "the", "Linux", "PRNG", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-android/src/main/java/im/actor/runtime/android/crypto/PRNGFixes.java#L304-L319
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/ButtonTemplate.java
ButtonTemplate.setButton
public void setButton(String type, String title, String url, String payload) { """ Set Button @param type the button type @param title the button title @param url the button url @param payload the button payload """ HashMap<String, String> button = new HashMap<String, String>(); button.pu...
java
public void setButton(String type, String title, String url, String payload) { HashMap<String, String> button = new HashMap<String, String>(); button.put("type", type); button.put("title", title); button.put("url", url); button.put("payload", payload); this.buttons.ad...
[ "public", "void", "setButton", "(", "String", "type", ",", "String", "title", ",", "String", "url", ",", "String", "payload", ")", "{", "HashMap", "<", "String", ",", "String", ">", "button", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(...
Set Button @param type the button type @param title the button title @param url the button url @param payload the button payload
[ "Set", "Button" ]
train
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/ButtonTemplate.java#L64-L72
samskivert/samskivert
src/main/java/com/samskivert/swing/util/SwingUtil.java
SwingUtil.setFrameIcons
public static void setFrameIcons (Frame frame, List<? extends Image> icons) { """ Sets the frame's icons. Unfortunately, the ability to pass multiple icons so the OS can choose the most size-appropriate one was added in 1.6; before that, you can only set one icon. This method attempts to find and use setIconI...
java
public static void setFrameIcons (Frame frame, List<? extends Image> icons) { try { Method m = frame.getClass().getMethod("setIconImages", List.class); m.invoke(frame, icons); return; } catch (SecurityException e) { // Fine, fine, no reflection for us ...
[ "public", "static", "void", "setFrameIcons", "(", "Frame", "frame", ",", "List", "<", "?", "extends", "Image", ">", "icons", ")", "{", "try", "{", "Method", "m", "=", "frame", ".", "getClass", "(", ")", ".", "getMethod", "(", "\"setIconImages\"", ",", ...
Sets the frame's icons. Unfortunately, the ability to pass multiple icons so the OS can choose the most size-appropriate one was added in 1.6; before that, you can only set one icon. This method attempts to find and use setIconImages, but if it can't, sets the frame's icon to the first image in the list passed in.
[ "Sets", "the", "frame", "s", "icons", ".", "Unfortunately", "the", "ability", "to", "pass", "multiple", "icons", "so", "the", "OS", "can", "choose", "the", "most", "size", "-", "appropriate", "one", "was", "added", "in", "1", ".", "6", ";", "before", "...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/SwingUtil.java#L576-L594
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCouponRedemptionsBySubscription
public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) { """ Lookup all coupon redemptions on a subscription given query params. @param subscriptionUuid String subscription uuid @param params {@link QueryParams} @return the coupon redemptions for this su...
java
public Redemptions getCouponRedemptionsBySubscription(final String subscriptionUuid, final QueryParams params) { return doGET(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionUuid + Redemptions.REDEMPTIONS_RESOURCE, Redemptions.class, params); }
[ "public", "Redemptions", "getCouponRedemptionsBySubscription", "(", "final", "String", "subscriptionUuid", ",", "final", "QueryParams", "params", ")", "{", "return", "doGET", "(", "Subscription", ".", "SUBSCRIPTION_RESOURCE", "+", "\"/\"", "+", "subscriptionUuid", "+", ...
Lookup all coupon redemptions on a subscription given query params. @param subscriptionUuid String subscription uuid @param params {@link QueryParams} @return the coupon redemptions for this subscription on success, null otherwise
[ "Lookup", "all", "coupon", "redemptions", "on", "a", "subscription", "given", "query", "params", "." ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1701-L1704
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/extensions/AbstractRoutingClient.java
AbstractRoutingClient.buildOwnerId
public static String buildOwnerId( RecipientKind ownerKind, String applicationName, String scopedInstancePath ) { """ Builds a unique ID. @param ownerKind the owner kind (not null) @param applicationName the application name (can be null) @param scopedInstancePath the scoped instance path (can be null) @return...
java
public static String buildOwnerId( RecipientKind ownerKind, String applicationName, String scopedInstancePath ) { StringBuilder sb = new StringBuilder(); if( ownerKind == RecipientKind.DM ) { sb.append( "@DM@" ); } else { if( scopedInstancePath !=null ) { sb.append( scopedInstancePath ); sb.append...
[ "public", "static", "String", "buildOwnerId", "(", "RecipientKind", "ownerKind", ",", "String", "applicationName", ",", "String", "scopedInstancePath", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "ownerKind", "==", "Re...
Builds a unique ID. @param ownerKind the owner kind (not null) @param applicationName the application name (can be null) @param scopedInstancePath the scoped instance path (can be null) @return a non-null string
[ "Builds", "a", "unique", "ID", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/extensions/AbstractRoutingClient.java#L223-L244
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201811/Pql.java
Pql.validateSetValueEntryForSet
private static void validateSetValueEntryForSet(Object entry, Set<?> set) { """ Validates that an Object is a valid entry for a SetValue. @param entry the Object to validate @throws IllegalArgumentException if the Object is an unsupported type """ if (entry instanceof Set<?> || entry instanceof SetValu...
java
private static void validateSetValueEntryForSet(Object entry, Set<?> set) { if (entry instanceof Set<?> || entry instanceof SetValue) { throw new IllegalArgumentException("Unsupported Value type [nested sets]"); } if (!set.isEmpty()) { Object existingEntry = set.iterator().next(); if (!exi...
[ "private", "static", "void", "validateSetValueEntryForSet", "(", "Object", "entry", ",", "Set", "<", "?", ">", "set", ")", "{", "if", "(", "entry", "instanceof", "Set", "<", "?", ">", "||", "entry", "instanceof", "SetValue", ")", "{", "throw", "new", "Il...
Validates that an Object is a valid entry for a SetValue. @param entry the Object to validate @throws IllegalArgumentException if the Object is an unsupported type
[ "Validates", "that", "an", "Object", "is", "a", "valid", "entry", "for", "a", "SetValue", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201811/Pql.java#L128-L141
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.removeIssue
public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { """ Remove an epic - issue association. <pre><code>GitLab Endpoint: DELETE /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Gro...
java
public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.c...
[ "public", "EpicIssue", "removeIssue", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "Integer", "issueIid", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "delete", "(", "Response", ".", "Status", ".", "OK", ",", "null", ...
Remove an epic - issue association. <pre><code>GitLab Endpoint: DELETE /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the Epic IID to remove the issue from @param issueIid the issue IID of ...
[ "Remove", "an", "epic", "-", "issue", "association", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L433-L437
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java
URLUtil.complateUrl
public static String complateUrl(String baseUrl, String relativePath) { """ 补全相对路径 @param baseUrl 基准URL @param relativePath 相对URL @return 相对路径 @exception UtilException MalformedURLException """ baseUrl = normalize(baseUrl, false); if (StrUtil.isBlank(baseUrl)) { return null; } try { ...
java
public static String complateUrl(String baseUrl, String relativePath) { baseUrl = normalize(baseUrl, false); if (StrUtil.isBlank(baseUrl)) { return null; } try { final URL absoluteUrl = new URL(baseUrl); final URL parseUrl = new URL(absoluteUrl, relativePath); return parseUrl.toString(); ...
[ "public", "static", "String", "complateUrl", "(", "String", "baseUrl", ",", "String", "relativePath", ")", "{", "baseUrl", "=", "normalize", "(", "baseUrl", ",", "false", ")", ";", "if", "(", "StrUtil", ".", "isBlank", "(", "baseUrl", ")", ")", "{", "ret...
补全相对路径 @param baseUrl 基准URL @param relativePath 相对URL @return 相对路径 @exception UtilException MalformedURLException
[ "补全相对路径" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java#L193-L206
biojava/biojava
biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/twobit/TwoBitFacade.java
TwoBitFacade.getSequence
public String getSequence(String chromosomeName, int start, int end) throws Exception { """ Extract a sequence from a chromosome, using chromosomal coordinates @param chromosomeName @param start @param end @return the DNASequence from the requested coordinates. @throws Exception """ twoBitParser.close...
java
public String getSequence(String chromosomeName, int start, int end) throws Exception { twoBitParser.close(); twoBitParser.setCurrentSequence(chromosomeName); return twoBitParser.loadFragment(start,end-start); }
[ "public", "String", "getSequence", "(", "String", "chromosomeName", ",", "int", "start", ",", "int", "end", ")", "throws", "Exception", "{", "twoBitParser", ".", "close", "(", ")", ";", "twoBitParser", ".", "setCurrentSequence", "(", "chromosomeName", ")", ";"...
Extract a sequence from a chromosome, using chromosomal coordinates @param chromosomeName @param start @param end @return the DNASequence from the requested coordinates. @throws Exception
[ "Extract", "a", "sequence", "from", "a", "chromosome", "using", "chromosomal", "coordinates" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/twobit/TwoBitFacade.java#L78-L82
caelum/vraptor4
vraptor-musicjungle/src/main/java/br/com/caelum/vraptor/musicjungle/controller/UsersController.java
UsersController.addToMyList
@Path("/users/ { """ Accepts HTTP PUT requests. <br> <strong>URL:</strong> /users/login/musics/id (for example, /users/john/musics/3 adds the music with id 3 to the john's collection)<br> <strong>View:</strong> redirects to user's home <br> You can use more than one variable on URI. Since the browsers ...
java
@Path("/users/{user.login}/musics/{music.id}") @Put public void addToMyList(User user, Music music) { User currentUser = userInfo.getUser(); userDao.refresh(currentUser); validator.check(user.getLogin().equals(currentUser.getLogin()), new SimpleMessage("user", "you_cant_add_to_ot...
[ "@", "Path", "(", "\"/users/{user.login}/musics/{music.id}\"", ")", "@", "Put", "public", "void", "addToMyList", "(", "User", "user", ",", "Music", "music", ")", "{", "User", "currentUser", "=", "userInfo", ".", "getUser", "(", ")", ";", "userDao", ".", "ref...
Accepts HTTP PUT requests. <br> <strong>URL:</strong> /users/login/musics/id (for example, /users/john/musics/3 adds the music with id 3 to the john's collection)<br> <strong>View:</strong> redirects to user's home <br> You can use more than one variable on URI. Since the browsers don't support PUT method you have t...
[ "Accepts", "HTTP", "PUT", "requests", ".", "<br", ">" ]
train
https://github.com/caelum/vraptor4/blob/593ce9ad60f9d38c360881b2132417c56b8cc093/vraptor-musicjungle/src/main/java/br/com/caelum/vraptor/musicjungle/controller/UsersController.java#L172-L190
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java
AbstractMapBasedWALDAO.internalMarkItemDeleted
@MustBeLocked (ELockType.WRITE) protected final void internalMarkItemDeleted (@Nonnull final IMPLTYPE aItem, final boolean bInvokeCallbacks) { """ Mark an item as "deleted" without actually deleting it from the map. This method only triggers the update action but does not alter the item. Must only be invoked i...
java
@MustBeLocked (ELockType.WRITE) protected final void internalMarkItemDeleted (@Nonnull final IMPLTYPE aItem, final boolean bInvokeCallbacks) { // Trigger save changes super.markAsChanged (aItem, EDAOActionType.UPDATE); if (bInvokeCallbacks) { // Invoke callbacks m_aCallbacks.forEach (aC...
[ "@", "MustBeLocked", "(", "ELockType", ".", "WRITE", ")", "protected", "final", "void", "internalMarkItemDeleted", "(", "@", "Nonnull", "final", "IMPLTYPE", "aItem", ",", "final", "boolean", "bInvokeCallbacks", ")", "{", "// Trigger save changes", "super", ".", "m...
Mark an item as "deleted" without actually deleting it from the map. This method only triggers the update action but does not alter the item. Must only be invoked inside a write-lock. @param aItem The item that was marked as "deleted" @param bInvokeCallbacks <code>true</code> to invoke callbacks, <code>false</code> to...
[ "Mark", "an", "item", "as", "deleted", "without", "actually", "deleting", "it", "from", "the", "map", ".", "This", "method", "only", "triggers", "the", "update", "action", "but", "does", "not", "alter", "the", "item", ".", "Must", "only", "be", "invoked", ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java#L454-L465
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PrincipalUser.java
PrincipalUser.createAdminUser
private static PrincipalUser createAdminUser() { """ /* Method provided to be called using reflection to discretely create the admin user if needed. """ PrincipalUser result = new PrincipalUser("admin", "argus-admin@salesforce.com"); result.id = BigInteger.ONE; result.setPrivileged(tru...
java
private static PrincipalUser createAdminUser() { PrincipalUser result = new PrincipalUser("admin", "argus-admin@salesforce.com"); result.id = BigInteger.ONE; result.setPrivileged(true); return result; }
[ "private", "static", "PrincipalUser", "createAdminUser", "(", ")", "{", "PrincipalUser", "result", "=", "new", "PrincipalUser", "(", "\"admin\"", ",", "\"argus-admin@salesforce.com\"", ")", ";", "result", ".", "id", "=", "BigInteger", ".", "ONE", ";", "result", ...
/* Method provided to be called using reflection to discretely create the admin user if needed.
[ "/", "*", "Method", "provided", "to", "be", "called", "using", "reflection", "to", "discretely", "create", "the", "admin", "user", "if", "needed", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PrincipalUser.java#L272-L278
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/TokenMapperGenericSorter.java
TokenMapperGenericSorter.compareValues
@SuppressWarnings( { """ Compares its two field value arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. @param val1 The first field value to be compared. @param val2 The second field value to be compared. @re...
java
@SuppressWarnings({"unchecked", "rawtypes"}) @Override public int compareValues(BytesRef val1, BytesRef val2) { if (val1 == null) { if (val2 == null) { return 0; } return -1; } else if (val2 == null) { return 1; } To...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "@", "Override", "public", "int", "compareValues", "(", "BytesRef", "val1", ",", "BytesRef", "val2", ")", "{", "if", "(", "val1", "==", "null", ")", "{", "if", "(", "val2"...
Compares its two field value arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. @param val1 The first field value to be compared. @param val2 The second field value to be compared. @return A negative integer, zero, or a...
[ "Compares", "its", "two", "field", "value", "arguments", "for", "order", ".", "Returns", "a", "negative", "integer", "zero", "or", "a", "positive", "integer", "as", "the", "first", "argument", "is", "less", "than", "equal", "to", "or", "greater", "than", "...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/TokenMapperGenericSorter.java#L53-L67
Pkmmte/CircularImageView
circularimageview/src/main/java/com/pkmmte/view/CircularImageView.java
CircularImageView.updateBitmapShader
public void updateBitmapShader() { """ Re-initializes the shader texture used to fill in the Circle upon drawing. """ if (image == null) return; shader = new BitmapShader(image, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); if(canvasSize != image.getWidth() || canvasSize != image.getHeight()) { ...
java
public void updateBitmapShader() { if (image == null) return; shader = new BitmapShader(image, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); if(canvasSize != image.getWidth() || canvasSize != image.getHeight()) { Matrix matrix = new Matrix(); float scale = (float) canvasSize / (float) image.getWidth()...
[ "public", "void", "updateBitmapShader", "(", ")", "{", "if", "(", "image", "==", "null", ")", "return", ";", "shader", "=", "new", "BitmapShader", "(", "image", ",", "Shader", ".", "TileMode", ".", "CLAMP", ",", "Shader", ".", "TileMode", ".", "CLAMP", ...
Re-initializes the shader texture used to fill in the Circle upon drawing.
[ "Re", "-", "initializes", "the", "shader", "texture", "used", "to", "fill", "in", "the", "Circle", "upon", "drawing", "." ]
train
https://github.com/Pkmmte/CircularImageView/blob/aca59f32d9267c943eb6c930bdaed59c417a4d16/circularimageview/src/main/java/com/pkmmte/view/CircularImageView.java#L428-L440
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.addAttributes
protected void addAttributes(Entity entity, Map<String, Object> attributes) { """ Fill attributes for specified entity. @param entity entity to fill. @param attributes Map of attributes on filling to entity. """ if (attributes != null) { for (Entry<String, Object> pairs : attributes...
java
protected void addAttributes(Entity entity, Map<String, Object> attributes) { if (attributes != null) { for (Entry<String, Object> pairs : attributes.entrySet()) { entity.set(pairs.getKey(), pairs.getValue()); } } }
[ "protected", "void", "addAttributes", "(", "Entity", "entity", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "if", "(", "attributes", "!=", "null", ")", "{", "for", "(", "Entry", "<", "String", ",", "Object", ">", "pairs", ":",...
Fill attributes for specified entity. @param entity entity to fill. @param attributes Map of attributes on filling to entity.
[ "Fill", "attributes", "for", "specified", "entity", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L1336-L1342
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java
StructureTools.hasNonDeuteratedEquiv
public static boolean hasNonDeuteratedEquiv(Atom atom, Group currentGroup) { """ Check to see if an Deuterated atom has a non deuterated brother in the group. @param atom the input atom that is putatively deuterium @param currentGroup the group the atom is in @return true if the atom is deuterated and it's hydr...
java
public static boolean hasNonDeuteratedEquiv(Atom atom, Group currentGroup) { if(atom.getElement()==Element.D && currentGroup.hasAtom(replaceFirstChar(atom.getName(),'D', 'H'))) { // If it's deuterated and has a non-deuterated brother return true; } return false; }
[ "public", "static", "boolean", "hasNonDeuteratedEquiv", "(", "Atom", "atom", ",", "Group", "currentGroup", ")", "{", "if", "(", "atom", ".", "getElement", "(", ")", "==", "Element", ".", "D", "&&", "currentGroup", ".", "hasAtom", "(", "replaceFirstChar", "("...
Check to see if an Deuterated atom has a non deuterated brother in the group. @param atom the input atom that is putatively deuterium @param currentGroup the group the atom is in @return true if the atom is deuterated and it's hydrogen equive exists.
[ "Check", "to", "see", "if", "an", "Deuterated", "atom", "has", "a", "non", "deuterated", "brother", "in", "the", "group", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L1895-L1901
tacitknowledge/discovery
src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java
ClassDiscoveryUtil.getClasses
public static Class[] getClasses(String basePackage, Class requiredInterface) { """ Returns an array of concrete classes in the given package that implement the specified interface. @param basePackage the name of the package containing the classes to discover @param requiredInterface the inteface that the r...
java
public static Class[] getClasses(String basePackage, Class requiredInterface) { return getClasses(basePackage, new Class[] {requiredInterface}); }
[ "public", "static", "Class", "[", "]", "getClasses", "(", "String", "basePackage", ",", "Class", "requiredInterface", ")", "{", "return", "getClasses", "(", "basePackage", ",", "new", "Class", "[", "]", "{", "requiredInterface", "}", ")", ";", "}" ]
Returns an array of concrete classes in the given package that implement the specified interface. @param basePackage the name of the package containing the classes to discover @param requiredInterface the inteface that the returned classes must implement @return an array of concrete classes in the given package that...
[ "Returns", "an", "array", "of", "concrete", "classes", "in", "the", "given", "package", "that", "implement", "the", "specified", "interface", "." ]
train
https://github.com/tacitknowledge/discovery/blob/700f5492c9cb5c0146d684acb38b71fd4ef4e97a/src/main/java/com/tacitknowledge/util/discovery/ClassDiscoveryUtil.java#L98-L101
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDialog.java
WDialog.setTitle
public void setTitle(final String title, final Serializable... args) { """ Sets the dialog title. @param title the title to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string. """ getOrCreateComponentModel().title = I18nUtilities.asMessage(title, args); ...
java
public void setTitle(final String title, final Serializable... args) { getOrCreateComponentModel().title = I18nUtilities.asMessage(title, args); }
[ "public", "void", "setTitle", "(", "final", "String", "title", ",", "final", "Serializable", "...", "args", ")", "{", "getOrCreateComponentModel", "(", ")", ".", "title", "=", "I18nUtilities", ".", "asMessage", "(", "title", ",", "args", ")", ";", "}" ]
Sets the dialog title. @param title the title to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "dialog", "title", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDialog.java#L264-L266
square/okhttp
okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java
Http2Connection.writeData
public void writeData(int streamId, boolean outFinished, Buffer buffer, long byteCount) throws IOException { """ Callers of this method are not thread safe, and sometimes on application threads. Most often, this method will be called to send a buffer worth of data to the peer. <p>Writes are subject to th...
java
public void writeData(int streamId, boolean outFinished, Buffer buffer, long byteCount) throws IOException { if (byteCount == 0) { // Empty data frames are not flow-controlled. writer.data(outFinished, streamId, buffer, 0); return; } while (byteCount > 0) { int toWrite; synchr...
[ "public", "void", "writeData", "(", "int", "streamId", ",", "boolean", "outFinished", ",", "Buffer", "buffer", ",", "long", "byteCount", ")", "throws", "IOException", "{", "if", "(", "byteCount", "==", "0", ")", "{", "// Empty data frames are not flow-controlled."...
Callers of this method are not thread safe, and sometimes on application threads. Most often, this method will be called to send a buffer worth of data to the peer. <p>Writes are subject to the write window of the stream and the connection. Until there is a window sufficient to send {@code byteCount}, the caller will ...
[ "Callers", "of", "this", "method", "are", "not", "thread", "safe", "and", "sometimes", "on", "application", "threads", ".", "Most", "often", "this", "method", "will", "be", "called", "to", "send", "a", "buffer", "worth", "of", "data", "to", "the", "peer", ...
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java#L286-L318
joniles/mpxj
src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java
ConceptDrawProjectReader.readWeekDay
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day) { """ Reads a single day for a calendar. @param mpxjCalendar ProjectCalendar instance @param day ConceptDraw PROJECT week day """ if (day.isIsDayWorking()) { ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(d...
java
private void readWeekDay(ProjectCalendar mpxjCalendar, WeekDay day) { if (day.isIsDayWorking()) { ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day.getDay()); for (Document.Calendars.Calendar.WeekDays.WeekDay.TimePeriods.TimePeriod period : day.getTimePeriods().getTimePerio...
[ "private", "void", "readWeekDay", "(", "ProjectCalendar", "mpxjCalendar", ",", "WeekDay", "day", ")", "{", "if", "(", "day", ".", "isIsDayWorking", "(", ")", ")", "{", "ProjectCalendarHours", "hours", "=", "mpxjCalendar", ".", "addCalendarHours", "(", "day", "...
Reads a single day for a calendar. @param mpxjCalendar ProjectCalendar instance @param day ConceptDraw PROJECT week day
[ "Reads", "a", "single", "day", "for", "a", "calendar", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L253-L263
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java
CommsByteBuffer.checkXACommandCompletionStatus
public synchronized void checkXACommandCompletionStatus(int expected, Conversation conversation) throws XAException, Exception { """ This method will check the return status of a remote XA call. An XA call can return in two ways: <ul> <li>It can return with SI_NOEXCEPTION. In which case the call was succe...
java
public synchronized void checkXACommandCompletionStatus(int expected, Conversation conversation) throws XAException, Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkXACommandCompletionStatus", new Object[]{expected, conversation}); checkReleased()...
[ "public", "synchronized", "void", "checkXACommandCompletionStatus", "(", "int", "expected", ",", "Conversation", "conversation", ")", "throws", "XAException", ",", "Exception", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", ...
This method will check the return status of a remote XA call. An XA call can return in two ways: <ul> <li>It can return with SI_NOEXCEPTION. In which case the call was successful and the data buffer probably contains reply information. As such, if this occurs this method will return without looking further into the buf...
[ "This", "method", "will", "check", "the", "return", "status", "of", "a", "remote", "XA", "call", ".", "An", "XA", "call", "can", "return", "in", "two", "ways", ":", "<ul", ">", "<li", ">", "It", "can", "return", "with", "SI_NOEXCEPTION", ".", "In", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java#L1179-L1202
jasminb/jsonapi-converter
src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java
ResourceConverter.writeDocument
public byte [] writeDocument(JSONAPIDocument<?> document, SerializationSettings settings) throws DocumentSerializationException { """ Serializes provided {@link JSONAPIDocument} into JSON API Spec compatible byte representation. @param document {@link JSONAPIDocument} document to serialize @param settings {...
java
public byte [] writeDocument(JSONAPIDocument<?> document, SerializationSettings settings) throws DocumentSerializationException { try { resourceCache.init(); Map<String, ObjectNode> includedDataMap = new HashMap<>(); ObjectNode result = objectMapper.createObjectNode(); // Serialize data if present ...
[ "public", "byte", "[", "]", "writeDocument", "(", "JSONAPIDocument", "<", "?", ">", "document", ",", "SerializationSettings", "settings", ")", "throws", "DocumentSerializationException", "{", "try", "{", "resourceCache", ".", "init", "(", ")", ";", "Map", "<", ...
Serializes provided {@link JSONAPIDocument} into JSON API Spec compatible byte representation. @param document {@link JSONAPIDocument} document to serialize @param settings {@link SerializationSettings} settings that override global serialization settings @return serialized content in bytes @throws DocumentSerializati...
[ "Serializes", "provided", "{", "@link", "JSONAPIDocument", "}", "into", "JSON", "API", "Spec", "compatible", "byte", "representation", "." ]
train
https://github.com/jasminb/jsonapi-converter/blob/73b41c3b9274e70e62b3425071ca8afdc7bddaf6/src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java#L690-L731
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.mergeFiles
public static void mergeFiles(File[] files, File destinationFile, String filterRegex) throws IOException { """ 合并文件 @param files 文件数组 @param destinationFile 目标文件 @param filterRegex 过滤规则(正则表达式,所有文件使用同一个过滤规则,为空时不过滤) @throws IOException 异常 """ createNewFile(destinationFile); for (File file...
java
public static void mergeFiles(File[] files, File destinationFile, String filterRegex) throws IOException { createNewFile(destinationFile); for (File file : files) { mergeFiles(file, destinationFile, filterRegex); } }
[ "public", "static", "void", "mergeFiles", "(", "File", "[", "]", "files", ",", "File", "destinationFile", ",", "String", "filterRegex", ")", "throws", "IOException", "{", "createNewFile", "(", "destinationFile", ")", ";", "for", "(", "File", "file", ":", "fi...
合并文件 @param files 文件数组 @param destinationFile 目标文件 @param filterRegex 过滤规则(正则表达式,所有文件使用同一个过滤规则,为空时不过滤) @throws IOException 异常
[ "合并文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L690-L695
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.countLinks
@SuppressWarnings("unchecked") public Long countLinks(ParaObject obj, String type2) { """ Count the total number of links between this object and another type of object. @param type2 the other type of object @param obj the object to execute this method on @return the number of links for the given object ""...
java
@SuppressWarnings("unchecked") public Long countLinks(ParaObject obj, String type2) { if (obj == null || obj.getId() == null || type2 == null) { return 0L; } MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("count", "true"); Pager pager = new Pager(); String url = Uti...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Long", "countLinks", "(", "ParaObject", "obj", ",", "String", "type2", ")", "{", "if", "(", "obj", "==", "null", "||", "obj", ".", "getId", "(", ")", "==", "null", "||", "type2", "==", "nul...
Count the total number of links between this object and another type of object. @param type2 the other type of object @param obj the object to execute this method on @return the number of links for the given object
[ "Count", "the", "total", "number", "of", "links", "between", "this", "object", "and", "another", "type", "of", "object", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L937-L948
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java
CrosstabBuilder.useMainReportDatasource
public CrosstabBuilder useMainReportDatasource(boolean preSorted) { """ To use main report datasource. There should be nothing else in the detail band @param preSorted @return """ DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_...
java
public CrosstabBuilder useMainReportDatasource(boolean preSorted) { DJDataSource datasource = new DJDataSource("ds",DJConstants.DATA_SOURCE_ORIGIN_REPORT_DATASOURCE,DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE); datasource.setPreSorted(preSorted); crosstab.setDatasource(datasource); return this; }
[ "public", "CrosstabBuilder", "useMainReportDatasource", "(", "boolean", "preSorted", ")", "{", "DJDataSource", "datasource", "=", "new", "DJDataSource", "(", "\"ds\"", ",", "DJConstants", ".", "DATA_SOURCE_ORIGIN_REPORT_DATASOURCE", ",", "DJConstants", ".", "DATA_SOURCE_T...
To use main report datasource. There should be nothing else in the detail band @param preSorted @return
[ "To", "use", "main", "report", "datasource", ".", "There", "should", "be", "nothing", "else", "in", "the", "detail", "band" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L148-L153
dasein-cloud/dasein-cloud-azure
src/main/java/org/dasein/cloud/azure/network/AzureIpAddressSupport.java
AzureIpAddressSupport.stopForwardToServer
@Override public void stopForwardToServer(@Nonnull final String ruleId, @Nonnull final String serverId) throws InternalException, CloudException { """ Removes the specified forwarding rule from the address with which it is associated. @param ruleId the rule to be removed @throws org.dasein.cloud.InternalEx...
java
@Override public void stopForwardToServer(@Nonnull final String ruleId, @Nonnull final String serverId) throws InternalException, CloudException { if(serverId == null) throw new InternalException("Parameter serverId cannot be null"); final AzureRuleIdParts azureRuleIdParts = AzureRuleId...
[ "@", "Override", "public", "void", "stopForwardToServer", "(", "@", "Nonnull", "final", "String", "ruleId", ",", "@", "Nonnull", "final", "String", "serverId", ")", "throws", "InternalException", ",", "CloudException", "{", "if", "(", "serverId", "==", "null", ...
Removes the specified forwarding rule from the address with which it is associated. @param ruleId the rule to be removed @throws org.dasein.cloud.InternalException an internal error occurred inside the Dasein Cloud implementation @throws org.dasein.cloud.CloudException an error occurred pr...
[ "Removes", "the", "specified", "forwarding", "rule", "from", "the", "address", "with", "which", "it", "is", "associated", "." ]
train
https://github.com/dasein-cloud/dasein-cloud-azure/blob/e2abb775c0f23f0d0f2509fba31128c7b2027d7c/src/main/java/org/dasein/cloud/azure/network/AzureIpAddressSupport.java#L549-L569
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/JCellCheckBox.java
JCellCheckBox.getTableCellRendererComponent
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { """ Get the renderer for this location in the table. From the TableCellRenderer interface. Sets the value of this control and returns this. @return this. """ this.s...
java
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { this.setControlValue(value); if (isSelected && !hasFocus) { this.setForeground(table.getSelectionForeground()); this.setBackground(table.get...
[ "public", "Component", "getTableCellRendererComponent", "(", "JTable", "table", ",", "Object", "value", ",", "boolean", "isSelected", ",", "boolean", "hasFocus", ",", "int", "row", ",", "int", "column", ")", "{", "this", ".", "setControlValue", "(", "value", "...
Get the renderer for this location in the table. From the TableCellRenderer interface. Sets the value of this control and returns this. @return this.
[ "Get", "the", "renderer", "for", "this", "location", "in", "the", "table", ".", "From", "the", "TableCellRenderer", "interface", ".", "Sets", "the", "value", "of", "this", "control", "and", "returns", "this", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/JCellCheckBox.java#L86-L98
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java
FormatUtil.getConsoleWidth
public static int getConsoleWidth() { """ Get the width of the terminal window (on Unix xterms), with a default of 78 characters. @return Terminal width """ if(width > 0) { return width; } final int default_termwidth = 78; try { final String env = System.getenv("COLUMNS"); ...
java
public static int getConsoleWidth() { if(width > 0) { return width; } final int default_termwidth = 78; try { final String env = System.getenv("COLUMNS"); if(env != null) { int columns = ParseUtil.parseIntBase10(env); return width = (columns > 50 ? columns - 1 : default...
[ "public", "static", "int", "getConsoleWidth", "(", ")", "{", "if", "(", "width", ">", "0", ")", "{", "return", "width", ";", "}", "final", "int", "default_termwidth", "=", "78", ";", "try", "{", "final", "String", "env", "=", "System", ".", "getenv", ...
Get the width of the terminal window (on Unix xterms), with a default of 78 characters. @return Terminal width
[ "Get", "the", "width", "of", "the", "terminal", "window", "(", "on", "Unix", "xterms", ")", "with", "a", "default", "of", "78", "characters", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L895-L927
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java
IdentityPatchRunner.executeTasks
static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception { """ Execute all recorded tasks. @param context the patch context @param callback the finalization callback @throws Exception """ final List<PreparedTask>...
java
static PatchingResult executeTasks(final IdentityPatchContext context, final IdentityPatchContext.FinalizeCallback callback) throws Exception { final List<PreparedTask> tasks = new ArrayList<PreparedTask>(); final List<ContentItem> conflicts = new ArrayList<ContentItem>(); // Identity pr...
[ "static", "PatchingResult", "executeTasks", "(", "final", "IdentityPatchContext", "context", ",", "final", "IdentityPatchContext", ".", "FinalizeCallback", "callback", ")", "throws", "Exception", "{", "final", "List", "<", "PreparedTask", ">", "tasks", "=", "new", "...
Execute all recorded tasks. @param context the patch context @param callback the finalization callback @throws Exception
[ "Execute", "all", "recorded", "tasks", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L630-L658
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/SslCodec.java
SslCodec.onClosed
@Handler(channels = EncryptedChannel.class) public void onClosed(Closed event, IOSubchannel encryptedChannel) throws SSLException, InterruptedException { """ Handles a close event from the encrypted channel (client). @param event the event @param encryptedChannel the channel for exchanging the ...
java
@Handler(channels = EncryptedChannel.class) public void onClosed(Closed event, IOSubchannel encryptedChannel) throws SSLException, InterruptedException { @SuppressWarnings("unchecked") final Optional<PlainChannel> plainChannel = (Optional<PlainChannel>) LinkedIOSubchannel ...
[ "@", "Handler", "(", "channels", "=", "EncryptedChannel", ".", "class", ")", "public", "void", "onClosed", "(", "Closed", "event", ",", "IOSubchannel", "encryptedChannel", ")", "throws", "SSLException", ",", "InterruptedException", "{", "@", "SuppressWarnings", "(...
Handles a close event from the encrypted channel (client). @param event the event @param encryptedChannel the channel for exchanging the encrypted data @throws InterruptedException @throws SSLException
[ "Handles", "a", "close", "event", "from", "the", "encrypted", "channel", "(", "client", ")", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/SslCodec.java#L215-L225
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.listPhraseListsAsync
public Observable<List<PhraseListFeatureInfo>> listPhraseListsAsync(UUID appId, String versionId, ListPhraseListsOptionalParameter listPhraseListsOptionalParameter) { """ Gets all the phraselist features. @param appId The application ID. @param versionId The version ID. @param listPhraseListsOptionalParameter...
java
public Observable<List<PhraseListFeatureInfo>> listPhraseListsAsync(UUID appId, String versionId, ListPhraseListsOptionalParameter listPhraseListsOptionalParameter) { return listPhraseListsWithServiceResponseAsync(appId, versionId, listPhraseListsOptionalParameter).map(new Func1<ServiceResponse<List<PhraseListF...
[ "public", "Observable", "<", "List", "<", "PhraseListFeatureInfo", ">", ">", "listPhraseListsAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListPhraseListsOptionalParameter", "listPhraseListsOptionalParameter", ")", "{", "return", "listPhraseListsWithServic...
Gets all the phraselist features. @param appId The application ID. @param versionId The version ID. @param listPhraseListsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable ...
[ "Gets", "all", "the", "phraselist", "features", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java#L228-L235
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java
GenericEncodingStrategy.buildSerialEncoding
public LocalVariable buildSerialEncoding(CodeAssembler assembler, StorableProperty<S>[] properties) throws SupportException { """ Generates bytecode instructions to encode properties and their states. This encoding is suitable for short-term serialization onl...
java
public LocalVariable buildSerialEncoding(CodeAssembler assembler, StorableProperty<S>[] properties) throws SupportException { properties = ensureAllProperties(properties); return buildEncoding (Mode.SERIAL, assembler, properties,...
[ "public", "LocalVariable", "buildSerialEncoding", "(", "CodeAssembler", "assembler", ",", "StorableProperty", "<", "S", ">", "[", "]", "properties", ")", "throws", "SupportException", "{", "properties", "=", "ensureAllProperties", "(", "properties", ")", ";", "retur...
Generates bytecode instructions to encode properties and their states. This encoding is suitable for short-term serialization only. @param assembler code assembler to receive bytecode instructions @param properties specific properties to decode, defaults to all properties if null @return local variable referencing a b...
[ "Generates", "bytecode", "instructions", "to", "encode", "properties", "and", "their", "states", ".", "This", "encoding", "is", "suitable", "for", "short", "-", "term", "serialization", "only", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java#L324-L331
alibaba/Tangram-Android
tangram/src/main/java/com/tmall/wireless/tangram3/view/LinearScrollView.java
LinearScrollView.setIndicatorMeasure
private void setIndicatorMeasure(View indicator, int width, int height, int margin) { """ Set indicator measure @param indicator indicator view @param width indicator width @param height indicator height @param margin indicator top margin """ if (indicator != null) { ViewGro...
java
private void setIndicatorMeasure(View indicator, int width, int height, int margin) { if (indicator != null) { ViewGroup.LayoutParams layoutParams = indicator.getLayoutParams(); layoutParams.width = width; layoutParams.height = height; if (margin > 0) { ...
[ "private", "void", "setIndicatorMeasure", "(", "View", "indicator", ",", "int", "width", ",", "int", "height", ",", "int", "margin", ")", "{", "if", "(", "indicator", "!=", "null", ")", "{", "ViewGroup", ".", "LayoutParams", "layoutParams", "=", "indicator",...
Set indicator measure @param indicator indicator view @param width indicator width @param height indicator height @param margin indicator top margin
[ "Set", "indicator", "measure" ]
train
https://github.com/alibaba/Tangram-Android/blob/caa57f54e009c8dacd34a2322d5761956ebed321/tangram/src/main/java/com/tmall/wireless/tangram3/view/LinearScrollView.java#L283-L300
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.cosineFormulaRad
public static double cosineFormulaRad(double lat1, double lon1, double lat2, double lon2) { """ Compute the approximate great-circle distance of two points using the Spherical law of cosines. <p> Complexity: 6 trigonometric functions. Note that acos is rather expensive apparently - roughly atan + sqrt. <p> R...
java
public static double cosineFormulaRad(double lat1, double lon1, double lat2, double lon2) { if(lat1 == lat2 && lon1 == lon2) { return 0.; } final DoubleWrapper tmp = new DoubleWrapper(); // To return cosine final double slat1 = sinAndCos(lat1, tmp), clat1 = tmp.value; final double slat2 = sinA...
[ "public", "static", "double", "cosineFormulaRad", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ")", "{", "if", "(", "lat1", "==", "lat2", "&&", "lon1", "==", "lon2", ")", "{", "return", "0.", ";", "}", "...
Compute the approximate great-circle distance of two points using the Spherical law of cosines. <p> Complexity: 6 trigonometric functions. Note that acos is rather expensive apparently - roughly atan + sqrt. <p> Reference: <p> R. W. Sinnott,<br> Virtues of the Haversine<br> Sky and Telescope 68(2) @param lat1 Latitude...
[ "Compute", "the", "approximate", "great", "-", "circle", "distance", "of", "two", "points", "using", "the", "Spherical", "law", "of", "cosines", ".", "<p", ">", "Complexity", ":", "6", "trigonometric", "functions", ".", "Note", "that", "acos", "is", "rather"...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L123-L132
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java
EnvironmentSettingsInner.claimAny
public void claimAny(String resourceGroupName, String labAccountName, String labName, String environmentSettingName) { """ Claims a random environment for a user in an environment settings. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labNa...
java
public void claimAny(String resourceGroupName, String labAccountName, String labName, String environmentSettingName) { claimAnyWithServiceResponseAsync(resourceGroupName, labAccountName, labName, environmentSettingName).toBlocking().single().body(); }
[ "public", "void", "claimAny", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "String", "environmentSettingName", ")", "{", "claimAnyWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "lab...
Claims a random environment for a user in an environment settings. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param environmentSettingName The name of the environment Setting. @throws IllegalArgumentException thrown i...
[ "Claims", "a", "random", "environment", "for", "a", "user", "in", "an", "environment", "settings", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java#L1104-L1106
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java
MetricsClient.createLogMetric
public final LogMetric createLogMetric(ParentName parent, LogMetric metric) { """ Creates a logs-based metric. <p>Sample code: <pre><code> try (MetricsClient metricsClient = MetricsClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); LogMe...
java
public final LogMetric createLogMetric(ParentName parent, LogMetric metric) { CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setMetric(metric) .build(); return createLogMetric(request); }
[ "public", "final", "LogMetric", "createLogMetric", "(", "ParentName", "parent", ",", "LogMetric", "metric", ")", "{", "CreateLogMetricRequest", "request", "=", "CreateLogMetricRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "null", "?...
Creates a logs-based metric. <p>Sample code: <pre><code> try (MetricsClient metricsClient = MetricsClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); LogMetric response = metricsClient.createLogMetric(parent, metric); } </code></pre> @param parent T...
[ "Creates", "a", "logs", "-", "based", "metric", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java#L412-L420
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java
AhoCorasickDoubleArrayTrie.fetch
private int fetch(State parent, List<Map.Entry<Integer, State>> siblings) { """ 获取直接相连的子节点 @param parent 父节点 @param siblings (子)兄弟节点 @return 兄弟节点个数 """ if (parent.isAcceptable()) { State fakeNode = new State(-(parent.getDepth() + 1)); // 此节点是parent的子节点,同时具备parent的输出 ...
java
private int fetch(State parent, List<Map.Entry<Integer, State>> siblings) { if (parent.isAcceptable()) { State fakeNode = new State(-(parent.getDepth() + 1)); // 此节点是parent的子节点,同时具备parent的输出 fakeNode.addEmit(parent.getLargestValueId()); siblings.add(new AbstractM...
[ "private", "int", "fetch", "(", "State", "parent", ",", "List", "<", "Map", ".", "Entry", "<", "Integer", ",", "State", ">", ">", "siblings", ")", "{", "if", "(", "parent", ".", "isAcceptable", "(", ")", ")", "{", "State", "fakeNode", "=", "new", "...
获取直接相连的子节点 @param parent 父节点 @param siblings (子)兄弟节点 @return 兄弟节点个数
[ "获取直接相连的子节点" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/AhoCorasick/AhoCorasickDoubleArrayTrie.java#L486-L499
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.obliqueZ
public Matrix4f obliqueZ(float a, float b, Matrix4f dest) { """ Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transf...
java
public Matrix4f obliqueZ(float a, float b, Matrix4f dest) { dest.m00 = m00; dest.m01 = m01; dest.m02 = m02; dest.m03 = m03; dest.m10 = m10; dest.m11 = m11; dest.m12 = m12; dest.m13 = m13; dest.m20 = m00 * a + m10 * b + m20; dest.m21 = m01 *...
[ "public", "Matrix4f", "obliqueZ", "(", "float", "a", ",", "float", "b", ",", "Matrix4f", "dest", ")", "{", "dest", ".", "m00", "=", "m00", ";", "dest", ".", "m01", "=", "m01", ";", "dest", ".", "m02", "=", "m02", ";", "dest", ".", "m03", "=", "...
Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when...
[ "Apply", "an", "oblique", "projection", "transformation", "to", "this", "matrix", "with", "the", "given", "values", "for", "<code", ">", "a<", "/", "code", ">", "and", "<code", ">", "b<", "/", "code", ">", "and", "store", "the", "result", "in", "<code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L14669-L14688
redkale/redkale
src/org/redkale/util/ResourceFactory.java
ResourceFactory.contains
public <A> boolean contains(boolean recursive, String name, Class<? extends A> clazz) { """ 判断是否包含指定资源名和资源类型的资源对象 @param <A> 泛型 @param recursive 是否遍历父节点 @param name 资源名 @param clazz 资源类型 @return 是否存在 """ Map<String, ResourceEntry> map = this.store.get(clazz); return ma...
java
public <A> boolean contains(boolean recursive, String name, Class<? extends A> clazz) { Map<String, ResourceEntry> map = this.store.get(clazz); return map == null ? ((recursive && parent != null) ? parent.contains(recursive, name, clazz) : false) : map.containsKey(name); }
[ "public", "<", "A", ">", "boolean", "contains", "(", "boolean", "recursive", ",", "String", "name", ",", "Class", "<", "?", "extends", "A", ">", "clazz", ")", "{", "Map", "<", "String", ",", "ResourceEntry", ">", "map", "=", "this", ".", "store", "."...
判断是否包含指定资源名和资源类型的资源对象 @param <A> 泛型 @param recursive 是否遍历父节点 @param name 资源名 @param clazz 资源类型 @return 是否存在
[ "判断是否包含指定资源名和资源类型的资源对象" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/ResourceFactory.java#L432-L435
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java
Option.createOption
public static Option createOption(String name, String description) { """ Returns a named option having one value. An example may be a logfile option for a program. <p>program -log &lt;logfile&gt;</p> <p>In this case the -log option has a length of one value of &lt;logfile&gt;.</p> @param name Th...
java
public static Option createOption(String name, String description) { return new Option(Type.OPTION, name, 1, description); }
[ "public", "static", "Option", "createOption", "(", "String", "name", ",", "String", "description", ")", "{", "return", "new", "Option", "(", "Type", ".", "OPTION", ",", "name", ",", "1", ",", "description", ")", ";", "}" ]
Returns a named option having one value. An example may be a logfile option for a program. <p>program -log &lt;logfile&gt;</p> <p>In this case the -log option has a length of one value of &lt;logfile&gt;.</p> @param name The name of the option. @param description The description of the option used to di...
[ "Returns", "a", "named", "option", "having", "one", "value", ".", "An", "example", "may", "be", "a", "logfile", "option", "for", "a", "program", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java#L124-L126
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java
ImgCompressUtils.imgCompressByWH
public static BufferedImage imgCompressByWH(Image srcImg, int width, int height, Float quality, boolean isForceWh) { """ 根据指定宽高和压缩质量进行压缩,当isForceWh为false时,如果指定宽或者高大于源图片则按照源图片大小宽高压缩, 当isForceWh为true时,不论怎样均按照指定宽高压缩 @param srcImg 指定原图片对象 @param width 指定压缩宽 ...
java
public static BufferedImage imgCompressByWH(Image srcImg, int width, int height, Float quality, boolean isForceWh) { if (!isForceWh && (srcImg.getHeight(null) < height || srcImg.getWidth(null) < width)) { width = srcImg.getWidth(null); heig...
[ "public", "static", "BufferedImage", "imgCompressByWH", "(", "Image", "srcImg", ",", "int", "width", ",", "int", "height", ",", "Float", "quality", ",", "boolean", "isForceWh", ")", "{", "if", "(", "!", "isForceWh", "&&", "(", "srcImg", ".", "getHeight", "...
根据指定宽高和压缩质量进行压缩,当isForceWh为false时,如果指定宽或者高大于源图片则按照源图片大小宽高压缩, 当isForceWh为true时,不论怎样均按照指定宽高压缩 @param srcImg 指定原图片对象 @param width 指定压缩宽 @param height 指定压缩高 @param quality 指定压缩质量,范围[0.0,1.0],如果指定为null则按照默认值 @param isForceWh 指定是否强制使用指定宽高进行压缩,true代表强制,false反之
[ "根据指定宽高和压缩质量进行压缩,当isForceWh为false时", "如果指定宽或者高大于源图片则按照源图片大小宽高压缩", "当isForceWh为true时", "不论怎样均按照指定宽高压缩" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java#L125-L136
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/quantiles/Util.java
Util.lowestZeroBitStartingAt
static int lowestZeroBitStartingAt(final long bits, final int startingBit) { """ Returns the zero-based bit position of the lowest zero bit of <i>bits</i> starting at <i>startingBit</i>. If input is all ones, this returns 64. @param bits the input bits as a long @param startingBit the zero-based starting bit po...
java
static int lowestZeroBitStartingAt(final long bits, final int startingBit) { int pos = startingBit & 0X3F; long myBits = bits >>> pos; while ((myBits & 1L) != 0) { myBits = myBits >>> 1; pos++; } return pos; }
[ "static", "int", "lowestZeroBitStartingAt", "(", "final", "long", "bits", ",", "final", "int", "startingBit", ")", "{", "int", "pos", "=", "startingBit", "&", "0X3F", ";", "long", "myBits", "=", "bits", ">>>", "pos", ";", "while", "(", "(", "myBits", "&"...
Returns the zero-based bit position of the lowest zero bit of <i>bits</i> starting at <i>startingBit</i>. If input is all ones, this returns 64. @param bits the input bits as a long @param startingBit the zero-based starting bit position. Only the low 6 bits are used. @return the zero-based bit position of the lowest z...
[ "Returns", "the", "zero", "-", "based", "bit", "position", "of", "the", "lowest", "zero", "bit", "of", "<i", ">", "bits<", "/", "i", ">", "starting", "at", "<i", ">", "startingBit<", "/", "i", ">", ".", "If", "input", "is", "all", "ones", "this", "...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/quantiles/Util.java#L425-L434
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/io/file/LinuxFile.java
LinuxFile.mmap
public ByteBuffer mmap(int length, MMAPProt prot, MMAPFlags flags, int offset) throws IOException { """ Direct memory mapping from a file descriptor. This is normally possible through the local FileChannel, but NIO will try to truncate files if they don't report a correct size. This will avoid that. @param...
java
public ByteBuffer mmap(int length, MMAPProt prot, MMAPFlags flags, int offset) throws IOException { long pointer = mmap(getFileDescriptor(), length, prot.flag, flags.flag, offset); if(pointer == -1) throw new LinuxFileException(); return newMappedByteBuffer(length, pointer, () -> {...
[ "public", "ByteBuffer", "mmap", "(", "int", "length", ",", "MMAPProt", "prot", ",", "MMAPFlags", "flags", ",", "int", "offset", ")", "throws", "IOException", "{", "long", "pointer", "=", "mmap", "(", "getFileDescriptor", "(", ")", ",", "length", ",", "prot...
Direct memory mapping from a file descriptor. This is normally possible through the local FileChannel, but NIO will try to truncate files if they don't report a correct size. This will avoid that. @param length length of desired mapping @param prot protocol used for mapping @param flags flags for mapping @param offse...
[ "Direct", "memory", "mapping", "from", "a", "file", "descriptor", ".", "This", "is", "normally", "possible", "through", "the", "local", "FileChannel", "but", "NIO", "will", "try", "to", "truncate", "files", "if", "they", "don", "t", "report", "a", "correct",...
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/io/file/LinuxFile.java#L284-L293
javagl/ND
nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java
IntTupleDistanceFunctions.byDistanceComparator
public static Comparator<IntTuple> byDistanceComparator( IntTuple reference, final ToDoubleBiFunction<? super IntTuple, ? super IntTuple> distanceFunction) { """ Returns a new comparator that compares {@link IntTuple} instances by their distance to the given reference, according to...
java
public static Comparator<IntTuple> byDistanceComparator( IntTuple reference, final ToDoubleBiFunction<? super IntTuple, ? super IntTuple> distanceFunction) { final IntTuple fReference = IntTuples.copy(reference); return new Comparator<IntTuple>() { ...
[ "public", "static", "Comparator", "<", "IntTuple", ">", "byDistanceComparator", "(", "IntTuple", "reference", ",", "final", "ToDoubleBiFunction", "<", "?", "super", "IntTuple", ",", "?", "super", "IntTuple", ">", "distanceFunction", ")", "{", "final", "IntTuple", ...
Returns a new comparator that compares {@link IntTuple} instances by their distance to the given reference, according to the given distance function. A copy of the given reference point will be stored, so that changes in the given point will not affect the returned comparator. @param reference The reference point @par...
[ "Returns", "a", "new", "comparator", "that", "compares", "{", "@link", "IntTuple", "}", "instances", "by", "their", "distance", "to", "the", "given", "reference", "according", "to", "the", "given", "distance", "function", ".", "A", "copy", "of", "the", "give...
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-distance/src/main/java/de/javagl/nd/distance/tuples/i/IntTupleDistanceFunctions.java#L54-L70
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java
FavoritesInner.addAsync
public Observable<ApplicationInsightsComponentFavoriteInner> addAsync(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { """ Adds a new favorites to an Application Insights component. @param resourceGroupName The name of the resource...
java
public Observable<ApplicationInsightsComponentFavoriteInner> addAsync(String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { return addWithServiceResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties).map(new Func...
[ "public", "Observable", "<", "ApplicationInsightsComponentFavoriteInner", ">", "addAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "favoriteId", ",", "ApplicationInsightsComponentFavoriteInner", "favoriteProperties", ")", "{", "return...
Adds a new favorites to an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param favoriteId The Id of a specific favorite defined in the Application Insights component @param favoriteProperties Proper...
[ "Adds", "a", "new", "favorites", "to", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java#L407-L414
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphNode.java
ObjectGraphNode.toFlatSummary
private void toFlatSummary(final String indent, final StringBuffer buffer) { """ Generates a flat format summary XML representation of this ObjectGraphNode. @param indent the indent, for formatting. @param buffer the StringBuffer to append the summary to. """ buffer.append(indent); ObjectGraphNode roo...
java
private void toFlatSummary(final String indent, final StringBuffer buffer) { buffer.append(indent); ObjectGraphNode root = (ObjectGraphNode) getRoot(); double pct = 100.0 * getSize() / root.getSize(); buffer.append(getSize()).append(" ("); buffer.append(new DecimalFormat("0.0").format(pct)); buffer.append...
[ "private", "void", "toFlatSummary", "(", "final", "String", "indent", ",", "final", "StringBuffer", "buffer", ")", "{", "buffer", ".", "append", "(", "indent", ")", ";", "ObjectGraphNode", "root", "=", "(", "ObjectGraphNode", ")", "getRoot", "(", ")", ";", ...
Generates a flat format summary XML representation of this ObjectGraphNode. @param indent the indent, for formatting. @param buffer the StringBuffer to append the summary to.
[ "Generates", "a", "flat", "format", "summary", "XML", "representation", "of", "this", "ObjectGraphNode", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphNode.java#L273-L298
aws/aws-sdk-java
aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/PredefinedMetricTransformer.java
PredefinedMetricTransformer.toMetricData
public List<MetricDatum> toMetricData(MetricType metricType, Request<?> request, Response<?> response) { """ Returns a non-null list of metric datum for the metrics collected for the given request/response. @param metricType the request metric type """ if (metricType instanceof Field) { ...
java
public List<MetricDatum> toMetricData(MetricType metricType, Request<?> request, Response<?> response) { if (metricType instanceof Field) { // Predefined metrics across all AWS http clients Field predefined = (Field) metricType; switch(predefined) { case HttpC...
[ "public", "List", "<", "MetricDatum", ">", "toMetricData", "(", "MetricType", "metricType", ",", "Request", "<", "?", ">", "request", ",", "Response", "<", "?", ">", "response", ")", "{", "if", "(", "metricType", "instanceof", "Field", ")", "{", "// Predef...
Returns a non-null list of metric datum for the metrics collected for the given request/response. @param metricType the request metric type
[ "Returns", "a", "non", "-", "null", "list", "of", "metric", "datum", "for", "the", "metrics", "collected", "for", "the", "given", "request", "/", "response", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/PredefinedMetricTransformer.java#L65-L116
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java
ImageBandMath.stdDev
public static void stdDev(Planar<GrayS32> input, GrayS32 output, @Nullable GrayS32 avg) { """ Computes the standard deviation for each pixel across all bands in the {@link Planar} image. @param input Planar image - not modified @param output Gray scale image containing average pixel values - modified @p...
java
public static void stdDev(Planar<GrayS32> input, GrayS32 output, @Nullable GrayS32 avg) { stdDev(input,output,avg,0,input.getNumBands() - 1); }
[ "public", "static", "void", "stdDev", "(", "Planar", "<", "GrayS32", ">", "input", ",", "GrayS32", "output", ",", "@", "Nullable", "GrayS32", "avg", ")", "{", "stdDev", "(", "input", ",", "output", ",", "avg", ",", "0", ",", "input", ".", "getNumBands"...
Computes the standard deviation for each pixel across all bands in the {@link Planar} image. @param input Planar image - not modified @param output Gray scale image containing average pixel values - modified @param avg Input Gray scale image containing average image. Can be null
[ "Computes", "the", "standard", "deviation", "for", "each", "pixel", "across", "all", "bands", "in", "the", "{" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java#L693-L695
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java
TypeHandlerUtils.convertBlob
public static Object convertBlob(Object blob, String value) throws SQLException { """ Transfers data from String into sql.Blob @param blob sql.Blob which would be filled @param value String @return sql.Blob from String @throws SQLException """ return convertBlob(blob, value.getBytes()); }
java
public static Object convertBlob(Object blob, String value) throws SQLException { return convertBlob(blob, value.getBytes()); }
[ "public", "static", "Object", "convertBlob", "(", "Object", "blob", ",", "String", "value", ")", "throws", "SQLException", "{", "return", "convertBlob", "(", "blob", ",", "value", ".", "getBytes", "(", ")", ")", ";", "}" ]
Transfers data from String into sql.Blob @param blob sql.Blob which would be filled @param value String @return sql.Blob from String @throws SQLException
[ "Transfers", "data", "from", "String", "into", "sql", ".", "Blob" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L161-L163
DDTH/ddth-tsc
ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/internal/CounterMetadata.java
CounterMetadata.fromMap
public static CounterMetadata fromMap(Map<String, Object> data) { """ Creates a {@link CounterMetadata} object from a Map. @param data @return """ if (data == null) { return null; } CounterMetadata metadata = new CounterMetadata(); Boolean boolValue = DPathUtils....
java
public static CounterMetadata fromMap(Map<String, Object> data) { if (data == null) { return null; } CounterMetadata metadata = new CounterMetadata(); Boolean boolValue = DPathUtils.getValue(data, KEY_COUNTER_COLUMN, Boolean.class); metadata.isCounterColumn = boolValu...
[ "public", "static", "CounterMetadata", "fromMap", "(", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", "null", ";", "}", "CounterMetadata", "metadata", "=", "new", "CounterMetadata", "(", "...
Creates a {@link CounterMetadata} object from a Map. @param data @return
[ "Creates", "a", "{", "@link", "CounterMetadata", "}", "object", "from", "a", "Map", "." ]
train
https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/internal/CounterMetadata.java#L91-L100
opendigitaleducation/web-utils
src/main/java/org/vertx/java/core/http/RouteMatcher.java
RouteMatcher.putWithRegEx
public RouteMatcher putWithRegEx(String regex, Handler<HttpServerRequest> handler) { """ Specify a handler that will be called for a matching HTTP PUT @param regex A regular expression @param handler The handler to call """ addRegEx(regex, handler, putBindings); return this; }
java
public RouteMatcher putWithRegEx(String regex, Handler<HttpServerRequest> handler) { addRegEx(regex, handler, putBindings); return this; }
[ "public", "RouteMatcher", "putWithRegEx", "(", "String", "regex", ",", "Handler", "<", "HttpServerRequest", ">", "handler", ")", "{", "addRegEx", "(", "regex", ",", "handler", ",", "putBindings", ")", ";", "return", "this", ";", "}" ]
Specify a handler that will be called for a matching HTTP PUT @param regex A regular expression @param handler The handler to call
[ "Specify", "a", "handler", "that", "will", "be", "called", "for", "a", "matching", "HTTP", "PUT" ]
train
https://github.com/opendigitaleducation/web-utils/blob/5c12f7e8781a9a0fbbe7b8d9fb741627aa97a1e3/src/main/java/org/vertx/java/core/http/RouteMatcher.java#L219-L222
liferay/com-liferay-commerce
commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java
CommerceTaxMethodPersistenceImpl.findAll
@Override public List<CommerceTaxMethod> findAll() { """ Returns all the commerce tax methods. @return the commerce tax methods """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceTaxMethod> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceTaxMethod", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce tax methods. @return the commerce tax methods
[ "Returns", "all", "the", "commerce", "tax", "methods", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java#L1989-L1992
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/GuaranteedTargetStream.java
GuaranteedTargetStream.addAlarm
protected static void addAlarm(Object key, Object alarmObject) { """ Utility method for adding an alarm which needs to be expired if a flush occurs. @param key The key for the set of alarms to which this alarm should be added. Normally this is a stream instance. @param alarmObject The alarm object to add to ...
java
protected static void addAlarm(Object key, Object alarmObject) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addAlarm", new Object[] { key, alarmObject }); synchronized (pendingAlarms) { Set alarms = null; if (pending...
[ "protected", "static", "void", "addAlarm", "(", "Object", "key", ",", "Object", "alarmObject", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ...
Utility method for adding an alarm which needs to be expired if a flush occurs. @param key The key for the set of alarms to which this alarm should be added. Normally this is a stream instance. @param alarmObject The alarm object to add to the set.
[ "Utility", "method", "for", "adding", "an", "alarm", "which", "needs", "to", "be", "expired", "if", "a", "flush", "occurs", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/GuaranteedTargetStream.java#L1811-L1831
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
StandardAtomGenerator.accessPseudoLabel
static String accessPseudoLabel(IPseudoAtom atom, String defaultLabel) { """ Safely access the label of a pseudo atom. If the label is null or empty, the default label is returned. @param atom the pseudo @return pseudo label """ String label = atom.getLabel(); if (label != null && !label.i...
java
static String accessPseudoLabel(IPseudoAtom atom, String defaultLabel) { String label = atom.getLabel(); if (label != null && !label.isEmpty()) return label; return defaultLabel; }
[ "static", "String", "accessPseudoLabel", "(", "IPseudoAtom", "atom", ",", "String", "defaultLabel", ")", "{", "String", "label", "=", "atom", ".", "getLabel", "(", ")", ";", "if", "(", "label", "!=", "null", "&&", "!", "label", ".", "isEmpty", "(", ")", ...
Safely access the label of a pseudo atom. If the label is null or empty, the default label is returned. @param atom the pseudo @return pseudo label
[ "Safely", "access", "the", "label", "of", "a", "pseudo", "atom", ".", "If", "the", "label", "is", "null", "or", "empty", "the", "default", "label", "is", "returned", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L614-L618
jenkinsci/jenkins
core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java
SimpleBuildWrapper.makeSensitiveBuildVariables
@Override public void makeSensitiveBuildVariables(AbstractBuild build, Set<String> sensitiveVariables) { """ May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. <p>{@inheritDoc} @since 1.608 """ super.makeSensitiveBuildVariables(build, s...
java
@Override public void makeSensitiveBuildVariables(AbstractBuild build, Set<String> sensitiveVariables) { super.makeSensitiveBuildVariables(build, sensitiveVariables); // TODO determine if there is a meaningful way to generalize this; perhaps as a new [Run]Action recording sensitiveVariables? // ...
[ "@", "Override", "public", "void", "makeSensitiveBuildVariables", "(", "AbstractBuild", "build", ",", "Set", "<", "String", ">", "sensitiveVariables", ")", "{", "super", ".", "makeSensitiveBuildVariables", "(", "build", ",", "sensitiveVariables", ")", ";", "// TODO ...
May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. <p>{@inheritDoc} @since 1.608
[ "May", "be", "overridden", "but", "this", "will", "only", "take", "effect", "when", "used", "as", "a", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/tasks/SimpleBuildWrapper.java#L224-L232
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/MultiPath.java
MultiPath.insertPoint
void insertPoint(int pathIndex, int beforePointIndex, Point2D pt) { """ Inserts a point. @param pathIndex The path index in this class to insert the point to. Must correspond to an existing path. @param beforePointIndex The point index in the given path of this multipath. This value must be between 0 and G...
java
void insertPoint(int pathIndex, int beforePointIndex, Point2D pt) { m_impl.insertPoint(pathIndex, beforePointIndex, pt); }
[ "void", "insertPoint", "(", "int", "pathIndex", ",", "int", "beforePointIndex", ",", "Point2D", "pt", ")", "{", "m_impl", ".", "insertPoint", "(", "pathIndex", ",", "beforePointIndex", ",", "pt", ")", ";", "}" ]
Inserts a point. @param pathIndex The path index in this class to insert the point to. Must correspond to an existing path. @param beforePointIndex The point index in the given path of this multipath. This value must be between 0 and GetPathSize(pathIndex), or -1 to insert the point at the end of the given path. @para...
[ "Inserts", "a", "point", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPath.java#L463-L465
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java
MapApi.getList
public static <T> Optional<List<T>> getList(final Map map, final Class<T> clazz, final Object... path) { """ Get list value by path. @param <T> list value type @param clazz type of value @param map subject @param path nodes to walk in map @return value """ return get(map, List.class, path).map(c -...
java
public static <T> Optional<List<T>> getList(final Map map, final Class<T> clazz, final Object... path) { return get(map, List.class, path).map(c -> (List<T>) c); }
[ "public", "static", "<", "T", ">", "Optional", "<", "List", "<", "T", ">", ">", "getList", "(", "final", "Map", "map", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Object", "...", "path", ")", "{", "return", "get", "(", "map", ",...
Get list value by path. @param <T> list value type @param clazz type of value @param map subject @param path nodes to walk in map @return value
[ "Get", "list", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java#L235-L237
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.callMethod
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException { """ calls a Method of a Objct @param obj Object to call Method on it @param methodName Name of the Method to get @param args Arguments of the Method to get @return return return value of the called Method @t...
java
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException { return callMethod(obj, KeyImpl.getInstance(methodName), args); }
[ "public", "static", "Object", "callMethod", "(", "Object", "obj", ",", "String", "methodName", ",", "Object", "[", "]", "args", ")", "throws", "PageException", "{", "return", "callMethod", "(", "obj", ",", "KeyImpl", ".", "getInstance", "(", "methodName", ")...
calls a Method of a Objct @param obj Object to call Method on it @param methodName Name of the Method to get @param args Arguments of the Method to get @return return return value of the called Method @throws PageException
[ "calls", "a", "Method", "of", "a", "Objct" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L840-L842
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/ExternalizedBeanId.java
ExternalizedBeanId.readExternalPKey
private Serializable readExternalPKey(ObjectInput in, byte[] j2eeNameBytes) throws java.io.IOException, ClassNotFoundException { """ Private helper method for readExternal - reads the Serialized primary key. @author Adrian Colyer @return java.io.Serializable @param in java.io.ObjectInput ...
java
private Serializable readExternalPKey(ObjectInput in, byte[] j2eeNameBytes) throws java.io.IOException, ClassNotFoundException { int pkeyLength = in.readInt(); byte[] pkeyBytes = new byte[pkeyLength]; //d164415 start int bytesRead = 0; for (int offset = 0; o...
[ "private", "Serializable", "readExternalPKey", "(", "ObjectInput", "in", ",", "byte", "[", "]", "j2eeNameBytes", ")", "throws", "java", ".", "io", ".", "IOException", ",", "ClassNotFoundException", "{", "int", "pkeyLength", "=", "in", ".", "readInt", "(", ")",...
Private helper method for readExternal - reads the Serialized primary key. @author Adrian Colyer @return java.io.Serializable @param in java.io.ObjectInput @exception java.io.IOException The exception description.
[ "Private", "helper", "method", "for", "readExternal", "-", "reads", "the", "Serialized", "primary", "key", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/ExternalizedBeanId.java#L208-L252
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java
SecurityUtils.loadKeyStore
public static void loadKeyStore(KeyStore keyStore, InputStream keyStream, String storePass) throws IOException, GeneralSecurityException { """ Loads a key store from a stream. <p>Example usage: <pre> KeyStore keyStore = SecurityUtils.getJavaKeyStore(); SecurityUtils.loadKeyStore(keyStore, new FileInp...
java
public static void loadKeyStore(KeyStore keyStore, InputStream keyStream, String storePass) throws IOException, GeneralSecurityException { try { keyStore.load(keyStream, storePass.toCharArray()); } finally { keyStream.close(); } }
[ "public", "static", "void", "loadKeyStore", "(", "KeyStore", "keyStore", ",", "InputStream", "keyStream", ",", "String", "storePass", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "try", "{", "keyStore", ".", "load", "(", "keyStream", ",", ...
Loads a key store from a stream. <p>Example usage: <pre> KeyStore keyStore = SecurityUtils.getJavaKeyStore(); SecurityUtils.loadKeyStore(keyStore, new FileInputStream("certs.jks"), "password"); </pre> @param keyStore key store @param keyStream input stream to the key store stream (closed at the end of this method in...
[ "Loads", "a", "key", "store", "from", "a", "stream", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java#L75-L82
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java
CoreV1Api.connectPutNamespacedPodProxyAsync
public com.squareup.okhttp.Call connectPutNamespacedPodProxyAsync(String name, String namespace, String path, final ApiCallback<String> callback) throws ApiException { """ (asynchronously) connect PUT requests to proxy of Pod @param name name of the PodProxyOptions (required) @param namespace object name and au...
java
public com.squareup.okhttp.Call connectPutNamespacedPodProxyAsync(String name, String namespace, String path, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = nu...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "connectPutNamespacedPodProxyAsync", "(", "String", "name", ",", "String", "namespace", ",", "String", "path", ",", "final", "ApiCallback", "<", "String", ">", "callback", ")", "throws", "ApiException...
(asynchronously) connect PUT requests to proxy of Pod @param name name of the PodProxyOptions (required) @param namespace object name and auth scope, such as for teams and projects (required) @param path Path is the URL path to use for the current proxy request to pod. (optional) @param callback The callback to be exec...
[ "(", "asynchronously", ")", "connect", "PUT", "requests", "to", "proxy", "of", "Pod" ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java#L6385-L6410
jayantk/jklol
src/com/jayantkrish/jklol/util/AllAssignmentIterator.java
AllAssignmentIterator.initializeValueIterator
private static Iterator<int[]> initializeValueIterator(VariableNumMap vars) { """ /* Initializes the variable values controlling the iteration position. """ int[] dimensionSizes = new int[vars.size()]; List<DiscreteVariable> discreteVars = vars.getDiscreteVariables(); for (int i = 0; i < discreteVars...
java
private static Iterator<int[]> initializeValueIterator(VariableNumMap vars) { int[] dimensionSizes = new int[vars.size()]; List<DiscreteVariable> discreteVars = vars.getDiscreteVariables(); for (int i = 0; i < discreteVars.size(); i++) { dimensionSizes[i] = discreteVars.get(i).numValues(); } return new...
[ "private", "static", "Iterator", "<", "int", "[", "]", ">", "initializeValueIterator", "(", "VariableNumMap", "vars", ")", "{", "int", "[", "]", "dimensionSizes", "=", "new", "int", "[", "vars", ".", "size", "(", ")", "]", ";", "List", "<", "DiscreteVari...
/* Initializes the variable values controlling the iteration position.
[ "/", "*", "Initializes", "the", "variable", "values", "controlling", "the", "iteration", "position", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/util/AllAssignmentIterator.java#L32-L40
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/version/ApplicationVersion.java
ApplicationVersion.getCompleteRootUrl
protected URL getCompleteRootUrl() throws InstallationException { """ Returns the complete root URL so that resources in the installation package could be fetched. If an installation from the source directory is done, the {@link Application#getRootUrl() root URL} is directly returned, in the case that a...
java
protected URL getCompleteRootUrl() throws InstallationException { try { final URL url; if (this.application.getRootPackageName() == null) { url = this.application.getRootUrl(); } else { url = new URL(this.application.getRootUrl(), t...
[ "protected", "URL", "getCompleteRootUrl", "(", ")", "throws", "InstallationException", "{", "try", "{", "final", "URL", "url", ";", "if", "(", "this", ".", "application", ".", "getRootPackageName", "(", ")", "==", "null", ")", "{", "url", "=", "this", ".",...
Returns the complete root URL so that resources in the installation package could be fetched. If an installation from the source directory is done, the {@link Application#getRootUrl() root URL} is directly returned, in the case that an installation is done from a JAR container the {@link Application#getRootUrl() root U...
[ "Returns", "the", "complete", "root", "URL", "so", "that", "resources", "in", "the", "installation", "package", "could", "be", "fetched", ".", "If", "an", "installation", "from", "the", "source", "directory", "is", "done", "the", "{", "@link", "Application#get...
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/ApplicationVersion.java#L346-L360
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseLogicalNotExpression
private Expr parseLogicalNotExpression(EnclosingScope scope, boolean terminated) { """ Parse a logical not expression, which has the form: <pre> TermExpr::= ... | '!' Expr </pre> @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also t...
java
private Expr parseLogicalNotExpression(EnclosingScope scope, boolean terminated) { int start = index; match(Shreak); // Note: cannot parse unit expression here, because that messes up the // precedence. For example, !result ==> other should be parsed as // (!result) ==> other, not !(result ==> other). Expr ...
[ "private", "Expr", "parseLogicalNotExpression", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "int", "start", "=", "index", ";", "match", "(", "Shreak", ")", ";", "// Note: cannot parse unit expression here, because that messes up the", "// prece...
Parse a logical not expression, which has the form: <pre> TermExpr::= ... | '!' Expr </pre> @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @param terminated This indicates that the expression is known to be ter...
[ "Parse", "a", "logical", "not", "expression", "which", "has", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L3067-L3075
alkacon/opencms-core
src/org/opencms/main/CmsStaticResourceHandler.java
CmsStaticResourceHandler.allowServePrecompressedResource
protected boolean allowServePrecompressedResource(HttpServletRequest request, String url) { """ Returns whether this servlet should attempt to serve a precompressed version of the given static resource. If this method returns true, the suffix {@code .gz} is appended to the URL and the corresponding resource is ...
java
protected boolean allowServePrecompressedResource(HttpServletRequest request, String url) { String accept = request.getHeader("Accept-Encoding"); return (accept != null) && accept.contains("gzip") && (url.endsWith(".js") || url.endsWith(".css") || url.endsWith(".html")); }
[ "protected", "boolean", "allowServePrecompressedResource", "(", "HttpServletRequest", "request", ",", "String", "url", ")", "{", "String", "accept", "=", "request", ".", "getHeader", "(", "\"Accept-Encoding\"", ")", ";", "return", "(", "accept", "!=", "null", ")",...
Returns whether this servlet should attempt to serve a precompressed version of the given static resource. If this method returns true, the suffix {@code .gz} is appended to the URL and the corresponding resource is served if it exists. It is assumed that the compression method used is gzip. If this method returns fals...
[ "Returns", "whether", "this", "servlet", "should", "attempt", "to", "serve", "a", "precompressed", "version", "of", "the", "given", "static", "resource", ".", "If", "this", "method", "returns", "true", "the", "suffix", "{", "@code", ".", "gz", "}", "is", "...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsStaticResourceHandler.java#L216-L222
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java
TypeUtility.isAssignable
public static boolean isAssignable(TypeName typeName, Class<?> assignableClazz) { """ Checks if is assignable. @param typeName the type name @param assignableClazz the assignable clazz @return true, if is assignable """ try { if (typeName instanceof ParameterizedTypeName) { typeName = ((Paramet...
java
public static boolean isAssignable(TypeName typeName, Class<?> assignableClazz) { try { if (typeName instanceof ParameterizedTypeName) { typeName = ((ParameterizedTypeName) typeName).rawType; } else if (typeName instanceof ArrayTypeName) { typeName = ((ArrayTypeName) typeName).componentType; } Cl...
[ "public", "static", "boolean", "isAssignable", "(", "TypeName", "typeName", ",", "Class", "<", "?", ">", "assignableClazz", ")", "{", "try", "{", "if", "(", "typeName", "instanceof", "ParameterizedTypeName", ")", "{", "typeName", "=", "(", "(", "ParameterizedT...
Checks if is assignable. @param typeName the type name @param assignableClazz the assignable clazz @return true, if is assignable
[ "Checks", "if", "is", "assignable", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java#L744-L757
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/inf/BruteForceInferencer.java
BruteForceInferencer.safeNewVarTensor
public static VarTensor safeNewVarTensor(Algebra s, Factor f) { """ Gets this factor as a VarTensor. This will always return a new object. See also safeGetVarTensor(). """ VarTensor factor; // Create a VarTensor which the values of this non-explicitly represented factor. factor = new Va...
java
public static VarTensor safeNewVarTensor(Algebra s, Factor f) { VarTensor factor; // Create a VarTensor which the values of this non-explicitly represented factor. factor = new VarTensor(s, f.getVars()); for (int c=0; c<factor.size(); c++) { factor.setValue(c, s.fromLogProb(f...
[ "public", "static", "VarTensor", "safeNewVarTensor", "(", "Algebra", "s", ",", "Factor", "f", ")", "{", "VarTensor", "factor", ";", "// Create a VarTensor which the values of this non-explicitly represented factor.", "factor", "=", "new", "VarTensor", "(", "s", ",", "f"...
Gets this factor as a VarTensor. This will always return a new object. See also safeGetVarTensor().
[ "Gets", "this", "factor", "as", "a", "VarTensor", ".", "This", "will", "always", "return", "a", "new", "object", ".", "See", "also", "safeGetVarTensor", "()", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/inf/BruteForceInferencer.java#L66-L74
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/converters/Converters.java
Converters.fromDBObject
public void fromDBObject(final DBObject dbObj, final MappedField mf, final Object targetEntity) { """ Creates an entity and populates its state based on the dbObject given. This method is primarily an internal method. Reliance on this method may break your application in future releases. @param dbObj ...
java
public void fromDBObject(final DBObject dbObj, final MappedField mf, final Object targetEntity) { final Object object = mf.getDbObjectValue(dbObj); if (object != null) { final TypeConverter enc = getEncoder(mf); final Object decodedValue = enc.decode(mf.getType(), object, mf); ...
[ "public", "void", "fromDBObject", "(", "final", "DBObject", "dbObj", ",", "final", "MappedField", "mf", ",", "final", "Object", "targetEntity", ")", "{", "final", "Object", "object", "=", "mf", ".", "getDbObjectValue", "(", "dbObj", ")", ";", "if", "(", "o...
Creates an entity and populates its state based on the dbObject given. This method is primarily an internal method. Reliance on this method may break your application in future releases. @param dbObj the object state to use @param mf the MappedField containing the metadata to use when decoding in to...
[ "Creates", "an", "entity", "and", "populates", "its", "state", "based", "on", "the", "dbObject", "given", ".", "This", "method", "is", "primarily", "an", "internal", "method", ".", "Reliance", "on", "this", "method", "may", "break", "your", "application", "i...
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/converters/Converters.java#L131-L143
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/DisksInner.java
DisksInner.revokeAccess
public OperationStatusResponseInner revokeAccess(String resourceGroupName, String diskName) { """ Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported...
java
public OperationStatusResponseInner revokeAccess(String resourceGroupName, String diskName) { return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "revokeAccess", "(", "String", "resourceGroupName", ",", "String", "diskName", ")", "{", "return", "revokeAccessWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ")", ".", "toBlocking", "(", ")", ".", "last",...
Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @throws Illega...
[ "Revokes", "access", "to", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/DisksInner.java#L1124-L1126
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.removeNull
public static <T> Collection<T> removeNull(Collection<T> collection) { """ 去除{@code null} 元素 @param collection 集合 @return 处理后的集合 @since 3.2.2 """ return filter(collection, new Editor<T>() { @Override public T edit(T t) { // 返回null便不加入集合 return t; } }); }
java
public static <T> Collection<T> removeNull(Collection<T> collection) { return filter(collection, new Editor<T>() { @Override public T edit(T t) { // 返回null便不加入集合 return t; } }); }
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "removeNull", "(", "Collection", "<", "T", ">", "collection", ")", "{", "return", "filter", "(", "collection", ",", "new", "Editor", "<", "T", ">", "(", ")", "{", "@", "Override", "publi...
去除{@code null} 元素 @param collection 集合 @return 处理后的集合 @since 3.2.2
[ "去除", "{", "@code", "null", "}", "元素" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L1059-L1067
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.deletePushMessageForSubscriber
public void deletePushMessageForSubscriber(String messageId, String reservationId, String subscriberName) throws IOException { """ Delete push message for subscriber by subscriber ID and message ID. If there is no message or subscriber, an EmptyQueueException is thrown. @param subscriberName The name of Subscri...
java
public void deletePushMessageForSubscriber(String messageId, String reservationId, String subscriberName) throws IOException { deleteMessage(messageId, reservationId, subscriberName); }
[ "public", "void", "deletePushMessageForSubscriber", "(", "String", "messageId", ",", "String", "reservationId", ",", "String", "subscriberName", ")", "throws", "IOException", "{", "deleteMessage", "(", "messageId", ",", "reservationId", ",", "subscriberName", ")", ";"...
Delete push message for subscriber by subscriber ID and message ID. If there is no message or subscriber, an EmptyQueueException is thrown. @param subscriberName The name of Subscriber. @param messageId The Message ID. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status other than 200 OK. @throw...
[ "Delete", "push", "message", "for", "subscriber", "by", "subscriber", "ID", "and", "message", "ID", ".", "If", "there", "is", "no", "message", "or", "subscriber", "an", "EmptyQueueException", "is", "thrown", "." ]
train
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L676-L678
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getBoundingBox
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, TileGrid tileGrid) { """ Get the bounding box of the tile grid in the tile matrix using the total bounding box with constant units @param totalBox total bounding box @param tileMatrix tile matrix @param tileGrid tile ...
java
public static BoundingBox getBoundingBox(BoundingBox totalBox, TileMatrix tileMatrix, TileGrid tileGrid) { return getBoundingBox(totalBox, tileMatrix.getMatrixWidth(), tileMatrix.getMatrixHeight(), tileGrid); }
[ "public", "static", "BoundingBox", "getBoundingBox", "(", "BoundingBox", "totalBox", ",", "TileMatrix", "tileMatrix", ",", "TileGrid", "tileGrid", ")", "{", "return", "getBoundingBox", "(", "totalBox", ",", "tileMatrix", ".", "getMatrixWidth", "(", ")", ",", "tile...
Get the bounding box of the tile grid in the tile matrix using the total bounding box with constant units @param totalBox total bounding box @param tileMatrix tile matrix @param tileGrid tile grid @return bounding box @since 1.2.0
[ "Get", "the", "bounding", "box", "of", "the", "tile", "grid", "in", "the", "tile", "matrix", "using", "the", "total", "bounding", "box", "with", "constant", "units" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L960-L964
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_service_serviceName_directory_fetchEntrepriseInformations_POST
public OvhEntrepriseNumberInformationsTask billingAccount_service_serviceName_directory_fetchEntrepriseInformations_POST(String billingAccount, String serviceName, String entrepriseNumber) throws IOException { """ Get company entreprise informations by providing entreprise number REST: POST /telephony/{billingA...
java
public OvhEntrepriseNumberInformationsTask billingAccount_service_serviceName_directory_fetchEntrepriseInformations_POST(String billingAccount, String serviceName, String entrepriseNumber) throws IOException { String qPath = "/telephony/{billingAccount}/service/{serviceName}/directory/fetchEntrepriseInformations"; ...
[ "public", "OvhEntrepriseNumberInformationsTask", "billingAccount_service_serviceName_directory_fetchEntrepriseInformations_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "entrepriseNumber", ")", "throws", "IOException", "{", "String", "qPath", ...
Get company entreprise informations by providing entreprise number REST: POST /telephony/{billingAccount}/service/{serviceName}/directory/fetchEntrepriseInformations @param entrepriseNumber [required] Entreprise number to fetch informations from @param billingAccount [required] The name of your billingAccount @param s...
[ "Get", "company", "entreprise", "informations", "by", "providing", "entreprise", "number" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3978-L3985
JodaOrg/joda-money
src/main/java/org/joda/money/BigMoney.java
BigMoney.convertedTo
public BigMoney convertedTo(CurrencyUnit currency, BigDecimal conversionMultipler) { """ Returns a copy of this monetary value converted into another currency using the specified conversion rate. <p> The scale of the result will be the sum of the scale of this money and the scale of the multiplier. If desired,...
java
public BigMoney convertedTo(CurrencyUnit currency, BigDecimal conversionMultipler) { MoneyUtils.checkNotNull(currency, "CurrencyUnit must not be null"); MoneyUtils.checkNotNull(conversionMultipler, "Multiplier must not be null"); if (this.currency == currency) { if (conversionMul...
[ "public", "BigMoney", "convertedTo", "(", "CurrencyUnit", "currency", ",", "BigDecimal", "conversionMultipler", ")", "{", "MoneyUtils", ".", "checkNotNull", "(", "currency", ",", "\"CurrencyUnit must not be null\"", ")", ";", "MoneyUtils", ".", "checkNotNull", "(", "c...
Returns a copy of this monetary value converted into another currency using the specified conversion rate. <p> The scale of the result will be the sum of the scale of this money and the scale of the multiplier. If desired, the scale of the result can be adjusted to the scale of the new currency using {@link #withCurren...
[ "Returns", "a", "copy", "of", "this", "monetary", "value", "converted", "into", "another", "currency", "using", "the", "specified", "conversion", "rate", ".", "<p", ">", "The", "scale", "of", "the", "result", "will", "be", "the", "sum", "of", "the", "scale...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L1511-L1525
infinispan/infinispan
counter/src/main/java/org/infinispan/counter/util/Utils.java
Utils.calculateState
public static CounterState calculateState(long value, long lowerBound, long upperBound) { """ Calculates the {@link CounterState} to use based on the value and the boundaries. <p> If the value is less than the lower bound, {@link CounterState#LOWER_BOUND_REACHED} is returned. On other hand, if the value is high...
java
public static CounterState calculateState(long value, long lowerBound, long upperBound) { if (value < lowerBound) { return CounterState.LOWER_BOUND_REACHED; } else if (value > upperBound) { return CounterState.UPPER_BOUND_REACHED; } return CounterState.VALID; }
[ "public", "static", "CounterState", "calculateState", "(", "long", "value", ",", "long", "lowerBound", ",", "long", "upperBound", ")", "{", "if", "(", "value", "<", "lowerBound", ")", "{", "return", "CounterState", ".", "LOWER_BOUND_REACHED", ";", "}", "else",...
Calculates the {@link CounterState} to use based on the value and the boundaries. <p> If the value is less than the lower bound, {@link CounterState#LOWER_BOUND_REACHED} is returned. On other hand, if the value is higher than the upper bound, {@link CounterState#UPPER_BOUND_REACHED} is returned. Otherwise, {@link Count...
[ "Calculates", "the", "{", "@link", "CounterState", "}", "to", "use", "based", "on", "the", "value", "and", "the", "boundaries", ".", "<p", ">", "If", "the", "value", "is", "less", "than", "the", "lower", "bound", "{", "@link", "CounterState#LOWER_BOUND_REACH...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/util/Utils.java#L54-L61
finmath/finmath-lib
src/main/java6/net/finmath/functions/AnalyticFormulas.java
AnalyticFormulas.huntKennedyCMSFloorValue
public static double huntKennedyCMSFloorValue( double forwardSwaprate, double volatility, double swapAnnuity, double optionMaturity, double swapMaturity, double payoffUnit, double optionStrike) { """ Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together w...
java
public static double huntKennedyCMSFloorValue( double forwardSwaprate, double volatility, double swapAnnuity, double optionMaturity, double swapMaturity, double payoffUnit, double optionStrike) { double huntKennedyCMSOptionValue = huntKennedyCMSOptionValue(forwardSwaprate, volatility, swapAnnuit...
[ "public", "static", "double", "huntKennedyCMSFloorValue", "(", "double", "forwardSwaprate", ",", "double", "volatility", ",", "double", "swapAnnuity", ",", "double", "optionMaturity", ",", "double", "swapMaturity", ",", "double", "payoffUnit", ",", "double", "optionSt...
Calculate the value of a CMS strike using the Black-Scholes model for the swap rate together with the Hunt-Kennedy convexity adjustment. @param forwardSwaprate The forward swap rate @param volatility Volatility of the log of the swap rate @param swapAnnuity The swap annuity @param optionMaturity The option maturity @p...
[ "Calculate", "the", "value", "of", "a", "CMS", "strike", "using", "the", "Black", "-", "Scholes", "model", "for", "the", "swap", "rate", "together", "with", "the", "Hunt", "-", "Kennedy", "convexity", "adjustment", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/functions/AnalyticFormulas.java#L940-L953
tiesebarrell/process-assertions
process-assertions-api/src/main/java/org/toxos/processassertions/api/internal/AssertUtils.java
AssertUtils.replaceStringInString
public static String replaceStringInString(final String text, final String searchString, final String replacement) { """ Replaces all occurrences of a string within a larger string with a replacement string. @param text text to search and replace in, may be {@code null} @param searchString the String to sear...
java
public static String replaceStringInString(final String text, final String searchString, final String replacement) { if (stringIsBlank(text) || stringIsBlank(searchString) || replacement == null) { return text; } int start = 0; int end = text.indexOf(searchString, start); ...
[ "public", "static", "String", "replaceStringInString", "(", "final", "String", "text", ",", "final", "String", "searchString", ",", "final", "String", "replacement", ")", "{", "if", "(", "stringIsBlank", "(", "text", ")", "||", "stringIsBlank", "(", "searchStrin...
Replaces all occurrences of a string within a larger string with a replacement string. @param text text to search and replace in, may be {@code null} @param searchString the String to search for, may be {@code null} @param replacement the String to replace it with, may be {@code null} @return the text with any replace...
[ "Replaces", "all", "occurrences", "of", "a", "string", "within", "a", "larger", "string", "with", "a", "replacement", "string", "." ]
train
https://github.com/tiesebarrell/process-assertions/blob/932a8443982e356cdf5a230165a35c725d9306ab/process-assertions-api/src/main/java/org/toxos/processassertions/api/internal/AssertUtils.java#L88-L109
Azure/azure-sdk-for-java
policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicySetDefinitionsInner.java
PolicySetDefinitionsInner.getAtManagementGroupAsync
public Observable<PolicySetDefinitionInner> getAtManagementGroupAsync(String policySetDefinitionName, String managementGroupId) { """ Retrieves a policy set definition. This operation retrieves the policy set definition in the given management group with the given name. @param policySetDefinitionName The name ...
java
public Observable<PolicySetDefinitionInner> getAtManagementGroupAsync(String policySetDefinitionName, String managementGroupId) { return getAtManagementGroupWithServiceResponseAsync(policySetDefinitionName, managementGroupId).map(new Func1<ServiceResponse<PolicySetDefinitionInner>, PolicySetDefinitionInner>() {...
[ "public", "Observable", "<", "PolicySetDefinitionInner", ">", "getAtManagementGroupAsync", "(", "String", "policySetDefinitionName", ",", "String", "managementGroupId", ")", "{", "return", "getAtManagementGroupWithServiceResponseAsync", "(", "policySetDefinitionName", ",", "man...
Retrieves a policy set definition. This operation retrieves the policy set definition in the given management group with the given name. @param policySetDefinitionName The name of the policy set definition to get. @param managementGroupId The ID of the management group. @throws IllegalArgumentException thrown if param...
[ "Retrieves", "a", "policy", "set", "definition", ".", "This", "operation", "retrieves", "the", "policy", "set", "definition", "in", "the", "given", "management", "group", "with", "the", "given", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicySetDefinitionsInner.java#L898-L905
houbb/log-integration
src/main/java/com/github/houbb/log/integration/support/placeholder/impl/DefaultPlaceholderConnector.java
DefaultPlaceholderConnector.buildString
private String buildString(String format, Object[] params) { """ 构建字符串 "1 {} 2 {} " TO "1 %s 2 %s" @param format 格式化 @param params 参数列表 @return 构建的结果 """ String stringFormat = format; for(int i = 0; i < params.length; i++) { stringFormat = stringFormat.replaceFirst("\\{}", "%s")...
java
private String buildString(String format, Object[] params) { String stringFormat = format; for(int i = 0; i < params.length; i++) { stringFormat = stringFormat.replaceFirst("\\{}", "%s"); } return String.format(stringFormat, params); }
[ "private", "String", "buildString", "(", "String", "format", ",", "Object", "[", "]", "params", ")", "{", "String", "stringFormat", "=", "format", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "params", ".", "length", ";", "i", "++", ")", "...
构建字符串 "1 {} 2 {} " TO "1 %s 2 %s" @param format 格式化 @param params 参数列表 @return 构建的结果
[ "构建字符串", "1", "{}", "2", "{}", "TO", "1", "%s", "2", "%s" ]
train
https://github.com/houbb/log-integration/blob/c5e979719aec12a02f7d22b24b04b6fbb1789ca5/src/main/java/com/github/houbb/log/integration/support/placeholder/impl/DefaultPlaceholderConnector.java#L65-L71
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java
WatchMonitor.create
public static WatchMonitor create(String path, int maxDepth, WatchEvent.Kind<?>... events) { """ 创建并初始化监听 @param path 路径 @param events 监听的事件列表 @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @return 监听对象 """ return create(Paths.get(path), maxDepth, events); }
java
public static WatchMonitor create(String path, int maxDepth, WatchEvent.Kind<?>... events){ return create(Paths.get(path), maxDepth, events); }
[ "public", "static", "WatchMonitor", "create", "(", "String", "path", ",", "int", "maxDepth", ",", "WatchEvent", ".", "Kind", "<", "?", ">", "...", "events", ")", "{", "return", "create", "(", "Paths", ".", "get", "(", "path", ")", ",", "maxDepth", ",",...
创建并初始化监听 @param path 路径 @param events 监听的事件列表 @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @return 监听对象
[ "创建并初始化监听" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java#L162-L164
sarl/sarl
main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java
SarlDocumentationParser.reportError
protected static void reportError(String message, Object... parameters) { """ Report an error. @param message the message in a format compatible with {@link MessageFormat}. @param parameters the parameters, starting at {1}. """ Throwable cause = null; for (int i = 0; cause == null && i < parameters.l...
java
protected static void reportError(String message, Object... parameters) { Throwable cause = null; for (int i = 0; cause == null && i < parameters.length; ++i) { if (parameters[i] instanceof Throwable) { cause = (Throwable) parameters[i]; } } final String msg = MessageFormat.format(message, para...
[ "protected", "static", "void", "reportError", "(", "String", "message", ",", "Object", "...", "parameters", ")", "{", "Throwable", "cause", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "cause", "==", "null", "&&", "i", "<", "parameters", "....
Report an error. @param message the message in a format compatible with {@link MessageFormat}. @param parameters the parameters, starting at {1}.
[ "Report", "an", "error", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/parser/SarlDocumentationParser.java#L993-L1005
kohsuke/com4j
runtime/src/main/java/com4j/COM4J.java
COM4J.getActiveObject
public static <T extends Com4jObject> T getActiveObject(Class<T> primaryInterface, GUID clsid ) { """ Gets an already running object from the running object table. @param <T> the type of the return value and the type parameter of the class object of primaryInterface @param primaryInterface The returned COM o...
java
public static <T extends Com4jObject> T getActiveObject(Class<T> primaryInterface, GUID clsid ) { return new GetActiveObjectTask<T>(clsid,primaryInterface).execute(); }
[ "public", "static", "<", "T", "extends", "Com4jObject", ">", "T", "getActiveObject", "(", "Class", "<", "T", ">", "primaryInterface", ",", "GUID", "clsid", ")", "{", "return", "new", "GetActiveObjectTask", "<", "T", ">", "(", "clsid", ",", "primaryInterface"...
Gets an already running object from the running object table. @param <T> the type of the return value and the type parameter of the class object of primaryInterface @param primaryInterface The returned COM object is returned as this interface. Must be non-null. Passing in {@link Com4jObject} allows the caller to crea...
[ "Gets", "an", "already", "running", "object", "from", "the", "running", "object", "table", "." ]
train
https://github.com/kohsuke/com4j/blob/1e690b805fb0e4e9ef61560e20a56335aecb0b24/runtime/src/main/java/com4j/COM4J.java#L162-L164
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.oCRUrlInput
public OCR oCRUrlInput(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { """ Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @param language Langu...
java
public OCR oCRUrlInput(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, oCRUrlInputOptionalParameter).toBlocking().single().body(); }
[ "public", "OCR", "oCRUrlInput", "(", "String", "language", ",", "String", "contentType", ",", "BodyModelModel", "imageUrl", ",", "OCRUrlInputOptionalParameter", "oCRUrlInputOptionalParameter", ")", "{", "return", "oCRUrlInputWithServiceResponseAsync", "(", "language", ",", ...
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @param language Language of the terms. @param contentType The content type. @param imageUrl The image url. @param oCRUrlInputOptionalParameter the object representing the optiona...
[ "Returns", "any", "text", "found", "in", "the", "image", "for", "the", "language", "specified", ".", "If", "no", "language", "is", "specified", "in", "input", "then", "the", "detection", "defaults", "to", "English", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1047-L1049
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateSimulationApplicationResult.java
CreateSimulationApplicationResult.withTags
public CreateSimulationApplicationResult withTags(java.util.Map<String, String> tags) { """ <p> The list of all tags added to the simulation application. </p> @param tags The list of all tags added to the simulation application. @return Returns a reference to this object so that method calls can be chained ...
java
public CreateSimulationApplicationResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateSimulationApplicationResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The list of all tags added to the simulation application. </p> @param tags The list of all tags added to the simulation application. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "list", "of", "all", "tags", "added", "to", "the", "simulation", "application", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateSimulationApplicationResult.java#L512-L515
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_account_primaryEmailAddress_archive_PUT
public void organizationName_service_exchangeService_account_primaryEmailAddress_archive_PUT(String organizationName, String exchangeService, String primaryEmailAddress, OvhExchangeAccountArchive body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{ex...
java
public void organizationName_service_exchangeService_account_primaryEmailAddress_archive_PUT(String organizationName, String exchangeService, String primaryEmailAddress, OvhExchangeAccountArchive body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEm...
[ "public", "void", "organizationName_service_exchangeService_account_primaryEmailAddress_archive_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "primaryEmailAddress", ",", "OvhExchangeAccountArchive", "body", ")", "throws", "IOException", ...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEmailAddress}/archive @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name o...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1562-L1566
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/net/SocketReceiver.java
SocketReceiver.getConnectedSocketDetails
public Vector getConnectedSocketDetails() { """ Returns a Vector of SocketDetail representing the IP/Domain name of the currently connected sockets that this receiver has been responsible for creating. @return Vector of SocketDetails """ Vector details = new Vector(socketList.size()); for (Enumerat...
java
public Vector getConnectedSocketDetails() { Vector details = new Vector(socketList.size()); for (Enumeration enumeration = socketList.elements(); enumeration.hasMoreElements(); ) { Socket socket = (Socket) enumeration.nextElement(); details.add( new SocketDetail(socket,...
[ "public", "Vector", "getConnectedSocketDetails", "(", ")", "{", "Vector", "details", "=", "new", "Vector", "(", "socketList", ".", "size", "(", ")", ")", ";", "for", "(", "Enumeration", "enumeration", "=", "socketList", ".", "elements", "(", ")", ";", "enu...
Returns a Vector of SocketDetail representing the IP/Domain name of the currently connected sockets that this receiver has been responsible for creating. @return Vector of SocketDetails
[ "Returns", "a", "Vector", "of", "SocketDetail", "representing", "the", "IP", "/", "Domain", "name", "of", "the", "currently", "connected", "sockets", "that", "this", "receiver", "has", "been", "responsible", "for", "creating", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/net/SocketReceiver.java#L330-L342
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/UserApi.java
UserApi.changeCustomAttribute
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException { """ Change custom attribute for the given user @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param customAttribute...
java
public CustomAttribute changeCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException { if (Objects.isNull(customAttribute)) { throw new IllegalArgumentException("CustomAttributes can't be null"); } //changing & creating custom...
[ "public", "CustomAttribute", "changeCustomAttribute", "(", "final", "Object", "userIdOrUsername", ",", "final", "CustomAttribute", "customAttribute", ")", "throws", "GitLabApiException", "{", "if", "(", "Objects", ".", "isNull", "(", "customAttribute", ")", ")", "{", ...
Change custom attribute for the given user @param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance @param customAttribute the custome attribute to change @return the changed CustomAttribute @throws GitLabApiException on failure while changing customAttributes
[ "Change", "custom", "attribute", "for", "the", "given", "user" ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L934-L943