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
jeslopalo/flash-messages
flash-messages-spring/src/main/java/es/sandbox/ui/messages/spring/config/annotation/DelegatingFlashMessagesConfiguration.java
DelegatingFlashMessagesConfiguration.configureCssClassesByLevel
@Override protected void configureCssClassesByLevel(CssClassesByLevel cssClassesByLevel) { super.configureCssClassesByLevel(cssClassesByLevel); if (this.configurer != null) { this.configurer.configureCssClassesByLevel(cssClassesByLevel); } }
java
@Override protected void configureCssClassesByLevel(CssClassesByLevel cssClassesByLevel) { super.configureCssClassesByLevel(cssClassesByLevel); if (this.configurer != null) { this.configurer.configureCssClassesByLevel(cssClassesByLevel); } }
[ "@", "Override", "protected", "void", "configureCssClassesByLevel", "(", "CssClassesByLevel", "cssClassesByLevel", ")", "{", "super", ".", "configureCssClassesByLevel", "(", "cssClassesByLevel", ")", ";", "if", "(", "this", ".", "configurer", "!=", "null", ")", "{",...
/* (non-Javadoc) @see es.sandbox.ui.messages.spring.MessagesConfigurationSupport#configureCssClassesByLevel(es.sandbox.ui.messages. context.CssClassesByLevel)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
2faf23b09a8f72803fb295f0e0fe1d57282224cf
https://github.com/jeslopalo/flash-messages/blob/2faf23b09a8f72803fb295f0e0fe1d57282224cf/flash-messages-spring/src/main/java/es/sandbox/ui/messages/spring/config/annotation/DelegatingFlashMessagesConfiguration.java#L79-L86
train
Override the configureCssClassesByLevel method to configure the CSS classes by level.
Of course, here is the Java code you requested: ```java @Override protected void configureCssClassesByLevel(CssClassesByLevel cssClassesByLevel) { super.configureCssClassesByLevel(cssClassesByLevel); if (this.configurer != null) { this.configurer.configureCssClassesByLevel(cssClassesBy...
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/AbstractResilienceStrategy.java
AbstractResilienceStrategy.pacedErrorLog
protected void pacedErrorLog(String message, StoreAccessException e) { pacer.pacedCall(() -> LOGGER.error(message + " - Similar messages will be suppressed for 30 seconds", e), () -> LOGGER.debug(message, e)); }
java
protected void pacedErrorLog(String message, StoreAccessException e) { pacer.pacedCall(() -> LOGGER.error(message + " - Similar messages will be suppressed for 30 seconds", e), () -> LOGGER.debug(message, e)); }
[ "protected", "void", "pacedErrorLog", "(", "String", "message", ",", "StoreAccessException", "e", ")", "{", "pacer", ".", "pacedCall", "(", "(", ")", "->", "LOGGER", ".", "error", "(", "message", "+", "\" - Similar messages will be suppressed for 30 seconds\"", ",",...
Log messages in error at worst every 30 seconds. Log everything at debug level. @param message message to log @param e exception to log
[ "Log", "messages", "in", "error", "at", "worst", "every", "30", "seconds", ".", "Log", "everything", "at", "debug", "level", "." ]
3cceda57185e522f8d241ddb75146d67ee2af898
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/AbstractResilienceStrategy.java#L178-L180
train
Paced error log.
Of course, here is the Java code you requested: ```java protected void pacedErrorLog(String message, StoreAccessException e) { pacer.pacedCall(() -> LOGGER.error(message + " - Similar messages will be suppressed for 30 seconds", e), () -> LOGGER.debug(message, e)); } ``` Hope this helps!
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/HerokuAPI.java
HerokuAPI.listAppAddons
public List<Addon> listAppAddons(String appName) { return connection.execute(new AppAddonsList(appName), apiKey); }
java
public List<Addon> listAppAddons(String appName) { return connection.execute(new AppAddonsList(appName), apiKey); }
[ "public", "List", "<", "Addon", ">", "listAppAddons", "(", "String", "appName", ")", "{", "return", "connection", ".", "execute", "(", "new", "AppAddonsList", "(", "appName", ")", ",", "apiKey", ")", ";", "}" ]
List the addons already added to an app. @param appName new of the app @return a list of add-ons
[ "List", "the", "addons", "already", "added", "to", "an", "app", "." ]
d9e52991293159498c10c498c6f91fcdd637378e
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/HerokuAPI.java#L242-L244
train
List all addons for an app
Of course, here is the Java code you requested: ```java public List<Addon> listAppAddons(String appName) { return connection.execute(new AppAddonsList(appName), apiKey); } ``` Hope this helps!
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/tree/MaterialTree.java
MaterialTree.collapseItems
protected void collapseItems(MaterialTreeItem item) { item.collapse(); item.setHide(false); item.getTreeItems().forEach(this::collapseItems); }
java
protected void collapseItems(MaterialTreeItem item) { item.collapse(); item.setHide(false); item.getTreeItems().forEach(this::collapseItems); }
[ "protected", "void", "collapseItems", "(", "MaterialTreeItem", "item", ")", "{", "item", ".", "collapse", "(", ")", ";", "item", ".", "setHide", "(", "false", ")", ";", "item", ".", "getTreeItems", "(", ")", ".", "forEach", "(", "this", "::", "collapseIt...
Recursive function to collapse each tree item.
[ "Recursive", "function", "to", "collapse", "each", "tree", "item", "." ]
11aec9d92918225f70f936285d0ae94f2178c36e
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/tree/MaterialTree.java#L188-L193
train
Collapse all the items in the material tree.
Of course, here is the Java code you requested: ```java protected void collapseItems(MaterialTreeItem item) { item.collapse(); item.setHide(false); item.getTreeItems().forEach(this::collapseItems); } ``` Hope this helps!
jenkinsci/ghprb-plugin
src/main/java/org/jenkinsci/plugins/ghprb/extensions/GhprbExtensionDescriptor.java
GhprbExtensionDescriptor.getExtensions
private static List<GhprbExtensionDescriptor> getExtensions() { List<GhprbExtensionDescriptor> list = new ArrayList<GhprbExtensionDescriptor>(); list.addAll(getExtensionList()); return list; }
java
private static List<GhprbExtensionDescriptor> getExtensions() { List<GhprbExtensionDescriptor> list = new ArrayList<GhprbExtensionDescriptor>(); list.addAll(getExtensionList()); return list; }
[ "private", "static", "List", "<", "GhprbExtensionDescriptor", ">", "getExtensions", "(", ")", "{", "List", "<", "GhprbExtensionDescriptor", ">", "list", "=", "new", "ArrayList", "<", "GhprbExtensionDescriptor", ">", "(", ")", ";", "list", ".", "addAll", "(", "...
Don't mutate the list from Jenkins, they will persist; @return list of extensions
[ "Don", "t", "mutate", "the", "list", "from", "Jenkins", "they", "will", "persist", ";" ]
b972d3b94ebbe6d40542c2771407e297bff8430b
https://github.com/jenkinsci/ghprb-plugin/blob/b972d3b94ebbe6d40542c2771407e297bff8430b/src/main/java/org/jenkinsci/plugins/ghprb/extensions/GhprbExtensionDescriptor.java#L51-L55
train
Get the list of all the extensions.
Of course, here is the Java code you requested: ```java private static List<GhprbExtensionDescriptor> getExtensions() { List<GhprbExtensionDescriptor> list = new ArrayList<GhprbExtensionDescriptor>(); list.addAll(getExtensionList()); return list; } ``` Hope this helps!
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/component/BigDecimalTextField.java
BigDecimalTextField.setBigDecimalFormat
private static final void setBigDecimalFormat(NumberFormat format, Class numberClass) { if (format instanceof DecimalFormat && ((numberClass == BigDecimal.class) || (numberClass == BigInteger.class))) { ((DecimalFormat) format).setParseBigDecimal(true); } }
java
private static final void setBigDecimalFormat(NumberFormat format, Class numberClass) { if (format instanceof DecimalFormat && ((numberClass == BigDecimal.class) || (numberClass == BigInteger.class))) { ((DecimalFormat) format).setParseBigDecimal(true); } }
[ "private", "static", "final", "void", "setBigDecimalFormat", "(", "NumberFormat", "format", ",", "Class", "numberClass", ")", "{", "if", "(", "format", "instanceof", "DecimalFormat", "&&", "(", "(", "numberClass", "==", "BigDecimal", ".", "class", ")", "||", "...
When parsing a number, BigDecimalFormat can return numbers different than BigDecimal. This method will ensure that when using a {@link BigDecimal} or a {@link java.math.BigInteger}, the formatter will return a {@link BigDecimal} in order to prevent loss of precision. Note that you should use the {@link DecimalFormat} t...
[ "When", "parsing", "a", "number", "BigDecimalFormat", "can", "return", "numbers", "different", "than", "BigDecimal", ".", "This", "method", "will", "ensure", "that", "when", "using", "a", "{", "@link", "BigDecimal", "}", "or", "a", "{", "@link", "java", ".",...
6aad6e640b348cda8f3b0841f6e42025233f1eb8
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/BigDecimalTextField.java#L153-L157
train
Sets the BigDecimalFormat to use for parsing.
Of course, here is the Java code you requested: ```java private static final void setBigDecimalFormat(NumberFormat format, Class numberClass) { if (format instanceof DecimalFormat && ((numberClass == BigDecimal.class) || (numberClass == BigInteger.class))) { ((DecimalFormat) format).setParseBigDecimal(true); } ...
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java
ClientUtils.configureFhirRequest
protected void configureFhirRequest(HttpRequest request, String format, List<Header> headers) { request.addHeader("User-Agent", "Java FHIR Client for FHIR"); if (format != null) { request.addHeader("Accept",format); request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET); ...
java
protected void configureFhirRequest(HttpRequest request, String format, List<Header> headers) { request.addHeader("User-Agent", "Java FHIR Client for FHIR"); if (format != null) { request.addHeader("Accept",format); request.addHeader("Content-Type", format + ";charset=" + DEFAULT_CHARSET); ...
[ "protected", "void", "configureFhirRequest", "(", "HttpRequest", "request", ",", "String", "format", ",", "List", "<", "Header", ">", "headers", ")", "{", "request", ".", "addHeader", "(", "\"User-Agent\"", ",", "\"Java FHIR Client for FHIR\"", ")", ";", "if", "...
Method adds required request headers. TODO handle JSON request as well. @param request
[ "Method", "adds", "required", "request", "headers", ".", "TODO", "handle", "JSON", "request", "as", "well", "." ]
150a84d52fe691b7f48fcb28247c4bddb7aec352
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java#L254-L268
train
Configures the HTTP request with the appropriate headers.
Of course, here is the Java code you requested: ```java protected void configureFhirRequest(HttpRequest request, String format, List<Header> headers) { request.addHeader("User-Agent", "Java FHIR Client for FHIR"); if (format != null) { request.addHeader("Accept",format); request.addHeader("...
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/Kryo.java
Kryo.addDefaultSerializer
public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); insertDefaultSerializer(type, new SingletonSerializerFactory(serializer)...
java
public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); insertDefaultSerializer(type, new SingletonSerializerFactory(serializer)...
[ "public", "void", "addDefaultSerializer", "(", "Class", "type", ",", "Serializer", "serializer", ")", "{", "if", "(", "type", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"type cannot be null.\"", ")", ";", "if", "(", "serializer", "==",...
Instances of the specified class will use the specified serializer when {@link #register(Class)} or {@link #register(Class, int)} are called. @see #setDefaultSerializer(Class)
[ "Instances", "of", "the", "specified", "class", "will", "use", "the", "specified", "serializer", "when", "{" ]
a8be1ab26f347f299a3c3f7171d6447dd5390845
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/Kryo.java#L260-L264
train
Add a serializer to the list of serializers to be used for the given type.
Of course, here is the Java code you requested: ```java public void addDefaultSerializer (Class type, Serializer serializer) { if (type == null) throw new IllegalArgumentException("type cannot be null."); if (serializer == null) throw new IllegalArgumentException("serializer cannot be null."); insertDefaultSe...
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/ConditionDateFormatter.java
ConditionDateFormatter.isMatch
@Override public boolean isMatch(final CommonCell cell) { if(!cell.isNumber()) { return false; } final long zeroTime = ExcelDateUtils.getExcelZeroDateTime(cell.isDateStart1904()); final Date date = cell.getDateCellValue(); final long value = date.getTime(...
java
@Override public boolean isMatch(final CommonCell cell) { if(!cell.isNumber()) { return false; } final long zeroTime = ExcelDateUtils.getExcelZeroDateTime(cell.isDateStart1904()); final Date date = cell.getDateCellValue(); final long value = date.getTime(...
[ "@", "Override", "public", "boolean", "isMatch", "(", "final", "CommonCell", "cell", ")", "{", "if", "(", "!", "cell", ".", "isNumber", "(", ")", ")", "{", "return", "false", ";", "}", "final", "long", "zeroTime", "=", "ExcelDateUtils", ".", "getExcelZer...
値が条件に一致するかどうか。 <p>Excelの1900年1月1日を基準に、ミリ秒に直して判定する。 @param cell @return
[ "値が条件に一致するかどうか。", "<p", ">", "Excelの1900年1月1日を基準に、ミリ秒に直して判定する。" ]
e802af273d49889500591e03799c9262cbf29185
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/ConditionDateFormatter.java#L51-L67
train
Check if the cell is a match of the CRS table.
Of course, here is the Java code you requested: ```java @Override public boolean isMatch(final CommonCell cell) { if(!cell.isNumber()) { return false; } final long zeroTime = ExcelDateUtils.getExcelZeroDateTime(cell.isDateStart1904()); final Date date = cell.getD...
google/error-prone
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
ASTHelpers.getAnnotation
@Nullable @Deprecated public static <T extends Annotation> T getAnnotation(Tree tree, Class<T> annotationClass) { Symbol sym = getSymbol(tree); return sym == null ? null : getAnnotation(sym, annotationClass); }
java
@Nullable @Deprecated public static <T extends Annotation> T getAnnotation(Tree tree, Class<T> annotationClass) { Symbol sym = getSymbol(tree); return sym == null ? null : getAnnotation(sym, annotationClass); }
[ "@", "Nullable", "@", "Deprecated", "public", "static", "<", "T", "extends", "Annotation", ">", "T", "getAnnotation", "(", "Tree", "tree", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "Symbol", "sym", "=", "getSymbol", "(", "tree", ")", ";",...
Retrieves an annotation, considering annotation inheritance. @deprecated If {@code annotationClass} contains a member that is a {@code Class} or an array of them, attempting to access that member from the Error Prone checker code will result in a runtime exception. Instead, operate on {@code sym.getAnnotationMirrors()...
[ "Retrieves", "an", "annotation", "considering", "annotation", "inheritance", "." ]
fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L769-L774
train
Get annotation from tree.
Of course, here is the Java code you requested: ```java @Nullable @Deprecated public static <T extends Annotation> T getAnnotation(Tree tree, Class<T> annotationClass) { Symbol sym = getSymbol(tree); return sym == null ? null : getAnnotation(sym, annotationClass); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFindingFilters.java
AwsSecurityFindingFilters.setProcessParentPid
public void setProcessParentPid(java.util.Collection<NumberFilter> processParentPid) { if (processParentPid == null) { this.processParentPid = null; return; } this.processParentPid = new java.util.ArrayList<NumberFilter>(processParentPid); }
java
public void setProcessParentPid(java.util.Collection<NumberFilter> processParentPid) { if (processParentPid == null) { this.processParentPid = null; return; } this.processParentPid = new java.util.ArrayList<NumberFilter>(processParentPid); }
[ "public", "void", "setProcessParentPid", "(", "java", ".", "util", ".", "Collection", "<", "NumberFilter", ">", "processParentPid", ")", "{", "if", "(", "processParentPid", "==", "null", ")", "{", "this", ".", "processParentPid", "=", "null", ";", "return", ...
<p> The parent process ID. </p> @param processParentPid The parent process ID.
[ "<p", ">", "The", "parent", "process", "ID", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFindingFilters.java#L3462-L3469
train
Sets the value processParentPid ;
Of course, here is the Java code you requested: ```java public void setProcessParentPid(java.util.Collection<NumberFilter> processParentPid) { if (processParentPid == null) { this.processParentPid = null; return; } this.processParentPid = new java.util.ArrayList<NumberF...
Sciss/abc4j
abc/src/main/java/abc/notation/MultiNote.java
MultiNote.getStrictDurations
public short[] getStrictDurations() { Vector durations = new Vector(); short currentDuration = 0; for (int i=0; i<m_notes.size(); i++) { currentDuration = ((Note)(m_notes.elementAt(i))).getStrictDuration(); if (durations.indexOf(new Short(currentDuration))==-1) durations.addElement(currentDu...
java
public short[] getStrictDurations() { Vector durations = new Vector(); short currentDuration = 0; for (int i=0; i<m_notes.size(); i++) { currentDuration = ((Note)(m_notes.elementAt(i))).getStrictDuration(); if (durations.indexOf(new Short(currentDuration))==-1) durations.addElement(currentDu...
[ "public", "short", "[", "]", "getStrictDurations", "(", ")", "{", "Vector", "durations", "=", "new", "Vector", "(", ")", ";", "short", "currentDuration", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "m_notes", ".", "size", "(", "...
Returns the strict durations composing this multi notes. @return The strict durations composing this multi notes. The array is sorted from shortest durations to longest ones.
[ "Returns", "the", "strict", "durations", "composing", "this", "multi", "notes", "." ]
117b405642c84a7bfca4e3e13668838258b90ca7
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/notation/MultiNote.java#L222-L249
train
Returns the strict durations of all notes in this note.
Of course, here is the Java code you requested: ```java public short[] getStrictDurations() { Vector durations = new Vector(); short currentDuration = 0; for (int i=0; i<m_notes.size(); i++) { currentDuration = ((Note)(m_notes.elementAt(i))).getStrictDuration(); if (durations.indexOf(new Short(cu...
rupertlssmith/lojix
lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/compiler/InstructionCompiler.java
InstructionCompiler.compileHead
private SizeableLinkedList<WAMInstruction> compileHead(Functor expression) { // Used to build up the results in. SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>(); // Allocate argument registers on the body, to all functors as outermost arguments. ...
java
private SizeableLinkedList<WAMInstruction> compileHead(Functor expression) { // Used to build up the results in. SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>(); // Allocate argument registers on the body, to all functors as outermost arguments. ...
[ "private", "SizeableLinkedList", "<", "WAMInstruction", ">", "compileHead", "(", "Functor", "expression", ")", "{", "// Used to build up the results in.", "SizeableLinkedList", "<", "WAMInstruction", ">", "instructions", "=", "new", "SizeableLinkedList", "<", "WAMInstructio...
Compiles the head of a clause into an instruction listing in WAM. @param expression The clause head to compile. @return A listing of the instructions for the clause head in the WAM instruction set.
[ "Compiles", "the", "head", "of", "a", "clause", "into", "an", "instruction", "listing", "in", "WAM", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/compiler/InstructionCompiler.java#L640-L789
test
Compile the head of a get_struc instruction.
Of course, here is the Java code you requested: ```java private SizeableLinkedList<WAMInstruction> compileHead(Functor expression) { // Used to build up the results in. SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>(); // Allocate argument register...
hivemq/hivemq-spi
src/main/java/com/hivemq/spi/util/PathUtils.java
PathUtils.findAbsoluteAndRelative
public static File findAbsoluteAndRelative(final String fileLocation) { final File file = new File(fileLocation); if (file.isAbsolute()) { return file; } else { return new File(getHiveMQHomeFolder(), fileLocation); } }
java
public static File findAbsoluteAndRelative(final String fileLocation) { final File file = new File(fileLocation); if (file.isAbsolute()) { return file; } else { return new File(getHiveMQHomeFolder(), fileLocation); } }
[ "public", "static", "File", "findAbsoluteAndRelative", "(", "final", "String", "fileLocation", ")", "{", "final", "File", "file", "=", "new", "File", "(", "fileLocation", ")", ";", "if", "(", "file", ".", "isAbsolute", "(", ")", ")", "{", "return", "file",...
Tries to find a file in the given absolute path or relative to the HiveMQ home folder @param fileLocation the absolute or relative path @return a file
[ "Tries", "to", "find", "a", "file", "in", "the", "given", "absolute", "path", "or", "relative", "to", "the", "HiveMQ", "home", "folder" ]
55fa89ccb081ad5b6d46eaca02179272148e64ed
https://github.com/hivemq/hivemq-spi/blob/55fa89ccb081ad5b6d46eaca02179272148e64ed/src/main/java/com/hivemq/spi/util/PathUtils.java#L89-L96
train
Find absolute and relative file location.
Of course, here is the Java code you requested: ```java public static File findAbsoluteAndRelative(final String fileLocation) { final File file = new File(fileLocation); if (file.isAbsolute()) { return file; } else { return new File(getHiveMQHomeFolder(), fileLocation); ...
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java
JUnit3FloatingPointComparisonWithoutDelta.getDeltaInsertionIndex
private int getDeltaInsertionIndex( MethodInvocationTree methodInvocationTree, VisitorState state) { JCTree lastArgument = (JCTree) Iterables.getLast(methodInvocationTree.getArguments()); return state.getEndPosition(lastArgument); }
java
private int getDeltaInsertionIndex( MethodInvocationTree methodInvocationTree, VisitorState state) { JCTree lastArgument = (JCTree) Iterables.getLast(methodInvocationTree.getArguments()); return state.getEndPosition(lastArgument); }
[ "private", "int", "getDeltaInsertionIndex", "(", "MethodInvocationTree", "methodInvocationTree", ",", "VisitorState", "state", ")", "{", "JCTree", "lastArgument", "=", "(", "JCTree", ")", "Iterables", ".", "getLast", "(", "methodInvocationTree", ".", "getArguments", "...
Gets the index of where to insert the delta argument.
[ "Gets", "the", "index", "of", "where", "to", "insert", "the", "delta", "argument", "." ]
fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java#L155-L159
train
Gets the delta insertion index.
Of course, here is the Java code you requested: ```java private int getDeltaInsertionIndex( MethodInvocationTree methodInvocationTree, VisitorState state) { JCTree lastArgument = (JCTree) Iterables.getLast(methodInvocationTree.getArguments()); return state.getEndPosition(lastArgument); } ``` Hope this...
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.servlet.3.1/src/com/ibm/ws/webcontainer31/util/UpgradeInputByteBufferUtil.java
UpgradeInputByteBufferUtil.syncRead
private boolean syncRead(int amountToRead) throws IOException{ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){ Tr.debug(tc, "syncRead, Executing a synchronous read"); } // Allocate the buffer and set it on the TCP Channel setAndAllocateBuffer(amountToRea...
java
private boolean syncRead(int amountToRead) throws IOException{ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){ Tr.debug(tc, "syncRead, Executing a synchronous read"); } // Allocate the buffer and set it on the TCP Channel setAndAllocateBuffer(amountToRea...
[ "private", "boolean", "syncRead", "(", "int", "amountToRead", ")", "throws", "IOException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", ...
Issues a synchronous read to the TCP Channel. @return If we have read any data or not @throws IOException
[ "Issues", "a", "synchronous", "read", "to", "the", "TCP", "Channel", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.servlet.3.1/src/com/ibm/ws/webcontainer31/util/UpgradeInputByteBufferUtil.java#L119-L151
train
This method is called by the read thread to read a number of bytes from the TCP Channel.
Of course, here is the Java code you requested: ```java private boolean syncRead(int amountToRead) throws IOException{ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){ Tr.debug(tc, "syncRead, Executing a synchronous read"); } // Allocate the buffer and set it ...
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toSortedMap
public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { SortedMap<K, V> map = isParallel() ? new ConcurrentSkipListMap<>() : new TreeMap<>(); return toMapThrowing(keyMapper, valMapper, map); }
java
public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { SortedMap<K, V> map = isParallel() ? new ConcurrentSkipListMap<>() : new TreeMap<>(); return toMapThrowing(keyMapper, valMapper, map); }
[ "public", "<", "K", ",", "V", ">", "SortedMap", "<", "K", ",", "V", ">", "toSortedMap", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keyMapper", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ">", ...
Returns a {@link SortedMap} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Object)}), an {@code IllegalSt...
[ "Returns", "a", "{", "@link", "SortedMap", "}", "whose", "keys", "and", "values", "are", "the", "result", "of", "applying", "the", "provided", "mapping", "functions", "to", "the", "input", "elements", "." ]
936bbd1b7dfbcf64a3b990682bfc848213441d14
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1107-L1111
train
Returns a SortedMap that maps the elements of this map to the elements of the specified key and value using the specified mapping function.
Of course, here is the Java code you requested: ```java public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { SortedMap<K, V> map = isParallel() ? new ConcurrentSkipListMap<>() : new TreeMap<>(); return toMapThrow...
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/MonomerStore.java
MonomerStore.hasMonomer
public boolean hasMonomer(String polymerType, String alternateId) { return ((monomerDB.get(polymerType) != null) && getMonomer(polymerType, alternateId) != null); }
java
public boolean hasMonomer(String polymerType, String alternateId) { return ((monomerDB.get(polymerType) != null) && getMonomer(polymerType, alternateId) != null); }
[ "public", "boolean", "hasMonomer", "(", "String", "polymerType", ",", "String", "alternateId", ")", "{", "return", "(", "(", "monomerDB", ".", "get", "(", "polymerType", ")", "!=", "null", ")", "&&", "getMonomer", "(", "polymerType", ",", "alternateId", ")",...
Checks if a specific monomer exists in the store @param polymerType polymer type of monomer @param alternateId alternateId of monomer @return true if monomer exists, false if not
[ "Checks", "if", "a", "specific", "monomer", "exists", "in", "the", "store" ]
ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/MonomerStore.java#L140-L142
train
Checks if a Monomer exists in the database.
Of course, here is the Java code you requested: ```java public boolean hasMonomer(String polymerType, String alternateId) { return ((monomerDB.get(polymerType) != null) && getMonomer(polymerType, alternateId) != null); } ``` Hope this helps!
SourcePond/fileobserver
fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/directory/RootDirectory.java
RootDirectory.relativizeAgainstRoot
@Override Path relativizeAgainstRoot(final WatchedDirectory pWatchedDirectory, final Path pPath) { // Because we are on the last root directory possible we can ignore the // directory key here. return getPath().relativize(pPath); }
java
@Override Path relativizeAgainstRoot(final WatchedDirectory pWatchedDirectory, final Path pPath) { // Because we are on the last root directory possible we can ignore the // directory key here. return getPath().relativize(pPath); }
[ "@", "Override", "Path", "relativizeAgainstRoot", "(", "final", "WatchedDirectory", "pWatchedDirectory", ",", "final", "Path", "pPath", ")", "{", "// Because we are on the last root directory possible we can ignore the", "// directory key here.", "return", "getPath", "(", ")", ...
/* Relativizes the path specified against the path of this directory.
[ "/", "*", "Relativizes", "the", "path", "specified", "against", "the", "path", "of", "this", "directory", "." ]
dfb3055ed35759a47f52f6cfdea49879c415fd6b
https://github.com/SourcePond/fileobserver/blob/dfb3055ed35759a47f52f6cfdea49879c415fd6b/fileobserver-impl/src/main/java/ch/sourcepond/io/fileobserver/impl/directory/RootDirectory.java#L93-L98
train
Relativize a path against the root of the watched directory.
Of course, here is the Java code you requested: ```java @Override Path relativizeAgainstRoot(final WatchedDirectory pWatchedDirectory, final Path pPath) { // Because we are on the last root directory possible we can ignore the // directory key here. return getPath().relativize(pPath); }...
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.collectValues
public static <K, V, V2, R extends Map<K, V2>> R collectValues( Map<K, V> map, final Function2<? super K, ? super V, ? extends V2> function, final R target) { MapIterate.forEachKeyValue(map, new Procedure2<K, V>() { public void value(K key, V value) ...
java
public static <K, V, V2, R extends Map<K, V2>> R collectValues( Map<K, V> map, final Function2<? super K, ? super V, ? extends V2> function, final R target) { MapIterate.forEachKeyValue(map, new Procedure2<K, V>() { public void value(K key, V value) ...
[ "public", "static", "<", "K", ",", "V", ",", "V2", ",", "R", "extends", "Map", "<", "K", ",", "V2", ">", ">", "R", "collectValues", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "final", "Function2", "<", "?", "super", "K", ",", "?", "supe...
For each key and value of the map, the function is evaluated with the key and value as the parameter. The results of these evaluations are collected into the target map.
[ "For", "each", "key", "and", "value", "of", "the", "map", "the", "function", "is", "evaluated", "with", "the", "key", "and", "value", "as", "the", "parameter", ".", "The", "results", "of", "these", "evaluations", "are", "collected", "into", "the", "target"...
fa8bf3e103689efa18bca2ab70203e71cde34b52
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L668-L682
train
Collect values from a map using a function.
Of course, here is the Java code you requested: ```java public static <K, V, V2, R extends Map<K, V2>> R collectValues( Map<K, V> map, final Function2<? super K, ? super V, ? extends V2> function, final R target) { MapIterate.forEachKeyValue(map, new Procedure2<K, V>() ...
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.resumeSession
public ResumeSessionResponse resumeSession(ResumeSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createReque...
java
public ResumeSessionResponse resumeSession(ResumeSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createReque...
[ "public", "ResumeSessionResponse", "resumeSession", "(", "ResumeSessionRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSessionId", "(", ")", ",",...
Resume your live session by live session id. @param request The request object containing all parameters for resuming live session. @return the response
[ "Resume", "your", "live", "session", "by", "live", "session", "id", "." ]
f7140f28dd82121515c88ded7bfe769a37d0ec4a
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L948-L955
train
Resume a session
Of course, here is the Java code you requested: ```java public ResumeSessionResponse resumeSession(ResumeSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string....
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
ISPNCacheWorkspaceStorageCache.getDataRestorer
public DataRestore getDataRestorer(DataRestoreContext context) throws BackupException { return new DataRestore() { /** * {@inheritDoc} */ public void clean() throws BackupException { LOG.info("Start to clean all the existing items from I...
java
public DataRestore getDataRestorer(DataRestoreContext context) throws BackupException { return new DataRestore() { /** * {@inheritDoc} */ public void clean() throws BackupException { LOG.info("Start to clean all the existing items from I...
[ "public", "DataRestore", "getDataRestorer", "(", "DataRestoreContext", "context", ")", "throws", "BackupException", "{", "return", "new", "DataRestore", "(", ")", "{", "/**\r\n * {@inheritDoc}\r\n */", "public", "void", "clean", "(", ")", "throws", "Ba...
{@inheritDoc}
[ "{" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1763-L1805
train
Gets the data restore method.
Of course, here is the Java code you requested: ```java public DataRestore getDataRestorer(DataRestoreContext context) throws BackupException { return new DataRestore() { /** * {@inheritDoc} */ public void clean() throws BackupException { ...
qos-ch/slf4j
slf4j-jdk14/src/main/java/org/slf4j/jul/JDK14LoggerFactory.java
JDK14LoggerFactory.getLogger
public Logger getLogger(String name) { // the root logger is called "" in JUL if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) { name = ""; } Logger slf4jLogger = loggerMap.get(name); if (slf4jLogger != null) return slf4jLogger; else { ...
java
public Logger getLogger(String name) { // the root logger is called "" in JUL if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) { name = ""; } Logger slf4jLogger = loggerMap.get(name); if (slf4jLogger != null) return slf4jLogger; else { ...
[ "public", "Logger", "getLogger", "(", "String", "name", ")", "{", "// the root logger is called \"\" in JUL", "if", "(", "name", ".", "equalsIgnoreCase", "(", "Logger", ".", "ROOT_LOGGER_NAME", ")", ")", "{", "name", "=", "\"\"", ";", "}", "Logger", "slf4jLogger...
/* (non-Javadoc) @see org.slf4j.ILoggerFactory#getLogger(java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
905443f39fadd88a8dd2c467e44affd8cb072a4d
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/slf4j-jdk14/src/main/java/org/slf4j/jul/JDK14LoggerFactory.java#L56-L71
train
Get a Logger by name.
Of course, here is the Java code you requested: ```java public Logger getLogger(String name) { // the root logger is called "" in JUL if (name.equalsIgnoreCase(Logger.ROOT_LOGGER_NAME)) { name = ""; } Logger slf4jLogger = loggerMap.get(name); if (slf4jLogger != null...
nebula-plugins/gradle-metrics-plugin
src/main/java/nebula/plugin/metrics/model/BuildMetrics.java
BuildMetrics.getProjectProfile
public ProjectMetrics getProjectProfile(String projectPath) { ProjectMetrics result = projects.get(projectPath); if (result == null) { result = new ProjectMetrics(projectPath); projects.put(projectPath, result); } return result; }
java
public ProjectMetrics getProjectProfile(String projectPath) { ProjectMetrics result = projects.get(projectPath); if (result == null) { result = new ProjectMetrics(projectPath); projects.put(projectPath, result); } return result; }
[ "public", "ProjectMetrics", "getProjectProfile", "(", "String", "projectPath", ")", "{", "ProjectMetrics", "result", "=", "projects", ".", "get", "(", "projectPath", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "ProjectMetrics",...
Get the profiling container for the specified project @param projectPath to look up
[ "Get", "the", "profiling", "container", "for", "the", "specified", "project" ]
f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3
https://github.com/nebula-plugins/gradle-metrics-plugin/blob/f074e7c2b9a5f5f3ca06bf9fade486e47e80f4a3/src/main/java/nebula/plugin/metrics/model/BuildMetrics.java#L89-L96
train
Gets the ProjectMetrics object for a given project path.
Of course, here is the Java code you requested: ```java public ProjectMetrics getProjectProfile(String projectPath) { ProjectMetrics result = projects.get(projectPath); if (result == null) { result = new ProjectMetrics(projectPath); projects.put(projectPath, result); } ...
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/tx/narayana/XAResourceWrapperStatImpl.java
XAResourceWrapperStatImpl.prepare
public int prepare(Xid xid) throws XAException { long l1 = System.currentTimeMillis(); try { return super.prepare(xid); } finally { xastat.deltaPrepare(System.currentTimeMillis() - l1); } }
java
public int prepare(Xid xid) throws XAException { long l1 = System.currentTimeMillis(); try { return super.prepare(xid); } finally { xastat.deltaPrepare(System.currentTimeMillis() - l1); } }
[ "public", "int", "prepare", "(", "Xid", "xid", ")", "throws", "XAException", "{", "long", "l1", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "return", "super", ".", "prepare", "(", "xid", ")", ";", "}", "finally", "{", "xastat", ...
{@inheritDoc}
[ "{" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/tx/narayana/XAResourceWrapperStatImpl.java#L123-L134
train
prepare is called to prepare the transaction.
Of course, here is the Java code you requested: ```java public int prepare(Xid xid) throws XAException { long l1 = System.currentTimeMillis(); try { return super.prepare(xid); } finally { xastat.deltaPrepare(System.currentTimeMillis() - l1); } } ``` Ho...
watson-developer-cloud/java-sdk
text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/websocket/BaseSynthesizeCallback.java
BaseSynthesizeCallback.onWarning
public void onWarning(Exception e) { LOG.log(Level.WARNING, e.getMessage(), e); }
java
public void onWarning(Exception e) { LOG.log(Level.WARNING, e.getMessage(), e); }
[ "public", "void", "onWarning", "(", "Exception", "e", ")", "{", "LOG", ".", "log", "(", "Level", ".", "WARNING", ",", "e", ".", "getMessage", "(", ")", ",", "e", ")", ";", "}" ]
/* (non-Javadoc) @see com.ibm.watson.developer_cloud.text_to_speech.v1.websocket.SynthesizeCallback#onWarning(java.lang .Exception)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
c926117afd20e2002b69942537720ab733a914f3
https://github.com/watson-developer-cloud/java-sdk/blob/c926117afd20e2002b69942537720ab733a914f3/text-to-speech/src/main/java/com/ibm/watson/text_to_speech/v1/websocket/BaseSynthesizeCallback.java#L35-L37
train
Logs warning.
Of course, here is the Java code you requested: ```java public void onWarning(Exception e) { LOG.log(Level.WARNING, e.getMessage(), e); } ``` Hope this helps!
OpenEstate/OpenEstate-IO
IS24-XML/src/main/java/org/openestate/io/is24_xml/Is24XmlUtils.java
Is24XmlUtils.createDocument
public static Is24XmlDocument createDocument(Document doc) { if (Is24XmlDocument.isReadable(doc)) return new Is24XmlDocument(doc); else return null; }
java
public static Is24XmlDocument createDocument(Document doc) { if (Is24XmlDocument.isReadable(doc)) return new Is24XmlDocument(doc); else return null; }
[ "public", "static", "Is24XmlDocument", "createDocument", "(", "Document", "doc", ")", "{", "if", "(", "Is24XmlDocument", ".", "isReadable", "(", "doc", ")", ")", "return", "new", "Is24XmlDocument", "(", "doc", ")", ";", "else", "return", "null", ";", "}" ]
Creates a {@link Is24XmlDocument} from a {@link Document}. @param doc XML document @return created document or null, of the document is not supported by this format
[ "Creates", "a", "{", "@link", "Is24XmlDocument", "}", "from", "a", "{", "@link", "Document", "}", "." ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/IS24-XML/src/main/java/org/openestate/io/is24_xml/Is24XmlUtils.java#L129-L134
test
Create a Is24XmlDocument from a Document.
Of course, here is the Java code you requested: ```java public static Is24XmlDocument createDocument(Document doc) { if (Is24XmlDocument.isReadable(doc)) return new Is24XmlDocument(doc); else return null; } ``` Hope this helps!
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoApi/helpers/CommandHelper.java
CommandHelper.extract
public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case TangoConst.Tango_DEV_USHORT: argout = Integer.valueOf(de...
java
public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case TangoConst.Tango_DEV_USHORT: argout = Integer.valueOf(de...
[ "public", "static", "Object", "extract", "(", "final", "DeviceData", "deviceDataArgout", ")", "throws", "DevFailed", "{", "Object", "argout", "=", "null", ";", "switch", "(", "deviceDataArgout", ".", "getType", "(", ")", ")", "{", "case", "TangoConst", ".", ...
Extract data to DeviceData to an Object @param deviceDataArgout the DeviceData to read @return Object, possibles Classe : Short, String, Long, Float, Boolean, Integer, Double, DevState, DevVarDoubleStringArray or DevVarLongStringArray. @throws DevFailed
[ "Extract", "data", "to", "DeviceData", "to", "an", "Object" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoApi/helpers/CommandHelper.java#L113-L176
train
Extract data from DeviceData object.
Of course, here is the Java code you requested: ```java public static Object extract(final DeviceData deviceDataArgout) throws DevFailed { Object argout = null; switch (deviceDataArgout.getType()) { case TangoConst.Tango_DEV_SHORT: argout = Short.valueOf(deviceDataArgout.extractShort()); break; case Tang...
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/client/AbstractClient.java
AbstractClient.match
@Override public Client match(EntityTag tag, boolean ifNot) { String hName = ifNot ? HttpHeaders.IF_NONE_MATCH : HttpHeaders.IF_MATCH; state.getRequestHeaders().putSingle(hName, tag.toString()); return this; }
java
@Override public Client match(EntityTag tag, boolean ifNot) { String hName = ifNot ? HttpHeaders.IF_NONE_MATCH : HttpHeaders.IF_MATCH; state.getRequestHeaders().putSingle(hName, tag.toString()); return this; }
[ "@", "Override", "public", "Client", "match", "(", "EntityTag", "tag", ",", "boolean", "ifNot", ")", "{", "String", "hName", "=", "ifNot", "?", "HttpHeaders", ".", "IF_NONE_MATCH", ":", "HttpHeaders", ".", "IF_MATCH", ";", "state", ".", "getRequestHeaders", ...
{@inheritDoc}
[ "{" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/client/AbstractClient.java#L263-L268
train
Sets the if - match header.
Of course, here is the Java code you requested: ```java @Override public Client match(EntityTag tag, boolean ifNot) { String hName = ifNot ? HttpHeaders.IF_NONE_MATCH : HttpHeaders.IF_MATCH; state.getRequestHeaders().putSingle(hName, tag.toString()); return this; } ``` Hope this helps!
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/api/BooleanColumn.java
BooleanColumn.set
public BooleanColumn set(Selection rowSelection, boolean newValue) { for (int row : rowSelection) { set(row, newValue); } return this; }
java
public BooleanColumn set(Selection rowSelection, boolean newValue) { for (int row : rowSelection) { set(row, newValue); } return this; }
[ "public", "BooleanColumn", "set", "(", "Selection", "rowSelection", ",", "boolean", "newValue", ")", "{", "for", "(", "int", "row", ":", "rowSelection", ")", "{", "set", "(", "row", ",", "newValue", ")", ";", "}", "return", "this", ";", "}" ]
Conditionally update this column, replacing current values with newValue for all rows where the current value matches the selection criteria
[ "Conditionally", "update", "this", "column", "replacing", "current", "values", "with", "newValue", "for", "all", "rows", "where", "the", "current", "value", "matches", "the", "selection", "criteria" ]
68a75b4098ac677e9486df5572cf13ec39f9f701
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/api/BooleanColumn.java#L558-L563
train
Sets the value of the rowSelection column to the new value.
Of course, here is the Java code you requested: ```java public BooleanColumn set(Selection rowSelection, boolean newValue) { for (int row : rowSelection) { set(row, newValue); } return this; } ``` Hope this helps!
wanglinsong/thx-webservice
src/main/java/com/tascape/qa/th/ws/comm/WebServiceCommunication.java
WebServiceCommunication.head
public Header[] head(String endpoint, String params) throws IOException { return this.head(endpoint, params, ""); }
java
public Header[] head(String endpoint, String params) throws IOException { return this.head(endpoint, params, ""); }
[ "public", "Header", "[", "]", "head", "(", "String", "endpoint", ",", "String", "params", ")", "throws", "IOException", "{", "return", "this", ".", "head", "(", "endpoint", ",", "params", ",", "\"\"", ")", ";", "}" ]
Issues HTTP HEAD request, returns response headers. @param endpoint endpoint of request url @param params request line parameters @return response headers @throws IOException in case of any IO related issue
[ "Issues", "HTTP", "HEAD", "request", "returns", "response", "headers", "." ]
29bc084b09ad35b012eb7c6b5c9ee55337ddee28
https://github.com/wanglinsong/thx-webservice/blob/29bc084b09ad35b012eb7c6b5c9ee55337ddee28/src/main/java/com/tascape/qa/th/ws/comm/WebServiceCommunication.java#L508-L510
train
Get a list of headers from a URL.
Of course, here is the Java code you requested: ```java public Header[] head(String endpoint, String params) throws IOException { return this.head(endpoint, params, ""); } ``` Hope this helps!
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/user/AbstractUserObject.java
AbstractUserObject.getUserObject
public static AbstractUserObject getUserObject(final UUID _uuid) throws EFapsException { AbstractUserObject ret = Role.get(_uuid); if (ret == null) { ret = Group.get(_uuid); } if (ret == null) { ret = Company.get(_uuid); } if (ret == nu...
java
public static AbstractUserObject getUserObject(final UUID _uuid) throws EFapsException { AbstractUserObject ret = Role.get(_uuid); if (ret == null) { ret = Group.get(_uuid); } if (ret == null) { ret = Company.get(_uuid); } if (ret == nu...
[ "public", "static", "AbstractUserObject", "getUserObject", "(", "final", "UUID", "_uuid", ")", "throws", "EFapsException", "{", "AbstractUserObject", "ret", "=", "Role", ".", "get", "(", "_uuid", ")", ";", "if", "(", "ret", "==", "null", ")", "{", "ret", "...
Returns for given parameter <i>_uuid</i> the instance of class {@link AbstractUserObject}. The returned AbstractUserObject can be a {@link Role}, {@link Group}, {@link Company}, {@link Consortium} or {@link Person}. It is searched in the given sequence. User is searched last due to the reason that it is the only object...
[ "Returns", "for", "given", "parameter", "<i", ">", "_uuid<", "/", "i", ">", "the", "instance", "of", "class", "{", "@link", "AbstractUserObject", "}", ".", "The", "returned", "AbstractUserObject", "can", "be", "a", "{", "@link", "Role", "}", "{", "@link", ...
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/user/AbstractUserObject.java#L438-L455
train
Get the user object from the given UUID.
Of course, here is the Java code you requested: ```java public static AbstractUserObject getUserObject(final UUID _uuid) throws EFapsException { AbstractUserObject ret = Role.get(_uuid); if (ret == null) { ret = Group.get(_uuid); } if (ret == null) { ...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java
CmsAreaSelectPanel.setSelectPositionY
private void setSelectPositionY(int posY, int height) { m_markerStyle.setTop(posY, Unit.PX); m_markerStyle.setHeight(height, Unit.PX); m_overlayTopStyle.setHeight(posY, Unit.PX); m_overlayBottomStyle.setHeight(m_elementHeight - posY - height, Unit.PX); m_currentSelection.setTo...
java
private void setSelectPositionY(int posY, int height) { m_markerStyle.setTop(posY, Unit.PX); m_markerStyle.setHeight(height, Unit.PX); m_overlayTopStyle.setHeight(posY, Unit.PX); m_overlayBottomStyle.setHeight(m_elementHeight - posY - height, Unit.PX); m_currentSelection.setTo...
[ "private", "void", "setSelectPositionY", "(", "int", "posY", ",", "int", "height", ")", "{", "m_markerStyle", ".", "setTop", "(", "posY", ",", "Unit", ".", "PX", ")", ";", "m_markerStyle", ".", "setHeight", "(", "height", ",", "Unit", ".", "PX", ")", "...
Sets Y position and height of the select area.<p> @param posY the new Y position @param height the new height
[ "Sets", "Y", "position", "and", "height", "of", "the", "select", "area", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java#L813-L823
train
Set the top and height of the select area to the given position.
Of course, here is the Java code you requested: ```java private void setSelectPositionY(int posY, int height) { m_markerStyle.setTop(posY, Unit.PX); m_markerStyle.setHeight(height, Unit.PX); m_overlayTopStyle.setHeight(posY, Unit.PX); m_overlayBottomStyle.setHeight(m_elementHeight - p...
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
PgDatabaseMetaData.getSQLKeywords
@Override public String getSQLKeywords() throws SQLException { connection.checkClosed(); if (keywords == null) { if (connection.haveMinimumServerVersion(ServerVersion.v9_0)) { // Exclude SQL:2003 keywords (https://github.com/ronsavage/SQL/blob/master/sql-2003-2.bnf) // from the returned ...
java
@Override public String getSQLKeywords() throws SQLException { connection.checkClosed(); if (keywords == null) { if (connection.haveMinimumServerVersion(ServerVersion.v9_0)) { // Exclude SQL:2003 keywords (https://github.com/ronsavage/SQL/blob/master/sql-2003-2.bnf) // from the returned ...
[ "@", "Override", "public", "String", "getSQLKeywords", "(", ")", "throws", "SQLException", "{", "connection", ".", "checkClosed", "(", ")", ";", "if", "(", "keywords", "==", "null", ")", "{", "if", "(", "connection", ".", "haveMinimumServerVersion", "(", "Se...
{@inheritDoc} <p>From PostgreSQL 9.0+ return the keywords from pg_catalog.pg_get_keywords()</p> @return a comma separated list of keywords we use @throws SQLException if a database access error occurs
[ "{", "@inheritDoc", "}" ]
95ba7b261e39754674c5817695ae5ebf9a341fae
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java#L251-L343
train
Get the SQL keywords.
Of course, here is the Java code you requested: ```java @Override public String getSQLKeywords() throws SQLException { connection.checkClosed(); if (keywords == null) { if (connection.haveMinimumServerVersion(ServerVersion.v9_0)) { // Exclude SQL:2003 keywords (https://github.com/ronsavage/SQL/...
demidenko05/beigesoft-webcrud-jar
src/main/java/org/beigesoft/web/factory/AFactoryAppBeans.java
AFactoryAppBeans.lazyGet
@Override public final Object lazyGet( final String pBeanName) throws Exception { if (this.isReconfiguring) { throw new ExceptionWithCode(ExceptionWithCode.SYSTEM_RECONFIGURING, "system_reconfiguring"); } if (this.isReinitializing) { // locking: synchronized (this) { ...
java
@Override public final Object lazyGet( final String pBeanName) throws Exception { if (this.isReconfiguring) { throw new ExceptionWithCode(ExceptionWithCode.SYSTEM_RECONFIGURING, "system_reconfiguring"); } if (this.isReinitializing) { // locking: synchronized (this) { ...
[ "@", "Override", "public", "final", "Object", "lazyGet", "(", "final", "String", "pBeanName", ")", "throws", "Exception", "{", "if", "(", "this", ".", "isReconfiguring", ")", "{", "throw", "new", "ExceptionWithCode", "(", "ExceptionWithCode", ".", "SYSTEM_RECONF...
<p>Get bean in lazy mode (if bean is null then initialize it).</p> @param pBeanName - bean name @return Object - requested bean @throws Exception - an exception
[ "<p", ">", "Get", "bean", "in", "lazy", "mode", "(", "if", "bean", "is", "null", "then", "initialize", "it", ")", ".", "<", "/", "p", ">" ]
e973170f8fc1f164f0b67af9bb6a52b04579b64a
https://github.com/demidenko05/beigesoft-webcrud-jar/blob/e973170f8fc1f164f0b67af9bb6a52b04579b64a/src/main/java/org/beigesoft/web/factory/AFactoryAppBeans.java#L248-L370
train
Get a Ckeck bean.
Of course, here is the Java code you requested: ```java @Override public final Object lazyGet( final String pBeanName) throws Exception { if (this.isReconfiguring) { throw new ExceptionWithCode(ExceptionWithCode.SYSTEM_RECONFIGURING, "system_reconfiguring"); } if (this.isReinitializing)...
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/callback/KansujiConverter.java
KansujiConverter.replace4Digits
protected String replace4Digits(final String value) { // 桁ごとに変換を行う。 final int length = value.length(); final List<String> digits = new ArrayList<>(); for(int i=0; i < length; i++) { // 下の桁から処理する final char c = value.charAt(length-i-1); if(c ...
java
protected String replace4Digits(final String value) { // 桁ごとに変換を行う。 final int length = value.length(); final List<String> digits = new ArrayList<>(); for(int i=0; i < length; i++) { // 下の桁から処理する final char c = value.charAt(length-i-1); if(c ...
[ "protected", "String", "replace4Digits", "(", "final", "String", "value", ")", "{", "// 桁ごとに変換を行う。\r", "final", "int", "length", "=", "value", ".", "length", "(", ")", ";", "final", "List", "<", "String", ">", "digits", "=", "new", "ArrayList", "<>", "(", ...
4桁以下の数字を、漢数字に変換する。 @param value @return
[ "4桁以下の数字を、漢数字に変換する。" ]
e802af273d49889500591e03799c9262cbf29185
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/callback/KansujiConverter.java#L164-L202
train
Replace 4 digits in a string.
Of course, here is the Java code you requested: ```java protected String replace4Digits(final String value) { // 桁ごとに変換を行う。 final int length = value.length(); final List<String> digits = new ArrayList<>(); for(int i=0; i < length; i++) { // 下の桁から処理する fi...
joaovicente/Tracy
src/main/java/com/apm4all/tracy/Tracy.java
Tracy.getEvents
public static List<TracyEvent> getEvents() { TracyThreadContext ctx = threadContext.get(); List<TracyEvent> events = EMPTY_TRACY_EVENT_LIST; if (isValidContext(ctx)) { events = ctx.getPoppedList(); } return events; }
java
public static List<TracyEvent> getEvents() { TracyThreadContext ctx = threadContext.get(); List<TracyEvent> events = EMPTY_TRACY_EVENT_LIST; if (isValidContext(ctx)) { events = ctx.getPoppedList(); } return events; }
[ "public", "static", "List", "<", "TracyEvent", ">", "getEvents", "(", ")", "{", "TracyThreadContext", "ctx", "=", "threadContext", ".", "get", "(", ")", ";", "List", "<", "TracyEvent", ">", "events", "=", "EMPTY_TRACY_EVENT_LIST", ";", "if", "(", "isValidCon...
Once all work has been done, and TracyEvents are ready to be collected you can collect them using this method @return list of TracyEvents
[ "Once", "all", "work", "has", "been", "done", "and", "TracyEvents", "are", "ready", "to", "be", "collected", "you", "can", "collect", "them", "using", "this", "method" ]
822d3aa335c1801df25ae6e67c22466368de3747
https://github.com/joaovicente/Tracy/blob/822d3aa335c1801df25ae6e67c22466368de3747/src/main/java/com/apm4all/tracy/Tracy.java#L316-L323
train
Gets the tracy events.
Of course, here is the Java code you requested: ```java public static List<TracyEvent> getEvents() { TracyThreadContext ctx = threadContext.get(); List<TracyEvent> events = EMPTY_TRACY_EVENT_LIST; if (isValidContext(ctx)) { events = ctx.getPoppedList(); } return even...
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/Progress.java
Progress.get
public synchronized float get() { Progress node = this; while (node.parent != null) { // find the root node = parent; } return node.getInternal(); }
java
public synchronized float get() { Progress node = this; while (node.parent != null) { // find the root node = parent; } return node.getInternal(); }
[ "public", "synchronized", "float", "get", "(", ")", "{", "Progress", "node", "=", "this", ";", "while", "(", "node", ".", "parent", "!=", "null", ")", "{", "// find the root", "node", "=", "parent", ";", "}", "return", "node", ".", "getInternal", "(", ...
and the node's parent never changes. Still, it doesn't hurt.
[ "and", "the", "node", "s", "parent", "never", "changes", ".", "Still", "it", "doesn", "t", "hurt", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/Progress.java#L91-L97
train
Get the value of the node.
Of course, here is the Java code you requested: ```java public synchronized float get() { Progress node = this; while (node.parent != null) { // find the root node = parent; } return node.getInternal(); } ``` Hope this helps!
looly/hutool
hutool-core/src/main/java/cn/hutool/core/bean/BeanDesc.java
BeanDesc.isMatchGetter
private boolean isMatchGetter(String methodName, String fieldName, boolean isBooeanField) { // 全部转为小写,忽略大小写比较 methodName = methodName.toLowerCase(); fieldName = fieldName.toLowerCase(); if (false == methodName.startsWith("get") && false == methodName.startsWith("is")) { // 非标准Getter方法 return false...
java
private boolean isMatchGetter(String methodName, String fieldName, boolean isBooeanField) { // 全部转为小写,忽略大小写比较 methodName = methodName.toLowerCase(); fieldName = fieldName.toLowerCase(); if (false == methodName.startsWith("get") && false == methodName.startsWith("is")) { // 非标准Getter方法 return false...
[ "private", "boolean", "isMatchGetter", "(", "String", "methodName", ",", "String", "fieldName", ",", "boolean", "isBooeanField", ")", "{", "// 全部转为小写,忽略大小写比较\r", "methodName", "=", "methodName", ".", "toLowerCase", "(", ")", ";", "fieldName", "=", "fieldName", "."...
方法是否为Getter方法<br> 匹配规则如下(忽略大小写): <pre> 字段名 -》 方法名 isName -》 isName isName -》 isIsName isName -》 getIsName name -》 isName name -》 getName </pre> @param methodName 方法名 @param fieldName 字段名 @param isBooeanField 是否为Boolean类型字段 @return 是否匹配
[ "方法是否为Getter方法<br", ">", "匹配规则如下(忽略大小写):" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/BeanDesc.java#L217-L249
train
Checks if the specified method name and field name match the getter method name.
Of course, here is the Java code you requested: ```java private boolean isMatchGetter(String methodName, String fieldName, boolean isBooeanField) { // 全部转为小写,忽略大小写比较 methodName = methodName.toLowerCase(); fieldName = fieldName.toLowerCase(); if (false == methodName.startsWith("get") && false == methodNam...
zhangguangyong/codes
codes-common/src/main/java/com/codes/common/util/Pinyins.java
Pinyins.getFirstLetter
public static String getFirstLetter(String text, String separator) { try { PinyinFormat format = new PinyinFormat(); format.setCutFormat(PinyinCUTFormat.CUT_FIRST_LETTER); format.setToneFormat(PinyinTONEFormat.TONE_NONE); if ($.notNull(separator)) { format.setSeparator(separator); } retu...
java
public static String getFirstLetter(String text, String separator) { try { PinyinFormat format = new PinyinFormat(); format.setCutFormat(PinyinCUTFormat.CUT_FIRST_LETTER); format.setToneFormat(PinyinTONEFormat.TONE_NONE); if ($.notNull(separator)) { format.setSeparator(separator); } retu...
[ "public", "static", "String", "getFirstLetter", "(", "String", "text", ",", "String", "separator", ")", "{", "try", "{", "PinyinFormat", "format", "=", "new", "PinyinFormat", "(", ")", ";", "format", ".", "setCutFormat", "(", "PinyinCUTFormat", ".", "CUT_FIRST...
获取字符串首字母小写,指定分隔符 @param text @param separator @return
[ "获取字符串首字母小写", "指定分隔符" ]
5585c17ea46af665582734f399c05dfbba18c30d
https://github.com/zhangguangyong/codes/blob/5585c17ea46af665582734f399c05dfbba18c30d/codes-common/src/main/java/com/codes/common/util/Pinyins.java#L105-L119
train
Gets the first letter of a text.
Of course, here is the Java code you requested: ```java public static String getFirstLetter(String text, String separator) { try { PinyinFormat format = new PinyinFormat(); format.setCutFormat(PinyinCUTFormat.CUT_FIRST_LETTER); format.setToneFormat(PinyinTONEFormat.TONE_NONE); if ($.notNull(separato...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java
ICUService.registerFactory
public final Factory registerFactory(Factory factory) { if (factory == null) { throw new NullPointerException(); } try { factoryLock.acquireWrite(); factories.add(0, factory); clearCaches(); } finally { factoryLock.relea...
java
public final Factory registerFactory(Factory factory) { if (factory == null) { throw new NullPointerException(); } try { factoryLock.acquireWrite(); factories.add(0, factory); clearCaches(); } finally { factoryLock.relea...
[ "public", "final", "Factory", "registerFactory", "(", "Factory", "factory", ")", "{", "if", "(", "factory", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "try", "{", "factoryLock", ".", "acquireWrite", "(", ")", ";", ...
Register a Factory. Returns the factory if the service accepts the factory, otherwise returns null. The default implementation accepts all factories.
[ "Register", "a", "Factory", ".", "Returns", "the", "factory", "if", "the", "service", "accepts", "the", "factory", "otherwise", "returns", "null", ".", "The", "default", "implementation", "accepts", "all", "factories", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L794-L808
train
Register a new factory.
Of course, here is the Java code you requested: ```java public final Factory registerFactory(Factory factory) { if (factory == null) { throw new NullPointerException(); } try { factoryLock.acquireWrite(); factories.add(0, factory); clearCaches(); ...
mnlipp/jgrapes
org.jgrapes.io/src/org/jgrapes/net/TcpServer.java
TcpServer.onClose
@Handler @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public void onClose(Close event) throws IOException, InterruptedException { boolean subOnly = true; for (Channel channel : event.channels()) { if (channel instanceof TcpChannelImpl) { if (channels.contains(chan...
java
@Handler @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public void onClose(Close event) throws IOException, InterruptedException { boolean subOnly = true; for (Channel channel : event.channels()) { if (channel instanceof TcpChannelImpl) { if (channels.contains(chan...
[ "@", "Handler", "@", "SuppressWarnings", "(", "\"PMD.DataflowAnomalyAnalysis\"", ")", "public", "void", "onClose", "(", "Close", "event", ")", "throws", "IOException", ",", "InterruptedException", "{", "boolean", "subOnly", "=", "true", ";", "for", "(", "Channel",...
Shuts down the server or one of the connections to the server. @param event the event @throws IOException if an I/O exception occurred @throws InterruptedException if the execution was interrupted
[ "Shuts", "down", "the", "server", "or", "one", "of", "the", "connections", "to", "the", "server", "." ]
8b5d874935d84c34a52d3e3d3745e869b5203fa0
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.io/src/org/jgrapes/net/TcpServer.java#L459-L492
train
Close the connection.
Of course, here is the Java code you requested: ```java @Handler @SuppressWarnings("PMD.DataflowAnomalyAnalysis") public void onClose(Close event) throws IOException, InterruptedException { boolean subOnly = true; for (Channel channel : event.channels()) { if (channel instanceof Tcp...
jfinal/jfinal
src/main/java/com/jfinal/core/Controller.java
Controller.getCookieObject
public Cookie getCookieObject(String name) { Cookie[] cookies = request.getCookies(); if (cookies != null) for (Cookie cookie : cookies) if (cookie.getName().equals(name)) return cookie; return null; }
java
public Cookie getCookieObject(String name) { Cookie[] cookies = request.getCookies(); if (cookies != null) for (Cookie cookie : cookies) if (cookie.getName().equals(name)) return cookie; return null; }
[ "public", "Cookie", "getCookieObject", "(", "String", "name", ")", "{", "Cookie", "[", "]", "cookies", "=", "request", ".", "getCookies", "(", ")", ";", "if", "(", "cookies", "!=", "null", ")", "for", "(", "Cookie", "cookie", ":", "cookies", ")", "if",...
Get cookie object by cookie name.
[ "Get", "cookie", "object", "by", "cookie", "name", "." ]
fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/core/Controller.java#L554-L561
train
Gets the Cookie object with the given name.
Of course, here is the Java code you requested: ```java public Cookie getCookieObject(String name) { Cookie[] cookies = request.getCookies(); if (cookies != null) for (Cookie cookie : cookies) if (cookie.getName().equals(name)) return cookie; return null; } ``` Hope this helps!
michael-rapp/AndroidMaterialPreferences
library/src/main/java/de/mrapp/android/preference/ColorPalettePreference.java
ColorPalettePreference.obtainStyledAttributes
private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet, @AttrRes final int defaultStyle, @StyleRes final int defaultStyleResource) { TypedArray typedArray = getContext() .obtainStyledAttributes...
java
private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet, @AttrRes final int defaultStyle, @StyleRes final int defaultStyleResource) { TypedArray typedArray = getContext() .obtainStyledAttributes...
[ "private", "void", "obtainStyledAttributes", "(", "@", "Nullable", "final", "AttributeSet", "attributeSet", ",", "@", "AttrRes", "final", "int", "defaultStyle", ",", "@", "StyleRes", "final", "int", "defaultStyleResource", ")", "{", "TypedArray", "typedArray", "=", ...
Obtains all attributes from a specific attribute set. @param attributeSet The attribute set, the attributes should be obtained from, as an instance of the type {@link AttributeSet} or null, if no attributes should be obtained @param defaultStyle The default style to apply to this preference. If 0, no style will be app...
[ "Obtains", "all", "attributes", "from", "a", "specific", "attribute", "set", "." ]
73a7e449458313bd041fc8d6038e290506b68eb1
https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/library/src/main/java/de/mrapp/android/preference/ColorPalettePreference.java#L137-L155
train
Obtains the attributes which are styled by the user from the attribute set.
Of course, here is the Java code you requested: ```java private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet, @AttrRes final int defaultStyle, @StyleRes final int defaultStyleResource) { TypedArray typedArr...
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/StorageRestoreParameters.java
StorageRestoreParameters.withStorageBundleBackup
public StorageRestoreParameters withStorageBundleBackup(byte[] storageBundleBackup) { if (storageBundleBackup == null) { this.storageBundleBackup = null; } else { this.storageBundleBackup = Base64Url.encode(storageBundleBackup); } return this; }
java
public StorageRestoreParameters withStorageBundleBackup(byte[] storageBundleBackup) { if (storageBundleBackup == null) { this.storageBundleBackup = null; } else { this.storageBundleBackup = Base64Url.encode(storageBundleBackup); } return this; }
[ "public", "StorageRestoreParameters", "withStorageBundleBackup", "(", "byte", "[", "]", "storageBundleBackup", ")", "{", "if", "(", "storageBundleBackup", "==", "null", ")", "{", "this", ".", "storageBundleBackup", "=", "null", ";", "}", "else", "{", "this", "."...
Set the storageBundleBackup value. @param storageBundleBackup the storageBundleBackup value to set @return the StorageRestoreParameters object itself.
[ "Set", "the", "storageBundleBackup", "value", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/StorageRestoreParameters.java#L38-L45
train
Sets the value storageBundleBackup
Of course, here is the Java code you requested: ```java public StorageRestoreParameters withStorageBundleBackup(byte[] storageBundleBackup) { if (storageBundleBackup == null) { this.storageBundleBackup = null; } else { this.storageBundleBackup = Base64Url.encode(storageBundleBac...
s1-platform/s1
s1-mongodb/src/java/org/s1/mongodb/cluster/MongoDBDDS.java
MongoDBDDS.add
public static void add(Id id, Map<String, Object> data){ DDSCluster.call(new MessageBean(MongoDBDDS.class, id.getDatabase(),id.getCollection(),id.getEntity(), "add",data)); }
java
public static void add(Id id, Map<String, Object> data){ DDSCluster.call(new MessageBean(MongoDBDDS.class, id.getDatabase(),id.getCollection(),id.getEntity(), "add",data)); }
[ "public", "static", "void", "add", "(", "Id", "id", ",", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "DDSCluster", ".", "call", "(", "new", "MessageBean", "(", "MongoDBDDS", ".", "class", ",", "id", ".", "getDatabase", "(", ")", ",", ...
Add record to collection @param id @param data
[ "Add", "record", "to", "collection" ]
370101c13fef01af524bc171bcc1a97e5acc76e8
https://github.com/s1-platform/s1/blob/370101c13fef01af524bc171bcc1a97e5acc76e8/s1-mongodb/src/java/org/s1/mongodb/cluster/MongoDBDDS.java#L79-L83
train
Add a new record to the database.
Of course, here is the Java code you requested: ```java public static void add(Id id, Map<String, Object> data){ DDSCluster.call(new MessageBean(MongoDBDDS.class, id.getDatabase(),id.getCollection(),id.getEntity(), "add",data)); } ``` Hope this helps!
adamfisk/littleshoot-util
src/main/java/org/littleshoot/util/CollectionUtilsImpl.java
CollectionUtilsImpl.map
public <T1,T2> Collection<T2> map (final Collection<? extends T1> collection, final F1<T1,T2> f) { final Collection<T2> result = new LinkedList<T2> (); for (final T1 object : collection) { result.add (f.run (object)); }...
java
public <T1,T2> Collection<T2> map (final Collection<? extends T1> collection, final F1<T1,T2> f) { final Collection<T2> result = new LinkedList<T2> (); for (final T1 object : collection) { result.add (f.run (object)); }...
[ "public", "<", "T1", ",", "T2", ">", "Collection", "<", "T2", ">", "map", "(", "final", "Collection", "<", "?", "extends", "T1", ">", "collection", ",", "final", "F1", "<", "T1", ",", "T2", ">", "f", ")", "{", "final", "Collection", "<", "T2", ">...
{@inheritDoc}
[ "{" ]
3c0dc4955116b3382d6b0575d2f164b7508a4f73
https://github.com/adamfisk/littleshoot-util/blob/3c0dc4955116b3382d6b0575d2f164b7508a4f73/src/main/java/org/littleshoot/util/CollectionUtilsImpl.java#L72-L84
train
Maps a collection of objects to a collection of objects.
Of course, here is the Java code you requested: ```java public <T1,T2> Collection<T2> map (final Collection<? extends T1> collection, final F1<T1,T2> f) { final Collection<T2> result = new LinkedList<T2> (); for (final T1 object : collection) {...
foundation-runtime/service-directory
1.2/sd-api/src/main/java/com/cisco/oss/foundation/directory/cache/ModelServiceClientCache.java
ModelServiceClientCache.getAllModelServiceInstance
public List<ModelServiceInstance> getAllModelServiceInstance() { return getData() == null ? Collections.<ModelServiceInstance>emptyList() : getData().getServiceInstances(); }
java
public List<ModelServiceInstance> getAllModelServiceInstance() { return getData() == null ? Collections.<ModelServiceInstance>emptyList() : getData().getServiceInstances(); }
[ "public", "List", "<", "ModelServiceInstance", ">", "getAllModelServiceInstance", "(", ")", "{", "return", "getData", "(", ")", "==", "null", "?", "Collections", ".", "<", "ModelServiceInstance", ">", "emptyList", "(", ")", ":", "getData", "(", ")", ".", "ge...
Get the list of ModelServiceInstances. @return the list of ModelServiceInstances
[ "Get", "the", "list", "of", "ModelServiceInstances", "." ]
a7bdefe173dc99e75eff4a24e07e6407e62f2ed4
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.2/sd-api/src/main/java/com/cisco/oss/foundation/directory/cache/ModelServiceClientCache.java#L125-L127
train
Returns a list of all ModelServiceInstance objects.
Of course, here is the Java code you requested: ```java public List<ModelServiceInstance> getAllModelServiceInstance() { return getData() == null ? Collections.<ModelServiceInstance>emptyList() : getData().getServiceInstances(); } ``` Hope this helps!
alkacon/opencms-core
src/org/opencms/cache/CmsVfsDiskCache.java
CmsVfsDiskCache.getCacheName
public String getCacheName(boolean online, String rootPath, String parameters) { String rfsName = CmsFileUtil.getRepositoryName(m_rfsRepository, rootPath, online); if (CmsStringUtil.isNotEmpty(parameters)) { String extension = CmsFileUtil.getExtension(rfsName); // build the RFS ...
java
public String getCacheName(boolean online, String rootPath, String parameters) { String rfsName = CmsFileUtil.getRepositoryName(m_rfsRepository, rootPath, online); if (CmsStringUtil.isNotEmpty(parameters)) { String extension = CmsFileUtil.getExtension(rfsName); // build the RFS ...
[ "public", "String", "getCacheName", "(", "boolean", "online", ",", "String", "rootPath", ",", "String", "parameters", ")", "{", "String", "rfsName", "=", "CmsFileUtil", ".", "getRepositoryName", "(", "m_rfsRepository", ",", "rootPath", ",", "online", ")", ";", ...
Returns the RFS name to use for caching the given VFS resource with parameters in the disk cache.<p> @param online if true, the online disk cache is used, the offline disk cache otherwise @param rootPath the VFS resource root path to get the RFS cache name for @param parameters the parameters of the request to the VFS...
[ "Returns", "the", "RFS", "name", "to", "use", "for", "caching", "the", "given", "VFS", "resource", "with", "parameters", "in", "the", "disk", "cache", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cache/CmsVfsDiskCache.java#L124-L134
train
Gets the cache name.
Of course, here is the Java code you requested: ```java public String getCacheName(boolean online, String rootPath, String parameters) { String rfsName = CmsFileUtil.getRepositoryName(m_rfsRepository, rootPath, online); if (CmsStringUtil.isNotEmpty(parameters)) { String extension = CmsFile...
buschmais/jqa-core-framework
rule/src/main/java/com/buschmais/jqassistant/core/rule/impl/reader/XmlRuleParserPlugin.java
XmlRuleParserPlugin.convert
private void convert(List<JqassistantRules> rules, RuleSource ruleSource, RuleSetBuilder builder) throws RuleException { for (JqassistantRules rule : rules) { List<SeverityRuleType> severityRuleTypes = rule.getConceptOrConstraintOrGroup(); for (SeverityRuleType severityRuleType : severit...
java
private void convert(List<JqassistantRules> rules, RuleSource ruleSource, RuleSetBuilder builder) throws RuleException { for (JqassistantRules rule : rules) { List<SeverityRuleType> severityRuleTypes = rule.getConceptOrConstraintOrGroup(); for (SeverityRuleType severityRuleType : severit...
[ "private", "void", "convert", "(", "List", "<", "JqassistantRules", ">", "rules", ",", "RuleSource", "ruleSource", ",", "RuleSetBuilder", "builder", ")", "throws", "RuleException", "{", "for", "(", "JqassistantRules", "rule", ":", "rules", ")", "{", "List", "<...
Converts a list of {@link JqassistantRules} to a rule set. @param rules The {@link JqassistantRules}. @throws RuleException If rules are not consistent.
[ "Converts", "a", "list", "of", "{", "@link", "JqassistantRules", "}", "to", "a", "rule", "set", "." ]
0e63ff509cfe52f9063539a23d5f9f183b2ea4a5
https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/rule/src/main/java/com/buschmais/jqassistant/core/rule/impl/reader/XmlRuleParserPlugin.java#L86-L103
train
Convert a list of rules to a RuleSet.
Of course, here is the Java code you requested: ```java private void convert(List<JqassistantRules> rules, RuleSource ruleSource, RuleSetBuilder builder) throws RuleException { for (JqassistantRules rule : rules) { List<SeverityRuleType> severityRuleTypes = rule.getConceptOrConstraintOrGroup(); ...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/BDDImpl.java
BDDImpl.eUnset
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BDD__UBASE: setUBASE(UBASE_EDEFAULT); return; case AfplibPackage.BDD__RESERVED: setReserved(RESERVED_EDEFAULT); return; case AfplibPackage.BDD__XUPUB: setXUPUB(XUPUB_EDEFAULT); return; case Afpli...
java
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BDD__UBASE: setUBASE(UBASE_EDEFAULT); return; case AfplibPackage.BDD__RESERVED: setReserved(RESERVED_EDEFAULT); return; case AfplibPackage.BDD__XUPUB: setXUPUB(XUPUB_EDEFAULT); return; case Afpli...
[ "@", "Override", "public", "void", "eUnset", "(", "int", "featureID", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "BDD__UBASE", ":", "setUBASE", "(", "UBASE_EDEFAULT", ")", ";", "return", ";", "case", "AfplibPackage", ".", ...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/BDDImpl.java#L837-L890
train
Override the eUnset method for the feature ID
Of course, here is the Java code you requested: ```java @Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.BDD__UBASE: setUBASE(UBASE_EDEFAULT); return; case AfplibPackage.BDD__RESERVED: setReserved(RESERVED_EDEFAULT); return; case AfplibPackage.BDD__XUPUB...
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java
Widget.get
@Override public Widget get(final int dataIndex) { return dataIndex >= size() ? null : getChildren().get(dataIndex); }
java
@Override public Widget get(final int dataIndex) { return dataIndex >= size() ? null : getChildren().get(dataIndex); }
[ "@", "Override", "public", "Widget", "get", "(", "final", "int", "dataIndex", ")", "{", "return", "dataIndex", ">=", "size", "(", ")", "?", "null", ":", "getChildren", "(", ")", ".", "get", "(", "dataIndex", ")", ";", "}" ]
{@link Layout.WidgetContainer} default implementation
[ "{" ]
05034d465a7b0a494fabb9e9f2971ac19392f32d
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L2079-L2082
train
Get the element with the specified index.
Of course, here is the Java code you requested: ```java @Override public Widget get(final int dataIndex) { return dataIndex >= size() ? null : getChildren().get(dataIndex); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/LTPATokenizer.java
LTPATokenizer.addAttributes
private static void addAttributes(String data, Map<String, ArrayList<String>> attribs) { String key; String value; int keyIndex = 0; int dataLen = data.length(); for (keyIndex = 0; keyIndex < dataLen; keyIndex++) { if ((data.charAt(keyIndex) == USER_ATTRIB_DELIM) && (...
java
private static void addAttributes(String data, Map<String, ArrayList<String>> attribs) { String key; String value; int keyIndex = 0; int dataLen = data.length(); for (keyIndex = 0; keyIndex < dataLen; keyIndex++) { if ((data.charAt(keyIndex) == USER_ATTRIB_DELIM) && (...
[ "private", "static", "void", "addAttributes", "(", "String", "data", ",", "Map", "<", "String", ",", "ArrayList", "<", "String", ">", ">", "attribs", ")", "{", "String", "key", ";", "String", "value", ";", "int", "keyIndex", "=", "0", ";", "int", "data...
Given a specified String, parse to find attributes and add to specified Map. @param data String to parse attribtues from @param attribs Target map to add attributes
[ "Given", "a", "specified", "String", "parse", "to", "find", "attributes", "and", "add", "to", "specified", "Map", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/LTPATokenizer.java#L130-L145
train
Add attributes from a string.
Of course, here is the Java code you requested: ```java private static void addAttributes(String data, Map<String, ArrayList<String>> attribs) { String key; String value; int keyIndex = 0; int dataLen = data.length(); for (keyIndex = 0; keyIndex < dataLen; keyIndex++) { ...
marvinlabs/android-floatinglabel-widgets
library/src/main/java/com/marvinlabs/widget/floatinglabel/itempicker/ParcelablePickerDialogFragment.java
ParcelablePickerDialogFragment.getAvailableItems
@Override public ArrayList<ItemT> getAvailableItems() { if (availableItems == null) { availableItems = getArguments().getParcelableArrayList(ARG_AVAILABLE_ITEMS); if (availableItems == null || availableItems.isEmpty()) { throw new RuntimeException("StringPickerDialogF...
java
@Override public ArrayList<ItemT> getAvailableItems() { if (availableItems == null) { availableItems = getArguments().getParcelableArrayList(ARG_AVAILABLE_ITEMS); if (availableItems == null || availableItems.isEmpty()) { throw new RuntimeException("StringPickerDialogF...
[ "@", "Override", "public", "ArrayList", "<", "ItemT", ">", "getAvailableItems", "(", ")", "{", "if", "(", "availableItems", "==", "null", ")", "{", "availableItems", "=", "getArguments", "(", ")", ".", "getParcelableArrayList", "(", "ARG_AVAILABLE_ITEMS", ")", ...
==
[ "==" ]
bb89889f1e75ed9b228b77d3ba895ceeeb41fe4f
https://github.com/marvinlabs/android-floatinglabel-widgets/blob/bb89889f1e75ed9b228b77d3ba895ceeeb41fe4f/library/src/main/java/com/marvinlabs/widget/floatinglabel/itempicker/ParcelablePickerDialogFragment.java#L53-L62
train
Get the list of items that should be displayed in the StringPickerDialogFragment.
Of course, here is the Java code you requested: ```java @Override public ArrayList<ItemT> getAvailableItems() { if (availableItems == null) { availableItems = getArguments().getParcelableArrayList(ARG_AVAILABLE_ITEMS); if (availableItems == null || availableItems.isEmpty()) { ...
RestComm/jain-slee.sip
examples/sip-wake-up/sbb/src/main/java/org/mobicents/slee/examples/wakeup/WakeUpSbb.java
WakeUpSbb.setSbbContext
public void setSbbContext(SbbContext context) { // save the sbb context in a field this.sbbContext = context; // get the tracer if needed this.tracer = context.getTracer(WakeUpSbb.class.getSimpleName()); // get jndi environment stuff try { final Context myEnv = (Context) new InitialContext(); // slee ...
java
public void setSbbContext(SbbContext context) { // save the sbb context in a field this.sbbContext = context; // get the tracer if needed this.tracer = context.getTracer(WakeUpSbb.class.getSimpleName()); // get jndi environment stuff try { final Context myEnv = (Context) new InitialContext(); // slee ...
[ "public", "void", "setSbbContext", "(", "SbbContext", "context", ")", "{", "// save the sbb context in a field", "this", ".", "sbbContext", "=", "context", ";", "// get the tracer if needed", "this", ".", "tracer", "=", "context", ".", "getTracer", "(", "WakeUpSbb", ...
/* (non-Javadoc) @see javax.slee.Sbb#setSbbContext(javax.slee.SbbContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
2c173af0a760cb0ea13fe0ffa58c0f82b14731f9
https://github.com/RestComm/jain-slee.sip/blob/2c173af0a760cb0ea13fe0ffa58c0f82b14731f9/examples/sip-wake-up/sbb/src/main/java/org/mobicents/slee/examples/wakeup/WakeUpSbb.java#L94-L115
train
Sets the sbb context.
Of course, here is the Java code you requested: ```java public void setSbbContext(SbbContext context) { // save the sbb context in a field this.sbbContext = context; // get the tracer if needed this.tracer = context.getTracer(WakeUpSbb.class.getSimpleName()); // get jndi environment stuff try { final Co...
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/transform/TagResourceRequestMarshaller.java
TagResourceRequestMarshaller.marshall
public void marshall(TagResourceRequest tagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (tagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(tagResourceRequest.getRes...
java
public void marshall(TagResourceRequest tagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (tagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(tagResourceRequest.getRes...
[ "public", "void", "marshall", "(", "TagResourceRequest", "tagResourceRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "tagResourceRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to mars...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/transform/TagResourceRequestMarshaller.java#L44-L56
train
marshalls the given tag resource request to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(TagResourceRequest tagResourceRequest, ProtocolMarshaller protocolMarshaller) { if (tagResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/bin/AbstractBinWriter.java
AbstractBinWriter.writeRootBean
void writeRootBean(Bean bean, boolean rootTypeFlag) throws IOException { writeBean(bean, bean.getClass(), rootTypeFlag ? RootType.ROOT_WITH_TYPE : RootType.ROOT_WITHOUT_TYPE); }
java
void writeRootBean(Bean bean, boolean rootTypeFlag) throws IOException { writeBean(bean, bean.getClass(), rootTypeFlag ? RootType.ROOT_WITH_TYPE : RootType.ROOT_WITHOUT_TYPE); }
[ "void", "writeRootBean", "(", "Bean", "bean", ",", "boolean", "rootTypeFlag", ")", "throws", "IOException", "{", "writeBean", "(", "bean", ",", "bean", ".", "getClass", "(", ")", ",", "rootTypeFlag", "?", "RootType", ".", "ROOT_WITH_TYPE", ":", "RootType", "...
-----------------------------------------------------------------------
[ "-----------------------------------------------------------------------" ]
f07dbe42947150b23a173f35984c6ab33c5529bf
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/bin/AbstractBinWriter.java#L63-L65
train
Write root bean.
Of course, here is the Java code you requested: ```java void writeRootBean(Bean bean, boolean rootTypeFlag) throws IOException { writeBean(bean, bean.getClass(), rootTypeFlag ? RootType.ROOT_WITH_TYPE : RootType.ROOT_WITHOUT_TYPE); } ``` Hope this helps!
apache/groovy
src/main/groovy/groovy/util/Node.java
Node.depthFirst
public void depthFirst(Map<String, Object> options, Closure c) { boolean preorder = Boolean.valueOf(options.get("preorder").toString()); if (preorder) callClosureForNode(c, this, 1); depthFirstRest(preorder, 2, c); if (!preorder) callClosureForNode(c, this, 1); }
java
public void depthFirst(Map<String, Object> options, Closure c) { boolean preorder = Boolean.valueOf(options.get("preorder").toString()); if (preorder) callClosureForNode(c, this, 1); depthFirstRest(preorder, 2, c); if (!preorder) callClosureForNode(c, this, 1); }
[ "public", "void", "depthFirst", "(", "Map", "<", "String", ",", "Object", ">", "options", ",", "Closure", "c", ")", "{", "boolean", "preorder", "=", "Boolean", ".", "valueOf", "(", "options", ".", "get", "(", "\"preorder\"", ")", ".", "toString", "(", ...
Provides a collection of all the nodes in the tree using a depth-first traversal. A boolean 'preorder' options is supported. @param options map containing options @param c the closure to run for each node (a one or two parameter can be used; if one parameter is given the closure will be passed the node, for a two para...
[ "Provides", "a", "collection", "of", "all", "the", "nodes", "in", "the", "tree", "using", "a", "depth", "-", "first", "traversal", ".", "A", "boolean", "preorder", "options", "is", "supported", "." ]
71cf20addb611bb8d097a59e395fd20bc7f31772
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/Node.java#L609-L614
train
Traverse the tree using a depth - first traversal.
Of course, here is the Java code you requested: ```java public void depthFirst(Map<String, Object> options, Closure c) { boolean preorder = Boolean.valueOf(options.get("preorder").toString()); if (preorder) callClosureForNode(c, this, 1); depthFirstRest(preorder, 2, c); if (!preorder) c...
openbase/jul
extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java
MultiLanguageTextProcessor.getMultiLanguageTextByLanguage
public static String getMultiLanguageTextByLanguage(final String languageCode, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { for (MultiLanguageText.MapFieldEntry entry : multiLanguageText.getEntryList()) { if (entry.getKey().equalsIgnoreCase(languageCode)) { ...
java
public static String getMultiLanguageTextByLanguage(final String languageCode, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { for (MultiLanguageText.MapFieldEntry entry : multiLanguageText.getEntryList()) { if (entry.getKey().equalsIgnoreCase(languageCode)) { ...
[ "public", "static", "String", "getMultiLanguageTextByLanguage", "(", "final", "String", "languageCode", ",", "final", "MultiLanguageTextOrBuilder", "multiLanguageText", ")", "throws", "NotAvailableException", "{", "for", "(", "MultiLanguageText", ".", "MapFieldEntry", "entr...
Get the multiLanguageText for a languageCode in a multiLanguageText type. This is done by checking if the key matches the languageCode. If it matches the value list is returned. Thus the returned list can be empty depending on the multiLanguageText. @param languageCode the languageCode which is checked @param multiLan...
[ "Get", "the", "multiLanguageText", "for", "a", "languageCode", "in", "a", "multiLanguageText", "type", ".", "This", "is", "done", "by", "checking", "if", "the", "key", "matches", "the", "languageCode", ".", "If", "it", "matches", "the", "value", "list", "is"...
662e98c3a853085e475be54c3be3deb72193c72d
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java#L259-L266
train
Gets the multiLanguageText by language code.
Of course, here is the Java code you requested: ```java public static String getMultiLanguageTextByLanguage(final String languageCode, final MultiLanguageTextOrBuilder multiLanguageText) throws NotAvailableException { for (MultiLanguageText.MapFieldEntry entry : multiLanguageText.getEntryList()) { ...
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/XsdGeneratorHelper.java
XsdGeneratorHelper.parseXmlToDocument
private static Document parseXmlToDocument(final File xmlFile) { Document result = null; Reader reader = null; try { reader = new FileReader(xmlFile); result = parseXmlStream(reader); } catch (FileNotFoundException e) { // This should never happ...
java
private static Document parseXmlToDocument(final File xmlFile) { Document result = null; Reader reader = null; try { reader = new FileReader(xmlFile); result = parseXmlStream(reader); } catch (FileNotFoundException e) { // This should never happ...
[ "private", "static", "Document", "parseXmlToDocument", "(", "final", "File", "xmlFile", ")", "{", "Document", "result", "=", "null", ";", "Reader", "reader", "=", "null", ";", "try", "{", "reader", "=", "new", "FileReader", "(", "xmlFile", ")", ";", "resul...
Creates a Document from parsing the XML within the provided xmlFile. @param xmlFile The XML file to be parsed. @return The Document corresponding to the xmlFile.
[ "Creates", "a", "Document", "from", "parsing", "the", "XML", "within", "the", "provided", "xmlFile", "." ]
e3c4e47943b15282e5a6e850bbfb1588d8452a0a
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/XsdGeneratorHelper.java#L503-L516
train
Parses an XML file to a Document object.
Of course, here is the Java code you requested: ```java private static Document parseXmlToDocument(final File xmlFile) { Document result = null; Reader reader = null; try { reader = new FileReader(xmlFile); result = parseXmlStream(reader); } catch (FileNotF...
cdk/cdk
app/depict/src/main/java/org/openscience/cdk/depict/Depiction.java
Depiction.getPaddingValue
double getPaddingValue(double defaultPadding) { double padding = model.get(RendererModel.Padding.class); if (padding == AUTOMATIC) padding = defaultPadding; return padding; }
java
double getPaddingValue(double defaultPadding) { double padding = model.get(RendererModel.Padding.class); if (padding == AUTOMATIC) padding = defaultPadding; return padding; }
[ "double", "getPaddingValue", "(", "double", "defaultPadding", ")", "{", "double", "padding", "=", "model", ".", "get", "(", "RendererModel", ".", "Padding", ".", "class", ")", ";", "if", "(", "padding", "==", "AUTOMATIC", ")", "padding", "=", "defaultPadding...
Access the specified padding value or fallback to a provided default. @param defaultPadding default value if the parameter is 'automatic' @return padding
[ "Access", "the", "specified", "padding", "value", "or", "fallback", "to", "a", "provided", "default", "." ]
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/app/depict/src/main/java/org/openscience/cdk/depict/Depiction.java#L188-L193
train
Get the padding value.
Of course, here is the Java code you requested: ```java double getPaddingValue(double defaultPadding) { double padding = model.get(RendererModel.Padding.class); if (padding == AUTOMATIC) padding = defaultPadding; return padding; } ``` Hope this helps!
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseToolbar.java
JBaseToolbar.addButton
public JButton addButton(String strParam) { String strDesc = strParam; BaseApplet applet = this.getBaseApplet(); if (applet != null) strDesc = applet.getString(strParam); return this.addButton(strDesc, strParam); }
java
public JButton addButton(String strParam) { String strDesc = strParam; BaseApplet applet = this.getBaseApplet(); if (applet != null) strDesc = applet.getString(strParam); return this.addButton(strDesc, strParam); }
[ "public", "JButton", "addButton", "(", "String", "strParam", ")", "{", "String", "strDesc", "=", "strParam", ";", "BaseApplet", "applet", "=", "this", ".", "getBaseApplet", "(", ")", ";", "if", "(", "applet", "!=", "null", ")", "strDesc", "=", "applet", ...
Add a button to this window. Convert this param to the local string and call addButton. @param The key for this button. @return TODO
[ "Add", "a", "button", "to", "this", "window", ".", "Convert", "this", "param", "to", "the", "local", "string", "and", "call", "addButton", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseToolbar.java#L69-L76
train
Add this button to the button list.
Of course, here is the Java code you requested: ```java public JButton addButton(String strParam) { String strDesc = strParam; BaseApplet applet = this.getBaseApplet(); if (applet != null) strDesc = applet.getString(strParam); return this.addButton(strDesc, strParam); ...
cdk/cdk
legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java
IonizationPotentialTool.getQSARs
public static double[] getQSARs(IAtomContainer container, IAtom atom) throws CDKException { Electronegativity electronegativity = new Electronegativity(); PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges...
java
public static double[] getQSARs(IAtomContainer container, IAtom atom) throws CDKException { Electronegativity electronegativity = new Electronegativity(); PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsiliPartialCharges peoe = new GasteigerMarsiliPartialCharges...
[ "public", "static", "double", "[", "]", "getQSARs", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "throws", "CDKException", "{", "Electronegativity", "electronegativity", "=", "new", "Electronegativity", "(", ")", ";", "PiElectronegativity", "pielec...
Get the results of 7 qsar descriptors been applied. They are: Electronegativity, GasteigerMarsiliPartialCharges, GasteigerPEPEPartialCharges, Polarizability, StabilizationCharge, Number of Atom in resonance if the container in resonance is aromatic. @param container The IAtomContainer which contain the IAtom @param a...
[ "Get", "the", "results", "of", "7", "qsar", "descriptors", "been", "applied", ".", "They", "are", ":", "Electronegativity", "GasteigerMarsiliPartialCharges", "GasteigerPEPEPartialCharges", "Polarizability", "StabilizationCharge", "Number", "of", "Atom", "in", "resonance",...
c3d0f16502bf08df50365fee392e11d7c9856657
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L219-L279
train
Returns the QSARs of the given atom.
Of course, here is the Java code you requested: ```java public static double[] getQSARs(IAtomContainer container, IAtom atom) throws CDKException { Electronegativity electronegativity = new Electronegativity(); PiElectronegativity pielectronegativity = new PiElectronegativity(); GasteigerMarsil...
artclarke/humble-video
humble-video-noarch/src/main/java/io/humble/video/ContainerStream.java
ContainerStream.getFrameRate
public Rational getFrameRate() { long cPtr = VideoJNI.ContainerStream_getFrameRate(swigCPtr, this); return (cPtr == 0) ? null : new Rational(cPtr, false); }
java
public Rational getFrameRate() { long cPtr = VideoJNI.ContainerStream_getFrameRate(swigCPtr, this); return (cPtr == 0) ? null : new Rational(cPtr, false); }
[ "public", "Rational", "getFrameRate", "(", ")", "{", "long", "cPtr", "=", "VideoJNI", ".", "ContainerStream_getFrameRate", "(", "swigCPtr", ",", "this", ")", ";", "return", "(", "cPtr", "==", "0", ")", "?", "null", ":", "new", "Rational", "(", "cPtr", ",...
Get the (sometimes estimated) average frame rate of this container.<br> For variable frame-rate containers (they do exist) this is just<br> an approximation. Better to use getTimeBase().<br> <br> For contant frame-rate containers, this will be 1 / ( getTimeBase() )<br> <br> @return The frame-rate of this container.
[ "Get", "the", "(", "sometimes", "estimated", ")", "average", "frame", "rate", "of", "this", "container", ".", "<br", ">", "For", "variable", "frame", "-", "rate", "containers", "(", "they", "do", "exist", ")", "this", "is", "just<br", ">", "an", "approxi...
aa349ae2d7ef74160b7074feac8d298cf90394d1
https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/ContainerStream.java#L174-L177
test
Get the frame rate of this container stream.
Of course, here is the Java code you requested: ```java public Rational getFrameRate() { long cPtr = VideoJNI.ContainerStream_getFrameRate(swigCPtr, this); return (cPtr == 0) ? null : new Rational(cPtr, false); } ``` Hope this helps!
ontop/ontop
mapping/sql/owlapi/src/main/java/it/unibz/inf/ontop/spec/mapping/bootstrap/impl/DirectMappingAxiomProducer.java
DirectMappingAxiomProducer.getRefSQL
private String getRefSQL(ForeignKeyConstraint fk) { Set<Object> columns = new LinkedHashSet<>(); // Set avoids duplicated and LinkedHashSet keeps the insertion order for (Attribute attr : getIdentifyingAttributes(fk.getRelation())) columns.add(getColumnNameWithAlias(attr)); List<String> conditions = new Arra...
java
private String getRefSQL(ForeignKeyConstraint fk) { Set<Object> columns = new LinkedHashSet<>(); // Set avoids duplicated and LinkedHashSet keeps the insertion order for (Attribute attr : getIdentifyingAttributes(fk.getRelation())) columns.add(getColumnNameWithAlias(attr)); List<String> conditions = new Arra...
[ "private", "String", "getRefSQL", "(", "ForeignKeyConstraint", "fk", ")", "{", "Set", "<", "Object", ">", "columns", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "// Set avoids duplicated and LinkedHashSet keeps the insertion order", "for", "(", "Attribute", "att...
* Definition reference triple: an RDF triple with: <p/> subject: the row node for the row. predicate: the reference property IRI for the columns. object: the row node for the referenced row. @param fk @return
[ "*", "Definition", "reference", "triple", ":", "an", "RDF", "triple", "with", ":", "<p", "/", ">", "subject", ":", "the", "row", "node", "for", "the", "row", ".", "predicate", ":", "the", "reference", "property", "IRI", "for", "the", "columns", ".", "o...
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/owlapi/src/main/java/it/unibz/inf/ontop/spec/mapping/bootstrap/impl/DirectMappingAxiomProducer.java#L78-L98
train
Get the SQL for the referenced foreign key.
Of course, here is the Java code you requested: ```java private String getRefSQL(ForeignKeyConstraint fk) { Set<Object> columns = new LinkedHashSet<>(); // Set avoids duplicated and LinkedHashSet keeps the insertion order for (Attribute attr : getIdentifyingAttributes(fk.getRelation())) columns.add(getColumnNa...
alkacon/opencms-core
src/org/opencms/db/generic/CmsVfsDriver.java
CmsVfsDriver.getResourceOus
public List<CmsOrganizationalUnit> getResourceOus(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsDbSqlException { List<CmsOrganizationalUnit> ous = new ArrayList<CmsOrganizationalUnit>(); String resName = resource.getRootPath(); if (resource.isFolder() && !resName.ends...
java
public List<CmsOrganizationalUnit> getResourceOus(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsDbSqlException { List<CmsOrganizationalUnit> ous = new ArrayList<CmsOrganizationalUnit>(); String resName = resource.getRootPath(); if (resource.isFolder() && !resName.ends...
[ "public", "List", "<", "CmsOrganizationalUnit", ">", "getResourceOus", "(", "CmsDbContext", "dbc", ",", "CmsUUID", "projectId", ",", "CmsResource", "resource", ")", "throws", "CmsDbSqlException", "{", "List", "<", "CmsOrganizationalUnit", ">", "ous", "=", "new", "...
Returns all organizational units for the given resource.<p> @param dbc the database context @param projectId the id of the project @param resource the resource @return a list of {@link org.opencms.security.CmsOrganizationalUnit} objects @throws CmsDbSqlException if something goes wrong
[ "Returns", "all", "organizational", "units", "for", "the", "given", "resource", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsVfsDriver.java#L1282-L1329
train
Returns the list of OUs of a resource.
Of course, here is the Java code you requested: ```java public List<CmsOrganizationalUnit> getResourceOus(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsDbSqlException { List<CmsOrganizationalUnit> ous = new ArrayList<CmsOrganizationalUnit>(); String resName = resource.getRoo...
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/format/AddressDivisionGroupingBase.java
AddressDivisionGroupingBase.getBytesInternal
protected byte[] getBytesInternal() { byte cached[]; if(hasNoValueCache() || (cached = valueCache.lowerBytes) == null) { valueCache.lowerBytes = cached = getBytesImpl(true); } return cached; }
java
protected byte[] getBytesInternal() { byte cached[]; if(hasNoValueCache() || (cached = valueCache.lowerBytes) == null) { valueCache.lowerBytes = cached = getBytesImpl(true); } return cached; }
[ "protected", "byte", "[", "]", "getBytesInternal", "(", ")", "{", "byte", "cached", "[", "]", ";", "if", "(", "hasNoValueCache", "(", ")", "||", "(", "cached", "=", "valueCache", ".", "lowerBytes", ")", "==", "null", ")", "{", "valueCache", ".", "lower...
gets the bytes, sharing the cached array and does not clone it
[ "gets", "the", "bytes", "sharing", "the", "cached", "array", "and", "does", "not", "clone", "it" ]
90493d0673511d673100c36d020dd93dd870111a
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/format/AddressDivisionGroupingBase.java#L136-L142
train
Returns the bytes of this value.
Of course, here is the Java code you requested: ```java protected byte[] getBytesInternal() { byte cached[]; if(hasNoValueCache() || (cached = valueCache.lowerBytes) == null) { valueCache.lowerBytes = cached = getBytesImpl(true); } return cached; } ``` Hope this helps!
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/TypeCreation.java
TypeCreation.of
public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescript...
java
public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"); } return new TypeCreation(typeDescript...
[ "public", "static", "StackManipulation", "of", "(", "TypeDescription", "typeDescription", ")", "{", "if", "(", "typeDescription", ".", "isArray", "(", ")", "||", "typeDescription", ".", "isPrimitive", "(", ")", "||", "typeDescription", ".", "isAbstract", "(", ")...
Creates a type creation for the given type. @param typeDescription The type to be create. @return A stack manipulation that represents the creation of the given type.
[ "Creates", "a", "type", "creation", "for", "the", "given", "type", "." ]
4d2dac80efb6bed89367567260f6811c2f712d12
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/TypeCreation.java#L50-L55
train
Create a new instance of the class for the given type description.
Of course, here is the Java code you requested: ```java public static StackManipulation of(TypeDescription typeDescription) { if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) { throw new IllegalArgumentException(typeDescription + " is not instantiable"...
whitesource/fs-agent
src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java
NpmDependencyResolver.getSha1FromRegistryPackageUrl
private String getSha1FromRegistryPackageUrl(String registryPackageUrl, boolean isScopeDep, String versionOfPackage, RegistryType registryType, String npmAccessToken) { String uriScopeDep = registryPackageUrl; if (isScopeDep) { try { uriScopeDep = registryPackageUrl.replace(...
java
private String getSha1FromRegistryPackageUrl(String registryPackageUrl, boolean isScopeDep, String versionOfPackage, RegistryType registryType, String npmAccessToken) { String uriScopeDep = registryPackageUrl; if (isScopeDep) { try { uriScopeDep = registryPackageUrl.replace(...
[ "private", "String", "getSha1FromRegistryPackageUrl", "(", "String", "registryPackageUrl", ",", "boolean", "isScopeDep", ",", "String", "versionOfPackage", ",", "RegistryType", "registryType", ",", "String", "npmAccessToken", ")", "{", "String", "uriScopeDep", "=", "reg...
/* --- Private methods ---
[ "/", "*", "---", "Private", "methods", "---" ]
d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1
https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java#L274-L328
train
Gets the sha1 from the registry package URL.
Of course, here is the Java code you requested: ```java private String getSha1FromRegistryPackageUrl(String registryPackageUrl, boolean isScopeDep, String versionOfPackage, RegistryType registryType, String npmAccessToken) { String uriScopeDep = registryPackageUrl; if (isScopeDep) { try { ...
alexxiyang/jdbctemplatetool
src/main/java/org/crazycake/jdbcTemplateTool/JdbcTemplateTool.java
JdbcTemplateTool.getProxy
private JdbcTemplateProxy getProxy(){ if(_proxy == null){ _proxy = new JdbcTemplateProxy(); _proxy.setJdbcTemplate(jdbcTemplate); } return _proxy; }
java
private JdbcTemplateProxy getProxy(){ if(_proxy == null){ _proxy = new JdbcTemplateProxy(); _proxy.setJdbcTemplate(jdbcTemplate); } return _proxy; }
[ "private", "JdbcTemplateProxy", "getProxy", "(", ")", "{", "if", "(", "_proxy", "==", "null", ")", "{", "_proxy", "=", "new", "JdbcTemplateProxy", "(", ")", ";", "_proxy", ".", "setJdbcTemplate", "(", "jdbcTemplate", ")", ";", "}", "return", "_proxy", ";",...
return the singleton proxy
[ "return", "the", "singleton", "proxy" ]
8406e0a7eb13677c4b7147a12f5f95caf9498aeb
https://github.com/alexxiyang/jdbctemplatetool/blob/8406e0a7eb13677c4b7147a12f5f95caf9498aeb/src/main/java/org/crazycake/jdbcTemplateTool/JdbcTemplateTool.java#L39-L45
train
Gets the proxy.
Of course, here is the Java code you requested: ```java private JdbcTemplateProxy getProxy(){ if(_proxy == null){ _proxy = new JdbcTemplateProxy(); _proxy.setJdbcTemplate(jdbcTemplate); } return _proxy; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ram/src/main/java/com/amazonaws/services/ram/AWSRAMClient.java
AWSRAMClient.getResourceShareAssociations
@Override public GetResourceShareAssociationsResult getResourceShareAssociations(GetResourceShareAssociationsRequest request) { request = beforeClientExecution(request); return executeGetResourceShareAssociations(request); }
java
@Override public GetResourceShareAssociationsResult getResourceShareAssociations(GetResourceShareAssociationsRequest request) { request = beforeClientExecution(request); return executeGetResourceShareAssociations(request); }
[ "@", "Override", "public", "GetResourceShareAssociationsResult", "getResourceShareAssociations", "(", "GetResourceShareAssociationsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetResourceShareAssociations", ...
<p> Gets the associations for the specified resource share. </p> @param getResourceShareAssociationsRequest @return Result of the GetResourceShareAssociations operation returned by the service. @throws UnknownResourceException A specified resource was not found. @throws MalformedArnException The format of an Amazon Re...
[ "<p", ">", "Gets", "the", "associations", "for", "the", "specified", "resource", "share", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ram/src/main/java/com/amazonaws/services/ram/AWSRAMClient.java#L728-L732
train
Retrieves the resource share associations for a resource share.
Of course, here is the Java code you requested: ```java @Override public GetResourceShareAssociationsResult getResourceShareAssociations(GetResourceShareAssociationsRequest request) { request = beforeClientExecution(request); return executeGetResourceShareAssociations(request); } ``` Hope this...
infinispan/infinispan
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/event/impl/ContinuousQueryImpl.java
ContinuousQueryImpl.addContinuousQueryListener
public <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K, C> listener) { addContinuousQueryListener(query.getQueryString(), query.getParameters(), listener); }
java
public <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K, C> listener) { addContinuousQueryListener(query.getQueryString(), query.getParameters(), listener); }
[ "public", "<", "C", ">", "void", "addContinuousQueryListener", "(", "Query", "query", ",", "ContinuousQueryListener", "<", "K", ",", "C", ">", "listener", ")", "{", "addContinuousQueryListener", "(", "query", ".", "getQueryString", "(", ")", ",", "query", ".",...
Registers a continuous query listener that uses a query DSL based filter. The listener will receive notifications when a cache entry joins or leaves the matching set defined by the query. @param listener the continuous query listener instance @param query the query to be used for determining the matching set
[ "Registers", "a", "continuous", "query", "listener", "that", "uses", "a", "query", "DSL", "based", "filter", ".", "The", "listener", "will", "receive", "notifications", "when", "a", "cache", "entry", "joins", "or", "leaves", "the", "matching", "set", "defined"...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/event/impl/ContinuousQueryImpl.java#L68-L70
train
Add a continuous query listener to the query.
Of course, here is the Java code you requested: ```java public <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K, C> listener) { addContinuousQueryListener(query.getQueryString(), query.getParameters(), listener); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/Domain.java
Domain.withDomainEntries
public Domain withDomainEntries(DomainEntry... domainEntries) { if (this.domainEntries == null) { setDomainEntries(new java.util.ArrayList<DomainEntry>(domainEntries.length)); } for (DomainEntry ele : domainEntries) { this.domainEntries.add(ele); } return ...
java
public Domain withDomainEntries(DomainEntry... domainEntries) { if (this.domainEntries == null) { setDomainEntries(new java.util.ArrayList<DomainEntry>(domainEntries.length)); } for (DomainEntry ele : domainEntries) { this.domainEntries.add(ele); } return ...
[ "public", "Domain", "withDomainEntries", "(", "DomainEntry", "...", "domainEntries", ")", "{", "if", "(", "this", ".", "domainEntries", "==", "null", ")", "{", "setDomainEntries", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "DomainEntry", ">", "(...
<p> An array of key-value pairs containing information about the domain entries. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setDomainEntries(java.util.Collection)} or {@link #withDomainEntries(java.util.Collection)} if you want to override the existing values. </p> ...
[ "<p", ">", "An", "array", "of", "key", "-", "value", "pairs", "containing", "information", "about", "the", "domain", "entries", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "val...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/Domain.java#L498-L506
train
A list of domain entries.
Of course, here is the Java code you requested: ```java public Domain withDomainEntries(DomainEntry... domainEntries) { if (this.domainEntries == null) { setDomainEntries(new java.util.ArrayList<DomainEntry>(domainEntries.length)); } for (DomainEntry ele : domainEntries) { ...
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPUserContext.java
LDAPUserContext.init
public void init(AuthenticatedUser user, LDAPConnection ldapConnection) throws GuacamoleException { // Query all accessible users userDirectory = new SimpleDirectory<>( userService.getUsers(ldapConnection) ); // Query all accessible user groups userGroup...
java
public void init(AuthenticatedUser user, LDAPConnection ldapConnection) throws GuacamoleException { // Query all accessible users userDirectory = new SimpleDirectory<>( userService.getUsers(ldapConnection) ); // Query all accessible user groups userGroup...
[ "public", "void", "init", "(", "AuthenticatedUser", "user", ",", "LDAPConnection", "ldapConnection", ")", "throws", "GuacamoleException", "{", "// Query all accessible users", "userDirectory", "=", "new", "SimpleDirectory", "<>", "(", "userService", ".", "getUsers", "("...
Initializes this UserContext using the provided AuthenticatedUser and LDAPConnection. @param user The AuthenticatedUser representing the user that authenticated. This user may have been authenticated by a different authentication provider (not LDAP). @param ldapConnection The connection to the LDAP server to use when...
[ "Initializes", "this", "UserContext", "using", "the", "provided", "AuthenticatedUser", "and", "LDAPConnection", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/LDAPUserContext.java#L127-L178
train
Initializes the user and LDAP authentication context.
Of course, here is the Java code you requested: ```java public void init(AuthenticatedUser user, LDAPConnection ldapConnection) throws GuacamoleException { // Query all accessible users userDirectory = new SimpleDirectory<>( userService.getUsers(ldapConnection) ); ...
ppiastucki/recast4j
recast/src/main/java/org/recast4j/recast/RecastFilter.java
RecastFilter.filterWalkableLowHeightSpans
public static void filterWalkableLowHeightSpans(Context ctx, int walkableHeight, Heightfield solid) { ctx.startTimer("FILTER_WALKABLE"); int w = solid.width; int h = solid.height; int MAX_HEIGHT = 0xffff; // Remove walkable flag from spans which do not have enough // sp...
java
public static void filterWalkableLowHeightSpans(Context ctx, int walkableHeight, Heightfield solid) { ctx.startTimer("FILTER_WALKABLE"); int w = solid.width; int h = solid.height; int MAX_HEIGHT = 0xffff; // Remove walkable flag from spans which do not have enough // sp...
[ "public", "static", "void", "filterWalkableLowHeightSpans", "(", "Context", "ctx", ",", "int", "walkableHeight", ",", "Heightfield", "solid", ")", "{", "ctx", ".", "startTimer", "(", "\"FILTER_WALKABLE\"", ")", ";", "int", "w", "=", "solid", ".", "width", ";",...
/ @see rcHeightfield, rcConfig
[ "/" ]
a414dc34f16b87c95fb4e0f46c28a7830d421788
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/recast/src/main/java/org/recast4j/recast/RecastFilter.java#L161-L181
train
Filter the span list which is walkable by lower height spans.
Of course, here is the Java code you requested: ```java public static void filterWalkableLowHeightSpans(Context ctx, int walkableHeight, Heightfield solid) { ctx.startTimer("FILTER_WALKABLE"); int w = solid.width; int h = solid.height; int MAX_HEIGHT = 0xffff; // Remove walkab...
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ParserDQL.java
ParserDQL.readExpression
private HsqlException readExpression(HsqlArrayList exprList, short[] parseList, int start, int count, boolean isOption, boolean preferToThrow) { /* disable 2 lines ... void readExpression(HsqlArrayList exprList, short[] parseList, int start, int ...
java
private HsqlException readExpression(HsqlArrayList exprList, short[] parseList, int start, int count, boolean isOption, boolean preferToThrow) { /* disable 2 lines ... void readExpression(HsqlArrayList exprList, short[] parseList, int start, int ...
[ "private", "HsqlException", "readExpression", "(", "HsqlArrayList", "exprList", ",", "short", "[", "]", "parseList", ",", "int", "start", ",", "int", "count", ",", "boolean", "isOption", ",", "boolean", "preferToThrow", ")", "{", "/* disable 2 lines ...\n void re...
* @param exprList @param parseList @param start @param count @param isOption @param preferToThrow - if false, exceptions are quietly passed up the stack rather than thrown. making it possible to distinguish (breakpoint at) serious exceptions vs. false alarms that would merely indicate that the parser wandered down an ...
[ "*" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserDQL.java#L4449-L4636
train
readExpression is called to read an SQL expression.
Of course, here is the Java code you requested: ```java private HsqlException readExpression(HsqlArrayList exprList, short[] parseList, int start, int count, boolean isOption, boolean preferToThrow) { /* disable 2 lines ... void readExpression(HsqlArrayList exprList, s...
j256/ormlite-core
src/main/java/com/j256/ormlite/logger/Logger.java
Logger.error
public void error(Throwable throwable, String msg, Object arg0, Object arg1, Object arg2) { logIfEnabled(Level.ERROR, throwable, msg, arg0, arg1, arg2, null); }
java
public void error(Throwable throwable, String msg, Object arg0, Object arg1, Object arg2) { logIfEnabled(Level.ERROR, throwable, msg, arg0, arg1, arg2, null); }
[ "public", "void", "error", "(", "Throwable", "throwable", ",", "String", "msg", ",", "Object", "arg0", ",", "Object", "arg1", ",", "Object", "arg2", ")", "{", "logIfEnabled", "(", "Level", ".", "ERROR", ",", "throwable", ",", "msg", ",", "arg0", ",", "...
Log a error message with a throwable.
[ "Log", "a", "error", "message", "with", "a", "throwable", "." ]
154d85bbb9614a0ea65a012251257831fb4fba21
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/logger/Logger.java#L389-L391
train
Log an error with a throwable.
Of course, here is the Java code you requested: ```java public void error(Throwable throwable, String msg, Object arg0, Object arg1, Object arg2) { logIfEnabled(Level.ERROR, throwable, msg, arg0, arg1, arg2, null); } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-payment-api/src/main/java/com/liferay/commerce/payment/service/persistence/CommercePaymentMethodGroupRelUtil.java
CommercePaymentMethodGroupRelUtil.findByG_A_PrevAndNext
public static CommercePaymentMethodGroupRel[] findByG_A_PrevAndNext( long commercePaymentMethodGroupRelId, long groupId, boolean active, OrderByComparator<CommercePaymentMethodGroupRel> orderByComparator) throws com.liferay.commerce.payment.exception.NoSuchPaymentMethodGroupRelException { return getPersistence(...
java
public static CommercePaymentMethodGroupRel[] findByG_A_PrevAndNext( long commercePaymentMethodGroupRelId, long groupId, boolean active, OrderByComparator<CommercePaymentMethodGroupRel> orderByComparator) throws com.liferay.commerce.payment.exception.NoSuchPaymentMethodGroupRelException { return getPersistence(...
[ "public", "static", "CommercePaymentMethodGroupRel", "[", "]", "findByG_A_PrevAndNext", "(", "long", "commercePaymentMethodGroupRelId", ",", "long", "groupId", ",", "boolean", "active", ",", "OrderByComparator", "<", "CommercePaymentMethodGroupRel", ">", "orderByComparator", ...
Returns the commerce payment method group rels before and after the current commerce payment method group rel in the ordered set where groupId = &#63; and active = &#63;. @param commercePaymentMethodGroupRelId the primary key of the current commerce payment method group rel @param groupId the group ID @param active th...
[ "Returns", "the", "commerce", "payment", "method", "group", "rels", "before", "and", "after", "the", "current", "commerce", "payment", "method", "group", "rel", "in", "the", "ordered", "set", "where", "groupId", "=", "&#63", ";", "and", "active", "=", "&#63"...
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-payment-api/src/main/java/com/liferay/commerce/payment/service/persistence/CommercePaymentMethodGroupRelUtil.java#L495-L502
train
Returns the commerce payment method group rels before and after the current state of this commerce payment method.
Of course, here is the Java code you requested: ```java public static CommercePaymentMethodGroupRel[] findByG_A_PrevAndNext( long commercePaymentMethodGroupRelId, long groupId, boolean active, OrderByComparator<CommercePaymentMethodGroupRel> orderByComparator) throws com.liferay.commerce.payment.exception.NoSuch...
cloudiator/sword
core/src/main/java/de/uniulm/omi/cloudiator/sword/domain/LocationBuilder.java
LocationBuilder.build
public Location build() { return new LocationImpl(id, providerId, name, parent, isAssignable, locationScope, geoLocation, tags); }
java
public Location build() { return new LocationImpl(id, providerId, name, parent, isAssignable, locationScope, geoLocation, tags); }
[ "public", "Location", "build", "(", ")", "{", "return", "new", "LocationImpl", "(", "id", ",", "providerId", ",", "name", ",", "parent", ",", "isAssignable", ",", "locationScope", ",", "geoLocation", ",", "tags", ")", ";", "}" ]
Builds the location. @return the location.
[ "Builds", "the", "location", "." ]
b7808ea2776c6d70d439342c403369dfc5bb26bc
https://github.com/cloudiator/sword/blob/b7808ea2776c6d70d439342c403369dfc5bb26bc/core/src/main/java/de/uniulm/omi/cloudiator/sword/domain/LocationBuilder.java#L76-L79
train
Build a location object.
Of course, here is the Java code you requested: ```java public Location build() { return new LocationImpl(id, providerId, name, parent, isAssignable, locationScope, geoLocation, tags); } ``` Hope this helps!
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/decorator/MaterialDialogDecorator.java
MaterialDialogDecorator.adaptWindowBackgroundAndInset
private void adaptWindowBackgroundAndInset() { DialogRootView rootView = getRootView(); if (rootView != null) { rootView.setWindowBackgroundAndInset(windowBackground, windowInsets); } }
java
private void adaptWindowBackgroundAndInset() { DialogRootView rootView = getRootView(); if (rootView != null) { rootView.setWindowBackgroundAndInset(windowBackground, windowInsets); } }
[ "private", "void", "adaptWindowBackgroundAndInset", "(", ")", "{", "DialogRootView", "rootView", "=", "getRootView", "(", ")", ";", "if", "(", "rootView", "!=", "null", ")", "{", "rootView", ".", "setWindowBackgroundAndInset", "(", "windowBackground", ",", "window...
Adapts the background and inset of the dialog's window.
[ "Adapts", "the", "background", "and", "inset", "of", "the", "dialog", "s", "window", "." ]
8990eed72ee5f5a9720836ee708f71ac0d43053b
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/decorator/MaterialDialogDecorator.java#L804-L810
train
Adapts the window background and inset of the dialog s root view.
Of course, here is the Java code you requested: ```java private void adaptWindowBackgroundAndInset() { DialogRootView rootView = getRootView(); if (rootView != null) { rootView.setWindowBackgroundAndInset(windowBackground, windowInsets); } } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionData.java
SessionData.getAttributeNames
public Enumeration getAttributeNames() { Enumeration attrNameEnum; if (!_hasSecurityInfo) { attrNameEnum = super.getAttributeNames(); } else { String[] attrNames = getValueNames(); attrNameEnum = new ArrayEnumeration(attrNames); } return attrNa...
java
public Enumeration getAttributeNames() { Enumeration attrNameEnum; if (!_hasSecurityInfo) { attrNameEnum = super.getAttributeNames(); } else { String[] attrNames = getValueNames(); attrNameEnum = new ArrayEnumeration(attrNames); } return attrNa...
[ "public", "Enumeration", "getAttributeNames", "(", ")", "{", "Enumeration", "attrNameEnum", ";", "if", "(", "!", "_hasSecurityInfo", ")", "{", "attrNameEnum", "=", "super", ".", "getAttributeNames", "(", ")", ";", "}", "else", "{", "String", "[", "]", "attrN...
/* @see javax.servlet.http.HttpSession#getAttributeNames()
[ "/", "*" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionData.java#L170-L179
train
Get the attribute names.
Of course, here is the Java code you requested: ```java public Enumeration getAttributeNames() { Enumeration attrNameEnum; if (!_hasSecurityInfo) { attrNameEnum = super.getAttributeNames(); } else { String[] attrNames = getValueNames(); attrNameEnum = new Arr...
alkacon/opencms-core
src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelectDialog.java
CmsPrincipalSelectDialog.getContainerForType
private IndexedContainer getContainerForType(WidgetType type, boolean realOnly, String ou) throws CmsException { IndexedContainer res = null; List<FontIcon> icon = new ArrayList<FontIcon>(); if (!OpenCms.getRoleManager().hasRole(m_cms, CmsRole.ACCOUNT_MANAGER)) { List<CmsGroup> grou...
java
private IndexedContainer getContainerForType(WidgetType type, boolean realOnly, String ou) throws CmsException { IndexedContainer res = null; List<FontIcon> icon = new ArrayList<FontIcon>(); if (!OpenCms.getRoleManager().hasRole(m_cms, CmsRole.ACCOUNT_MANAGER)) { List<CmsGroup> grou...
[ "private", "IndexedContainer", "getContainerForType", "(", "WidgetType", "type", ",", "boolean", "realOnly", ",", "String", "ou", ")", "throws", "CmsException", "{", "IndexedContainer", "res", "=", "null", ";", "List", "<", "FontIcon", ">", "icon", "=", "new", ...
Returns the container for the currently selected Principal group.<p> @param type to be shown @param realOnly true->get only real principals @param ou ou @return indexed container @throws CmsException exception
[ "Returns", "the", "container", "for", "the", "currently", "selected", "Principal", "group", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelectDialog.java#L442-L549
train
Gets the container for the widget type.
Of course, here is the Java code you requested: ```java private IndexedContainer getContainerForType(WidgetType type, boolean realOnly, String ou) throws CmsException { IndexedContainer res = null; List<FontIcon> icon = new ArrayList<FontIcon>(); if (!OpenCms.getRoleManager().hasRole(m_cms, Cm...
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.pruneConcurrentScope
public static void pruneConcurrentScope(PvmExecutionImpl execution) { ensureConcurrentScope(execution); LOG.debugConcurrentScopeIsPruned(execution); execution.setConcurrent(false); }
java
public static void pruneConcurrentScope(PvmExecutionImpl execution) { ensureConcurrentScope(execution); LOG.debugConcurrentScopeIsPruned(execution); execution.setConcurrent(false); }
[ "public", "static", "void", "pruneConcurrentScope", "(", "PvmExecutionImpl", "execution", ")", "{", "ensureConcurrentScope", "(", "execution", ")", ";", "LOG", ".", "debugConcurrentScopeIsPruned", "(", "execution", ")", ";", "execution", ".", "setConcurrent", "(", "...
Prunes a concurrent scope. This can only happen if (a) the process instance has been migrated from a previous version to a new version of the process engine This is an inverse operation to {@link #createConcurrentScope(PvmExecutionImpl)}. See: javadoc of this class for note about concurrent scopes. @param execution
[ "Prunes", "a", "concurrent", "scope", ".", "This", "can", "only", "happen", "if", "(", "a", ")", "the", "process", "instance", "has", "been", "migrated", "from", "a", "previous", "version", "to", "a", "new", "version", "of", "the", "process", "engine" ]
1a464fc887ef3760e53d6f91b9e5b871a0d77cc0
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L99-L103
train
Prunes the concurrent scope of the given execution.
Of course, here is the Java code you requested: ```java public static void pruneConcurrentScope(PvmExecutionImpl execution) { ensureConcurrentScope(execution); LOG.debugConcurrentScopeIsPruned(execution); execution.setConcurrent(false); } ``` Hope this helps!
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/user/db/UserRegistration.java
UserRegistration.getTableNames
public String getTableNames(boolean bAddQuotes) { return (m_tableName == null) ? Record.formatTableNames(USER_REGISTRATION_FILE, bAddQuotes) : super.getTableNames(bAddQuotes); }
java
public String getTableNames(boolean bAddQuotes) { return (m_tableName == null) ? Record.formatTableNames(USER_REGISTRATION_FILE, bAddQuotes) : super.getTableNames(bAddQuotes); }
[ "public", "String", "getTableNames", "(", "boolean", "bAddQuotes", ")", "{", "return", "(", "m_tableName", "==", "null", ")", "?", "Record", ".", "formatTableNames", "(", "USER_REGISTRATION_FILE", ",", "bAddQuotes", ")", ":", "super", ".", "getTableNames", "(", ...
Get the table name.
[ "Get", "the", "table", "name", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/UserRegistration.java#L58-L61
train
Get the table name for this record.
Of course, here is the Java code you requested: ```java public String getTableNames(boolean bAddQuotes) { return (m_tableName == null) ? Record.formatTableNames(USER_REGISTRATION_FILE, bAddQuotes) : super.getTableNames(bAddQuotes); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/behavior/_AjaxBehaviorDeltaStateHelper.java
_AjaxBehaviorDeltaStateHelper.saveState
public Object saveState(FacesContext context) { Map serializableMap = (isInitialStateMarked()) ? _deltas : _fullState; if (serializableMap == null || serializableMap.size() == 0) { return null; } /* int stateHolderKeyCount = 0; if (isInitalStateM...
java
public Object saveState(FacesContext context) { Map serializableMap = (isInitialStateMarked()) ? _deltas : _fullState; if (serializableMap == null || serializableMap.size() == 0) { return null; } /* int stateHolderKeyCount = 0; if (isInitalStateM...
[ "public", "Object", "saveState", "(", "FacesContext", "context", ")", "{", "Map", "serializableMap", "=", "(", "isInitialStateMarked", "(", ")", ")", "?", "_deltas", ":", "_fullState", ";", "if", "(", "serializableMap", "==", "null", "||", "serializableMap", "...
Serializing cod the serialized data structure consists of key value pairs unless the value itself is an internal array or a map in case of an internal array or map the value itself is another array with its initial value myfaces.InternalArray, myfaces.internalMap <p/> the internal Array is then mapped to another array ...
[ "Serializing", "cod", "the", "serialized", "data", "structure", "consists", "of", "key", "value", "pairs", "unless", "the", "value", "itself", "is", "an", "internal", "array", "or", "a", "map", "in", "case", "of", "an", "internal", "array", "or", "map", "t...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/behavior/_AjaxBehaviorDeltaStateHelper.java#L393-L482
train
Save the state of the component.
Of course, here is the Java code you requested: ```java public Object saveState(FacesContext context) { Map serializableMap = (isInitialStateMarked()) ? _deltas : _fullState; if (serializableMap == null || serializableMap.size() == 0) { return null; } /* ...
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java
BaseBo.getAttributes
public Map<String, Object> getAttributes() { if (attributes == null) { return null; } Lock lock = lockForRead(); try { return cloneData(attributes); } finally { lock.unlock(); } }
java
public Map<String, Object> getAttributes() { if (attributes == null) { return null; } Lock lock = lockForRead(); try { return cloneData(attributes); } finally { lock.unlock(); } }
[ "public", "Map", "<", "String", ",", "Object", ">", "getAttributes", "(", ")", "{", "if", "(", "attributes", "==", "null", ")", "{", "return", "null", ";", "}", "Lock", "lock", "=", "lockForRead", "(", ")", ";", "try", "{", "return", "cloneData", "("...
Get all BO's attributes as a map. @return @since 0.8.2
[ "Get", "all", "BO", "s", "attributes", "as", "a", "map", "." ]
8d059ddf641a1629aa53851f9d1b41abf175a180
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java#L136-L146
train
Gets the attributes.
Of course, here is the Java code you requested: ```java public Map<String, Object> getAttributes() { if (attributes == null) { return null; } Lock lock = lockForRead(); try { return cloneData(attributes); } finally { lock.unlock(); } ...
killme2008/xmemcached
src/main/java/com/google/code/yanf4j/nio/impl/NioTCPSession.java
NioTCPSession.blockingRead
protected final int blockingRead() throws ClosedChannelException, IOException { int n = 0; int readCount = 0; Selector readSelector = SelectorFactory.getSelector(); SelectionKey tmpKey = null; try { if (this.selectableChannel.isOpen()) { tmpKey = this.selectableChannel.register(readSel...
java
protected final int blockingRead() throws ClosedChannelException, IOException { int n = 0; int readCount = 0; Selector readSelector = SelectorFactory.getSelector(); SelectionKey tmpKey = null; try { if (this.selectableChannel.isOpen()) { tmpKey = this.selectableChannel.register(readSel...
[ "protected", "final", "int", "blockingRead", "(", ")", "throws", "ClosedChannelException", ",", "IOException", "{", "int", "n", "=", "0", ";", "int", "readCount", "=", "0", ";", "Selector", "readSelector", "=", "SelectorFactory", ".", "getSelector", "(", ")", ...
Blocking read using temp selector @return @throws ClosedChannelException @throws IOException
[ "Blocking", "read", "using", "temp", "selector" ]
66150915938813b3e3413de1d7b43b6ff9b1478d
https://github.com/killme2008/xmemcached/blob/66150915938813b3e3413de1d7b43b6ff9b1478d/src/main/java/com/google/code/yanf4j/nio/impl/NioTCPSession.java#L234-L270
train
Blocking read.
Of course, here is the Java code you requested: ```java protected final int blockingRead() throws ClosedChannelException, IOException { int n = 0; int readCount = 0; Selector readSelector = SelectorFactory.getSelector(); SelectionKey tmpKey = null; try { if (this.selectableChannel.isOpen()) {...
linkhub-sdk/popbill.sdk.java
src/main/java/com/popbill/api/taxinvoice/TaxinvoiceServiceImp.java
TaxinvoiceServiceImp.update
@Override public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey, Taxinvoice taxinvoice, String UserID) throws PopbillException { if (KeyType == null) throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다."); if (MgtKey == null || MgtKey.i...
java
@Override public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey, Taxinvoice taxinvoice, String UserID) throws PopbillException { if (KeyType == null) throw new PopbillException(-99999999, "관리번호형태가 입력되지 않았습니다."); if (MgtKey == null || MgtKey.i...
[ "@", "Override", "public", "Response", "update", "(", "String", "CorpNum", ",", "MgtKeyType", "KeyType", ",", "String", "MgtKey", ",", "Taxinvoice", "taxinvoice", ",", "String", "UserID", ")", "throws", "PopbillException", "{", "if", "(", "KeyType", "==", "nul...
/* (non-Javadoc) @see com.popbill.api.TaxinvoiceService#update(java.lang.String, com.popbill.api.taxinvoice.MgtKeyType, java.lang.String, com.popbill.api.taxinvoice.Taxinvoice, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
63a341fefe96d60a368776638f3d4c81888238b7
https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/taxinvoice/TaxinvoiceServiceImp.java#L187-L201
train
Update a Tax Source
Of course, here is the Java code you requested: ```java @Override public Response update(String CorpNum, MgtKeyType KeyType, String MgtKey, Taxinvoice taxinvoice, String UserID) throws PopbillException { if (KeyType == null) throw new PopbillException(-99999999, "관리번호...
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableUniqueVariable.java
RandomVariableUniqueVariable.apply
private RandomVariableUniqueVariable apply(OperatorType operatortype, RandomVariable[] operatorVariables){ ArrayList<RandomVariableUniqueVariable> parentVariables = new ArrayList<>(); for(int i = 0; i < operatorVariables.length; i++){ /* * is variable upcastable to {@link RandomVariableUniqueVariable...
java
private RandomVariableUniqueVariable apply(OperatorType operatortype, RandomVariable[] operatorVariables){ ArrayList<RandomVariableUniqueVariable> parentVariables = new ArrayList<>(); for(int i = 0; i < operatorVariables.length; i++){ /* * is variable upcastable to {@link RandomVariableUniqueVariable...
[ "private", "RandomVariableUniqueVariable", "apply", "(", "OperatorType", "operatortype", ",", "RandomVariable", "[", "]", "operatorVariables", ")", "{", "ArrayList", "<", "RandomVariableUniqueVariable", ">", "parentVariables", "=", "new", "ArrayList", "<>", "(", ")", ...
Apply one of the possible {@link OperatorType} to an array of {@link RandomVariable}s. If the entries in the array are not an instance of {@link RandomVariableUniqueVariable} generate a new {@link RandomVariableUniqueVariable} and consider them as constants.
[ "Apply", "one", "of", "the", "possible", "{" ]
a3c067d52dd33feb97d851df6cab130e4116759f
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableUniqueVariable.java#L637-L702
train
This is the main entry point for the RandomVariableUniqueVariable class. It creates a new instance of the class RandomVariableUniqueVariable class based on the list of variables in the operator.
Of course, here is the Java code you requested: ```java private RandomVariableUniqueVariable apply(OperatorType operatortype, RandomVariable[] operatorVariables){ ArrayList<RandomVariableUniqueVariable> parentVariables = new ArrayList<>(); for(int i = 0; i < operatorVariables.length; i++){ /* * is v...
ben-manes/caffeine
caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java
BoundedLocalCache.expireAfterWriteOrder
@SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { Supplier<Iterator<Node<K, V>>> iteratorSupplier = () -> oldest ? writeOrderDeque().iterator() : writeOrderDeque().descendingIterator(); return fixedSnapshot(iteratorSu...
java
@SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { Supplier<Iterator<Node<K, V>>> iteratorSupplier = () -> oldest ? writeOrderDeque().iterator() : writeOrderDeque().descendingIterator(); return fixedSnapshot(iteratorSu...
[ "@", "SuppressWarnings", "(", "\"GuardedByChecker\"", ")", "Map", "<", "K", ",", "V", ">", "expireAfterWriteOrder", "(", "int", "limit", ",", "Function", "<", "V", ",", "V", ">", "transformer", ",", "boolean", "oldest", ")", "{", "Supplier", "<", "Iterator...
Returns an unmodifiable snapshot map ordered in write expiration order, either ascending or descending. Beware that obtaining the mappings is <em>NOT</em> a constant-time operation. @param limit the maximum number of entries @param transformer a function that unwraps the value @param oldest the iteration order @return...
[ "Returns", "an", "unmodifiable", "snapshot", "map", "ordered", "in", "write", "expiration", "order", "either", "ascending", "or", "descending", ".", "Beware", "that", "obtaining", "the", "mappings", "is", "<em", ">", "NOT<", "/", "em", ">", "a", "constant", ...
4cf6d6e6a18ea2e8088f166261e5949343b0f2eb
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java#L2687-L2693
train
Expires the cache after a write order operation.
Of course, here is the Java code you requested: ```java @SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { Supplier<Iterator<Node<K, V>>> iteratorSupplier = () -> oldest ? writeOrderDeque().iterator() : writeOrderDeque()....
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DefaultMaven2OsgiConverter.java
DefaultMaven2OsgiConverter.getBundleSymbolicName
public static String getBundleSymbolicName(String groupId, String artifactId) { int i = groupId.lastIndexOf('.'); String lastSection = groupId.substring(++i); if (artifactId.equals(lastSection)) { return groupId; } if (artifactId.equals(groupId) || a...
java
public static String getBundleSymbolicName(String groupId, String artifactId) { int i = groupId.lastIndexOf('.'); String lastSection = groupId.substring(++i); if (artifactId.equals(lastSection)) { return groupId; } if (artifactId.equals(groupId) || a...
[ "public", "static", "String", "getBundleSymbolicName", "(", "String", "groupId", ",", "String", "artifactId", ")", "{", "int", "i", "=", "groupId", ".", "lastIndexOf", "(", "'", "'", ")", ";", "String", "lastSection", "=", "groupId", ".", "substring", "(", ...
Get the symbolic name as groupId + "." + artifactId, with the following exceptions. Unlike the original method from the Maven Bundle Plugin, this method does not use the bundle inspection, as the artifact's file does not exist when this method is called. <ul> <li>if artifactId is equal to last section of groupId then g...
[ "Get", "the", "symbolic", "name", "as", "groupId", "+", ".", "+", "artifactId", "with", "the", "following", "exceptions", ".", "Unlike", "the", "original", "method", "from", "the", "Maven", "Bundle", "Plugin", "this", "method", "does", "not", "use", "the", ...
a35b6431200fec56b178c0ff60837ed73fd7874d
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DefaultMaven2OsgiConverter.java#L112-L133
train
Gets the bundle symbolic name.
Of course, here is the Java code you requested: ```java public static String getBundleSymbolicName(String groupId, String artifactId) { int i = groupId.lastIndexOf('.'); String lastSection = groupId.substring(++i); if (artifactId.equals(lastSection)) { return groupId; } ...
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/apploader/impl/GuiceBuilder.java
GuiceBuilder.build
public Injector build() { // Create copies of the configurations and roles List<PropertyFile> configs = new ArrayList<>(this.configs); List<GuiceRole> roles = new ArrayList<>(this.roles); return GuiceFactory.build(this.registry, this.scannerFactory, conf...
java
public Injector build() { // Create copies of the configurations and roles List<PropertyFile> configs = new ArrayList<>(this.configs); List<GuiceRole> roles = new ArrayList<>(this.roles); return GuiceFactory.build(this.registry, this.scannerFactory, conf...
[ "public", "Injector", "build", "(", ")", "{", "// Create copies of the configurations and roles", "List", "<", "PropertyFile", ">", "configs", "=", "new", "ArrayList", "<>", "(", "this", ".", "configs", ")", ";", "List", "<", "GuiceRole", ">", "roles", "=", "n...
Instantiate the guice environment. For information on what's involved in this process see {@link GuiceFactory#build(GuiceRegistry, ClassScannerFactory, List, List, GuiceSetup, boolean, boolean, ClassLoader)} and {@link GuiceFactory#createInjector(GuiceRegistry, ClassScannerFactory, GuiceConfig, GuiceSetup, List)} @ret...
[ "Instantiate", "the", "guice", "environment", ".", "For", "information", "on", "what", "s", "involved", "in", "this", "process", "see", "{", "@link", "GuiceFactory#build", "(", "GuiceRegistry", "ClassScannerFactory", "List", "List", "GuiceSetup", "boolean", "boolean...
d4025d2f881bc0542b1e004c5f65a1ccaf895836
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/apploader/impl/GuiceBuilder.java#L174-L188
train
Build the Guice instance.
Of course, here is the Java code you requested: ```java public Injector build() { // Create copies of the configurations and roles List<PropertyFile> configs = new ArrayList<>(this.configs); List<GuiceRole> roles = new ArrayList<>(this.roles); return GuiceFactory.build(this.registry, ...
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaStreamAddCallback
public static int cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback callback, Object userData, int flags) { return checkResult(cudaStreamAddCallbackNative(stream, callback, userData, flags)); }
java
public static int cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback callback, Object userData, int flags) { return checkResult(cudaStreamAddCallbackNative(stream, callback, userData, flags)); }
[ "public", "static", "int", "cudaStreamAddCallback", "(", "cudaStream_t", "stream", ",", "cudaStreamCallback", "callback", ",", "Object", "userData", ",", "int", "flags", ")", "{", "return", "checkResult", "(", "cudaStreamAddCallbackNative", "(", "stream", ",", "call...
Add a callback to a compute stream. <pre> cudaError_t cudaStreamAddCallback ( cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags ) </pre> <div> <p>Add a callback to a compute stream. Adds a callback to be called on the host after all currently enqueued items in the stream have com...
[ "Add", "a", "callback", "to", "a", "compute", "stream", "." ]
468528b5b9b37dfceb6ed83fcfd889e9b359f984
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L6807-L6810
train
Adds a callback to a CUDA stream.
Of course, here is the Java code you requested: ```java public static int cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback callback, Object userData, int flags) { return checkResult(cudaStreamAddCallbackNative(stream, callback, userData, flags)); } ``` Hope this helps!
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/editor/LookupBinding.java
LookupBinding.getDataEditorButton
protected AbstractButton getDataEditorButton() { if (dataEditorButton == null) { dataEditorButton = getDataEditorCommand().createButton(); dataEditorButton.setFocusable(false); //dataEditorButton.addFocusListener(createFocusListener()); } return dataEditorBut...
java
protected AbstractButton getDataEditorButton() { if (dataEditorButton == null) { dataEditorButton = getDataEditorCommand().createButton(); dataEditorButton.setFocusable(false); //dataEditorButton.addFocusListener(createFocusListener()); } return dataEditorBut...
[ "protected", "AbstractButton", "getDataEditorButton", "(", ")", "{", "if", "(", "dataEditorButton", "==", "null", ")", "{", "dataEditorButton", "=", "getDataEditorCommand", "(", ")", ".", "createButton", "(", ")", ";", "dataEditorButton", ".", "setFocusable", "(",...
Get/create the button to open the dataEditor in selection mode
[ "Get", "/", "create", "the", "button", "to", "open", "the", "dataEditor", "in", "selection", "mode" ]
6aad6e640b348cda8f3b0841f6e42025233f1eb8
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/editor/LookupBinding.java#L506-L514
train
Gets the data editor button.
Of course, here is the Java code you requested: ```java protected AbstractButton getDataEditorButton() { if (dataEditorButton == null) { dataEditorButton = getDataEditorCommand().createButton(); dataEditorButton.setFocusable(false); //dataEditorButton.addFocusListener(create...
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/collection/IteratorHelper.java
IteratorHelper.getEnumeration
@Nonnull public static <ELEMENTTYPE> Enumeration <ELEMENTTYPE> getEnumeration (@Nullable final Iterator <ELEMENTTYPE> aIter) { if (aIter == null) return new EmptyEnumeration <> (); return new EnumerationFromIterator <> (aIter); }
java
@Nonnull public static <ELEMENTTYPE> Enumeration <ELEMENTTYPE> getEnumeration (@Nullable final Iterator <ELEMENTTYPE> aIter) { if (aIter == null) return new EmptyEnumeration <> (); return new EnumerationFromIterator <> (aIter); }
[ "@", "Nonnull", "public", "static", "<", "ELEMENTTYPE", ">", "Enumeration", "<", "ELEMENTTYPE", ">", "getEnumeration", "(", "@", "Nullable", "final", "Iterator", "<", "ELEMENTTYPE", ">", "aIter", ")", "{", "if", "(", "aIter", "==", "null", ")", "return", "...
Get an Enumeration object based on an Iterator object. @param <ELEMENTTYPE> the type of the elements in the container @param aIter iterator object to use @return an Enumeration object
[ "Get", "an", "Enumeration", "object", "based", "on", "an", "Iterator", "object", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/collection/IteratorHelper.java#L232-L238
train
Get an enumeration from an iterator.
Of course, here is the Java code you requested: ```java @Nonnull public static <ELEMENTTYPE> Enumeration <ELEMENTTYPE> getEnumeration (@Nullable final Iterator <ELEMENTTYPE> aIter) { if (aIter == null) return new EmptyEnumeration <> (); return new EnumerationFromIterator <> (aIter); } ``` Hope thi...
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditmessages.java
auditmessages.get_filtered
public static auditmessages[] get_filtered(nitro_service service, String filter) throws Exception{ auditmessages obj = new auditmessages(); options option = new options(); option.set_filter(filter); auditmessages[] response = (auditmessages[]) obj.getfiltered(service, option); return response; }
java
public static auditmessages[] get_filtered(nitro_service service, String filter) throws Exception{ auditmessages obj = new auditmessages(); options option = new options(); option.set_filter(filter); auditmessages[] response = (auditmessages[]) obj.getfiltered(service, option); return response; }
[ "public", "static", "auditmessages", "[", "]", "get_filtered", "(", "nitro_service", "service", ",", "String", "filter", ")", "throws", "Exception", "{", "auditmessages", "obj", "=", "new", "auditmessages", "(", ")", ";", "options", "option", "=", "new", "opti...
Use this API to fetch filtered set of auditmessages resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
[ "Use", "this", "API", "to", "fetch", "filtered", "set", "of", "auditmessages", "resources", ".", "filter", "string", "should", "be", "in", "JSON", "format", ".", "eg", ":", "port", ":", "80", "servicetype", ":", "HTTP", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/audit/auditmessages.java#L183-L189
train
Use this API to fetch filtered set of auditmessages resources. set the filter parameter values in filter parameter.
Of course, here is the Java code you requested: ```java public static auditmessages[] get_filtered(nitro_service service, String filter) throws Exception{ auditmessages obj = new auditmessages(); options option = new options(); option.set_filter(filter); auditmessages[] response = (auditmessages[]) obj.getfilt...
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/NettyTransport.java
NettyTransport.getChannelHandlers
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChannelHandlers(final MessageInput input) { LinkedHashMap<String, Callable<? extends ChannelHandler>> handlerList = new LinkedHashMap<>(); handlerList.put("exception-logger", () -> new ExceptionLoggingChannelHandler(input, log)); ...
java
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChannelHandlers(final MessageInput input) { LinkedHashMap<String, Callable<? extends ChannelHandler>> handlerList = new LinkedHashMap<>(); handlerList.put("exception-logger", () -> new ExceptionLoggingChannelHandler(input, log)); ...
[ "protected", "LinkedHashMap", "<", "String", ",", "Callable", "<", "?", "extends", "ChannelHandler", ">", ">", "getChannelHandlers", "(", "final", "MessageInput", "input", ")", "{", "LinkedHashMap", "<", "String", ",", "Callable", "<", "?", "extends", "ChannelHa...
Subclasses can override this to add additional {@link ChannelHandler channel handlers} to the Netty {@link ChannelPipeline} to support additional features. Some common use cases are to add connection counters or traffic shapers. @param input The {@link MessageInput} for which these channel handlers are being added @r...
[ "Subclasses", "can", "override", "this", "to", "add", "additional", "{", "@link", "ChannelHandler", "channel", "handlers", "}", "to", "the", "Netty", "{", "@link", "ChannelPipeline", "}", "to", "support", "additional", "features", "." ]
50b565dcead6e0a372236d5c2f8530dc5726fa9b
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/NettyTransport.java#L143-L151
train
Gets the channel handlers.
Of course, here is the Java code you requested: ```java protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChannelHandlers(final MessageInput input) { LinkedHashMap<String, Callable<? extends ChannelHandler>> handlerList = new LinkedHashMap<>(); handlerList.put("exception-logger", ...
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/localization/ResourceBundleMessageResolver.java
ResourceBundleMessageResolver.removeResourceBundle
public boolean removeResourceBundle(final ResourceBundle resourceBundle) { Objects.requireNonNull(resourceBundle, "resourceBundle should not be null."); if(!messageBundles.contains(resourceBundle)) { return false; } messageBundles.remove(resourceBundl...
java
public boolean removeResourceBundle(final ResourceBundle resourceBundle) { Objects.requireNonNull(resourceBundle, "resourceBundle should not be null."); if(!messageBundles.contains(resourceBundle)) { return false; } messageBundles.remove(resourceBundl...
[ "public", "boolean", "removeResourceBundle", "(", "final", "ResourceBundle", "resourceBundle", ")", "{", "Objects", ".", "requireNonNull", "(", "resourceBundle", ",", "\"resourceBundle should not be null.\"", ")", ";", "if", "(", "!", "messageBundles", ".", "contains", ...
メッセージソースを削除する。 @param resourceBundle 削除対象のメッセージソース @return 登録されているメッセージソースがある場合はtrueを返します。 @throws NullPointerException resourceBundle is null.
[ "メッセージソースを削除する。" ]
9910320cb6dc143be972c7d10d9ab5ffb09c3b84
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/localization/ResourceBundleMessageResolver.java#L133-L142
train
Removes a ResourceBundle from the list of message bundles.
Of course, here is the Java code you requested: ```java public boolean removeResourceBundle(final ResourceBundle resourceBundle) { Objects.requireNonNull(resourceBundle, "resourceBundle should not be null."); if(!messageBundles.contains(resourceBundle)) { return false; ...
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JITOptions.java
JITOptions.getFloat
public float getFloat(int key) { Object value = map.get(key); if (!(value instanceof Float)) { return 0.0f; } Float result = (Float)value; return result; }
java
public float getFloat(int key) { Object value = map.get(key); if (!(value instanceof Float)) { return 0.0f; } Float result = (Float)value; return result; }
[ "public", "float", "getFloat", "(", "int", "key", ")", "{", "Object", "value", "=", "map", ".", "get", "(", "key", ")", ";", "if", "(", "!", "(", "value", "instanceof", "Float", ")", ")", "{", "return", "0.0f", ";", "}", "Float", "result", "=", "...
Returns the value of the given option. Returns 0 if the specified option is unknown or not a <code>float</code> value. @param key An option identifier @return The option value
[ "Returns", "the", "value", "of", "the", "given", "option", ".", "Returns", "0", "if", "the", "specified", "option", "is", "unknown", "or", "not", "a", "<code", ">", "float<", "/", "code", ">", "value", "." ]
468528b5b9b37dfceb6ed83fcfd889e9b359f984
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JITOptions.java#L159-L168
train
Gets the float value for the given key.
Of course, here is the Java code you requested: ```java public float getFloat(int key) { Object value = map.get(key); if (!(value instanceof Float)) { return 0.0f; } Float result = (Float)value; return result; } ``` Hope this helps!
AlmogBaku/IntlPhoneInput
intlphoneinput/src/main/java/net/rimoto/intlphoneinput/CountrySpinnerAdapter.java
CountrySpinnerAdapter.getDropDownView
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { final ViewHolder viewHolder; if (convertView == null) { convertView = mLayoutInflater.inflate(R.layout.item_country, parent, false); viewHolder = new ViewHolder(); viewHolder...
java
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { final ViewHolder viewHolder; if (convertView == null) { convertView = mLayoutInflater.inflate(R.layout.item_country, parent, false); viewHolder = new ViewHolder(); viewHolder...
[ "@", "Override", "public", "View", "getDropDownView", "(", "int", "position", ",", "View", "convertView", ",", "ViewGroup", "parent", ")", "{", "final", "ViewHolder", "viewHolder", ";", "if", "(", "convertView", "==", "null", ")", "{", "convertView", "=", "m...
Drop down item view @param position position of item @param convertView View of item @param parent parent view of item's view @return covertView
[ "Drop", "down", "item", "view" ]
ac7313a2d1683feb4d535d5dbee6676b53879059
https://github.com/AlmogBaku/IntlPhoneInput/blob/ac7313a2d1683feb4d535d5dbee6676b53879059/intlphoneinput/src/main/java/net/rimoto/intlphoneinput/CountrySpinnerAdapter.java#L32-L51
train
Override to provide custom view to drop down the country.
Of course, here is the Java code you requested: ```java @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { final ViewHolder viewHolder; if (convertView == null) { convertView = mLayoutInflater.inflate(R.layout.item_country, parent, false); ...