repo
stringlengths
7
59
path
stringlengths
3
222
func_name
stringlengths
3
127
original_string
stringlengths
0
466k
language
stringclasses
1 value
code
stringlengths
0
466k
code_tokens
listlengths
0
68.3k
docstring
stringlengths
0
21.3k
docstring_tokens
listlengths
0
1.93k
sha
stringlengths
0
40
url
stringlengths
0
339
partition
stringclasses
3 values
summary
stringlengths
0
250
instruction
stringlengths
38
3.13k
input
stringclasses
1 value
output
stringlengths
146
466k
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java
MockRouteTableController.deleteRouteTable
public MockRouteTable deleteRouteTable(final String routetableId) { if (routetableId != null && allMockRouteTables.containsKey(routetableId)) { return allMockRouteTables.remove(routetableId); } return null; }
java
public MockRouteTable deleteRouteTable(final String routetableId) { if (routetableId != null && allMockRouteTables.containsKey(routetableId)) { return allMockRouteTables.remove(routetableId); } return null; }
[ "public", "MockRouteTable", "deleteRouteTable", "(", "final", "String", "routetableId", ")", "{", "if", "(", "routetableId", "!=", "null", "&&", "allMockRouteTables", ".", "containsKey", "(", "routetableId", ")", ")", "{", "return", "allMockRouteTables", ".", "rem...
Delete RouteTable. @param routetableId RouteTableId to be deleted @return Mock RouteTable.
[ "Delete", "RouteTable", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java#L110-L116
train
Delete a mock route table.
Create a Java method that does the following: "Delete a mock route table.".
Of course, here is the Java code you requested: ```java public MockRouteTable deleteRouteTable(final String routetableId) { if (routetableId != null && allMockRouteTables.containsKey(routetableId)) { return allMockRouteTables.remove(routetableId); } return null; } ``` Hope thi...
playn/playn
core/src/playn/core/Net.java
Net.get
public RFuture<String> get(String url) { return req(url).execute().map(GET_PAYLOAD); }
java
public RFuture<String> get(String url) { return req(url).execute().map(GET_PAYLOAD); }
[ "public", "RFuture", "<", "String", ">", "get", "(", "String", "url", ")", "{", "return", "req", "(", "url", ")", ".", "execute", "(", ")", ".", "map", "(", "GET_PAYLOAD", ")", ";", "}" ]
Performs an HTTP GET request to the specified URL.
[ "Performs", "an", "HTTP", "GET", "request", "to", "the", "specified", "URL", "." ]
7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Net.java#L265-L267
train
Get a single page of content from a URL
Create a Java method that does the following: "Get a single page of content from a URL".
Of course, here is the Java code you requested: ```java public RFuture<String> get(String url) { return req(url).execute().map(GET_PAYLOAD); } ``` Hope this helps!
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/entityjson/EntityJsonParser.java
EntityJsonParser.validate
IEntityJsonSchemaContext validate(URL schemaUrl, Object instanceSource, ObjectNode instance) throws SchemaValidationException, NoSchemaException, InvalidSchemaException { IEntityJsonInstanceContext context = EntityJsonContext.newInstance() .withInstance(instanceSource, instance); return validate(...
java
IEntityJsonSchemaContext validate(URL schemaUrl, Object instanceSource, ObjectNode instance) throws SchemaValidationException, NoSchemaException, InvalidSchemaException { IEntityJsonInstanceContext context = EntityJsonContext.newInstance() .withInstance(instanceSource, instance); return validate(...
[ "IEntityJsonSchemaContext", "validate", "(", "URL", "schemaUrl", ",", "Object", "instanceSource", ",", "ObjectNode", "instance", ")", "throws", "SchemaValidationException", ",", "NoSchemaException", ",", "InvalidSchemaException", "{", "IEntityJsonInstanceContext", "context", ...
/* package
[ "/", "*", "package" ]
68daed66267062d144a05b3ee9a9bf4b715e3f95
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/entityjson/EntityJsonParser.java#L262-L268
train
Validate an entity.
Create a Java method that does the following: "Validate an entity.".
Of course, here is the Java code you requested: ```java IEntityJsonSchemaContext validate(URL schemaUrl, Object instanceSource, ObjectNode instance) throws SchemaValidationException, NoSchemaException, InvalidSchemaException { IEntityJsonInstanceContext context = EntityJsonContext.newInstance() .withInst...
OpenEstate/OpenEstate-IO
Core/src/main/java/org/openestate/io/core/XmlUtils.java
XmlUtils.newDocument
public static Document newDocument(String xmlString, boolean namespaceAware) throws SAXException, IOException, ParserConfigurationException { return XmlUtils.newDocument( new InputSource(new StringReader(xmlString)), namespaceAware); }
java
public static Document newDocument(String xmlString, boolean namespaceAware) throws SAXException, IOException, ParserConfigurationException { return XmlUtils.newDocument( new InputSource(new StringReader(xmlString)), namespaceAware); }
[ "public", "static", "Document", "newDocument", "(", "String", "xmlString", ",", "boolean", "namespaceAware", ")", "throws", "SAXException", ",", "IOException", ",", "ParserConfigurationException", "{", "return", "XmlUtils", ".", "newDocument", "(", "new", "InputSource...
Create a {@link Document} from a XML string. @param xmlString the XML string, the document is created from @param namespaceAware if namespaces are used in the created document @return created document @throws SAXException if XML contains an error @throws IOException if XML is not ...
[ "Create", "a", "{", "@link", "Document", "}", "from", "a", "XML", "string", "." ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/Core/src/main/java/org/openestate/io/core/XmlUtils.java#L181-L184
test
Create a new XML document from the given XML string.
Create a Java method that does the following: "Create a new XML document from the given XML string.".
Of course, here is the Java code you requested: ```java public static Document newDocument(String xmlString, boolean namespaceAware) throws SAXException, IOException, ParserConfigurationException { return XmlUtils.newDocument( new InputSource(new StringReader(xmlString)), namespaceAware); }...
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java
AbstractMemberBuilderFragment.generateMemberAppender
protected void generateMemberAppender(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference appender = description.getElementDescription().getAppenderType(); final String generatedFieldAccessor = getGeneratedMemberAccessor(description); final StringConcatenationCl...
java
protected void generateMemberAppender(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference appender = description.getElementDescription().getAppenderType(); final String generatedFieldAccessor = getGeneratedMemberAccessor(description); final StringConcatenationCl...
[ "protected", "void", "generateMemberAppender", "(", "MemberDescription", "description", ")", "{", "if", "(", "description", ".", "isTopElement", "(", ")", ")", "{", "return", ";", "}", "final", "TypeReference", "appender", "=", "description", ".", "getElementDescr...
Generate the member appender. @param description the description of the member.
[ "Generate", "the", "member", "appender", "." ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java#L175-L210
train
Generate the member appender.
Create a Java method that does the following: "Generate the member appender.".
Of course, here is the Java code you requested: ```java protected void generateMemberAppender(MemberDescription description) { if (description.isTopElement()) { return; } final TypeReference appender = description.getElementDescription().getAppenderType(); final String generatedFieldAccessor = getGeneratedM...
jblas-project/jblas
src/main/java/org/jblas/util/LibraryLoader.java
LibraryLoader.loadLibrary
public void loadLibrary(String libname, boolean withFlavor) { // preload flavor libraries String flavor = null; if (withFlavor) { logger.debug("Preloading ArchFlavor library."); flavor = ArchFlavor.archFlavor(); if (flavor != null && flavor.equals("sse2")) { throw new Unsupp...
java
public void loadLibrary(String libname, boolean withFlavor) { // preload flavor libraries String flavor = null; if (withFlavor) { logger.debug("Preloading ArchFlavor library."); flavor = ArchFlavor.archFlavor(); if (flavor != null && flavor.equals("sse2")) { throw new Unsupp...
[ "public", "void", "loadLibrary", "(", "String", "libname", ",", "boolean", "withFlavor", ")", "{", "// preload flavor libraries\r", "String", "flavor", "=", "null", ";", "if", "(", "withFlavor", ")", "{", "logger", ".", "debug", "(", "\"Preloading ArchFlavor libra...
<p>Find the library <tt>libname</tt> as a resource, copy it to a tempfile and load it using System.load(). The name of the library has to be the base name, it is mapped to the corresponding system name using System.mapLibraryName(). For example, the library "foo" is called "libfoo.so" under Linux and "foo.dll" under Wi...
[ "<p", ">", "Find", "the", "library", "<tt", ">", "libname<", "/", "tt", ">", "as", "a", "resource", "copy", "it", "to", "a", "tempfile", "and", "load", "it", "using", "System", ".", "load", "()", ".", "The", "name", "of", "the", "library", "has", "...
2818f231228e655cda80dfd8e0b87709fdfd8a70
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/util/LibraryLoader.java#L146-L187
train
Load the specified library from the system.
Create a Java method that does the following: "Load the specified library from the system.".
Of course, here is the Java code you requested: ```java public void loadLibrary(String libname, boolean withFlavor) { // preload flavor libraries String flavor = null; if (withFlavor) { logger.debug("Preloading ArchFlavor library."); flavor = ArchFlavor.archFlavor(); if (flavor != n...
wcm-io/wcm-io-tooling
maven/plugins/nodejs-maven-plugin/src/main/java/io/wcm/maven/plugins/nodejs/mojo/AbstractNodeJsMojo.java
AbstractNodeJsMojo.run
public void run() throws MojoExecutionException { if (skip) { return; } if (tasks == null || tasks.isEmpty()) { getLog().warn("No Node.js tasks have been defined. Nothing to do."); } // validate nodejs version ComparableVersion nodeJsVersionComparable = new ComparableVersion(nodeJs...
java
public void run() throws MojoExecutionException { if (skip) { return; } if (tasks == null || tasks.isEmpty()) { getLog().warn("No Node.js tasks have been defined. Nothing to do."); } // validate nodejs version ComparableVersion nodeJsVersionComparable = new ComparableVersion(nodeJs...
[ "public", "void", "run", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "skip", ")", "{", "return", ";", "}", "if", "(", "tasks", "==", "null", "||", "tasks", ".", "isEmpty", "(", ")", ")", "{", "getLog", "(", ")", ".", "warn", "(", ...
Installs node js if necessary and performs defined tasks @throws MojoExecutionException Mojo execution exception
[ "Installs", "node", "js", "if", "necessary", "and", "performs", "defined", "tasks" ]
1abcd01dd3ad4cc248f03b431f929573d84fa9b4
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/maven/plugins/nodejs-maven-plugin/src/main/java/io/wcm/maven/plugins/nodejs/mojo/AbstractNodeJsMojo.java#L145-L168
train
Run the plugin.
Create a Java method that does the following: "Run the plugin.".
Of course, here is the Java code you requested: ```java public void run() throws MojoExecutionException { if (skip) { return; } if (tasks == null || tasks.isEmpty()) { getLog().warn("No Node.js tasks have been defined. Nothing to do."); } // validate nodejs version ComparableVersi...
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
AbstractQueuedSynchronizer.tryAcquireSharedNanos
public final boolean tryAcquireSharedNanos(int arg, long nanosTimeout) throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); return tryAcquireShared(arg) >= 0 || doAcquireSharedNanos(arg, nanosTimeout); }
java
public final boolean tryAcquireSharedNanos(int arg, long nanosTimeout) throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); return tryAcquireShared(arg) >= 0 || doAcquireSharedNanos(arg, nanosTimeout); }
[ "public", "final", "boolean", "tryAcquireSharedNanos", "(", "int", "arg", ",", "long", "nanosTimeout", ")", "throws", "InterruptedException", "{", "if", "(", "Thread", ".", "interrupted", "(", ")", ")", "throw", "new", "InterruptedException", "(", ")", ";", "r...
Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses. Implemented by first checking interrupt status, then invoking at least once {@link #tryAcquireShared}, returning on success. Otherwise, the thread is queued, possibly repeatedly blocking and unblocking, invoking {@l...
[ "Attempts", "to", "acquire", "in", "shared", "mode", "aborting", "if", "interrupted", "and", "failing", "if", "the", "given", "timeout", "elapses", ".", "Implemented", "by", "first", "checking", "interrupt", "status", "then", "invoking", "at", "least", "once", ...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java#L1351-L1357
train
Acquire a shared lock.
Create a Java method that does the following: "Acquire a shared lock.".
Of course, here is the Java code you requested: ```java public final boolean tryAcquireSharedNanos(int arg, long nanosTimeout) throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); return tryAcquireShared(arg) >= 0 || doAcquireShar...
Omertron/api-thetvdb
src/main/java/com/omertron/thetvdbapi/TheTVDBApi.java
TheTVDBApi.getLanguages
public List<Language> getLanguages() throws TvDbException { StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(BASE_URL) .append(apiKey) .append("/languages") .append(XML_EXTENSION); LOG.trace(URL, urlBuilder.toString()); ...
java
public List<Language> getLanguages() throws TvDbException { StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(BASE_URL) .append(apiKey) .append("/languages") .append(XML_EXTENSION); LOG.trace(URL, urlBuilder.toString()); ...
[ "public", "List", "<", "Language", ">", "getLanguages", "(", ")", "throws", "TvDbException", "{", "StringBuilder", "urlBuilder", "=", "new", "StringBuilder", "(", ")", ";", "urlBuilder", ".", "append", "(", "BASE_URL", ")", ".", "append", "(", "apiKey", ")",...
Gets the languages. @return the languages @throws com.omertron.thetvdbapi.TvDbException
[ "Gets", "the", "languages", "." ]
2ff9f9580e76043f19d2fc3234d87e16a95fa485
https://github.com/Omertron/api-thetvdb/blob/2ff9f9580e76043f19d2fc3234d87e16a95fa485/src/main/java/com/omertron/thetvdbapi/TheTVDBApi.java#L424-L434
train
Get the languages.
Create a Java method that does the following: "Get the languages.".
Of course, here is the Java code you requested: ```java public List<Language> getLanguages() throws TvDbException { StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(BASE_URL) .append(apiKey) .append("/languages") .append(XML_EXTENS...
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java
NameTable.getOriginalMethod
private ExecutableElement getOriginalMethod( ExecutableElement topMethod, TypeElement declaringClass, TypeElement currentType) { if (currentType == null) { return null; } // TODO(tball): simplify to ElementUtil.getSuperclass() when javac update is complete. TypeElement superclass = currentTy...
java
private ExecutableElement getOriginalMethod( ExecutableElement topMethod, TypeElement declaringClass, TypeElement currentType) { if (currentType == null) { return null; } // TODO(tball): simplify to ElementUtil.getSuperclass() when javac update is complete. TypeElement superclass = currentTy...
[ "private", "ExecutableElement", "getOriginalMethod", "(", "ExecutableElement", "topMethod", ",", "TypeElement", "declaringClass", ",", "TypeElement", "currentType", ")", "{", "if", "(", "currentType", "==", "null", ")", "{", "return", "null", ";", "}", "// TODO(tbal...
Finds the original method element to use for generating a selector. The method returned is the first method found in the hierarchy while traversing in order of declared inheritance that doesn't override a method from a supertype. (ie. it is the first leaf node found in the tree of overriding methods)
[ "Finds", "the", "original", "method", "element", "to", "use", "for", "generating", "a", "selector", ".", "The", "method", "returned", "is", "the", "first", "method", "found", "in", "the", "hierarchy", "while", "traversing", "in", "order", "of", "declared", "...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L472-L500
train
Get original method.
Create a Java method that does the following: "Get original method.".
Of course, here is the Java code you requested: ```java private ExecutableElement getOriginalMethod( ExecutableElement topMethod, TypeElement declaringClass, TypeElement currentType) { if (currentType == null) { return null; } // TODO(tball): simplify to ElementUtil.getSuperclass() when javac u...
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/problem/knapsack/Knapsack.java
Knapsack.getPrice
public long getPrice(Configuration configuration) { long total = 0; for (KnapsackItem knapsackItem : getKnapsackItems()) { if (configuration.valueAt(knapsackItem.getIndex()) == 1) { total += knapsackItem.getPrice(); } } return total; }
java
public long getPrice(Configuration configuration) { long total = 0; for (KnapsackItem knapsackItem : getKnapsackItems()) { if (configuration.valueAt(knapsackItem.getIndex()) == 1) { total += knapsackItem.getPrice(); } } return total; }
[ "public", "long", "getPrice", "(", "Configuration", "configuration", ")", "{", "long", "total", "=", "0", ";", "for", "(", "KnapsackItem", "knapsackItem", ":", "getKnapsackItems", "(", ")", ")", "{", "if", "(", "configuration", ".", "valueAt", "(", "knapsack...
Returns price of items in given configuration. Does not check for capacity. @param configuration configuration to calculate price of @return price of configuration
[ "Returns", "price", "of", "items", "in", "given", "configuration", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/problem/knapsack/Knapsack.java#L197-L205
train
Get the total amount of a resource in a configuration.
Create a Java method that does the following: "Get the total amount of a resource in a configuration.".
Of course, here is the Java code you requested: ```java public long getPrice(Configuration configuration) { long total = 0; for (KnapsackItem knapsackItem : getKnapsackItems()) { if (configuration.valueAt(knapsackItem.getIndex()) == 1) { total += knapsackItem.getPrice(); ...
phax/ph-commons
ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java
KeyStoreHelper.loadTrustedCertificateKey
@Nonnull public static LoadedKey <KeyStore.TrustedCertificateEntry> loadTrustedCertificateKey (@Nonnull final KeyStore aKeyStore, @Nonnull final String sKeyStorePath, ...
java
@Nonnull public static LoadedKey <KeyStore.TrustedCertificateEntry> loadTrustedCertificateKey (@Nonnull final KeyStore aKeyStore, @Nonnull final String sKeyStorePath, ...
[ "@", "Nonnull", "public", "static", "LoadedKey", "<", "KeyStore", ".", "TrustedCertificateEntry", ">", "loadTrustedCertificateKey", "(", "@", "Nonnull", "final", "KeyStore", "aKeyStore", ",", "@", "Nonnull", "final", "String", "sKeyStorePath", ",", "@", "Nullable", ...
Load the specified private key entry from the provided key store. @param aKeyStore The key store to load the key from. May not be <code>null</code>. @param sKeyStorePath Key store path. For nice error messages only. May be <code>null</code>. @param sKeyStoreKeyAlias The alias to be resolved in the key store. Must be n...
[ "Load", "the", "specified", "private", "key", "entry", "from", "the", "provided", "key", "store", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java#L385-L396
train
Load a trusted certificate key.
Create a Java method that does the following: "Load a trusted certificate key.".
Of course, here is the Java code you requested: ```java @Nonnull public static LoadedKey <KeyStore.TrustedCertificateEntry> loadTrustedCertificateKey (@Nonnull final KeyStore aKeyStore, @Nonnull final String sKeyStorePath, ...
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java
ProcessContext.getDataUsageFor
public Map<String, Set<DataUsage>> getDataUsageFor(String activity) throws CompatibilityException { validateActivity(activity); if (activityDataUsage.get(activity) == null) { return new HashMap<>(); //No input data elements for this activity } ...
java
public Map<String, Set<DataUsage>> getDataUsageFor(String activity) throws CompatibilityException { validateActivity(activity); if (activityDataUsage.get(activity) == null) { return new HashMap<>(); //No input data elements for this activity } ...
[ "public", "Map", "<", "String", ",", "Set", "<", "DataUsage", ">", ">", "getDataUsageFor", "(", "String", "activity", ")", "throws", "CompatibilityException", "{", "validateActivity", "(", "activity", ")", ";", "if", "(", "activityDataUsage", ".", "get", "(", ...
Returns all attributes of the given activity together with their usage.<br> If the given attribute has no attributes, the returned set contains no elements.<br> The given activity has to be known by the context, i.e. be contained in the activity list. @param activity Activity for which the attribute usage is requested...
[ "Returns", "all", "attributes", "of", "the", "given", "activity", "together", "with", "their", "usage", ".", "<br", ">", "If", "the", "given", "attribute", "has", "no", "attributes", "the", "returned", "set", "contains", "no", "elements", ".", "<br", ">", ...
e791cb07a6e62ecf837d760d58a25f32fbf6bbca
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java#L764-L770
train
Get the data usage for the given activity.
Create a Java method that does the following: "Get the data usage for the given activity.".
Of course, here is the Java code you requested: ```java public Map<String, Set<DataUsage>> getDataUsageFor(String activity) throws CompatibilityException { validateActivity(activity); if (activityDataUsage.get(activity) == null) { return new HashMap<>(); //No inp...
aws/aws-sdk-java
aws-java-sdk-config/src/main/java/com/amazonaws/services/config/AmazonConfigClient.java
AmazonConfigClient.describeConfigRuleEvaluationStatus
@Override public DescribeConfigRuleEvaluationStatusResult describeConfigRuleEvaluationStatus(DescribeConfigRuleEvaluationStatusRequest request) { request = beforeClientExecution(request); return executeDescribeConfigRuleEvaluationStatus(request); }
java
@Override public DescribeConfigRuleEvaluationStatusResult describeConfigRuleEvaluationStatus(DescribeConfigRuleEvaluationStatusRequest request) { request = beforeClientExecution(request); return executeDescribeConfigRuleEvaluationStatus(request); }
[ "@", "Override", "public", "DescribeConfigRuleEvaluationStatusResult", "describeConfigRuleEvaluationStatus", "(", "DescribeConfigRuleEvaluationStatusRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeConfigR...
<p> Returns status information for each of your AWS managed Config rules. The status includes information such as the last time AWS Config invoked the rule, the last time AWS Config failed to invoke the rule, and the related error for the last failure. </p> @param describeConfigRuleEvaluationStatusRequest @return Resu...
[ "<p", ">", "Returns", "status", "information", "for", "each", "of", "your", "AWS", "managed", "Config", "rules", ".", "The", "status", "includes", "information", "such", "as", "the", "last", "time", "AWS", "Config", "invoked", "the", "rule", "the", "last", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-config/src/main/java/com/amazonaws/services/config/AmazonConfigClient.java#L1535-L1539
train
Retrieves the status of a config rule evaluation.
Create a Java method that does the following: "Retrieves the status of a config rule evaluation.".
Of course, here is the Java code you requested: ```java @Override public DescribeConfigRuleEvaluationStatusResult describeConfigRuleEvaluationStatus(DescribeConfigRuleEvaluationStatusRequest request) { request = beforeClientExecution(request); return executeDescribeConfigRuleEvaluationStatus(reques...
liveontologies/elk-reasoner
elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/stages/EntailmentQueryState.java
EntailmentQueryState.registerQueries
void registerQueries(final Iterable<? extends ElkAxiom> axioms) { lastQueries_.clear(); for (final ElkAxiom axiom : axioms) { LOGGER_.trace("entailment query registered {}", axiom); lastQueries_.add(axiom); QueryState state = queried_.get(axiom); if (state != null) { queriedEvictor_.add(state); ...
java
void registerQueries(final Iterable<? extends ElkAxiom> axioms) { lastQueries_.clear(); for (final ElkAxiom axiom : axioms) { LOGGER_.trace("entailment query registered {}", axiom); lastQueries_.add(axiom); QueryState state = queried_.get(axiom); if (state != null) { queriedEvictor_.add(state); ...
[ "void", "registerQueries", "(", "final", "Iterable", "<", "?", "extends", "ElkAxiom", ">", "axioms", ")", "{", "lastQueries_", ".", "clear", "(", ")", ";", "for", "(", "final", "ElkAxiom", "axiom", ":", "axioms", ")", "{", "LOGGER_", ".", "trace", "(", ...
Registers the supplied axioms for querying. If all necessary stages are run after calling this method for some axioms, neither {@link #isEntailed(Iterable)} nor a {@link org.semanticweb.elk.reasoner.query.ProperEntailmentQueryResult ProperEntailmentQueryResult} for any of these axioms will throw {@link ElkQueryExceptio...
[ "Registers", "the", "supplied", "axioms", "for", "querying", ".", "If", "all", "necessary", "stages", "are", "run", "after", "calling", "this", "method", "for", "some", "axioms", "neither", "{", "@link", "#isEntailed", "(", "Iterable", ")", "}", "nor", "a", ...
cfbe5279a57e0433d45c1676c7658ddb6e29b9eb
https://github.com/liveontologies/elk-reasoner/blob/cfbe5279a57e0433d45c1676c7658ddb6e29b9eb/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/stages/EntailmentQueryState.java#L255-L277
test
Registers the specified query axioms with the query manager.
Create a Java method that does the following: "Registers the specified query axioms with the query manager.".
Of course, here is the Java code you requested: ```java void registerQueries(final Iterable<? extends ElkAxiom> axioms) { lastQueries_.clear(); for (final ElkAxiom axiom : axioms) { LOGGER_.trace("entailment query registered {}", axiom); lastQueries_.add(axiom); QueryState state = queried_.get(axiom);...
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java
WRadioButtonSelectExample.addFlatSelectExample
private void addFlatSelectExample() { add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect with flat layout")); add(new ExplanatoryText("Setting the layout to FLAT will make the radio buttons be rendered in a horizontal line. They will wrap when they" + " reach the edge of the parent container.")); final WRa...
java
private void addFlatSelectExample() { add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect with flat layout")); add(new ExplanatoryText("Setting the layout to FLAT will make the radio buttons be rendered in a horizontal line. They will wrap when they" + " reach the edge of the parent container.")); final WRa...
[ "private", "void", "addFlatSelectExample", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H3", ",", "\"WRadioButtonSelect with flat layout\"", ")", ")", ";", "add", "(", "new", "ExplanatoryText", "(", "\"Setting the layout to FLAT will make t...
adds a WRadioButtonSelect with LAYOUT_FLAT.
[ "adds", "a", "WRadioButtonSelect", "with", "LAYOUT_FLAT", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WRadioButtonSelectExample.java#L183-L191
train
Add the WRadioButtonSelect with a flat layout.
Create a Java method that does the following: "Add the WRadioButtonSelect with a flat layout.".
Of course, here is the Java code you requested: ```java private void addFlatSelectExample() { add(new WHeading(HeadingLevel.H3, "WRadioButtonSelect with flat layout")); add(new ExplanatoryText("Setting the layout to FLAT will make the radio buttons be rendered in a horizontal line. They will wrap when they" + ...
line/armeria
core/src/main/java/com/linecorp/armeria/common/logging/LoggingDecoratorBuilder.java
LoggingDecoratorBuilder.headersSanitizer
public T headersSanitizer(Function<? super HttpHeaders, ? extends HttpHeaders> headersSanitizer) { requireNonNull(headersSanitizer, "headersSanitizer"); requestHeadersSanitizer(headersSanitizer); requestTrailersSanitizer(headersSanitizer); responseHeadersSanitizer(headersSanitizer); ...
java
public T headersSanitizer(Function<? super HttpHeaders, ? extends HttpHeaders> headersSanitizer) { requireNonNull(headersSanitizer, "headersSanitizer"); requestHeadersSanitizer(headersSanitizer); requestTrailersSanitizer(headersSanitizer); responseHeadersSanitizer(headersSanitizer); ...
[ "public", "T", "headersSanitizer", "(", "Function", "<", "?", "super", "HttpHeaders", ",", "?", "extends", "HttpHeaders", ">", "headersSanitizer", ")", "{", "requireNonNull", "(", "headersSanitizer", ",", "\"headersSanitizer\"", ")", ";", "requestHeadersSanitizer", ...
Sets the {@link Function} to use to sanitize request, response and trailing headers before logging. It is common to have the {@link Function} that removes sensitive headers, like {@code "Cookie"} and {@code "Set-Cookie"}, before logging. This method is a shortcut of: <pre>{@code builder.requestHeadersSanitizer(headersS...
[ "Sets", "the", "{", "@link", "Function", "}", "to", "use", "to", "sanitize", "request", "response", "and", "trailing", "headers", "before", "logging", ".", "It", "is", "common", "to", "have", "the", "{", "@link", "Function", "}", "that", "removes", "sensit...
67d29e019fd35a35f89c45cc8f9119ff9b12b44d
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/logging/LoggingDecoratorBuilder.java#L188-L195
train
Sets the headers sanitizer function.
Create a Java method that does the following: "Sets the headers sanitizer function.".
Of course, here is the Java code you requested: ```java public T headersSanitizer(Function<? super HttpHeaders, ? extends HttpHeaders> headersSanitizer) { requireNonNull(headersSanitizer, "headersSanitizer"); requestHeadersSanitizer(headersSanitizer); requestTrailersSanitizer(headersSanitizer);...
OmarAflak/Fingerprint
fingerprint/src/main/java/me/aflak/libraries/view/Fingerprint.java
Fingerprint.fingerprintSuccessColor
public Fingerprint fingerprintSuccessColor(int fingerprintSuccess) { this.fingerprintSuccess = fingerprintSuccess; this.fingerprintImageView.setBackgroundTintList(ColorStateList.valueOf(getContext().getColor(fingerprintSuccess))); return this; }
java
public Fingerprint fingerprintSuccessColor(int fingerprintSuccess) { this.fingerprintSuccess = fingerprintSuccess; this.fingerprintImageView.setBackgroundTintList(ColorStateList.valueOf(getContext().getColor(fingerprintSuccess))); return this; }
[ "public", "Fingerprint", "fingerprintSuccessColor", "(", "int", "fingerprintSuccess", ")", "{", "this", ".", "fingerprintSuccess", "=", "fingerprintSuccess", ";", "this", ".", "fingerprintImageView", ".", "setBackgroundTintList", "(", "ColorStateList", ".", "valueOf", "...
Set the fingerprint icon color in success state. @param fingerprintSuccess color id @return the Fingerprint object itself
[ "Set", "the", "fingerprint", "icon", "color", "in", "success", "state", "." ]
4a4cd4a8f092a126f4204eea087d845360342a62
https://github.com/OmarAflak/Fingerprint/blob/4a4cd4a8f092a126f4204eea087d845360342a62/fingerprint/src/main/java/me/aflak/libraries/view/Fingerprint.java#L217-L221
train
Set the fingerprint color to be used for the image image
Create a Java method that does the following: "Set the fingerprint color to be used for the image image".
Of course, here is the Java code you requested: ```java public Fingerprint fingerprintSuccessColor(int fingerprintSuccess) { this.fingerprintSuccess = fingerprintSuccess; this.fingerprintImageView.setBackgroundTintList(ColorStateList.valueOf(getContext().getColor(fingerprintSuccess))); return t...
playn/playn
html/src/playn/rebind/AutoClientBundleGenerator.java
AutoClientBundleGenerator.getResources
private HashSet<Resource> getResources(GeneratorContext context, JClassType userType, FileFilter filter) { final String pack = userType.getPackage().getName().replace('.', '/'); HashSet<Resource> resourceList = new HashSet<Resource>(); for (String path : context.getResourcesOracle().getPathNames()) { ...
java
private HashSet<Resource> getResources(GeneratorContext context, JClassType userType, FileFilter filter) { final String pack = userType.getPackage().getName().replace('.', '/'); HashSet<Resource> resourceList = new HashSet<Resource>(); for (String path : context.getResourcesOracle().getPathNames()) { ...
[ "private", "HashSet", "<", "Resource", ">", "getResources", "(", "GeneratorContext", "context", ",", "JClassType", "userType", ",", "FileFilter", "filter", ")", "{", "final", "String", "pack", "=", "userType", ".", "getPackage", "(", ")", ".", "getName", "(", ...
Get all related resources of the auto resource bundler.
[ "Get", "all", "related", "resources", "of", "the", "auto", "resource", "bundler", "." ]
7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/html/src/playn/rebind/AutoClientBundleGenerator.java#L258-L271
train
Get the resources for a given user type.
Create a Java method that does the following: "Get the resources for a given user type.".
Of course, here is the Java code you requested: ```java private HashSet<Resource> getResources(GeneratorContext context, JClassType userType, FileFilter filter) { final String pack = userType.getPackage().getName().replace('.', '/'); HashSet<Resource> resourceList = new HashSet<Resource>(); for (String pa...
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/wires/WiresConnector.java
WiresConnector.getMagnetsOnAutoConnection
public WiresMagnet[] getMagnetsOnAutoConnection(final WiresShape headS, final WiresShape tailS) { final WiresConnection headC = getHeadConnection(); final WiresConnection tailC = getTailConnection(); if (!(headC.isAutoConnection() || tailC.isAutoConnection())) { // at l...
java
public WiresMagnet[] getMagnetsOnAutoConnection(final WiresShape headS, final WiresShape tailS) { final WiresConnection headC = getHeadConnection(); final WiresConnection tailC = getTailConnection(); if (!(headC.isAutoConnection() || tailC.isAutoConnection())) { // at l...
[ "public", "WiresMagnet", "[", "]", "getMagnetsOnAutoConnection", "(", "final", "WiresShape", "headS", ",", "final", "WiresShape", "tailS", ")", "{", "final", "WiresConnection", "headC", "=", "getHeadConnection", "(", ")", ";", "final", "WiresConnection", "tailC", ...
This is making some assumptions that will have to be fixed for anythign other than 8 Magnets at compass ordinal points. If there is no shape overlap, and one box is in the corner of the other box, then use nearest corner connections, else use nearest mid connection. Else there is overlap. This is now much more difficul...
[ "This", "is", "making", "some", "assumptions", "that", "will", "have", "to", "be", "fixed", "for", "anythign", "other", "than", "8", "Magnets", "at", "compass", "ordinal", "points", ".", "If", "there", "is", "no", "shape", "overlap", "and", "one", "box", ...
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/wires/WiresConnector.java#L428-L459
train
Gets the magnets on the auto connection.
Create a Java method that does the following: "Gets the magnets on the auto connection.".
Of course, here is the Java code you requested: ```java public WiresMagnet[] getMagnetsOnAutoConnection(final WiresShape headS, final WiresShape tailS) { final WiresConnection headC = getHeadConnection(); final WiresConnection tailC = getTailConnection(); if (!(headC.isAutoConnection() ||...
VoltDB/voltdb
src/frontend/org/voltdb/messaging/FastSerializer.java
FastSerializer.writeParameterSet
public void writeParameterSet(ParameterSet params) throws IOException { int len = params.getSerializedSize(); growIfNeeded(len); params.flattenToBuffer(buffer.b()); }
java
public void writeParameterSet(ParameterSet params) throws IOException { int len = params.getSerializedSize(); growIfNeeded(len); params.flattenToBuffer(buffer.b()); }
[ "public", "void", "writeParameterSet", "(", "ParameterSet", "params", ")", "throws", "IOException", "{", "int", "len", "=", "params", ".", "getSerializedSize", "(", ")", ";", "growIfNeeded", "(", "len", ")", ";", "params", ".", "flattenToBuffer", "(", "buffer"...
Write a ParameterSet using it's ByteBuffer serialization code.
[ "Write", "a", "ParameterSet", "using", "it", "s", "ByteBuffer", "serialization", "code", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastSerializer.java#L306-L310
train
Write a ParameterSet object to the underlying stream.
Create a Java method that does the following: "Write a ParameterSet object to the underlying stream.".
Of course, here is the Java code you requested: ```java public void writeParameterSet(ParameterSet params) throws IOException { int len = params.getSerializedSize(); growIfNeeded(len); params.flattenToBuffer(buffer.b()); } ``` Hope this helps!
aoindustries/aocode-public
src/main/java/com/aoindustries/util/StringUtility.java
StringUtility.nullIfEmpty
public static String nullIfEmpty(String value) { return value==null || value.isEmpty() ? null : value; }
java
public static String nullIfEmpty(String value) { return value==null || value.isEmpty() ? null : value; }
[ "public", "static", "String", "nullIfEmpty", "(", "String", "value", ")", "{", "return", "value", "==", "null", "||", "value", ".", "isEmpty", "(", ")", "?", "null", ":", "value", ";", "}" ]
Returns null if the string is null or empty.
[ "Returns", "null", "if", "the", "string", "is", "null", "or", "empty", "." ]
c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/util/StringUtility.java#L1428-L1430
train
Returns null if the given String is null or empty.
Create a Java method that does the following: "Returns null if the given String is null or empty.".
Of course, here is the Java code you requested: ```java public static String nullIfEmpty(String value) { return value==null || value.isEmpty() ? null : value; } ``` Hope this helps!
mozilla/rhino
xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java
XMLList.setTargets
void setTargets(XMLObjectImpl object, XmlNode.QName property) { targetObject = object; targetProperty = property; }
java
void setTargets(XMLObjectImpl object, XmlNode.QName property) { targetObject = object; targetProperty = property; }
[ "void", "setTargets", "(", "XMLObjectImpl", "object", ",", "XmlNode", ".", "QName", "property", ")", "{", "targetObject", "=", "object", ";", "targetProperty", "=", "property", ";", "}" ]
TODO Should be XMLObjectImpl, XMLName?
[ "TODO", "Should", "be", "XMLObjectImpl", "XMLName?" ]
fa8a86df11d37623f5faa8d445a5876612bc47b0
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLList.java#L38-L41
train
Sets the targets of the exception.
Create a Java method that does the following: "Sets the targets of the exception.".
Of course, here is the Java code you requested: ```java void setTargets(XMLObjectImpl object, XmlNode.QName property) { targetObject = object; targetProperty = property; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.getBucketRequestPayment
private RequestPaymentConfiguration getBucketRequestPayment( GetRequestPaymentConfigurationRequest getRequestPaymentConfigurationRequest) { String bucketName = getRequestPaymentConfigurationRequest .getBucketName(); rejectNull( bucketName, "T...
java
private RequestPaymentConfiguration getBucketRequestPayment( GetRequestPaymentConfigurationRequest getRequestPaymentConfigurationRequest) { String bucketName = getRequestPaymentConfigurationRequest .getBucketName(); rejectNull( bucketName, "T...
[ "private", "RequestPaymentConfiguration", "getBucketRequestPayment", "(", "GetRequestPaymentConfigurationRequest", "getRequestPaymentConfigurationRequest", ")", "{", "String", "bucketName", "=", "getRequestPaymentConfigurationRequest", ".", "getBucketName", "(", ")", ";", "rejectNu...
Retrieves the request payment configuration for a given Amazon S3 bucket. <p> When the request payment configuration for a Amazon S3 bucket is <code>Requester</code>, the requester instead of the bucket owner pays the cost of the request and the data download from the bucket. The bucket owner always pays the cost of st...
[ "Retrieves", "the", "request", "payment", "configuration", "for", "a", "given", "Amazon", "S3", "bucket", ".", "<p", ">", "When", "the", "request", "payment", "configuration", "for", "a", "Amazon", "S3", "bucket", "is", "<code", ">", "Requester<", "/", "code...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L5050-L5070
train
Gets the Request Payment Configuration for the specified bucket.
Create a Java method that does the following: "Gets the Request Payment Configuration for the specified bucket.".
Of course, here is the Java code you requested: ```java private RequestPaymentConfiguration getBucketRequestPayment( GetRequestPaymentConfigurationRequest getRequestPaymentConfigurationRequest) { String bucketName = getRequestPaymentConfigurationRequest .getBucketName(); r...
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/tuple/Tuple4.java
Tuple4.concat
public final <T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple1<T5> tuple) { return new Tuple5<>(v1, v2, v3, v4, tuple.v1); }
java
public final <T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple1<T5> tuple) { return new Tuple5<>(v1, v2, v3, v4, tuple.v1); }
[ "public", "final", "<", "T5", ">", "Tuple5", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ">", "concat", "(", "Tuple1", "<", "T5", ">", "tuple", ")", "{", "return", "new", "Tuple5", "<>", "(", "v1", ",", "v2", ",", "v3", ",", "v4", ...
Concatenate a tuple to this tuple.
[ "Concatenate", "a", "tuple", "to", "this", "tuple", "." ]
889d87c85ca57bafd4eddd78e0f7ae2804d2ee86
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/tuple/Tuple4.java#L86-L88
train
Concatenate the given tuples into this tuple.
Create a Java method that does the following: "Concatenate the given tuples into this tuple.".
Of course, here is the Java code you requested: ```java public final <T5> Tuple5<T1, T2, T3, T4, T5> concat(Tuple1<T5> tuple) { return new Tuple5<>(v1, v2, v3, v4, tuple.v1); } ``` Hope this helps!
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsInvalidStrIsIncluded
public FessMessages addErrorsInvalidStrIsIncluded(String property, String arg0, String arg1) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_invalid_str_is_included, arg0, arg1)); return this; }
java
public FessMessages addErrorsInvalidStrIsIncluded(String property, String arg0, String arg1) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_invalid_str_is_included, arg0, arg1)); return this; }
[ "public", "FessMessages", "addErrorsInvalidStrIsIncluded", "(", "String", "property", ",", "String", "arg0", ",", "String", "arg1", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_invali...
Add the created action message for the key 'errors.invalid_str_is_included' with parameters. <pre> message: "{1}" in "{0}" is invalid. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @param arg1 The parameter arg1 for message. (NotNull) @return t...
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "invalid_str_is_included", "with", "parameters", ".", "<pre", ">", "message", ":", "{", "1", "}", "in", "{", "0", "}", "is", "invalid", ".", "<", "/", "pre", ">" ]
e5e4b722549d32a4958dfd94965b21937bfe64cf
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1777-L1781
train
Add the errors. invalid_str_is_included message.
Create a Java method that does the following: "Add the errors. invalid_str_is_included message.".
Of course, here is the Java code you requested: ```java public FessMessages addErrorsInvalidStrIsIncluded(String property, String arg0, String arg1) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_invalid_str_is_included, arg0, arg1)); return this; } ``` Hope this h...
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DeleteChannelResult.java
DeleteChannelResult.withTags
public DeleteChannelResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public DeleteChannelResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "DeleteChannelResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/DeleteChannelResult.java#L658-L661
train
A map of tags to be deleted.
Create a Java method that does the following: "A map of tags to be deleted.".
Of course, here is the Java code you requested: ```java public DeleteChannelResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; } ``` Hope this helps!
OpenEstate/OpenEstate-IO
OpenImmo/src/main/jaxb/org/openestate/io/openimmo/xml/ObjectFactory.java
ObjectFactory.createZusatzfeld
@XmlElementDecl(namespace = "", name = "zusatzfeld") public JAXBElement<String> createZusatzfeld(String value) { return new JAXBElement<String>(_Zusatzfeld_QNAME, String.class, null, value); }
java
@XmlElementDecl(namespace = "", name = "zusatzfeld") public JAXBElement<String> createZusatzfeld(String value) { return new JAXBElement<String>(_Zusatzfeld_QNAME, String.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"\"", ",", "name", "=", "\"zusatzfeld\"", ")", "public", "JAXBElement", "<", "String", ">", "createZusatzfeld", "(", "String", "value", ")", "{", "return", "new", "JAXBElement", "<", "String", ">", "(", "_Zusat...
Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "String", "}", "{", "@code", ">", "}}" ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/OpenImmo/src/main/jaxb/org/openestate/io/openimmo/xml/ObjectFactory.java#L1473-L1476
test
Create an instance of a Zusatzfeld JAXBElement.
Create a Java method that does the following: "Create an instance of a Zusatzfeld JAXBElement.".
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "", name = "zusatzfeld") public JAXBElement<String> createZusatzfeld(String value) { return new JAXBElement<String>(_Zusatzfeld_QNAME, String.class, null, value); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java
S3CryptoModuleBase.contentCryptoMaterialOf
private ContentCryptoMaterial contentCryptoMaterialOf(S3ObjectWrapper s3w) { // Check if encryption info is in object metadata if (s3w.hasEncryptionInfo()) { return ContentCryptoMaterial .fromObjectMetadata(s3w.getObjectMetadata(), kekMater...
java
private ContentCryptoMaterial contentCryptoMaterialOf(S3ObjectWrapper s3w) { // Check if encryption info is in object metadata if (s3w.hasEncryptionInfo()) { return ContentCryptoMaterial .fromObjectMetadata(s3w.getObjectMetadata(), kekMater...
[ "private", "ContentCryptoMaterial", "contentCryptoMaterialOf", "(", "S3ObjectWrapper", "s3w", ")", "{", "// Check if encryption info is in object metadata", "if", "(", "s3w", ".", "hasEncryptionInfo", "(", ")", ")", "{", "return", "ContentCryptoMaterial", ".", "fromObjectMe...
Returns the content crypto material of an existing S3 object. @param s3w an existing S3 object (wrapper) @return a non-null content crypto material.
[ "Returns", "the", "content", "crypto", "material", "of", "an", "existing", "S3", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleBase.java#L850-L870
train
Get the content crypto material of the S3 object.
Create a Java method that does the following: "Get the content crypto material of the S3 object.".
Of course, here is the Java code you requested: ```java private ContentCryptoMaterial contentCryptoMaterialOf(S3ObjectWrapper s3w) { // Check if encryption info is in object metadata if (s3w.hasEncryptionInfo()) { return ContentCryptoMaterial .fromObjectMetadata(s3w.getObjec...
google/cloud-reporting
src/main/java/com/google/cloud/metrics/MetricsUtils.java
MetricsUtils.buildVirtualPageTitle
static String buildVirtualPageTitle(Map<String, String> metadata) { checkNotNull(metadata); List<String> escapedMetadata = new ArrayList<>(); for (Map.Entry<String, String> entry : metadata.entrySet()) { escapedMetadata.add(METADATA_ESCAPER.escape(entry.getKey()) + "=" + METADATA_ESCAPER.esc...
java
static String buildVirtualPageTitle(Map<String, String> metadata) { checkNotNull(metadata); List<String> escapedMetadata = new ArrayList<>(); for (Map.Entry<String, String> entry : metadata.entrySet()) { escapedMetadata.add(METADATA_ESCAPER.escape(entry.getKey()) + "=" + METADATA_ESCAPER.esc...
[ "static", "String", "buildVirtualPageTitle", "(", "Map", "<", "String", ",", "String", ">", "metadata", ")", "{", "checkNotNull", "(", "metadata", ")", ";", "List", "<", "String", ">", "escapedMetadata", "=", "new", "ArrayList", "<>", "(", ")", ";", "for",...
Creates a virtual page title from a set of metadata key-value pairs. @param metadata Metadata map. @return Virtual page title constructed from the metadata, escaped as required by the format.
[ "Creates", "a", "virtual", "page", "title", "from", "a", "set", "of", "metadata", "key", "-", "value", "pairs", "." ]
af2a8ff6077a9763f7f2d405dd55c82efaead0ac
https://github.com/google/cloud-reporting/blob/af2a8ff6077a9763f7f2d405dd55c82efaead0ac/src/main/java/com/google/cloud/metrics/MetricsUtils.java#L152-L160
train
Build a virtual page title from a map of metadata.
Create a Java method that does the following: "Build a virtual page title from a map of metadata.".
Of course, here is the Java code you requested: ```java static String buildVirtualPageTitle(Map<String, String> metadata) { checkNotNull(metadata); List<String> escapedMetadata = new ArrayList<>(); for (Map.Entry<String, String> entry : metadata.entrySet()) { escapedMetadata.add(METADATA_ESCAPER.esca...
apache/flink
flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/join/WindowJoin.java
WindowJoin.main
public static void main(String[] args) throws Exception { // parse the parameters final ParameterTool params = ParameterTool.fromArgs(args); final long windowSize = params.getLong("windowSize", 2000); final long rate = params.getLong("rate", 3L); System.out.println("Using windowSize=" + windowSize + ", data ...
java
public static void main(String[] args) throws Exception { // parse the parameters final ParameterTool params = ParameterTool.fromArgs(args); final long windowSize = params.getLong("windowSize", 2000); final long rate = params.getLong("rate", 3L); System.out.println("Using windowSize=" + windowSize + ", data ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "// parse the parameters", "final", "ParameterTool", "params", "=", "ParameterTool", ".", "fromArgs", "(", "args", ")", ";", "final", "long", "windowSize", "=...
*************************************************************************
[ "*************************************************************************" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/join/WindowJoin.java#L49-L78
train
Main method to run the windowed join example.
Create a Java method that does the following: "Main method to run the windowed join example.".
Of course, here is the Java code you requested: ```java public static void main(String[] args) throws Exception { // parse the parameters final ParameterTool params = ParameterTool.fromArgs(args); final long windowSize = params.getLong("windowSize", 2000); final long rate = params.getLong("rate", 3L); Syste...
aws/aws-sdk-java
aws-java-sdk-organizations/src/main/java/com/amazonaws/services/organizations/model/ListChildrenResult.java
ListChildrenResult.setChildren
public void setChildren(java.util.Collection<Child> children) { if (children == null) { this.children = null; return; } this.children = new java.util.ArrayList<Child>(children); }
java
public void setChildren(java.util.Collection<Child> children) { if (children == null) { this.children = null; return; } this.children = new java.util.ArrayList<Child>(children); }
[ "public", "void", "setChildren", "(", "java", ".", "util", ".", "Collection", "<", "Child", ">", "children", ")", "{", "if", "(", "children", "==", "null", ")", "{", "this", ".", "children", "=", "null", ";", "return", ";", "}", "this", ".", "childre...
<p> The list of children of the specified parent container. </p> @param children The list of children of the specified parent container.
[ "<p", ">", "The", "list", "of", "children", "of", "the", "specified", "parent", "container", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-organizations/src/main/java/com/amazonaws/services/organizations/model/ListChildrenResult.java#L63-L70
train
Sets the value of the children property.
Create a Java method that does the following: "Sets the value of the children property.".
Of course, here is the Java code you requested: ```java public void setChildren(java.util.Collection<Child> children) { if (children == null) { this.children = null; return; } this.children = new java.util.ArrayList<Child>(children); } ``` Hope this helps!
kiegroup/drools
drools-core/src/main/java/org/drools/core/audit/WorkingMemoryLogger.java
WorkingMemoryLogger.extractDeclarations
private String extractDeclarations(Match match) { final StringBuilder result = new StringBuilder(); List<String> declarations = match.getDeclarationIds(); Map<String, Declaration> declsMap = ( (AgendaItem) match ).getTerminalNode().getSubRule().getOuterDeclarations(); for ( int i = 0; i ...
java
private String extractDeclarations(Match match) { final StringBuilder result = new StringBuilder(); List<String> declarations = match.getDeclarationIds(); Map<String, Declaration> declsMap = ( (AgendaItem) match ).getTerminalNode().getSubRule().getOuterDeclarations(); for ( int i = 0; i ...
[ "private", "String", "extractDeclarations", "(", "Match", "match", ")", "{", "final", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "List", "<", "String", ">", "declarations", "=", "match", ".", "getDeclarationIds", "(", ")", ";", "M...
Creates a string representation of the declarations of an activation. This is a list of name-value-pairs for each of the declarations in the tuple of the activation. The name is the identifier (=name) of the declaration, and the value is a toString of the value of the parameter, followed by the id of the fact between ...
[ "Creates", "a", "string", "representation", "of", "the", "declarations", "of", "an", "activation", ".", "This", "is", "a", "list", "of", "name", "-", "value", "-", "pairs", "for", "each", "of", "the", "declarations", "in", "the", "tuple", "of", "the", "a...
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/audit/WorkingMemoryLogger.java#L325-L352
train
Extract declarations from a match.
Create a Java method that does the following: "Extract declarations from a match.".
Of course, here is the Java code you requested: ```java private String extractDeclarations(Match match) { final StringBuilder result = new StringBuilder(); List<String> declarations = match.getDeclarationIds(); Map<String, Declaration> declsMap = ( (AgendaItem) match ).getTerminalNode().getSubR...
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/flow/FlowPath.java
FlowPath.markActive
public void markActive(@NonNull String nodeName, boolean active) { ensureNodeStateExists(nodeName); states.get(nodeName).setActive(active); }
java
public void markActive(@NonNull String nodeName, boolean active) { ensureNodeStateExists(nodeName); states.get(nodeName).setActive(active); }
[ "public", "void", "markActive", "(", "@", "NonNull", "String", "nodeName", ",", "boolean", "active", ")", "{", "ensureNodeStateExists", "(", "nodeName", ")", ";", "states", ".", "get", "(", "nodeName", ")", ".", "setActive", "(", "active", ")", ";", "}" ]
This method allows to set specified node active or inactive. PLEASE NOTE: All nodes using this node as input, will be considered inactive, if this node is set to be inactive. @param nodeName @param active
[ "This", "method", "allows", "to", "set", "specified", "node", "active", "or", "inactive", ".", "PLEASE", "NOTE", ":", "All", "nodes", "using", "this", "node", "as", "input", "will", "be", "considered", "inactive", "if", "this", "node", "is", "set", "to", ...
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/flow/FlowPath.java#L62-L66
train
Mark the active state of a node.
Create a Java method that does the following: "Mark the active state of a node.".
Of course, here is the Java code you requested: ```java public void markActive(@NonNull String nodeName, boolean active) { ensureNodeStateExists(nodeName); states.get(nodeName).setActive(active); } ``` Hope this helps!
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/utils/ReflectionUtils.java
ReflectionUtils.getTypeArgument
public static <T> Class<?> getTypeArgument(final Class<? extends T> clazz, final TypeVariable<? extends GenericDeclaration> tv) { final Map<Type, Type> resolvedTypes = new HashMap<Type, Type>(); Type type = clazz; // start walking up the inheritance hierarchy until we hit the end while (...
java
public static <T> Class<?> getTypeArgument(final Class<? extends T> clazz, final TypeVariable<? extends GenericDeclaration> tv) { final Map<Type, Type> resolvedTypes = new HashMap<Type, Type>(); Type type = clazz; // start walking up the inheritance hierarchy until we hit the end while (...
[ "public", "static", "<", "T", ">", "Class", "<", "?", ">", "getTypeArgument", "(", "final", "Class", "<", "?", "extends", "T", ">", "clazz", ",", "final", "TypeVariable", "<", "?", "extends", "GenericDeclaration", ">", "tv", ")", "{", "final", "Map", "...
Returns the type argument @param clazz the Class to examine @param tv the TypeVariable to look for @param <T> the type of the Class @return the Class type
[ "Returns", "the", "type", "argument" ]
667c30bdc7c6f1d9f2e2eb8774835d6137b52d12
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/utils/ReflectionUtils.java#L802-L844
train
Get the type argument of a class.
Create a Java method that does the following: "Get the type argument of a class.".
Of course, here is the Java code you requested: ```java public static <T> Class<?> getTypeArgument(final Class<? extends T> clazz, final TypeVariable<? extends GenericDeclaration> tv) { final Map<Type, Type> resolvedTypes = new HashMap<Type, Type>(); Type type = clazz; // start walking up the i...
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportRow.java
ExportRow.decodeTimestamp
static public TimestampType decodeTimestamp(final ByteBuffer bb) { final Long val = bb.getLong(); return new TimestampType(val); }
java
static public TimestampType decodeTimestamp(final ByteBuffer bb) { final Long val = bb.getLong(); return new TimestampType(val); }
[ "static", "public", "TimestampType", "decodeTimestamp", "(", "final", "ByteBuffer", "bb", ")", "{", "final", "Long", "val", "=", "bb", ".", "getLong", "(", ")", ";", "return", "new", "TimestampType", "(", "val", ")", ";", "}" ]
Read a timestamp according to the Export encoding specification. @param bb @throws IOException
[ "Read", "a", "timestamp", "according", "to", "the", "Export", "encoding", "specification", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportRow.java#L316-L319
train
Decode a CIDCTYPE timestamp from the byte buffer.
Create a Java method that does the following: "Decode a CIDCTYPE timestamp from the byte buffer.".
Of course, here is the Java code you requested: ```java static public TimestampType decodeTimestamp(final ByteBuffer bb) { final Long val = bb.getLong(); return new TimestampType(val); } ``` Hope this helps!
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/sql/OIndexProxy.java
OIndexProxy.getValuesBetween
public Collection<OIdentifiable> getValuesBetween(Object iRangeFrom, Object iRangeTo) { final Object result = lastIndex.getValuesBetween(iRangeFrom, iRangeTo); return (Collection<OIdentifiable>) applyTailIndexes(result, -1); }
java
public Collection<OIdentifiable> getValuesBetween(Object iRangeFrom, Object iRangeTo) { final Object result = lastIndex.getValuesBetween(iRangeFrom, iRangeTo); return (Collection<OIdentifiable>) applyTailIndexes(result, -1); }
[ "public", "Collection", "<", "OIdentifiable", ">", "getValuesBetween", "(", "Object", "iRangeFrom", ",", "Object", "iRangeTo", ")", "{", "final", "Object", "result", "=", "lastIndex", ".", "getValuesBetween", "(", "iRangeFrom", ",", "iRangeTo", ")", ";", "return...
{@inheritDoc}
[ "{" ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/sql/OIndexProxy.java#L105-L109
train
Gets the values between the given range.
Create a Java method that does the following: "Gets the values between the given range.".
Of course, here is the Java code you requested: ```java public Collection<OIdentifiable> getValuesBetween(Object iRangeFrom, Object iRangeTo) { final Object result = lastIndex.getValuesBetween(iRangeFrom, iRangeTo); return (Collection<OIdentifiable>) applyTailIndexes(result, -1); } ``` Hope this helps!
real-logic/agrona
agrona/src/main/java/org/agrona/SystemUtil.java
SystemUtil.isDebuggerAttached
public static boolean isDebuggerAttached() { final RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); for (final String arg : runtimeMXBean.getInputArguments()) { if (arg.contains("-agentlib:jdwp")) { return true; } ...
java
public static boolean isDebuggerAttached() { final RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); for (final String arg : runtimeMXBean.getInputArguments()) { if (arg.contains("-agentlib:jdwp")) { return true; } ...
[ "public", "static", "boolean", "isDebuggerAttached", "(", ")", "{", "final", "RuntimeMXBean", "runtimeMXBean", "=", "ManagementFactory", ".", "getRuntimeMXBean", "(", ")", ";", "for", "(", "final", "String", "arg", ":", "runtimeMXBean", ".", "getInputArguments", "...
Is a debugger attached to the JVM? @return true if attached otherwise false.
[ "Is", "a", "debugger", "attached", "to", "the", "JVM?" ]
d1ea76e6e3598cd6a0d34879687652ef123f639b
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/SystemUtil.java#L104-L117
train
Check if the debugger is attached to a Crazilian.
Create a Java method that does the following: "Check if the debugger is attached to a Crazilian.".
Of course, here is the Java code you requested: ```java public static boolean isDebuggerAttached() { final RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); for (final String arg : runtimeMXBean.getInputArguments()) { if (arg.contains("-agentlib:jdwp")) ...
thorntail/wildfly-config-api
runtime/src/main/java/org/wildfly/swarm/config/runtime/invocation/EntityAdapter.java
EntityAdapter.fromDMR
@SuppressWarnings("unchecked") public T fromDMR(String keyValue, ModelNode modelNode) throws Exception { if (isBaseTypeAdapter()) return convertToBaseType(modelNode); ModelNode actualPayload = null; if (ModelType.OBJECT.equals(modelNode.getType())) { actualPayload = modelNode;...
java
@SuppressWarnings("unchecked") public T fromDMR(String keyValue, ModelNode modelNode) throws Exception { if (isBaseTypeAdapter()) return convertToBaseType(modelNode); ModelNode actualPayload = null; if (ModelType.OBJECT.equals(modelNode.getType())) { actualPayload = modelNode;...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "fromDMR", "(", "String", "keyValue", ",", "ModelNode", "modelNode", ")", "throws", "Exception", "{", "if", "(", "isBaseTypeAdapter", "(", ")", ")", "return", "convertToBaseType", "(", "modelNode...
Converts a DMR {@link ModelNode} to a java entity of type T. @param modelNode a ModelNode @return an entity representation of type T
[ "Converts", "a", "DMR", "{", "@link", "ModelNode", "}", "to", "a", "java", "entity", "of", "type", "T", "." ]
ddb3f3bcb7b85b22c6371415546f567bc44493db
https://github.com/thorntail/wildfly-config-api/blob/ddb3f3bcb7b85b22c6371415546f567bc44493db/runtime/src/main/java/org/wildfly/swarm/config/runtime/invocation/EntityAdapter.java#L103-L176
train
This method is used to create an instance of the class T from a DMR model node.
Create a Java method that does the following: "This method is used to create an instance of the class T from a DMR model node.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public T fromDMR(String keyValue, ModelNode modelNode) throws Exception { if (isBaseTypeAdapter()) return convertToBaseType(modelNode); ModelNode actualPayload = null; if (ModelType.OBJECT.equals(model...
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/AdGroupFeedPage.java
AdGroupFeedPage.iterator
@Override public java.util.Iterator<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed> iterator() { if (entries == null) { return java.util.Collections.<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed>emptyIterator(); } return java.util.Arrays.<com.google.api.ads.adwo...
java
@Override public java.util.Iterator<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed> iterator() { if (entries == null) { return java.util.Collections.<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed>emptyIterator(); } return java.util.Arrays.<com.google.api.ads.adwo...
[ "@", "Override", "public", "java", ".", "util", ".", "Iterator", "<", "com", ".", "google", ".", "api", ".", "ads", ".", "adwords", ".", "axis", ".", "v201809", ".", "cm", ".", "AdGroupFeed", ">", "iterator", "(", ")", "{", "if", "(", "entries", "=...
Returns an iterator over this page's {@code entries} that: <ul> <li>Will not be {@code null}.</li> <li>Will not support {@link java.util.Iterator#remove()}.</li> </ul> @return a non-null iterator.
[ "Returns", "an", "iterator", "over", "this", "page", "s", "{", "@code", "entries", "}", "that", ":", "<ul", ">", "<li", ">", "Will", "not", "be", "{", "@code", "null", "}", ".", "<", "/", "li", ">", "<li", ">", "Will", "not", "support", "{", "@li...
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/AdGroupFeedPage.java#L94-L100
train
Gets an iterator over the value of the entries property.
Create a Java method that does the following: "Gets an iterator over the value of the entries property.".
Of course, here is the Java code you requested: ```java @Override public java.util.Iterator<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed> iterator() { if (entries == null) { return java.util.Collections.<com.google.api.ads.adwords.axis.v201809.cm.AdGroupFeed>emptyIterator(); }...
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java
AbstractRequestContext.getSerializedProxyId
@Override public Splittable getSerializedProxyId(final SimpleProxyId<?> stableId) { final AutoBean<IdMessage> bean = MessageFactoryHolder.FACTORY.id(); final IdMessage ref = bean.as(); ref.setServerId(stableId.getServerId()); ref.setTypeToken(this.getRequestFactory().getTypeToken(stableId.getProxyClas...
java
@Override public Splittable getSerializedProxyId(final SimpleProxyId<?> stableId) { final AutoBean<IdMessage> bean = MessageFactoryHolder.FACTORY.id(); final IdMessage ref = bean.as(); ref.setServerId(stableId.getServerId()); ref.setTypeToken(this.getRequestFactory().getTypeToken(stableId.getProxyClas...
[ "@", "Override", "public", "Splittable", "getSerializedProxyId", "(", "final", "SimpleProxyId", "<", "?", ">", "stableId", ")", "{", "final", "AutoBean", "<", "IdMessage", ">", "bean", "=", "MessageFactoryHolder", ".", "FACTORY", ".", "id", "(", ")", ";", "f...
EntityCodex support.
[ "EntityCodex", "support", "." ]
cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java#L670-L684
train
Get serialized proxy id.
Create a Java method that does the following: "Get serialized proxy id.".
Of course, here is the Java code you requested: ```java @Override public Splittable getSerializedProxyId(final SimpleProxyId<?> stableId) { final AutoBean<IdMessage> bean = MessageFactoryHolder.FACTORY.id(); final IdMessage ref = bean.as(); ref.setServerId(stableId.getServerId()); ref.setTypeToken(th...
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.readProperties
public Properties readProperties() throws IOException { Properties p; try (Reader src = newReader()) { p = new Properties(); p.load(src); } return p; }
java
public Properties readProperties() throws IOException { Properties p; try (Reader src = newReader()) { p = new Properties(); p.load(src); } return p; }
[ "public", "Properties", "readProperties", "(", ")", "throws", "IOException", "{", "Properties", "p", ";", "try", "(", "Reader", "src", "=", "newReader", "(", ")", ")", "{", "p", "=", "new", "Properties", "(", ")", ";", "p", ".", "load", "(", "src", "...
Reads properties with the encoding for this node
[ "Reads", "properties", "with", "the", "encoding", "for", "this", "node" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L517-L525
train
Read the properties file.
Create a Java method that does the following: "Read the properties file.".
Of course, here is the Java code you requested: ```java public Properties readProperties() throws IOException { Properties p; try (Reader src = newReader()) { p = new Properties(); p.load(src); } return p; } ``` Hope this helps!
craterdog/java-general-utilities
src/main/java/craterdog/utils/Base16Utils.java
Base16Utils.decode
static public byte[] decode(String base16) { String string = base16.replaceAll("\\s", ""); // remove all white space int length = string.length(); byte[] bytes = new byte[(int) Math.ceil(length / 2.0)]; for (int i = 0; i < bytes.length; i++) { decodeByte(string, i, bytes); ...
java
static public byte[] decode(String base16) { String string = base16.replaceAll("\\s", ""); // remove all white space int length = string.length(); byte[] bytes = new byte[(int) Math.ceil(length / 2.0)]; for (int i = 0; i < bytes.length; i++) { decodeByte(string, i, bytes); ...
[ "static", "public", "byte", "[", "]", "decode", "(", "String", "base16", ")", "{", "String", "string", "=", "base16", ".", "replaceAll", "(", "\"\\\\s\"", ",", "\"\"", ")", ";", "// remove all white space", "int", "length", "=", "string", ".", "length", "(...
This function decodes a base 16 string into its corresponding byte array. @param base16 The base 16 encoded string. @return The corresponding byte array.
[ "This", "function", "decodes", "a", "base", "16", "string", "into", "its", "corresponding", "byte", "array", "." ]
a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57
https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base16Utils.java#L63-L71
train
Decodes a base 16 string into a byte array.
Create a Java method that does the following: "Decodes a base 16 string into a byte array.".
Of course, here is the Java code you requested: ```java static public byte[] decode(String base16) { String string = base16.replaceAll("\\s", ""); // remove all white space int length = string.length(); byte[] bytes = new byte[(int) Math.ceil(length / 2.0)]; for (int i = 0; i < bytes.l...
jenkinsci/jenkins
core/src/main/java/jenkins/model/Nodes.java
Nodes.setNodes
public void setNodes(final @Nonnull Collection<? extends Node> nodes) throws IOException { Queue.withLock(new Runnable() { @Override public void run() { Set<String> toRemove = new HashSet<>(Nodes.this.nodes.keySet()); for (Node n : nodes) { ...
java
public void setNodes(final @Nonnull Collection<? extends Node> nodes) throws IOException { Queue.withLock(new Runnable() { @Override public void run() { Set<String> toRemove = new HashSet<>(Nodes.this.nodes.keySet()); for (Node n : nodes) { ...
[ "public", "void", "setNodes", "(", "final", "@", "Nonnull", "Collection", "<", "?", "extends", "Node", ">", "nodes", ")", "throws", "IOException", "{", "Queue", ".", "withLock", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "r...
Sets the list of nodes. @param nodes the new list of nodes. @throws IOException if the new list of nodes could not be persisted.
[ "Sets", "the", "list", "of", "nodes", "." ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Nodes.java#L105-L121
train
Sets the nodes.
Create a Java method that does the following: "Sets the nodes.".
Of course, here is the Java code you requested: ```java public void setNodes(final @Nonnull Collection<? extends Node> nodes) throws IOException { Queue.withLock(new Runnable() { @Override public void run() { Set<String> toRemove = new HashSet<>(Nodes.this.nodes.keySet()...
RestComm/jain-slee.sip
enablers/sip-publication-client/sbb/src/main/java/org/mobicents/slee/enabler/sip/PublicationClientChildSbb.java
PublicationClientChildSbb.onSuccessRespEvent
public void onSuccessRespEvent(ResponseEvent event, ActivityContextInterface aci) { if (tracer.isFineEnabled()) tracer.fine("Received 2xx (SUCCESS) response:\n"+event.getResponse()); final SbbLocalObject sbbLocalObject = sbbContext.getSbbLocalObject(); aci.detach(sbbLocalObject); final Response resp...
java
public void onSuccessRespEvent(ResponseEvent event, ActivityContextInterface aci) { if (tracer.isFineEnabled()) tracer.fine("Received 2xx (SUCCESS) response:\n"+event.getResponse()); final SbbLocalObject sbbLocalObject = sbbContext.getSbbLocalObject(); aci.detach(sbbLocalObject); final Response resp...
[ "public", "void", "onSuccessRespEvent", "(", "ResponseEvent", "event", ",", "ActivityContextInterface", "aci", ")", "{", "if", "(", "tracer", ".", "isFineEnabled", "(", ")", ")", "tracer", ".", "fine", "(", "\"Received 2xx (SUCCESS) response:\\n\"", "+", "event", ...
//////////////////
[ "//////////////////" ]
2c173af0a760cb0ea13fe0ffa58c0f82b14731f9
https://github.com/RestComm/jain-slee.sip/blob/2c173af0a760cb0ea13fe0ffa58c0f82b14731f9/enablers/sip-publication-client/sbb/src/main/java/org/mobicents/slee/enabler/sip/PublicationClientChildSbb.java#L204-L262
train
Called when the SIP Response is complete.
Create a Java method that does the following: "Called when the SIP Response is complete.".
Of course, here is the Java code you requested: ```java public void onSuccessRespEvent(ResponseEvent event, ActivityContextInterface aci) { if (tracer.isFineEnabled()) tracer.fine("Received 2xx (SUCCESS) response:\n"+event.getResponse()); final SbbLocalObject sbbLocalObject = sbbContext.getSbbLocalObject(...
wisdom-framework/wisdom
extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/wisdom/ControllerModel.java
ControllerModel.extractTemplateName
private static String extractTemplateName(String filter) { Matcher matcher = TEMPLATE_FILTER_PATTERN.matcher(filter); if (matcher.matches()) { return matcher.group(1); } else { return "Unknown template"; } }
java
private static String extractTemplateName(String filter) { Matcher matcher = TEMPLATE_FILTER_PATTERN.matcher(filter); if (matcher.matches()) { return matcher.group(1); } else { return "Unknown template"; } }
[ "private", "static", "String", "extractTemplateName", "(", "String", "filter", ")", "{", "Matcher", "matcher", "=", "TEMPLATE_FILTER_PATTERN", ".", "matcher", "(", "filter", ")", ";", "if", "(", "matcher", ".", "matches", "(", ")", ")", "{", "return", "match...
Extracts the template name from the given LDAP filter. The LDAP filter is structure as established in the WisdomViewVisitor. @param filter the filter @return the extracted template name
[ "Extracts", "the", "template", "name", "from", "the", "given", "LDAP", "filter", ".", "The", "LDAP", "filter", "is", "structure", "as", "established", "in", "the", "WisdomViewVisitor", "." ]
a35b6431200fec56b178c0ff60837ed73fd7874d
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/wisdom/ControllerModel.java#L135-L142
train
Extract the name of the template from the filter.
Create a Java method that does the following: "Extract the name of the template from the filter.".
Of course, here is the Java code you requested: ```java private static String extractTemplateName(String filter) { Matcher matcher = TEMPLATE_FILTER_PATTERN.matcher(filter); if (matcher.matches()) { return matcher.group(1); } else { return "Unknown template"; } ...
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRComponent.java
GVRComponent.setEnable
public void setEnable(boolean flag) { if (flag == mIsEnabled) return; mIsEnabled = flag; if (getNative() != 0) { NativeComponent.setEnable(getNative(), flag); } if (flag) { onEnable(); } else { ...
java
public void setEnable(boolean flag) { if (flag == mIsEnabled) return; mIsEnabled = flag; if (getNative() != 0) { NativeComponent.setEnable(getNative(), flag); } if (flag) { onEnable(); } else { ...
[ "public", "void", "setEnable", "(", "boolean", "flag", ")", "{", "if", "(", "flag", "==", "mIsEnabled", ")", "return", ";", "mIsEnabled", "=", "flag", ";", "if", "(", "getNative", "(", ")", "!=", "0", ")", "{", "NativeComponent", ".", "setEnable", "(",...
Enable or disable this component. @param flag true to enable, false to disable. @see #enable() @see #disable() @see #isEnabled()
[ "Enable", "or", "disable", "this", "component", "." ]
05034d465a7b0a494fabb9e9f2971ac19392f32d
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRComponent.java#L127-L145
train
Enable or disable the CRA s AUT.
Create a Java method that does the following: "Enable or disable the CRA s AUT.".
Of course, here is the Java code you requested: ```java public void setEnable(boolean flag) { if (flag == mIsEnabled) return; mIsEnabled = flag; if (getNative() != 0) { NativeComponent.setEnable(getNative(), flag); } if (flag) { ...
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/Context.java
Context.save
public static void save() throws EFapsException { try { Context.TRANSMANAG.commit(); Context.TRANSMANAG.begin(); final Context context = Context.getThreadContext(); context.connectionResource = null; context.setTransaction(Context.TRANSMANA...
java
public static void save() throws EFapsException { try { Context.TRANSMANAG.commit(); Context.TRANSMANAG.begin(); final Context context = Context.getThreadContext(); context.connectionResource = null; context.setTransaction(Context.TRANSMANA...
[ "public", "static", "void", "save", "(", ")", "throws", "EFapsException", "{", "try", "{", "Context", ".", "TRANSMANAG", ".", "commit", "(", ")", ";", "Context", ".", "TRANSMANAG", ".", "begin", "(", ")", ";", "final", "Context", "context", "=", "Context...
Save the Context by committing and beginning a new Transaction. @throws EFapsException on error
[ "Save", "the", "Context", "by", "committing", "and", "beginning", "a", "new", "Transaction", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1037-L1061
train
Save the current context.
Create a Java method that does the following: "Save the current context.".
Of course, here is the Java code you requested: ```java public static void save() throws EFapsException { try { Context.TRANSMANAG.commit(); Context.TRANSMANAG.begin(); final Context context = Context.getThreadContext(); context.connectionResource = n...
simpligility/android-maven-plugin
src/main/java/com/simpligility/maven/plugins/android/common/ArtifactResolverHelper.java
ArtifactResolverHelper.getFilteredArtifacts
public Set<Artifact> getFilteredArtifacts( Iterable<Artifact> allArtifacts, String... types ) { return getFilteredArtifacts( EXCLUDE_NON_PACKAGED_SCOPES, allArtifacts, types ); }
java
public Set<Artifact> getFilteredArtifacts( Iterable<Artifact> allArtifacts, String... types ) { return getFilteredArtifacts( EXCLUDE_NON_PACKAGED_SCOPES, allArtifacts, types ); }
[ "public", "Set", "<", "Artifact", ">", "getFilteredArtifacts", "(", "Iterable", "<", "Artifact", ">", "allArtifacts", ",", "String", "...", "types", ")", "{", "return", "getFilteredArtifacts", "(", "EXCLUDE_NON_PACKAGED_SCOPES", ",", "allArtifacts", ",", "types", ...
Filters provided artifacts and selects only defined types based on {@code types} argument or all types if {@code types} argument is empty. @param allArtifacts artifacts to be filtered @param types artifact types to be selected @return a {@code List} of all project dependencies. Never {@code null}. This excludes artifa...
[ "Filters", "provided", "artifacts", "and", "selects", "only", "defined", "types", "based", "on", "{", "@code", "types", "}", "argument", "or", "all", "types", "if", "{", "@code", "types", "}", "argument", "is", "empty", "." ]
4d54d38b03bd3601bc25ab314719626a623da460
https://github.com/simpligility/android-maven-plugin/blob/4d54d38b03bd3601bc25ab314719626a623da460/src/main/java/com/simpligility/maven/plugins/android/common/ArtifactResolverHelper.java#L71-L74
valid
Get filtered artifacts from the given artifacts.
Create a Java method that does the following: "Get filtered artifacts from the given artifacts.".
Of course, here is the Java code you requested: ```java public Set<Artifact> getFilteredArtifacts( Iterable<Artifact> allArtifacts, String... types ) { return getFilteredArtifacts( EXCLUDE_NON_PACKAGED_SCOPES, allArtifacts, types ); } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java
CommerceTaxFixedRateAddressRelPersistenceImpl.removeByCPTaxCategoryId
@Override public void removeByCPTaxCategoryId(long CPTaxCategoryId) { for (CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel : findByCPTaxCategoryId( CPTaxCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTaxFixedRateAddressRel); } }
java
@Override public void removeByCPTaxCategoryId(long CPTaxCategoryId) { for (CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel : findByCPTaxCategoryId( CPTaxCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTaxFixedRateAddressRel); } }
[ "@", "Override", "public", "void", "removeByCPTaxCategoryId", "(", "long", "CPTaxCategoryId", ")", "{", "for", "(", "CommerceTaxFixedRateAddressRel", "commerceTaxFixedRateAddressRel", ":", "findByCPTaxCategoryId", "(", "CPTaxCategoryId", ",", "QueryUtil", ".", "ALL_POS", ...
Removes all the commerce tax fixed rate address rels where CPTaxCategoryId = &#63; from the database. @param CPTaxCategoryId the cp tax category ID
[ "Removes", "all", "the", "commerce", "tax", "fixed", "rate", "address", "rels", "where", "CPTaxCategoryId", "=", "&#63", ";", "from", "the", "database", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-engine-fixed-service/src/main/java/com/liferay/commerce/tax/engine/fixed/service/persistence/impl/CommerceTaxFixedRateAddressRelPersistenceImpl.java#L1093-L1099
train
Removes all commerce tax fixed rate address rels with the CPTaxCategoryId from the database. Also notifies the appropriate model listeners.
Create a Java method that does the following: "Removes all commerce tax fixed rate address rels with the CPTaxCategoryId from the database. Also notifies the appropriate model listeners.".
Of course, here is the Java code you requested: ```java @Override public void removeByCPTaxCategoryId(long CPTaxCategoryId) { for (CommerceTaxFixedRateAddressRel commerceTaxFixedRateAddressRel : findByCPTaxCategoryId( CPTaxCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTaxFixedRate...
google/j2objc
jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
StandardBeanInfo.mergeBeanInfo
void mergeBeanInfo(BeanInfo beanInfo, boolean force) throws IntrospectionException { if (force || !explicitProperties) { PropertyDescriptor[] superDescs = beanInfo.getPropertyDescriptors(); if (superDescs != null) { if (getPropertyDescriptors() != null) { ...
java
void mergeBeanInfo(BeanInfo beanInfo, boolean force) throws IntrospectionException { if (force || !explicitProperties) { PropertyDescriptor[] superDescs = beanInfo.getPropertyDescriptors(); if (superDescs != null) { if (getPropertyDescriptors() != null) { ...
[ "void", "mergeBeanInfo", "(", "BeanInfo", "beanInfo", ",", "boolean", "force", ")", "throws", "IntrospectionException", "{", "if", "(", "force", "||", "!", "explicitProperties", ")", "{", "PropertyDescriptor", "[", "]", "superDescs", "=", "beanInfo", ".", "getPr...
}
[ "}" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/StandardBeanInfo.java#L201-L240
train
Merge bean info.
Create a Java method that does the following: "Merge bean info.".
Of course, here is the Java code you requested: ```java void mergeBeanInfo(BeanInfo beanInfo, boolean force) throws IntrospectionException { if (force || !explicitProperties) { PropertyDescriptor[] superDescs = beanInfo.getPropertyDescriptors(); if (superDescs != null) { ...
teknux-org/jetty-bootstrap
jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java
JettyBootstrap.addExplodedWarAppFromClasspath
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor) throws JettyBootstrapException { return addExplodedWarAppFromClasspath(explodedWar, descriptor, CONTEXT_PATH_ROOT); }
java
public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor) throws JettyBootstrapException { return addExplodedWarAppFromClasspath(explodedWar, descriptor, CONTEXT_PATH_ROOT); }
[ "public", "WebAppContext", "addExplodedWarAppFromClasspath", "(", "String", "explodedWar", ",", "String", "descriptor", ")", "throws", "JettyBootstrapException", "{", "return", "addExplodedWarAppFromClasspath", "(", "explodedWar", ",", "descriptor", ",", "CONTEXT_PATH_ROOT", ...
Add an exploded (not packaged) War application from the current classpath, on the default context path {@value #CONTEXT_PATH_ROOT} @param explodedWar the exploded war path @param descriptor the web.xml descriptor path @return WebAppContext @throws JettyBootstrapException on failed
[ "Add", "an", "exploded", "(", "not", "packaged", ")", "War", "application", "from", "the", "current", "classpath", "on", "the", "default", "context", "path", "{", "@value", "#CONTEXT_PATH_ROOT", "}" ]
c16e710b833084c650fce35aa8c1ccaf83cd93ef
https://github.com/teknux-org/jetty-bootstrap/blob/c16e710b833084c650fce35aa8c1ccaf83cd93ef/jetty-bootstrap/src/main/java/org/teknux/jettybootstrap/JettyBootstrap.java#L358-L360
train
Add an exploded WAR application from the classpath.
Create a Java method that does the following: "Add an exploded WAR application from the classpath.".
Of course, here is the Java code you requested: ```java public WebAppContext addExplodedWarAppFromClasspath(String explodedWar, String descriptor) throws JettyBootstrapException { return addExplodedWarAppFromClasspath(explodedWar, descriptor, CONTEXT_PATH_ROOT); } ``` Hope this helps!
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/storage/CompressedRamStorage.java
CompressedRamStorage.drop
@Override public void drop(T key) { if (emulateIsAbsent) lock.writeLock().lock(); compressedEntries.remove(key); if (emulateIsAbsent) lock.writeLock().unlock(); }
java
@Override public void drop(T key) { if (emulateIsAbsent) lock.writeLock().lock(); compressedEntries.remove(key); if (emulateIsAbsent) lock.writeLock().unlock(); }
[ "@", "Override", "public", "void", "drop", "(", "T", "key", ")", "{", "if", "(", "emulateIsAbsent", ")", "lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "compressedEntries", ".", "remove", "(", "key", ")", ";", "if", "(", "emulateIsAb...
This method removes value by specified key @param key
[ "This", "method", "removes", "value", "by", "specified", "key" ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/storage/CompressedRamStorage.java#L202-L211
train
Drop a single entry from the cache.
Create a Java method that does the following: "Drop a single entry from the cache.".
Of course, here is the Java code you requested: ```java @Override public void drop(T key) { if (emulateIsAbsent) lock.writeLock().lock(); compressedEntries.remove(key); if (emulateIsAbsent) lock.writeLock().unlock(); } ``` Hope this helps!
atomix/atomix
utils/src/main/java/io/atomix/utils/serializer/Namespace.java
Namespace.serialize
public byte[] serialize(final Object obj, final int bufferSize) { return kryoOutputPool.run(output -> { return kryoPool.run(kryo -> { kryo.writeClassAndObject(output, obj); output.flush(); return output.getByteArrayOutputStream().toByteArray(); }); }, bufferSize); }
java
public byte[] serialize(final Object obj, final int bufferSize) { return kryoOutputPool.run(output -> { return kryoPool.run(kryo -> { kryo.writeClassAndObject(output, obj); output.flush(); return output.getByteArrayOutputStream().toByteArray(); }); }, bufferSize); }
[ "public", "byte", "[", "]", "serialize", "(", "final", "Object", "obj", ",", "final", "int", "bufferSize", ")", "{", "return", "kryoOutputPool", ".", "run", "(", "output", "->", "{", "return", "kryoPool", ".", "run", "(", "kryo", "->", "{", "kryo", "."...
Serializes given object to byte array using Kryo instance in pool. @param obj Object to serialize @param bufferSize maximum size of serialized bytes @return serialized bytes
[ "Serializes", "given", "object", "to", "byte", "array", "using", "Kryo", "instance", "in", "pool", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/serializer/Namespace.java#L344-L352
train
Serialize a single object to a byte array.
Create a Java method that does the following: "Serialize a single object to a byte array.".
Of course, here is the Java code you requested: ```java public byte[] serialize(final Object obj, final int bufferSize) { return kryoOutputPool.run(output -> { return kryoPool.run(kryo -> { kryo.writeClassAndObject(output, obj); output.flush(); return output.getByteArrayOutputStream()...
aws/aws-sdk-java
aws-java-sdk-simpleworkflow/src/main/java/com/amazonaws/services/simpleworkflow/model/transform/WorkflowExecutionFilterMarshaller.java
WorkflowExecutionFilterMarshaller.marshall
public void marshall(WorkflowExecutionFilter workflowExecutionFilter, ProtocolMarshaller protocolMarshaller) { if (workflowExecutionFilter == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(workflowEx...
java
public void marshall(WorkflowExecutionFilter workflowExecutionFilter, ProtocolMarshaller protocolMarshaller) { if (workflowExecutionFilter == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(workflowEx...
[ "public", "void", "marshall", "(", "WorkflowExecutionFilter", "workflowExecutionFilter", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "workflowExecutionFilter", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-simpleworkflow/src/main/java/com/amazonaws/services/simpleworkflow/model/transform/WorkflowExecutionFilterMarshaller.java#L42-L53
train
marshalls the given WorkflowExecutionFilter to the JSON - compatible parameter object.
Create a Java method that does the following: "marshalls the given WorkflowExecutionFilter to the JSON - compatible parameter object.".
Of course, here is the Java code you requested: ```java public void marshall(WorkflowExecutionFilter workflowExecutionFilter, ProtocolMarshaller protocolMarshaller) { if (workflowExecutionFilter == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConnectionImpl.java
ConnectionImpl.createBrowserSession
@Override public BrowserSession createBrowserSession(SIDestinationAddress destinationAddress, DestinationType destinationType, SelectionCriteria criteria, String alternateUser...
java
@Override public BrowserSession createBrowserSession(SIDestinationAddress destinationAddress, DestinationType destinationType, SelectionCriteria criteria, String alternateUser...
[ "@", "Override", "public", "BrowserSession", "createBrowserSession", "(", "SIDestinationAddress", "destinationAddress", ",", "DestinationType", "destinationType", ",", "SelectionCriteria", "criteria", ",", "String", "alternateUser", ")", "throws", "SIConnectionDroppedException"...
/* (non-Javadoc) @see com.ibm.wsspi.sib.core.SICoreConnection#createBrowserSession(com.ibm.websphere.sib.SIDestinationAddress, com.ibm.wsspi.sib.core.DestinationType, java.lang.String, boolean) Method Added M7 Core SPI
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConnectionImpl.java#L3568-L3595
train
This method is called by the application to create a BrowserSession.
Create a Java method that does the following: "This method is called by the application to create a BrowserSession.".
Of course, here is the Java code you requested: ```java @Override public BrowserSession createBrowserSession(SIDestinationAddress destinationAddress, DestinationType destinationType, SelectionCriteria criteria, ...
phax/ph-oton
ph-oton-bootstrap4-uictrls/src/main/java/com/helger/photon/bootstrap4/uictrls/ext/BootstrapSecurityUI.java
BootstrapSecurityUI.createPasswordConstraintTip
@Nullable public static ICommonsList <IHCNode> createPasswordConstraintTip (@Nonnull final Locale aDisplayLocale) { final ICommonsList <String> aTexts = GlobalPasswordSettings.getPasswordConstraintList () .getAllPasswordConstraintDescriptions (aDisp...
java
@Nullable public static ICommonsList <IHCNode> createPasswordConstraintTip (@Nonnull final Locale aDisplayLocale) { final ICommonsList <String> aTexts = GlobalPasswordSettings.getPasswordConstraintList () .getAllPasswordConstraintDescriptions (aDisp...
[ "@", "Nullable", "public", "static", "ICommonsList", "<", "IHCNode", ">", "createPasswordConstraintTip", "(", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "final", "ICommonsList", "<", "String", ">", "aTexts", "=", "GlobalPasswordSettings", ".", ...
Create a tooltip with all the requirements for a password @param aDisplayLocale Display locale to use. @return <code>null</code> if not special constraints are defined.
[ "Create", "a", "tooltip", "with", "all", "the", "requirements", "for", "a", "password" ]
f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-bootstrap4-uictrls/src/main/java/com/helger/photon/bootstrap4/uictrls/ext/BootstrapSecurityUI.java#L48-L57
train
Create a password constraint tip.
Create a Java method that does the following: "Create a password constraint tip.".
Of course, here is the Java code you requested: ```java @Nullable public static ICommonsList <IHCNode> createPasswordConstraintTip (@Nonnull final Locale aDisplayLocale) { final ICommonsList <String> aTexts = GlobalPasswordSettings.getPasswordConstraintList () ...
micronaut-projects/micronaut-core
tracing/src/main/java/io/micronaut/tracing/jaeger/JaegerConfiguration.java
JaegerConfiguration.setReporterConfiguration
@Inject public void setReporterConfiguration(@Nullable JaegerReporterConfiguration reporterConfiguration) { if (reporterConfiguration != null) { configuration.withReporter(reporterConfiguration.configuration); } }
java
@Inject public void setReporterConfiguration(@Nullable JaegerReporterConfiguration reporterConfiguration) { if (reporterConfiguration != null) { configuration.withReporter(reporterConfiguration.configuration); } }
[ "@", "Inject", "public", "void", "setReporterConfiguration", "(", "@", "Nullable", "JaegerReporterConfiguration", "reporterConfiguration", ")", "{", "if", "(", "reporterConfiguration", "!=", "null", ")", "{", "configuration", ".", "withReporter", "(", "reporterConfigura...
Sets the reporter configuration. @param reporterConfiguration The reporter configuration
[ "Sets", "the", "reporter", "configuration", "." ]
c31f5b03ce0eb88c2f6470710987db03b8967d5c
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/tracing/src/main/java/io/micronaut/tracing/jaeger/JaegerConfiguration.java#L166-L171
train
Sets the reporter configuration.
Create a Java method that does the following: "Sets the reporter configuration.".
Of course, here is the Java code you requested: ```java @Inject public void setReporterConfiguration(@Nullable JaegerReporterConfiguration reporterConfiguration) { if (reporterConfiguration != null) { configuration.withReporter(reporterConfiguration.configuration); } } ``` Hope thi...
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/util/WidgetLayout.java
WidgetLayout.keepWindowInScreen
public static void keepWindowInScreen(Window window) { window.setKeepInParentRect(true); if (null != window.getHeightAsString()) { int screenHeight = com.google.gwt.user.client.Window.getClientHeight(); int windowHeight = window.getViewportHeight(); window.setMaxHeight(screenHeight - WidgetLayout.windowOff...
java
public static void keepWindowInScreen(Window window) { window.setKeepInParentRect(true); if (null != window.getHeightAsString()) { int screenHeight = com.google.gwt.user.client.Window.getClientHeight(); int windowHeight = window.getViewportHeight(); window.setMaxHeight(screenHeight - WidgetLayout.windowOff...
[ "public", "static", "void", "keepWindowInScreen", "(", "Window", "window", ")", "{", "window", ".", "setKeepInParentRect", "(", "true", ")", ";", "if", "(", "null", "!=", "window", ".", "getHeightAsString", "(", ")", ")", "{", "int", "screenHeight", "=", "...
Try to force a window to stay within the screen bounds. @param window window to affect
[ "Try", "to", "force", "a", "window", "to", "stay", "within", "the", "screen", "bounds", "." ]
1c1adc48deb192ed825265eebcc74d70bbf45670
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/util/WidgetLayout.java#L408-L438
train
Sets the keepWindowInParentRect property of the window.
Create a Java method that does the following: "Sets the keepWindowInParentRect property of the window.".
Of course, here is the Java code you requested: ```java public static void keepWindowInScreen(Window window) { window.setKeepInParentRect(true); if (null != window.getHeightAsString()) { int screenHeight = com.google.gwt.user.client.Window.getClientHeight(); int windowHeight = window.getViewportHeight(); ...
Ordinastie/MalisisCore
src/main/java/net/malisis/core/block/component/ItemTransformComponent.java
ItemTransformComponent.getTransform
public Matrix4f getTransform(Item item, TransformType transformType) { switch (transformType) { case THIRD_PERSON_LEFT_HAND: return thirdPersonLeftHand; case THIRD_PERSON_RIGHT_HAND: return thirdPersonRightHand; case FIRST_PERSON_LEFT_HAND: return firstPersonLeftHand; case FIRST_PERSON_RIGH...
java
public Matrix4f getTransform(Item item, TransformType transformType) { switch (transformType) { case THIRD_PERSON_LEFT_HAND: return thirdPersonLeftHand; case THIRD_PERSON_RIGHT_HAND: return thirdPersonRightHand; case FIRST_PERSON_LEFT_HAND: return firstPersonLeftHand; case FIRST_PERSON_RIGH...
[ "public", "Matrix4f", "getTransform", "(", "Item", "item", ",", "TransformType", "transformType", ")", "{", "switch", "(", "transformType", ")", "{", "case", "THIRD_PERSON_LEFT_HAND", ":", "return", "thirdPersonLeftHand", ";", "case", "THIRD_PERSON_RIGHT_HAND", ":", ...
Gets the {@link Matrix4f transformation} for the specified {@link Item} and {@link TransformType}. @param item the item @param transformType the transform type @return the transform
[ "Gets", "the", "{", "@link", "Matrix4f", "transformation", "}", "for", "the", "specified", "{", "@link", "Item", "}", "and", "{", "@link", "TransformType", "}", "." ]
4f8e1fa462d5c372fc23414482ba9f429881cc54
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/block/component/ItemTransformComponent.java#L142-L165
train
Get the transform of the item.
Create a Java method that does the following: "Get the transform of the item.".
Of course, here is the Java code you requested: ```java public Matrix4f getTransform(Item item, TransformType transformType) { switch (transformType) { case THIRD_PERSON_LEFT_HAND: return thirdPersonLeftHand; case THIRD_PERSON_RIGHT_HAND: return thirdPersonRightHand; case FIRST_PERSON_LEFT_HAND: ...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.of
public static <K, V> HashMap<K, V> of(K key, V value) { return of(key, value, false); }
java
public static <K, V> HashMap<K, V> of(K key, V value) { return of(key, value, false); }
[ "public", "static", "<", "K", ",", "V", ">", "HashMap", "<", "K", ",", "V", ">", "of", "(", "K", "key", ",", "V", "value", ")", "{", "return", "of", "(", "key", ",", "value", ",", "false", ")", ";", "}" ]
将单一键值对转换为Map @param <K> 键类型 @param <V> 值类型 @param key 键 @param value 值 @return {@link HashMap}
[ "将单一键值对转换为Map" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L175-L177
train
Creates a new HashMap with the specified key and value.
Create a Java method that does the following: "Creates a new HashMap with the specified key and value.".
Of course, here is the Java code you requested: ```java public static <K, V> HashMap<K, V> of(K key, V value) { return of(key, value, false); } ``` Hope this helps!
Unidata/thredds
cdm/src/main/java/ucar/nc2/ncml/NcMLWriter.java
NcMLWriter.makeValuesElement
public Element makeValuesElement(Variable variable, boolean allowRegular) throws IOException { Element elem = new Element("values", namespace); StringBuilder buff = new StringBuilder(); Array a = variable.read(); if (variable.getDataType() == DataType.CHAR) { char[] data = (char[]) a.getS...
java
public Element makeValuesElement(Variable variable, boolean allowRegular) throws IOException { Element elem = new Element("values", namespace); StringBuilder buff = new StringBuilder(); Array a = variable.read(); if (variable.getDataType() == DataType.CHAR) { char[] data = (char[]) a.getS...
[ "public", "Element", "makeValuesElement", "(", "Variable", "variable", ",", "boolean", "allowRegular", ")", "throws", "IOException", "{", "Element", "elem", "=", "new", "Element", "(", "\"values\"", ",", "namespace", ")", ";", "StringBuilder", "buff", "=", "new"...
Creates a {@code <values>} element from the variable's data. @param variable the variable to read values from @param allowRegular {@code true} if regular values should be represented with {@code start}, {@code increment}, and {@code npts} attributes instead of space-separated Element text. Has no effect if the data ...
[ "Creates", "a", "{", "@code", "<values", ">", "}", "element", "from", "the", "variable", "s", "data", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/ncml/NcMLWriter.java#L430-L486
test
Create an Element representing the values of a Variable.
Create a Java method that does the following: "Create an Element representing the values of a Variable.".
Of course, here is the Java code you requested: ```java public Element makeValuesElement(Variable variable, boolean allowRegular) throws IOException { Element elem = new Element("values", namespace); StringBuilder buff = new StringBuilder(); Array a = variable.read(); if (variable.getDataType()...
duracloud/duracloud
common/src/main/java/org/duracloud/common/util/SerializationUtil.java
SerializationUtil.deserializeList
@SuppressWarnings("unchecked") public static List<String> deserializeList(String list) { if (list == null || list.equals("")) { return new ArrayList<String>(); } XStream xstream = new XStream(new DomDriver()); return (List<String>) xstream.fromXML(list); }
java
@SuppressWarnings("unchecked") public static List<String> deserializeList(String list) { if (list == null || list.equals("")) { return new ArrayList<String>(); } XStream xstream = new XStream(new DomDriver()); return (List<String>) xstream.fromXML(list); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "String", ">", "deserializeList", "(", "String", "list", ")", "{", "if", "(", "list", "==", "null", "||", "list", ".", "equals", "(", "\"\"", ")", ")", "{", "return", ...
DeSerializes XML into a List of Strings. If the XML is either empty or null an empty List is returned. @param list @return
[ "DeSerializes", "XML", "into", "a", "List", "of", "Strings", ".", "If", "the", "XML", "is", "either", "empty", "or", "null", "an", "empty", "List", "is", "returned", "." ]
dc4f3a1716d43543cc3b2e1880605f9389849b66
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/common/src/main/java/org/duracloud/common/util/SerializationUtil.java#L85-L92
train
Deserialize a list of XML strings.
Create a Java method that does the following: "Deserialize a list of XML strings.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public static List<String> deserializeList(String list) { if (list == null || list.equals("")) { return new ArrayList<String>(); } XStream xstream = new XStream(new DomDriver()); retur...
blademainer/common_utils
common_code/src/main/java/com/xiongyingqi/utils/code/CodeBuilder.java
CodeBuilder.build
public void build() { filterInclude(); filterExclude(); for (final File file : files) { ThreadPool.invoke(new Thread() { @Override public void run() { new CodeProcessor(file, CodeBuilder.this); } }); // ...
java
public void build() { filterInclude(); filterExclude(); for (final File file : files) { ThreadPool.invoke(new Thread() { @Override public void run() { new CodeProcessor(file, CodeBuilder.this); } }); // ...
[ "public", "void", "build", "(", ")", "{", "filterInclude", "(", ")", ";", "filterExclude", "(", ")", ";", "for", "(", "final", "File", "file", ":", "files", ")", "{", "ThreadPool", ".", "invoke", "(", "new", "Thread", "(", ")", "{", "@", "Override", ...
开始重写文件
[ "开始重写文件" ]
ef6baf0367c16de95a28caab67a7d5842a6d13db
https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_code/src/main/java/com/xiongyingqi/utils/code/CodeBuilder.java#L275-L289
test
Build the code.
Create a Java method that does the following: "Build the code.".
Of course, here is the Java code you requested: ```java public void build() { filterInclude(); filterExclude(); for (final File file : files) { ThreadPool.invoke(new Thread() { @Override public void run() { new CodeProcessor(file,...
alkacon/opencms-core
src/org/opencms/ui/apps/sessions/CmsSessionsTable.java
CmsSessionsTable.ini
protected void ini() throws CmsException { if (m_container == null) { m_container = new IndexedContainer(); setContainerDataSource(m_container); } else { m_container.removeAllItems(); } for (TableProperty prop : TableProperty.values()) { m...
java
protected void ini() throws CmsException { if (m_container == null) { m_container = new IndexedContainer(); setContainerDataSource(m_container); } else { m_container.removeAllItems(); } for (TableProperty prop : TableProperty.values()) { m...
[ "protected", "void", "ini", "(", ")", "throws", "CmsException", "{", "if", "(", "m_container", "==", "null", ")", "{", "m_container", "=", "new", "IndexedContainer", "(", ")", ";", "setContainerDataSource", "(", "m_container", ")", ";", "}", "else", "{", "...
Initializes the table.<p> @throws CmsException when something goes wrong
[ "Initializes", "the", "table", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sessions/CmsSessionsTable.java#L515-L578
train
Initializes the table.
Create a Java method that does the following: "Initializes the table.".
Of course, here is the Java code you requested: ```java protected void ini() throws CmsException { if (m_container == null) { m_container = new IndexedContainer(); setContainerDataSource(m_container); } else { m_container.removeAllItems(); } for (Tab...
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPDefinitionUtil.java
CPDefinitionUtil.findByCompanyId
public static List<CPDefinition> findByCompanyId(long companyId, int start, int end) { return getPersistence().findByCompanyId(companyId, start, end); }
java
public static List<CPDefinition> findByCompanyId(long companyId, int start, int end) { return getPersistence().findByCompanyId(companyId, start, end); }
[ "public", "static", "List", "<", "CPDefinition", ">", "findByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "getPersistence", "(", ")", ".", "findByCompanyId", "(", "companyId", ",", "start", ",", "end", "...
Returns a range of all the cp definitions where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. S...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definitions", "where", "companyId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPDefinitionUtil.java#L681-L684
train
Returns a range of cp definitions where company = &#63 ; and start < = end.
Create a Java method that does the following: "Returns a range of cp definitions where company = &#63 ; and start < = end.".
Of course, here is the Java code you requested: ```java public static List<CPDefinition> findByCompanyId(long companyId, int start, int end) { return getPersistence().findByCompanyId(companyId, start, end); } ``` Hope this helps!
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTracker.java
TldTracker.track
public boolean track( T image ) { boolean success = true; valid = false; imagePyramid.process(image); template.setImage(image); variance.setImage(image); fern.setImage(image); if( reacquiring ) { // It can reinitialize if there is a single detection detection.detectionCascade(cascadeRegions); ...
java
public boolean track( T image ) { boolean success = true; valid = false; imagePyramid.process(image); template.setImage(image); variance.setImage(image); fern.setImage(image); if( reacquiring ) { // It can reinitialize if there is a single detection detection.detectionCascade(cascadeRegions); ...
[ "public", "boolean", "track", "(", "T", "image", ")", "{", "boolean", "success", "=", "true", ";", "valid", "=", "false", ";", "imagePyramid", ".", "process", "(", "image", ")", ";", "template", ".", "setImage", "(", "image", ")", ";", "variance", ".",...
Updates track region. @param image Next image in the sequence. @return true if the object could be found and false if not
[ "Updates", "track", "region", "." ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldTracker.java#L258-L314
train
Track the image using the image pyramid and target region.
Create a Java method that does the following: "Track the image using the image pyramid and target region.".
Of course, here is the Java code you requested: ```java public boolean track( T image ) { boolean success = true; valid = false; imagePyramid.process(image); template.setImage(image); variance.setImage(image); fern.setImage(image); if( reacquiring ) { // It can reinitialize if there is a single det...
aws/aws-sdk-java
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/GetMetricStatisticsResult.java
GetMetricStatisticsResult.getDatapoints
public java.util.List<Datapoint> getDatapoints() { if (datapoints == null) { datapoints = new com.amazonaws.internal.SdkInternalList<Datapoint>(); } return datapoints; }
java
public java.util.List<Datapoint> getDatapoints() { if (datapoints == null) { datapoints = new com.amazonaws.internal.SdkInternalList<Datapoint>(); } return datapoints; }
[ "public", "java", ".", "util", ".", "List", "<", "Datapoint", ">", "getDatapoints", "(", ")", "{", "if", "(", "datapoints", "==", "null", ")", "{", "datapoints", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<", "Datapoin...
<p> The data points for the specified metric. </p> @return The data points for the specified metric.
[ "<p", ">", "The", "data", "points", "for", "the", "specified", "metric", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/GetMetricStatisticsResult.java#L87-L92
train
Gets the value of the datapoints property.
Create a Java method that does the following: "Gets the value of the datapoints property.".
Of course, here is the Java code you requested: ```java public java.util.List<Datapoint> getDatapoints() { if (datapoints == null) { datapoints = new com.amazonaws.internal.SdkInternalList<Datapoint>(); } return datapoints; } ``` Hope this helps!
keenlabs/KeenClient-Java
query/src/main/java/io/keen/client/java/KeenQueryClient.java
KeenQueryClient.standardDeviation
public double standardDeviation(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.STANDARD_DEVIATION) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) ....
java
public double standardDeviation(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.STANDARD_DEVIATION) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) ....
[ "public", "double", "standardDeviation", "(", "String", "eventCollection", ",", "String", "targetProperty", ",", "Timeframe", "timeframe", ")", "throws", "IOException", "{", "Query", "queryParams", "=", "new", "Query", ".", "Builder", "(", "QueryType", ".", "STAND...
Standard Deviation query with only the required arguments. Query API info here: https://keen.io/docs/api/#standard-deviation @param eventCollection The name of the event collection you are analyzing. @param targetProperty The name of the property you are analyzing. @param timeframe The {@link RelativeTimeframe}...
[ "Standard", "Deviation", "query", "with", "only", "the", "required", "arguments", ".", "Query", "API", "info", "here", ":", "https", ":", "//", "keen", ".", "io", "/", "docs", "/", "api", "/", "#standard", "-", "deviation" ]
2ea021547b5338257c951a2596bd49749038d018
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/query/src/main/java/io/keen/client/java/KeenQueryClient.java#L264-L271
train
Get the standard deviation of a single calendar.
Create a Java method that does the following: "Get the standard deviation of a single calendar.".
Of course, here is the Java code you requested: ```java public double standardDeviation(String eventCollection, String targetProperty, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.STANDARD_DEVIATION) .withEventCollection(eventCollection) ...
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/style/FeatureCoreStyleExtension.java
FeatureCoreStyleExtension.removeExtension
public void removeExtension() { deleteRelationships(); geoPackage.deleteTable(StyleTable.TABLE_NAME); geoPackage.deleteTable(IconTable.TABLE_NAME); try { if (extensionsDao.isTableExists()) { extensionsDao.deleteByExtension(EXTENSION_NAME); } } catch (SQLException e) { throw new GeoPackageExce...
java
public void removeExtension() { deleteRelationships(); geoPackage.deleteTable(StyleTable.TABLE_NAME); geoPackage.deleteTable(IconTable.TABLE_NAME); try { if (extensionsDao.isTableExists()) { extensionsDao.deleteByExtension(EXTENSION_NAME); } } catch (SQLException e) { throw new GeoPackageExce...
[ "public", "void", "removeExtension", "(", ")", "{", "deleteRelationships", "(", ")", ";", "geoPackage", ".", "deleteTable", "(", "StyleTable", ".", "TABLE_NAME", ")", ";", "geoPackage", ".", "deleteTable", "(", "IconTable", ".", "TABLE_NAME", ")", ";", "try", ...
Completely remove and delete the extension and all styles and icons
[ "Completely", "remove", "and", "delete", "the", "extension", "and", "all", "styles", "and", "icons" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/style/FeatureCoreStyleExtension.java#L485-L503
train
Remove the Feature Style extension
Create a Java method that does the following: "Remove the Feature Style extension".
Of course, here is the Java code you requested: ```java public void removeExtension() { deleteRelationships(); geoPackage.deleteTable(StyleTable.TABLE_NAME); geoPackage.deleteTable(IconTable.TABLE_NAME); try { if (extensionsDao.isTableExists()) { extensionsDao.deleteByExtension(EXTENSION_NAME); }...
NoraUi/NoraUi
src/main/java/com/github/noraui/data/csv/CsvDataProvider.java
CsvDataProvider.readLine
@Override public String[] readLine(int line, boolean readResult) { logger.debug("readLine at line {}", line); try { final CSVReader reader = openInputData(); final List<String[]> a = reader.readAll(); if (line >= a.size()) { return null; ...
java
@Override public String[] readLine(int line, boolean readResult) { logger.debug("readLine at line {}", line); try { final CSVReader reader = openInputData(); final List<String[]> a = reader.readAll(); if (line >= a.size()) { return null; ...
[ "@", "Override", "public", "String", "[", "]", "readLine", "(", "int", "line", ",", "boolean", "readResult", ")", "{", "logger", ".", "debug", "(", "\"readLine at line {}\"", ",", "line", ")", ";", "try", "{", "final", "CSVReader", "reader", "=", "openInpu...
{@inheritDoc}
[ "{" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/csv/CsvDataProvider.java#L102-L125
train
Read a single line of CSV data.
Create a Java method that does the following: "Read a single line of CSV data.".
Of course, here is the Java code you requested: ```java @Override public String[] readLine(int line, boolean readResult) { logger.debug("readLine at line {}", line); try { final CSVReader reader = openInputData(); final List<String[]> a = reader.readAll(); if (li...
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/crypto/CertificateChainUtil.java
CertificateChainUtil.getSubjectDNFromChain
public static X500Principal getSubjectDNFromChain(List<X509Certificate> chain) { if (chain == null || chain.isEmpty()) throw new IllegalArgumentException("Must provide a chain that is non-null and non-empty"); X509Certificate cert = chain.get(chain.size() - 1); return cert.getSubjectX500Principal(); }
java
public static X500Principal getSubjectDNFromChain(List<X509Certificate> chain) { if (chain == null || chain.isEmpty()) throw new IllegalArgumentException("Must provide a chain that is non-null and non-empty"); X509Certificate cert = chain.get(chain.size() - 1); return cert.getSubjectX500Principal(); }
[ "public", "static", "X500Principal", "getSubjectDNFromChain", "(", "List", "<", "X509Certificate", ">", "chain", ")", "{", "if", "(", "chain", "==", "null", "||", "chain", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"Must ...
Extracts the Subject: the final certificate in a chain @param chain a normalised chain @return the subject (the final certificate in the chain) @throws IllegalArgumentException if the chain is null or empty
[ "Extracts", "the", "Subject", ":", "the", "final", "certificate", "in", "a", "chain" ]
d4025d2f881bc0542b1e004c5f65a1ccaf895836
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/crypto/CertificateChainUtil.java#L70-L78
train
Get subject DN from a list of X509Certificates
Create a Java method that does the following: "Get subject DN from a list of X509Certificates".
Of course, here is the Java code you requested: ```java public static X500Principal getSubjectDNFromChain(List<X509Certificate> chain) { if (chain == null || chain.isEmpty()) throw new IllegalArgumentException("Must provide a chain that is non-null and non-empty"); X509Certificate cert = chain.get(chain.size(...
ArpNetworking/logback-steno
src/main/java/com/arpnetworking/logback/jackson/RedactionFilter.java
RedactionFilter.serializeAsField
@Override @Deprecated public void serializeAsField( final Object pojo, final JsonGenerator jgen, final SerializerProvider prov, final BeanPropertyWriter writer) throws Exception { if (writer.getAnnotation(LogRedact.class) == null) { super.seria...
java
@Override @Deprecated public void serializeAsField( final Object pojo, final JsonGenerator jgen, final SerializerProvider prov, final BeanPropertyWriter writer) throws Exception { if (writer.getAnnotation(LogRedact.class) == null) { super.seria...
[ "@", "Override", "@", "Deprecated", "public", "void", "serializeAsField", "(", "final", "Object", "pojo", ",", "final", "JsonGenerator", "jgen", ",", "final", "SerializerProvider", "prov", ",", "final", "BeanPropertyWriter", "writer", ")", "throws", "Exception", "...
{@inheritDoc} @deprecated Provided for compatibility with deprecated method in Jackson.
[ "{", "@inheritDoc", "}" ]
abd5c68ce7d42c39f80ffbad6d162d5fed3a346e
https://github.com/ArpNetworking/logback-steno/blob/abd5c68ce7d42c39f80ffbad6d162d5fed3a346e/src/main/java/com/arpnetworking/logback/jackson/RedactionFilter.java#L65-L81
test
Serialize as field.
Create a Java method that does the following: "Serialize as field.".
Of course, here is the Java code you requested: ```java @Override @Deprecated public void serializeAsField( final Object pojo, final JsonGenerator jgen, final SerializerProvider prov, final BeanPropertyWriter writer) throws Exception { if (writer.getAnnot...
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsContainerElementBean.java
CmsContainerElementBean.removeInstanceId
public void removeInstanceId() { Map<String, String> newSettings = new HashMap<String, String>(m_individualSettings); newSettings.remove(CmsContainerElement.ELEMENT_INSTANCE_ID); m_individualSettings = Collections.unmodifiableMap(newSettings); m_editorHash = m_elementId.toString() + get...
java
public void removeInstanceId() { Map<String, String> newSettings = new HashMap<String, String>(m_individualSettings); newSettings.remove(CmsContainerElement.ELEMENT_INSTANCE_ID); m_individualSettings = Collections.unmodifiableMap(newSettings); m_editorHash = m_elementId.toString() + get...
[ "public", "void", "removeInstanceId", "(", ")", "{", "Map", "<", "String", ",", "String", ">", "newSettings", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "m_individualSettings", ")", ";", "newSettings", ".", "remove", "(", "CmsContainerEle...
Removes the instance id.<p>
[ "Removes", "the", "instance", "id", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsContainerElementBean.java#L720-L726
train
Removes the instanceId from the container element.
Create a Java method that does the following: "Removes the instanceId from the container element.".
Of course, here is the Java code you requested: ```java public void removeInstanceId() { Map<String, String> newSettings = new HashMap<String, String>(m_individualSettings); newSettings.remove(CmsContainerElement.ELEMENT_INSTANCE_ID); m_individualSettings = Collections.unmodifiableMap(newSetti...
ow2-chameleon/fuchsia
importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java
ZWaveController.handleMemoryGetId
private void handleMemoryGetId(SerialMessage incomingMessage) { this.homeId = ((incomingMessage.getMessagePayloadByte(0)) << 24) | ((incomingMessage.getMessagePayloadByte(1)) << 16) | ((incomingMessage.getMessagePayloadByte(2)) << 8) | (incomingMessage.getMessagePayloadByte(3)); this.ownNodeId = inco...
java
private void handleMemoryGetId(SerialMessage incomingMessage) { this.homeId = ((incomingMessage.getMessagePayloadByte(0)) << 24) | ((incomingMessage.getMessagePayloadByte(1)) << 16) | ((incomingMessage.getMessagePayloadByte(2)) << 8) | (incomingMessage.getMessagePayloadByte(3)); this.ownNodeId = inco...
[ "private", "void", "handleMemoryGetId", "(", "SerialMessage", "incomingMessage", ")", "{", "this", ".", "homeId", "=", "(", "(", "incomingMessage", ".", "getMessagePayloadByte", "(", "0", ")", ")", "<<", "24", ")", "|", "(", "(", "incomingMessage", ".", "get...
Handles the response of the MemoryGetId request. The MemoryGetId function gets the home and node id from the controller memory. @param incomingMessage the response message to process.
[ "Handles", "the", "response", "of", "the", "MemoryGetId", "request", ".", "The", "MemoryGetId", "function", "gets", "the", "home", "and", "node", "id", "from", "the", "controller", "memory", "." ]
4e9318eadbdeb945e529789f573b45386e619bed
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java#L532-L539
train
Handles the response of the MemoryGetId request.
Create a Java method that does the following: "Handles the response of the MemoryGetId request.".
Of course, here is the Java code you requested: ```java private void handleMemoryGetId(SerialMessage incomingMessage) { this.homeId = ((incomingMessage.getMessagePayloadByte(0)) << 24) | ((incomingMessage.getMessagePayloadByte(1)) << 16) | ((incomingMessage.getMessagePayloadByte(2)) << 8) | (incomingM...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/FNCImpl.java
FNCImpl.setYfrUnits
public void setYfrUnits(Integer newYfrUnits) { Integer oldYfrUnits = yfrUnits; yfrUnits = newYfrUnits; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__YFR_UNITS, oldYfrUnits, yfrUnits)); }
java
public void setYfrUnits(Integer newYfrUnits) { Integer oldYfrUnits = yfrUnits; yfrUnits = newYfrUnits; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__YFR_UNITS, oldYfrUnits, yfrUnits)); }
[ "public", "void", "setYfrUnits", "(", "Integer", "newYfrUnits", ")", "{", "Integer", "oldYfrUnits", "=", "yfrUnits", ";", "yfrUnits", "=", "newYfrUnits", ";", "if", "(", "eNotificationRequired", "(", ")", ")", "eNotify", "(", "new", "ENotificationImpl", "(", "...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/FNCImpl.java#L1008-L1013
train
Sets the value of the YFR_UNITS property.
Create a Java method that does the following: "Sets the value of the YFR_UNITS property.".
Of course, here is the Java code you requested: ```java public void setYfrUnits(Integer newYfrUnits) { Integer oldYfrUnits = yfrUnits; yfrUnits = newYfrUnits; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNC__YFR_UNITS, oldYfrUnits, yfrUnits)); } ``` Hope ...
GlenKPeterson/Paguro
src/main/java/org/organicdesign/fp/xform/Xform.java
Xform.of
public static <T> Xform<T> of(Iterable<? extends T> list) { if (list == null) { return empty(); } return new SourceProviderIterableDesc<>(list); }
java
public static <T> Xform<T> of(Iterable<? extends T> list) { if (list == null) { return empty(); } return new SourceProviderIterableDesc<>(list); }
[ "public", "static", "<", "T", ">", "Xform", "<", "T", ">", "of", "(", "Iterable", "<", "?", "extends", "T", ">", "list", ")", "{", "if", "(", "list", "==", "null", ")", "{", "return", "empty", "(", ")", ";", "}", "return", "new", "SourceProviderI...
Static factory methods
[ "Static", "factory", "methods" ]
eac0d64b2eb9496967334f635cdb270cffb2197b
https://github.com/GlenKPeterson/Paguro/blob/eac0d64b2eb9496967334f635cdb270cffb2197b/src/main/java/org/organicdesign/fp/xform/Xform.java#L445-L448
test
Create an iterable Xform from an iterable.
Create a Java method that does the following: "Create an iterable Xform from an iterable.".
Of course, here is the Java code you requested: ```java public static <T> Xform<T> of(Iterable<? extends T> list) { if (list == null) { return empty(); } return new SourceProviderIterableDesc<>(list); } ``` Hope this helps!
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java
RMatGraph.setConstants
public RMatGraph<T> setConstants(float a, float b, float c) { Preconditions.checkArgument(a >= 0.0f && b >= 0.0f && c >= 0.0f && a + b + c <= 1.0f, "RMat parameters A, B, and C must be non-negative and sum to less than or equal to one"); this.a = a; this.b = b; this.c = c; return this; }
java
public RMatGraph<T> setConstants(float a, float b, float c) { Preconditions.checkArgument(a >= 0.0f && b >= 0.0f && c >= 0.0f && a + b + c <= 1.0f, "RMat parameters A, B, and C must be non-negative and sum to less than or equal to one"); this.a = a; this.b = b; this.c = c; return this; }
[ "public", "RMatGraph", "<", "T", ">", "setConstants", "(", "float", "a", ",", "float", "b", ",", "float", "c", ")", "{", "Preconditions", ".", "checkArgument", "(", "a", ">=", "0.0f", "&&", "b", ">=", "0.0f", "&&", "c", ">=", "0.0f", "&&", "a", "+"...
The parameters for recursively subdividing the adjacency matrix. <p>Setting A = B = C = 0.25 emulates the Erdős–Rényi model. <p>Graph500 uses A = 0.57, B = C = 0.19. @param a likelihood of source bit = 0, target bit = 0 @param b likelihood of source bit = 0, target bit = 1 @param c likelihood of source bit = 1, targ...
[ "The", "parameters", "for", "recursively", "subdividing", "the", "adjacency", "matrix", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/RMatGraph.java#L112-L121
train
Sets the constant values of the RMatGraph.
Create a Java method that does the following: "Sets the constant values of the RMatGraph.".
Of course, here is the Java code you requested: ```java public RMatGraph<T> setConstants(float a, float b, float c) { Preconditions.checkArgument(a >= 0.0f && b >= 0.0f && c >= 0.0f && a + b + c <= 1.0f, "RMat parameters A, B, and C must be non-negative and sum to less than or equal to one"); this.a = a; thi...
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java
AttributeDefinition.getFlags
@Deprecated public EnumSet<AttributeAccess.Flag> getFlags() { if (flags.isEmpty()) { return EnumSet.noneOf(AttributeAccess.Flag.class); } AttributeAccess.Flag[] array = flags.toArray(new AttributeAccess.Flag[flags.size()]); return array.length == 1 ? EnumSet.of(array[0]) ...
java
@Deprecated public EnumSet<AttributeAccess.Flag> getFlags() { if (flags.isEmpty()) { return EnumSet.noneOf(AttributeAccess.Flag.class); } AttributeAccess.Flag[] array = flags.toArray(new AttributeAccess.Flag[flags.size()]); return array.length == 1 ? EnumSet.of(array[0]) ...
[ "@", "Deprecated", "public", "EnumSet", "<", "AttributeAccess", ".", "Flag", ">", "getFlags", "(", ")", "{", "if", "(", "flags", ".", "isEmpty", "(", ")", ")", "{", "return", "EnumSet", ".", "noneOf", "(", "AttributeAccess", ".", "Flag", ".", "class", ...
Gets a set of any {@link org.jboss.as.controller.registry.AttributeAccess.Flag flags} used to indicate special characteristics of the attribute @return the flags. Will not be {@code null} but may be empty. @deprecated In the next release, the return type of this method will become simply {@code Set} and the returned ...
[ "Gets", "a", "set", "of", "any", "{", "@link", "org", ".", "jboss", ".", "as", ".", "controller", ".", "registry", ".", "AttributeAccess", ".", "Flag", "flags", "}", "used", "to", "indicate", "special", "characteristics", "of", "the", "attribute" ]
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L422-L429
train
Get the flags attribute.
Create a Java method that does the following: "Get the flags attribute.".
Of course, here is the Java code you requested: ```java @Deprecated public EnumSet<AttributeAccess.Flag> getFlags() { if (flags.isEmpty()) { return EnumSet.noneOf(AttributeAccess.Flag.class); } AttributeAccess.Flag[] array = flags.toArray(new AttributeAccess.Flag[flags.size()]);...
easymock/objenesis
tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java
ClassEnumerator.getClassesForPackage
public static SortedSet<String> getClassesForPackage(Package pkg, ClassLoader classLoader) { SortedSet<String> classes = new TreeSet<>(new Comparator<String>() { public int compare(String o1, String o2) { String simpleName1 = getSimpleName(o1); String simpleName2 = getSimp...
java
public static SortedSet<String> getClassesForPackage(Package pkg, ClassLoader classLoader) { SortedSet<String> classes = new TreeSet<>(new Comparator<String>() { public int compare(String o1, String o2) { String simpleName1 = getSimpleName(o1); String simpleName2 = getSimp...
[ "public", "static", "SortedSet", "<", "String", ">", "getClassesForPackage", "(", "Package", "pkg", ",", "ClassLoader", "classLoader", ")", "{", "SortedSet", "<", "String", ">", "classes", "=", "new", "TreeSet", "<>", "(", "new", "Comparator", "<", "String", ...
Return all the classes in this package recursively. @param pkg the searched package @param classLoader class loader where to look for classes @return list of full class names
[ "Return", "all", "the", "classes", "in", "this", "package", "recursively", "." ]
8f601c8ba1aa20bbc640e2c2bc48d55df52c489f
https://github.com/easymock/objenesis/blob/8f601c8ba1aa20bbc640e2c2bc48d55df52c489f/tck/src/main/java/org/objenesis/tck/search/ClassEnumerator.java#L97-L131
train
Get the classes for the given package.
Create a Java method that does the following: "Get the classes for the given package.".
Of course, here is the Java code you requested: ```java public static SortedSet<String> getClassesForPackage(Package pkg, ClassLoader classLoader) { SortedSet<String> classes = new TreeSet<>(new Comparator<String>() { public int compare(String o1, String o2) { String simpleName1 = getS...
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/ReplacedText.java
ReplacedText.createDecoder
private void createDecoder() { decoder = new DOMAnalyzer(doc, base); if (encoding == null) encoding = decoder.getCharacterEncoding(); decoder.setDefaultEncoding(encoding); decoder.attributesToStyles(); decoder.addStyleSheet(null, CSSNorm.stdStyleSheet(), DOMAnalyz...
java
private void createDecoder() { decoder = new DOMAnalyzer(doc, base); if (encoding == null) encoding = decoder.getCharacterEncoding(); decoder.setDefaultEncoding(encoding); decoder.attributesToStyles(); decoder.addStyleSheet(null, CSSNorm.stdStyleSheet(), DOMAnalyz...
[ "private", "void", "createDecoder", "(", ")", "{", "decoder", "=", "new", "DOMAnalyzer", "(", "doc", ",", "base", ")", ";", "if", "(", "encoding", "==", "null", ")", "encoding", "=", "decoder", ".", "getCharacterEncoding", "(", ")", ";", "decoder", ".", ...
==========================================================================
[ "==========================================================================" ]
38aaf8f22d233d7b4dbc12a56cdbc72b447bc559
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/ReplacedText.java#L114-L124
train
Create the decoder.
Create a Java method that does the following: "Create the decoder.".
Of course, here is the Java code you requested: ```java private void createDecoder() { decoder = new DOMAnalyzer(doc, base); if (encoding == null) encoding = decoder.getCharacterEncoding(); decoder.setDefaultEncoding(encoding); decoder.attributesToStyles(); decod...
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoApi/events/EventConsumer.java
EventConsumer.sendErrorToCallback
private static void sendErrorToCallback(EventCallBackStruct cs, String callbackKey, DevFailed e) { int source = (cs.consumer instanceof NotifdEventConsumer)? EventData.NOTIFD_EVENT : EventData.ZMQ_EVENT; EventData eventData = new EventData(cs.device, callbackKey, ...
java
private static void sendErrorToCallback(EventCallBackStruct cs, String callbackKey, DevFailed e) { int source = (cs.consumer instanceof NotifdEventConsumer)? EventData.NOTIFD_EVENT : EventData.ZMQ_EVENT; EventData eventData = new EventData(cs.device, callbackKey, ...
[ "private", "static", "void", "sendErrorToCallback", "(", "EventCallBackStruct", "cs", ",", "String", "callbackKey", ",", "DevFailed", "e", ")", "{", "int", "source", "=", "(", "cs", ".", "consumer", "instanceof", "NotifdEventConsumer", ")", "?", "EventData", "."...
===============================================================
[ "===============================================================" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/events/EventConsumer.java#L432-L446
train
Send error to callback
Create a Java method that does the following: "Send error to callback".
Of course, here is the Java code you requested: ```java private static void sendErrorToCallback(EventCallBackStruct cs, String callbackKey, DevFailed e) { int source = (cs.consumer instanceof NotifdEventConsumer)? EventData.NOTIFD_EVENT : EventData.ZMQ_EVENT; EventData eventData = ...
passwordmaker/java-passwordmaker-lib
src/main/java/org/daveware/passwordmaker/RDFDatabaseReader.java
RDFDatabaseReader.createParentChildRelationships
private void createParentChildRelationships(Database db, HashMap<String, Account> descriptionMap, HashMap<String, ArrayList<String>> seqMap) throws Exception { // List of ID's used to avoid recursion ...
java
private void createParentChildRelationships(Database db, HashMap<String, Account> descriptionMap, HashMap<String, ArrayList<String>> seqMap) throws Exception { // List of ID's used to avoid recursion ...
[ "private", "void", "createParentChildRelationships", "(", "Database", "db", ",", "HashMap", "<", "String", ",", "Account", ">", "descriptionMap", ",", "HashMap", "<", "String", ",", "ArrayList", "<", "String", ">", ">", "seqMap", ")", "throws", "Exception", "{...
Iterates through the list of Seqs read in adding the parent node and then adding children which belong to it. @param db The database to add nodes to. @param descriptionMap The list of RDF:Description nodes. @param seqMap The list of RDF:Seq nodes, which contain RDF:li nodes. @throws Exception on un...
[ "Iterates", "through", "the", "list", "of", "Seqs", "read", "in", "adding", "the", "parent", "node", "and", "then", "adding", "children", "which", "belong", "to", "it", "." ]
18c22fca7dd9a47f08161425b85a5bd257afbb2b
https://github.com/passwordmaker/java-passwordmaker-lib/blob/18c22fca7dd9a47f08161425b85a5bd257afbb2b/src/main/java/org/daveware/passwordmaker/RDFDatabaseReader.java#L385-L445
train
Create the parent and child relationships for the sequence nodes.
Create a Java method that does the following: "Create the parent and child relationships for the sequence nodes.".
Of course, here is the Java code you requested: ```java private void createParentChildRelationships(Database db, HashMap<String, Account> descriptionMap, HashMap<String, ArrayList<String>> seqMap) throws Excepti...
aalmiray/Json-lib
src/main/java/net/sf/json/xml/XMLSerializer.java
XMLSerializer.read
public JSON read( String xml ) { JSON json = null; try{ Document doc = new Builder().build( new StringReader( xml ) ); Element root = doc.getRootElement(); if( isNullObject( root ) ){ return JSONNull.getInstance(); } String defaultType = getType( root...
java
public JSON read( String xml ) { JSON json = null; try{ Document doc = new Builder().build( new StringReader( xml ) ); Element root = doc.getRootElement(); if( isNullObject( root ) ){ return JSONNull.getInstance(); } String defaultType = getType( root...
[ "public", "JSON", "read", "(", "String", "xml", ")", "{", "JSON", "json", "=", "null", ";", "try", "{", "Document", "doc", "=", "new", "Builder", "(", ")", ".", "build", "(", "new", "StringReader", "(", "xml", ")", ")", ";", "Element", "root", "=",...
Creates a JSON value from a XML string. @param xml A well-formed xml document in a String @return a JSONNull, JSONObject or JSONArray @throws JSONException if the conversion from XML to JSON can't be made for I/O or format reasons.
[ "Creates", "a", "JSON", "value", "from", "a", "XML", "string", "." ]
9e2b3376ee8f511a48aa7ac05f75a7414e02280f
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/xml/XMLSerializer.java#L356-L384
train
read XML string
Create a Java method that does the following: "read XML string".
Of course, here is the Java code you requested: ```java public JSON read( String xml ) { JSON json = null; try{ Document doc = new Builder().build( new StringReader( xml ) ); Element root = doc.getRootElement(); if( isNullObject( root ) ){ return JSONNull.getInstance(...
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java
StreamPersistedValueData.readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { orderNumber = in.readInt(); // read canonical file path int size = in.readInt(); if (size > 0) { byte[] buf = new byte[size]; in.readFully(buf); final String path = new Stri...
java
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { orderNumber = in.readInt(); // read canonical file path int size = in.readInt(); if (size > 0) { byte[] buf = new byte[size]; in.readFully(buf); final String path = new Stri...
[ "public", "void", "readExternal", "(", "ObjectInput", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "orderNumber", "=", "in", ".", "readInt", "(", ")", ";", "// read canonical file path", "int", "size", "=", "in", ".", "readInt", "(", ...
{@inheritDoc}
[ "{" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/StreamPersistedValueData.java#L475-L515
train
readExternal Method.
Create a Java method that does the following: "readExternal Method.".
Of course, here is the Java code you requested: ```java public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { orderNumber = in.readInt(); // read canonical file path int size = in.readInt(); if (size > 0) { byte[] buf = new byte[size]; ...
brutusin/json-provider
src/main/java/org/brutusin/json/impl/JacksonSchema.java
JacksonSchema.getValidator
private com.github.fge.jsonschema.main.JsonSchema getValidator() throws ProcessingException { if (validator == null) { synchronized (this) { if (validator == null) { ValidationConfigurationBuilder cfgBuilder = ValidationConfiguration.newBuilder(); ...
java
private com.github.fge.jsonschema.main.JsonSchema getValidator() throws ProcessingException { if (validator == null) { synchronized (this) { if (validator == null) { ValidationConfigurationBuilder cfgBuilder = ValidationConfiguration.newBuilder(); ...
[ "private", "com", ".", "github", ".", "fge", ".", "jsonschema", ".", "main", ".", "JsonSchema", "getValidator", "(", ")", "throws", "ProcessingException", "{", "if", "(", "validator", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "...
Lazy intialization of validator instance @return @throws ProcessingException
[ "Lazy", "intialization", "of", "validator", "instance" ]
4f7745b3bd9acc591c9aaf18ac4608aabe52c450
https://github.com/brutusin/json-provider/blob/4f7745b3bd9acc591c9aaf18ac4608aabe52c450/src/main/java/org/brutusin/json/impl/JacksonSchema.java#L105-L116
valid
Gets the validator.
Create a Java method that does the following: "Gets the validator.".
Of course, here is the Java code you requested: ```java private com.github.fge.jsonschema.main.JsonSchema getValidator() throws ProcessingException { if (validator == null) { synchronized (this) { if (validator == null) { ValidationConfigurationBuilder cfgBuilder...
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java
ChecksumExtensions.getChecksum
public static String getChecksum(final Byte[] bytes, final String algorithm) throws NoSuchAlgorithmException { return getChecksum(ArrayUtils.toPrimitive(bytes), algorithm); }
java
public static String getChecksum(final Byte[] bytes, final String algorithm) throws NoSuchAlgorithmException { return getChecksum(ArrayUtils.toPrimitive(bytes), algorithm); }
[ "public", "static", "String", "getChecksum", "(", "final", "Byte", "[", "]", "bytes", ",", "final", "String", "algorithm", ")", "throws", "NoSuchAlgorithmException", "{", "return", "getChecksum", "(", "ArrayUtils", ".", "toPrimitive", "(", "bytes", ")", ",", "...
Gets the checksum from the given byte array with an instance of. @param bytes the Byte object array. @param algorithm the algorithm to get the checksum. This could be for instance "MD4", "MD5", "SHA-1", "SHA-256", "SHA-384" or "SHA-512". @return The checksum from the file as a String object. @throws NoSuchAlgorithmExc...
[ "Gets", "the", "checksum", "from", "the", "given", "byte", "array", "with", "an", "instance", "of", "." ]
2c81de10fb5d68de64c1abc3ed64ca681ce76da8
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java#L175-L179
train
Gets the checksum of the given bytes using the specified algorithm.
Create a Java method that does the following: "Gets the checksum of the given bytes using the specified algorithm.".
Of course, here is the Java code you requested: ```java public static String getChecksum(final Byte[] bytes, final String algorithm) throws NoSuchAlgorithmException { return getChecksum(ArrayUtils.toPrimitive(bytes), algorithm); } ``` Hope this helps!
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/impl/ServiceClientImpl.java
ServiceClientImpl.getXliffFromDocumentTranslationRequest
@Override public void getXliffFromDocumentTranslationRequest(String trId, String srcLanguage, String trgLanguage, OutputStream outputXliff) throws ServiceException, IOException { if (trId == null || trId.isEmpty()) { throw new IllegalArgumentException("Non-empty trId must...
java
@Override public void getXliffFromDocumentTranslationRequest(String trId, String srcLanguage, String trgLanguage, OutputStream outputXliff) throws ServiceException, IOException { if (trId == null || trId.isEmpty()) { throw new IllegalArgumentException("Non-empty trId must...
[ "@", "Override", "public", "void", "getXliffFromDocumentTranslationRequest", "(", "String", "trId", ",", "String", "srcLanguage", ",", "String", "trgLanguage", ",", "OutputStream", "outputXliff", ")", "throws", "ServiceException", ",", "IOException", "{", "if", "(", ...
/* (non-Javadoc) @see com.ibm.g11n.pipeline.client.ServiceClient#getXliffFromDocumentTranslationRequest(java.lang.String, java.lang.String, java.lang.String, java.io.OutputStream)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/impl/ServiceClientImpl.java#L2173-L2213
train
This method is used to get the XLIFF document translation for a document.
Create a Java method that does the following: "This method is used to get the XLIFF document translation for a document.".
Of course, here is the Java code you requested: ```java @Override public void getXliffFromDocumentTranslationRequest(String trId, String srcLanguage, String trgLanguage, OutputStream outputXliff) throws ServiceException, IOException { if (trId == null || trId.isEmpty()) { ...
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ObjectDataTypesInner.java
ObjectDataTypesInner.listFieldsByTypeAsync
public Observable<List<TypeFieldInner>> listFieldsByTypeAsync(String resourceGroupName, String automationAccountName, String typeName) { return listFieldsByTypeWithServiceResponseAsync(resourceGroupName, automationAccountName, typeName).map(new Func1<ServiceResponse<List<TypeFieldInner>>, List<TypeFieldInner>>(...
java
public Observable<List<TypeFieldInner>> listFieldsByTypeAsync(String resourceGroupName, String automationAccountName, String typeName) { return listFieldsByTypeWithServiceResponseAsync(resourceGroupName, automationAccountName, typeName).map(new Func1<ServiceResponse<List<TypeFieldInner>>, List<TypeFieldInner>>(...
[ "public", "Observable", "<", "List", "<", "TypeFieldInner", ">", ">", "listFieldsByTypeAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "typeName", ")", "{", "return", "listFieldsByTypeWithServiceResponseAsync", "(", "re...
Retrieve a list of fields of a given type across all accessible modules. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param typeName The name of type. @throws IllegalArgumentException thrown if parameters fail the validation @return the obs...
[ "Retrieve", "a", "list", "of", "fields", "of", "a", "given", "type", "across", "all", "accessible", "modules", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ObjectDataTypesInner.java#L206-L213
train
Gets a list of type fields.
Create a Java method that does the following: "Gets a list of type fields.".
Of course, here is the Java code you requested: ```java public Observable<List<TypeFieldInner>> listFieldsByTypeAsync(String resourceGroupName, String automationAccountName, String typeName) { return listFieldsByTypeWithServiceResponseAsync(resourceGroupName, automationAccountName, typeName).map(new Func1<Serv...
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/complex/BaseComplexNDArray.java
BaseComplexNDArray.rsubi
@Override public IComplexNDArray rsubi(INDArray other, INDArray result) { return (IComplexNDArray) other.subi(this, result); }
java
@Override public IComplexNDArray rsubi(INDArray other, INDArray result) { return (IComplexNDArray) other.subi(this, result); }
[ "@", "Override", "public", "IComplexNDArray", "rsubi", "(", "INDArray", "other", ",", "INDArray", "result", ")", "{", "return", "(", "IComplexNDArray", ")", "other", ".", "subi", "(", "this", ",", "result", ")", ";", "}" ]
Reverse subtraction (in-place) @param other the other ndarray to subtract @param result the result ndarray @return the ndarray with the operation applied
[ "Reverse", "subtraction", "(", "in", "-", "place", ")" ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/complex/BaseComplexNDArray.java#L3268-L3271
test
Subtraction of this array with another
Create a Java method that does the following: "Subtraction of this array with another".
Of course, here is the Java code you requested: ```java @Override public IComplexNDArray rsubi(INDArray other, INDArray result) { return (IComplexNDArray) other.subi(this, result); } ``` Hope this helps!
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/util/box/MutableChar.java
MutableChar.mapInputToObj
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Character> fn) { final MutableChar host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); return this; } };...
java
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Character> fn) { final MutableChar host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); return this; } };...
[ "public", "<", "T1", ">", "Mutable", "<", "T1", ">", "mapInputToObj", "(", "final", "Function", "<", "T1", ",", "Character", ">", "fn", ")", "{", "final", "MutableChar", "host", "=", "this", ";", "return", "new", "Mutable", "<", "T1", ">", "(", ")", ...
Use the supplied function to perform a lazy transform operation when getValue is called <pre> {@code MutableChar mutable = MutableChar.fromExternal(()->!this.value,val->!this.value); Mutable<Character> withOverride = mutable.mapInput(b->{ if(override) return 'v'; return b; }); } </pre> @param fn Map function to be a...
[ "Use", "the", "supplied", "function", "to", "perform", "a", "lazy", "transform", "operation", "when", "getValue", "is", "called", "<pre", ">", "{", "@code", "MutableChar", "mutable", "=", "MutableChar", ".", "fromExternal", "((", ")", "-", ">", "!this", ".",...
59a9fde30190a4d1faeb9f6d9851d209d82b81dd
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/util/box/MutableChar.java#L148-L158
train
Maps the input of a Character object to a MutableChar object.
Create a Java method that does the following: "Maps the input of a Character object to a MutableChar object.".
Of course, here is the Java code you requested: ```java public <T1> Mutable<T1> mapInputToObj(final Function<T1, Character> fn) { final MutableChar host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)...
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/inline/InlineAsset.java
InlineAsset.getInlineRendition
private Rendition getInlineRendition(MediaArgs mediaArgs) { return new InlineRendition(this.resource, this.media, mediaArgs, this.fileName, this.adaptable); }
java
private Rendition getInlineRendition(MediaArgs mediaArgs) { return new InlineRendition(this.resource, this.media, mediaArgs, this.fileName, this.adaptable); }
[ "private", "Rendition", "getInlineRendition", "(", "MediaArgs", "mediaArgs", ")", "{", "return", "new", "InlineRendition", "(", "this", ".", "resource", ",", "this", ".", "media", ",", "mediaArgs", ",", "this", ".", "fileName", ",", "this", ".", "adaptable", ...
Get inline rendition instance. @param mediaArgs Media args @return Inline rendition instance (may be invalid rendition)
[ "Get", "inline", "rendition", "instance", "." ]
b0fc1c11a3ceb89efb73826dcfd480d6a00c19af
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/inline/InlineAsset.java#L140-L142
train
Gets the inline rendition.
Create a Java method that does the following: "Gets the inline rendition.".
Of course, here is the Java code you requested: ```java private Rendition getInlineRendition(MediaArgs mediaArgs) { return new InlineRendition(this.resource, this.media, mediaArgs, this.fileName, this.adaptable); } ``` Hope this helps!
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_restoreconfig.java
br_restoreconfig.restoreconfig
public static br_restoreconfig restoreconfig(nitro_service client, br_restoreconfig resource) throws Exception { return ((br_restoreconfig[]) resource.perform_operation(client, "restoreconfig"))[0]; }
java
public static br_restoreconfig restoreconfig(nitro_service client, br_restoreconfig resource) throws Exception { return ((br_restoreconfig[]) resource.perform_operation(client, "restoreconfig"))[0]; }
[ "public", "static", "br_restoreconfig", "restoreconfig", "(", "nitro_service", "client", ",", "br_restoreconfig", "resource", ")", "throws", "Exception", "{", "return", "(", "(", "br_restoreconfig", "[", "]", ")", "resource", ".", "perform_operation", "(", "client",...
<pre> Use this operation to restore config from file on Repeater Instances. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "restore", "config", "from", "file", "on", "Repeater", "Instances", ".", "<", "/", "pre", ">" ]
c840919f1a8f7c0a5634c0f23d34fa14d1765ff1
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_restoreconfig.java#L105-L108
train
Use this operation to restore config.
Create a Java method that does the following: "Use this operation to restore config.".
Of course, here is the Java code you requested: ```java public static br_restoreconfig restoreconfig(nitro_service client, br_restoreconfig resource) throws Exception { return ((br_restoreconfig[]) resource.perform_operation(client, "restoreconfig"))[0]; } ``` Hope this helps!
OwlPlatform/java-owl-worldmodel
src/main/java/com/owlplatform/worldmodel/client/ClientWorldModelInterface.java
ClientWorldModelInterface._disconnect
protected void _disconnect() { IoSession currentSession = this.session; this.session = null; this.sentHandshake = null; this.receivedHandshake = null; this.attributeAliasValues.clear(); this.originAliasValues.clear(); if (currentSession != null && !currentSession.isClosing()) { log.i...
java
protected void _disconnect() { IoSession currentSession = this.session; this.session = null; this.sentHandshake = null; this.receivedHandshake = null; this.attributeAliasValues.clear(); this.originAliasValues.clear(); if (currentSession != null && !currentSession.isClosing()) { log.i...
[ "protected", "void", "_disconnect", "(", ")", "{", "IoSession", "currentSession", "=", "this", ".", "session", ";", "this", ".", "session", "=", "null", ";", "this", ".", "sentHandshake", "=", "null", ";", "this", ".", "receivedHandshake", "=", "null", ";"...
Disconnects from the world model.
[ "Disconnects", "from", "the", "world", "model", "." ]
a850e8b930c6e9787c7cad30c0de887858ca563d
https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/client/ClientWorldModelInterface.java#L392-L418
train
Disconnects from the World Model.
Create a Java method that does the following: "Disconnects from the World Model.".
Of course, here is the Java code you requested: ```java protected void _disconnect() { IoSession currentSession = this.session; this.session = null; this.sentHandshake = null; this.receivedHandshake = null; this.attributeAliasValues.clear(); this.originAliasValues.clear(); if (currentSessi...
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java
RasterableModel.prepare
@Override public void prepare(FeatureProvider provider) { super.prepare(provider); transformable = provider.getFeature(Transformable.class); mirrorable = provider.getFeature(Mirrorable.class); animator = provider.getFeature(Animatable.class); }
java
@Override public void prepare(FeatureProvider provider) { super.prepare(provider); transformable = provider.getFeature(Transformable.class); mirrorable = provider.getFeature(Mirrorable.class); animator = provider.getFeature(Animatable.class); }
[ "@", "Override", "public", "void", "prepare", "(", "FeatureProvider", "provider", ")", "{", "super", ".", "prepare", "(", "provider", ")", ";", "transformable", "=", "provider", ".", "getFeature", "(", "Transformable", ".", "class", ")", ";", "mirrorable", "...
/* Rasterable
[ "/", "*", "Rasterable" ]
cac3d5578532cf11724a737b9f09e71bf9995ab2
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java#L134-L142
train
Override prepare to add the necessary features to the feature provider.
Create a Java method that does the following: "Override prepare to add the necessary features to the feature provider.".
Of course, here is the Java code you requested: ```java @Override public void prepare(FeatureProvider provider) { super.prepare(provider); transformable = provider.getFeature(Transformable.class); mirrorable = provider.getFeature(Mirrorable.class); animator = provider.ge...
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.update
public AppServiceCertificateOrderInner update(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().single().body(); ...
java
public AppServiceCertificateOrderInner update(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).toBlocking().single().body(); ...
[ "public", "AppServiceCertificateOrderInner", "update", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "AppServiceCertificateOrderPatchResource", "certificateDistinguishedName", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGrou...
Create or update a certificate purchase order. Create or update a certificate purchase order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param certificateDistinguishedName Distinguished name to to use for the certificat...
[ "Create", "or", "update", "a", "certificate", "purchase", "order", ".", "Create", "or", "update", "a", "certificate", "purchase", "order", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L864-L866
train
Updates an App Service certificate order.
Create a Java method that does the following: "Updates an App Service certificate order.".
Of course, here is the Java code you requested: ```java public AppServiceCertificateOrderInner update(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, cer...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java
AfplibPackageImpl.getMCCRG
public EClass getMCCRG() { if (mccrgEClass == null) { mccrgEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(424); } return mccrgEClass; }
java
public EClass getMCCRG() { if (mccrgEClass == null) { mccrgEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(424); } return mccrgEClass; }
[ "public", "EClass", "getMCCRG", "(", ")", "{", "if", "(", "mccrgEClass", "==", "null", ")", "{", "mccrgEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "AfplibPackage", ".", "eNS_URI", ")", ".", "ge...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java#L12151-L12156
train
Get the mccrgEClass
Create a Java method that does the following: "Get the mccrgEClass".
Of course, here is the Java code you requested: ```java public EClass getMCCRG() { if (mccrgEClass == null) { mccrgEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(424); } return mccrgEClass; } ``` Hope this helps!
i-net-software/jlessc
src/com/inet/lib/less/HashMultimap.java
HashMultimap.addAll
void addAll( HashMultimap<K, V> m ) { if( m == this ) { return; } for( Entry<K, List<V>> entry : m.map.entrySet() ) { K key = entry.getKey(); List<V> rules = map.get( key ); if( rules == null ) { rules = new ArrayList<>(); ...
java
void addAll( HashMultimap<K, V> m ) { if( m == this ) { return; } for( Entry<K, List<V>> entry : m.map.entrySet() ) { K key = entry.getKey(); List<V> rules = map.get( key ); if( rules == null ) { rules = new ArrayList<>(); ...
[ "void", "addAll", "(", "HashMultimap", "<", "K", ",", "V", ">", "m", ")", "{", "if", "(", "m", "==", "this", ")", "{", "return", ";", "}", "for", "(", "Entry", "<", "K", ",", "List", "<", "V", ">", ">", "entry", ":", "m", ".", "map", ".", ...
Add all values of the mappings from the specified map to this map. @param m mappings to be stored in this map
[ "Add", "all", "values", "of", "the", "mappings", "from", "the", "specified", "map", "to", "this", "map", "." ]
15b13e1637f6cc2e4d72df021e23ee0ca8d5e629
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/HashMultimap.java#L110-L127
train
Add all the rules from the given Multimap.
Create a Java method that does the following: "Add all the rules from the given Multimap.".
Of course, here is the Java code you requested: ```java void addAll( HashMultimap<K, V> m ) { if( m == this ) { return; } for( Entry<K, List<V>> entry : m.map.entrySet() ) { K key = entry.getKey(); List<V> rules = map.get( key ); if( rules == null...
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/indexer/fieldtypes/FieldTypeMapper.java
FieldTypeMapper.mapType
public Optional<FieldTypes.Type> mapType(String typeName) { return Optional.ofNullable(TYPE_MAP.get(typeName)); }
java
public Optional<FieldTypes.Type> mapType(String typeName) { return Optional.ofNullable(TYPE_MAP.get(typeName)); }
[ "public", "Optional", "<", "FieldTypes", ".", "Type", ">", "mapType", "(", "String", "typeName", ")", "{", "return", "Optional", ".", "ofNullable", "(", "TYPE_MAP", ".", "get", "(", "typeName", ")", ")", ";", "}" ]
Map the given Elasticsearch field type to a Graylog type. @param typeName Elasticsearch type name @return the Graylog type object
[ "Map", "the", "given", "Elasticsearch", "field", "type", "to", "a", "Graylog", "type", "." ]
50b565dcead6e0a372236d5c2f8530dc5726fa9b
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/indexer/fieldtypes/FieldTypeMapper.java#L78-L80
train
Map a type name to a type.
Create a Java method that does the following: "Map a type name to a type.".
Of course, here is the Java code you requested: ```java public Optional<FieldTypes.Type> mapType(String typeName) { return Optional.ofNullable(TYPE_MAP.get(typeName)); } ``` Hope this helps!
webfirmframework/wff
wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/AbstractHtml.java
AbstractHtml.getAttributeByName
public AbstractAttribute getAttributeByName(final String attributeName) { final Lock lock = sharedObject.getLock(ACCESS_OBJECT).readLock(); AbstractAttribute result = null; try { lock.lock(); if (attributesMap != null) { result = attributesMap.get(attribu...
java
public AbstractAttribute getAttributeByName(final String attributeName) { final Lock lock = sharedObject.getLock(ACCESS_OBJECT).readLock(); AbstractAttribute result = null; try { lock.lock(); if (attributesMap != null) { result = attributesMap.get(attribu...
[ "public", "AbstractAttribute", "getAttributeByName", "(", "final", "String", "attributeName", ")", "{", "final", "Lock", "lock", "=", "sharedObject", ".", "getLock", "(", "ACCESS_OBJECT", ")", ".", "readLock", "(", ")", ";", "AbstractAttribute", "result", "=", "...
gets the attribute by attribute name @return the attribute object for the given attribute name if exists otherwise returns null. @since 2.0.0 @author WFF
[ "gets", "the", "attribute", "by", "attribute", "name" ]
e59def3a20d44f91e112b113448d951d7514af2e
https://github.com/webfirmframework/wff/blob/e59def3a20d44f91e112b113448d951d7514af2e/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/AbstractHtml.java#L1294-L1307
valid
Gets the attribute by name.
Create a Java method that does the following: "Gets the attribute by name.".
Of course, here is the Java code you requested: ```java public AbstractAttribute getAttributeByName(final String attributeName) { final Lock lock = sharedObject.getLock(ACCESS_OBJECT).readLock(); AbstractAttribute result = null; try { lock.lock(); if (attributesMap != n...