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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.concatWith | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Observable<T> concatWith(@NonNull CompletableSource other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new ObservableConcatWithCompletable<T>(this, other));
} | java | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Observable<T> concatWith(@NonNull CompletableSource other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new ObservableConcatWithCompletable<T>(this, other));
} | [
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Observable",
"<",
"T",
">",
"concatWith",
"(",
"@",
"NonNull",
"CompletableSource",
"other",
")",
"{",
"ObjectHelper",
".",
"requireNonNull",
"(",
"o... | Returns an {@code Observable} that emits items from this {@code Observable} and when it completes normally, the
other {@link CompletableSource} is subscribed to and the returned {@code Observable} emits its terminal events.
<p>
<img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-op... | [
"Returns",
"an",
"{"
] | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L7243-L7248 | test | Concatenates two set of images. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Observable<T> concatWith(@NonNull CompletableSource other) {
ObjectHelper.requireNonNull(other, "other is null");
return RxJavaPlugins.onAssembly(new ObservableConcatW... |
Koekiebox-PTY-LTD/Fluid | fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/auth0/Auth0Client.java | Auth0Client.getUserProfileInfo | public NormalizedUserProfile getUserProfileInfo(AccessToken accessTokenParam)
{
if(accessTokenParam == null || (accessTokenParam.getAccessToken() == null ||
accessTokenParam.getAccessToken().trim().isEmpty()))
{
throw new FluidClientException(
"Code mu... | java | public NormalizedUserProfile getUserProfileInfo(AccessToken accessTokenParam)
{
if(accessTokenParam == null || (accessTokenParam.getAccessToken() == null ||
accessTokenParam.getAccessToken().trim().isEmpty()))
{
throw new FluidClientException(
"Code mu... | [
"public",
"NormalizedUserProfile",
"getUserProfileInfo",
"(",
"AccessToken",
"accessTokenParam",
")",
"{",
"if",
"(",
"accessTokenParam",
"==",
"null",
"||",
"(",
"accessTokenParam",
".",
"getAccessToken",
"(",
")",
"==",
"null",
"||",
"accessTokenParam",
".",
"getA... | Gets Auth0 Normalized User Profile info.
@param accessTokenParam The access token used to get
user profile info from.
@return User Profile.
@see NormalizedUserProfile
@see AccessToken | [
"Gets",
"Auth0",
"Normalized",
"User",
"Profile",
"info",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/auth0/Auth0Client.java#L117-L146 | test | Gets user profile info. | Of course, here is the Java code you requested:
```java
public NormalizedUserProfile getUserProfileInfo(AccessToken accessTokenParam)
{
if(accessTokenParam == null || (accessTokenParam.getAccessToken() == null ||
accessTokenParam.getAccessToken().trim().isEmpty()))
{
thr... |
jkuhnert/ognl | src/main/java/ognl/Ognl.java | Ognl.setValue | public static void setValue(ExpressionAccessor expression, OgnlContext context,
Object root, Object value)
{
expression.set(context, root, value);
} | java | public static void setValue(ExpressionAccessor expression, OgnlContext context,
Object root, Object value)
{
expression.set(context, root, value);
} | [
"public",
"static",
"void",
"setValue",
"(",
"ExpressionAccessor",
"expression",
",",
"OgnlContext",
"context",
",",
"Object",
"root",
",",
"Object",
"value",
")",
"{",
"expression",
".",
"set",
"(",
"context",
",",
"root",
",",
"value",
")",
";",
"}"
] | Sets the value given using the pre-compiled expression on the specified root
object.
@param expression
The pre-compiled expression, as found in {@link Node#getAccessor()}.
@param context
The ognl context.
@param root
The object to set the expression value on.
@param value
The value to set. | [
"Sets",
"the",
"value",
"given",
"using",
"the",
"pre",
"-",
"compiled",
"expression",
"on",
"the",
"specified",
"root",
"object",
"."
] | 53d51a30c8c299b750dede779d05cb84beee73c3 | https://github.com/jkuhnert/ognl/blob/53d51a30c8c299b750dede779d05cb84beee73c3/src/main/java/ognl/Ognl.java#L755-L759 | test | Set the value of a CGNLCTYPE. | Of course, here is the Java code you requested:
```java
public static void setValue(ExpressionAccessor expression, OgnlContext context,
Object root, Object value)
{
expression.set(context, root, value);
}
```
Hope this helps! |
Unidata/thredds | grib/src/main/java/ucar/nc2/grib/grib1/tables/Grib1ParamTables.java | Grib1ParamTables.makeKey | static int makeKey(int center, int subcenter, int version) {
if (center < 0) center = 255;
if (subcenter < 0) subcenter = 255;
if (version < 0) version = 255;
return center * 1000 * 1000 + subcenter * 1000 + version;
} | java | static int makeKey(int center, int subcenter, int version) {
if (center < 0) center = 255;
if (subcenter < 0) subcenter = 255;
if (version < 0) version = 255;
return center * 1000 * 1000 + subcenter * 1000 + version;
} | [
"static",
"int",
"makeKey",
"(",
"int",
"center",
",",
"int",
"subcenter",
",",
"int",
"version",
")",
"{",
"if",
"(",
"center",
"<",
"0",
")",
"center",
"=",
"255",
";",
"if",
"(",
"subcenter",
"<",
"0",
")",
"subcenter",
"=",
"255",
";",
"if",
... | Make a key from (center, subcenter, version) that provides correct sort order. | [
"Make",
"a",
"key",
"from",
"(",
"center",
"subcenter",
"version",
")",
"that",
"provides",
"correct",
"sort",
"order",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/grib1/tables/Grib1ParamTables.java#L90-L95 | test | Make a key from the center subcenter and version. | Of course, here is the Java code you requested:
```java
static int makeKey(int center, int subcenter, int version) {
if (center < 0) center = 255;
if (subcenter < 0) subcenter = 255;
if (version < 0) version = 255;
return center * 1000 * 1000 + subcenter * 1000 + version;
}
```
Hope this helps! |
GojaFramework/goja | goja-core/src/main/java/goja/core/Validator.java | Validator.isTel | public static boolean isTel(String value) {
String check = "^\\d{3,4}-?\\d{7,9}$";
return match(check, Pattern.CASE_INSENSITIVE, value);
} | java | public static boolean isTel(String value) {
String check = "^\\d{3,4}-?\\d{7,9}$";
return match(check, Pattern.CASE_INSENSITIVE, value);
} | [
"public",
"static",
"boolean",
"isTel",
"(",
"String",
"value",
")",
"{",
"String",
"check",
"=",
"\"^\\\\d{3,4}-?\\\\d{7,9}$\"",
";",
"return",
"match",
"(",
"check",
",",
"Pattern",
".",
"CASE_INSENSITIVE",
",",
"value",
")",
";",
"}"
] | Phone verification
@param value value
@return boolean | [
"Phone",
"verification"
] | 77179b495f668fc1fa20accc912991df6bb2d917 | https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/Validator.java#L78-L81 | test | Checks if the given value is a tel number. | Of course, here is the Java code you requested:
```java
public static boolean isTel(String value) {
String check = "^\\d{3,4}-?\\d{7,9}$";
return match(check, Pattern.CASE_INSENSITIVE, value);
}
```
Hope this helps! |
oblac/jodd | jodd-proxetta/src/main/java/jodd/asm7/Type.java | Type.getType | public static Type getType(final Class<?> clazz) {
if (clazz.isPrimitive()) {
if (clazz == Integer.TYPE) {
return INT_TYPE;
} else if (clazz == Void.TYPE) {
return VOID_TYPE;
} else if (clazz == Boolean.TYPE) {
return BOOLEAN_TYPE;
} else if (clazz == Byte.TYPE) {
... | java | public static Type getType(final Class<?> clazz) {
if (clazz.isPrimitive()) {
if (clazz == Integer.TYPE) {
return INT_TYPE;
} else if (clazz == Void.TYPE) {
return VOID_TYPE;
} else if (clazz == Boolean.TYPE) {
return BOOLEAN_TYPE;
} else if (clazz == Byte.TYPE) {
... | [
"public",
"static",
"Type",
"getType",
"(",
"final",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"if",
"(",
"clazz",
".",
"isPrimitive",
"(",
")",
")",
"{",
"if",
"(",
"clazz",
"==",
"Integer",
".",
"TYPE",
")",
"{",
"return",
"INT_TYPE",
";",
"}",
... | Returns the {@link Type} corresponding to the given class.
@param clazz a class.
@return the {@link Type} corresponding to the given class. | [
"Returns",
"the",
"{",
"@link",
"Type",
"}",
"corresponding",
"to",
"the",
"given",
"class",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-proxetta/src/main/java/jodd/asm7/Type.java#L186-L212 | test | Gets the type of the given class. | Of course, here is the Java code you requested:
```java
public static Type getType(final Class<?> clazz) {
if (clazz.isPrimitive()) {
if (clazz == Integer.TYPE) {
return INT_TYPE;
} else if (clazz == Void.TYPE) {
return VOID_TYPE;
} else if (clazz == Boolean.TYPE) {
return... |
tiefaces/TieFaces | src/org/tiefaces/components/websheet/utility/ShiftFormulaUtility.java | ShiftFormulaUtility.assembleRowsListFromRowsMapping | private static List<SerialRow> assembleRowsListFromRowsMapping(
final List<SerialRow> all, final List<SerialRow> current) {
List<SerialRow> list;
if (all == null) {
list = new ArrayList<>();
list.addAll(current);
} else {
list = all;
for (SerialRow row : current) {
if (!all.contains(ro... | java | private static List<SerialRow> assembleRowsListFromRowsMapping(
final List<SerialRow> all, final List<SerialRow> current) {
List<SerialRow> list;
if (all == null) {
list = new ArrayList<>();
list.addAll(current);
} else {
list = all;
for (SerialRow row : current) {
if (!all.contains(ro... | [
"private",
"static",
"List",
"<",
"SerialRow",
">",
"assembleRowsListFromRowsMapping",
"(",
"final",
"List",
"<",
"SerialRow",
">",
"all",
",",
"final",
"List",
"<",
"SerialRow",
">",
"current",
")",
"{",
"List",
"<",
"SerialRow",
">",
"list",
";",
"if",
"... | assemble rowslist from rowsmapping.
@param all
list all rows.
@param current
current row list.
@return the list | [
"assemble",
"rowslist",
"from",
"rowsmapping",
"."
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/utility/ShiftFormulaUtility.java#L252-L267 | test | Assemble rows list from rows mapping. | Of course, here is the Java code you requested:
```java
private static List<SerialRow> assembleRowsListFromRowsMapping(
final List<SerialRow> all, final List<SerialRow> current) {
List<SerialRow> list;
if (all == null) {
list = new ArrayList<>();
list.addAll(current);
} else {
list = all;
... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/dataset/NetcdfDataset.java | NetcdfDataset.setValues | public void setValues(Variable v, List<String> values) throws IllegalArgumentException {
Array data = Array.makeArray(v.getDataType(), values);
if (data.getSize() != v.getSize())
throw new IllegalArgumentException("Incorrect number of values specified for the Variable " + v.getFullName() +
... | java | public void setValues(Variable v, List<String> values) throws IllegalArgumentException {
Array data = Array.makeArray(v.getDataType(), values);
if (data.getSize() != v.getSize())
throw new IllegalArgumentException("Incorrect number of values specified for the Variable " + v.getFullName() +
... | [
"public",
"void",
"setValues",
"(",
"Variable",
"v",
",",
"List",
"<",
"String",
">",
"values",
")",
"throws",
"IllegalArgumentException",
"{",
"Array",
"data",
"=",
"Array",
".",
"makeArray",
"(",
"v",
".",
"getDataType",
"(",
")",
",",
"values",
")",
"... | Set the data values from a list of Strings.
@param v for this variable
@param values list of Strings
@throws IllegalArgumentException if values array not correct size, or values wont parse to the correct type
@deprecated use Variable.setValues() | [
"Set",
"the",
"data",
"values",
"from",
"a",
"list",
"of",
"Strings",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/NetcdfDataset.java#L1442-L1453 | test | Sets the values for the variable. | Of course, here is the Java code you requested:
```java
public void setValues(Variable v, List<String> values) throws IllegalArgumentException {
Array data = Array.makeArray(v.getDataType(), values);
if (data.getSize() != v.getSize())
throw new IllegalArgumentException("Incorrect number of values specif... |
rupertlssmith/lojix | base/common/src/main/com/thesett/common/util/concurrent/BaseUnaryCondition.java | BaseUnaryCondition.await | public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException
{
synchronized (monitor)
{
// Holds the absolute time when the timeout expires.
long expiryTimeNanos = System.nanoTime() + unit.toNanos(timeout);
// Used to hold the estimated wait... | java | public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException
{
synchronized (monitor)
{
// Holds the absolute time when the timeout expires.
long expiryTimeNanos = System.nanoTime() + unit.toNanos(timeout);
// Used to hold the estimated wait... | [
"public",
"boolean",
"await",
"(",
"T",
"t",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"synchronized",
"(",
"monitor",
")",
"{",
"// Holds the absolute time when the timeout expires.",
"long",
"expiryTimeNanos",
"=",
... | Wait for up to a timeout limit for the predicate to become true on the specified object.
@param t The object to test for predicate membership.
@param timeout The amount of time to wait.
@param unit The units of time used.
@return <tt>true</tt> if the predicate became true before the timeout expired, <tt>f... | [
"Wait",
"for",
"up",
"to",
"a",
"timeout",
"limit",
"for",
"the",
"predicate",
"to",
"become",
"true",
"on",
"the",
"specified",
"object",
"."
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/concurrent/BaseUnaryCondition.java#L84-L122 | test | Await for the condition. | Of course, here is the Java code you requested:
```java
public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException
{
synchronized (monitor)
{
// Holds the absolute time when the timeout expires.
long expiryTimeNanos = System.nanoTime() + unit.toNanos(... |
google/guice | core/src/com/google/inject/internal/Annotations.java | Annotations.annotationToString | private static String annotationToString(
Class<? extends Annotation> type, Map<String, Object> members) throws Exception {
StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("(");
JOINER.appendTo(
sb,
Maps.transformValues(
members,
arg... | java | private static String annotationToString(
Class<? extends Annotation> type, Map<String, Object> members) throws Exception {
StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("(");
JOINER.appendTo(
sb,
Maps.transformValues(
members,
arg... | [
"private",
"static",
"String",
"annotationToString",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"type",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"members",
")",
"throws",
"Exception",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
... | Implements {@link Annotation#toString}. | [
"Implements",
"{"
] | a0552a16d813ead98fe73737fb001db336650251 | https://github.com/google/guice/blob/a0552a16d813ead98fe73737fb001db336650251/core/src/com/google/inject/internal/Annotations.java#L158-L170 | test | Convert an annotation to a string. | Of course, here is the Java code you requested:
```java
private static String annotationToString(
Class<? extends Annotation> type, Map<String, Object> members) throws Exception {
StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("(");
JOINER.appendTo(
sb,
M... |
jcuda/jcublas | JCublasJava/src/main/java/jcuda/jcublas/JCublas.java | JCublas.cublasDasum | public static double cublasDasum(int n, Pointer x, int incx)
{
double result = cublasDasumNative(n, x, incx);
checkResultBLAS();
return result;
} | java | public static double cublasDasum(int n, Pointer x, int incx)
{
double result = cublasDasumNative(n, x, incx);
checkResultBLAS();
return result;
} | [
"public",
"static",
"double",
"cublasDasum",
"(",
"int",
"n",
",",
"Pointer",
"x",
",",
"int",
"incx",
")",
"{",
"double",
"result",
"=",
"cublasDasumNative",
"(",
"n",
",",
"x",
",",
"incx",
")",
";",
"checkResultBLAS",
"(",
")",
";",
"return",
"resul... | <pre>
double
cublasDasum (int n, const double *x, int incx)
computes the sum of the absolute values of the elements of double
precision vector x; that is, the result is the sum from i = 0 to n - 1 of
abs(x[1 + i * incx]).
Input
-----
n number of elements in input vector
x double-precision vector with n elem... | [
"<pre",
">",
"double",
"cublasDasum",
"(",
"int",
"n",
"const",
"double",
"*",
"x",
"int",
"incx",
")"
] | 80875235d24562073f4d66651dd17263f306427d | https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas.java#L7050-L7055 | test | Dasum for a Cublas segment. | Of course, here is the Java code you requested:
```java
public static double cublasDasum(int n, Pointer x, int incx)
{
double result = cublasDasumNative(n, x, incx);
checkResultBLAS();
return result;
}
```
Hope this helps! |
hazelcast/hazelcast-simulator | simulator/src/main/java/com/hazelcast/simulator/utils/ExceptionReporter.java | ExceptionReporter.report | public static void report(String testId, Throwable cause) {
if (cause == null) {
LOGGER.fatal("Can't call report with a null exception");
return;
}
long exceptionCount = FAILURE_ID.incrementAndGet();
if (exceptionCount > MAX_EXCEPTION_COUNT) {
LOGGER... | java | public static void report(String testId, Throwable cause) {
if (cause == null) {
LOGGER.fatal("Can't call report with a null exception");
return;
}
long exceptionCount = FAILURE_ID.incrementAndGet();
if (exceptionCount > MAX_EXCEPTION_COUNT) {
LOGGER... | [
"public",
"static",
"void",
"report",
"(",
"String",
"testId",
",",
"Throwable",
"cause",
")",
"{",
"if",
"(",
"cause",
"==",
"null",
")",
"{",
"LOGGER",
".",
"fatal",
"(",
"\"Can't call report with a null exception\"",
")",
";",
"return",
";",
"}",
"long",
... | Writes the cause to file.
@param testId the id of the test that caused the exception. Is allowed to be <tt>null</tt> if it is not known which test
caused the problem.
@param cause the Throwable that should be reported. | [
"Writes",
"the",
"cause",
"to",
"file",
"."
] | 231ecd05c2f33a5406d2104f74dd8a8065402034 | https://github.com/hazelcast/hazelcast-simulator/blob/231ecd05c2f33a5406d2104f74dd8a8065402034/simulator/src/main/java/com/hazelcast/simulator/utils/ExceptionReporter.java#L51-L85 | test | Report an exception to the Agent. | Of course, here is the Java code you requested:
```java
public static void report(String testId, Throwable cause) {
if (cause == null) {
LOGGER.fatal("Can't call report with a null exception");
return;
}
long exceptionCount = FAILURE_ID.incrementAndGet();
if (e... |
spring-projects/spring-security | web/src/main/java/org/springframework/security/web/server/util/matcher/ServerWebExchangeMatchers.java | ServerWebExchangeMatchers.pathMatchers | public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) {
List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length);
for (String pattern : patterns) {
matchers.add(new PathPatternParserServerWebExchangeMatcher(pattern, method));
}
return new OrServerWebExch... | java | public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) {
List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length);
for (String pattern : patterns) {
matchers.add(new PathPatternParserServerWebExchangeMatcher(pattern, method));
}
return new OrServerWebExch... | [
"public",
"static",
"ServerWebExchangeMatcher",
"pathMatchers",
"(",
"HttpMethod",
"method",
",",
"String",
"...",
"patterns",
")",
"{",
"List",
"<",
"ServerWebExchangeMatcher",
">",
"matchers",
"=",
"new",
"ArrayList",
"<>",
"(",
"patterns",
".",
"length",
")",
... | Creates a matcher that matches on the specific method and any of the provided patterns.
@param method the method to match on. If null, any method will be matched
@param patterns the patterns to match on
@return the matcher to use | [
"Creates",
"a",
"matcher",
"that",
"matches",
"on",
"the",
"specific",
"method",
"and",
"any",
"of",
"the",
"provided",
"patterns",
"."
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/server/util/matcher/ServerWebExchangeMatchers.java#L38-L44 | test | Create a path matcher from a list of pattern strings. | Of course, here is the Java code you requested:
```java
public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) {
List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length);
for (String pattern : patterns) {
matchers.add(new PathPatternParserServerWebExchangeMa... |
cosysoft/device | device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java | AbstractDevice.cleanTemp | public void cleanTemp() {
CommandLine dumpcommand = adbCommand("shell", "rm", "-r",
"/data/local/tmp/local/tmp/dump.xml");
executeCommandQuietly(dumpcommand);
try {
// give it a second to recover from the activity start
Thread.sleep(1000);
} catch (InterruptedException ie) {
th... | java | public void cleanTemp() {
CommandLine dumpcommand = adbCommand("shell", "rm", "-r",
"/data/local/tmp/local/tmp/dump.xml");
executeCommandQuietly(dumpcommand);
try {
// give it a second to recover from the activity start
Thread.sleep(1000);
} catch (InterruptedException ie) {
th... | [
"public",
"void",
"cleanTemp",
"(",
")",
"{",
"CommandLine",
"dumpcommand",
"=",
"adbCommand",
"(",
"\"shell\"",
",",
"\"rm\"",
",",
"\"-r\"",
",",
"\"/data/local/tmp/local/tmp/dump.xml\"",
")",
";",
"executeCommandQuietly",
"(",
"dumpcommand",
")",
";",
"try",
"{... | clean file dump.xml, qian.xml, uidump.xml in tmp folder | [
"clean",
"file",
"dump",
".",
"xml",
"qian",
".",
"xml",
"uidump",
".",
"xml",
"in",
"tmp",
"folder"
] | d5cd0b713a47aba4d5f3f5d918578336f44ddb9e | https://github.com/cosysoft/device/blob/d5cd0b713a47aba4d5f3f5d918578336f44ddb9e/device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java#L410-L441 | test | Clean up the temp files | Of course, here is the Java code you requested:
```java
public void cleanTemp() {
CommandLine dumpcommand = adbCommand("shell", "rm", "-r",
"/data/local/tmp/local/tmp/dump.xml");
executeCommandQuietly(dumpcommand);
try {
// give it a second to recover from the activity start
Thread.slee... |
Unidata/thredds | ui/src/main/java/thredds/logs/LogCategorizer.java | LogCategorizer.getServiceSpecial | static public String getServiceSpecial(String path) {
String ss = null;
if (path.startsWith("/dqcServlet"))
ss = "dqcServlet";
else if (path.startsWith("/cdmvalidator"))
ss = "cdmvalidator";
return ss;
} | java | static public String getServiceSpecial(String path) {
String ss = null;
if (path.startsWith("/dqcServlet"))
ss = "dqcServlet";
else if (path.startsWith("/cdmvalidator"))
ss = "cdmvalidator";
return ss;
} | [
"static",
"public",
"String",
"getServiceSpecial",
"(",
"String",
"path",
")",
"{",
"String",
"ss",
"=",
"null",
";",
"if",
"(",
"path",
".",
"startsWith",
"(",
"\"/dqcServlet\"",
")",
")",
"ss",
"=",
"\"dqcServlet\"",
";",
"else",
"if",
"(",
"path",
"."... | the ones that dont start with thredds | [
"the",
"ones",
"that",
"dont",
"start",
"with",
"thredds"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/thredds/logs/LogCategorizer.java#L220-L227 | test | Get the service special name from the path | Of course, here is the Java code you requested:
```java
static public String getServiceSpecial(String path) {
String ss = null;
if (path.startsWith("/dqcServlet"))
ss = "dqcServlet";
else if (path.startsWith("/cdmvalidator"))
ss = "cdmvalidator";
return ss;
}
```
Hope this helps! |
rest-assured/rest-assured | rest-assured/src/main/java/io/restassured/RestAssured.java | RestAssured.options | public static Response options(String path, Map<String, ?> pathParams) {
return given().options(path, pathParams);
} | java | public static Response options(String path, Map<String, ?> pathParams) {
return given().options(path, pathParams);
} | [
"public",
"static",
"Response",
"options",
"(",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"?",
">",
"pathParams",
")",
"{",
"return",
"given",
"(",
")",
".",
"options",
"(",
"path",
",",
"pathParams",
")",
";",
"}"
] | Perform a OPTIONS request to a <code>path</code>. Normally the path doesn't have to be fully-qualified e.g. you don't need to
specify the path as <tt>http://localhost:8080/path</tt>. In this case it's enough to use <tt>/path</tt>.
@param path The path to send the request to.
@param pathParams The path parameters... | [
"Perform",
"a",
"OPTIONS",
"request",
"to",
"a",
"<code",
">",
"path<",
"/",
"code",
">",
".",
"Normally",
"the",
"path",
"doesn",
"t",
"have",
"to",
"be",
"fully",
"-",
"qualified",
"e",
".",
"g",
".",
"you",
"don",
"t",
"need",
"to",
"specify",
"... | 165a85b65070f5a07fe0045175613fb2c2811642 | https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/RestAssured.java#L873-L875 | test | Options HTTP request with path and path parameters. | Of course, here is the Java code you requested:
```java
public static Response options(String path, Map<String, ?> pathParams) {
return given().options(path, pathParams);
}
```
Hope this helps! |
oblac/jodd | jodd-core/src/main/java/jodd/util/StringUtil.java | StringUtil.remove | public static String remove(final String string, final char ch) {
int stringLen = string.length();
char[] result = new char[stringLen];
int offset = 0;
for (int i = 0; i < stringLen; i++) {
char c = string.charAt(i);
if (c == ch) {
continue;
}
result[offset] = c;
offset++;
}
if (offse... | java | public static String remove(final String string, final char ch) {
int stringLen = string.length();
char[] result = new char[stringLen];
int offset = 0;
for (int i = 0; i < stringLen; i++) {
char c = string.charAt(i);
if (c == ch) {
continue;
}
result[offset] = c;
offset++;
}
if (offse... | [
"public",
"static",
"String",
"remove",
"(",
"final",
"String",
"string",
",",
"final",
"char",
"ch",
")",
"{",
"int",
"stringLen",
"=",
"string",
".",
"length",
"(",
")",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"stringLen",
"]",
";... | Removes a single character from string.
@param string source string
@param ch character to remove | [
"Removes",
"a",
"single",
"character",
"from",
"string",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/util/StringUtil.java#L258-L279 | test | Removes the specified character from the specified string. | Of course, here is the Java code you requested:
```java
public static String remove(final String string, final char ch) {
int stringLen = string.length();
char[] result = new char[stringLen];
int offset = 0;
for (int i = 0; i < stringLen; i++) {
char c = string.charAt(i);
if (c == ch) {
continue;
... |
spring-projects/spring-security | cas/src/main/java/org/springframework/security/cas/authentication/CasAuthenticationProvider.java | CasAuthenticationProvider.loadUserByAssertion | protected UserDetails loadUserByAssertion(final Assertion assertion) {
final CasAssertionAuthenticationToken token = new CasAssertionAuthenticationToken(
assertion, "");
return this.authenticationUserDetailsService.loadUserDetails(token);
} | java | protected UserDetails loadUserByAssertion(final Assertion assertion) {
final CasAssertionAuthenticationToken token = new CasAssertionAuthenticationToken(
assertion, "");
return this.authenticationUserDetailsService.loadUserDetails(token);
} | [
"protected",
"UserDetails",
"loadUserByAssertion",
"(",
"final",
"Assertion",
"assertion",
")",
"{",
"final",
"CasAssertionAuthenticationToken",
"token",
"=",
"new",
"CasAssertionAuthenticationToken",
"(",
"assertion",
",",
"\"\"",
")",
";",
"return",
"this",
".",
"au... | Template method for retrieving the UserDetails based on the assertion. Default is
to call configured userDetailsService and pass the username. Deployers can override
this method and retrieve the user based on any criteria they desire.
@param assertion The CAS Assertion.
@return the UserDetails. | [
"Template",
"method",
"for",
"retrieving",
"the",
"UserDetails",
"based",
"on",
"the",
"assertion",
".",
"Default",
"is",
"to",
"call",
"configured",
"userDetailsService",
"and",
"pass",
"the",
"username",
".",
"Deployers",
"can",
"override",
"this",
"method",
"... | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/cas/src/main/java/org/springframework/security/cas/authentication/CasAuthenticationProvider.java#L212-L216 | test | Load user details from assertion. | Of course, here is the Java code you requested:
```java
protected UserDetails loadUserByAssertion(final Assertion assertion) {
final CasAssertionAuthenticationToken token = new CasAssertionAuthenticationToken(
assertion, "");
return this.authenticationUserDetailsService.loadUserDetails(token);
}
```
Hope thi... |
nyla-solutions/gedi-geode | gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/client/SingletonGemFireJmx.java | SingletonGemFireJmx.reconnect | public synchronized static JMX reconnect()
{
try
{
ClientCache cache = null;
cache = ClientCacheFactory.getAnyInstance();
if(cache != null && !cache.isClosed())
{
cache.close();
}
}
catch (Exception e)
{
System.out.println("Cache was closed");
}
if(jmx != null... | java | public synchronized static JMX reconnect()
{
try
{
ClientCache cache = null;
cache = ClientCacheFactory.getAnyInstance();
if(cache != null && !cache.isClosed())
{
cache.close();
}
}
catch (Exception e)
{
System.out.println("Cache was closed");
}
if(jmx != null... | [
"public",
"synchronized",
"static",
"JMX",
"reconnect",
"(",
")",
"{",
"try",
"{",
"ClientCache",
"cache",
"=",
"null",
";",
"cache",
"=",
"ClientCacheFactory",
".",
"getAnyInstance",
"(",
")",
";",
"if",
"(",
"cache",
"!=",
"null",
"&&",
"!",
"cache",
"... | Close and recreate the JMX connect
@return the JMX connection | [
"Close",
"and",
"recreate",
"the",
"JMX",
"connect"
] | 3dd71d6e66e941ce350b306b70677ee95a7d9eee | https://github.com/nyla-solutions/gedi-geode/blob/3dd71d6e66e941ce350b306b70677ee95a7d9eee/gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/client/SingletonGemFireJmx.java#L47-L74 | test | Reconnect to the JMX server. | Of course, here is the Java code you requested:
```java
public synchronized static JMX reconnect()
{
try
{
ClientCache cache = null;
cache = ClientCacheFactory.getAnyInstance();
if(cache != null && !cache.isClosed())
{
cache.close();
}
}
catch (Exception e)
{
System... |
ArpNetworking/logback-steno | src/main/java/com/arpnetworking/logback/BaseLoggingEncoder.java | BaseLoggingEncoder.isArrayJsonStenoEvent | protected boolean isArrayJsonStenoEvent(@Nullable final Marker marker) {
return marker != null && marker.contains(StenoMarker.ARRAY_JSON_MARKER);
} | java | protected boolean isArrayJsonStenoEvent(@Nullable final Marker marker) {
return marker != null && marker.contains(StenoMarker.ARRAY_JSON_MARKER);
} | [
"protected",
"boolean",
"isArrayJsonStenoEvent",
"(",
"@",
"Nullable",
"final",
"Marker",
"marker",
")",
"{",
"return",
"marker",
"!=",
"null",
"&&",
"marker",
".",
"contains",
"(",
"StenoMarker",
".",
"ARRAY_JSON_MARKER",
")",
";",
"}"
] | Determine whether the <code>marker</code> represents a JSON array event.
@since 1.0.4
@param marker The <code>Marker</code> instance to evaluate.
@return True if and only if <code>marker</code> represents a JSON array event. | [
"Determine",
"whether",
"the",
"<code",
">",
"marker<",
"/",
"code",
">",
"represents",
"a",
"JSON",
"array",
"event",
"."
] | abd5c68ce7d42c39f80ffbad6d162d5fed3a346e | https://github.com/ArpNetworking/logback-steno/blob/abd5c68ce7d42c39f80ffbad6d162d5fed3a346e/src/main/java/com/arpnetworking/logback/BaseLoggingEncoder.java#L234-L236 | test | Check if the given marker is an array json event. | Of course, here is the Java code you requested:
```java
protected boolean isArrayJsonStenoEvent(@Nullable final Marker marker) {
return marker != null && marker.contains(StenoMarker.ARRAY_JSON_MARKER);
}
```
Hope this helps! |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/JspRuntimeContext.java | JspRuntimeContext.threadStart | protected void threadStart() {
// Has the background thread already been started?
if (thread != null) {
return;
}
// Start the background thread
threadDone = false;
thread = new Thread(this, threadName);
thread.setDaemon(true);
thread.start()... | java | protected void threadStart() {
// Has the background thread already been started?
if (thread != null) {
return;
}
// Start the background thread
threadDone = false;
thread = new Thread(this, threadName);
thread.setDaemon(true);
thread.start()... | [
"protected",
"void",
"threadStart",
"(",
")",
"{",
"// Has the background thread already been started?",
"if",
"(",
"thread",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"// Start the background thread",
"threadDone",
"=",
"false",
";",
"thread",
"=",
"new",
"Thread... | Start the background thread that will periodically check for
changes to compile time included files in a JSP.
@exception IllegalStateException if we should not be starting
a background thread now | [
"Start",
"the",
"background",
"thread",
"that",
"will",
"periodically",
"check",
"for",
"changes",
"to",
"compile",
"time",
"included",
"files",
"in",
"a",
"JSP",
"."
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/JspRuntimeContext.java#L628-L641 | test | Start the background thread. | Of course, here is the Java code you requested:
```java
protected void threadStart() {
// Has the background thread already been started?
if (thread != null) {
return;
}
// Start the background thread
threadDone = false;
thread = new Thread(this, threadName... |
robeio/robe | robe-admin/src/main/java/io/robe/admin/resources/UserResource.java | UserResource.merge | @RobeService(group = "User", description = "Updates a single User matches with the given id.")
@PATCH
@UnitOfWork
@Path("{id}")
public User merge(@RobeAuth Credentials credentials, @PathParam("id") String id, User model) {
if (!id.equals(model.getOid()))
throw new WebApplicationExcep... | java | @RobeService(group = "User", description = "Updates a single User matches with the given id.")
@PATCH
@UnitOfWork
@Path("{id}")
public User merge(@RobeAuth Credentials credentials, @PathParam("id") String id, User model) {
if (!id.equals(model.getOid()))
throw new WebApplicationExcep... | [
"@",
"RobeService",
"(",
"group",
"=",
"\"User\"",
",",
"description",
"=",
"\"Updates a single User matches with the given id.\"",
")",
"@",
"PATCH",
"@",
"UnitOfWork",
"@",
"Path",
"(",
"\"{id}\"",
")",
"public",
"User",
"merge",
"(",
"@",
"RobeAuth",
"Credentia... | Updates a single {@link User} matches with the given id.
<p>
Status Code:
Not Found 404
Not Matches 412
@param credentials injected by {@link RobeAuth} annotation for authentication.
@param id This is the oid of {@link User}
@param model data of {@link User}
@return Updates a single {@link User} matche... | [
"Updates",
"a",
"single",
"{",
"@link",
"User",
"}",
"matches",
"with",
"the",
"given",
"id",
".",
"<p",
">",
"Status",
"Code",
":",
"Not",
"Found",
"404",
"Not",
"Matches",
"412"
] | a0a8c7cebd1f70f78cf24a66a002859e937badfe | https://github.com/robeio/robe/blob/a0a8c7cebd1f70f78cf24a66a002859e937badfe/robe-admin/src/main/java/io/robe/admin/resources/UserResource.java#L128-L141 | test | Updates a single User in the database. | Of course, here is the Java code you requested:
```java
@RobeService(group = "User", description = "Updates a single User matches with the given id.")
@PATCH
@UnitOfWork
@Path("{id}")
public User merge(@RobeAuth Credentials credentials, @PathParam("id") String id, User model) {
if (!id.equals(m... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/ft/point/standard/TableConfigurerImpl.java | TableConfigurerImpl.matchAxisTypeAndDimension | protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) {
Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() {
@Override
public boolean match(CoordinateAxis axis) {
return ((axis.getRa... | java | protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) {
Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() {
@Override
public boolean match(CoordinateAxis axis) {
return ((axis.getRa... | [
"protected",
"String",
"matchAxisTypeAndDimension",
"(",
"NetcdfDataset",
"ds",
",",
"AxisType",
"type",
",",
"final",
"Dimension",
"outer",
",",
"final",
"Dimension",
"inner",
")",
"{",
"Variable",
"var",
"=",
"CoordSysEvaluator",
".",
"findCoordByType",
"(",
"ds... | /* protected Variable findVariableWithStandardNameAndNotDimension(NetcdfDataset ds, String standard_name, Dimension outer, Formatter errlog) {
for (Variable v : ds.getVariables()) {
String stdName = ds.findAttValueIgnoreCase(v, CF.STANDARD_NAME, null);
if ((stdName != null) && stdName.equals(standard_name) && v.getRank... | [
"/",
"*",
"protected",
"Variable",
"findVariableWithStandardNameAndNotDimension",
"(",
"NetcdfDataset",
"ds",
"String",
"standard_name",
"Dimension",
"outer",
"Formatter",
"errlog",
")",
"{",
"for",
"(",
"Variable",
"v",
":",
"ds",
".",
"getVariables",
"()",
")",
... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/ft/point/standard/TableConfigurerImpl.java#L68-L77 | test | Returns the name of the first coordinate axis with the specified type and dimension. | Of course, here is the Java code you requested:
```java
protected String matchAxisTypeAndDimension(NetcdfDataset ds, AxisType type, final Dimension outer, final Dimension inner) {
Variable var = CoordSysEvaluator.findCoordByType(ds, type, new CoordSysEvaluator.Predicate() {
@Override
public boolean ... |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java | Parser.parseAttributeValue | private String parseAttributeValue(String watch) throws JasperException {
Mark start = reader.mark();
Mark stop = reader.skipUntilIgnoreEsc(watch);
if (stop == null) {
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
String ret = parseQuoted(reader.getText(start, stop));
if (watch.length() ... | java | private String parseAttributeValue(String watch) throws JasperException {
Mark start = reader.mark();
Mark stop = reader.skipUntilIgnoreEsc(watch);
if (stop == null) {
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
String ret = parseQuoted(reader.getText(start, stop));
if (watch.length() ... | [
"private",
"String",
"parseAttributeValue",
"(",
"String",
"watch",
")",
"throws",
"JasperException",
"{",
"Mark",
"start",
"=",
"reader",
".",
"mark",
"(",
")",
";",
"Mark",
"stop",
"=",
"reader",
".",
"skipUntilIgnoreEsc",
"(",
"watch",
")",
";",
"if",
"... | AttributeValueDouble ::= (QuotedChar - '"')*
('"' | <TRANSLATION_ERROR>)
RTAttributeValueDouble ::= ((QuotedChar - '"')* - ((QuotedChar-'"')'%>"')
('%>"' | TRANSLATION_ERROR) | [
"AttributeValueDouble",
"::",
"=",
"(",
"QuotedChar",
"-",
")",
"*",
"(",
"|",
"<TRANSLATION_ERROR",
">",
")",
"RTAttributeValueDouble",
"::",
"=",
"((",
"QuotedChar",
"-",
")",
"*",
"-",
"((",
"QuotedChar",
"-",
")",
"%",
">",
")",
"(",
"%",
">",
"|",... | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java#L297-L311 | test | Parse an attribute value. | Of course, here is the Java code you requested:
```java
private String parseAttributeValue(String watch) throws JasperException {
Mark start = reader.mark();
Mark stop = reader.skipUntilIgnoreEsc(watch);
if (stop == null) {
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
String ret = parse... |
spring-projects/spring-security | web/src/main/java/org/springframework/security/web/header/writers/HpkpHeaderWriter.java | HpkpHeaderWriter.setPins | public void setPins(Map<String, String> pins) {
Assert.notNull(pins, "pins cannot be null");
this.pins = pins;
updateHpkpHeaderValue();
} | java | public void setPins(Map<String, String> pins) {
Assert.notNull(pins, "pins cannot be null");
this.pins = pins;
updateHpkpHeaderValue();
} | [
"public",
"void",
"setPins",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"pins",
")",
"{",
"Assert",
".",
"notNull",
"(",
"pins",
",",
"\"pins cannot be null\"",
")",
";",
"this",
".",
"pins",
"=",
"pins",
";",
"updateHpkpHeaderValue",
"(",
")",
";",
... | <p>
Sets the value for the pin- directive of the Public-Key-Pins header.
</p>
<p>
The pin directive specifies a way for web host operators to indicate
a cryptographic identity that should be bound to a given web host.
See <a href="https://tools.ietf.org/html/rfc7469#section-2.1.1">Section 2.1.1</a> for additional deta... | [
"<p",
">",
"Sets",
"the",
"value",
"for",
"the",
"pin",
"-",
"directive",
"of",
"the",
"Public",
"-",
"Key",
"-",
"Pins",
"header",
".",
"<",
"/",
"p",
">"
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/header/writers/HpkpHeaderWriter.java#L221-L225 | test | Sets the pins for the HPKP header. | Of course, here is the Java code you requested:
```java
public void setPins(Map<String, String> pins) {
Assert.notNull(pins, "pins cannot be null");
this.pins = pins;
updateHpkpHeaderValue();
}
```
Hope this helps! |
kiegroup/droolsjbpm-tools | drools-eclipse/org.kie.eclipse.navigator/src/main/java/org/kie/eclipse/navigator/preferences/FieldEditorPropertyPage.java | FieldEditorPropertyPage.dispose | @Override
public void dispose() {
super.dispose();
if (fields != null) {
Iterator<FieldEditor> e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = e.next();
pe.setPage(null);
pe.setPropertyChangeListener(null);
pe.setPreferenceStore(null);
}
}
} | java | @Override
public void dispose() {
super.dispose();
if (fields != null) {
Iterator<FieldEditor> e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = e.next();
pe.setPage(null);
pe.setPropertyChangeListener(null);
pe.setPreferenceStore(null);
}
}
} | [
"@",
"Override",
"public",
"void",
"dispose",
"(",
")",
"{",
"super",
".",
"dispose",
"(",
")",
";",
"if",
"(",
"fields",
"!=",
"null",
")",
"{",
"Iterator",
"<",
"FieldEditor",
">",
"e",
"=",
"fields",
".",
"iterator",
"(",
")",
";",
"while",
"(",... | The field editor preference page implementation of an
<code>IDialogPage</code> method disposes of this page's controls and
images. Subclasses may override to release their own allocated SWT
resources, but must call <code>super.dispose</code>. | [
"The",
"field",
"editor",
"preference",
"page",
"implementation",
"of",
"an",
"<code",
">",
"IDialogPage<",
"/",
"code",
">",
"method",
"disposes",
"of",
"this",
"page",
"s",
"controls",
"and",
"images",
".",
"Subclasses",
"may",
"override",
"to",
"release",
... | 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#L222-L234 | test | Dispose of the object. | Of course, here is the Java code you requested:
```java
@Override
public void dispose() {
super.dispose();
if (fields != null) {
Iterator<FieldEditor> e = fields.iterator();
while (e.hasNext()) {
FieldEditor pe = e.next();
pe.setPage(null);
pe.setPropertyChangeListener(null);
pe.setPreferenc... |
tony19/logback-android | logback-android/src/main/java/ch/qos/logback/core/net/ssl/SSLContextFactoryBean.java | SSLContextFactoryBean.keyStoreFromSystemProperties | private KeyStoreFactoryBean keyStoreFromSystemProperties(String property) {
if (System.getProperty(property) == null) return null;
KeyStoreFactoryBean keyStore = new KeyStoreFactoryBean();
keyStore.setLocation(locationFromSystemProperty(property));
keyStore.setProvider(System.getProperty(property + "Pro... | java | private KeyStoreFactoryBean keyStoreFromSystemProperties(String property) {
if (System.getProperty(property) == null) return null;
KeyStoreFactoryBean keyStore = new KeyStoreFactoryBean();
keyStore.setLocation(locationFromSystemProperty(property));
keyStore.setProvider(System.getProperty(property + "Pro... | [
"private",
"KeyStoreFactoryBean",
"keyStoreFromSystemProperties",
"(",
"String",
"property",
")",
"{",
"if",
"(",
"System",
".",
"getProperty",
"(",
"property",
")",
"==",
"null",
")",
"return",
"null",
";",
"KeyStoreFactoryBean",
"keyStore",
"=",
"new",
"KeyStore... | Constructs a key store factory bean using JSSE system properties.
@param property base property name (e.g. {@code javax.net.ssl.keyStore})
@return key store or {@code null} if no value is defined for the
base system property name | [
"Constructs",
"a",
"key",
"store",
"factory",
"bean",
"using",
"JSSE",
"system",
"properties",
"."
] | 028489c11ccfc1237a53923db06f22a90b41809c | https://github.com/tony19/logback-android/blob/028489c11ccfc1237a53923db06f22a90b41809c/logback-android/src/main/java/ch/qos/logback/core/net/ssl/SSLContextFactoryBean.java#L217-L225 | test | This method is used to get a KeyStoreFactoryBean from system properties. | Of course, here is the Java code you requested:
```java
private KeyStoreFactoryBean keyStoreFromSystemProperties(String property) {
if (System.getProperty(property) == null) return null;
KeyStoreFactoryBean keyStore = new KeyStoreFactoryBean();
keyStore.setLocation(locationFromSystemProperty(property));
... |
algolia/algoliasearch-client-android | algoliasearch/src/main/java/com/algolia/search/saas/Index.java | Index.saveObject | public JSONObject saveObject(JSONObject object, String objectID, @Nullable RequestOptions requestOptions) throws AlgoliaException {
try {
return client.putRequest("/1/indexes/" + encodedIndexName + "/" + URLEncoder.encode(objectID, "UTF-8"), /* urlParameters: */ null, object.toString(), requestOptio... | java | public JSONObject saveObject(JSONObject object, String objectID, @Nullable RequestOptions requestOptions) throws AlgoliaException {
try {
return client.putRequest("/1/indexes/" + encodedIndexName + "/" + URLEncoder.encode(objectID, "UTF-8"), /* urlParameters: */ null, object.toString(), requestOptio... | [
"public",
"JSONObject",
"saveObject",
"(",
"JSONObject",
"object",
",",
"String",
"objectID",
",",
"@",
"Nullable",
"RequestOptions",
"requestOptions",
")",
"throws",
"AlgoliaException",
"{",
"try",
"{",
"return",
"client",
".",
"putRequest",
"(",
"\"/1/indexes/\"",... | Override the content of object.
@param object the object to save
@param requestOptions Request-specific options.
@throws AlgoliaException | [
"Override",
"the",
"content",
"of",
"object",
"."
] | 3293ba6e6116a4f6c1face2cc606bc047d6d4a3c | https://github.com/algolia/algoliasearch-client-android/blob/3293ba6e6116a4f6c1face2cc606bc047d6d4a3c/algoliasearch/src/main/java/com/algolia/search/saas/Index.java#L1201-L1207 | test | Save an object in the index. | Of course, here is the Java code you requested:
```java
public JSONObject saveObject(JSONObject object, String objectID, @Nullable RequestOptions requestOptions) throws AlgoliaException {
try {
return client.putRequest("/1/indexes/" + encodedIndexName + "/" + URLEncoder.encode(objectID, "UTF-8"), /... |
leanix/leanix-sdk-java | src/main/java/net/leanix/api/GraphqlApi.java | GraphqlApi.processGraphQLMultipart | public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'graphQLRequest' is set
if (graphQLRequest == null) {
throw new ApiException(400, "Missing the required parameter 'graphQLRequest' ... | java | public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'graphQLRequest' is set
if (graphQLRequest == null) {
throw new ApiException(400, "Missing the required parameter 'graphQLRequest' ... | [
"public",
"GraphQLResult",
"processGraphQLMultipart",
"(",
"String",
"graphQLRequest",
",",
"File",
"file",
")",
"throws",
"ApiException",
"{",
"Object",
"localVarPostBody",
"=",
"null",
";",
"// verify the required parameter 'graphQLRequest' is set",
"if",
"(",
"graphQLReq... | processGraphQLMultipart
Processes GraphQL requests, supporting multipart documents
@param graphQLRequest (required)
@param file (required)
@return GraphQLResult
@throws ApiException if fails to make API call | [
"processGraphQLMultipart",
"Processes",
"GraphQL",
"requests",
"supporting",
"multipart",
"documents"
] | 9516ac593d6a8f73baccc516a45877b4e5920c47 | https://github.com/leanix/leanix-sdk-java/blob/9516ac593d6a8f73baccc516a45877b4e5920c47/src/main/java/net/leanix/api/GraphqlApi.java#L88-L130 | test | Process a GraphQLMultipart | Of course, here is the Java code you requested:
```java
public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'graphQLRequest' is set
if (graphQLRequest == null) {
throw new ApiExcepti... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/Precondition.java | Precondition.addCondition | public void addCondition(Condition condition) throws WebDAVException {
// a Resource URI can only be specified once in a Precondition
Enumeration conditions = getConditions();
if (condition.getResourceURI() != null) {
while (conditions.hasMoreElements()) {
Condition e... | java | public void addCondition(Condition condition) throws WebDAVException {
// a Resource URI can only be specified once in a Precondition
Enumeration conditions = getConditions();
if (condition.getResourceURI() != null) {
while (conditions.hasMoreElements()) {
Condition e... | [
"public",
"void",
"addCondition",
"(",
"Condition",
"condition",
")",
"throws",
"WebDAVException",
"{",
"// a Resource URI can only be specified once in a Precondition",
"Enumeration",
"conditions",
"=",
"getConditions",
"(",
")",
";",
"if",
"(",
"condition",
".",
"getRes... | Add a Condition to this Precondition. Conditions are OR'd together to
check for a matching resource.
@param condition the Condition to add
@exception WebDAVException thrown if the precondition already contains this condition | [
"Add",
"a",
"Condition",
"to",
"this",
"Precondition",
".",
"Conditions",
"are",
"OR",
"d",
"together",
"to",
"check",
"for",
"a",
"matching",
"resource",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/Precondition.java#L94-L105 | test | Adds a new condition to the set of conditions. | Of course, here is the Java code you requested:
```java
public void addCondition(Condition condition) throws WebDAVException {
// a Resource URI can only be specified once in a Precondition
Enumeration conditions = getConditions();
if (condition.getResourceURI() != null) {
while (co... |
Enterprise-Content-Management/infoarchive-sip-sdk | yaml/src/main/java/com/opentext/ia/yaml/configuration/zip/ZipBuilder.java | ZipBuilder.replace | public void replace(File file, boolean preserveExternalFileName, String text) {
String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName);
entries.put(text, path);
} | java | public void replace(File file, boolean preserveExternalFileName, String text) {
String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName);
entries.put(text, path);
} | [
"public",
"void",
"replace",
"(",
"File",
"file",
",",
"boolean",
"preserveExternalFileName",
",",
"String",
"text",
")",
"{",
"String",
"path",
"=",
"entries",
".",
"containsKey",
"(",
"file",
")",
"?",
"entries",
".",
"remove",
"(",
"file",
")",
":",
"... | Replace the contents of a file with a different text.
@param file The file for which to replace the content
@param preserveExternalFileName Whether external file names are to be preserved as much as possible, or whether
they should be replaced with unique numbers
@param text The new content to include in the ZIP | [
"Replace",
"the",
"contents",
"of",
"a",
"file",
"with",
"a",
"different",
"text",
"."
] | 3c84a4d9ce569139e9a442034526944d3e63436e | https://github.com/Enterprise-Content-Management/infoarchive-sip-sdk/blob/3c84a4d9ce569139e9a442034526944d3e63436e/yaml/src/main/java/com/opentext/ia/yaml/configuration/zip/ZipBuilder.java#L119-L122 | test | Replaces the text of a file with a zip file. | Of course, here is the Java code you requested:
```java
public void replace(File file, boolean preserveExternalFileName, String text) {
String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName);
entries.put(text, path);
}
```
Hope this helps! |
ReactiveX/RxJava | src/main/java/io/reactivex/Flowable.java | Flowable.lastElement | @CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> lastElement() {
return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this));
} | java | @CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> lastElement() {
return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this));
} | [
"@",
"CheckReturnValue",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"UNBOUNDED_IN",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Maybe",
"<",
"T",
">",
"lastElement",
"(",
")",
"{",
"return",
"RxJava... | Returns a Maybe that emits the last item emitted by this Flowable or completes if
this Flowable is empty.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/last.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator honors backpressure from downstream and ... | [
"Returns",
"a",
"Maybe",
"that",
"emits",
"the",
"last",
"item",
"emitted",
"by",
"this",
"Flowable",
"or",
"completes",
"if",
"this",
"Flowable",
"is",
"empty",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"305",
"src",
"=",
"https",
":... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L11069-L11074 | test | Returns the last element of a sequence of tokens. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
public final Maybe<T> lastElement() {
return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this));
}
```
Hope this helps! |
blademainer/common_utils | common_log/src/main/java/com/xiongyingqi/Logger.java | Logger.debug | public static void debug(Object object, Object message) {
Class clazz = object.getClass();
debug(clazz, message);
} | java | public static void debug(Object object, Object message) {
Class clazz = object.getClass();
debug(clazz, message);
} | [
"public",
"static",
"void",
"debug",
"(",
"Object",
"object",
",",
"Object",
"message",
")",
"{",
"Class",
"clazz",
"=",
"object",
".",
"getClass",
"(",
")",
";",
"debug",
"(",
"clazz",
",",
"message",
")",
";",
"}"
] | ---------------------------- debug ---------------------------- | [
"----------------------------",
"debug",
"----------------------------"
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_log/src/main/java/com/xiongyingqi/Logger.java#L13-L16 | test | Debug method. | Of course, here is the Java code you requested:
```java
public static void debug(Object object, Object message) {
Class clazz = object.getClass();
debug(clazz, message);
}
```
Hope this helps! |
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.buffer | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) {
return buffer(count, count, bufferSupplier);
} | java | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) {
return buffer(count, count, bufferSupplier);
} | [
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"<",
"U",
"extends",
"Collection",
"<",
"?",
"super",
"T",
">",
">",
"Observable",
"<",
"U",
">",
"buffer",
"(",
"int",
"count",
",",
"Callable"... | Returns an Observable that emits buffers of items it collects from the source ObservableSource. The resulting
ObservableSource emits connected, non-overlapping buffers, each containing {@code count} items. When the source
ObservableSource completes, the resulting ObservableSource emits the current buffer and propagates... | [
"Returns",
"an",
"Observable",
"that",
"emits",
"buffers",
"of",
"items",
"it",
"collects",
"from",
"the",
"source",
"ObservableSource",
".",
"The",
"resulting",
"ObservableSource",
"emits",
"connected",
"non",
"-",
"overlapping",
"buffers",
"each",
"containing",
... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L5668-L5672 | test | Creates a sequence of items from the source source. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) {
return buffer(count, count, bufferSupplier);
}
```
Hope this helps! |
playframework/playframework | core/play/src/main/java/play/mvc/Results.java | Results.preconditionRequired | public static Result preconditionRequired(Path content, String filename) {
return preconditionRequired(content, filename, StaticFileMimeTypes.fileMimeTypes());
} | java | public static Result preconditionRequired(Path content, String filename) {
return preconditionRequired(content, filename, StaticFileMimeTypes.fileMimeTypes());
} | [
"public",
"static",
"Result",
"preconditionRequired",
"(",
"Path",
"content",
",",
"String",
"filename",
")",
"{",
"return",
"preconditionRequired",
"(",
"content",
",",
"filename",
",",
"StaticFileMimeTypes",
".",
"fileMimeTypes",
"(",
")",
")",
";",
"}"
] | Generates a 428 Precondition Required result.
@param content The path to send.
@param filename The name to send the file as.
@return the result | [
"Generates",
"a",
"428",
"Precondition",
"Required",
"result",
"."
] | 3c46dca803d24e715d85de678c59dcfac9525a00 | https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play/src/main/java/play/mvc/Results.java#L3255-L3257 | test | Precondition required. | Of course, here is the Java code you requested:
```java
public static Result preconditionRequired(Path content, String filename) {
return preconditionRequired(content, filename, StaticFileMimeTypes.fileMimeTypes());
}
```
Hope this helps! |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java | MediaRow.getDataBounds | public BitmapFactory.Options getDataBounds() {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
byte[] data = getData();
BitmapFactory.decodeByteArray(data, 0, data.length, options);
return options;
} | java | public BitmapFactory.Options getDataBounds() {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
byte[] data = getData();
BitmapFactory.decodeByteArray(data, 0, data.length, options);
return options;
} | [
"public",
"BitmapFactory",
".",
"Options",
"getDataBounds",
"(",
")",
"{",
"BitmapFactory",
".",
"Options",
"options",
"=",
"new",
"BitmapFactory",
".",
"Options",
"(",
")",
";",
"options",
".",
"inJustDecodeBounds",
"=",
"true",
";",
"byte",
"[",
"]",
"data... | Read the data bounds without allocating pixel memory.
Access values using:
{@link BitmapFactory.Options#outWidth},
{@link BitmapFactory.Options#outHeight},
{@link BitmapFactory.Options#outMimeType},
{@link BitmapFactory.Options#outColorSpace},
and {@link BitmapFactory.Options#outConfig}
@return bounds options
@since 3... | [
"Read",
"the",
"data",
"bounds",
"without",
"allocating",
"pixel",
"memory",
".",
"Access",
"values",
"using",
":",
"{",
"@link",
"BitmapFactory",
".",
"Options#outWidth",
"}",
"{",
"@link",
"BitmapFactory",
".",
"Options#outHeight",
"}",
"{",
"@link",
"BitmapFa... | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/related/media/MediaRow.java#L131-L137 | test | Get the bounds of the image. | Of course, here is the Java code you requested:
```java
public BitmapFactory.Options getDataBounds() {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
byte[] data = getData();
BitmapFactory.decodeByteArray(data, 0, data.length, options);
... |
Unidata/thredds | opendap/src/main/java/opendap/dap/BaseTypePrimitiveVector.java | BaseTypePrimitiveVector.deserialize | public synchronized void deserialize(DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
throws IOException, EOFException, DataReadException {
for (int i = 0; i < vals.length; i++) {
// create... | java | public synchronized void deserialize(DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
throws IOException, EOFException, DataReadException {
for (int i = 0; i < vals.length; i++) {
// create... | [
"public",
"synchronized",
"void",
"deserialize",
"(",
"DataInputStream",
"source",
",",
"ServerVersion",
"sv",
",",
"StatusUI",
"statusUI",
")",
"throws",
"IOException",
",",
"EOFException",
",",
"DataReadException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Reads data from a <code>DataInputStream</code>. This method is only used
on the client side of the OPeNDAP client/server connection.
@param source a <code>DataInputStream</code> to read from.
@param sv The <code>ServerVersion</code> returned by the server.
(used by <code>DSequence</code> to determine which pro... | [
"Reads",
"data",
"from",
"a",
"<code",
">",
"DataInputStream<",
"/",
"code",
">",
".",
"This",
"method",
"is",
"only",
"used",
"on",
"the",
"client",
"side",
"of",
"the",
"OPeNDAP",
"client",
"/",
"server",
"connection",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/opendap/src/main/java/opendap/dap/BaseTypePrimitiveVector.java#L179-L190 | test | Reads a
CTYPE from the specified input stream. | Of course, here is the Java code you requested:
```java
public synchronized void deserialize(DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
throws IOException, EOFException, DataReadException {
for (... |
cosysoft/device | device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java | AbstractDevice.handlePopBox | public boolean handlePopBox(String deviceBrand) {
pushHandleGps2Device();
CommandLine exeCommand = null;
if (deviceBrand.contains("HTC")) {
exeCommand = adbCommand("shell", "uiautomator", "runtest",
"/data/local/tmp/handlePopBox.jar", "-c", "com.test.device.gps.HTCGPSTest");
} else if (... | java | public boolean handlePopBox(String deviceBrand) {
pushHandleGps2Device();
CommandLine exeCommand = null;
if (deviceBrand.contains("HTC")) {
exeCommand = adbCommand("shell", "uiautomator", "runtest",
"/data/local/tmp/handlePopBox.jar", "-c", "com.test.device.gps.HTCGPSTest");
} else if (... | [
"public",
"boolean",
"handlePopBox",
"(",
"String",
"deviceBrand",
")",
"{",
"pushHandleGps2Device",
"(",
")",
";",
"CommandLine",
"exeCommand",
"=",
"null",
";",
"if",
"(",
"deviceBrand",
".",
"contains",
"(",
"\"HTC\"",
")",
")",
"{",
"exeCommand",
"=",
"a... | try to click GPS Popup window | [
"try",
"to",
"click",
"GPS",
"Popup",
"window"
] | d5cd0b713a47aba4d5f3f5d918578336f44ddb9e | https://github.com/cosysoft/device/blob/d5cd0b713a47aba4d5f3f5d918578336f44ddb9e/device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java#L325-L348 | test | Handle the pop box test | Of course, here is the Java code you requested:
```java
public boolean handlePopBox(String deviceBrand) {
pushHandleGps2Device();
CommandLine exeCommand = null;
if (deviceBrand.contains("HTC")) {
exeCommand = adbCommand("shell", "uiautomator", "runtest",
"/data/local/tmp/handlePopBox.jar",... |
oblac/jodd | jodd-db/src/main/java/jodd/db/oom/mapper/DefaultResultSetMapper.java | DefaultResultSetMapper.resolveTables | @Override
public Class[] resolveTables() {
List<Class> classes = new ArrayList<>(tableNames.length);
String lastTableName = null;
resultColumns.clear();
for (int i = 0; i < tableNames.length; i++) {
String tableName = tableNames[i];
String columnName = columnNames[i];
if (tableName == null) {
//... | java | @Override
public Class[] resolveTables() {
List<Class> classes = new ArrayList<>(tableNames.length);
String lastTableName = null;
resultColumns.clear();
for (int i = 0; i < tableNames.length; i++) {
String tableName = tableNames[i];
String columnName = columnNames[i];
if (tableName == null) {
//... | [
"@",
"Override",
"public",
"Class",
"[",
"]",
"resolveTables",
"(",
")",
"{",
"List",
"<",
"Class",
">",
"classes",
"=",
"new",
"ArrayList",
"<>",
"(",
"tableNames",
".",
"length",
")",
";",
"String",
"lastTableName",
"=",
"null",
";",
"resultColumns",
"... | {@inheritDoc} | [
"{"
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/oom/mapper/DefaultResultSetMapper.java#L206-L235 | test | Resolves the table names. | Of course, here is the Java code you requested:
```java
@Override
public Class[] resolveTables() {
List<Class> classes = new ArrayList<>(tableNames.length);
String lastTableName = null;
resultColumns.clear();
for (int i = 0; i < tableNames.length; i++) {
String tableName = tableNames[i];
String columnN... |
Unidata/thredds | tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java | NcssGridRequestValidator.isValid | @Override
public boolean isValid(NcssGridParamsBean params, ConstraintValidatorContext constraintValidatorContext) {
constraintValidatorContext.disableDefaultConstraintViolation();
boolean isValid = true;
// lat/lon point
if (params.getLatitude() != null || params.getLongitude() != null) {
if ... | java | @Override
public boolean isValid(NcssGridParamsBean params, ConstraintValidatorContext constraintValidatorContext) {
constraintValidatorContext.disableDefaultConstraintViolation();
boolean isValid = true;
// lat/lon point
if (params.getLatitude() != null || params.getLongitude() != null) {
if ... | [
"@",
"Override",
"public",
"boolean",
"isValid",
"(",
"NcssGridParamsBean",
"params",
",",
"ConstraintValidatorContext",
"constraintValidatorContext",
")",
"{",
"constraintValidatorContext",
".",
"disableDefaultConstraintViolation",
"(",
")",
";",
"boolean",
"isValid",
"=",... | /*
since none of these are required, can only do consistency checks
@see "http://www.unidata.ucar.edu/software/thredds/current/tds/reference/NetcdfSubsetServiceReference.html" | [
"/",
"*",
"since",
"none",
"of",
"these",
"are",
"required",
"can",
"only",
"do",
"consistency",
"checks"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/tds/src/main/java/thredds/server/ncss/validation/NcssGridRequestValidator.java#L39-L118 | test | Check if the NCSS grid parameters are valid. | Of course, here is the Java code you requested:
```java
@Override
public boolean isValid(NcssGridParamsBean params, ConstraintValidatorContext constraintValidatorContext) {
constraintValidatorContext.disableDefaultConstraintViolation();
boolean isValid = true;
// lat/lon point
if (params.getLatitud... |
apache/parquet-mr | parquet-column/src/main/java/org/apache/parquet/schema/Types.java | Types.required | public static PrimitiveBuilder<PrimitiveType> required(PrimitiveTypeName type) {
return new PrimitiveBuilder<PrimitiveType>(PrimitiveType.class, type)
.repetition(Type.Repetition.REQUIRED);
} | java | public static PrimitiveBuilder<PrimitiveType> required(PrimitiveTypeName type) {
return new PrimitiveBuilder<PrimitiveType>(PrimitiveType.class, type)
.repetition(Type.Repetition.REQUIRED);
} | [
"public",
"static",
"PrimitiveBuilder",
"<",
"PrimitiveType",
">",
"required",
"(",
"PrimitiveTypeName",
"type",
")",
"{",
"return",
"new",
"PrimitiveBuilder",
"<",
"PrimitiveType",
">",
"(",
"PrimitiveType",
".",
"class",
",",
"type",
")",
".",
"repetition",
"(... | Returns a builder to construct a required {@link PrimitiveType}.
@param type a {@link PrimitiveTypeName} for the constructed type
@return a {@link PrimitiveBuilder} | [
"Returns",
"a",
"builder",
"to",
"construct",
"a",
"required",
"{",
"@link",
"PrimitiveType",
"}",
"."
] | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/schema/Types.java#L1444-L1447 | test | Create a new instance of a required type. | Of course, here is the Java code you requested:
```java
public static PrimitiveBuilder<PrimitiveType> required(PrimitiveTypeName type) {
return new PrimitiveBuilder<PrimitiveType>(PrimitiveType.class, type)
.repetition(Type.Repetition.REQUIRED);
}
```
Hope this helps! |
orientechnologies/orientdb | distributed-v2/src/main/java/com/orientechnologies/orient/distributed/impl/OConflictResolverDatabaseRepairer.java | OConflictResolverDatabaseRepairer.cancelRepairRecord | @Override
public void cancelRepairRecord(final ORecordId rid) {
if (!active)
return;
if (rid.getClusterPosition() < -1)
// SKIP TRANSACTIONAL RIDS
return;
// REMOVE THE RECORD TO REPAIR
if (records.remove(rid) != null)
// REMOVED
recordCanceled.incrementAndGet();
} | java | @Override
public void cancelRepairRecord(final ORecordId rid) {
if (!active)
return;
if (rid.getClusterPosition() < -1)
// SKIP TRANSACTIONAL RIDS
return;
// REMOVE THE RECORD TO REPAIR
if (records.remove(rid) != null)
// REMOVED
recordCanceled.incrementAndGet();
} | [
"@",
"Override",
"public",
"void",
"cancelRepairRecord",
"(",
"final",
"ORecordId",
"rid",
")",
"{",
"if",
"(",
"!",
"active",
")",
"return",
";",
"if",
"(",
"rid",
".",
"getClusterPosition",
"(",
")",
"<",
"-",
"1",
")",
"// SKIP TRANSACTIONAL RIDS",
"ret... | Cancel the repair against a record because the update succeed.
@param rid RecordId to remove from repair | [
"Cancel",
"the",
"repair",
"against",
"a",
"record",
"because",
"the",
"update",
"succeed",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/distributed-v2/src/main/java/com/orientechnologies/orient/distributed/impl/OConflictResolverDatabaseRepairer.java#L168-L181 | test | Cancel a repair record. | Of course, here is the Java code you requested:
```java
@Override
public void cancelRepairRecord(final ORecordId rid) {
if (!active)
return;
if (rid.getClusterPosition() < -1)
// SKIP TRANSACTIONAL RIDS
return;
// REMOVE THE RECORD TO REPAIR
if (records.remove(rid) != null)
... |
zalando-stups/fullstop | fullstop/src/main/java/org/zalando/stups/fullstop/config/OAuth2Configuration.java | OAuth2Configuration.configure | @Override
public void configure(final HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(NEVER)
// configure form login
.and().formLogin().disable()
// configure logout
.logout().disable()
.authorizeReq... | java | @Override
public void configure(final HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(NEVER)
// configure form login
.and().formLogin().disable()
// configure logout
.logout().disable()
.authorizeReq... | [
"@",
"Override",
"public",
"void",
"configure",
"(",
"final",
"HttpSecurity",
"http",
")",
"throws",
"Exception",
"{",
"http",
".",
"sessionManagement",
"(",
")",
".",
"sessionCreationPolicy",
"(",
"NEVER",
")",
"// configure form login",
".",
"and",
"(",
")",
... | Configure scopes for specific controller/httpmethods/roles here. | [
"Configure",
"scopes",
"for",
"specific",
"controller",
"/",
"httpmethods",
"/",
"roles",
"here",
"."
] | 42f3bab557380aab0114028b58d745e3000897e8 | https://github.com/zalando-stups/fullstop/blob/42f3bab557380aab0114028b58d745e3000897e8/fullstop/src/main/java/org/zalando/stups/fullstop/config/OAuth2Configuration.java#L37-L57 | test | Configure the application. | Of course, here is the Java code you requested:
```java
@Override
public void configure(final HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(NEVER)
// configure form login
.and().formLogin().disable()
// configure logout
... |
ReactiveX/RxJava | src/main/java/io/reactivex/parallel/ParallelFlowable.java | ParallelFlowable.fromArray | @CheckReturnValue
@NonNull
public static <T> ParallelFlowable<T> fromArray(@NonNull Publisher<T>... publishers) {
if (publishers.length == 0) {
throw new IllegalArgumentException("Zero publishers not supported");
}
return RxJavaPlugins.onAssembly(new ParallelFromArray<T>(publ... | java | @CheckReturnValue
@NonNull
public static <T> ParallelFlowable<T> fromArray(@NonNull Publisher<T>... publishers) {
if (publishers.length == 0) {
throw new IllegalArgumentException("Zero publishers not supported");
}
return RxJavaPlugins.onAssembly(new ParallelFromArray<T>(publ... | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"public",
"static",
"<",
"T",
">",
"ParallelFlowable",
"<",
"T",
">",
"fromArray",
"(",
"@",
"NonNull",
"Publisher",
"<",
"T",
">",
"...",
"publishers",
")",
"{",
"if",
"(",
"publishers",
".",
"length",
"==",
"0",... | Wraps multiple Publishers into a ParallelFlowable which runs them
in parallel and unordered.
@param <T> the value type
@param publishers the array of publishers
@return the new ParallelFlowable instance | [
"Wraps",
"multiple",
"Publishers",
"into",
"a",
"ParallelFlowable",
"which",
"runs",
"them",
"in",
"parallel",
"and",
"unordered",
"."
] | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/parallel/ParallelFlowable.java#L755-L762 | test | Creates a parallel flowable from an array of publishers. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
public static <T> ParallelFlowable<T> fromArray(@NonNull Publisher<T>... publishers) {
if (publishers.length == 0) {
throw new IllegalArgumentException("Zero publishers not supported");
}
retu... |
wildfly/wildfly | iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ir/RepositoryImpl.java | RepositoryImpl.lookup_id | public Contained lookup_id(java.lang.String search_id) {
LocalContained c = _lookup_id(search_id);
if (c == null)
return null;
return ContainedHelper.narrow(c.getReference());
} | java | public Contained lookup_id(java.lang.String search_id) {
LocalContained c = _lookup_id(search_id);
if (c == null)
return null;
return ContainedHelper.narrow(c.getReference());
} | [
"public",
"Contained",
"lookup_id",
"(",
"java",
".",
"lang",
".",
"String",
"search_id",
")",
"{",
"LocalContained",
"c",
"=",
"_lookup_id",
"(",
"search_id",
")",
";",
"if",
"(",
"c",
"==",
"null",
")",
"return",
"null",
";",
"return",
"ContainedHelper",... | Repository implementation ------------------------------------- | [
"Repository",
"implementation",
"-------------------------------------"
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/ir/RepositoryImpl.java#L101-L108 | test | This method is used to lookup a single ID in the cache. | Of course, here is the Java code you requested:
```java
public Contained lookup_id(java.lang.String search_id) {
LocalContained c = _lookup_id(search_id);
if (c == null)
return null;
return ContainedHelper.narrow(c.getReference());
}
```
Hope this helps! |
algolia/algoliasearch-client-android | algoliasearch/src/main/java/com/algolia/search/saas/Index.java | Index.searchDisjunctiveFacetingAsync | public Request searchDisjunctiveFacetingAsync(@NonNull Query query, @NonNull final Collection<String> disjunctiveFacets, @NonNull final Map<String, ? extends Collection<String>> refinements, @NonNull final CompletionHandler completionHandler) {
return searchDisjunctiveFacetingAsync(query, disjunctiveFacets, ref... | java | public Request searchDisjunctiveFacetingAsync(@NonNull Query query, @NonNull final Collection<String> disjunctiveFacets, @NonNull final Map<String, ? extends Collection<String>> refinements, @NonNull final CompletionHandler completionHandler) {
return searchDisjunctiveFacetingAsync(query, disjunctiveFacets, ref... | [
"public",
"Request",
"searchDisjunctiveFacetingAsync",
"(",
"@",
"NonNull",
"Query",
"query",
",",
"@",
"NonNull",
"final",
"Collection",
"<",
"String",
">",
"disjunctiveFacets",
",",
"@",
"NonNull",
"final",
"Map",
"<",
"String",
",",
"?",
"extends",
"Collectio... | Perform a search with disjunctive facets, generating as many queries as number of disjunctive facets (helper).
@param query The query.
@param disjunctiveFacets List of disjunctive facets.
@param refinements The current refinements, mapping facet names to a list of values.
@param completionHandler The... | [
"Perform",
"a",
"search",
"with",
"disjunctive",
"facets",
"generating",
"as",
"many",
"queries",
"as",
"number",
"of",
"disjunctive",
"facets",
"(",
"helper",
")",
"."
] | 3293ba6e6116a4f6c1face2cc606bc047d6d4a3c | https://github.com/algolia/algoliasearch-client-android/blob/3293ba6e6116a4f6c1face2cc606bc047d6d4a3c/algoliasearch/src/main/java/com/algolia/search/saas/Index.java#L229-L231 | test | Search for disjunctive facets in asynchronous fashion. | Of course, here is the Java code you requested:
```java
public Request searchDisjunctiveFacetingAsync(@NonNull Query query, @NonNull final Collection<String> disjunctiveFacets, @NonNull final Map<String, ? extends Collection<String>> refinements, @NonNull final CompletionHandler completionHandler) {
return sea... |
playframework/playframework | core/play-guice/src/main/java/play/inject/guice/GuiceBuilder.java | GuiceBuilder.bindings | public final Self bindings(play.api.inject.Binding<?>... bindings) {
return bindings(Guiceable.bindings(bindings));
} | java | public final Self bindings(play.api.inject.Binding<?>... bindings) {
return bindings(Guiceable.bindings(bindings));
} | [
"public",
"final",
"Self",
"bindings",
"(",
"play",
".",
"api",
".",
"inject",
".",
"Binding",
"<",
"?",
">",
"...",
"bindings",
")",
"{",
"return",
"bindings",
"(",
"Guiceable",
".",
"bindings",
"(",
"bindings",
")",
")",
";",
"}"
] | Add Play bindings.
@param bindings the set of play bindings to apply
@return a copy of this builder configured with the provided bindings | [
"Add",
"Play",
"bindings",
"."
] | 3c46dca803d24e715d85de678c59dcfac9525a00 | https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play-guice/src/main/java/play/inject/guice/GuiceBuilder.java#L142-L144 | test | Set the bindings of this GuiceElement. | Of course, here is the Java code you requested:
```java
public final Self bindings(play.api.inject.Binding<?>... bindings) {
return bindings(Guiceable.bindings(bindings));
}
```
Hope this helps! |
Unidata/thredds | dap4/d4lib/src/main/java/dap4/dap4lib/netcdf/Nc4DSP.java | Nc4DSP.note | void
note(Notes note)
{
assert (this.allnotes != null);
int gid = note.gid;
int id = note.id;
NoteSort sort = note.getSort();
Map<Long, Notes> sortnotes = this.allnotes.get(sort);
assert sortnotes != null;
switch (sort) {
case TYPE:
... | java | void
note(Notes note)
{
assert (this.allnotes != null);
int gid = note.gid;
int id = note.id;
NoteSort sort = note.getSort();
Map<Long, Notes> sortnotes = this.allnotes.get(sort);
assert sortnotes != null;
switch (sort) {
case TYPE:
... | [
"void",
"note",
"(",
"Notes",
"note",
")",
"{",
"assert",
"(",
"this",
".",
"allnotes",
"!=",
"null",
")",
";",
"int",
"gid",
"=",
"note",
".",
"gid",
";",
"int",
"id",
"=",
"note",
".",
"id",
";",
"NoteSort",
"sort",
"=",
"note",
".",
"getSort",... | /*package | [
"/",
"*",
"package"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/dap4/d4lib/src/main/java/dap4/dap4lib/netcdf/Nc4DSP.java#L143-L165 | test | Add a node to the CRS table. | Of course, here is the Java code you requested:
```java
void
note(Notes note)
{
assert (this.allnotes != null);
int gid = note.gid;
int id = note.id;
NoteSort sort = note.getSort();
Map<Long, Notes> sortnotes = this.allnotes.get(sort);
assert sortnotes != null;
... |
Yubico/yubico-java-client | jaas/src/main/java/com/yubico/jaas/MultiValuePasswordCallback.java | MultiValuePasswordCallback.clearPassword | public void clearPassword() {
for (char pw[] : this.secrets) {
for (int i = 0; i < pw.length; i++) {
pw[i] = 0;
}
}
/* Now discard the list. */
this.secrets = new ArrayList<char []>();
} | java | public void clearPassword() {
for (char pw[] : this.secrets) {
for (int i = 0; i < pw.length; i++) {
pw[i] = 0;
}
}
/* Now discard the list. */
this.secrets = new ArrayList<char []>();
} | [
"public",
"void",
"clearPassword",
"(",
")",
"{",
"for",
"(",
"char",
"pw",
"[",
"]",
":",
"this",
".",
"secrets",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"pw",
".",
"length",
";",
"i",
"++",
")",
"{",
"pw",
"[",
"i",
"]"... | Tries to clear all the passwords from memory. | [
"Tries",
"to",
"clear",
"all",
"the",
"passwords",
"from",
"memory",
"."
] | 263b09c6ab0ee54b0dc7d70516989abab981796f | https://github.com/Yubico/yubico-java-client/blob/263b09c6ab0ee54b0dc7d70516989abab981796f/jaas/src/main/java/com/yubico/jaas/MultiValuePasswordCallback.java#L71-L80 | test | Clear the password. | Of course, here is the Java code you requested:
```java
public void clearPassword() {
for (char pw[] : this.secrets) {
for (int i = 0; i < pw.length; i++) {
pw[i] = 0;
}
}
/* Now discard the list. */
this.secrets = new ArrayList<char []>();
}
```
Hope this helps! |
Unidata/thredds | cdm/src/main/java/ucar/nc2/NetcdfFile.java | NetcdfFile.findAttribute | public Attribute findAttribute(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.length() == 0) {
return null;
}
int posAtt = fullNameEscaped.indexOf('@');
if (posAtt < 0 || posAtt >= fullNameEscaped.length() - 1)
return null;
if (posAtt == 0) {
return findG... | java | public Attribute findAttribute(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.length() == 0) {
return null;
}
int posAtt = fullNameEscaped.indexOf('@');
if (posAtt < 0 || posAtt >= fullNameEscaped.length() - 1)
return null;
if (posAtt == 0) {
return findG... | [
"public",
"Attribute",
"findAttribute",
"(",
"String",
"fullNameEscaped",
")",
"{",
"if",
"(",
"fullNameEscaped",
"==",
"null",
"||",
"fullNameEscaped",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"int",
"posAtt",
"=",
"fullNa... | Find an attribute, with the specified (escaped full) name.
It may possibly be nested in multiple groups and/or structures.
An embedded "." is interpreted as structure.member.
An embedded "/" is interpreted as group/group or group/variable.
An embedded "@" is interpreted as variable@attribute
If the name actually has a ... | [
"Find",
"an",
"attribute",
"with",
"the",
"specified",
"(",
"escaped",
"full",
")",
"name",
".",
"It",
"may",
"possibly",
"be",
"nested",
"in",
"multiple",
"groups",
"and",
"/",
"or",
"structures",
".",
"An",
"embedded",
".",
"is",
"interpreted",
"as",
"... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/NetcdfFile.java#L1272-L1320 | test | Find an attribute in the file. | Of course, here is the Java code you requested:
```java
public Attribute findAttribute(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.length() == 0) {
return null;
}
int posAtt = fullNameEscaped.indexOf('@');
if (posAtt < 0 || posAtt >= fullNameEscaped.length() - 1)
... |
spring-projects/spring-security | config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java | HttpSecurity.getOrApply | @SuppressWarnings("unchecked")
private <C extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>> C getOrApply(
C configurer) throws Exception {
C existingConfig = (C) getConfigurer(configurer.getClass());
if (existingConfig != null) {
return existingConfig;
}
return apply(configurer... | java | @SuppressWarnings("unchecked")
private <C extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>> C getOrApply(
C configurer) throws Exception {
C existingConfig = (C) getConfigurer(configurer.getClass());
if (existingConfig != null) {
return existingConfig;
}
return apply(configurer... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"<",
"C",
"extends",
"SecurityConfigurerAdapter",
"<",
"DefaultSecurityFilterChain",
",",
"HttpSecurity",
">",
">",
"C",
"getOrApply",
"(",
"C",
"configurer",
")",
"throws",
"Exception",
"{",
"C",
"exi... | If the {@link SecurityConfigurer} has already been specified get the original,
otherwise apply the new {@link SecurityConfigurerAdapter}.
@param configurer the {@link SecurityConfigurer} to apply if one is not found for
this {@link SecurityConfigurer} class.
@return the current {@link SecurityConfigurer} for the confi... | [
"If",
"the",
"{",
"@link",
"SecurityConfigurer",
"}",
"has",
"already",
"been",
"specified",
"get",
"the",
"original",
"otherwise",
"apply",
"the",
"new",
"{",
"@link",
"SecurityConfigurerAdapter",
"}",
"."
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java#L1494-L1502 | test | Get or apply the given configurer. | Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
private <C extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>> C getOrApply(
C configurer) throws Exception {
C existingConfig = (C) getConfigurer(configurer.getClass());
if (existingConfig != null) ... |
spring-projects/spring-security | web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java | AbstractAuthenticationProcessingFilter.doFilter | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
if (!requiresAuthentication(request, response)) {
chain.doFilter(request,... | java | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
if (!requiresAuthentication(request, response)) {
chain.doFilter(request,... | [
"public",
"void",
"doFilter",
"(",
"ServletRequest",
"req",
",",
"ServletResponse",
"res",
",",
"FilterChain",
"chain",
")",
"throws",
"IOException",
",",
"ServletException",
"{",
"HttpServletRequest",
"request",
"=",
"(",
"HttpServletRequest",
")",
"req",
";",
"H... | Invokes the
{@link #requiresAuthentication(HttpServletRequest, HttpServletResponse)
requiresAuthentication} method to determine whether the request is for
authentication and should be handled by this filter. If it is an authentication
request, the
{@link #attemptAuthentication(HttpServletRequest, HttpServletResponse)
a... | [
"Invokes",
"the",
"{"
] | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java#L193-L241 | test | This method is called by the servlet to process the request. | Of course, here is the Java code you requested:
```java
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;
if (!requiresAuthen... |
rupertlssmith/lojix | lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/TermWalkers.java | TermWalkers.positionalPostfixWalker | public static TermWalker positionalPostfixWalker(PositionalTermVisitor visitor)
{
PositionalTermTraverser positionalTraverser = new PositionalTermTraverserImpl();
positionalTraverser.setContextChangeVisitor(visitor);
visitor.setPositionalTraverser(positionalTraverser);
return new Te... | java | public static TermWalker positionalPostfixWalker(PositionalTermVisitor visitor)
{
PositionalTermTraverser positionalTraverser = new PositionalTermTraverserImpl();
positionalTraverser.setContextChangeVisitor(visitor);
visitor.setPositionalTraverser(positionalTraverser);
return new Te... | [
"public",
"static",
"TermWalker",
"positionalPostfixWalker",
"(",
"PositionalTermVisitor",
"visitor",
")",
"{",
"PositionalTermTraverser",
"positionalTraverser",
"=",
"new",
"PositionalTermTraverserImpl",
"(",
")",
";",
"positionalTraverser",
".",
"setContextChangeVisitor",
"... | Provides a positional postfix walk over a term.
@param visitor The visitor to apply to each term, and to notify of positional context changes.
@return A positional postfix first walk over a term. | [
"Provides",
"a",
"positional",
"postfix",
"walk",
"over",
"a",
"term",
"."
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/wam_prolog/src/main/com/thesett/aima/logic/fol/wam/TermWalkers.java#L122-L129 | test | Create a term walker that walks a sequence of terms using a post - fix search. | Of course, here is the Java code you requested:
```java
public static TermWalker positionalPostfixWalker(PositionalTermVisitor visitor)
{
PositionalTermTraverser positionalTraverser = new PositionalTermTraverserImpl();
positionalTraverser.setContextChangeVisitor(visitor);
visitor.setPositio... |
Unidata/thredds | ldm/src/main/thredds/ldm/MessageBroker.java | MessageBroker.process | private int process(Buffer b, InputStream is) throws IOException {
int start = 0;
while (start < b.have) {
int matchPos = matcher.indexOf(b.buff, start, b.have - start);
// didnt find "BUFR" match
if (matchPos < 0) {
if (start == 0) // discard all but last 3 bytes
return b.h... | java | private int process(Buffer b, InputStream is) throws IOException {
int start = 0;
while (start < b.have) {
int matchPos = matcher.indexOf(b.buff, start, b.have - start);
// didnt find "BUFR" match
if (matchPos < 0) {
if (start == 0) // discard all but last 3 bytes
return b.h... | [
"private",
"int",
"process",
"(",
"Buffer",
"b",
",",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"int",
"start",
"=",
"0",
";",
"while",
"(",
"start",
"<",
"b",
".",
"have",
")",
"{",
"int",
"matchPos",
"=",
"matcher",
".",
"indexOf",
"(... | return where in the buffer we got to. | [
"return",
"where",
"in",
"the",
"buffer",
"we",
"got",
"to",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ldm/src/main/thredds/ldm/MessageBroker.java#L263-L335 | test | Process the buffer b. have bytes and return the number of bytes that were processed. | Of course, here is the Java code you requested:
```java
private int process(Buffer b, InputStream is) throws IOException {
int start = 0;
while (start < b.have) {
int matchPos = matcher.indexOf(b.buff, start, b.have - start);
// didnt find "BUFR" match
if (matchPos < 0) {
if (start =... |
jcodec/jcodec | src/main/java/org/jcodec/codecs/h264/decode/SliceHeaderReader.java | SliceHeaderReader.readDecoderPicMarking | private static void readDecoderPicMarking(NALUnit nalUnit, SliceHeader sh, BitReader _in) {
if (nalUnit.type == NALUnitType.IDR_SLICE) {
boolean noOutputOfPriorPicsFlag = readBool(_in, "SH: no_output_of_prior_pics_flag");
boolean longTermReferenceFlag = readBool(_in, "SH: long_term_refer... | java | private static void readDecoderPicMarking(NALUnit nalUnit, SliceHeader sh, BitReader _in) {
if (nalUnit.type == NALUnitType.IDR_SLICE) {
boolean noOutputOfPriorPicsFlag = readBool(_in, "SH: no_output_of_prior_pics_flag");
boolean longTermReferenceFlag = readBool(_in, "SH: long_term_refer... | [
"private",
"static",
"void",
"readDecoderPicMarking",
"(",
"NALUnit",
"nalUnit",
",",
"SliceHeader",
"sh",
",",
"BitReader",
"_in",
")",
"{",
"if",
"(",
"nalUnit",
".",
"type",
"==",
"NALUnitType",
".",
"IDR_SLICE",
")",
"{",
"boolean",
"noOutputOfPriorPicsFlag"... | static int i = 0; | [
"static",
"int",
"i",
"=",
"0",
";"
] | cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75 | https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/org/jcodec/codecs/h264/decode/SliceHeaderReader.java#L143-L189 | test | readDecoderPicMarking Method. | Of course, here is the Java code you requested:
```java
private static void readDecoderPicMarking(NALUnit nalUnit, SliceHeader sh, BitReader _in) {
if (nalUnit.type == NALUnitType.IDR_SLICE) {
boolean noOutputOfPriorPicsFlag = readBool(_in, "SH: no_output_of_prior_pics_flag");
boolean l... |
oblac/jodd | jodd-http/src/main/java/jodd/http/net/Socks4ProxySocketFactory.java | Socks4ProxySocketFactory.createSocks4ProxySocket | private Socket createSocks4ProxySocket(final String host, final int port) {
Socket socket = null;
final String proxyHost = proxy.getProxyAddress();
final int proxyPort = proxy.getProxyPort();
final String user = proxy.getProxyUsername();
try {
socket = Sockets.connect(proxyHost, proxyPort, connectionTimeo... | java | private Socket createSocks4ProxySocket(final String host, final int port) {
Socket socket = null;
final String proxyHost = proxy.getProxyAddress();
final int proxyPort = proxy.getProxyPort();
final String user = proxy.getProxyUsername();
try {
socket = Sockets.connect(proxyHost, proxyPort, connectionTimeo... | [
"private",
"Socket",
"createSocks4ProxySocket",
"(",
"final",
"String",
"host",
",",
"final",
"int",
"port",
")",
"{",
"Socket",
"socket",
"=",
"null",
";",
"final",
"String",
"proxyHost",
"=",
"proxy",
".",
"getProxyAddress",
"(",
")",
";",
"final",
"int",
... | Connects to the SOCKS4 proxy and returns proxified socket. | [
"Connects",
"to",
"the",
"SOCKS4",
"proxy",
"and",
"returns",
"proxified",
"socket",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-http/src/main/java/jodd/http/net/Socks4ProxySocketFactory.java#L76-L147 | test | Creates a SOCKS4 proxy socket. | Of course, here is the Java code you requested:
```java
private Socket createSocks4ProxySocket(final String host, final int port) {
Socket socket = null;
final String proxyHost = proxy.getProxyAddress();
final int proxyPort = proxy.getProxyPort();
final String user = proxy.getProxyUsername();
try {
socke... |
playframework/playframework | documentation/manual/working/javaGuide/main/sql/code/JPARepository.java | JPARepositoryMethods.runningWithTransaction | public CompletionStage<Long> runningWithTransaction() {
return CompletableFuture.supplyAsync(
() -> {
// lambda is an instance of Function<EntityManager, Long>
return jpaApi.withTransaction(
entityManager -> {
Query query = entityManager.createNativeQuery("s... | java | public CompletionStage<Long> runningWithTransaction() {
return CompletableFuture.supplyAsync(
() -> {
// lambda is an instance of Function<EntityManager, Long>
return jpaApi.withTransaction(
entityManager -> {
Query query = entityManager.createNativeQuery("s... | [
"public",
"CompletionStage",
"<",
"Long",
">",
"runningWithTransaction",
"(",
")",
"{",
"return",
"CompletableFuture",
".",
"supplyAsync",
"(",
"(",
")",
"->",
"{",
"// lambda is an instance of Function<EntityManager, Long>",
"return",
"jpaApi",
".",
"withTransaction",
... | #jpa-withTransaction-function | [
"#jpa",
"-",
"withTransaction",
"-",
"function"
] | 3c46dca803d24e715d85de678c59dcfac9525a00 | https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/documentation/manual/working/javaGuide/main/sql/code/JPARepository.java#L38-L49 | test | Running with transaction | Of course, here is the Java code you requested:
```java
public CompletionStage<Long> runningWithTransaction() {
return CompletableFuture.supplyAsync(
() -> {
// lambda is an instance of Function<EntityManager, Long>
return jpaApi.withTransaction(
entityManager -> {
... |
1gravity/Android-RTEditor | RTEditor/src/main/java/com/onegravity/rteditor/utils/validator/DomainValidator.java | DomainValidator.isValidInfrastructureTld | public boolean isValidInfrastructureTld(String iTld) {
iTld = unicodeToASCII(iTld);
return Arrays.binarySearch(INFRASTRUCTURE_TLDS, (chompLeadingDot(iTld.toLowerCase(Locale.ENGLISH)))) >= 0;
} | java | public boolean isValidInfrastructureTld(String iTld) {
iTld = unicodeToASCII(iTld);
return Arrays.binarySearch(INFRASTRUCTURE_TLDS, (chompLeadingDot(iTld.toLowerCase(Locale.ENGLISH)))) >= 0;
} | [
"public",
"boolean",
"isValidInfrastructureTld",
"(",
"String",
"iTld",
")",
"{",
"iTld",
"=",
"unicodeToASCII",
"(",
"iTld",
")",
";",
"return",
"Arrays",
".",
"binarySearch",
"(",
"INFRASTRUCTURE_TLDS",
",",
"(",
"chompLeadingDot",
"(",
"iTld",
".",
"toLowerCa... | Returns true if the specified <code>String</code> matches any
IANA-defined infrastructure top-level domain. Leading dots are
ignored if present. The search is case-insensitive.
@param iTld the parameter to check for infrastructure TLD status, not null
@return true if the parameter is an infrastructure TLD | [
"Returns",
"true",
"if",
"the",
"specified",
"<code",
">",
"String<",
"/",
"code",
">",
"matches",
"any",
"IANA",
"-",
"defined",
"infrastructure",
"top",
"-",
"level",
"domain",
".",
"Leading",
"dots",
"are",
"ignored",
"if",
"present",
".",
"The",
"searc... | 9d8fb4bb865b3b3d011e7633afedcdfb8d21754f | https://github.com/1gravity/Android-RTEditor/blob/9d8fb4bb865b3b3d011e7633afedcdfb8d21754f/RTEditor/src/main/java/com/onegravity/rteditor/utils/validator/DomainValidator.java#L209-L212 | test | Check if the given string is a valid infrastructure tld. | Of course, here is the Java code you requested:
```java
public boolean isValidInfrastructureTld(String iTld) {
iTld = unicodeToASCII(iTld);
return Arrays.binarySearch(INFRASTRUCTURE_TLDS, (chompLeadingDot(iTld.toLowerCase(Locale.ENGLISH)))) >= 0;
}
```
Hope this helps! |
jcuda/jcublas | JCublasJava/src/main/java/jcuda/jcublas/JCublas.java | JCublas.cublasCgerc | public static void cublasCgerc(int m, int n, cuComplex alpha, Pointer x, int incx, Pointer y, int incy, Pointer A, int lda)
{
cublasCgercNative(m, n, alpha, x, incx, y, incy, A, lda);
checkResultBLAS();
} | java | public static void cublasCgerc(int m, int n, cuComplex alpha, Pointer x, int incx, Pointer y, int incy, Pointer A, int lda)
{
cublasCgercNative(m, n, alpha, x, incx, y, incy, A, lda);
checkResultBLAS();
} | [
"public",
"static",
"void",
"cublasCgerc",
"(",
"int",
"m",
",",
"int",
"n",
",",
"cuComplex",
"alpha",
",",
"Pointer",
"x",
",",
"int",
"incx",
",",
"Pointer",
"y",
",",
"int",
"incy",
",",
"Pointer",
"A",
",",
"int",
"lda",
")",
"{",
"cublasCgercNa... | <pre>
cublasCgerc (int m, int n, cuComplex alpha, const cuComplex *x, int incx,
const cuComplex *y, int incy, cuComplex *A, int lda)
performs the symmetric rank 1 operation
A = alpha * x * conjugate(transpose(y)) + A,
where alpha is a single precision complex scalar, x is an m element single
precision complex vector... | [
"<pre",
">",
"cublasCgerc",
"(",
"int",
"m",
"int",
"n",
"cuComplex",
"alpha",
"const",
"cuComplex",
"*",
"x",
"int",
"incx",
"const",
"cuComplex",
"*",
"y",
"int",
"incy",
"cuComplex",
"*",
"A",
"int",
"lda",
")"
] | 80875235d24562073f4d66651dd17263f306427d | https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas.java#L5407-L5411 | test | Cublas Cgerc | Of course, here is the Java code you requested:
```java
public static void cublasCgerc(int m, int n, cuComplex alpha, Pointer x, int incx, Pointer y, int incy, Pointer A, int lda)
{
cublasCgercNative(m, n, alpha, x, incx, y, incy, A, lda);
checkResultBLAS();
}
```
Hope this helps! |
subchen/jetbrick-all-1x | jetbrick-commons/src/main/java/jetbrick/lang/StringUtils.java | StringUtils.indexOf | public static int indexOf(String s, String substr, int startIndex, int endIndex) {
if (startIndex < 0) {
startIndex = 0;
}
int srclen = s.length();
if (endIndex > srclen) {
endIndex = srclen;
}
int sublen = substr.length();
if (sublen == 0)... | java | public static int indexOf(String s, String substr, int startIndex, int endIndex) {
if (startIndex < 0) {
startIndex = 0;
}
int srclen = s.length();
if (endIndex > srclen) {
endIndex = srclen;
}
int sublen = substr.length();
if (sublen == 0)... | [
"public",
"static",
"int",
"indexOf",
"(",
"String",
"s",
",",
"String",
"substr",
",",
"int",
"startIndex",
",",
"int",
"endIndex",
")",
"{",
"if",
"(",
"startIndex",
"<",
"0",
")",
"{",
"startIndex",
"=",
"0",
";",
"}",
"int",
"srclen",
"=",
"s",
... | Finds first occurrence of a substring in the given source but within limited range [start, end).
It is fastest possible code, but still original <code>String.indexOf(String, int)</code>
is much faster (since it uses char[] value directly) and should be used when no range is needed.
@param s source strin... | [
"Finds",
"first",
"occurrence",
"of",
"a",
"substring",
"in",
"the",
"given",
"source",
"but",
"within",
"limited",
"range",
"[",
"start",
"end",
")",
".",
"It",
"is",
"fastest",
"possible",
"code",
"but",
"still",
"original",
"<code",
">",
"String",
".",
... | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/lang/StringUtils.java#L531-L562 | test | Method indexOf. | Of course, here is the Java code you requested:
```java
public static int indexOf(String s, String substr, int startIndex, int endIndex) {
if (startIndex < 0) {
startIndex = 0;
}
int srclen = s.length();
if (endIndex > srclen) {
endIndex = srclen;
}
... |
jryans/jless | src/main/java/com/bazaarvoice/jless/parser/Parser.java | Parser.Unicode | Rule Unicode() {
return Sequence(
'\\',
Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex()))))),
Optional(Whitespace())
);
} | java | Rule Unicode() {
return Sequence(
'\\',
Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex()))))),
Optional(Whitespace())
);
} | [
"Rule",
"Unicode",
"(",
")",
"{",
"return",
"Sequence",
"(",
"'",
"'",
",",
"Hex",
"(",
")",
",",
"Optional",
"(",
"Hex",
"(",
")",
",",
"Optional",
"(",
"Hex",
"(",
")",
",",
"Optional",
"(",
"Hex",
"(",
")",
",",
"Optional",
"(",
"Hex",
"(",
... | '\' [0-9a-fA-F]{1,6} wc? | [
"\\",
"[",
"0",
"-",
"9a",
"-",
"fA",
"-",
"F",
"]",
"{",
"1",
"6",
"}",
"wc?"
] | 0e448fac752b4fc7bfef6b220ed1c64a490c29c0 | https://github.com/jryans/jless/blob/0e448fac752b4fc7bfef6b220ed1c64a490c29c0/src/main/java/com/bazaarvoice/jless/parser/Parser.java#L884-L890 | test | Unicode - > Unicode | Of course, here is the Java code you requested:
```java
Rule Unicode() {
return Sequence(
'\\',
Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex()))))),
Optional(Whitespace())
);
}
```
Hope this helps! |
liveontologies/elk-reasoner | elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/stages/AbstractReasonerState.java | AbstractReasonerState.isInconsistent | public synchronized boolean isInconsistent() throws ElkException {
restoreConsistencyCheck();
if (!consistencyCheckingState.isInconsistent()) {
incompleteness_.log(incompleteness_
.getIncompletenessMonitorForClassification());
}
return consistencyCheckingState.isInconsistent();
} | java | public synchronized boolean isInconsistent() throws ElkException {
restoreConsistencyCheck();
if (!consistencyCheckingState.isInconsistent()) {
incompleteness_.log(incompleteness_
.getIncompletenessMonitorForClassification());
}
return consistencyCheckingState.isInconsistent();
} | [
"public",
"synchronized",
"boolean",
"isInconsistent",
"(",
")",
"throws",
"ElkException",
"{",
"restoreConsistencyCheck",
"(",
")",
";",
"if",
"(",
"!",
"consistencyCheckingState",
".",
"isInconsistent",
"(",
")",
")",
"{",
"incompleteness_",
".",
"log",
"(",
"... | Check consistency of the current ontology, if this has not been done yet.
@return {@code true} if the ontology is inconsistent, that is,
unsatisfiable.
@throws ElkException
if the reasoning process cannot be completed successfully | [
"Check",
"consistency",
"of",
"the",
"current",
"ontology",
"if",
"this",
"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#L486-L495 | test | Returns true if the data structure is inconsistent. | Of course, here is the Java code you requested:
```java
public synchronized boolean isInconsistent() throws ElkException {
restoreConsistencyCheck();
if (!consistencyCheckingState.isInconsistent()) {
incompleteness_.log(incompleteness_
.getIncompletenessMonitorForClassification());
}
return consisten... |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java | Parser.parseElements | private void parseElements(Node parent)
throws JasperException
{
if( scriptlessCount > 0 ) {
// vc: ScriptlessBody
// We must follow the ScriptlessBody production if one of
// our parents is ScriptlessBody.
parseElementsScriptless( parent );
... | java | private void parseElements(Node parent)
throws JasperException
{
if( scriptlessCount > 0 ) {
// vc: ScriptlessBody
// We must follow the ScriptlessBody production if one of
// our parents is ScriptlessBody.
parseElementsScriptless( parent );
... | [
"private",
"void",
"parseElements",
"(",
"Node",
"parent",
")",
"throws",
"JasperException",
"{",
"if",
"(",
"scriptlessCount",
">",
"0",
")",
"{",
"// vc: ScriptlessBody",
"// We must follow the ScriptlessBody production if one of",
"// our parents is ScriptlessBody.",
"pars... | /*
AllBody ::= ( '<%--' JSPCommentBody )
| ( '<%@' DirectiveBody )
| ( '<jsp:directive.' XMLDirectiveBody )
| ( '<%!' DeclarationBody )
| ( '<jsp:declaration' XMLDeclarationBody )
| ( '<%=' ExpressionBody )
| ( '<jsp:expression' XMLExpr... | [
"/",
"*",
"AllBody",
"::",
"=",
"(",
"<%",
"--",
"JSPCommentBody",
")",
"|",
"(",
"<%"
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java#L1642-L1684 | test | Parse XML elements. | Of course, here is the Java code you requested:
```java
private void parseElements(Node parent)
throws JasperException
{
if( scriptlessCount > 0 ) {
// vc: ScriptlessBody
// We must follow the ScriptlessBody production if one of
// our parents is ScriptlessBody... |
kocakosm/pitaya | src/org/kocakosm/pitaya/util/Comparators.java | Comparators.withNullsFirst | public static <T> Comparator<T> withNullsFirst(final Comparator<T> comparator)
{
Parameters.checkNotNull(comparator);
return new Comparator<T>()
{
@Override
public int compare(T o1, T o2)
{
return o1 == o2 ? 0
: o1 == null ? -1
: o2 == null ? 1
: comparator.compare(o1, o2);
}
};
... | java | public static <T> Comparator<T> withNullsFirst(final Comparator<T> comparator)
{
Parameters.checkNotNull(comparator);
return new Comparator<T>()
{
@Override
public int compare(T o1, T o2)
{
return o1 == o2 ? 0
: o1 == null ? -1
: o2 == null ? 1
: comparator.compare(o1, o2);
}
};
... | [
"public",
"static",
"<",
"T",
">",
"Comparator",
"<",
"T",
">",
"withNullsFirst",
"(",
"final",
"Comparator",
"<",
"T",
">",
"comparator",
")",
"{",
"Parameters",
".",
"checkNotNull",
"(",
"comparator",
")",
";",
"return",
"new",
"Comparator",
"<",
"T",
... | Returns a new {@code Comparator} that considers {@code null} values
as less than all other values and compares non-{@code null} values
with the given {@code Comparator}.
@param <T> the parameters type of the {@code Comparator}.
@param comparator the non-{@code null} values {@code Comparator}
@return the created {@cod... | [
"Returns",
"a",
"new",
"{",
"@code",
"Comparator",
"}",
"that",
"considers",
"{",
"@code",
"null",
"}",
"values",
"as",
"less",
"than",
"all",
"other",
"values",
"and",
"compares",
"non",
"-",
"{",
"@code",
"null",
"}",
"values",
"with",
"the",
"given",
... | f2b203b6cdb32723bd1249a1325a3bb5918bf99a | https://github.com/kocakosm/pitaya/blob/f2b203b6cdb32723bd1249a1325a3bb5918bf99a/src/org/kocakosm/pitaya/util/Comparators.java#L129-L143 | test | Creates a Comparator that compares two objects using the specified Comparator. | Of course, here is the Java code you requested:
```java
public static <T> Comparator<T> withNullsFirst(final Comparator<T> comparator)
{
Parameters.checkNotNull(comparator);
return new Comparator<T>()
{
@Override
public int compare(T o1, T o2)
{
return o1 == o2 ? 0
: o1 == null ? -1
: o2 ... |
tiefaces/TieFaces | src/org/tiefaces/components/websheet/utility/WebSheetUtility.java | WebSheetUtility.convertColToInt | public static int convertColToInt(final String col) {
String name = col.toUpperCase();
int number = 0;
int pow = 1;
for (int i = name.length() - 1; i >= 0; i--) {
number += (name.charAt(i) - 'A' + 1) * pow;
pow *= TieConstants.EXCEL_LETTER_NUMBERS;
}
return number - 1;
} | java | public static int convertColToInt(final String col) {
String name = col.toUpperCase();
int number = 0;
int pow = 1;
for (int i = name.length() - 1; i >= 0; i--) {
number += (name.charAt(i) - 'A' + 1) * pow;
pow *= TieConstants.EXCEL_LETTER_NUMBERS;
}
return number - 1;
} | [
"public",
"static",
"int",
"convertColToInt",
"(",
"final",
"String",
"col",
")",
"{",
"String",
"name",
"=",
"col",
".",
"toUpperCase",
"(",
")",
";",
"int",
"number",
"=",
"0",
";",
"int",
"pow",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"name"... | Convert col to int.
@param col
the col
@return the int | [
"Convert",
"col",
"to",
"int",
"."
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/utility/WebSheetUtility.java#L225-L235 | test | Convert a column name to an integer. | Of course, here is the Java code you requested:
```java
public static int convertColToInt(final String col) {
String name = col.toUpperCase();
int number = 0;
int pow = 1;
for (int i = name.length() - 1; i >= 0; i--) {
number += (name.charAt(i) - 'A' + 1) * pow;
pow *= TieConstants.EXCEL_LETTER_NUM... |
lessthanoptimal/GeoRegression | main/src/georegression/geometry/UtilPolygons2D_F64.java | UtilPolygons2D_F64.center | public static Point2D_F64 center( Quadrilateral_F64 quad , Point2D_F64 center ) {
if( center == null )
center = new Point2D_F64();
center.x = quad.a.x + quad.b.x + quad.c.x + quad.d.x;
center.y = quad.a.y + quad.b.y + quad.c.y + quad.d.y;
center.x /= 4.0;
center.y /= 4.0;
return center;
} | java | public static Point2D_F64 center( Quadrilateral_F64 quad , Point2D_F64 center ) {
if( center == null )
center = new Point2D_F64();
center.x = quad.a.x + quad.b.x + quad.c.x + quad.d.x;
center.y = quad.a.y + quad.b.y + quad.c.y + quad.d.y;
center.x /= 4.0;
center.y /= 4.0;
return center;
} | [
"public",
"static",
"Point2D_F64",
"center",
"(",
"Quadrilateral_F64",
"quad",
",",
"Point2D_F64",
"center",
")",
"{",
"if",
"(",
"center",
"==",
"null",
")",
"center",
"=",
"new",
"Point2D_F64",
"(",
")",
";",
"center",
".",
"x",
"=",
"quad",
".",
"a",
... | Computes the center or average point in the quadrilateral.
@param quad (Input) Quadrilateral
@param center (output) Center point of the quadrilateral. Can be null.
@return The center point. | [
"Computes",
"the",
"center",
"or",
"average",
"point",
"in",
"the",
"quadrilateral",
"."
] | c067cd44a4e95bd826119f6e658bd82386ef289f | https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/UtilPolygons2D_F64.java#L222-L233 | test | Computes the center of the quadrilateral. | Of course, here is the Java code you requested:
```java
public static Point2D_F64 center( Quadrilateral_F64 quad , Point2D_F64 center ) {
if( center == null )
center = new Point2D_F64();
center.x = quad.a.x + quad.b.x + quad.c.x + quad.d.x;
center.y = quad.a.y + quad.b.y + quad.c.y + quad.d.y;
center.x /=... |
wildfly/wildfly | microprofile/metrics-smallrye/src/main/java/org/wildfly/extension/microprofile/metrics/MetricCollector.java | MetricCollector.collectResourceMetrics | public MetricRegistration collectResourceMetrics(final Resource resource,
ImmutableManagementResourceRegistration managementResourceRegistration,
Function<PathAddress, PathAddress> resourceAddressResolver) {
MetricRegist... | java | public MetricRegistration collectResourceMetrics(final Resource resource,
ImmutableManagementResourceRegistration managementResourceRegistration,
Function<PathAddress, PathAddress> resourceAddressResolver) {
MetricRegist... | [
"public",
"MetricRegistration",
"collectResourceMetrics",
"(",
"final",
"Resource",
"resource",
",",
"ImmutableManagementResourceRegistration",
"managementResourceRegistration",
",",
"Function",
"<",
"PathAddress",
",",
"PathAddress",
">",
"resourceAddressResolver",
")",
"{",
... | collect metrics from the resources | [
"collect",
"metrics",
"from",
"the",
"resources"
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/microprofile/metrics-smallrye/src/main/java/org/wildfly/extension/microprofile/metrics/MetricCollector.java#L88-L94 | test | Collect resource metrics. | Of course, here is the Java code you requested:
```java
public MetricRegistration collectResourceMetrics(final Resource resource,
ImmutableManagementResourceRegistration managementResourceRegistration,
Function<PathAddress, Pat... |
ReactiveX/RxJava | src/main/java/io/reactivex/Flowable.java | Flowable.filter | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> filter(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is null");
return RxJavaPlugins.onAssembly(new Flowa... | java | @CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> filter(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is null");
return RxJavaPlugins.onAssembly(new Flowa... | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"PASS_THROUGH",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Flowable",
"<",
"T",
">",
"filter",
"(",
"Predicate",
... | Filters items emitted by a Publisher by only emitting those that satisfy a specified predicate.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/filter.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The operator doesn't interfere with backpressure which is det... | [
"Filters",
"items",
"emitted",
"by",
"a",
"Publisher",
"by",
"only",
"emitting",
"those",
"that",
"satisfy",
"a",
"specified",
"predicate",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"310",
"src",
"=",
"https",
":",
"//",
"raw",
".",
"... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L9501-L9508 | test | Returns a sequence of items that match the specified predicate. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> filter(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is ... |
Unidata/thredds | legacy/src/main/java/ucar/nc2/dt/point/StationObsDatasetInfo.java | StationObsDatasetInfo.main | public static void main(String args[]) throws IOException {
String url = "C:/data/metars/Surface_METAR_20060326_0000.nc";
StationObsDataset ncd = (StationObsDataset) TypedDatasetFactory.open(FeatureType.STATION, url, null, new StringBuilder());
StationObsDatasetInfo info = new StationObsDatasetInfo(ncd, nu... | java | public static void main(String args[]) throws IOException {
String url = "C:/data/metars/Surface_METAR_20060326_0000.nc";
StationObsDataset ncd = (StationObsDataset) TypedDatasetFactory.open(FeatureType.STATION, url, null, new StringBuilder());
StationObsDatasetInfo info = new StationObsDatasetInfo(ncd, nu... | [
"public",
"static",
"void",
"main",
"(",
"String",
"args",
"[",
"]",
")",
"throws",
"IOException",
"{",
"String",
"url",
"=",
"\"C:/data/metars/Surface_METAR_20060326_0000.nc\"",
";",
"StationObsDataset",
"ncd",
"=",
"(",
"StationObsDataset",
")",
"TypedDatasetFactory... | debug | [
"debug"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/dt/point/StationObsDatasetInfo.java#L296-L310 | test | This is the main method of the class. | Of course, here is the Java code you requested:
```java
public static void main(String args[]) throws IOException {
String url = "C:/data/metars/Surface_METAR_20060326_0000.nc";
StationObsDataset ncd = (StationObsDataset) TypedDatasetFactory.open(FeatureType.STATION, url, null, new StringBuilder());
Stati... |
wildfly/wildfly | undertow/src/main/java/org/wildfly/extension/undertow/deployment/UndertowDeploymentInfoService.java | UndertowDeploymentInfoService.handleJASPIMechanism | private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) {
ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain);
if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInstance(applicationPolicy.getAuthenticationInfo())) {
... | java | private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) {
ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain);
if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInstance(applicationPolicy.getAuthenticationInfo())) {
... | [
"private",
"void",
"handleJASPIMechanism",
"(",
"final",
"DeploymentInfo",
"deploymentInfo",
")",
"{",
"ApplicationPolicy",
"applicationPolicy",
"=",
"SecurityConfiguration",
".",
"getApplicationPolicy",
"(",
"this",
".",
"securityDomain",
")",
";",
"if",
"(",
"applicat... | <p>Adds to the deployment the {@link org.wildfly.extension.undertow.security.jaspi.JASPICAuthenticationMechanism}, if necessary. The handler will be added if the security domain
is configured with JASPI authentication.</p>
@param deploymentInfo | [
"<p",
">",
"Adds",
"to",
"the",
"deployment",
"the",
"{",
"@link",
"org",
".",
"wildfly",
".",
"extension",
".",
"undertow",
".",
"security",
".",
"jaspi",
".",
"JASPICAuthenticationMechanism",
"}",
"if",
"necessary",
".",
"The",
"handler",
"will",
"be",
"... | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/undertow/src/main/java/org/wildfly/extension/undertow/deployment/UndertowDeploymentInfoService.java#L465-L478 | test | Handle JASPIMechanism. | Of course, here is the Java code you requested:
```java
private void handleJASPIMechanism(final DeploymentInfo deploymentInfo) {
ApplicationPolicy applicationPolicy = SecurityConfiguration.getApplicationPolicy(this.securityDomain);
if (applicationPolicy != null && JASPIAuthenticationInfo.class.isInsta... |
Unidata/thredds | opendap/src/main/java/opendap/servlet/ascii/asciiGrid.java | asciiGrid.toASCII | public void toASCII(PrintWriter pw,
boolean addName,
String rootName,
boolean newLine) {
if (_Debug)
System.out.println("asciiGrid.toASCII(" + addName + ",'" + rootName + "') getName(): " + getEncodedName());
... | java | public void toASCII(PrintWriter pw,
boolean addName,
String rootName,
boolean newLine) {
if (_Debug)
System.out.println("asciiGrid.toASCII(" + addName + ",'" + rootName + "') getName(): " + getEncodedName());
... | [
"public",
"void",
"toASCII",
"(",
"PrintWriter",
"pw",
",",
"boolean",
"addName",
",",
"String",
"rootName",
",",
"boolean",
"newLine",
")",
"{",
"if",
"(",
"_Debug",
")",
"System",
".",
"out",
".",
"println",
"(",
"\"asciiGrid.toASCII(\"",
"+",
"addName",
... | Returns a string representation of the variables value. This
is really foreshadowing functionality for Server types, but
as it may come in useful for clients it is added here. Simple
types (example: DFloat32) will return a single value. DConstuctor
and DVector types will be flattened. DStrings and DURL's will
have doub... | [
"Returns",
"a",
"string",
"representation",
"of",
"the",
"variables",
"value",
".",
"This",
"is",
"really",
"foreshadowing",
"functionality",
"for",
"Server",
"types",
"but",
"as",
"it",
"may",
"come",
"in",
"useful",
"for",
"clients",
"it",
"is",
"added",
"... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/opendap/src/main/java/opendap/servlet/ascii/asciiGrid.java#L84-L113 | test | Write the data of this object to ASCII. | Of course, here is the Java code you requested:
```java
public void toASCII(PrintWriter pw,
boolean addName,
String rootName,
boolean newLine) {
if (_Debug)
System.out.println("asciiGrid.toASCII(" + addName + ",'" + root... |
boonproject/boon | boon/src/main/java/org/boon/validation/validators/LongRangeValidator.java | LongRangeValidator.dynamicallyInitIfNeeded | private void dynamicallyInitIfNeeded( Object value ) {
/* Check to see if this class was already initialized,
* if not, initialize it based on the type of the value.
*/
if ( !isInitialized() ) {
if ( value instanceof Integer ) {
init( new Integer( min.intVal... | java | private void dynamicallyInitIfNeeded( Object value ) {
/* Check to see if this class was already initialized,
* if not, initialize it based on the type of the value.
*/
if ( !isInitialized() ) {
if ( value instanceof Integer ) {
init( new Integer( min.intVal... | [
"private",
"void",
"dynamicallyInitIfNeeded",
"(",
"Object",
"value",
")",
"{",
"/* Check to see if this class was already initialized,\r\n * if not, initialize it based on the type of the value.\r\n\t\t */",
"if",
"(",
"!",
"isInitialized",
"(",
")",
")",
"{",
"if",
"(",... | If the type was not initialized, we can still figure it out at runtime.
@param value | [
"If",
"the",
"type",
"was",
"not",
"initialized",
"we",
"can",
"still",
"figure",
"it",
"out",
"at",
"runtime",
"."
] | 9bc6870dbe5dd58c45c18d8edb493e8efc089463 | https://github.com/boonproject/boon/blob/9bc6870dbe5dd58c45c18d8edb493e8efc089463/boon/src/main/java/org/boon/validation/validators/LongRangeValidator.java#L122-L137 | test | Dynamically initialize the related class based on the type of the value. | Of course, here is the Java code you requested:
```java
private void dynamicallyInitIfNeeded( Object value ) {
/* Check to see if this class was already initialized,
* if not, initialize it based on the type of the value.
*/
if ( !isInitialized() ) {
if ( value instanceof I... |
oblac/jodd | jodd-proxetta/src/main/java/jodd/asm7/AnnotationVisitor.java | AnnotationVisitor.visitEnum | public void visitEnum(final String name, final String descriptor, final String value) {
if (av != null) {
av.visitEnum(name, descriptor, value);
}
} | java | public void visitEnum(final String name, final String descriptor, final String value) {
if (av != null) {
av.visitEnum(name, descriptor, value);
}
} | [
"public",
"void",
"visitEnum",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"descriptor",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"av",
"!=",
"null",
")",
"{",
"av",
".",
"visitEnum",
"(",
"name",
",",
"descriptor",
",",
"value... | Visits an enumeration value of the annotation.
@param name the value name.
@param descriptor the class descriptor of the enumeration class.
@param value the actual enumeration value. | [
"Visits",
"an",
"enumeration",
"value",
"of",
"the",
"annotation",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-proxetta/src/main/java/jodd/asm7/AnnotationVisitor.java#L99-L103 | test | Visit an enumeration. | Of course, here is the Java code you requested:
```java
public void visitEnum(final String name, final String descriptor, final String value) {
if (av != null) {
av.visitEnum(name, descriptor, value);
}
}
```
Hope this helps! |
oblac/jodd | jodd-db/src/main/java/jodd/db/DbQuery.java | DbQuery.setDouble | public Q setDouble(final int index, final Number value) {
if (value == null) {
setNull(index, Types.DOUBLE);
}
else {
setDouble(index, value.doubleValue());
}
return _this();
} | java | public Q setDouble(final int index, final Number value) {
if (value == null) {
setNull(index, Types.DOUBLE);
}
else {
setDouble(index, value.doubleValue());
}
return _this();
} | [
"public",
"Q",
"setDouble",
"(",
"final",
"int",
"index",
",",
"final",
"Number",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"setNull",
"(",
"index",
",",
"Types",
".",
"DOUBLE",
")",
";",
"}",
"else",
"{",
"setDouble",
"(",
"in... | ---------------------------------------------------------------- Double | [
"----------------------------------------------------------------",
"Double"
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/DbQuery.java#L468-L476 | test | Sets the value of the designated column to the specified double value. | Of course, here is the Java code you requested:
```java
public Q setDouble(final int index, final Number value) {
if (value == null) {
setNull(index, Types.DOUBLE);
}
else {
setDouble(index, value.doubleValue());
}
return _this();
}
```
Hope this helps! |
artclarke/humble-video | humble-video-noarch/src/main/java/io/humble/video/Codec.java | Codec.findEncodingCodecByIntID | public static Codec findEncodingCodecByIntID(int id) {
long cPtr = VideoJNI.Codec_findEncodingCodecByIntID(id);
return (cPtr == 0) ? null : new Codec(cPtr, false);
} | java | public static Codec findEncodingCodecByIntID(int id) {
long cPtr = VideoJNI.Codec_findEncodingCodecByIntID(id);
return (cPtr == 0) ? null : new Codec(cPtr, false);
} | [
"public",
"static",
"Codec",
"findEncodingCodecByIntID",
"(",
"int",
"id",
")",
"{",
"long",
"cPtr",
"=",
"VideoJNI",
".",
"Codec_findEncodingCodecByIntID",
"(",
"id",
")",
";",
"return",
"(",
"cPtr",
"==",
"0",
")",
"?",
"null",
":",
"new",
"Codec",
"(",
... | Find a codec that can be used for encoding.<br>
@param id The id of the codec, as an integer.<br>
@return the codec, or null if we can't find it. | [
"Find",
"a",
"codec",
"that",
"can",
"be",
"used",
"for",
"encoding",
".",
"<br",
">"
] | aa349ae2d7ef74160b7074feac8d298cf90394d1 | https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/Codec.java#L378-L381 | test | Find encoding codec by int id. | Of course, here is the Java code you requested:
```java
public static Codec findEncodingCodecByIntID(int id) {
long cPtr = VideoJNI.Codec_findEncodingCodecByIntID(id);
return (cPtr == 0) ? null : new Codec(cPtr, false);
}
```
Hope this helps! |
spring-projects/spring-security | config/src/main/java/org/springframework/security/config/annotation/web/messaging/MessageSecurityMetadataSourceRegistry.java | MessageSecurityMetadataSourceRegistry.simpDestPathMatcher | public MessageSecurityMetadataSourceRegistry simpDestPathMatcher(
PathMatcher pathMatcher) {
Assert.notNull(pathMatcher, "pathMatcher cannot be null");
this.pathMatcher.setPathMatcher(pathMatcher);
this.defaultPathMatcher = false;
return this;
} | java | public MessageSecurityMetadataSourceRegistry simpDestPathMatcher(
PathMatcher pathMatcher) {
Assert.notNull(pathMatcher, "pathMatcher cannot be null");
this.pathMatcher.setPathMatcher(pathMatcher);
this.defaultPathMatcher = false;
return this;
} | [
"public",
"MessageSecurityMetadataSourceRegistry",
"simpDestPathMatcher",
"(",
"PathMatcher",
"pathMatcher",
")",
"{",
"Assert",
".",
"notNull",
"(",
"pathMatcher",
",",
"\"pathMatcher cannot be null\"",
")",
";",
"this",
".",
"pathMatcher",
".",
"setPathMatcher",
"(",
... | The {@link PathMatcher} to be used with the
{@link MessageSecurityMetadataSourceRegistry#simpDestMatchers(String...)}. The
default is to use the default constructor of {@link AntPathMatcher}.
@param pathMatcher the {@link PathMatcher} to use. Cannot be null.
@return the {@link MessageSecurityMetadataSourceRegistry} fo... | [
"The",
"{",
"@link",
"PathMatcher",
"}",
"to",
"be",
"used",
"with",
"the",
"{",
"@link",
"MessageSecurityMetadataSourceRegistry#simpDestMatchers",
"(",
"String",
"...",
")",
"}",
".",
"The",
"default",
"is",
"to",
"use",
"the",
"default",
"constructor",
"of",
... | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/messaging/MessageSecurityMetadataSourceRegistry.java#L179-L185 | test | Sets the path matcher to use for destination path matchers. | Of course, here is the Java code you requested:
```java
public MessageSecurityMetadataSourceRegistry simpDestPathMatcher(
PathMatcher pathMatcher) {
Assert.notNull(pathMatcher, "pathMatcher cannot be null");
this.pathMatcher.setPathMatcher(pathMatcher);
this.defaultPathMatcher = false;
return this;
}
```
... |
tiefaces/TieFaces | src/org/tiefaces/components/websheet/utility/ColorUtility.java | ColorUtility.getXColorWithSchema | private static XColor getXColorWithSchema(final String colorSchema,
final double preTint, final CTSchemeColor ctsColor,
final ThemesTable themeTable) {
int colorIndex = getThemeIndexFromName(colorSchema);
if (colorIndex < 0) {
return null;
}
XSSFColor bcolor = themeTable.getThemeColor(colorIndex... | java | private static XColor getXColorWithSchema(final String colorSchema,
final double preTint, final CTSchemeColor ctsColor,
final ThemesTable themeTable) {
int colorIndex = getThemeIndexFromName(colorSchema);
if (colorIndex < 0) {
return null;
}
XSSFColor bcolor = themeTable.getThemeColor(colorIndex... | [
"private",
"static",
"XColor",
"getXColorWithSchema",
"(",
"final",
"String",
"colorSchema",
",",
"final",
"double",
"preTint",
",",
"final",
"CTSchemeColor",
"ctsColor",
",",
"final",
"ThemesTable",
"themeTable",
")",
"{",
"int",
"colorIndex",
"=",
"getThemeIndexFr... | Get xcolor with color schema name. Normally the names are accent1 to 7.
Sometimes also have lumOff/lumMod/alphaInt setting.
@param colorSchema
color schema
@param preTint
tint
@param ctsColor
ctsColor instance.
@param themeTable
themeTable.
@return xcolor. | [
"Get",
"xcolor",
"with",
"color",
"schema",
"name",
".",
"Normally",
"the",
"names",
"are",
"accent1",
"to",
"7",
".",
"Sometimes",
"also",
"have",
"lumOff",
"/",
"lumMod",
"/",
"alphaInt",
"setting",
"."
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/utility/ColorUtility.java#L229-L261 | test | Gets the XColor with the specified schema. | Of course, here is the Java code you requested:
```java
private static XColor getXColorWithSchema(final String colorSchema,
final double preTint, final CTSchemeColor ctsColor,
final ThemesTable themeTable) {
int colorIndex = getThemeIndexFromName(colorSchema);
if (colorIndex < 0) {
return null;
}
... |
oblac/jodd | jodd-props/src/main/java/jodd/props/Props.java | Props.load | public Props load(final Map<?, ?> p) {
for (final Map.Entry<?, ?> entry : p.entrySet()) {
final String name = entry.getKey().toString();
final Object value = entry.getValue();
if (value == null) {
continue;
}
data.putBaseProperty(name, value.toString(), false);
}
return this;
} | java | public Props load(final Map<?, ?> p) {
for (final Map.Entry<?, ?> entry : p.entrySet()) {
final String name = entry.getKey().toString();
final Object value = entry.getValue();
if (value == null) {
continue;
}
data.putBaseProperty(name, value.toString(), false);
}
return this;
} | [
"public",
"Props",
"load",
"(",
"final",
"Map",
"<",
"?",
",",
"?",
">",
"p",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"?",
",",
"?",
">",
"entry",
":",
"p",
".",
"entrySet",
"(",
")",
")",
"{",
"final",
"String",
"name",
"=",... | Loads base properties from the provided java properties.
Null values are ignored. | [
"Loads",
"base",
"properties",
"from",
"the",
"provided",
"java",
"properties",
".",
"Null",
"values",
"are",
"ignored",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-props/src/main/java/jodd/props/Props.java#L290-L300 | test | Load properties from a map. | Of course, here is the Java code you requested:
```java
public Props load(final Map<?, ?> p) {
for (final Map.Entry<?, ?> entry : p.entrySet()) {
final String name = entry.getKey().toString();
final Object value = entry.getValue();
if (value == null) {
continue;
}
data.putBaseProperty(name, value.... |
rest-assured/rest-assured | rest-assured/src/main/java/io/restassured/matcher/RestAssuredMatchers.java | RestAssuredMatchers.endsWithPath | public static ResponseAwareMatcher<Response> endsWithPath(final String path) {
return response -> endsWith(response.<String>path(path));
} | java | public static ResponseAwareMatcher<Response> endsWithPath(final String path) {
return response -> endsWith(response.<String>path(path));
} | [
"public",
"static",
"ResponseAwareMatcher",
"<",
"Response",
">",
"endsWithPath",
"(",
"final",
"String",
"path",
")",
"{",
"return",
"response",
"->",
"endsWith",
"(",
"response",
".",
"<",
"String",
">",
"path",
"(",
"path",
")",
")",
";",
"}"
] | Creates a {@link ResponseAwareMatcher} that extracts the given path from the response and
wraps it in a {@link org.hamcrest.Matchers#equalTo(Object)} matcher. This is useful if you have a resource that e.g. returns the given JSON:
<pre>
{
"userId" : "my-id",
"href" : "http://localhost:8080/my-id"
}
</pre>
you can then ... | [
"Creates",
"a",
"{",
"@link",
"ResponseAwareMatcher",
"}",
"that",
"extracts",
"the",
"given",
"path",
"from",
"the",
"response",
"and",
"wraps",
"it",
"in",
"a",
"{",
"@link",
"org",
".",
"hamcrest",
".",
"Matchers#equalTo",
"(",
"Object",
")",
"}",
"matc... | 165a85b65070f5a07fe0045175613fb2c2811642 | https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/matcher/RestAssuredMatchers.java#L174-L176 | test | Create a matcher that matches responses that end with the given path. | Of course, here is the Java code you requested:
```java
public static ResponseAwareMatcher<Response> endsWithPath(final String path) {
return response -> endsWith(response.<String>path(path));
}
```
Hope this helps! |
wildfly/wildfly | iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java | Util.getClassHashCode | static long getClassHashCode(Class cls) {
// The simple cases
if (cls.isInterface())
return 0;
if (!Serializable.class.isAssignableFrom(cls))
return 0;
if (Externalizable.class.isAssignableFrom(cls))
return 1;
// Try cache
Long l = (Lo... | java | static long getClassHashCode(Class cls) {
// The simple cases
if (cls.isInterface())
return 0;
if (!Serializable.class.isAssignableFrom(cls))
return 0;
if (Externalizable.class.isAssignableFrom(cls))
return 1;
// Try cache
Long l = (Lo... | [
"static",
"long",
"getClassHashCode",
"(",
"Class",
"cls",
")",
"{",
"// The simple cases",
"if",
"(",
"cls",
".",
"isInterface",
"(",
")",
")",
"return",
"0",
";",
"if",
"(",
"!",
"Serializable",
".",
"class",
".",
"isAssignableFrom",
"(",
"cls",
")",
"... | Return the class hash code, as specified in "The Common Object
Request Broker: Architecture and Specification" (01-02-33),
section 10.6.2. | [
"Return",
"the",
"class",
"hash",
"code",
"as",
"specified",
"in",
"The",
"Common",
"Object",
"Request",
"Broker",
":",
"Architecture",
"and",
"Specification",
"(",
"01",
"-",
"02",
"-",
"33",
")",
"section",
"10",
".",
"6",
".",
"2",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java#L430-L530 | test | Gets the class hashcode. | Of course, here is the Java code you requested:
```java
static long getClassHashCode(Class cls) {
// The simple cases
if (cls.isInterface())
return 0;
if (!Serializable.class.isAssignableFrom(cls))
return 0;
if (Externalizable.class.isAssignableFrom(cls))
... |
jcodec/jcodec | src/main/java/org/jcodec/codecs/h264/H264Utils.java | H264Utils.decodeMOVPacket | public static ByteBuffer decodeMOVPacket(ByteBuffer result, AvcCBox avcC) {
if (avcC.getNalLengthSize() == 4) {
decodeMOVPacketInplace(result, avcC);
return result;
}
return joinNALUnits(splitMOVPacket(result, avcC));
} | java | public static ByteBuffer decodeMOVPacket(ByteBuffer result, AvcCBox avcC) {
if (avcC.getNalLengthSize() == 4) {
decodeMOVPacketInplace(result, avcC);
return result;
}
return joinNALUnits(splitMOVPacket(result, avcC));
} | [
"public",
"static",
"ByteBuffer",
"decodeMOVPacket",
"(",
"ByteBuffer",
"result",
",",
"AvcCBox",
"avcC",
")",
"{",
"if",
"(",
"avcC",
".",
"getNalLengthSize",
"(",
")",
"==",
"4",
")",
"{",
"decodeMOVPacketInplace",
"(",
"result",
",",
"avcC",
")",
";",
"... | Decodes AVC packet in ISO BMF format into Annex B format.
Replaces NAL unit size integers with 00 00 00 01 start codes. If the
space allows the transformation is done inplace.
@param result | [
"Decodes",
"AVC",
"packet",
"in",
"ISO",
"BMF",
"format",
"into",
"Annex",
"B",
"format",
"."
] | cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75 | https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/org/jcodec/codecs/h264/H264Utils.java#L312-L318 | test | Decodes a MovPacket from a byte buffer. | Of course, here is the Java code you requested:
```java
public static ByteBuffer decodeMOVPacket(ByteBuffer result, AvcCBox avcC) {
if (avcC.getNalLengthSize() == 4) {
decodeMOVPacketInplace(result, avcC);
return result;
}
return joinNALUnits(splitMOVPacket(result, avcC)... |
oblac/jodd | jodd-bean/src/main/java/jodd/bean/BeanCopy.java | BeanCopy.fromMap | public static BeanCopy fromMap(final Map source) {
BeanCopy beanCopy = new BeanCopy(source);
beanCopy.isSourceMap = true;
return beanCopy;
} | java | public static BeanCopy fromMap(final Map source) {
BeanCopy beanCopy = new BeanCopy(source);
beanCopy.isSourceMap = true;
return beanCopy;
} | [
"public",
"static",
"BeanCopy",
"fromMap",
"(",
"final",
"Map",
"source",
")",
"{",
"BeanCopy",
"beanCopy",
"=",
"new",
"BeanCopy",
"(",
"source",
")",
";",
"beanCopy",
".",
"isSourceMap",
"=",
"true",
";",
"return",
"beanCopy",
";",
"}"
] | Creates <code>BeanCopy</code> with given <code>Map</code> as a source. | [
"Creates",
"<code",
">",
"BeanCopy<",
"/",
"code",
">",
"with",
"given",
"<code",
">",
"Map<",
"/",
"code",
">",
"as",
"a",
"source",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-bean/src/main/java/jodd/bean/BeanCopy.java#L79-L85 | test | Create a BeanCopy from a Map. | Of course, here is the Java code you requested:
```java
public static BeanCopy fromMap(final Map source) {
BeanCopy beanCopy = new BeanCopy(source);
beanCopy.isSourceMap = true;
return beanCopy;
}
```
Hope this helps! |
Yubico/yubico-java-client | jaas/src/main/java/com/yubico/jaas/impl/YubikeyToUserMapImpl.java | YubikeyToUserMapImpl.add_yubikey_to_user | private void add_yubikey_to_user(String publicId, String username, String filename) {
try {
File file = new File(filename);
FileWriter writer = new FileWriter(file, true);
writer.write("yk." + publicId + ".user = " + username
+ System.getProperty("line.separator"));
writer.close();
} catch (IOExcep... | java | private void add_yubikey_to_user(String publicId, String username, String filename) {
try {
File file = new File(filename);
FileWriter writer = new FileWriter(file, true);
writer.write("yk." + publicId + ".user = " + username
+ System.getProperty("line.separator"));
writer.close();
} catch (IOExcep... | [
"private",
"void",
"add_yubikey_to_user",
"(",
"String",
"publicId",
",",
"String",
"username",
",",
"String",
"filename",
")",
"{",
"try",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"filename",
")",
";",
"FileWriter",
"writer",
"=",
"new",
"FileWriter",
... | Stores an association between username and YubiKey publicId in filename.
@param publicId YubiKey public ID to associate with user
@param username username to associate with a YubiKey public ID
@param filename name of the file to store to | [
"Stores",
"an",
"association",
"between",
"username",
"and",
"YubiKey",
"publicId",
"in",
"filename",
"."
] | 263b09c6ab0ee54b0dc7d70516989abab981796f | https://github.com/Yubico/yubico-java-client/blob/263b09c6ab0ee54b0dc7d70516989abab981796f/jaas/src/main/java/com/yubico/jaas/impl/YubikeyToUserMapImpl.java#L168-L178 | test | Add a yubikey to the user. | Of course, here is the Java code you requested:
```java
private void add_yubikey_to_user(String publicId, String username, String filename) {
try {
File file = new File(filename);
FileWriter writer = new FileWriter(file, true);
writer.write("yk." + publicId + ".user = " + username
+ System.getProperty(... |
rackerlabs/blueflood | blueflood-elasticsearch/src/main/java/com/rackspacecloud/blueflood/io/AbstractElasticIO.java | AbstractElasticIO.getMetricNamesFromES | private String getMetricNamesFromES(final String tenant, final String regexMetricName) throws IOException {
String metricNamesFromElasticsearchQueryString = String.format(queryToFetchMetricNamesFromElasticsearchFormat,
tenant, regexMetricName, regexMetricName);
return elasticsearchRestH... | java | private String getMetricNamesFromES(final String tenant, final String regexMetricName) throws IOException {
String metricNamesFromElasticsearchQueryString = String.format(queryToFetchMetricNamesFromElasticsearchFormat,
tenant, regexMetricName, regexMetricName);
return elasticsearchRestH... | [
"private",
"String",
"getMetricNamesFromES",
"(",
"final",
"String",
"tenant",
",",
"final",
"String",
"regexMetricName",
")",
"throws",
"IOException",
"{",
"String",
"metricNamesFromElasticsearchQueryString",
"=",
"String",
".",
"format",
"(",
"queryToFetchMetricNamesFro... | Performs terms aggregation by metric_name which returns doc_count by
metric_name index that matches the given regex.
Sample request body:
{
"size": 0,
"query": {
"bool" : {
"must" : [ {
"term" : {
"tenantId" : "ratanasv"
}
}, {
"regexp" : {
"metric_name" : {
"value" : "<regex>"
}
}
} ]
}
},
"aggs": {
"metric_name_tok... | [
"Performs",
"terms",
"aggregation",
"by",
"metric_name",
"which",
"returns",
"doc_count",
"by",
"metric_name",
"index",
"that",
"matches",
"the",
"given",
"regex",
"."
] | 4722a3449b1a7f8e88889ea8c340c6f24396b5b0 | https://github.com/rackerlabs/blueflood/blob/4722a3449b1a7f8e88889ea8c340c6f24396b5b0/blueflood-elasticsearch/src/main/java/com/rackspacecloud/blueflood/io/AbstractElasticIO.java#L232-L241 | test | Get the metric names from elasticsearch. | Of course, here is the Java code you requested:
```java
private String getMetricNamesFromES(final String tenant, final String regexMetricName) throws IOException {
String metricNamesFromElasticsearchQueryString = String.format(queryToFetchMetricNamesFromElasticsearchFormat,
tenant, regexMetricN... |
oblac/jodd | jodd-db/src/main/java/jodd/db/oom/DbEntityColumnDescriptor.java | DbEntityColumnDescriptor.compareTo | @Override
public int compareTo(final Object o) {
DbEntityColumnDescriptor that = (DbEntityColumnDescriptor) o;
if (this.isId != that.isId) {
return this.isId ? -1 : 1; // IDs should be the first in the array
}
return this.columnName.compareTo(that.columnName);
} | java | @Override
public int compareTo(final Object o) {
DbEntityColumnDescriptor that = (DbEntityColumnDescriptor) o;
if (this.isId != that.isId) {
return this.isId ? -1 : 1; // IDs should be the first in the array
}
return this.columnName.compareTo(that.columnName);
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"final",
"Object",
"o",
")",
"{",
"DbEntityColumnDescriptor",
"that",
"=",
"(",
"DbEntityColumnDescriptor",
")",
"o",
";",
"if",
"(",
"this",
".",
"isId",
"!=",
"that",
".",
"isId",
")",
"{",
"return",
... | Compares two column descriptors. Identity columns should be the first on the list.
Each group then will be sorted by column name. | [
"Compares",
"two",
"column",
"descriptors",
".",
"Identity",
"columns",
"should",
"be",
"the",
"first",
"on",
"the",
"list",
".",
"Each",
"group",
"then",
"will",
"be",
"sorted",
"by",
"column",
"name",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/oom/DbEntityColumnDescriptor.java#L141-L148 | test | Compares two entity column descriptors. | Of course, here is the Java code you requested:
```java
@Override
public int compareTo(final Object o) {
DbEntityColumnDescriptor that = (DbEntityColumnDescriptor) o;
if (this.isId != that.isId) {
return this.isId ? -1 : 1; // IDs should be the first in the array
}
return this.columnName.compareTo(tha... |
ReactiveX/RxJava | src/main/java/io/reactivex/Observable.java | Observable.all | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> all(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is null");
return RxJavaPlugins.onAssembly(new ObservableAllSingle<T>(this, predicate));
} | java | @CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> all(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is null");
return RxJavaPlugins.onAssembly(new ObservableAllSingle<T>(this, predicate));
} | [
"@",
"CheckReturnValue",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Single",
"<",
"Boolean",
">",
"all",
"(",
"Predicate",
"<",
"?",
"super",
"T",
">",
"predicate",
")",
"{",
"ObjectHelper",
".",
"requireNonNull",
... | Returns a Single that emits a Boolean that indicates whether all of the items emitted by the source
ObservableSource satisfy a condition.
<p>
<img width="640" height="264" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/all.o.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code all} does not op... | [
"Returns",
"a",
"Single",
"that",
"emits",
"a",
"Boolean",
"that",
"indicates",
"whether",
"all",
"of",
"the",
"items",
"emitted",
"by",
"the",
"source",
"ObservableSource",
"satisfy",
"a",
"condition",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L5020-L5025 | test | Single - operation that returns true if all elements of the source sequence match the given predicate. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final Single<Boolean> all(Predicate<? super T> predicate) {
ObjectHelper.requireNonNull(predicate, "predicate is null");
return RxJavaPlugins.onAssembly(new ObservableAllSin... |
OpenEstate/OpenEstate-IO | OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_5.java | OpenImmo_1_2_5.upgradeFromPreviousVersion | @Override
@SuppressWarnings("Duplicates")
public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
doc.setDocumentVersion(OpenImmoVersion.V1_2_5);
if (doc instanceof OpenImmoTransferDocument) {
try {
this.upgradeEnergiepassElements(doc.getDocument());
... | java | @Override
@SuppressWarnings("Duplicates")
public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
doc.setDocumentVersion(OpenImmoVersion.V1_2_5);
if (doc instanceof OpenImmoTransferDocument) {
try {
this.upgradeEnergiepassElements(doc.getDocument());
... | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"Duplicates\"",
")",
"public",
"void",
"upgradeFromPreviousVersion",
"(",
"OpenImmoDocument",
"doc",
")",
"{",
"doc",
".",
"setDocumentVersion",
"(",
"OpenImmoVersion",
".",
"V1_2_5",
")",
";",
"if",
"(",
"doc",
"... | Upgrade an OpenImmo document from version 1.2.4 to 1.2.5.
@param doc OpenImmo document in version 1.2.4 | [
"Upgrade",
"an",
"OpenImmo",
"document",
"from",
"version",
"1",
".",
"2",
".",
"4",
"to",
"1",
".",
"2",
".",
"5",
"."
] | f961dae78f40823f05a8c0d4e59d639e718aa18a | https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_5.java#L164-L177 | test | Upgrade from previous version of the document. | Of course, here is the Java code you requested:
```java
@Override
@SuppressWarnings("Duplicates")
public void upgradeFromPreviousVersion(OpenImmoDocument doc) {
doc.setDocumentVersion(OpenImmoVersion.V1_2_5);
if (doc instanceof OpenImmoTransferDocument) {
try {
this... |
streamsets/datacollector | cluster-bootstrap-api/src/main/java/com/streamsets/pipeline/hadoop/HadoopMapReduceBinding.java | HadoopMapReduceBinding.getMapMemoryMb | public static Integer getMapMemoryMb(String javaOpts, Configuration conf) {
String[] javaOptsArray = javaOpts.split(" ");
Integer upperLimitMemory = null;
for (String opts : javaOptsArray) {
if (opts.contains("-Xmx")) {
Integer memoryMb = Integer.valueOf(opts.substring(4, opts.length() - 1));
... | java | public static Integer getMapMemoryMb(String javaOpts, Configuration conf) {
String[] javaOptsArray = javaOpts.split(" ");
Integer upperLimitMemory = null;
for (String opts : javaOptsArray) {
if (opts.contains("-Xmx")) {
Integer memoryMb = Integer.valueOf(opts.substring(4, opts.length() - 1));
... | [
"public",
"static",
"Integer",
"getMapMemoryMb",
"(",
"String",
"javaOpts",
",",
"Configuration",
"conf",
")",
"{",
"String",
"[",
"]",
"javaOptsArray",
"=",
"javaOpts",
".",
"split",
"(",
"\" \"",
")",
";",
"Integer",
"upperLimitMemory",
"=",
"null",
";",
"... | visible for testing (can't annotate as can't depend on Guava) | [
"visible",
"for",
"testing",
"(",
"can",
"t",
"annotate",
"as",
"can",
"t",
"depend",
"on",
"Guava",
")"
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/cluster-bootstrap-api/src/main/java/com/streamsets/pipeline/hadoop/HadoopMapReduceBinding.java#L97-L132 | test | Get the upper limit of the map memory in MB | Of course, here is the Java code you requested:
```java
public static Integer getMapMemoryMb(String javaOpts, Configuration conf) {
String[] javaOptsArray = javaOpts.split(" ");
Integer upperLimitMemory = null;
for (String opts : javaOptsArray) {
if (opts.contains("-Xmx")) {
Integer memoryMb ... |
apache/parquet-mr | parquet-column/src/main/java/org/apache/parquet/io/ValidatingRecordConsumer.java | ValidatingRecordConsumer.startGroup | public void startGroup() {
previousField.push(-1);
types.push(types.peek().asGroupType().getType(fields.peek()));
delegate.startGroup();
} | java | public void startGroup() {
previousField.push(-1);
types.push(types.peek().asGroupType().getType(fields.peek()));
delegate.startGroup();
} | [
"public",
"void",
"startGroup",
"(",
")",
"{",
"previousField",
".",
"push",
"(",
"-",
"1",
")",
";",
"types",
".",
"push",
"(",
"types",
".",
"peek",
"(",
")",
".",
"asGroupType",
"(",
")",
".",
"getType",
"(",
"fields",
".",
"peek",
"(",
")",
"... | {@inheritDoc} | [
"{"
] | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/io/ValidatingRecordConsumer.java#L111-L115 | test | Start a group. | Of course, here is the Java code you requested:
```java
public void startGroup() {
previousField.push(-1);
types.push(types.peek().asGroupType().getType(fields.peek()));
delegate.startGroup();
}
```
Hope this helps! |
boonproject/boon | slumberdb/slumberdb-leveldb/src/main/java/org/boon/slumberdb/leveldb/LevelDBKeyValueStore.java | LevelDBKeyValueStore.loadAllByKeys | @Override
public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) {
if (keys == null || keys.size() == 0) {
return Collections.EMPTY_MAP;
}
Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size());
DBIterator iterator = null;
try {
... | java | @Override
public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) {
if (keys == null || keys.size() == 0) {
return Collections.EMPTY_MAP;
}
Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size());
DBIterator iterator = null;
try {
... | [
"@",
"Override",
"public",
"Map",
"<",
"byte",
"[",
"]",
",",
"byte",
"[",
"]",
">",
"loadAllByKeys",
"(",
"Collection",
"<",
"byte",
"[",
"]",
">",
"keys",
")",
"{",
"if",
"(",
"keys",
"==",
"null",
"||",
"keys",
".",
"size",
"(",
")",
"==",
"... | Keys are expected to be sorted
@param keys
@return | [
"Keys",
"are",
"expected",
"to",
"be",
"sorted"
] | 9bc6870dbe5dd58c45c18d8edb493e8efc089463 | https://github.com/boonproject/boon/blob/9bc6870dbe5dd58c45c18d8edb493e8efc089463/slumberdb/slumberdb-leveldb/src/main/java/org/boon/slumberdb/leveldb/LevelDBKeyValueStore.java#L376-L407 | test | Load all by keys. | Of course, here is the Java code you requested:
```java
@Override
public Map<byte[], byte[]> loadAllByKeys(Collection<byte[]> keys) {
if (keys == null || keys.size() == 0) {
return Collections.EMPTY_MAP;
}
Map<byte[], byte[]> results = new LinkedHashMap<>(keys.size());
... |
TooTallNate/Java-WebSocket | src/main/java/org/java_websocket/drafts/Draft_6455.java | Draft_6455.translateSingleFrameCheckLengthLimit | private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException {
if( length > Integer.MAX_VALUE ) {
log.trace("Limit exedeed: Payloadsize is to big...");
throw new LimitExceededException("Payloadsize is to big...");
}
if( length > maxFrameSize) {
log.trace( "Payload limit re... | java | private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException {
if( length > Integer.MAX_VALUE ) {
log.trace("Limit exedeed: Payloadsize is to big...");
throw new LimitExceededException("Payloadsize is to big...");
}
if( length > maxFrameSize) {
log.trace( "Payload limit re... | [
"private",
"void",
"translateSingleFrameCheckLengthLimit",
"(",
"long",
"length",
")",
"throws",
"LimitExceededException",
"{",
"if",
"(",
"length",
">",
"Integer",
".",
"MAX_VALUE",
")",
"{",
"log",
".",
"trace",
"(",
"\"Limit exedeed: Payloadsize is to big...\"",
")... | Check if the frame size exceeds the allowed limit
@param length the current payload length
@throws LimitExceededException if the payload length is to big | [
"Check",
"if",
"the",
"frame",
"size",
"exceeds",
"the",
"allowed",
"limit"
] | 73c6805ca2c7801b2828ffd3ec12e5cb0daefcf9 | https://github.com/TooTallNate/Java-WebSocket/blob/73c6805ca2c7801b2828ffd3ec12e5cb0daefcf9/src/main/java/org/java_websocket/drafts/Draft_6455.java#L560-L573 | test | Translate single frame check length limit. | Of course, here is the Java code you requested:
```java
private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException {
if( length > Integer.MAX_VALUE ) {
log.trace("Limit exedeed: Payloadsize is to big...");
throw new LimitExceededException("Payloadsize is to big...");
}
if(... |
Unidata/thredds | legacy/src/main/java/ucar/nc2/dt/point/CFPointObWriter.java | CFPointObWriter.writePointFeatureCollection | public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException {
// extract the PointFeatureCollection
PointFeatureCollection pointFeatureCollection = null;
List<DsgFeatureCollection> featureCollectionList = pfDataset.getPointFeatureCollectionList();
for ... | java | public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException {
// extract the PointFeatureCollection
PointFeatureCollection pointFeatureCollection = null;
List<DsgFeatureCollection> featureCollectionList = pfDataset.getPointFeatureCollectionList();
for ... | [
"public",
"static",
"int",
"writePointFeatureCollection",
"(",
"FeatureDatasetPoint",
"pfDataset",
",",
"String",
"fileOut",
")",
"throws",
"IOException",
"{",
"// extract the PointFeatureCollection",
"PointFeatureCollection",
"pointFeatureCollection",
"=",
"null",
";",
"List... | Write a ucar.nc2.ft.PointFeatureCollection in CF point format.
@param pfDataset find the first PointFeatureCollection, and write all data from it
@param fileOut write to this netcdf-3 file
@return number of records written
@throws IOException on read/write error, or if no PointFeatureCollection in pfDataset | [
"Write",
"a",
"ucar",
".",
"nc2",
".",
"ft",
".",
"PointFeatureCollection",
"in",
"CF",
"point",
"format",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/dt/point/CFPointObWriter.java#L304-L354 | test | Write a feature dataset point to a file | Of course, here is the Java code you requested:
```java
public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException {
// extract the PointFeatureCollection
PointFeatureCollection pointFeatureCollection = null;
List<DsgFeatureCollection> featureCollectionL... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java | HttpConnection.getResponseHeaderFieldValue | public String getResponseHeaderFieldValue(int position) throws IOException {
Assert.isTrue(position >= 0);
sendRequest();
return responseHeader.getFieldValue(position);
} | java | public String getResponseHeaderFieldValue(int position) throws IOException {
Assert.isTrue(position >= 0);
sendRequest();
return responseHeader.getFieldValue(position);
} | [
"public",
"String",
"getResponseHeaderFieldValue",
"(",
"int",
"position",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"isTrue",
"(",
"position",
">=",
"0",
")",
";",
"sendRequest",
"(",
")",
";",
"return",
"responseHeader",
".",
"getFieldValue",
"(",
"p... | Returns the response header field value at the given position, or
<code>null</code> if there is no value at that position.
@param position a position in the response header greater than or
equal to zero
@return the response header field value at the given postion
@exception IOException if an I/O error occurs while sen... | [
"Returns",
"the",
"response",
"header",
"field",
"value",
"at",
"the",
"given",
"position",
"or",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"there",
"is",
"no",
"value",
"at",
"that",
"position",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/client/org/eclipse/webdav/http/client/HttpConnection.java#L870-L874 | test | Gets the value of a single field from the response header. | Of course, here is the Java code you requested:
```java
public String getResponseHeaderFieldValue(int position) throws IOException {
Assert.isTrue(position >= 0);
sendRequest();
return responseHeader.getFieldValue(position);
}
```
Hope this helps! |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/GeometryMetadataDataSource.java | GeometryMetadataDataSource.populate | public GeometryMetadata populate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) {
GeometryMetadata metadata = new GeometryMetadata();
metadata.setGeoPackageId(geoPackageId);
metadata.setTableName(tableName);
metadata.setId(geomId);
metadata.setMinX(... | java | public GeometryMetadata populate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) {
GeometryMetadata metadata = new GeometryMetadata();
metadata.setGeoPackageId(geoPackageId);
metadata.setTableName(tableName);
metadata.setId(geomId);
metadata.setMinX(... | [
"public",
"GeometryMetadata",
"populate",
"(",
"long",
"geoPackageId",
",",
"String",
"tableName",
",",
"long",
"geomId",
",",
"GeometryEnvelope",
"envelope",
")",
"{",
"GeometryMetadata",
"metadata",
"=",
"new",
"GeometryMetadata",
"(",
")",
";",
"metadata",
".",... | Populate a new geometry metadata from an envelope
@param geoPackageId GeoPackage id
@param tableName table name
@param geomId geometry id
@param envelope geometry envelope
@return geometry metadata | [
"Populate",
"a",
"new",
"geometry",
"metadata",
"from",
"an",
"envelope"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/GeometryMetadataDataSource.java#L135-L154 | test | Populates a GeometryMetadata object from the GeometryEnvelope. | Of course, here is the Java code you requested:
```java
public GeometryMetadata populate(long geoPackageId, String tableName, long geomId, GeometryEnvelope envelope) {
GeometryMetadata metadata = new GeometryMetadata();
metadata.setGeoPackageId(geoPackageId);
metadata.setTableName(tableName);
... |
orientechnologies/orientdb | graphdb/src/main/java/com/orientechnologies/orient/graph/sql/OCommandExecutorSQLDeleteVertex.java | OCommandExecutorSQLDeleteVertex.execute | public Object execute(final Map<Object, Object> iArgs) {
if (rid == null && query == null)
throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
if (!returning.equalsIgnoreCase("COUNT"))
allDeletedRecords = new ArrayList<ORecord>();
txAlr... | java | public Object execute(final Map<Object, Object> iArgs) {
if (rid == null && query == null)
throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
if (!returning.equalsIgnoreCase("COUNT"))
allDeletedRecords = new ArrayList<ORecord>();
txAlr... | [
"public",
"Object",
"execute",
"(",
"final",
"Map",
"<",
"Object",
",",
"Object",
">",
"iArgs",
")",
"{",
"if",
"(",
"rid",
"==",
"null",
"&&",
"query",
"==",
"null",
")",
"throw",
"new",
"OCommandExecutionException",
"(",
"\"Cannot execute the command because... | Execute the command and return the ODocument object created. | [
"Execute",
"the",
"command",
"and",
"return",
"the",
"ODocument",
"object",
"created",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/graphdb/src/main/java/com/orientechnologies/orient/graph/sql/OCommandExecutorSQLDeleteVertex.java#L180-L230 | test | Executes the
command. | Of course, here is the Java code you requested:
```java
public Object execute(final Map<Object, Object> iArgs) {
if (rid == null && query == null)
throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
if (!returning.equalsIgnoreCase("COUNT"))
a... |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiff.java | CoverageDataTiff.drawTile | public CoverageDataTiffImage drawTile(float[] pixelValues, int tileWidth,
int tileHeight) {
CoverageDataTiffImage image = createImage(tileWidth, tileHeight);
for (int y = 0; y < tileHeight; y++) {
for (int x = 0; x < tileWidth; x++) {
... | java | public CoverageDataTiffImage drawTile(float[] pixelValues, int tileWidth,
int tileHeight) {
CoverageDataTiffImage image = createImage(tileWidth, tileHeight);
for (int y = 0; y < tileHeight; y++) {
for (int x = 0; x < tileWidth; x++) {
... | [
"public",
"CoverageDataTiffImage",
"drawTile",
"(",
"float",
"[",
"]",
"pixelValues",
",",
"int",
"tileWidth",
",",
"int",
"tileHeight",
")",
"{",
"CoverageDataTiffImage",
"image",
"=",
"createImage",
"(",
"tileWidth",
",",
"tileHeight",
")",
";",
"for",
"(",
... | Draw a coverage data image tile from the flat array of float pixel values of
length tileWidth * tileHeight where each pixel is at: (y * tileWidth) + x
@param pixelValues float pixel values of length tileWidth * tileHeight
@param tileWidth tile width
@param tileHeight tile height
@return coverage data image tile | [
"Draw",
"a",
"coverage",
"data",
"image",
"tile",
"from",
"the",
"flat",
"array",
"of",
"float",
"pixel",
"values",
"of",
"length",
"tileWidth",
"*",
"tileHeight",
"where",
"each",
"pixel",
"is",
"at",
":",
"(",
"y",
"*",
"tileWidth",
")",
"+",
"x"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiff.java#L210-L224 | test | Draw a tile of pixels. | Of course, here is the Java code you requested:
```java
public CoverageDataTiffImage drawTile(float[] pixelValues, int tileWidth,
int tileHeight) {
CoverageDataTiffImage image = createImage(tileWidth, tileHeight);
for (int y = 0; y < tileHeight; y++) {
... |
js-lib-com/tiny-container | src/main/java/js/container/ApplicationScopeFactory.java | ApplicationScopeFactory.persistInstance | @Override
public void persistInstance(InstanceKey instanceKey, Object instance) {
// at this point managed class and instance are guaranteed to be non null
instancesPool.put(instanceKey, instance);
} | java | @Override
public void persistInstance(InstanceKey instanceKey, Object instance) {
// at this point managed class and instance are guaranteed to be non null
instancesPool.put(instanceKey, instance);
} | [
"@",
"Override",
"public",
"void",
"persistInstance",
"(",
"InstanceKey",
"instanceKey",
",",
"Object",
"instance",
")",
"{",
"// at this point managed class and instance are guaranteed to be non null\r",
"instancesPool",
".",
"put",
"(",
"instanceKey",
",",
"instance",
")"... | Persist instance bound to given managed instance key. This method simply uses provided <code>instanceKey</code> argument
to add instance to {@link #instancesPool}. Both arguments should to be not null.
@param instanceKey managed instance key,
@param instance managed instance. | [
"Persist",
"instance",
"bound",
"to",
"given",
"managed",
"instance",
"key",
".",
"This",
"method",
"simply",
"uses",
"provided",
"<code",
">",
"instanceKey<",
"/",
"code",
">",
"argument",
"to",
"add",
"instance",
"to",
"{",
"@link",
"#instancesPool",
"}",
... | ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e | https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/container/ApplicationScopeFactory.java#L46-L50 | test | Persists an instance to the managed class. | Of course, here is the Java code you requested:
```java
@Override
public void persistInstance(InstanceKey instanceKey, Object instance) {
// at this point managed class and instance are guaranteed to be non null
instancesPool.put(instanceKey, instance);
}
```
Hope this helps! |
oblac/jodd | jodd-madvoc/src/main/java/jodd/madvoc/component/ResultsManager.java | ResultsManager.lookup | public ActionResult lookup(final ActionRequest actionRequest, final Object resultObject) {
ActionResult actionResultHandler = null;
// + read @RenderWith value on method
{
final ActionRuntime actionRuntime = actionRequest.getActionRuntime();
final Class<? extends ActionResult> actionResultClass = actionR... | java | public ActionResult lookup(final ActionRequest actionRequest, final Object resultObject) {
ActionResult actionResultHandler = null;
// + read @RenderWith value on method
{
final ActionRuntime actionRuntime = actionRequest.getActionRuntime();
final Class<? extends ActionResult> actionResultClass = actionR... | [
"public",
"ActionResult",
"lookup",
"(",
"final",
"ActionRequest",
"actionRequest",
",",
"final",
"Object",
"resultObject",
")",
"{",
"ActionResult",
"actionResultHandler",
"=",
"null",
";",
"// + read @RenderWith value on method",
"{",
"final",
"ActionRuntime",
"actionRu... | Lookups for {@link jodd.madvoc.result.ActionResult action result handler}
based on current {@link jodd.madvoc.ActionRequest action request} and action method
result object. | [
"Lookups",
"for",
"{"
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-madvoc/src/main/java/jodd/madvoc/component/ResultsManager.java#L126-L173 | test | Lookup an action result handler. | Of course, here is the Java code you requested:
```java
public ActionResult lookup(final ActionRequest actionRequest, final Object resultObject) {
ActionResult actionResultHandler = null;
// + read @RenderWith value on method
{
final ActionRuntime actionRuntime = actionRequest.getActionRuntime();
final ... |
tony19/logback-android | logback-android/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java | SMTPAppenderBase.checkEntryConditions | public boolean checkEntryConditions() {
if (!this.started) {
addError("Attempting to append to a non-started appender: "
+ this.getName());
return false;
}
if (this.eventEvaluator == null) {
addError("No EventEvaluator is set for appender [" + name + "].");
return fals... | java | public boolean checkEntryConditions() {
if (!this.started) {
addError("Attempting to append to a non-started appender: "
+ this.getName());
return false;
}
if (this.eventEvaluator == null) {
addError("No EventEvaluator is set for appender [" + name + "].");
return fals... | [
"public",
"boolean",
"checkEntryConditions",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"started",
")",
"{",
"addError",
"(",
"\"Attempting to append to a non-started appender: \"",
"+",
"this",
".",
"getName",
"(",
")",
")",
";",
"return",
"false",
";",
"}",... | This method determines if there is a sense in attempting to append.
<p>
It checks whether there is a set output target and also if there is a set
layout. If these checks fail, then the boolean value <code>false</code> is
returned.
@return true if appender is setup properly | [
"This",
"method",
"determines",
"if",
"there",
"is",
"a",
"sense",
"in",
"attempting",
"to",
"append",
".",
"<p",
">",
"It",
"checks",
"whether",
"there",
"is",
"a",
"set",
"output",
"target",
"and",
"also",
"if",
"there",
"is",
"a",
"set",
"layout",
"... | 028489c11ccfc1237a53923db06f22a90b41809c | https://github.com/tony19/logback-android/blob/028489c11ccfc1237a53923db06f22a90b41809c/logback-android/src/main/java/ch/qos/logback/core/net/SMTPAppenderBase.java#L231-L250 | test | Check the conditions for the entry. | Of course, here is the Java code you requested:
```java
public boolean checkEntryConditions() {
if (!this.started) {
addError("Attempting to append to a non-started appender: "
+ this.getName());
return false;
}
if (this.eventEvaluator == null) {
addError("No EventEvaluator... |
artclarke/humble-video | humble-video-noarch/src/main/java/io/humble/video/ContainerStream.java | ContainerStream.getIndexEntry | public IndexEntry getIndexEntry(int position) {
long cPtr = VideoJNI.ContainerStream_getIndexEntry(swigCPtr, this, position);
return (cPtr == 0) ? null : new IndexEntry(cPtr, false);
} | java | public IndexEntry getIndexEntry(int position) {
long cPtr = VideoJNI.ContainerStream_getIndexEntry(swigCPtr, this, position);
return (cPtr == 0) ? null : new IndexEntry(cPtr, false);
} | [
"public",
"IndexEntry",
"getIndexEntry",
"(",
"int",
"position",
")",
"{",
"long",
"cPtr",
"=",
"VideoJNI",
".",
"ContainerStream_getIndexEntry",
"(",
"swigCPtr",
",",
"this",
",",
"position",
")",
";",
"return",
"(",
"cPtr",
"==",
"0",
")",
"?",
"null",
"... | Get the IndexEntry at the given position in this<br>
Stream object's index.<br>
<p><br>
Not all ContainerFormat types maintain<br>
Stream indexes, but if they do,<br>
this method can return those entries.<br>
</p><br>
<p><br>
Do not modify the Container this stream<br>
is from between calls to this method and<br>
#getN... | [
"Get",
"the",
"IndexEntry",
"at",
"the",
"given",
"position",
"in",
"this<br",
">",
"Stream",
"object",
"s",
"index",
".",
"<br",
">",
"<p",
">",
"<br",
">",
"Not",
"all",
"ContainerFormat",
"types",
"maintain<br",
">",
"Stream",
"indexes",
"but",
"if",
... | aa349ae2d7ef74160b7074feac8d298cf90394d1 | https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/ContainerStream.java#L375-L378 | test | Returns the index entry for the specified position. | Of course, here is the Java code you requested:
```java
public IndexEntry getIndexEntry(int position) {
long cPtr = VideoJNI.ContainerStream_getIndexEntry(swigCPtr, this, position);
return (cPtr == 0) ? null : new IndexEntry(cPtr, false);
}
```
Hope this helps! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.