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
awltech/org.parallelj
parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/util/Classes.java
Classes.findField
public static Field findField(Class<?> type, String name) { """ Find a field in a class (and its ancestors) with a given name. @param type the class @param name the name @return the field. <code>null</code> if not found. """ while (type != null) { for (Field field : type.getDeclaredFields()) { ...
java
public static Field findField(Class<?> type, String name) { while (type != null) { for (Field field : type.getDeclaredFields()) { if (field.getName().equals(name)) { return field; } } type = type.getSuperclass(); } return null; }
[ "public", "static", "Field", "findField", "(", "Class", "<", "?", ">", "type", ",", "String", "name", ")", "{", "while", "(", "type", "!=", "null", ")", "{", "for", "(", "Field", "field", ":", "type", ".", "getDeclaredFields", "(", ")", ")", "{", "...
Find a field in a class (and its ancestors) with a given name. @param type the class @param name the name @return the field. <code>null</code> if not found.
[ "Find", "a", "field", "in", "a", "class", "(", "and", "its", "ancestors", ")", "with", "a", "given", "name", "." ]
train
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/util/Classes.java#L78-L88
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java
AbstractRectangularShape1dfx.maxXProperty
@Pure public DoubleProperty maxXProperty() { """ Replies the property that is the maximum x coordinate of the box. @return the maxX property. """ if (this.maxX == null) { this.maxX = new SimpleDoubleProperty(this, MathFXAttributeNames.MAXIMUM_X) { @Override protected void invalidated() { ...
java
@Pure public DoubleProperty maxXProperty() { if (this.maxX == null) { this.maxX = new SimpleDoubleProperty(this, MathFXAttributeNames.MAXIMUM_X) { @Override protected void invalidated() { final double currentMax = get(); final double currentMin = getMinX(); if (currentMin > currentMax) { ...
[ "@", "Pure", "public", "DoubleProperty", "maxXProperty", "(", ")", "{", "if", "(", "this", ".", "maxX", "==", "null", ")", "{", "this", ".", "maxX", "=", "new", "SimpleDoubleProperty", "(", "this", ",", "MathFXAttributeNames", ".", "MAXIMUM_X", ")", "{", ...
Replies the property that is the maximum x coordinate of the box. @return the maxX property.
[ "Replies", "the", "property", "that", "is", "the", "maximum", "x", "coordinate", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java#L181-L197
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java
DebugUtil.printDebug
public static void printDebug(final Map pMap, final String pMethodName) { """ Invokes a given method of every object in a {@code java.util.Map} to {@code System.out}. The method called must have no formal parameters. <p> If an exception is throwed during the method invocation, the element's {@code toString()} m...
java
public static void printDebug(final Map pMap, final String pMethodName) { printDebug(pMap, pMethodName, System.out); }
[ "public", "static", "void", "printDebug", "(", "final", "Map", "pMap", ",", "final", "String", "pMethodName", ")", "{", "printDebug", "(", "pMap", ",", "pMethodName", ",", "System", ".", "out", ")", ";", "}" ]
Invokes a given method of every object in a {@code java.util.Map} to {@code System.out}. The method called must have no formal parameters. <p> If an exception is throwed during the method invocation, the element's {@code toString()} method is called.<br> For bulk data types, recursive invocations and invocations of oth...
[ "Invokes", "a", "given", "method", "of", "every", "object", "in", "a", "{" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L660-L662
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.ohj/src/main/java/org/carewebframework/help/ohj/HelpView.java
HelpView.initTopicTree
private void initTopicTree(HelpTopicNode htnParent, TopicTreeNode ttnParent) { """ Initialize the topic tree. Converts the Oracle help TopicTreeNode-based tree to a HelpTopicNode-based tree. @param htnParent Current help topic node. @param ttnParent Current topic tree node. """ initTopicTree(htnPa...
java
private void initTopicTree(HelpTopicNode htnParent, TopicTreeNode ttnParent) { initTopicTree(htnParent, ttnParent.getChildren()); if (ttnParent instanceof KeywordTopicTreeNode) { initTopicTree(htnParent, ((KeywordTopicTreeNode) ttnParent).getEntries()); } }
[ "private", "void", "initTopicTree", "(", "HelpTopicNode", "htnParent", ",", "TopicTreeNode", "ttnParent", ")", "{", "initTopicTree", "(", "htnParent", ",", "ttnParent", ".", "getChildren", "(", ")", ")", ";", "if", "(", "ttnParent", "instanceof", "KeywordTopicTree...
Initialize the topic tree. Converts the Oracle help TopicTreeNode-based tree to a HelpTopicNode-based tree. @param htnParent Current help topic node. @param ttnParent Current topic tree node.
[ "Initialize", "the", "topic", "tree", ".", "Converts", "the", "Oracle", "help", "TopicTreeNode", "-", "based", "tree", "to", "a", "HelpTopicNode", "-", "based", "tree", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.ohj/src/main/java/org/carewebframework/help/ohj/HelpView.java#L102-L108
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java
FDBigInteger.multAndCarryBy10
private static int multAndCarryBy10(int[] src, int srcLen, int[] dst) { """ /*@ @ requires src.length >= srcLen && dst.length >= srcLen; @ assignable dst[0 .. srcLen - 1]; @ ensures 0 <= \result && \result < 10; @ ensures AP(dst, srcLen) + (\result << (srcLen*32)) == \old(AP(src, srcLen) * 10); @ """ ...
java
private static int multAndCarryBy10(int[] src, int srcLen, int[] dst) { long carry = 0; for (int i = 0; i < srcLen; i++) { long product = (src[i] & LONG_MASK) * 10L + carry; dst[i] = (int) product; carry = product >>> 32; } return (int) carry; }
[ "private", "static", "int", "multAndCarryBy10", "(", "int", "[", "]", "src", ",", "int", "srcLen", ",", "int", "[", "]", "dst", ")", "{", "long", "carry", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "srcLen", ";", "i", "++",...
/*@ @ requires src.length >= srcLen && dst.length >= srcLen; @ assignable dst[0 .. srcLen - 1]; @ ensures 0 <= \result && \result < 10; @ ensures AP(dst, srcLen) + (\result << (srcLen*32)) == \old(AP(src, srcLen) * 10); @
[ "/", "*" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java#L1343-L1351
ocelotds/ocelot
ocelot-processor/src/main/java/org/ocelotds/FileWriterServices.java
FileWriterServices.copyResourceToClassesOutput
public void copyResourceToClassesOutput(String path, String filename) { """ Copy path/filename, from jar ocelot-processor in classes directory of current project/module @param path @param filename """ String fullpath = path + ProcessorConstants.SEPARATORCHAR + filename; messager.printMessage(Diagnostic.K...
java
public void copyResourceToClassesOutput(String path, String filename) { String fullpath = path + ProcessorConstants.SEPARATORCHAR + filename; messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " javascript copy js : " + fullpath + " to : class dir"); try (Writer writer = getFileObjectWriterInClassOutput("",...
[ "public", "void", "copyResourceToClassesOutput", "(", "String", "path", ",", "String", "filename", ")", "{", "String", "fullpath", "=", "path", "+", "ProcessorConstants", ".", "SEPARATORCHAR", "+", "filename", ";", "messager", ".", "printMessage", "(", "Diagnostic...
Copy path/filename, from jar ocelot-processor in classes directory of current project/module @param path @param filename
[ "Copy", "path", "/", "filename", "from", "jar", "ocelot", "-", "processor", "in", "classes", "directory", "of", "current", "project", "/", "module" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-processor/src/main/java/org/ocelotds/FileWriterServices.java#L40-L48
casbin/jcasbin
src/main/java/org/casbin/jcasbin/config/Config.java
Config.addConfig
private boolean addConfig(String section, String option, String value) { """ addConfig adds a new section->key:value to the configuration. """ if (section.equals("")) { section = DEFAULT_SECTION; } if (!data.containsKey(section)) { data.put(section, new HashMap<...
java
private boolean addConfig(String section, String option, String value) { if (section.equals("")) { section = DEFAULT_SECTION; } if (!data.containsKey(section)) { data.put(section, new HashMap<>()); } boolean ok = data.get(section).containsKey(option); ...
[ "private", "boolean", "addConfig", "(", "String", "section", ",", "String", "option", ",", "String", "value", ")", "{", "if", "(", "section", ".", "equals", "(", "\"\"", ")", ")", "{", "section", "=", "DEFAULT_SECTION", ";", "}", "if", "(", "!", "data"...
addConfig adds a new section->key:value to the configuration.
[ "addConfig", "adds", "a", "new", "section", "-", ">", "key", ":", "value", "to", "the", "configuration", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/config/Config.java#L66-L78
dhanji/sitebricks
sitebricks-mail/src/main/java/com/google/sitebricks/mail/MailClientHandler.java
MailClientHandler.complete
private synchronized void complete(String message) { """ This is synchronized to ensure that we process the queue serially. """ // This is a weird problem with writing stuff while idling. Need to investigate it more, but // for now just ignore it. if (MESSAGE_COULDNT_BE_FETCHED_REGEX.matcher(m...
java
private synchronized void complete(String message) { // This is a weird problem with writing stuff while idling. Need to investigate it more, but // for now just ignore it. if (MESSAGE_COULDNT_BE_FETCHED_REGEX.matcher(message).matches()) { log.warn("Some messages in the batch could not be fetched...
[ "private", "synchronized", "void", "complete", "(", "String", "message", ")", "{", "// This is a weird problem with writing stuff while idling. Need to investigate it more, but", "// for now just ignore it.", "if", "(", "MESSAGE_COULDNT_BE_FETCHED_REGEX", ".", "matcher", "(", "mess...
This is synchronized to ensure that we process the queue serially.
[ "This", "is", "synchronized", "to", "ensure", "that", "we", "process", "the", "queue", "serially", "." ]
train
https://github.com/dhanji/sitebricks/blob/8682029a78bd48fb8566173d970800499e9e5d97/sitebricks-mail/src/main/java/com/google/sitebricks/mail/MailClientHandler.java#L263-L304
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java
AvroUtils.readAvroEntity
public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) { """ Decode an entity from the initialized Avro Decoder using the DatumReader. @param decoder The decoder to decode the entity fields @param reader The Avro DatumReader that will read the entity with the decoder. @return The entity....
java
public static <T> T readAvroEntity(Decoder decoder, DatumReader<T> reader) { try { return reader.read(null, decoder); } catch (IOException e) { throw new SerializationException("Could not deserialize Avro entity", e); } }
[ "public", "static", "<", "T", ">", "T", "readAvroEntity", "(", "Decoder", "decoder", ",", "DatumReader", "<", "T", ">", "reader", ")", "{", "try", "{", "return", "reader", ".", "read", "(", "null", ",", "decoder", ")", ";", "}", "catch", "(", "IOExce...
Decode an entity from the initialized Avro Decoder using the DatumReader. @param decoder The decoder to decode the entity fields @param reader The Avro DatumReader that will read the entity with the decoder. @return The entity.
[ "Decode", "an", "entity", "from", "the", "initialized", "Avro", "Decoder", "using", "the", "DatumReader", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroUtils.java#L79-L85
jenkinsci/jenkins
core/src/main/java/hudson/PluginManager.java
PluginManager.copyBundledPlugin
protected void copyBundledPlugin(URL src, String fileName) throws IOException { """ Copies the bundled plugin from the given URL to the destination of the given file name (like 'abc.jpi'), with a reasonable up-to-date check. A convenience method to be used by the {@link #loadBundledPlugins()}. """ LOG...
java
protected void copyBundledPlugin(URL src, String fileName) throws IOException { LOGGER.log(FINE, "Copying {0}", src); fileName = fileName.replace(".hpi",".jpi"); // normalize fileNames to have the correct suffix String legacyName = fileName.replace(".jpi",".hpi"); long lastModified = get...
[ "protected", "void", "copyBundledPlugin", "(", "URL", "src", ",", "String", "fileName", ")", "throws", "IOException", "{", "LOGGER", ".", "log", "(", "FINE", ",", "\"Copying {0}\"", ",", "src", ")", ";", "fileName", "=", "fileName", ".", "replace", "(", "\...
Copies the bundled plugin from the given URL to the destination of the given file name (like 'abc.jpi'), with a reasonable up-to-date check. A convenience method to be used by the {@link #loadBundledPlugins()}.
[ "Copies", "the", "bundled", "plugin", "from", "the", "given", "URL", "to", "the", "destination", "of", "the", "given", "file", "name", "(", "like", "abc", ".", "jpi", ")", "with", "a", "reasonable", "up", "-", "to", "-", "date", "check", ".", "A", "c...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/PluginManager.java#L1014-L1038
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.listSiteDiagnosticCategoriesSlotWithServiceResponseAsync
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String slot) { """ Get Diagnostics Categories. Get Diagnostics Categories. @param resourceGroupName Name of the resource group ...
java
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String slot) { return listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot) .concatMap(...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DiagnosticCategoryInner", ">", ">", ">", "listSiteDiagnosticCategoriesSlotWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "siteName", ",", "final", "String",...
Get Diagnostics Categories. Get Diagnostics Categories. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param slot Slot Name @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;DiagnosticCateg...
[ "Get", "Diagnostics", "Categories", ".", "Get", "Diagnostics", "Categories", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L1412-L1424
gitblit/fathom
fathom-mailer/src/main/java/fathom/mailer/Mailer.java
Mailer.newHtmlMailRequest
public MailRequest newHtmlMailRequest(String requestId, String subject, String body) { """ Creates an html MailRequest with the specified subject and body. The request id is supplied. @param requestId @param subject @param body @return an html mail request """ return createMailRequest(requestId,...
java
public MailRequest newHtmlMailRequest(String requestId, String subject, String body) { return createMailRequest(requestId, true, subject, body); }
[ "public", "MailRequest", "newHtmlMailRequest", "(", "String", "requestId", ",", "String", "subject", ",", "String", "body", ")", "{", "return", "createMailRequest", "(", "requestId", ",", "true", ",", "subject", ",", "body", ")", ";", "}" ]
Creates an html MailRequest with the specified subject and body. The request id is supplied. @param requestId @param subject @param body @return an html mail request
[ "Creates", "an", "html", "MailRequest", "with", "the", "specified", "subject", "and", "body", ".", "The", "request", "id", "is", "supplied", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-mailer/src/main/java/fathom/mailer/Mailer.java#L135-L137
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cart_GET
public ArrayList<String> cart_GET(String description) throws IOException { """ List of your OVH order carts REST: GET /order/cart @param description [required] Filter the value of description property (=) """ String qPath = "/order/cart"; StringBuilder sb = path(qPath); query(sb, "description", descr...
java
public ArrayList<String> cart_GET(String description) throws IOException { String qPath = "/order/cart"; StringBuilder sb = path(qPath); query(sb, "description", description); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t1); }
[ "public", "ArrayList", "<", "String", ">", "cart_GET", "(", "String", "description", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cart\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", "(", "sb", ",", "\"...
List of your OVH order carts REST: GET /order/cart @param description [required] Filter the value of description property (=)
[ "List", "of", "your", "OVH", "order", "carts" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L7345-L7351
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java
RegistriesInner.getCredentialsAsync
public Observable<RegistryCredentialsInner> getCredentialsAsync(String resourceGroupName, String registryName) { """ Gets the administrator login credentials for the specified container registry. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryNam...
java
public Observable<RegistryCredentialsInner> getCredentialsAsync(String resourceGroupName, String registryName) { return getCredentialsWithServiceResponseAsync(resourceGroupName, registryName).map(new Func1<ServiceResponse<RegistryCredentialsInner>, RegistryCredentialsInner>() { @Override ...
[ "public", "Observable", "<", "RegistryCredentialsInner", ">", "getCredentialsAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ")", "{", "return", "getCredentialsWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ")", ".", "...
Gets the administrator login credentials for the specified container registry. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @throws IllegalArgumentException thrown if parameters fail the validation @return the o...
[ "Gets", "the", "administrator", "login", "credentials", "for", "the", "specified", "container", "registry", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2016_06_27_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2016_06_27_preview/implementation/RegistriesInner.java#L816-L823
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMultiMatcherElement.java
AbstractMultiMatcherElement.exportSuccessfulResult
@Override protected void exportSuccessfulResult(String prefix, MultiResult result) { """ {@inheritDoc} <p/> In addition, this method exports the children results. They are exported using their {@code resultPrefix}, and via shortcut {@code prefix + "." + &lt;number&gt;}, where the number here is the result ...
java
@Override protected void exportSuccessfulResult(String prefix, MultiResult result) { super.exportSuccessfulResult(prefix, result); for (int i = 0; i < tasks.size(); i++) { AbstractMatcherElement<Result> t = tasks.get(i); t.exportSuccessfulResult(t.getResultPrefix(), result.ge...
[ "@", "Override", "protected", "void", "exportSuccessfulResult", "(", "String", "prefix", ",", "MultiResult", "result", ")", "{", "super", ".", "exportSuccessfulResult", "(", "prefix", ",", "result", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
{@inheritDoc} <p/> In addition, this method exports the children results. They are exported using their {@code resultPrefix}, and via shortcut {@code prefix + "." + &lt;number&gt;}, where the number here is the result index. @param prefix the property prefix @param result the result
[ "{", "@inheritDoc", "}", "<p", "/", ">", "In", "addition", "this", "method", "exports", "the", "children", "results", ".", "They", "are", "exported", "using", "their", "{", "@code", "resultPrefix", "}", "and", "via", "shortcut", "{", "@code", "prefix", "+"...
train
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/matcher/AbstractMultiMatcherElement.java#L56-L64
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_envVar_GET
public ArrayList<String> serviceName_envVar_GET(String serviceName, net.minidev.ovh.api.hosting.web.envvar.OvhTypeEnum type) throws IOException { """ Environment variables set on your webhosting REST: GET /hosting/web/{serviceName}/envVar @param type [required] Filter the value of type property (=) @param ser...
java
public ArrayList<String> serviceName_envVar_GET(String serviceName, net.minidev.ovh.api.hosting.web.envvar.OvhTypeEnum type) throws IOException { String qPath = "/hosting/web/{serviceName}/envVar"; StringBuilder sb = path(qPath, serviceName); query(sb, "type", type); String resp = exec(qPath, "GET", sb.toString...
[ "public", "ArrayList", "<", "String", ">", "serviceName_envVar_GET", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "hosting", ".", "web", ".", "envvar", ".", "OvhTypeEnum", "type", ")", "throws", "IOException", "{", ...
Environment variables set on your webhosting REST: GET /hosting/web/{serviceName}/envVar @param type [required] Filter the value of type property (=) @param serviceName [required] The internal name of your hosting
[ "Environment", "variables", "set", "on", "your", "webhosting" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1814-L1820
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java
SnowflakeAzureClient.buildEncryptionMetadataJSON
private String buildEncryptionMetadataJSON(String iv64, String key64) { """ /* buildEncryptionMetadataJSON Takes the base64-encoded iv and key and creates the JSON block to be used as the encryptiondata metadata field on the blob. """ return String.format("{\"EncryptionMode\":\"FullBlob\",\"WrappedConte...
java
private String buildEncryptionMetadataJSON(String iv64, String key64) { return String.format("{\"EncryptionMode\":\"FullBlob\",\"WrappedContentKey\"" + ":{\"KeyId\":\"symmKey1\",\"EncryptedKey\":\"%s\"" + ",\"Algorithm\":\"AES_CBC_256\"},\"EncryptionAgent\":" ...
[ "private", "String", "buildEncryptionMetadataJSON", "(", "String", "iv64", ",", "String", "key64", ")", "{", "return", "String", ".", "format", "(", "\"{\\\"EncryptionMode\\\":\\\"FullBlob\\\",\\\"WrappedContentKey\\\"\"", "+", "\":{\\\"KeyId\\\":\\\"symmKey1\\\",\\\"EncryptedKey...
/* buildEncryptionMetadataJSON Takes the base64-encoded iv and key and creates the JSON block to be used as the encryptiondata metadata field on the blob.
[ "/", "*", "buildEncryptionMetadataJSON", "Takes", "the", "base64", "-", "encoded", "iv", "and", "key", "and", "creates", "the", "JSON", "block", "to", "be", "used", "as", "the", "encryptiondata", "metadata", "field", "on", "the", "blob", "." ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java#L786-L795
GII/broccoli
broccoli-impl/src/main/java/com/hi3project/broccoli/bsdl/impl/parsing/xml/AxiomAssign.java
AxiomAssign.assignParsedElement
public boolean assignParsedElement(Ontology parsedOntology, String syntaxElementName, ISyntaxElement syntaxElement) throws ModelException { """ /* An Ontology: -has always an URI as an attribute -may have an URI as ontologyLanguage -may have a naturalLanguage referenced as a literal -may have a versionNumber,...
java
public boolean assignParsedElement(Ontology parsedOntology, String syntaxElementName, ISyntaxElement syntaxElement) throws ModelException { if (syntaxElementName.equalsIgnoreCase(XMLSyntax.URI()) && syntaxElement instanceof SemanticIdentifier) { parsedOntology.setSemanticIdentifier((Sema...
[ "public", "boolean", "assignParsedElement", "(", "Ontology", "parsedOntology", ",", "String", "syntaxElementName", ",", "ISyntaxElement", "syntaxElement", ")", "throws", "ModelException", "{", "if", "(", "syntaxElementName", ".", "equalsIgnoreCase", "(", "XMLSyntax", "....
/* An Ontology: -has always an URI as an attribute -may have an URI as ontologyLanguage -may have a naturalLanguage referenced as a literal -may have a versionNumber, as a literal may have N concepts as contained elements may have N instances as contained elements
[ "/", "*", "An", "Ontology", ":", "-", "has", "always", "an", "URI", "as", "an", "attribute", "-", "may", "have", "an", "URI", "as", "ontologyLanguage", "-", "may", "have", "a", "naturalLanguage", "referenced", "as", "a", "literal", "-", "may", "have", ...
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-impl/src/main/java/com/hi3project/broccoli/bsdl/impl/parsing/xml/AxiomAssign.java#L292-L320
unic/neba
core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java
FieldValueMappingCallback.createCollectionOfReferences
private Collection<Object> createCollectionOfReferences(final FieldData field, final String[] paths) { """ If the field is already {@link io.neba.core.resourcemodels.metadata.MappedFieldMetaData#isLazy() lazy}, {@link #loadReferences(io.neba.core.resourcemodels.mapping.FieldValueMappingCallback.FieldData, String[...
java
private Collection<Object> createCollectionOfReferences(final FieldData field, final String[] paths) { if (field.metaData.isLazy()) { // The field is explicitly lazy, e.g. Lazy<List<Resource>>. // Here, the lazy value tries to load the actual value, thus resolve it. return lo...
[ "private", "Collection", "<", "Object", ">", "createCollectionOfReferences", "(", "final", "FieldData", "field", ",", "final", "String", "[", "]", "paths", ")", "{", "if", "(", "field", ".", "metaData", ".", "isLazy", "(", ")", ")", "{", "// The field is exp...
If the field is already {@link io.neba.core.resourcemodels.metadata.MappedFieldMetaData#isLazy() lazy}, {@link #loadReferences(io.neba.core.resourcemodels.mapping.FieldValueMappingCallback.FieldData, String[]) load} the references. Otherwise, provides a lazy loading collection. @param paths relative or absolute paths ...
[ "If", "the", "field", "is", "already", "{", "@link", "io", ".", "neba", ".", "core", ".", "resourcemodels", ".", "metadata", ".", "MappedFieldMetaData#isLazy", "()", "lazy", "}", "{", "@link", "#loadReferences", "(", "io", ".", "neba", ".", "core", ".", ...
train
https://github.com/unic/neba/blob/4d762e60112a1fcb850926a56a9843d5aa424c4b/core/src/main/java/io/neba/core/resourcemodels/mapping/FieldValueMappingCallback.java#L323-L333
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/ServiceDocumentRenderer.java
ServiceDocumentRenderer.scoreServiceDocument
protected int scoreServiceDocument(ODataRequestContext requestContext, MediaType requiredMediaType) { """ Calculate a score for a 'Service Document Renderer' based on a given OData request context and required media type. @param requestContext The given OData request context. @param requiredMediaType The r...
java
protected int scoreServiceDocument(ODataRequestContext requestContext, MediaType requiredMediaType) { if (isServiceDocument(requestContext.getUri())) { int scoreByFormat = scoreByFormat(getFormatOption(requestContext.getUri()), requiredMediaType); int scoreByMediaType = scoreByMediaType(...
[ "protected", "int", "scoreServiceDocument", "(", "ODataRequestContext", "requestContext", ",", "MediaType", "requiredMediaType", ")", "{", "if", "(", "isServiceDocument", "(", "requestContext", ".", "getUri", "(", ")", ")", ")", "{", "int", "scoreByFormat", "=", "...
Calculate a score for a 'Service Document Renderer' based on a given OData request context and required media type. @param requestContext The given OData request context. @param requiredMediaType The required media type. @return The calculated score.
[ "Calculate", "a", "score", "for", "a", "Service", "Document", "Renderer", "based", "on", "a", "given", "OData", "request", "context", "and", "required", "media", "type", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/ServiceDocumentRenderer.java#L51-L59
LearnLib/learnlib
algorithms/active/ttt-vpda/src/main/java/de/learnlib/algorithms/ttt/vpda/TTTLearnerVPDA.java
TTTLearnerVPDA.finalizeDiscriminator
private void finalizeDiscriminator(DTNode<I> blockRoot, Splitter<I> splitter) { """ Finalize a discriminator. Given a block root and a {@link Splitter}, replace the discriminator at the block root by the one derived from the splitter, and update the discrimination tree accordingly. @param blockRoot the block ...
java
private void finalizeDiscriminator(DTNode<I> blockRoot, Splitter<I> splitter) { assert blockRoot.isBlockRoot(); ContextPair<I> newDiscr = splitter.getNewDiscriminator(); if (!blockRoot.getDiscriminator().equals(newDiscr)) { ContextPair<I> finalDiscriminator = prepareSplit(blockRoot...
[ "private", "void", "finalizeDiscriminator", "(", "DTNode", "<", "I", ">", "blockRoot", ",", "Splitter", "<", "I", ">", "splitter", ")", "{", "assert", "blockRoot", ".", "isBlockRoot", "(", ")", ";", "ContextPair", "<", "I", ">", "newDiscr", "=", "splitter"...
Finalize a discriminator. Given a block root and a {@link Splitter}, replace the discriminator at the block root by the one derived from the splitter, and update the discrimination tree accordingly. @param blockRoot the block root whose discriminator to finalize @param splitter the splitter to use for finalization
[ "Finalize", "a", "discriminator", ".", "Given", "a", "block", "root", "and", "a", "{", "@link", "Splitter", "}", "replace", "the", "discriminator", "at", "the", "block", "root", "by", "the", "one", "derived", "from", "the", "splitter", "and", "update", "th...
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/ttt-vpda/src/main/java/de/learnlib/algorithms/ttt/vpda/TTTLearnerVPDA.java#L299-L318
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/release/scm/git/GitCoordinator.java
GitCoordinator.pushDryRun
public void pushDryRun() throws Exception { """ This method uses the configured git credentials and repo, to test its validity. In addition, in case the user requested creation of a new tag, it checks that another tag with the same name doesn't exist """ if (releaseAction.isCreateVcsTag()) { ...
java
public void pushDryRun() throws Exception { if (releaseAction.isCreateVcsTag()) { if (scmManager.isTagExists(scmManager.getRemoteConfig(releaseAction.getTargetRemoteName()), releaseAction.getTagUrl())) { throw new Exception(String.format("Tag with name '%s' already exists", releaseAc...
[ "public", "void", "pushDryRun", "(", ")", "throws", "Exception", "{", "if", "(", "releaseAction", ".", "isCreateVcsTag", "(", ")", ")", "{", "if", "(", "scmManager", ".", "isTagExists", "(", "scmManager", ".", "getRemoteConfig", "(", "releaseAction", ".", "g...
This method uses the configured git credentials and repo, to test its validity. In addition, in case the user requested creation of a new tag, it checks that another tag with the same name doesn't exist
[ "This", "method", "uses", "the", "configured", "git", "credentials", "and", "repo", "to", "test", "its", "validity", ".", "In", "addition", "in", "case", "the", "user", "requested", "creation", "of", "a", "new", "tag", "it", "checks", "that", "another", "t...
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/git/GitCoordinator.java#L66-L83
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/JBossASClient.java
JBossASClient.getAttribute
public ModelNode getAttribute(boolean runtime, String attributeName, Address address) throws Exception { """ Convienence method that allows you to obtain a single attribute's value from a resource. @param runtime if <code>true</code>, the attribute to be retrieved is a runtime attribute @param attributeName th...
java
public ModelNode getAttribute(boolean runtime, String attributeName, Address address) throws Exception { final ModelNode op = createReadAttributeRequest(runtime, attributeName, address); final ModelNode results = execute(op); if (isSuccess(results)) { return getResults(results); ...
[ "public", "ModelNode", "getAttribute", "(", "boolean", "runtime", ",", "String", "attributeName", ",", "Address", "address", ")", "throws", "Exception", "{", "final", "ModelNode", "op", "=", "createReadAttributeRequest", "(", "runtime", ",", "attributeName", ",", ...
Convienence method that allows you to obtain a single attribute's value from a resource. @param runtime if <code>true</code>, the attribute to be retrieved is a runtime attribute @param attributeName the attribute whose value is to be returned @param address identifies the resource @return the attribute value @throws...
[ "Convienence", "method", "that", "allows", "you", "to", "obtain", "a", "single", "attribute", "s", "value", "from", "a", "resource", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/JBossASClient.java#L361-L370
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/util/LevenshteinDistance.java
LevenshteinDistance.getDistance
public static int getDistance (@Nullable final char [] aStr1, @Nullable final char [] aStr2) { """ Get the distance of the 2 strings, using the costs 1 for insertion, deletion and substitution. @param aStr1 First string. @param aStr2 Second string. @return The Levenshtein distance. """ final int nL...
java
public static int getDistance (@Nullable final char [] aStr1, @Nullable final char [] aStr2) { final int nLen1 = aStr1 == null ? 0 : aStr1.length; final int nLen2 = aStr2 == null ? 0 : aStr2.length; if (nLen1 == 0) return nLen2; if (nLen2 == 0) return nLen1; return _getDistance111 (a...
[ "public", "static", "int", "getDistance", "(", "@", "Nullable", "final", "char", "[", "]", "aStr1", ",", "@", "Nullable", "final", "char", "[", "]", "aStr2", ")", "{", "final", "int", "nLen1", "=", "aStr1", "==", "null", "?", "0", ":", "aStr1", ".", ...
Get the distance of the 2 strings, using the costs 1 for insertion, deletion and substitution. @param aStr1 First string. @param aStr2 Second string. @return The Levenshtein distance.
[ "Get", "the", "distance", "of", "the", "2", "strings", "using", "the", "costs", "1", "for", "insertion", "deletion", "and", "substitution", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/util/LevenshteinDistance.java#L163-L174
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/DashboardDto.java
DashboardDto.transformToDto
public static List<DashboardDto> transformToDto(List<Dashboard> dashboards) { """ Converts list of dashboard entity objects to list of dashboardDto objects. @param dashboards List of dashboard entities. Cannot be null. @return List of dashboard objects. @throws WebApplicationException If an error oc...
java
public static List<DashboardDto> transformToDto(List<Dashboard> dashboards) { if (dashboards == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } List<DashboardDto> result = new ArrayList<DashboardDto>...
[ "public", "static", "List", "<", "DashboardDto", ">", "transformToDto", "(", "List", "<", "Dashboard", ">", "dashboards", ")", "{", "if", "(", "dashboards", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be con...
Converts list of dashboard entity objects to list of dashboardDto objects. @param dashboards List of dashboard entities. Cannot be null. @return List of dashboard objects. @throws WebApplicationException If an error occurs.
[ "Converts", "list", "of", "dashboard", "entity", "objects", "to", "list", "of", "dashboardDto", "objects", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/DashboardDto.java#L97-L108
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/externallink/CmsEditExternalLinkDialog.java
CmsEditExternalLinkDialog.initContent
protected void initContent(CmsExternalLinkInfoBean linkInfo) { """ Initializes the dialog content.<p> @param linkInfo the link info bean """ CmsPushButton closeButton = new CmsPushButton(); closeButton.setText(Messages.get().key(Messages.GUI_CANCEL_0)); closeButton.setUseMinWidth(tr...
java
protected void initContent(CmsExternalLinkInfoBean linkInfo) { CmsPushButton closeButton = new CmsPushButton(); closeButton.setText(Messages.get().key(Messages.GUI_CANCEL_0)); closeButton.setUseMinWidth(true); closeButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE); close...
[ "protected", "void", "initContent", "(", "CmsExternalLinkInfoBean", "linkInfo", ")", "{", "CmsPushButton", "closeButton", "=", "new", "CmsPushButton", "(", ")", ";", "closeButton", ".", "setText", "(", "Messages", ".", "get", "(", ")", ".", "key", "(", "Messag...
Initializes the dialog content.<p> @param linkInfo the link info bean
[ "Initializes", "the", "dialog", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/externallink/CmsEditExternalLinkDialog.java#L237-L304
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/DefaultConfigurableOptionsFactory.java
DefaultConfigurableOptionsFactory.checkArgumentValid
private static boolean checkArgumentValid(String key, String value) { """ Helper method to check whether the (key,value) is valid through given configuration and returns the formatted value. @param key The configuration key which is configurable in {@link RocksDBConfigurableOptions}. @param value The value wit...
java
private static boolean checkArgumentValid(String key, String value) { if (POSITIVE_INT_CONFIG_SET.contains(key)) { Preconditions.checkArgument(Integer.parseInt(value) > 0, "Configured value for key: " + key + " must be larger than 0."); } else if (SIZE_CONFIG_SET.contains(key)) { Preconditions.checkArgu...
[ "private", "static", "boolean", "checkArgumentValid", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "POSITIVE_INT_CONFIG_SET", ".", "contains", "(", "key", ")", ")", "{", "Preconditions", ".", "checkArgument", "(", "Integer", ".", "parseIn...
Helper method to check whether the (key,value) is valid through given configuration and returns the formatted value. @param key The configuration key which is configurable in {@link RocksDBConfigurableOptions}. @param value The value within given configuration. @return whether the given key and value in string format...
[ "Helper", "method", "to", "check", "whether", "the", "(", "key", "value", ")", "is", "valid", "through", "given", "configuration", "and", "returns", "the", "formatted", "value", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/DefaultConfigurableOptionsFactory.java#L380-L399
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSession.java
CmsUgcSession.createXmlContent
public CmsResource createXmlContent() throws CmsUgcException { """ Creates a new edit resource.<p> @return the newly created resource @throws CmsUgcException if creating the resource fails """ checkNotFinished(); checkEditResourceNotSet(); CmsUgcSessionSecurityUtil.checkCreateCo...
java
public CmsResource createXmlContent() throws CmsUgcException { checkNotFinished(); checkEditResourceNotSet(); CmsUgcSessionSecurityUtil.checkCreateContent(m_cms, m_configuration); try { I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(m_configuration.ge...
[ "public", "CmsResource", "createXmlContent", "(", ")", "throws", "CmsUgcException", "{", "checkNotFinished", "(", ")", ";", "checkEditResourceNotSet", "(", ")", ";", "CmsUgcSessionSecurityUtil", ".", "checkCreateContent", "(", "m_cms", ",", "m_configuration", ")", ";"...
Creates a new edit resource.<p> @return the newly created resource @throws CmsUgcException if creating the resource fails
[ "Creates", "a", "new", "edit", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSession.java#L301-L315
schallee/alib4j
core/src/main/java/net/darkmist/alib/io/Serializer.java
Serializer.serializeToStream
public static <T extends Serializable> void serializeToStream(T obj, OutputStream out) throws IOException { """ Write one object serilized to a output stream. @param obj The Object to serilize. @param out The output stream to write it to. This will be closed! """ ObjectOutputStream objOut; if(out instan...
java
public static <T extends Serializable> void serializeToStream(T obj, OutputStream out) throws IOException { ObjectOutputStream objOut; if(out instanceof ObjectOutputStream) objOut = (ObjectOutputStream)out; else objOut = new ObjectOutputStream(out); objOut.writeObject(obj); objOut.close(); }
[ "public", "static", "<", "T", "extends", "Serializable", ">", "void", "serializeToStream", "(", "T", "obj", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "ObjectOutputStream", "objOut", ";", "if", "(", "out", "instanceof", "ObjectOutputStream", ...
Write one object serilized to a output stream. @param obj The Object to serilize. @param out The output stream to write it to. This will be closed!
[ "Write", "one", "object", "serilized", "to", "a", "output", "stream", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/core/src/main/java/net/darkmist/alib/io/Serializer.java#L80-L90
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java
RouteFilterRulesInner.beginUpdateAsync
public Observable<RouteFilterRuleInner> beginUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, PatchRouteFilterRule routeFilterRuleParameters) { """ Updates a route in the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The na...
java
public Observable<RouteFilterRuleInner> beginUpdateAsync(String resourceGroupName, String routeFilterName, String ruleName, PatchRouteFilterRule routeFilterRuleParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).map(new Func1<ServiceR...
[ "public", "Observable", "<", "RouteFilterRuleInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "String", "ruleName", ",", "PatchRouteFilterRule", "routeFilterRuleParameters", ")", "{", "return", "beginUpdateWithServi...
Updates a route in the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param ruleName The name of the route filter rule. @param routeFilterRuleParameters Parameters supplied to the update route filter rule operation. @throws Illegal...
[ "Updates", "a", "route", "in", "the", "specified", "route", "filter", "." ]
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/RouteFilterRulesInner.java#L665-L672
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/DefaultPushNotificationMessage.java
DefaultPushNotificationMessage.withData
public DefaultPushNotificationMessage withData(java.util.Map<String, String> data) { """ The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pi...
java
public DefaultPushNotificationMessage withData(java.util.Map<String, String> data) { setData(data); return this; }
[ "public", "DefaultPushNotificationMessage", "withData", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "setData", "(", "data", ")", ";", "return", "this", ";", "}" ]
The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @param data The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object @return Returns a reference to this object so that method calls can be chai...
[ "The", "data", "payload", "used", "for", "a", "silent", "push", ".", "This", "payload", "is", "added", "to", "the", "notifications", "data", ".", "pinpoint", ".", "jsonBody", "object" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/DefaultPushNotificationMessage.java#L228-L231
morimekta/utils
io-util/src/main/java/net/morimekta/util/FileWatcher.java
FileWatcher.addWatcher
public void addWatcher(Path file, Listener watcher) { """ Start watching file path and notify watcher for updates on that file. @param file The file path to watch. @param watcher The watcher to be notified. """ if (file == null) throw new IllegalArgumentException("Null file argument"); if (...
java
public void addWatcher(Path file, Listener watcher) { if (file == null) throw new IllegalArgumentException("Null file argument"); if (watcher == null) throw new IllegalArgumentException("Null watcher argument"); synchronized (mutex) { startWatchingInternal(file).add(() -> watcher); ...
[ "public", "void", "addWatcher", "(", "Path", "file", ",", "Listener", "watcher", ")", "{", "if", "(", "file", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Null file argument\"", ")", ";", "if", "(", "watcher", "==", "null", ")", "...
Start watching file path and notify watcher for updates on that file. @param file The file path to watch. @param watcher The watcher to be notified.
[ "Start", "watching", "file", "path", "and", "notify", "watcher", "for", "updates", "on", "that", "file", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/FileWatcher.java#L198-L204
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
PageFlowActionServlet.moduleCanHandlePath
protected boolean moduleCanHandlePath( ModuleConfig moduleConfig, RequestProcessor rp, String servletPath ) { """ Tell whether the given module can handle the given path. If this is the root module (path=="") and it's a Page Flow module, then it shouldn't try to handle any path that has a slash in it -- it only ...
java
protected boolean moduleCanHandlePath( ModuleConfig moduleConfig, RequestProcessor rp, String servletPath ) { if ( moduleConfig.getPrefix().equals( "" ) && servletPath.lastIndexOf( '/' ) > 0 && rp instanceof PageFlowRequestProcessor ) { return false; } ...
[ "protected", "boolean", "moduleCanHandlePath", "(", "ModuleConfig", "moduleConfig", ",", "RequestProcessor", "rp", ",", "String", "servletPath", ")", "{", "if", "(", "moduleConfig", ".", "getPrefix", "(", ")", ".", "equals", "(", "\"\"", ")", "&&", "servletPath"...
Tell whether the given module can handle the given path. If this is the root module (path=="") and it's a Page Flow module, then it shouldn't try to handle any path that has a slash in it -- it only handles local actions.
[ "Tell", "whether", "the", "given", "module", "can", "handle", "the", "given", "path", ".", "If", "this", "is", "the", "root", "module", "(", "path", "==", ")", "and", "it", "s", "a", "Page", "Flow", "module", "then", "it", "shouldn", "t", "try", "to"...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java#L194-L203
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java
NamespacesInner.getByResourceGroup
public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) { """ Returns the description for the specified namespace. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @throws IllegalArgumentException thrown if parameters fa...
java
public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); }
[ "public", "NamespaceResourceInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "namespaceName", ")", ".", "toBlocking", "(", ")", ...
Returns the description for the specified namespace. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException al...
[ "Returns", "the", "description", "for", "the", "specified", "namespace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java#L578-L580
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/Other/CommonAhoCorasickSegmentUtil.java
CommonAhoCorasickSegmentUtil.segmentReverseOrder
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(final char[] charArray, AhoCorasickDoubleArrayTrie<V> trie) { """ 逆向最长分词,合并未知语素 @param charArray 文本 @param trie 自动机 @param <V> 类型 @return 结果链表 """ LinkedList<ResultTerm<V>> termList = new LinkedList<ResultTerm<V>>(); final Resu...
java
public static <V> LinkedList<ResultTerm<V>> segmentReverseOrder(final char[] charArray, AhoCorasickDoubleArrayTrie<V> trie) { LinkedList<ResultTerm<V>> termList = new LinkedList<ResultTerm<V>>(); final ResultTerm<V>[] wordNet = new ResultTerm[charArray.length + 1]; trie.parseText(charArray, ...
[ "public", "static", "<", "V", ">", "LinkedList", "<", "ResultTerm", "<", "V", ">", ">", "segmentReverseOrder", "(", "final", "char", "[", "]", "charArray", ",", "AhoCorasickDoubleArrayTrie", "<", "V", ">", "trie", ")", "{", "LinkedList", "<", "ResultTerm", ...
逆向最长分词,合并未知语素 @param charArray 文本 @param trie 自动机 @param <V> 类型 @return 结果链表
[ "逆向最长分词,合并未知语素" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/Other/CommonAhoCorasickSegmentUtil.java#L102-L139
jcuda/jcurand
JCurandJava/src/main/java/jcuda/jcurand/JCurand.java
JCurand.curandGenerateUniformDouble
public static int curandGenerateUniformDouble(curandGenerator generator, Pointer outputPtr, long num) { """ <pre> Generate uniformly distributed doubles. Use generator to generate num double results into the device memory at outputPtr. The device memory must have been previously allocated and be large enoug...
java
public static int curandGenerateUniformDouble(curandGenerator generator, Pointer outputPtr, long num) { return checkResult(curandGenerateUniformDoubleNative(generator, outputPtr, num)); }
[ "public", "static", "int", "curandGenerateUniformDouble", "(", "curandGenerator", "generator", ",", "Pointer", "outputPtr", ",", "long", "num", ")", "{", "return", "checkResult", "(", "curandGenerateUniformDoubleNative", "(", "generator", ",", "outputPtr", ",", "num",...
<pre> Generate uniformly distributed doubles. Use generator to generate num double results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no ...
[ "<pre", ">", "Generate", "uniformly", "distributed", "doubles", "." ]
train
https://github.com/jcuda/jcurand/blob/0f463d2bb72cd93b3988f7ce148cdb6069ba4fd9/JCurandJava/src/main/java/jcuda/jcurand/JCurand.java#L629-L632
aol/cyclops
cyclops/src/main/java/cyclops/companion/Functions.java
Functions.mapLongs
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> mapLongs(LongUnaryOperator b) { """ /* Fluent transform operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.mapLongs; ReactiveSeq.ofLongs(1l,2l,3l) .to(mapLongs(i->i*2)); //[2l,4l,6l] } </pr...
java
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> mapLongs(LongUnaryOperator b){ return a->a.longs(i->i,s->s.map(b)); }
[ "public", "static", "Function", "<", "?", "super", "ReactiveSeq", "<", "Long", ">", ",", "?", "extends", "ReactiveSeq", "<", "Long", ">", ">", "mapLongs", "(", "LongUnaryOperator", "b", ")", "{", "return", "a", "->", "a", ".", "longs", "(", "i", "->", ...
/* Fluent transform operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.mapLongs; ReactiveSeq.ofLongs(1l,2l,3l) .to(mapLongs(i->i*2)); //[2l,4l,6l] } </pre>
[ "/", "*", "Fluent", "transform", "operation", "using", "primitive", "types", "e", ".", "g", ".", "<pre", ">", "{", "@code", "import", "static", "cyclops", ".", "ReactiveSeq", ".", "mapLongs", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L376-L379
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java
ResourceXMLParser.parseEntSubAttributes
private void parseEntSubAttributes(final Entity ent, final Node node) throws ResourceXMLParserException { """ Parse the DOM attributes as properties for the particular entity node type @param ent Entity object @param node entity DOM node @throws ResourceXMLParserException if the DOM node is an unexpected t...
java
private void parseEntSubAttributes(final Entity ent, final Node node) throws ResourceXMLParserException { final Element node1 = (Element) node; //load all sub elements called "attribute" as properties for (final Object attribute : node1.selectNodes(ATTRIBUTE_TAG)) { Element attr=(Ele...
[ "private", "void", "parseEntSubAttributes", "(", "final", "Entity", "ent", ",", "final", "Node", "node", ")", "throws", "ResourceXMLParserException", "{", "final", "Element", "node1", "=", "(", "Element", ")", "node", ";", "//load all sub elements called \"attribute\"...
Parse the DOM attributes as properties for the particular entity node type @param ent Entity object @param node entity DOM node @throws ResourceXMLParserException if the DOM node is an unexpected tag name
[ "Parse", "the", "DOM", "attributes", "as", "properties", "for", "the", "particular", "entity", "node", "type" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java#L246-L273
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java
PdfContext.drawText
public void drawText(String text, Font font, Rectangle box, Color fontColor) { """ Draw text in the center of the specified box. @param text text @param font font @param box box to put text int @param fontColor colour """ template.saveState(); // get the font DefaultFontMapper mapper = new DefaultF...
java
public void drawText(String text, Font font, Rectangle box, Color fontColor) { template.saveState(); // get the font DefaultFontMapper mapper = new DefaultFontMapper(); BaseFont bf = mapper.awtToPdf(font); template.setFontAndSize(bf, font.getSize()); // calculate descent float descent = 0; if (text != ...
[ "public", "void", "drawText", "(", "String", "text", ",", "Font", "font", ",", "Rectangle", "box", ",", "Color", "fontColor", ")", "{", "template", ".", "saveState", "(", ")", ";", "// get the font", "DefaultFontMapper", "mapper", "=", "new", "DefaultFontMappe...
Draw text in the center of the specified box. @param text text @param font font @param box box to put text int @param fontColor colour
[ "Draw", "text", "in", "the", "center", "of", "the", "specified", "box", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java#L160-L184
lotaris/minirox-client-java
src/main/java/com/lotaris/minirox/client/MiniRoxConnector.java
MiniRoxConnector.notifyEnd
public void notifyEnd(String projectName, String projectVersion, String category, long duration) { """ Send a ending notification to Mini ROX @param projectName The project name @param projectVersion The project version @param category The category @param duration The duration of the test run """ try {...
java
public void notifyEnd(String projectName, String projectVersion, String category, long duration) { try { if (isStarted()) { JSONObject endNotification = new JSONObject(). put("project", new JSONObject(). put("name", projectName). put("version", projectVersion) ). put("category", cate...
[ "public", "void", "notifyEnd", "(", "String", "projectName", ",", "String", "projectVersion", ",", "String", "category", ",", "long", "duration", ")", "{", "try", "{", "if", "(", "isStarted", "(", ")", ")", "{", "JSONObject", "endNotification", "=", "new", ...
Send a ending notification to Mini ROX @param projectName The project name @param projectVersion The project version @param category The category @param duration The duration of the test run
[ "Send", "a", "ending", "notification", "to", "Mini", "ROX" ]
train
https://github.com/lotaris/minirox-client-java/blob/56fc0e22210d4fbaaa2b47aa9f8c504379b57dad/src/main/java/com/lotaris/minirox/client/MiniRoxConnector.java#L130-L154
code4everything/util
src/main/java/com/zhazhapan/util/common/interceptor/ToStringMethodInterceptor.java
ToStringMethodInterceptor.intercept
@Override public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable { """ 此方法实现了cglib的动态代理 @param o {@link Object} @param method {@link Method} @param objects {@link Object[]} @param methodProxy {@link MethodProxy} @return {@link Object} @throws Th...
java
@Override public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable { return methodProxy.invokeSuper(o, objects); }
[ "@", "Override", "public", "Object", "intercept", "(", "Object", "o", ",", "Method", "method", ",", "Object", "[", "]", "objects", ",", "MethodProxy", "methodProxy", ")", "throws", "Throwable", "{", "return", "methodProxy", ".", "invokeSuper", "(", "o", ",",...
此方法实现了cglib的动态代理 @param o {@link Object} @param method {@link Method} @param objects {@link Object[]} @param methodProxy {@link MethodProxy} @return {@link Object} @throws Throwable 异常
[ "此方法实现了cglib的动态代理" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/common/interceptor/ToStringMethodInterceptor.java#L29-L32
pnikosis/materialish-progress
library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java
ProgressWheel.onSizeChanged
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { """ Use onSizeChanged instead of onAttachedToWindow to get the dimensions of the view, because this method is called after measuring the dimensions of MATCH_PARENT & WRAP_CONTENT. Use this dimensions to setup the bounds and paints. ""...
java
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); setupBounds(w, h); setupPaints(); invalidate(); }
[ "@", "Override", "protected", "void", "onSizeChanged", "(", "int", "w", ",", "int", "h", ",", "int", "oldw", ",", "int", "oldh", ")", "{", "super", ".", "onSizeChanged", "(", "w", ",", "h", ",", "oldw", ",", "oldh", ")", ";", "setupBounds", "(", "w...
Use onSizeChanged instead of onAttachedToWindow to get the dimensions of the view, because this method is called after measuring the dimensions of MATCH_PARENT & WRAP_CONTENT. Use this dimensions to setup the bounds and paints.
[ "Use", "onSizeChanged", "instead", "of", "onAttachedToWindow", "to", "get", "the", "dimensions", "of", "the", "view", "because", "this", "method", "is", "called", "after", "measuring", "the", "dimensions", "of", "MATCH_PARENT", "&", "WRAP_CONTENT", ".", "Use", "...
train
https://github.com/pnikosis/materialish-progress/blob/f82831e11c81a4385cdd5bf4ced93e5ecd93550d/library/src/main/java/com/pnikosis/materialishprogress/ProgressWheel.java#L161-L167
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ParameterMapper.java
ParameterMapper.findMethod
public static Method findMethod(Class<?> c, String methodName) { """ Find method method. @param c the c @param methodName the method name @return the method """ for (Method m : c.getMethods()) { if (!m.getName().equalsIgnoreCase(methodName)) { continue; ...
java
public static Method findMethod(Class<?> c, String methodName) { for (Method m : c.getMethods()) { if (!m.getName().equalsIgnoreCase(methodName)) { continue; } if (m.getParameterCount() != 1) { continue; } return m; ...
[ "public", "static", "Method", "findMethod", "(", "Class", "<", "?", ">", "c", ",", "String", "methodName", ")", "{", "for", "(", "Method", "m", ":", "c", ".", "getMethods", "(", ")", ")", "{", "if", "(", "!", "m", ".", "getName", "(", ")", ".", ...
Find method method. @param c the c @param methodName the method name @return the method
[ "Find", "method", "method", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ParameterMapper.java#L92-L104
Omertron/api-fanarttv
src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java
ArtworkList.addArtwork
public void addArtwork(FTArtworkType artworkType, List<FTArtwork> artworkList) { """ Add artwork to the list @param artworkType @param artworkList """ artwork.put(artworkType, artworkList); }
java
public void addArtwork(FTArtworkType artworkType, List<FTArtwork> artworkList) { artwork.put(artworkType, artworkList); }
[ "public", "void", "addArtwork", "(", "FTArtworkType", "artworkType", ",", "List", "<", "FTArtwork", ">", "artworkList", ")", "{", "artwork", ".", "put", "(", "artworkType", ",", "artworkList", ")", ";", "}" ]
Add artwork to the list @param artworkType @param artworkList
[ "Add", "artwork", "to", "the", "list" ]
train
https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java#L47-L49
kaazing/gateway
service/http.directory/src/main/java/org/kaazing/gateway/service/http/directory/cachecontrol/CacheControlHandler.java
CacheControlHandler.parseMaxAgeMplus
private String parseMaxAgeMplus(String value, long lastModified) { """ Parse value for a max-age (m + N value), according to the requested file's last modified date @param value @param lastModified @return max-age parsed value """ long currentTimeMillis = System.currentTimeMillis(); return L...
java
private String parseMaxAgeMplus(String value, long lastModified) { long currentTimeMillis = System.currentTimeMillis(); return Long.toString(Long.parseLong(value) + (lastModified - currentTimeMillis) / 1000); }
[ "private", "String", "parseMaxAgeMplus", "(", "String", "value", ",", "long", "lastModified", ")", "{", "long", "currentTimeMillis", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "return", "Long", ".", "toString", "(", "Long", ".", "parseLong", "(", ...
Parse value for a max-age (m + N value), according to the requested file's last modified date @param value @param lastModified @return max-age parsed value
[ "Parse", "value", "for", "a", "max", "-", "age", "(", "m", "+", "N", "value", ")", "according", "to", "the", "requested", "file", "s", "last", "modified", "date" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/http.directory/src/main/java/org/kaazing/gateway/service/http/directory/cachecontrol/CacheControlHandler.java#L118-L121
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixMemberName
@Fix(IssueCodes.INVALID_MEMBER_NAME) public void fixMemberName(final Issue issue, IssueResolutionAcceptor acceptor) { """ Quick fix for "Invalid member name". @param issue the issue. @param acceptor the quick fix acceptor. """ MemberRenameModification.accept(this, issue, acceptor); MemberRemoveModific...
java
@Fix(IssueCodes.INVALID_MEMBER_NAME) public void fixMemberName(final Issue issue, IssueResolutionAcceptor acceptor) { MemberRenameModification.accept(this, issue, acceptor); MemberRemoveModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "IssueCodes", ".", "INVALID_MEMBER_NAME", ")", "public", "void", "fixMemberName", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")", "{", "MemberRenameModification", ".", "accept", "(", "this", ",", "issue", ",", "a...
Quick fix for "Invalid member name". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Invalid", "member", "name", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L718-L722
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnCTCLoss
public static int cudnnCTCLoss( cudnnHandle handle, cudnnTensorDescriptor probsDesc, /** Tensor descriptor for probabilities, the dimensions are T,N,A (T is the timing steps, N is the mini batch size, A is the alphabet size) */ Pointer probs, /** probabilities after s...
java
public static int cudnnCTCLoss( cudnnHandle handle, cudnnTensorDescriptor probsDesc, /** Tensor descriptor for probabilities, the dimensions are T,N,A (T is the timing steps, N is the mini batch size, A is the alphabet size) */ Pointer probs, /** probabilities after s...
[ "public", "static", "int", "cudnnCTCLoss", "(", "cudnnHandle", "handle", ",", "cudnnTensorDescriptor", "probsDesc", ",", "/** Tensor descriptor for probabilities, the dimensions are T,N,A (T is the timing steps, N is the\n mini batch size, A is the alphabet size) */",...
return the ctc costs and gradients, given the probabilities and labels
[ "return", "the", "ctc", "costs", "and", "gradients", "given", "the", "probabilities", "and", "labels" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L3673-L3690
sebastiangraf/treetank
interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/StorageManager.java
StorageManager.getSession
public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { """ Retrieve a session from the system for the given Storagename @param resourceName @return a new {@link ISession} for the resource @throws ResourceNotExistingException @throws TTException """ ...
java
public static ISession getSession(String resourceName) throws ResourceNotExistingException, TTException { File storageFile = new File(STORAGE_PATH); ISession session = null; if (!storageFile.exists()) { throw new ResourceNotExistingException(); } else { new Stor...
[ "public", "static", "ISession", "getSession", "(", "String", "resourceName", ")", "throws", "ResourceNotExistingException", ",", "TTException", "{", "File", "storageFile", "=", "new", "File", "(", "STORAGE_PATH", ")", ";", "ISession", "session", "=", "null", ";", ...
Retrieve a session from the system for the given Storagename @param resourceName @return a new {@link ISession} for the resource @throws ResourceNotExistingException @throws TTException
[ "Retrieve", "a", "session", "from", "the", "system", "for", "the", "given", "Storagename" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/StorageManager.java#L124-L141
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.applyColumnFilter
public void applyColumnFilter(String column, ChangeValue changeValue) throws Exception { """ Apply filter to a column to change values from say numberic to nominal based on some range @param column @param changeValue @throws Exception """ for (String row : rowLookup.keySet()) { String oldValue = thi...
java
public void applyColumnFilter(String column, ChangeValue changeValue) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = changeValue.change(oldValue); this.addCell(row, column, newValue); } }
[ "public", "void", "applyColumnFilter", "(", "String", "column", ",", "ChangeValue", "changeValue", ")", "throws", "Exception", "{", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", "{", "String", "oldValue", "=", "this", ".", "g...
Apply filter to a column to change values from say numberic to nominal based on some range @param column @param changeValue @throws Exception
[ "Apply", "filter", "to", "a", "column", "to", "change", "values", "from", "say", "numberic", "to", "nominal", "based", "on", "some", "range" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L635-L641
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java
JMElasticsearchSearchAndCount.searchAll
public SearchResponse searchAll(String index, String type, AggregationBuilder[] aggregationBuilders) { """ Search all search response. @param index the index @param type the type @param aggregationBuilders the aggregation builders @return the search response """ ...
java
public SearchResponse searchAll(String index, String type, AggregationBuilder[] aggregationBuilders) { return searchAll(index, type, null, aggregationBuilders); }
[ "public", "SearchResponse", "searchAll", "(", "String", "index", ",", "String", "type", ",", "AggregationBuilder", "[", "]", "aggregationBuilders", ")", "{", "return", "searchAll", "(", "index", ",", "type", ",", "null", ",", "aggregationBuilders", ")", ";", "...
Search all search response. @param index the index @param type the type @param aggregationBuilders the aggregation builders @return the search response
[ "Search", "all", "search", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java#L483-L486
JM-Lab/utils-java8
src/main/java/kr/jm/utils/stats/JMStats.java
JMStats.roundWithPlace
public static double roundWithPlace(double doubleNumber, int place) { """ Round with place double. @param doubleNumber the double number @param place the place @return the double """ double pow = pow(10, place); return Math.round(doubleNumber / pow) * pow; }
java
public static double roundWithPlace(double doubleNumber, int place) { double pow = pow(10, place); return Math.round(doubleNumber / pow) * pow; }
[ "public", "static", "double", "roundWithPlace", "(", "double", "doubleNumber", ",", "int", "place", ")", "{", "double", "pow", "=", "pow", "(", "10", ",", "place", ")", ";", "return", "Math", ".", "round", "(", "doubleNumber", "/", "pow", ")", "*", "po...
Round with place double. @param doubleNumber the double number @param place the place @return the double
[ "Round", "with", "place", "double", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/stats/JMStats.java#L269-L273
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/ItemListBox.java
ItemListBox.insertItem
public void insertItem (T item, int index, String label) { """ Inserts the supplied item into this list box at the specified position, using the specified label if given. If no label is given, {@link #toLabel(Object)} is used to calculate it. """ insertItem(label == null ? toLabel(item) : label, index...
java
public void insertItem (T item, int index, String label) { insertItem(label == null ? toLabel(item) : label, index); _items.add(index, item); }
[ "public", "void", "insertItem", "(", "T", "item", ",", "int", "index", ",", "String", "label", ")", "{", "insertItem", "(", "label", "==", "null", "?", "toLabel", "(", "item", ")", ":", "label", ",", "index", ")", ";", "_items", ".", "add", "(", "i...
Inserts the supplied item into this list box at the specified position, using the specified label if given. If no label is given, {@link #toLabel(Object)} is used to calculate it.
[ "Inserts", "the", "supplied", "item", "into", "this", "list", "box", "at", "the", "specified", "position", "using", "the", "specified", "label", "if", "given", ".", "If", "no", "label", "is", "given", "{" ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/ItemListBox.java#L140-L144
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/response/ResponseBuilder.java
ResponseBuilder.withSpeech
public ResponseBuilder withSpeech(String speechText, com.amazon.ask.model.ui.PlayBehavior playBehavior) { """ Sets {@link OutputSpeech} on the response. Speech is always wrapped in SSML tags. @param speechText speech text @param playBehavior determines the queuing and playback of this output speech @return re...
java
public ResponseBuilder withSpeech(String speechText, com.amazon.ask.model.ui.PlayBehavior playBehavior) { this.speech = SsmlOutputSpeech.builder() .withSsml("<speak>" + trimOutputSpeech(speechText) + "</speak>") .withPlayBehavior(playBehavior) .build(); re...
[ "public", "ResponseBuilder", "withSpeech", "(", "String", "speechText", ",", "com", ".", "amazon", ".", "ask", ".", "model", ".", "ui", ".", "PlayBehavior", "playBehavior", ")", "{", "this", ".", "speech", "=", "SsmlOutputSpeech", ".", "builder", "(", ")", ...
Sets {@link OutputSpeech} on the response. Speech is always wrapped in SSML tags. @param speechText speech text @param playBehavior determines the queuing and playback of this output speech @return response builder
[ "Sets", "{", "@link", "OutputSpeech", "}", "on", "the", "response", ".", "Speech", "is", "always", "wrapped", "in", "SSML", "tags", "." ]
train
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/response/ResponseBuilder.java#L92-L98
VoltDB/voltdb
src/frontend/org/voltdb/utils/MiscUtils.java
MiscUtils.copyFile
public static void copyFile(String fromPath, String toPath) throws Exception { """ Simple code to copy a file from one place to another... Java should have this built in... stupid java... """ File inputFile = new File(fromPath); File outputFile = new File(toPath); com.google_voltpatche...
java
public static void copyFile(String fromPath, String toPath) throws Exception { File inputFile = new File(fromPath); File outputFile = new File(toPath); com.google_voltpatches.common.io.Files.copy(inputFile, outputFile); }
[ "public", "static", "void", "copyFile", "(", "String", "fromPath", ",", "String", "toPath", ")", "throws", "Exception", "{", "File", "inputFile", "=", "new", "File", "(", "fromPath", ")", ";", "File", "outputFile", "=", "new", "File", "(", "toPath", ")", ...
Simple code to copy a file from one place to another... Java should have this built in... stupid java...
[ "Simple", "code", "to", "copy", "a", "file", "from", "one", "place", "to", "another", "...", "Java", "should", "have", "this", "built", "in", "...", "stupid", "java", "..." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/MiscUtils.java#L92-L96
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/util/MathUtils.java
MathUtils.squaredLoss
public static double squaredLoss(double[] x, double[] y, double w_0, double w_1) { """ This will return the squared loss of the given points @param x the x coordinates to use @param y the y coordinates to use @param w_0 the first weight @param w_1 the second weight @return the squared loss of the given poi...
java
public static double squaredLoss(double[] x, double[] y, double w_0, double w_1) { double sum = 0; for (int j = 0; j < x.length; j++) { sum += Math.pow((y[j] - (w_1 * x[j] + w_0)), 2); } return sum; }
[ "public", "static", "double", "squaredLoss", "(", "double", "[", "]", "x", ",", "double", "[", "]", "y", ",", "double", "w_0", ",", "double", "w_1", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "x",...
This will return the squared loss of the given points @param x the x coordinates to use @param y the y coordinates to use @param w_0 the first weight @param w_1 the second weight @return the squared loss of the given points
[ "This", "will", "return", "the", "squared", "loss", "of", "the", "given", "points", "@param", "x", "the", "x", "coordinates", "to", "use", "@param", "y", "the", "y", "coordinates", "to", "use", "@param", "w_0", "the", "first", "weight" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/util/MathUtils.java#L408-L414
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/core/GenericTypeResolver.java
GenericTypeResolver.resolveTypeArguments
public static Class<?>[] resolveTypeArguments(Class<?> clazz, Class<?> genericIfc) { """ Resolve the type arguments of the given generic interface against the given target class which is assumed to implement the generic interface and possibly declare concrete types for its type variables. @param clazz the targe...
java
public static Class<?>[] resolveTypeArguments(Class<?> clazz, Class<?> genericIfc) { return doResolveTypeArguments(clazz, clazz, genericIfc); }
[ "public", "static", "Class", "<", "?", ">", "[", "]", "resolveTypeArguments", "(", "Class", "<", "?", ">", "clazz", ",", "Class", "<", "?", ">", "genericIfc", ")", "{", "return", "doResolveTypeArguments", "(", "clazz", ",", "clazz", ",", "genericIfc", ")...
Resolve the type arguments of the given generic interface against the given target class which is assumed to implement the generic interface and possibly declare concrete types for its type variables. @param clazz the target class to check against @param genericIfc the generic interface or superclass to resolve the typ...
[ "Resolve", "the", "type", "arguments", "of", "the", "given", "generic", "interface", "against", "the", "given", "target", "class", "which", "is", "assumed", "to", "implement", "the", "generic", "interface", "and", "possibly", "declare", "concrete", "types", "for...
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/GenericTypeResolver.java#L258-L260
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/manifest/BaseRenderer.java
BaseRenderer.addColumn
public Column addColumn(Grid grid, String label, String width, String sortBy) { """ Adds a column to a grid. @param grid Grid. @param label Label for column. @param width Width for column. @param sortBy Field for sorting. @return Newly created column. """ Column column = new Column(); gr...
java
public Column addColumn(Grid grid, String label, String width, String sortBy) { Column column = new Column(); grid.getColumns().addChild(column); column.setLabel(label); column.setWidth(width); column.setSortComparator(sortBy); column.setSortOrder(SortOrder.ASCENDING); ...
[ "public", "Column", "addColumn", "(", "Grid", "grid", ",", "String", "label", ",", "String", "width", ",", "String", "sortBy", ")", "{", "Column", "column", "=", "new", "Column", "(", ")", ";", "grid", ".", "getColumns", "(", ")", ".", "addChild", "(",...
Adds a column to a grid. @param grid Grid. @param label Label for column. @param width Width for column. @param sortBy Field for sorting. @return Newly created column.
[ "Adds", "a", "column", "to", "a", "grid", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/manifest/BaseRenderer.java#L57-L65
knowm/XChange
xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/BitcoindeAdapters.java
BitcoindeAdapters.adaptTrades
public static Trades adaptTrades( BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair) { """ Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeTrade[] object to a Trades object. @param bitcoindeTradesWrapper Exchange specific trades @param currencyPair (e.g. BTC/USD) @retu...
java
public static Trades adaptTrades( BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair) { List<Trade> trades = new ArrayList<>(); long lastTradeId = 0; for (BitcoindeTrade bitcoindeTrade : bitcoindeTradesWrapper.getTrades()) { final long tid = bitcoindeTrade.getTid(); ...
[ "public", "static", "Trades", "adaptTrades", "(", "BitcoindeTradesWrapper", "bitcoindeTradesWrapper", ",", "CurrencyPair", "currencyPair", ")", "{", "List", "<", "Trade", ">", "trades", "=", "new", "ArrayList", "<>", "(", ")", ";", "long", "lastTradeId", "=", "0...
Adapt a org.knowm.xchange.bitcoinde.dto.marketdata.BitcoindeTrade[] object to a Trades object. @param bitcoindeTradesWrapper Exchange specific trades @param currencyPair (e.g. BTC/USD) @return The XChange Trades
[ "Adapt", "a", "org", ".", "knowm", ".", "xchange", ".", "bitcoinde", ".", "dto", ".", "marketdata", ".", "BitcoindeTrade", "[]", "object", "to", "a", "Trades", "object", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/BitcoindeAdapters.java#L145-L165
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Assert.java
Assert.checkBetween
public static int checkBetween(int value, int min, int max) { """ 检查值是否在指定范围内 @param value 值 @param min 最小值(包含) @param max 最大值(包含) @return 检查后的长度值 @since 4.1.10 """ if (value < min || value > max) { throw new IllegalArgumentException(StrUtil.format("Length must be between {} and {}.", min, max));...
java
public static int checkBetween(int value, int min, int max) { if (value < min || value > max) { throw new IllegalArgumentException(StrUtil.format("Length must be between {} and {}.", min, max)); } return value; }
[ "public", "static", "int", "checkBetween", "(", "int", "value", ",", "int", "min", ",", "int", "max", ")", "{", "if", "(", "value", "<", "min", "||", "value", ">", "max", ")", "{", "throw", "new", "IllegalArgumentException", "(", "StrUtil", ".", "forma...
检查值是否在指定范围内 @param value 值 @param min 最小值(包含) @param max 最大值(包含) @return 检查后的长度值 @since 4.1.10
[ "检查值是否在指定范围内" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L574-L579
spring-projects/spring-credhub
spring-credhub-core/src/main/java/org/springframework/credhub/configuration/CredHubTemplateFactory.java
CredHubTemplateFactory.credHubTemplate
public CredHubTemplate credHubTemplate(CredHubProperties credHubProperties, ClientOptions clientOptions) { """ Create a {@link CredHubTemplate} for interaction with a CredHub server. @param credHubProperties connection properties @param clientOptions connection options @return a {@code CredHubTem...
java
public CredHubTemplate credHubTemplate(CredHubProperties credHubProperties, ClientOptions clientOptions) { return new CredHubTemplate(credHubProperties, clientHttpRequestFactory(clientOptions)); }
[ "public", "CredHubTemplate", "credHubTemplate", "(", "CredHubProperties", "credHubProperties", ",", "ClientOptions", "clientOptions", ")", "{", "return", "new", "CredHubTemplate", "(", "credHubProperties", ",", "clientHttpRequestFactory", "(", "clientOptions", ")", ")", "...
Create a {@link CredHubTemplate} for interaction with a CredHub server. @param credHubProperties connection properties @param clientOptions connection options @return a {@code CredHubTemplate}
[ "Create", "a", "{", "@link", "CredHubTemplate", "}", "for", "interaction", "with", "a", "CredHub", "server", "." ]
train
https://github.com/spring-projects/spring-credhub/blob/4d82cfa60d6c04e707ff32d78bc5d80cff4e132e/spring-credhub-core/src/main/java/org/springframework/credhub/configuration/CredHubTemplateFactory.java#L46-L49
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetMethodResult.java
GetMethodResult.withRequestModels
public GetMethodResult withRequestModels(java.util.Map<String, String> requestModels) { """ <p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value map...
java
public GetMethodResult withRequestModels(java.util.Map<String, String> requestModels) { setRequestModels(requestModels); return this; }
[ "public", "GetMethodResult", "withRequestModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestModels", ")", "{", "setRequestModels", "(", "requestModels", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request p...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "data", "schemas", "represented", "by", "<a", ">", "Model<", "/", "a", ">", "resources", "(", "as", "the", "mapped", "value", ")", "of", "the", "request", "payloads", "of", "given", "content", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetMethodResult.java#L614-L617
stapler/stapler
groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/GroovyServerPageTearOff.java
GroovyServerPageTearOff.createDispatcher
public RequestDispatcher createDispatcher(Object it, String viewName) throws IOException { """ Creates a {@link RequestDispatcher} that forwards to the jelly view, if available. """ GroovierJellyScript s = findScript(viewName); if (s!=null) return new JellyRequestDispatcher(it,s); re...
java
public RequestDispatcher createDispatcher(Object it, String viewName) throws IOException { GroovierJellyScript s = findScript(viewName); if (s!=null) return new JellyRequestDispatcher(it,s); return null; }
[ "public", "RequestDispatcher", "createDispatcher", "(", "Object", "it", ",", "String", "viewName", ")", "throws", "IOException", "{", "GroovierJellyScript", "s", "=", "findScript", "(", "viewName", ")", ";", "if", "(", "s", "!=", "null", ")", "return", "new", ...
Creates a {@link RequestDispatcher} that forwards to the jelly view, if available.
[ "Creates", "a", "{" ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/GroovyServerPageTearOff.java#L35-L39
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/StringUtils.java
StringUtils.toDelimitedString
public static String toDelimitedString(Collection<?> list, String delim) { """ Convert a {@code Collection} into a delimited {@code String} (e.g. CSV). <p>Useful for {@code toString()} implementations. @param list the collection @param delim the delimiter to use (typically a ",") @return the delimited {@code...
java
public static String toDelimitedString(Collection<?> list, String delim) { if (list == null || list.isEmpty()) { return EMPTY; } StringBuilder sb = new StringBuilder(); boolean first = true; for (Object o : list) { if (!first) { sb.append(d...
[ "public", "static", "String", "toDelimitedString", "(", "Collection", "<", "?", ">", "list", ",", "String", "delim", ")", "{", "if", "(", "list", "==", "null", "||", "list", ".", "isEmpty", "(", ")", ")", "{", "return", "EMPTY", ";", "}", "StringBuilde...
Convert a {@code Collection} into a delimited {@code String} (e.g. CSV). <p>Useful for {@code toString()} implementations. @param list the collection @param delim the delimiter to use (typically a ",") @return the delimited {@code String}
[ "Convert", "a", "{", "@code", "Collection", "}", "into", "a", "delimited", "{", "@code", "String", "}", "(", "e", ".", "g", ".", "CSV", ")", ".", "<p", ">", "Useful", "for", "{", "@code", "toString", "()", "}", "implementations", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L666-L680
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/attribute/map/MapfishMapContext.java
MapfishMapContext.getTransform
public AffineTransform getTransform() { """ Returns an {@link AffineTransform} taking the rotation into account. @return an affine transformation """ if (FloatingPointUtil.equals(this.rotation, 0.0)) { return null; } final Dimension rotatedMapSize = getRotatedMapSize(); ...
java
public AffineTransform getTransform() { if (FloatingPointUtil.equals(this.rotation, 0.0)) { return null; } final Dimension rotatedMapSize = getRotatedMapSize(); final AffineTransform transform = AffineTransform.getTranslateInstance(0.0, 0.0); // move to the center o...
[ "public", "AffineTransform", "getTransform", "(", ")", "{", "if", "(", "FloatingPointUtil", ".", "equals", "(", "this", ".", "rotation", ",", "0.0", ")", ")", "{", "return", "null", ";", "}", "final", "Dimension", "rotatedMapSize", "=", "getRotatedMapSize", ...
Returns an {@link AffineTransform} taking the rotation into account. @return an affine transformation
[ "Returns", "an", "{", "@link", "AffineTransform", "}", "taking", "the", "rotation", "into", "account", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/MapfishMapContext.java#L284-L305
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.containsEntry
public static boolean containsEntry(File zip, String name) { """ Checks if the ZIP file contains the given entry. @param zip ZIP file. @param name entry name. @return <code>true</code> if the ZIP file contains the given entry. """ ZipFile zf = null; try { zf = new ZipFile(zip); retur...
java
public static boolean containsEntry(File zip, String name) { ZipFile zf = null; try { zf = new ZipFile(zip); return zf.getEntry(name) != null; } catch (IOException e) { throw ZipExceptionUtil.rethrow(e); } finally { closeQuietly(zf); } }
[ "public", "static", "boolean", "containsEntry", "(", "File", "zip", ",", "String", "name", ")", "{", "ZipFile", "zf", "=", "null", ";", "try", "{", "zf", "=", "new", "ZipFile", "(", "zip", ")", ";", "return", "zf", ".", "getEntry", "(", "name", ")", ...
Checks if the ZIP file contains the given entry. @param zip ZIP file. @param name entry name. @return <code>true</code> if the ZIP file contains the given entry.
[ "Checks", "if", "the", "ZIP", "file", "contains", "the", "given", "entry", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L86-L98
JakeWharton/NineOldAndroids
library/src/com/nineoldandroids/animation/PropertyValuesHolder.java
PropertyValuesHolder.ofKeyframe
public static PropertyValuesHolder ofKeyframe(String propertyName, Keyframe... values) { """ Constructs and returns a PropertyValuesHolder object with the specified property name and set of values. These values can be of any type, but the type should be consistent so that an appropriate {@link android.animation....
java
public static PropertyValuesHolder ofKeyframe(String propertyName, Keyframe... values) { KeyframeSet keyframeSet = KeyframeSet.ofKeyframe(values); if (keyframeSet instanceof IntKeyframeSet) { return new IntPropertyValuesHolder(propertyName, (IntKeyframeSet) keyframeSet); } else if (k...
[ "public", "static", "PropertyValuesHolder", "ofKeyframe", "(", "String", "propertyName", ",", "Keyframe", "...", "values", ")", "{", "KeyframeSet", "keyframeSet", "=", "KeyframeSet", ".", "ofKeyframe", "(", "values", ")", ";", "if", "(", "keyframeSet", "instanceof...
Constructs and returns a PropertyValuesHolder object with the specified property name and set of values. These values can be of any type, but the type should be consistent so that an appropriate {@link android.animation.TypeEvaluator} can be found that matches the common type. <p>If there is only one value, it is assum...
[ "Constructs", "and", "returns", "a", "PropertyValuesHolder", "object", "with", "the", "specified", "property", "name", "and", "set", "of", "values", ".", "These", "values", "can", "be", "of", "any", "type", "but", "the", "type", "should", "be", "consistent", ...
train
https://github.com/JakeWharton/NineOldAndroids/blob/d582f0ec8e79013e9fa96c07986160b52e662e63/library/src/com/nineoldandroids/animation/PropertyValuesHolder.java#L249-L262
knowm/XChange
xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java
WexAdapters.adaptTrades
public static Trades adaptTrades(WexTrade[] bTCETrades, CurrencyPair currencyPair) { """ Adapts a BTCETradeV3[] to a Trades Object @param bTCETrades The Wex trade data returned by API v.3 @param currencyPair the currency pair @return The trades """ List<Trade> tradesList = new ArrayList<>(); long...
java
public static Trades adaptTrades(WexTrade[] bTCETrades, CurrencyPair currencyPair) { List<Trade> tradesList = new ArrayList<>(); long lastTradeId = 0; for (WexTrade bTCETrade : bTCETrades) { // Date is reversed order. Insert at index 0 instead of appending long tradeId = bTCETrade.getTid(); ...
[ "public", "static", "Trades", "adaptTrades", "(", "WexTrade", "[", "]", "bTCETrades", ",", "CurrencyPair", "currencyPair", ")", "{", "List", "<", "Trade", ">", "tradesList", "=", "new", "ArrayList", "<>", "(", ")", ";", "long", "lastTradeId", "=", "0", ";"...
Adapts a BTCETradeV3[] to a Trades Object @param bTCETrades The Wex trade data returned by API v.3 @param currencyPair the currency pair @return The trades
[ "Adapts", "a", "BTCETradeV3", "[]", "to", "a", "Trades", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-wex/src/main/java/org/knowm/xchange/wex/v3/WexAdapters.java#L122-L135
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.startWith
@SuppressWarnings("unchecked") @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> startWith(Publisher<? extends T> other) { """ Returns a Flowable that emits the items in a specified {@link Publisher} before it begins to e...
java
@SuppressWarnings("unchecked") @CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> startWith(Publisher<? extends T> other) { ObjectHelper.requireNonNull(other, "other is null"); return concatArray(other, this); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", ...
Returns a Flowable that emits the items in a specified {@link Publisher} before it begins to emit items emitted by the source Publisher. <p> <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/startWith.o.png" alt=""> <dl> <dt><b>Backpressure:</b></dt> <dd>The operator ho...
[ "Returns", "a", "Flowable", "that", "emits", "the", "items", "in", "a", "specified", "{", "@link", "Publisher", "}", "before", "it", "begins", "to", "emit", "items", "emitted", "by", "the", "source", "Publisher", ".", "<p", ">", "<img", "width", "=", "64...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L14186-L14193
josueeduardo/snappy
plugin-parent/snappy-maven-plugin/src/main/java/io/joshworks/snappy/maven/tools/JarWriter.java
JarWriter.writeLoaderClasses
public void writeLoaderClasses() throws IOException { """ Write the required spring-boot-loader classes to the JAR. @throws IOException if the classes cannot be written """ URL loaderJar = getClass().getClassLoader().getResource(NESTED_LOADER_JAR); JarInputStream inputStream = new JarInputSt...
java
public void writeLoaderClasses() throws IOException { URL loaderJar = getClass().getClassLoader().getResource(NESTED_LOADER_JAR); JarInputStream inputStream = new JarInputStream( new BufferedInputStream(loaderJar.openStream())); JarEntry entry; while ((entry = inputStream...
[ "public", "void", "writeLoaderClasses", "(", ")", "throws", "IOException", "{", "URL", "loaderJar", "=", "getClass", "(", ")", ".", "getClassLoader", "(", ")", ".", "getResource", "(", "NESTED_LOADER_JAR", ")", ";", "JarInputStream", "inputStream", "=", "new", ...
Write the required spring-boot-loader classes to the JAR. @throws IOException if the classes cannot be written
[ "Write", "the", "required", "spring", "-", "boot", "-", "loader", "classes", "to", "the", "JAR", "." ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/plugin-parent/snappy-maven-plugin/src/main/java/io/joshworks/snappy/maven/tools/JarWriter.java#L202-L213
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createPartialMock
public static <T> T createPartialMock(Class<T> type, String methodName, Class<?>[] methodParameterTypes, Object[] constructorArguments, Class<?>[] constructorParameterTypes) { """ A utility method that may be used to mock several methods in an easy way (by just passing in...
java
public static <T> T createPartialMock(Class<T> type, String methodName, Class<?>[] methodParameterTypes, Object[] constructorArguments, Class<?>[] constructorParameterTypes) { ConstructorArgs constructorArgs = new ConstructorArgs(Whitebox.getConstructor(type, constructo...
[ "public", "static", "<", "T", ">", "T", "createPartialMock", "(", "Class", "<", "T", ">", "type", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "methodParameterTypes", ",", "Object", "[", "]", "constructorArguments", ",", "Class", "...
A utility method that may be used to mock several methods in an easy way (by just passing in the method names of the method you wish to mock). Use this to handle overloaded methods <i>and</i> overloaded constructors. The mock object created will support mocking of final and native methods and invokes a specific constru...
[ "A", "utility", "method", "that", "may", "be", "used", "to", "mock", "several", "methods", "in", "an", "easy", "way", "(", "by", "just", "passing", "in", "the", "method", "names", "of", "the", "method", "you", "wish", "to", "mock", ")", ".", "Use", "...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1064-L1070
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java
TreeUtil.findNode
public static Treenode findNode(Treeview tree, String path, boolean create, Class<? extends Treenode> clazz) { """ Returns the tree item associated with the specified \-delimited path. @param tree Tree to search. @param path \-delimited path to search. Search is not case sensitive. @param create If true, tree...
java
public static Treenode findNode(Treeview tree, String path, boolean create, Class<? extends Treenode> clazz) { return findNode(tree, path, create, clazz, MatchMode.CASE_INSENSITIVE); }
[ "public", "static", "Treenode", "findNode", "(", "Treeview", "tree", ",", "String", "path", ",", "boolean", "create", ",", "Class", "<", "?", "extends", "Treenode", ">", "clazz", ")", "{", "return", "findNode", "(", "tree", ",", "path", ",", "create", ",...
Returns the tree item associated with the specified \-delimited path. @param tree Tree to search. @param path \-delimited path to search. Search is not case sensitive. @param create If true, tree nodes are created if they do not already exist. @param clazz Class of Treenode to create. @return The tree item correspondi...
[ "Returns", "the", "tree", "item", "associated", "with", "the", "specified", "\\", "-", "delimited", "path", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java#L76-L78
pravega/pravega
controller/src/main/java/io/pravega/controller/server/AuthResourceRepresentation.java
AuthResourceRepresentation.ofStreamInScope
public static String ofStreamInScope(String scopeName, String streamName) { """ Creates a resource representation for use in authorization of actions pertaining to the specified stream within the specified scope. @param scopeName the name of the scope @param streamName the name of the stream @return a string...
java
public static String ofStreamInScope(String scopeName, String streamName) { Exceptions.checkNotNullOrEmpty(streamName, "streamName"); return String.format("%s/%s", ofStreamsInScope(scopeName), streamName); }
[ "public", "static", "String", "ofStreamInScope", "(", "String", "scopeName", ",", "String", "streamName", ")", "{", "Exceptions", ".", "checkNotNullOrEmpty", "(", "streamName", ",", "\"streamName\"", ")", ";", "return", "String", ".", "format", "(", "\"%s/%s\"", ...
Creates a resource representation for use in authorization of actions pertaining to the specified stream within the specified scope. @param scopeName the name of the scope @param streamName the name of the stream @return a string representing the specified stream within the specified scope @throws NullPointerException...
[ "Creates", "a", "resource", "representation", "for", "use", "in", "authorization", "of", "actions", "pertaining", "to", "the", "specified", "stream", "within", "the", "specified", "scope", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/server/AuthResourceRepresentation.java#L77-L80
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiUser.java
BoxApiUser.getDownloadAvatarRequest
public BoxRequestsFile.DownloadFile getDownloadAvatarRequest(OutputStream outputStream, String userId) { """ Gets a request that downloads the given avatar to the provided outputStream. Developer is responsible for closing the outputStream provided. @param outputStream outputStream to write file contents to. @...
java
public BoxRequestsFile.DownloadFile getDownloadAvatarRequest(OutputStream outputStream, String userId) { BoxRequestsFile.DownloadFile request = new BoxRequestsFile.DownloadFile(userId, outputStream, getAvatarDownloadUrl(userId), mSession); return request; }
[ "public", "BoxRequestsFile", ".", "DownloadFile", "getDownloadAvatarRequest", "(", "OutputStream", "outputStream", ",", "String", "userId", ")", "{", "BoxRequestsFile", ".", "DownloadFile", "request", "=", "new", "BoxRequestsFile", ".", "DownloadFile", "(", "userId", ...
Gets a request that downloads the given avatar to the provided outputStream. Developer is responsible for closing the outputStream provided. @param outputStream outputStream to write file contents to. @param userId the file id to download. @return request to download a file thumbnail
[ "Gets", "a", "request", "that", "downloads", "the", "given", "avatar", "to", "the", "provided", "outputStream", ".", "Developer", "is", "responsible", "for", "closing", "the", "outputStream", "provided", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiUser.java#L133-L136
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/DateTimeField.java
DateTimeField.setCalendar
public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode) { """ SetValue in current calendar. @param value The date (as a calendar value) to set. @param bDisplayOption Display changed fields if true. @param iMoveMode The move mode. @return The error code (or NORMAL_RETURN). """ ...
java
public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode) { // Set this field's value java.util.Date dateTemp = value.getTime(); int errorCode = this.setData(dateTemp, bDisplayOption, iMoveMode); return errorCode; }
[ "public", "int", "setCalendar", "(", "Calendar", "value", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "// Set this field's value", "java", ".", "util", ".", "Date", "dateTemp", "=", "value", ".", "getTime", "(", ")", ";", "int", "err...
SetValue in current calendar. @param value The date (as a calendar value) to set. @param bDisplayOption Display changed fields if true. @param iMoveMode The move mode. @return The error code (or NORMAL_RETURN).
[ "SetValue", "in", "current", "calendar", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L422-L427
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java
TransactionWriteRequest.addUpdate
public TransactionWriteRequest addUpdate(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression, ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) { """ Adds update operation (to b...
java
public TransactionWriteRequest addUpdate(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression, ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) { transactionWriteOperations.a...
[ "public", "TransactionWriteRequest", "addUpdate", "(", "Object", "object", ",", "DynamoDBTransactionWriteExpression", "transactionWriteExpression", ",", "ReturnValuesOnConditionCheckFailure", "returnValuesOnConditionCheckFailure", ")", "{", "transactionWriteOperations", ".", "add", ...
Adds update operation (to be executed on object) to the list of transaction write operations. transactionWriteExpression is used to conditionally update object. returnValuesOnConditionCheckFailure specifies which attributes values (of existing item) should be returned if condition check fails.
[ "Adds", "update", "operation", "(", "to", "be", "executed", "on", "object", ")", "to", "the", "list", "of", "transaction", "write", "operations", ".", "transactionWriteExpression", "is", "used", "to", "conditionally", "update", "object", ".", "returnValuesOnCondit...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java#L94-L99
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java
Tile.tileAreasOverlap
public static boolean tileAreasOverlap(Tile upperLeft, Tile lowerRight, Tile upperLeftOther, Tile lowerRightOther) { """ Returns true if two tile areas, defined by upper left and lower right tiles, overlap. Precondition: zoom levels of upperLeft/lowerRight and upperLeftOther/lowerRightOther are the same. @par...
java
public static boolean tileAreasOverlap(Tile upperLeft, Tile lowerRight, Tile upperLeftOther, Tile lowerRightOther) { if (upperLeft.zoomLevel != upperLeftOther.zoomLevel) { return false; } if (upperLeft.equals(upperLeftOther) && lowerRight.equals(lowerRightOther)) { return...
[ "public", "static", "boolean", "tileAreasOverlap", "(", "Tile", "upperLeft", ",", "Tile", "lowerRight", ",", "Tile", "upperLeftOther", ",", "Tile", "lowerRightOther", ")", "{", "if", "(", "upperLeft", ".", "zoomLevel", "!=", "upperLeftOther", ".", "zoomLevel", "...
Returns true if two tile areas, defined by upper left and lower right tiles, overlap. Precondition: zoom levels of upperLeft/lowerRight and upperLeftOther/lowerRightOther are the same. @param upperLeft tile in upper left corner of area 1. @param lowerRight tile in lower right corner of area 1. @param upperL...
[ "Returns", "true", "if", "two", "tile", "areas", "defined", "by", "upper", "left", "and", "lower", "right", "tiles", "overlap", ".", "Precondition", ":", "zoom", "levels", "of", "upperLeft", "/", "lowerRight", "and", "upperLeftOther", "/", "lowerRightOther", "...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java#L66-L74
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncGetBulk
@Override public BulkFuture<Map<String, Object>> asyncGetBulk(Collection<String> keys) { """ Asynchronously get a bunch of objects from the cache and decode them with the given transcoder. @param keys the keys to request @return a Future result of that fetch @throws IllegalStateException in the rare circum...
java
@Override public BulkFuture<Map<String, Object>> asyncGetBulk(Collection<String> keys) { return asyncGetBulk(keys, transcoder); }
[ "@", "Override", "public", "BulkFuture", "<", "Map", "<", "String", ",", "Object", ">", ">", "asyncGetBulk", "(", "Collection", "<", "String", ">", "keys", ")", "{", "return", "asyncGetBulk", "(", "keys", ",", "transcoder", ")", ";", "}" ]
Asynchronously get a bunch of objects from the cache and decode them with the given transcoder. @param keys the keys to request @return a Future result of that fetch @throws IllegalStateException in the rare circumstance where queue is too full to accept any more requests
[ "Asynchronously", "get", "a", "bunch", "of", "objects", "from", "the", "cache", "and", "decode", "them", "with", "the", "given", "transcoder", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L1444-L1447
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/RankingQualityHistogram.java
RankingQualityHistogram.run
public HistogramResult run(Database database, Relation<O> relation) { """ Process a database @param database Database to process @param relation Relation to process @return Histogram of ranking qualities """ final DistanceQuery<O> distanceQuery = database.getDistanceQuery(relation, getDistanceFunction...
java
public HistogramResult run(Database database, Relation<O> relation) { final DistanceQuery<O> distanceQuery = database.getDistanceQuery(relation, getDistanceFunction()); final KNNQuery<O> knnQuery = database.getKNNQuery(distanceQuery, relation.size()); if(LOG.isVerbose()) { LOG.verbose("Preprocessing ...
[ "public", "HistogramResult", "run", "(", "Database", "database", ",", "Relation", "<", "O", ">", "relation", ")", "{", "final", "DistanceQuery", "<", "O", ">", "distanceQuery", "=", "database", ".", "getDistanceQuery", "(", "relation", ",", "getDistanceFunction"...
Process a database @param database Database to process @param relation Relation to process @return Histogram of ranking qualities
[ "Process", "a", "database" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/RankingQualityHistogram.java#L99-L140
OpenLiberty/open-liberty
dev/com.ibm.ws.anno/src/com/ibm/ws/anno/targets/internal/AnnotationTargetsImpl_Targets.java
AnnotationTargetsImpl_Targets.i_setSuperclassName
protected void i_setSuperclassName(String i_subclassName, String i_superclassName) { """ When reading from serialization, don't set the referenced classes. """ i_superclassNameMap.put(i_subclassName, i_superclassName); if (tc.isDebugEnabled()) { Tr.debug(tc, MessageFormat.format("[...
java
protected void i_setSuperclassName(String i_subclassName, String i_superclassName) { i_superclassNameMap.put(i_subclassName, i_superclassName); if (tc.isDebugEnabled()) { Tr.debug(tc, MessageFormat.format("[ {0} ] Subclass [ {1} ] has superclass [ {2} ]", ...
[ "protected", "void", "i_setSuperclassName", "(", "String", "i_subclassName", ",", "String", "i_superclassName", ")", "{", "i_superclassNameMap", ".", "put", "(", "i_subclassName", ",", "i_superclassName", ")", ";", "if", "(", "tc", ".", "isDebugEnabled", "(", ")",...
When reading from serialization, don't set the referenced classes.
[ "When", "reading", "from", "serialization", "don", "t", "set", "the", "referenced", "classes", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.anno/src/com/ibm/ws/anno/targets/internal/AnnotationTargetsImpl_Targets.java#L1071-L1078
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java
XmlUtilities.exportFileToDOM
public static void exportFileToDOM(DocumentBuilder stringdb, BaseTable table, Document doc, Element elRoot) { """ Export this table. @record The record to export. @strFileName The distination filename (deleted the old copy if this file exists). """ try { table.close(); while...
java
public static void exportFileToDOM(DocumentBuilder stringdb, BaseTable table, Document doc, Element elRoot) { try { table.close(); while (table.hasNext()) { table.next(); Record record = table.getRecord(); XmlUtilities.createXML...
[ "public", "static", "void", "exportFileToDOM", "(", "DocumentBuilder", "stringdb", ",", "BaseTable", "table", ",", "Document", "doc", ",", "Element", "elRoot", ")", "{", "try", "{", "table", ".", "close", "(", ")", ";", "while", "(", "table", ".", "hasNext...
Export this table. @record The record to export. @strFileName The distination filename (deleted the old copy if this file exists).
[ "Export", "this", "table", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java#L125-L140
morimekta/utils
io-util/src/main/java/net/morimekta/util/FileWatcher.java
FileWatcher.addWatcher
@Deprecated public void addWatcher(Path file, Watcher watcher) { """ Start watching file path and notify watcher for updates on that file. @param file The file path to watch. @param watcher The watcher to be notified. """ addWatcher(file, (Listener) watcher); }
java
@Deprecated public void addWatcher(Path file, Watcher watcher) { addWatcher(file, (Listener) watcher); }
[ "@", "Deprecated", "public", "void", "addWatcher", "(", "Path", "file", ",", "Watcher", "watcher", ")", "{", "addWatcher", "(", "file", ",", "(", "Listener", ")", "watcher", ")", ";", "}" ]
Start watching file path and notify watcher for updates on that file. @param file The file path to watch. @param watcher The watcher to be notified.
[ "Start", "watching", "file", "path", "and", "notify", "watcher", "for", "updates", "on", "that", "file", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/FileWatcher.java#L187-L190
citrusframework/citrus
modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java
JmsSyncProducer.resolveDestinationName
private Destination resolveDestinationName(String name, Session session) throws JMSException { """ Resolves the destination name from Jms session. @param name @param session @return """ if (endpointConfiguration.getDestinationResolver() != null) { return endpointConfiguration.getDestinat...
java
private Destination resolveDestinationName(String name, Session session) throws JMSException { if (endpointConfiguration.getDestinationResolver() != null) { return endpointConfiguration.getDestinationResolver().resolveDestinationName(session, name, endpointConfiguration.isPubSubDomain()); } ...
[ "private", "Destination", "resolveDestinationName", "(", "String", "name", ",", "Session", "session", ")", "throws", "JMSException", "{", "if", "(", "endpointConfiguration", ".", "getDestinationResolver", "(", ")", "!=", "null", ")", "{", "return", "endpointConfigur...
Resolves the destination name from Jms session. @param name @param session @return
[ "Resolves", "the", "destination", "name", "from", "Jms", "session", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/endpoint/JmsSyncProducer.java#L317-L323
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java
XSLTAttributeDef.processSTRINGLIST
StringVector processSTRINGLIST(StylesheetHandler handler, String uri, String name, String rawName, String value) { """ Process an attribute string of type T_STRINGLIST into a vector of XPath match patterns. @param handler non-null reference to current StylesheetHandler that is ...
java
StringVector processSTRINGLIST(StylesheetHandler handler, String uri, String name, String rawName, String value) { StringTokenizer tokenizer = new StringTokenizer(value, " \t\n\r\f"); int nStrings = tokenizer.countTokens(); StringVector strings = new StringVector(nStrings...
[ "StringVector", "processSTRINGLIST", "(", "StylesheetHandler", "handler", ",", "String", "uri", ",", "String", "name", ",", "String", "rawName", ",", "String", "value", ")", "{", "StringTokenizer", "tokenizer", "=", "new", "StringTokenizer", "(", "value", ",", "...
Process an attribute string of type T_STRINGLIST into a vector of XPath match patterns. @param handler non-null reference to current StylesheetHandler that is constructing the Templates. @param uri The Namespace URI, or an empty string. @param name The local name (without prefix), or empty string if not namespace proc...
[ "Process", "an", "attribute", "string", "of", "type", "T_STRINGLIST", "into", "a", "vector", "of", "XPath", "match", "patterns", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java#L1198-L1212
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Reference.java
Reference.newInstance
public static Reference newInstance(Requirement requirement, Specification specification, SystemUnderTest sut) { """ <p>newInstance.</p> @param requirement a {@link com.greenpepper.server.domain.Requirement} object. @param specification a {@link com.greenpepper.server.domain.Specification} object. @param sut ...
java
public static Reference newInstance(Requirement requirement, Specification specification, SystemUnderTest sut) { return newInstance(requirement, specification, sut, null); }
[ "public", "static", "Reference", "newInstance", "(", "Requirement", "requirement", ",", "Specification", "specification", ",", "SystemUnderTest", "sut", ")", "{", "return", "newInstance", "(", "requirement", ",", "specification", ",", "sut", ",", "null", ")", ";",...
<p>newInstance.</p> @param requirement a {@link com.greenpepper.server.domain.Requirement} object. @param specification a {@link com.greenpepper.server.domain.Specification} object. @param sut a {@link com.greenpepper.server.domain.SystemUnderTest} object. @return a {@link com.greenpepper.server.domain.Reference} obje...
[ "<p", ">", "newInstance", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Reference.java#L53-L56
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/LexerEngineFactory.java
LexerEngineFactory.newInstance
public static LexerEngine newInstance(final DatabaseType dbType, final String sql) { """ Create lexical analysis engine instance. @param dbType database type @param sql SQL @return lexical analysis engine instance """ switch (dbType) { case H2: return new LexerEngine(ne...
java
public static LexerEngine newInstance(final DatabaseType dbType, final String sql) { switch (dbType) { case H2: return new LexerEngine(new H2Lexer(sql)); case MySQL: return new LexerEngine(new MySQLLexer(sql)); case Oracle: retu...
[ "public", "static", "LexerEngine", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "String", "sql", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "return", "new", "LexerEngine", "(", "new", "H2Lexer", "(", "sql", ")",...
Create lexical analysis engine instance. @param dbType database type @param sql SQL @return lexical analysis engine instance
[ "Create", "lexical", "analysis", "engine", "instance", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/lexer/LexerEngineFactory.java#L44-L59
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_dnsMXFilter_GET
public OvhDomainMXFilterEnum domain_dnsMXFilter_GET(String domain, String subDomain) throws IOException { """ Domain MX filter REST: GET /email/domain/{domain}/dnsMXFilter @param subDomain [required] Sub domain @param domain [required] Name of your domain name """ String qPath = "/email/domain/{domain}/...
java
public OvhDomainMXFilterEnum domain_dnsMXFilter_GET(String domain, String subDomain) throws IOException { String qPath = "/email/domain/{domain}/dnsMXFilter"; StringBuilder sb = path(qPath, domain); query(sb, "subDomain", subDomain); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp...
[ "public", "OvhDomainMXFilterEnum", "domain_dnsMXFilter_GET", "(", "String", "domain", ",", "String", "subDomain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/dnsMXFilter\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
Domain MX filter REST: GET /email/domain/{domain}/dnsMXFilter @param subDomain [required] Sub domain @param domain [required] Name of your domain name
[ "Domain", "MX", "filter" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L992-L998
landawn/AbacusUtil
src/com/landawn/abacus/util/CouchbaseExecutor.java
CouchbaseExecutor.toEntity
public static <T> T toEntity(final Class<T> targetClass, final JsonDocument jsonDocument) { """ The id in the specified <code>jsonDocument</code> will be set to the returned object if and only if the id is not null or empty and the content in <code>jsonDocument</code> doesn't contain any "id" property, and it's ac...
java
public static <T> T toEntity(final Class<T> targetClass, final JsonDocument jsonDocument) { final T result = toEntity(targetClass, jsonDocument.content()); final String id = jsonDocument.id(); if (N.notNullOrEmpty(id) && result != null) { if (Map.class.isAssignableFrom(targetCl...
[ "public", "static", "<", "T", ">", "T", "toEntity", "(", "final", "Class", "<", "T", ">", "targetClass", ",", "final", "JsonDocument", "jsonDocument", ")", "{", "final", "T", "result", "=", "toEntity", "(", "targetClass", ",", "jsonDocument", ".", "content...
The id in the specified <code>jsonDocument</code> will be set to the returned object if and only if the id is not null or empty and the content in <code>jsonDocument</code> doesn't contain any "id" property, and it's acceptable to the <code>targetClass</code>. @param targetClass an entity class with getter/setter meth...
[ "The", "id", "in", "the", "specified", "<code", ">", "jsonDocument<", "/", "code", ">", "will", "be", "set", "to", "the", "returned", "object", "if", "and", "only", "if", "the", "id", "is", "not", "null", "or", "empty", "and", "the", "content", "in", ...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CouchbaseExecutor.java#L309-L326
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereRegex
@Override public void _whereRegex(String fieldName, String pattern) { """ Matches fields where Regex.IsMatch(filedName, pattern) @param fieldName Field name to use @param pattern Regexp pattern """ List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); ...
java
@Override public void _whereRegex(String fieldName, String pattern) { List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, fieldName); WhereParams whereParams = new WhereParams(); whereParams.setValue(pattern); whe...
[ "@", "Override", "public", "void", "_whereRegex", "(", "String", "fieldName", ",", "String", "pattern", ")", "{", "List", "<", "QueryToken", ">", "tokens", "=", "getCurrentWhereTokens", "(", ")", ";", "appendOperatorIfNeeded", "(", "tokens", ")", ";", "negateI...
Matches fields where Regex.IsMatch(filedName, pattern) @param fieldName Field name to use @param pattern Regexp pattern
[ "Matches", "fields", "where", "Regex", ".", "IsMatch", "(", "filedName", "pattern", ")" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L777-L791
atomix/copycat
server/src/main/java/io/atomix/copycat/server/state/PassiveState.java
PassiveState.indexQuery
private void indexQuery(QueryEntry entry, ServerSessionContext session, CompletableFuture<QueryResponse> future) { """ Ensures the given query is applied after the appropriate index. """ // If the query index is greater than the session's last applied index, queue the request for handling once the // s...
java
private void indexQuery(QueryEntry entry, ServerSessionContext session, CompletableFuture<QueryResponse> future) { // If the query index is greater than the session's last applied index, queue the request for handling once the // state machine is caught up. if (entry.getIndex() > session.getLastApplied()) {...
[ "private", "void", "indexQuery", "(", "QueryEntry", "entry", ",", "ServerSessionContext", "session", ",", "CompletableFuture", "<", "QueryResponse", ">", "future", ")", "{", "// If the query index is greater than the session's last applied index, queue the request for handling once...
Ensures the given query is applied after the appropriate index.
[ "Ensures", "the", "given", "query", "is", "applied", "after", "the", "appropriate", "index", "." ]
train
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/state/PassiveState.java#L344-L352
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/ScoreLineSegmentEdge.java
ScoreLineSegmentEdge.computeAverageDerivative
public double computeAverageDerivative(Point2D_F64 a, Point2D_F64 b, double tanX, double tanY) { """ Returns average tangential derivative along the line segment. Derivative is computed in direction of tangent. A positive step in the tangent direction will have a positive value. If all samples go outside the ...
java
public double computeAverageDerivative(Point2D_F64 a, Point2D_F64 b, double tanX, double tanY) { samplesInside = 0; averageUp = averageDown = 0; for (int i = 0; i < numSamples; i++) { double x = (b.x-a.x)*i/(numSamples-1) + a.x; double y = (b.y-a.y)*i/(numSamples-1) + a.y; double x0 = x+tanX; double...
[ "public", "double", "computeAverageDerivative", "(", "Point2D_F64", "a", ",", "Point2D_F64", "b", ",", "double", "tanX", ",", "double", "tanY", ")", "{", "samplesInside", "=", "0", ";", "averageUp", "=", "averageDown", "=", "0", ";", "for", "(", "int", "i"...
Returns average tangential derivative along the line segment. Derivative is computed in direction of tangent. A positive step in the tangent direction will have a positive value. If all samples go outside the image then zero is returned. @param a start point @param b end point @param tanX unit tangent x-axis. dete...
[ "Returns", "average", "tangential", "derivative", "along", "the", "line", "segment", ".", "Derivative", "is", "computed", "in", "direction", "of", "tangent", ".", "A", "positive", "step", "in", "the", "tangent", "direction", "will", "have", "a", "positive", "v...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/edge/ScoreLineSegmentEdge.java#L75-L110
defei/codelogger-utils
src/main/java/org/codelogger/utils/component/StringProcessChain.java
StringProcessChain.replacIgnoreCase
public StringProcessChain replacIgnoreCase(final String target, final String replacement) { """ Replaces each substring of given source string that matches the given regular expression ignore case sensitive with the given replacement.<br> @param target target string want to be replaces. @param replacement str...
java
public StringProcessChain replacIgnoreCase(final String target, final String replacement) { StringBuilder result = new StringBuilder(); String temp = source; int indexOfIgnoreCase = 0; while (true) { indexOfIgnoreCase = StringUtils.indexOfIgnoreCase(temp, target); if (indexOfIgnoreCase == S...
[ "public", "StringProcessChain", "replacIgnoreCase", "(", "final", "String", "target", ",", "final", "String", "replacement", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "String", "temp", "=", "source", ";", "int", "indexOfIgn...
Replaces each substring of given source string that matches the given regular expression ignore case sensitive with the given replacement.<br> @param target target string want to be replaces. @param replacement string of replace to. @return a new string has been replaced each substring of given source string that matc...
[ "Replaces", "each", "substring", "of", "given", "source", "string", "that", "matches", "the", "given", "regular", "expression", "ignore", "case", "sensitive", "with", "the", "given", "replacement", ".", "<br", ">" ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/component/StringProcessChain.java#L64-L81
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/notifications/ApptentiveNotificationCenter.java
ApptentiveNotificationCenter.addObserver
public synchronized void addObserver(String notification, ApptentiveNotificationObserver observer, boolean useWeakReference) { """ Adds an entry to the receiver’s dispatch table with an observer. @param useWeakReference - weak reference is used if <code>true</code> """ final ApptentiveNotificationObserver...
java
public synchronized void addObserver(String notification, ApptentiveNotificationObserver observer, boolean useWeakReference) { final ApptentiveNotificationObserverList list = resolveObserverList(notification); list.addObserver(observer, useWeakReference); }
[ "public", "synchronized", "void", "addObserver", "(", "String", "notification", ",", "ApptentiveNotificationObserver", "observer", ",", "boolean", "useWeakReference", ")", "{", "final", "ApptentiveNotificationObserverList", "list", "=", "resolveObserverList", "(", "notifica...
Adds an entry to the receiver’s dispatch table with an observer. @param useWeakReference - weak reference is used if <code>true</code>
[ "Adds", "an", "entry", "to", "the", "receiver’s", "dispatch", "table", "with", "an", "observer", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/notifications/ApptentiveNotificationCenter.java#L55-L58
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/EfficientCacheView.java
EfficientCacheView.findViewByIdEfficient
public <T extends View> T findViewByIdEfficient(int parentId, int id) { """ Look for a child view of the parent view id with the given id. If this view has the given id, return this view. The method is more efficient than a "normal" "findViewById" : the second time you will called this method with the same arg...
java
public <T extends View> T findViewByIdEfficient(int parentId, int id) { View viewRetrieve = retrieveFromCache(parentId, id); if (viewRetrieve == null) { viewRetrieve = findViewById(parentId, id); if (viewRetrieve != null) { storeView(parentId, id, viewRetrieve); ...
[ "public", "<", "T", "extends", "View", ">", "T", "findViewByIdEfficient", "(", "int", "parentId", ",", "int", "id", ")", "{", "View", "viewRetrieve", "=", "retrieveFromCache", "(", "parentId", ",", "id", ")", ";", "if", "(", "viewRetrieve", "==", "null", ...
Look for a child view of the parent view id with the given id. If this view has the given id, return this view. The method is more efficient than a "normal" "findViewById" : the second time you will called this method with the same argument, the view return will come from the cache. @param id The id to search for. @r...
[ "Look", "for", "a", "child", "view", "of", "the", "parent", "view", "id", "with", "the", "given", "id", ".", "If", "this", "view", "has", "the", "given", "id", "return", "this", "view", ".", "The", "method", "is", "more", "efficient", "than", "a", "n...
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/EfficientCacheView.java#L72-L81
icoloma/simpleds
src/main/java/org/simpleds/metadata/ClassMetadata.java
ClassMetadata.javaToDatastore
public Entity javaToDatastore(Key parentKey, Object javaObject) { """ Convert a value from Java representation to a Datastore {@link Entity} @param javaObject the Java property value @param parentKey the parent {@link Key} (may be null) """ Key key = keyProperty.getValue(javaObject); Entity entity = key ...
java
public Entity javaToDatastore(Key parentKey, Object javaObject) { Key key = keyProperty.getValue(javaObject); Entity entity = key == null? new Entity(kind, parentKey) : new Entity(key); for (Entry<String, PropertyMetadata<?, ?>> entry : properties.entrySet()) { PropertyMetadata property = entry.getValue(); ...
[ "public", "Entity", "javaToDatastore", "(", "Key", "parentKey", ",", "Object", "javaObject", ")", "{", "Key", "key", "=", "keyProperty", ".", "getValue", "(", "javaObject", ")", ";", "Entity", "entity", "=", "key", "==", "null", "?", "new", "Entity", "(", ...
Convert a value from Java representation to a Datastore {@link Entity} @param javaObject the Java property value @param parentKey the parent {@link Key} (may be null)
[ "Convert", "a", "value", "from", "Java", "representation", "to", "a", "Datastore", "{" ]
train
https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/metadata/ClassMetadata.java#L116-L125
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java
CPAttachmentFileEntryPersistenceImpl.fetchByC_ERC
@Override public CPAttachmentFileEntry fetchByC_ERC(long companyId, String externalReferenceCode) { """ Returns the cp attachment file entry where companyId = &#63; and externalReferenceCode = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param companyId the company ID ...
java
@Override public CPAttachmentFileEntry fetchByC_ERC(long companyId, String externalReferenceCode) { return fetchByC_ERC(companyId, externalReferenceCode, true); }
[ "@", "Override", "public", "CPAttachmentFileEntry", "fetchByC_ERC", "(", "long", "companyId", ",", "String", "externalReferenceCode", ")", "{", "return", "fetchByC_ERC", "(", "companyId", ",", "externalReferenceCode", ",", "true", ")", ";", "}" ]
Returns the cp attachment file entry where companyId = &#63; and externalReferenceCode = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param companyId the company ID @param externalReferenceCode the external reference code @return the matching cp attachment file entry, or <code>n...
[ "Returns", "the", "cp", "attachment", "file", "entry", "where", "companyId", "=", "&#63", ";", "and", "externalReferenceCode", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Us...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java#L4810-L4814
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/BigendianEncoding.java
BigendianEncoding.byteFromBase16String
static byte byteFromBase16String(CharSequence chars, int offset) { """ Decodes the specified two character sequence, and returns the resulting {@code byte}. @param chars the character sequence to be decoded. @param offset the starting offset in the {@code CharSequence}. @return the resulting {@code byte} @th...
java
static byte byteFromBase16String(CharSequence chars, int offset) { Utils.checkArgument(chars.length() >= offset + 2, "chars too small"); return decodeByte(chars.charAt(offset), chars.charAt(offset + 1)); }
[ "static", "byte", "byteFromBase16String", "(", "CharSequence", "chars", ",", "int", "offset", ")", "{", "Utils", ".", "checkArgument", "(", "chars", ".", "length", "(", ")", ">=", "offset", "+", "2", ",", "\"chars too small\"", ")", ";", "return", "decodeByt...
Decodes the specified two character sequence, and returns the resulting {@code byte}. @param chars the character sequence to be decoded. @param offset the starting offset in the {@code CharSequence}. @return the resulting {@code byte} @throws IllegalArgumentException if the input is not a valid encoded string accordin...
[ "Decodes", "the", "specified", "two", "character", "sequence", "and", "returns", "the", "resulting", "{", "@code", "byte", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/BigendianEncoding.java#L148-L151
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/SparqlLogicConceptMatcher.java
SparqlLogicConceptMatcher.listMatchesAtLeastOfType
@Override public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) { """ Obtains all the matching resources that have a MatchType with the URI of {@code origin} of the type provided (inclusive) or more. @param origin URI to match @param minType the minimum MatchType we want to ...
java
@Override public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) { return listMatchesWithinRange(origin, minType, LogicConceptMatchType.Exact); }
[ "@", "Override", "public", "Map", "<", "URI", ",", "MatchResult", ">", "listMatchesAtLeastOfType", "(", "URI", "origin", ",", "MatchType", "minType", ")", "{", "return", "listMatchesWithinRange", "(", "origin", ",", "minType", ",", "LogicConceptMatchType", ".", ...
Obtains all the matching resources that have a MatchType with the URI of {@code origin} of the type provided (inclusive) or more. @param origin URI to match @param minType the minimum MatchType we want to obtain @return an ImmutableMap sorted by value indexed by the URI of the matching resource and containing the par...
[ "Obtains", "all", "the", "matching", "resources", "that", "have", "a", "MatchType", "with", "the", "URI", "of", "{", "@code", "origin", "}", "of", "the", "type", "provided", "(", "inclusive", ")", "or", "more", "." ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/SparqlLogicConceptMatcher.java#L265-L268
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/SparkTransformExecutor.java
SparkTransformExecutor.executeSequenceToSequence
public static JavaRDD<List<List<Writable>>> executeSequenceToSequence(JavaRDD<List<List<Writable>>> inputSequence, TransformProcess transformProcess) { """ Execute the specified TransformProcess with the given <i>sequence</i> input data<br> Note: this method can only be used if the TransformPr...
java
public static JavaRDD<List<List<Writable>>> executeSequenceToSequence(JavaRDD<List<List<Writable>>> inputSequence, TransformProcess transformProcess) { if (!(transformProcess.getFinalSchema() instanceof SequenceSchema)) { throw new IllegalStateException("Cannot return non-sequenc...
[ "public", "static", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "executeSequenceToSequence", "(", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "inputSequence", ",", "TransformProcess", "transformProcess", ")", ...
Execute the specified TransformProcess with the given <i>sequence</i> input data<br> Note: this method can only be used if the TransformProcess starts with sequence data, and also returns sequence data @param inputSequence Input sequence data to process @param transformProcess TransformProcess to execute @return Pr...
[ "Execute", "the", "specified", "TransformProcess", "with", "the", "given", "<i", ">", "sequence<", "/", "i", ">", "input", "data<br", ">", "Note", ":", "this", "method", "can", "only", "be", "used", "if", "the", "TransformProcess", "starts", "with", "sequenc...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/SparkTransformExecutor.java#L143-L150
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toFlatList
public <U> List<U> toFlatList(Function<? super T, ? extends Collection<U>> mapper) { """ Returns a {@link List} which contains all the elements of the collections generated by provided mapper from each element of this stream. There are no guarantees on the type, mutability, serializability, or thread-safety of ...
java
public <U> List<U> toFlatList(Function<? super T, ? extends Collection<U>> mapper) { return toFlatCollection(mapper, ArrayList::new); }
[ "public", "<", "U", ">", "List", "<", "U", ">", "toFlatList", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "Collection", "<", "U", ">", ">", "mapper", ")", "{", "return", "toFlatCollection", "(", "mapper", ",", "ArrayList", "::", "ne...
Returns a {@link List} which contains all the elements of the collections generated by provided mapper from each element of this stream. There are no guarantees on the type, mutability, serializability, or thread-safety of the {@code List} returned; if more control over the returned {@code List} is required, use {@link...
[ "Returns", "a", "{", "@link", "List", "}", "which", "contains", "all", "the", "elements", "of", "the", "collections", "generated", "by", "provided", "mapper", "from", "each", "element", "of", "this", "stream", ".", "There", "are", "no", "guarantees", "on", ...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L901-L903
crawljax/crawljax
core/src/main/java/com/crawljax/core/state/InMemoryStateFlowGraph.java
InMemoryStateFlowGraph.addEdge
public boolean addEdge(StateVertex sourceVertex, StateVertex targetVertex, Eventable clickable) { """ Adds the specified edge to this graph, going from the source vertex to the target vertex. More formally, adds the specified edge, e, to this graph if this graph contains no edge e2 such that e2.equals(e). If thi...
java
public boolean addEdge(StateVertex sourceVertex, StateVertex targetVertex, Eventable clickable) { clickable.setSource(sourceVertex); clickable.setTarget(targetVertex); writeLock.lock(); try { boolean added = sfg.addEdge(sourceVertex, targetVertex, clickable); if (!added) { Set<Eventable> allEdges = sf...
[ "public", "boolean", "addEdge", "(", "StateVertex", "sourceVertex", ",", "StateVertex", "targetVertex", ",", "Eventable", "clickable", ")", "{", "clickable", ".", "setSource", "(", "sourceVertex", ")", ";", "clickable", ".", "setTarget", "(", "targetVertex", ")", ...
Adds the specified edge to this graph, going from the source vertex to the target vertex. More formally, adds the specified edge, e, to this graph if this graph contains no edge e2 such that e2.equals(e). If this graph already contains such an edge, the call leaves this graph unchanged and returns false. Some graphs do...
[ "Adds", "the", "specified", "edge", "to", "this", "graph", "going", "from", "the", "source", "vertex", "to", "the", "target", "vertex", ".", "More", "formally", "adds", "the", "specified", "edge", "e", "to", "this", "graph", "if", "this", "graph", "contain...
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/core/state/InMemoryStateFlowGraph.java#L198-L220