Dataset Viewer
Auto-converted to Parquet Duplicate
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...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4