repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PubAPIs.java
PubAPIs.visitPubapi
@SuppressWarnings("deprecation") public void visitPubapi(Element e) { // Skip anonymous classes for now if (e == null) return; PubapiVisitor v = new PubapiVisitor(); v.visit(e); publicApiPerClass.put((ClassSymbol) e, v.getCollectedPubApi()); }
java
@SuppressWarnings("deprecation") public void visitPubapi(Element e) { // Skip anonymous classes for now if (e == null) return; PubapiVisitor v = new PubapiVisitor(); v.visit(e); publicApiPerClass.put((ClassSymbol) e, v.getCollectedPubApi()); }
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "void", "visitPubapi", "(", "Element", "e", ")", "{", "// Skip anonymous classes for now", "if", "(", "e", "==", "null", ")", "return", ";", "PubapiVisitor", "v", "=", "new", "PubapiVisitor", "(", ...
Visit the api of a class and construct a pubapi and store it into the pubapi_perclass map.
[ "Visit", "the", "api", "of", "a", "class", "and", "construct", "a", "pubapi", "and", "store", "it", "into", "the", "pubapi_perclass", "map", "." ]
a53d069bbdb2c60232ed3811c19b65e41c3e60e0
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PubAPIs.java#L97-L107
train
Visit a PKCTYPE element.
Of course, here is the Java code you requested: ```java @SuppressWarnings("deprecation") public void visitPubapi(Element e) { // Skip anonymous classes for now if (e == null) return; PubapiVisitor v = new PubapiVisitor(); v.visit(e); publicApiPerClass.put((Clas...
jboss/jboss-el-api_spec
src/main/java/javax/el/BeanELResolver.java
BeanELResolver.getFeatureDescriptors
public Iterator<FeatureDescriptor> getFeatureDescriptors( ELContext context, Object base) { if (base == null){ return null; } BeanInfo info = null; try { info = Introspector.getBe...
java
public Iterator<FeatureDescriptor> getFeatureDescriptors( ELContext context, Object base) { if (base == null){ return null; } BeanInfo info = null; try { info = Introspector.getBe...
[ "public", "Iterator", "<", "FeatureDescriptor", ">", "getFeatureDescriptors", "(", "ELContext", "context", ",", "Object", "base", ")", "{", "if", "(", "base", "==", "null", ")", "{", "return", "null", ";", "}", "BeanInfo", "info", "=", "null", ";", "try", ...
If the base object is not <code>null</code>, returns an <code>Iterator</code> containing the set of JavaBeans properties available on the given object. Otherwise, returns <code>null</code>. <p>The <code>Iterator</code> returned must contain zero or more instances of {@link java.beans.FeatureDescriptor}. Each info obje...
[ "If", "the", "base", "object", "is", "not", "<code", ">", "null<", "/", "code", ">", "returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "containing", "the", "set", "of", "JavaBeans", "properties", "available", "on", "the", "given", "object", "...
4cef117cae3ccf9f76439845687a8d219ad2eb43
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/BeanELResolver.java#L505-L528
train
Gets the feature descriptors for the base object.
Of course, here is the Java code you requested: ```java public Iterator<FeatureDescriptor> getFeatureDescriptors( ELContext context, Object base) { if (base == null){ return null; } BeanInfo info = ...
dmerkushov/log-helper
src/main/java/ru/dmerkushov/loghelper/LoggerWrapper.java
LoggerWrapper.finest
public void finest (String msg) { StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement (); if (caller != null) { logger.logp (Level.FINEST, caller.getClassName (), caller.getMethodName () + "():" + caller.getLineNumber (), msg); } else { logger.logp (Level.FINEST, "(UnknownSourceClass)", "(...
java
public void finest (String msg) { StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement (); if (caller != null) { logger.logp (Level.FINEST, caller.getClassName (), caller.getMethodName () + "():" + caller.getLineNumber (), msg); } else { logger.logp (Level.FINEST, "(UnknownSourceClass)", "(...
[ "public", "void", "finest", "(", "String", "msg", ")", "{", "StackTraceElement", "caller", "=", "StackTraceUtils", ".", "getCallerStackTraceElement", "(", ")", ";", "if", "(", "caller", "!=", "null", ")", "{", "logger", ".", "logp", "(", "Level", ".", "FIN...
Log a FINEST message, specifying source class and method, with no arguments. <p> If the logger is currently enabled for the given message level then the given message is forwarded to all the registered output Handler objects. <p> @param msg The string message (or a key in the message catalog)
[ "Log", "a", "FINEST", "message", "specifying", "source", "class", "and", "method", "with", "no", "arguments", ".", "<p", ">", "If", "the", "logger", "is", "currently", "enabled", "for", "the", "given", "message", "level", "then", "the", "given", "message", ...
3b7d3d30faa7f1437b27cd07c10fa579a995de23
https://github.com/dmerkushov/log-helper/blob/3b7d3d30faa7f1437b27cd07c10fa579a995de23/src/main/java/ru/dmerkushov/loghelper/LoggerWrapper.java#L401-L408
train
Log a message at the finest level.
Of course, here is the Java code you requested: ```java public void finest (String msg) { StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement (); if (caller != null) { logger.logp (Level.FINEST, caller.getClassName (), caller.getMethodName () + "():" + caller.getLineNumber (), msg); } else {...
sebastiangraf/jSCSI
bundles/commons/src/main/java/org/jscsi/utils/Utils.java
Utils.printField
public static final void printField (final StringBuilder sb, final String fieldName, final byte fieldValue, final int indent) { printField(sb, fieldName, (int) fieldValue, indent); }
java
public static final void printField (final StringBuilder sb, final String fieldName, final byte fieldValue, final int indent) { printField(sb, fieldName, (int) fieldValue, indent); }
[ "public", "static", "final", "void", "printField", "(", "final", "StringBuilder", "sb", ",", "final", "String", "fieldName", ",", "final", "byte", "fieldValue", ",", "final", "int", "indent", ")", "{", "printField", "(", "sb", ",", "fieldName", ",", "(", "...
This methods creates an easy to use interface to print out a logging message of a specific variable. @param sb StringBuilder to directly write the logging messages in. @param fieldName The name of the variable. @param fieldValue The value of the given variable. @param indent The level of indention.
[ "This", "methods", "creates", "an", "easy", "to", "use", "interface", "to", "print", "out", "a", "logging", "message", "of", "a", "specific", "variable", "." ]
6169bfe73f0b15de7d6485453555389e782ae888
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/commons/src/main/java/org/jscsi/utils/Utils.java#L162-L165
train
Print a field of type T into a StringBuilder.
Of course, here is the Java code you requested: ```java public static final void printField (final StringBuilder sb, final String fieldName, final byte fieldValue, final int indent) { printField(sb, fieldName, (int) fieldValue, indent); } ``` Hope this helps!
eclipse/xtext-extras
org.eclipse.xtext.xbase/emf-gen/org/eclipse/xtext/xbase/impl/XFeatureCallImpl.java
XFeatureCallImpl.getFeatureCallArguments
public EList<XExpression> getFeatureCallArguments() { if (featureCallArguments == null) { featureCallArguments = new EObjectContainmentEList<XExpression>(XExpression.class, this, XbasePackage.XFEATURE_CALL__FEATURE_CALL_ARGUMENTS); } return featureCallArguments; }
java
public EList<XExpression> getFeatureCallArguments() { if (featureCallArguments == null) { featureCallArguments = new EObjectContainmentEList<XExpression>(XExpression.class, this, XbasePackage.XFEATURE_CALL__FEATURE_CALL_ARGUMENTS); } return featureCallArguments; }
[ "public", "EList", "<", "XExpression", ">", "getFeatureCallArguments", "(", ")", "{", "if", "(", "featureCallArguments", "==", "null", ")", "{", "featureCallArguments", "=", "new", "EObjectContainmentEList", "<", "XExpression", ">", "(", "XExpression", ".", "class...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/emf-gen/org/eclipse/xtext/xbase/impl/XFeatureCallImpl.java#L143-L150
train
Replies the feature arguments.
Of course, here is the Java code you requested: ```java public EList<XExpression> getFeatureCallArguments() { if (featureCallArguments == null) { featureCallArguments = new EObjectContainmentEList<XExpression>(XExpression.class, this, XbasePackage.XFEATURE_CALL__FEATURE_CALL_ARGUMENTS); } return featureCal...
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java
HttpOutputStream.setChunking
public void setChunking() { checkOutput(); if (_bufferedOut instanceof ChunkingOutputStream) ((ChunkingOutputStream)_bufferedOut).setChunking(true); else throw new IllegalStateException(_bufferedOut.getClass().toString()); }
java
public void setChunking() { checkOutput(); if (_bufferedOut instanceof ChunkingOutputStream) ((ChunkingOutputStream)_bufferedOut).setChunking(true); else throw new IllegalStateException(_bufferedOut.getClass().toString()); }
[ "public", "void", "setChunking", "(", ")", "{", "checkOutput", "(", ")", ";", "if", "(", "_bufferedOut", "instanceof", "ChunkingOutputStream", ")", "(", "(", "ChunkingOutputStream", ")", "_bufferedOut", ")", ".", "setChunking", "(", "true", ")", ";", "else", ...
Set chunking mode.
[ "Set", "chunking", "mode", "." ]
a9252e62246ac33d55d51b993ba1159404e7d389
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L311-L318
train
Sets the Chunking flag.
Of course, here is the Java code you requested: ```java public void setChunking() { checkOutput(); if (_bufferedOut instanceof ChunkingOutputStream) ((ChunkingOutputStream)_bufferedOut).setChunking(true); else throw new IllegalStateException(_bufferedOut.getClass().t...
OpenLiberty/open-liberty
dev/com.ibm.ws.jca/src/com/ibm/ws/jca/service/ConnectionFactoryService.java
ConnectionFactoryService.activate
@Trivial protected void activate(ComponentContext context) throws Exception { Dictionary<String, ?> props = context.getProperties(); final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) Tr.entry(this, tc, "activate", props); Strin...
java
@Trivial protected void activate(ComponentContext context) throws Exception { Dictionary<String, ?> props = context.getProperties(); final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) Tr.entry(this, tc, "activate", props); Strin...
[ "@", "Trivial", "protected", "void", "activate", "(", "ComponentContext", "context", ")", "throws", "Exception", "{", "Dictionary", "<", "String", ",", "?", ">", "props", "=", "context", ".", "getProperties", "(", ")", ";", "final", "boolean", "trace", "=", ...
DS method to activate this component. Best practice: this should be a protected method, not public or private @param context DeclarativeService defined/populated component context
[ "DS", "method", "to", "activate", "this", "component", ".", "Best", "practice", ":", "this", "should", "be", "a", "protected", "method", "not", "public", "or", "private" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca/src/com/ibm/ws/jca/service/ConnectionFactoryService.java#L162-L198
train
This method is called by the application to activate the application.
Of course, here is the Java code you requested: ```java @Trivial protected void activate(ComponentContext context) throws Exception { Dictionary<String, ?> props = context.getProperties(); final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) ...
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/internal/component/PathOperationComponent.java
PathOperationComponent.buildOperationTitle
private void buildOperationTitle(MarkupDocBuilder markupDocBuilder, PathOperation operation) { buildOperationTitle(markupDocBuilder, operation.getTitle(), operation.getId()); if (operation.getTitle().equals(operation.getOperation().getSummary())) { markupDocBuilder.block(operation.getMethod(...
java
private void buildOperationTitle(MarkupDocBuilder markupDocBuilder, PathOperation operation) { buildOperationTitle(markupDocBuilder, operation.getTitle(), operation.getId()); if (operation.getTitle().equals(operation.getOperation().getSummary())) { markupDocBuilder.block(operation.getMethod(...
[ "private", "void", "buildOperationTitle", "(", "MarkupDocBuilder", "markupDocBuilder", ",", "PathOperation", "operation", ")", "{", "buildOperationTitle", "(", "markupDocBuilder", ",", "operation", ".", "getTitle", "(", ")", ",", "operation", ".", "getId", "(", ")",...
Adds the operation title to the document. If the operation has a summary, the title is the summary. Otherwise the title is the method of the operation and the URL of the operation. @param operation the Swagger Operation
[ "Adds", "the", "operation", "title", "to", "the", "document", ".", "If", "the", "operation", "has", "a", "summary", "the", "title", "is", "the", "summary", ".", "Otherwise", "the", "title", "is", "the", "method", "of", "the", "operation", "and", "the", "...
da83465f19a2f8a0f1fba873b5762bca8587896b
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/internal/component/PathOperationComponent.java#L135-L140
train
Build the operation title.
Of course, here is the Java code you requested: ```java private void buildOperationTitle(MarkupDocBuilder markupDocBuilder, PathOperation operation) { buildOperationTitle(markupDocBuilder, operation.getTitle(), operation.getId()); if (operation.getTitle().equals(operation.getOperation().getSummary())) ...
jbundle/jbundle
app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java
BaseProcessRecords.patternToRegex
public String patternToRegex(String string) { if (string != null) if (!string.contains("[")) if (!string.contains("{")) // If it has one of these, it probably is a regex already. if (!string.contains("\\.")) { string = string.replace("."...
java
public String patternToRegex(String string) { if (string != null) if (!string.contains("[")) if (!string.contains("{")) // If it has one of these, it probably is a regex already. if (!string.contains("\\.")) { string = string.replace("."...
[ "public", "String", "patternToRegex", "(", "String", "string", ")", "{", "if", "(", "string", "!=", "null", ")", "if", "(", "!", "string", ".", "contains", "(", "\"[\"", ")", ")", "if", "(", "!", "string", ".", "contains", "(", "\"{\"", ")", ")", "...
Kind of convert file filter to regex.
[ "Kind", "of", "convert", "file", "filter", "to", "regex", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/script/src/main/java/org/jbundle/app/program/script/process/BaseProcessRecords.java#L364-L375
train
patternToRegex This method converts a string to a regex.
Of course, here is the Java code you requested: ```java public String patternToRegex(String string) { if (string != null) if (!string.contains("[")) if (!string.contains("{")) // If it has one of these, it probably is a regex already. if (!string.contains(...
JodaOrg/joda-money
src/main/java/org/joda/money/DefaultCurrencyUnitDataProvider.java
DefaultCurrencyUnitDataProvider.parseCountries
private void parseCountries(List<String> content) throws Exception { for (String line : content) { Matcher matcher = COUNTRY_REGEX_LINE.matcher(line); if (matcher.matches()) { String countryCode = matcher.group(1); String currencyCode = matcher.group(...
java
private void parseCountries(List<String> content) throws Exception { for (String line : content) { Matcher matcher = COUNTRY_REGEX_LINE.matcher(line); if (matcher.matches()) { String countryCode = matcher.group(1); String currencyCode = matcher.group(...
[ "private", "void", "parseCountries", "(", "List", "<", "String", ">", "content", ")", "throws", "Exception", "{", "for", "(", "String", "line", ":", "content", ")", "{", "Matcher", "matcher", "=", "COUNTRY_REGEX_LINE", ".", "matcher", "(", "line", ")", ";"...
parse the countries
[ "parse", "the", "countries" ]
e1f2de75aa36610a695358696c8a88a18ca66cde
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/DefaultCurrencyUnitDataProvider.java#L109-L118
train
Parses the countries file and registers them in the CountryRegistry.
Of course, here is the Java code you requested: ```java private void parseCountries(List<String> content) throws Exception { for (String line : content) { Matcher matcher = COUNTRY_REGEX_LINE.matcher(line); if (matcher.matches()) { String countryCode = matcher.group(...
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPDefinitionOptionRelLocalServiceUtil.java
CPDefinitionOptionRelLocalServiceUtil.fetchCPDefinitionOptionRelByUuidAndGroupId
public static com.liferay.commerce.product.model.CPDefinitionOptionRel fetchCPDefinitionOptionRelByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchCPDefinitionOptionRelByUuidAndGroupId(uuid, groupId); }
java
public static com.liferay.commerce.product.model.CPDefinitionOptionRel fetchCPDefinitionOptionRelByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchCPDefinitionOptionRelByUuidAndGroupId(uuid, groupId); }
[ "public", "static", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "model", ".", "CPDefinitionOptionRel", "fetchCPDefinitionOptionRelByUuidAndGroupId", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "getService", "(", ")", ".", ...
Returns the cp definition option rel matching the UUID and group. @param uuid the cp definition option rel's UUID @param groupId the primary key of the group @return the matching cp definition option rel, or <code>null</code> if a matching cp definition option rel could not be found
[ "Returns", "the", "cp", "definition", "option", "rel", "matching", "the", "UUID", "and", "group", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPDefinitionOptionRelLocalServiceUtil.java#L236-L240
train
Returns the cp definition option rel matching the UUID and group.
Of course, here is the Java code you requested: ```java public static com.liferay.commerce.product.model.CPDefinitionOptionRel fetchCPDefinitionOptionRelByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchCPDefinitionOptionRelByUuidAndGroupId(uuid, groupId); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConsumerDispatcher.java
ConsumerDispatcher.hasConsumersAttached
public boolean hasConsumersAttached() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "hasConsumersAttached"); //Does the consumer list have any elements? If so return true, else false boolean hasConsumersAttached = (getConsumerCount() > 0); ...
java
public boolean hasConsumersAttached() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "hasConsumersAttached"); //Does the consumer list have any elements? If so return true, else false boolean hasConsumersAttached = (getConsumerCount() > 0); ...
[ "public", "boolean", "hasConsumersAttached", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"hasConsumersAttached\"", ")", ";", "//D...
Returns true if this consumerDispatcher currently has consumers attached to it. @return boolean
[ "Returns", "true", "if", "this", "consumerDispatcher", "currently", "has", "consumers", "attached", "to", "it", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConsumerDispatcher.java#L1974-L1986
train
This method is used to check if the consumers list has any elements.
Of course, here is the Java code you requested: ```java public boolean hasConsumersAttached() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "hasConsumersAttached"); //Does the consumer list have any elements? If so return true, else false bo...
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/distribution/UnitJudge.java
UnitJudge.available
public static boolean available(String groupName, String unitName) { return LocalUnitsManager.getLocalUnit(groupName, unitName) != null || UnitDiscovery.singleton != null && UnitDiscovery.singleton.firstInstance(Unit.fullName(groupName, unitName)) != null; }
java
public static boolean available(String groupName, String unitName) { return LocalUnitsManager.getLocalUnit(groupName, unitName) != null || UnitDiscovery.singleton != null && UnitDiscovery.singleton.firstInstance(Unit.fullName(groupName, unitName)) != null; }
[ "public", "static", "boolean", "available", "(", "String", "groupName", ",", "String", "unitName", ")", "{", "return", "LocalUnitsManager", ".", "getLocalUnit", "(", "groupName", ",", "unitName", ")", "!=", "null", "||", "UnitDiscovery", ".", "singleton", "!=", ...
check whether the specified unit is available. tips: don't use exception catching to get the result, cause this is bad performance.
[ "check", "whether", "the", "specified", "unit", "is", "available", ".", "tips", ":", "don", "t", "use", "exception", "catching", "to", "get", "the", "result", "cause", "this", "is", "bad", "performance", "." ]
1948e088545553d2745b2c86d8b5a64988bb850e
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/distribution/UnitJudge.java#L30-L33
train
Checks if the unit is available in the given group.
Of course, here is the Java code you requested: ```java public static boolean available(String groupName, String unitName) { return LocalUnitsManager.getLocalUnit(groupName, unitName) != null || UnitDiscovery.singleton != null && UnitDiscovery.singleton.firstInstance(Unit.fullName(groupName, un...
gocd/gocd
domain/src/main/java/com/thoughtworks/go/domain/JobInstance.java
JobInstance.durationOfCompletedBuildInSeconds
public Long durationOfCompletedBuildInSeconds() { Date buildingDate = getStartedDateFor(JobState.Building); Date completedDate = getCompletedDate(); if (buildingDate == null || completedDate == null) { return 0L; } Long elapsed = completedDate.getTime() - buildingDate...
java
public Long durationOfCompletedBuildInSeconds() { Date buildingDate = getStartedDateFor(JobState.Building); Date completedDate = getCompletedDate(); if (buildingDate == null || completedDate == null) { return 0L; } Long elapsed = completedDate.getTime() - buildingDate...
[ "public", "Long", "durationOfCompletedBuildInSeconds", "(", ")", "{", "Date", "buildingDate", "=", "getStartedDateFor", "(", "JobState", ".", "Building", ")", ";", "Date", "completedDate", "=", "getCompletedDate", "(", ")", ";", "if", "(", "buildingDate", "==", ...
Begin Date / Time Related Methods
[ "Begin", "Date", "/", "Time", "Related", "Methods" ]
59a8480e23d6c06de39127635108dff57603cb71
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/domain/src/main/java/com/thoughtworks/go/domain/JobInstance.java#L274-L283
train
Get the duration of the build in seconds.
Of course, here is the Java code you requested: ```java public Long durationOfCompletedBuildInSeconds() { Date buildingDate = getStartedDateFor(JobState.Building); Date completedDate = getCompletedDate(); if (buildingDate == null || completedDate == null) { return 0L; } ...
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementBase.java
ElementBase.processResources
private void processResources(boolean register) { CareWebShell shell = CareWebUtil.getShell(); for (IPluginResource resource : getDefinition().getResources()) { resource.register(shell, this, register); } }
java
private void processResources(boolean register) { CareWebShell shell = CareWebUtil.getShell(); for (IPluginResource resource : getDefinition().getResources()) { resource.register(shell, this, register); } }
[ "private", "void", "processResources", "(", "boolean", "register", ")", "{", "CareWebShell", "shell", "=", "CareWebUtil", ".", "getShell", "(", ")", ";", "for", "(", "IPluginResource", "resource", ":", "getDefinition", "(", ")", ".", "getResources", "(", ")", ...
Process all associated resources. @param register If true, resources will be registered; if false, unregistered.
[ "Process", "all", "associated", "resources", "." ]
fa3252d4f7541dbe151b92c3d4f6f91433cd1673
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementBase.java#L970-L976
train
Process the resources.
Of course, here is the Java code you requested: ```java private void processResources(boolean register) { CareWebShell shell = CareWebUtil.getShell(); for (IPluginResource resource : getDefinition().getResources()) { resource.register(shell, this, register); } } ``` Ho...
redkale/redkale
src/org/redkale/source/EntityInfo.java
EntityInfo.getTable
public String getTable(Serializable primary) { if (tableStrategy == null) return table; String t = tableStrategy.getTable(table, primary); return t == null || t.isEmpty() ? table : t; }
java
public String getTable(Serializable primary) { if (tableStrategy == null) return table; String t = tableStrategy.getTable(table, primary); return t == null || t.isEmpty() ? table : t; }
[ "public", "String", "getTable", "(", "Serializable", "primary", ")", "{", "if", "(", "tableStrategy", "==", "null", ")", "return", "table", ";", "String", "t", "=", "tableStrategy", ".", "getTable", "(", "table", ",", "primary", ")", ";", "return", "t", ...
根据主键值获取Entity的表名 @param primary Entity主键值 @return String
[ "根据主键值获取Entity的表名" ]
ea5169b5c5ea7412fd762331c0c497165832e901
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/source/EntityInfo.java#L751-L755
train
Returns the table name for the given primary key.
Of course, here is the Java code you requested: ```java public String getTable(Serializable primary) { if (tableStrategy == null) return table; String t = tableStrategy.getTable(table, primary); return t == null || t.isEmpty() ? table : t; } ``` Hope this helps!
apache/flink
flink-connectors/flink-hcatalog/src/main/java/org/apache/flink/hcatalog/HCatInputFormatBase.java
HCatInputFormatBase.asFlinkTuples
public HCatInputFormatBase<T> asFlinkTuples() throws HCatException { // build type information int numFields = outputSchema.getFields().size(); if (numFields > this.getMaxFlinkTupleSize()) { throw new IllegalArgumentException("Only up to " + this.getMaxFlinkTupleSize() + " fields can be returned as Flink...
java
public HCatInputFormatBase<T> asFlinkTuples() throws HCatException { // build type information int numFields = outputSchema.getFields().size(); if (numFields > this.getMaxFlinkTupleSize()) { throw new IllegalArgumentException("Only up to " + this.getMaxFlinkTupleSize() + " fields can be returned as Flink...
[ "public", "HCatInputFormatBase", "<", "T", ">", "asFlinkTuples", "(", ")", "throws", "HCatException", "{", "// build type information", "int", "numFields", "=", "outputSchema", ".", "getFields", "(", ")", ".", "size", "(", ")", ";", "if", "(", "numFields", ">"...
Specifies that the InputFormat returns Flink tuples instead of {@link org.apache.hive.hcatalog.data.HCatRecord}. <p>Note: Flink tuples might only support a limited number of fields (depending on the API). @return This InputFormat. @throws org.apache.hive.hcatalog.common.HCatException
[ "Specifies", "that", "the", "InputFormat", "returns", "Flink", "tuples", "instead", "of", "{", "@link", "org", ".", "apache", ".", "hive", ".", "hcatalog", ".", "data", ".", "HCatRecord", "}", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hcatalog/src/main/java/org/apache/flink/hcatalog/HCatInputFormatBase.java#L175-L199
train
Returns the output as Flink tuples.
Of course, here is the Java code you requested: ```java public HCatInputFormatBase<T> asFlinkTuples() throws HCatException { // build type information int numFields = outputSchema.getFields().size(); if (numFields > this.getMaxFlinkTupleSize()) { throw new IllegalArgumentException("Only up to " + this.getMax...
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/Parameter.java
Parameter.get
public Object get(int index) { if (value == null) return value; if (value != null && !(value instanceof Object[])) throw new IllegalStateException("Trying to access indexed element of non-array Parameter"); Object[] v = (Object[]) value; if (index < 0 || index >= v.length) return null; return Arra...
java
public Object get(int index) { if (value == null) return value; if (value != null && !(value instanceof Object[])) throw new IllegalStateException("Trying to access indexed element of non-array Parameter"); Object[] v = (Object[]) value; if (index < 0 || index >= v.length) return null; return Arra...
[ "public", "Object", "get", "(", "int", "index", ")", "{", "if", "(", "value", "==", "null", ")", "return", "value", ";", "if", "(", "value", "!=", "null", "&&", "!", "(", "value", "instanceof", "Object", "[", "]", ")", ")", "throw", "new", "Illegal...
Gets the value of the specified index in the array held by this {@link Parameter}. @param index the index @return the object
[ "Gets", "the", "value", "of", "the", "specified", "index", "in", "the", "array", "held", "by", "this", "{", "@link", "Parameter", "}", "." ]
4f8e1fa462d5c372fc23414482ba9f429881cc54
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/Parameter.java#L106-L118
train
Gets the value at the specified index.
Of course, here is the Java code you requested: ```java public Object get(int index) { if (value == null) return value; if (value != null && !(value instanceof Object[])) throw new IllegalStateException("Trying to access indexed element of non-array Parameter"); Object[] v = (Object[]) value; if (index...
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/lang/ArrayUtils.java
ArrayUtils.nullToEmpty
public static Short[] nullToEmpty(Short[] array) { if (array == null || array.length == 0) { return EMPTY_SHORT_OBJECT_ARRAY; } return array; }
java
public static Short[] nullToEmpty(Short[] array) { if (array == null || array.length == 0) { return EMPTY_SHORT_OBJECT_ARRAY; } return array; }
[ "public", "static", "Short", "[", "]", "nullToEmpty", "(", "Short", "[", "]", "array", ")", "{", "if", "(", "array", "==", "null", "||", "array", ".", "length", "==", "0", ")", "{", "return", "EMPTY_SHORT_OBJECT_ARRAY", ";", "}", "return", "array", ";"...
<p>Defensive programming technique to change a <code>null</code> reference to an empty one.</p> <p> <p>This method returns an empty array for a <code>null</code> input array.</p> <p> <p>As a memory optimizing technique an empty array passed in will be overridden with the empty <code>public static</code> references in t...
[ "<p", ">", "Defensive", "programming", "technique", "to", "change", "a", "<code", ">", "null<", "/", "code", ">", "reference", "to", "an", "empty", "one", ".", "<", "/", "p", ">", "<p", ">", "<p", ">", "This", "method", "returns", "an", "empty", "arr...
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/lang/ArrayUtils.java#L447-L452
train
Null - to - empty Short array.
Of course, here is the Java code you requested: ```java public static Short[] nullToEmpty(Short[] array) { if (array == null || array.length == 0) { return EMPTY_SHORT_OBJECT_ARRAY; } return array; } ``` Hope this helps!
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/parser/antlr/internal/InternalSARLLexer.java
InternalSARLLexer.mT__86
public final void mT__86() throws RecognitionException { try { int _type = T__86; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalSARL.g:72:7: ( 'native' ) // InternalSARL.g:72:9: 'native' { match("native"); } s...
java
public final void mT__86() throws RecognitionException { try { int _type = T__86; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalSARL.g:72:7: ( 'native' ) // InternalSARL.g:72:9: 'native' { match("native"); } s...
[ "public", "final", "void", "mT__86", "(", ")", "throws", "RecognitionException", "{", "try", "{", "int", "_type", "=", "T__86", ";", "int", "_channel", "=", "DEFAULT_TOKEN_CHANNEL", ";", "// InternalSARL.g:72:7: ( 'native' )", "// InternalSARL.g:72:9: 'native'", "{", ...
$ANTLR start "T__86"
[ "$ANTLR", "start", "T__86" ]
ca00ff994598c730339972def4e19a60e0b8cace
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/parser/antlr/internal/InternalSARLLexer.java#L1434-L1451
train
start T__86
Of course, here is the Java code you requested: ```java public final void mT__86() throws RecognitionException { try { int _type = T__86; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalSARL.g:72:7: ( 'native' ) // InternalSARL.g:72:9: 'native' { ...
MenoData/Time4J
base/src/main/java/net/time4j/Moment.java
Moment.plus
public Moment plus( long amount, SI unit ) { Moment.check1972(this); if (amount == 0) { return this; } Moment result; try { switch (unit) { case SECONDS: if (LeapSeconds.getInstance().isEnabled())...
java
public Moment plus( long amount, SI unit ) { Moment.check1972(this); if (amount == 0) { return this; } Moment result; try { switch (unit) { case SECONDS: if (LeapSeconds.getInstance().isEnabled())...
[ "public", "Moment", "plus", "(", "long", "amount", ",", "SI", "unit", ")", "{", "Moment", ".", "check1972", "(", "this", ")", ";", "if", "(", "amount", "==", "0", ")", "{", "return", "this", ";", "}", "Moment", "result", ";", "try", "{", "switch", ...
/*[deutsch] <p>Addiert einen Betrag in der angegegebenen SI-Zeiteinheit auf die UTC-Zeit dieses Zeitstempels. </p> @param amount amount in units to be added @param unit time unit defined in UTC time space @return changed copy of this instance @throws UnsupportedOperationException if either this moment or the...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Addiert", "einen", "Betrag", "in", "der", "angegegebenen", "SI", "-", "Zeiteinheit", "auf", "die", "UTC", "-", "Zeit", "dieses", "Zeitstempels", ".", "<", "/", "p", ">" ]
08b2eda6b2dbb140b92011cf7071bb087edd46a5
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/Moment.java#L1368-L1434
train
This method is called to add the specified amount of times to this moment.
Of course, here is the Java code you requested: ```java public Moment plus( long amount, SI unit ) { Moment.check1972(this); if (amount == 0) { return this; } Moment result; try { switch (unit) { case SECONDS: ...
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.getEditableContainers
List<CmsContainer> getEditableContainers() { List<CmsContainer> containers = new ArrayList<CmsContainer>(); for (CmsContainer container : m_containers.values()) { if ((m_targetContainers.get(container.getName()) != null) && isContainerEditable(m_targetContainers.get(containe...
java
List<CmsContainer> getEditableContainers() { List<CmsContainer> containers = new ArrayList<CmsContainer>(); for (CmsContainer container : m_containers.values()) { if ((m_targetContainers.get(container.getName()) != null) && isContainerEditable(m_targetContainers.get(containe...
[ "List", "<", "CmsContainer", ">", "getEditableContainers", "(", ")", "{", "List", "<", "CmsContainer", ">", "containers", "=", "new", "ArrayList", "<", "CmsContainer", ">", "(", ")", ";", "for", "(", "CmsContainer", "container", ":", "m_containers", ".", "va...
Returns the pages of editable containers.<p> @return the containers
[ "Returns", "the", "pages", "of", "editable", "containers", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L3781-L3791
train
Returns the list of editable containers.
Of course, here is the Java code you requested: ```java List<CmsContainer> getEditableContainers() { List<CmsContainer> containers = new ArrayList<CmsContainer>(); for (CmsContainer container : m_containers.values()) { if ((m_targetContainers.get(container.getName()) != null) ...
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/source/ScopeHandler.java
ScopeHandler.visibilityIn
ScopeState visibilityIn(QualifiedName scope, QualifiedName type) { Set<QualifiedName> possibleConflicts = typesInScope(scope).get(type.getSimpleName()); if (possibleConflicts.equals(ImmutableSet.of(type))) { return ScopeState.IN_SCOPE; } else if (!possibleConflicts.isEmpty()) { return ScopeState...
java
ScopeState visibilityIn(QualifiedName scope, QualifiedName type) { Set<QualifiedName> possibleConflicts = typesInScope(scope).get(type.getSimpleName()); if (possibleConflicts.equals(ImmutableSet.of(type))) { return ScopeState.IN_SCOPE; } else if (!possibleConflicts.isEmpty()) { return ScopeState...
[ "ScopeState", "visibilityIn", "(", "QualifiedName", "scope", ",", "QualifiedName", "type", ")", "{", "Set", "<", "QualifiedName", ">", "possibleConflicts", "=", "typesInScope", "(", "scope", ")", ".", "get", "(", "type", ".", "getSimpleName", "(", ")", ")", ...
Returns whether {@code type} is visible in, or can be imported into, the body of {@code type}.
[ "Returns", "whether", "{" ]
d5a222f90648aece135da4b971c55a60afe8649c
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/source/ScopeHandler.java#L77-L88
train
Determine if the type is in the scope.
Of course, here is the Java code you requested: ```java ScopeState visibilityIn(QualifiedName scope, QualifiedName type) { Set<QualifiedName> possibleConflicts = typesInScope(scope).get(type.getSimpleName()); if (possibleConflicts.equals(ImmutableSet.of(type))) { return ScopeState.IN_SCOPE; } else if...
aws/aws-sdk-java
aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/model/RestoreFromClusterSnapshotRequest.java
RestoreFromClusterSnapshotRequest.setIamRoles
public void setIamRoles(java.util.Collection<String> iamRoles) { if (iamRoles == null) { this.iamRoles = null; return; } this.iamRoles = new com.amazonaws.internal.SdkInternalList<String>(iamRoles); }
java
public void setIamRoles(java.util.Collection<String> iamRoles) { if (iamRoles == null) { this.iamRoles = null; return; } this.iamRoles = new com.amazonaws.internal.SdkInternalList<String>(iamRoles); }
[ "public", "void", "setIamRoles", "(", "java", ".", "util", ".", "Collection", "<", "String", ">", "iamRoles", ")", "{", "if", "(", "iamRoles", "==", "null", ")", "{", "this", ".", "iamRoles", "=", "null", ";", "return", ";", "}", "this", ".", "iamRol...
<p> A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 10 IAM roles in a single request. </p> <p> A cluster can have up to 10 IAM roles associated at any tim...
[ "<p", ">", "A", "list", "of", "AWS", "Identity", "and", "Access", "Management", "(", "IAM", ")", "roles", "that", "can", "be", "used", "by", "the", "cluster", "to", "access", "other", "AWS", "services", ".", "You", "must", "supply", "the", "IAM", "role...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/model/RestoreFromClusterSnapshotRequest.java#L2217-L2224
train
Sets the value of the iamRoles property.
Of course, here is the Java code you requested: ```java public void setIamRoles(java.util.Collection<String> iamRoles) { if (iamRoles == null) { this.iamRoles = null; return; } this.iamRoles = new com.amazonaws.internal.SdkInternalList<String>(iamRoles); } ``` Hope...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/ServerCommsDiagnosticModule.java
ServerCommsDiagnosticModule.dumpInboundConversations
private void dumpInboundConversations(final IncidentStream is) { if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dumpInboundConversations", is); final List serverConvs = ServerTransportAcceptListener.getInstance().getActiveConversations(); is.wr...
java
private void dumpInboundConversations(final IncidentStream is) { if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dumpInboundConversations", is); final List serverConvs = ServerTransportAcceptListener.getInstance().getActiveConversations(); is.wr...
[ "private", "void", "dumpInboundConversations", "(", "final", "IncidentStream", "is", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc",...
This method dumps the status of any inbound conversations that are currently active. It does this by asking the accept listeners for their list of active conversations and dumping out the details in their conversation states. @param is the incident stream to log information to.
[ "This", "method", "dumps", "the", "status", "of", "any", "inbound", "conversations", "that", "are", "currently", "active", ".", "It", "does", "this", "by", "asking", "the", "accept", "listeners", "for", "their", "list", "of", "active", "conversations", "and", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/ServerCommsDiagnosticModule.java#L140-L208
train
DUMP INBOUND CONVERSATIONS
Of course, here is the Java code you requested: ```java private void dumpInboundConversations(final IncidentStream is) { if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dumpInboundConversations", is); final List serverConvs = ServerTransportAcceptListener.g...
abmargb/jamppa
src/main/java/org/jivesoftware/smack/debugger/LiteDebugger.java
LiteDebugger.rootWindowClosing
public void rootWindowClosing(WindowEvent evt) { connection.removePacketListener(listener); ((ObservableReader) reader).removeReaderListener(readerListener); ((ObservableWriter) writer).removeWriterListener(writerListener); }
java
public void rootWindowClosing(WindowEvent evt) { connection.removePacketListener(listener); ((ObservableReader) reader).removeReaderListener(readerListener); ((ObservableWriter) writer).removeWriterListener(writerListener); }
[ "public", "void", "rootWindowClosing", "(", "WindowEvent", "evt", ")", "{", "connection", ".", "removePacketListener", "(", "listener", ")", ";", "(", "(", "ObservableReader", ")", "reader", ")", ".", "removeReaderListener", "(", "readerListener", ")", ";", "(",...
Notification that the root window is closing. Stop listening for received and transmitted packets. @param evt the event that indicates that the root window is closing
[ "Notification", "that", "the", "root", "window", "is", "closing", ".", "Stop", "listening", "for", "received", "and", "transmitted", "packets", "." ]
76f253239923df40904c462e3b88e7278b36b282
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/debugger/LiteDebugger.java#L293-L297
test
This method is called when the root window is closed.
Of course, here is the Java code you requested: ```java public void rootWindowClosing(WindowEvent evt) { connection.removePacketListener(listener); ((ObservableReader) reader).removeReaderListener(readerListener); ((ObservableWriter) writer).removeWriterListener(writerListener); } ``` Hope...
jamesagnew/hapi-fhir
hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
RestfulServer.setResourceProviders
public void setResourceProviders(Collection<IResourceProvider> theProviders) { Validate.noNullElements(theProviders, "theProviders must not contain any null elements"); myResourceProviders.clear(); if (theProviders != null) { myResourceProviders.addAll(theProviders); } }
java
public void setResourceProviders(Collection<IResourceProvider> theProviders) { Validate.noNullElements(theProviders, "theProviders must not contain any null elements"); myResourceProviders.clear(); if (theProviders != null) { myResourceProviders.addAll(theProviders); } }
[ "public", "void", "setResourceProviders", "(", "Collection", "<", "IResourceProvider", ">", "theProviders", ")", "{", "Validate", ".", "noNullElements", "(", "theProviders", ",", "\"theProviders must not contain any null elements\"", ")", ";", "myResourceProviders", ".", ...
Sets the resource providers for this server
[ "Sets", "the", "resource", "providers", "for", "this", "server" ]
150a84d52fe691b7f48fcb28247c4bddb7aec352
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java#L707-L714
train
Sets the resource providers
Of course, here is the Java code you requested: ```java public void setResourceProviders(Collection<IResourceProvider> theProviders) { Validate.noNullElements(theProviders, "theProviders must not contain any null elements"); myResourceProviders.clear(); if (theProviders != null) { myResourceProviders.addAll(...
icode/ameba
src/main/java/ameba/websocket/WebSocketAddon.java
WebSocketAddon.setup
@Override public void setup(final Application application) { endpointClasses.clear(); subscribeSystemEvent(ClassFoundEvent.class, event -> event.accept(info -> { if (info.accpet(ctClass -> ctClass.hasAnnotation(WebSocket.class))) { endpointClasses.add(info.toClass()); ...
java
@Override public void setup(final Application application) { endpointClasses.clear(); subscribeSystemEvent(ClassFoundEvent.class, event -> event.accept(info -> { if (info.accpet(ctClass -> ctClass.hasAnnotation(WebSocket.class))) { endpointClasses.add(info.toClass()); ...
[ "@", "Override", "public", "void", "setup", "(", "final", "Application", "application", ")", "{", "endpointClasses", ".", "clear", "(", ")", ";", "subscribeSystemEvent", "(", "ClassFoundEvent", ".", "class", ",", "event", "->", "event", ".", "accept", "(", "...
{@inheritDoc}
[ "{" ]
9d4956e935898e41331b2745e400ef869cd265e0
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/websocket/WebSocketAddon.java#L121-L133
train
Setup the application.
Of course, here is the Java code you requested: ```java @Override public void setup(final Application application) { endpointClasses.clear(); subscribeSystemEvent(ClassFoundEvent.class, event -> event.accept(info -> { if (info.accpet(ctClass -> ctClass.hasAnnotation(WebSocket.class))) {...
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateVpcEndpointServiceConfigurationRequest.java
CreateVpcEndpointServiceConfigurationRequest.withNetworkLoadBalancerArns
public CreateVpcEndpointServiceConfigurationRequest withNetworkLoadBalancerArns(String... networkLoadBalancerArns) { if (this.networkLoadBalancerArns == null) { setNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<String>(networkLoadBalancerArns.length)); } for (Stri...
java
public CreateVpcEndpointServiceConfigurationRequest withNetworkLoadBalancerArns(String... networkLoadBalancerArns) { if (this.networkLoadBalancerArns == null) { setNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<String>(networkLoadBalancerArns.length)); } for (Stri...
[ "public", "CreateVpcEndpointServiceConfigurationRequest", "withNetworkLoadBalancerArns", "(", "String", "...", "networkLoadBalancerArns", ")", "{", "if", "(", "this", ".", "networkLoadBalancerArns", "==", "null", ")", "{", "setNetworkLoadBalancerArns", "(", "new", "com", ...
<p> The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setNetworkLoadBalancerArns(java.util.Collection)} or {@link #withNetworkLoadBalancerArns(java.util.Collection)} if you want to over...
[ "<p", ">", "The", "Amazon", "Resource", "Names", "(", "ARNs", ")", "of", "one", "or", "more", "Network", "Load", "Balancers", "for", "your", "service", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "metho...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateVpcEndpointServiceConfigurationRequest.java#L159-L167
train
Sets the value of the networkLoadBalancerArns property.
Of course, here is the Java code you requested: ```java public CreateVpcEndpointServiceConfigurationRequest withNetworkLoadBalancerArns(String... networkLoadBalancerArns) { if (this.networkLoadBalancerArns == null) { setNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<String>(netw...
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java
SerializationUtils.fromJson
public static <T> T fromJson(JsonNode json, Class<T> clazz, ClassLoader classLoader) { if (json == null) { return null; } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); if (classLoader != null) { Thread.currentThread().setContextClass...
java
public static <T> T fromJson(JsonNode json, Class<T> clazz, ClassLoader classLoader) { if (json == null) { return null; } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); if (classLoader != null) { Thread.currentThread().setContextClass...
[ "public", "static", "<", "T", ">", "T", "fromJson", "(", "JsonNode", "json", ",", "Class", "<", "T", ">", "clazz", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "json", "==", "null", ")", "{", "return", "null", ";", "}", "ClassLoader", "old...
Deserialize a {@link JsonNode}, with custom class loader. @param json @param clazz @return @since 0.6.2
[ "Deserialize", "a", "{", "@link", "JsonNode", "}", "with", "custom", "class", "loader", "." ]
734f0e77321d41eeca78a557be9884df9874e46e
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java#L726-L750
train
Convert a JsonNode to a Class object.
Of course, here is the Java code you requested: ```java public static <T> T fromJson(JsonNode json, Class<T> clazz, ClassLoader classLoader) { if (json == null) { return null; } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); if (classLoader != n...
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/core/fs/Path.java
Path.normalizePath
private String normalizePath(String path) { // remove double slashes & backslashes path = path.replace("//", "/"); path = path.replace("\\", "/"); return path; }
java
private String normalizePath(String path) { // remove double slashes & backslashes path = path.replace("//", "/"); path = path.replace("\\", "/"); return path; }
[ "private", "String", "normalizePath", "(", "String", "path", ")", "{", "// remove double slashes & backslashes", "path", "=", "path", ".", "replace", "(", "\"//\"", ",", "\"/\"", ")", ";", "path", "=", "path", ".", "replace", "(", "\"\\\\\"", ",", "\"/\"", "...
Normalizes a path string. @param path the path string to normalize @return the normalized path string
[ "Normalizes", "a", "path", "string", "." ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/core/fs/Path.java#L247-L253
train
Normalize the path.
Of course, here is the Java code you requested: ```java private String normalizePath(String path) { // remove double slashes & backslashes path = path.replace("//", "/"); path = path.replace("\\", "/"); return path; } ``` Hope this helps!
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1FactoryImpl.java
Ifc2x3tc1FactoryImpl.convertIfcEvaporativeCoolerTypeEnumToString
public String convertIfcEvaporativeCoolerTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
java
public String convertIfcEvaporativeCoolerTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
[ "public", "String", "convertIfcEvaporativeCoolerTypeEnumToString", "(", "EDataType", "eDataType", ",", "Object", "instanceValue", ")", "{", "return", "instanceValue", "==", "null", "?", "null", ":", "instanceValue", ".", "toString", "(", ")", ";", "}" ]
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1FactoryImpl.java#L11501-L11503
train
This method is called to convert a convertIfcEvaporativeCoolerTypeEnum to a String.
Of course, here is the Java code you requested: ```java public String convertIfcEvaporativeCoolerTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } ``` Hope this helps!
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java
AcceleratorTypeClient.aggregatedListAcceleratorTypes
@BetaApi public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAcceleratorTypes( ProjectName project) { AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) ...
java
@BetaApi public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAcceleratorTypes( ProjectName project) { AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) ...
[ "@", "BetaApi", "public", "final", "AggregatedListAcceleratorTypesPagedResponse", "aggregatedListAcceleratorTypes", "(", "ProjectName", "project", ")", "{", "AggregatedListAcceleratorTypesHttpRequest", "request", "=", "AggregatedListAcceleratorTypesHttpRequest", ".", "newBuilder", ...
Retrieves an aggregated list of accelerator types. <p>Sample code: <pre><code> try (AcceleratorTypeClient acceleratorTypeClient = AcceleratorTypeClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); for (AcceleratorTypesScopedList element : acceleratorTypeClient.aggregatedListAcceleratorTypes(project)...
[ "Retrieves", "an", "aggregated", "list", "of", "accelerator", "types", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeClient.java#L175-L183
train
Gets the Aggregated ListAcceleratorTypes resource.
Of course, here is the Java code you requested: ```java @BetaApi public final AggregatedListAcceleratorTypesPagedResponse aggregatedListAcceleratorTypes( ProjectName project) { AggregatedListAcceleratorTypesHttpRequest request = AggregatedListAcceleratorTypesHttpRequest.newBuilder() .se...
cerner/beadledom
jaxrs-genericresponse/src/main/java/com/cerner/beadledom/jaxrs/GenericResponses.java
GenericResponses.ok
public static <T> GenericResponseBuilder<T> ok(T entity) { return genericResponseBuilderFactory.create(Response.Status.OK.getStatusCode(), entity); }
java
public static <T> GenericResponseBuilder<T> ok(T entity) { return genericResponseBuilderFactory.create(Response.Status.OK.getStatusCode(), entity); }
[ "public", "static", "<", "T", ">", "GenericResponseBuilder", "<", "T", ">", "ok", "(", "T", "entity", ")", "{", "return", "genericResponseBuilderFactory", ".", "create", "(", "Response", ".", "Status", ".", "OK", ".", "getStatusCode", "(", ")", ",", "entit...
Create a new {@link GenericResponseBuilder} with an OK status and the given entity body. @param entity the response entity @return a new builder
[ "Create", "a", "new", "{", "@link", "GenericResponseBuilder", "}", "with", "an", "OK", "status", "and", "the", "given", "entity", "body", "." ]
75435bced5187d5455b46518fadf85c93cf32014
https://github.com/cerner/beadledom/blob/75435bced5187d5455b46518fadf85c93cf32014/jaxrs-genericresponse/src/main/java/com/cerner/beadledom/jaxrs/GenericResponses.java#L108-L110
train
Create a new GenericResponseBuilder with a 200 status code and entity.
Of course, here is the Java code you requested: ```java public static <T> GenericResponseBuilder<T> ok(T entity) { return genericResponseBuilderFactory.create(Response.Status.OK.getStatusCode(), entity); } ``` Hope this helps!
softindex/datakernel
boot/src/main/java/io/datakernel/config/EffectiveConfig.java
EffectiveConfig.saveEffectiveConfigTo
public void saveEffectiveConfigTo(Path outputPath) { try { String renderedConfig = renderEffectiveConfig(); Files.write(outputPath, renderedConfig.getBytes(UTF_8), new StandardOpenOption[]{CREATE, WRITE, TRUNCATE_EXISTING}); } catch (IOException e) { throw new RuntimeException("Failed to serialize effectiv...
java
public void saveEffectiveConfigTo(Path outputPath) { try { String renderedConfig = renderEffectiveConfig(); Files.write(outputPath, renderedConfig.getBytes(UTF_8), new StandardOpenOption[]{CREATE, WRITE, TRUNCATE_EXISTING}); } catch (IOException e) { throw new RuntimeException("Failed to serialize effectiv...
[ "public", "void", "saveEffectiveConfigTo", "(", "Path", "outputPath", ")", "{", "try", "{", "String", "renderedConfig", "=", "renderEffectiveConfig", "(", ")", ";", "Files", ".", "write", "(", "outputPath", ",", "renderedConfig", ".", "getBytes", "(", "UTF_8", ...
rendering
[ "rendering" ]
090ca1116416c14d463d49d275cb1daaafa69c56
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/boot/src/main/java/io/datakernel/config/EffectiveConfig.java#L139-L146
train
Saves the effective config to the given output path.
Of course, here is the Java code you requested: ```java public void saveEffectiveConfigTo(Path outputPath) { try { String renderedConfig = renderEffectiveConfig(); Files.write(outputPath, renderedConfig.getBytes(UTF_8), new StandardOpenOption[]{CREATE, WRITE, TRUNCATE_EXISTING}); } catch (IOException e) { ...
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/wsspi/kernel/embeddable/ServerBuilder.java
ServerBuilder.build
public Server build() throws ServerException { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Server>() { @Override public Server run() { return buildWithPriv(); } }); } catch (Privileg...
java
public Server build() throws ServerException { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Server>() { @Override public Server run() { return buildWithPriv(); } }); } catch (Privileg...
[ "public", "Server", "build", "(", ")", "throws", "ServerException", "{", "try", "{", "return", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedExceptionAction", "<", "Server", ">", "(", ")", "{", "@", "Override", "public", "Server", "run", "(",...
Get a new {@link Server} instance. This will fail if the server does not already exist (<code>${server.config.dir}</code> must exist, and must contain a <code>server.xml</code> file). @return a Server instance using any attributes set on the builder. @throws ServerException if the named server does not exist, or if t...
[ "Get", "a", "new", "{", "@link", "Server", "}", "instance", ".", "This", "will", "fail", "if", "the", "server", "does", "not", "already", "exist", "(", "<code", ">", "$", "{", "server", ".", "config", ".", "dir", "}", "<", "/", "code", ">", "must",...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/wsspi/kernel/embeddable/ServerBuilder.java#L173-L192
train
Build a server with the specified server name.
Of course, here is the Java code you requested: ```java public Server build() throws ServerException { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Server>() { @Override public Server run() { return buildWithPriv(); ...
citygml4j/citygml4j
src-gen/main/java/net/opengis/citygml/_1/AddressType.java
AddressType.get_GenericApplicationPropertyOfAddress
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfAddress() { if (_GenericApplicationPropertyOfAddress == null) { _GenericApplicationPropertyOfAddress = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPropertyOfAddress; }
java
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfAddress() { if (_GenericApplicationPropertyOfAddress == null) { _GenericApplicationPropertyOfAddress = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPropertyOfAddress; }
[ "public", "List", "<", "JAXBElement", "<", "Object", ">", ">", "get_GenericApplicationPropertyOfAddress", "(", ")", "{", "if", "(", "_GenericApplicationPropertyOfAddress", "==", "null", ")", "{", "_GenericApplicationPropertyOfAddress", "=", "new", "ArrayList", "<", "J...
Gets the value of the genericApplicationPropertyOfAddress property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the genericApplicati...
[ "Gets", "the", "value", "of", "the", "genericApplicationPropertyOfAddress", "property", "." ]
9155997d5ecf7e8f19411a02ba047f13375b97b9
https://github.com/citygml4j/citygml4j/blob/9155997d5ecf7e8f19411a02ba047f13375b97b9/src-gen/main/java/net/opengis/citygml/_1/AddressType.java#L143-L148
train
Gets the value of the genericApplicationPropertyOfAddress property.
Of course, here is the Java code you requested: ```java public List<JAXBElement<Object>> get_GenericApplicationPropertyOfAddress() { if (_GenericApplicationPropertyOfAddress == null) { _GenericApplicationPropertyOfAddress = new ArrayList<JAXBElement<Object>>(); } return this._Generi...
OpenLiberty/open-liberty
dev/com.ibm.ws.opentracing/src/com/ibm/ws/opentracing/filters/SpanFilterBase.java
SpanFilterBase.process
@Override public boolean process(final boolean previousState, final URI uri, final SpanFilterType contextType) { if (contextApplies(contextType) && match(uri)) { return matchAction(previousState, uri, contextType); } return previousState; }
java
@Override public boolean process(final boolean previousState, final URI uri, final SpanFilterType contextType) { if (contextApplies(contextType) && match(uri)) { return matchAction(previousState, uri, contextType); } return previousState; }
[ "@", "Override", "public", "boolean", "process", "(", "final", "boolean", "previousState", ",", "final", "URI", "uri", ",", "final", "SpanFilterType", "contextType", ")", "{", "if", "(", "contextApplies", "(", "contextType", ")", "&&", "match", "(", "uri", "...
{@inheritDoc}
[ "{" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.opentracing/src/com/ibm/ws/opentracing/filters/SpanFilterBase.java#L193-L201
train
Process a URI.
Of course, here is the Java code you requested: ```java @Override public boolean process(final boolean previousState, final URI uri, final SpanFilterType contextType) { if (contextApplies(contextType) && match(uri)) { return matchAction(previousState, uri, contextType); } retu...
cologneintelligence/FitGoodies
fitgoodies-core/src/main/java/de/cologneintelligence/fitgoodies/FixtureRunner.java
FixtureRunner.doDocument
public void doDocument(FitDocument document) { summary.put("run date", new Date()); summary.put("run elapsed time", new RunTime()); if (document != null) { interpretTables(document); } }
java
public void doDocument(FitDocument document) { summary.put("run date", new Date()); summary.put("run elapsed time", new RunTime()); if (document != null) { interpretTables(document); } }
[ "public", "void", "doDocument", "(", "FitDocument", "document", ")", "{", "summary", ".", "put", "(", "\"run date\"", ",", "new", "Date", "(", ")", ")", ";", "summary", ".", "put", "(", "\"run elapsed time\"", ",", "new", "RunTime", "(", ")", ")", ";", ...
/* Altered by Rick Mugridge to dispatch on the first Fixture
[ "/", "*", "Altered", "by", "Rick", "Mugridge", "to", "dispatch", "on", "the", "first", "Fixture" ]
834e42d1f41b4b9226060b1e83a80cc69ea88c7b
https://github.com/cologneintelligence/FitGoodies/blob/834e42d1f41b4b9226060b1e83a80cc69ea88c7b/fitgoodies-core/src/main/java/de/cologneintelligence/fitgoodies/FixtureRunner.java#L39-L45
test
This method is called to process a fit document.
Of course, here is the Java code you requested: ```java public void doDocument(FitDocument document) { summary.put("run date", new Date()); summary.put("run elapsed time", new RunTime()); if (document != null) { interpretTables(document); } } ``` Hope this helps!
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/standard/expression/StandardExpressions.java
StandardExpressions.getExpressionParser
public static IStandardExpressionParser getExpressionParser(final IEngineConfiguration configuration) { final Object parser = configuration.getExecutionAttributes().get(STANDARD_EXPRESSION_PARSER_ATTRIBUTE_NAME); if (parser == null || (!(parser instanceof IStandardExpressionParser))) { ...
java
public static IStandardExpressionParser getExpressionParser(final IEngineConfiguration configuration) { final Object parser = configuration.getExecutionAttributes().get(STANDARD_EXPRESSION_PARSER_ATTRIBUTE_NAME); if (parser == null || (!(parser instanceof IStandardExpressionParser))) { ...
[ "public", "static", "IStandardExpressionParser", "getExpressionParser", "(", "final", "IEngineConfiguration", "configuration", ")", "{", "final", "Object", "parser", "=", "configuration", ".", "getExecutionAttributes", "(", ")", ".", "get", "(", "STANDARD_EXPRESSION_PARSE...
<p> Obtain the expression parser (implementation of {@link IStandardExpressionParser}) registered by the Standard Dialect that is being currently used. </p> @param configuration the configuration object for the current template execution environment. @return the parser object.
[ "<p", ">", "Obtain", "the", "expression", "parser", "(", "implementation", "of", "{", "@link", "IStandardExpressionParser", "}", ")", "registered", "by", "the", "Standard", "Dialect", "that", "is", "being", "currently", "used", ".", "<", "/", "p", ">" ]
2b0e6d6d7571fbe638904b5fd222fc9e77188879
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/standard/expression/StandardExpressions.java#L79-L92
train
Gets the Standard Expression Parser.
Of course, here is the Java code you requested: ```java public static IStandardExpressionParser getExpressionParser(final IEngineConfiguration configuration) { final Object parser = configuration.getExecutionAttributes().get(STANDARD_EXPRESSION_PARSER_ATTRIBUTE_NAME); if (parser == null...
wildfly/wildfly
pojo/src/main/java/org/jboss/as/pojo/service/AbstractPojoPhase.java
AbstractPojoPhase.considerUninstalls
protected void considerUninstalls(List<Joinpoint> uninstalls, int index) { if (uninstalls == null) return; for (int j = Math.min(index, uninstalls.size() - 1); j >= 0; j--) { try { uninstalls.get(j).dispatch(); } catch (Throwable t) { ...
java
protected void considerUninstalls(List<Joinpoint> uninstalls, int index) { if (uninstalls == null) return; for (int j = Math.min(index, uninstalls.size() - 1); j >= 0; j--) { try { uninstalls.get(j).dispatch(); } catch (Throwable t) { ...
[ "protected", "void", "considerUninstalls", "(", "List", "<", "Joinpoint", ">", "uninstalls", ",", "int", "index", ")", "{", "if", "(", "uninstalls", "==", "null", ")", "return", ";", "for", "(", "int", "j", "=", "Math", ".", "min", "(", "index", ",", ...
Consider the uninstalls. <p/> This method is here to be able to override the behavior after installs failed. e.g. perhaps only running uninstalls from the index. <p/> By default we run all uninstalls in the case at least one install failed. @param uninstalls the uninstalls @param index current installs index
[ "Consider", "the", "uninstalls", ".", "<p", "/", ">", "This", "method", "is", "here", "to", "be", "able", "to", "override", "the", "behavior", "after", "installs", "failed", ".", "e", ".", "g", ".", "perhaps", "only", "running", "uninstalls", "from", "th...
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/pojo/src/main/java/org/jboss/as/pojo/service/AbstractPojoPhase.java#L223-L234
test
Consider uninstalls.
Of course, here is the Java code you requested: ```java protected void considerUninstalls(List<Joinpoint> uninstalls, int index) { if (uninstalls == null) return; for (int j = Math.min(index, uninstalls.size() - 1); j >= 0; j--) { try { uninstalls.get(j).dispatc...
quattor/pan
panc/src/main/java/org/quattor/pan/CompilerOptions.java
CompilerOptions.resolveFileList
public Set<File> resolveFileList(List<String> objectNames, Collection<File> tplFiles) { // First just copy the named templates. Set<File> filesToProcess = new TreeSet<File>(); if (tplFiles != null) { filesToProcess.addAll(tplFiles); } // Now loop over al...
java
public Set<File> resolveFileList(List<String> objectNames, Collection<File> tplFiles) { // First just copy the named templates. Set<File> filesToProcess = new TreeSet<File>(); if (tplFiles != null) { filesToProcess.addAll(tplFiles); } // Now loop over al...
[ "public", "Set", "<", "File", ">", "resolveFileList", "(", "List", "<", "String", ">", "objectNames", ",", "Collection", "<", "File", ">", "tplFiles", ")", "{", "// First just copy the named templates.", "Set", "<", "File", ">", "filesToProcess", "=", "new", "...
Resolve a list of object template names and template Files to a set of files based on this instance's include directories. @param objectNames object template names to lookup @param tplFiles template Files to process @return unmodifiable set of the resolved file names
[ "Resolve", "a", "list", "of", "object", "template", "names", "and", "template", "Files", "to", "a", "set", "of", "files", "based", "on", "this", "instance", "s", "include", "directories", "." ]
009934a603dd0c08d3fa4bb7d9389c380a916f54
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/pan/CompilerOptions.java#L406-L431
train
Resolve the list of object templates to a set of files to process.
Of course, here is the Java code you requested: ```java public Set<File> resolveFileList(List<String> objectNames, Collection<File> tplFiles) { // First just copy the named templates. Set<File> filesToProcess = new TreeSet<File>(); if (tplFiles != null) { filesToProcess...
nextreports/nextreports-engine
src/ro/nextreports/engine/util/DateUtil.java
DateUtil.getMinute
public static int getMinute(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c.get(Calendar.MINUTE); }
java
public static int getMinute(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c.get(Calendar.MINUTE); }
[ "public", "static", "int", "getMinute", "(", "Date", "date", ")", "{", "Calendar", "c", "=", "Calendar", ".", "getInstance", "(", ")", ";", "c", ".", "setTime", "(", "date", ")", ";", "return", "c", ".", "get", "(", "Calendar", ".", "MINUTE", ")", ...
Get the minute of the date @param date date @return minute of the date
[ "Get", "the", "minute", "of", "the", "date" ]
a847575a9298b5fce63b88961190c5b83ddccc44
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/DateUtil.java#L179-L183
train
Get the minute value of a date.
Of course, here is the Java code you requested: ```java public static int getMinute(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return c.get(Calendar.MINUTE); } ``` Hope this helps!
VoltDB/voltdb
src/frontend/org/voltdb/parser/HSQLLexer.java
HSQLLexer.preprocessHSQLDDL
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
java
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString); ...
[ "public", "static", "HSQLDDLInfo", "preprocessHSQLDDL", "(", "String", "ddl", ")", "{", "ddl", "=", "SQLLexer", ".", "stripComments", "(", "ddl", ")", ";", "Matcher", "matcher", "=", "HSQL_DDL_PREPROCESSOR", ".", "matcher", "(", "ddl", ")", ";", "if", "(", ...
Glean some basic info about DDL statements sent to HSQLDB
[ "Glean", "some", "basic", "info", "about", "DDL", "statements", "sent", "to", "HSQLDB" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/HSQLLexer.java#L61-L108
train
Preprocessing HSQL DDL.
Of course, here is the Java code you requested: ```java public static HSQLDDLInfo preprocessHSQLDDL(String ddl) { ddl = SQLLexer.stripComments(ddl); Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl); if (matcher.find()) { String verbString = matcher.group("verb"); HS...
m-szalik/javamail
javamail-file-transport/src/main/java/org/jsoftware/javamail/AbstractTransport.java
AbstractTransport.extractTextParts
static Map<String,Collection<String>> extractTextParts(Multipart multiPart) throws MessagingException, IOException { HashMap<String,Collection<String>> bodies = new HashMap<>(); for(int i = 0; i < multiPart.getCount(); i++) { checkPartForTextType(bodies, multiPart.getBodyPart(i)); } ...
java
static Map<String,Collection<String>> extractTextParts(Multipart multiPart) throws MessagingException, IOException { HashMap<String,Collection<String>> bodies = new HashMap<>(); for(int i = 0; i < multiPart.getCount(); i++) { checkPartForTextType(bodies, multiPart.getBodyPart(i)); } ...
[ "static", "Map", "<", "String", ",", "Collection", "<", "String", ">", ">", "extractTextParts", "(", "Multipart", "multiPart", ")", "throws", "MessagingException", ",", "IOException", "{", "HashMap", "<", "String", ",", "Collection", "<", "String", ">", ">", ...
Extract parts from Multi-part message. @param multiPart multi-part to visit @return map of part contentType -> part content @throws MessagingException @throws IOException
[ "Extract", "parts", "from", "Multi", "-", "part", "message", "." ]
4ab516d7c89687008b42af9defa8fdaa71a01aa7
https://github.com/m-szalik/javamail/blob/4ab516d7c89687008b42af9defa8fdaa71a01aa7/javamail-file-transport/src/main/java/org/jsoftware/javamail/AbstractTransport.java#L94-L100
train
Extract text parts from a multipart.
Of course, here is the Java code you requested: ```java static Map<String,Collection<String>> extractTextParts(Multipart multiPart) throws MessagingException, IOException { HashMap<String,Collection<String>> bodies = new HashMap<>(); for(int i = 0; i < multiPart.getCount(); i++) { checkPart...
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Stub.java
JIT_Stub.addCommonStubMethods
private static void addCommonStubMethods(ClassWriter cw, String stubClassName) { MethodVisitor mv; // ----------------------------------------------------------------------- // public String[] _ids() // { // return (String[]) _type...
java
private static void addCommonStubMethods(ClassWriter cw, String stubClassName) { MethodVisitor mv; // ----------------------------------------------------------------------- // public String[] _ids() // { // return (String[]) _type...
[ "private", "static", "void", "addCommonStubMethods", "(", "ClassWriter", "cw", ",", "String", "stubClassName", ")", "{", "MethodVisitor", "mv", ";", "// -----------------------------------------------------------------------", "// public String[] _ids()", "// {", "// return (S...
Adds all methods common to all Stub classes. <p> These methods are all defined by the Tie interface, javax.rmi.CORBA.Tie. Methods inherited by Tie (like _invoke from InvokeHandler) are NOT implemented here, but added elsewhere if required. <p> @param cw ASM ClassWriter to add the methods to. @param stubClassName full...
[ "Adds", "all", "methods", "common", "to", "all", "Stub", "classes", ".", "<p", ">" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/JIT_Stub.java#L469-L490
train
Add the common stub methods to the class writer.
Of course, here is the Java code you requested: ```java private static void addCommonStubMethods(ClassWriter cw, String stubClassName) { MethodVisitor mv; // ----------------------------------------------------------------------- // public String[] ...
Atmosphere/atmosphere-samples
vertx-samples/chat/src/main/java/org/atmosphere/vertx/samples/chat/ChatRoom.java
ChatRoom.onReady
@Ready(encoders = {JacksonEncoder.class}) @DeliverTo(DeliverTo.DELIVER_TO.ALL) public ChatProtocol onReady(final AtmosphereResource r) { logger.info("Browser {} connected.", r.uuid()); return new ChatProtocol(users.keySet(), getRooms(factory.lookupAll())); }
java
@Ready(encoders = {JacksonEncoder.class}) @DeliverTo(DeliverTo.DELIVER_TO.ALL) public ChatProtocol onReady(final AtmosphereResource r) { logger.info("Browser {} connected.", r.uuid()); return new ChatProtocol(users.keySet(), getRooms(factory.lookupAll())); }
[ "@", "Ready", "(", "encoders", "=", "{", "JacksonEncoder", ".", "class", "}", ")", "@", "DeliverTo", "(", "DeliverTo", ".", "DELIVER_TO", ".", "ALL", ")", "public", "ChatProtocol", "onReady", "(", "final", "AtmosphereResource", "r", ")", "{", "logger", "."...
Invoked when the connection as been fully established and suspended, e.g ready for receiving messages. @param r
[ "Invoked", "when", "the", "connection", "as", "been", "fully", "established", "and", "suspended", "e", ".", "g", "ready", "for", "receiving", "messages", "." ]
2b33c0c7a73b3f9b4597cb52ce5602834b80af99
https://github.com/Atmosphere/atmosphere-samples/blob/2b33c0c7a73b3f9b4597cb52ce5602834b80af99/vertx-samples/chat/src/main/java/org/atmosphere/vertx/samples/chat/ChatRoom.java#L68-L74
train
Connect to the server.
Of course, here is the Java code you requested: ```java @Ready(encoders = {JacksonEncoder.class}) @DeliverTo(DeliverTo.DELIVER_TO.ALL) public ChatProtocol onReady(final AtmosphereResource r) { logger.info("Browser {} connected.", r.uuid()); return new ChatProtocol(users.keySet(), getRooms(fact...
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/web/LegacyServersInitializerListener.java
LegacyServersInitializerListener.contextDestroyed
public final void contextDestroyed(final ServletContextEvent sce) { // Stop the TciIpServer if (this.tcpIpServer != null) { this.tcpIpServer.stop(); } // Stop the JmxServer if (this.jmxServer != null) { this.jmxServer.stop(); } // Stop the SshServer if (this.sshServer != null) { try { thi...
java
public final void contextDestroyed(final ServletContextEvent sce) { // Stop the TciIpServer if (this.tcpIpServer != null) { this.tcpIpServer.stop(); } // Stop the JmxServer if (this.jmxServer != null) { this.jmxServer.stop(); } // Stop the SshServer if (this.sshServer != null) { try { thi...
[ "public", "final", "void", "contextDestroyed", "(", "final", "ServletContextEvent", "sce", ")", "{", "// Stop the TciIpServer", "if", "(", "this", ".", "tcpIpServer", "!=", "null", ")", "{", "this", ".", "tcpIpServer", ".", "stop", "(", ")", ";", "}", "// St...
/* (non-Javadoc) @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet. ServletContextEvent)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/web/LegacyServersInitializerListener.java#L141-L160
train
Stop the server.
Of course, here is the Java code you requested: ```java public final void contextDestroyed(final ServletContextEvent sce) { // Stop the TciIpServer if (this.tcpIpServer != null) { this.tcpIpServer.stop(); } // Stop the JmxServer if (this.jmxServer != null) { this.jmxServer.stop(); } // Stop the S...
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java
Levenshtein.jaccard
public static <T extends Levenshtein> T jaccard(String baseTarget, String compareTarget) { return jaccard(baseTarget, compareTarget, null); }
java
public static <T extends Levenshtein> T jaccard(String baseTarget, String compareTarget) { return jaccard(baseTarget, compareTarget, null); }
[ "public", "static", "<", "T", "extends", "Levenshtein", ">", "T", "jaccard", "(", "String", "baseTarget", ",", "String", "compareTarget", ")", "{", "return", "jaccard", "(", "baseTarget", ",", "compareTarget", ",", "null", ")", ";", "}" ]
Returns a new Jaccard index instance with compare target string @see Jaccard @param baseTarget @param compareTarget @return
[ "Returns", "a", "new", "Jaccard", "index", "instance", "with", "compare", "target", "string" ]
7585152e10e4cac07b4274c65f1c72ad7061ae69
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java#L258-L260
train
Gets the jaccard distance instance.
Of course, here is the Java code you requested: ```java public static <T extends Levenshtein> T jaccard(String baseTarget, String compareTarget) { return jaccard(baseTarget, compareTarget, null); } ``` Hope this helps!
mapbox/mapbox-java
services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java
TurfMeasurement.bbox
public static double[] bbox(@NonNull Point point) { List<Point> resultCoords = TurfMeta.coordAll(point); return bboxCalculator(resultCoords); }
java
public static double[] bbox(@NonNull Point point) { List<Point> resultCoords = TurfMeta.coordAll(point); return bboxCalculator(resultCoords); }
[ "public", "static", "double", "[", "]", "bbox", "(", "@", "NonNull", "Point", "point", ")", "{", "List", "<", "Point", ">", "resultCoords", "=", "TurfMeta", ".", "coordAll", "(", "point", ")", ";", "return", "bboxCalculator", "(", "resultCoords", ")", ";...
Takes a set of features, calculates the bbox of all input features, and returns a bounding box. @param point a {@link Point} object @return A double array defining the bounding box in this order {@code [minX, minY, maxX, maxY]} @since 2.0.0
[ "Takes", "a", "set", "of", "features", "calculates", "the", "bbox", "of", "all", "input", "features", "and", "returns", "a", "bounding", "box", "." ]
c0be138f462f91441388584c668f3760ba0e18e2
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-turf/src/main/java/com/mapbox/turf/TurfMeasurement.java#L275-L278
train
Calculate the bounding box of a given point.
Of course, here is the Java code you requested: ```java public static double[] bbox(@NonNull Point point) { List<Point> resultCoords = TurfMeta.coordAll(point); return bboxCalculator(resultCoords); } ``` Hope this helps!
andremion/Louvre
louvre/src/main/java/com/andremion/louvre/util/transition/MediaSharedElementCallback.java
MediaSharedElementCallback.removeObsoleteElements
private void removeObsoleteElements(List<String> names, Map<String, View> sharedElements, List<String> elementsToRemove) { if (elementsToRemove.size() > 0) { names.removeAll(elementsToRemove); for (String ele...
java
private void removeObsoleteElements(List<String> names, Map<String, View> sharedElements, List<String> elementsToRemove) { if (elementsToRemove.size() > 0) { names.removeAll(elementsToRemove); for (String ele...
[ "private", "void", "removeObsoleteElements", "(", "List", "<", "String", ">", "names", ",", "Map", "<", "String", ",", "View", ">", "sharedElements", ",", "List", "<", "String", ">", "elementsToRemove", ")", "{", "if", "(", "elementsToRemove", ".", "size", ...
Removes obsolete elements from names and shared elements. @param names Shared element names. @param sharedElements Shared elements. @param elementsToRemove The elements that should be removed.
[ "Removes", "obsolete", "elements", "from", "names", "and", "shared", "elements", "." ]
9aeddc88f2e51b8f0f757c290ff26904ae8d6af2
https://github.com/andremion/Louvre/blob/9aeddc88f2e51b8f0f757c290ff26904ae8d6af2/louvre/src/main/java/com/andremion/louvre/util/transition/MediaSharedElementCallback.java#L89-L98
train
Remove obsolete elements from the list of elements.
Of course, here is the Java code you requested: ```java private void removeObsoleteElements(List<String> names, Map<String, View> sharedElements, List<String> elementsToRemove) { if (elementsToRemove.size() > 0) { names...
alkacon/opencms-core
src/org/opencms/db/CmsPublishList.java
CmsPublishList.checkContainsSubResources
protected CmsResource checkContainsSubResources(CmsObject cms, List<CmsResource> folders) throws CmsException { for (CmsResource folder : folders) { if (!containsSubResources(cms, folder)) { return folder; } } return null; }
java
protected CmsResource checkContainsSubResources(CmsObject cms, List<CmsResource> folders) throws CmsException { for (CmsResource folder : folders) { if (!containsSubResources(cms, folder)) { return folder; } } return null; }
[ "protected", "CmsResource", "checkContainsSubResources", "(", "CmsObject", "cms", ",", "List", "<", "CmsResource", ">", "folders", ")", "throws", "CmsException", "{", "for", "(", "CmsResource", "folder", ":", "folders", ")", "{", "if", "(", "!", "containsSubReso...
Checks whether the publish list contains all sub-resources of a list of folders.<p> @param cms the current CMS context @param folders the folders which should be checked @return a folder from the list if one of its sub-resources is not contained in the publish list, otherwise null @throws CmsException if something go...
[ "Checks", "whether", "the", "publish", "list", "contains", "all", "sub", "-", "resources", "of", "a", "list", "of", "folders", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsPublishList.java#L594-L603
train
Checks if the list of folders contains any sub - resources.
Of course, here is the Java code you requested: ```java protected CmsResource checkContainsSubResources(CmsObject cms, List<CmsResource> folders) throws CmsException { for (CmsResource folder : folders) { if (!containsSubResources(cms, folder)) { return folder; } ...
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java
ThreadDumps.threadDump
@edu.umd.cs.findbugs.annotations.SuppressWarnings( value = {"VA_FORMAT_STRING_USES_NEWLINE"}, justification = "We don't want platform specific" ) public static void threadDump(OutputStream out) throws UnsupportedEncodingException { final PrintWriter writer = new PrintWriter(new O...
java
@edu.umd.cs.findbugs.annotations.SuppressWarnings( value = {"VA_FORMAT_STRING_USES_NEWLINE"}, justification = "We don't want platform specific" ) public static void threadDump(OutputStream out) throws UnsupportedEncodingException { final PrintWriter writer = new PrintWriter(new O...
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressWarnings", "(", "value", "=", "{", "\"VA_FORMAT_STRING_USES_NEWLINE\"", "}", ",", "justification", "=", "\"We don't want platform specific\"", ")", "public", "static", "void", "t...
Dumps all of the threads' current information to an output stream. @param out an output stream. @throws UnsupportedEncodingException if the utf-8 encoding is not supported.
[ "Dumps", "all", "of", "the", "threads", "current", "information", "to", "an", "output", "stream", "." ]
bcbe1dfd5bf48ac89903645cd48ed897c1a04688
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/impl/ThreadDumps.java#L210-L257
train
This method dumps all threads and deadlocks.
Of course, here is the Java code you requested: ```java @edu.umd.cs.findbugs.annotations.SuppressWarnings( value = {"VA_FORMAT_STRING_USES_NEWLINE"}, justification = "We don't want platform specific" ) public static void threadDump(OutputStream out) throws UnsupportedEncodingException {...
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkText
protected void checkText(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { WebElement webElement = null; String value = getTextOrKey(textOrKey); try { webElement = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLo...
java
protected void checkText(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { WebElement webElement = null; String value = getTextOrKey(textOrKey); try { webElement = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLo...
[ "protected", "void", "checkText", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "WebElement", "webElement", "=", "null", ";", "String", "value", "=", "getTextOrKey", "(", "textOrKey"...
Checks if HTML text contains expected value. @param pageElement Is target element @param textOrKey Is the new data (text or text in context (after a save)) @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Me...
[ "Checks", "if", "HTML", "text", "contains", "expected", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L371-L386
train
Check if text is correct.
Of course, here is the Java code you requested: ```java protected void checkText(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { WebElement webElement = null; String value = getTextOrKey(textOrKey); try { webElement = Context.waitUntil(Ex...
alkacon/opencms-core
src/org/opencms/file/CmsLinkRewriter.java
CmsLinkRewriter.isFolder
protected static boolean isFolder(CmsResource resource) throws CmsLoaderException { I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(resource.getTypeId()); return resourceType.isFolder(); }
java
protected static boolean isFolder(CmsResource resource) throws CmsLoaderException { I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(resource.getTypeId()); return resourceType.isFolder(); }
[ "protected", "static", "boolean", "isFolder", "(", "CmsResource", "resource", ")", "throws", "CmsLoaderException", "{", "I_CmsResourceType", "resourceType", "=", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceType", "(", "resource", ".", "getTypeId",...
Helper method to check whether a given resource is a folder.<p> @param resource the resouce to check @return true if the resource is a folder @throws CmsLoaderException if the resource type couldn't be found
[ "Helper", "method", "to", "check", "whether", "a", "given", "resource", "is", "a", "folder", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsLinkRewriter.java#L183-L187
train
Checks if the given resource is a folder.
Of course, here is the Java code you requested: ```java protected static boolean isFolder(CmsResource resource) throws CmsLoaderException { I_CmsResourceType resourceType = OpenCms.getResourceManager().getResourceType(resource.getTypeId()); return resourceType.isFolder(); } ``` Hope this helps!
cdk/cdk
legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java
LogicalOperatorAtom.and
public static SMARTSAtom and(IQueryAtom left, IQueryAtom right) { return new Conjunction(left.getBuilder(), left, right); }
java
public static SMARTSAtom and(IQueryAtom left, IQueryAtom right) { return new Conjunction(left.getBuilder(), left, right); }
[ "public", "static", "SMARTSAtom", "and", "(", "IQueryAtom", "left", ",", "IQueryAtom", "right", ")", "{", "return", "new", "Conjunction", "(", "left", ".", "getBuilder", "(", ")", ",", "left", ",", "right", ")", ";", "}" ]
Conjunction the provided expressions. @param left expression @param right expression @return conjunction of the left and right expressions
[ "Conjunction", "the", "provided", "expressions", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java#L151-L153
train
Returns the logical AND of two SMARTS atoms.
Of course, here is the Java code you requested: ```java public static SMARTSAtom and(IQueryAtom left, IQueryAtom right) { return new Conjunction(left.getBuilder(), left, right); } ``` Hope this helps!
cdk/cdk
base/datadebug/src/main/java/org/openscience/cdk/debug/DebugBond.java
DebugBond.setStereo
@Override public void setStereo(IBond.Stereo stereo) { logger.debug("Setting stereo: ", stereo); super.setStereo(stereo); }
java
@Override public void setStereo(IBond.Stereo stereo) { logger.debug("Setting stereo: ", stereo); super.setStereo(stereo); }
[ "@", "Override", "public", "void", "setStereo", "(", "IBond", ".", "Stereo", "stereo", ")", "{", "logger", ".", "debug", "(", "\"Setting stereo: \"", ",", "stereo", ")", ";", "super", ".", "setStereo", "(", "stereo", ")", ";", "}" ]
{@inheritDoc}
[ "{" ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/datadebug/src/main/java/org/openscience/cdk/debug/DebugBond.java#L304-L308
train
Set the Stereo attribute of the CRA.
Of course, here is the Java code you requested: ```java @Override public void setStereo(IBond.Stereo stereo) { logger.debug("Setting stereo: ", stereo); super.setStereo(stereo); } ``` Hope this helps!
facebookarchive/hadoop-20
src/core/org/apache/hadoop/ipc/ProtocolSignature.java
ProtocolSignature.getFingerprints
private static int[] getFingerprints(Method[] methods) { if (methods == null) { return null; } int[] hashCodes = new int[methods.length]; for (int i = 0; i<methods.length; i++) { hashCodes[i] = getFingerprint(methods[i]); } return hashCodes; }
java
private static int[] getFingerprints(Method[] methods) { if (methods == null) { return null; } int[] hashCodes = new int[methods.length]; for (int i = 0; i<methods.length; i++) { hashCodes[i] = getFingerprint(methods[i]); } return hashCodes; }
[ "private", "static", "int", "[", "]", "getFingerprints", "(", "Method", "[", "]", "methods", ")", "{", "if", "(", "methods", "==", "null", ")", "{", "return", "null", ";", "}", "int", "[", "]", "hashCodes", "=", "new", "int", "[", "methods", ".", "...
Convert an array of Method into an array of hash codes @param methods @return array of hash codes
[ "Convert", "an", "array", "of", "Method", "into", "an", "array", "of", "hash", "codes" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/ipc/ProtocolSignature.java#L118-L127
train
Get the list of hash codes for the given methods.
Of course, here is the Java code you requested: ```java private static int[] getFingerprints(Method[] methods) { if (methods == null) { return null; } int[] hashCodes = new int[methods.length]; for (int i = 0; i<methods.length; i++) { hashCodes[i] = getFingerprint(methods[i]); } ret...
Commonjava/webdav-handler
common/src/main/java/net/sf/webdav/methods/DoLock.java
DoLock.getTimeout
private int getTimeout( final ITransaction transaction, final WebdavRequest req ) { int lockDuration = DEFAULT_TIMEOUT; String lockDurationStr = req.getHeader( "Timeout" ); if ( lockDurationStr == null ) { lockDuration = DEFAULT_TIMEOUT; } else {...
java
private int getTimeout( final ITransaction transaction, final WebdavRequest req ) { int lockDuration = DEFAULT_TIMEOUT; String lockDurationStr = req.getHeader( "Timeout" ); if ( lockDurationStr == null ) { lockDuration = DEFAULT_TIMEOUT; } else {...
[ "private", "int", "getTimeout", "(", "final", "ITransaction", "transaction", ",", "final", "WebdavRequest", "req", ")", "{", "int", "lockDuration", "=", "DEFAULT_TIMEOUT", ";", "String", "lockDurationStr", "=", "req", ".", "getHeader", "(", "\"Timeout\"", ")", "...
Ties to read the timeout from request
[ "Ties", "to", "read", "the", "timeout", "from", "request" ]
39bb7032fc75c1b67d3f2440dd1c234ead96cb9d
https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/methods/DoLock.java#L551-L601
train
Gets the timeout value.
Of course, here is the Java code you requested: ```java private int getTimeout( final ITransaction transaction, final WebdavRequest req ) { int lockDuration = DEFAULT_TIMEOUT; String lockDurationStr = req.getHeader( "Timeout" ); if ( lockDurationStr == null ) { lockDur...
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java
CommerceNotificationAttachmentPersistenceImpl.countByUUID_G
@Override public int countByUUID_G(String uuid, long groupId) { FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; Object[] finderArgs = new Object[] { uuid, groupId }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3...
java
@Override public int countByUUID_G(String uuid, long groupId) { FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; Object[] finderArgs = new Object[] { uuid, groupId }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3...
[ "@", "Override", "public", "int", "countByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_UUID_G", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "uuid", ",...
Returns the number of commerce notification attachments where uuid = &#63; and groupId = &#63;. @param uuid the uuid @param groupId the group ID @return the number of matching commerce notification attachments
[ "Returns", "the", "number", "of", "commerce", "notification", "attachments", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java#L845-L906
train
Returns the number of items matching the UUID and groupId.
Of course, here is the Java code you requested: ```java @Override public int countByUUID_G(String uuid, long groupId) { FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; Object[] finderArgs = new Object[] { uuid, groupId }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (coun...
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/predefined/PageInBrowserStats.java
PageInBrowserStats.getWindowMaxLoadTime
public long getWindowMaxLoadTime(final String intervalName, final TimeUnit unit) { final long max = windowMaxLoadTime.getValueAsLong(intervalName); return max == Constants.MAX_TIME_DEFAULT ? max : unit.transformMillis(max); }
java
public long getWindowMaxLoadTime(final String intervalName, final TimeUnit unit) { final long max = windowMaxLoadTime.getValueAsLong(intervalName); return max == Constants.MAX_TIME_DEFAULT ? max : unit.transformMillis(max); }
[ "public", "long", "getWindowMaxLoadTime", "(", "final", "String", "intervalName", ",", "final", "TimeUnit", "unit", ")", "{", "final", "long", "max", "=", "windowMaxLoadTime", ".", "getValueAsLong", "(", "intervalName", ")", ";", "return", "max", "==", "Constant...
Returns web page maximum load time for given interval and {@link TimeUnit}. @param intervalName name of the interval @param unit {@link TimeUnit} @return web page maximum load time
[ "Returns", "web", "page", "maximum", "load", "time", "for", "given", "interval", "and", "{", "@link", "TimeUnit", "}", "." ]
0fdb79053b98a6ece610fa159f59bc3331e4cf05
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/PageInBrowserStats.java#L187-L190
train
Gets the window max load time.
Of course, here is the Java code you requested: ```java public long getWindowMaxLoadTime(final String intervalName, final TimeUnit unit) { final long max = windowMaxLoadTime.getValueAsLong(intervalName); return max == Constants.MAX_TIME_DEFAULT ? max : unit.transformMillis(max); } ``` Hope this helps!
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201811/UserTeamAssociationServiceLocator.java
UserTeamAssociationServiceLocator.getPort
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.google.api.ads.admanager.axis.v201811.UserTeamAssociationServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) { com.google.api.ads.admanager.axis.v201811...
java
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.google.api.ads.admanager.axis.v201811.UserTeamAssociationServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) { com.google.api.ads.admanager.axis.v201811...
[ "public", "java", ".", "rmi", ".", "Remote", "getPort", "(", "Class", "serviceEndpointInterface", ")", "throws", "javax", ".", "xml", ".", "rpc", ".", "ServiceException", "{", "try", "{", "if", "(", "com", ".", "google", ".", "api", ".", "ads", ".", "a...
For the given interface, get the stub implementation. If this service has no port for the given interface, then ServiceException is thrown.
[ "For", "the", "given", "interface", "get", "the", "stub", "implementation", ".", "If", "this", "service", "has", "no", "port", "for", "the", "given", "interface", "then", "ServiceException", "is", "thrown", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201811/UserTeamAssociationServiceLocator.java#L87-L99
train
Gets the remote port for the given interface.
Of course, here is the Java code you requested: ```java public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.google.api.ads.admanager.axis.v201811.UserTeamAssociationServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) { ...
markhobson/microbrowser
tck/src/main/java/org/hobsoft/microbrowser/tck/MicrodataPropertyTck.java
MicrodataPropertyTck.getDoubleValueReturnsDouble
@Test public void getDoubleValueReturnsDouble() { server().enqueue(new MockResponse().setBody("<html><body>" + "<div itemscope='itemscope' itemtype='http://i'>" + "<p itemprop='p'>1</p>" + "</div>" + "</body></html>")); double actual = newBrowser().get(url(server())) .getItem("http://i") .get...
java
@Test public void getDoubleValueReturnsDouble() { server().enqueue(new MockResponse().setBody("<html><body>" + "<div itemscope='itemscope' itemtype='http://i'>" + "<p itemprop='p'>1</p>" + "</div>" + "</body></html>")); double actual = newBrowser().get(url(server())) .getItem("http://i") .get...
[ "@", "Test", "public", "void", "getDoubleValueReturnsDouble", "(", ")", "{", "server", "(", ")", ".", "enqueue", "(", "new", "MockResponse", "(", ")", ".", "setBody", "(", "\"<html><body>\"", "+", "\"<div itemscope='itemscope' itemtype='http://i'>\"", "+", "\"<p ite...
----------------------------------------------------------------------------------------------------------------
[ "----------------------------------------------------------------------------------------------------------------" ]
732d2dadc1c3eaad688de31dc09f360df580faf1
https://github.com/markhobson/microbrowser/blob/732d2dadc1c3eaad688de31dc09f360df580faf1/tck/src/main/java/org/hobsoft/microbrowser/tck/MicrodataPropertyTck.java#L1041-L1056
test
Gets a double value.
Of course, here is the Java code you requested: ```java @Test public void getDoubleValueReturnsDouble() { server().enqueue(new MockResponse().setBody("<html><body>" + "<div itemscope='itemscope' itemtype='http://i'>" + "<p itemprop='p'>1</p>" + "</div>" + "</body></html>")); double actual = newBro...
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/CFFFont.java
UInt32Item.emit
public void emit(byte[] buffer) { buffer[myOffset+0] = (byte) ((value >>> 24) & 0xff); buffer[myOffset+1] = (byte) ((value >>> 16) & 0xff); buffer[myOffset+2] = (byte) ((value >>> 8) & 0xff); buffer[myOffset+3] = (byte) ((value >>> 0) & 0xff); }
java
public void emit(byte[] buffer) { buffer[myOffset+0] = (byte) ((value >>> 24) & 0xff); buffer[myOffset+1] = (byte) ((value >>> 16) & 0xff); buffer[myOffset+2] = (byte) ((value >>> 8) & 0xff); buffer[myOffset+3] = (byte) ((value >>> 0) & 0xff); }
[ "public", "void", "emit", "(", "byte", "[", "]", "buffer", ")", "{", "buffer", "[", "myOffset", "+", "0", "]", "=", "(", "byte", ")", "(", "(", "value", ">>>", "24", ")", "&", "0xff", ")", ";", "buffer", "[", "myOffset", "+", "1", "]", "=", "...
this is incomplete!
[ "this", "is", "incomplete!" ]
438fc1899367fd13dfdfa8dfdca9a3c1a7783b84
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/CFFFont.java#L562-L567
train
Emits the contents of the value into the byte array buffer.
Of course, here is the Java code you requested: ```java public void emit(byte[] buffer) { buffer[myOffset+0] = (byte) ((value >>> 24) & 0xff); buffer[myOffset+1] = (byte) ((value >>> 16) & 0xff); buffer[myOffset+2] = (byte) ((value >>> 8) & 0xff); buffer[myOffset+3] = (byte) (...
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/ServerRequestRegisterView.java
ServerRequestRegisterView.createContentViewJson
private JSONObject createContentViewJson(BranchUniversalObject universalObject) throws JSONException { JSONObject contentObject = new JSONObject(); String sessionID = prefHelper_.getSessionID(); contentObject.put(Defines.Jsonkey.SessionID.getKey(), sessionID); contentObject.put(Defines...
java
private JSONObject createContentViewJson(BranchUniversalObject universalObject) throws JSONException { JSONObject contentObject = new JSONObject(); String sessionID = prefHelper_.getSessionID(); contentObject.put(Defines.Jsonkey.SessionID.getKey(), sessionID); contentObject.put(Defines...
[ "private", "JSONObject", "createContentViewJson", "(", "BranchUniversalObject", "universalObject", ")", "throws", "JSONException", "{", "JSONObject", "contentObject", "=", "new", "JSONObject", "(", ")", ";", "String", "sessionID", "=", "prefHelper_", ".", "getSessionID"...
Creates a Json with given parameters for register view. @param universalObject An instance of {@link BranchUniversalObject} to create the Json @return A {@link JSONObject} for post data for register view request @throws JSONException {@link JSONException} on any Json errors
[ "Creates", "a", "Json", "with", "given", "parameters", "for", "register", "view", "." ]
e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/ServerRequestRegisterView.java#L82-L148
train
Create content view json.
Of course, here is the Java code you requested: ```java private JSONObject createContentViewJson(BranchUniversalObject universalObject) throws JSONException { JSONObject contentObject = new JSONObject(); String sessionID = prefHelper_.getSessionID(); contentObject.put(Defines.Jsonkey.SessionI...
aws/aws-sdk-java
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/transform/StopNotebookInstanceRequestMarshaller.java
StopNotebookInstanceRequestMarshaller.marshall
public void marshall(StopNotebookInstanceRequest stopNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (stopNotebookInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshal...
java
public void marshall(StopNotebookInstanceRequest stopNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (stopNotebookInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshal...
[ "public", "void", "marshall", "(", "StopNotebookInstanceRequest", "stopNotebookInstanceRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "stopNotebookInstanceRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Inva...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/transform/StopNotebookInstanceRequestMarshaller.java#L42-L53
train
marshalls the given StopNotebookInstanceRequest to the JSON - compatible parameter object.
Of course, here is the Java code you requested: ```java public void marshall(StopNotebookInstanceRequest stopNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (stopNotebookInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); ...
oxo42/stateless4j
src/main/java/com/github/oxo42/stateless4j/StateMachine.java
StateMachine.fire
public <TArg0, TArg1, TArg2> void fire(TriggerWithParameters3<TArg0, TArg1, TArg2, T> trigger, TArg0 arg0, TArg1 arg1, TArg2 arg2) { assert trigger != null : TRIGGER_IS_NULL; publicFire(trigger.getTrigger(), arg0, arg1, arg2); }
java
public <TArg0, TArg1, TArg2> void fire(TriggerWithParameters3<TArg0, TArg1, TArg2, T> trigger, TArg0 arg0, TArg1 arg1, TArg2 arg2) { assert trigger != null : TRIGGER_IS_NULL; publicFire(trigger.getTrigger(), arg0, arg1, arg2); }
[ "public", "<", "TArg0", ",", "TArg1", ",", "TArg2", ">", "void", "fire", "(", "TriggerWithParameters3", "<", "TArg0", ",", "TArg1", ",", "TArg2", ",", "T", ">", "trigger", ",", "TArg0", "arg0", ",", "TArg1", "arg1", ",", "TArg2", "arg2", ")", "{", "a...
Transition from the current state via the specified trigger. The target state is determined by the configuration of the current state. Actions associated with leaving the current state and entering the new one will be invoked. @param trigger The trigger to fire @param arg0 The first argument @param arg1 The seco...
[ "Transition", "from", "the", "current", "state", "via", "the", "specified", "trigger", ".", "The", "target", "state", "is", "determined", "by", "the", "configuration", "of", "the", "current", "state", ".", "Actions", "associated", "with", "leaving", "the", "cu...
3dd512049f7920f492838f1e09fb7c5abfc6bbcf
https://github.com/oxo42/stateless4j/blob/3dd512049f7920f492838f1e09fb7c5abfc6bbcf/src/main/java/com/github/oxo42/stateless4j/StateMachine.java#L202-L205
valid
Fire an event.
Of course, here is the Java code you requested: ```java public <TArg0, TArg1, TArg2> void fire(TriggerWithParameters3<TArg0, TArg1, TArg2, T> trigger, TArg0 arg0, TArg1 arg1, TArg2 arg2) { assert trigger != null : TRIGGER_IS_NULL; publicFire(trigger.getTrigger(), arg0, arg1, arg2); } ``` Hope this...
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java
OObjectDatabaseTx.newInstance
public <RET extends Object> RET newInstance(final String iClassName, final Object iEnclosingClass, Object... iArgs) { checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_CREATE, iClassName); try { RET enhanced = (RET) OObjectEntityEnhancer.getInstance().getProxiedInstance(entityManager.getEntit...
java
public <RET extends Object> RET newInstance(final String iClassName, final Object iEnclosingClass, Object... iArgs) { checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_CREATE, iClassName); try { RET enhanced = (RET) OObjectEntityEnhancer.getInstance().getProxiedInstance(entityManager.getEntit...
[ "public", "<", "RET", "extends", "Object", ">", "RET", "newInstance", "(", "final", "String", "iClassName", ",", "final", "Object", "iEnclosingClass", ",", "Object", "...", "iArgs", ")", "{", "checkSecurity", "(", "ODatabaseSecurityResources", ".", "CLASS", ",",...
Create a new POJO by its class name. Assure to have called the registerEntityClasses() declaring the packages that are part of entity classes. @see OEntityManager.registerEntityClasses(String)
[ "Create", "a", "new", "POJO", "by", "its", "class", "name", ".", "Assure", "to", "have", "called", "the", "registerEntityClasses", "()", "declaring", "the", "packages", "that", "are", "part", "of", "entity", "classes", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java#L110-L121
train
Creates an instance of the class with the specified name and an optional constructor.
Of course, here is the Java code you requested: ```java public <RET extends Object> RET newInstance(final String iClassName, final Object iEnclosingClass, Object... iArgs) { checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_CREATE, iClassName); try { RET enhanced = (RET) OObjectEntityEnhance...
domgold/asciidoctor-gherkin-extension
src/main/java/com/github/domgold/doctools/asciidoctor/gherkin/GherkinExtensionRegistry.java
GherkinExtensionRegistry.register
@Override public void register(Asciidoctor asciidoctor) { RubyExtensionRegistry rubyExtensionRegistry = asciidoctor .rubyExtensionRegistry(); rubyExtensionRegistry .loadClass( this.getClass() .getResourceAsStream( "gherkinblockmacro.rb")) .blockMacro("gherkin", "GherkinBlockMacr...
java
@Override public void register(Asciidoctor asciidoctor) { RubyExtensionRegistry rubyExtensionRegistry = asciidoctor .rubyExtensionRegistry(); rubyExtensionRegistry .loadClass( this.getClass() .getResourceAsStream( "gherkinblockmacro.rb")) .blockMacro("gherkin", "GherkinBlockMacr...
[ "@", "Override", "public", "void", "register", "(", "Asciidoctor", "asciidoctor", ")", "{", "RubyExtensionRegistry", "rubyExtensionRegistry", "=", "asciidoctor", ".", "rubyExtensionRegistry", "(", ")", ";", "rubyExtensionRegistry", ".", "loadClass", "(", "this", ".", ...
/* (non-Javadoc) @see org.asciidoctor.extension.spi.ExtensionRegistry#register(org.asciidoctor .Asciidoctor)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
8f5bd70c4a2286940cd133835f5c04f1ffe45892
https://github.com/domgold/asciidoctor-gherkin-extension/blob/8f5bd70c4a2286940cd133835f5c04f1ffe45892/src/main/java/com/github/domgold/doctools/asciidoctor/gherkin/GherkinExtensionRegistry.java#L31-L41
train
Register the CRASH KNOWN block macros.
Of course, here is the Java code you requested: ```java @Override public void register(Asciidoctor asciidoctor) { RubyExtensionRegistry rubyExtensionRegistry = asciidoctor .rubyExtensionRegistry(); rubyExtensionRegistry .loadClass( this.getClass() .getResourceAsStream( "gherkinbloc...
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.addMultiValueForKey
@SuppressWarnings({"unused", "WeakerAccess"}) public void addMultiValueForKey(String key, String value) { //noinspection ConstantConditions if (value == null || value.isEmpty()) { _generateEmptyMultiValueError(key); return; } addMultiValuesForKey(key, new Ar...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public void addMultiValueForKey(String key, String value) { //noinspection ConstantConditions if (value == null || value.isEmpty()) { _generateEmptyMultiValueError(key); return; } addMultiValuesForKey(key, new Ar...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "void", "addMultiValueForKey", "(", "String", "key", ",", "String", "value", ")", "{", "//noinspection ConstantConditions", "if", "(", "value", "==", "null", "||", "val...
Add a unique value to a multi-value user profile property If the property does not exist it will be created <p/> Max 100 values, on reaching 100 cap, oldest value(s) will be removed. Values must be Strings and are limited to 512 characters. <p/> If the key currently contains a scalar value, the key will be promoted to ...
[ "Add", "a", "unique", "value", "to", "a", "multi", "-", "value", "user", "profile", "property", "If", "the", "property", "does", "not", "exist", "it", "will", "be", "created", "<p", "/", ">", "Max", "100", "values", "on", "reaching", "100", "cap", "old...
be134c06a4f07494c398335ad9ff4976633743e1
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L3394-L3404
train
Add a multi - value pair for a key.
Of course, here is the Java code you requested: ```java @SuppressWarnings({"unused", "WeakerAccess"}) public void addMultiValueForKey(String key, String value) { //noinspection ConstantConditions if (value == null || value.isEmpty()) { _generateEmptyMultiValueError(key); re...
michael-rapp/AndroidMaterialPreferences
library/src/main/java/de/mrapp/android/preference/DialogPreference.java
DialogPreference.setDialogHeaderIconTintMode
public final void setDialogHeaderIconTintMode(@NonNull final PorterDuff.Mode mode) { Condition.INSTANCE.ensureNotNull(mode, "The dialog icon tint mode may not be null"); this.dialogHeaderIconTintMode = mode; }
java
public final void setDialogHeaderIconTintMode(@NonNull final PorterDuff.Mode mode) { Condition.INSTANCE.ensureNotNull(mode, "The dialog icon tint mode may not be null"); this.dialogHeaderIconTintMode = mode; }
[ "public", "final", "void", "setDialogHeaderIconTintMode", "(", "@", "NonNull", "final", "PorterDuff", ".", "Mode", "mode", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureNotNull", "(", "mode", ",", "\"The dialog icon tint mode may not be null\"", ")", ";", "thi...
Sets the mode, which should be used to tint the icon of the header of the preference's dialog. @param mode The mode, which should be set, as a value of the enum {@link PorterDuff.Mode}. The mode may not be null
[ "Sets", "the", "mode", "which", "should", "be", "used", "to", "tint", "the", "icon", "of", "the", "header", "of", "the", "preference", "s", "dialog", "." ]
73a7e449458313bd041fc8d6038e290506b68eb1
https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/library/src/main/java/de/mrapp/android/preference/DialogPreference.java#L2383-L2386
train
Sets the mode which should be used to tint the header icon of the application.
Of course, here is the Java code you requested: ```java public final void setDialogHeaderIconTintMode(@NonNull final PorterDuff.Mode mode) { Condition.INSTANCE.ensureNotNull(mode, "The dialog icon tint mode may not be null"); this.dialogHeaderIconTintMode = mode; } ``` Hope this helps!
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/DataTable.java
DataTable.getHeadings
public String getHeadings(int i) { if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_headings == null) jcasType.jcas.throwFeatMissing("headings", "ch.epfl.bbp.uima.types.DataTable"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DataTable_Type)jcasType).casFeatCode...
java
public String getHeadings(int i) { if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_headings == null) jcasType.jcas.throwFeatMissing("headings", "ch.epfl.bbp.uima.types.DataTable"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DataTable_Type)jcasType).casFeatCode...
[ "public", "String", "getHeadings", "(", "int", "i", ")", "{", "if", "(", "DataTable_Type", ".", "featOkTst", "&&", "(", "(", "DataTable_Type", ")", "jcasType", ")", ".", "casFeat_headings", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing",...
indexed getter for headings - gets an indexed value - @generated @param i index in the array to get @return value of the element at index i
[ "indexed", "getter", "for", "headings", "-", "gets", "an", "indexed", "value", "-" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/DataTable.java#L194-L198
train
indexed getter for headings - gets an indexed value -
Of course, here is the Java code you requested: ```java public String getHeadings(int i) { if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_headings == null) jcasType.jcas.throwFeatMissing("headings", "ch.epfl.bbp.uima.types.DataTable"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/OrderingContextProxy.java
OrderingContextProxy.decrementUseCount
public synchronized void decrementUseCount() throws SIConnectionDroppedException, SIErrorException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "decrementUseCount"); useCount--; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) ...
java
public synchronized void decrementUseCount() throws SIConnectionDroppedException, SIErrorException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "decrementUseCount"); useCount--; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) ...
[ "public", "synchronized", "void", "decrementUseCount", "(", ")", "throws", "SIConnectionDroppedException", ",", "SIErrorException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", "...
This method will decrement the use count on this order context. @throws SIConnectionUnavailableException @throws SIConnectionDroppedException @throws SIErrorException
[ "This", "method", "will", "decrement", "the", "use", "count", "on", "this", "order", "context", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/OrderingContextProxy.java#L175-L193
train
This method is called by the SIBComponent in order to decrement the use count of the order contex.
Of course, here is the Java code you requested: ```java public synchronized void decrementUseCount() throws SIConnectionDroppedException, SIErrorException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "decrementUseCount"); useCount--; if (Trac...
mikepenz/Android-Iconics
library-core/src/main/java/com/mikepenz/iconics/utils/GenericsUtil.java
GenericsUtil.getDefinedFonts
private static String[] getDefinedFonts(Context ctx, Field[] fields) { ArrayList<String> fieldArray = new ArrayList<>(); for (Field field : fields) { if (field.getName().contains("define_font_")) { fieldArray.add(getStringResourceByName(ctx, field.getName())); } ...
java
private static String[] getDefinedFonts(Context ctx, Field[] fields) { ArrayList<String> fieldArray = new ArrayList<>(); for (Field field : fields) { if (field.getName().contains("define_font_")) { fieldArray.add(getStringResourceByName(ctx, field.getName())); } ...
[ "private", "static", "String", "[", "]", "getDefinedFonts", "(", "Context", "ctx", ",", "Field", "[", "]", "fields", ")", "{", "ArrayList", "<", "String", ">", "fieldArray", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Field", "field", ":...
A helper method to get a String[] out of a fieldArray @param fields R.strings.class.getFields() @return a String[] with the string ids we need
[ "A", "helper", "method", "to", "get", "a", "String", "[]", "out", "of", "a", "fieldArray" ]
0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8
https://github.com/mikepenz/Android-Iconics/blob/0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8/library-core/src/main/java/com/mikepenz/iconics/utils/GenericsUtil.java#L61-L69
train
Get defined fonts from fields
Of course, here is the Java code you requested: ```java private static String[] getDefinedFonts(Context ctx, Field[] fields) { ArrayList<String> fieldArray = new ArrayList<>(); for (Field field : fields) { if (field.getName().contains("define_font_")) { fieldArray.add(getStr...
apache/incubator-druid
processing/src/main/java/org/apache/druid/query/groupby/strategy/GroupByStrategyV2.java
GroupByStrategyV2.getUniversalTimestamp
public static DateTime getUniversalTimestamp(final GroupByQuery query) { final Granularity gran = query.getGranularity(); final String timestampStringFromContext = query.getContextValue(CTX_KEY_FUDGE_TIMESTAMP, ""); if (!timestampStringFromContext.isEmpty()) { return DateTimes.utc(Long.parseLong(ti...
java
public static DateTime getUniversalTimestamp(final GroupByQuery query) { final Granularity gran = query.getGranularity(); final String timestampStringFromContext = query.getContextValue(CTX_KEY_FUDGE_TIMESTAMP, ""); if (!timestampStringFromContext.isEmpty()) { return DateTimes.utc(Long.parseLong(ti...
[ "public", "static", "DateTime", "getUniversalTimestamp", "(", "final", "GroupByQuery", "query", ")", "{", "final", "Granularity", "gran", "=", "query", ".", "getGranularity", "(", ")", ";", "final", "String", "timestampStringFromContext", "=", "query", ".", "getCo...
If "query" has a single universal timestamp, return it. Otherwise return null. This is useful for keeping timestamps in sync across partial queries that may have different intervals. @param query the query @return universal timestamp, or null
[ "If", "query", "has", "a", "single", "universal", "timestamp", "return", "it", ".", "Otherwise", "return", "null", ".", "This", "is", "useful", "for", "keeping", "timestamps", "in", "sync", "across", "partial", "queries", "that", "may", "have", "different", ...
f776b9408962b9006cfcfe4d6c1794751972cc8e
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/query/groupby/strategy/GroupByStrategyV2.java#L125-L138
train
Get Universal Timestamp from the GroupBy query
Of course, here is the Java code you requested: ```java public static DateTime getUniversalTimestamp(final GroupByQuery query) { final Granularity gran = query.getGranularity(); final String timestampStringFromContext = query.getContextValue(CTX_KEY_FUDGE_TIMESTAMP, ""); if (!timestampStringFromContext....
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationauthnprofile.java
authenticationauthnprofile.get
public static authenticationauthnprofile[] get(nitro_service service) throws Exception{ authenticationauthnprofile obj = new authenticationauthnprofile(); authenticationauthnprofile[] response = (authenticationauthnprofile[])obj.get_resources(service); return response; }
java
public static authenticationauthnprofile[] get(nitro_service service) throws Exception{ authenticationauthnprofile obj = new authenticationauthnprofile(); authenticationauthnprofile[] response = (authenticationauthnprofile[])obj.get_resources(service); return response; }
[ "public", "static", "authenticationauthnprofile", "[", "]", "get", "(", "nitro_service", "service", ")", "throws", "Exception", "{", "authenticationauthnprofile", "obj", "=", "new", "authenticationauthnprofile", "(", ")", ";", "authenticationauthnprofile", "[", "]", "...
Use this API to fetch all the authenticationauthnprofile resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "authenticationauthnprofile", "resources", "that", "are", "configured", "on", "netscaler", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/authentication/authenticationauthnprofile.java#L340-L344
train
Use this API to fetch all the authenticationauthnprofile resources that are configured on netscaler.
Of course, here is the Java code you requested: ```java public static authenticationauthnprofile[] get(nitro_service service) throws Exception{ authenticationauthnprofile obj = new authenticationauthnprofile(); authenticationauthnprofile[] response = (authenticationauthnprofile[])obj.get_resources(service); retu...
michael-rapp/AndroidPreferenceActivity
library/src/main/java/de/mrapp/android/preference/activity/NavigationPreference.java
NavigationPreference.obtainBreadCrumbTitle
private void obtainBreadCrumbTitle(@NonNull final TypedArray typedArray) { setBreadCrumbTitle( typedArray.getText(R.styleable.NavigationPreference_android_breadCrumbTitle)); }
java
private void obtainBreadCrumbTitle(@NonNull final TypedArray typedArray) { setBreadCrumbTitle( typedArray.getText(R.styleable.NavigationPreference_android_breadCrumbTitle)); }
[ "private", "void", "obtainBreadCrumbTitle", "(", "@", "NonNull", "final", "TypedArray", "typedArray", ")", "{", "setBreadCrumbTitle", "(", "typedArray", ".", "getText", "(", "R", ".", "styleable", ".", "NavigationPreference_android_breadCrumbTitle", ")", ")", ";", "...
Obtains the breadcrumb title from a specific typed array. @param typedArray The typed array, the breadcrumb title should be obtained from, as an instance of the class {@link TypedArray}. The typed array may not be null
[ "Obtains", "the", "breadcrumb", "title", "from", "a", "specific", "typed", "array", "." ]
0fcde73815b4b3bf6bcb36acd3d5733e301bbba5
https://github.com/michael-rapp/AndroidPreferenceActivity/blob/0fcde73815b4b3bf6bcb36acd3d5733e301bbba5/library/src/main/java/de/mrapp/android/preference/activity/NavigationPreference.java#L254-L257
train
Obtains the bread crumb title from a specific typed array.
Of course, here is the Java code you requested: ```java private void obtainBreadCrumbTitle(@NonNull final TypedArray typedArray) { setBreadCrumbTitle( typedArray.getText(R.styleable.NavigationPreference_android_breadCrumbTitle)); } ``` Hope this helps!
the-fascinator/plugin-indexer-solr
src/main/java/com/googlecode/fascinator/indexer/SolrWrapperQueueConsumer.java
SolrWrapperQueueConsumer.onMessage
@Override public void onMessage(Message message) { MDC.put("name", name); try { // Make sure thread priority is correct if (!Thread.currentThread().getName().equals(thread.getName())) { Thread.currentThread().setName(thread.getName()); Thread.c...
java
@Override public void onMessage(Message message) { MDC.put("name", name); try { // Make sure thread priority is correct if (!Thread.currentThread().getName().equals(thread.getName())) { Thread.currentThread().setName(thread.getName()); Thread.c...
[ "@", "Override", "public", "void", "onMessage", "(", "Message", "message", ")", "{", "MDC", ".", "put", "(", "\"name\"", ",", "name", ")", ";", "try", "{", "// Make sure thread priority is correct", "if", "(", "!", "Thread", ".", "currentThread", "(", ")", ...
Callback function for incoming messages. @param message The incoming message
[ "Callback", "function", "for", "incoming", "messages", "." ]
001159b18b78a87daa5d8b2a17ced28694bae156
https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrWrapperQueueConsumer.java#L394-L434
train
Handle the message received by the application.
Of course, here is the Java code you requested: ```java @Override public void onMessage(Message message) { MDC.put("name", name); try { // Make sure thread priority is correct if (!Thread.currentThread().getName().equals(thread.getName())) { Thread.currentThr...
spring-projects/spring-security
config/src/main/java/org/springframework/security/config/annotation/web/messaging/MessageSecurityMetadataSourceRegistry.java
MessageSecurityMetadataSourceRegistry.expressionHandler
public MessageSecurityMetadataSourceRegistry expressionHandler(SecurityExpressionHandler<Message<Object>> expressionHandler) { Assert.notNull(expressionHandler, "expressionHandler cannot be null"); this.expressionHandler = expressionHandler; return this; }
java
public MessageSecurityMetadataSourceRegistry expressionHandler(SecurityExpressionHandler<Message<Object>> expressionHandler) { Assert.notNull(expressionHandler, "expressionHandler cannot be null"); this.expressionHandler = expressionHandler; return this; }
[ "public", "MessageSecurityMetadataSourceRegistry", "expressionHandler", "(", "SecurityExpressionHandler", "<", "Message", "<", "Object", ">", ">", "expressionHandler", ")", "{", "Assert", ".", "notNull", "(", "expressionHandler", ",", "\"expressionHandler cannot be null\"", ...
The {@link SecurityExpressionHandler} to be used. The default is to use {@link DefaultMessageSecurityExpressionHandler}. @param expressionHandler the {@link SecurityExpressionHandler} to use. Cannot be null. @return the {@link MessageSecurityMetadataSourceRegistry} for further customization.
[ "The", "{", "@link", "SecurityExpressionHandler", "}", "to", "be", "used", ".", "The", "default", "is", "to", "use", "{", "@link", "DefaultMessageSecurityExpressionHandler", "}", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/messaging/MessageSecurityMetadataSourceRegistry.java#L219-L223
test
Sets the expression handler.
Of course, here is the Java code you requested: ```java public MessageSecurityMetadataSourceRegistry expressionHandler(SecurityExpressionHandler<Message<Object>> expressionHandler) { Assert.notNull(expressionHandler, "expressionHandler cannot be null"); this.expressionHandler = expressionHandler; return this; }...
aws/aws-sdk-java
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/AWSCognitoIdentityProviderClient.java
AWSCognitoIdentityProviderClient.createIdentityProvider
@Override public CreateIdentityProviderResult createIdentityProvider(CreateIdentityProviderRequest request) { request = beforeClientExecution(request); return executeCreateIdentityProvider(request); }
java
@Override public CreateIdentityProviderResult createIdentityProvider(CreateIdentityProviderRequest request) { request = beforeClientExecution(request); return executeCreateIdentityProvider(request); }
[ "@", "Override", "public", "CreateIdentityProviderResult", "createIdentityProvider", "(", "CreateIdentityProviderRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeCreateIdentityProvider", "(", "request", ")",...
<p> Creates an identity provider for a user pool. </p> @param createIdentityProviderRequest @return Result of the CreateIdentityProvider operation returned by the service. @throws InvalidParameterException This exception is thrown when the Amazon Cognito service encounters an invalid parameter. @throws DuplicateProvid...
[ "<p", ">", "Creates", "an", "identity", "provider", "for", "a", "user", "pool", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/AWSCognitoIdentityProviderClient.java#L2886-L2890
train
Creates an identity provider.
Of course, here is the Java code you requested: ```java @Override public CreateIdentityProviderResult createIdentityProvider(CreateIdentityProviderRequest request) { request = beforeClientExecution(request); return executeCreateIdentityProvider(request); } ``` Hope this helps!
policeman-tools/forbidden-apis
src/main/java/de/thetaphi/forbiddenapis/Signatures.java
Signatures.parseSignaturesString
public void parseSignaturesString(String signatures) throws IOException,ParseException { logger.info("Reading inline API signatures..."); final Set<String> missingClasses = new TreeSet<String>(); parseSignaturesFile(new StringReader(signatures), false, missingClasses); reportMissingSignatureClasses(miss...
java
public void parseSignaturesString(String signatures) throws IOException,ParseException { logger.info("Reading inline API signatures..."); final Set<String> missingClasses = new TreeSet<String>(); parseSignaturesFile(new StringReader(signatures), false, missingClasses); reportMissingSignatureClasses(miss...
[ "public", "void", "parseSignaturesString", "(", "String", "signatures", ")", "throws", "IOException", ",", "ParseException", "{", "logger", ".", "info", "(", "\"Reading inline API signatures...\"", ")", ";", "final", "Set", "<", "String", ">", "missingClasses", "=",...
Reads a list of API signatures from a String.
[ "Reads", "a", "list", "of", "API", "signatures", "from", "a", "String", "." ]
df5f00c6bb779875ec6bae967f7cec96670b27d9
https://github.com/policeman-tools/forbidden-apis/blob/df5f00c6bb779875ec6bae967f7cec96670b27d9/src/main/java/de/thetaphi/forbiddenapis/Signatures.java#L309-L314
train
Parses the API signatures string.
Of course, here is the Java code you requested: ```java public void parseSignaturesString(String signatures) throws IOException,ParseException { logger.info("Reading inline API signatures..."); final Set<String> missingClasses = new TreeSet<String>(); parseSignaturesFile(new StringReader(signatures), false...
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeHashSet.java
KTypeHashSet.rehash
protected void rehash(KType[] fromKeys) { assert HashContainers.checkPowerOfTwo(fromKeys.length - 1); // Rehash all stored keys into the new buffers. final KType[] keys = Intrinsics.<KType[]> cast(this.keys); final int mask = this.mask; KType existing; for (int i = fromKeys.length - 1; --i >= 0...
java
protected void rehash(KType[] fromKeys) { assert HashContainers.checkPowerOfTwo(fromKeys.length - 1); // Rehash all stored keys into the new buffers. final KType[] keys = Intrinsics.<KType[]> cast(this.keys); final int mask = this.mask; KType existing; for (int i = fromKeys.length - 1; --i >= 0...
[ "protected", "void", "rehash", "(", "KType", "[", "]", "fromKeys", ")", "{", "assert", "HashContainers", ".", "checkPowerOfTwo", "(", "fromKeys", ".", "length", "-", "1", ")", ";", "// Rehash all stored keys into the new buffers.", "final", "KType", "[", "]", "k...
Rehash from old buffers to new buffers.
[ "Rehash", "from", "old", "buffers", "to", "new", "buffers", "." ]
e359e9da358e846fcbffc64a765611df954ba3f6
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeHashSet.java#L719-L735
train
Rehashes the array of keys into the new buffers.
Of course, here is the Java code you requested: ```java protected void rehash(KType[] fromKeys) { assert HashContainers.checkPowerOfTwo(fromKeys.length - 1); // Rehash all stored keys into the new buffers. final KType[] keys = Intrinsics.<KType[]> cast(this.keys); final int mask = this.mask; KType...
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/access/MethodParameterResolverServlet.java
MethodParameterResolverServlet.doPost
@Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String PID = null; String sDefPID = null; String methodName = null; String versDateTime = null; StringBuffer methodParms = new StringBuffe...
java
@Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String PID = null; String sDefPID = null; String methodName = null; String versDateTime = null; StringBuffer methodParms = new StringBuffe...
[ "@", "Override", "public", "void", "doPost", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "String", "PID", "=", "null", ";", "String", "sDefPID", "=", "null", ";", "Stri...
Process Post request from web form. @param request The servlet request. @param response The servlet response. @throws ServletException If an error occurs that affects the servlet's basic operation. @throws IOException If an error occurs within an input or output operation.
[ "Process", "Post", "request", "from", "web", "form", "." ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/access/MethodParameterResolverServlet.java#L76-L170
train
Override the doPost method to handle the POST request.
Of course, here is the Java code you requested: ```java @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String PID = null; String sDefPID = null; String methodName = null; String versDateTime =...
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java
ToHTMLStream.characters
public final void characters(char chars[], int start, int length) throws org.xml.sax.SAXException { if (m_elemContext.m_isRaw) { try { // Clean up some pending issues. if (m_elemContext.m_startTagOpen) { ...
java
public final void characters(char chars[], int start, int length) throws org.xml.sax.SAXException { if (m_elemContext.m_isRaw) { try { // Clean up some pending issues. if (m_elemContext.m_startTagOpen) { ...
[ "public", "final", "void", "characters", "(", "char", "chars", "[", "]", ",", "int", "start", ",", "int", "length", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "if", "(", "m_elemContext", ".", "m_isRaw", ")", "{", "try", "...
Receive notification of character data. <p>The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external enti...
[ "Receive", "notification", "of", "character", "data", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java#L1529-L1564
train
Override characters in a SAX2 document.
Of course, here is the Java code you requested: ```java public final void characters(char chars[], int start, int length) throws org.xml.sax.SAXException { if (m_elemContext.m_isRaw) { try { // Clean up some pending issues. if (m_ele...
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java
GenericUtils.asByteArray
static public byte[] asByteArray(long inValue) { long value = inValue; // check for 0 if (0 == value) { return ZERO_BYTEARRAY; } // make space for the largest long number byte[] bytes = new byte[SIZE_MAXLONG]; // check for negative ints boole...
java
static public byte[] asByteArray(long inValue) { long value = inValue; // check for 0 if (0 == value) { return ZERO_BYTEARRAY; } // make space for the largest long number byte[] bytes = new byte[SIZE_MAXLONG]; // check for negative ints boole...
[ "static", "public", "byte", "[", "]", "asByteArray", "(", "long", "inValue", ")", "{", "long", "value", "=", "inValue", ";", "// check for 0", "if", "(", "0", "==", "value", ")", "{", "return", "ZERO_BYTEARRAY", ";", "}", "// make space for the largest long nu...
Utility method to convert a long (positive or negative) into the byte[] representation. So "50" would return a byte[2] of "50", "-100" would return a byte[3] of "-100". @param inValue @return byte[]
[ "Utility", "method", "to", "convert", "a", "long", "(", "positive", "or", "negative", ")", "into", "the", "byte", "[]", "representation", ".", "So", "50", "would", "return", "a", "byte", "[", "2", "]", "of", "50", "-", "100", "would", "return", "a", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java#L464-L504
train
As byte array.
Of course, here is the Java code you requested: ```java static public byte[] asByteArray(long inValue) { long value = inValue; // check for 0 if (0 == value) { return ZERO_BYTEARRAY; } // make space for the largest long number byte[] bytes = new byte[SIZE_M...
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/reflect/Property.java
Property.getField
public Field getField() { if (field == null) return null; try { // Note: sun.reflect.ReflectionFactory is not available in Android API return field.getDeclaringClass().getDeclaredField(field.getName()); } catch (NoSuchFieldException e) { throw new ReflectionE...
java
public Field getField() { if (field == null) return null; try { // Note: sun.reflect.ReflectionFactory is not available in Android API return field.getDeclaringClass().getDeclaredField(field.getName()); } catch (NoSuchFieldException e) { throw new ReflectionE...
[ "public", "Field", "getField", "(", ")", "{", "if", "(", "field", "==", "null", ")", "return", "null", ";", "try", "{", "// Note: sun.reflect.ReflectionFactory is not available in Android API", "return", "field", ".", "getDeclaringClass", "(", ")", ".", "getDeclared...
Returns a copy of this property's {@link Field}, if present, else {@code null}. * @return A copy of the underlying field, or {@code null} if this property has no field
[ "Returns", "a", "copy", "of", "this", "property", "s", "{", "@link", "Field", "}", "if", "present", "else", "{", "@code", "null", "}", ".", "*" ]
8e72fff6cd1f496c76a01773269caead994fea65
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/reflect/Property.java#L358-L367
train
Get the field of the class.
Of course, here is the Java code you requested: ```java public Field getField() { if (field == null) return null; try { // Note: sun.reflect.ReflectionFactory is not available in Android API return field.getDeclaringClass().getDeclaredField(field.getName()); } catch (No...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/mining/word/TermFrequencyCounter.java
TermFrequencyCounter.top
public Collection<TermFrequency> top(int N) { MaxHeap<TermFrequency> heap = new MaxHeap<TermFrequency>(N, new Comparator<TermFrequency>() { @Override public int compare(TermFrequency o1, TermFrequency o2) { return o1.compareTo(o2); } ...
java
public Collection<TermFrequency> top(int N) { MaxHeap<TermFrequency> heap = new MaxHeap<TermFrequency>(N, new Comparator<TermFrequency>() { @Override public int compare(TermFrequency o1, TermFrequency o2) { return o1.compareTo(o2); } ...
[ "public", "Collection", "<", "TermFrequency", ">", "top", "(", "int", "N", ")", "{", "MaxHeap", "<", "TermFrequency", ">", "heap", "=", "new", "MaxHeap", "<", "TermFrequency", ">", "(", "N", ",", "new", "Comparator", "<", "TermFrequency", ">", "(", ")", ...
取前N个高频词 @param N @return
[ "取前N个高频词" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/mining/word/TermFrequencyCounter.java#L85-L97
train
Get the top N terms.
Of course, here is the Java code you requested: ```java public Collection<TermFrequency> top(int N) { MaxHeap<TermFrequency> heap = new MaxHeap<TermFrequency>(N, new Comparator<TermFrequency>() { @Override public int compare(TermFrequency o1, TermFrequency o2) { ...
trajano/caliper
examples/src/main/java/examples/Utf8Benchmark.java
Utf8Benchmark.getBytes
@Benchmark void getBytes(int reps) { final String[] strings = this.strings; final int mask = STRING_COUNT - 1; for (int i = 0; i < reps; i++) { String string = strings[i & mask]; byte[] bytes = string.getBytes(UTF_8); if (bytes[0] == 86 && bytes[bytes.length - 1] == 99) { throw new...
java
@Benchmark void getBytes(int reps) { final String[] strings = this.strings; final int mask = STRING_COUNT - 1; for (int i = 0; i < reps; i++) { String string = strings[i & mask]; byte[] bytes = string.getBytes(UTF_8); if (bytes[0] == 86 && bytes[bytes.length - 1] == 99) { throw new...
[ "@", "Benchmark", "void", "getBytes", "(", "int", "reps", ")", "{", "final", "String", "[", "]", "strings", "=", "this", ".", "strings", ";", "final", "int", "mask", "=", "STRING_COUNT", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Benchmarks {@link String#getBytes} on valid strings containing pseudo-randomly-generated codePoints less than {@code maxCodePoint}. A constant seed is used, so separate runs perform identical computations.
[ "Benchmarks", "{" ]
a8bcfd84fa9d7b893b3edfadc3b13240ae5cd658
https://github.com/trajano/caliper/blob/a8bcfd84fa9d7b893b3edfadc3b13240ae5cd658/examples/src/main/java/examples/Utf8Benchmark.java#L124-L134
train
Get bytes.
Of course, here is the Java code you requested: ```java @Benchmark void getBytes(int reps) { final String[] strings = this.strings; final int mask = STRING_COUNT - 1; for (int i = 0; i < reps; i++) { String string = strings[i & mask]; byte[] bytes = string.getBytes(UTF_8); if (bytes[0] ==...
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/invoke/MethodParameter.java
MethodParameter.doEndTag
public int doEndTag() throws JspException { if(hasErrors()) reportErrors(); else { AbstractCallMethod cm = (AbstractCallMethod)getParent(); cm.addParameter(_type, _isNull ? null : _value); } localRelease(); return EVAL_PAGE; }
java
public int doEndTag() throws JspException { if(hasErrors()) reportErrors(); else { AbstractCallMethod cm = (AbstractCallMethod)getParent(); cm.addParameter(_type, _isNull ? null : _value); } localRelease(); return EVAL_PAGE; }
[ "public", "int", "doEndTag", "(", ")", "throws", "JspException", "{", "if", "(", "hasErrors", "(", ")", ")", "reportErrors", "(", ")", ";", "else", "{", "AbstractCallMethod", "cm", "=", "(", "AbstractCallMethod", ")", "getParent", "(", ")", ";", "cm", "....
Prepare the value to pass up to the {@link AbstractCallMethod} type parent. @return {@link #EVAL_PAGE} to continue evaluating the page
[ "Prepare", "the", "value", "to", "pass", "up", "to", "the", "{", "@link", "AbstractCallMethod", "}", "type", "parent", "." ]
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/invoke/MethodParameter.java#L262-L274
train
End Tag implementation.
Of course, here is the Java code you requested: ```java public int doEndTag() throws JspException { if(hasErrors()) reportErrors(); else { AbstractCallMethod cm = (AbstractCallMethod)getParent(); cm.addParameter(_type, _isNull ? null : _value); }...
morfologik/morfologik-stemming
morfologik-speller/src/main/java/morfologik/speller/Speller.java
Speller.containsNoDigit
static boolean containsNoDigit(final String s) { for (int k = 0; k < s.length(); k++) { if (Character.isDigit(s.charAt(k))) { return false; } } return true; }
java
static boolean containsNoDigit(final String s) { for (int k = 0; k < s.length(); k++) { if (Character.isDigit(s.charAt(k))) { return false; } } return true; }
[ "static", "boolean", "containsNoDigit", "(", "final", "String", "s", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "s", ".", "length", "(", ")", ";", "k", "++", ")", "{", "if", "(", "Character", ".", "isDigit", "(", "s", ".", "char...
Checks whether a string contains a digit. Used for ignoring words with numbers @param s Word to be checked. @return True if there is a digit inside the word.
[ "Checks", "whether", "a", "string", "contains", "a", "digit", ".", "Used", "for", "ignoring", "words", "with", "numbers" ]
9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-speller/src/main/java/morfologik/speller/Speller.java#L706-L713
train
Checks if a string contains no digit.
Of course, here is the Java code you requested: ```java static boolean containsNoDigit(final String s) { for (int k = 0; k < s.length(); k++) { if (Character.isDigit(s.charAt(k))) { return false; } } return true; } ``` Hope this helps!
primefaces/primefaces
src/main/java/org/primefaces/util/ChartUtils.java
ChartUtils.writeDataValue
public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException { if (value == null) { return; } boolean isList = value instanceof List; if (hasComma) { fsw.write(","); } fsw.write("\"" + optio...
java
public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException { if (value == null) { return; } boolean isList = value instanceof List; if (hasComma) { fsw.write(","); } fsw.write("\"" + optio...
[ "public", "static", "void", "writeDataValue", "(", "Writer", "fsw", ",", "String", "optionName", ",", "Object", "value", ",", "boolean", "hasComma", ")", "throws", "IOException", "{", "if", "(", "value", "==", "null", ")", "{", "return", ";", "}", "boolean...
Write the value of chartJs options @param fsw a writer object that use to write the value of an option @param optionName the name of an option @param value the value of an option @param hasComma specifies whether to add a comma at the beginning of the option name @throws java.io.IOException if writer named fsw is null
[ "Write", "the", "value", "of", "chartJs", "options" ]
b8cdd5ed395d09826e40e3302d6b14901d3ef4e7
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ChartUtils.java#L48-L91
train
Write a value of a class to a writer.
Of course, here is the Java code you requested: ```java public static void writeDataValue(Writer fsw, String optionName, Object value, boolean hasComma) throws IOException { if (value == null) { return; } boolean isList = value instanceof List; if (hasComma) { ...
GojaFramework/goja
goja-core/src/main/java/goja/core/kits/stream/StreamUtil.java
StreamUtil.compare
public static boolean compare(InputStream input1, InputStream input2) throws IOException { if (!(input1 instanceof BufferedInputStream)) { input1 = new BufferedInputStream(input1); } if (!(input2 instanceof BufferedInputStream)) { input2 = new BufferedInputStream(input2);...
java
public static boolean compare(InputStream input1, InputStream input2) throws IOException { if (!(input1 instanceof BufferedInputStream)) { input1 = new BufferedInputStream(input1); } if (!(input2 instanceof BufferedInputStream)) { input2 = new BufferedInputStream(input2);...
[ "public", "static", "boolean", "compare", "(", "InputStream", "input1", ",", "InputStream", "input2", ")", "throws", "IOException", "{", "if", "(", "!", "(", "input1", "instanceof", "BufferedInputStream", ")", ")", "{", "input1", "=", "new", "BufferedInputStream...
Compares the content of two byte streams. @return <code>true</code> if the content of the first stream is equal to the content of the second stream.
[ "Compares", "the", "content", "of", "two", "byte", "streams", "." ]
77179b495f668fc1fa20accc912991df6bb2d917
https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/kits/stream/StreamUtil.java#L347-L364
test
Compare two input streams for equality.
Of course, here is the Java code you requested: ```java public static boolean compare(InputStream input1, InputStream input2) throws IOException { if (!(input1 instanceof BufferedInputStream)) { input1 = new BufferedInputStream(input1); } if (!(input2 instanceof BufferedInputStream)...
objectify/objectify
src/main/java/com/googlecode/objectify/impl/DeleteTypeImpl.java
DeleteTypeImpl.ids
@Override public Result<Void> ids(final String... ids) { return ids(Arrays.asList(ids)); }
java
@Override public Result<Void> ids(final String... ids) { return ids(Arrays.asList(ids)); }
[ "@", "Override", "public", "Result", "<", "Void", ">", "ids", "(", "final", "String", "...", "ids", ")", "{", "return", "ids", "(", "Arrays", ".", "asList", "(", "ids", ")", ")", ";", "}" ]
/* (non-Javadoc) @see com.googlecode.objectify.cmd.DeleteIds#ids(java.lang.String[])
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
4bf325d2e49b400326416977c7d9bbdf5380175b
https://github.com/objectify/objectify/blob/4bf325d2e49b400326416977c7d9bbdf5380175b/src/main/java/com/googlecode/objectify/impl/DeleteTypeImpl.java#L86-L89
test
Override to provide an array of IDs to be deleted.
Of course, here is the Java code you requested: ```java @Override public Result<Void> ids(final String... ids) { return ids(Arrays.asList(ids)); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/ContainerDefinition.java
ContainerDefinition.setDependsOn
public void setDependsOn(java.util.Collection<ContainerDependency> dependsOn) { if (dependsOn == null) { this.dependsOn = null; return; } this.dependsOn = new com.amazonaws.internal.SdkInternalList<ContainerDependency>(dependsOn); }
java
public void setDependsOn(java.util.Collection<ContainerDependency> dependsOn) { if (dependsOn == null) { this.dependsOn = null; return; } this.dependsOn = new com.amazonaws.internal.SdkInternalList<ContainerDependency>(dependsOn); }
[ "public", "void", "setDependsOn", "(", "java", ".", "util", ".", "Collection", "<", "ContainerDependency", ">", "dependsOn", ")", "{", "if", "(", "dependsOn", "==", "null", ")", "{", "this", ".", "dependsOn", "=", "null", ";", "return", ";", "}", "this",...
<p> The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed. </p> <p> Your Amazon ECS container instances require at least version 1.26.0 of the container agent to enable contain...
[ "<p", ">", "The", "dependencies", "defined", "for", "container", "startup", "and", "shutdown", ".", "A", "container", "can", "contain", "multiple", "dependencies", ".", "When", "a", "dependency", "is", "defined", "for", "container", "startup", "for", "container"...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/ContainerDefinition.java#L3506-L3513
train
Sets the value dependsOn property.
Of course, here is the Java code you requested: ```java public void setDependsOn(java.util.Collection<ContainerDependency> dependsOn) { if (dependsOn == null) { this.dependsOn = null; return; } this.dependsOn = new com.amazonaws.internal.SdkInternalList<ContainerDepende...
aws/aws-sdk-java
aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AmazonRedshiftClient.java
AmazonRedshiftClient.resetClusterParameterGroup
@Override public ResetClusterParameterGroupResult resetClusterParameterGroup(ResetClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeResetClusterParameterGroup(request); }
java
@Override public ResetClusterParameterGroupResult resetClusterParameterGroup(ResetClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeResetClusterParameterGroup(request); }
[ "@", "Override", "public", "ResetClusterParameterGroupResult", "resetClusterParameterGroup", "(", "ResetClusterParameterGroupRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeResetClusterParameterGroup", "(", "...
<p> Sets one or more parameters of the specified parameter group to their default values and sets the source values of the parameters to "engine-default". To reset the entire parameter group specify the <i>ResetAllParameters</i> parameter. For parameter changes to take effect you must reboot any associated clusters. </...
[ "<p", ">", "Sets", "one", "or", "more", "parameters", "of", "the", "specified", "parameter", "group", "to", "their", "default", "values", "and", "sets", "the", "source", "values", "of", "the", "parameters", "to", "engine", "-", "default", ".", "To", "reset...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-redshift/src/main/java/com/amazonaws/services/redshift/AmazonRedshiftClient.java#L5367-L5371
train
Resets an existing cluster parameter group.
Of course, here is the Java code you requested: ```java @Override public ResetClusterParameterGroupResult resetClusterParameterGroup(ResetClusterParameterGroupRequest request) { request = beforeClientExecution(request); return executeResetClusterParameterGroup(request); } ``` Hope this helps!
kiegroup/drools
drools-core/src/main/java/org/drools/core/factmodel/BuildUtils.java
BuildUtils.isPrimitive
public static boolean isPrimitive(String type) { boolean isPrimitive = false; if ( "byte".equals( type ) || "char".equals( type ) || "double".equals( type ) || "float".equals( type ) || "int".equals( type ) || "long".equals( type ) || "short".equals( type ) || "boolean".equals( type ) || "void".equals( ...
java
public static boolean isPrimitive(String type) { boolean isPrimitive = false; if ( "byte".equals( type ) || "char".equals( type ) || "double".equals( type ) || "float".equals( type ) || "int".equals( type ) || "long".equals( type ) || "short".equals( type ) || "boolean".equals( type ) || "void".equals( ...
[ "public", "static", "boolean", "isPrimitive", "(", "String", "type", ")", "{", "boolean", "isPrimitive", "=", "false", ";", "if", "(", "\"byte\"", ".", "equals", "(", "type", ")", "||", "\"char\"", ".", "equals", "(", "type", ")", "||", "\"double\"", "."...
Returns true if the provided type is a primitive type @param type @return
[ "Returns", "true", "if", "the", "provided", "type", "is", "a", "primitive", "type" ]
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/factmodel/BuildUtils.java#L188-L194
train
Check if the type is a primitive type.
Of course, here is the Java code you requested: ```java public static boolean isPrimitive(String type) { boolean isPrimitive = false; if ( "byte".equals( type ) || "char".equals( type ) || "double".equals( type ) || "float".equals( type ) || "int".equals( type ) || "long".equals( type ) || "short".equa...
tango-controls/JTango
client/src/main/java/fr/soleil/tango/util/TangoUtil.java
TangoUtil.getfullNameForDevice
public static String getfullNameForDevice(final String deviceName) throws DevFailed { if (deviceName == null) { throw DevFailedUtils.newDevFailed("cannot retrieve device name", "device name is empty"); } String result; final String[] fields = deviceName.split("/"); fi...
java
public static String getfullNameForDevice(final String deviceName) throws DevFailed { if (deviceName == null) { throw DevFailedUtils.newDevFailed("cannot retrieve device name", "device name is empty"); } String result; final String[] fields = deviceName.split("/"); fi...
[ "public", "static", "String", "getfullNameForDevice", "(", "final", "String", "deviceName", ")", "throws", "DevFailed", "{", "if", "(", "deviceName", "==", "null", ")", "{", "throw", "DevFailedUtils", ".", "newDevFailed", "(", "\"cannot retrieve device name\"", ",",...
Get the full device name @param deviceName @return @throws DevFailed
[ "Get", "the", "full", "device", "name" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/util/TangoUtil.java#L129-L144
train
Get full name for device
Of course, here is the Java code you requested: ```java public static String getfullNameForDevice(final String deviceName) throws DevFailed { if (deviceName == null) { throw DevFailedUtils.newDevFailed("cannot retrieve device name", "device name is empty"); } String result; ...
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/view/facelets/ValidatorHandler.java
ValidatorHandler.getValidatorId
public String getValidatorId(FaceletContext ctx) { if (validatorId == null) { TagAttribute idAttr = getAttribute("validatorId"); if (idAttr == null) { return null; } else { return idAttr.getValue(ctx); } } return val...
java
public String getValidatorId(FaceletContext ctx) { if (validatorId == null) { TagAttribute idAttr = getAttribute("validatorId"); if (idAttr == null) { return null; } else { return idAttr.getValue(ctx); } } return val...
[ "public", "String", "getValidatorId", "(", "FaceletContext", "ctx", ")", "{", "if", "(", "validatorId", "==", "null", ")", "{", "TagAttribute", "idAttr", "=", "getAttribute", "(", "\"validatorId\"", ")", ";", "if", "(", "idAttr", "==", "null", ")", "{", "r...
<p>Retrieve the id of the validator that is to be created and added to the parent <code>EditableValueHolder</code>. All subclasses should override this method because it is important for Facelets to have a unique way of identifying the validators that are added to this <code>EditableValueHolder</code> and allows exclu...
[ "<p", ">", "Retrieve", "the", "id", "of", "the", "validator", "that", "is", "to", "be", "created", "and", "added", "to", "the", "parent", "<code", ">", "EditableValueHolder<", "/", "code", ">", ".", "All", "subclasses", "should", "override", "this", "metho...
cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/view/facelets/ValidatorHandler.java#L120-L130
train
Gets the validatorId.
Of course, here is the Java code you requested: ```java public String getValidatorId(FaceletContext ctx) { if (validatorId == null) { TagAttribute idAttr = getAttribute("validatorId"); if (idAttr == null) { return null; } else { return idAttr....
artclarke/humble-video
humble-video-noarch/src/main/java/io/humble/video/Rational.java
Rational.sMultiply
public static Rational sMultiply(Rational a, Rational b) { long cPtr = VideoJNI.Rational_sMultiply(Rational.getCPtr(a), a, Rational.getCPtr(b), b); return (cPtr == 0) ? null : new Rational(cPtr, false); }
java
public static Rational sMultiply(Rational a, Rational b) { long cPtr = VideoJNI.Rational_sMultiply(Rational.getCPtr(a), a, Rational.getCPtr(b), b); return (cPtr == 0) ? null : new Rational(cPtr, false); }
[ "public", "static", "Rational", "sMultiply", "(", "Rational", "a", ",", "Rational", "b", ")", "{", "long", "cPtr", "=", "VideoJNI", ".", "Rational_sMultiply", "(", "Rational", ".", "getCPtr", "(", "a", ")", ",", "a", ",", "Rational", ".", "getCPtr", "(",...
Multiples a by b.<br> @param a the first number<br> @param b the second number.<br> @return a*b
[ "Multiples", "a", "by", "b", ".", "<br", ">" ]
aa349ae2d7ef74160b7074feac8d298cf90394d1
https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/Rational.java#L273-L276
test
Multiply two numbers.
Of course, here is the Java code you requested: ```java public static Rational sMultiply(Rational a, Rational b) { long cPtr = VideoJNI.Rational_sMultiply(Rational.getCPtr(a), a, Rational.getCPtr(b), b); return (cPtr == 0) ? null : new Rational(cPtr, false); } ``` Hope this helps!
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractParentlessTreeNode.java
AbstractParentlessTreeNode.firePropertyDataChanged
protected final void firePropertyDataChanged(Collection<? extends D> oldData, Collection<? extends D> newData) { firePropertyDataChanged(new TreeDataEvent(this, oldData, newData, this.data)); }
java
protected final void firePropertyDataChanged(Collection<? extends D> oldData, Collection<? extends D> newData) { firePropertyDataChanged(new TreeDataEvent(this, oldData, newData, this.data)); }
[ "protected", "final", "void", "firePropertyDataChanged", "(", "Collection", "<", "?", "extends", "D", ">", "oldData", ",", "Collection", "<", "?", "extends", "D", ">", "newData", ")", "{", "firePropertyDataChanged", "(", "new", "TreeDataEvent", "(", "this", ",...
Fire the event for the changes of the user data associated to a node. @param oldData is the list of old values @param newData is the list of new values
[ "Fire", "the", "event", "for", "the", "changes", "of", "the", "user", "data", "associated", "to", "a", "node", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractParentlessTreeNode.java#L427-L429
train
Fire the event that indicates that the data of the tree has changed.
Of course, here is the Java code you requested: ```java protected final void firePropertyDataChanged(Collection<? extends D> oldData, Collection<? extends D> newData) { firePropertyDataChanged(new TreeDataEvent(this, oldData, newData, this.data)); } ``` Hope this helps!