repo stringclasses 199
values | path stringlengths 28 169 | func_name stringlengths 6 98 | original_string stringlengths 91 27.2k | language stringclasses 1
value | code stringlengths 91 27.2k | code_tokens listlengths 21 5.01k | docstring stringlengths 1 6.47k | docstring_tokens listlengths 1 587 | sha stringclasses 199
values | url stringlengths 117 257 | partition stringclasses 1
value | summary stringlengths 3 207 | output stringlengths 170 27.3k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tiefaces/TieFaces | src/org/tiefaces/components/websheet/service/WebSheetLoader.java | WebSheetLoader.fillToMaxColumns | private void fillToMaxColumns(final List<HeaderCell> headercells) {
if (headercells.size() < parent.getMaxColCounts()) {
int fills = parent.getMaxColCounts() - headercells.size();
for (int s = 0; s < fills; s++) {
headercells.add(new HeaderCell("1", "1", "", "", "", false, false));
}
}
} | java | private void fillToMaxColumns(final List<HeaderCell> headercells) {
if (headercells.size() < parent.getMaxColCounts()) {
int fills = parent.getMaxColCounts() - headercells.size();
for (int s = 0; s < fills; s++) {
headercells.add(new HeaderCell("1", "1", "", "", "", false, false));
}
}
} | [
"private",
"void",
"fillToMaxColumns",
"(",
"final",
"List",
"<",
"HeaderCell",
">",
"headercells",
")",
"{",
"if",
"(",
"headercells",
".",
"size",
"(",
")",
"<",
"parent",
".",
"getMaxColCounts",
"(",
")",
")",
"{",
"int",
"fills",
"=",
"parent",
".",
... | Fill to max columns.
@param headercells
the headercells | [
"Fill",
"to",
"max",
"columns",
"."
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/service/WebSheetLoader.java#L169-L176 | test | Fill the headercells list with the max column counts. | Of course, here is the Java code you requested:
```java
private void fillToMaxColumns(final List<HeaderCell> headercells) {
if (headercells.size() < parent.getMaxColCounts()) {
int fills = parent.getMaxColCounts() - headercells.size();
for (int s = 0; s < fills; s++) {
headercells.add(new HeaderCell("1... |
Unidata/thredds | ui/src/main/java/ucar/nc2/ui/gis/shapefile/Swap.java | Swap.swapLong | static public long swapLong(byte[] b, int offset) {
// 8 bytes
long accum = 0;
long shiftedval;
for (int shiftBy = 0, i = offset; shiftBy < 64; shiftBy += 8, i++) {
shiftedval = ((long) (b[i] & 0xff)) << shiftBy;
accum |= shiftedval;
}
return accum;
} | java | static public long swapLong(byte[] b, int offset) {
// 8 bytes
long accum = 0;
long shiftedval;
for (int shiftBy = 0, i = offset; shiftBy < 64; shiftBy += 8, i++) {
shiftedval = ((long) (b[i] & 0xff)) << shiftBy;
accum |= shiftedval;
}
return accum;
} | [
"static",
"public",
"long",
"swapLong",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"offset",
")",
"{",
"// 8 bytes",
"long",
"accum",
"=",
"0",
";",
"long",
"shiftedval",
";",
"for",
"(",
"int",
"shiftBy",
"=",
"0",
",",
"i",
"=",
"offset",
";",
"shif... | Returns the long resulting from reversing 8 bytes at a specified
offset in a byte array.
@param b the byte array
@param offset the offset of the first byte
@return the long represented by the bytes
<code>b[offset+7], b[offset+6], ..., b[offset]</code> | [
"Returns",
"the",
"long",
"resulting",
"from",
"reversing",
"8",
"bytes",
"at",
"a",
"specified",
"offset",
"in",
"a",
"byte",
"array",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/gis/shapefile/Swap.java#L59-L68 | test | Swaps the long value of a byte array at a specific offset. | Of course, here is the Java code you requested:
```java
static public long swapLong(byte[] b, int offset) {
// 8 bytes
long accum = 0;
long shiftedval;
for (int shiftBy = 0, i = offset; shiftBy < 64; shiftBy += 8, i++) {
shiftedval = ((long) (b[i] & 0xff)) << shiftBy;
accum |= shiftedval;
... |
kocakosm/pitaya | src/org/kocakosm/pitaya/util/Strings.java | Strings.stripRight | public static String stripRight(String str, int n)
{
Parameters.checkCondition(n >= 0);
int end = Math.max(0, str.length() - n);
return str.substring(0, end);
} | java | public static String stripRight(String str, int n)
{
Parameters.checkCondition(n >= 0);
int end = Math.max(0, str.length() - n);
return str.substring(0, end);
} | [
"public",
"static",
"String",
"stripRight",
"(",
"String",
"str",
",",
"int",
"n",
")",
"{",
"Parameters",
".",
"checkCondition",
"(",
"n",
">=",
"0",
")",
";",
"int",
"end",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"str",
".",
"length",
"(",
")",
... | Returns the new {@code String} obtained by stripping the last
{@code n} characters from the given one.
@param str the {@code String} to be stripped.
@param n the number of characters to strip.
@return the stripped {@code String}.
@throws NullPointerException if {@code str} is {@code null}.
@throws IllegalArgumentExc... | [
"Returns",
"the",
"new",
"{",
"@code",
"String",
"}",
"obtained",
"by",
"stripping",
"the",
"last",
"{",
"@code",
"n",
"}",
"characters",
"from",
"the",
"given",
"one",
"."
] | f2b203b6cdb32723bd1249a1325a3bb5918bf99a | https://github.com/kocakosm/pitaya/blob/f2b203b6cdb32723bd1249a1325a3bb5918bf99a/src/org/kocakosm/pitaya/util/Strings.java#L413-L418 | test | Strips the right n characters from the end of the string. | Of course, here is the Java code you requested:
```java
public static String stripRight(String str, int n)
{
Parameters.checkCondition(n >= 0);
int end = Math.max(0, str.length() - n);
return str.substring(0, end);
}
```
Hope this helps! |
jboss/jboss-common-core | src/main/java/org/jboss/util/xml/catalog/Resolver.java | Resolver.resolvePublic | public String resolvePublic(String publicId, String systemId)
throws MalformedURLException, IOException {
String resolved = super.resolvePublic(publicId, systemId);
if (resolved != null) {
return resolved;
}
Enumeration enumt = catalogEntries.elements();
while (enumt.hasMoreElements()) ... | java | public String resolvePublic(String publicId, String systemId)
throws MalformedURLException, IOException {
String resolved = super.resolvePublic(publicId, systemId);
if (resolved != null) {
return resolved;
}
Enumeration enumt = catalogEntries.elements();
while (enumt.hasMoreElements()) ... | [
"public",
"String",
"resolvePublic",
"(",
"String",
"publicId",
",",
"String",
"systemId",
")",
"throws",
"MalformedURLException",
",",
"IOException",
"{",
"String",
"resolved",
"=",
"super",
".",
"resolvePublic",
"(",
"publicId",
",",
"systemId",
")",
";",
"if"... | Return the applicable PUBLIC or SYSTEM identifier, resorting
to external resolvers if necessary.
<p>This method searches the Catalog and returns the system
identifier specified for the given system or
public identifiers. If
no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
null is returned.</p>
<p>Note t... | [
"Return",
"the",
"applicable",
"PUBLIC",
"or",
"SYSTEM",
"identifier",
"resorting",
"to",
"external",
"resolvers",
"if",
"necessary",
"."
] | c191bb18db83fa106c6913cf34ed47989b65dc97 | https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/xml/catalog/Resolver.java#L280-L310 | test | Resolves the public catalog entry. | Of course, here is the Java code you requested:
```java
public String resolvePublic(String publicId, String systemId)
throws MalformedURLException, IOException {
String resolved = super.resolvePublic(publicId, systemId);
if (resolved != null) {
return resolved;
}
Enumeration enumt = catalo... |
fabric8io/fabric8-maven-plugin | enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java | DefaultServiceEnricher.toArray | private Service[] toArray(List<Service> services) {
if (services == null) {
return new Service[0];
}
if (services instanceof ArrayList) {
return ((ArrayList<Service>) services).toArray(new Service[services.size()]);
} else {
Service[] ret = new Service... | java | private Service[] toArray(List<Service> services) {
if (services == null) {
return new Service[0];
}
if (services instanceof ArrayList) {
return ((ArrayList<Service>) services).toArray(new Service[services.size()]);
} else {
Service[] ret = new Service... | [
"private",
"Service",
"[",
"]",
"toArray",
"(",
"List",
"<",
"Service",
">",
"services",
")",
"{",
"if",
"(",
"services",
"==",
"null",
")",
"{",
"return",
"new",
"Service",
"[",
"0",
"]",
";",
"}",
"if",
"(",
"services",
"instanceof",
"ArrayList",
"... | convert list to array, never returns null. | [
"convert",
"list",
"to",
"array",
"never",
"returns",
"null",
"."
] | b0e7ad860a5bbe4ab71be3d0613862a1f14a8be3 | https://github.com/fabric8io/fabric8-maven-plugin/blob/b0e7ad860a5bbe4ab71be3d0613862a1f14a8be3/enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultServiceEnricher.java#L129-L142 | test | This method returns a Service array from a list of Service. | Of course, here is the Java code you requested:
```java
private Service[] toArray(List<Service> services) {
if (services == null) {
return new Service[0];
}
if (services instanceof ArrayList) {
return ((ArrayList<Service>) services).toArray(new Service[services.size()]);... |
spring-projects/spring-security | ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java | LdapUserDetailsManager.changePassword | public void changePassword(final String oldPassword, final String newPassword) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
Assert.notNull(
authentication,
"No authentication object found in security context. Can't change current user's password!");
Strin... | java | public void changePassword(final String oldPassword, final String newPassword) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
Assert.notNull(
authentication,
"No authentication object found in security context. Can't change current user's password!");
Strin... | [
"public",
"void",
"changePassword",
"(",
"final",
"String",
"oldPassword",
",",
"final",
"String",
"newPassword",
")",
"{",
"Authentication",
"authentication",
"=",
"SecurityContextHolder",
".",
"getContext",
"(",
")",
".",
"getAuthentication",
"(",
")",
";",
"Ass... | Changes the password for the current user. The username is obtained from the
security context.
There are two supported strategies for modifying the user's password depending on
the capabilities of the corresponding LDAP server.
<p>
Configured one way, this method will modify the user's password via the
<a target="_bl... | [
"Changes",
"the",
"password",
"for",
"the",
"current",
"user",
".",
"The",
"username",
"is",
"obtained",
"from",
"the",
"security",
"context",
"."
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsManager.java#L190-L208 | test | Change password. | Of course, here is the Java code you requested:
```java
public void changePassword(final String oldPassword, final String newPassword) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
Assert.notNull(
authentication,
"No authentication object found in security c... |
subchen/jetbrick-all-1x | jetbrick-orm/src/main/java/jetbrick/dao/dialect/SqlDialect.java | SqlDialect.supportsColumnScale | public boolean supportsColumnScale(String type) {
Set<String> columnSet = new HashSet<String>();
columnSet.add("number");
columnSet.add("numeric");
columnSet.add("dec");
columnSet.add("decimal");
return columnSet.contains(type.toLowerCase());
} | java | public boolean supportsColumnScale(String type) {
Set<String> columnSet = new HashSet<String>();
columnSet.add("number");
columnSet.add("numeric");
columnSet.add("dec");
columnSet.add("decimal");
return columnSet.contains(type.toLowerCase());
} | [
"public",
"boolean",
"supportsColumnScale",
"(",
"String",
"type",
")",
"{",
"Set",
"<",
"String",
">",
"columnSet",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"columnSet",
".",
"add",
"(",
"\"number\"",
")",
";",
"columnSet",
".",
"add",
... | 哪些数据库字段运行指定精度.
@param type 具体的数据库字段类型 | [
"哪些数据库字段运行指定精度",
"."
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-orm/src/main/java/jetbrick/dao/dialect/SqlDialect.java#L112-L119 | test | Checks if the type is a column scale. | Of course, here is the Java code you requested:
```java
public boolean supportsColumnScale(String type) {
Set<String> columnSet = new HashSet<String>();
columnSet.add("number");
columnSet.add("numeric");
columnSet.add("dec");
columnSet.add("decimal");
return columnSet.co... |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/runtime/TldScanner.java | TldScanner.scanJars | private void scanJars() throws Exception {
ClassLoader webappLoader =
Thread.currentThread().getContextClassLoader();
ClassLoader loader = webappLoader;
Map<URI, List<String>> tldMap;
if (scanListeners) {
tldMap = getTldListenerMap();
} else {
... | java | private void scanJars() throws Exception {
ClassLoader webappLoader =
Thread.currentThread().getContextClassLoader();
ClassLoader loader = webappLoader;
Map<URI, List<String>> tldMap;
if (scanListeners) {
tldMap = getTldListenerMap();
} else {
... | [
"private",
"void",
"scanJars",
"(",
")",
"throws",
"Exception",
"{",
"ClassLoader",
"webappLoader",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
";",
"ClassLoader",
"loader",
"=",
"webappLoader",
";",
"Map",
"<",
"URI"... | /*
Scans all JARs accessible to the webapp's classloader and its
parent classloaders for TLDs.
The list of JARs always includes the JARs under WEB-INF/lib, as well as
all shared JARs in the classloader delegation chain of the webapp's
classloader.
Considering JARs in the classloader delegation chain constitutes a
Tom... | [
"/",
"*",
"Scans",
"all",
"JARs",
"accessible",
"to",
"the",
"webapp",
"s",
"classloader",
"and",
"its",
"parent",
"classloaders",
"for",
"TLDs",
"."
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/runtime/TldScanner.java#L651-L740 | test | Scan jars. | Of course, here is the Java code you requested:
```java
private void scanJars() throws Exception {
ClassLoader webappLoader =
Thread.currentThread().getContextClassLoader();
ClassLoader loader = webappLoader;
Map<URI, List<String>> tldMap;
if (scanListeners) {
... |
spring-projects/spring-security | acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java | AclAuthorizationStrategyImpl.securityCheck | public void securityCheck(Acl acl, int changeType) {
if ((SecurityContextHolder.getContext() == null)
|| (SecurityContextHolder.getContext().getAuthentication() == null)
|| !SecurityContextHolder.getContext().getAuthentication()
.isAuthenticated()) {
throw new AccessDeniedException(
"Authenticat... | java | public void securityCheck(Acl acl, int changeType) {
if ((SecurityContextHolder.getContext() == null)
|| (SecurityContextHolder.getContext().getAuthentication() == null)
|| !SecurityContextHolder.getContext().getAuthentication()
.isAuthenticated()) {
throw new AccessDeniedException(
"Authenticat... | [
"public",
"void",
"securityCheck",
"(",
"Acl",
"acl",
",",
"int",
"changeType",
")",
"{",
"if",
"(",
"(",
"SecurityContextHolder",
".",
"getContext",
"(",
")",
"==",
"null",
")",
"||",
"(",
"SecurityContextHolder",
".",
"getContext",
"(",
")",
".",
"getAut... | ======================================================================================================== | [
"========================================================================================================"
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/acl/src/main/java/org/springframework/security/acls/domain/AclAuthorizationStrategyImpl.java#L86-L137 | test | Security check method. | Of course, here is the Java code you requested:
```java
public void securityCheck(Acl acl, int changeType) {
if ((SecurityContextHolder.getContext() == null)
|| (SecurityContextHolder.getContext().getAuthentication() == null)
|| !SecurityContextHolder.getContext().getAuthentication()
.isAuthenticated()... |
rest-assured/rest-assured | rest-assured/src/main/java/io/restassured/RestAssured.java | RestAssured.proxy | public static void proxy(URI uri) {
if (uri == null) {
throw new IllegalArgumentException("Proxy URI cannot be null");
}
proxy(new ProxySpecification(uri.getHost(), uri.getPort(), uri.getScheme()));
} | java | public static void proxy(URI uri) {
if (uri == null) {
throw new IllegalArgumentException("Proxy URI cannot be null");
}
proxy(new ProxySpecification(uri.getHost(), uri.getPort(), uri.getScheme()));
} | [
"public",
"static",
"void",
"proxy",
"(",
"URI",
"uri",
")",
"{",
"if",
"(",
"uri",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Proxy URI cannot be null\"",
")",
";",
"}",
"proxy",
"(",
"new",
"ProxySpecification",
"(",
"uri",... | Instruct REST Assured to connect to a proxy using a URI.
@param uri The URI of the proxy | [
"Instruct",
"REST",
"Assured",
"to",
"connect",
"to",
"a",
"proxy",
"using",
"a",
"URI",
"."
] | 165a85b65070f5a07fe0045175613fb2c2811642 | https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/RestAssured.java#L1759-L1764 | test | Sets a proxy to the given URI. | Of course, here is the Java code you requested:
```java
public static void proxy(URI uri) {
if (uri == null) {
throw new IllegalArgumentException("Proxy URI cannot be null");
}
proxy(new ProxySpecification(uri.getHost(), uri.getPort(), uri.getScheme()));
}
```
Hope this helps! |
jboss/jboss-common-core | src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java | CatalogEntry.addEntryType | public static int addEntryType(String name, int numArgs) {
entryTypes.put(name, new Integer(nextEntry));
entryArgs.add(nextEntry, new Integer(numArgs));
nextEntry++;
return nextEntry-1;
} | java | public static int addEntryType(String name, int numArgs) {
entryTypes.put(name, new Integer(nextEntry));
entryArgs.add(nextEntry, new Integer(numArgs));
nextEntry++;
return nextEntry-1;
} | [
"public",
"static",
"int",
"addEntryType",
"(",
"String",
"name",
",",
"int",
"numArgs",
")",
"{",
"entryTypes",
".",
"put",
"(",
"name",
",",
"new",
"Integer",
"(",
"nextEntry",
")",
")",
";",
"entryArgs",
".",
"add",
"(",
"nextEntry",
",",
"new",
"In... | Adds a new catalog entry type.
@param name The name of the catalog entry type. This must be
unique among all types and is case-sensitive. (Adding a duplicate
name effectively replaces the old type with the new type.)
@param numArgs The number of arguments that this entry type
is required to have. There is no provision... | [
"Adds",
"a",
"new",
"catalog",
"entry",
"type",
"."
] | c191bb18db83fa106c6913cf34ed47989b65dc97 | https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/xml/catalog/CatalogEntry.java#L79-L85 | test | Add an entry type to the sequence. | Of course, here is the Java code you requested:
```java
public static int addEntryType(String name, int numArgs) {
entryTypes.put(name, new Integer(nextEntry));
entryArgs.add(nextEntry, new Integer(numArgs));
nextEntry++;
return nextEntry-1;
}
```
Hope this helps! |
GojaFramework/goja | goja-core/src/main/java/goja/core/libs/IO.java | IO.copyDirectory | public static void copyDirectory(File source, File target) {
if (source.isDirectory()) {
if (!target.exists()) {
target.mkdir();
}
for (String child : source.list()) {
copyDirectory(new File(source, child), new File(target, child));
... | java | public static void copyDirectory(File source, File target) {
if (source.isDirectory()) {
if (!target.exists()) {
target.mkdir();
}
for (String child : source.list()) {
copyDirectory(new File(source, child), new File(target, child));
... | [
"public",
"static",
"void",
"copyDirectory",
"(",
"File",
"source",
",",
"File",
"target",
")",
"{",
"if",
"(",
"source",
".",
"isDirectory",
"(",
")",
")",
"{",
"if",
"(",
"!",
"target",
".",
"exists",
"(",
")",
")",
"{",
"target",
".",
"mkdir",
"... | If targetLocation does not exist, it will be created. | [
"If",
"targetLocation",
"does",
"not",
"exist",
"it",
"will",
"be",
"created",
"."
] | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/libs/IO.java#L365-L380 | test | Copy directory. | Of course, here is the Java code you requested:
```java
public static void copyDirectory(File source, File target) {
if (source.isDirectory()) {
if (!target.exists()) {
target.mkdir();
}
for (String child : source.list()) {
copyDirectory(new F... |
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.using | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T, D> Observable<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends ObservableSource<? extends T>> sourceSupplier, Consumer<? super D> disposer, boolean eager) {
ObjectHelper.requireNonNull(resourceSupp... | java | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T, D> Observable<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends ObservableSource<? extends T>> sourceSupplier, Consumer<? super D> disposer, boolean eager) {
ObjectHelper.requireNonNull(resourceSupp... | [
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"static",
"<",
"T",
",",
"D",
">",
"Observable",
"<",
"T",
">",
"using",
"(",
"Callable",
"<",
"?",
"extends",
"D",
">",
"resourceSupplier",
",",
"Functi... | Constructs an ObservableSource that creates a dependent resource object which is disposed of just before
termination if you have set {@code disposeEagerly} to {@code true} and a dispose() call does not occur
before termination. Otherwise resource disposal will occur on a dispose() call. Eager disposal is
particularly ... | [
"Constructs",
"an",
"ObservableSource",
"that",
"creates",
"a",
"dependent",
"resource",
"object",
"which",
"is",
"disposed",
"of",
"just",
"before",
"termination",
"if",
"you",
"have",
"set",
"{",
"@code",
"disposeEagerly",
"}",
"to",
"{",
"@code",
"true",
"}... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L4060-L4067 | test | Creates an observable using the specified resource supplier and source supplier and disposer. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T, D> Observable<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends ObservableSource<? extends T>> sourceSupplier, Consumer<? super D> disposer, boolean ... |
WASdev/ci.common | src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java | InstallFeatureUtil.getServerFeatures | public Set<String> getServerFeatures(File serverDirectory) {
Set<String> result = getConfigDropinsFeatures(null, serverDirectory, "defaults");
result = getServerXmlFeatures(result, new File(serverDirectory, "server.xml"), null);
// add the overrides at the end since they should not be replaced b... | java | public Set<String> getServerFeatures(File serverDirectory) {
Set<String> result = getConfigDropinsFeatures(null, serverDirectory, "defaults");
result = getServerXmlFeatures(result, new File(serverDirectory, "server.xml"), null);
// add the overrides at the end since they should not be replaced b... | [
"public",
"Set",
"<",
"String",
">",
"getServerFeatures",
"(",
"File",
"serverDirectory",
")",
"{",
"Set",
"<",
"String",
">",
"result",
"=",
"getConfigDropinsFeatures",
"(",
"null",
",",
"serverDirectory",
",",
"\"defaults\"",
")",
";",
"result",
"=",
"getSer... | Get the set of features defined in the server.xml
@param serverDirectory The server directory containing the server.xml
@return the set of features that should be installed from server.xml, or empty set if nothing should be installed | [
"Get",
"the",
"set",
"of",
"features",
"defined",
"in",
"the",
"server",
".",
"xml"
] | 24fc917383e9ff60ea6a42972c86577fe0f4591e | https://github.com/WASdev/ci.common/blob/24fc917383e9ff60ea6a42972c86577fe0f4591e/src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java#L198-L203 | test | Get the features from the server. xml file. | Of course, here is the Java code you requested:
```java
public Set<String> getServerFeatures(File serverDirectory) {
Set<String> result = getConfigDropinsFeatures(null, serverDirectory, "defaults");
result = getServerXmlFeatures(result, new File(serverDirectory, "server.xml"), null);
// add the... |
oaqa/baseqa | src/main/java/edu/cmu/lti/oaqa/type/retrieval/Passage.java | Passage.setOffsetInEndSection | public void setOffsetInEndSection(int v) {
if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInEndSection == null)
jcasType.jcas.throwFeatMissing("offsetInEndSection", "edu.cmu.lti.oaqa.type.retrieval.Passage");
jcasType.ll_cas.ll_setIntValue(addr, ((Passage_Type)jcasType).casFeatCode_o... | java | public void setOffsetInEndSection(int v) {
if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInEndSection == null)
jcasType.jcas.throwFeatMissing("offsetInEndSection", "edu.cmu.lti.oaqa.type.retrieval.Passage");
jcasType.ll_cas.ll_setIntValue(addr, ((Passage_Type)jcasType).casFeatCode_o... | [
"public",
"void",
"setOffsetInEndSection",
"(",
"int",
"v",
")",
"{",
"if",
"(",
"Passage_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"Passage_Type",
")",
"jcasType",
")",
".",
"casFeat_offsetInEndSection",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"thro... | setter for offsetInEndSection - sets Character offset of the end of this passage within the section that contains this passage.
@generated
@param v value to set into the feature | [
"setter",
"for",
"offsetInEndSection",
"-",
"sets",
"Character",
"offset",
"of",
"the",
"end",
"of",
"this",
"passage",
"within",
"the",
"section",
"that",
"contains",
"this",
"passage",
"."
] | 6ea632d8e51e3e617d4876fc1185c49be0ad7eb8 | https://github.com/oaqa/baseqa/blob/6ea632d8e51e3e617d4876fc1185c49be0ad7eb8/src/main/java/edu/cmu/lti/oaqa/type/retrieval/Passage.java#L148-L151 | test | setter for offsetInEndSection - sets | Of course, here is the Java code you requested:
```java
public void setOffsetInEndSection(int v) {
if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInEndSection == null)
jcasType.jcas.throwFeatMissing("offsetInEndSection", "edu.cmu.lti.oaqa.type.retrieval.Passage");
jcasType.ll_cas.ll... |
oblac/jodd | jodd-proxetta/src/main/java/jodd/asm7/Frame.java | Frame.pop | private void pop(final int elements) {
if (outputStackTop >= elements) {
outputStackTop -= elements;
} else {
// If the number of elements to be popped is greater than the number of elements in the output
// stack, clear it, and pop the remaining elements from the input stack.
outputStac... | java | private void pop(final int elements) {
if (outputStackTop >= elements) {
outputStackTop -= elements;
} else {
// If the number of elements to be popped is greater than the number of elements in the output
// stack, clear it, and pop the remaining elements from the input stack.
outputStac... | [
"private",
"void",
"pop",
"(",
"final",
"int",
"elements",
")",
"{",
"if",
"(",
"outputStackTop",
">=",
"elements",
")",
"{",
"outputStackTop",
"-=",
"elements",
";",
"}",
"else",
"{",
"// If the number of elements to be popped is greater than the number of elements in ... | Pops the given number of abstract types from the output frame stack.
@param elements the number of abstract types that must be popped. | [
"Pops",
"the",
"given",
"number",
"of",
"abstract",
"types",
"from",
"the",
"output",
"frame",
"stack",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-proxetta/src/main/java/jodd/asm7/Frame.java#L572-L581 | test | Pop the elements from the output stack. | Of course, here is the Java code you requested:
```java
private void pop(final int elements) {
if (outputStackTop >= elements) {
outputStackTop -= elements;
} else {
// If the number of elements to be popped is greater than the number of elements in the output
// stack, clear it, and pop the ... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/util/IO.java | IO.readContentsToByteArray | static public byte[] readContentsToByteArray(InputStream is) throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream(10 * default_file_buffersize);
IO.copy(is, bout);
return bout.toByteArray();
} | java | static public byte[] readContentsToByteArray(InputStream is) throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream(10 * default_file_buffersize);
IO.copy(is, bout);
return bout.toByteArray();
} | [
"static",
"public",
"byte",
"[",
"]",
"readContentsToByteArray",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bout",
"=",
"new",
"ByteArrayOutputStream",
"(",
"10",
"*",
"default_file_buffersize",
")",
";",
"IO",
".",
"cop... | Read the contents from the inputStream and place into a byte array,
with any error messages put in the return String.
@param is the inputStream to read from.
@return byte[] holding the contents, or an error message.
@throws java.io.IOException on io error | [
"Read",
"the",
"contents",
"from",
"the",
"inputStream",
"and",
"place",
"into",
"a",
"byte",
"array",
"with",
"any",
"error",
"messages",
"put",
"in",
"the",
"return",
"String",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/util/IO.java#L251-L255 | test | Read the contents of an input stream to a byte array. | Of course, here is the Java code you requested:
```java
static public byte[] readContentsToByteArray(InputStream is) throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream(10 * default_file_buffersize);
IO.copy(is, bout);
return bout.toByteArray();
}
```
Hope this helps! |
Unidata/thredds | ui/src/main/java/ucar/nc2/ui/geoloc/Rubberband.java | Rubberband.done | public void done() {
Graphics2D g = (Graphics2D) component.getGraphics();
if(g != null) {
try {
g.setXORMode(component.getBackground());
drawLast(g);
}
finally {
g.dispose();
}
}
} | java | public void done() {
Graphics2D g = (Graphics2D) component.getGraphics();
if(g != null) {
try {
g.setXORMode(component.getBackground());
drawLast(g);
}
finally {
g.dispose();
}
}
} | [
"public",
"void",
"done",
"(",
")",
"{",
"Graphics2D",
"g",
"=",
"(",
"Graphics2D",
")",
"component",
".",
"getGraphics",
"(",
")",
";",
"if",
"(",
"g",
"!=",
"null",
")",
"{",
"try",
"{",
"g",
".",
"setXORMode",
"(",
"component",
".",
"getBackground... | Last point, done with drawing. | [
"Last",
"point",
"done",
"with",
"drawing",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/geoloc/Rubberband.java#L131-L142 | test | Draw the last page of the page. | Of course, here is the Java code you requested:
```java
public void done() {
Graphics2D g = (Graphics2D) component.getGraphics();
if(g != null) {
try {
g.setXORMode(component.getBackground());
drawLast(g);
}
finally {
g.dispose();
}
}
}
```
Hope this helps! |
RestComm/jain-slee | container/router/src/main/java/org/mobicents/slee/runtime/eventrouter/stats/EventRouterStatisticsImpl.java | EventRouterStatisticsImpl.getIdleTime | public long getIdleTime(int executor) {
final EventRouterExecutorStatistics executorStats = getExecutors()[executor].getStatistics();
return executorStats == null ? 0 : executorStats.getIdleTime();
} | java | public long getIdleTime(int executor) {
final EventRouterExecutorStatistics executorStats = getExecutors()[executor].getStatistics();
return executorStats == null ? 0 : executorStats.getIdleTime();
} | [
"public",
"long",
"getIdleTime",
"(",
"int",
"executor",
")",
"{",
"final",
"EventRouterExecutorStatistics",
"executorStats",
"=",
"getExecutors",
"(",
")",
"[",
"executor",
"]",
".",
"getStatistics",
"(",
")",
";",
"return",
"executorStats",
"==",
"null",
"?",
... | /* (non-Javadoc)
@see org.mobicents.slee.runtime.eventrouter.stats.EventRouterStatisticsMBean#getIdleTime(int) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/router/src/main/java/org/mobicents/slee/runtime/eventrouter/stats/EventRouterStatisticsImpl.java#L183-L186 | test | Gets the idle time of the given executor. | Of course, here is the Java code you requested:
```java
public long getIdleTime(int executor) {
final EventRouterExecutorStatistics executorStats = getExecutors()[executor].getStatistics();
return executorStats == null ? 0 : executorStats.getIdleTime();
}
```
Hope this helps! |
oblac/jodd | jodd-core/src/main/java/jodd/util/StringUtil.java | StringUtil.replace | public static String replace(final String s, final String sub, final String with) {
if (sub.isEmpty()) {
return s;
}
int c = 0;
int i = s.indexOf(sub, c);
if (i == -1) {
return s;
}
int length = s.length();
StringBuilder sb = new StringBuilder(length + with.length());
do {
sb.append(s, c, i);... | java | public static String replace(final String s, final String sub, final String with) {
if (sub.isEmpty()) {
return s;
}
int c = 0;
int i = s.indexOf(sub, c);
if (i == -1) {
return s;
}
int length = s.length();
StringBuilder sb = new StringBuilder(length + with.length());
do {
sb.append(s, c, i);... | [
"public",
"static",
"String",
"replace",
"(",
"final",
"String",
"s",
",",
"final",
"String",
"sub",
",",
"final",
"String",
"with",
")",
"{",
"if",
"(",
"sub",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"s",
";",
"}",
"int",
"c",
"=",
"0",
";... | Replaces all occurrences of a certain pattern in a string with a
replacement string. This is the fastest replace function known to author.
@param s string to be inspected
@param sub string pattern to be replaced
@param with string that should go where the pattern was | [
"Replaces",
"all",
"occurrences",
"of",
"a",
"certain",
"pattern",
"in",
"a",
"string",
"with",
"a",
"replacement",
"string",
".",
"This",
"is",
"the",
"fastest",
"replace",
"function",
"known",
"to",
"author",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/util/StringUtil.java#L54-L74 | test | Replaces all occurrences of sub in s with with. | Of course, here is the Java code you requested:
```java
public static String replace(final String s, final String sub, final String with) {
if (sub.isEmpty()) {
return s;
}
int c = 0;
int i = s.indexOf(sub, c);
if (i == -1) {
return s;
}
int length = s.length();
StringBuilder sb = new StringBuild... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/dataset/CoordTransBuilder.java | CoordTransBuilder.registerTransform | static public void registerTransform( String transformName, Class c) {
if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF... | java | static public void registerTransform( String transformName, Class c) {
if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF... | [
"static",
"public",
"void",
"registerTransform",
"(",
"String",
"transformName",
",",
"Class",
"c",
")",
"{",
"if",
"(",
"!",
"(",
"VertTransformBuilderIF",
".",
"class",
".",
"isAssignableFrom",
"(",
"c",
")",
")",
"&&",
"!",
"(",
"HorizTransformBuilderIF",
... | Register a class that implements a Coordinate Transform.
@param transformName name of transform. This name is used in the datasets to identify the transform, eg CF names.
@param c class that implements CoordTransBuilderIF. | [
"Register",
"a",
"class",
"that",
"implements",
"a",
"Coordinate",
"Transform",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/CoordTransBuilder.java#L80-L99 | test | Register a new coord transform with the user - defined transform name and class. | Of course, here is the Java code you requested:
```java
static public void registerTransform( String transformName, Class c) {
if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
throw new IllegalArgumentException("Class "+c.getName()+" must im... |
agentsoz/jill | jill/src/main/java/io/github/agentsoz/jill/core/IntentionSelector.java | IntentionSelector.manageGoal | private boolean manageGoal(int agentIndex, Agent agent, Stack255 agentExecutionStack, Goal node) {
// Get the goal type for this goal
GoalType gtype = (GoalType) GlobalState.goalTypes.find(node.getClass().getName());
byte[] ptypes = gtype.getChildren();
assert (ptypes != null);
// Clear any previous... | java | private boolean manageGoal(int agentIndex, Agent agent, Stack255 agentExecutionStack, Goal node) {
// Get the goal type for this goal
GoalType gtype = (GoalType) GlobalState.goalTypes.find(node.getClass().getName());
byte[] ptypes = gtype.getChildren();
assert (ptypes != null);
// Clear any previous... | [
"private",
"boolean",
"manageGoal",
"(",
"int",
"agentIndex",
",",
"Agent",
"agent",
",",
"Stack255",
"agentExecutionStack",
",",
"Goal",
"node",
")",
"{",
"// Get the goal type for this goal",
"GoalType",
"gtype",
"=",
"(",
"GoalType",
")",
"GlobalState",
".",
"g... | Manages the goal at the top of the execution stack of an agent. All relevant plans are
evaluated to see if their context conditions hold. Plans deemed applicable are then added to
the list of bindings from which a plan instane will be eventually selected.
@param agentIndex the agent's index
@param agent the agent in q... | [
"Manages",
"the",
"goal",
"at",
"the",
"top",
"of",
"the",
"execution",
"stack",
"of",
"an",
"agent",
".",
"All",
"relevant",
"plans",
"are",
"evaluated",
"to",
"see",
"if",
"their",
"context",
"conditions",
"hold",
".",
"Plans",
"deemed",
"applicable",
"a... | 13126fc78350465b477386132465f84cad719426 | https://github.com/agentsoz/jill/blob/13126fc78350465b477386132465f84cad719426/jill/src/main/java/io/github/agentsoz/jill/core/IntentionSelector.java#L178-L227 | test | Manage a goal. | Of course, here is the Java code you requested:
```java
private boolean manageGoal(int agentIndex, Agent agent, Stack255 agentExecutionStack, Goal node) {
// Get the goal type for this goal
GoalType gtype = (GoalType) GlobalState.goalTypes.find(node.getClass().getName());
byte[] ptypes = gtype.getChildren(... |
oblac/jodd | jodd-servlet/src/main/java/jodd/servlet/wrapper/BufferResponseWrapper.java | BufferResponseWrapper.getWriter | @Override
public PrintWriter getWriter() throws IOException {
preResponseCommit();
if (buffer == null) {
return getResponse().getWriter();
}
return buffer.getWriter();
} | java | @Override
public PrintWriter getWriter() throws IOException {
preResponseCommit();
if (buffer == null) {
return getResponse().getWriter();
}
return buffer.getWriter();
} | [
"@",
"Override",
"public",
"PrintWriter",
"getWriter",
"(",
")",
"throws",
"IOException",
"{",
"preResponseCommit",
"(",
")",
";",
"if",
"(",
"buffer",
"==",
"null",
")",
"{",
"return",
"getResponse",
"(",
")",
".",
"getWriter",
"(",
")",
";",
"}",
"retu... | Returns buffered writer if buffering is enabled,
otherwise returns the original writer. | [
"Returns",
"buffered",
"writer",
"if",
"buffering",
"is",
"enabled",
"otherwise",
"returns",
"the",
"original",
"writer",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-servlet/src/main/java/jodd/servlet/wrapper/BufferResponseWrapper.java#L129-L136 | test | Get the PrintWriter for this response. | Of course, here is the Java code you requested:
```java
@Override
public PrintWriter getWriter() throws IOException {
preResponseCommit();
if (buffer == null) {
return getResponse().getWriter();
}
return buffer.getWriter();
}
```
Hope this helps! |
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.intervalRange | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public static Observable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) {
return intervalRange(start, count, initialDelay, period, unit, Schedulers.computation());
} | java | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public static Observable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) {
return intervalRange(start, count, initialDelay, period, unit, Schedulers.computation());
} | [
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"COMPUTATION",
")",
"public",
"static",
"Observable",
"<",
"Long",
">",
"intervalRange",
"(",
"long",
"start",
",",
"long",
"count",
",",
"long",
"initialDelay",
",",
"long",
"period... | Signals a range of long values, the first after some initial delay and the rest periodically after.
<p>
The sequence completes immediately after the last value (start + count - 1) has been reached.
<p>
<img width="640" height="195" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/intervalRange.png"... | [
"Signals",
"a",
"range",
"of",
"long",
"values",
"the",
"first",
"after",
"some",
"initial",
"delay",
"and",
"the",
"rest",
"periodically",
"after",
".",
"<p",
">",
"The",
"sequence",
"completes",
"immediately",
"after",
"the",
"last",
"value",
"(",
"start",... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L2312-L2316 | test | Create an observable sequence of longs from start to start + count initial delay and period. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.COMPUTATION)
public static Observable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) {
return intervalRange(start, count, initialDelay, period, unit, ... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/ConditionTerm.java | ConditionTerm.create | public static ConditionTerm create(StreamTokenizer tokenizer) throws WebDAVException {
ConditionTerm term = new ConditionTerm();
try {
int token = tokenizer.ttype;
if (token == '(')
token = tokenizer.nextToken();
else
throw new WebDAVEx... | java | public static ConditionTerm create(StreamTokenizer tokenizer) throws WebDAVException {
ConditionTerm term = new ConditionTerm();
try {
int token = tokenizer.ttype;
if (token == '(')
token = tokenizer.nextToken();
else
throw new WebDAVEx... | [
"public",
"static",
"ConditionTerm",
"create",
"(",
"StreamTokenizer",
"tokenizer",
")",
"throws",
"WebDAVException",
"{",
"ConditionTerm",
"term",
"=",
"new",
"ConditionTerm",
"(",
")",
";",
"try",
"{",
"int",
"token",
"=",
"tokenizer",
".",
"ttype",
";",
"if... | Create a ConditionTerm by parsing the given If header as defined by
section 9.4 in the WebDAV spec.
@param tokenizer a StreamTokenizer on the contents of a WebDAV If header
@return the parsed ConditionTerm
@exception WebDAVException thrown if there is a syntax error in the If header | [
"Create",
"a",
"ConditionTerm",
"by",
"parsing",
"the",
"given",
"If",
"header",
"as",
"defined",
"by",
"section",
"9",
".",
"4",
"in",
"the",
"WebDAV",
"spec",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/ConditionTerm.java#L72-L95 | test | Create a new condition term from the given tokenizer. | Of course, here is the Java code you requested:
```java
public static ConditionTerm create(StreamTokenizer tokenizer) throws WebDAVException {
ConditionTerm term = new ConditionTerm();
try {
int token = tokenizer.ttype;
if (token == '(')
token = tokenizer.nextTok... |
Unidata/thredds | tds/src/main/java/thredds/servlet/ServletUtil.java | ServletUtil.returnString | public static void returnString(String contents, HttpServletResponse res)
throws IOException {
try {
ServletOutputStream out = res.getOutputStream();
IO.copy(new ByteArrayInputStream(contents.getBytes(CDM.utf8Charset)), out);
} catch (IOException e) {
log.error(" IOException ... | java | public static void returnString(String contents, HttpServletResponse res)
throws IOException {
try {
ServletOutputStream out = res.getOutputStream();
IO.copy(new ByteArrayInputStream(contents.getBytes(CDM.utf8Charset)), out);
} catch (IOException e) {
log.error(" IOException ... | [
"public",
"static",
"void",
"returnString",
"(",
"String",
"contents",
",",
"HttpServletResponse",
"res",
")",
"throws",
"IOException",
"{",
"try",
"{",
"ServletOutputStream",
"out",
"=",
"res",
".",
"getOutputStream",
"(",
")",
";",
"IO",
".",
"copy",
"(",
... | Send given content string as the HTTP response.
@param contents the string to return as the HTTP response.
@param res the HttpServletResponse
@throws IOException if an I/O error occurs while writing the response. | [
"Send",
"given",
"content",
"string",
"as",
"the",
"HTTP",
"response",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/tds/src/main/java/thredds/servlet/ServletUtil.java#L257-L267 | test | Returns a string of the specified length in the CDM to the specified HttpServletResponse. | Of course, here is the Java code you requested:
```java
public static void returnString(String contents, HttpServletResponse res)
throws IOException {
try {
ServletOutputStream out = res.getOutputStream();
IO.copy(new ByteArrayInputStream(contents.getBytes(CDM.utf8Charset)), out);
... |
Unidata/thredds | ui/src/main/java/ucar/nc2/ui/widget/ScaledPanel.java | ScaledPanel.calcTransform | private AffineTransform calcTransform(Rectangle2D screen, Bounds world) {
// scale to limiting dimension
double xs = screen.getWidth() / (world.getRight() - world.getLeft());
double ys = screen.getHeight() / (world.getLower() - world.getUpper());
AffineTransform cat = new AffineTransform();
cat.set... | java | private AffineTransform calcTransform(Rectangle2D screen, Bounds world) {
// scale to limiting dimension
double xs = screen.getWidth() / (world.getRight() - world.getLeft());
double ys = screen.getHeight() / (world.getLower() - world.getUpper());
AffineTransform cat = new AffineTransform();
cat.set... | [
"private",
"AffineTransform",
"calcTransform",
"(",
"Rectangle2D",
"screen",
",",
"Bounds",
"world",
")",
"{",
"// scale to limiting dimension",
"double",
"xs",
"=",
"screen",
".",
"getWidth",
"(",
")",
"/",
"(",
"world",
".",
"getRight",
"(",
")",
"-",
"world... | map world coords to screen coords.
@param world world coordinate rectangle
@param screen screen coordinate rectangle
@return AffineTransform for converting world to screen. | [
"map",
"world",
"coords",
"to",
"screen",
"coords",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/widget/ScaledPanel.java#L198-L226 | test | Calculate the transformation for the image | Of course, here is the Java code you requested:
```java
private AffineTransform calcTransform(Rectangle2D screen, Bounds world) {
// scale to limiting dimension
double xs = screen.getWidth() / (world.getRight() - world.getLeft());
double ys = screen.getHeight() / (world.getLower() - world.getUpper());
... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java | HttpConnection.getResponseHeaderFieldValue | public String getResponseHeaderFieldValue(String fieldName) throws IOException {
Assert.isNotNull(fieldName);
sendRequest();
return responseHeader.getFieldValue(fieldName);
} | java | public String getResponseHeaderFieldValue(String fieldName) throws IOException {
Assert.isNotNull(fieldName);
sendRequest();
return responseHeader.getFieldValue(fieldName);
} | [
"public",
"String",
"getResponseHeaderFieldValue",
"(",
"String",
"fieldName",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"isNotNull",
"(",
"fieldName",
")",
";",
"sendRequest",
"(",
")",
";",
"return",
"responseHeader",
".",
"getFieldValue",
"(",
"fieldNam... | Returns the response header field value that is associated with the
given field name, or <code>null</code> if there is no value associated
with that field name.
@param fieldName the name of a response header field
@return the response header field value that is associated with the
given field name
@exception IOExcepti... | [
"Returns",
"the",
"response",
"header",
"field",
"value",
"that",
"is",
"associated",
"with",
"the",
"given",
"field",
"name",
"or",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"there",
"is",
"no",
"value",
"associated",
"with",
"that",
"field",
"name",... | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java#L889-L893 | test | Gets the value of the response header field. | Of course, here is the Java code you requested:
```java
public String getResponseHeaderFieldValue(String fieldName) throws IOException {
Assert.isNotNull(fieldName);
sendRequest();
return responseHeader.getFieldValue(fieldName);
}
```
Hope this helps! |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/db/FeatureIndexer.java | FeatureIndexer.deleteIndex | public boolean deleteIndex() {
TableMetadataDataSource tableMetadataDataSource = new TableMetadataDataSource(db);
boolean deleted = tableMetadataDataSource.delete(featureDao.getDatabase(), featureDao.getTableName());
return deleted;
} | java | public boolean deleteIndex() {
TableMetadataDataSource tableMetadataDataSource = new TableMetadataDataSource(db);
boolean deleted = tableMetadataDataSource.delete(featureDao.getDatabase(), featureDao.getTableName());
return deleted;
} | [
"public",
"boolean",
"deleteIndex",
"(",
")",
"{",
"TableMetadataDataSource",
"tableMetadataDataSource",
"=",
"new",
"TableMetadataDataSource",
"(",
"db",
")",
";",
"boolean",
"deleted",
"=",
"tableMetadataDataSource",
".",
"delete",
"(",
"featureDao",
".",
"getDataba... | Delete the feature table index
@return true if index deleted
@since 1.1.0 | [
"Delete",
"the",
"feature",
"table",
"index"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/db/FeatureIndexer.java#L307-L311 | test | Delete the feature index | Of course, here is the Java code you requested:
```java
public boolean deleteIndex() {
TableMetadataDataSource tableMetadataDataSource = new TableMetadataDataSource(db);
boolean deleted = tableMetadataDataSource.delete(featureDao.getDatabase(), featureDao.getTableName());
return deleted;
}
... |
tiefaces/TieFaces | src/org/tiefaces/components/websheet/utility/CellStyleUtility.java | CellStyleUtility.calcTotalWidth | public static int calcTotalWidth(final Sheet sheet1, final int firstCol,
final int lastCol, final int additionalWidth) {
int totalWidth = additionalWidth;
for (int i = firstCol; i <= lastCol; i++) {
totalWidth += sheet1.getColumnWidth(i);
}
return totalWidth;
} | java | public static int calcTotalWidth(final Sheet sheet1, final int firstCol,
final int lastCol, final int additionalWidth) {
int totalWidth = additionalWidth;
for (int i = firstCol; i <= lastCol; i++) {
totalWidth += sheet1.getColumnWidth(i);
}
return totalWidth;
} | [
"public",
"static",
"int",
"calcTotalWidth",
"(",
"final",
"Sheet",
"sheet1",
",",
"final",
"int",
"firstCol",
",",
"final",
"int",
"lastCol",
",",
"final",
"int",
"additionalWidth",
")",
"{",
"int",
"totalWidth",
"=",
"additionalWidth",
";",
"for",
"(",
"in... | e.g. lineNumberColumnWidth and addRowColumnWidth | [
"e",
".",
"g",
".",
"lineNumberColumnWidth",
"and",
"addRowColumnWidth"
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/utility/CellStyleUtility.java#L291-L299 | test | Calculates the total width of the columns in the sheet1. | Of course, here is the Java code you requested:
```java
public static int calcTotalWidth(final Sheet sheet1, final int firstCol,
final int lastCol, final int additionalWidth) {
int totalWidth = additionalWidth;
for (int i = firstCol; i <= lastCol; i++) {
totalWidth += sheet1.getColumnWidth(i);
}
... |
1gravity/Android-RTEditor | RTEditor/src/main/java/com/onegravity/rteditor/media/crop/HighlightView.java | HighlightView.handleMotion | void handleMotion(int edge, float dx, float dy) {
Rect r = computeLayout();
if (edge == GROW_NONE) {
return;
} else if (edge == MOVE) {
// Convert to image space before sending to moveBy().
moveBy(dx * (mCropRect.width() / r.width()),
dy * ... | java | void handleMotion(int edge, float dx, float dy) {
Rect r = computeLayout();
if (edge == GROW_NONE) {
return;
} else if (edge == MOVE) {
// Convert to image space before sending to moveBy().
moveBy(dx * (mCropRect.width() / r.width()),
dy * ... | [
"void",
"handleMotion",
"(",
"int",
"edge",
",",
"float",
"dx",
",",
"float",
"dy",
")",
"{",
"Rect",
"r",
"=",
"computeLayout",
"(",
")",
";",
"if",
"(",
"edge",
"==",
"GROW_NONE",
")",
"{",
"return",
";",
"}",
"else",
"if",
"(",
"edge",
"==",
"... | The "edge" parameter specifies which edges the user is dragging. | [
"The",
"edge",
"parameter",
"specifies",
"which",
"edges",
"the",
"user",
"is",
"dragging",
"."
] | 9d8fb4bb865b3b3d011e7633afedcdfb8d21754f | https://github.com/1gravity/Android-RTEditor/blob/9d8fb4bb865b3b3d011e7633afedcdfb8d21754f/RTEditor/src/main/java/com/onegravity/rteditor/media/crop/HighlightView.java#L272-L295 | test | Handle motion. | Of course, here is the Java code you requested:
```java
void handleMotion(int edge, float dx, float dy) {
Rect r = computeLayout();
if (edge == GROW_NONE) {
return;
} else if (edge == MOVE) {
// Convert to image space before sending to moveBy().
moveBy(dx * (... |
Unidata/thredds | legacy/src/main/java/thredds/catalog/InvDataset.java | InvDataset.findDatasetByName | public InvDatasetImpl findDatasetByName(String name) {
for (InvDataset ds : getDatasets()) {
if (ds.getName().equals(name))
return (InvDatasetImpl) ds;
}
return null;
} | java | public InvDatasetImpl findDatasetByName(String name) {
for (InvDataset ds : getDatasets()) {
if (ds.getName().equals(name))
return (InvDatasetImpl) ds;
}
return null;
} | [
"public",
"InvDatasetImpl",
"findDatasetByName",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"InvDataset",
"ds",
":",
"getDatasets",
"(",
")",
")",
"{",
"if",
"(",
"ds",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"return",
"(",
... | Find an immediate child dataset by its name.
@param name match on this name
@return dataset if found or null if not exist. | [
"Find",
"an",
"immediate",
"child",
"dataset",
"by",
"its",
"name",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/thredds/catalog/InvDataset.java#L240-L246 | test | Find a dataset by its name. | Of course, here is the Java code you requested:
```java
public InvDatasetImpl findDatasetByName(String name) {
for (InvDataset ds : getDatasets()) {
if (ds.getName().equals(name))
return (InvDatasetImpl) ds;
}
return null;
}
```
Hope this helps! |
oaqa/baseqa | src/main/java/edu/cmu/lti/oaqa/type/kb/ConceptType.java | ConceptType.setId | public void setId(String v) {
if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_id == null)
jcasType.jcas.throwFeatMissing("id", "edu.cmu.lti.oaqa.type.kb.ConceptType");
jcasType.ll_cas.ll_setStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_id, v);} | java | public void setId(String v) {
if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_id == null)
jcasType.jcas.throwFeatMissing("id", "edu.cmu.lti.oaqa.type.kb.ConceptType");
jcasType.ll_cas.ll_setStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_id, v);} | [
"public",
"void",
"setId",
"(",
"String",
"v",
")",
"{",
"if",
"(",
"ConceptType_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"ConceptType_Type",
")",
"jcasType",
")",
".",
"casFeat_id",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(",... | setter for id - sets The id of the concept type.
@generated
@param v value to set into the feature | [
"setter",
"for",
"id",
"-",
"sets",
"The",
"id",
"of",
"the",
"concept",
"type",
"."
] | 6ea632d8e51e3e617d4876fc1185c49be0ad7eb8 | https://github.com/oaqa/baseqa/blob/6ea632d8e51e3e617d4876fc1185c49be0ad7eb8/src/main/java/edu/cmu/lti/oaqa/type/kb/ConceptType.java#L83-L86 | test | setter for id - sets | Of course, here is the Java code you requested:
```java
public void setId(String v) {
if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_id == null)
jcasType.jcas.throwFeatMissing("id", "edu.cmu.lti.oaqa.type.kb.ConceptType");
jcasType.ll_cas.ll_setStringValue(addr, ((ConceptType_Type... |
subchen/jetbrick-all-1x | jetbrick-orm/src/main/java/jetbrick/dao/jdbclog/JdbcLogCallableStatement.java | JdbcLogCallableStatement.getInstance | public static CallableStatement getInstance(CallableStatement stmt, String sql) {
InvocationHandler handler = new JdbcLogCallableStatement(stmt, sql);
ClassLoader cl = CallableStatement.class.getClassLoader();
return (CallableStatement) Proxy.newProxyInstance(cl, new Class[] { CallableStatement.... | java | public static CallableStatement getInstance(CallableStatement stmt, String sql) {
InvocationHandler handler = new JdbcLogCallableStatement(stmt, sql);
ClassLoader cl = CallableStatement.class.getClassLoader();
return (CallableStatement) Proxy.newProxyInstance(cl, new Class[] { CallableStatement.... | [
"public",
"static",
"CallableStatement",
"getInstance",
"(",
"CallableStatement",
"stmt",
",",
"String",
"sql",
")",
"{",
"InvocationHandler",
"handler",
"=",
"new",
"JdbcLogCallableStatement",
"(",
"stmt",
",",
"sql",
")",
";",
"ClassLoader",
"cl",
"=",
"Callable... | Creates a logging version of a PreparedStatement
@param stmt - the statement
@param sql - the sql statement
@return - the proxy | [
"Creates",
"a",
"logging",
"version",
"of",
"a",
"PreparedStatement"
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-orm/src/main/java/jetbrick/dao/jdbclog/JdbcLogCallableStatement.java#L42-L46 | test | Get a CallableStatement instance. | Of course, here is the Java code you requested:
```java
public static CallableStatement getInstance(CallableStatement stmt, String sql) {
InvocationHandler handler = new JdbcLogCallableStatement(stmt, sql);
ClassLoader cl = CallableStatement.class.getClassLoader();
return (CallableStatement) Pr... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/AbstractResourceHandle.java | AbstractResourceHandle.removeProperty | public void removeProperty(QualifiedName propertyName) throws DAVException {
Collection propertyNames = new Vector(1);
propertyNames.add(propertyName);
removeProperties(propertyNames);
} | java | public void removeProperty(QualifiedName propertyName) throws DAVException {
Collection propertyNames = new Vector(1);
propertyNames.add(propertyName);
removeProperties(propertyNames);
} | [
"public",
"void",
"removeProperty",
"(",
"QualifiedName",
"propertyName",
")",
"throws",
"DAVException",
"{",
"Collection",
"propertyNames",
"=",
"new",
"Vector",
"(",
"1",
")",
";",
"propertyNames",
".",
"add",
"(",
"propertyName",
")",
";",
"removeProperties",
... | Remove the property with the given name from this resource.
@param propertyName the name of the property to remove
@exception DAVException if there was a problem removing the property
@see #removeProperties(Collection) | [
"Remove",
"the",
"property",
"with",
"the",
"given",
"name",
"from",
"this",
"resource",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/client/AbstractResourceHandle.java#L1098-L1102 | test | Removes a property from the class. | Of course, here is the Java code you requested:
```java
public void removeProperty(QualifiedName propertyName) throws DAVException {
Collection propertyNames = new Vector(1);
propertyNames.add(propertyName);
removeProperties(propertyNames);
}
```
Hope this helps! |
wildfly/wildfly | security/subsystem/src/main/java/org/jboss/as/security/plugins/JNDIBasedSecurityManagement.java | JNDIBasedSecurityManagement.getIdentityTrustManager | public IdentityTrustManager getIdentityTrustManager(String securityDomain) {
IdentityTrustManager itm = null;
try {
itm = idmMgrMap.get(securityDomain);
if (itm == null) {
itm = (IdentityTrustManager) lookUpJNDI(securityDomain + "/identityTrustMgr");
... | java | public IdentityTrustManager getIdentityTrustManager(String securityDomain) {
IdentityTrustManager itm = null;
try {
itm = idmMgrMap.get(securityDomain);
if (itm == null) {
itm = (IdentityTrustManager) lookUpJNDI(securityDomain + "/identityTrustMgr");
... | [
"public",
"IdentityTrustManager",
"getIdentityTrustManager",
"(",
"String",
"securityDomain",
")",
"{",
"IdentityTrustManager",
"itm",
"=",
"null",
";",
"try",
"{",
"itm",
"=",
"idmMgrMap",
".",
"get",
"(",
"securityDomain",
")",
";",
"if",
"(",
"itm",
"==",
"... | {@inheritDoc} | [
"{"
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/security/subsystem/src/main/java/org/jboss/as/security/plugins/JNDIBasedSecurityManagement.java#L128-L140 | test | Get IdentityTrustManager for a given securityDomain. | Of course, here is the Java code you requested:
```java
public IdentityTrustManager getIdentityTrustManager(String securityDomain) {
IdentityTrustManager itm = null;
try {
itm = idmMgrMap.get(securityDomain);
if (itm == null) {
itm = (IdentityTrustManager) lookUp... |
Unidata/thredds | legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java | NetcdfFileWriteable.addVariable | public Variable addVariable(String shortName, DataType dataType, List<Dimension> dims) {
if (!defineMode)
throw new UnsupportedOperationException("not in define mode");
if (!N3iosp.isValidNetcdfObjectName(shortName))
throw new IllegalArgumentException("illegal netCDF-3 variable name: "+shortName);
... | java | public Variable addVariable(String shortName, DataType dataType, List<Dimension> dims) {
if (!defineMode)
throw new UnsupportedOperationException("not in define mode");
if (!N3iosp.isValidNetcdfObjectName(shortName))
throw new IllegalArgumentException("illegal netCDF-3 variable name: "+shortName);
... | [
"public",
"Variable",
"addVariable",
"(",
"String",
"shortName",
",",
"DataType",
"dataType",
",",
"List",
"<",
"Dimension",
">",
"dims",
")",
"{",
"if",
"(",
"!",
"defineMode",
")",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"not in define mode\"",
... | Add a variable to the file. Must be in define mode.
@param shortName name of Variable, must be unique with the file.
@param dataType type of underlying element
@param dims list of Dimensions for the variable, must already have been added. Use a list of length 0
for a scalar variable.
@return the Variable that has... | [
"Add",
"a",
"variable",
"to",
"the",
"file",
".",
"Must",
"be",
"in",
"define",
"mode",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java#L404-L431 | test | Add a new variable to the netCDF - 3 file. | Of course, here is the Java code you requested:
```java
public Variable addVariable(String shortName, DataType dataType, List<Dimension> dims) {
if (!defineMode)
throw new UnsupportedOperationException("not in define mode");
if (!N3iosp.isValidNetcdfObjectName(shortName))
throw new IllegalArgumentE... |
apache/parquet-mr | parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyDecompressor.java | SnappyDecompressor.setInput | @Override
public synchronized void setInput(byte[] buffer, int off, int len) {
SnappyUtil.validateBuffer(buffer, off, len);
if (inputBuffer.capacity() - inputBuffer.position() < len) {
ByteBuffer newBuffer = ByteBuffer.allocateDirect(inputBuffer.position() + len);
inputBuffer.rewind();
newB... | java | @Override
public synchronized void setInput(byte[] buffer, int off, int len) {
SnappyUtil.validateBuffer(buffer, off, len);
if (inputBuffer.capacity() - inputBuffer.position() < len) {
ByteBuffer newBuffer = ByteBuffer.allocateDirect(inputBuffer.position() + len);
inputBuffer.rewind();
newB... | [
"@",
"Override",
"public",
"synchronized",
"void",
"setInput",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"SnappyUtil",
".",
"validateBuffer",
"(",
"buffer",
",",
"off",
",",
"len",
")",
";",
"if",
"(",
"inputBuffe... | Sets input data for decompression.
This should be called if and only if {@link #needsInput()} returns
<code>true</code> indicating that more input data is required.
(Both native and non-native versions of various Decompressors require
that the data passed in via <code>b[]</code> remain unmodified until
the caller is ex... | [
"Sets",
"input",
"data",
"for",
"decompression",
".",
"This",
"should",
"be",
"called",
"if",
"and",
"only",
"if",
"{",
"@link",
"#needsInput",
"()",
"}",
"returns",
"<code",
">",
"true<",
"/",
"code",
">",
"indicating",
"that",
"more",
"input",
"data",
... | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/codec/SnappyDecompressor.java#L99-L114 | test | Set the input buffer. | Of course, here is the Java code you requested:
```java
@Override
public synchronized void setInput(byte[] buffer, int off, int len) {
SnappyUtil.validateBuffer(buffer, off, len);
if (inputBuffer.capacity() - inputBuffer.position() < len) {
ByteBuffer newBuffer = ByteBuffer.allocateDirect(inputBuffer.... |
GojaFramework/goja | goja-core/src/main/java/goja/core/kits/reflect/ClassKit.java | ClassKit.isAssignableValue | public static boolean isAssignableValue(Class<?> type, Object value) {
Preconditions.checkNotNull(type, "Type must not be null");
return (value != null ? isAssignable(type, value.getClass()) : !type.isPrimitive());
} | java | public static boolean isAssignableValue(Class<?> type, Object value) {
Preconditions.checkNotNull(type, "Type must not be null");
return (value != null ? isAssignable(type, value.getClass()) : !type.isPrimitive());
} | [
"public",
"static",
"boolean",
"isAssignableValue",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Object",
"value",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"type",
",",
"\"Type must not be null\"",
")",
";",
"return",
"(",
"value",
"!=",
"null",
"?... | Determine if the given type is assignable from the given value,
assuming setting by reflection. Considers primitive wrapper classes
as assignable to the corresponding primitive types.
@param type the target type
@param value the value that should be assigned to the type
@return if the type is assignable from the valu... | [
"Determine",
"if",
"the",
"given",
"type",
"is",
"assignable",
"from",
"the",
"given",
"value",
"assuming",
"setting",
"by",
"reflection",
".",
"Considers",
"primitive",
"wrapper",
"classes",
"as",
"assignable",
"to",
"the",
"corresponding",
"primitive",
"types",
... | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/kits/reflect/ClassKit.java#L925-L928 | test | Check if the value is assignable to the type. | Of course, here is the Java code you requested:
```java
public static boolean isAssignableValue(Class<?> type, Object value) {
Preconditions.checkNotNull(type, "Type must not be null");
return (value != null ? isAssignable(type, value.getClass()) : !type.isPrimitive());
}
```
Hope this helps! |
RestComm/jain-slee | container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityImpl.java | SbbEntityImpl.afterACAttach | public void afterACAttach(ActivityContextHandle ach) {
// add to cache
cacheData.attachActivityContext(ach);
// update event mask
Set<EventTypeID> maskedEvents = getSbbComponent().getDescriptor().getDefaultEventMask();
if (maskedEvents != null && !maskedEvents.isEmpty()) {
cacheData.updateEventMask(ach... | java | public void afterACAttach(ActivityContextHandle ach) {
// add to cache
cacheData.attachActivityContext(ach);
// update event mask
Set<EventTypeID> maskedEvents = getSbbComponent().getDescriptor().getDefaultEventMask();
if (maskedEvents != null && !maskedEvents.isEmpty()) {
cacheData.updateEventMask(ach... | [
"public",
"void",
"afterACAttach",
"(",
"ActivityContextHandle",
"ach",
")",
"{",
"// add to cache",
"cacheData",
".",
"attachActivityContext",
"(",
"ach",
")",
";",
"// update event mask",
"Set",
"<",
"EventTypeID",
">",
"maskedEvents",
"=",
"getSbbComponent",
"(",
... | /*
(non-Javadoc)
@see org.mobicents.slee.runtime.sbbentity.SbbEntity#afterACAttach(org.mobicents.slee.runtime.activity.ActivityContextHandle) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityImpl.java#L154-L169 | test | Called after an AC is attached to the SBB. | Of course, here is the Java code you requested:
```java
public void afterACAttach(ActivityContextHandle ach) {
// add to cache
cacheData.attachActivityContext(ach);
// update event mask
Set<EventTypeID> maskedEvents = getSbbComponent().getDescriptor().getDefaultEventMask();
if (maskedEvents != null && !m... |
Unidata/thredds | tds/src/main/java/thredds/server/ncss/controller/NcssGridController.java | NcssGridController.checkVarsHaveSameVertAxis | protected boolean checkVarsHaveSameVertAxis(CoverageCollection gcd, NcssGridParamsBean params) {
String zaxisName = null;
for (String gridName : params.getVar()) {
Coverage grid = gcd.findCoverage(gridName);
CoverageCoordAxis zaxis = grid.getCoordSys().getZAxis();
if (zaxis != null) {
... | java | protected boolean checkVarsHaveSameVertAxis(CoverageCollection gcd, NcssGridParamsBean params) {
String zaxisName = null;
for (String gridName : params.getVar()) {
Coverage grid = gcd.findCoverage(gridName);
CoverageCoordAxis zaxis = grid.getCoordSys().getZAxis();
if (zaxis != null) {
... | [
"protected",
"boolean",
"checkVarsHaveSameVertAxis",
"(",
"CoverageCollection",
"gcd",
",",
"NcssGridParamsBean",
"params",
")",
"{",
"String",
"zaxisName",
"=",
"null",
";",
"for",
"(",
"String",
"gridName",
":",
"params",
".",
"getVar",
"(",
")",
")",
"{",
"... | Returns true if all the variables have the same vertical axis (if they have an axis).
Could be broadened to allow all with same coordinate unites? coordinate value?? | [
"Returns",
"true",
"if",
"all",
"the",
"variables",
"have",
"the",
"same",
"vertical",
"axis",
"(",
"if",
"they",
"have",
"an",
"axis",
")",
".",
"Could",
"be",
"broadened",
"to",
"allow",
"all",
"with",
"same",
"coordinate",
"unites?",
"coordinate",
"valu... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/tds/src/main/java/thredds/server/ncss/controller/NcssGridController.java#L332-L345 | test | Check if all variables have the same vert axis | Of course, here is the Java code you requested:
```java
protected boolean checkVarsHaveSameVertAxis(CoverageCollection gcd, NcssGridParamsBean params) {
String zaxisName = null;
for (String gridName : params.getVar()) {
Coverage grid = gcd.findCoverage(gridName);
CoverageCoordAxis zaxis = grid.getC... |
ReactiveX/RxJava | src/main/java/io/reactivex/Flowable.java | Flowable.as | @CheckReturnValue
@BackpressureSupport(BackpressureKind.SPECIAL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <R> R as(@NonNull FlowableConverter<T, ? extends R> converter) {
return ObjectHelper.requireNonNull(converter, "converter is null").apply(this);
} | java | @CheckReturnValue
@BackpressureSupport(BackpressureKind.SPECIAL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <R> R as(@NonNull FlowableConverter<T, ? extends R> converter) {
return ObjectHelper.requireNonNull(converter, "converter is null").apply(this);
} | [
"@",
"CheckReturnValue",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"SPECIAL",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"<",
"R",
">",
"R",
"as",
"(",
"@",
"NonNull",
"FlowableConverter",
"<",
"... | Calls the specified converter function during assembly time and returns its resulting value.
<p>
This allows fluent conversion to any other type.
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The backpressure behavior depends on what happens in the {@code converter} function.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code as} doe... | [
"Calls",
"the",
"specified",
"converter",
"function",
"during",
"assembly",
"time",
"and",
"returns",
"its",
"resulting",
"value",
".",
"<p",
">",
"This",
"allows",
"fluent",
"conversion",
"to",
"any",
"other",
"type",
".",
"<dl",
">",
"<dt",
">",
"<b",
">... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L5574-L5579 | test | Converts this stream to a sequence of tokens. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@BackpressureSupport(BackpressureKind.SPECIAL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <R> R as(@NonNull FlowableConverter<T, ? extends R> converter) {
return ObjectHelper.requireNonNull(converter, "converter is... |
streamsets/datacollector | container-common/src/main/java/com/streamsets/datacollector/security/SecurityUtil.java | SecurityUtil.doAs | public static <T> T doAs(
Subject subject,
PrivilegedExceptionAction<T> privilegedExceptionAction
) throws PrivilegedActionException {
checkDoAsPermission();
if (privilegedExceptionAction == null) {
throw new RuntimeException("No privileged exception action provided");
}
return Acce... | java | public static <T> T doAs(
Subject subject,
PrivilegedExceptionAction<T> privilegedExceptionAction
) throws PrivilegedActionException {
checkDoAsPermission();
if (privilegedExceptionAction == null) {
throw new RuntimeException("No privileged exception action provided");
}
return Acce... | [
"public",
"static",
"<",
"T",
">",
"T",
"doAs",
"(",
"Subject",
"subject",
",",
"PrivilegedExceptionAction",
"<",
"T",
">",
"privilegedExceptionAction",
")",
"throws",
"PrivilegedActionException",
"{",
"checkDoAsPermission",
"(",
")",
";",
"if",
"(",
"privilegedEx... | Influenced by javax.security.auth.Subject.#doAs | [
"Influenced",
"by",
"javax",
".",
"security",
".",
"auth",
".",
"Subject",
".",
"#doAs"
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/container-common/src/main/java/com/streamsets/datacollector/security/SecurityUtil.java#L83-L95 | test | Perform a privileged exception action on the specified subject. | Of course, here is the Java code you requested:
```java
public static <T> T doAs(
Subject subject,
PrivilegedExceptionAction<T> privilegedExceptionAction
) throws PrivilegedActionException {
checkDoAsPermission();
if (privilegedExceptionAction == null) {
throw new RuntimeException("No privi... |
orientechnologies/orientdb | core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/statistic/OPerformanceStatisticManager.java | OPerformanceStatisticManager.registerMBean | public void registerMBean(String storageName, int storageId) {
if (mbeanIsRegistered.compareAndSet(false, true)) {
try {
final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
final ObjectName mbeanName = new ObjectName(getMBeanName(storageName, storageId));
if (!server... | java | public void registerMBean(String storageName, int storageId) {
if (mbeanIsRegistered.compareAndSet(false, true)) {
try {
final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
final ObjectName mbeanName = new ObjectName(getMBeanName(storageName, storageId));
if (!server... | [
"public",
"void",
"registerMBean",
"(",
"String",
"storageName",
",",
"int",
"storageId",
")",
"{",
"if",
"(",
"mbeanIsRegistered",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"try",
"{",
"final",
"MBeanServer",
"server",
"=",
"Management... | Registers JMX bean for current manager.
@param storageName Name of storage of given manager
@param storageId Id of storage of given manager
@see OStorage#getName()
@see OIdentifiableStorage#getId() | [
"Registers",
"JMX",
"bean",
"for",
"current",
"manager",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/statistic/OPerformanceStatisticManager.java#L397-L415 | test | Register the profiling MBean. | Of course, here is the Java code you requested:
```java
public void registerMBean(String storageName, int storageId) {
if (mbeanIsRegistered.compareAndSet(false, true)) {
try {
final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
final ObjectName mbeanName = new ObjectName(g... |
ReactiveX/RxJava | src/main/java/io/reactivex/Single.java | Single.doOnTerminate | @Experimental
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<T> doOnTerminate(final Action onTerminate) {
ObjectHelper.requireNonNull(onTerminate, "onTerminate is null");
return RxJavaPlugins.onAssembly(new SingleDoOnTerminate<T>(this, onTerminate... | java | @Experimental
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<T> doOnTerminate(final Action onTerminate) {
ObjectHelper.requireNonNull(onTerminate, "onTerminate is null");
return RxJavaPlugins.onAssembly(new SingleDoOnTerminate<T>(this, onTerminate... | [
"@",
"Experimental",
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Single",
"<",
"T",
">",
"doOnTerminate",
"(",
"final",
"Action",
"onTerminate",
")",
"{",
"ObjectHelper",
".",
... | Returns a Single instance that calls the given onTerminate callback
just before this Single completes normally or with an exception.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnTerminate.png" alt="">
<p>
This differs from {@code doAfterTerminate} in that t... | [
"Returns",
"a",
"Single",
"instance",
"that",
"calls",
"the",
"given",
"onTerminate",
"callback",
"just",
"before",
"this",
"Single",
"completes",
"normally",
"or",
"with",
"an",
"exception",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"305",... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Single.java#L2516-L2523 | test | Performs a on - terminate operation on the result of a single - element sequence. | Of course, here is the Java code you requested:
```java
@Experimental
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<T> doOnTerminate(final Action onTerminate) {
ObjectHelper.requireNonNull(onTerminate, "onTerminate is null");
return RxJavaPlugin... |
RestComm/jain-slee | container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java | TracerImpl.fine | public void fine(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.FINE, message, t);
logger.debug(message,t);
} | java | public void fine(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.FINE, message, t);
logger.debug(message,t);
} | [
"public",
"void",
"fine",
"(",
"String",
"message",
",",
"Throwable",
"t",
")",
"throws",
"NullPointerException",
",",
"FacilityException",
"{",
"sendNotification",
"(",
"TraceLevel",
".",
"FINE",
",",
"message",
",",
"t",
")",
";",
"logger",
".",
"debug",
"... | /* (non-Javadoc)
@see javax.slee.facilities.Tracer#fine(java.lang.String, java.lang.Throwable) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java#L270-L274 | test | Sends a FINE notification to the application with the specified detail message and exception. | Of course, here is the Java code you requested:
```java
public void fine(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.FINE, message, t);
logger.debug(message,t);
}
```
Hope this helps! |
oblac/jodd | jodd-db/src/main/java/jodd/db/DbQueryBase.java | DbQueryBase.closeQueryResultSets | private SQLException closeQueryResultSets() {
SQLException sqlException = null;
if (resultSets != null) {
for (final ResultSet rs : resultSets) {
try {
rs.close();
} catch (SQLException sex) {
if (sqlException == null) {
sqlException = sex;
} else {
sqlException.setNextExcepti... | java | private SQLException closeQueryResultSets() {
SQLException sqlException = null;
if (resultSets != null) {
for (final ResultSet rs : resultSets) {
try {
rs.close();
} catch (SQLException sex) {
if (sqlException == null) {
sqlException = sex;
} else {
sqlException.setNextExcepti... | [
"private",
"SQLException",
"closeQueryResultSets",
"(",
")",
"{",
"SQLException",
"sqlException",
"=",
"null",
";",
"if",
"(",
"resultSets",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"ResultSet",
"rs",
":",
"resultSets",
")",
"{",
"try",
"{",
"rs",
".",... | Closes all result sets opened by this query. Query remains active.
Returns <code>SQLException</code> (stacked with all exceptions)
or <code>null</code>. | [
"Closes",
"all",
"result",
"sets",
"opened",
"by",
"this",
"query",
".",
"Query",
"remains",
"active",
".",
"Returns",
"<code",
">",
"SQLException<",
"/",
"code",
">",
"(",
"stacked",
"with",
"all",
"exceptions",
")",
"or",
"<code",
">",
"null<",
"/",
"c... | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/DbQueryBase.java#L379-L400 | test | Close the result set sets. | Of course, here is the Java code you requested:
```java
private SQLException closeQueryResultSets() {
SQLException sqlException = null;
if (resultSets != null) {
for (final ResultSet rs : resultSets) {
try {
rs.close();
} catch (SQLException sex) {
if (sqlException == null) {
sqlExcepti... |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java | UrlTileGenerator.replaceXYZ | private String replaceXYZ(String url, int z, long x, long y) {
url = url.replaceAll(
context.getString(R.string.tile_generator_variable_z),
String.valueOf(z));
url = url.replaceAll(
context.getString(R.string.tile_generator_variable_x),
St... | java | private String replaceXYZ(String url, int z, long x, long y) {
url = url.replaceAll(
context.getString(R.string.tile_generator_variable_z),
String.valueOf(z));
url = url.replaceAll(
context.getString(R.string.tile_generator_variable_x),
St... | [
"private",
"String",
"replaceXYZ",
"(",
"String",
"url",
",",
"int",
"z",
",",
"long",
"x",
",",
"long",
"y",
")",
"{",
"url",
"=",
"url",
".",
"replaceAll",
"(",
"context",
".",
"getString",
"(",
"R",
".",
"string",
".",
"tile_generator_variable_z",
"... | Replace x, y, and z in the url
@param url
@param z
@param x
@param y
@return | [
"Replace",
"x",
"y",
"and",
"z",
"in",
"the",
"url"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/UrlTileGenerator.java#L125-L137 | test | Replace XYZ in url | Of course, here is the Java code you requested:
```java
private String replaceXYZ(String url, int z, long x, long y) {
url = url.replaceAll(
context.getString(R.string.tile_generator_variable_z),
String.valueOf(z));
url = url.replaceAll(
context.getStrin... |
GojaFramework/goja | goja-core/src/main/java/goja/core/libs/IO.java | IO.readContentAsString | public static String readContentAsString(InputStream is, String encoding) {
String res = null;
try {
res = IOUtils.toString(is, encoding);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
try {
is.close();
... | java | public static String readContentAsString(InputStream is, String encoding) {
String res = null;
try {
res = IOUtils.toString(is, encoding);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
try {
is.close();
... | [
"public",
"static",
"String",
"readContentAsString",
"(",
"InputStream",
"is",
",",
"String",
"encoding",
")",
"{",
"String",
"res",
"=",
"null",
";",
"try",
"{",
"res",
"=",
"IOUtils",
".",
"toString",
"(",
"is",
",",
"encoding",
")",
";",
"}",
"catch",... | Read the Stream content as a string
@param is The stream to read
@return The String content | [
"Read",
"the",
"Stream",
"content",
"as",
"a",
"string"
] | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/libs/IO.java#L61-L75 | test | read content as string. | Of course, here is the Java code you requested:
```java
public static String readContentAsString(InputStream is, String encoding) {
String res = null;
try {
res = IOUtils.toString(is, encoding);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
... |
blademainer/common_utils | commons-file/src/main/java/jargs/gnu/CmdLineParser.java | CmdLineParser.addBooleanOption | public final Option addBooleanOption( char shortForm, String longForm ) {
return addOption(new Option.BooleanOption(shortForm, longForm));
} | java | public final Option addBooleanOption( char shortForm, String longForm ) {
return addOption(new Option.BooleanOption(shortForm, longForm));
} | [
"public",
"final",
"Option",
"addBooleanOption",
"(",
"char",
"shortForm",
",",
"String",
"longForm",
")",
"{",
"return",
"addOption",
"(",
"new",
"Option",
".",
"BooleanOption",
"(",
"shortForm",
",",
"longForm",
")",
")",
";",
"}"
] | Convenience method for adding a boolean option.
@return the new Option | [
"Convenience",
"method",
"for",
"adding",
"a",
"boolean",
"option",
"."
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/commons-file/src/main/java/jargs/gnu/CmdLineParser.java#L342-L344 | test | Add a boolean option. | Of course, here is the Java code you requested:
```java
public final Option addBooleanOption( char shortForm, String longForm ) {
return addOption(new Option.BooleanOption(shortForm, longForm));
}
```
Hope this helps! |
amedia/meteo | meteo-jaxb/src/main/java/no/api/meteo/jaxb/locationforecast/v1_9/ObjectFactory.java | ObjectFactory.createLocationTypeDewpointTemperature | @XmlElementDecl(namespace = "", name = "dewpointTemperature", scope = LocationType.class)
public JAXBElement<Temperature> createLocationTypeDewpointTemperature(Temperature value) {
return new JAXBElement<Temperature>(_LocationTypeDewpointTemperature_QNAME, Temperature.class, LocationType.class, value);
... | java | @XmlElementDecl(namespace = "", name = "dewpointTemperature", scope = LocationType.class)
public JAXBElement<Temperature> createLocationTypeDewpointTemperature(Temperature value) {
return new JAXBElement<Temperature>(_LocationTypeDewpointTemperature_QNAME, Temperature.class, LocationType.class, value);
... | [
"@",
"XmlElementDecl",
"(",
"namespace",
"=",
"\"\"",
",",
"name",
"=",
"\"dewpointTemperature\"",
",",
"scope",
"=",
"LocationType",
".",
"class",
")",
"public",
"JAXBElement",
"<",
"Temperature",
">",
"createLocationTypeDewpointTemperature",
"(",
"Temperature",
"v... | Create an instance of {@link JAXBElement }{@code <}{@link Temperature }{@code >}} | [
"Create",
"an",
"instance",
"of",
"{",
"@link",
"JAXBElement",
"}",
"{",
"@code",
"<",
"}",
"{",
"@link",
"Temperature",
"}",
"{",
"@code",
">",
"}}"
] | cbb59e1c2f889d15c24f3625d1769b543d4af595 | https://github.com/amedia/meteo/blob/cbb59e1c2f889d15c24f3625d1769b543d4af595/meteo-jaxb/src/main/java/no/api/meteo/jaxb/locationforecast/v1_9/ObjectFactory.java#L645-L648 | test | Create an instance of the JAXBElement required to represent a temperature of the Dewpoint. | Of course, here is the Java code you requested:
```java
@XmlElementDecl(namespace = "", name = "dewpointTemperature", scope = LocationType.class)
public JAXBElement<Temperature> createLocationTypeDewpointTemperature(Temperature value) {
return new JAXBElement<Temperature>(_LocationTypeDewpointTemperature_Q... |
ReactiveX/RxJava | src/main/java/io/reactivex/internal/util/AppendOnlyLinkedArrayList.java | AppendOnlyLinkedArrayList.accept | public <U> boolean accept(Observer<? super U> observer) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
break;
}
if (N... | java | public <U> boolean accept(Observer<? super U> observer) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
break;
}
if (N... | [
"public",
"<",
"U",
">",
"boolean",
"accept",
"(",
"Observer",
"<",
"?",
"super",
"U",
">",
"observer",
")",
"{",
"Object",
"[",
"]",
"a",
"=",
"head",
";",
"final",
"int",
"c",
"=",
"capacity",
";",
"while",
"(",
"a",
"!=",
"null",
")",
"{",
"... | Interprets the contents as NotificationLite objects and calls
the appropriate Observer method.
@param <U> the target type
@param observer the observer to emit the events to
@return true if a terminal event has been reached | [
"Interprets",
"the",
"contents",
"as",
"NotificationLite",
"objects",
"and",
"calls",
"the",
"appropriate",
"Observer",
"method",
"."
] | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/internal/util/AppendOnlyLinkedArrayList.java#L136-L153 | test | Returns true if the notification is accepted. | Of course, here is the Java code you requested:
```java
public <U> boolean accept(Observer<? super U> observer) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
... |
snakerflow/snakerflow | snaker-core/src/main/java/org/snaker/engine/access/AbstractDBAccess.java | AbstractDBAccess.runScript | public void runScript() {
String autoStr = ConfigHelper.getProperty("schema.auto");
if(autoStr == null || !autoStr.equalsIgnoreCase("true")) {
return;
}
Connection conn = null;
try {
conn = getConnection();
if(JdbcHelper.isExec(conn)) {
... | java | public void runScript() {
String autoStr = ConfigHelper.getProperty("schema.auto");
if(autoStr == null || !autoStr.equalsIgnoreCase("true")) {
return;
}
Connection conn = null;
try {
conn = getConnection();
if(JdbcHelper.isExec(conn)) {
... | [
"public",
"void",
"runScript",
"(",
")",
"{",
"String",
"autoStr",
"=",
"ConfigHelper",
".",
"getProperty",
"(",
"\"schema.auto\"",
")",
";",
"if",
"(",
"autoStr",
"==",
"null",
"||",
"!",
"autoStr",
".",
"equalsIgnoreCase",
"(",
"\"true\"",
")",
")",
"{",... | 运行脚本 | [
"运行脚本"
] | 9c8cb3148a76702f1eda22f1d113053cb44b1eff | https://github.com/snakerflow/snakerflow/blob/9c8cb3148a76702f1eda22f1d113053cb44b1eff/snaker-core/src/main/java/org/snaker/engine/access/AbstractDBAccess.java#L1040-L1065 | test | Run the SQL script. | Of course, here is the Java code you requested:
```java
public void runScript() {
String autoStr = ConfigHelper.getProperty("schema.auto");
if(autoStr == null || !autoStr.equalsIgnoreCase("true")) {
return;
}
Connection conn = null;
try {
conn = getConnec... |
Koekiebox-PTY-LTD/Fluid | fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/form/FormContainerClient.java | FormContainerClient.executeCustomWebAction | public Form executeCustomWebAction(
String customWebActionParam,
Form formParam) {
return this.executeCustomWebAction(
customWebActionParam,
false,
null,
formParam);
} | java | public Form executeCustomWebAction(
String customWebActionParam,
Form formParam) {
return this.executeCustomWebAction(
customWebActionParam,
false,
null,
formParam);
} | [
"public",
"Form",
"executeCustomWebAction",
"(",
"String",
"customWebActionParam",
",",
"Form",
"formParam",
")",
"{",
"return",
"this",
".",
"executeCustomWebAction",
"(",
"customWebActionParam",
",",
"false",
",",
"null",
",",
"formParam",
")",
";",
"}"
] | Execute the Custom Program with action alias {@code customWebActionParam}.
This method may be used for Form and Table Records.
@param customWebActionParam The custom web action name. Action identifier.
@param formParam The Form to send for 3rd Party execution.
@return Result after the 3rd Party Custom Web Action comp... | [
"Execute",
"the",
"Custom",
"Program",
"with",
"action",
"alias",
"{",
"@code",
"customWebActionParam",
"}",
".",
"This",
"method",
"may",
"be",
"used",
"for",
"Form",
"and",
"Table",
"Records",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/form/FormContainerClient.java#L131-L139 | test | Execute a custom CRASS AUTOMATIC_WEB_ACTION. | Of course, here is the Java code you requested:
```java
public Form executeCustomWebAction(
String customWebActionParam,
Form formParam) {
return this.executeCustomWebAction(
customWebActionParam,
false,
null,
formParam);
... |
js-lib-com/tiny-container | src/main/java/js/container/Container.java | Container.convertersInitialization | private static void convertersInitialization(Config config) throws ConfigException {
Config section = config.getChild("converters");
if (section == null) {
return;
}
for (Config el : section.findChildren("type")) {
String className = el.getAttribute("class");
Class<?> valueType = Classes.forOpti... | java | private static void convertersInitialization(Config config) throws ConfigException {
Config section = config.getChild("converters");
if (section == null) {
return;
}
for (Config el : section.findChildren("type")) {
String className = el.getAttribute("class");
Class<?> valueType = Classes.forOpti... | [
"private",
"static",
"void",
"convertersInitialization",
"(",
"Config",
"config",
")",
"throws",
"ConfigException",
"{",
"Config",
"section",
"=",
"config",
".",
"getChild",
"(",
"\"converters\"",
")",
";",
"if",
"(",
"section",
"==",
"null",
")",
"{",
"return... | Declarative converters registration. This utility scans for <code>converters</code> section into given configuration
object and register converters via {@link ConverterRegistry#registerConverter(Class, Class)}.
<p>
Configuration converter section should respect below syntax.
<pre>
<converters>
<type class="ja... | [
"Declarative",
"converters",
"registration",
".",
"This",
"utility",
"scans",
"for",
"<code",
">",
"converters<",
"/",
"code",
">",
"section",
"into",
"given",
"configuration",
"object",
"and",
"register",
"converters",
"via",
"{",
"@link",
"ConverterRegistry#regist... | ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e | https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/container/Container.java#L889-L909 | test | Initializes the converters section. | Of course, here is the Java code you requested:
```java
private static void convertersInitialization(Config config) throws ConfigException {
Config section = config.getChild("converters");
if (section == null) {
return;
}
for (Config el : section.findChildren("type")) {
String className = el.getAtt... |
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.mergeArray | @SuppressWarnings({ "unchecked", "rawtypes" })
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Observable<T> mergeArray(ObservableSource<? extends T>... sources) {
return fromArray(sources).flatMap((Function)Functions.identity(), sources.length);
} | java | @SuppressWarnings({ "unchecked", "rawtypes" })
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Observable<T> mergeArray(ObservableSource<? extends T>... sources) {
return fromArray(sources).flatMap((Function)Functions.identity(), sources.length);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"static",
"<",
"T",
">",
"Observable",
"<",
"T",
">",
"mergeArray",
"(",
... | Flattens an Array of ObservableSources into one ObservableSource, without any transformation.
<p>
<img width="640" height="370" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/merge.io.png" alt="">
<p>
You can combine items emitted by multiple ObservableSources so that they appear as a single Obse... | [
"Flattens",
"an",
"Array",
"of",
"ObservableSources",
"into",
"one",
"ObservableSource",
"without",
"any",
"transformation",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"370",
"src",
"=",
"https",
":",
"//",
"raw",
".",
"github",
".",
"com"... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L3204-L3209 | test | Merge an array of observable sources into one single source. | Of course, here is the Java code you requested:
```java
@SuppressWarnings({ "unchecked", "rawtypes" })
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Observable<T> mergeArray(ObservableSource<? extends T>... sources) {
return fromArray(sources).flatMap((Function)Functi... |
lessthanoptimal/GeoRegression | main/src/georegression/geometry/ConvertRotation3D_F64.java | ConvertRotation3D_F64.rotZ | public static DMatrixRMaj rotZ( double ang, DMatrixRMaj R ) {
R = checkDeclare3x3( R );
setRotZ( ang, R );
return R;
} | java | public static DMatrixRMaj rotZ( double ang, DMatrixRMaj R ) {
R = checkDeclare3x3( R );
setRotZ( ang, R );
return R;
} | [
"public",
"static",
"DMatrixRMaj",
"rotZ",
"(",
"double",
"ang",
",",
"DMatrixRMaj",
"R",
")",
"{",
"R",
"=",
"checkDeclare3x3",
"(",
"R",
")",
";",
"setRotZ",
"(",
"ang",
",",
"R",
")",
";",
"return",
"R",
";",
"}"
] | Creates a rotation matrix about the z-axis.
@param ang the angle it rotates a point by in radians.
@param R (Output) Optional storage for rotation matrix. Modified.
@return The 3 by 3 rotation matrix. | [
"Creates",
"a",
"rotation",
"matrix",
"about",
"the",
"z",
"-",
"axis",
"."
] | c067cd44a4e95bd826119f6e658bd82386ef289f | https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/ConvertRotation3D_F64.java#L491-L497 | test | Rotates the matrix by a rotation angle. | Of course, here is the Java code you requested:
```java
public static DMatrixRMaj rotZ( double ang, DMatrixRMaj R ) {
R = checkDeclare3x3( R );
setRotZ( ang, R );
return R;
}
```
Hope this helps! |
apache/parquet-mr | parquet-column/src/main/java/org/apache/parquet/column/statistics/BinaryStatistics.java | BinaryStatistics.setMinMaxFromBytes | @Override
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) {
max = Binary.fromReusedByteArray(maxBytes);
min = Binary.fromReusedByteArray(minBytes);
this.markAsNotEmpty();
} | java | @Override
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) {
max = Binary.fromReusedByteArray(maxBytes);
min = Binary.fromReusedByteArray(minBytes);
this.markAsNotEmpty();
} | [
"@",
"Override",
"public",
"void",
"setMinMaxFromBytes",
"(",
"byte",
"[",
"]",
"minBytes",
",",
"byte",
"[",
"]",
"maxBytes",
")",
"{",
"max",
"=",
"Binary",
".",
"fromReusedByteArray",
"(",
"maxBytes",
")",
";",
"min",
"=",
"Binary",
".",
"fromReusedByte... | Sets min and max values, re-uses the byte[] passed in.
Any changes made to byte[] will be reflected in min and max values as well.
@param minBytes byte array to set the min value to
@param maxBytes byte array to set the max value to | [
"Sets",
"min",
"and",
"max",
"values",
"re",
"-",
"uses",
"the",
"byte",
"[]",
"passed",
"in",
".",
"Any",
"changes",
"made",
"to",
"byte",
"[]",
"will",
"be",
"reflected",
"in",
"min",
"and",
"max",
"values",
"as",
"well",
"."
] | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/column/statistics/BinaryStatistics.java#L79-L84 | test | Sets the min and max values from the byte array. | Of course, here is the Java code you requested:
```java
@Override
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) {
max = Binary.fromReusedByteArray(maxBytes);
min = Binary.fromReusedByteArray(minBytes);
this.markAsNotEmpty();
}
```
Hope this helps! |
nyla-solutions/gedi-geode | gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/lucene/GeodeLuceneSearch.java | GeodeLuceneSearch.clearSearchResultsByPage | public Collection<String> clearSearchResultsByPage(TextPageCriteria criteria, Region<String,Collection<?>> pageRegion)
{
Collection<String> pageKeys = Querier.query("select * from /"+criteria.getPageRegionName()+".keySet() k where k like '"+criteria.getId()+"%'");
pageRegion.removeAll(pageKeys);
retur... | java | public Collection<String> clearSearchResultsByPage(TextPageCriteria criteria, Region<String,Collection<?>> pageRegion)
{
Collection<String> pageKeys = Querier.query("select * from /"+criteria.getPageRegionName()+".keySet() k where k like '"+criteria.getId()+"%'");
pageRegion.removeAll(pageKeys);
retur... | [
"public",
"Collection",
"<",
"String",
">",
"clearSearchResultsByPage",
"(",
"TextPageCriteria",
"criteria",
",",
"Region",
"<",
"String",
",",
"Collection",
"<",
"?",
">",
">",
"pageRegion",
")",
"{",
"Collection",
"<",
"String",
">",
"pageKeys",
"=",
"Querie... | ------------------------------------------------ | [
"------------------------------------------------"
] | 3dd71d6e66e941ce350b306b70677ee95a7d9eee | https://github.com/nyla-solutions/gedi-geode/blob/3dd71d6e66e941ce350b306b70677ee95a7d9eee/gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/lucene/GeodeLuceneSearch.java#L191-L199 | test | Clear the search results from the specified page. | Of course, here is the Java code you requested:
```java
public Collection<String> clearSearchResultsByPage(TextPageCriteria criteria, Region<String,Collection<?>> pageRegion)
{
Collection<String> pageKeys = Querier.query("select * from /"+criteria.getPageRegionName()+".keySet() k where k like '"+criteria.getId()+... |
arnohaase/a-foundation | a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java | ACollectionHelper.flatMapSet | public static <T, X, E extends Throwable> Set<X> flatMapSet(Iterable<T> coll, AFunction1<? super T, ? extends Iterable<X>, E> f) throws E {
final Set<X> result = new HashSet<>();
for(T o: coll) {
for(X el: f.apply(o)) {
result.add(el);
}
}
return... | java | public static <T, X, E extends Throwable> Set<X> flatMapSet(Iterable<T> coll, AFunction1<? super T, ? extends Iterable<X>, E> f) throws E {
final Set<X> result = new HashSet<>();
for(T o: coll) {
for(X el: f.apply(o)) {
result.add(el);
}
}
return... | [
"public",
"static",
"<",
"T",
",",
"X",
",",
"E",
"extends",
"Throwable",
">",
"Set",
"<",
"X",
">",
"flatMapSet",
"(",
"Iterable",
"<",
"T",
">",
"coll",
",",
"AFunction1",
"<",
"?",
"super",
"T",
",",
"?",
"extends",
"Iterable",
"<",
"X",
">",
... | Same as <code>map()</code>, except that the transformation function returns collections and all the results are
flattened into a single collection. | [
"Same",
"as",
"<code",
">",
"map",
"()",
"<",
"/",
"code",
">",
"except",
"that",
"the",
"transformation",
"function",
"returns",
"collections",
"and",
"all",
"the",
"results",
"are",
"flattened",
"into",
"a",
"single",
"collection",
"."
] | f3eef2ca89d67775f202a4c28140230a6229291e | https://github.com/arnohaase/a-foundation/blob/f3eef2ca89d67775f202a4c28140230a6229291e/a-foundation/src/main/java/com/ajjpj/afoundation/collection/ACollectionHelper.java#L229-L239 | test | Flat map Set. | Of course, here is the Java code you requested:
```java
public static <T, X, E extends Throwable> Set<X> flatMapSet(Iterable<T> coll, AFunction1<? super T, ? extends Iterable<X>, E> f) throws E {
final Set<X> result = new HashSet<>();
for(T o: coll) {
for(X el: f.apply(o)) {
... |
rupertlssmith/lojix | debugger/swing_utils/src/main/com/thesett/aima/logic/fol/wam/debugger/swing/DesktopAppLayout.java | DesktopAppLayout.addLayoutComponent | public void addLayoutComponent(String name, Component comp)
{
componentMap.put(name, comp);
reverseMap.put(comp, name);
} | java | public void addLayoutComponent(String name, Component comp)
{
componentMap.put(name, comp);
reverseMap.put(comp, name);
} | [
"public",
"void",
"addLayoutComponent",
"(",
"String",
"name",
",",
"Component",
"comp",
")",
"{",
"componentMap",
".",
"put",
"(",
"name",
",",
"comp",
")",
";",
"reverseMap",
".",
"put",
"(",
"comp",
",",
"name",
")",
";",
"}"
] | {@inheritDoc} | [
"{"
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/debugger/swing_utils/src/main/com/thesett/aima/logic/fol/wam/debugger/swing/DesktopAppLayout.java#L122-L126 | test | Add a layout component to the class. | Of course, here is the Java code you requested:
```java
public void addLayoutComponent(String name, Component comp)
{
componentMap.put(name, comp);
reverseMap.put(comp, name);
}
```
Hope this helps! |
orientechnologies/orientdb | core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/stream/OStreamSerializerAnyStreamable.java | OStreamSerializerAnyStreamable.toStream | public byte[] toStream(final OCommandRequestText iObject) throws IOException {
if (iObject == null)
return null;
// SERIALIZE THE CLASS NAME
final byte[] className;
if (iObject instanceof OLiveQuery<?>)
className = iObject.getClass().getName().getBytes("UTF-8");
else if (iObject... | java | public byte[] toStream(final OCommandRequestText iObject) throws IOException {
if (iObject == null)
return null;
// SERIALIZE THE CLASS NAME
final byte[] className;
if (iObject instanceof OLiveQuery<?>)
className = iObject.getClass().getName().getBytes("UTF-8");
else if (iObject... | [
"public",
"byte",
"[",
"]",
"toStream",
"(",
"final",
"OCommandRequestText",
"iObject",
")",
"throws",
"IOException",
"{",
"if",
"(",
"iObject",
"==",
"null",
")",
"return",
"null",
";",
"// SERIALIZE THE CLASS NAME\r",
"final",
"byte",
"[",
"]",
"className",
... | Serialize the class name size + class name + object content | [
"Serialize",
"the",
"class",
"name",
"size",
"+",
"class",
"name",
"+",
"object",
"content"
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/stream/OStreamSerializerAnyStreamable.java#L98-L129 | test | Converts an object to a stream of bytes. | Of course, here is the Java code you requested:
```java
public byte[] toStream(final OCommandRequestText iObject) throws IOException {
if (iObject == null)
return null;
// SERIALIZE THE CLASS NAME
final byte[] className;
if (iObject instanceof OLiveQuery<?>)
className = iObject.getC... |
ReactiveX/RxJava | src/main/java/io/reactivex/Flowable.java | Flowable.mergeWith | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> mergeWith(@NonNull SingleSource<? extends T> other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new Flowable... | java | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> mergeWith(@NonNull SingleSource<? extends T> other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new Flowable... | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"FULL",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Flowable",
"<",
"T",
">",
"mergeWith",
"(",
"@",
"NonNull",
... | Merges the sequence of items of this Flowable with the success value of the other SingleSource.
<p>
<img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/merge.png" alt="">
<p>
The success value of the other {@code SingleSource} can get interleaved at any point of this
{@co... | [
"Merges",
"the",
"sequence",
"of",
"items",
"of",
"this",
"Flowable",
"with",
"the",
"success",
"value",
"of",
"the",
"other",
"SingleSource",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"380",
"src",
"=",
"https",
":",
"//",
"raw",
"."... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L11429-L11436 | test | Merge two single sources into one single source. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> mergeWith(@NonNull SingleSource<? extends T> other) {
ObjectHelper.requireNonNull(other, "other is nul... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/dataset/DatasetConstructor.java | DatasetConstructor.transferDataset | static public void transferDataset(NetcdfFile src, NetcdfDataset target, ReplaceVariableCheck replaceCheck) {
transferGroup(src, target, src.getRootGroup(), target.getRootGroup(), replaceCheck);
} | java | static public void transferDataset(NetcdfFile src, NetcdfDataset target, ReplaceVariableCheck replaceCheck) {
transferGroup(src, target, src.getRootGroup(), target.getRootGroup(), replaceCheck);
} | [
"static",
"public",
"void",
"transferDataset",
"(",
"NetcdfFile",
"src",
",",
"NetcdfDataset",
"target",
",",
"ReplaceVariableCheck",
"replaceCheck",
")",
"{",
"transferGroup",
"(",
"src",
",",
"target",
",",
"src",
".",
"getRootGroup",
"(",
")",
",",
"target",
... | Copy contents of "src" to "target". skip ones that already exist (by name).
Dimensions and Variables are replaced with equivalent elements, but unlimited dimensions are turned into regular dimensions.
Attribute doesnt have to be replaced because its immutable, so its copied by reference.
@param src transfer from here.... | [
"Copy",
"contents",
"of",
"src",
"to",
"target",
".",
"skip",
"ones",
"that",
"already",
"exist",
"(",
"by",
"name",
")",
".",
"Dimensions",
"and",
"Variables",
"are",
"replaced",
"with",
"equivalent",
"elements",
"but",
"unlimited",
"dimensions",
"are",
"tu... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/DatasetConstructor.java#L29-L31 | test | Transfers a dataset to another dataset. | Of course, here is the Java code you requested:
```java
static public void transferDataset(NetcdfFile src, NetcdfDataset target, ReplaceVariableCheck replaceCheck) {
transferGroup(src, target, src.getRootGroup(), target.getRootGroup(), replaceCheck);
}
```
Hope this helps! |
arnohaase/a-foundation | a-foundation/src/main/java/com/ajjpj/afoundation/concurrent/AThreadPoolImpl.java | AThreadPoolImpl.getStatistics | @Override public AThreadPoolStatistics getStatistics() {
final AWorkerThreadStatistics[] workerStats = new AWorkerThreadStatistics[localQueues.length];
for (int i=0; i<localQueues.length; i++) {
//noinspection ConstantConditions
workerStats[i] = localQueues[i].thread.getStatistic... | java | @Override public AThreadPoolStatistics getStatistics() {
final AWorkerThreadStatistics[] workerStats = new AWorkerThreadStatistics[localQueues.length];
for (int i=0; i<localQueues.length; i++) {
//noinspection ConstantConditions
workerStats[i] = localQueues[i].thread.getStatistic... | [
"@",
"Override",
"public",
"AThreadPoolStatistics",
"getStatistics",
"(",
")",
"{",
"final",
"AWorkerThreadStatistics",
"[",
"]",
"workerStats",
"=",
"new",
"AWorkerThreadStatistics",
"[",
"localQueues",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",... | This method returns an approximation of statistical data for all worker threads since the pool was started. Updates of the statistical data is done without synchronization,
so some or all of the data may be stale, and some numbers may be pretty outdated while others are very current, even for the same thread. For long-... | [
"This",
"method",
"returns",
"an",
"approximation",
"of",
"statistical",
"data",
"for",
"all",
"worker",
"threads",
"since",
"the",
"pool",
"was",
"started",
".",
"Updates",
"of",
"the",
"statistical",
"data",
"is",
"done",
"without",
"synchronization",
"so",
... | f3eef2ca89d67775f202a4c28140230a6229291e | https://github.com/arnohaase/a-foundation/blob/f3eef2ca89d67775f202a4c28140230a6229291e/a-foundation/src/main/java/com/ajjpj/afoundation/concurrent/AThreadPoolImpl.java#L100-L113 | test | Get the thread pool statistics. | Of course, here is the Java code you requested:
```java
@Override public AThreadPoolStatistics getStatistics() {
final AWorkerThreadStatistics[] workerStats = new AWorkerThreadStatistics[localQueues.length];
for (int i=0; i<localQueues.length; i++) {
//noinspection ConstantConditions
... |
turbomanage/storm-gen | storm-apt/api/src/main/java/com/turbomanage/storm/csv/CsvUtils.java | CsvUtils.nextValue | public static String nextValue(StringReader in) throws IOException {
StringWriter w = new StringWriter();
boolean inQuotedValue = false;
boolean openQuote = false;
int c = in.read();
if (c == QUOTE)
inQuotedValue = true;
else if (c == DELIMITER) {
return null;
} else if (c >= 0) {
w.write(c);
}... | java | public static String nextValue(StringReader in) throws IOException {
StringWriter w = new StringWriter();
boolean inQuotedValue = false;
boolean openQuote = false;
int c = in.read();
if (c == QUOTE)
inQuotedValue = true;
else if (c == DELIMITER) {
return null;
} else if (c >= 0) {
w.write(c);
}... | [
"public",
"static",
"String",
"nextValue",
"(",
"StringReader",
"in",
")",
"throws",
"IOException",
"{",
"StringWriter",
"w",
"=",
"new",
"StringWriter",
"(",
")",
";",
"boolean",
"inQuotedValue",
"=",
"false",
";",
"boolean",
"openQuote",
"=",
"false",
";",
... | Obtains the next value from a {@link StringReader}.
@param in
@return An escaped value
@throws IOException | [
"Obtains",
"the",
"next",
"value",
"from",
"a",
"{",
"@link",
"StringReader",
"}",
"."
] | 22caa69439548a074d035745215bce5aff55853d | https://github.com/turbomanage/storm-gen/blob/22caa69439548a074d035745215bce5aff55853d/storm-apt/api/src/main/java/com/turbomanage/storm/csv/CsvUtils.java#L127-L167 | test | This method returns the next value from the given reader. | Of course, here is the Java code you requested:
```java
public static String nextValue(StringReader in) throws IOException {
StringWriter w = new StringWriter();
boolean inQuotedValue = false;
boolean openQuote = false;
int c = in.read();
if (c == QUOTE)
inQuotedValue = true;
else if (c == DELIMITER) {
... |
OpenEstate/OpenEstate-IO | Core/src/main/java/org/openestate/io/core/CsvFormat.java | CsvFormat.parse | @SuppressFBWarnings(
value = "OBL_UNSATISFIED_OBLIGATION",
justification = "The stream is closed later together with the parser.")
public final Parser parse(File csvFile) throws IOException {
return this.parse(new FileInputStream(csvFile));
} | java | @SuppressFBWarnings(
value = "OBL_UNSATISFIED_OBLIGATION",
justification = "The stream is closed later together with the parser.")
public final Parser parse(File csvFile) throws IOException {
return this.parse(new FileInputStream(csvFile));
} | [
"@",
"SuppressFBWarnings",
"(",
"value",
"=",
"\"OBL_UNSATISFIED_OBLIGATION\"",
",",
"justification",
"=",
"\"The stream is closed later together with the parser.\"",
")",
"public",
"final",
"Parser",
"parse",
"(",
"File",
"csvFile",
")",
"throws",
"IOException",
"{",
"re... | Creates a {@link CsvParser} from a {@link File} with CSV data.
@param csvFile CSV file
@return created parser
@throws IOException if CSV is not readable | [
"Creates",
"a",
"{",
"@link",
"CsvParser",
"}",
"from",
"a",
"{",
"@link",
"File",
"}",
"with",
"CSV",
"data",
"."
] | f961dae78f40823f05a8c0d4e59d639e718aa18a | https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/Core/src/main/java/org/openestate/io/core/CsvFormat.java#L111-L116 | test | Parses the CSV file. | Of course, here is the Java code you requested:
```java
@SuppressFBWarnings(
value = "OBL_UNSATISFIED_OBLIGATION",
justification = "The stream is closed later together with the parser.")
public final Parser parse(File csvFile) throws IOException {
return this.parse(new FileInputStre... |
artclarke/humble-video | humble-video-noarch/src/main/java/io/humble/video/javaxsound/AudioFrame.java | AudioFrame.make | public static AudioFrame make(final AudioFormat audioFormat) {
try {
return new AudioFrame(audioFormat);
} catch (LineUnavailableException e) {
log.error("Could not get audio data line: {}", e.getMessage());
return null;
}
} | java | public static AudioFrame make(final AudioFormat audioFormat) {
try {
return new AudioFrame(audioFormat);
} catch (LineUnavailableException e) {
log.error("Could not get audio data line: {}", e.getMessage());
return null;
}
} | [
"public",
"static",
"AudioFrame",
"make",
"(",
"final",
"AudioFormat",
"audioFormat",
")",
"{",
"try",
"{",
"return",
"new",
"AudioFrame",
"(",
"audioFormat",
")",
";",
"}",
"catch",
"(",
"LineUnavailableException",
"e",
")",
"{",
"log",
".",
"error",
"(",
... | Get a connection to the speaker, if available.
@param audioFormat The java audio format that we will use.
@return A new audio format, or null if we cannot create one. | [
"Get",
"a",
"connection",
"to",
"the",
"speaker",
"if",
"available",
"."
] | aa349ae2d7ef74160b7074feac8d298cf90394d1 | https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/javaxsound/AudioFrame.java#L53-L60 | test | Create a new audio frame from the given audio format. | Of course, here is the Java code you requested:
```java
public static AudioFrame make(final AudioFormat audioFormat) {
try {
return new AudioFrame(audioFormat);
} catch (LineUnavailableException e) {
log.error("Could not get audio data line: {}", e.getMessage());
return null;
}
}
```
H... |
Netflix/hollow | hollow/src/main/java/com/netflix/hollow/core/memory/ThreadSafeBitSet.java | ThreadSafeBitSet.getSegment | private AtomicLongArray getSegment(int segmentIndex) {
ThreadSafeBitSetSegments visibleSegments = segments.get();
while(visibleSegments.numSegments() <= segmentIndex) {
/// Thread safety: newVisibleSegments contains all of the segments from the currently visible segments, plus extra.
... | java | private AtomicLongArray getSegment(int segmentIndex) {
ThreadSafeBitSetSegments visibleSegments = segments.get();
while(visibleSegments.numSegments() <= segmentIndex) {
/// Thread safety: newVisibleSegments contains all of the segments from the currently visible segments, plus extra.
... | [
"private",
"AtomicLongArray",
"getSegment",
"(",
"int",
"segmentIndex",
")",
"{",
"ThreadSafeBitSetSegments",
"visibleSegments",
"=",
"segments",
".",
"get",
"(",
")",
";",
"while",
"(",
"visibleSegments",
".",
"numSegments",
"(",
")",
"<=",
"segmentIndex",
")",
... | Get the segment at <code>segmentIndex</code>. If this segment does not yet exist, create it.
@param segmentIndex the segment index
@return the segment | [
"Get",
"the",
"segment",
"at",
"<code",
">",
"segmentIndex<",
"/",
"code",
">",
".",
"If",
"this",
"segment",
"does",
"not",
"yet",
"exist",
"create",
"it",
"."
] | 43ca100034a01050fb764170bd32b085ac9a3c22 | https://github.com/Netflix/hollow/blob/43ca100034a01050fb764170bd32b085ac9a3c22/hollow/src/main/java/com/netflix/hollow/core/memory/ThreadSafeBitSet.java#L302-L323 | test | Get the segment from the segments. | Of course, here is the Java code you requested:
```java
private AtomicLongArray getSegment(int segmentIndex) {
ThreadSafeBitSetSegments visibleSegments = segments.get();
while(visibleSegments.numSegments() <= segmentIndex) {
/// Thread safety: newVisibleSegments contains all of the segmen... |
RuedigerMoeller/fast-serialization | src/main/java/org/nustaq/serialization/simpleapi/OnHeapCoder.java | OnHeapCoder.toByteArray | @Override
public int toByteArray( Object o, byte arr[], int startIndex, int availableSize ) {
out.resetForReUse();
writeTarget.setBase(arr, startIndex, availableSize);
try {
out.writeObject(o);
} catch (IOException e) {
FSTUtil.<RuntimeException>rethrow(e);
... | java | @Override
public int toByteArray( Object o, byte arr[], int startIndex, int availableSize ) {
out.resetForReUse();
writeTarget.setBase(arr, startIndex, availableSize);
try {
out.writeObject(o);
} catch (IOException e) {
FSTUtil.<RuntimeException>rethrow(e);
... | [
"@",
"Override",
"public",
"int",
"toByteArray",
"(",
"Object",
"o",
",",
"byte",
"arr",
"[",
"]",
",",
"int",
"startIndex",
",",
"int",
"availableSize",
")",
"{",
"out",
".",
"resetForReUse",
"(",
")",
";",
"writeTarget",
".",
"setBase",
"(",
"arr",
"... | throws FSTBufferTooSmallExcpetion in case object does not fit into given range
Zero Copy method
@param o
@param availableSize
@throws java.io.IOException
@return number of bytes written to the memory region | [
"throws",
"FSTBufferTooSmallExcpetion",
"in",
"case",
"object",
"does",
"not",
"fit",
"into",
"given",
"range",
"Zero",
"Copy",
"method"
] | 59f8f800b79479d0b9c80901cf55903d9b027f26 | https://github.com/RuedigerMoeller/fast-serialization/blob/59f8f800b79479d0b9c80901cf55903d9b027f26/src/main/java/org/nustaq/serialization/simpleapi/OnHeapCoder.java#L115-L126 | test | This method is used to write a byte array to the underlying stream. | Of course, here is the Java code you requested:
```java
@Override
public int toByteArray( Object o, byte arr[], int startIndex, int availableSize ) {
out.resetForReUse();
writeTarget.setBase(arr, startIndex, availableSize);
try {
out.writeObject(o);
} catch (IOException ... |
GojaFramework/goja | goja-core/src/main/java/goja/core/libs/XML.java | XML.getDocument | public static Document getDocument(File file) {
try {
return newDocumentBuilder().parse(file);
} catch (SAXException e) {
logger.warn("Parsing error when building Document object from xml file '" + file + "'.", e);
} catch (IOException e) {
logger.warn("Readin... | java | public static Document getDocument(File file) {
try {
return newDocumentBuilder().parse(file);
} catch (SAXException e) {
logger.warn("Parsing error when building Document object from xml file '" + file + "'.", e);
} catch (IOException e) {
logger.warn("Readin... | [
"public",
"static",
"Document",
"getDocument",
"(",
"File",
"file",
")",
"{",
"try",
"{",
"return",
"newDocumentBuilder",
"(",
")",
".",
"parse",
"(",
"file",
")",
";",
"}",
"catch",
"(",
"SAXException",
"e",
")",
"{",
"logger",
".",
"warn",
"(",
"\"Pa... | Parse an XML file to DOM
@return null if an error occurs during parsing. | [
"Parse",
"an",
"XML",
"file",
"to",
"DOM"
] | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/libs/XML.java#L91-L100 | test | Gets the Document object from the XML file. | Of course, here is the Java code you requested:
```java
public static Document getDocument(File file) {
try {
return newDocumentBuilder().parse(file);
} catch (SAXException e) {
logger.warn("Parsing error when building Document object from xml file '" + file + "'.", e);
... |
oaqa/baseqa | src/main/java/edu/cmu/lti/oaqa/type/kb/ConceptMention.java | ConceptMention.getScore | public double getScore() {
if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_score == null)
jcasType.jcas.throwFeatMissing("score", "edu.cmu.lti.oaqa.type.kb.ConceptMention");
return jcasType.ll_cas.ll_getDoubleValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_score);} | java | public double getScore() {
if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_score == null)
jcasType.jcas.throwFeatMissing("score", "edu.cmu.lti.oaqa.type.kb.ConceptMention");
return jcasType.ll_cas.ll_getDoubleValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_score);} | [
"public",
"double",
"getScore",
"(",
")",
"{",
"if",
"(",
"ConceptMention_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"ConceptMention_Type",
")",
"jcasType",
")",
".",
"casFeat_score",
"==",
"null",
")",
"jcasType",
".",
"jcas",
".",
"throwFeatMissing",
"(",
"\... | getter for score - gets The confidence score that the concept mention matches the concept.
@generated
@return value of the feature | [
"getter",
"for",
"score",
"-",
"gets",
"The",
"confidence",
"score",
"that",
"the",
"concept",
"mention",
"matches",
"the",
"concept",
"."
] | 6ea632d8e51e3e617d4876fc1185c49be0ad7eb8 | https://github.com/oaqa/baseqa/blob/6ea632d8e51e3e617d4876fc1185c49be0ad7eb8/src/main/java/edu/cmu/lti/oaqa/type/kb/ConceptMention.java#L130-L133 | test | getter for score - gets | Of course, here is the Java code you requested:
```java
public double getScore() {
if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_score == null)
jcasType.jcas.throwFeatMissing("score", "edu.cmu.lti.oaqa.type.kb.ConceptMention");
return jcasType.ll_cas.ll_getDoubleValue(addr,... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/iosp/nids/Nidsheader.java | Nidsheader.getUInt | int getUInt( byte[] b, int num )
{
int base=1;
int i;
int word=0;
int bv[] = new int[num];
for (i = 0; i<num; i++ )
{
bv[i] = convertunsignedByte2Short(b[i]);
}
/*
** Calculate the i... | java | int getUInt( byte[] b, int num )
{
int base=1;
int i;
int word=0;
int bv[] = new int[num];
for (i = 0; i<num; i++ )
{
bv[i] = convertunsignedByte2Short(b[i]);
}
/*
** Calculate the i... | [
"int",
"getUInt",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"num",
")",
"{",
"int",
"base",
"=",
"1",
";",
"int",
"i",
";",
"int",
"word",
"=",
"0",
";",
"int",
"bv",
"[",
"]",
"=",
"new",
"int",
"[",
"num",
"]",
";",
"for",
"(",
"i",
"=",
... | get unsigned integer from byte array
@param b
@param num
@return | [
"get",
"unsigned",
"integer",
"from",
"byte",
"array"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/nids/Nidsheader.java#L3008-L3031 | test | Returns the unsigned integer value of a byte array. | Of course, here is the Java code you requested:
```java
int getUInt( byte[] b, int num )
{
int base=1;
int i;
int word=0;
int bv[] = new int[num];
for (i = 0; i<num; i++ )
{
bv[i] = convertunsignedByte2Short(b[... |
phax/ph-math | ph-math/src/main/java/com/helger/numbercruncher/mathutils/RegressionLine.java | RegressionLine.addDataPoint | public void addDataPoint (final DataPoint dataPoint)
{
m_dSumX += dataPoint.getX ();
m_dSumY += dataPoint.getY ();
m_dSumXX += dataPoint.getX () * dataPoint.getX ();
m_dSumXY += dataPoint.getX () * dataPoint.getY ();
++m_nDataPoints;
m_bCoefsValid = false;
} | java | public void addDataPoint (final DataPoint dataPoint)
{
m_dSumX += dataPoint.getX ();
m_dSumY += dataPoint.getY ();
m_dSumXX += dataPoint.getX () * dataPoint.getX ();
m_dSumXY += dataPoint.getX () * dataPoint.getY ();
++m_nDataPoints;
m_bCoefsValid = false;
} | [
"public",
"void",
"addDataPoint",
"(",
"final",
"DataPoint",
"dataPoint",
")",
"{",
"m_dSumX",
"+=",
"dataPoint",
".",
"getX",
"(",
")",
";",
"m_dSumY",
"+=",
"dataPoint",
".",
"getY",
"(",
")",
";",
"m_dSumXX",
"+=",
"dataPoint",
".",
"getX",
"(",
")",
... | Add a new data point: Update the sums.
@param dataPoint
the new data point | [
"Add",
"a",
"new",
"data",
"point",
":",
"Update",
"the",
"sums",
"."
] | 9f998870c7e05226e032b1f38c23e7d45ec0169d | https://github.com/phax/ph-math/blob/9f998870c7e05226e032b1f38c23e7d45ec0169d/ph-math/src/main/java/com/helger/numbercruncher/mathutils/RegressionLine.java#L141-L150 | test | Adds a data point to the data set. | Of course, here is the Java code you requested:
```java
public void addDataPoint (final DataPoint dataPoint)
{
m_dSumX += dataPoint.getX ();
m_dSumY += dataPoint.getY ();
m_dSumXX += dataPoint.getX () * dataPoint.getX ();
m_dSumXY += dataPoint.getX () * dataPoint.getY ();
++m_nDataPoints;
m_... |
wro4j/wro4j | wro4j-extensions/src/main/java/ro/isdc/wro/extensions/script/RhinoScriptBuilder.java | RhinoScriptBuilder.addClientSideEnvironment | public RhinoScriptBuilder addClientSideEnvironment() {
try {
//final InputStream scriptEnv = getClass().getResourceAsStream(SCRIPT_ENV);
final InputStream scriptEnv = new WebjarUriLocator().locate("env.rhino.js");
evaluateChain(scriptEnv, SCRIPT_ENV);
return this;
} catch (final IO... | java | public RhinoScriptBuilder addClientSideEnvironment() {
try {
//final InputStream scriptEnv = getClass().getResourceAsStream(SCRIPT_ENV);
final InputStream scriptEnv = new WebjarUriLocator().locate("env.rhino.js");
evaluateChain(scriptEnv, SCRIPT_ENV);
return this;
} catch (final IO... | [
"public",
"RhinoScriptBuilder",
"addClientSideEnvironment",
"(",
")",
"{",
"try",
"{",
"//final InputStream scriptEnv = getClass().getResourceAsStream(SCRIPT_ENV);\r",
"final",
"InputStream",
"scriptEnv",
"=",
"new",
"WebjarUriLocator",
"(",
")",
".",
"locate",
"(",
"\"env.rh... | Add a client side environment to the script context (client-side aware).
@return {@link RhinoScriptBuilder} used to chain evaluation of the scripts.
@throws IOException | [
"Add",
"a",
"client",
"side",
"environment",
"to",
"the",
"script",
"context",
"(",
"client",
"-",
"side",
"aware",
")",
"."
] | d2a3de71ab8bf0af7061fb6327501e08198338df | https://github.com/wro4j/wro4j/blob/d2a3de71ab8bf0af7061fb6327501e08198338df/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/script/RhinoScriptBuilder.java#L89-L98 | test | Adds the client side environment to the builder. | Of course, here is the Java code you requested:
```java
public RhinoScriptBuilder addClientSideEnvironment() {
try {
//final InputStream scriptEnv = getClass().getResourceAsStream(SCRIPT_ENV);
final InputStream scriptEnv = new WebjarUriLocator().locate("env.rhino.js");
evaluateChain(scriptEnv... |
liveontologies/elk-reasoner | elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/entryset/EntryCollection.java | EntryCollection.clear | @Override
public void clear() {
modCount++;
E[] tab = buckets;
for (int i = 0; i < tab.length; i++)
tab[i] = null;
size = 0;
} | java | @Override
public void clear() {
modCount++;
E[] tab = buckets;
for (int i = 0; i < tab.length; i++)
tab[i] = null;
size = 0;
} | [
"@",
"Override",
"public",
"void",
"clear",
"(",
")",
"{",
"modCount",
"++",
";",
"E",
"[",
"]",
"tab",
"=",
"buckets",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tab",
".",
"length",
";",
"i",
"++",
")",
"tab",
"[",
"i",
"]",
"... | Removes all entries from this set. The set will be empty after this call
returns. | [
"Removes",
"all",
"entries",
"from",
"this",
"set",
".",
"The",
"set",
"will",
"be",
"empty",
"after",
"this",
"call",
"returns",
"."
] | cfbe5279a57e0433d45c1676c7658ddb6e29b9eb | https://github.com/liveontologies/elk-reasoner/blob/cfbe5279a57e0433d45c1676c7658ddb6e29b9eb/elk-util-parent/elk-util-collections/src/main/java/org/semanticweb/elk/util/collections/entryset/EntryCollection.java#L391-L398 | test | Clear the contents of the object. | Of course, here is the Java code you requested:
```java
@Override
public void clear() {
modCount++;
E[] tab = buckets;
for (int i = 0; i < tab.length; i++)
tab[i] = null;
size = 0;
}
```
Hope this helps! |
lessthanoptimal/GeoRegression | main/src/georegression/geometry/GeometryMath_F64.java | GeometryMath_F64.changeSign | public static void changeSign( GeoTuple3D_F64 t ) {
t.x = -t.x;
t.y = -t.y;
t.z = -t.z;
} | java | public static void changeSign( GeoTuple3D_F64 t ) {
t.x = -t.x;
t.y = -t.y;
t.z = -t.z;
} | [
"public",
"static",
"void",
"changeSign",
"(",
"GeoTuple3D_F64",
"t",
")",
"{",
"t",
".",
"x",
"=",
"-",
"t",
".",
"x",
";",
"t",
".",
"y",
"=",
"-",
"t",
".",
"y",
";",
"t",
".",
"z",
"=",
"-",
"t",
".",
"z",
";",
"}"
] | <p>
Changes the sign of the vector:<br>
<br>
T = -T
</p>
@param t Vector whose sign is being changed. Modified. | [
"<p",
">",
"Changes",
"the",
"sign",
"of",
"the",
"vector",
":",
"<br",
">",
"<br",
">",
"T",
"=",
"-",
"T",
"<",
"/",
"p",
">"
] | c067cd44a4e95bd826119f6e658bd82386ef289f | https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/GeometryMath_F64.java#L870-L874 | test | Changes the sign of the input tuple to -. | Of course, here is the Java code you requested:
```java
public static void changeSign( GeoTuple3D_F64 t ) {
t.x = -t.x;
t.y = -t.y;
t.z = -t.z;
}
```
Hope this helps! |
kiegroup/droolsjbpm-tools | drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/DroolsEclipsePlugin.java | DroolsEclipsePlugin.getResourceBundle | public ResourceBundle getResourceBundle() {
try {
if ( resourceBundle == null ) resourceBundle = ResourceBundle.getBundle( "droolsIDE.DroolsIDEPluginResources" );
} catch ( MissingResourceException x ) {
resourceBundle = null;
}
return resourceBundle;
} | java | public ResourceBundle getResourceBundle() {
try {
if ( resourceBundle == null ) resourceBundle = ResourceBundle.getBundle( "droolsIDE.DroolsIDEPluginResources" );
} catch ( MissingResourceException x ) {
resourceBundle = null;
}
return resourceBundle;
} | [
"public",
"ResourceBundle",
"getResourceBundle",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"resourceBundle",
"==",
"null",
")",
"resourceBundle",
"=",
"ResourceBundle",
".",
"getBundle",
"(",
"\"droolsIDE.DroolsIDEPluginResources\"",
")",
";",
"}",
"catch",
"(",
"Miss... | Returns the plugin's resource bundle, | [
"Returns",
"the",
"plugin",
"s",
"resource",
"bundle"
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/DroolsEclipsePlugin.java#L205-L212 | test | Gets the resource bundle. | Of course, here is the Java code you requested:
```java
public ResourceBundle getResourceBundle() {
try {
if ( resourceBundle == null ) resourceBundle = ResourceBundle.getBundle( "droolsIDE.DroolsIDEPluginResources" );
} catch ( MissingResourceException x ) {
resourceBundle = nu... |
ReactiveX/RxJava | src/main/java/io/reactivex/Maybe.java | Maybe.subscribe | @SchedulerSupport(SchedulerSupport.NONE)
public final Disposable subscribe() {
return subscribe(Functions.emptyConsumer(), Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION);
} | java | @SchedulerSupport(SchedulerSupport.NONE)
public final Disposable subscribe() {
return subscribe(Functions.emptyConsumer(), Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION);
} | [
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Disposable",
"subscribe",
"(",
")",
"{",
"return",
"subscribe",
"(",
"Functions",
".",
"emptyConsumer",
"(",
")",
",",
"Functions",
".",
"ON_ERROR_MISSING",
",",
"Functions",... | Subscribes to a Maybe and ignores {@code onSuccess} and {@code onComplete} emissions.
<p>
If the Maybe emits an error, it is wrapped into an
{@link io.reactivex.exceptions.OnErrorNotImplementedException OnErrorNotImplementedException}
and routed to the RxJavaPlugins.onError handler.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>... | [
"Subscribes",
"to",
"a",
"Maybe",
"and",
"ignores",
"{",
"@code",
"onSuccess",
"}",
"and",
"{",
"@code",
"onComplete",
"}",
"emissions",
".",
"<p",
">",
"If",
"the",
"Maybe",
"emits",
"an",
"error",
"it",
"is",
"wrapped",
"into",
"an",
"{",
"@link",
"i... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Maybe.java#L4189-L4192 | test | Subscribes to the empty source. | Of course, here is the Java code you requested:
```java
@SchedulerSupport(SchedulerSupport.NONE)
public final Disposable subscribe() {
return subscribe(Functions.emptyConsumer(), Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION);
}
```
Hope this helps! |
streamsets/datacollector | kafka_multisource-protolib/src/main/java/com/streamsets/pipeline/stage/origin/multikafka/MultiKafkaRawSourcePreviewer.java | MultiKafkaRawSourcePreviewer.convertToRawListString | private <T> String convertToRawListString(Collection<T> collection) {
return "[ " + collection.stream().map(x -> '"'+x.toString()+'"').collect(Collectors.joining(", ")) + " ]";
} | java | private <T> String convertToRawListString(Collection<T> collection) {
return "[ " + collection.stream().map(x -> '"'+x.toString()+'"').collect(Collectors.joining(", ")) + " ]";
} | [
"private",
"<",
"T",
">",
"String",
"convertToRawListString",
"(",
"Collection",
"<",
"T",
">",
"collection",
")",
"{",
"return",
"\"[ \"",
"+",
"collection",
".",
"stream",
"(",
")",
".",
"map",
"(",
"x",
"->",
"'",
"'",
"+",
"x",
".",
"toString",
"... | theoretically they could just copy/paste the output into the Topics bulk edit field in the Kafka config | [
"theoretically",
"they",
"could",
"just",
"copy",
"/",
"paste",
"the",
"output",
"into",
"the",
"Topics",
"bulk",
"edit",
"field",
"in",
"the",
"Kafka",
"config"
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/kafka_multisource-protolib/src/main/java/com/streamsets/pipeline/stage/origin/multikafka/MultiKafkaRawSourcePreviewer.java#L119-L121 | test | Convert a collection to a raw list string. | Of course, here is the Java code you requested:
```java
private <T> String convertToRawListString(Collection<T> collection) {
return "[ " + collection.stream().map(x -> '"'+x.toString()+'"').collect(Collectors.joining(", ")) + " ]";
}
```
Hope this helps! |
Unidata/thredds | cdm/src/main/java/thredds/client/catalog/CatalogRef.java | CatalogRef.translatePathToReletiveLocation | protected String translatePathToReletiveLocation(String dsPath, String configPath) {
if (dsPath == null) return null;
if (dsPath.length() == 0) return null;
if (dsPath.startsWith("/"))
dsPath = dsPath.substring(1);
if (!dsPath.startsWith(configPath))
return null;
// remove the matchin... | java | protected String translatePathToReletiveLocation(String dsPath, String configPath) {
if (dsPath == null) return null;
if (dsPath.length() == 0) return null;
if (dsPath.startsWith("/"))
dsPath = dsPath.substring(1);
if (!dsPath.startsWith(configPath))
return null;
// remove the matchin... | [
"protected",
"String",
"translatePathToReletiveLocation",
"(",
"String",
"dsPath",
",",
"String",
"configPath",
")",
"{",
"if",
"(",
"dsPath",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"dsPath",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",... | /////////////////////////////////////////////// | [
"///////////////////////////////////////////////"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/thredds/client/catalog/CatalogRef.java#L66-L82 | test | Translate a path to a reletive location | Of course, here is the Java code you requested:
```java
protected String translatePathToReletiveLocation(String dsPath, String configPath) {
if (dsPath == null) return null;
if (dsPath.length() == 0) return null;
if (dsPath.startsWith("/"))
dsPath = dsPath.substring(1);
if (!dsPath.startsWith(c... |
mbeiter/jaas | common/src/main/java/org/beiter/michael/authn/jaas/common/propsbuilder/JaasBasedCommonPropsBuilder.java | JaasBasedCommonPropsBuilder.build | @SuppressWarnings({"PMD.ExcessiveMethodLength", "PMD.NPathComplexity", "PMD.CyclomaticComplexity", "PMD.StdCyclomaticComplexity", "PMD.ModifiedCyclomaticComplexity"})
// CHECKSTYLE:ON
public static CommonProperties build(final Map<String, ?> properties) {
Validate.notNull(properties, "The validated obj... | java | @SuppressWarnings({"PMD.ExcessiveMethodLength", "PMD.NPathComplexity", "PMD.CyclomaticComplexity", "PMD.StdCyclomaticComplexity", "PMD.ModifiedCyclomaticComplexity"})
// CHECKSTYLE:ON
public static CommonProperties build(final Map<String, ?> properties) {
Validate.notNull(properties, "The validated obj... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"PMD.ExcessiveMethodLength\"",
",",
"\"PMD.NPathComplexity\"",
",",
"\"PMD.CyclomaticComplexity\"",
",",
"\"PMD.StdCyclomaticComplexity\"",
",",
"\"PMD.ModifiedCyclomaticComplexity\"",
"}",
")",
"// CHECKSTYLE:ON",
"public",
"static",
"CommonP... | suppress warnings about this method being too complex (can't extract a generic subroutine to reduce exec paths) | [
"suppress",
"warnings",
"about",
"this",
"method",
"being",
"too",
"complex",
"(",
"can",
"t",
"extract",
"a",
"generic",
"subroutine",
"to",
"reduce",
"exec",
"paths",
")"
] | 540e78af91c73291fa0e57b0df352f4a22950772 | https://github.com/mbeiter/jaas/blob/540e78af91c73291fa0e57b0df352f4a22950772/common/src/main/java/org/beiter/michael/authn/jaas/common/propsbuilder/JaasBasedCommonPropsBuilder.java#L211-L332 | test | Build the CommonProperties object from the given properties. | Of course, here is the Java code you requested:
```java
@SuppressWarnings({"PMD.ExcessiveMethodLength", "PMD.NPathComplexity", "PMD.CyclomaticComplexity", "PMD.StdCyclomaticComplexity", "PMD.ModifiedCyclomaticComplexity"})
// CHECKSTYLE:ON
public static CommonProperties build(final Map<String, ?> properties) {... |
robeio/robe | robe-admin/src/main/java/io/robe/admin/resources/TriggerResource.java | TriggerResource.resume | @RobeService(group = "HJobInfo", description = "Returns all HTriggerInfo as a collection with the matches given job id.")
@PUT
@Path("{id}/resume")
@UnitOfWork
public boolean resume(@RobeAuth Credentials credentials, @PathParam("id") String id) {
HTriggerInfo info = triggerDao.findById(id);
... | java | @RobeService(group = "HJobInfo", description = "Returns all HTriggerInfo as a collection with the matches given job id.")
@PUT
@Path("{id}/resume")
@UnitOfWork
public boolean resume(@RobeAuth Credentials credentials, @PathParam("id") String id) {
HTriggerInfo info = triggerDao.findById(id);
... | [
"@",
"RobeService",
"(",
"group",
"=",
"\"HJobInfo\"",
",",
"description",
"=",
"\"Returns all HTriggerInfo as a collection with the matches given job id.\"",
")",
"@",
"PUT",
"@",
"Path",
"(",
"\"{id}/resume\"",
")",
"@",
"UnitOfWork",
"public",
"boolean",
"resume",
"(... | Returns all HTriggerInfo as a collection with the matches given job id.
@param credentials auto fill by {@link RobeAuth} annotation for authentication.
@return all {@link HTriggerInfo} as a collection | [
"Returns",
"all",
"HTriggerInfo",
"as",
"a",
"collection",
"with",
"the",
"matches",
"given",
"job",
"id",
"."
] | a0a8c7cebd1f70f78cf24a66a002859e937badfe | https://github.com/robeio/robe/blob/a0a8c7cebd1f70f78cf24a66a002859e937badfe/robe-admin/src/main/java/io/robe/admin/resources/TriggerResource.java#L217-L233 | test | Resume a HTrigger by id. | Of course, here is the Java code you requested:
```java
@RobeService(group = "HJobInfo", description = "Returns all HTriggerInfo as a collection with the matches given job id.")
@PUT
@Path("{id}/resume")
@UnitOfWork
public boolean resume(@RobeAuth Credentials credentials, @PathParam("id") String id) {
... |
wildfly/wildfly | webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java | ASHelper.getJBossWebMetaData | public static JBossWebMetaData getJBossWebMetaData(final DeploymentUnit unit) {
final WarMetaData warMetaData = getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
JBossWebMetaData result = null;
if (warMetaData != null) {
result = warMetaData.getMergedJBossWebMetaData();
... | java | public static JBossWebMetaData getJBossWebMetaData(final DeploymentUnit unit) {
final WarMetaData warMetaData = getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
JBossWebMetaData result = null;
if (warMetaData != null) {
result = warMetaData.getMergedJBossWebMetaData();
... | [
"public",
"static",
"JBossWebMetaData",
"getJBossWebMetaData",
"(",
"final",
"DeploymentUnit",
"unit",
")",
"{",
"final",
"WarMetaData",
"warMetaData",
"=",
"getOptionalAttachment",
"(",
"unit",
",",
"WarMetaData",
".",
"ATTACHMENT_KEY",
")",
";",
"JBossWebMetaData",
... | Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit, if any.
@param unit
@return the JBossWebMetaData or null if either that or the parent WarMetaData are not found. | [
"Gets",
"the",
"JBossWebMetaData",
"from",
"the",
"WarMetaData",
"attached",
"to",
"the",
"provided",
"deployment",
"unit",
"if",
"any",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java#L288-L300 | test | Gets the JBossWebMetaData. | Of course, here is the Java code you requested:
```java
public static JBossWebMetaData getJBossWebMetaData(final DeploymentUnit unit) {
final WarMetaData warMetaData = getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
JBossWebMetaData result = null;
if (warMetaData != null) {
... |
eclipse/packagedrone | bundles/org.tukani.xz/src/org/tukaani/xz/XZInputStream.java | XZInputStream.read | public int read(byte[] buf, int off, int len) throws IOException {
if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
throw new IndexOutOfBoundsException();
if (len == 0)
return 0;
if (in == null)
throw new XZIOException("Stream closed");
... | java | public int read(byte[] buf, int off, int len) throws IOException {
if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
throw new IndexOutOfBoundsException();
if (len == 0)
return 0;
if (in == null)
throw new XZIOException("Stream closed");
... | [
"public",
"int",
"read",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"off",
"<",
"0",
"||",
"len",
"<",
"0",
"||",
"off",
"+",
"len",
"<",
"0",
"||",
"off",
"+",
"len",
">"... | Decompresses into an array of bytes.
<p>
If <code>len</code> is zero, no bytes are read and <code>0</code>
is returned. Otherwise this will try to decompress <code>len</code>
bytes of uncompressed data. Less than <code>len</code> bytes may
be read only in the following situations:
<ul>
<li>The end of the compressed dat... | [
"Decompresses",
"into",
"an",
"array",
"of",
"bytes",
".",
"<p",
">",
"If",
"<code",
">",
"len<",
"/",
"code",
">",
"is",
"zero",
"no",
"bytes",
"are",
"read",
"and",
"<code",
">",
"0<",
"/",
"code",
">",
"is",
"returned",
".",
"Otherwise",
"this",
... | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.tukani.xz/src/org/tukaani/xz/XZInputStream.java#L374-L417 | test | read from the stream. | Of course, here is the Java code you requested:
```java
public int read(byte[] buf, int off, int len) throws IOException {
if (off < 0 || len < 0 || off + len < 0 || off + len > buf.length)
throw new IndexOutOfBoundsException();
if (len == 0)
return 0;
if (in == null)
... |
sialcasa/mvvmFX | mvvmfx/src/main/java/de/saxsys/mvvmfx/internal/viewloader/GlobalBuilderFactory.java | GlobalBuilderFactory.mergeWith | public BuilderFactory mergeWith(List<BuilderFactory> factories) {
GlobalBuilderFactory factory = new GlobalBuilderFactory();
factory.factories.addAll(factories);
return factory;
} | java | public BuilderFactory mergeWith(List<BuilderFactory> factories) {
GlobalBuilderFactory factory = new GlobalBuilderFactory();
factory.factories.addAll(factories);
return factory;
} | [
"public",
"BuilderFactory",
"mergeWith",
"(",
"List",
"<",
"BuilderFactory",
">",
"factories",
")",
"{",
"GlobalBuilderFactory",
"factory",
"=",
"new",
"GlobalBuilderFactory",
"(",
")",
";",
"factory",
".",
"factories",
".",
"addAll",
"(",
"factories",
")",
";",... | Create a new BuilderFactory instance that contains all custom factories of this instance
combined with the list of factories passed as argument to this method.
<br/>
This instance of the builderFactory is not changed by this method. | [
"Create",
"a",
"new",
"BuilderFactory",
"instance",
"that",
"contains",
"all",
"custom",
"factories",
"of",
"this",
"instance",
"combined",
"with",
"the",
"list",
"of",
"factories",
"passed",
"as",
"argument",
"to",
"this",
"method",
".",
"<br",
"/",
">",
"T... | 240566a358a8e01c94c0bbb99228140a69690d02 | https://github.com/sialcasa/mvvmFX/blob/240566a358a8e01c94c0bbb99228140a69690d02/mvvmfx/src/main/java/de/saxsys/mvvmfx/internal/viewloader/GlobalBuilderFactory.java#L67-L73 | test | Merge the given factories with this builder factory. | Of course, here is the Java code you requested:
```java
public BuilderFactory mergeWith(List<BuilderFactory> factories) {
GlobalBuilderFactory factory = new GlobalBuilderFactory();
factory.factories.addAll(factories);
return factory;
}
```
Hope this helps! |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JspServletWrapper.java | JspServletWrapper.getDependants | public java.util.List<String> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
}
target = tagHandlerClass.newInstance();
} else {
target = getServlet();
}
if (target != null && target in... | java | public java.util.List<String> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
}
target = tagHandlerClass.newInstance();
} else {
target = getServlet();
}
if (target != null && target in... | [
"public",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"getDependants",
"(",
")",
"{",
"try",
"{",
"Object",
"target",
";",
"if",
"(",
"isTagFile",
")",
"{",
"if",
"(",
"reload",
")",
"{",
"tagHandlerClass",
"=",
"ctxt",
".",
"load",
"(",
... | Get a list of files that the current page has source dependency on. | [
"Get",
"a",
"list",
"of",
"files",
"that",
"the",
"current",
"page",
"has",
"source",
"dependency",
"on",
"."
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JspServletWrapper.java#L311-L328 | test | Returns a list of all the dependants of this source. | Of course, here is the Java code you requested:
```java
public java.util.List<String> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
}
target = tagHandlerClass.newInstance();
} else {
target = ... |
deeplearning4j/nd4j | nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java | Convolution.col2im | public static INDArray col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w) {
if (col.rank() != 6)
throw new IllegalArgumentException("col2im input array must be rank 6");
INDArray output = Nd4j.create(new long[]{col.size(0), col.size(1), h, w});
Col2Im col2Im = Col2I... | java | public static INDArray col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w) {
if (col.rank() != 6)
throw new IllegalArgumentException("col2im input array must be rank 6");
INDArray output = Nd4j.create(new long[]{col.size(0), col.size(1), h, w});
Col2Im col2Im = Col2I... | [
"public",
"static",
"INDArray",
"col2im",
"(",
"INDArray",
"col",
",",
"int",
"sy",
",",
"int",
"sx",
",",
"int",
"ph",
",",
"int",
"pw",
",",
"int",
"h",
",",
"int",
"w",
")",
"{",
"if",
"(",
"col",
".",
"rank",
"(",
")",
"!=",
"6",
")",
"th... | Rearrange matrix
columns into blocks
@param col the column
transposed image to convert
@param sy stride y
@param sx stride x
@param ph padding height
@param pw padding width
@param h height
@param w width
@return | [
"Rearrange",
"matrix",
"columns",
"into",
"blocks"
] | 8f005bcecb240d1fbb83b9d390ad801d1d3b6933 | https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/convolution/Convolution.java#L81-L104 | test | 2 - D COS - 2IM | Of course, here is the Java code you requested:
```java
public static INDArray col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w) {
if (col.rank() != 6)
throw new IllegalArgumentException("col2im input array must be rank 6");
INDArray output = Nd4j.create(new long[]{col.siz... |
subchen/jetbrick-all-1x | jetbrick-commons/src/main/java/jetbrick/lang/WildcharUtils.java | WildcharUtils.match | public static boolean match(String string, String pattern) {
if (string.equals(pattern)) { // speed-up
return true;
}
return match(string, pattern, 0, 0);
} | java | public static boolean match(String string, String pattern) {
if (string.equals(pattern)) { // speed-up
return true;
}
return match(string, pattern, 0, 0);
} | [
"public",
"static",
"boolean",
"match",
"(",
"String",
"string",
",",
"String",
"pattern",
")",
"{",
"if",
"(",
"string",
".",
"equals",
"(",
"pattern",
")",
")",
"{",
"// speed-up",
"return",
"true",
";",
"}",
"return",
"match",
"(",
"string",
",",
"p... | Checks whether a string matches a given wildcard pattern.
@param string input string
@param pattern pattern to match
@return <code>true</code> if string matches the pattern, otherwise <code>false</code> | [
"Checks",
"whether",
"a",
"string",
"matches",
"a",
"given",
"wildcard",
"pattern",
"."
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/lang/WildcharUtils.java#L37-L42 | test | Check if a string matches a pattern. | Of course, here is the Java code you requested:
```java
public static boolean match(String string, String pattern) {
if (string.equals(pattern)) { // speed-up
return true;
}
return match(string, pattern, 0, 0);
}
```
Hope this helps! |
orientechnologies/orientdb | core/src/main/java/com/orientechnologies/orient/core/sql/executor/FetchFromIndexStep.java | FetchFromIndexStep.processAndBlock | private void processAndBlock() {
OCollection fromKey = indexKeyFrom((OAndBlock) condition, additionalRangeCondition);
OCollection toKey = indexKeyTo((OAndBlock) condition, additionalRangeCondition);
boolean fromKeyIncluded = indexKeyFromIncluded((OAndBlock) condition, additionalRangeCondition);
boolean ... | java | private void processAndBlock() {
OCollection fromKey = indexKeyFrom((OAndBlock) condition, additionalRangeCondition);
OCollection toKey = indexKeyTo((OAndBlock) condition, additionalRangeCondition);
boolean fromKeyIncluded = indexKeyFromIncluded((OAndBlock) condition, additionalRangeCondition);
boolean ... | [
"private",
"void",
"processAndBlock",
"(",
")",
"{",
"OCollection",
"fromKey",
"=",
"indexKeyFrom",
"(",
"(",
"OAndBlock",
")",
"condition",
",",
"additionalRangeCondition",
")",
";",
"OCollection",
"toKey",
"=",
"indexKeyTo",
"(",
"(",
"OAndBlock",
")",
"condit... | it's not key = [...] but a real condition on field names, already ordered (field names will be ignored) | [
"it",
"s",
"not",
"key",
"=",
"[",
"...",
"]",
"but",
"a",
"real",
"condition",
"on",
"field",
"names",
"already",
"ordered",
"(",
"field",
"names",
"will",
"be",
"ignored",
")"
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/sql/executor/FetchFromIndexStep.java#L324-L330 | test | Process and block condition. | Of course, here is the Java code you requested:
```java
private void processAndBlock() {
OCollection fromKey = indexKeyFrom((OAndBlock) condition, additionalRangeCondition);
OCollection toKey = indexKeyTo((OAndBlock) condition, additionalRangeCondition);
boolean fromKeyIncluded = indexKeyFromIncluded((OAnd... |
orientechnologies/orientdb | graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java | OrientBaseGraph.shutdown | public void shutdown(boolean closeDb, boolean commitTx) {
makeActive();
try {
if (!isClosed()) {
if (commitTx) {
final OStorage storage = getDatabase().getStorage().getUnderlying();
if (storage instanceof OAbstractPaginatedStorage) {
if (((OAbstractPaginatedStorage... | java | public void shutdown(boolean closeDb, boolean commitTx) {
makeActive();
try {
if (!isClosed()) {
if (commitTx) {
final OStorage storage = getDatabase().getStorage().getUnderlying();
if (storage instanceof OAbstractPaginatedStorage) {
if (((OAbstractPaginatedStorage... | [
"public",
"void",
"shutdown",
"(",
"boolean",
"closeDb",
",",
"boolean",
"commitTx",
")",
"{",
"makeActive",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"isClosed",
"(",
")",
")",
"{",
"if",
"(",
"commitTx",
")",
"{",
"final",
"OStorage",
"storage",
"... | Closes the Graph. After closing the Graph cannot be used. | [
"Closes",
"the",
"Graph",
".",
"After",
"closing",
"the",
"Graph",
"cannot",
"be",
"used",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java#L1179-L1225 | test | Shutdown the database. | Of course, here is the Java code you requested:
```java
public void shutdown(boolean closeDb, boolean commitTx) {
makeActive();
try {
if (!isClosed()) {
if (commitTx) {
final OStorage storage = getDatabase().getStorage().getUnderlying();
if (storage instanceof OAbstractPagina... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.kie.eclipse.navigator/src/main/java/org/kie/eclipse/navigator/preferences/FieldEditorPropertyPage.java | FieldEditorPropertyPage.addField | protected void addField(FieldEditor editor) {
if (fields == null) {
fields = new ArrayList<FieldEditor>();
}
// Set the actual preference name based on the current selection
// in the Kie Navigator tree view. The preference name is constructed
// from the path to the selected tree node by getPreferenceName... | java | protected void addField(FieldEditor editor) {
if (fields == null) {
fields = new ArrayList<FieldEditor>();
}
// Set the actual preference name based on the current selection
// in the Kie Navigator tree view. The preference name is constructed
// from the path to the selected tree node by getPreferenceName... | [
"protected",
"void",
"addField",
"(",
"FieldEditor",
"editor",
")",
"{",
"if",
"(",
"fields",
"==",
"null",
")",
"{",
"fields",
"=",
"new",
"ArrayList",
"<",
"FieldEditor",
">",
"(",
")",
";",
"}",
"// Set the actual preference name based on the current selection"... | Adds the given field editor to this page.
@param editor the field editor | [
"Adds",
"the",
"given",
"field",
"editor",
"to",
"this",
"page",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.kie.eclipse.navigator/src/main/java/org/kie/eclipse/navigator/preferences/FieldEditorPropertyPage.java#L84-L94 | test | Adds a field to the list of fields. | Of course, here is the Java code you requested:
```java
protected void addField(FieldEditor editor) {
if (fields == null) {
fields = new ArrayList<FieldEditor>();
}
// Set the actual preference name based on the current selection
// in the Kie Navigator tree view. The preference name is constructed
// fro... |
Unidata/thredds | legacy/src/main/java/ucar/nc2/dt/point/RecordDatasetHelper.java | RecordDatasetHelper.setStationInfo | public void setStationInfo(String stnIdVName, String stnDescVName) {
this.stnIdVName = stnIdVName;
this.stnDescVName = stnDescVName;
Variable stationVar = ncfile.findVariable(stnIdVName);
stationIdType = stationVar.getDataType();
} | java | public void setStationInfo(String stnIdVName, String stnDescVName) {
this.stnIdVName = stnIdVName;
this.stnDescVName = stnDescVName;
Variable stationVar = ncfile.findVariable(stnIdVName);
stationIdType = stationVar.getDataType();
} | [
"public",
"void",
"setStationInfo",
"(",
"String",
"stnIdVName",
",",
"String",
"stnDescVName",
")",
"{",
"this",
".",
"stnIdVName",
"=",
"stnIdVName",
";",
"this",
".",
"stnDescVName",
"=",
"stnDescVName",
";",
"Variable",
"stationVar",
"=",
"ncfile",
".",
"f... | Set extra information used by station obs datasets.
@param stnIdVName the obs variable that is used to find the station in the stnHash; may be type int or a String (char).
@param stnDescVName optional station var containing station description | [
"Set",
"extra",
"information",
"used",
"by",
"station",
"obs",
"datasets",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/dt/point/RecordDatasetHelper.java#L134-L140 | test | Set the station information. | Of course, here is the Java code you requested:
```java
public void setStationInfo(String stnIdVName, String stnDescVName) {
this.stnIdVName = stnIdVName;
this.stnDescVName = stnDescVName;
Variable stationVar = ncfile.findVariable(stnIdVName);
stationIdType = stationVar.getDataType();
}
```
Hope th... |
ombre42/jrobotremoteserver | src/main/java/org/robotframework/remoteserver/RemoteServer.java | RemoteServer.addLibrary | @Deprecated
public void addLibrary(Class<?> clazz, int port) {
if (!server.isStopped()) // old behavior
throw new IllegalStateException("Cannot add a library once the server is started");
if (connector.getPort() != 0 && connector.getPort() != port) {
throw new RuntimeExceptio... | java | @Deprecated
public void addLibrary(Class<?> clazz, int port) {
if (!server.isStopped()) // old behavior
throw new IllegalStateException("Cannot add a library once the server is started");
if (connector.getPort() != 0 && connector.getPort() != port) {
throw new RuntimeExceptio... | [
"@",
"Deprecated",
"public",
"void",
"addLibrary",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"int",
"port",
")",
"{",
"if",
"(",
"!",
"server",
".",
"isStopped",
"(",
")",
")",
"// old behavior",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cannot add... | This has been deprecated. Please use {@link #putLibrary} and
{@link #setPort} instead.
Map the given test library to / and sets the port for the server. The
server must be stopped when calling this.
@param clazz
class of the test library
@param port
port for the server to listen on | [
"This",
"has",
"been",
"deprecated",
".",
"Please",
"use",
"{",
"@link",
"#putLibrary",
"}",
"and",
"{",
"@link",
"#setPort",
"}",
"instead",
"."
] | 688ab33a6bd04951d9dee7f5ec23c6f1cc709c10 | https://github.com/ombre42/jrobotremoteserver/blob/688ab33a6bd04951d9dee7f5ec23c6f1cc709c10/src/main/java/org/robotframework/remoteserver/RemoteServer.java#L245-L264 | test | Add a library to the servlet. | Of course, here is the Java code you requested:
```java
@Deprecated
public void addLibrary(Class<?> clazz, int port) {
if (!server.isStopped()) // old behavior
throw new IllegalStateException("Cannot add a library once the server is started");
if (connector.getPort() != 0 && connector.g... |
wildfly/wildfly | messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/ServerAdd.java | ServerAdd.checkNoAttributesIsDefined | private void checkNoAttributesIsDefined(String definedAttributeName, PathAddress address, ModelNode model, AttributeDefinition... attrs) throws OperationFailedException {
List<String> definedAttributes = new ArrayList<>();
for(AttributeDefinition attr : attrs) {
if (model.get(attr.getName())... | java | private void checkNoAttributesIsDefined(String definedAttributeName, PathAddress address, ModelNode model, AttributeDefinition... attrs) throws OperationFailedException {
List<String> definedAttributes = new ArrayList<>();
for(AttributeDefinition attr : attrs) {
if (model.get(attr.getName())... | [
"private",
"void",
"checkNoAttributesIsDefined",
"(",
"String",
"definedAttributeName",
",",
"PathAddress",
"address",
",",
"ModelNode",
"model",
",",
"AttributeDefinition",
"...",
"attrs",
")",
"throws",
"OperationFailedException",
"{",
"List",
"<",
"String",
">",
"d... | /*
Check that none of the attrs are defined, or log a warning. | [
"/",
"*",
"Check",
"that",
"none",
"of",
"the",
"attrs",
"are",
"defined",
"or",
"log",
"a",
"warning",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/ServerAdd.java#L241-L252 | test | Check that no attributes are defined. | Of course, here is the Java code you requested:
```java
private void checkNoAttributesIsDefined(String definedAttributeName, PathAddress address, ModelNode model, AttributeDefinition... attrs) throws OperationFailedException {
List<String> definedAttributes = new ArrayList<>();
for(AttributeDefinition ... |
oblac/jodd | jodd-core/src/main/java/jodd/util/StringUtil.java | StringUtil.join | public static String join(final Object[] array, final String separator) {
if (array == null) {
return null;
}
if (array.length == 0) {
return StringPool.EMPTY;
}
if (array.length == 1) {
return String.valueOf(array[0]);
}
final StringBuilder sb = new StringBuilder(array.length * 16);
for (i... | java | public static String join(final Object[] array, final String separator) {
if (array == null) {
return null;
}
if (array.length == 0) {
return StringPool.EMPTY;
}
if (array.length == 1) {
return String.valueOf(array[0]);
}
final StringBuilder sb = new StringBuilder(array.length * 16);
for (i... | [
"public",
"static",
"String",
"join",
"(",
"final",
"Object",
"[",
"]",
"array",
",",
"final",
"String",
"separator",
")",
"{",
"if",
"(",
"array",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"array",
".",
"length",
"==",
"0",
")... | Joins an array of objects into one string with separator. | [
"Joins",
"an",
"array",
"of",
"objects",
"into",
"one",
"string",
"with",
"separator",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/util/StringUtil.java#L2244-L2269 | test | Join an array of objects with a separator. | Of course, here is the Java code you requested:
```java
public static String join(final Object[] array, final String separator) {
if (array == null) {
return null;
}
if (array.length == 0) {
return StringPool.EMPTY;
}
if (array.length == 1) {
return String.valueOf(array[0]);
}
final StringBui... |
marc-christian-schulze/structs4java | structs4java-maven-plugin/src/main/java/org/structs4java/StructsBatchCompiler.java | StructsBatchCompiler.installJvmTypeProvider | @Deprecated
protected void installJvmTypeProvider(XtextResourceSet resourceSet, File tmpClassDirectory) {
internalInstallJvmTypeProvider(resourceSet, tmpClassDirectory, false);
} | java | @Deprecated
protected void installJvmTypeProvider(XtextResourceSet resourceSet, File tmpClassDirectory) {
internalInstallJvmTypeProvider(resourceSet, tmpClassDirectory, false);
} | [
"@",
"Deprecated",
"protected",
"void",
"installJvmTypeProvider",
"(",
"XtextResourceSet",
"resourceSet",
",",
"File",
"tmpClassDirectory",
")",
"{",
"internalInstallJvmTypeProvider",
"(",
"resourceSet",
",",
"tmpClassDirectory",
",",
"false",
")",
";",
"}"
] | Installs the complete JvmTypeProvider including index access into the
{@link ResourceSet}. The lookup classpath is enhanced with the given tmp
directory. | [
"Installs",
"the",
"complete",
"JvmTypeProvider",
"including",
"index",
"access",
"into",
"the",
"{",
"@link",
"ResourceSet",
"}",
".",
"The",
"lookup",
"classpath",
"is",
"enhanced",
"with",
"the",
"given",
"tmp",
"directory",
"."
] | 74fbda7782c07f6051c75c00ad1d63a6dcc0829f | https://github.com/marc-christian-schulze/structs4java/blob/74fbda7782c07f6051c75c00ad1d63a6dcc0829f/structs4java-maven-plugin/src/main/java/org/structs4java/StructsBatchCompiler.java#L358-L361 | test | Install the jvm type provider. | Of course, here is the Java code you requested:
```java
@Deprecated
protected void installJvmTypeProvider(XtextResourceSet resourceSet, File tmpClassDirectory) {
internalInstallJvmTypeProvider(resourceSet, tmpClassDirectory, false);
}
```
Hope this helps! |
RestComm/jain-slee | container/common/src/main/java/org/mobicents/slee/container/management/jmx/TraceMBeanImpl.java | TraceMBeanImpl.getNotificationInfo | public MBeanNotificationInfo[] getNotificationInfo() {
if (this.traceFacility == null)
return null;
String[] notificationTypes = this.traceFacility.getNotificationTypes();
return new MBeanNotificationInfo[] { new MBeanNotificationInfo(notificationTypes, TraceMBean.TRACE_NOTIFICATION_TYPE,
"SLEE Sp... | java | public MBeanNotificationInfo[] getNotificationInfo() {
if (this.traceFacility == null)
return null;
String[] notificationTypes = this.traceFacility.getNotificationTypes();
return new MBeanNotificationInfo[] { new MBeanNotificationInfo(notificationTypes, TraceMBean.TRACE_NOTIFICATION_TYPE,
"SLEE Sp... | [
"public",
"MBeanNotificationInfo",
"[",
"]",
"getNotificationInfo",
"(",
")",
"{",
"if",
"(",
"this",
".",
"traceFacility",
"==",
"null",
")",
"return",
"null",
";",
"String",
"[",
"]",
"notificationTypes",
"=",
"this",
".",
"traceFacility",
".",
"getNotificat... | /*
(non-Javadoc)
@see javax.management.NotificationBroadcaster#getNotificationInfo() | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/common/src/main/java/org/mobicents/slee/container/management/jmx/TraceMBeanImpl.java#L152-L161 | test | Get the notification information for the managed management management | Of course, here is the Java code you requested:
```java
public MBeanNotificationInfo[] getNotificationInfo() {
if (this.traceFacility == null)
return null;
String[] notificationTypes = this.traceFacility.getNotificationTypes();
return new MBeanNotificationInfo[] { new MBeanNotificationInfo(notificatio... |
jcuda/jcublas | JCublasJava/src/main/java/jcuda/jcublas/JCublas2.java | JCublas2.cublasScnrm2 | public static int cublasScnrm2(
cublasHandle handle,
int n,
Pointer x,
int incx,
Pointer result)/** host or device pointer */
{
return checkResult(cublasScnrm2Native(handle, n, x, incx, result));
} | java | public static int cublasScnrm2(
cublasHandle handle,
int n,
Pointer x,
int incx,
Pointer result)/** host or device pointer */
{
return checkResult(cublasScnrm2Native(handle, n, x, incx, result));
} | [
"public",
"static",
"int",
"cublasScnrm2",
"(",
"cublasHandle",
"handle",
",",
"int",
"n",
",",
"Pointer",
"x",
",",
"int",
"incx",
",",
"Pointer",
"result",
")",
"/** host or device pointer */",
"{",
"return",
"checkResult",
"(",
"cublasScnrm2Native",
"(",
"han... | host or device pointer | [
"host",
"or",
"device",
"pointer"
] | 80875235d24562073f4d66651dd17263f306427d | https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas2.java#L700-L708 | test | Compute the SCNRM2 operation for a CUDA segment. | Of course, here is the Java code you requested:
```java
public static int cublasScnrm2(
cublasHandle handle,
int n,
Pointer x,
int incx,
Pointer result)/** host or device pointer */
{
return checkResult(cublasScnrm2Native(handle, n, x, incx, result));
... |
liveontologies/elk-reasoner | elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/stages/AbstractReasonerState.java | AbstractReasonerState.getObjectPropertyTaxonomy | public synchronized Taxonomy<ElkObjectProperty> getObjectPropertyTaxonomy()
throws ElkInconsistentOntologyException, ElkException {
ruleAndConclusionStats.reset();
restoreConsistencyCheck();
if (consistencyCheckingState.isInconsistent()) {
throw new ElkInconsistentOntologyException();
}
LOGGER_.trace... | java | public synchronized Taxonomy<ElkObjectProperty> getObjectPropertyTaxonomy()
throws ElkInconsistentOntologyException, ElkException {
ruleAndConclusionStats.reset();
restoreConsistencyCheck();
if (consistencyCheckingState.isInconsistent()) {
throw new ElkInconsistentOntologyException();
}
LOGGER_.trace... | [
"public",
"synchronized",
"Taxonomy",
"<",
"ElkObjectProperty",
">",
"getObjectPropertyTaxonomy",
"(",
")",
"throws",
"ElkInconsistentOntologyException",
",",
"ElkException",
"{",
"ruleAndConclusionStats",
".",
"reset",
"(",
")",
";",
"restoreConsistencyCheck",
"(",
")",
... | Compute the inferred taxonomy of the object properties for the given
ontology if it has not been done yet.
@return the object property taxonomy implied by the current ontology
@throws ElkInconsistentOntologyException
if the ontology is inconsistent
@throws ElkException
if the reasoning process cannot be completed succ... | [
"Compute",
"the",
"inferred",
"taxonomy",
"of",
"the",
"object",
"properties",
"for",
"the",
"given",
"ontology",
"if",
"it",
"has",
"not",
"been",
"done",
"yet",
"."
] | cfbe5279a57e0433d45c1676c7658ddb6e29b9eb | https://github.com/liveontologies/elk-reasoner/blob/cfbe5279a57e0433d45c1676c7658ddb6e29b9eb/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/stages/AbstractReasonerState.java#L702-L718 | test | Gets the taxonomy of the object property. | Of course, here is the Java code you requested:
```java
public synchronized Taxonomy<ElkObjectProperty> getObjectPropertyTaxonomy()
throws ElkInconsistentOntologyException, ElkException {
ruleAndConclusionStats.reset();
restoreConsistencyCheck();
if (consistencyCheckingState.isInconsistent()) {
throw new... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.