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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
intellimate/Izou | src/main/java/org/intellimate/izou/events/EventDistributor.java | EventDistributor.unregisterEventFinishedListener | @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
public void unregisterEventFinishedListener(EventListenerModel eventListener) throws IllegalArgumentException {
finishListeners.values().stream()
.forEach(list -> {
synchronized (list) {
... | java | @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
public void unregisterEventFinishedListener(EventListenerModel eventListener) throws IllegalArgumentException {
finishListeners.values().stream()
.forEach(list -> {
synchronized (list) {
... | [
"@",
"SuppressWarnings",
"(",
"\"SynchronizationOnLocalVariableOrMethodParameter\"",
")",
"public",
"void",
"unregisterEventFinishedListener",
"(",
"EventListenerModel",
"eventListener",
")",
"throws",
"IllegalArgumentException",
"{",
"finishListeners",
".",
"values",
"(",
")",... | unregister an EventListener that got called when the event finished processing.
It will unregister for all registered descriptors.
It will also ignore if this listener is not listening to an Event.
Method is thread-safe.
@param eventListener the ActivatorEventListener used to listen for events
@throws IllegalArgument... | [
"unregister",
"an",
"EventListener",
"that",
"got",
"called",
"when",
"the",
"event",
"finished",
"processing",
"."
] | 40a808b97998e17655c4a78e30ce7326148aed27 | https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/events/EventDistributor.java#L269-L277 | train | Unregister an event listener model. | Of course, here is the Java code you requested:
```java
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
public void unregisterEventFinishedListener(EventListenerModel eventListener) throws IllegalArgumentException {
finishListeners.values().stream()
.forEach(list -> {
... |
windup/windup | config/impl/src/main/java/org/jboss/windup/config/metadata/TechnologyMetadataProviderImpl.java | TechnologyMetadataProviderImpl.getMetadata | public TechnologyMetadata getMetadata(GraphContext context, TechnologyReference reference)
{
for (TechnologyMetadataLoader loader : loaders)
{
TechnologyMetadata metadata = loader.getMetadata(context, reference);
if (metadata != null)
return metadata;
... | java | public TechnologyMetadata getMetadata(GraphContext context, TechnologyReference reference)
{
for (TechnologyMetadataLoader loader : loaders)
{
TechnologyMetadata metadata = loader.getMetadata(context, reference);
if (metadata != null)
return metadata;
... | [
"public",
"TechnologyMetadata",
"getMetadata",
"(",
"GraphContext",
"context",
",",
"TechnologyReference",
"reference",
")",
"{",
"for",
"(",
"TechnologyMetadataLoader",
"loader",
":",
"loaders",
")",
"{",
"TechnologyMetadata",
"metadata",
"=",
"loader",
".",
"getMeta... | Loads the {@link TechnologyMetadata} that is associated with the given {@link TechnologyReference}. | [
"Loads",
"the",
"{"
] | 6668f09e7f012d24a0b4212ada8809417225b2ad | https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/impl/src/main/java/org/jboss/windup/config/metadata/TechnologyMetadataProviderImpl.java#L21-L30 | train | Get the metadata for a single language. | Of course, here is the Java code you requested:
```java
public TechnologyMetadata getMetadata(GraphContext context, TechnologyReference reference)
{
for (TechnologyMetadataLoader loader : loaders)
{
TechnologyMetadata metadata = loader.getMetadata(context, reference);
if (me... |
yanzhenjie/AndServer | api/src/main/java/com/yanzhenjie/andserver/DispatcherHandler.java | DispatcherHandler.preHandle | private boolean preHandle(HttpRequest request, HttpResponse response, RequestHandler handler) throws Exception {
for (HandlerInterceptor interceptor : mInterceptorList) {
if (interceptor.onIntercept(request, response, handler)) return true;
}
return false;
} | java | private boolean preHandle(HttpRequest request, HttpResponse response, RequestHandler handler) throws Exception {
for (HandlerInterceptor interceptor : mInterceptorList) {
if (interceptor.onIntercept(request, response, handler)) return true;
}
return false;
} | [
"private",
"boolean",
"preHandle",
"(",
"HttpRequest",
"request",
",",
"HttpResponse",
"response",
",",
"RequestHandler",
"handler",
")",
"throws",
"Exception",
"{",
"for",
"(",
"HandlerInterceptor",
"interceptor",
":",
"mInterceptorList",
")",
"{",
"if",
"(",
"in... | Intercept the execution of a handler.
@param request current request.
@param response current response.
@param handler the corresponding handler of the current request.
@return true if the interceptor has processed the request and responded. | [
"Intercept",
"the",
"execution",
"of",
"a",
"handler",
"."
] | f95f316cdfa5755d6a3fec3c6a1b5df783b81517 | https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/DispatcherHandler.java#L182-L187 | train | Pre - handle. | Of course, here is the Java code you requested:
```java
private boolean preHandle(HttpRequest request, HttpResponse response, RequestHandler handler) throws Exception {
for (HandlerInterceptor interceptor : mInterceptorList) {
if (interceptor.onIntercept(request, response, handler)) return true;
... |
Alluxio/alluxio | core/server/common/src/main/java/alluxio/master/journal/JournalUtils.java | JournalUtils.restoreFromCheckpoint | public static void restoreFromCheckpoint(CheckpointInputStream input,
List<? extends Checkpointed> components) throws IOException {
CompoundCheckpointReader reader = new CompoundCheckpointReader(input);
Optional<Entry> next;
while ((next = reader.nextCheckpoint()).isPresent()) {
Entry nextEntry ... | java | public static void restoreFromCheckpoint(CheckpointInputStream input,
List<? extends Checkpointed> components) throws IOException {
CompoundCheckpointReader reader = new CompoundCheckpointReader(input);
Optional<Entry> next;
while ((next = reader.nextCheckpoint()).isPresent()) {
Entry nextEntry ... | [
"public",
"static",
"void",
"restoreFromCheckpoint",
"(",
"CheckpointInputStream",
"input",
",",
"List",
"<",
"?",
"extends",
"Checkpointed",
">",
"components",
")",
"throws",
"IOException",
"{",
"CompoundCheckpointReader",
"reader",
"=",
"new",
"CompoundCheckpointReade... | Restores the given checkpointed components from a composite checkpoint.
This is the complement of {@link #writeToCheckpoint(OutputStream, List)}.
@param input the stream to read from
@param components the components to restore | [
"Restores",
"the",
"given",
"checkpointed",
"components",
"from",
"a",
"composite",
"checkpoint",
"."
] | af38cf3ab44613355b18217a3a4d961f8fec3a10 | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/master/journal/JournalUtils.java#L144-L164 | train | Restore a list of components from a checkpoint. | Of course, here is the Java code you requested:
```java
public static void restoreFromCheckpoint(CheckpointInputStream input,
List<? extends Checkpointed> components) throws IOException {
CompoundCheckpointReader reader = new CompoundCheckpointReader(input);
Optional<Entry> next;
while ((next = reade... |
aws/aws-sdk-java | aws-java-sdk-elastictranscoder/src/main/java/com/amazonaws/services/elastictranscoder/model/Playlist.java | Playlist.withOutputKeys | public Playlist withOutputKeys(String... outputKeys) {
if (this.outputKeys == null) {
setOutputKeys(new com.amazonaws.internal.SdkInternalList<String>(outputKeys.length));
}
for (String ele : outputKeys) {
this.outputKeys.add(ele);
}
return this;
} | java | public Playlist withOutputKeys(String... outputKeys) {
if (this.outputKeys == null) {
setOutputKeys(new com.amazonaws.internal.SdkInternalList<String>(outputKeys.length));
}
for (String ele : outputKeys) {
this.outputKeys.add(ele);
}
return this;
} | [
"public",
"Playlist",
"withOutputKeys",
"(",
"String",
"...",
"outputKeys",
")",
"{",
"if",
"(",
"this",
".",
"outputKeys",
"==",
"null",
")",
"{",
"setOutputKeys",
"(",
"new",
"com",
".",
"amazonaws",
".",
"internal",
".",
"SdkInternalList",
"<",
"String",
... | <p>
For each output in this job that you want to include in a master playlist, the value of the Outputs:Key object.
</p>
<ul>
<li>
<p>
If your output is not <code>HLS</code> or does not have a segment duration set, the name of the output file is a
concatenation of <code>OutputKeyPrefix</code> and <code>Outputs:Key</cod... | [
"<p",
">",
"For",
"each",
"output",
"in",
"this",
"job",
"that",
"you",
"want",
"to",
"include",
"in",
"a",
"master",
"playlist",
"the",
"value",
"of",
"the",
"Outputs",
":",
"Key",
"object",
".",
"<",
"/",
"p",
">",
"<ul",
">",
"<li",
">",
"<p",
... | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elastictranscoder/src/main/java/com/amazonaws/services/elastictranscoder/model/Playlist.java#L639-L647 | train | Sets the outputKeys value for the BASIC application. | Of course, here is the Java code you requested:
```java
public Playlist withOutputKeys(String... outputKeys) {
if (this.outputKeys == null) {
setOutputKeys(new com.amazonaws.internal.SdkInternalList<String>(outputKeys.length));
}
for (String ele : outputKeys) {
this.outp... |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java | DTMAxisIteratorBase.cloneIterator | public DTMAxisIterator cloneIterator()
{
try
{
final DTMAxisIteratorBase clone = (DTMAxisIteratorBase) super.clone();
clone._isRestartable = false;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new org.apache.xml.utils.Wrappe... | java | public DTMAxisIterator cloneIterator()
{
try
{
final DTMAxisIteratorBase clone = (DTMAxisIteratorBase) super.clone();
clone._isRestartable = false;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new org.apache.xml.utils.Wrappe... | [
"public",
"DTMAxisIterator",
"cloneIterator",
"(",
")",
"{",
"try",
"{",
"final",
"DTMAxisIteratorBase",
"clone",
"=",
"(",
"DTMAxisIteratorBase",
")",
"super",
".",
"clone",
"(",
")",
";",
"clone",
".",
"_isRestartable",
"=",
"false",
";",
"// return clone.rese... | Returns a deep copy of this iterator. Cloned iterators may not be
restartable. The iterator being cloned may or may not become
non-restartable as a side effect of this operation.
@return a deep copy of this iterator. | [
"Returns",
"a",
"deep",
"copy",
"of",
"this",
"iterator",
".",
"Cloned",
"iterators",
"may",
"not",
"be",
"restartable",
".",
"The",
"iterator",
"being",
"cloned",
"may",
"or",
"may",
"not",
"become",
"non",
"-",
"restartable",
"as",
"a",
"side",
"effect",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java#L175-L191 | train | Clone the iterator. | Of course, here is the Java code you requested:
```java
public DTMAxisIterator cloneIterator()
{
try
{
final DTMAxisIteratorBase clone = (DTMAxisIteratorBase) super.clone();
clone._isRestartable = false;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedExcep... |
BellaDati/belladati-sdk-api | src/main/java/com/belladati/sdk/intervals/Interval.java | Interval.readInt | static int readInt(JsonNode node, String field) throws NumberFormatException {
String stringValue = node.get(field).asText();
return (int) Float.parseFloat(stringValue);
} | java | static int readInt(JsonNode node, String field) throws NumberFormatException {
String stringValue = node.get(field).asText();
return (int) Float.parseFloat(stringValue);
} | [
"static",
"int",
"readInt",
"(",
"JsonNode",
"node",
",",
"String",
"field",
")",
"throws",
"NumberFormatException",
"{",
"String",
"stringValue",
"=",
"node",
".",
"get",
"(",
"field",
")",
".",
"asText",
"(",
")",
";",
"return",
"(",
"int",
")",
"Float... | Reads a whole number from the given field of the node. Accepts numbers,
numerical strings and fractions.
@param node node from which to read
@param field name of the field to read
@return the field's int value
@throws NumberFormatException if the content cannot be parsed to a number | [
"Reads",
"a",
"whole",
"number",
"from",
"the",
"given",
"field",
"of",
"the",
"node",
".",
"Accepts",
"numbers",
"numerical",
"strings",
"and",
"fractions",
"."
] | ec45a42048d8255838ad0200aa6784a8e8a121c1 | https://github.com/BellaDati/belladati-sdk-api/blob/ec45a42048d8255838ad0200aa6784a8e8a121c1/src/main/java/com/belladati/sdk/intervals/Interval.java#L91-L94 | train | Reads an int value from a JsonNode. | Of course, here is the Java code you requested:
```java
static int readInt(JsonNode node, String field) throws NumberFormatException {
String stringValue = node.get(field).asText();
return (int) Float.parseFloat(stringValue);
}
```
Hope this helps! |
looly/hutool | hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java | Scheduler.schedule | public String schedule(String pattern, Task task) {
String id = UUID.randomUUID().toString();
schedule(id, pattern, task);
return id;
} | java | public String schedule(String pattern, Task task) {
String id = UUID.randomUUID().toString();
schedule(id, pattern, task);
return id;
} | [
"public",
"String",
"schedule",
"(",
"String",
"pattern",
",",
"Task",
"task",
")",
"{",
"String",
"id",
"=",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
";",
"schedule",
"(",
"id",
",",
"pattern",
",",
"task",
")",
";",
"return",... | 新增Task,使用随机UUID
@param pattern {@link CronPattern}对应的String表达式
@param task {@link Task}
@return ID | [
"新增Task,使用随机UUID"
] | bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java#L217-L221 | train | Creates a unique id for a task that will be scheduled to run. | Of course, here is the Java code you requested:
```java
public String schedule(String pattern, Task task) {
String id = UUID.randomUUID().toString();
schedule(id, pattern, task);
return id;
}
```
Hope this helps! |
ModeShape/modeshape | modeshape-jcr/src/main/java/org/modeshape/jcr/AccessControlManagerImpl.java | AccessControlManagerImpl.privileges | private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException {
Privilege[] privileges = new Privilege[names.size()];
int i = 0;
for (String name : names) {
privileges[i++] = privilegeFromName(name);
}
ret... | java | private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException {
Privilege[] privileges = new Privilege[names.size()];
int i = 0;
for (String name : names) {
privileges[i++] = privilegeFromName(name);
}
ret... | [
"private",
"Privilege",
"[",
"]",
"privileges",
"(",
"Set",
"<",
"String",
">",
"names",
")",
"throws",
"ValueFormatException",
",",
"AccessControlException",
",",
"RepositoryException",
"{",
"Privilege",
"[",
"]",
"privileges",
"=",
"new",
"Privilege",
"[",
"na... | Constructs list of Privilege objects using privilege's name.
@param names names of privileges
@return Privilege objects.
@throws ValueFormatException
@throws AccessControlException
@throws RepositoryException | [
"Constructs",
"list",
"of",
"Privilege",
"objects",
"using",
"privilege",
"s",
"name",
"."
] | 794cfdabb67a90f24629c4fff0424a6125f8f95b | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AccessControlManagerImpl.java#L303-L310 | train | Get the privilege list from the set of privilege names. | Of course, here is the Java code you requested:
```java
private Privilege[] privileges( Set<String> names ) throws ValueFormatException, AccessControlException, RepositoryException {
Privilege[] privileges = new Privilege[names.size()];
int i = 0;
for (String name : names) {
privile... |
sculptor/sculptor | sculptor-maven/sculptor-maven-plugin/src/main/java/org/sculptor/maven/plugin/GeneratorMojo.java | GeneratorMojo.getChangedFiles | protected Set<String> getChangedFiles() {
// If there is no status file to compare against then always run the
// generator
File statusFile = getStatusFile();
if (statusFile == null) {
return null;
}
final long statusFileLastModified = statusFile.lastModified();
final SimpleDateFormat df = new SimpleD... | java | protected Set<String> getChangedFiles() {
// If there is no status file to compare against then always run the
// generator
File statusFile = getStatusFile();
if (statusFile == null) {
return null;
}
final long statusFileLastModified = statusFile.lastModified();
final SimpleDateFormat df = new SimpleD... | [
"protected",
"Set",
"<",
"String",
">",
"getChangedFiles",
"(",
")",
"{",
"// If there is no status file to compare against then always run the",
"// generator",
"File",
"statusFile",
"=",
"getStatusFile",
"(",
")",
";",
"if",
"(",
"statusFile",
"==",
"null",
")",
"{"... | Returns a list with file names from the <code>checkFileSets</code>
parameter that have been modified since previous generator run. Empty if
no files changed or <code>null</code> if there is no status file to
compare against, i.e. always run the generator. | [
"Returns",
"a",
"list",
"with",
"file",
"names",
"from",
"the",
"<code",
">",
"checkFileSets<",
"/",
"code",
">",
"parameter",
"that",
"have",
"been",
"modified",
"since",
"previous",
"generator",
"run",
".",
"Empty",
"if",
"no",
"files",
"changed",
"or",
... | 38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5 | https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-maven/sculptor-maven-plugin/src/main/java/org/sculptor/maven/plugin/GeneratorMojo.java#L338-L402 | train | Get the changed files. | Of course, here is the Java code you requested:
```java
protected Set<String> getChangedFiles() {
// If there is no status file to compare against then always run the
// generator
File statusFile = getStatusFile();
if (statusFile == null) {
return null;
}
final long statusFileLastModified = statusFile.... |
eclipse/xtext-extras | org.eclipse.xtext.xbase/emf-gen/org/eclipse/xtext/xtype/impl/XImportDeclarationImpl.java | XImportDeclarationImpl.eGet | @Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case XtypePackage.XIMPORT_DECLARATION__WILDCARD:
return isWildcard();
case XtypePackage.XIMPORT_DECLARATION__EXTENSION:
return isExtension();
case XtypePackage.XIMPORT_DECLARATION__STATIC:
re... | java | @Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case XtypePackage.XIMPORT_DECLARATION__WILDCARD:
return isWildcard();
case XtypePackage.XIMPORT_DECLARATION__EXTENSION:
return isExtension();
case XtypePackage.XIMPORT_DECLARATION__STATIC:
re... | [
"@",
"Override",
"public",
"Object",
"eGet",
"(",
"int",
"featureID",
",",
"boolean",
"resolve",
",",
"boolean",
"coreType",
")",
"{",
"switch",
"(",
"featureID",
")",
"{",
"case",
"XtypePackage",
".",
"XIMPORT_DECLARATION__WILDCARD",
":",
"return",
"isWildcard"... | <!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"<!",
"--",
"begin",
"-",
"user",
"-",
"doc",
"--",
">",
"<!",
"--",
"end",
"-",
"user",
"-",
"doc",
"--",
">"
] | 451359541295323a29f5855e633f770cec02069a | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/emf-gen/org/eclipse/xtext/xtype/impl/XImportDeclarationImpl.java#L361-L381 | train | Override eGet to return the value of the featureID. | Of course, here is the Java code you requested:
```java
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case XtypePackage.XIMPORT_DECLARATION__WILDCARD:
return isWildcard();
case XtypePackage.XIMPORT_DECLARATION__EXTENSION:
return isExtension();... |
google/closure-compiler | src/com/google/javascript/jscomp/FileInstrumentationData.java | FileInstrumentationData.getBranchNode | Node getBranchNode(int lineNumber, int branchNumber) {
Preconditions.checkArgument(
lineNumber > 0, "Expected non-zero positive integer as line number: %s", lineNumber);
Preconditions.checkArgument(
branchNumber > 0, "Expected non-zero positive integer as branch number: %s", branchNumber);
... | java | Node getBranchNode(int lineNumber, int branchNumber) {
Preconditions.checkArgument(
lineNumber > 0, "Expected non-zero positive integer as line number: %s", lineNumber);
Preconditions.checkArgument(
branchNumber > 0, "Expected non-zero positive integer as branch number: %s", branchNumber);
... | [
"Node",
"getBranchNode",
"(",
"int",
"lineNumber",
",",
"int",
"branchNumber",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"lineNumber",
">",
"0",
",",
"\"Expected non-zero positive integer as line number: %s\"",
",",
"lineNumber",
")",
";",
"Preconditions",
... | Get the block node to be instrumented for branch coverage.
@param lineNumber 1-based line number
@param branchNumber 1-based branch number
@return the node of the conditional block. | [
"Get",
"the",
"block",
"node",
"to",
"be",
"instrumented",
"for",
"branch",
"coverage",
"."
] | d81e36740f6a9e8ac31a825ee8758182e1dc5aae | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/FileInstrumentationData.java#L139-L146 | train | Get the branch node for the given line and branch number. | Of course, here is the Java code you requested:
```java
Node getBranchNode(int lineNumber, int branchNumber) {
Preconditions.checkArgument(
lineNumber > 0, "Expected non-zero positive integer as line number: %s", lineNumber);
Preconditions.checkArgument(
branchNumber > 0, "Expected non-zero pos... |
tweea/matrixjavalib-main-app-support | src/main/java/net/matrix/app/configuration/ConfigurationContext.java | ConfigurationContext.getConfigurationResource | public Resource getConfigurationResource(final ResourceSelection selection)
throws ConfigurationException {
Resource resource = getResource(selection);
if (resource == null) {
String catalog = selection.getCatalog();
String version = selection.getVersion();
String name = selection.getName();
th... | java | public Resource getConfigurationResource(final ResourceSelection selection)
throws ConfigurationException {
Resource resource = getResource(selection);
if (resource == null) {
String catalog = selection.getCatalog();
String version = selection.getVersion();
String name = selection.getName();
th... | [
"public",
"Resource",
"getConfigurationResource",
"(",
"final",
"ResourceSelection",
"selection",
")",
"throws",
"ConfigurationException",
"{",
"Resource",
"resource",
"=",
"getResource",
"(",
"selection",
")",
";",
"if",
"(",
"resource",
"==",
"null",
")",
"{",
"... | 定位配置资源。
@param selection
配置资源选择
@return 配置资源
@throws ConfigurationException
配置错误 | [
"定位配置资源。"
] | 6993f4bed1a4378fe854e992cc8c0d265c15ea07 | https://github.com/tweea/matrixjavalib-main-app-support/blob/6993f4bed1a4378fe854e992cc8c0d265c15ea07/src/main/java/net/matrix/app/configuration/ConfigurationContext.java#L91-L101 | valid | Gets the configuration resource. | Of course, here is the Java code you requested:
```java
public Resource getConfigurationResource(final ResourceSelection selection)
throws ConfigurationException {
Resource resource = getResource(selection);
if (resource == null) {
String catalog = selection.getCatalog();
String version = selection.ge... |
aws/aws-sdk-java | aws-java-sdk-kinesisanalyticsv2/src/main/java/com/amazonaws/services/kinesisanalyticsv2/model/transform/SqlApplicationConfigurationDescriptionMarshaller.java | SqlApplicationConfigurationDescriptionMarshaller.marshall | public void marshall(SqlApplicationConfigurationDescription sqlApplicationConfigurationDescription, ProtocolMarshaller protocolMarshaller) {
if (sqlApplicationConfigurationDescription == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | java | public void marshall(SqlApplicationConfigurationDescription sqlApplicationConfigurationDescription, ProtocolMarshaller protocolMarshaller) {
if (sqlApplicationConfigurationDescription == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | [
"public",
"void",
"marshall",
"(",
"SqlApplicationConfigurationDescription",
"sqlApplicationConfigurationDescription",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"sqlApplicationConfigurationDescription",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkC... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisanalyticsv2/src/main/java/com/amazonaws/services/kinesisanalyticsv2/model/transform/SqlApplicationConfigurationDescriptionMarshaller.java#L47-L60 | train | marshalls the given SqlApplicationConfigurationDescription to the given protocolMarshaller. | Of course, here is the Java code you requested:
```java
public void marshall(SqlApplicationConfigurationDescription sqlApplicationConfigurationDescription, ProtocolMarshaller protocolMarshaller) {
if (sqlApplicationConfigurationDescription == null) {
throw new SdkClientException("Invalid argument ... |
GlenKPeterson/Paguro | src/main/java/org/organicdesign/fp/collections/PersistentTreeMap.java | PersistentTreeMap.comparator | @Override public Comparator<? super K> comparator() {
return (comp == Equator.Comp.DEFAULT) ? null : comp;
} | java | @Override public Comparator<? super K> comparator() {
return (comp == Equator.Comp.DEFAULT) ? null : comp;
} | [
"@",
"Override",
"public",
"Comparator",
"<",
"?",
"super",
"K",
">",
"comparator",
"(",
")",
"{",
"return",
"(",
"comp",
"==",
"Equator",
".",
"Comp",
".",
"DEFAULT",
")",
"?",
"null",
":",
"comp",
";",
"}"
] | Returns the comparator used to order the keys in this map, or null if it uses
Fn2.DEFAULT_COMPARATOR (for compatibility with java.util.SortedMap). | [
"Returns",
"the",
"comparator",
"used",
"to",
"order",
"the",
"keys",
"in",
"this",
"map",
"or",
"null",
"if",
"it",
"uses",
"Fn2",
".",
"DEFAULT_COMPARATOR",
"(",
"for",
"compatibility",
"with",
"java",
".",
"util",
".",
"SortedMap",
")",
"."
] | eac0d64b2eb9496967334f635cdb270cffb2197b | https://github.com/GlenKPeterson/Paguro/blob/eac0d64b2eb9496967334f635cdb270cffb2197b/src/main/java/org/organicdesign/fp/collections/PersistentTreeMap.java#L484-L486 | test | Returns the comparator for this cache entry. | Of course, here is the Java code you requested:
```java
@Override public Comparator<? super K> comparator() {
return (comp == Equator.Comp.DEFAULT) ? null : comp;
}
```
Hope this helps! |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBIRuleScanner.java | RBBIRuleScanner.stripRules | static String stripRules(String rules) {
StringBuilder strippedRules = new StringBuilder();
int rulesLength = rules.length();
for (int idx = 0; idx < rulesLength;) {
char ch = rules.charAt(idx++);
if (ch == '#') {
while (idx < rulesLength
... | java | static String stripRules(String rules) {
StringBuilder strippedRules = new StringBuilder();
int rulesLength = rules.length();
for (int idx = 0; idx < rulesLength;) {
char ch = rules.charAt(idx++);
if (ch == '#') {
while (idx < rulesLength
... | [
"static",
"String",
"stripRules",
"(",
"String",
"rules",
")",
"{",
"StringBuilder",
"strippedRules",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"rulesLength",
"=",
"rules",
".",
"length",
"(",
")",
";",
"for",
"(",
"int",
"idx",
"=",
"0",
";",
... | ---------------------------------------------------------------------------------------- | [
"----------------------------------------------------------------------------------------"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBIRuleScanner.java#L694-L710 | train | Strip rules from a string. | Of course, here is the Java code you requested:
```java
static String stripRules(String rules) {
StringBuilder strippedRules = new StringBuilder();
int rulesLength = rules.length();
for (int idx = 0; idx < rulesLength;) {
char ch = rules.charAt(idx++);
if (ch == '#') {
... |
alkacon/opencms-core | src/org/opencms/workplace/tools/CmsToolManager.java | CmsToolManager.getParent | public String getParent(CmsWorkplace wp, String toolPath) {
if (toolPath.equals(getBaseToolPath(wp))) {
return toolPath;
}
int pos = toolPath.lastIndexOf(TOOLPATH_SEPARATOR);
return pos <= 0 ? TOOLPATH_SEPARATOR : toolPath.substring(0, pos);
} | java | public String getParent(CmsWorkplace wp, String toolPath) {
if (toolPath.equals(getBaseToolPath(wp))) {
return toolPath;
}
int pos = toolPath.lastIndexOf(TOOLPATH_SEPARATOR);
return pos <= 0 ? TOOLPATH_SEPARATOR : toolPath.substring(0, pos);
} | [
"public",
"String",
"getParent",
"(",
"CmsWorkplace",
"wp",
",",
"String",
"toolPath",
")",
"{",
"if",
"(",
"toolPath",
".",
"equals",
"(",
"getBaseToolPath",
"(",
"wp",
")",
")",
")",
"{",
"return",
"toolPath",
";",
"}",
"int",
"pos",
"=",
"toolPath",
... | Returns the path to the parent of the tool identified by the given tool path.<p>
The parent of the root is the same root.<p>
@param wp the workplace object
@param toolPath the abstract tool path
@return his parent | [
"Returns",
"the",
"path",
"to",
"the",
"parent",
"of",
"the",
"tool",
"identified",
"by",
"the",
"given",
"tool",
"path",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L341-L348 | train | Returns the parent path of the given tool path. | Of course, here is the Java code you requested:
```java
public String getParent(CmsWorkplace wp, String toolPath) {
if (toolPath.equals(getBaseToolPath(wp))) {
return toolPath;
}
int pos = toolPath.lastIndexOf(TOOLPATH_SEPARATOR);
return pos <= 0 ? TOOLPATH_SEPARATOR : tool... |
synchronoss/cpo-api | cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java | CassandraCpoAdapter.retrieveBean | @Override
public <T> T retrieveBean(T bean) throws CpoException {
return processSelectGroup(bean, null, null, null, null);
} | java | @Override
public <T> T retrieveBean(T bean) throws CpoException {
return processSelectGroup(bean, null, null, null, null);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"retrieveBean",
"(",
"T",
"bean",
")",
"throws",
"CpoException",
"{",
"return",
"processSelectGroup",
"(",
"bean",
",",
"null",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"}"
] | Retrieves the bean from the datasource. The assumption is that the bean exists in the datasource. If the retrieve
function defined for this beans returns more than one row, an exception will be thrown.
@param bean This is an bean that has been defined within the metadata of the datasource. If the class is not
defined ... | [
"Retrieves",
"the",
"bean",
"from",
"the",
"datasource",
".",
"The",
"assumption",
"is",
"that",
"the",
"bean",
"exists",
"in",
"the",
"datasource",
".",
"If",
"the",
"retrieve",
"function",
"defined",
"for",
"this",
"beans",
"returns",
"more",
"than",
"one"... | dc745aca3b3206abf80b85d9689b0132f5baa694 | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1342-L1345 | train | Retrieve a bean from the database. | Of course, here is the Java code you requested:
```java
@Override
public <T> T retrieveBean(T bean) throws CpoException {
return processSelectGroup(bean, null, null, null, null);
}
```
Hope this helps! |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.serviceName_monitoringNotifications_id_PUT | public void serviceName_monitoringNotifications_id_PUT(String serviceName, Long id, OvhMonitoringNotification body) throws IOException {
String qPath = "/xdsl/{serviceName}/monitoringNotifications/{id}";
StringBuilder sb = path(qPath, serviceName, id);
exec(qPath, "PUT", sb.toString(), body);
} | java | public void serviceName_monitoringNotifications_id_PUT(String serviceName, Long id, OvhMonitoringNotification body) throws IOException {
String qPath = "/xdsl/{serviceName}/monitoringNotifications/{id}";
StringBuilder sb = path(qPath, serviceName, id);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"serviceName_monitoringNotifications_id_PUT",
"(",
"String",
"serviceName",
",",
"Long",
"id",
",",
"OvhMonitoringNotification",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/{serviceName}/monitoringNotifications/{id}\"",
";",
... | Alter this object properties
REST: PUT /xdsl/{serviceName}/monitoringNotifications/{id}
@param body [required] New object properties
@param serviceName [required] The internal name of your XDSL offer
@param id [required] Id of the object | [
"Alter",
"this",
"object",
"properties"
] | 6d531a40e56e09701943e334c25f90f640c55701 | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1400-L1404 | train | Update a notification | Of course, here is the Java code you requested:
```java
public void serviceName_monitoringNotifications_id_PUT(String serviceName, Long id, OvhMonitoringNotification body) throws IOException {
String qPath = "/xdsl/{serviceName}/monitoringNotifications/{id}";
StringBuilder sb = path(qPath, serviceName, id);
exec... |
m-m-m/util | xml/src/main/java/net/sf/mmm/util/xml/base/DomUtilImpl.java | DomUtilImpl.createTransformer | private Transformer createTransformer(boolean indent) {
try {
Transformer result = this.transformerFactory.newTransformer();
if (indent) {
result.setOutputProperty(OutputKeys.INDENT, "yes");
}
return result;
} catch (TransformerConfigurationException e) {
throw new Illegal... | java | private Transformer createTransformer(boolean indent) {
try {
Transformer result = this.transformerFactory.newTransformer();
if (indent) {
result.setOutputProperty(OutputKeys.INDENT, "yes");
}
return result;
} catch (TransformerConfigurationException e) {
throw new Illegal... | [
"private",
"Transformer",
"createTransformer",
"(",
"boolean",
"indent",
")",
"{",
"try",
"{",
"Transformer",
"result",
"=",
"this",
".",
"transformerFactory",
".",
"newTransformer",
"(",
")",
";",
"if",
"(",
"indent",
")",
"{",
"result",
".",
"setOutputProper... | This method creates a new transformer.
@param indent - {@code true} if the XML should be indented (automatically add linebreaks before opening
tags), {@code false} otherwise.
@return the new transformer. | [
"This",
"method",
"creates",
"a",
"new",
"transformer",
"."
] | f0e4e084448f8dfc83ca682a9e1618034a094ce6 | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/xml/src/main/java/net/sf/mmm/util/xml/base/DomUtilImpl.java#L176-L187 | train | Create a new XML Transformer. | Of course, here is the Java code you requested:
```java
private Transformer createTransformer(boolean indent) {
try {
Transformer result = this.transformerFactory.newTransformer();
if (indent) {
result.setOutputProperty(OutputKeys.INDENT, "yes");
}
return result;
} catch (Trans... |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ChemCompGroupFactory.java | ChemCompGroupFactory.setChemCompProvider | public static void setChemCompProvider(ChemCompProvider provider) {
logger.debug("Setting new chem comp provider to "+provider.getClass().getCanonicalName());
chemCompProvider = provider;
// clear cache
cache.clear();
} | java | public static void setChemCompProvider(ChemCompProvider provider) {
logger.debug("Setting new chem comp provider to "+provider.getClass().getCanonicalName());
chemCompProvider = provider;
// clear cache
cache.clear();
} | [
"public",
"static",
"void",
"setChemCompProvider",
"(",
"ChemCompProvider",
"provider",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Setting new chem comp provider to \"",
"+",
"provider",
".",
"getClass",
"(",
")",
".",
"getCanonicalName",
"(",
")",
")",
";",
"chemC... | The new ChemCompProvider will be set in the static variable,
so this provider will be used from now on until it is changed
again. Note that this change can have unexpected behavior of
code executed afterwards.
<p>
Changing the provider also resets the cache, so any groups
previously accessed will be reread or re-downlo... | [
"The",
"new",
"ChemCompProvider",
"will",
"be",
"set",
"in",
"the",
"static",
"variable",
"so",
"this",
"provider",
"will",
"be",
"used",
"from",
"now",
"on",
"until",
"it",
"is",
"changed",
"again",
".",
"Note",
"that",
"this",
"change",
"can",
"have",
... | a1c71a8e3d40cc32104b1d387a3d3b560b43356e | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/ChemCompGroupFactory.java#L76-L81 | train | Sets the chem comp provider. | Of course, here is the Java code you requested:
```java
public static void setChemCompProvider(ChemCompProvider provider) {
logger.debug("Setting new chem comp provider to "+provider.getClass().getCanonicalName());
chemCompProvider = provider;
// clear cache
cache.clear();
}
```
Hope this helps! |
jboss/jboss-common-core | src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java | FieldBoundPropertyListener.setFieldValue | protected void setFieldValue(String value) {
try {
// filter property value
value = filterValue(value);
// coerce value to field type
Class<?> type = fieldInstance.getField().getType();
PropertyEditor editor = PropertyEditors.findEditor(type);
editor.setAsTex... | java | protected void setFieldValue(String value) {
try {
// filter property value
value = filterValue(value);
// coerce value to field type
Class<?> type = fieldInstance.getField().getType();
PropertyEditor editor = PropertyEditors.findEditor(type);
editor.setAsTex... | [
"protected",
"void",
"setFieldValue",
"(",
"String",
"value",
")",
"{",
"try",
"{",
"// filter property value",
"value",
"=",
"filterValue",
"(",
"value",
")",
";",
"// coerce value to field type",
"Class",
"<",
"?",
">",
"type",
"=",
"fieldInstance",
".",
"getF... | Coerce and set specified value to field.
@param value Field value.
@throws PropertyException Failed to set field value. | [
"Coerce",
"and",
"set",
"specified",
"value",
"to",
"field",
"."
] | c191bb18db83fa106c6913cf34ed47989b65dc97 | https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/property/FieldBoundPropertyListener.java#L124-L141 | test | Sets the value of the field. | Of course, here is the Java code you requested:
```java
protected void setFieldValue(String value) {
try {
// filter property value
value = filterValue(value);
// coerce value to field type
Class<?> type = fieldInstance.getField().getType();
PropertyEditor editor = P... |
google/closure-templates | java/src/com/google/template/soy/jbcsrc/restricted/FieldRef.java | FieldRef.accessStaticUnchecked | void accessStaticUnchecked(CodeBuilder mv) {
checkState(isStatic());
mv.getStatic(owner().type(), FieldRef.this.name(), type());
} | java | void accessStaticUnchecked(CodeBuilder mv) {
checkState(isStatic());
mv.getStatic(owner().type(), FieldRef.this.name(), type());
} | [
"void",
"accessStaticUnchecked",
"(",
"CodeBuilder",
"mv",
")",
"{",
"checkState",
"(",
"isStatic",
"(",
")",
")",
";",
"mv",
".",
"getStatic",
"(",
"owner",
"(",
")",
".",
"type",
"(",
")",
",",
"FieldRef",
".",
"this",
".",
"name",
"(",
")",
",",
... | Accesses a static field. | [
"Accesses",
"a",
"static",
"field",
"."
] | cc61e1dff70ae97f24f417a57410081bc498bd56 | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/FieldRef.java#L192-L195 | train | Access static field. | Of course, here is the Java code you requested:
```java
void accessStaticUnchecked(CodeBuilder mv) {
checkState(isStatic());
mv.getStatic(owner().type(), FieldRef.this.name(), type());
}
```
Hope this helps! |
kuali/kc-s2sgen | coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRKeyPersonExpandedV2_0Generator.java | RRKeyPersonExpandedV2_0Generator.setAllkeyPersonDetailsToKeyPerson | private void setAllkeyPersonDetailsToKeyPerson(ProposalPersonContract keyPerson,
Profile profileKeyPerson) {
assignRolodexId(keyPerson);
profileKeyPerson.setName(globLibV20Generator
.getHumanNameDataType(keyPerson));
setDirectoryTitleToProfile(profileKeyPerson, keyPerson);
profileKeyPerson... | java | private void setAllkeyPersonDetailsToKeyPerson(ProposalPersonContract keyPerson,
Profile profileKeyPerson) {
assignRolodexId(keyPerson);
profileKeyPerson.setName(globLibV20Generator
.getHumanNameDataType(keyPerson));
setDirectoryTitleToProfile(profileKeyPerson, keyPerson);
profileKeyPerson... | [
"private",
"void",
"setAllkeyPersonDetailsToKeyPerson",
"(",
"ProposalPersonContract",
"keyPerson",
",",
"Profile",
"profileKeyPerson",
")",
"{",
"assignRolodexId",
"(",
"keyPerson",
")",
";",
"profileKeyPerson",
".",
"setName",
"(",
"globLibV20Generator",
".",
"getHumanN... | /*
This method is used to add all key person details to key person | [
"/",
"*",
"This",
"method",
"is",
"used",
"to",
"add",
"all",
"key",
"person",
"details",
"to",
"key",
"person"
] | 2886380e1e3cb8bdd732ba99b2afa6ffc630bb37 | https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRKeyPersonExpandedV2_0Generator.java#L383-L444 | train | Sets all key person details to the profile | Of course, here is the Java code you requested:
```java
private void setAllkeyPersonDetailsToKeyPerson(ProposalPersonContract keyPerson,
Profile profileKeyPerson) {
assignRolodexId(keyPerson);
profileKeyPerson.setName(globLibV20Generator
.getHumanNameDataType(keyPerson));
setDirectoryTitleT... |
aws/aws-sdk-java | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/DescribeInventoryDeletionsRequestMarshaller.java | DescribeInventoryDeletionsRequestMarshaller.marshall | public void marshall(DescribeInventoryDeletionsRequest describeInventoryDeletionsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeInventoryDeletionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocol... | java | public void marshall(DescribeInventoryDeletionsRequest describeInventoryDeletionsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeInventoryDeletionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocol... | [
"public",
"void",
"marshall",
"(",
"DescribeInventoryDeletionsRequest",
"describeInventoryDeletionsRequest",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"describeInventoryDeletionsRequest",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException"... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/DescribeInventoryDeletionsRequestMarshaller.java#L46-L59 | train | marshalls the given request to the JSON object. | Of course, here is the Java code you requested:
```java
public void marshall(DescribeInventoryDeletionsRequest describeInventoryDeletionsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeInventoryDeletionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marsh... |
twitter/hraven | hraven-core/src/main/java/com/twitter/hraven/JobDetails.java | JobDetails.getCounterValueAsLong | Long getCounterValueAsLong(final CounterMap counters, final String counterGroupName,
final String counterName) {
Counter c1 = counters.getCounter(counterGroupName, counterName);
if (c1 != null) {
return c1.getValue();
} else {
return 0L;
}
} | java | Long getCounterValueAsLong(final CounterMap counters, final String counterGroupName,
final String counterName) {
Counter c1 = counters.getCounter(counterGroupName, counterName);
if (c1 != null) {
return c1.getValue();
} else {
return 0L;
}
} | [
"Long",
"getCounterValueAsLong",
"(",
"final",
"CounterMap",
"counters",
",",
"final",
"String",
"counterGroupName",
",",
"final",
"String",
"counterName",
")",
"{",
"Counter",
"c1",
"=",
"counters",
".",
"getCounter",
"(",
"counterGroupName",
",",
"counterName",
... | return a value for that counters from the NavigableMap as a Long
@param key
@param infoValues
@return counter value as Long or 0L | [
"return",
"a",
"value",
"for",
"that",
"counters",
"from",
"the",
"NavigableMap",
"as",
"a",
"Long"
] | e35996b6e2f016bcd18db0bad320be7c93d95208 | https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/JobDetails.java#L424-L432 | train | Get the value of a counter as long. | Of course, here is the Java code you requested:
```java
Long getCounterValueAsLong(final CounterMap counters, final String counterGroupName,
final String counterName) {
Counter c1 = counters.getCounter(counterGroupName, counterName);
if (c1 != null) {
return c1.getValue();
} else {
return... |
logic-ng/LogicNG | src/main/java/org/logicng/backbones/BackboneGeneration.java | BackboneGeneration.compute | public static Backbone compute(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.POSITIVE_AND_NEGATIVE);
} | java | public static Backbone compute(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.POSITIVE_AND_NEGATIVE);
} | [
"public",
"static",
"Backbone",
"compute",
"(",
"final",
"Collection",
"<",
"Formula",
">",
"formulas",
")",
"{",
"return",
"compute",
"(",
"formulas",
",",
"allVariablesInFormulas",
"(",
"formulas",
")",
",",
"BackboneType",
".",
"POSITIVE_AND_NEGATIVE",
")",
"... | Computes the complete backbone for a given collection of formulas.
@param formulas the given collection of formulas
@return the backbone or {@code null} if the formula is UNSAT | [
"Computes",
"the",
"complete",
"backbone",
"for",
"a",
"given",
"collection",
"of",
"formulas",
"."
] | bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/backbones/BackboneGeneration.java#L114-L116 | train | Compute backbone for a collection of formulas. | Of course, here is the Java code you requested:
```java
public static Backbone compute(final Collection<Formula> formulas) {
return compute(formulas, allVariablesInFormulas(formulas), BackboneType.POSITIVE_AND_NEGATIVE);
}
```
Hope this helps! |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java | JsHdrsImpl.setGuaranteedProtocolVersion | public void setGuaranteedProtocolVersion(byte value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setGuaranteedProtocolVersion", Byte.valueOf(value));
getHdr2().setField(JsHdr2Access.GUARANTEED_SET_PROTOCOLVERSION, Byte.valueOf(value));
if... | java | public void setGuaranteedProtocolVersion(byte value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setGuaranteedProtocolVersion", Byte.valueOf(value));
getHdr2().setField(JsHdr2Access.GUARANTEED_SET_PROTOCOLVERSION, Byte.valueOf(value));
if... | [
"public",
"void",
"setGuaranteedProtocolVersion",
"(",
"byte",
"value",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",
"this",
",",
"tc",
",",
"\"se... | /*
Set the version of the guaranteed delivery protocol used by this message.
Javadoc description supplied by CommonMessageHeaders interface. | [
"/",
"*",
"Set",
"the",
"version",
"of",
"the",
"guaranteed",
"delivery",
"protocol",
"used",
"by",
"this",
"message",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java#L1753-L1759 | train | Sets the Guaranteed Protocol Version field in the message header. | Of course, here is the Java code you requested:
```java
public void setGuaranteedProtocolVersion(byte value) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(this, tc, "setGuaranteedProtocolVersion", Byte.valueOf(value));
getHdr2().setField(JsHdr2Access.GUARANT... |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java | vpnclientlessaccessprofile.add | public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception {
vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile();
addresource.profilename = resource.profilename;
return addresource.add_resource(client);
} | java | public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception {
vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile();
addresource.profilename = resource.profilename;
return addresource.add_resource(client);
} | [
"public",
"static",
"base_response",
"add",
"(",
"nitro_service",
"client",
",",
"vpnclientlessaccessprofile",
"resource",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccessprofile",
"addresource",
"=",
"new",
"vpnclientlessaccessprofile",
"(",
")",
";",
"addresource",... | Use this API to add vpnclientlessaccessprofile. | [
"Use",
"this",
"API",
"to",
"add",
"vpnclientlessaccessprofile",
"."
] | 2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4 | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L361-L365 | train | Use this API to add vpnclientlessaccessprofile. | Of course, here is the Java code you requested:
```java
public static base_response add(nitro_service client, vpnclientlessaccessprofile resource) throws Exception {
vpnclientlessaccessprofile addresource = new vpnclientlessaccessprofile();
addresource.profilename = resource.profilename;
return addresource.add_r... |
basis-technology-corp/tcl-regex-java | src/main/java/com/basistech/tclre/ColorMap.java | ColorMap.getcolor | private short getcolor(int c) {
try {
return map.get(c);
} catch (NullPointerException npe) {
throw new RegexRuntimeException(String.format("Failed to map codepoint U+%08X.", c));
}
} | java | private short getcolor(int c) {
try {
return map.get(c);
} catch (NullPointerException npe) {
throw new RegexRuntimeException(String.format("Failed to map codepoint U+%08X.", c));
}
} | [
"private",
"short",
"getcolor",
"(",
"int",
"c",
")",
"{",
"try",
"{",
"return",
"map",
".",
"get",
"(",
"c",
")",
";",
"}",
"catch",
"(",
"NullPointerException",
"npe",
")",
"{",
"throw",
"new",
"RegexRuntimeException",
"(",
"String",
".",
"format",
"... | Retrieve the color for a character.
@param c input char.
@return output color. | [
"Retrieve",
"the",
"color",
"for",
"a",
"character",
"."
] | de0d5eaccf9a61b694cb8793f234cc229c395b43 | https://github.com/basis-technology-corp/tcl-regex-java/blob/de0d5eaccf9a61b694cb8793f234cc229c395b43/src/main/java/com/basistech/tclre/ColorMap.java#L95-L101 | test | Get the color of a codepoint. | Of course, here is the Java code you requested:
```java
private short getcolor(int c) {
try {
return map.get(c);
} catch (NullPointerException npe) {
throw new RegexRuntimeException(String.format("Failed to map codepoint U+%08X.", c));
}
}
```
Hope this helps! |
dkpro/dkpro-jwpl | de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java | ConfigurationReader.parseLoggerConfig | private void parseLoggerConfig(final Node node,
final ConfigSettings config, final ConfigurationKeys logPath,
final ConfigurationKeys logLevel)
{
String name, value;
Level level;
Node nnode;
NodeList list = node.getChildNodes();
int length = list.getLength();
for (int i = 0; i < length; i++) {
n... | java | private void parseLoggerConfig(final Node node,
final ConfigSettings config, final ConfigurationKeys logPath,
final ConfigurationKeys logLevel)
{
String name, value;
Level level;
Node nnode;
NodeList list = node.getChildNodes();
int length = list.getLength();
for (int i = 0; i < length; i++) {
n... | [
"private",
"void",
"parseLoggerConfig",
"(",
"final",
"Node",
"node",
",",
"final",
"ConfigSettings",
"config",
",",
"final",
"ConfigurationKeys",
"logPath",
",",
"final",
"ConfigurationKeys",
"logLevel",
")",
"{",
"String",
"name",
",",
"value",
";",
"Level",
"... | Parses the information for a logger.
@param node
Reference to the current used xml node
@param config
Reference to the ConfigSettings
@param logPath
Key for the path of this logger.
@param logLevel
Key for the level of this logger. | [
"Parses",
"the",
"information",
"for",
"a",
"logger",
"."
] | 0a0304b6a0aa13acc18838957994e06dd4613a58 | https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L727-L756 | train | Parses the logger configuration. | Of course, here is the Java code you requested:
```java
private void parseLoggerConfig(final Node node,
final ConfigSettings config, final ConfigurationKeys logPath,
final ConfigurationKeys logLevel)
{
String name, value;
Level level;
Node nnode;
NodeList list = node.getChildNodes();
int length = li... |
googleads/googleads-java-lib | modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/o/StatsEstimate.java | StatsEstimate.getAverageCpc | public com.google.api.ads.adwords.axis.v201809.cm.Money getAverageCpc() {
return averageCpc;
} | java | public com.google.api.ads.adwords.axis.v201809.cm.Money getAverageCpc() {
return averageCpc;
} | [
"public",
"com",
".",
"google",
".",
"api",
".",
"ads",
".",
"adwords",
".",
"axis",
".",
"v201809",
".",
"cm",
".",
"Money",
"getAverageCpc",
"(",
")",
"{",
"return",
"averageCpc",
";",
"}"
] | Gets the averageCpc value for this StatsEstimate.
@return averageCpc * The estimated average CPC. | [
"Gets",
"the",
"averageCpc",
"value",
"for",
"this",
"StatsEstimate",
"."
] | 967957cc4f6076514e3a7926fe653e4f1f7cc9c9 | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/o/StatsEstimate.java#L89-L91 | train | Gets the averageCpc value for this CpcEstimate. | Of course, here is the Java code you requested:
```java
public com.google.api.ads.adwords.axis.v201809.cm.Money getAverageCpc() {
return averageCpc;
}
```
Hope this helps! |
mapbox/mapbox-plugins-android | plugin-offline/src/main/java/com/mapbox/mapboxsdk/plugins/offline/offline/OfflinePlugin.java | OfflinePlugin.errorDownload | void errorDownload(OfflineDownloadOptions offlineDownload, String error, String errorMessage) {
stateChangeDispatcher.onError(offlineDownload, error, errorMessage);
offlineDownloads.remove(offlineDownload);
} | java | void errorDownload(OfflineDownloadOptions offlineDownload, String error, String errorMessage) {
stateChangeDispatcher.onError(offlineDownload, error, errorMessage);
offlineDownloads.remove(offlineDownload);
} | [
"void",
"errorDownload",
"(",
"OfflineDownloadOptions",
"offlineDownload",
",",
"String",
"error",
",",
"String",
"errorMessage",
")",
"{",
"stateChangeDispatcher",
".",
"onError",
"(",
"offlineDownload",
",",
"error",
",",
"errorMessage",
")",
";",
"offlineDownloads"... | Called when the OfflineDownloadService produced an error while downloading
@param offlineDownload the offline download that produced an error
@param error short description of the error
@param errorMessage full description of the error
@since 0.1.0 | [
"Called",
"when",
"the",
"OfflineDownloadService",
"produced",
"an",
"error",
"while",
"downloading"
] | c683cad4d8306945d71838d96fae73b8cbe2e6c9 | https://github.com/mapbox/mapbox-plugins-android/blob/c683cad4d8306945d71838d96fae73b8cbe2e6c9/plugin-offline/src/main/java/com/mapbox/mapboxsdk/plugins/offline/offline/OfflinePlugin.java#L186-L189 | train | Called when an error occurs while downloading the file. | Of course, here is the Java code you requested:
```java
void errorDownload(OfflineDownloadOptions offlineDownload, String error, String errorMessage) {
stateChangeDispatcher.onError(offlineDownload, error, errorMessage);
offlineDownloads.remove(offlineDownload);
}
```
Hope this helps! |
fuzzylite/jfuzzylite | jfuzzylite/src/main/java/com/fuzzylite/norm/s/SNormFunction.java | SNormFunction.compute | @Override
public double compute(double a, double b) {
this.function.getVariables().put("a", a);
this.function.getVariables().put("b", b);
return this.function.evaluate();
} | java | @Override
public double compute(double a, double b) {
this.function.getVariables().put("a", a);
this.function.getVariables().put("b", b);
return this.function.evaluate();
} | [
"@",
"Override",
"public",
"double",
"compute",
"(",
"double",
"a",
",",
"double",
"b",
")",
"{",
"this",
".",
"function",
".",
"getVariables",
"(",
")",
".",
"put",
"(",
"\"a\"",
",",
"a",
")",
";",
"this",
".",
"function",
".",
"getVariables",
"(",... | Computes the S-Norm utilizing the given function via
SNormFunction::setFormula(), which automatically assigns the values of
`a` and `b`.
@param a is a membership function value
@param b is a membership function value
@return the evaluation of the function | [
"Computes",
"the",
"S",
"-",
"Norm",
"utilizing",
"the",
"given",
"function",
"via",
"SNormFunction",
"::",
"setFormula",
"()",
"which",
"automatically",
"assigns",
"the",
"values",
"of"
] | 583ac1928f39512af75de80d560e67448039595a | https://github.com/fuzzylite/jfuzzylite/blob/583ac1928f39512af75de80d560e67448039595a/jfuzzylite/src/main/java/com/fuzzylite/norm/s/SNormFunction.java#L61-L66 | train | Compute the CID . | Of course, here is the Java code you requested:
```java
@Override
public double compute(double a, double b) {
this.function.getVariables().put("a", a);
this.function.getVariables().put("b", b);
return this.function.evaluate();
}
```
Hope this helps! |
ldp4j/ldp4j | framework/application/kernel/mem/src/main/java/org/ldp4j/application/kernel/impl/InMemoryResource.java | InMemoryResource.constraintReports | @Override
public Set<ConstraintReportId> constraintReports() {
Set<ConstraintReportId> currentReports=null;
synchronized(this) {
currentReports=ImmutableSet.copyOf(this.reports.values());
}
return currentReports;
} | java | @Override
public Set<ConstraintReportId> constraintReports() {
Set<ConstraintReportId> currentReports=null;
synchronized(this) {
currentReports=ImmutableSet.copyOf(this.reports.values());
}
return currentReports;
} | [
"@",
"Override",
"public",
"Set",
"<",
"ConstraintReportId",
">",
"constraintReports",
"(",
")",
"{",
"Set",
"<",
"ConstraintReportId",
">",
"currentReports",
"=",
"null",
";",
"synchronized",
"(",
"this",
")",
"{",
"currentReports",
"=",
"ImmutableSet",
".",
... | {@inheritDoc} | [
"{"
] | 4236dfb3a746be390155c1056bbb5a8d4dccc49f | https://github.com/ldp4j/ldp4j/blob/4236dfb3a746be390155c1056bbb5a8d4dccc49f/framework/application/kernel/mem/src/main/java/org/ldp4j/application/kernel/impl/InMemoryResource.java#L288-L295 | valid | Returns the constraint reports. | Of course, here is the Java code you requested:
```java
@Override
public Set<ConstraintReportId> constraintReports() {
Set<ConstraintReportId> currentReports=null;
synchronized(this) {
currentReports=ImmutableSet.copyOf(this.reports.values());
}
return currentReports;
}
```
Hope this helps! |
VoltDB/voltdb | third_party/java/src/com/google_voltpatches/common/collect/Maps.java | Maps.newLinkedHashMap | public static <K, V> LinkedHashMap<K, V> newLinkedHashMap(Map<? extends K, ? extends V> map) {
return new LinkedHashMap<K, V>(map);
} | java | public static <K, V> LinkedHashMap<K, V> newLinkedHashMap(Map<? extends K, ? extends V> map) {
return new LinkedHashMap<K, V>(map);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"LinkedHashMap",
"<",
"K",
",",
"V",
">",
"newLinkedHashMap",
"(",
"Map",
"<",
"?",
"extends",
"K",
",",
"?",
"extends",
"V",
">",
"map",
")",
"{",
"return",
"new",
"LinkedHashMap",
"<",
"K",
",",
"V",
... | Creates a <i>mutable</i>, insertion-ordered {@code LinkedHashMap} instance
with the same mappings as the specified map.
<p><b>Note:</b> if mutability is not required, use {@link
ImmutableMap#copyOf(Map)} instead.
<p><b>Note for Java 7 and later:</b> this method is now unnecessary and
should be treated as deprecated. ... | [
"Creates",
"a",
"<i",
">",
"mutable<",
"/",
"i",
">",
"insertion",
"-",
"ordered",
"{",
"@code",
"LinkedHashMap",
"}",
"instance",
"with",
"the",
"same",
"mappings",
"as",
"the",
"specified",
"map",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/Maps.java#L283-L285 | train | Creates a new LinkedHashMap from the given map. | Of course, here is the Java code you requested:
```java
public static <K, V> LinkedHashMap<K, V> newLinkedHashMap(Map<? extends K, ? extends V> map) {
return new LinkedHashMap<K, V>(map);
}
```
Hope this helps! |
ModeShape/modeshape | modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypes.java | NodeTypes.findTypeInMapOrList | protected JcrNodeType findTypeInMapOrList( Name typeName,
Collection<JcrNodeType> pendingList ) {
for (JcrNodeType pendingNodeType : pendingList) {
if (pendingNodeType.getInternalName().equals(typeName)) {
return pendingNodeType;
... | java | protected JcrNodeType findTypeInMapOrList( Name typeName,
Collection<JcrNodeType> pendingList ) {
for (JcrNodeType pendingNodeType : pendingList) {
if (pendingNodeType.getInternalName().equals(typeName)) {
return pendingNodeType;
... | [
"protected",
"JcrNodeType",
"findTypeInMapOrList",
"(",
"Name",
"typeName",
",",
"Collection",
"<",
"JcrNodeType",
">",
"pendingList",
")",
"{",
"for",
"(",
"JcrNodeType",
"pendingNodeType",
":",
"pendingList",
")",
"{",
"if",
"(",
"pendingNodeType",
".",
"getInte... | Finds the named type in the given collection of types pending registration if it exists, else returns the type definition
from the repository
@param typeName the name of the type to retrieve
@param pendingList a collection of types that have passed validation but have not yet been committed to the repository
@return t... | [
"Finds",
"the",
"named",
"type",
"in",
"the",
"given",
"collection",
"of",
"types",
"pending",
"registration",
"if",
"it",
"exists",
"else",
"returns",
"the",
"type",
"definition",
"from",
"the",
"repository"
] | 794cfdabb67a90f24629c4fff0424a6125f8f95b | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypes.java#L1877-L1886 | train | Find the type in the map or list. | Of course, here is the Java code you requested:
```java
protected JcrNodeType findTypeInMapOrList( Name typeName,
Collection<JcrNodeType> pendingList ) {
for (JcrNodeType pendingNodeType : pendingList) {
if (pendingNodeType.getInternalName().equals(typ... |
baratine/baratine | web/src/main/java/com/caucho/v5/web/server/ServerBuilder.java | ServerBuilder.addServices | protected void addServices(ServerBartender selfServer)
{
TempStoreSystem.createAndAddSystem();
// XXX: KrakenSystem.createAndAddSystem(selfServer);
// XXX: BartenderFileSystem.createAndAddSystem();
for (Consumer<ServerBuilder> init : _initList) {
init.accept(this);
}
... | java | protected void addServices(ServerBartender selfServer)
{
TempStoreSystem.createAndAddSystem();
// XXX: KrakenSystem.createAndAddSystem(selfServer);
// XXX: BartenderFileSystem.createAndAddSystem();
for (Consumer<ServerBuilder> init : _initList) {
init.accept(this);
}
... | [
"protected",
"void",
"addServices",
"(",
"ServerBartender",
"selfServer",
")",
"{",
"TempStoreSystem",
".",
"createAndAddSystem",
"(",
")",
";",
"// XXX: KrakenSystem.createAndAddSystem(selfServer);",
"// XXX: BartenderFileSystem.createAndAddSystem();",
"for",
"(",
"Consumer",
... | /*
private QServerSocket openEphemeralServerSocket()
{
int port = getServerPort();
if (port != 0) {
throw new IllegalStateException();
}
try {
QServerSocket ss = QJniServerSocket.create(0, 0);
_serverPort = ss.getLocalPort();
ServerConfigBoot serverConfig = getServerConfig();
serverConfig.setPort(_serverPort);
ser... | [
"/",
"*",
"private",
"QServerSocket",
"openEphemeralServerSocket",
"()",
"{",
"int",
"port",
"=",
"getServerPort",
"()",
";"
] | db34b45c03c5a5e930d8142acc72319125569fcf | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/web/server/ServerBuilder.java#L826-L840 | train | Add the services. | Of course, here is the Java code you requested:
```java
protected void addServices(ServerBartender selfServer)
{
TempStoreSystem.createAndAddSystem();
// XXX: KrakenSystem.createAndAddSystem(selfServer);
// XXX: BartenderFileSystem.createAndAddSystem();
for (Consumer<ServerBuilder> ini... |
real-logic/aeron | aeron-samples/src/main/java/io/aeron/samples/SamplesUtil.java | SamplesUtil.printError | @SuppressWarnings("unused")
public static void printError(
final String channel,
final int streamId,
final int sessionId,
final String message,
final HeaderFlyweight cause)
{
System.out.println(message);
} | java | @SuppressWarnings("unused")
public static void printError(
final String channel,
final int streamId,
final int sessionId,
final String message,
final HeaderFlyweight cause)
{
System.out.println(message);
} | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"public",
"static",
"void",
"printError",
"(",
"final",
"String",
"channel",
",",
"final",
"int",
"streamId",
",",
"final",
"int",
"sessionId",
",",
"final",
"String",
"message",
",",
"final",
"HeaderFlyweight",
... | Generic error handler that just prints message to stdout.
@param channel for the error
@param streamId for the error
@param sessionId for the error, if source
@param message indicating what the error was
@param cause of the error | [
"Generic",
"error",
"handler",
"that",
"just",
"prints",
"message",
"to",
"stdout",
"."
] | 045c32f0256d1ea35d562520216affc281a41239 | https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-samples/src/main/java/io/aeron/samples/SamplesUtil.java#L134-L143 | test | Print error. | Of course, here is the Java code you requested:
```java
@SuppressWarnings("unused")
public static void printError(
final String channel,
final int streamId,
final int sessionId,
final String message,
final HeaderFlyweight cause)
{
System.out.println(message);
... |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java | FileValueStorage.init | public void init(Properties props, ValueDataResourceHolder resources) throws IOException,
RepositoryConfigurationException
{
this.resources = resources;
prepareRootDir(props.getProperty(PATH));
} | java | public void init(Properties props, ValueDataResourceHolder resources) throws IOException,
RepositoryConfigurationException
{
this.resources = resources;
prepareRootDir(props.getProperty(PATH));
} | [
"public",
"void",
"init",
"(",
"Properties",
"props",
",",
"ValueDataResourceHolder",
"resources",
")",
"throws",
"IOException",
",",
"RepositoryConfigurationException",
"{",
"this",
".",
"resources",
"=",
"resources",
";",
"prepareRootDir",
"(",
"props",
".",
"getP... | {@inheritDoc} | [
"{"
] | 3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2 | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/FileValueStorage.java#L68-L73 | train | Initialize the object from the properties. | Of course, here is the Java code you requested:
```java
public void init(Properties props, ValueDataResourceHolder resources) throws IOException,
RepositoryConfigurationException
{
this.resources = resources;
prepareRootDir(props.getProperty(PATH));
}
```
Hope this helps! |
lessthanoptimal/ddogleg | src/org/ddogleg/nn/alg/AxisSplitterMedian.java | AxisSplitterMedian.quickSelect | private void quickSelect(List<P> points, int splitAxis, int medianNum) {
int numPoints = points.size();
if( tmp.length < numPoints ) {
tmp = new double[numPoints];
indexes = new int[ numPoints ];
}
for( int i = 0; i < numPoints; i++ ) {
tmp[i] = distance.valueAt(points.get(i),splitAxis);
}
QuickS... | java | private void quickSelect(List<P> points, int splitAxis, int medianNum) {
int numPoints = points.size();
if( tmp.length < numPoints ) {
tmp = new double[numPoints];
indexes = new int[ numPoints ];
}
for( int i = 0; i < numPoints; i++ ) {
tmp[i] = distance.valueAt(points.get(i),splitAxis);
}
QuickS... | [
"private",
"void",
"quickSelect",
"(",
"List",
"<",
"P",
">",
"points",
",",
"int",
"splitAxis",
",",
"int",
"medianNum",
")",
"{",
"int",
"numPoints",
"=",
"points",
".",
"size",
"(",
")",
";",
"if",
"(",
"tmp",
".",
"length",
"<",
"numPoints",
")",... | Uses quick-select to find the median value | [
"Uses",
"quick",
"-",
"select",
"to",
"find",
"the",
"median",
"value"
] | 3786bf448ba23d0e04962dd08c34fa68de276029 | https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/AxisSplitterMedian.java#L180-L192 | train | Quick select. | Of course, here is the Java code you requested:
```java
private void quickSelect(List<P> points, int splitAxis, int medianNum) {
int numPoints = points.size();
if( tmp.length < numPoints ) {
tmp = new double[numPoints];
indexes = new int[ numPoints ];
}
for( int i = 0; i < numPoints; i++ ) {
tmp[i] =... |
mikepenz/FastAdapter | library-core/src/main/java/com/mikepenz/fastadapter/utils/ComparableItemListImpl.java | ComparableItemListImpl.withComparator | public ComparableItemListImpl<Item> withComparator(@Nullable Comparator<Item> comparator) {
return withComparator(comparator, true);
} | java | public ComparableItemListImpl<Item> withComparator(@Nullable Comparator<Item> comparator) {
return withComparator(comparator, true);
} | [
"public",
"ComparableItemListImpl",
"<",
"Item",
">",
"withComparator",
"(",
"@",
"Nullable",
"Comparator",
"<",
"Item",
">",
"comparator",
")",
"{",
"return",
"withComparator",
"(",
"comparator",
",",
"true",
")",
";",
"}"
] | define a comparator which will be used to sort the list "everytime" it is altered
NOTE this will only sort if you "set" a new list or "add" new items (not if you provide a position for the add function)
@param comparator used to sort the list
@return this | [
"define",
"a",
"comparator",
"which",
"will",
"be",
"used",
"to",
"sort",
"the",
"list",
"everytime",
"it",
"is",
"altered",
"NOTE",
"this",
"will",
"only",
"sort",
"if",
"you",
"set",
"a",
"new",
"list",
"or",
"add",
"new",
"items",
"(",
"not",
"if",
... | 3b2412abe001ba58422e0125846b704d4dba4ae9 | https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/utils/ComparableItemListImpl.java#L44-L46 | train | Returns a new instance of this class with a custom comparator. | Of course, here is the Java code you requested:
```java
public ComparableItemListImpl<Item> withComparator(@Nullable Comparator<Item> comparator) {
return withComparator(comparator, true);
}
```
Hope this helps! |
BlueBrain/bluima | modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/VariableAssignment.java | VariableAssignment.getValue | public float getValue() {
if (VariableAssignment_Type.featOkTst && ((VariableAssignment_Type)jcasType).casFeat_value == null)
jcasType.jcas.throwFeatMissing("value", "ch.epfl.bbp.uima.types.VariableAssignment");
return jcasType.ll_cas.ll_getFloatValue(addr, ((VariableAssignment_Type)jcasType).casFeatCode_... | java | public float getValue() {
if (VariableAssignment_Type.featOkTst && ((VariableAssignment_Type)jcasType).casFeat_value == null)
jcasType.jcas.throwFeatMissing("value", "ch.epfl.bbp.uima.types.VariableAssignment");
return jcasType.ll_cas.ll_getFloatValue(addr, ((VariableAssignment_Type)jcasType).casFeatCode_... | [
"public",
"float",
"getValue",
"(",
")",
"{",
"if",
"(",
"VariableAssignment_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"VariableAssignment_Type",
")",
"jcasType",
")",
".",
"casFeat_value",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(... | getter for value - gets
@generated
@return value of the feature | [
"getter",
"for",
"value",
"-",
"gets"
] | 793ea3f46761dce72094e057a56cddfa677156ae | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/VariableAssignment.java#L107-L110 | train | getter for value - gets | Of course, here is the Java code you requested:
```java
public float getValue() {
if (VariableAssignment_Type.featOkTst && ((VariableAssignment_Type)jcasType).casFeat_value == null)
jcasType.jcas.throwFeatMissing("value", "ch.epfl.bbp.uima.types.VariableAssignment");
return jcasType.ll_cas.ll_getFloatVal... |
spockframework/spock | spock-core/src/main/java/spock/mock/DetachedMockFactory.java | DetachedMockFactory.Stub | @Override
public <T> T Stub(Map<String, Object> options, Class<T> type) {
return createMock(inferNameFromType(type), type, MockNature.STUB, options);
} | java | @Override
public <T> T Stub(Map<String, Object> options, Class<T> type) {
return createMock(inferNameFromType(type), type, MockNature.STUB, options);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"T",
"Stub",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"options",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"createMock",
"(",
"inferNameFromType",
"(",
"type",
")",
",",
"type",
",",
"M... | Creates a stub with the specified options and type. The mock name will be the types simple name.
Example:
<pre>
def person = Stub(Person, name: "myPerson") // type is Person.class, name is "myPerson"
</pre>
@param options optional options for creating the stub
@param type the interface or class type of the stub
@par... | [
"Creates",
"a",
"stub",
"with",
"the",
"specified",
"options",
"and",
"type",
".",
"The",
"mock",
"name",
"will",
"be",
"the",
"types",
"simple",
"name",
"."
] | d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9 | https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/spock/mock/DetachedMockFactory.java#L104-L107 | train | Creates a stub object of the specified type. | Of course, here is the Java code you requested:
```java
@Override
public <T> T Stub(Map<String, Object> options, Class<T> type) {
return createMock(inferNameFromType(type), type, MockNature.STUB, options);
}
```
Hope this helps! |
google/closure-compiler | src/com/google/javascript/rhino/jstype/FunctionParamBuilder.java | FunctionParamBuilder.addVarArgs | public boolean addVarArgs(JSType type) {
if (hasVarArgs()) {
return false;
}
newParameter(type).setVarArgs(true);
return true;
} | java | public boolean addVarArgs(JSType type) {
if (hasVarArgs()) {
return false;
}
newParameter(type).setVarArgs(true);
return true;
} | [
"public",
"boolean",
"addVarArgs",
"(",
"JSType",
"type",
")",
"{",
"if",
"(",
"hasVarArgs",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"newParameter",
"(",
"type",
")",
".",
"setVarArgs",
"(",
"true",
")",
";",
"return",
"true",
";",
"}"
] | Add variable arguments to the end of the parameter list.
@return False if this is called after var args are added. | [
"Add",
"variable",
"arguments",
"to",
"the",
"end",
"of",
"the",
"parameter",
"list",
"."
] | d81e36740f6a9e8ac31a825ee8758182e1dc5aae | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/FunctionParamBuilder.java#L94-L101 | train | Add varargs to the parameter list. | Of course, here is the Java code you requested:
```java
public boolean addVarArgs(JSType type) {
if (hasVarArgs()) {
return false;
}
newParameter(type).setVarArgs(true);
return true;
}
```
Hope this helps! |
Azure/azure-sdk-for-java | batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java | ExperimentsInner.createAsync | public Observable<ExperimentInner> createAsync(String resourceGroupName, String workspaceName, String experimentName) {
return createWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName).map(new Func1<ServiceResponse<ExperimentInner>, ExperimentInner>() {
@Override
p... | java | public Observable<ExperimentInner> createAsync(String resourceGroupName, String workspaceName, String experimentName) {
return createWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName).map(new Func1<ServiceResponse<ExperimentInner>, ExperimentInner>() {
@Override
p... | [
"public",
"Observable",
"<",
"ExperimentInner",
">",
"createAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"workspaceName",
",",
"String",
"experimentName",
")",
"{",
"return",
"createWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"workspaceName",
... | Creates an Experiment.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.... | [
"Creates",
"an",
"Experiment",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java#L383-L390 | train | Creates an experimental. | Of course, here is the Java code you requested:
```java
public Observable<ExperimentInner> createAsync(String resourceGroupName, String workspaceName, String experimentName) {
return createWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName).map(new Func1<ServiceResponse<ExperimentInner>,... |
CloudSlang/cs-actions | cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java | CacheUtils.removeSshSession | public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
if (sessionParam != null) {
SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
if (resource != null) {
Map<String, SSHConn... | java | public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
if (sessionParam != null) {
SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
if (resource != null) {
Map<String, SSHConn... | [
"public",
"static",
"void",
"removeSshSession",
"(",
"GlobalSessionObject",
"<",
"Map",
"<",
"String",
",",
"SSHConnection",
">",
">",
"sessionParam",
",",
"String",
"sessionId",
")",
"{",
"if",
"(",
"sessionParam",
"!=",
"null",
")",
"{",
"SessionResource",
"... | Remove the SSH session (and associated channel if any) from the cache.
@param sessionParam The cache.
@param sessionId The key to the session in the cache map. | [
"Remove",
"the",
"SSH",
"session",
"(",
"and",
"associated",
"channel",
"if",
"any",
")",
"from",
"the",
"cache",
"."
] | 9a1be1e99ad88286a6c153d5f2275df6ae1a57a1 | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java#L105-L115 | train | Removes the SSHSession from the sessionParam. | Of course, here is the Java code you requested:
```java
public static void removeSshSession(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
if (sessionParam != null) {
SessionResource<Map<String, SSHConnection>> resource = sessionParam.getResource();
if... |
abel533/ECharts | src/main/java/com/github/abel533/echarts/data/BasicData.java | BasicData.value | public T value(Object... values) {
if (values == null || values.length == 0) {
return (T) this;
}
if (this.value == null) {
this.value = new ArrayList<Object>(values.length);
}
if (this.value instanceof List) {
((List) this.value).addAll(Arrays... | java | public T value(Object... values) {
if (values == null || values.length == 0) {
return (T) this;
}
if (this.value == null) {
this.value = new ArrayList<Object>(values.length);
}
if (this.value instanceof List) {
((List) this.value).addAll(Arrays... | [
"public",
"T",
"value",
"(",
"Object",
"...",
"values",
")",
"{",
"if",
"(",
"values",
"==",
"null",
"||",
"values",
".",
"length",
"==",
"0",
")",
"{",
"return",
"(",
"T",
")",
"this",
";",
"}",
"if",
"(",
"this",
".",
"value",
"==",
"null",
"... | 设置value值
@param values | [
"设置value值"
] | 73e031e51b75e67480701404ccf16e76fd5aa278 | https://github.com/abel533/ECharts/blob/73e031e51b75e67480701404ccf16e76fd5aa278/src/main/java/com/github/abel533/echarts/data/BasicData.java#L214-L225 | train | Sets the value of the attribute. | Of course, here is the Java code you requested:
```java
public T value(Object... values) {
if (values == null || values.length == 0) {
return (T) this;
}
if (this.value == null) {
this.value = new ArrayList<Object>(values.length);
}
if (this.value instanc... |
eFaps/eFaps-WebApp | src/main/java/org/efaps/ui/wicket/request/EFapsResourceAggregator.java | EFapsResourceAggregator.renderCombinedAutoCompleteScripts | private void renderCombinedAutoCompleteScripts()
{
final StringBuilder combinedScript = new StringBuilder();
final EnumSet<AutoCompleteBehavior.Type> types = EnumSet.noneOf(AutoCompleteBehavior.Type.class);
for (final AutoCompleteHeaderItem curItem : this.autoCompleteItems) {
for... | java | private void renderCombinedAutoCompleteScripts()
{
final StringBuilder combinedScript = new StringBuilder();
final EnumSet<AutoCompleteBehavior.Type> types = EnumSet.noneOf(AutoCompleteBehavior.Type.class);
for (final AutoCompleteHeaderItem curItem : this.autoCompleteItems) {
for... | [
"private",
"void",
"renderCombinedAutoCompleteScripts",
"(",
")",
"{",
"final",
"StringBuilder",
"combinedScript",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"final",
"EnumSet",
"<",
"AutoCompleteBehavior",
".",
"Type",
">",
"types",
"=",
"EnumSet",
".",
"noneOf"... | Combines all DOM ready and onLoad scripts and renders them as 2 script
tags. | [
"Combines",
"all",
"DOM",
"ready",
"and",
"onLoad",
"scripts",
"and",
"renders",
"them",
"as",
"2",
"script",
"tags",
"."
] | 785c1aba0860dd65c673f123214fbe8c24ebdb17 | https://github.com/eFaps/eFaps-WebApp/blob/785c1aba0860dd65c673f123214fbe8c24ebdb17/src/main/java/org/efaps/ui/wicket/request/EFapsResourceAggregator.java#L191-L214 | valid | Render the combined AutoComplete scripts. | Of course, here is the Java code you requested:
```java
private void renderCombinedAutoCompleteScripts()
{
final StringBuilder combinedScript = new StringBuilder();
final EnumSet<AutoCompleteBehavior.Type> types = EnumSet.noneOf(AutoCompleteBehavior.Type.class);
for (final AutoCompleteHeade... |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/config/ConfigParams.java | ConfigParams.addSection | public void addSection(String section, ConfigParams sectionParams) {
if (section == null)
throw new NullPointerException("Section name cannot be null");
if (sectionParams != null) {
for (Map.Entry<String, String> entry : sectionParams.entrySet()) {
String key = entry.getKey();
if (key.length() > 0 &... | java | public void addSection(String section, ConfigParams sectionParams) {
if (section == null)
throw new NullPointerException("Section name cannot be null");
if (sectionParams != null) {
for (Map.Entry<String, String> entry : sectionParams.entrySet()) {
String key = entry.getKey();
if (key.length() > 0 &... | [
"public",
"void",
"addSection",
"(",
"String",
"section",
",",
"ConfigParams",
"sectionParams",
")",
"{",
"if",
"(",
"section",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"Section name cannot be null\"",
")",
";",
"if",
"(",
"sectionParams",... | Adds parameters into this ConfigParams under specified section. Keys for the
new parameters are appended with section dot prefix.
@param section name of the section where add new parameters
@param sectionParams new parameters to be added. | [
"Adds",
"parameters",
"into",
"this",
"ConfigParams",
"under",
"specified",
"section",
".",
"Keys",
"for",
"the",
"new",
"parameters",
"are",
"appended",
"with",
"section",
"dot",
"prefix",
"."
] | a8a0c3e5ec58f0663c295aa855c6b3afad2af86a | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/config/ConfigParams.java#L130-L148 | train | Add a section to the configuration. | Of course, here is the Java code you requested:
```java
public void addSection(String section, ConfigParams sectionParams) {
if (section == null)
throw new NullPointerException("Section name cannot be null");
if (sectionParams != null) {
for (Map.Entry<String, String> entry : sectionParams.entrySet()) {
... |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceChannelNameFinder.java | ReferenceChannelNameFinder.getName | @Override
public String getName(String key) throws Exception {
IPortletDefinitionRegistry registry =
PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
IPortletDefinition portletDefinition;
if (StringUtils.isNumeric(key)) {
portletDefinition = regis... | java | @Override
public String getName(String key) throws Exception {
IPortletDefinitionRegistry registry =
PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
IPortletDefinition portletDefinition;
if (StringUtils.isNumeric(key)) {
portletDefinition = regis... | [
"@",
"Override",
"public",
"String",
"getName",
"(",
"String",
"key",
")",
"throws",
"Exception",
"{",
"IPortletDefinitionRegistry",
"registry",
"=",
"PortletDefinitionRegistryLocator",
".",
"getPortletDefinitionRegistry",
"(",
")",
";",
"IPortletDefinition",
"portletDefi... | Given the key, returns the entity's name.
@param key java.lang.String | [
"Given",
"the",
"key",
"returns",
"the",
"entity",
"s",
"name",
"."
] | c1986542abb9acd214268f2df21c6305ad2f262b | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceChannelNameFinder.java#L43-L55 | train | Get the name of the portlet definition. | Of course, here is the Java code you requested:
```java
@Override
public String getName(String key) throws Exception {
IPortletDefinitionRegistry registry =
PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
IPortletDefinition portletDefinition;
if (StringUtil... |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java | RDN.toRFC2253String | public String toRFC2253String(boolean canonical) {
if (canonical == false) {
return toRFC2253StringInternal
(false, Collections.<String, String>emptyMap());
}
String c = canonicalString;
if (c == null) {
c = toRFC2253StringInternal
... | java | public String toRFC2253String(boolean canonical) {
if (canonical == false) {
return toRFC2253StringInternal
(false, Collections.<String, String>emptyMap());
}
String c = canonicalString;
if (c == null) {
c = toRFC2253StringInternal
... | [
"public",
"String",
"toRFC2253String",
"(",
"boolean",
"canonical",
")",
"{",
"if",
"(",
"canonical",
"==",
"false",
")",
"{",
"return",
"toRFC2253StringInternal",
"(",
"false",
",",
"Collections",
".",
"<",
"String",
",",
"String",
">",
"emptyMap",
"(",
")"... | /*
Returns a printable form of this RDN using the algorithm defined in
RFC 2253. Only RFC 2253 attribute type keywords are emitted.
If canonical is true, then additional canonicalizations
documented in X500Principal.getName are performed. | [
"/",
"*",
"Returns",
"a",
"printable",
"form",
"of",
"this",
"RDN",
"using",
"the",
"algorithm",
"defined",
"in",
"RFC",
"2253",
".",
"Only",
"RFC",
"2253",
"attribute",
"type",
"keywords",
"are",
"emitted",
".",
"If",
"canonical",
"is",
"true",
"then",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java#L414-L426 | train | Get the RFC2253String value. | Of course, here is the Java code you requested:
```java
public String toRFC2253String(boolean canonical) {
if (canonical == false) {
return toRFC2253StringInternal
(false, Collections.<String, String>emptyMap());
}
String c = canonicalString;
if (c == null) {... |
demidenko05/beigesoft-webstore | src/main/java/org/beigesoft/webstore/service/GoodsPriceListRetriever.java | GoodsPriceListRetriever.addTaxWr | public final void addTaxWr(final List<Node<String>> pTree,
final String pIndex, final String pName, final String pLang) {
Node<String> nodeTaxWr = new Node<String>();
pTree.add(nodeTaxWr);
nodeTaxWr.setItsName(pName);
nodeTaxWr.setItsNodes(new ArrayList<Node<String>>());
Node<String> nodeTaxWrIs... | java | public final void addTaxWr(final List<Node<String>> pTree,
final String pIndex, final String pName, final String pLang) {
Node<String> nodeTaxWr = new Node<String>();
pTree.add(nodeTaxWr);
nodeTaxWr.setItsName(pName);
nodeTaxWr.setItsNodes(new ArrayList<Node<String>>());
Node<String> nodeTaxWrIs... | [
"public",
"final",
"void",
"addTaxWr",
"(",
"final",
"List",
"<",
"Node",
"<",
"String",
">",
">",
"pTree",
",",
"final",
"String",
"pIndex",
",",
"final",
"String",
"pName",
",",
"final",
"String",
"pLang",
")",
"{",
"Node",
"<",
"String",
">",
"nodeT... | <p>Add tax wrapper 1-st level node.</p>
@param pTree tree nodes
@param pIndex Index
@param pName Name
@param pLang Language | [
"<p",
">",
"Add",
"tax",
"wrapper",
"1",
"-",
"st",
"level",
"node",
".",
"<",
"/",
"p",
">"
] | 41ed2e2f1c640d37951d5fb235f26856008b87e1 | https://github.com/demidenko05/beigesoft-webstore/blob/41ed2e2f1c640d37951d5fb235f26856008b87e1/src/main/java/org/beigesoft/webstore/service/GoodsPriceListRetriever.java#L468-L499 | train | Add Tax Wr. | Of course, here is the Java code you requested:
```java
public final void addTaxWr(final List<Node<String>> pTree,
final String pIndex, final String pName, final String pLang) {
Node<String> nodeTaxWr = new Node<String>();
pTree.add(nodeTaxWr);
nodeTaxWr.setItsName(pName);
nodeTaxWr.setItsNodes(new... |
networknt/light-4j | service/src/main/java/com/networknt/service/SingletonServiceFactory.java | SingletonServiceFactory.handleSingletonList | private static void handleSingletonList(String key, List<Object> value) throws Exception {
List<String> interfaceClasses = new ArrayList();
if(key.contains(",")) {
String[] interfaces = key.split(",");
interfaceClasses.addAll(Arrays.asList(interfaces));
} else {
... | java | private static void handleSingletonList(String key, List<Object> value) throws Exception {
List<String> interfaceClasses = new ArrayList();
if(key.contains(",")) {
String[] interfaces = key.split(",");
interfaceClasses.addAll(Arrays.asList(interfaces));
} else {
... | [
"private",
"static",
"void",
"handleSingletonList",
"(",
"String",
"key",
",",
"List",
"<",
"Object",
">",
"value",
")",
"throws",
"Exception",
"{",
"List",
"<",
"String",
">",
"interfaceClasses",
"=",
"new",
"ArrayList",
"(",
")",
";",
"if",
"(",
"key",
... | For each singleton definition, create object for the interface with the implementation class,
and push it into the service map with key and implemented object.
@param key String interface or multiple interface separated by ","
@param value List of implementations of interface(s) defined in the key
@throws Exception exc... | [
"For",
"each",
"singleton",
"definition",
"create",
"object",
"for",
"the",
"interface",
"with",
"the",
"implementation",
"class",
"and",
"push",
"it",
"into",
"the",
"service",
"map",
"with",
"key",
"and",
"implemented",
"object",
"."
] | 2a60257c60663684c8f6dc8b5ea3cf184e534db6 | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/service/src/main/java/com/networknt/service/SingletonServiceFactory.java#L210-L225 | train | Handle singleton list. | Of course, here is the Java code you requested:
```java
private static void handleSingletonList(String key, List<Object> value) throws Exception {
List<String> interfaceClasses = new ArrayList();
if(key.contains(",")) {
String[] interfaces = key.split(",");
interfaceClasses.add... |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Handler.java | Handler.setEncoding | public synchronized void setEncoding(String encoding)
throws SecurityException, java.io.UnsupportedEncodingException {
checkPermission();
if (encoding != null) {
try {
if(!java.nio.charset.Charset.isSupported(encoding)) {
throw new ... | java | public synchronized void setEncoding(String encoding)
throws SecurityException, java.io.UnsupportedEncodingException {
checkPermission();
if (encoding != null) {
try {
if(!java.nio.charset.Charset.isSupported(encoding)) {
throw new ... | [
"public",
"synchronized",
"void",
"setEncoding",
"(",
"String",
"encoding",
")",
"throws",
"SecurityException",
",",
"java",
".",
"io",
".",
"UnsupportedEncodingException",
"{",
"checkPermission",
"(",
")",
";",
"if",
"(",
"encoding",
"!=",
"null",
")",
"{",
"... | Set the character encoding used by this <tt>Handler</tt>.
<p>
The encoding should be set before any <tt>LogRecords</tt> are written
to the <tt>Handler</tt>.
@param encoding The name of a supported character encoding.
May be null, to indicate the default platform encoding.
@exception SecurityException if a security ... | [
"Set",
"the",
"character",
"encoding",
"used",
"by",
"this",
"<tt",
">",
"Handler<",
"/",
"tt",
">",
".",
"<p",
">",
"The",
"encoding",
"should",
"be",
"set",
"before",
"any",
"<tt",
">",
"LogRecords<",
"/",
"tt",
">",
"are",
"written",
"to",
"the",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Handler.java#L149-L162 | train | Sets the encoding of the class. | Of course, here is the Java code you requested:
```java
public synchronized void setEncoding(String encoding)
throws SecurityException, java.io.UnsupportedEncodingException {
checkPermission();
if (encoding != null) {
try {
if(!java.nio.charset.Charse... |
dashorst/wicket-stuff-markup-validator | jing/src/main/java/com/thaiopensource/validate/nvdl/ModeUsage.java | ModeUsage.addContext | boolean addContext(boolean isRoot, Vector names, Mode mode) {
if (modeMap == null)
modeMap = new ContextMap();
return modeMap.put(isRoot, names, mode);
} | java | boolean addContext(boolean isRoot, Vector names, Mode mode) {
if (modeMap == null)
modeMap = new ContextMap();
return modeMap.put(isRoot, names, mode);
} | [
"boolean",
"addContext",
"(",
"boolean",
"isRoot",
",",
"Vector",
"names",
",",
"Mode",
"mode",
")",
"{",
"if",
"(",
"modeMap",
"==",
"null",
")",
"modeMap",
"=",
"new",
"ContextMap",
"(",
")",
";",
"return",
"modeMap",
".",
"put",
"(",
"isRoot",
",",
... | Adds a new context (isRoot, path --> mode).
@param isRoot Flag indicating that the path starts or not with /
@param names The local names that form the path.
@param mode The mode for this path.
@return true if we do not have a duplicate path. | [
"Adds",
"a",
"new",
"context",
"(",
"isRoot",
"path",
"--",
">",
"mode",
")",
"."
] | 9e529a4dc8bfdbbe4c794f3132ef400a006560a1 | https://github.com/dashorst/wicket-stuff-markup-validator/blob/9e529a4dc8bfdbbe4c794f3132ef400a006560a1/jing/src/main/java/com/thaiopensource/validate/nvdl/ModeUsage.java#L154-L158 | train | Add a context to the context map. | Of course, here is the Java code you requested:
```java
boolean addContext(boolean isRoot, Vector names, Mode mode) {
if (modeMap == null)
modeMap = new ContextMap();
return modeMap.put(isRoot, names, mode);
}
```
Hope this helps! |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | MethodUtils.invokeStaticMethod | public static Object invokeStaticMethod(final Class<?> cls, final String methodName,
Object[] args, Class<?>[] parameterTypes)
throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
args = ArrayUtils.nullToEmpty(args);
parameterTypes = Array... | java | public static Object invokeStaticMethod(final Class<?> cls, final String methodName,
Object[] args, Class<?>[] parameterTypes)
throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
args = ArrayUtils.nullToEmpty(args);
parameterTypes = Array... | [
"public",
"static",
"Object",
"invokeStaticMethod",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
",",
"final",
"String",
"methodName",
",",
"Object",
"[",
"]",
"args",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"parameterTypes",
")",
"throws",
"NoSuchMethodExc... | <p>Invokes a named {@code static} method whose parameter type matches the object type.</p>
<p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p>
<p>This method supports calls to methods taking primitive parameters
via passing in wrapping classes. So, for examp... | [
"<p",
">",
"Invokes",
"a",
"named",
"{",
"@code",
"static",
"}",
"method",
"whose",
"parameter",
"type",
"matches",
"the",
"object",
"type",
".",
"<",
"/",
"p",
">"
] | 9e2dfbbda3668cfa5d935fe76479d1426c294504 | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L433-L447 | train | Invoke a static method. | Of course, here is the Java code you requested:
```java
public static Object invokeStaticMethod(final Class<?> cls, final String methodName,
Object[] args, Class<?>[] parameterTypes)
throws NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
args = Arr... |
nutzam/nutzboot | nutzboot-starter/nutzboot-starter-tio-websocket/src/main/java/org/nutz/boot/starter/tio/websocketbean/TioWebsocketMsgHandler.java | TioWebsocketMsgHandler.onAfterHandshaked | @Override
public void onAfterHandshaked(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) throws Exception {
log.debug("onAfterHandshaked");
TioWebsocketMethodMapper onAfterHandshaked = methods.getOnAfterHandshaked();
if (onAfterHandshaked != null) {
... | java | @Override
public void onAfterHandshaked(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) throws Exception {
log.debug("onAfterHandshaked");
TioWebsocketMethodMapper onAfterHandshaked = methods.getOnAfterHandshaked();
if (onAfterHandshaked != null) {
... | [
"@",
"Override",
"public",
"void",
"onAfterHandshaked",
"(",
"HttpRequest",
"httpRequest",
",",
"HttpResponse",
"httpResponse",
",",
"ChannelContext",
"channelContext",
")",
"throws",
"Exception",
"{",
"log",
".",
"debug",
"(",
"\"onAfterHandshaked\"",
")",
";",
"Ti... | afterHandshaked
@param httpRequest httpRequest
@param httpResponse httpResponse
@param channelContext channelContext
@throws Exception e | [
"afterHandshaked"
] | fd33fd4fdce058eab594f28e4d3202f997e3c66a | https://github.com/nutzam/nutzboot/blob/fd33fd4fdce058eab594f28e4d3202f997e3c66a/nutzboot-starter/nutzboot-starter-tio-websocket/src/main/java/org/nutz/boot/starter/tio/websocketbean/TioWebsocketMsgHandler.java#L56-L63 | train | Override this method to call the onAfterHandshaked method. | Of course, here is the Java code you requested:
```java
@Override
public void onAfterHandshaked(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) throws Exception {
log.debug("onAfterHandshaked");
TioWebsocketMethodMapper onAfterHandshaked = methods.getOnAfterHandsh... |
jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java | SpecialParam.doSetValueAsQueryToken | @Override
void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theParameter) {
setValue(ParameterUtil.unescape(theParameter));
} | java | @Override
void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theParameter) {
setValue(ParameterUtil.unescape(theParameter));
} | [
"@",
"Override",
"void",
"doSetValueAsQueryToken",
"(",
"FhirContext",
"theContext",
",",
"String",
"theParamName",
",",
"String",
"theQualifier",
",",
"String",
"theParameter",
")",
"{",
"setValue",
"(",
"ParameterUtil",
".",
"unescape",
"(",
"theParameter",
")",
... | {@inheritDoc} | [
"{"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SpecialParam.java#L58-L61 | train | Override this method to set the value as a query token | Of course, here is the Java code you requested:
```java
@Override
void doSetValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theParameter) {
setValue(ParameterUtil.unescape(theParameter));
}
```
Hope this helps! |
aws/aws-sdk-java | aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeIamInstanceProfileAssociationsResult.java | DescribeIamInstanceProfileAssociationsResult.setIamInstanceProfileAssociations | public void setIamInstanceProfileAssociations(java.util.Collection<IamInstanceProfileAssociation> iamInstanceProfileAssociations) {
if (iamInstanceProfileAssociations == null) {
this.iamInstanceProfileAssociations = null;
return;
}
this.iamInstanceProfileAssociations = n... | java | public void setIamInstanceProfileAssociations(java.util.Collection<IamInstanceProfileAssociation> iamInstanceProfileAssociations) {
if (iamInstanceProfileAssociations == null) {
this.iamInstanceProfileAssociations = null;
return;
}
this.iamInstanceProfileAssociations = n... | [
"public",
"void",
"setIamInstanceProfileAssociations",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"IamInstanceProfileAssociation",
">",
"iamInstanceProfileAssociations",
")",
"{",
"if",
"(",
"iamInstanceProfileAssociations",
"==",
"null",
")",
"{",
"this",
".",
... | <p>
Information about the IAM instance profile associations.
</p>
@param iamInstanceProfileAssociations
Information about the IAM instance profile associations. | [
"<p",
">",
"Information",
"about",
"the",
"IAM",
"instance",
"profile",
"associations",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeIamInstanceProfileAssociationsResult.java#L65-L72 | train | Sets the value of the iamInstanceProfileAssociations property. | Of course, here is the Java code you requested:
```java
public void setIamInstanceProfileAssociations(java.util.Collection<IamInstanceProfileAssociation> iamInstanceProfileAssociations) {
if (iamInstanceProfileAssociations == null) {
this.iamInstanceProfileAssociations = null;
return;
... |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/cache/links/ReferenceStreamLink.java | ReferenceStreamLink.newLockingCursor | public final LockingCursor newLockingCursor(Filter filter, boolean jumpbackEnabled) throws PersistenceException, SevereMessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "newLockingCursor", new Object[] {filter, Boolean.valueOf(jumpbackEnabled)});
... | java | public final LockingCursor newLockingCursor(Filter filter, boolean jumpbackEnabled) throws PersistenceException, SevereMessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "newLockingCursor", new Object[] {filter, Boolean.valueOf(jumpbackEnabled)});
... | [
"public",
"final",
"LockingCursor",
"newLockingCursor",
"(",
"Filter",
"filter",
",",
"boolean",
"jumpbackEnabled",
")",
"throws",
"PersistenceException",
",",
"SevereMessageStoreException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
... | /* (non-Javadoc)
@see com.ibm.ws.sib.msgstore.ItemCollection#newLockingCursor(com.ibm.ws.sib.msgstore.Filter) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/cache/links/ReferenceStreamLink.java#L457-L468 | train | Returns a new locking cursor for this item. | Of course, here is the Java code you requested:
```java
public final LockingCursor newLockingCursor(Filter filter, boolean jumpbackEnabled) throws PersistenceException, SevereMessageStoreException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "newLockingCursor", n... |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java | StructureTools.addGroupToStructure | public static Chain addGroupToStructure(Structure s, Group g, int model, Chain chainGuess, boolean clone ) {
synchronized(s) {
// Find or create the chain
String chainId = g.getChainId();
assert !chainId.isEmpty();
Chain chain;
if(chainGuess != null && chainGuess.getId() == chainId) {
// previously... | java | public static Chain addGroupToStructure(Structure s, Group g, int model, Chain chainGuess, boolean clone ) {
synchronized(s) {
// Find or create the chain
String chainId = g.getChainId();
assert !chainId.isEmpty();
Chain chain;
if(chainGuess != null && chainGuess.getId() == chainId) {
// previously... | [
"public",
"static",
"Chain",
"addGroupToStructure",
"(",
"Structure",
"s",
",",
"Group",
"g",
",",
"int",
"model",
",",
"Chain",
"chainGuess",
",",
"boolean",
"clone",
")",
"{",
"synchronized",
"(",
"s",
")",
"{",
"// Find or create the chain",
"String",
"chai... | Adds a particular group to a structure. A new chain will be created if necessary.
<p>When adding multiple groups, pass the return value of one call as the
chainGuess parameter of the next call for efficiency.
<pre>
Chain guess = null;
for(Group g : groups) {
guess = addGroupToStructure(s, g, guess );
}
</pre>
@param s... | [
"Adds",
"a",
"particular",
"group",
"to",
"a",
"structure",
".",
"A",
"new",
"chain",
"will",
"be",
"created",
"if",
"necessary",
"."
] | a1c71a8e3d40cc32104b1d387a3d3b560b43356e | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L525-L577 | train | Add a group to a structure. | Of course, here is the Java code you requested:
```java
public static Chain addGroupToStructure(Structure s, Group g, int model, Chain chainGuess, boolean clone ) {
synchronized(s) {
// Find or create the chain
String chainId = g.getChainId();
assert !chainId.isEmpty();
Chain chain;
if(chainGuess != n... |
awin/rabbiteasy | rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/SingleConnectionFactory.java | SingleConnectionFactory.notifyListenersOnStateChange | void notifyListenersOnStateChange() {
LOGGER.debug("Notifying connection listeners about state change to {}", state);
for (ConnectionListener listener : connectionListeners) {
switch (state) {
case CONNECTED:
listener.onConnectionEstablished... | java | void notifyListenersOnStateChange() {
LOGGER.debug("Notifying connection listeners about state change to {}", state);
for (ConnectionListener listener : connectionListeners) {
switch (state) {
case CONNECTED:
listener.onConnectionEstablished... | [
"void",
"notifyListenersOnStateChange",
"(",
")",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Notifying connection listeners about state change to {}\"",
",",
"state",
")",
";",
"for",
"(",
"ConnectionListener",
"listener",
":",
"connectionListeners",
")",
"{",
"switch",
"(",
... | Notifies all connection listener about a state change. | [
"Notifies",
"all",
"connection",
"listener",
"about",
"a",
"state",
"change",
"."
] | c161efda6c0f7ef319aedf09dfe40a4a90165510 | https://github.com/awin/rabbiteasy/blob/c161efda6c0f7ef319aedf09dfe40a4a90165510/rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/SingleConnectionFactory.java#L196-L214 | train | Notifies all connection listeners that the state of the related calendar has changed. | Of course, here is the Java code you requested:
```java
void notifyListenersOnStateChange() {
LOGGER.debug("Notifying connection listeners about state change to {}", state);
for (ConnectionListener listener : connectionListeners) {
switch (state) {
case CONNECT... |
liferay/com-liferay-commerce | commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java | CommerceRegionPersistenceImpl.findByC_A | @Override
public List<CommerceRegion> findByC_A(long commerceCountryId,
boolean active, int start, int end,
OrderByComparator<CommerceRegion> orderByComparator) {
return findByC_A(commerceCountryId, active, start, end,
orderByComparator, true);
} | java | @Override
public List<CommerceRegion> findByC_A(long commerceCountryId,
boolean active, int start, int end,
OrderByComparator<CommerceRegion> orderByComparator) {
return findByC_A(commerceCountryId, active, start, end,
orderByComparator, true);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceRegion",
">",
"findByC_A",
"(",
"long",
"commerceCountryId",
",",
"boolean",
"active",
",",
"int",
"start",
",",
"int",
"end",
",",
"OrderByComparator",
"<",
"CommerceRegion",
">",
"orderByComparator",
")",
"{",
... | Returns an ordered range of all the commerce regions where commerceCountryId = ? and active = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> re... | [
"Returns",
"an",
"ordered",
"range",
"of",
"all",
"the",
"commerce",
"regions",
"where",
"commerceCountryId",
"=",
"?",
";",
"and",
"active",
"=",
"?",
";",
"."
] | 9e54362d7f59531fc684016ba49ee7cdc3a2f22b | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java#L2320-L2326 | train | Returns a range of commerce regions where commerceCountryId is not null. | Of course, here is the Java code you requested:
```java
@Override
public List<CommerceRegion> findByC_A(long commerceCountryId,
boolean active, int start, int end,
OrderByComparator<CommerceRegion> orderByComparator) {
return findByC_A(commerceCountryId, active, start, end,
orderByComparator, true);
}
```
... |
BorderTech/wcomponents | wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java | ExampleSection.selectExample | public void selectExample(final ExampleData example) {
try {
StringBuilder exampleName = new StringBuilder();
if (example.getExampleGroupName() != null && !example.getExampleGroupName().equals("")) {
exampleName.append(example.getExampleGroupName()).append(" - ");
}
exampleName.append(example.getExamp... | java | public void selectExample(final ExampleData example) {
try {
StringBuilder exampleName = new StringBuilder();
if (example.getExampleGroupName() != null && !example.getExampleGroupName().equals("")) {
exampleName.append(example.getExampleGroupName()).append(" - ");
}
exampleName.append(example.getExamp... | [
"public",
"void",
"selectExample",
"(",
"final",
"ExampleData",
"example",
")",
"{",
"try",
"{",
"StringBuilder",
"exampleName",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"example",
".",
"getExampleGroupName",
"(",
")",
"!=",
"null",
"&&",
"!",
... | Selects an example. If there is an error instantiating the component, an error message will be displayed.
@param example the ExampleData of the example to select. | [
"Selects",
"an",
"example",
".",
"If",
"there",
"is",
"an",
"error",
"instantiating",
"the",
"component",
"an",
"error",
"message",
"will",
"be",
"displayed",
"."
] | d1a2b2243270067db030feb36ca74255aaa94436 | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L190-L203 | train | Select an example. | Of course, here is the Java code you requested:
```java
public void selectExample(final ExampleData example) {
try {
StringBuilder exampleName = new StringBuilder();
if (example.getExampleGroupName() != null && !example.getExampleGroupName().equals("")) {
exampleName.append(example.getExampleGroupName()).a... |
aws/aws-sdk-java | aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/transform/AssociateCertificateRequestMarshaller.java | AssociateCertificateRequestMarshaller.marshall | public void marshall(AssociateCertificateRequest associateCertificateRequest, ProtocolMarshaller protocolMarshaller) {
if (associateCertificateRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshal... | java | public void marshall(AssociateCertificateRequest associateCertificateRequest, ProtocolMarshaller protocolMarshaller) {
if (associateCertificateRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshal... | [
"public",
"void",
"marshall",
"(",
"AssociateCertificateRequest",
"associateCertificateRequest",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"associateCertificateRequest",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Inva... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-mediaconvert/src/main/java/com/amazonaws/services/mediaconvert/model/transform/AssociateCertificateRequestMarshaller.java#L42-L53 | train | marshalls the given AssociateCertificateRequest to the given protocolMarshaller. | Of course, here is the Java code you requested:
```java
public void marshall(AssociateCertificateRequest associateCertificateRequest, ProtocolMarshaller protocolMarshaller) {
if (associateCertificateRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... |
kiegroup/drools | drools-workbench-models/drools-workbench-models-commons/src/main/java/org/drools/workbench/models/commons/backend/rule/ActionCallMethodBuilder.java | ActionCallMethodBuilder.supports | public boolean supports(final String line) {
final List<String> splits = new ArrayList<String>();
int depth = 0;
int textDepth = 0;
boolean escape = false;
StringBuffer split = new StringBuffer();
for (char c : line.toCharArray()) {
if (depth == 0 && c == '.')... | java | public boolean supports(final String line) {
final List<String> splits = new ArrayList<String>();
int depth = 0;
int textDepth = 0;
boolean escape = false;
StringBuffer split = new StringBuffer();
for (char c : line.toCharArray()) {
if (depth == 0 && c == '.')... | [
"public",
"boolean",
"supports",
"(",
"final",
"String",
"line",
")",
"{",
"final",
"List",
"<",
"String",
">",
"splits",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"int",
"depth",
"=",
"0",
";",
"int",
"textDepth",
"=",
"0",
";",
... | ActionCallMethods do not support chained method invocations | [
"ActionCallMethods",
"do",
"not",
"support",
"chained",
"method",
"invocations"
] | 22b0275d6dbe93070b8090948502cf46eda543c4 | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-workbench-models/drools-workbench-models-commons/src/main/java/org/drools/workbench/models/commons/backend/rule/ActionCallMethodBuilder.java#L67-L99 | train | Checks if the line contains a valid log record. | Of course, here is the Java code you requested:
```java
public boolean supports(final String line) {
final List<String> splits = new ArrayList<String>();
int depth = 0;
int textDepth = 0;
boolean escape = false;
StringBuffer split = new StringBuffer();
for (char c : line... |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/WebhooksInner.java | WebhooksInner.listByAutomationAccountAsync | public Observable<Page<WebhookInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName, final String filter) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName, filter)
.map(new Func1<ServiceResponse<Page<W... | java | public Observable<Page<WebhookInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName, final String filter) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName, filter)
.map(new Func1<ServiceResponse<Page<W... | [
"public",
"Observable",
"<",
"Page",
"<",
"WebhookInner",
">",
">",
"listByAutomationAccountAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"automationAccountName",
",",
"final",
"String",
"filter",
")",
"{",
"return",
"listByAutomationAcc... | Retrieve a list of webhooks.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param filter The filter to apply on the operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList&l... | [
"Retrieve",
"a",
"list",
"of",
"webhooks",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/WebhooksInner.java#L729-L737 | train | Gets a list of Webhook. | Of course, here is the Java code you requested:
```java
public Observable<Page<WebhookInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName, final String filter) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName, ... |
alkacon/opencms-core | src/org/opencms/jsp/CmsJspTagContentCheck.java | CmsJspTagContentCheck.setIfexists | public void setIfexists(String elementList) {
if (elementList != null) {
m_elementList = elementList;
m_checkall = false;
m_checknone = false;
}
} | java | public void setIfexists(String elementList) {
if (elementList != null) {
m_elementList = elementList;
m_checkall = false;
m_checknone = false;
}
} | [
"public",
"void",
"setIfexists",
"(",
"String",
"elementList",
")",
"{",
"if",
"(",
"elementList",
"!=",
"null",
")",
"{",
"m_elementList",
"=",
"elementList",
";",
"m_checkall",
"=",
"false",
";",
"m_checknone",
"=",
"false",
";",
"}",
"}"
] | Sets the list of elements to check for.<p>
@param elementList the list of elements to check for | [
"Sets",
"the",
"list",
"of",
"elements",
"to",
"check",
"for",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagContentCheck.java#L226-L233 | train | Sets the elementList. | Of course, here is the Java code you requested:
```java
public void setIfexists(String elementList) {
if (elementList != null) {
m_elementList = elementList;
m_checkall = false;
m_checknone = false;
}
}
```
Hope this helps! |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java | ExpressRouteCrossConnectionsInner.listRoutesTableSummary | public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBloc... | java | public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBloc... | [
"public",
"ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner",
"listRoutesTableSummary",
"(",
"String",
"resourceGroupName",
",",
"String",
"crossConnectionName",
",",
"String",
"peeringName",
",",
"String",
"devicePath",
")",
"{",
"return",
"listRoutesTableSummaryWit... | Gets the route table summary associated with the express route cross connection in a resource group.
@param resourceGroupName The name of the resource group.
@param crossConnectionName The name of the ExpressRouteCrossConnection.
@param peeringName The name of the peering.
@param devicePath The path of the device.
@th... | [
"Gets",
"the",
"route",
"table",
"summary",
"associated",
"with",
"the",
"express",
"route",
"cross",
"connection",
"in",
"a",
"resource",
"group",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java#L1106-L1108 | train | List routes table summary. | Of course, here is the Java code you requested:
```java
public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupN... |
sarl/sarl | main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXListingsGenerator2.java | LaTeXListingsGenerator2.addRequirement | public void addRequirement(String requirement) {
if (!Strings.isEmpty(requirement)) {
if (this.requirements == null) {
this.requirements = new ArrayList<>();
}
this.requirements.add(requirement);
}
} | java | public void addRequirement(String requirement) {
if (!Strings.isEmpty(requirement)) {
if (this.requirements == null) {
this.requirements = new ArrayList<>();
}
this.requirements.add(requirement);
}
} | [
"public",
"void",
"addRequirement",
"(",
"String",
"requirement",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"requirement",
")",
")",
"{",
"if",
"(",
"this",
".",
"requirements",
"==",
"null",
")",
"{",
"this",
".",
"requirements",
"=",
... | Add a TeX requirement.
@param requirement the name of the TeX package. | [
"Add",
"a",
"TeX",
"requirement",
"."
] | ca00ff994598c730339972def4e19a60e0b8cace | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/latex/LaTeXListingsGenerator2.java#L255-L262 | train | Adds a requirement to the list of requirements. | Of course, here is the Java code you requested:
```java
public void addRequirement(String requirement) {
if (!Strings.isEmpty(requirement)) {
if (this.requirements == null) {
this.requirements = new ArrayList<>();
}
this.requirements.add(requirement);
}
}
```
Hope this helps! |
alkacon/opencms-core | src/org/opencms/ui/apps/sessions/CmsSessionsApp.java | CmsSessionsApp.getUserNames | protected static String getUserNames(Set<String> ids, String andLocalized) {
List<String> userNames = new ArrayList<String>();
for (String id : ids) {
CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(new CmsUUID(id));
try {
String name = A_Cms... | java | protected static String getUserNames(Set<String> ids, String andLocalized) {
List<String> userNames = new ArrayList<String>();
for (String id : ids) {
CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(new CmsUUID(id));
try {
String name = A_Cms... | [
"protected",
"static",
"String",
"getUserNames",
"(",
"Set",
"<",
"String",
">",
"ids",
",",
"String",
"andLocalized",
")",
"{",
"List",
"<",
"String",
">",
"userNames",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"String",
... | Get user names as String from set of sessions.<p>
@param ids to gain usernames from
@param andLocalized String
@return user names as string | [
"Get",
"user",
"names",
"as",
"String",
"from",
"set",
"of",
"sessions",
".",
"<p",
">"
] | bc104acc75d2277df5864da939a1f2de5fdee504 | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sessions/CmsSessionsApp.java#L136-L171 | train | Gets the user names. | Of course, here is the Java code you requested:
```java
protected static String getUserNames(Set<String> ids, String andLocalized) {
List<String> userNames = new ArrayList<String>();
for (String id : ids) {
CmsSessionInfo session = OpenCms.getSessionManager().getSessionInfo(new CmsUUID(id... |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/FatCatAligner.java | FatCatAligner.chainAfp | private static Group[] chainAfp(FatCatParameters params,AFPChain afpChain, Atom[] ca1, Atom[] ca2) throws StructureException{
// we don;t want to rotate input atoms, do we?
Atom[] ca2clone = StructureTools.cloneAtomArray(ca2);
List<AFP> afpSet = afpChain.getAfpSet();
if (debug)
System.out.println("enterin... | java | private static Group[] chainAfp(FatCatParameters params,AFPChain afpChain, Atom[] ca1, Atom[] ca2) throws StructureException{
// we don;t want to rotate input atoms, do we?
Atom[] ca2clone = StructureTools.cloneAtomArray(ca2);
List<AFP> afpSet = afpChain.getAfpSet();
if (debug)
System.out.println("enterin... | [
"private",
"static",
"Group",
"[",
"]",
"chainAfp",
"(",
"FatCatParameters",
"params",
",",
"AFPChain",
"afpChain",
",",
"Atom",
"[",
"]",
"ca1",
",",
"Atom",
"[",
"]",
"ca2",
")",
"throws",
"StructureException",
"{",
"// we don;t want to rotate input atoms, do we... | run AFP chaining allowing up to maxTra flexible regions.
Input is original coordinates. | [
"run",
"AFP",
"chaining",
"allowing",
"up",
"to",
"maxTra",
"flexible",
"regions",
".",
"Input",
"is",
"original",
"coordinates",
"."
] | a1c71a8e3d40cc32104b1d387a3d3b560b43356e | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/FatCatAligner.java#L136-L221 | train | Chain an alignment using the AFP Chainer | Of course, here is the Java code you requested:
```java
private static Group[] chainAfp(FatCatParameters params,AFPChain afpChain, Atom[] ca1, Atom[] ca2) throws StructureException{
// we don;t want to rotate input atoms, do we?
Atom[] ca2clone = StructureTools.cloneAtomArray(ca2);
List<AFP> afpSet = afpChain.... |
mcxiaoke/Android-Next | core/src/main/java/com/mcxiaoke/next/collection/WeakFastHashMap.java | WeakFastHashMap.putAll | @Override
public void putAll(Map<? extends K, ? extends V> in) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
temp.putAll(in);
map = temp;
}
} else {
synchronized (map) {
... | java | @Override
public void putAll(Map<? extends K, ? extends V> in) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
temp.putAll(in);
map = temp;
}
} else {
synchronized (map) {
... | [
"@",
"Override",
"public",
"void",
"putAll",
"(",
"Map",
"<",
"?",
"extends",
"K",
",",
"?",
"extends",
"V",
">",
"in",
")",
"{",
"if",
"(",
"fast",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"Map",
"<",
"K",
",",
"V",
">",
"temp",
"=",
... | Copy all of the mappings from the specified map to this one, replacing
any mappings with the same keys.
@param in the map whose mappings are to be copied | [
"Copy",
"all",
"of",
"the",
"mappings",
"from",
"the",
"specified",
"map",
"to",
"this",
"one",
"replacing",
"any",
"mappings",
"with",
"the",
"same",
"keys",
"."
] | 1bfdf99d0b81a849aa0fa6697c53ed673151ca39 | https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/collection/WeakFastHashMap.java#L382-L395 | train | This method is used to update the contents of the Map in the specified map. | Of course, here is the Java code you requested:
```java
@Override
public void putAll(Map<? extends K, ? extends V> in) {
if (fast) {
synchronized (this) {
Map<K, V> temp = cloneMap(map);
temp.putAll(in);
map = temp;
}
}... |
scravy/java-pair | src/main/java/de/scravy/pair/Pairs.java | Pairs.fromSerializables | public static <First extends Serializable, Second extends Serializable>
SerializablePair<First, Second> fromSerializables(
final First first, final Second second) {
return new ImmutableSerializablePair<First, Second>(first, second);
} | java | public static <First extends Serializable, Second extends Serializable>
SerializablePair<First, Second> fromSerializables(
final First first, final Second second) {
return new ImmutableSerializablePair<First, Second>(first, second);
} | [
"public",
"static",
"<",
"First",
"extends",
"Serializable",
",",
"Second",
"extends",
"Serializable",
">",
"SerializablePair",
"<",
"First",
",",
"Second",
">",
"fromSerializables",
"(",
"final",
"First",
"first",
",",
"final",
"Second",
"second",
")",
"{",
"... | Creates a pair from serializables which is itself {@link Serializable}.
@since 1.0.0
@param first
The first (left) component.
@param second
The second (right) component.
@return A serilizable pair consisting of the two components. | [
"Creates",
"a",
"pair",
"from",
"serializables",
"which",
"is",
"itself",
"{",
"@link",
"Serializable",
"}",
"."
] | d8792e86c4f8e977826a4ccb940e4416a1119ccb | https://github.com/scravy/java-pair/blob/d8792e86c4f8e977826a4ccb940e4416a1119ccb/src/main/java/de/scravy/pair/Pairs.java#L64-L68 | train | Create an immutable pair of two CID objects from the given serializables. | Of course, here is the Java code you requested:
```java
public static <First extends Serializable, Second extends Serializable>
SerializablePair<First, Second> fromSerializables(
final First first, final Second second) {
return new ImmutableSerializablePair<First, Second>(first, second);
}
```
H... |
googleads/googleads-java-lib | modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201902/Product.java | Product.getBuiltInTargeting | public com.google.api.ads.admanager.axis.v201902.Targeting getBuiltInTargeting() {
return builtInTargeting;
} | java | public com.google.api.ads.admanager.axis.v201902.Targeting getBuiltInTargeting() {
return builtInTargeting;
} | [
"public",
"com",
".",
"google",
".",
"api",
".",
"ads",
".",
"admanager",
".",
"axis",
".",
"v201902",
".",
"Targeting",
"getBuiltInTargeting",
"(",
")",
"{",
"return",
"builtInTargeting",
";",
"}"
] | Gets the builtInTargeting value for this Product.
@return builtInTargeting * The targeting for the created {@link ProposalLineItem}. For
those scenarios using sales
management, it's a combination of {@link ProductTemplate#productSegmentation}
and
{@link ProductTemplate#builtInTargeting}. See details
in {@link Produc... | [
"Gets",
"the",
"builtInTargeting",
"value",
"for",
"this",
"Product",
"."
] | 967957cc4f6076514e3a7926fe653e4f1f7cc9c9 | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/v201902/Product.java#L922-L924 | train | Gets the builtInTargeting value for this Targeting. | Of course, here is the Java code you requested:
```java
public com.google.api.ads.admanager.axis.v201902.Targeting getBuiltInTargeting() {
return builtInTargeting;
}
```
Hope this helps! |
ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/process/ProcessCommunicatorImpl.java | ProcessCommunicatorImpl.read | public String read(Datapoint dp) throws KNXException
{
if (dp.getDPT() == null)
throw new KNXIllegalArgumentException("specify DPT for datapoint");
final byte[] apdu = readFromGroup(dp.getMainAddress(), dp.getPriority(), 0, 14);
final DPTXlator t =
TranslatorTypes.createTranslator(dp.getMainNumber(),... | java | public String read(Datapoint dp) throws KNXException
{
if (dp.getDPT() == null)
throw new KNXIllegalArgumentException("specify DPT for datapoint");
final byte[] apdu = readFromGroup(dp.getMainAddress(), dp.getPriority(), 0, 14);
final DPTXlator t =
TranslatorTypes.createTranslator(dp.getMainNumber(),... | [
"public",
"String",
"read",
"(",
"Datapoint",
"dp",
")",
"throws",
"KNXException",
"{",
"if",
"(",
"dp",
".",
"getDPT",
"(",
")",
"==",
"null",
")",
"throw",
"new",
"KNXIllegalArgumentException",
"(",
"\"specify DPT for datapoint\"",
")",
";",
"final",
"byte",... | /* (non-Javadoc)
@see tuwien.auto.calimero.process.ProcessCommunicator#read
(tuwien.auto.calimero.datapoint.Datapoint) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 4e9318eadbdeb945e529789f573b45386e619bed | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/process/ProcessCommunicatorImpl.java#L390-L399 | train | Reads a single data point from the KNX device. | Of course, here is the Java code you requested:
```java
public String read(Datapoint dp) throws KNXException
{
if (dp.getDPT() == null)
throw new KNXIllegalArgumentException("specify DPT for datapoint");
final byte[] apdu = readFromGroup(dp.getMainAddress(), dp.getPriority(), 0, 14);
final DPTXlator t =... |
moparisthebest/beehive | beehive-controls/src/main/java/org/apache/beehive/controls/runtime/servlet/ServletBeanContext.java | ServletBeanContext.getService | public <T> T getService(Class<T> serviceClass, Object selector)
{
T service = super.getService(serviceClass, selector);
if (service == null && serviceClass.equals(ControlBeanContextFactory.class)) {
return (T)_bcsp.getService(this, this, serviceClass, selector);
}
return ... | java | public <T> T getService(Class<T> serviceClass, Object selector)
{
T service = super.getService(serviceClass, selector);
if (service == null && serviceClass.equals(ControlBeanContextFactory.class)) {
return (T)_bcsp.getService(this, this, serviceClass, selector);
}
return ... | [
"public",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"serviceClass",
",",
"Object",
"selector",
")",
"{",
"T",
"service",
"=",
"super",
".",
"getService",
"(",
"serviceClass",
",",
"selector",
")",
";",
"if",
"(",
"service",
"==",
... | Override ControlBeanContext.getService(). A control bean creates its bean context using the
ControlBeanContextFactory service provided by this context. A control bean will attempt to create
its context before adding its self to this context as a child. This creates a chicken/egg problem since
only a child of a contex... | [
"Override",
"ControlBeanContext",
".",
"getService",
"()",
".",
"A",
"control",
"bean",
"creates",
"its",
"bean",
"context",
"using",
"the",
"ControlBeanContextFactory",
"service",
"provided",
"by",
"this",
"context",
".",
"A",
"control",
"bean",
"will",
"attempt"... | 4246a0cc40ce3c05f1a02c2da2653ac622703d77 | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/servlet/ServletBeanContext.java#L242-L249 | train | Gets the service. | Of course, here is the Java code you requested:
```java
public <T> T getService(Class<T> serviceClass, Object selector)
{
T service = super.getService(serviceClass, selector);
if (service == null && serviceClass.equals(ControlBeanContextFactory.class)) {
return (T)_bcsp.getService(this,... |
redkale/redkale | src/org/redkale/source/EntityInfo.java | EntityInfo.getEntityValue | protected T getEntityValue(final SelectColumn sels, final ResultSet set) throws SQLException {
T obj;
Attribute<T, Serializable>[] attrs = this.queryAttributes;
if (this.constructorParameters == null) {
obj = creator.create();
} else {
Object[] cps = new Obj... | java | protected T getEntityValue(final SelectColumn sels, final ResultSet set) throws SQLException {
T obj;
Attribute<T, Serializable>[] attrs = this.queryAttributes;
if (this.constructorParameters == null) {
obj = creator.create();
} else {
Object[] cps = new Obj... | [
"protected",
"T",
"getEntityValue",
"(",
"final",
"SelectColumn",
"sels",
",",
"final",
"ResultSet",
"set",
")",
"throws",
"SQLException",
"{",
"T",
"obj",
";",
"Attribute",
"<",
"T",
",",
"Serializable",
">",
"[",
"]",
"attrs",
"=",
"this",
".",
"queryAtt... | 将一行的ResultSet组装成一个Entity对象
@param sels 指定字段
@param set ResultSet
@return Entity对象
@throws SQLException SQLException | [
"将一行的ResultSet组装成一个Entity对象"
] | ea5169b5c5ea7412fd762331c0c497165832e901 | https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/source/EntityInfo.java#L1044-L1066 | train | Gets the entity value. | Of course, here is the Java code you requested:
```java
protected T getEntityValue(final SelectColumn sels, final ResultSet set) throws SQLException {
T obj;
Attribute<T, Serializable>[] attrs = this.queryAttributes;
if (this.constructorParameters == null) {
obj = creator.create... |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfStamper.java | PdfStamper.addFileAttachment | public void addFileAttachment(String description, PdfFileSpecification fs) throws IOException {
stamper.addFileAttachment(description, fs);
} | java | public void addFileAttachment(String description, PdfFileSpecification fs) throws IOException {
stamper.addFileAttachment(description, fs);
} | [
"public",
"void",
"addFileAttachment",
"(",
"String",
"description",
",",
"PdfFileSpecification",
"fs",
")",
"throws",
"IOException",
"{",
"stamper",
".",
"addFileAttachment",
"(",
"description",
",",
"fs",
")",
";",
"}"
] | Adds a file attachment at the document level. Existing attachments will be kept.
@param description the file description
@param fs the file specification | [
"Adds",
"a",
"file",
"attachment",
"at",
"the",
"document",
"level",
".",
"Existing",
"attachments",
"will",
"be",
"kept",
"."
] | 438fc1899367fd13dfdfa8dfdca9a3c1a7783b84 | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamper.java#L511-L513 | train | Add a file attachment to the image. | Of course, here is the Java code you requested:
```java
public void addFileAttachment(String description, PdfFileSpecification fs) throws IOException {
stamper.addFileAttachment(description, fs);
}
```
Hope this helps! |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java | Normalizer.quickCheck | @Deprecated
public static QuickCheckResult quickCheck(String source, Mode mode) {
return quickCheck(source, mode, 0);
} | java | @Deprecated
public static QuickCheckResult quickCheck(String source, Mode mode) {
return quickCheck(source, mode, 0);
} | [
"@",
"Deprecated",
"public",
"static",
"QuickCheckResult",
"quickCheck",
"(",
"String",
"source",
",",
"Mode",
"mode",
")",
"{",
"return",
"quickCheck",
"(",
"source",
",",
"mode",
",",
"0",
")",
";",
"}"
] | Convenience method.
@param source string for determining if it is in a normalized format
@param mode normalization format (Normalizer.NFC,Normalizer.NFD,
Normalizer.NFKC,Normalizer.NFKD)
@return Return code to specify if the text is normalized or not
(Normalizer.YES, Normalizer.NO or Normalizer.MAYBE)
@d... | [
"Convenience",
"method",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L982-L985 | train | Quick check for a source code. | Of course, here is the Java code you requested:
```java
@Deprecated
public static QuickCheckResult quickCheck(String source, Mode mode) {
return quickCheck(source, mode, 0);
}
```
Hope this helps! |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java | ConstantsSummaryBuilder.build | @Override
public void build() throws DocletException {
if (writer == null) {
//Doclet does not support this output.
return;
}
build(layoutParser.parseXML(ROOT), contentTree);
} | java | @Override
public void build() throws DocletException {
if (writer == null) {
//Doclet does not support this output.
return;
}
build(layoutParser.parseXML(ROOT), contentTree);
} | [
"@",
"Override",
"public",
"void",
"build",
"(",
")",
"throws",
"DocletException",
"{",
"if",
"(",
"writer",
"==",
"null",
")",
"{",
"//Doclet does not support this output.",
"return",
";",
"}",
"build",
"(",
"layoutParser",
".",
"parseXML",
"(",
"ROOT",
")",
... | {@inheritDoc}
@throws DocletException if there is a problem while building the documentation | [
"{"
] | a53d069bbdb2c60232ed3811c19b65e41c3e60e0 | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java#L130-L137 | train | Build the CRASSA language. | Of course, here is the Java code you requested:
```java
@Override
public void build() throws DocletException {
if (writer == null) {
//Doclet does not support this output.
return;
}
build(layoutParser.parseXML(ROOT), contentTree);
}
```
Hope this helps! |
defei/codelogger-utils | src/main/java/org/codelogger/utils/StringUtils.java | StringUtils.endsWithIgnoreCase | public static boolean endsWithIgnoreCase(final String source, final String target) {
if (source.endsWith(target)) {
return true;
}
if (source.length() < target.length()) {
return false;
}
return source.substring(source.length() - target.length()).equalsIgnoreCase(target);
} | java | public static boolean endsWithIgnoreCase(final String source, final String target) {
if (source.endsWith(target)) {
return true;
}
if (source.length() < target.length()) {
return false;
}
return source.substring(source.length() - target.length()).equalsIgnoreCase(target);
} | [
"public",
"static",
"boolean",
"endsWithIgnoreCase",
"(",
"final",
"String",
"source",
",",
"final",
"String",
"target",
")",
"{",
"if",
"(",
"source",
".",
"endsWith",
"(",
"target",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"source",
".",
... | Returns true if given source string end with target string ignore case
sensitive; false otherwise.
@param source string to be tested.
@param target string to be tested.
@return true if given source string end with target string ignore case
sensitive; false otherwise. | [
"Returns",
"true",
"if",
"given",
"source",
"string",
"end",
"with",
"target",
"string",
"ignore",
"case",
"sensitive",
";",
"false",
"otherwise",
"."
] | d906f5d217b783c7ae3e53442cd6fb87b20ecc0a | https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/StringUtils.java#L331-L340 | train | Check if source ends with target ignoring case. | Of course, here is the Java code you requested:
```java
public static boolean endsWithIgnoreCase(final String source, final String target) {
if (source.endsWith(target)) {
return true;
}
if (source.length() < target.length()) {
return false;
}
return source.substring(source.length() - ... |
demidenko05/beigesoft-bcommon | src/main/java/org/beigesoft/persistable/UserRoleTomcat.java | UserRoleTomcat.setItsUser | public final void setItsUser(final UserTomcat pItsUser) {
this.itsUser = pItsUser;
if (this.itsId == null) {
this.itsId = new IdUserRoleTomcat();
}
this.itsId.setItsUser(this.itsUser);
} | java | public final void setItsUser(final UserTomcat pItsUser) {
this.itsUser = pItsUser;
if (this.itsId == null) {
this.itsId = new IdUserRoleTomcat();
}
this.itsId.setItsUser(this.itsUser);
} | [
"public",
"final",
"void",
"setItsUser",
"(",
"final",
"UserTomcat",
"pItsUser",
")",
"{",
"this",
".",
"itsUser",
"=",
"pItsUser",
";",
"if",
"(",
"this",
".",
"itsId",
"==",
"null",
")",
"{",
"this",
".",
"itsId",
"=",
"new",
"IdUserRoleTomcat",
"(",
... | <p>Setter for itsUser.</p>
@param pItsUser reference/value | [
"<p",
">",
"Setter",
"for",
"itsUser",
".",
"<",
"/",
"p",
">"
] | bb446822b4fc9b5a6a8cd3cc98d0b3d83d718daf | https://github.com/demidenko05/beigesoft-bcommon/blob/bb446822b4fc9b5a6a8cd3cc98d0b3d83d718daf/src/main/java/org/beigesoft/persistable/UserRoleTomcat.java#L72-L78 | train | Sets the ItsUser. | Of course, here is the Java code you requested:
```java
public final void setItsUser(final UserTomcat pItsUser) {
this.itsUser = pItsUser;
if (this.itsId == null) {
this.itsId = new IdUserRoleTomcat();
}
this.itsId.setItsUser(this.itsUser);
}
```
Hope this helps! |
iig-uni-freiburg/SEWOL | ext/org/deckfour/xes/util/progress/XMonitoredInputStream.java | XMonitoredInputStream.update | protected void update(long readBytes) throws IOException {
if (progressListener.isAborted()) {
throw new IOException("Reading Cancelled by ProgressListener");
}
this.bytesRead += readBytes;
int step = (int)(bytesRead / stepSize);
if(step > lastStep) {
lastStep = step;
progressListener.updateProgress(... | java | protected void update(long readBytes) throws IOException {
if (progressListener.isAborted()) {
throw new IOException("Reading Cancelled by ProgressListener");
}
this.bytesRead += readBytes;
int step = (int)(bytesRead / stepSize);
if(step > lastStep) {
lastStep = step;
progressListener.updateProgress(... | [
"protected",
"void",
"update",
"(",
"long",
"readBytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"progressListener",
".",
"isAborted",
"(",
")",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Reading Cancelled by ProgressListener\"",
")",
";",
"}",
"this... | This method is called by the actual input stream method
to provide feedback about the number of read bytes.
Notifies the attached progress listener if appropriate.
@param readBytes The number of read bytes in this call. | [
"This",
"method",
"is",
"called",
"by",
"the",
"actual",
"input",
"stream",
"method",
"to",
"provide",
"feedback",
"about",
"the",
"number",
"of",
"read",
"bytes",
"."
] | e791cb07a6e62ecf837d760d58a25f32fbf6bbca | https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/util/progress/XMonitoredInputStream.java#L146-L156 | train | Update the progress. | Of course, here is the Java code you requested:
```java
protected void update(long readBytes) throws IOException {
if (progressListener.isAborted()) {
throw new IOException("Reading Cancelled by ProgressListener");
}
this.bytesRead += readBytes;
int step = (int)(bytesRead / stepSize);
if(step > lastStep) ... |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/ReflectionUtil.java | ReflectionUtil.toJson | public static void toJson(Object object, JsonBuffer output) {
if (object == null) {
return;
}
for (final Method method : object.getClass().getMethods()) {
try {
if (!method.isSynthetic() && !Modifier.isStatic(method.getModifiers()) && method.getParameterCount() == 0
&& (method.getReturnType().isPri... | java | public static void toJson(Object object, JsonBuffer output) {
if (object == null) {
return;
}
for (final Method method : object.getClass().getMethods()) {
try {
if (!method.isSynthetic() && !Modifier.isStatic(method.getModifiers()) && method.getParameterCount() == 0
&& (method.getReturnType().isPri... | [
"public",
"static",
"void",
"toJson",
"(",
"Object",
"object",
",",
"JsonBuffer",
"output",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
";",
"}",
"for",
"(",
"final",
"Method",
"method",
":",
"object",
".",
"getClass",
"(",
")",
... | Replies the string representation of the given object.
<p>The string representation is based on the values replied by the getters (functions
that are starting by "get" or "is" or "has").
@param object the object to analyze.
@param output the Json string representation.
@since 15.0 | [
"Replies",
"the",
"string",
"representation",
"of",
"the",
"given",
"object",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/ReflectionUtil.java#L856-L876 | train | Convert an object to a JSON string. | Of course, here is the Java code you requested:
```java
public static void toJson(Object object, JsonBuffer output) {
if (object == null) {
return;
}
for (final Method method : object.getClass().getMethods()) {
try {
if (!method.isSynthetic() && !Modifier.isStatic(method.getModifiers()) && method.getPa... |
FXMisc/RichTextFX | richtextfx/src/main/java/org/fxmisc/richtext/SelectionImpl.java | SelectionImpl.selectRange | @Override
public void selectRange(int startParagraphIndex, int startColPosition, int endParagraphIndex, int endColPosition) {
selectRange(textPosition(startParagraphIndex, startColPosition), textPosition(endParagraphIndex, endColPosition));
} | java | @Override
public void selectRange(int startParagraphIndex, int startColPosition, int endParagraphIndex, int endColPosition) {
selectRange(textPosition(startParagraphIndex, startColPosition), textPosition(endParagraphIndex, endColPosition));
} | [
"@",
"Override",
"public",
"void",
"selectRange",
"(",
"int",
"startParagraphIndex",
",",
"int",
"startColPosition",
",",
"int",
"endParagraphIndex",
",",
"int",
"endColPosition",
")",
"{",
"selectRange",
"(",
"textPosition",
"(",
"startParagraphIndex",
",",
"startC... | /* ********************************************************************** *
*
Actions *
*
Actions change the state of this control. They typically cause a *
change of one or more observables and/or produce an event. *
*
*******************... | [
"/",
"*",
"**********************************************************************",
"*",
"*",
"Actions",
"*",
"*",
"Actions",
"change",
"the",
"state",
"of",
"this",
"control",
".",
"They",
"typically",
"cause",
"a",
"*",
"change",
"of",
"one",
"or",
"more",
"obse... | bc7cab6a637855e0f37d9b9c12a9172c31545f0b | https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/SelectionImpl.java#L308-L311 | train | Override this method to select the range of tokens in the sequence. | Of course, here is the Java code you requested:
```java
@Override
public void selectRange(int startParagraphIndex, int startColPosition, int endParagraphIndex, int endColPosition) {
selectRange(textPosition(startParagraphIndex, startColPosition), textPosition(endParagraphIndex, endColPosition));
}
```
... |
groupon/odo | proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java | EditService.removeCustomOverride | public void removeCustomOverride(int path_id, String client_uuid) throws Exception {
updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id);
} | java | public void removeCustomOverride(int path_id, String client_uuid) throws Exception {
updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id);
} | [
"public",
"void",
"removeCustomOverride",
"(",
"int",
"path_id",
",",
"String",
"client_uuid",
")",
"throws",
"Exception",
"{",
"updateRequestResponseTables",
"(",
"\"custom_response\"",
",",
"\"\"",
",",
"getProfileIdFromPathID",
"(",
"path_id",
")",
",",
"client_uui... | Remove custom overrides
@param path_id ID of path containing custom override
@param client_uuid UUID of the client
@throws Exception exception | [
"Remove",
"custom",
"overrides"
] | 3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1 | https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java#L320-L322 | train | Remove a custom override for a path | Of course, here is the Java code you requested:
```java
public void removeCustomOverride(int path_id, String client_uuid) throws Exception {
updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id);
}
```
Hope this helps! |
upwork/java-upwork | src/com/Upwork/api/Routers/Activities/Team.java | Team.addActivity | public JSONObject addActivity(String company, String team, HashMap<String, String> params) throws JSONException {
return oClient.post("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks", params);
} | java | public JSONObject addActivity(String company, String team, HashMap<String, String> params) throws JSONException {
return oClient.post("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks", params);
} | [
"public",
"JSONObject",
"addActivity",
"(",
"String",
"company",
",",
"String",
"team",
",",
"HashMap",
"<",
"String",
",",
"String",
">",
"params",
")",
"throws",
"JSONException",
"{",
"return",
"oClient",
".",
"post",
"(",
"\"/otask/v1/tasks/companies/\"",
"+"... | Create an oTask/Activity record within a team
@param company Company ID
@param team Team ID
@param params Parameters
@throws JSONException If error occurred
@return {@link JSONObject} | [
"Create",
"an",
"oTask",
"/",
"Activity",
"record",
"within",
"a",
"team"
] | 342297161503a74e9e0bddbd381ab5eebf4dc454 | https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Activities/Team.java#L97-L99 | train | Add an activity | Of course, here is the Java code you requested:
```java
public JSONObject addActivity(String company, String team, HashMap<String, String> params) throws JSONException {
return oClient.post("/otask/v1/tasks/companies/" + company + "/teams/" + team + "/tasks", params);
}
```
Hope this helps! |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConsumerSessionImpl.java | ConsumerSessionImpl.removeBifurcatedConsumer | protected void removeBifurcatedConsumer(BifurcatedConsumerSessionImpl consumer) throws SIResourceException, SISessionDroppedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBifurcatedConsumer", consumer);
synchronized (_bifurcatedConsum... | java | protected void removeBifurcatedConsumer(BifurcatedConsumerSessionImpl consumer) throws SIResourceException, SISessionDroppedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBifurcatedConsumer", consumer);
synchronized (_bifurcatedConsum... | [
"protected",
"void",
"removeBifurcatedConsumer",
"(",
"BifurcatedConsumerSessionImpl",
"consumer",
")",
"throws",
"SIResourceException",
",",
"SISessionDroppedException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnab... | Removes the bifurcated consumer to the list of associated consumers.
@param consumer
@throws SISessionDroppedException | [
"Removes",
"the",
"bifurcated",
"consumer",
"to",
"the",
"list",
"of",
"associated",
"consumers",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConsumerSessionImpl.java#L379-L394 | train | Remove a bifurcated consumer from the list of bifurcated consumers. | Of course, here is the Java code you requested:
```java
protected void removeBifurcatedConsumer(BifurcatedConsumerSessionImpl consumer) throws SIResourceException, SISessionDroppedException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "removeBifurcatedConsu... |
JM-Lab/utils-java8 | src/main/java/kr/jm/utils/helper/JMPath.java | JMPath.getSubDirectoryPathList | public static List<Path> getSubDirectoryPathList(Path startDirectoryPath,
Predicate<Path> filter) {
return getSubPathList(startDirectoryPath, Integer.MAX_VALUE,
DirectoryAndNotSymbolicLinkFilter.and(filter));
} | java | public static List<Path> getSubDirectoryPathList(Path startDirectoryPath,
Predicate<Path> filter) {
return getSubPathList(startDirectoryPath, Integer.MAX_VALUE,
DirectoryAndNotSymbolicLinkFilter.and(filter));
} | [
"public",
"static",
"List",
"<",
"Path",
">",
"getSubDirectoryPathList",
"(",
"Path",
"startDirectoryPath",
",",
"Predicate",
"<",
"Path",
">",
"filter",
")",
"{",
"return",
"getSubPathList",
"(",
"startDirectoryPath",
",",
"Integer",
".",
"MAX_VALUE",
",",
"Dir... | Gets sub directory path list.
@param startDirectoryPath the start directory path
@param filter the filter
@return the sub directory path list | [
"Gets",
"sub",
"directory",
"path",
"list",
"."
] | 9e407b3f28a7990418a1e877229fa8344f4d78a5 | https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMPath.java#L397-L401 | train | Gets the sub directory path list. | Of course, here is the Java code you requested:
```java
public static List<Path> getSubDirectoryPathList(Path startDirectoryPath,
Predicate<Path> filter) {
return getSubPathList(startDirectoryPath, Integer.MAX_VALUE,
DirectoryAndNotSymbolicLinkFilter.and(filter));
}
```
Hope this helps! |
aws/aws-sdk-java | aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/transform/ContainerDefinitionMarshaller.java | ContainerDefinitionMarshaller.marshall | public void marshall(ContainerDefinition containerDefinition, ProtocolMarshaller protocolMarshaller) {
if (containerDefinition == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(containerDefinition.ge... | java | public void marshall(ContainerDefinition containerDefinition, ProtocolMarshaller protocolMarshaller) {
if (containerDefinition == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(containerDefinition.ge... | [
"public",
"void",
"marshall",
"(",
"ContainerDefinition",
"containerDefinition",
",",
"ProtocolMarshaller",
"protocolMarshaller",
")",
"{",
"if",
"(",
"containerDefinition",
"==",
"null",
")",
"{",
"throw",
"new",
"SdkClientException",
"(",
"\"Invalid argument passed to m... | Marshall the given parameter object. | [
"Marshall",
"the",
"given",
"parameter",
"object",
"."
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/transform/ContainerDefinitionMarshaller.java#L52-L67 | train | marshalls the given containerDefinition to the JSON object. | Of course, here is the Java code you requested:
```java
public void marshall(ContainerDefinition containerDefinition, ProtocolMarshaller protocolMarshaller) {
if (containerDefinition == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... |
aws/aws-sdk-java | aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/ActionExecutionOutput.java | ActionExecutionOutput.setOutputArtifacts | public void setOutputArtifacts(java.util.Collection<ArtifactDetail> outputArtifacts) {
if (outputArtifacts == null) {
this.outputArtifacts = null;
return;
}
this.outputArtifacts = new java.util.ArrayList<ArtifactDetail>(outputArtifacts);
} | java | public void setOutputArtifacts(java.util.Collection<ArtifactDetail> outputArtifacts) {
if (outputArtifacts == null) {
this.outputArtifacts = null;
return;
}
this.outputArtifacts = new java.util.ArrayList<ArtifactDetail>(outputArtifacts);
} | [
"public",
"void",
"setOutputArtifacts",
"(",
"java",
".",
"util",
".",
"Collection",
"<",
"ArtifactDetail",
">",
"outputArtifacts",
")",
"{",
"if",
"(",
"outputArtifacts",
"==",
"null",
")",
"{",
"this",
".",
"outputArtifacts",
"=",
"null",
";",
"return",
";... | <p>
Details of output artifacts of the action that correspond to the action execution.
</p>
@param outputArtifacts
Details of output artifacts of the action that correspond to the action execution. | [
"<p",
">",
"Details",
"of",
"output",
"artifacts",
"of",
"the",
"action",
"that",
"correspond",
"to",
"the",
"action",
"execution",
".",
"<",
"/",
"p",
">"
] | aa38502458969b2d13a1c3665a56aba600e4dbd0 | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/ActionExecutionOutput.java#L65-L72 | train | Sets the value outputArtifacts property. | Of course, here is the Java code you requested:
```java
public void setOutputArtifacts(java.util.Collection<ArtifactDetail> outputArtifacts) {
if (outputArtifacts == null) {
this.outputArtifacts = null;
return;
}
this.outputArtifacts = new java.util.ArrayList<ArtifactDe... |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.updateCompositeEntityRoleAsync | public ServiceFuture<OperationStatus> updateCompositeEntityRoleAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter, final ServiceCallback<OperationStatus> serviceCallback) {
return ServiceFuture.fromResponse(updat... | java | public ServiceFuture<OperationStatus> updateCompositeEntityRoleAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter, final ServiceCallback<OperationStatus> serviceCallback) {
return ServiceFuture.fromResponse(updat... | [
"public",
"ServiceFuture",
"<",
"OperationStatus",
">",
"updateCompositeEntityRoleAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"cEntityId",
",",
"UUID",
"roleId",
",",
"UpdateCompositeEntityRoleOptionalParameter",
"updateCompositeEntityRoleOptionalPa... | Update an entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param cEntityId The composite entity extractor ID.
@param roleId The entity role ID.
@param updateCompositeEntityRoleOptionalParameter the object representing the optional parameters to be set before calling th... | [
"Update",
"an",
"entity",
"role",
"for",
"a",
"given",
"entity",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L12470-L12472 | train | Updates an entity role. | Of course, here is the Java code you requested:
```java
public ServiceFuture<OperationStatus> updateCompositeEntityRoleAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter, final ServiceCallback<OperationStatus> serviceCa... |
Quickhull3d/quickhull3d | src/main/java/com/github/quickhull3d/VertexList.java | VertexList.delete | public void delete(Vertex vtx) {
if (vtx.prev == null) {
head = vtx.next;
} else {
vtx.prev.next = vtx.next;
}
if (vtx.next == null) {
tail = vtx.prev;
} else {
vtx.next.prev = vtx.prev;
}
} | java | public void delete(Vertex vtx) {
if (vtx.prev == null) {
head = vtx.next;
} else {
vtx.prev.next = vtx.next;
}
if (vtx.next == null) {
tail = vtx.prev;
} else {
vtx.next.prev = vtx.prev;
}
} | [
"public",
"void",
"delete",
"(",
"Vertex",
"vtx",
")",
"{",
"if",
"(",
"vtx",
".",
"prev",
"==",
"null",
")",
"{",
"head",
"=",
"vtx",
".",
"next",
";",
"}",
"else",
"{",
"vtx",
".",
"prev",
".",
"next",
"=",
"vtx",
".",
"next",
";",
"}",
"if... | Deletes a vertex from this list. | [
"Deletes",
"a",
"vertex",
"from",
"this",
"list",
"."
] | 3f80953b86c46385e84730e5d2a1745cbfa12703 | https://github.com/Quickhull3d/quickhull3d/blob/3f80953b86c46385e84730e5d2a1745cbfa12703/src/main/java/com/github/quickhull3d/VertexList.java#L81-L92 | train | Delete a single entry from the set. | Of course, here is the Java code you requested:
```java
public void delete(Vertex vtx) {
if (vtx.prev == null) {
head = vtx.next;
} else {
vtx.prev.next = vtx.next;
}
if (vtx.next == null) {
tail = vtx.prev;
} else {
vtx.next.prev ... |
Unidata/thredds | ui/src/main/java/ucar/util/prefs/ui/BeanTable.java | BeanTable.getSelectedCells | public ArrayList<Object> getSelectedCells() {
ArrayList<Object> list = new ArrayList<>();
int[] viewRowIndices = jtable.getSelectedRows();
int[] viewColumnIndices = jtable.getSelectedColumns();
for (int i = 0; i < viewRowIndices.length; i++)
for (int j = 0; i < viewColumnIndices.length; j++) {
... | java | public ArrayList<Object> getSelectedCells() {
ArrayList<Object> list = new ArrayList<>();
int[] viewRowIndices = jtable.getSelectedRows();
int[] viewColumnIndices = jtable.getSelectedColumns();
for (int i = 0; i < viewRowIndices.length; i++)
for (int j = 0; i < viewColumnIndices.length; j++) {
... | [
"public",
"ArrayList",
"<",
"Object",
">",
"getSelectedCells",
"(",
")",
"{",
"ArrayList",
"<",
"Object",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"int",
"[",
"]",
"viewRowIndices",
"=",
"jtable",
".",
"getSelectedRows",
"(",
")",
";",
... | Get the currently selected cells.
Use this for multiple row selection, when columnSelection is on
@return ArrayList of currently selected cells (wont be null).
@see BeanTable#setSelectionMode(int). | [
"Get",
"the",
"currently",
"selected",
"cells",
".",
"Use",
"this",
"for",
"multiple",
"row",
"selection",
"when",
"columnSelection",
"is",
"on"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/util/prefs/ui/BeanTable.java#L297-L309 | test | Get the selected cells in the table. | Of course, here is the Java code you requested:
```java
public ArrayList<Object> getSelectedCells() {
ArrayList<Object> list = new ArrayList<>();
int[] viewRowIndices = jtable.getSelectedRows();
int[] viewColumnIndices = jtable.getSelectedColumns();
for (int i = 0; i < viewRowIndices.length; i++)
... |
cdk/cdk | base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSetManipulator.java | ReactionSetManipulator.getAllMolecules | public static IAtomContainerSet getAllMolecules(IReactionSet set) {
IAtomContainerSet moleculeSet = set.getBuilder().newInstance(IAtomContainerSet.class);
for (IReaction reaction : set.reactions()) {
IAtomContainerSet molecules = ReactionManipulator.getAllMolecules(reaction);
for... | java | public static IAtomContainerSet getAllMolecules(IReactionSet set) {
IAtomContainerSet moleculeSet = set.getBuilder().newInstance(IAtomContainerSet.class);
for (IReaction reaction : set.reactions()) {
IAtomContainerSet molecules = ReactionManipulator.getAllMolecules(reaction);
for... | [
"public",
"static",
"IAtomContainerSet",
"getAllMolecules",
"(",
"IReactionSet",
"set",
")",
"{",
"IAtomContainerSet",
"moleculeSet",
"=",
"set",
".",
"getBuilder",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainerSet",
".",
"class",
")",
";",
"for",
"(",
"IRea... | get all Molecules object from a set of Reactions.
@param set The set of reaction to inspect
@return The IAtomContanerSet | [
"get",
"all",
"Molecules",
"object",
"from",
"a",
"set",
"of",
"Reactions",
"."
] | c3d0f16502bf08df50365fee392e11d7c9856657 | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSetManipulator.java#L79-L96 | train | Get all Molecules from a reaction set. | Of course, here is the Java code you requested:
```java
public static IAtomContainerSet getAllMolecules(IReactionSet set) {
IAtomContainerSet moleculeSet = set.getBuilder().newInstance(IAtomContainerSet.class);
for (IReaction reaction : set.reactions()) {
IAtomContainerSet molecules = React... |
phax/ph-oton | ph-oton-security/src/main/java/com/helger/photon/security/login/LoggedInUserStorage.java | LoggedInUserStorage.setBaseDirectory | public static void setBaseDirectory (@Nonnull final String sBaseDirectory)
{
ValueEnforcer.notNull (sBaseDirectory, "BaseDirectory");
s_aRWLock.writeLocked ( () -> {
s_sBaseDirectory = sBaseDirectory;
});
} | java | public static void setBaseDirectory (@Nonnull final String sBaseDirectory)
{
ValueEnforcer.notNull (sBaseDirectory, "BaseDirectory");
s_aRWLock.writeLocked ( () -> {
s_sBaseDirectory = sBaseDirectory;
});
} | [
"public",
"static",
"void",
"setBaseDirectory",
"(",
"@",
"Nonnull",
"final",
"String",
"sBaseDirectory",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"sBaseDirectory",
",",
"\"BaseDirectory\"",
")",
";",
"s_aRWLock",
".",
"writeLocked",
"(",
"(",
")",
"->",
... | Set the base directory to be used.
@param sBaseDirectory
The new base directory. May not be <code>null</code> but maybe
empty. | [
"Set",
"the",
"base",
"directory",
"to",
"be",
"used",
"."
] | f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/login/LoggedInUserStorage.java#L76-L83 | train | Set the base directory. | Of course, here is the Java code you requested:
```java
public static void setBaseDirectory (@Nonnull final String sBaseDirectory)
{
ValueEnforcer.notNull (sBaseDirectory, "BaseDirectory");
s_aRWLock.writeLocked ( () -> {
s_sBaseDirectory = sBaseDirectory;
});
}
```
Hope this helps! |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java | ExceptionDestinationHandlerImpl.handleUndeliverableMessage | public UndeliverableReturnCode handleUndeliverableMessage(
SIMPMessage message,
TransactionCommon tran,
int exceptionReason,
... | java | public UndeliverableReturnCode handleUndeliverableMessage(
SIMPMessage message,
TransactionCommon tran,
int exceptionReason,
... | [
"public",
"UndeliverableReturnCode",
"handleUndeliverableMessage",
"(",
"SIMPMessage",
"message",
",",
"TransactionCommon",
"tran",
",",
"int",
"exceptionReason",
",",
"String",
"[",
"]",
"exceptionStrings",
")",
"{",
"// F001333-14610",
"// Delegate down onto the new method ... | This method contains the routine used to handle an undeliverable message. The
method examines the attributes of a message to determine what to do with it.
It is possible for a message to be discarded, blocked, or sent to an exception
destination.
@param msg - The undeliverable message
@param tran - The transaction th... | [
"This",
"method",
"contains",
"the",
"routine",
"used",
"to",
"handle",
"an",
"undeliverable",
"message",
".",
"The",
"method",
"examines",
"the",
"attributes",
"of",
"a",
"message",
"to",
"determine",
"what",
"to",
"do",
"with",
"it",
"."
] | ca725d9903e63645018f9fa8cbda25f60af83a5d | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java#L371-L381 | train | This method is called by the generated code to handle an unclaimable message. | Of course, here is the Java code you requested:
```java
public UndeliverableReturnCode handleUndeliverableMessage(
SIMPMessage message,
TransactionCommon tran,
... |
eclipse/xtext-lib | org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java | MapExtensions.operator_plus | @Pure
@Inline(value = "$3.union($1, $2)", imported = MapExtensions.class)
public static <K, V> Map<K, V> operator_plus(Map<K, V> left, Map<? extends K, ? extends V> right) {
return union(left, right);
} | java | @Pure
@Inline(value = "$3.union($1, $2)", imported = MapExtensions.class)
public static <K, V> Map<K, V> operator_plus(Map<K, V> left, Map<? extends K, ? extends V> right) {
return union(left, right);
} | [
"@",
"Pure",
"@",
"Inline",
"(",
"value",
"=",
"\"$3.union($1, $2)\"",
",",
"imported",
"=",
"MapExtensions",
".",
"class",
")",
"public",
"static",
"<",
"K",
",",
"V",
">",
"Map",
"<",
"K",
",",
"V",
">",
"operator_plus",
"(",
"Map",
"<",
"K",
",",
... | Merge the two maps.
<p>
The replied map is a view on the given map. It means that any change
in the original map is reflected to the result of this operation.
</p>
<p>
If a key exists in the left and right operands, the value in the right operand is preferred.
</p>
@param <K> type of the map keys.
@param <V> type of... | [
"Merge",
"the",
"two",
"maps",
"."
] | 7063572e1f1bd713a3aa53bdf3a8dc60e25c169a | https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java#L189-L193 | train | Add two maps. | Of course, here is the Java code you requested:
```java
@Pure
@Inline(value = "$3.union($1, $2)", imported = MapExtensions.class)
public static <K, V> Map<K, V> operator_plus(Map<K, V> left, Map<? extends K, ? extends V> right) {
return union(left, right);
}
```
Hope this helps! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.