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
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java
TransactionSignature.decodeFromBitcoin
public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding, boolean requireCanonicalSValue) throws SignatureDecodeException, VerificationException { """ Returns a decoded signature. @param requireCanonicalEncoding if the encoding of the signature must be can...
java
public static TransactionSignature decodeFromBitcoin(byte[] bytes, boolean requireCanonicalEncoding, boolean requireCanonicalSValue) throws SignatureDecodeException, VerificationException { // Bitcoin encoding is DER signature + sighash byte. if (requireCanonicalEncoding && !isEncodingCanoni...
[ "public", "static", "TransactionSignature", "decodeFromBitcoin", "(", "byte", "[", "]", "bytes", ",", "boolean", "requireCanonicalEncoding", ",", "boolean", "requireCanonicalSValue", ")", "throws", "SignatureDecodeException", ",", "VerificationException", "{", "// Bitcoin e...
Returns a decoded signature. @param requireCanonicalEncoding if the encoding of the signature must be canonical. @param requireCanonicalSValue if the S-value must be canonical (below half the order of the curve). @throws SignatureDecodeException if the signature is unparseable in some way. @throws VerificationExceptio...
[ "Returns", "a", "decoded", "signature", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/crypto/TransactionSignature.java#L175-L187
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java
AuditorModuleContext.getAuditor
public synchronized IHEAuditor getAuditor(final Class<? extends IHEAuditor> clazz, boolean useContextAuditorRegistry) { """ Instantiate (or get from cache) an auditor instance for a given Class instance @param clazz The class instance to instantiate the auditor for @param useContextAuditorRegistry Whether to use...
java
public synchronized IHEAuditor getAuditor(final Class<? extends IHEAuditor> clazz, boolean useContextAuditorRegistry) { if (null == clazz) { return null; } IHEAuditor auditor = null; if (useContextAuditorRegistry) { auditor = getRegisteredAuditor(clazz.getName()); if (auditor != null) { if (LOG...
[ "public", "synchronized", "IHEAuditor", "getAuditor", "(", "final", "Class", "<", "?", "extends", "IHEAuditor", ">", "clazz", ",", "boolean", "useContextAuditorRegistry", ")", "{", "if", "(", "null", "==", "clazz", ")", "{", "return", "null", ";", "}", "IHEA...
Instantiate (or get from cache) an auditor instance for a given Class instance @param clazz The class instance to instantiate the auditor for @param useContextAuditorRegistry Whether to use a cached auditor @return An auditor instance
[ "Instantiate", "(", "or", "get", "from", "cache", ")", "an", "auditor", "instance", "for", "a", "given", "Class", "instance" ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java#L243-L267
mojohaus/aspectj-maven-plugin
src/main/java/org/codehaus/mojo/aspectj/AjcHelper.java
AjcHelper.getBuildFilesForAjdtFile
public static Set<String> getBuildFilesForAjdtFile( String ajdtBuildDefFile, File basedir ) throws MojoExecutionException { """ Based on a AJDT build properties file resolves the combination of all include and exclude statements and returns a set of all the files to be compiled and weaved. @param ajdt...
java
public static Set<String> getBuildFilesForAjdtFile( String ajdtBuildDefFile, File basedir ) throws MojoExecutionException { Set<String> result = new LinkedHashSet<String>(); Properties ajdtBuildProperties = new Properties(); try { ajdtBuildProperties.load( new Fi...
[ "public", "static", "Set", "<", "String", ">", "getBuildFilesForAjdtFile", "(", "String", "ajdtBuildDefFile", ",", "File", "basedir", ")", "throws", "MojoExecutionException", "{", "Set", "<", "String", ">", "result", "=", "new", "LinkedHashSet", "<", "String", "...
Based on a AJDT build properties file resolves the combination of all include and exclude statements and returns a set of all the files to be compiled and weaved. @param ajdtBuildDefFile the ajdtBuildDefFile @param basedir the baseDirectory @return @throws MojoExecutionException
[ "Based", "on", "a", "AJDT", "build", "properties", "file", "resolves", "the", "combination", "of", "all", "include", "and", "exclude", "statements", "and", "returns", "a", "set", "of", "all", "the", "files", "to", "be", "compiled", "and", "weaved", "." ]
train
https://github.com/mojohaus/aspectj-maven-plugin/blob/120ee1ce08b93873931035ed98cd70e3ccceeefb/src/main/java/org/codehaus/mojo/aspectj/AjcHelper.java#L136-L159
facebookarchive/swift
swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java
AbstractThriftMetadataBuilder.verifyFieldType
protected final void verifyFieldType(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog) { """ Verifies that the the fields all have a supported Java type and that all fields map to the exact same ThriftType. """ boolean isSupportedType = true; for (FieldMetadata fi...
java
protected final void verifyFieldType(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog) { boolean isSupportedType = true; for (FieldMetadata field : fields) { if (!catalog.isSupportedStructFieldType(field.getJavaType())) { metadataErrors.addEr...
[ "protected", "final", "void", "verifyFieldType", "(", "short", "id", ",", "String", "name", ",", "Collection", "<", "FieldMetadata", ">", "fields", ",", "ThriftCatalog", "catalog", ")", "{", "boolean", "isSupportedType", "=", "true", ";", "for", "(", "FieldMet...
Verifies that the the fields all have a supported Java type and that all fields map to the exact same ThriftType.
[ "Verifies", "that", "the", "the", "fields", "all", "have", "a", "supported", "Java", "type", "and", "that", "all", "fields", "map", "to", "the", "exact", "same", "ThriftType", "." ]
train
https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java#L716-L738
lucee/Lucee
core/src/main/java/lucee/commons/io/ModeUtil.java
ModeUtil.updateMode
public static String updateMode(String existing, String update) throws IOException { """ update a string mode with a other (111+222=333 or 333+111=333 or 113+202=313) @param existing @param update @return @throws IOException """ return toStringMode(updateMode(toOctalMode(existing), toOctalMode(update)))...
java
public static String updateMode(String existing, String update) throws IOException { return toStringMode(updateMode(toOctalMode(existing), toOctalMode(update))); }
[ "public", "static", "String", "updateMode", "(", "String", "existing", ",", "String", "update", ")", "throws", "IOException", "{", "return", "toStringMode", "(", "updateMode", "(", "toOctalMode", "(", "existing", ")", ",", "toOctalMode", "(", "update", ")", ")...
update a string mode with a other (111+222=333 or 333+111=333 or 113+202=313) @param existing @param update @return @throws IOException
[ "update", "a", "string", "mode", "with", "a", "other", "(", "111", "+", "222", "=", "333", "or", "333", "+", "111", "=", "333", "or", "113", "+", "202", "=", "313", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/ModeUtil.java#L90-L92
micronaut-projects/micronaut-core
inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java
ModelUtils.overridingOrHidingMethod
Optional<ExecutableElement> overridingOrHidingMethod(ExecutableElement overridden, TypeElement classElement) { """ Tests if candidate method is overridden from a given class or subclass. @param overridden the candidate overridden method @param classElement the type element that may contain the overriding met...
java
Optional<ExecutableElement> overridingOrHidingMethod(ExecutableElement overridden, TypeElement classElement) { List<ExecutableElement> methods = ElementFilter.methodsIn(elementUtils.getAllMembers(classElement)); for (ExecutableElement method : methods) { if (!method.equals(overridden) && met...
[ "Optional", "<", "ExecutableElement", ">", "overridingOrHidingMethod", "(", "ExecutableElement", "overridden", ",", "TypeElement", "classElement", ")", "{", "List", "<", "ExecutableElement", ">", "methods", "=", "ElementFilter", ".", "methodsIn", "(", "elementUtils", ...
Tests if candidate method is overridden from a given class or subclass. @param overridden the candidate overridden method @param classElement the type element that may contain the overriding method, either directly or in a subclass @return the overriding method
[ "Tests", "if", "candidate", "method", "is", "overridden", "from", "a", "given", "class", "or", "subclass", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/ModelUtils.java#L435-L451
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/FilenameUtils.java
FilenameUtils.generateSafetyUniqueFile
public static File generateSafetyUniqueFile(File file) throws IOException { """ Creates and returns a safe file name on the system without duplication in the specified directory. If a duplicate file name exists, it is returned by appending a number after the file name. File extensions are separated by '_' charac...
java
public static File generateSafetyUniqueFile(File file) throws IOException { String path = file.getCanonicalPath(); String ext = getExtension(path); char separator = '_'; String name1 = Long.toString(System.currentTimeMillis()); Random rnd = new Random(); String name2 = ...
[ "public", "static", "File", "generateSafetyUniqueFile", "(", "File", "file", ")", "throws", "IOException", "{", "String", "path", "=", "file", ".", "getCanonicalPath", "(", ")", ";", "String", "ext", "=", "getExtension", "(", "path", ")", ";", "char", "separ...
Creates and returns a safe file name on the system without duplication in the specified directory. If a duplicate file name exists, it is returned by appending a number after the file name. File extensions are separated by '_' character. <pre> ex) 1111111111_txt </pre> @param file the file to seek @return an unique fi...
[ "Creates", "and", "returns", "a", "safe", "file", "name", "on", "the", "system", "without", "duplication", "in", "the", "specified", "directory", ".", "If", "a", "duplicate", "file", "name", "exists", "it", "is", "returned", "by", "appending", "a", "number",...
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/FilenameUtils.java#L344-L364
aws/aws-sdk-java
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/CreateIdentityProviderRequest.java
CreateIdentityProviderRequest.withAttributeMapping
public CreateIdentityProviderRequest withAttributeMapping(java.util.Map<String, String> attributeMapping) { """ <p> A mapping of identity provider attributes to standard and custom user pool attributes. </p> @param attributeMapping A mapping of identity provider attributes to standard and custom user pool at...
java
public CreateIdentityProviderRequest withAttributeMapping(java.util.Map<String, String> attributeMapping) { setAttributeMapping(attributeMapping); return this; }
[ "public", "CreateIdentityProviderRequest", "withAttributeMapping", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributeMapping", ")", "{", "setAttributeMapping", "(", "attributeMapping", ")", ";", "return", "this", ";", "}" ]
<p> A mapping of identity provider attributes to standard and custom user pool attributes. </p> @param attributeMapping A mapping of identity provider attributes to standard and custom user pool attributes. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "mapping", "of", "identity", "provider", "attributes", "to", "standard", "and", "custom", "user", "pool", "attributes", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/CreateIdentityProviderRequest.java#L314-L317
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.beginUpdateTags
public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName) { """ Updates an express route circuit tags. @param resourceGroupName The name of the resource group. @param circuitName The name of the circuit. @throws IllegalArgumentException thrown if parameters fail the validat...
java
public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); }
[ "public", "ExpressRouteCircuitInner", "beginUpdateTags", "(", "String", "resourceGroupName", ",", "String", "circuitName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "circuitName", ")", ".", "toBlocking", "(", ")", ".", ...
Updates an express route circuit tags. @param resourceGroupName The name of the resource group. @param circuitName The name of the circuit. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wra...
[ "Updates", "an", "express", "route", "circuit", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L705-L707
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/WeakBB.java
WeakBB.weakBBVerify
public static boolean weakBBVerify(ECP2 pk, ECP sig, BIG m) { """ Verify a WBB signature for a certain message @param pk Public key @param sig Signature @param m Message @return True iff valid """ ECP2 p = new ECP2(); p.copy(pk); p.add(IdemixUtils.genG2.mul(m)); p.affin...
java
public static boolean weakBBVerify(ECP2 pk, ECP sig, BIG m) { ECP2 p = new ECP2(); p.copy(pk); p.add(IdemixUtils.genG2.mul(m)); p.affine(); return PAIR.fexp(PAIR.ate(p, sig)).equals(IdemixUtils.genGT); }
[ "public", "static", "boolean", "weakBBVerify", "(", "ECP2", "pk", ",", "ECP", "sig", ",", "BIG", "m", ")", "{", "ECP2", "p", "=", "new", "ECP2", "(", ")", ";", "p", ".", "copy", "(", "pk", ")", ";", "p", ".", "add", "(", "IdemixUtils", ".", "ge...
Verify a WBB signature for a certain message @param pk Public key @param sig Signature @param m Message @return True iff valid
[ "Verify", "a", "WBB", "signature", "for", "a", "certain", "message" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/WeakBB.java#L86-L93
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/util/SslUtils.java
SslUtils.trustAllHostnameVerifier
@Beta public static HostnameVerifier trustAllHostnameVerifier() { """ {@link Beta} <br> Returns a verifier that trusts all host names. <p>Be careful! Disabling host name verification is dangerous and should only be done in testing environments. """ return new HostnameVerifier() { public boole...
java
@Beta public static HostnameVerifier trustAllHostnameVerifier() { return new HostnameVerifier() { public boolean verify(String arg0, SSLSession arg1) { return true; } }; }
[ "@", "Beta", "public", "static", "HostnameVerifier", "trustAllHostnameVerifier", "(", ")", "{", "return", "new", "HostnameVerifier", "(", ")", "{", "public", "boolean", "verify", "(", "String", "arg0", ",", "SSLSession", "arg1", ")", "{", "return", "true", ";"...
{@link Beta} <br> Returns a verifier that trusts all host names. <p>Be careful! Disabling host name verification is dangerous and should only be done in testing environments.
[ "{", "@link", "Beta", "}", "<br", ">", "Returns", "a", "verifier", "that", "trusts", "all", "host", "names", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java#L148-L156
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/metrics/HystrixMetricsPublisher.java
HystrixMetricsPublisher.getMetricsPublisherForCollapser
public HystrixMetricsPublisherCollapser getMetricsPublisherForCollapser(HystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, HystrixCollapserProperties properties) { """ Construct an implementation of {@link HystrixMetricsPublisherCollapser} for {@link HystrixCollapser} instances having key {@link Hy...
java
public HystrixMetricsPublisherCollapser getMetricsPublisherForCollapser(HystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, HystrixCollapserProperties properties) { return new HystrixMetricsPublisherCollapserDefault(collapserKey, metrics, properties); }
[ "public", "HystrixMetricsPublisherCollapser", "getMetricsPublisherForCollapser", "(", "HystrixCollapserKey", "collapserKey", ",", "HystrixCollapserMetrics", "metrics", ",", "HystrixCollapserProperties", "properties", ")", "{", "return", "new", "HystrixMetricsPublisherCollapserDefault...
Construct an implementation of {@link HystrixMetricsPublisherCollapser} for {@link HystrixCollapser} instances having key {@link HystrixCollapserKey}. <p> This will be invoked once per {@link HystrixCollapserKey} instance. <p> <b>Default Implementation</b> <p> Return instance of {@link HystrixMetricsPublisherCollapserD...
[ "Construct", "an", "implementation", "of", "{", "@link", "HystrixMetricsPublisherCollapser", "}", "for", "{", "@link", "HystrixCollapser", "}", "instances", "having", "key", "{", "@link", "HystrixCollapserKey", "}", ".", "<p", ">", "This", "will", "be", "invoked",...
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/metrics/HystrixMetricsPublisher.java#L111-L113
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java
AttributeValueImpl.compareValues
@Pure public static int compareValues(AttributeValue arg0, AttributeValue arg1) { """ Compare the two specified values. @param arg0 first value. @param arg1 second value. @return replies a negative value if {@code arg0} is lesser than {@code arg1}, a positive value if {@code arg0} is greater than {@code ar...
java
@Pure public static int compareValues(AttributeValue arg0, AttributeValue arg1) { if (arg0 == arg1) { return 0; } if (arg0 == null) { return Integer.MAX_VALUE; } if (arg1 == null) { return Integer.MIN_VALUE; } Object v0; Object v1; try { v0 = arg0.getValue(); } catch (Exception except...
[ "@", "Pure", "public", "static", "int", "compareValues", "(", "AttributeValue", "arg0", ",", "AttributeValue", "arg1", ")", "{", "if", "(", "arg0", "==", "arg1", ")", "{", "return", "0", ";", "}", "if", "(", "arg0", "==", "null", ")", "{", "return", ...
Compare the two specified values. @param arg0 first value. @param arg1 second value. @return replies a negative value if {@code arg0} is lesser than {@code arg1}, a positive value if {@code arg0} is greater than {@code arg1}, or <code>0</code> if they are equal. @see AttributeValueComparator
[ "Compare", "the", "two", "specified", "values", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValueImpl.java#L464-L492
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.hosting_web_serviceName_upgrade_duration_GET
public OvhOrder hosting_web_serviceName_upgrade_duration_GET(String serviceName, String duration, net.minidev.ovh.api.hosting.web.OvhOfferEnum offer, Boolean waiveRetractationPeriod) throws IOException { """ Get prices and contracts information REST: GET /order/hosting/web/{serviceName}/upgrade/{duration} @par...
java
public OvhOrder hosting_web_serviceName_upgrade_duration_GET(String serviceName, String duration, net.minidev.ovh.api.hosting.web.OvhOfferEnum offer, Boolean waiveRetractationPeriod) throws IOException { String qPath = "/order/hosting/web/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName...
[ "public", "OvhOrder", "hosting_web_serviceName_upgrade_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "hosting", ".", "web", ".", "OvhOfferEnum", "offer", ",", "Boolean", "waiveRetra...
Get prices and contracts information REST: GET /order/hosting/web/{serviceName}/upgrade/{duration} @param offer [required] New offers for your hosting account @param waiveRetractationPeriod [required] Indicates that order will be processed with waiving retractation period @param serviceName [required] The internal nam...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L4944-L4951
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java
SessionAttributeInitializingFilter.setAttributes
public void setAttributes(Map<String, ?> attributes) { """ Sets the attribute map. The specified attributes are copied into the underlying map, so modifying the specified attributes parameter after the call won't change the internal state. """ if (attributes == null) { attributes = new H...
java
public void setAttributes(Map<String, ?> attributes) { if (attributes == null) { attributes = new HashMap<>(); } this.attributes.clear(); this.attributes.putAll(attributes); }
[ "public", "void", "setAttributes", "(", "Map", "<", "String", ",", "?", ">", "attributes", ")", "{", "if", "(", "attributes", "==", "null", ")", "{", "attributes", "=", "new", "HashMap", "<>", "(", ")", ";", "}", "this", ".", "attributes", ".", "clea...
Sets the attribute map. The specified attributes are copied into the underlying map, so modifying the specified attributes parameter after the call won't change the internal state.
[ "Sets", "the", "attribute", "map", ".", "The", "specified", "attributes", "are", "copied", "into", "the", "underlying", "map", "so", "modifying", "the", "specified", "attributes", "parameter", "after", "the", "call", "won", "t", "change", "the", "internal", "s...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/util/SessionAttributeInitializingFilter.java#L125-L132
jenkinsci/jenkins
core/src/main/java/hudson/slaves/SlaveComputer.java
SlaveComputer.setChannel
public void setChannel(@Nonnull InputStream in, @Nonnull OutputStream out, @CheckForNull OutputStream launchLog, @CheckForNull Channel.Listener listener) throws IOException, InterruptedException { """ Creates a {@link Channel} from the given stream and sets tha...
java
public void setChannel(@Nonnull InputStream in, @Nonnull OutputStream out, @CheckForNull OutputStream launchLog, @CheckForNull Channel.Listener listener) throws IOException, InterruptedException { ChannelBuilder cb = new ChannelBuilder(nodeName,threadPoolFor...
[ "public", "void", "setChannel", "(", "@", "Nonnull", "InputStream", "in", ",", "@", "Nonnull", "OutputStream", "out", ",", "@", "CheckForNull", "OutputStream", "launchLog", ",", "@", "CheckForNull", "Channel", ".", "Listener", "listener", ")", "throws", "IOExcep...
Creates a {@link Channel} from the given stream and sets that to this agent. @param in Stream connected to the remote agent. It's the caller's responsibility to do buffering on this stream, if that's necessary. @param out Stream connected to the remote peer. It's the caller's responsibility to do buffering on this str...
[ "Creates", "a", "{", "@link", "Channel", "}", "from", "the", "given", "stream", "and", "sets", "that", "to", "this", "agent", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/slaves/SlaveComputer.java#L420-L433
AgNO3/jcifs-ng
src/main/java/jcifs/smb/NtlmUtil.java
NtlmUtil.E
static void E ( byte[] key, byte[] data, byte[] e ) throws ShortBufferException { """ /* Accepts key multiple of 7 Returns enc multiple of 8 Multiple is the same like: 21 byte key gives 24 byte result """ byte[] key7 = new byte[7]; byte[] e8 = new byte[8]; for ( int i = 0; i < key.l...
java
static void E ( byte[] key, byte[] data, byte[] e ) throws ShortBufferException { byte[] key7 = new byte[7]; byte[] e8 = new byte[8]; for ( int i = 0; i < key.length / 7; i++ ) { System.arraycopy(key, i * 7, key7, 0, 7); Cipher des = Crypto.getDES(key7); des....
[ "static", "void", "E", "(", "byte", "[", "]", "key", ",", "byte", "[", "]", "data", ",", "byte", "[", "]", "e", ")", "throws", "ShortBufferException", "{", "byte", "[", "]", "key7", "=", "new", "byte", "[", "7", "]", ";", "byte", "[", "]", "e8"...
/* Accepts key multiple of 7 Returns enc multiple of 8 Multiple is the same like: 21 byte key gives 24 byte result
[ "/", "*", "Accepts", "key", "multiple", "of", "7", "Returns", "enc", "multiple", "of", "8", "Multiple", "is", "the", "same", "like", ":", "21", "byte", "key", "gives", "24", "byte", "result" ]
train
https://github.com/AgNO3/jcifs-ng/blob/0311107a077ea372527ae74839eec8042197332f/src/main/java/jcifs/smb/NtlmUtil.java#L245-L255
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDao.java
SnapshotDao.selectFinishedByComponentUuidsAndFromDates
public List<SnapshotDto> selectFinishedByComponentUuidsAndFromDates(DbSession dbSession, List<String> componentUuids, List<Long> fromDates) { """ Returned finished analysis from a list of projects and dates. "Finished" analysis means that the status in the CE_ACTIVITY table is SUCCESS => the goal is to be sure th...
java
public List<SnapshotDto> selectFinishedByComponentUuidsAndFromDates(DbSession dbSession, List<String> componentUuids, List<Long> fromDates) { checkArgument(componentUuids.size() == fromDates.size(), "The number of components (%s) and from dates (%s) must be the same.", String.valueOf(componentUuids.size()), ...
[ "public", "List", "<", "SnapshotDto", ">", "selectFinishedByComponentUuidsAndFromDates", "(", "DbSession", "dbSession", ",", "List", "<", "String", ">", "componentUuids", ",", "List", "<", "Long", ">", "fromDates", ")", "{", "checkArgument", "(", "componentUuids", ...
Returned finished analysis from a list of projects and dates. "Finished" analysis means that the status in the CE_ACTIVITY table is SUCCESS => the goal is to be sure that the CE task is completely finished. Note that branches analysis of projects are also returned.
[ "Returned", "finished", "analysis", "from", "a", "list", "of", "projects", "and", "dates", ".", "Finished", "analysis", "means", "that", "the", "status", "in", "the", "CE_ACTIVITY", "table", "is", "SUCCESS", "=", ">", "the", "goal", "is", "to", "be", "sure...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/component/SnapshotDao.java#L98-L107
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductPropertyUrl.java
ProductPropertyUrl.getPropertyValueLocalizedContentsUrl
public static MozuUrl getPropertyValueLocalizedContentsUrl(String attributeFQN, String productCode, String value) { """ Get Resource Url for GetPropertyValueLocalizedContents @param attributeFQN Fully qualified name for an attribute. @param productCode The unique, user-defined product code of a product, used thr...
java
public static MozuUrl getPropertyValueLocalizedContentsUrl(String attributeFQN, String productCode, String value) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/Properties/{attributeFQN}/values/{value}/LocalizedContent"); formatter.formatUrl("attributeFQN", attri...
[ "public", "static", "MozuUrl", "getPropertyValueLocalizedContentsUrl", "(", "String", "attributeFQN", ",", "String", "productCode", ",", "String", "value", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/products/{produ...
Get Resource Url for GetPropertyValueLocalizedContents @param attributeFQN Fully qualified name for an attribute. @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param value The value string to create. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetPropertyValueLocalizedContents" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/products/ProductPropertyUrl.java#L35-L42
JodaOrg/joda-time
src/main/java/org/joda/time/Period.java
Period.withMinutes
public Period withMinutes(int minutes) { """ Returns a new period with the specified number of minutes. <p> This period instance is immutable and unaffected by this method call. @param minutes the amount of minutes to add, may be negative @return the new period with the increased minutes @throws Unsupporte...
java
public Period withMinutes(int minutes) { int[] values = getValues(); // cloned getPeriodType().setIndexedField(this, PeriodType.MINUTE_INDEX, values, minutes); return new Period(values, getPeriodType()); }
[ "public", "Period", "withMinutes", "(", "int", "minutes", ")", "{", "int", "[", "]", "values", "=", "getValues", "(", ")", ";", "// cloned", "getPeriodType", "(", ")", ".", "setIndexedField", "(", "this", ",", "PeriodType", ".", "MINUTE_INDEX", ",", "value...
Returns a new period with the specified number of minutes. <p> This period instance is immutable and unaffected by this method call. @param minutes the amount of minutes to add, may be negative @return the new period with the increased minutes @throws UnsupportedOperationException if the field is not supported
[ "Returns", "a", "new", "period", "with", "the", "specified", "number", "of", "minutes", ".", "<p", ">", "This", "period", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Period.java#L989-L993
canoo/open-dolphin
subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java
DolphinServlet.createServerDolphin
protected DefaultServerDolphin createServerDolphin() { """ Creates a new instance of {@code DefaultServerDolphin}. Subclasses may override this method to customize how this instance should be created. @return a newly created {@code DefaultServerDolphin}. """ ServerModelStore modelStore = createServ...
java
protected DefaultServerDolphin createServerDolphin() { ServerModelStore modelStore = createServerModelStore(); ServerConnector connector = createServerConnector(modelStore, createCodec()); return new DefaultServerDolphin(modelStore, connector); }
[ "protected", "DefaultServerDolphin", "createServerDolphin", "(", ")", "{", "ServerModelStore", "modelStore", "=", "createServerModelStore", "(", ")", ";", "ServerConnector", "connector", "=", "createServerConnector", "(", "modelStore", ",", "createCodec", "(", ")", ")",...
Creates a new instance of {@code DefaultServerDolphin}. Subclasses may override this method to customize how this instance should be created. @return a newly created {@code DefaultServerDolphin}.
[ "Creates", "a", "new", "instance", "of", "{", "@code", "DefaultServerDolphin", "}", ".", "Subclasses", "may", "override", "this", "method", "to", "customize", "how", "this", "instance", "should", "be", "created", "." ]
train
https://github.com/canoo/open-dolphin/blob/50166defc3ef2de473d7a7246c32dc04304d80ef/subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java#L140-L144
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/cluster/api/AsyncRestBuilder.java
AsyncRestBuilder.withParam
public AsyncRestBuilder withParam(String key, String value) { """ Adds an URL query parameter to the request. Using a key twice will result in the last call being taken into account. @param key the parameter key. @param value the parameter value. """ this.params.put(key, value); return thi...
java
public AsyncRestBuilder withParam(String key, String value) { this.params.put(key, value); return this; }
[ "public", "AsyncRestBuilder", "withParam", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "params", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds an URL query parameter to the request. Using a key twice will result in the last call being taken into account. @param key the parameter key. @param value the parameter value.
[ "Adds", "an", "URL", "query", "parameter", "to", "the", "request", ".", "Using", "a", "key", "twice", "will", "result", "in", "the", "last", "call", "being", "taken", "into", "account", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/cluster/api/AsyncRestBuilder.java#L91-L94
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/MindMapPanel.java
MindMapPanel.copyTopicsToClipboard
public boolean copyTopicsToClipboard(final boolean cut, @Nonnull @MustNotContainNull final Topic... topics) { """ Create transferable topic list in system clipboard. @param cut true shows that remove topics after placing into clipboard @param topics topics to be placed into clipboard, if there are successors ...
java
public boolean copyTopicsToClipboard(final boolean cut, @Nonnull @MustNotContainNull final Topic... topics) { boolean result = false; if (this.lockIfNotDisposed()) { try { if (topics.length > 0) { final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); cl...
[ "public", "boolean", "copyTopicsToClipboard", "(", "final", "boolean", "cut", ",", "@", "Nonnull", "@", "MustNotContainNull", "final", "Topic", "...", "topics", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "this", ".", "lockIfNotDisposed", "(",...
Create transferable topic list in system clipboard. @param cut true shows that remove topics after placing into clipboard @param topics topics to be placed into clipboard, if there are successors and ancestors then successors will be removed @return true if topic array is not empty and operation completed successfully...
[ "Create", "transferable", "topic", "list", "in", "system", "clipboard", "." ]
train
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/MindMapPanel.java#L2647-L2668
wildfly/wildfly-core
logging/src/main/java/org/jboss/as/logging/LoggingSubsystemParser.java
LoggingSubsystemParser.parsePropertyElement
static void parsePropertyElement(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException { """ Parses a property element. <p> Example of the expected XML: <code> <pre> &lt;properties&gt; &lt;property name=&quot;propertyName&quot; value=&quot;propertyValue&quot;/&gt; &lt;/p...
java
static void parsePropertyElement(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException { parsePropertyElement(operation, reader, PROPERTIES.getName()); }
[ "static", "void", "parsePropertyElement", "(", "final", "ModelNode", "operation", ",", "final", "XMLExtendedStreamReader", "reader", ")", "throws", "XMLStreamException", "{", "parsePropertyElement", "(", "operation", ",", "reader", ",", "PROPERTIES", ".", "getName", "...
Parses a property element. <p> Example of the expected XML: <code> <pre> &lt;properties&gt; &lt;property name=&quot;propertyName&quot; value=&quot;propertyValue&quot;/&gt; &lt;/properties&gt; </pre> </code> The {@code name} attribute is required. If the {@code value} attribute is not present an {@linkplain org.jboss.d...
[ "Parses", "a", "property", "element", ".", "<p", ">", "Example", "of", "the", "expected", "XML", ":", "<code", ">", "<pre", ">", "&lt", ";", "properties&gt", ";", "&lt", ";", "property", "name", "=", "&quot", ";", "propertyName&quot", ";", "value", "=", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/logging/src/main/java/org/jboss/as/logging/LoggingSubsystemParser.java#L122-L124
LearnLib/learnlib
algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/learner/ADTLearner.java
ADTLearner.closeTransition
private void closeTransition(final ADTTransition<I, O> transition) { """ Close the given transitions by means of sifting the associated long prefix through the ADT. @param transition the transition to close """ if (!transition.needsSifting()) { return; } final Word<I> ...
java
private void closeTransition(final ADTTransition<I, O> transition) { if (!transition.needsSifting()) { return; } final Word<I> accessSequence = transition.getSource().getAccessSequence(); final I symbol = transition.getInput(); this.oracle.reset(); for (fin...
[ "private", "void", "closeTransition", "(", "final", "ADTTransition", "<", "I", ",", "O", ">", "transition", ")", "{", "if", "(", "!", "transition", ".", "needsSifting", "(", ")", ")", "{", "return", ";", "}", "final", "Word", "<", "I", ">", "accessSequ...
Close the given transitions by means of sifting the associated long prefix through the ADT. @param transition the transition to close
[ "Close", "the", "given", "transitions", "by", "means", "of", "sifting", "the", "associated", "long", "prefix", "through", "the", "ADT", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/adt/src/main/java/de/learnlib/algorithms/adt/learner/ADTLearner.java#L309-L351
logic-ng/LogicNG
src/main/java/org/logicng/solvers/MaxSATSolver.java
MaxSATSolver.addClause
private void addClause(final Formula formula, int weight) { """ Adds a clause to the solver. @param formula the clause @param weight the weight of the clause (or -1 for a hard clause) """ this.result = UNDEF; final LNGIntVector clauseVec = new LNGIntVector((int) formula.numberOfAtoms()); for (Li...
java
private void addClause(final Formula formula, int weight) { this.result = UNDEF; final LNGIntVector clauseVec = new LNGIntVector((int) formula.numberOfAtoms()); for (Literal lit : formula.literals()) { Integer index = this.var2index.get(lit.variable()); if (index == null) { index = this....
[ "private", "void", "addClause", "(", "final", "Formula", "formula", ",", "int", "weight", ")", "{", "this", ".", "result", "=", "UNDEF", ";", "final", "LNGIntVector", "clauseVec", "=", "new", "LNGIntVector", "(", "(", "int", ")", "formula", ".", "numberOfA...
Adds a clause to the solver. @param formula the clause @param weight the weight of the clause (or -1 for a hard clause)
[ "Adds", "a", "clause", "to", "the", "solver", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/MaxSATSolver.java#L270-L290
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java
BindDataSourceSubProcessor.createSQLEntityFromDao
private boolean createSQLEntityFromDao(final SQLiteDatabaseSchema schema, TypeElement dataSource, String daoName) { """ <p> Create bean's definition for each dao definition contained in dataSource </p> . @param schema the schema @param dataSource the data source @param daoName the dao name @return true...
java
private boolean createSQLEntityFromDao(final SQLiteDatabaseSchema schema, TypeElement dataSource, String daoName) { TypeElement daoElement = globalDaoElements.get(daoName); if (daoElement == null) { String msg = String.format("Data source %s references a DAO %s without @%s annotation", dataSource.toString(...
[ "private", "boolean", "createSQLEntityFromDao", "(", "final", "SQLiteDatabaseSchema", "schema", ",", "TypeElement", "dataSource", ",", "String", "daoName", ")", "{", "TypeElement", "daoElement", "=", "globalDaoElements", ".", "get", "(", "daoName", ")", ";", "if", ...
<p> Create bean's definition for each dao definition contained in dataSource </p> . @param schema the schema @param dataSource the data source @param daoName the dao name @return true, if successful
[ "<p", ">", "Create", "bean", "s", "definition", "for", "each", "dao", "definition", "contained", "in", "dataSource", "<", "/", "p", ">", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/BindDataSourceSubProcessor.java#L725-L749
haifengl/smile
math/src/main/java/smile/math/Histogram.java
Histogram.breaks
public static double[] breaks(double min, double max, int k) { """ Returns the breakpoints between histogram cells for a given range. @param min the lower bound of bins. @param max the upper bound of bins. @param k the number of bins. @return the breakpoints between histogram cells """ if (k <= 1) ...
java
public static double[] breaks(double min, double max, int k) { if (k <= 1) { throw new IllegalArgumentException("Invalid number of bins: " + k); } if (min > max) { throw new IllegalArgumentException("Invalid lower and upper bounds: " + min + " > " + max); } ...
[ "public", "static", "double", "[", "]", "breaks", "(", "double", "min", ",", "double", "max", ",", "int", "k", ")", "{", "if", "(", "k", "<=", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid number of bins: \"", "+", "k", ")", ...
Returns the breakpoints between histogram cells for a given range. @param min the lower bound of bins. @param max the upper bound of bins. @param k the number of bins. @return the breakpoints between histogram cells
[ "Returns", "the", "breakpoints", "between", "histogram", "cells", "for", "a", "given", "range", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/Histogram.java#L360-L371
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/RESTConnector.java
RESTConnector.getClient
public RESTClient getClient(SSLTransportParameters sslParams) { """ Tries to connect to the "next" host. If no host is available, IllegalStateException will be raised. @param sslParams parameters needed to establish SSL connection @return Client for the connection established """ if (m_cellRing == nu...
java
public RESTClient getClient(SSLTransportParameters sslParams) { if (m_cellRing == null) { throw new IllegalStateException("Empty pool"); } Cell currentCell = m_cellRing; StringBuilder errorMessage = new StringBuilder(); do { try { RESTClient client = new RESTClient(sslParams, m_cellRing.m_ho...
[ "public", "RESTClient", "getClient", "(", "SSLTransportParameters", "sslParams", ")", "{", "if", "(", "m_cellRing", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Empty pool\"", ")", ";", "}", "Cell", "currentCell", "=", "m_cellRing", "...
Tries to connect to the "next" host. If no host is available, IllegalStateException will be raised. @param sslParams parameters needed to establish SSL connection @return Client for the connection established
[ "Tries", "to", "connect", "to", "the", "next", "host", ".", "If", "no", "host", "is", "available", "IllegalStateException", "will", "be", "raised", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/RESTConnector.java#L143-L166
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/SharesInner.java
SharesInner.beginCreateOrUpdate
public ShareInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, ShareInner share) { """ Creates a new share or updates an existing share on the device. @param deviceName The device name. @param name The share name. @param resourceGroupName The resource group name. @param share...
java
public ShareInner beginCreateOrUpdate(String deviceName, String name, String resourceGroupName, ShareInner share) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, share).toBlocking().single().body(); }
[ "public", "ShareInner", "beginCreateOrUpdate", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "ShareInner", "share", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "...
Creates a new share or updates an existing share on the device. @param deviceName The device name. @param name The share name. @param resourceGroupName The resource group name. @param share The share properties. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if ...
[ "Creates", "a", "new", "share", "or", "updates", "an", "existing", "share", "on", "the", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/SharesInner.java#L415-L417
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.addStandardHeaders
protected <T extends AbstractResource> void addStandardHeaders(URLConnection con, T resource) { """ Add all standard headers (User-Agent, Accept) to the URLConnection. """ con.setRequestProperty("User-Agent", userAgent); con.setRequestProperty("Accept", resource.getAcceptedTypes()); }
java
protected <T extends AbstractResource> void addStandardHeaders(URLConnection con, T resource) { con.setRequestProperty("User-Agent", userAgent); con.setRequestProperty("Accept", resource.getAcceptedTypes()); }
[ "protected", "<", "T", "extends", "AbstractResource", ">", "void", "addStandardHeaders", "(", "URLConnection", "con", ",", "T", "resource", ")", "{", "con", ".", "setRequestProperty", "(", "\"User-Agent\"", ",", "userAgent", ")", ";", "con", ".", "setRequestProp...
Add all standard headers (User-Agent, Accept) to the URLConnection.
[ "Add", "all", "standard", "headers", "(", "User", "-", "Agent", "Accept", ")", "to", "the", "URLConnection", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L412-L415
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java
ProcessExecutorImpl.startProcessInstance
void startProcessInstance(ProcessInstance processInstanceVO, int delay) throws ProcessException { """ Starting a process instance, which has been created already. The method sets the status to "In Progress", find the start activity, and sends an internal message to start the activity @param processInsta...
java
void startProcessInstance(ProcessInstance processInstanceVO, int delay) throws ProcessException { try { Process process = getProcessDefinition(processInstanceVO); edao.setProcessInstanceStatus(processInstanceVO.getId(), WorkStatus.STATUS_PENDING_PROCESS); // setProcess...
[ "void", "startProcessInstance", "(", "ProcessInstance", "processInstanceVO", ",", "int", "delay", ")", "throws", "ProcessException", "{", "try", "{", "Process", "process", "=", "getProcessDefinition", "(", "processInstanceVO", ")", ";", "edao", ".", "setProcessInstanc...
Starting a process instance, which has been created already. The method sets the status to "In Progress", find the start activity, and sends an internal message to start the activity @param processInstanceVO
[ "Starting", "a", "process", "instance", "which", "has", "been", "created", "already", ".", "The", "method", "sets", "the", "status", "to", "In", "Progress", "find", "the", "start", "activity", "and", "sends", "an", "internal", "message", "to", "start", "the"...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L561-L603
google/closure-compiler
src/com/google/javascript/rhino/Node.java
Node.writeEncodedInt
@GwtIncompatible("ObjectOutput") private void writeEncodedInt(ObjectOutput out, int value) throws IOException { """ Encode integers using variable length encoding. Encodes an integer as a sequence of 7-bit values with a continuation bit. For example the number 3912 (0111 0100 1000) is encoded in two bytes as...
java
@GwtIncompatible("ObjectOutput") private void writeEncodedInt(ObjectOutput out, int value) throws IOException { while (value > 0X7f || value < 0) { out.writeByte(((value & 0X7f) | 0x80)); value >>>= 7; } out.writeByte(value); }
[ "@", "GwtIncompatible", "(", "\"ObjectOutput\"", ")", "private", "void", "writeEncodedInt", "(", "ObjectOutput", "out", ",", "int", "value", ")", "throws", "IOException", "{", "while", "(", "value", ">", "0X7f", "||", "value", "<", "0", ")", "{", "out", "....
Encode integers using variable length encoding. Encodes an integer as a sequence of 7-bit values with a continuation bit. For example the number 3912 (0111 0100 1000) is encoded in two bytes as follows 0xC80E (1100 1000 0000 1110), i.e. first byte will be the lower 7 bits with a continuation bit set and second byte wi...
[ "Encode", "integers", "using", "variable", "length", "encoding", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/Node.java#L3504-L3511
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitInheritDoc
@Override public R visitInheritDoc(InheritDocTree node, P p) { """ {@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(node, p); }
java
@Override public R visitInheritDoc(InheritDocTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitInheritDoc", "(", "InheritDocTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L249-L252
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/thread/ThreadTask.java
ThreadTask.removeTaskByTaskId
public boolean removeTaskByTaskId(String taskId, boolean isInterrupt) { """ 通过任务id 停止某个任务 <p>Function: removeTaskByTaskId</p> <p>Description: </p> @param taskId @param isInterrupt 是否要强制中断该任务(如果任务正在进行) @author acexy@thankjava.com @date 2016年1月12日 上午11:40:04 @version 1.0 """ ScheduledFuture<?> f...
java
public boolean removeTaskByTaskId(String taskId, boolean isInterrupt) { ScheduledFuture<?> future = runningTask.get(taskId); boolean flag = future.cancel(isInterrupt); if (flag) { runningTask.remove(taskId); } return flag; }
[ "public", "boolean", "removeTaskByTaskId", "(", "String", "taskId", ",", "boolean", "isInterrupt", ")", "{", "ScheduledFuture", "<", "?", ">", "future", "=", "runningTask", ".", "get", "(", "taskId", ")", ";", "boolean", "flag", "=", "future", ".", "cancel",...
通过任务id 停止某个任务 <p>Function: removeTaskByTaskId</p> <p>Description: </p> @param taskId @param isInterrupt 是否要强制中断该任务(如果任务正在进行) @author acexy@thankjava.com @date 2016年1月12日 上午11:40:04 @version 1.0
[ "通过任务id", "停止某个任务", "<p", ">", "Function", ":", "removeTaskByTaskId<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/thread/ThreadTask.java#L156-L163
alkacon/opencms-core
src/org/opencms/flex/CmsFlexResponse.java
CmsFlexResponse.writeCachedResultToStream
private void writeCachedResultToStream(HttpServletResponse res) throws IOException { """ This delivers cached sub-elements back to the stream. Needed to overcome JSP buffering.<p> @param res the response to write the cached results to @throws IOException in case something goes wrong writing to the responses...
java
private void writeCachedResultToStream(HttpServletResponse res) throws IOException { List<Object> elements = m_cachedEntry.elements(); int count = 0; if (elements != null) { for (int i = 0; i < elements.size(); i++) { Object o = elements.get(i); if (o...
[ "private", "void", "writeCachedResultToStream", "(", "HttpServletResponse", "res", ")", "throws", "IOException", "{", "List", "<", "Object", ">", "elements", "=", "m_cachedEntry", ".", "elements", "(", ")", ";", "int", "count", "=", "0", ";", "if", "(", "ele...
This delivers cached sub-elements back to the stream. Needed to overcome JSP buffering.<p> @param res the response to write the cached results to @throws IOException in case something goes wrong writing to the responses output stream
[ "This", "delivers", "cached", "sub", "-", "elements", "back", "to", "the", "stream", ".", "Needed", "to", "overcome", "JSP", "buffering", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexResponse.java#L1213-L1234
liferay/com-liferay-commerce
commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java
CommerceTaxFixedRateAddressRelPersistenceImpl.findAll
@Override public List<CommerceTaxFixedRateAddressRel> findAll() { """ Returns all the commerce tax fixed rate address rels. @return the commerce tax fixed rate address rels """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceTaxFixedRateAddressRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceTaxFixedRateAddressRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce tax fixed rate address rels. @return the commerce tax fixed rate address rels
[ "Returns", "all", "the", "commerce", "tax", "fixed", "rate", "address", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java#L1721-L1724
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_activatePrivateDatabase_POST
public OvhTask serviceName_activatePrivateDatabase_POST(String serviceName, OvhAvailableRamSizeEnum ram, OvhOrderableVersionEnum version) throws IOException { """ Activate an included private database on your hosting offer REST: POST /hosting/web/{serviceName}/activatePrivateDatabase @param version [required] ...
java
public OvhTask serviceName_activatePrivateDatabase_POST(String serviceName, OvhAvailableRamSizeEnum ram, OvhOrderableVersionEnum version) throws IOException { String qPath = "/hosting/web/{serviceName}/activatePrivateDatabase"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<St...
[ "public", "OvhTask", "serviceName_activatePrivateDatabase_POST", "(", "String", "serviceName", ",", "OvhAvailableRamSizeEnum", "ram", ",", "OvhOrderableVersionEnum", "version", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/activatePriv...
Activate an included private database on your hosting offer REST: POST /hosting/web/{serviceName}/activatePrivateDatabase @param version [required] Private database available versions @param ram [required] The private database ram size included in your offer @param serviceName [required] The internal name of your host...
[ "Activate", "an", "included", "private", "database", "on", "your", "hosting", "offer" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L2063-L2071
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/datahandler/CassandraDataHandlerBase.java
CassandraDataHandlerBase.setId
private void setId(EntityMetadata m, Object entity, Object columnValue, boolean isCql3Enabled) { """ Sets the id. @param m the m @param entity the entity @param columnValue the column value @param isCql3Enabled the is cql3 enabled """ if (isCql3Enabled && !m.getType().equals(Type.SUPER_COLUMN...
java
private void setId(EntityMetadata m, Object entity, Object columnValue, boolean isCql3Enabled) { if (isCql3Enabled && !m.getType().equals(Type.SUPER_COLUMN_FAMILY)) { setFieldValueViaCQL(entity, columnValue, m.getIdAttribute()); } else { setFieldValue(...
[ "private", "void", "setId", "(", "EntityMetadata", "m", ",", "Object", "entity", ",", "Object", "columnValue", ",", "boolean", "isCql3Enabled", ")", "{", "if", "(", "isCql3Enabled", "&&", "!", "m", ".", "getType", "(", ")", ".", "equals", "(", "Type", "....
Sets the id. @param m the m @param entity the entity @param columnValue the column value @param isCql3Enabled the is cql3 enabled
[ "Sets", "the", "id", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/datahandler/CassandraDataHandlerBase.java#L888-L898
grails/grails-core
grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java
GroovyPagesUriSupport.getViewURI
public String getViewURI(String controllerName, String viewName) { """ Obtains a view URI of the given controller name and view name @param controllerName The name of the controller @param viewName The name of the view @return The view URI """ FastStringWriter buf = new FastStringWriter(); ...
java
public String getViewURI(String controllerName, String viewName) { FastStringWriter buf = new FastStringWriter(); return getViewURIInternal(controllerName, viewName, buf, true); }
[ "public", "String", "getViewURI", "(", "String", "controllerName", ",", "String", "viewName", ")", "{", "FastStringWriter", "buf", "=", "new", "FastStringWriter", "(", ")", ";", "return", "getViewURIInternal", "(", "controllerName", ",", "viewName", ",", "buf", ...
Obtains a view URI of the given controller name and view name @param controllerName The name of the controller @param viewName The name of the view @return The view URI
[ "Obtains", "a", "view", "URI", "of", "the", "given", "controller", "name", "and", "view", "name" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java#L186-L190
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java
HashtableOnDisk.put
public synchronized boolean put(Object key, byte[] value, int len, long expirationTime) throws IOException, EOFException, FileManagerException, ClassNotFoundException, HashtableOnDiskException { """ ****************...
java
public synchronized boolean put(Object key, byte[] value, int len, long expirationTime) throws IOException, EOFException, FileManagerException, ClassNotFoundException, HashtableOnDiskException { if (key == null) ...
[ "public", "synchronized", "boolean", "put", "(", "Object", "key", ",", "byte", "[", "]", "value", ",", "int", "len", ",", "long", "expirationTime", ")", "throws", "IOException", ",", "EOFException", ",", "FileManagerException", ",", "ClassNotFoundException", ","...
************************************************************************ Associates the object with the key and stores it. If an object already exists for this key it is replaced and the previous object discard. The object is assumed to have been "manually" serialized by the caller and will be written up to length "len...
[ "************************************************************************", "Associates", "the", "object", "with", "the", "key", "and", "stores", "it", ".", "If", "an", "object", "already", "exists", "for", "this", "key", "it", "is", "replaced", "and", "the", "previou...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java#L841-L854
apache/fluo
modules/accumulo/src/main/java/org/apache/fluo/accumulo/util/ZookeeperUtil.java
ZookeeperUtil.getGcTimestamp
public static long getGcTimestamp(String zookeepers) { """ Retrieves the GC timestamp, set by the Oracle, from zookeeper @param zookeepers Zookeeper connection string @return Oldest active timestamp or oldest possible ts (-1) if not found """ ZooKeeper zk = null; try { zk = new ZooKeeper(zook...
java
public static long getGcTimestamp(String zookeepers) { ZooKeeper zk = null; try { zk = new ZooKeeper(zookeepers, 30000, null); // wait until zookeeper is connected long start = System.currentTimeMillis(); while (!zk.getState().isConnected() && System.currentTimeMillis() - start < 30000)...
[ "public", "static", "long", "getGcTimestamp", "(", "String", "zookeepers", ")", "{", "ZooKeeper", "zk", "=", "null", ";", "try", "{", "zk", "=", "new", "ZooKeeper", "(", "zookeepers", ",", "30000", ",", "null", ")", ";", "// wait until zookeeper is connected",...
Retrieves the GC timestamp, set by the Oracle, from zookeeper @param zookeepers Zookeeper connection string @return Oldest active timestamp or oldest possible ts (-1) if not found
[ "Retrieves", "the", "GC", "timestamp", "set", "by", "the", "Oracle", "from", "zookeeper" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/accumulo/src/main/java/org/apache/fluo/accumulo/util/ZookeeperUtil.java#L69-L94
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java
GeneratedDOAuth2UserDaoImpl.findByEmail
public DOAuth2User findByEmail(java.lang.String email) { """ find-by method for unique field email @param email the unique attribute @return the unique DOAuth2User for the specified email """ return queryUniqueByField(null, DOAuth2UserMapper.Field.EMAIL.getFieldName(), email); }
java
public DOAuth2User findByEmail(java.lang.String email) { return queryUniqueByField(null, DOAuth2UserMapper.Field.EMAIL.getFieldName(), email); }
[ "public", "DOAuth2User", "findByEmail", "(", "java", ".", "lang", ".", "String", "email", ")", "{", "return", "queryUniqueByField", "(", "null", ",", "DOAuth2UserMapper", ".", "Field", ".", "EMAIL", ".", "getFieldName", "(", ")", ",", "email", ")", ";", "}...
find-by method for unique field email @param email the unique attribute @return the unique DOAuth2User for the specified email
[ "find", "-", "by", "method", "for", "unique", "field", "email" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java#L97-L99
ocelotds/ocelot
ocelot-dashboard/src/main/java/org/ocelotds/dashboard/services/ServiceTools.java
ServiceTools.getTemplateOfType
public String getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller) throws JsonMarshallerException { """ Get template for unknown type (class or parameterizedType) @param type @param jsonMarshaller @return @throws org.ocelotds.marshalling.exceptions.JsonMarshallerException """ if (jsonMarshalle...
java
public String getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller) throws JsonMarshallerException { if (jsonMarshaller == null) { jsonMarshaller = argumentServices.getIJsonMarshallerInstance(TemplateMarshaller.class); } return _getTemplateOfType(type, jsonMarshaller); }
[ "public", "String", "getTemplateOfType", "(", "Type", "type", ",", "IJsonMarshaller", "jsonMarshaller", ")", "throws", "JsonMarshallerException", "{", "if", "(", "jsonMarshaller", "==", "null", ")", "{", "jsonMarshaller", "=", "argumentServices", ".", "getIJsonMarshal...
Get template for unknown type (class or parameterizedType) @param type @param jsonMarshaller @return @throws org.ocelotds.marshalling.exceptions.JsonMarshallerException
[ "Get", "template", "for", "unknown", "type", "(", "class", "or", "parameterizedType", ")" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-dashboard/src/main/java/org/ocelotds/dashboard/services/ServiceTools.java#L112-L117
rey5137/material
material/src/main/java/com/rey/material/widget/FloatingActionButton.java
FloatingActionButton.setIcon
public void setIcon(Drawable icon, boolean animation) { """ Set the drawable that is used as this button's icon. @param icon The drawable. @param animation Indicate should show animation when switch drawable or not. """ if(icon == null) return; if(animation) { mSwitch...
java
public void setIcon(Drawable icon, boolean animation){ if(icon == null) return; if(animation) { mSwitchIconAnimator.startAnimation(icon); invalidate(); } else{ if(mIcon != null){ mIcon.setCallback(null); uns...
[ "public", "void", "setIcon", "(", "Drawable", "icon", ",", "boolean", "animation", ")", "{", "if", "(", "icon", "==", "null", ")", "return", ";", "if", "(", "animation", ")", "{", "mSwitchIconAnimator", ".", "startAnimation", "(", "icon", ")", ";", "inva...
Set the drawable that is used as this button's icon. @param icon The drawable. @param animation Indicate should show animation when switch drawable or not.
[ "Set", "the", "drawable", "that", "is", "used", "as", "this", "button", "s", "icon", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/FloatingActionButton.java#L277-L297
davidmoten/grumpy
grumpy-ogc/src/main/java/com/github/davidmoten/grumpy/wms/ImageCache.java
ImageCache.setEnabled
public void setEnabled(String layerName, boolean enabled) { """ Enables/disables a layer for caching. @param layerName name of the WMS layer @param enabled is true if want to cache """ synchronized (this) { if (enabled) layers.add(layerName); else ...
java
public void setEnabled(String layerName, boolean enabled) { synchronized (this) { if (enabled) layers.add(layerName); else layers.remove(layerName); } }
[ "public", "void", "setEnabled", "(", "String", "layerName", ",", "boolean", "enabled", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "enabled", ")", "layers", ".", "add", "(", "layerName", ")", ";", "else", "layers", ".", "remove", "(", "...
Enables/disables a layer for caching. @param layerName name of the WMS layer @param enabled is true if want to cache
[ "Enables", "/", "disables", "a", "layer", "for", "caching", "." ]
train
https://github.com/davidmoten/grumpy/blob/f2d03e6b9771f15425fb3f76314837efc08c1233/grumpy-ogc/src/main/java/com/github/davidmoten/grumpy/wms/ImageCache.java#L102-L109
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeParseContext.java
DateTimeParseContext.toResolved
TemporalAccessor toResolved(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) { """ Gets the resolved result of the parse. @return the result of the parse, not null """ Parsed parsed = currentParsed(); parsed.chrono = getEffectiveChronology(); parsed.zone = (parsed.zone...
java
TemporalAccessor toResolved(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) { Parsed parsed = currentParsed(); parsed.chrono = getEffectiveChronology(); parsed.zone = (parsed.zone != null ? parsed.zone : formatter.getZone()); return parsed.resolve(resolverStyle, resolverF...
[ "TemporalAccessor", "toResolved", "(", "ResolverStyle", "resolverStyle", ",", "Set", "<", "TemporalField", ">", "resolverFields", ")", "{", "Parsed", "parsed", "=", "currentParsed", "(", ")", ";", "parsed", ".", "chrono", "=", "getEffectiveChronology", "(", ")", ...
Gets the resolved result of the parse. @return the result of the parse, not null
[ "Gets", "the", "resolved", "result", "of", "the", "parse", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeParseContext.java#L327-L332
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/domain/LocalProteinDomainParser.java
LocalProteinDomainParser.suggestDomains
public static List<Domain> suggestDomains(Atom[] ca) throws StructureException { """ Suggest domains for a set of Calpha atoms @param ca an array of Calpha atoms @return a list of possible domains @throws StructureException """ GetDistanceMatrix distMaxCalculator = new GetDistanceMatrix(); PDPDistan...
java
public static List<Domain> suggestDomains(Atom[] ca) throws StructureException{ GetDistanceMatrix distMaxCalculator = new GetDistanceMatrix(); PDPDistanceMatrix pdpMatrix = distMaxCalculator.getDistanceMatrix(ca); Domain dom = new Domain(); Chain c = ca[0].getGroup().getChain(); dom.setId("D"+c.getStruct...
[ "public", "static", "List", "<", "Domain", ">", "suggestDomains", "(", "Atom", "[", "]", "ca", ")", "throws", "StructureException", "{", "GetDistanceMatrix", "distMaxCalculator", "=", "new", "GetDistanceMatrix", "(", ")", ";", "PDPDistanceMatrix", "pdpMatrix", "="...
Suggest domains for a set of Calpha atoms @param ca an array of Calpha atoms @return a list of possible domains @throws StructureException
[ "Suggest", "domains", "for", "a", "set", "of", "Calpha", "atoms" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/domain/LocalProteinDomainParser.java#L79-L111
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.updateEntry
public void updateEntry(final Entry entry, String fsid) throws Exception { """ Update an entry in the collection. @param entry Updated entry to be stored @param fsid Internal ID of entry @throws java.lang.Exception On error """ synchronized (FileStore.getFileStore()) { final Feed f = ...
java
public void updateEntry(final Entry entry, String fsid) throws Exception { synchronized (FileStore.getFileStore()) { final Feed f = getFeedDocument(); if (fsid.endsWith(".media-link")) { fsid = fsid.substring(0, fsid.length() - ".media-link".length()); } ...
[ "public", "void", "updateEntry", "(", "final", "Entry", "entry", ",", "String", "fsid", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "final", "Feed", "f", "=", "getFeedDocument", "(", ")", ";",...
Update an entry in the collection. @param entry Updated entry to be stored @param fsid Internal ID of entry @throws java.lang.Exception On error
[ "Update", "an", "entry", "in", "the", "collection", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L311-L332
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java
WebScopeManager.internalGetOrCreateSessionScope
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetOrCreateSessionScope (@Nonnull final HttpSession aHttpSession, final boolean bCreateIfNotExisting, ...
java
@Nullable @DevelopersNote ("This is only for project-internal use!") public static ISessionWebScope internalGetOrCreateSessionScope (@Nonnull final HttpSession aHttpSession, final boolean bCreateIfNotExisting, ...
[ "@", "Nullable", "@", "DevelopersNote", "(", "\"This is only for project-internal use!\"", ")", "public", "static", "ISessionWebScope", "internalGetOrCreateSessionScope", "(", "@", "Nonnull", "final", "HttpSession", "aHttpSession", ",", "final", "boolean", "bCreateIfNotExisti...
Internal method which does the main logic for session web scope creation @param aHttpSession The underlying HTTP session @param bCreateIfNotExisting if <code>true</code> if a new session web scope is created, if none is present @param bItsOkayToCreateANewScope if <code>true</code> no warning is emitted, if a new sessi...
[ "Internal", "method", "which", "does", "the", "main", "logic", "for", "session", "web", "scope", "creation" ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/mgr/WebScopeManager.java#L253-L289
SteelBridgeLabs/neo4j-gremlin-bolt
src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JGraph.java
Neo4JGraph.createIndex
public void createIndex(String label, String propertyName) { """ Creates an index in the neo4j database. @param label The label associated with the Index. @param propertyName The property name associated with the Index. """ Objects.requireNonNull(label, "label cannot be null"); Objec...
java
public void createIndex(String label, String propertyName) { Objects.requireNonNull(label, "label cannot be null"); Objects.requireNonNull(propertyName, "propertyName cannot be null"); // get current session Neo4JSession session = currentSession(); // transaction should be ready ...
[ "public", "void", "createIndex", "(", "String", "label", ",", "String", "propertyName", ")", "{", "Objects", ".", "requireNonNull", "(", "label", ",", "\"label cannot be null\"", ")", ";", "Objects", ".", "requireNonNull", "(", "propertyName", ",", "\"propertyName...
Creates an index in the neo4j database. @param label The label associated with the Index. @param propertyName The property name associated with the Index.
[ "Creates", "an", "index", "in", "the", "neo4j", "database", "." ]
train
https://github.com/SteelBridgeLabs/neo4j-gremlin-bolt/blob/df3ab429e0c83affae6cd43d41edd90de80c032e/src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JGraph.java#L358-L367
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java
ClosureGlobalPostProcessor.initCompilerClosureArgumentsFromConfig
private void initCompilerClosureArgumentsFromConfig(List<String> args, JawrConfig config) { """ Initialize the closure argument from the Jawr config @param args the arguments @param config the Jawr config """ Set<Entry<Object, Object>> entrySet = config.getConfigProperties().entrySet(); for (Entry<Ob...
java
private void initCompilerClosureArgumentsFromConfig(List<String> args, JawrConfig config) { Set<Entry<Object, Object>> entrySet = config.getConfigProperties().entrySet(); for (Entry<Object, Object> propEntry : entrySet) { String key = (String) propEntry.getKey(); if (key.startsWith(JAWR_JS_CLOSURE_PREFIX) && ...
[ "private", "void", "initCompilerClosureArgumentsFromConfig", "(", "List", "<", "String", ">", "args", ",", "JawrConfig", "config", ")", "{", "Set", "<", "Entry", "<", "Object", ",", "Object", ">", ">", "entrySet", "=", "config", ".", "getConfigProperties", "("...
Initialize the closure argument from the Jawr config @param args the arguments @param config the Jawr config
[ "Initialize", "the", "closure", "argument", "from", "the", "Jawr", "config" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java#L325-L351
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java
ConnectionService.retrieveHistory
public List<ConnectionRecord> retrieveHistory(ModeledAuthenticatedUser user, ModeledConnection connection) throws GuacamoleException { """ Retrieves the connection history of the given connection, including any active connections. @param user The user retrieving the connection history. @param c...
java
public List<ConnectionRecord> retrieveHistory(ModeledAuthenticatedUser user, ModeledConnection connection) throws GuacamoleException { String identifier = connection.getIdentifier(); // Retrieve history only if READ permission is granted if (hasObjectPermission(user, identifier, Ob...
[ "public", "List", "<", "ConnectionRecord", ">", "retrieveHistory", "(", "ModeledAuthenticatedUser", "user", ",", "ModeledConnection", "connection", ")", "throws", "GuacamoleException", "{", "String", "identifier", "=", "connection", ".", "getIdentifier", "(", ")", ";"...
Retrieves the connection history of the given connection, including any active connections. @param user The user retrieving the connection history. @param connection The connection whose history is being retrieved. @return The connection history of the given connection, including any active connections. @throws Gua...
[ "Retrieves", "the", "connection", "history", "of", "the", "given", "connection", "including", "any", "active", "connections", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/connection/ConnectionService.java#L410-L437
samskivert/samskivert
src/main/java/com/samskivert/util/IntListUtil.java
IntListUtil.removeAt
public static int removeAt (int[] list, int index) { """ Removes the value at the specified index. The values after the removed value will be slid down the array one spot to fill the place of the removed value. If a null array is supplied or one that is not large enough to accomodate this index, zero is returne...
java
public static int removeAt (int[] list, int index) { int llength = list.length; if (llength <= index) { return 0; } int val = list[index]; System.arraycopy(list, index+1, list, index, llength-(index+1)); list[llength-1] = 0; return val; }
[ "public", "static", "int", "removeAt", "(", "int", "[", "]", "list", ",", "int", "index", ")", "{", "int", "llength", "=", "list", ".", "length", ";", "if", "(", "llength", "<=", "index", ")", "{", "return", "0", ";", "}", "int", "val", "=", "lis...
Removes the value at the specified index. The values after the removed value will be slid down the array one spot to fill the place of the removed value. If a null array is supplied or one that is not large enough to accomodate this index, zero is returned. @return the value that was removed from the array or zero if ...
[ "Removes", "the", "value", "at", "the", "specified", "index", ".", "The", "values", "after", "the", "removed", "value", "will", "be", "slid", "down", "the", "array", "one", "spot", "to", "fill", "the", "place", "of", "the", "removed", "value", ".", "If",...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/IntListUtil.java#L246-L257
apereo/cas
support/cas-server-support-openid/src/main/java/org/apereo/cas/support/openid/authentication/principal/OpenIdServiceResponseBuilder.java
OpenIdServiceResponseBuilder.getAssociation
protected Association getAssociation(final ServerManager serverManager, final ParameterList parameterList) { """ Gets association. @param serverManager the server manager @param parameterList the parameter list @return the association """ try { val authReq = AuthRequest.createAuthReque...
java
protected Association getAssociation(final ServerManager serverManager, final ParameterList parameterList) { try { val authReq = AuthRequest.createAuthRequest(parameterList, serverManager.getRealmVerifier()); val parameterMap = authReq.getParameterMap(); if (parameterMap != n...
[ "protected", "Association", "getAssociation", "(", "final", "ServerManager", "serverManager", ",", "final", "ParameterList", "parameterList", ")", "{", "try", "{", "val", "authReq", "=", "AuthRequest", ".", "createAuthRequest", "(", "parameterList", ",", "serverManage...
Gets association. @param serverManager the server manager @param parameterList the parameter list @return the association
[ "Gets", "association", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-openid/src/main/java/org/apereo/cas/support/openid/authentication/principal/OpenIdServiceResponseBuilder.java#L148-L162
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ImplRectifyImageOps_F32.java
ImplRectifyImageOps_F32.adjustCalibrated
private static void adjustCalibrated(FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight, FMatrixRMaj rectifyK, RectangleLength2D_F32 bound, float scale) { """ Internal function which applies the rectification adjustment to a calibrated stereo pair """ // translation float deltaX = -bou...
java
private static void adjustCalibrated(FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight, FMatrixRMaj rectifyK, RectangleLength2D_F32 bound, float scale) { // translation float deltaX = -bound.x0*scale; float deltaY = -bound.y0*scale; // adjustment matrix SimpleMatrix A = new SimpleMatrix...
[ "private", "static", "void", "adjustCalibrated", "(", "FMatrixRMaj", "rectifyLeft", ",", "FMatrixRMaj", "rectifyRight", ",", "FMatrixRMaj", "rectifyK", ",", "RectangleLength2D_F32", "bound", ",", "float", "scale", ")", "{", "// translation", "float", "deltaX", "=", ...
Internal function which applies the rectification adjustment to a calibrated stereo pair
[ "Internal", "function", "which", "applies", "the", "rectification", "adjustment", "to", "a", "calibrated", "stereo", "pair" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ImplRectifyImageOps_F32.java#L127-L151
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.checkChildLocks
private void checkChildLocks(HttpServletRequest req, String path, Hashtable<String, Integer> errorList) { """ Checks if the items in the path or in a subpath are locked.<p> @param req the servlet request we are processing @param path the path to check the items for locks @param errorList the error list where ...
java
private void checkChildLocks(HttpServletRequest req, String path, Hashtable<String, Integer> errorList) { List<I_CmsRepositoryItem> list = null; try { list = m_session.list(path); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.g...
[ "private", "void", "checkChildLocks", "(", "HttpServletRequest", "req", ",", "String", "path", ",", "Hashtable", "<", "String", ",", "Integer", ">", "errorList", ")", "{", "List", "<", "I_CmsRepositoryItem", ">", "list", "=", "null", ";", "try", "{", "list",...
Checks if the items in the path or in a subpath are locked.<p> @param req the servlet request we are processing @param path the path to check the items for locks @param errorList the error list where to put the found errors
[ "Checks", "if", "the", "items", "in", "the", "path", "or", "in", "a", "subpath", "are", "locked", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L2939-L2964
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/DisableOnFieldHandler.java
DisableOnFieldHandler.fieldChanged
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { """ The Field has Changed. If the target string matches this field, disable the target field. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RE...
java
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { boolean bFlag = this.compareFieldToString(); if (m_bDisableIfMatch) bFlag = !bFlag; m_fldToDisable.setEnabled(bFlag); return DBConstants.NORMAL_RETURN; }
[ "public", "int", "fieldChanged", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "boolean", "bFlag", "=", "this", ".", "compareFieldToString", "(", ")", ";", "if", "(", "m_bDisableIfMatch", ")", "bFlag", "=", "!", "bFlag", ";", "m_fldToD...
The Field has Changed. If the target string matches this field, disable the target field. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay). Disable field if criteria met.
[ "The", "Field", "has", "Changed", ".", "If", "the", "target", "string", "matches", "this", "field", "disable", "the", "target", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/DisableOnFieldHandler.java#L109-L116
aws/aws-sdk-java
aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/ReEncryptRequest.java
ReEncryptRequest.getGrantTokens
public java.util.List<String> getGrantTokens() { """ <p> A list of grant tokens. </p> <p> For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in the <i>AWS Key Management Service Developer Guide</i>. </p> @return A list of gr...
java
public java.util.List<String> getGrantTokens() { if (grantTokens == null) { grantTokens = new com.amazonaws.internal.SdkInternalList<String>(); } return grantTokens; }
[ "public", "java", ".", "util", ".", "List", "<", "String", ">", "getGrantTokens", "(", ")", "{", "if", "(", "grantTokens", "==", "null", ")", "{", "grantTokens", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<", "String",...
<p> A list of grant tokens. </p> <p> For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token">Grant Tokens</a> in the <i>AWS Key Management Service Developer Guide</i>. </p> @return A list of grant tokens.</p> <p> For more information, see <a href="http://docs....
[ "<p", ">", "A", "list", "of", "grant", "tokens", ".", "<", "/", "p", ">", "<p", ">", "For", "more", "information", "see", "<a", "href", "=", "http", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "kms", "/", "latest", "/", "deve...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/ReEncryptRequest.java#L552-L557
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsReport.java
CmsReport.initCmsReport
public static CmsReport initCmsReport(PageContext context, HttpServletRequest req, HttpServletResponse res) { """ Returns an initialized CmsReport instance that is read from the request attributes.<p> This method is used by dialog elements. The dialog elements do not initialize their own workplace class, but ...
java
public static CmsReport initCmsReport(PageContext context, HttpServletRequest req, HttpServletResponse res) { CmsReport wp = (CmsReport)req.getAttribute(CmsWorkplace.SESSION_WORKPLACE_CLASS); if (wp == null) { // ensure that we don't get null pointers if the page is directly called ...
[ "public", "static", "CmsReport", "initCmsReport", "(", "PageContext", "context", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "CmsReport", "wp", "=", "(", "CmsReport", ")", "req", ".", "getAttribute", "(", "CmsWorkplace", ".", "...
Returns an initialized CmsReport instance that is read from the request attributes.<p> This method is used by dialog elements. The dialog elements do not initialize their own workplace class, but use the initialized instance of the "master" class. This is required to ensure that parameters of the "master" class can pr...
[ "Returns", "an", "initialized", "CmsReport", "instance", "that", "is", "read", "from", "the", "request", "attributes", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsReport.java#L242-L250
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteUtil.java
AutocompleteUtil.getCombinedForAddSection
public static String getCombinedForAddSection(final String sectionName, final Autocompleteable component) { """ Helper to reduce typing in implementations of {@link Autocompleteable}. @param sectionName the name of the auto-fill section to add to the component's {@code autocomplete} attribute @param component th...
java
public static String getCombinedForAddSection(final String sectionName, final Autocompleteable component) { if (Util.empty(sectionName)) { throw new IllegalArgumentException("Auto-fill section names must not be empty."); } if (component == null) { return getNamedSection(sectionName); } if (component.isA...
[ "public", "static", "String", "getCombinedForAddSection", "(", "final", "String", "sectionName", ",", "final", "Autocompleteable", "component", ")", "{", "if", "(", "Util", ".", "empty", "(", "sectionName", ")", ")", "{", "throw", "new", "IllegalArgumentException"...
Helper to reduce typing in implementations of {@link Autocompleteable}. @param sectionName the name of the auto-fill section to add to the component's {@code autocomplete} attribute @param component the component being modified @return a value for the {@code autocomplete} attribute which is pre-pended by the formatted ...
[ "Helper", "to", "reduce", "typing", "in", "implementations", "of", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/autocomplete/AutocompleteUtil.java#L171-L184
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/Environment.java
Environment.doHttpFilePost
public void doHttpFilePost(String url, HttpResponse result, Map<String, Object> headers, File file) { """ Performs POST to supplied url of a file as binary data. @param url url to post to. @param result result containing request, its response will be filled. @param headers headers to add. @param file file cont...
java
public void doHttpFilePost(String url, HttpResponse result, Map<String, Object> headers, File file) { httpClient.post(url, result, headers, file); }
[ "public", "void", "doHttpFilePost", "(", "String", "url", ",", "HttpResponse", "result", ",", "Map", "<", "String", ",", "Object", ">", "headers", ",", "File", "file", ")", "{", "httpClient", ".", "post", "(", "url", ",", "result", ",", "headers", ",", ...
Performs POST to supplied url of a file as binary data. @param url url to post to. @param result result containing request, its response will be filled. @param headers headers to add. @param file file containing binary data to post.
[ "Performs", "POST", "to", "supplied", "url", "of", "a", "file", "as", "binary", "data", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/Environment.java#L296-L298
lessthanoptimal/BoofCV
main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel1D_F32.java
Kernel1D_F32.wrap
public static Kernel1D_F32 wrap(float data[], int width, int offset ) { """ Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Location of the origi...
java
public static Kernel1D_F32 wrap(float data[], int width, int offset ) { Kernel1D_F32 ret = new Kernel1D_F32(); ret.data = data; ret.width = width; ret.offset = offset; return ret; }
[ "public", "static", "Kernel1D_F32", "wrap", "(", "float", "data", "[", "]", ",", "int", "width", ",", "int", "offset", ")", "{", "Kernel1D_F32", "ret", "=", "new", "Kernel1D_F32", "(", ")", ";", "ret", ".", "data", "=", "data", ";", "ret", ".", "widt...
Creates a kernel whose elements are the specified data array and has the specified width. @param data The array who will be the kernel's data. Reference is saved. @param width The kernel's width. @param offset Location of the origin in the array @return A new kernel.
[ "Creates", "a", "kernel", "whose", "elements", "are", "the", "specified", "data", "array", "and", "has", "the", "specified", "width", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/convolve/Kernel1D_F32.java#L102-L109
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlFieldBuilderImpl.java
SarlFieldBuilderImpl.eInit
public void eInit(XtendTypeDeclaration container, String name, String modifier, IJvmTypeProvider context) { """ Initialize the Ecore element. @param container the container of the SarlField. @param name the name of the SarlField. """ setTypeResolutionContext(context); if (this.sarlField == null) { thi...
java
public void eInit(XtendTypeDeclaration container, String name, String modifier, IJvmTypeProvider context) { setTypeResolutionContext(context); if (this.sarlField == null) { this.container = container; this.sarlField = SarlFactory.eINSTANCE.createSarlField(); this.sarlField.setAnnotationInfo(XtendFactory.eI...
[ "public", "void", "eInit", "(", "XtendTypeDeclaration", "container", ",", "String", "name", ",", "String", "modifier", ",", "IJvmTypeProvider", "context", ")", "{", "setTypeResolutionContext", "(", "context", ")", ";", "if", "(", "this", ".", "sarlField", "==", ...
Initialize the Ecore element. @param container the container of the SarlField. @param name the name of the SarlField.
[ "Initialize", "the", "Ecore", "element", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlFieldBuilderImpl.java#L64-L79
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.getRule
public RuleDescription getRule(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException { """ Retrieves a rule for a given topic and subscription from the service namespace @param topicPath - The path of the topic relative to service bus namespace. @param subsc...
java
public RuleDescription getRule(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.getRuleAsync(topicPath, subscriptionName, ruleName)); }
[ "public", "RuleDescription", "getRule", "(", "String", "topicPath", ",", "String", "subscriptionName", ",", "String", "ruleName", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asy...
Retrieves a rule for a given topic and subscription from the service namespace @param topicPath - The path of the topic relative to service bus namespace. @param subscriptionName - The name of the subscription. @param ruleName - The name of the rule. @return - RuleDescription containing information about the subscripti...
[ "Retrieves", "a", "rule", "for", "a", "given", "topic", "and", "subscription", "from", "the", "service", "namespace" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L150-L152
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java
AbstractCachedGenerator.getResourceCacheKey
protected String getResourceCacheKey(String path, GeneratorContext context) { """ Returns the cache key for linked resources map @param path the resource path @param context the generator context @return the cache key for linked resource map """ StringBuilder strbCacheKey = new StringBuilder(path); ...
java
protected String getResourceCacheKey(String path, GeneratorContext context) { StringBuilder strbCacheKey = new StringBuilder(path); if (StringUtils.isNotEmpty(context.getBracketsParam())) { strbCacheKey.append("_").append(context.getBracketsParam()); } if (StringUtils.isNotEmpty(context.getParenthesesParam(...
[ "protected", "String", "getResourceCacheKey", "(", "String", "path", ",", "GeneratorContext", "context", ")", "{", "StringBuilder", "strbCacheKey", "=", "new", "StringBuilder", "(", "path", ")", ";", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "context", "...
Returns the cache key for linked resources map @param path the resource path @param context the generator context @return the cache key for linked resource map
[ "Returns", "the", "cache", "key", "for", "linked", "resources", "map" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java#L328-L349
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java
Invariants.checkInvariantI
public static int checkInvariantI( final int value, final boolean condition, final IntFunction<String> describer) { """ An {@code int} specialized version of {@link #checkInvariant(Object, boolean, Function)}. @param value The value @param condition The predicate @param describer The describe...
java
public static int checkInvariantI( final int value, final boolean condition, final IntFunction<String> describer) { return innerCheckInvariantI(value, condition, describer); }
[ "public", "static", "int", "checkInvariantI", "(", "final", "int", "value", ",", "final", "boolean", "condition", ",", "final", "IntFunction", "<", "String", ">", "describer", ")", "{", "return", "innerCheckInvariantI", "(", "value", ",", "condition", ",", "de...
An {@code int} specialized version of {@link #checkInvariant(Object, boolean, Function)}. @param value The value @param condition The predicate @param describer The describer for the predicate @return value @throws InvariantViolationException If the predicate is false
[ "An", "{", "@code", "int", "}", "specialized", "version", "of", "{", "@link", "#checkInvariant", "(", "Object", "boolean", "Function", ")", "}", "." ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java#L409-L415
leancloud/java-sdk-all
android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/game/GameLoginSignUtil.java
GameLoginSignUtil.checkLoginSign
public static void checkLoginSign(final String appId, final String cpId, final String privateKey, final String publicKey, final GameUserData userData, final ICheckLoginSignHandler callback) { """ 启动线程进行登录结果的验签, 重要:此方法仅供单机应用使用。有自己服务器的应用,整个对登录结果的验签需要在开发者的服务器端进行,私钥要注意保存避免泄露 此类的实现可以作为参考 @param appId 应用程序id,来源于华为开发者...
java
public static void checkLoginSign(final String appId, final String cpId, final String privateKey, final String publicKey, final GameUserData userData, final ICheckLoginSignHandler callback) { ThreadUtil.INST.excute(new Runnable() { @Override public void run() { doChec...
[ "public", "static", "void", "checkLoginSign", "(", "final", "String", "appId", ",", "final", "String", "cpId", ",", "final", "String", "privateKey", ",", "final", "String", "publicKey", ",", "final", "GameUserData", "userData", ",", "final", "ICheckLoginSignHandle...
启动线程进行登录结果的验签, 重要:此方法仅供单机应用使用。有自己服务器的应用,整个对登录结果的验签需要在开发者的服务器端进行,私钥要注意保存避免泄露 此类的实现可以作为参考 @param appId 应用程序id,来源于华为开发者联盟上参数 @param cpId 开发者id,来源于开发者联盟 @param privateKey 私钥,来源于开发者联盟,非常重要的信息,注意保存避免泄露 @param publicKey 公钥,用来验签服务端返回的结果 @param userData 用户的登录结果数据 @param callback 验签结果回调
[ "启动线程进行登录结果的验签,", "重要:此方法仅供单机应用使用。有自己服务器的应用,整个对登录结果的验签需要在开发者的服务器端进行,私钥要注意保存避免泄露", "此类的实现可以作为参考" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/game/GameLoginSignUtil.java#L60-L67
m-m-m/util
cli/src/main/java/net/sf/mmm/util/cli/base/AbstractCliParser.java
AbstractCliParser.handleUndefinedMode
protected void handleUndefinedMode(CliOptionContainer option) { """ This method handles a {@link CliOption} with an {@link CliState#getMode(String) undefined} {@link CliOption#mode()} . @param option is the {@link CliOptionContainer}. """ CliStyle style = this.cliState.getCliStyle(); CliStyleHandl...
java
protected void handleUndefinedMode(CliOptionContainer option) { CliStyle style = this.cliState.getCliStyle(); CliStyleHandling handling = style.modeUndefined(); if (handling != CliStyleHandling.OK) { ObjectNotFoundException exception = new ObjectNotFoundException(CliMode.class, option.getOption().mod...
[ "protected", "void", "handleUndefinedMode", "(", "CliOptionContainer", "option", ")", "{", "CliStyle", "style", "=", "this", ".", "cliState", ".", "getCliStyle", "(", ")", ";", "CliStyleHandling", "handling", "=", "style", ".", "modeUndefined", "(", ")", ";", ...
This method handles a {@link CliOption} with an {@link CliState#getMode(String) undefined} {@link CliOption#mode()} . @param option is the {@link CliOptionContainer}.
[ "This", "method", "handles", "a", "{", "@link", "CliOption", "}", "with", "an", "{", "@link", "CliState#getMode", "(", "String", ")", "undefined", "}", "{", "@link", "CliOption#mode", "()", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/cli/src/main/java/net/sf/mmm/util/cli/base/AbstractCliParser.java#L129-L137
stripe/stripe-android
stripe/src/main/java/com/stripe/android/Stripe.java
Stripe.createTokenSynchronous
public Token createTokenSynchronous(final Card card, String publishableKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { """ Blocking method to create a {@link Token}. Do not call this on t...
java
public Token createTokenSynchronous(final Card card, String publishableKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { validateKey(publishableKey); RequestOptions requestOptio...
[ "public", "Token", "createTokenSynchronous", "(", "final", "Card", "card", ",", "String", "publishableKey", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", ",", "APIConnectionException", ",", "CardException", ",", "APIException", "{", "validateKe...
Blocking method to create a {@link Token}. Do not call this on the UI thread or your app will crash. @param card the {@link Card} to use for this token @param publishableKey the publishable key to use with this request @return a {@link Token} that can be used for this card @throws AuthenticationException failure to p...
[ "Blocking", "method", "to", "create", "a", "{", "@link", "Token", "}", ".", "Do", "not", "call", "this", "on", "the", "UI", "thread", "or", "your", "app", "will", "crash", "." ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/Stripe.java#L545-L562
Chorus-bdd/Chorus
interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/TagExpressionEvaluator.java
TagExpressionEvaluator.checkSimpleExpression
private boolean checkSimpleExpression(String tagExpression, List<String> scenarioTags) { """ Checks a simple expression (i.e. one that does not contain the or '|' operator) @param tagExpression a simple tag expression @param scenarioTags tags present on a scenario @return true iff the scenarion should be exe...
java
private boolean checkSimpleExpression(String tagExpression, List<String> scenarioTags) { Set<String> expressionTags = extractTagsFromSimpleExpression(tagExpression); for (String expressionTag : expressionTags) { if (expressionTag.startsWith("@")) { if (!scenarioTags.contains...
[ "private", "boolean", "checkSimpleExpression", "(", "String", "tagExpression", ",", "List", "<", "String", ">", "scenarioTags", ")", "{", "Set", "<", "String", ">", "expressionTags", "=", "extractTagsFromSimpleExpression", "(", "tagExpression", ")", ";", "for", "(...
Checks a simple expression (i.e. one that does not contain the or '|' operator) @param tagExpression a simple tag expression @param scenarioTags tags present on a scenario @return true iff the scenarion should be executed
[ "Checks", "a", "simple", "expression", "(", "i", ".", "e", ".", "one", "that", "does", "not", "contain", "the", "or", "|", "operator", ")" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/TagExpressionEvaluator.java#L72-L94
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/webcontext/ControlBeanContextSupport.java
ControlBeanContextSupport.getResource
public URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException { """ Analagous to <code>java.lang.ClassLoader.getResource()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoa...
java
public URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException { // bcc must be a child of this context if (!contains(bcc)) { throw new IllegalArgumentException("Child is not a member of this context"); } ClassLoader cl = bcc.getClass().getClassLo...
[ "public", "URL", "getResource", "(", "String", "name", ",", "BeanContextChild", "bcc", ")", "throws", "IllegalArgumentException", "{", "// bcc must be a child of this context", "if", "(", "!", "contains", "(", "bcc", ")", ")", "{", "throw", "new", "IllegalArgumentEx...
Analagous to <code>java.lang.ClassLoader.getResource()</code>, this method allows a <code>BeanContext</code> implementation to interpose behavior between the child <code>Component</code> and underlying <code>ClassLoader</code>. @param name the resource name @param bcc the specified child @return a <code>URL</code> fo...
[ "Analagous", "to", "<code", ">", "java", ".", "lang", ".", "ClassLoader", ".", "getResource", "()", "<", "/", "code", ">", "this", "method", "allows", "a", "<code", ">", "BeanContext<", "/", "code", ">", "implementation", "to", "interpose", "behavior", "be...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/webcontext/ControlBeanContextSupport.java#L145-L158
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java
AbstractAggregatorImpl.notifyRequestListeners
protected void notifyRequestListeners(RequestNotifierAction action, HttpServletRequest req, HttpServletResponse resp) throws IOException { """ Calls the registered request notifier listeners. @param action The request action (start or end) @param req The request object. @param resp The response object. @thro...
java
protected void notifyRequestListeners(RequestNotifierAction action, HttpServletRequest req, HttpServletResponse resp) throws IOException { // notify any listeners that the config has been updated IServiceReference[] refs = null; try { refs = getPlatformServices().getServiceReferences(IRequestListener.class...
[ "protected", "void", "notifyRequestListeners", "(", "RequestNotifierAction", "action", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "IOException", "{", "// notify any listeners that the config has been updated\r", "IServiceReference", "[", ...
Calls the registered request notifier listeners. @param action The request action (start or end) @param req The request object. @param resp The response object. @throws IOException
[ "Calls", "the", "registered", "request", "notifier", "listeners", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1175-L1199
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.perspectiveLH
public Matrix4d perspectiveLH(double fovy, double aspect, double zNear, double zFar, Matrix4d dest) { """ Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>...
java
public Matrix4d perspectiveLH(double fovy, double aspect, double zNear, double zFar, Matrix4d dest) { return perspectiveLH(fovy, aspect, zNear, zFar, false, dest); }
[ "public", "Matrix4d", "perspectiveLH", "(", "double", "fovy", ",", "double", "aspect", ",", "double", "zNear", ",", "double", "zFar", ",", "Matrix4d", "dest", ")", "{", "return", "perspectiveLH", "(", "fovy", ",", "aspect", ",", "zNear", ",", "zFar", ",", ...
Apply a symmetric perspective projection frustum transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>P</code> the perspective projection matrix, then t...
[ "Apply", "a", "symmetric", "perspective", "projection", "frustum", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L12949-L12951
Terracotta-OSS/statistics
src/main/java/org/terracotta/context/query/Matchers.java
Matchers.hasAttribute
public static Matcher<Map<String, Object>> hasAttribute(final String key, final Object value) { """ Returns a matcher that matches attribute maps that include the given attribute entry. @param key attribute name @param value attribute value @return a {@code Map<String, Object>} matcher """ return n...
java
public static Matcher<Map<String, Object>> hasAttribute(final String key, final Object value) { return new Matcher<Map<String, Object>>() { @Override protected boolean matchesSafely(Map<String, Object> object) { return object.containsKey(key) && value.equals(object.get(key)); } }; }
[ "public", "static", "Matcher", "<", "Map", "<", "String", ",", "Object", ">", ">", "hasAttribute", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "return", "new", "Matcher", "<", "Map", "<", "String", ",", "Object", ">", ">",...
Returns a matcher that matches attribute maps that include the given attribute entry. @param key attribute name @param value attribute value @return a {@code Map<String, Object>} matcher
[ "Returns", "a", "matcher", "that", "matches", "attribute", "maps", "that", "include", "the", "given", "attribute", "entry", "." ]
train
https://github.com/Terracotta-OSS/statistics/blob/d24e4989b8c8dbe4f5210e49c7945d51b6585881/src/main/java/org/terracotta/context/query/Matchers.java#L130-L138
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Assert.java
Assert.hasText
public static void hasText(String text, String message) { """ Assert that the given String has valid text content; that is, it must not be <code>null</code> and must contain at least one non-whitespace character. <pre class="code">Assert.hasText(name, "'name' must not be empty");</pre> @param text the String to...
java
public static void hasText(String text, String message) { if (!Strings.hasText(text)) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "hasText", "(", "String", "text", ",", "String", "message", ")", "{", "if", "(", "!", "Strings", ".", "hasText", "(", "text", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that the given String has valid text content; that is, it must not be <code>null</code> and must contain at least one non-whitespace character. <pre class="code">Assert.hasText(name, "'name' must not be empty");</pre> @param text the String to check @param message the exception message to use if the assertion fa...
[ "Assert", "that", "the", "given", "String", "has", "valid", "text", "content", ";", "that", "is", "it", "must", "not", "be", "<code", ">", "null<", "/", "code", ">", "and", "must", "contain", "at", "least", "one", "non", "-", "whitespace", "character", ...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Assert.java#L130-L134
leancloud/java-sdk-all
android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/pay/PaySignUtil.java
PaySignUtil.getNoSign
private static String getNoSign(Map<String, Object> params, boolean includeEmptyParam) { """ 根据参数map获取待签名字符串 @param params 待签名参数map @param includeEmptyParam 是否包含值为空的参数: 与 HMS-SDK 支付能力交互的签名或验签,需要为false(不包含空参数) 由华为支付服务器回调给开发者的服务器的支付结果验签,需要为true(包含空参数) @return 待签名字符串 """ //对参数按照key做升序排序,对map的所有value...
java
private static String getNoSign(Map<String, Object> params, boolean includeEmptyParam) { //对参数按照key做升序排序,对map的所有value进行处理,转化成string类型 //拼接成key=value&key=value&....格式的字符串 StringBuilder content = new StringBuilder(); // 按照key做排序 List<String> keys = new ArrayList<String>(para...
[ "private", "static", "String", "getNoSign", "(", "Map", "<", "String", ",", "Object", ">", "params", ",", "boolean", "includeEmptyParam", ")", "{", "//对参数按照key做升序排序,对map的所有value进行处理,转化成string类型\r", "//拼接成key=value&key=value&....格式的字符串\r", "StringBuilder", "content", "=", ...
根据参数map获取待签名字符串 @param params 待签名参数map @param includeEmptyParam 是否包含值为空的参数: 与 HMS-SDK 支付能力交互的签名或验签,需要为false(不包含空参数) 由华为支付服务器回调给开发者的服务器的支付结果验签,需要为true(包含空参数) @return 待签名字符串
[ "根据参数map获取待签名字符串" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/pay/PaySignUtil.java#L331-L365
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java
ElevationService.getElevationAlongPath
public void getElevationAlongPath(PathElevationRequest req, ElevationServiceCallback callback) { """ Create a request for elevations for samples along a path. @param req @param callback """ this.callback = callback; JSObject doc = (JSObject) getJSObject().eval("document");...
java
public void getElevationAlongPath(PathElevationRequest req, ElevationServiceCallback callback) { this.callback = callback; JSObject doc = (JSObject) getJSObject().eval("document"); doc.setMember(getVariableName(), this); StringBuilder r = new StringBuilder(getV...
[ "public", "void", "getElevationAlongPath", "(", "PathElevationRequest", "req", ",", "ElevationServiceCallback", "callback", ")", "{", "this", ".", "callback", "=", "callback", ";", "JSObject", "doc", "=", "(", "JSObject", ")", "getJSObject", "(", ")", ".", "eval...
Create a request for elevations for samples along a path. @param req @param callback
[ "Create", "a", "request", "for", "elevations", "for", "samples", "along", "a", "path", "." ]
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java#L63-L81
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java
SyncGroupsInner.createOrUpdateAsync
public Observable<SyncGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { """ Creates or updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this ...
java
public Observable<SyncGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, SyncGroupInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).map(new Func1<ServiceRe...
[ "public", "Observable", "<", "SyncGroupInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ",", "SyncGroupInner", "parameters", ")", "{", "return", "createO...
Creates or updates a sync group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hosted. @pa...
[ "Creates", "or", "updates", "a", "sync", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L1247-L1254
OpenTSDB/opentsdb
src/tree/Branch.java
Branch.addLeaf
public boolean addLeaf(final Leaf leaf, final Tree tree) { """ Adds a leaf to the local branch, looking for collisions @param leaf The leaf to add @param tree The tree to report to with collisions @return True if the leaf was new, false if the leaf already exists or would cause a collision @throws IllegalArgu...
java
public boolean addLeaf(final Leaf leaf, final Tree tree) { if (leaf == null) { throw new IllegalArgumentException("Null leaves are not allowed"); } if (leaves == null) { leaves = new HashMap<Integer, Leaf>(); leaves.put(leaf.hashCode(), leaf); return true; } if (leaves.c...
[ "public", "boolean", "addLeaf", "(", "final", "Leaf", "leaf", ",", "final", "Tree", "tree", ")", "{", "if", "(", "leaf", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Null leaves are not allowed\"", ")", ";", "}", "if", "(", "...
Adds a leaf to the local branch, looking for collisions @param leaf The leaf to add @param tree The tree to report to with collisions @return True if the leaf was new, false if the leaf already exists or would cause a collision @throws IllegalArgumentException if the incoming leaf is null
[ "Adds", "a", "leaf", "to", "the", "local", "branch", "looking", "for", "collisions" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tree/Branch.java#L228-L258
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetGroupsInner.java
JobTargetGroupsInner.createOrUpdateAsync
public Observable<JobTargetGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, List<JobTarget> members) { """ Creates or updates a target group. @param resourceGroupName The name of the resource group that contains the resource. You can obtai...
java
public Observable<JobTargetGroupInner> createOrUpdateAsync(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName, List<JobTarget> members) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName, members).map(new Func1<Servi...
[ "public", "Observable", "<", "JobTargetGroupInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "targetGroupName", ",", "List", "<", "JobTarget", ">", "members", ")", "{",...
Creates or updates a target group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param targetGroupName The name of...
[ "Creates", "or", "updates", "a", "target", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetGroupsInner.java#L362-L369
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.nthIndex
public static int nthIndex(String s, char ch, int n) { """ Returns the index of the <i>n</i>th occurrence of ch in s, or -1 if there are less than n occurrences of ch. """ int index = 0; for (int i = 0; i < n; i++) { // if we're already at the end of the string, // and we need to find ...
java
public static int nthIndex(String s, char ch, int n) { int index = 0; for (int i = 0; i < n; i++) { // if we're already at the end of the string, // and we need to find another ch, return -1 if (index == s.length() - 1) { return -1; } index = s.indexOf(ch, index + 1...
[ "public", "static", "int", "nthIndex", "(", "String", "s", ",", "char", "ch", ",", "int", "n", ")", "{", "int", "index", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "n", ";", "i", "++", ")", "{", "// if we're already at the en...
Returns the index of the <i>n</i>th occurrence of ch in s, or -1 if there are less than n occurrences of ch.
[ "Returns", "the", "index", "of", "the", "<i", ">", "n<", "/", "i", ">", "th", "occurrence", "of", "ch", "in", "s", "or", "-", "1", "if", "there", "are", "less", "than", "n", "occurrences", "of", "ch", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L576-L590
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/security.java
security.privateBase64Decoder
private static String privateBase64Decoder(String decode, int flags) { """ Private decoder in base64 @param toDecode String to be encoded @param flags flags to decode the String @return decoded String in base64 """ if (flags == -1) { flags = Base64.DEFAULT; } byte[] data1 = Base64.decode(...
java
private static String privateBase64Decoder(String decode, int flags) { if (flags == -1) { flags = Base64.DEFAULT; } byte[] data1 = Base64.decode(decode, flags); String decodedBase64 = null; try { decodedBase64 = new String(data1, "UTF-8"); } catch (UnsupportedEncodingException e) { e.pri...
[ "private", "static", "String", "privateBase64Decoder", "(", "String", "decode", ",", "int", "flags", ")", "{", "if", "(", "flags", "==", "-", "1", ")", "{", "flags", "=", "Base64", ".", "DEFAULT", ";", "}", "byte", "[", "]", "data1", "=", "Base64", "...
Private decoder in base64 @param toDecode String to be encoded @param flags flags to decode the String @return decoded String in base64
[ "Private", "decoder", "in", "base64" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/security.java#L101-L115
protostuff/protostuff
protostuff-json/src/main/java/io/protostuff/SmileIOUtil.java
SmileIOUtil.newSmileGenerator
public static SmileGenerator newSmileGenerator(OutputStream out, byte[] buf) { """ Creates a {@link SmileGenerator} for the outputstream with the supplied buf {@code outBuffer} to use. """ return newSmileGenerator(out, buf, 0, false, new IOContext( DEFAULT_SMILE_FACTORY._getBufferRecycl...
java
public static SmileGenerator newSmileGenerator(OutputStream out, byte[] buf) { return newSmileGenerator(out, buf, 0, false, new IOContext( DEFAULT_SMILE_FACTORY._getBufferRecycler(), out, false)); }
[ "public", "static", "SmileGenerator", "newSmileGenerator", "(", "OutputStream", "out", ",", "byte", "[", "]", "buf", ")", "{", "return", "newSmileGenerator", "(", "out", ",", "buf", ",", "0", ",", "false", ",", "new", "IOContext", "(", "DEFAULT_SMILE_FACTORY",...
Creates a {@link SmileGenerator} for the outputstream with the supplied buf {@code outBuffer} to use.
[ "Creates", "a", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-json/src/main/java/io/protostuff/SmileIOUtil.java#L170-L174
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTElementDef.java
XSLTElementDef.getProcessorForUnknown
XSLTElementProcessor getProcessorForUnknown(String uri, String localName) { """ Given an unknown element, get the processor for the element. @param uri The Namespace URI, or an empty string. @param localName The local name (without prefix), or empty string if not namespace processing. @return normally a {@...
java
XSLTElementProcessor getProcessorForUnknown(String uri, String localName) { // XSLTElementProcessor lreDef = null; // return value if (null == m_elements) return null; int n = m_elements.length; for (int i = 0; i < n; i++) { XSLTElementDef def = m_elements[i]; if (def.m_name....
[ "XSLTElementProcessor", "getProcessorForUnknown", "(", "String", "uri", ",", "String", "localName", ")", "{", "// XSLTElementProcessor lreDef = null; // return value", "if", "(", "null", "==", "m_elements", ")", "return", "null", ";", "int", "n", "=", "m_elements", "....
Given an unknown element, get the processor for the element. @param uri The Namespace URI, or an empty string. @param localName The local name (without prefix), or empty string if not namespace processing. @return normally a {@link ProcessorUnknown} reference. @see ProcessorUnknown
[ "Given", "an", "unknown", "element", "get", "the", "processor", "for", "the", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTElementDef.java#L530-L550
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.createOrUpdate
public DatabaseAccountInner createOrUpdate(String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters) { """ Creates or updates an Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database ac...
java
public DatabaseAccountInner createOrUpdate(String resourceGroupName, String accountName, DatabaseAccountCreateUpdateParameters createUpdateParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, createUpdateParameters).toBlocking().last().body(); }
[ "public", "DatabaseAccountInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "DatabaseAccountCreateUpdateParameters", "createUpdateParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",...
Creates or updates an Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param createUpdateParameters The parameters to provide for the current database account. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Creates", "or", "updates", "an", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L445-L447
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/link/FeatureTileTableCoreLinker.java
FeatureTileTableCoreLinker.deleteLink
public boolean deleteLink(String featureTable, String tileTable) { """ Delete the feature tile table link @param featureTable feature table @param tileTable tile table @return true if deleted """ boolean deleted = false; try { if (featureTileLinkDao.isTableExists()) { FeatureTileLinkKey id ...
java
public boolean deleteLink(String featureTable, String tileTable) { boolean deleted = false; try { if (featureTileLinkDao.isTableExists()) { FeatureTileLinkKey id = new FeatureTileLinkKey(featureTable, tileTable); deleted = featureTileLinkDao.deleteById(id) > 0; } } catch (SQLException e) { ...
[ "public", "boolean", "deleteLink", "(", "String", "featureTable", ",", "String", "tileTable", ")", "{", "boolean", "deleted", "=", "false", ";", "try", "{", "if", "(", "featureTileLinkDao", ".", "isTableExists", "(", ")", ")", "{", "FeatureTileLinkKey", "id", ...
Delete the feature tile table link @param featureTable feature table @param tileTable tile table @return true if deleted
[ "Delete", "the", "feature", "tile", "table", "link" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/link/FeatureTileTableCoreLinker.java#L205-L223
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/config/handler/compose/ComposeUtils.java
ComposeUtils.resolveComposeFileAbsolutely
static File resolveComposeFileAbsolutely(String baseDir, String composeFile, MavenProject project) { """ Resolves a docker-compose file against the supplied base directory. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. <p> If {@code composeFile} is {@link File#isAbsolute() a...
java
static File resolveComposeFileAbsolutely(String baseDir, String composeFile, MavenProject project) { File yamlFile = new File(composeFile); if (yamlFile.isAbsolute()) { return yamlFile; } File toCanonicalize = new File(resolveAbsolutely(baseDir, project), composeFile); ...
[ "static", "File", "resolveComposeFileAbsolutely", "(", "String", "baseDir", ",", "String", "composeFile", ",", "MavenProject", "project", ")", "{", "File", "yamlFile", "=", "new", "File", "(", "composeFile", ")", ";", "if", "(", "yamlFile", ".", "isAbsolute", ...
Resolves a docker-compose file against the supplied base directory. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. <p> If {@code composeFile} is {@link File#isAbsolute() absolute}, then it is returned unmodified. Otherwise, the {@code composeFile} is returned as an absolute {@code F...
[ "Resolves", "a", "docker", "-", "compose", "file", "against", "the", "supplied", "base", "directory", ".", "The", "returned", "{", "@code", "File", "}", "is", "guaranteed", "to", "be", "{", "@link", "File#isAbsolute", "()", "absolute", "}", ".", "<p", ">",...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/config/handler/compose/ComposeUtils.java#L28-L41
interedition/collatex
collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java
SuffixArrays.createWithLCP
public static SuffixData createWithLCP(int[] input, int start, int length, ISuffixArrayBuilder builder) { """ Create a suffix array and an LCP array for a given input sequence of symbols and a custom suffix array building strategy. """ final int[] sa = builde...
java
public static SuffixData createWithLCP(int[] input, int start, int length, ISuffixArrayBuilder builder) { final int[] sa = builder.buildSuffixArray(input, start, length); final int[] lcp = computeLCP(input, start, length, sa); return new SuffixData(sa, ...
[ "public", "static", "SuffixData", "createWithLCP", "(", "int", "[", "]", "input", ",", "int", "start", ",", "int", "length", ",", "ISuffixArrayBuilder", "builder", ")", "{", "final", "int", "[", "]", "sa", "=", "builder", ".", "buildSuffixArray", "(", "inp...
Create a suffix array and an LCP array for a given input sequence of symbols and a custom suffix array building strategy.
[ "Create", "a", "suffix", "array", "and", "an", "LCP", "array", "for", "a", "given", "input", "sequence", "of", "symbols", "and", "a", "custom", "suffix", "array", "building", "strategy", "." ]
train
https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixarray/SuffixArrays.java#L94-L99
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/builder/patch/PatchedRuntimeEnvironmentBuilder.java
PatchedRuntimeEnvironmentBuilder.addAsset
public RuntimeEnvironmentBuilder addAsset(Resource asset, ResourceType type) { """ Adds and asset. @param asset asset @param type type @return this RuntimeEnvironmentBuilder """ if (asset == null || type == null) { return this; } _runtimeEnvironment.addAsset(asset, type...
java
public RuntimeEnvironmentBuilder addAsset(Resource asset, ResourceType type) { if (asset == null || type == null) { return this; } _runtimeEnvironment.addAsset(asset, type); return this; }
[ "public", "RuntimeEnvironmentBuilder", "addAsset", "(", "Resource", "asset", ",", "ResourceType", "type", ")", "{", "if", "(", "asset", "==", "null", "||", "type", "==", "null", ")", "{", "return", "this", ";", "}", "_runtimeEnvironment", ".", "addAsset", "(...
Adds and asset. @param asset asset @param type type @return this RuntimeEnvironmentBuilder
[ "Adds", "and", "asset", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/config/builder/patch/PatchedRuntimeEnvironmentBuilder.java#L360-L366
abel533/EasyXls
src/main/java/com/github/abel533/easyxls/EasyXls.java
EasyXls.list2Xls
public static boolean list2Xls(List<?> list, String xmlPath, String filePath, String fileName) throws Exception { """ 导出list对象到excel @param list 导出的list @param xmlPath xml完整路径 @param filePath 保存xls路径 @param fileName 保存xls文件名 @return 处理结果,true成功,false失败 @throws Exception """ return XlsUtil....
java
public static boolean list2Xls(List<?> list, String xmlPath, String filePath, String fileName) throws Exception { return XlsUtil.list2Xls(list, xmlPath, filePath, fileName); }
[ "public", "static", "boolean", "list2Xls", "(", "List", "<", "?", ">", "list", ",", "String", "xmlPath", ",", "String", "filePath", ",", "String", "fileName", ")", "throws", "Exception", "{", "return", "XlsUtil", ".", "list2Xls", "(", "list", ",", "xmlPath...
导出list对象到excel @param list 导出的list @param xmlPath xml完整路径 @param filePath 保存xls路径 @param fileName 保存xls文件名 @return 处理结果,true成功,false失败 @throws Exception
[ "导出list对象到excel" ]
train
https://github.com/abel533/EasyXls/blob/f73be23745c2180d7c0b8f0a510e72e61cc37d5d/src/main/java/com/github/abel533/easyxls/EasyXls.java#L82-L84
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/expression/Uris.java
Uris.unescapeQueryParam
public String unescapeQueryParam(final String text, final String encoding) { """ <p> Perform am URI query parameter (name or value) <strong>unescape</strong> operation on a {@code String} input. </p> <p> This method simply calls the equivalent method in the {@code UriEscape} class from the <a href="http://ww...
java
public String unescapeQueryParam(final String text, final String encoding) { return UriEscape.unescapeUriQueryParam(text, encoding); }
[ "public", "String", "unescapeQueryParam", "(", "final", "String", "text", ",", "final", "String", "encoding", ")", "{", "return", "UriEscape", ".", "unescapeUriQueryParam", "(", "text", ",", "encoding", ")", ";", "}" ]
<p> Perform am URI query parameter (name or value) <strong>unescape</strong> operation on a {@code String} input. </p> <p> This method simply calls the equivalent method in the {@code UriEscape} class from the <a href="http://www.unbescape.org">Unbescape</a> library. </p> <p> This method will unescape every percent-enc...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "{", "@code", "String", "}", "input", ".", "<", "/", "p", ">", "<p", ">", "This", "me...
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/expression/Uris.java#L623-L625
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.callMethod
protected T callMethod(IFacebookMethod method, Collection<Pair<String, CharSequence>> paramPairs) throws FacebookException, IOException { """ Call the specified method, with the given parameters, and return a DOM tree with the results. @param method the fieldName of the method @param paramPairs a list of a...
java
protected T callMethod(IFacebookMethod method, Collection<Pair<String, CharSequence>> paramPairs) throws FacebookException, IOException { HashMap<String, CharSequence> params = new HashMap<String, CharSequence>(2 * method.numTotalParams()); params.put("method", method.methodName()); params.put("a...
[ "protected", "T", "callMethod", "(", "IFacebookMethod", "method", ",", "Collection", "<", "Pair", "<", "String", ",", "CharSequence", ">", ">", "paramPairs", ")", "throws", "FacebookException", ",", "IOException", "{", "HashMap", "<", "String", ",", "CharSequenc...
Call the specified method, with the given parameters, and return a DOM tree with the results. @param method the fieldName of the method @param paramPairs a list of arguments to the method @throws Exception with a description of any errors given to us by the server.
[ "Call", "the", "specified", "method", "with", "the", "given", "parameters", "and", "return", "a", "DOM", "tree", "with", "the", "results", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L844-L880
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java
BaseLuceneStorage.createDocument
protected Document createDocument(String spaceId, String key) { """ Create a {@link Document}, pre-filled with space-id and key fields. @param spaceId @param key @return """ Document doc = new Document(); doc.add(new StringField(FIELD_SPACE_ID, spaceId.trim(), Store.YES)); doc.add(...
java
protected Document createDocument(String spaceId, String key) { Document doc = new Document(); doc.add(new StringField(FIELD_SPACE_ID, spaceId.trim(), Store.YES)); doc.add(new StringField(FIELD_KEY, key.trim(), Store.YES)); doc.add(new StringField(FIELD_ID, spaceId.trim() + ":" + key.tri...
[ "protected", "Document", "createDocument", "(", "String", "spaceId", ",", "String", "key", ")", "{", "Document", "doc", "=", "new", "Document", "(", ")", ";", "doc", ".", "add", "(", "new", "StringField", "(", "FIELD_SPACE_ID", ",", "spaceId", ".", "trim",...
Create a {@link Document}, pre-filled with space-id and key fields. @param spaceId @param key @return
[ "Create", "a", "{", "@link", "Document", "}", "pre", "-", "filled", "with", "space", "-", "id", "and", "key", "fields", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java#L261-L267
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.putSerializableArrayList
public static void putSerializableArrayList(@NonNull Bundle bundle, @NonNull String key, @NonNull ArrayList<? extends Serializable> list) { """ Convenient method to save {@link java.util.ArrayList} containing {@link java.io.Serializable} items onto {@link android.os.Bundle}. Since it fails to save a list that con...
java
public static void putSerializableArrayList(@NonNull Bundle bundle, @NonNull String key, @NonNull ArrayList<? extends Serializable> list) { bundle.putSerializable(key, list); }
[ "public", "static", "void", "putSerializableArrayList", "(", "@", "NonNull", "Bundle", "bundle", ",", "@", "NonNull", "String", "key", ",", "@", "NonNull", "ArrayList", "<", "?", "extends", "Serializable", ">", "list", ")", "{", "bundle", ".", "putSerializable...
Convenient method to save {@link java.util.ArrayList} containing {@link java.io.Serializable} items onto {@link android.os.Bundle}. Since it fails to save a list that containing not {@link java.io.Serializable} items with {@link android.os.Bundle#putSerializable(String, Serializable)} at runtime, this is useful to get ...
[ "Convenient", "method", "to", "save", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L1104-L1106
dynjs/dynjs
src/main/java/org/dynjs/runtime/util/SafePropertyAccessor.java
SafePropertyAccessor.getProperty
public static String getProperty(String property, String defValue) { """ An extension over <code>System.getProperty</code> method. Handles security restrictions, and returns the default value if the access to the property is restricted. @param property The system property name. @param defValue The default valu...
java
public static String getProperty(String property, String defValue) { try { return System.getProperty(property, defValue); } catch (SecurityException se) { return defValue; } }
[ "public", "static", "String", "getProperty", "(", "String", "property", ",", "String", "defValue", ")", "{", "try", "{", "return", "System", ".", "getProperty", "(", "property", ",", "defValue", ")", ";", "}", "catch", "(", "SecurityException", "se", ")", ...
An extension over <code>System.getProperty</code> method. Handles security restrictions, and returns the default value if the access to the property is restricted. @param property The system property name. @param defValue The default value. @return The value of the system property, or the default value.
[ "An", "extension", "over", "<code", ">", "System", ".", "getProperty<", "/", "code", ">", "method", ".", "Handles", "security", "restrictions", "and", "returns", "the", "default", "value", "if", "the", "access", "to", "the", "property", "is", "restricted", "...
train
https://github.com/dynjs/dynjs/blob/4bc6715eff8768f8cd92c6a167d621bbfc1e1a91/src/main/java/org/dynjs/runtime/util/SafePropertyAccessor.java#L13-L19
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.inSameCell
public boolean inSameCell(int elementI, int elementJ) { """ Check that two elements are in the same cell of the partition. @param elementI an element in the partition @param elementJ an element in the partition @return true if both elements are in the same cell """ for (int cellIndex = 0; cellInde...
java
public boolean inSameCell(int elementI, int elementJ) { for (int cellIndex = 0; cellIndex < size(); cellIndex++) { SortedSet<Integer> cell = getCell(cellIndex); if (cell.contains(elementI) && cell.contains(elementJ)) { return true; } } return f...
[ "public", "boolean", "inSameCell", "(", "int", "elementI", ",", "int", "elementJ", ")", "{", "for", "(", "int", "cellIndex", "=", "0", ";", "cellIndex", "<", "size", "(", ")", ";", "cellIndex", "++", ")", "{", "SortedSet", "<", "Integer", ">", "cell", ...
Check that two elements are in the same cell of the partition. @param elementI an element in the partition @param elementJ an element in the partition @return true if both elements are in the same cell
[ "Check", "that", "two", "elements", "are", "in", "the", "same", "cell", "of", "the", "partition", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L407-L415
chennaione/sugar
library/src/main/java/com/orm/SugarDataSource.java
SugarDataSource.listAll
public void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback) { """ Method that list all elements. It run a SugarRecord.listAll but it's code is performed asynchronously with the usage of Futures and callbacks. @param orderBy the way you want to or...
java
public void listAll(final String orderBy, final SuccessCallback<List<T>> successCallback, final ErrorCallback errorCallback) { checkNotNull(successCallback); checkNotNull(errorCallback); final Callable<List<T>> call = new Callable<List<T>>() { @Override public List<T> ca...
[ "public", "void", "listAll", "(", "final", "String", "orderBy", ",", "final", "SuccessCallback", "<", "List", "<", "T", ">", ">", "successCallback", ",", "final", "ErrorCallback", "errorCallback", ")", "{", "checkNotNull", "(", "successCallback", ")", ";", "ch...
Method that list all elements. It run a SugarRecord.listAll but it's code is performed asynchronously with the usage of Futures and callbacks. @param orderBy the way you want to order the objects you get @param successCallback the callback that is performed if the operation is successful @param errorCallback the callb...
[ "Method", "that", "list", "all", "elements", ".", "It", "run", "a", "SugarRecord", ".", "listAll", "but", "it", "s", "code", "is", "performed", "asynchronously", "with", "the", "usage", "of", "Futures", "and", "callbacks", "." ]
train
https://github.com/chennaione/sugar/blob/2ff1b9d5b11563346b69b4e97324107ff680a61a/library/src/main/java/com/orm/SugarDataSource.java#L212-L238
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
ExecutionConfig.registerTypeWithKryoSerializer
public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) { """ Registers the given type with a Kryo Serializer. Note that the serializer instance must be serializable (as defined by java.io.Serializable), because it may be distributed to the worker nodes b...
java
public <T extends Serializer<?> & Serializable>void registerTypeWithKryoSerializer(Class<?> type, T serializer) { if (type == null || serializer == null) { throw new NullPointerException("Cannot register null class or serializer."); } registeredTypesWithKryoSerializers.put(type, new SerializableSerializer<>(s...
[ "public", "<", "T", "extends", "Serializer", "<", "?", ">", "&", "Serializable", ">", "void", "registerTypeWithKryoSerializer", "(", "Class", "<", "?", ">", "type", ",", "T", "serializer", ")", "{", "if", "(", "type", "==", "null", "||", "serializer", "=...
Registers the given type with a Kryo Serializer. Note that the serializer instance must be serializable (as defined by java.io.Serializable), because it may be distributed to the worker nodes by java serialization. @param type The class of the types serialized with the given serializer. @param serializer The serializ...
[ "Registers", "the", "given", "type", "with", "a", "Kryo", "Serializer", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java#L798-L804
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.createContextIdentifierTypeEditor
protected void createContextIdentifierTypeEditor(Composite parent, String text) { """ Creates the widgets for configuring the context identifier. @param parent the parent composite. @param text the label of the group. """ final Group group = SWTFactory.createGroup(parent, text, 1, 1, GridData.FILL_HORIZO...
java
protected void createContextIdentifierTypeEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 1, 1, GridData.FILL_HORIZONTAL); this.defaultContextIdentifierButton = createRadioButton(group, Messages.MainLaunchConfigurationTab_11); this.defaultContextIdentifierButton.ad...
[ "protected", "void", "createContextIdentifierTypeEditor", "(", "Composite", "parent", ",", "String", "text", ")", "{", "final", "Group", "group", "=", "SWTFactory", ".", "createGroup", "(", "parent", ",", "text", ",", "1", ",", "1", ",", "GridData", ".", "FI...
Creates the widgets for configuring the context identifier. @param parent the parent composite. @param text the label of the group.
[ "Creates", "the", "widgets", "for", "configuring", "the", "context", "identifier", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L196-L204