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
streamsets/datacollector
common/src/main/java/com/streamsets/pipeline/lib/parser/shaded/com/google/code/regexp/Matcher.java
Matcher.usePattern
public Matcher usePattern(Pattern newPattern) { if (newPattern == null) { throw new IllegalArgumentException("newPattern cannot be null"); } this.parentPattern = newPattern; matcher.usePattern(newPattern.pattern()); return this; }
java
public Matcher usePattern(Pattern newPattern) { if (newPattern == null) { throw new IllegalArgumentException("newPattern cannot be null"); } this.parentPattern = newPattern; matcher.usePattern(newPattern.pattern()); return this; }
[ "public", "Matcher", "usePattern", "(", "Pattern", "newPattern", ")", "{", "if", "(", "newPattern", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"newPattern cannot be null\"", ")", ";", "}", "this", ".", "parentPattern", "=", "newPa...
Changes the Pattern that this Matcher uses to find matches with @param newPattern the new pattern @return this Matcher
[ "Changes", "the", "Pattern", "that", "this", "Matcher", "uses", "to", "find", "matches", "with" ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/common/src/main/java/com/streamsets/pipeline/lib/parser/shaded/com/google/code/regexp/Matcher.java#L68-L75
test
Sets the parent pattern to use.
Of course, here is the Java code you requested: ```java public Matcher usePattern(Pattern newPattern) { if (newPattern == null) { throw new IllegalArgumentException("newPattern cannot be null"); } this.parentPattern = newPattern; matcher.usePattern(newPattern.pattern()); ...
gvlasov/collections-utils
src/main/java/org/tenidwa/collections/utils/CartesianProduct.java
CartesianProduct.multiplication
private Set<R> multiplication() { final Set<R> answer = new LinkedHashSet<>( this.one.size() * this.two.size() ); for (final A left : this.one) { for (final B right : this.two) { final R element = this.function.apply(left, right); if (answe...
java
private Set<R> multiplication() { final Set<R> answer = new LinkedHashSet<>( this.one.size() * this.two.size() ); for (final A left : this.one) { for (final B right : this.two) { final R element = this.function.apply(left, right); if (answe...
[ "private", "Set", "<", "R", ">", "multiplication", "(", ")", "{", "final", "Set", "<", "R", ">", "answer", "=", "new", "LinkedHashSet", "<>", "(", "this", ".", "one", ".", "size", "(", ")", "*", "this", ".", "two", ".", "size", "(", ")", ")", "...
Creates Cartesian product of two lists.
[ "Creates", "Cartesian", "product", "of", "two", "lists", "." ]
82f20efc8e53ea876896b779e35ed33633ec2e23
https://github.com/gvlasov/collections-utils/blob/82f20efc8e53ea876896b779e35ed33633ec2e23/src/main/java/org/tenidwa/collections/utils/CartesianProduct.java#L66-L85
test
Multiplication of two sets of elements.
Of course, here is the Java code you requested: ```java private Set<R> multiplication() { final Set<R> answer = new LinkedHashSet<>( this.one.size() * this.two.size() ); for (final A left : this.one) { for (final B right : this.two) { final R element = th...
jcuda/jcublas
JCublasJava/src/main/java/jcuda/jcublas/JCublas2.java
JCublas2.cublasDrot
public static int cublasDrot( cublasHandle handle, int n, Pointer x, int incx, Pointer y, int incy, Pointer c, /** host or device pointer */ Pointer s)/** host or device pointer */ { return checkResult(cublasDrotNative(handle, n...
java
public static int cublasDrot( cublasHandle handle, int n, Pointer x, int incx, Pointer y, int incy, Pointer c, /** host or device pointer */ Pointer s)/** host or device pointer */ { return checkResult(cublasDrotNative(handle, n...
[ "public", "static", "int", "cublasDrot", "(", "cublasHandle", "handle", ",", "int", "n", ",", "Pointer", "x", ",", "int", "incx", ",", "Pointer", "y", ",", "int", "incy", ",", "Pointer", "c", ",", "/** host or device pointer */", "Pointer", "s", ")", "/** ...
host or device pointer
[ "host", "or", "device", "pointer" ]
80875235d24562073f4d66651dd17263f306427d
https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas2.java#L1535-L1546
test
Drot for the Handle object.
Of course, here is the Java code you requested: ```java public static int cublasDrot( cublasHandle handle, int n, Pointer x, int incx, Pointer y, int incy, Pointer c, /** host or device pointer */ Pointer s)/** host or device pointer */ ...
cglib/cglib
cglib/src/main/java/net/sf/cglib/proxy/Mixin.java
Mixin.createBean
public static Mixin createBean(ClassLoader loader,Object[] beans) { Generator gen = new Generator(); gen.setStyle(STYLE_BEANS); gen.setDelegates(beans); gen.setClassLoader(loader); return gen.create(); }
java
public static Mixin createBean(ClassLoader loader,Object[] beans) { Generator gen = new Generator(); gen.setStyle(STYLE_BEANS); gen.setDelegates(beans); gen.setClassLoader(loader); return gen.create(); }
[ "public", "static", "Mixin", "createBean", "(", "ClassLoader", "loader", ",", "Object", "[", "]", "beans", ")", "{", "Generator", "gen", "=", "new", "Generator", "(", ")", ";", "gen", ".", "setStyle", "(", "STYLE_BEANS", ")", ";", "gen", ".", "setDelegat...
Helper method to create a bean mixin. For finer control over the generated instance, use a new instance of <code>Mixin</code> instead of this static method. TODO
[ "Helper", "method", "to", "create", "a", "bean", "mixin", ".", "For", "finer", "control", "over", "the", "generated", "instance", "use", "a", "new", "instance", "of", "<code", ">", "Mixin<", "/", "code", ">", "instead", "of", "this", "static", "method", ...
cd01695c11fd3c66641b295b9596f74cf13c548b
https://github.com/cglib/cglib/blob/cd01695c11fd3c66641b295b9596f74cf13c548b/cglib/src/main/java/net/sf/cglib/proxy/Mixin.java#L87-L93
test
Create a new instance of a CrazyNamenode bean.
Of course, here is the Java code you requested: ```java public static Mixin createBean(ClassLoader loader,Object[] beans) { Generator gen = new Generator(); gen.setStyle(STYLE_BEANS); gen.setDelegates(beans); gen.setClassLoader(loader); return gen.create(); } ``` Hope this ...
Unidata/thredds
visad/src/main/java/ucar/nc2/iosp/gempak/GempakFileReader.java
GempakFileReader.main
public static void main(String[] args) throws IOException { if (args.length == 0) { System.out.println("need to supply a GEMPAK grid file name"); System.exit(1); } GempakFileReader gfr = getInstance(getFile(args[0]), true); gfr.printFileLabel(); gfr.printKeys(); gfr.printHeaders(); ...
java
public static void main(String[] args) throws IOException { if (args.length == 0) { System.out.println("need to supply a GEMPAK grid file name"); System.exit(1); } GempakFileReader gfr = getInstance(getFile(args[0]), true); gfr.printFileLabel(); gfr.printKeys(); gfr.printHeaders(); ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "if", "(", "args", ".", "length", "==", "0", ")", "{", "System", ".", "out", ".", "println", "(", "\"need to supply a GEMPAK grid file name\"", ")", ";"...
Run the program @param args filename @throws IOException problem reading the file
[ "Run", "the", "program" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/visad/src/main/java/ucar/nc2/iosp/gempak/GempakFileReader.java#L514-L526
test
Main method to read a CRA file from a GEMPAK grid file name.
Of course, here is the Java code you requested: ```java public static void main(String[] args) throws IOException { if (args.length == 0) { System.out.println("need to supply a GEMPAK grid file name"); System.exit(1); } GempakFileReader gfr = getInstance(getFile(args[0]), true); gfr.printF...
PistoiaHELM/HELMNotationParser
src/main/java/org/helm/notation2/parser/notation/HELM2Notation.java
HELM2Notation.polymerToHELM2
public String polymerToHELM2() { StringBuilder notation = new StringBuilder(); for (int i = 0; i < listOfPolymers.size(); i++) { if (listOfPolymers.get(i).isAnnotationHere()) { notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}\"" + l...
java
public String polymerToHELM2() { StringBuilder notation = new StringBuilder(); for (int i = 0; i < listOfPolymers.size(); i++) { if (listOfPolymers.get(i).isAnnotationHere()) { notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}\"" + l...
[ "public", "String", "polymerToHELM2", "(", ")", "{", "StringBuilder", "notation", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "listOfPolymers", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", ...
method to generate a valid HELM2 string for the first section @return valid HELM2 string
[ "method", "to", "generate", "a", "valid", "HELM2", "string", "for", "the", "first", "section" ]
685d7ab7886e9b5cc15fb904025fe6eee703f8f6
https://github.com/PistoiaHELM/HELMNotationParser/blob/685d7ab7886e9b5cc15fb904025fe6eee703f8f6/src/main/java/org/helm/notation2/parser/notation/HELM2Notation.java#L256-L269
test
Converts a list of Polymer objects to HELM2 format
Of course, here is the Java code you requested: ```java public String polymerToHELM2() { StringBuilder notation = new StringBuilder(); for (int i = 0; i < listOfPolymers.size(); i++) { if (listOfPolymers.get(i).isAnnotationHere()) { notation.append(listOfPolymers.get(i).getPolymerID() + "{" +...
jcodec/jcodec
src/main/java/org/jcodec/codecs/h264/decode/aso/SliceGroupMapBuilder.java
SliceGroupMapBuilder.buildBoxOutMap
public static int[] buildBoxOutMap(int picWidthInMbs, int picHeightInMbs, boolean changeDirection, int numberOfMbsInBox) { int picSizeInMbs = picWidthInMbs * picHeightInMbs; int[] groups = new int[picSizeInMbs]; int changeDirectionInt = changeDirection ? 1 : 0; for (int i =...
java
public static int[] buildBoxOutMap(int picWidthInMbs, int picHeightInMbs, boolean changeDirection, int numberOfMbsInBox) { int picSizeInMbs = picWidthInMbs * picHeightInMbs; int[] groups = new int[picSizeInMbs]; int changeDirectionInt = changeDirection ? 1 : 0; for (int i =...
[ "public", "static", "int", "[", "]", "buildBoxOutMap", "(", "int", "picWidthInMbs", ",", "int", "picHeightInMbs", ",", "boolean", "changeDirection", ",", "int", "numberOfMbsInBox", ")", "{", "int", "picSizeInMbs", "=", "picWidthInMbs", "*", "picHeightInMbs", ";", ...
A boxout macroblock to slice group mapping. Only applicable when there's exactly 2 slice groups. Slice group 1 is a background, while slice group 0 is a box in the middle of the frame. @param picWidthInMbs @param picHeightInMbs @param changeDirection @param numberOfMbsInBox number of macroblocks in slice group 0 @retu...
[ "A", "boxout", "macroblock", "to", "slice", "group", "mapping", ".", "Only", "applicable", "when", "there", "s", "exactly", "2", "slice", "groups", ".", "Slice", "group", "1", "is", "a", "background", "while", "slice", "group", "0", "is", "a", "box", "in...
cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75
https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/org/jcodec/codecs/h264/decode/aso/SliceGroupMapBuilder.java#L130-L183
test
Build box out map.
Of course, here is the Java code you requested: ```java public static int[] buildBoxOutMap(int picWidthInMbs, int picHeightInMbs, boolean changeDirection, int numberOfMbsInBox) { int picSizeInMbs = picWidthInMbs * picHeightInMbs; int[] groups = new int[picSizeInMbs]; int changeDire...
GojaFramework/goja
goja-core/src/main/java/goja/core/kits/lang/CharKit.java
CharKit.toSimpleCharArray
public static char[] toSimpleCharArray(byte[] barr) { char[] carr = new char[barr.length]; for (int i = 0; i < barr.length; i++) { carr[i] = (char) (barr[i] & 0xFF); } return carr; }
java
public static char[] toSimpleCharArray(byte[] barr) { char[] carr = new char[barr.length]; for (int i = 0; i < barr.length; i++) { carr[i] = (char) (barr[i] & 0xFF); } return carr; }
[ "public", "static", "char", "[", "]", "toSimpleCharArray", "(", "byte", "[", "]", "barr", ")", "{", "char", "[", "]", "carr", "=", "new", "char", "[", "barr", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "barr", "."...
Converts byte array to char array by simply extending bytes to chars.
[ "Converts", "byte", "array", "to", "char", "array", "by", "simply", "extending", "bytes", "to", "chars", "." ]
77179b495f668fc1fa20accc912991df6bb2d917
https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/kits/lang/CharKit.java#L62-L68
test
To simple char array.
Of course, here is the Java code you requested: ```java public static char[] toSimpleCharArray(byte[] barr) { char[] carr = new char[barr.length]; for (int i = 0; i < barr.length; i++) { carr[i] = (char) (barr[i] & 0xFF); } return carr; } ``` Hope this helps!
cologneintelligence/FitGoodies
fitgoodies-logging-log4j/src/main/java/de/cologneintelligence/fitgoodies/log4j/LogHelper.java
LogHelper.addCaptureToLogger
public void addCaptureToLogger(final AppenderAttachable logger, final String appenderName) { Appender currentAppender = logger.getAppender(appenderName); Appender captureAppender = CaptureAppender.newAppenderFrom(currentAppender); logger.addAppender(captureAppender); }
java
public void addCaptureToLogger(final AppenderAttachable logger, final String appenderName) { Appender currentAppender = logger.getAppender(appenderName); Appender captureAppender = CaptureAppender.newAppenderFrom(currentAppender); logger.addAppender(captureAppender); }
[ "public", "void", "addCaptureToLogger", "(", "final", "AppenderAttachable", "logger", ",", "final", "String", "appenderName", ")", "{", "Appender", "currentAppender", "=", "logger", ".", "getAppender", "(", "appenderName", ")", ";", "Appender", "captureAppender", "=...
Adds a new CaptureAppender to an existing logger. @param logger logger to use @param appenderName name of an existing appender which will be captured
[ "Adds", "a", "new", "CaptureAppender", "to", "an", "existing", "logger", "." ]
834e42d1f41b4b9226060b1e83a80cc69ea88c7b
https://github.com/cologneintelligence/FitGoodies/blob/834e42d1f41b4b9226060b1e83a80cc69ea88c7b/fitgoodies-logging-log4j/src/main/java/de/cologneintelligence/fitgoodies/log4j/LogHelper.java#L36-L41
test
Add a capture appender to the logger.
Of course, here is the Java code you requested: ```java public void addCaptureToLogger(final AppenderAttachable logger, final String appenderName) { Appender currentAppender = logger.getAppender(appenderName); Appender captureAppender = CaptureAppender.newAppenderFrom(currentAppende...
RestComm/jain-slee
container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileObjectImpl.java
ProfileObjectImpl.getProfileCmpSlee10Wrapper
public AbstractProfileCmpSlee10Wrapper getProfileCmpSlee10Wrapper() { if (profileCmpSlee10Wrapper == null) { try { profileCmpSlee10Wrapper = (AbstractProfileCmpSlee10Wrapper) profileTable.getProfileSpecificationComponent().getProfileCmpSlee10WrapperClass().getConstructor(ProfileObjectImpl.class).newInstance(th...
java
public AbstractProfileCmpSlee10Wrapper getProfileCmpSlee10Wrapper() { if (profileCmpSlee10Wrapper == null) { try { profileCmpSlee10Wrapper = (AbstractProfileCmpSlee10Wrapper) profileTable.getProfileSpecificationComponent().getProfileCmpSlee10WrapperClass().getConstructor(ProfileObjectImpl.class).newInstance(th...
[ "public", "AbstractProfileCmpSlee10Wrapper", "getProfileCmpSlee10Wrapper", "(", ")", "{", "if", "(", "profileCmpSlee10Wrapper", "==", "null", ")", "{", "try", "{", "profileCmpSlee10Wrapper", "=", "(", "AbstractProfileCmpSlee10Wrapper", ")", "profileTable", ".", "getProfil...
Retrieves the profile cmp slee 1.0 wrapper for this profile object @return
[ "Retrieves", "the", "profile", "cmp", "slee", "1", ".", "0", "wrapper", "for", "this", "profile", "object" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileObjectImpl.java#L813-L822
test
Get the AbstractProfileCmpSlee10Wrapper object.
Of course, here is the Java code you requested: ```java public AbstractProfileCmpSlee10Wrapper getProfileCmpSlee10Wrapper() { if (profileCmpSlee10Wrapper == null) { try { profileCmpSlee10Wrapper = (AbstractProfileCmpSlee10Wrapper) profileTable.getProfileSpecificationComponent().getProfileCmpSlee10WrapperClass...
oblac/jodd
jodd-db/src/main/java/jodd/db/type/IntegerSqlType.java
IntegerSqlType.get
@Override public Integer get(final ResultSet rs, final int index, final int dbSqlType) throws SQLException { return Integer.valueOf(rs.getInt(index)); }
java
@Override public Integer get(final ResultSet rs, final int index, final int dbSqlType) throws SQLException { return Integer.valueOf(rs.getInt(index)); }
[ "@", "Override", "public", "Integer", "get", "(", "final", "ResultSet", "rs", ",", "final", "int", "index", ",", "final", "int", "dbSqlType", ")", "throws", "SQLException", "{", "return", "Integer", ".", "valueOf", "(", "rs", ".", "getInt", "(", "index", ...
{@inheritDoc}
[ "{" ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-db/src/main/java/jodd/db/type/IntegerSqlType.java#L37-L40
test
Get a Integer value from a ResultSet.
Of course, here is the Java code you requested: ```java @Override public Integer get(final ResultSet rs, final int index, final int dbSqlType) throws SQLException { return Integer.valueOf(rs.getInt(index)); } ``` Hope this helps!
rupertlssmith/lojix
lojix/prolog/src/main/com/thesett/aima/logic/fol/prolog/expressions/Exponential.java
Exponential.evaluate
protected NumericType evaluate(NumericType firstNumber, NumericType secondNumber) { // If either of the arguments is a real number, then use real number arithmetic, otherwise use integer arithmetic. if (firstNumber.isInteger() && secondNumber.isInteger()) { int n1 = firstNumber.i...
java
protected NumericType evaluate(NumericType firstNumber, NumericType secondNumber) { // If either of the arguments is a real number, then use real number arithmetic, otherwise use integer arithmetic. if (firstNumber.isInteger() && secondNumber.isInteger()) { int n1 = firstNumber.i...
[ "protected", "NumericType", "evaluate", "(", "NumericType", "firstNumber", ",", "NumericType", "secondNumber", ")", "{", "// If either of the arguments is a real number, then use real number arithmetic, otherwise use integer arithmetic.", "if", "(", "firstNumber", ".", "isInteger", ...
Evaluates the arithmetic operator on its two numeric arguments. @param firstNumber The first argument. @param secondNumber The second argument. @return The result of performing the arithmetic operator on its arguments.
[ "Evaluates", "the", "arithmetic", "operator", "on", "its", "two", "numeric", "arguments", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/prolog/src/main/com/thesett/aima/logic/fol/prolog/expressions/Exponential.java#L55-L76
test
Evaluate the two numeric types.
Of course, here is the Java code you requested: ```java protected NumericType evaluate(NumericType firstNumber, NumericType secondNumber) { // If either of the arguments is a real number, then use real number arithmetic, otherwise use integer arithmetic. if (firstNumber.isInteger() && secondNumber....
real-logic/aeron
aeron-archive/src/main/java/io/aeron/archive/client/ArchiveProxy.java
ArchiveProxy.findLastMatchingRecording
public boolean findLastMatchingRecording( final long minRecordingId, final String channelFragment, final int streamId, final int sessionId, final long correlationId, final long controlSessionId) { findLastMatchingRecordingRequestEncoder .wrapAndApp...
java
public boolean findLastMatchingRecording( final long minRecordingId, final String channelFragment, final int streamId, final int sessionId, final long correlationId, final long controlSessionId) { findLastMatchingRecordingRequestEncoder .wrapAndApp...
[ "public", "boolean", "findLastMatchingRecording", "(", "final", "long", "minRecordingId", ",", "final", "String", "channelFragment", ",", "final", "int", "streamId", ",", "final", "int", "sessionId", ",", "final", "long", "correlationId", ",", "final", "long", "co...
Find the last recording that matches the given criteria. @param minRecordingId to search back to. @param channelFragment for a contains match on the original channel stored with the archive descriptor. @param streamId of the recording to match. @param sessionId of the recording to match. @param corre...
[ "Find", "the", "last", "recording", "that", "matches", "the", "given", "criteria", "." ]
045c32f0256d1ea35d562520216affc281a41239
https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-archive/src/main/java/io/aeron/archive/client/ArchiveProxy.java#L510-L528
test
Find last matching recording.
Of course, here is the Java code you requested: ```java public boolean findLastMatchingRecording( final long minRecordingId, final String channelFragment, final int streamId, final int sessionId, final long correlationId, final long controlSessionId) { findLa...
FitLayout/api
src/main/java/org/fit/layout/impl/DefaultLogicalArea.java
DefaultLogicalArea.findArea
@Override public LogicalArea findArea(Area area) { LogicalArea ret = null; //scan the subtree for (int i = 0; i < getChildCount() && ret == null; i++) { ret = getChildAt(i).findArea(area); } //not in the subtree -- is it this area? if (ret == n...
java
@Override public LogicalArea findArea(Area area) { LogicalArea ret = null; //scan the subtree for (int i = 0; i < getChildCount() && ret == null; i++) { ret = getChildAt(i).findArea(area); } //not in the subtree -- is it this area? if (ret == n...
[ "@", "Override", "public", "LogicalArea", "findArea", "(", "Area", "area", ")", "{", "LogicalArea", "ret", "=", "null", ";", "//scan the subtree", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getChildCount", "(", ")", "&&", "ret", "==", "null", ";...
==============================================================================
[ "==============================================================================" ]
fcfa67ce2a7485fbd722576413191fff5d68bae8
https://github.com/FitLayout/api/blob/fcfa67ce2a7485fbd722576413191fff5d68bae8/src/main/java/org/fit/layout/impl/DefaultLogicalArea.java#L108-L121
test
Find the logical area in this node.
Of course, here is the Java code you requested: ```java @Override public LogicalArea findArea(Area area) { LogicalArea ret = null; //scan the subtree for (int i = 0; i < getChildCount() && ret == null; i++) { ret = getChildAt(i).findArea(area); } //no...
ngageoint/geopackage-android
geopackage-sdk/src/main/java/mil/nga/geopackage/extension/style/FeatureTableStyles.java
FeatureTableStyles.setIcon
public void setIcon(long featureId, GeometryType geometryType, IconRow icon) { featureStyleExtension.setIcon(tableName, featureId, geometryType, icon); }
java
public void setIcon(long featureId, GeometryType geometryType, IconRow icon) { featureStyleExtension.setIcon(tableName, featureId, geometryType, icon); }
[ "public", "void", "setIcon", "(", "long", "featureId", ",", "GeometryType", "geometryType", ",", "IconRow", "icon", ")", "{", "featureStyleExtension", ".", "setIcon", "(", "tableName", ",", "featureId", ",", "geometryType", ",", "icon", ")", ";", "}" ]
Get the icon of the feature, searching in order: feature geometry type icon, feature default icon, table geometry type icon, table default icon @param featureId feature id @param geometryType geometry type @param icon icon row
[ "Get", "the", "icon", "of", "the", "feature", "searching", "in", "order", ":", "feature", "geometry", "type", "icon", "feature", "default", "icon", "table", "geometry", "type", "icon", "table", "default", "icon" ]
d19e9fcc636462c0f0ae1b7eca4acafae48de21b
https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/style/FeatureTableStyles.java#L976-L978
test
Set the icon for the feature
Of course, here is the Java code you requested: ```java public void setIcon(long featureId, GeometryType geometryType, IconRow icon) { featureStyleExtension.setIcon(tableName, featureId, geometryType, icon); } ``` Hope this helps!
nyla-solutions/gedi-geode
gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/operations/stats/ResourceInst.java
ResourceInst.close
protected boolean close() { if (isLoaded()) { for (SimpleValue value : values) { if (value != null) { value.shrink(); } } return false; } else { return true; } }
java
protected boolean close() { if (isLoaded()) { for (SimpleValue value : values) { if (value != null) { value.shrink(); } } return false; } else { return true; } }
[ "protected", "boolean", "close", "(", ")", "{", "if", "(", "isLoaded", "(", ")", ")", "{", "for", "(", "SimpleValue", "value", ":", "values", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "value", ".", "shrink", "(", ")", ";", "}", "}", ...
/* Frees up any resources no longer needed after the archive file is closed. Returns true if this guy is no longer needed.
[ "/", "*", "Frees", "up", "any", "resources", "no", "longer", "needed", "after", "the", "archive", "file", "is", "closed", ".", "Returns", "true", "if", "this", "guy", "is", "no", "longer", "needed", "." ]
3dd71d6e66e941ce350b306b70677ee95a7d9eee
https://github.com/nyla-solutions/gedi-geode/blob/3dd71d6e66e941ce350b306b70677ee95a7d9eee/gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/operations/stats/ResourceInst.java#L146-L157
test
Close the cache.
Of course, here is the Java code you requested: ```java protected boolean close() { if (isLoaded()) { for (SimpleValue value : values) { if (value != null) { value.shrink(); } } return false; } else { return true; } } ``` ...
js-lib-com/tiny-container
src/main/java/js/container/InstanceFieldsInitializationProcessor.java
InstanceFieldsInitializationProcessor.postProcessInstance
@Override public void postProcessInstance(ManagedClassSPI managedClass, Object instance) { Config config = managedClass.getConfig(); if (config == null) { return; } List<Config> fields = config.findChildren("instance-field"); if (!fields.isEmpty() && !InstanceType.POJO.equals(managedClass.getInstan...
java
@Override public void postProcessInstance(ManagedClassSPI managedClass, Object instance) { Config config = managedClass.getConfig(); if (config == null) { return; } List<Config> fields = config.findChildren("instance-field"); if (!fields.isEmpty() && !InstanceType.POJO.equals(managedClass.getInstan...
[ "@", "Override", "public", "void", "postProcessInstance", "(", "ManagedClassSPI", "managedClass", ",", "Object", "instance", ")", "{", "Config", "config", "=", "managedClass", ".", "getConfig", "(", ")", ";", "if", "(", "config", "==", "null", ")", "{", "ret...
Initialize instance fields from managed class configuration object. @param managedClass managed class, @param instance instance of managed class. @throws ConverterException if configured value cannot be converted to field type. @throws BugError if attempt to assign instance field to not POJO type.
[ "Initialize", "instance", "fields", "from", "managed", "class", "configuration", "object", "." ]
ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e
https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/container/InstanceFieldsInitializationProcessor.java#L54-L67
test
Override this method to add the instance fields to the instance.
Of course, here is the Java code you requested: ```java @Override public void postProcessInstance(ManagedClassSPI managedClass, Object instance) { Config config = managedClass.getConfig(); if (config == null) { return; } List<Config> fields = config.findChildren("instance-field"); if (!fields.isEm...
1gravity/Android-RTEditor
RTEditor/src/main/java/com/onegravity/rteditor/fonts/TTFAnalyzer.java
TTFAnalyzer.getFontName
static String getFontName(String filePath) { TTFRandomAccessFile in = null; try { RandomAccessFile file = new RandomAccessFile(filePath, "r"); in = new TTFRandomAccessFile(file); return getTTFFontName(in, filePath); } catch (IOException e) { return...
java
static String getFontName(String filePath) { TTFRandomAccessFile in = null; try { RandomAccessFile file = new RandomAccessFile(filePath, "r"); in = new TTFRandomAccessFile(file); return getTTFFontName(in, filePath); } catch (IOException e) { return...
[ "static", "String", "getFontName", "(", "String", "filePath", ")", "{", "TTFRandomAccessFile", "in", "=", "null", ";", "try", "{", "RandomAccessFile", "file", "=", "new", "RandomAccessFile", "(", "filePath", ",", "\"r\"", ")", ";", "in", "=", "new", "TTFRand...
Retrieve the file name for a system font. @param filePath the full path for the font to retrieve. @return The file name or null of none could be retrieved.
[ "Retrieve", "the", "file", "name", "for", "a", "system", "font", "." ]
9d8fb4bb865b3b3d011e7633afedcdfb8d21754f
https://github.com/1gravity/Android-RTEditor/blob/9d8fb4bb865b3b3d011e7633afedcdfb8d21754f/RTEditor/src/main/java/com/onegravity/rteditor/fonts/TTFAnalyzer.java#L40-L52
test
Get the font name from a file path.
Of course, here is the Java code you requested: ```java static String getFontName(String filePath) { TTFRandomAccessFile in = null; try { RandomAccessFile file = new RandomAccessFile(filePath, "r"); in = new TTFRandomAccessFile(file); return getTTFFontName(in, filePa...
Unidata/thredds
cdm/src/main/java/ucar/nc2/NetcdfFile.java
NetcdfFile.toNcML
public String toNcML(String url) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); ncmlWriter.setWriteVariablesPredicate(NcMLWriter.writeNoVariablesPredicate); Element netcdfElement = ncmlWriter.makeNetcdfElement(this, url); return ncmlWriter.writeToString(netcdfElement); }
java
public String toNcML(String url) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); ncmlWriter.setWriteVariablesPredicate(NcMLWriter.writeNoVariablesPredicate); Element netcdfElement = ncmlWriter.makeNetcdfElement(this, url); return ncmlWriter.writeToString(netcdfElement); }
[ "public", "String", "toNcML", "(", "String", "url", ")", "throws", "IOException", "{", "NcMLWriter", "ncmlWriter", "=", "new", "NcMLWriter", "(", ")", ";", "ncmlWriter", ".", "setWriteVariablesPredicate", "(", "NcMLWriter", ".", "writeNoVariablesPredicate", ")", "...
CDL representation of Netcdf header info, non strict
[ "CDL", "representation", "of", "Netcdf", "header", "info", "non", "strict" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/NetcdfFile.java#L1396-L1402
test
Converts the XML document to a NcML document.
Of course, here is the Java code you requested: ```java public String toNcML(String url) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); ncmlWriter.setWriteVariablesPredicate(NcMLWriter.writeNoVariablesPredicate); Element netcdfElement = ncmlWriter.makeNetcdfElement(this, url); return n...
intellimate/IzouSDK
src/main/java/org/intellimate/izou/sdk/frameworks/music/events/StartMusicRequest.java
StartMusicRequest.createStartMusicRequest
public static Optional<StartMusicRequest> createStartMusicRequest(Identification source, Identification target) { return createStartMusicRequest(source, target, (TrackInfo) null); }
java
public static Optional<StartMusicRequest> createStartMusicRequest(Identification source, Identification target) { return createStartMusicRequest(source, target, (TrackInfo) null); }
[ "public", "static", "Optional", "<", "StartMusicRequest", ">", "createStartMusicRequest", "(", "Identification", "source", ",", "Identification", "target", ")", "{", "return", "createStartMusicRequest", "(", "source", ",", "target", ",", "(", "TrackInfo", ")", "null...
creates a new StartRequest @param source the caller @param target the target who should start playing @return the optional StartMusicRequest
[ "creates", "a", "new", "StartRequest" ]
bc8705ad48a6ca12a722f2b787be435949fa5d08
https://github.com/intellimate/IzouSDK/blob/bc8705ad48a6ca12a722f2b787be435949fa5d08/src/main/java/org/intellimate/izou/sdk/frameworks/music/events/StartMusicRequest.java#L49-L51
test
Create a StartMusicRequest.
Of course, here is the Java code you requested: ```java public static Optional<StartMusicRequest> createStartMusicRequest(Identification source, Identification target) { return createStartMusicRequest(source, target, (TrackInfo) null); } ``` Hope this helps!
oblac/jodd
jodd-core/src/main/java/jodd/chalk/Chalk256.java
Chalk256.bgRgb
public Chalk256 bgRgb(final int r, final int b, final int g) { startSequence(BG_CODES[index(36*r + 6*g + b,16, 232)]); endSequence(RESET); return _this(); }
java
public Chalk256 bgRgb(final int r, final int b, final int g) { startSequence(BG_CODES[index(36*r + 6*g + b,16, 232)]); endSequence(RESET); return _this(); }
[ "public", "Chalk256", "bgRgb", "(", "final", "int", "r", ",", "final", "int", "b", ",", "final", "int", "g", ")", "{", "startSequence", "(", "BG_CODES", "[", "index", "(", "36", "*", "r", "+", "6", "*", "g", "+", "b", ",", "16", ",", "232", ")"...
Colors with red-green-blue value, in the range 0 to 6.
[ "Colors", "with", "red", "-", "green", "-", "blue", "value", "in", "the", "range", "0", "to", "6", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/chalk/Chalk256.java#L102-L106
test
Set the color of the Chalk256 color.
Of course, here is the Java code you requested: ```java public Chalk256 bgRgb(final int r, final int b, final int g) { startSequence(BG_CODES[index(36*r + 6*g + b,16, 232)]); endSequence(RESET); return _this(); } ``` Hope this helps!
Koekiebox-PTY-LTD/Fluid
fluid-api/src/main/java/com/fluidbpm/program/api/util/sql/impl/SQLFormFieldUtil.java
SQLFormFieldUtil.getFormFieldValueFor
public Field getFormFieldValueFor( FormFieldMapping formFieldMappingParam, Long formContainerIdParam, boolean includeTableFieldFormRecordInfoParam ) { if(formFieldMappingParam == null) { return null; } //First attempt to fetch from the cache... if(this.getCacheUtil() != null) { CacheUtil.Cached...
java
public Field getFormFieldValueFor( FormFieldMapping formFieldMappingParam, Long formContainerIdParam, boolean includeTableFieldFormRecordInfoParam ) { if(formFieldMappingParam == null) { return null; } //First attempt to fetch from the cache... if(this.getCacheUtil() != null) { CacheUtil.Cached...
[ "public", "Field", "getFormFieldValueFor", "(", "FormFieldMapping", "formFieldMappingParam", ",", "Long", "formContainerIdParam", ",", "boolean", "includeTableFieldFormRecordInfoParam", ")", "{", "if", "(", "formFieldMappingParam", "==", "null", ")", "{", "return", "null"...
Retrieves the Form Field value for Electronic Form {@code formContainerIdParam}. @param formFieldMappingParam The mapping to use. @param formContainerIdParam The Electronic Form Id. @param includeTableFieldFormRecordInfoParam Does table record form data need to be included. @return Populated {@code Field} value.
[ "Retrieves", "the", "Form", "Field", "value", "for", "Electronic", "Form", "{", "@code", "formContainerIdParam", "}", "." ]
81153d865f71b84ca933532c7115717bc3979270
https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-api/src/main/java/com/fluidbpm/program/api/util/sql/impl/SQLFormFieldUtil.java#L361-L567
test
Get the Field object for the specified formFieldMappingParam.
Of course, here is the Java code you requested: ```java public Field getFormFieldValueFor( FormFieldMapping formFieldMappingParam, Long formContainerIdParam, boolean includeTableFieldFormRecordInfoParam ) { if(formFieldMappingParam == null) { return null; } //First attempt to fetch from the cache.....
spring-projects/spring-security
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/oidc/authentication/OidcIdTokenValidator.java
OidcIdTokenValidator.setClockSkew
public final void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; }
java
public final void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; }
[ "public", "final", "void", "setClockSkew", "(", "Duration", "clockSkew", ")", "{", "Assert", ".", "notNull", "(", "clockSkew", ",", "\"clockSkew cannot be null\"", ")", ";", "Assert", ".", "isTrue", "(", "clockSkew", ".", "getSeconds", "(", ")", ">=", "0", "...
Sets the maximum acceptable clock skew. The default is 60 seconds. The clock skew is used when validating the {@link JwtClaimNames#EXP exp} and {@link JwtClaimNames#IAT iat} claims. @since 5.2 @param clockSkew the maximum acceptable clock skew
[ "Sets", "the", "maximum", "acceptable", "clock", "skew", ".", "The", "default", "is", "60", "seconds", ".", "The", "clock", "skew", "is", "used", "when", "validating", "the", "{", "@link", "JwtClaimNames#EXP", "exp", "}", "and", "{", "@link", "JwtClaimNames#...
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/oidc/authentication/OidcIdTokenValidator.java#L133-L137
test
Sets the clock skew.
Of course, here is the Java code you requested: ```java public final void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; } ``` Hope this helps!
Unidata/thredds
cdm/src/main/java/ucar/nc2/iosp/hdf5/H5iosp.java
H5iosp.readData
private Array readData(ucar.nc2.Variable v2, long dataPos, Section wantSection) throws IOException, InvalidRangeException { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); DataType dataType = v2.getDataType(); Object data; Layout layout; if (vinfo.useFillValue) { // fill value only ...
java
private Array readData(ucar.nc2.Variable v2, long dataPos, Section wantSection) throws IOException, InvalidRangeException { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); DataType dataType = v2.getDataType(); Object data; Layout layout; if (vinfo.useFillValue) { // fill value only ...
[ "private", "Array", "readData", "(", "ucar", ".", "nc2", ".", "Variable", "v2", ",", "long", "dataPos", ",", "Section", "wantSection", ")", "throws", "IOException", ",", "InvalidRangeException", "{", "H5header", ".", "Vinfo", "vinfo", "=", "(", "H5header", "...
all the work is here, so can be called recursively
[ "all", "the", "work", "is", "here", "so", "can", "be", "called", "recursively" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/hdf5/H5iosp.java#L124-L191
test
Read data from the variable.
Of course, here is the Java code you requested: ```java private Array readData(ucar.nc2.Variable v2, long dataPos, Section wantSection) throws IOException, InvalidRangeException { H5header.Vinfo vinfo = (H5header.Vinfo) v2.getSPobject(); DataType dataType = v2.getDataType(); Object data; Layout layout;...
RestComm/jain-slee
container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java
TracerImpl.assignLog4JLevel
private void assignLog4JLevel(Level log4jLevel) { if (log4jLevel == null) { return; } if (log4jLevel == Level.DEBUG) { level = TraceLevel.FINE; } else if (log4jLevel == Level.INFO) { level = TraceLevel.INFO; } else if (log4jLevel == Level.WARN) { level = TraceLevel.WARNING; } ...
java
private void assignLog4JLevel(Level log4jLevel) { if (log4jLevel == null) { return; } if (log4jLevel == Level.DEBUG) { level = TraceLevel.FINE; } else if (log4jLevel == Level.INFO) { level = TraceLevel.INFO; } else if (log4jLevel == Level.WARN) { level = TraceLevel.WARNING; } ...
[ "private", "void", "assignLog4JLevel", "(", "Level", "log4jLevel", ")", "{", "if", "(", "log4jLevel", "==", "null", ")", "{", "return", ";", "}", "if", "(", "log4jLevel", "==", "Level", ".", "DEBUG", ")", "{", "level", "=", "TraceLevel", ".", "FINE", "...
assigns the equiv log4j level to the tracer @param log4jLevel
[ "assigns", "the", "equiv", "log4j", "level", "to", "the", "tracer" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java#L140-L162
test
Assigns the log4j level to the trace level.
Of course, here is the Java code you requested: ```java private void assignLog4JLevel(Level log4jLevel) { if (log4jLevel == null) { return; } if (log4jLevel == Level.DEBUG) { level = TraceLevel.FINE; } else if (log4jLevel == Level.INFO) { level = TraceLevel.INFO; } else if (log4jLevel ...
rest-assured/rest-assured
json-path/src/main/java/io/restassured/path/json/JsonPath.java
JsonPath.getByte
public byte getByte(String path) { //The type returned from Groovy depends on the input, so we need to handle different numerical types. Object value = get(path); if (value instanceof Byte) { return (Byte) value; } else if (value instanceof Long) { return ((Long) ...
java
public byte getByte(String path) { //The type returned from Groovy depends on the input, so we need to handle different numerical types. Object value = get(path); if (value instanceof Byte) { return (Byte) value; } else if (value instanceof Long) { return ((Long) ...
[ "public", "byte", "getByte", "(", "String", "path", ")", "{", "//The type returned from Groovy depends on the input, so we need to handle different numerical types.", "Object", "value", "=", "get", "(", "path", ")", ";", "if", "(", "value", "instanceof", "Byte", ")", "{...
Get the result of an Object path expression as a byte. @param path The Object path. @return The object matching the Object path. A {@link java.lang.ClassCastException} will be thrown if the object cannot be casted to the expected type.
[ "Get", "the", "result", "of", "an", "Object", "path", "expression", "as", "a", "byte", "." ]
165a85b65070f5a07fe0045175613fb2c2811642
https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/json-path/src/main/java/io/restassured/path/json/JsonPath.java#L256-L268
test
Gets a byte value from the cache.
Of course, here is the Java code you requested: ```java public byte getByte(String path) { //The type returned from Groovy depends on the input, so we need to handle different numerical types. Object value = get(path); if (value instanceof Byte) { return (Byte) value; } else...
Enterprise-Content-Management/infoarchive-sip-sdk
core/src/main/java/com/opentext/ia/sdk/sip/SipAssembler.java
SipAssembler.forPdiAndContent
public static <D> SipAssembler<D> forPdiAndContent(PackagingInformation prototype, Assembler<HashedContents<D>> pdiAssembler, DigitalObjectsExtraction<D> contentsExtraction) { HashAssembler noHashAssembler = new NoHashAssembler(); return forPdiAndContentWithHashing(prototype, pdiAssembler, noHashAssembler...
java
public static <D> SipAssembler<D> forPdiAndContent(PackagingInformation prototype, Assembler<HashedContents<D>> pdiAssembler, DigitalObjectsExtraction<D> contentsExtraction) { HashAssembler noHashAssembler = new NoHashAssembler(); return forPdiAndContentWithHashing(prototype, pdiAssembler, noHashAssembler...
[ "public", "static", "<", "D", ">", "SipAssembler", "<", "D", ">", "forPdiAndContent", "(", "PackagingInformation", "prototype", ",", "Assembler", "<", "HashedContents", "<", "D", ">", ">", "pdiAssembler", ",", "DigitalObjectsExtraction", "<", "D", ">", "contents...
Assemble a SIP that contains only structured data and is the only SIP in its DSS. @param <D> The type of domain objects to assemble the SIP from @param prototype Prototype for the Packaging Information @param pdiAssembler Assembler that builds up the PDI @param contentsExtraction Extraction of content from domain objec...
[ "Assemble", "a", "SIP", "that", "contains", "only", "structured", "data", "and", "is", "the", "only", "SIP", "in", "its", "DSS", "." ]
3c84a4d9ce569139e9a442034526944d3e63436e
https://github.com/Enterprise-Content-Management/infoarchive-sip-sdk/blob/3c84a4d9ce569139e9a442034526944d3e63436e/core/src/main/java/com/opentext/ia/sdk/sip/SipAssembler.java#L139-L143
test
Create a SipAssembler for a packed information object containing a sequence of octets.
Of course, here is the Java code you requested: ```java public static <D> SipAssembler<D> forPdiAndContent(PackagingInformation prototype, Assembler<HashedContents<D>> pdiAssembler, DigitalObjectsExtraction<D> contentsExtraction) { HashAssembler noHashAssembler = new NoHashAssembler(); return forPdiAndCo...
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel3.java
BaseLevel3.herk
@Override public void herk(char Order, char Uplo, char Trans, IComplexNumber alpha, IComplexNDArray A, IComplexNumber beta, IComplexNDArray C) { // FIXME: int cast if (A.data().dataType() == DataBuffer.Type.DOUBLE) zherk(Order, Uplo, Trans, (int) A.rows(), (int) A.co...
java
@Override public void herk(char Order, char Uplo, char Trans, IComplexNumber alpha, IComplexNDArray A, IComplexNumber beta, IComplexNDArray C) { // FIXME: int cast if (A.data().dataType() == DataBuffer.Type.DOUBLE) zherk(Order, Uplo, Trans, (int) A.rows(), (int) A.co...
[ "@", "Override", "public", "void", "herk", "(", "char", "Order", ",", "char", "Uplo", ",", "char", "Trans", ",", "IComplexNumber", "alpha", ",", "IComplexNDArray", "A", ",", "IComplexNumber", "beta", ",", "IComplexNDArray", "C", ")", "{", "// FIXME: int cast",...
herk performs a rank-n update of a Hermitian matrix, that is, one of the following operations: c := alpha*a*conjug(a') + beta*c for trans = 'N'or'n' c := alpha*conjug(a')*a + beta*c for trans = 'C'or'c', where c is an n-by-n Hermitian matrix; a is an n-by-k matrix, if trans = 'N'or'n', a is a k-by-n matrix, if trans ...
[ "herk", "performs", "a", "rank", "-", "n", "update", "of", "a", "Hermitian", "matrix", "that", "is", "one", "of", "the", "following", "operations", ":", "c", ":", "=", "alpha", "*", "a", "*", "conjug", "(", "a", ")", "+", "beta", "*", "c", "for", ...
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel3.java#L350-L360
test
Herk method implementation.
Of course, here is the Java code you requested: ```java @Override public void herk(char Order, char Uplo, char Trans, IComplexNumber alpha, IComplexNDArray A, IComplexNumber beta, IComplexNDArray C) { // FIXME: int cast if (A.data().dataType() == DataBuffer.Type.DOUBLE) ...
orientechnologies/orientdb
core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLDropIndex.java
OCommandExecutorSQLDropIndex.execute
public Object execute(final Map<Object, Object> iArgs) { if (name == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); if (name.equals("*")) { long totalIndexed = 0; for (OIndex<?> idx : getDatabase().getMetadata().getIndexManag...
java
public Object execute(final Map<Object, Object> iArgs) { if (name == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); if (name.equals("*")) { long totalIndexed = 0; for (OIndex<?> idx : getDatabase().getMetadata().getIndexManag...
[ "public", "Object", "execute", "(", "final", "Map", "<", "Object", ",", "Object", ">", "iArgs", ")", "{", "if", "(", "name", "==", "null", ")", "throw", "new", "OCommandExecutionException", "(", "\"Cannot execute the command because it has not been parsed yet\"", ")...
Execute the REMOVE INDEX.
[ "Execute", "the", "REMOVE", "INDEX", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLDropIndex.java#L82-L99
test
Executes the command.
Of course, here is the Java code you requested: ```java public Object execute(final Map<Object, Object> iArgs) { if (name == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); if (name.equals("*")) { long totalIndexed = 0; for (...
artclarke/humble-video
humble-video-noarch/src/main/java/io/humble/video/Demuxer.java
Demuxer.pause
public void pause() throws java.lang.InterruptedException, java.io.IOException { VideoJNI.Demuxer_pause(swigCPtr, this); }
java
public void pause() throws java.lang.InterruptedException, java.io.IOException { VideoJNI.Demuxer_pause(swigCPtr, this); }
[ "public", "void", "pause", "(", ")", "throws", "java", ".", "lang", ".", "InterruptedException", ",", "java", ".", "io", ".", "IOException", "{", "VideoJNI", ".", "Demuxer_pause", "(", "swigCPtr", ",", "this", ")", ";", "}" ]
Pause a playing network source. Call #play() to unpause.<br> <br> @return 0 on success; &lt;0 if state is not #State.STATE_PLAYING or error.
[ "Pause", "a", "playing", "network", "source", ".", "Call", "#play", "()", "to", "unpause", ".", "<br", ">", "<br", ">" ]
aa349ae2d7ef74160b7074feac8d298cf90394d1
https://github.com/artclarke/humble-video/blob/aa349ae2d7ef74160b7074feac8d298cf90394d1/humble-video-noarch/src/main/java/io/humble/video/Demuxer.java#L499-L501
test
Pause the video.
Of course, here is the Java code you requested: ```java public void pause() throws java.lang.InterruptedException, java.io.IOException { VideoJNI.Demuxer_pause(swigCPtr, this); } ``` Hope this helps!
deeplearning4j/nd4j
nd4j-common/src/main/java/org/nd4j/util/StringUtils.java
StringUtils.isAlpha
public static boolean isAlpha(String str) { if (str == null) { return false; } int sz = str.length(); for (int i = 0; i < sz; i++) { if (!Character.isLetter(str.charAt(i))) { return false; } } return true; }
java
public static boolean isAlpha(String str) { if (str == null) { return false; } int sz = str.length(); for (int i = 0; i < sz; i++) { if (!Character.isLetter(str.charAt(i))) { return false; } } return true; }
[ "public", "static", "boolean", "isAlpha", "(", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "false", ";", "}", "int", "sz", "=", "str", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
<p>Checks if the String contains only unicode letters.</p> <p><code>null</code> will return <code>false</code>. An empty String (length()=0) will return <code>true</code>.</p> <pre> StringUtils.isAlpha(null) = false StringUtils.isAlpha("") = true StringUtils.isAlpha(" ") = false StringUtils.isAlpha("abc") =...
[ "<p", ">", "Checks", "if", "the", "String", "contains", "only", "unicode", "letters", ".", "<", "/", "p", ">" ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-common/src/main/java/org/nd4j/util/StringUtils.java#L1013-L1024
test
isAlpha returns true if the string is alpha.
Of course, here is the Java code you requested: ```java public static boolean isAlpha(String str) { if (str == null) { return false; } int sz = str.length(); for (int i = 0; i < sz; i++) { if (!Character.isLetter(str.charAt(i))) { return false; ...
orientechnologies/orientdb
core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceCached.java
OSequenceCached.nextWithNewCurrentValue
protected long nextWithNewCurrentValue(long currentValue, boolean executeViaDistributed) throws OSequenceLimitReachedException, ODatabaseException { if (!executeViaDistributed) { //we don't want synchronization on whole method, because called with executeViaDistributed == true //will later call ne...
java
protected long nextWithNewCurrentValue(long currentValue, boolean executeViaDistributed) throws OSequenceLimitReachedException, ODatabaseException { if (!executeViaDistributed) { //we don't want synchronization on whole method, because called with executeViaDistributed == true //will later call ne...
[ "protected", "long", "nextWithNewCurrentValue", "(", "long", "currentValue", ",", "boolean", "executeViaDistributed", ")", "throws", "OSequenceLimitReachedException", ",", "ODatabaseException", "{", "if", "(", "!", "executeViaDistributed", ")", "{", "//we don't want synchro...
first set new current value then call next
[ "first", "set", "new", "current", "value", "then", "call", "next" ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/metadata/sequence/OSequenceCached.java#L128-L147
test
This method is called to get the next value from the iterator.
Of course, here is the Java code you requested: ```java protected long nextWithNewCurrentValue(long currentValue, boolean executeViaDistributed) throws OSequenceLimitReachedException, ODatabaseException { if (!executeViaDistributed) { //we don't want synchronization on whole method, because called with...
oblac/jodd
jodd-core/src/jmh/java/jodd/util/Base64Benchmark.java
Base64Benchmark.encode_Apache_Base64
@Benchmark public String encode_Apache_Base64() { return org.apache.commons.codec.binary.Base64.encodeBase64String(to_be_encoded); }
java
@Benchmark public String encode_Apache_Base64() { return org.apache.commons.codec.binary.Base64.encodeBase64String(to_be_encoded); }
[ "@", "Benchmark", "public", "String", "encode_Apache_Base64", "(", ")", "{", "return", "org", ".", "apache", ".", "commons", ".", "codec", ".", "binary", ".", "Base64", ".", "encodeBase64String", "(", "to_be_encoded", ")", ";", "}" ]
----------------------------------------------------------------------- Apache Commons Codec - Base64
[ "-----------------------------------------------------------------------", "Apache", "Commons", "Codec", "-", "Base64" ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/jmh/java/jodd/util/Base64Benchmark.java#L100-L103
test
Encode the base64 string.
Of course, here is the Java code you requested: ```java @Benchmark public String encode_Apache_Base64() { return org.apache.commons.codec.binary.Base64.encodeBase64String(to_be_encoded); } ``` Hope this helps!
blademainer/common_utils
common_helper/src/main/java/com/xiongyingqi/util/FileHelper.java
FileHelper.listFilesBySuffix
public static File[] listFilesBySuffix(File folder, final String suffix) { File[] files = folder.listFiles(new FilenameFilter() { @Override public boolean accept(File paramFile, String paramString) { String newSuffix = suffix; if (!newSuffix.startsWith("."...
java
public static File[] listFilesBySuffix(File folder, final String suffix) { File[] files = folder.listFiles(new FilenameFilter() { @Override public boolean accept(File paramFile, String paramString) { String newSuffix = suffix; if (!newSuffix.startsWith("."...
[ "public", "static", "File", "[", "]", "listFilesBySuffix", "(", "File", "folder", ",", "final", "String", "suffix", ")", "{", "File", "[", "]", "files", "=", "folder", ".", "listFiles", "(", "new", "FilenameFilter", "(", ")", "{", "@", "Override", "publi...
根据后缀名从文件夹获取文件 <br> 2013-9-6 下午3:15:56 @param folder @param suffix @return
[ "根据后缀名从文件夹获取文件", "<br", ">", "2013", "-", "9", "-", "6", "下午3", ":", "15", ":", "56" ]
ef6baf0367c16de95a28caab67a7d5842a6d13db
https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/FileHelper.java#L135-L150
test
List files by suffix.
Of course, here is the Java code you requested: ```java public static File[] listFilesBySuffix(File folder, final String suffix) { File[] files = folder.listFiles(new FilenameFilter() { @Override public boolean accept(File paramFile, String paramString) { String newSuffi...
rupertlssmith/lojix
base/common/src/main/com/thesett/common/util/PropertiesHelper.java
PropertiesHelper.getProperties
public static Properties getProperties(File file) throws IOException { /*log.fine("getProperties(File): called");*/ // Open the file as an input stream InputStream is = new FileInputStream(file); // Create properties object loaded from the stream Properties properties = get...
java
public static Properties getProperties(File file) throws IOException { /*log.fine("getProperties(File): called");*/ // Open the file as an input stream InputStream is = new FileInputStream(file); // Create properties object loaded from the stream Properties properties = get...
[ "public", "static", "Properties", "getProperties", "(", "File", "file", ")", "throws", "IOException", "{", "/*log.fine(\"getProperties(File): called\");*/", "// Open the file as an input stream", "InputStream", "is", "=", "new", "FileInputStream", "(", "file", ")", ";", "...
Get properties from a file. @param file The file. @return The properties loaded from the file. @throws IOException If there is an I/O error reading from the file.
[ "Get", "properties", "from", "a", "file", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/PropertiesHelper.java#L75-L89
test
Get the properties from the specified file.
Of course, here is the Java code you requested: ```java public static Properties getProperties(File file) throws IOException { /*log.fine("getProperties(File): called");*/ // Open the file as an input stream InputStream is = new FileInputStream(file); // Create properties object l...
jboss/jboss-common-core
src/main/java/org/jboss/util/WorkerQueue.java
WorkerQueue.putJobImpl
protected void putJobImpl(Executable job) { JobItem posted = new JobItem(job); if (m_currentJob == null) { // The queue is empty, set the current job to process and // wake up the thread waiting in method getJob m_currentJob = posted; notifyAll(); }...
java
protected void putJobImpl(Executable job) { JobItem posted = new JobItem(job); if (m_currentJob == null) { // The queue is empty, set the current job to process and // wake up the thread waiting in method getJob m_currentJob = posted; notifyAll(); }...
[ "protected", "void", "putJobImpl", "(", "Executable", "job", ")", "{", "JobItem", "posted", "=", "new", "JobItem", "(", "job", ")", ";", "if", "(", "m_currentJob", "==", "null", ")", "{", "// The queue is empty, set the current job to process and", "// wake up the t...
Never call this method, only override in subclasses to perform job adding in a specific way, normally tied to the data structure holding the jobs. @param job
[ "Never", "call", "this", "method", "only", "override", "in", "subclasses", "to", "perform", "job", "adding", "in", "a", "specific", "way", "normally", "tied", "to", "the", "data", "structure", "holding", "the", "jobs", "." ]
c191bb18db83fa106c6913cf34ed47989b65dc97
https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/WorkerQueue.java#L166-L184
test
Put a job into the queue.
Of course, here is the Java code you requested: ```java protected void putJobImpl(Executable job) { JobItem posted = new JobItem(job); if (m_currentJob == null) { // The queue is empty, set the current job to process and // wake up the thread waiting in method getJob ...
Unidata/thredds
grib/src/main/java/ucar/nc2/grib/collection/GribCollectionMutable.java
GribCollectionMutable.makeIndexMFile
static MFile makeIndexMFile(String collectionName, File directory) { String nameNoBlanks = StringUtil2.replace(collectionName, ' ', "_"); return new GcMFile(directory, nameNoBlanks + GribCdmIndex.NCX_SUFFIX, -1, -1, -1); // LOOK dont know lastMod, size. can it be added later? }
java
static MFile makeIndexMFile(String collectionName, File directory) { String nameNoBlanks = StringUtil2.replace(collectionName, ' ', "_"); return new GcMFile(directory, nameNoBlanks + GribCdmIndex.NCX_SUFFIX, -1, -1, -1); // LOOK dont know lastMod, size. can it be added later? }
[ "static", "MFile", "makeIndexMFile", "(", "String", "collectionName", ",", "File", "directory", ")", "{", "String", "nameNoBlanks", "=", "StringUtil2", ".", "replace", "(", "collectionName", ",", "'", "'", ",", "\"_\"", ")", ";", "return", "new", "GcMFile", ...
////////////////////////////////////////////////////////
[ "////////////////////////////////////////////////////////" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/collection/GribCollectionMutable.java#L55-L58
test
Create an index file for the given collection name.
Of course, here is the Java code you requested: ```java static MFile makeIndexMFile(String collectionName, File directory) { String nameNoBlanks = StringUtil2.replace(collectionName, ' ', "_"); return new GcMFile(directory, nameNoBlanks + GribCdmIndex.NCX_SUFFIX, -1, -1, -1); // LOOK dont know lastMod, size. c...
poetix/octarine
octarine-joins/src/main/java/com/codepoetics/octarine/joins/Joiner.java
Joiner.strictOneToOne
public Stream<T2<L, R>> strictOneToOne(Collection<? extends R> rights) { return strictOneToOne(rights.stream()); }
java
public Stream<T2<L, R>> strictOneToOne(Collection<? extends R> rights) { return strictOneToOne(rights.stream()); }
[ "public", "Stream", "<", "T2", "<", "L", ",", "R", ">", ">", "strictOneToOne", "(", "Collection", "<", "?", "extends", "R", ">", "rights", ")", "{", "return", "strictOneToOne", "(", "rights", ".", "stream", "(", ")", ")", ";", "}" ]
Strict one to one
[ "Strict", "one", "to", "one" ]
b365040f2aa6c3bee8a6f7db95c30753fb44ed81
https://github.com/poetix/octarine/blob/b365040f2aa6c3bee8a6f7db95c30753fb44ed81/octarine-joins/src/main/java/com/codepoetics/octarine/joins/Joiner.java#L72-L74
test
Returns a stream of tokens that are strict one - to - one.
Of course, here is the Java code you requested: ```java public Stream<T2<L, R>> strictOneToOne(Collection<? extends R> rights) { return strictOneToOne(rights.stream()); } ``` Hope this helps!
oblac/jodd
jodd-json/src/main/java/jodd/json/JsonParser.java
JsonParser.parseObjectContent
protected Object parseObjectContent(Class targetType, Class valueKeyType, Class valueType) { // detect special case if (targetType == Object.class) { targetType = Map.class; } // continue targetType = replaceWithMappedTypeForPath(targetType); Object target; boolean isTargetTypeMap = true; boolean...
java
protected Object parseObjectContent(Class targetType, Class valueKeyType, Class valueType) { // detect special case if (targetType == Object.class) { targetType = Map.class; } // continue targetType = replaceWithMappedTypeForPath(targetType); Object target; boolean isTargetTypeMap = true; boolean...
[ "protected", "Object", "parseObjectContent", "(", "Class", "targetType", ",", "Class", "valueKeyType", ",", "Class", "valueType", ")", "{", "// detect special case", "if", "(", "targetType", "==", "Object", ".", "class", ")", "{", "targetType", "=", "Map", ".", ...
Parses object, once when open bracket has been consumed.
[ "Parses", "object", "once", "when", "open", "bracket", "has", "been", "consumed", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-json/src/main/java/jodd/json/JsonParser.java#L986-L1150
test
Parse the object content.
Of course, here is the Java code you requested: ```java protected Object parseObjectContent(Class targetType, Class valueKeyType, Class valueType) { // detect special case if (targetType == Object.class) { targetType = Map.class; } // continue targetType = replaceWithMappedTypeForPath(targetType); O...
oblac/jodd
jodd-core/src/main/java/jodd/io/StreamUtil.java
StreamUtil.copy
public static FastCharArrayWriter copy(final InputStream input, final String encoding, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, encoding, count); return output; } }
java
public static FastCharArrayWriter copy(final InputStream input, final String encoding, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, encoding, count); return output; } }
[ "public", "static", "FastCharArrayWriter", "copy", "(", "final", "InputStream", "input", ",", "final", "String", "encoding", ",", "final", "int", "count", ")", "throws", "IOException", "{", "try", "(", "FastCharArrayWriter", "output", "=", "createFastCharArrayWriter...
Copies {@link InputStream} to a new {@link FastCharArrayWriter} using buffer and specified encoding. @see #copy(InputStream, Writer, String, int)
[ "Copies", "{", "@link", "InputStream", "}", "to", "a", "new", "{", "@link", "FastCharArrayWriter", "}", "using", "buffer", "and", "specified", "encoding", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/io/StreamUtil.java#L387-L392
test
Copy the contents of the given input stream to a FastCharArrayWriter.
Of course, here is the Java code you requested: ```java public static FastCharArrayWriter copy(final InputStream input, final String encoding, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, encoding, count); return output; } } ``` ...
lessthanoptimal/GeoRegression
main/src/georegression/geometry/UtilPolygons2D_I32.java
UtilPolygons2D_I32.bounding
public static void bounding( Polygon2D_I32 quad , Rectangle2D_I32 rectangle ) { UtilPolygons2D_I32.bounding(quad.vertexes.toList(),rectangle); }
java
public static void bounding( Polygon2D_I32 quad , Rectangle2D_I32 rectangle ) { UtilPolygons2D_I32.bounding(quad.vertexes.toList(),rectangle); }
[ "public", "static", "void", "bounding", "(", "Polygon2D_I32", "quad", ",", "Rectangle2D_I32", "rectangle", ")", "{", "UtilPolygons2D_I32", ".", "bounding", "(", "quad", ".", "vertexes", ".", "toList", "(", ")", ",", "rectangle", ")", ";", "}" ]
Finds the minimum area bounding rectangle which is aligned to the x and y axis around the polygon. Note (x0,y0) is inclusive and (x1,y1) is exclusive. @param quad (Input) Quadrilateral @param rectangle (Output) Minimum area rectangle
[ "Finds", "the", "minimum", "area", "bounding", "rectangle", "which", "is", "aligned", "to", "the", "x", "and", "y", "axis", "around", "the", "polygon", ".", "Note", "(", "x0", "y0", ")", "is", "inclusive", "and", "(", "x1", "y1", ")", "is", "exclusive"...
c067cd44a4e95bd826119f6e658bd82386ef289f
https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/UtilPolygons2D_I32.java#L72-L75
test
Computes the bounding box of a polygon.
Of course, here is the Java code you requested: ```java public static void bounding( Polygon2D_I32 quad , Rectangle2D_I32 rectangle ) { UtilPolygons2D_I32.bounding(quad.vertexes.toList(),rectangle); } ``` Hope this helps!
Unidata/thredds
cdm/src/main/java/ucar/nc2/iosp/grads/GradsDataDescriptorFile.java
GradsDataDescriptorFile.getTimeStepsPerFile
public int[] getTimeStepsPerFile(String filename) { if (chsubs != null) { for (Chsub ch : chsubs) { if (filename.contains(ch.subString)) { return new int[]{ch.numTimes, ch.startTimeIndex}; } } } return new int[]{timeStepsPerFile, 0}; }
java
public int[] getTimeStepsPerFile(String filename) { if (chsubs != null) { for (Chsub ch : chsubs) { if (filename.contains(ch.subString)) { return new int[]{ch.numTimes, ch.startTimeIndex}; } } } return new int[]{timeStepsPerFile, 0}; }
[ "public", "int", "[", "]", "getTimeStepsPerFile", "(", "String", "filename", ")", "{", "if", "(", "chsubs", "!=", "null", ")", "{", "for", "(", "Chsub", "ch", ":", "chsubs", ")", "{", "if", "(", "filename", ".", "contains", "(", "ch", ".", "subString...
Get the number of timesteps per file and the starting offset @param filename the filename to check @return the starting index and number of times in that file
[ "Get", "the", "number", "of", "timesteps", "per", "file", "and", "the", "starting", "offset" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/grads/GradsDataDescriptorFile.java#L715-L724
test
Returns the number of times and start time index for a file.
Of course, here is the Java code you requested: ```java public int[] getTimeStepsPerFile(String filename) { if (chsubs != null) { for (Chsub ch : chsubs) { if (filename.contains(ch.subString)) { return new int[]{ch.numTimes, ch.startTimeIndex}; } } } return new...
streamsets/datacollector
hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveMetastoreUtil.java
HiveMetastoreUtil.getDatabaseName
public static String getDatabaseName(Record metadataRecord) throws HiveStageCheckedException { if (metadataRecord.has(SEP + DATABASE_FIELD)) { String dbName = metadataRecord.get(SEP + DATABASE_FIELD).getValueAsString(); return dbName.isEmpty()? DEFAULT_DBNAME : dbName; } throw new HiveStageCheck...
java
public static String getDatabaseName(Record metadataRecord) throws HiveStageCheckedException { if (metadataRecord.has(SEP + DATABASE_FIELD)) { String dbName = metadataRecord.get(SEP + DATABASE_FIELD).getValueAsString(); return dbName.isEmpty()? DEFAULT_DBNAME : dbName; } throw new HiveStageCheck...
[ "public", "static", "String", "getDatabaseName", "(", "Record", "metadataRecord", ")", "throws", "HiveStageCheckedException", "{", "if", "(", "metadataRecord", ".", "has", "(", "SEP", "+", "DATABASE_FIELD", ")", ")", "{", "String", "dbName", "=", "metadataRecord",...
Get Database Name from the metadata record. @param metadataRecord the metadata record @return Database Name @throws HiveStageCheckedException if the database name does not exist in the metadata record.
[ "Get", "Database", "Name", "from", "the", "metadata", "record", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveMetastoreUtil.java#L427-L433
test
Get the database name from the metadata record.
Of course, here is the Java code you requested: ```java public static String getDatabaseName(Record metadataRecord) throws HiveStageCheckedException { if (metadataRecord.has(SEP + DATABASE_FIELD)) { String dbName = metadataRecord.get(SEP + DATABASE_FIELD).getValueAsString(); return dbName.isEmpty()? DE...
apache/parquet-mr
parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java
RowRanges.union
static RowRanges union(RowRanges left, RowRanges right) { RowRanges result = new RowRanges(); Iterator<Range> it1 = left.ranges.iterator(); Iterator<Range> it2 = right.ranges.iterator(); if (it2.hasNext()) { Range range2 = it2.next(); while (it1.hasNext()) { Range range1 = it1.next()...
java
static RowRanges union(RowRanges left, RowRanges right) { RowRanges result = new RowRanges(); Iterator<Range> it1 = left.ranges.iterator(); Iterator<Range> it2 = right.ranges.iterator(); if (it2.hasNext()) { Range range2 = it2.next(); while (it1.hasNext()) { Range range1 = it1.next()...
[ "static", "RowRanges", "union", "(", "RowRanges", "left", ",", "RowRanges", "right", ")", "{", "RowRanges", "result", "=", "new", "RowRanges", "(", ")", ";", "Iterator", "<", "Range", ">", "it1", "=", "left", ".", "ranges", ".", "iterator", "(", ")", "...
/* Calculates the union of the two specified RowRanges object. The union of two range is calculated if there are no elements between them. Otherwise, the two disjunct ranges are stored separately. For example: [113, 241] ∪ [221, 340] = [113, 330] [113, 230] ∪ [231, 340] = [113, 340] while [113, 230] ∪ [232, 340] = [113...
[ "/", "*", "Calculates", "the", "union", "of", "the", "two", "specified", "RowRanges", "object", ".", "The", "union", "of", "two", "range", "is", "calculated", "if", "there", "are", "no", "elements", "between", "them", ".", "Otherwise", "the", "two", "disju...
62dcc68acaf64012bf731e103be780956f1f446d
https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/RowRanges.java#L136-L163
test
Union two RowRanges.
Of course, here is the Java code you requested: ```java static RowRanges union(RowRanges left, RowRanges right) { RowRanges result = new RowRanges(); Iterator<Range> it1 = left.ranges.iterator(); Iterator<Range> it2 = right.ranges.iterator(); if (it2.hasNext()) { Range range2 = it2.next(); ...
jryans/jless
src/main/java/com/bazaarvoice/jless/parser/Parser.java
Parser.pushVariableReference
boolean pushVariableReference(String name) { if (!isParserTranslationEnabled()) { return push(new SimpleNode(name)); } // Walk down the stack, looking for a scope node that knows about a given variable for (Node node : getContext().getValueStack()) { if (!(node i...
java
boolean pushVariableReference(String name) { if (!isParserTranslationEnabled()) { return push(new SimpleNode(name)); } // Walk down the stack, looking for a scope node that knows about a given variable for (Node node : getContext().getValueStack()) { if (!(node i...
[ "boolean", "pushVariableReference", "(", "String", "name", ")", "{", "if", "(", "!", "isParserTranslationEnabled", "(", ")", ")", "{", "return", "push", "(", "new", "SimpleNode", "(", "name", ")", ")", ";", "}", "// Walk down the stack, looking for a scope node th...
Looks for a variable definition that matches the reference in the scope nodes on the stack. If found, a reference node that can repeat this lookup later is placed on the stack, not the current value itself. This is done because the value may change if the variable reference is inside a mixin.
[ "Looks", "for", "a", "variable", "definition", "that", "matches", "the", "reference", "in", "the", "scope", "nodes", "on", "the", "stack", ".", "If", "found", "a", "reference", "node", "that", "can", "repeat", "this", "lookup", "later", "is", "placed", "on...
0e448fac752b4fc7bfef6b220ed1c64a490c29c0
https://github.com/jryans/jless/blob/0e448fac752b4fc7bfef6b220ed1c64a490c29c0/src/main/java/com/bazaarvoice/jless/parser/Parser.java#L955-L977
test
Push a variable reference to the stack.
Of course, here is the Java code you requested: ```java boolean pushVariableReference(String name) { if (!isParserTranslationEnabled()) { return push(new SimpleNode(name)); } // Walk down the stack, looking for a scope node that knows about a given variable for (Node node :...
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.compose
@SuppressWarnings("unchecked") @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> compose(ObservableTransformer<? super T, ? extends R> composer) { return wrap(((ObservableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this)...
java
@SuppressWarnings("unchecked") @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> compose(ObservableTransformer<? super T, ? extends R> composer) { return wrap(((ObservableTransformer<T, R>) ObjectHelper.requireNonNull(composer, "composer is null")).apply(this)...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "R", ">", "Observable", "<", "R", ">", "compose", "(", "ObservableTransformer", "<", "?", "...
Transform an ObservableSource by applying a particular Transformer function to it. <p> This method operates on the ObservableSource itself whereas {@link #lift} operates on the ObservableSource's Observers. <p> If the operator you are creating is designed to act on the individual items emitted by a source ObservableSou...
[ "Transform", "an", "ObservableSource", "by", "applying", "a", "particular", "Transformer", "function", "to", "it", ".", "<p", ">", "This", "method", "operates", "on", "the", "ObservableSource", "itself", "whereas", "{", "@link", "#lift", "}", "operates", "on", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L6413-L6418
test
Composes an observable with another one.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> compose(ObservableTransformer<? super T, ? extends R> composer) { return wrap(((ObservableTransformer<T, R>) ObjectHelper....
rupertlssmith/lojix
base/common/src/main/com/thesett/common/util/Comparisons.java
Comparisons.compareIterators
public static <T, U> String compareIterators(Iterator<U> iterator, Iterator<T> expectedIterator, Function<U, T> mapping) { String errorMessage = ""; while (iterator.hasNext()) { U next = iterator.next(); T nextMapped = mapping.apply(next); T nextE...
java
public static <T, U> String compareIterators(Iterator<U> iterator, Iterator<T> expectedIterator, Function<U, T> mapping) { String errorMessage = ""; while (iterator.hasNext()) { U next = iterator.next(); T nextMapped = mapping.apply(next); T nextE...
[ "public", "static", "<", "T", ",", "U", ">", "String", "compareIterators", "(", "Iterator", "<", "U", ">", "iterator", ",", "Iterator", "<", "T", ">", "expectedIterator", ",", "Function", "<", "U", ",", "T", ">", "mapping", ")", "{", "String", "errorMe...
Walks down two iterators, comparing them element by element, using the equals method. @param iterator The first iterator to compare. @param expectedIterator The second iterator to compare. @param mapping A mapping between the types of the iterators. @param <U> The type of the left ite...
[ "Walks", "down", "two", "iterators", "comparing", "them", "element", "by", "element", "using", "the", "equals", "method", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/Comparisons.java#L45-L63
test
Compare iterators.
Of course, here is the Java code you requested: ```java public static <T, U> String compareIterators(Iterator<U> iterator, Iterator<T> expectedIterator, Function<U, T> mapping) { String errorMessage = ""; while (iterator.hasNext()) { U next = iterator.next(); ...
spring-projects/spring-security
config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java
OAuth2LoginConfigurer.clientRegistrationRepository
public OAuth2LoginConfigurer<B> clientRegistrationRepository(ClientRegistrationRepository clientRegistrationRepository) { Assert.notNull(clientRegistrationRepository, "clientRegistrationRepository cannot be null"); this.getBuilder().setSharedObject(ClientRegistrationRepository.class, clientRegistrationRepository); ...
java
public OAuth2LoginConfigurer<B> clientRegistrationRepository(ClientRegistrationRepository clientRegistrationRepository) { Assert.notNull(clientRegistrationRepository, "clientRegistrationRepository cannot be null"); this.getBuilder().setSharedObject(ClientRegistrationRepository.class, clientRegistrationRepository); ...
[ "public", "OAuth2LoginConfigurer", "<", "B", ">", "clientRegistrationRepository", "(", "ClientRegistrationRepository", "clientRegistrationRepository", ")", "{", "Assert", ".", "notNull", "(", "clientRegistrationRepository", ",", "\"clientRegistrationRepository cannot be null\"", ...
Sets the repository of client registrations. @param clientRegistrationRepository the repository of client registrations @return the {@link OAuth2LoginConfigurer} for further configuration
[ "Sets", "the", "repository", "of", "client", "registrations", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OAuth2LoginConfigurer.java#L150-L154
test
Sets the client registration repository.
Of course, here is the Java code you requested: ```java public OAuth2LoginConfigurer<B> clientRegistrationRepository(ClientRegistrationRepository clientRegistrationRepository) { Assert.notNull(clientRegistrationRepository, "clientRegistrationRepository cannot be null"); this.getBuilder().setSharedObject(ClientRegi...
Unidata/thredds
visad/src/main/java/ucar/nc2/iosp/gempak/AbstractGempakStationFileReader.java
AbstractGempakStationFileReader.makeParams
private List<GempakParameter> makeParams(DMPart part) { List<GempakParameter> gemparms = new ArrayList<>(part.kparms); for (DMParam param : part.params) { String name = param.kprmnm; GempakParameter parm = GempakParameters.getParameter(name); if (parm == null) { //System.out.println("c...
java
private List<GempakParameter> makeParams(DMPart part) { List<GempakParameter> gemparms = new ArrayList<>(part.kparms); for (DMParam param : part.params) { String name = param.kprmnm; GempakParameter parm = GempakParameters.getParameter(name); if (parm == null) { //System.out.println("c...
[ "private", "List", "<", "GempakParameter", ">", "makeParams", "(", "DMPart", "part", ")", "{", "List", "<", "GempakParameter", ">", "gemparms", "=", "new", "ArrayList", "<>", "(", "part", ".", "kparms", ")", ";", "for", "(", "DMParam", "param", ":", "par...
Make GempakParameters from the list of @param part the part to use @return parameters from the info in that part.
[ "Make", "GempakParameters", "from", "the", "list", "of" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/visad/src/main/java/ucar/nc2/iosp/gempak/AbstractGempakStationFileReader.java#L228-L241
test
Make params list.
Of course, here is the Java code you requested: ```java private List<GempakParameter> makeParams(DMPart part) { List<GempakParameter> gemparms = new ArrayList<>(part.kparms); for (DMParam param : part.params) { String name = param.kprmnm; GempakParameter parm = GempakParameters.getParameter(name); ...
Unidata/thredds
clcommon/src/main/java/ucar/nc2/dt/image/image/ImageDatasetFactory.java
ImageDatasetFactory.getNextImage
public BufferedImage getNextImage(boolean forward) { if (grid != null) { if (forward) { this.time++; if (this.time >= this.ntimes) this.time = 0; } else { this.time--; if (this.time < 0) this.time = this.ntimes-1; } Array data; try { data = grid...
java
public BufferedImage getNextImage(boolean forward) { if (grid != null) { if (forward) { this.time++; if (this.time >= this.ntimes) this.time = 0; } else { this.time--; if (this.time < 0) this.time = this.ntimes-1; } Array data; try { data = grid...
[ "public", "BufferedImage", "getNextImage", "(", "boolean", "forward", ")", "{", "if", "(", "grid", "!=", "null", ")", "{", "if", "(", "forward", ")", "{", "this", ".", "time", "++", ";", "if", "(", "this", ".", "time", ">=", "this", ".", "ntimes", ...
This assumes you have opened a file. looks in the parent directory. @param forward if true got to next, else previous @return next file in the directory, as a BufferedImage.
[ "This", "assumes", "you", "have", "opened", "a", "file", ".", "looks", "in", "the", "parent", "directory", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/clcommon/src/main/java/ucar/nc2/dt/image/image/ImageDatasetFactory.java#L106-L162
test
Get the next image from the image grid.
Of course, here is the Java code you requested: ```java public BufferedImage getNextImage(boolean forward) { if (grid != null) { if (forward) { this.time++; if (this.time >= this.ntimes) this.time = 0; } else { this.time--; if (this.time < 0) this.time = this.ntimes-1; ...
Unidata/thredds
cdm/src/main/java/ucar/nc2/dataset/conv/ADASConvention.java
ADASConvention.calcCenterPoints
private void calcCenterPoints(NetcdfDataset ds, Projection proj) throws IOException { double lat_check = findAttributeDouble(ds, "CTRLAT", Double.NaN); double lon_check = findAttributeDouble(ds, "CTRLON", Double.NaN); LatLonPointImpl lpt0 = new LatLonPointImpl(lat_check, lon_check); ProjectionPoin...
java
private void calcCenterPoints(NetcdfDataset ds, Projection proj) throws IOException { double lat_check = findAttributeDouble(ds, "CTRLAT", Double.NaN); double lon_check = findAttributeDouble(ds, "CTRLON", Double.NaN); LatLonPointImpl lpt0 = new LatLonPointImpl(lat_check, lon_check); ProjectionPoin...
[ "private", "void", "calcCenterPoints", "(", "NetcdfDataset", "ds", ",", "Projection", "proj", ")", "throws", "IOException", "{", "double", "lat_check", "=", "findAttributeDouble", "(", "ds", ",", "\"CTRLAT\"", ",", "Double", ".", "NaN", ")", ";", "double", "lo...
old
[ "old" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/conv/ADASConvention.java#L146-L178
test
Calculates the center points of the NCSR dataset.
Of course, here is the Java code you requested: ```java private void calcCenterPoints(NetcdfDataset ds, Projection proj) throws IOException { double lat_check = findAttributeDouble(ds, "CTRLAT", Double.NaN); double lon_check = findAttributeDouble(ds, "CTRLON", Double.NaN); LatLonPointImpl lpt0 = new L...
Unidata/thredds
tds/src/main/java/thredds/server/wfs/WFSController.java
WFSController.httpHandler
@RequestMapping("**") public void httpHandler(HttpServletRequest hsreq, HttpServletResponse hsres) { try { PrintWriter wr = hsres.getWriter(); List<String> paramNames = new LinkedList<String>(); Enumeration<String> paramNamesE = hsreq.getParameterNames(); while(paramNamesE.hasMoreElements()) p...
java
@RequestMapping("**") public void httpHandler(HttpServletRequest hsreq, HttpServletResponse hsres) { try { PrintWriter wr = hsres.getWriter(); List<String> paramNames = new LinkedList<String>(); Enumeration<String> paramNamesE = hsreq.getParameterNames(); while(paramNamesE.hasMoreElements()) p...
[ "@", "RequestMapping", "(", "\"**\"", ")", "public", "void", "httpHandler", "(", "HttpServletRequest", "hsreq", ",", "HttpServletResponse", "hsres", ")", "{", "try", "{", "PrintWriter", "wr", "=", "hsres", ".", "getWriter", "(", ")", ";", "List", "<", "Strin...
A handler for WFS based HTTP requests that sends to other request handlers to handle the request. Servlet Path: /wfs/{request}
[ "A", "handler", "for", "WFS", "based", "HTTP", "requests", "that", "sends", "to", "other", "request", "handlers", "to", "handle", "the", "request", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/tds/src/main/java/thredds/server/wfs/WFSController.java#L266-L369
test
Handle the request.
Of course, here is the Java code you requested: ```java @RequestMapping("**") public void httpHandler(HttpServletRequest hsreq, HttpServletResponse hsres) { try { PrintWriter wr = hsres.getWriter(); List<String> paramNames = new LinkedList<String>(); Enumeration<String> paramNamesE = hsreq.getPar...
oblac/jodd
jodd-servlet/src/main/java/jodd/servlet/tag/IteratorTag.java
IteratorTag.iterateCollection
protected void iterateCollection(final Collection collection, final int from, final int count, final PageContext pageContext) throws JspException { JspFragment body = getJspBody(); Iterator iter = collection.iterator(); int i = 0; int to = calculateTo(from, count, collection.size()); while (i < to) { Objec...
java
protected void iterateCollection(final Collection collection, final int from, final int count, final PageContext pageContext) throws JspException { JspFragment body = getJspBody(); Iterator iter = collection.iterator(); int i = 0; int to = calculateTo(from, count, collection.size()); while (i < to) { Objec...
[ "protected", "void", "iterateCollection", "(", "final", "Collection", "collection", ",", "final", "int", "from", ",", "final", "int", "count", ",", "final", "PageContext", "pageContext", ")", "throws", "JspException", "{", "JspFragment", "body", "=", "getJspBody",...
Iterates collection.
[ "Iterates", "collection", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-servlet/src/main/java/jodd/servlet/tag/IteratorTag.java#L154-L170
test
Iterate collection.
Of course, here is the Java code you requested: ```java protected void iterateCollection(final Collection collection, final int from, final int count, final PageContext pageContext) throws JspException { JspFragment body = getJspBody(); Iterator iter = collection.iterator(); int i = 0; int to = calculateTo(fro...
algolia/algoliasearch-client-android
algoliasearch/src/main/java/com/algolia/search/saas/AlgoliaException.java
AlgoliaException.isTransient
public boolean isTransient() { Throwable cause = getCause(); if (cause == null) { return isServerError(statusCode); } else if (cause instanceof AlgoliaException) { return ((AlgoliaException)cause).isTransient(); } else if (cause instanceof IOException) { ...
java
public boolean isTransient() { Throwable cause = getCause(); if (cause == null) { return isServerError(statusCode); } else if (cause instanceof AlgoliaException) { return ((AlgoliaException)cause).isTransient(); } else if (cause instanceof IOException) { ...
[ "public", "boolean", "isTransient", "(", ")", "{", "Throwable", "cause", "=", "getCause", "(", ")", ";", "if", "(", "cause", "==", "null", ")", "{", "return", "isServerError", "(", "statusCode", ")", ";", "}", "else", "if", "(", "cause", "instanceof", ...
Test whether this error is transient. @return true if transient, false if fatal.
[ "Test", "whether", "this", "error", "is", "transient", "." ]
3293ba6e6116a4f6c1face2cc606bc047d6d4a3c
https://github.com/algolia/algoliasearch-client-android/blob/3293ba6e6116a4f6c1face2cc606bc047d6d4a3c/algoliasearch/src/main/java/com/algolia/search/saas/AlgoliaException.java#L70-L81
test
Returns true if the response is transient.
Of course, here is the Java code you requested: ```java public boolean isTransient() { Throwable cause = getCause(); if (cause == null) { return isServerError(statusCode); } else if (cause instanceof AlgoliaException) { return ((AlgoliaException)cause).isTransient(); ...
orientechnologies/orientdb
graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java
OrientBaseGraph.removeInverseEdge
private static void removeInverseEdge(final OrientBaseGraph graph, final ODocument iVertex, final String iFieldName, final OIdentifiable iVertexToRemove, final OIdentifiable currentRecord, final boolean useVertexFieldsForEdgeLabels, final boolean autoScaleEdgeType, boolean forceReload) { final ODocumen...
java
private static void removeInverseEdge(final OrientBaseGraph graph, final ODocument iVertex, final String iFieldName, final OIdentifiable iVertexToRemove, final OIdentifiable currentRecord, final boolean useVertexFieldsForEdgeLabels, final boolean autoScaleEdgeType, boolean forceReload) { final ODocumen...
[ "private", "static", "void", "removeInverseEdge", "(", "final", "OrientBaseGraph", "graph", ",", "final", "ODocument", "iVertex", ",", "final", "String", "iFieldName", ",", "final", "OIdentifiable", "iVertexToRemove", ",", "final", "OIdentifiable", "currentRecord", ",...
(Internal only)
[ "(", "Internal", "only", ")" ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java#L2210-L2264
test
Remove the inverse edge of the current record.
Of course, here is the Java code you requested: ```java private static void removeInverseEdge(final OrientBaseGraph graph, final ODocument iVertex, final String iFieldName, final OIdentifiable iVertexToRemove, final OIdentifiable currentRecord, final boolean useVertexFieldsForEdgeLabels, final boolean auto...
Koekiebox-PTY-LTD/Fluid
fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/flow/RouteFieldClient.java
RouteFieldClient.updateFieldParagraphTextHTML
public Field updateFieldParagraphTextHTML(Field routeFieldParam) { if(routeFieldParam != null && this.serviceTicket != null) { routeFieldParam.setServiceTicket(this.serviceTicket); } if(routeFieldParam != null) { routeFieldParam.setTypeAsEnum(Field.Type.ParagraphText); routeFieldParam.setTypeMetaData(Fi...
java
public Field updateFieldParagraphTextHTML(Field routeFieldParam) { if(routeFieldParam != null && this.serviceTicket != null) { routeFieldParam.setServiceTicket(this.serviceTicket); } if(routeFieldParam != null) { routeFieldParam.setTypeAsEnum(Field.Type.ParagraphText); routeFieldParam.setTypeMetaData(Fi...
[ "public", "Field", "updateFieldParagraphTextHTML", "(", "Field", "routeFieldParam", ")", "{", "if", "(", "routeFieldParam", "!=", "null", "&&", "this", ".", "serviceTicket", "!=", "null", ")", "{", "routeFieldParam", ".", "setServiceTicket", "(", "this", ".", "s...
Update an existing Paragraph HTML field. @param routeFieldParam Field to Update. @return Updated Field.
[ "Update", "an", "existing", "Paragraph", "HTML", "field", "." ]
81153d865f71b84ca933532c7115717bc3979270
https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/flow/RouteFieldClient.java#L326-L338
test
Update the ParagraphText. HTML field.
Of course, here is the Java code you requested: ```java public Field updateFieldParagraphTextHTML(Field routeFieldParam) { if(routeFieldParam != null && this.serviceTicket != null) { routeFieldParam.setServiceTicket(this.serviceTicket); } if(routeFieldParam != null) { routeFieldParam.setTypeAsEnum(Field.T...
oblac/jodd
jodd-core/src/main/java/jodd/io/upload/MultipartStreamParser.java
MultipartStreamParser.parseRequestStream
public void parseRequestStream(final InputStream inputStream, final String encoding) throws IOException { setParsed(); MultipartRequestInputStream input = new MultipartRequestInputStream(inputStream); input.readBoundary(); while (true) { FileUploadHeader header = input.readDataHeader(encoding); if (heade...
java
public void parseRequestStream(final InputStream inputStream, final String encoding) throws IOException { setParsed(); MultipartRequestInputStream input = new MultipartRequestInputStream(inputStream); input.readBoundary(); while (true) { FileUploadHeader header = input.readDataHeader(encoding); if (heade...
[ "public", "void", "parseRequestStream", "(", "final", "InputStream", "inputStream", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "setParsed", "(", ")", ";", "MultipartRequestInputStream", "input", "=", "new", "MultipartRequestInputStream", "(...
Extracts uploaded files and parameters from the request data.
[ "Extracts", "uploaded", "files", "and", "parameters", "from", "the", "request", "data", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/io/upload/MultipartStreamParser.java#L120-L166
test
Parses the input stream and stores the result in this object.
Of course, here is the Java code you requested: ```java public void parseRequestStream(final InputStream inputStream, final String encoding) throws IOException { setParsed(); MultipartRequestInputStream input = new MultipartRequestInputStream(inputStream); input.readBoundary(); while (true) { FileUploadHea...
Unidata/thredds
opendap/src/main/java/ucar/nc2/dods/DODSNetcdfFile.java
DODSNetcdfFile.setDebugFlags
static public void setDebugFlags(ucar.nc2.util.DebugFlags debugFlag) { debugCE = debugFlag.isSet("DODS/constraintExpression"); debugServerCall = debugFlag.isSet("DODS/serverCall"); debugOpenResult = debugFlag.isSet("DODS/debugOpenResult"); debugDataResult = debugFlag.isSet("DODS/debugDataResult"); ...
java
static public void setDebugFlags(ucar.nc2.util.DebugFlags debugFlag) { debugCE = debugFlag.isSet("DODS/constraintExpression"); debugServerCall = debugFlag.isSet("DODS/serverCall"); debugOpenResult = debugFlag.isSet("DODS/debugOpenResult"); debugDataResult = debugFlag.isSet("DODS/debugDataResult"); ...
[ "static", "public", "void", "setDebugFlags", "(", "ucar", ".", "nc2", ".", "util", ".", "DebugFlags", "debugFlag", ")", "{", "debugCE", "=", "debugFlag", ".", "isSet", "(", "\"DODS/constraintExpression\"", ")", ";", "debugServerCall", "=", "debugFlag", ".", "i...
Debugging flags. This is a way to decouple setting flags from particular implementations. @param debugFlag set of debug flags.
[ "Debugging", "flags", ".", "This", "is", "a", "way", "to", "decouple", "setting", "flags", "from", "particular", "implementations", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/opendap/src/main/java/ucar/nc2/dods/DODSNetcdfFile.java#L100-L113
test
Sets the debug flags
Of course, here is the Java code you requested: ```java static public void setDebugFlags(ucar.nc2.util.DebugFlags debugFlag) { debugCE = debugFlag.isSet("DODS/constraintExpression"); debugServerCall = debugFlag.isSet("DODS/serverCall"); debugOpenResult = debugFlag.isSet("DODS/debugOpenResult"); debug...
ngageoint/geopackage-android
geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/GeoPackageMetadataDb.java
GeoPackageMetadataDb.onUpgrade
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + GeometryMetadata.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + TableMetadata.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + GeoPackageMetadata.TABLE_NAME); ...
java
@Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + GeometryMetadata.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + TableMetadata.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + GeoPackageMetadata.TABLE_NAME); ...
[ "@", "Override", "public", "void", "onUpgrade", "(", "SQLiteDatabase", "db", ",", "int", "oldVersion", ",", "int", "newVersion", ")", "{", "db", ".", "execSQL", "(", "\"DROP TABLE IF EXISTS \"", "+", "GeometryMetadata", ".", "TABLE_NAME", ")", ";", "db", ".", ...
{@inheritDoc}
[ "{" ]
d19e9fcc636462c0f0ae1b7eca4acafae48de21b
https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/GeoPackageMetadataDb.java#L54-L60
test
Upgrade the CRS image
Of course, here is the Java code you requested: ```java @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL("DROP TABLE IF EXISTS " + GeometryMetadata.TABLE_NAME); db.execSQL("DROP TABLE IF EXISTS " + TableMetadata.TABLE_NAME); db.execSQL("DROP TA...
beworker/tinymachine
tinymachine/src/main/java/de/halfbit/tinymachine/TinyMachine.java
TinyMachine.setTraceTag
public TinyMachine setTraceTag(String tag) { mTraceTag = tag; if (mTraceTag != null) { log("current state", null); } return this; }
java
public TinyMachine setTraceTag(String tag) { mTraceTag = tag; if (mTraceTag != null) { log("current state", null); } return this; }
[ "public", "TinyMachine", "setTraceTag", "(", "String", "tag", ")", "{", "mTraceTag", "=", "tag", ";", "if", "(", "mTraceTag", "!=", "null", ")", "{", "log", "(", "\"current state\"", ",", "null", ")", ";", "}", "return", "this", ";", "}" ]
Enables traces and sets tag to be used for <code>Log.d()</code> output. <code>TinyMachine</code> will trace all processed events and state transitions including events for which handlers in current state are missed. @param tag the name of tag to be used in <code>Log.d()</code> @return this instance
[ "Enables", "traces", "and", "sets", "tag", "to", "be", "used", "for", "<code", ">", "Log", ".", "d", "()", "<", "/", "code", ">", "output", ".", "<code", ">", "TinyMachine<", "/", "code", ">", "will", "trace", "all", "processed", "events", "and", "st...
29d16ddc5caf171e1aa972b9a8e95586cc409c66
https://github.com/beworker/tinymachine/blob/29d16ddc5caf171e1aa972b9a8e95586cc409c66/tinymachine/src/main/java/de/halfbit/tinymachine/TinyMachine.java#L163-L169
test
Sets the tag of the trace.
Of course, here is the Java code you requested: ```java public TinyMachine setTraceTag(String tag) { mTraceTag = tag; if (mTraceTag != null) { log("current state", null); } return this; } ``` Hope this helps!
1gravity/Android-RTEditor
RTEditor/src/main/java/com/onegravity/rteditor/utils/validator/RegexValidator.java
RegexValidator.validate
public String validate(String value) { if (value == null) { return null; } for (int i = 0; i < patterns.length; i++) { Matcher matcher = patterns[i].matcher(value); if (matcher.matches()) { int count = matcher.groupCount(); if (...
java
public String validate(String value) { if (value == null) { return null; } for (int i = 0; i < patterns.length; i++) { Matcher matcher = patterns[i].matcher(value); if (matcher.matches()) { int count = matcher.groupCount(); if (...
[ "public", "String", "validate", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "patterns", ".", "length", ";", "i", "++", ")", "{", "Mat...
Validate a value against the set of regular expressions returning a String value of the aggregated groups. @param value The value to validate. @return Aggregated String value comprised of the <i>groups</i> matched if valid or <code>null</code> if invalid
[ "Validate", "a", "value", "against", "the", "set", "of", "regular", "expressions", "returning", "a", "String", "value", "of", "the", "aggregated", "groups", "." ]
9d8fb4bb865b3b3d011e7633afedcdfb8d21754f
https://github.com/1gravity/Android-RTEditor/blob/9d8fb4bb865b3b3d011e7633afedcdfb8d21754f/RTEditor/src/main/java/com/onegravity/rteditor/utils/validator/RegexValidator.java#L186-L208
test
Validate a String.
Of course, here is the Java code you requested: ```java public String validate(String value) { if (value == null) { return null; } for (int i = 0; i < patterns.length; i++) { Matcher matcher = patterns[i].matcher(value); if (matcher.matches()) { ...
oblac/jodd
jodd-madvoc/src/main/java/jodd/madvoc/action/MadvocConfigurations.java
MadvocConfigurations.collectActionResults
protected void collectActionResults() { final Collection<ActionResult> resultsValues = resultsManager.getAllActionResults(); results = new ArrayList<>(); results.addAll(resultsValues); results.sort(Comparator.comparing(a -> a.getClass().getSimpleName())); }
java
protected void collectActionResults() { final Collection<ActionResult> resultsValues = resultsManager.getAllActionResults(); results = new ArrayList<>(); results.addAll(resultsValues); results.sort(Comparator.comparing(a -> a.getClass().getSimpleName())); }
[ "protected", "void", "collectActionResults", "(", ")", "{", "final", "Collection", "<", "ActionResult", ">", "resultsValues", "=", "resultsManager", ".", "getAllActionResults", "(", ")", ";", "results", "=", "new", "ArrayList", "<>", "(", ")", ";", "results", ...
Collects all action results.
[ "Collects", "all", "action", "results", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-madvoc/src/main/java/jodd/madvoc/action/MadvocConfigurations.java#L98-L103
test
Collect all action results.
Of course, here is the Java code you requested: ```java protected void collectActionResults() { final Collection<ActionResult> resultsValues = resultsManager.getAllActionResults(); results = new ArrayList<>(); results.addAll(resultsValues); results.sort(Comparator.comparing(a -> a.getClass().getSimpleName()));...
jkuhnert/ognl
src/main/java/ognl/OgnlParser.java
OgnlParser.inclusiveOrExpression
final public void inclusiveOrExpression() throws ParseException { exclusiveOrExpression(); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 9: case 10: ; break; default: jj_la1[7] = jj_gen; break label_4; } switch ((jj_n...
java
final public void inclusiveOrExpression() throws ParseException { exclusiveOrExpression(); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 9: case 10: ; break; default: jj_la1[7] = jj_gen; break label_4; } switch ((jj_n...
[ "final", "public", "void", "inclusiveOrExpression", "(", ")", "throws", "ParseException", "{", "exclusiveOrExpression", "(", ")", ";", "label_4", ":", "while", "(", "true", ")", "{", "switch", "(", "(", "jj_ntk", "==", "-", "1", ")", "?", "jj_ntk", "(", ...
bitwise or non-short-circuiting or (|) (level 9)
[ "bitwise", "or", "non", "-", "short", "-", "circuiting", "or", "(", "|", ")", "(", "level", "9", ")" ]
53d51a30c8c299b750dede779d05cb84beee73c3
https://github.com/jkuhnert/ognl/blob/53d51a30c8c299b750dede779d05cb84beee73c3/src/main/java/ognl/OgnlParser.java#L245-L295
test
inclusive or expression
Of course, here is the Java code you requested: ```java final public void inclusiveOrExpression() throws ParseException { exclusiveOrExpression(); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 9: case 10: ; break; default: jj_la1[7] = j...
RestComm/jain-slee
container/transaction/src/main/java/org/mobicents/slee/runtime/transaction/SleeTransactionManagerImpl.java
SleeTransactionManagerImpl.requireTransactionEnd
public void requireTransactionEnd(boolean terminateTx, boolean doRollback) throws IllegalStateException, SecurityException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException { if (terminateTx) { if (doRollback) { rollback(); } else { commit(); } } else { ...
java
public void requireTransactionEnd(boolean terminateTx, boolean doRollback) throws IllegalStateException, SecurityException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException { if (terminateTx) { if (doRollback) { rollback(); } else { commit(); } } else { ...
[ "public", "void", "requireTransactionEnd", "(", "boolean", "terminateTx", ",", "boolean", "doRollback", ")", "throws", "IllegalStateException", ",", "SecurityException", ",", "SystemException", ",", "RollbackException", ",", "HeuristicMixedException", ",", "HeuristicRollbac...
/* (non-Javadoc) @see org.mobicents.slee.runtime.transaction.SleeTransactionManager#requireTransactionEnd(boolean, boolean)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/transaction/src/main/java/org/mobicents/slee/runtime/transaction/SleeTransactionManagerImpl.java#L167-L181
test
This method is called by the transaction end hook to ensure that the transaction is terminated.
Of course, here is the Java code you requested: ```java public void requireTransactionEnd(boolean terminateTx, boolean doRollback) throws IllegalStateException, SecurityException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException { if (terminateTx) { if (doRollback) { rol...
deeplearning4j/nd4j
nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/util/DataTypeUtil.java
DataTypeUtil.getDtypeFromContext
public static DataBuffer.Type getDtypeFromContext() { try { lock.readLock().lock(); if (dtype == null) { lock.readLock().unlock(); lock.writeLock().lock(); if (dtype == null) dtype = getDtypeFromContext(Nd4jContext.get...
java
public static DataBuffer.Type getDtypeFromContext() { try { lock.readLock().lock(); if (dtype == null) { lock.readLock().unlock(); lock.writeLock().lock(); if (dtype == null) dtype = getDtypeFromContext(Nd4jContext.get...
[ "public", "static", "DataBuffer", ".", "Type", "getDtypeFromContext", "(", ")", "{", "try", "{", "lock", ".", "readLock", "(", ")", ".", "lock", "(", ")", ";", "if", "(", "dtype", "==", "null", ")", "{", "lock", ".", "readLock", "(", ")", ".", "unl...
get the allocation mode from the context @return
[ "get", "the", "allocation", "mode", "from", "the", "context" ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/util/DataTypeUtil.java#L89-L108
test
Get the DataBuffer. Type from the context.
Of course, here is the Java code you requested: ```java public static DataBuffer.Type getDtypeFromContext() { try { lock.readLock().lock(); if (dtype == null) { lock.readLock().unlock(); lock.writeLock().lock(); if (dtype == null) ...
Unidata/thredds
cdm/src/main/java/ucar/nc2/iosp/IospHelper.java
IospHelper.readSection
static public ucar.ma2.Array readSection(ParsedSectionSpec cer) throws IOException, InvalidRangeException { Variable inner = null; List<Range> totalRanges = new ArrayList<>(); ParsedSectionSpec current = cer; while (current != null) { totalRanges.addAll(current.section.getRanges()); in...
java
static public ucar.ma2.Array readSection(ParsedSectionSpec cer) throws IOException, InvalidRangeException { Variable inner = null; List<Range> totalRanges = new ArrayList<>(); ParsedSectionSpec current = cer; while (current != null) { totalRanges.addAll(current.section.getRanges()); in...
[ "static", "public", "ucar", ".", "ma2", ".", "Array", "readSection", "(", "ParsedSectionSpec", "cer", ")", "throws", "IOException", ",", "InvalidRangeException", "{", "Variable", "inner", "=", "null", ";", "List", "<", "Range", ">", "totalRanges", "=", "new", ...
section reading for member data
[ "section", "reading", "for", "member", "data" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/iosp/IospHelper.java#L788-L808
test
Reads a single array from a ParsedSectionSpec.
Of course, here is the Java code you requested: ```java static public ucar.ma2.Array readSection(ParsedSectionSpec cer) throws IOException, InvalidRangeException { Variable inner = null; List<Range> totalRanges = new ArrayList<>(); ParsedSectionSpec current = cer; while (current != null) { t...
Unidata/thredds
clcommon/src/main/java/ucar/nc2/iosp/gini/Giniiosp.java
Giniiosp.readCompressedData
private Array readCompressedData(ucar.nc2.Variable v2, long dataPos, List<Range> ranges, int[] levels) throws IOException, InvalidRangeException { // Get to the proper offset and read in the rest of the compressed data raf.seek(dataPos); int data_size = (int) (raf.length()...
java
private Array readCompressedData(ucar.nc2.Variable v2, long dataPos, List<Range> ranges, int[] levels) throws IOException, InvalidRangeException { // Get to the proper offset and read in the rest of the compressed data raf.seek(dataPos); int data_size = (int) (raf.length()...
[ "private", "Array", "readCompressedData", "(", "ucar", ".", "nc2", ".", "Variable", "v2", ",", "long", "dataPos", ",", "List", "<", "Range", ">", "ranges", ",", "int", "[", "]", "levels", ")", "throws", "IOException", ",", "InvalidRangeException", "{", "//...
for the compressed data read all out into a array and then parse into requested
[ "for", "the", "compressed", "data", "read", "all", "out", "into", "a", "array", "and", "then", "parse", "into", "requested" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/clcommon/src/main/java/ucar/nc2/iosp/gini/Giniiosp.java#L124-L147
test
Read compressed data from the file.
Of course, here is the Java code you requested: ```java private Array readCompressedData(ucar.nc2.Variable v2, long dataPos, List<Range> ranges, int[] levels) throws IOException, InvalidRangeException { // Get to the proper offset and read in the rest of the compressed data r...
jbundle/util
jbackup/src/main/java/org/jbundle/jbackup/destination/HttpDestinationPropertyView.java
HttpDestinationPropertyView.controlsToProperties
public void controlsToProperties() { super.controlsToProperties(); String strPathname = m_tfRootPathname.getText(); m_properties.setProperty(BASE_URL_PARAM, strPathname); }
java
public void controlsToProperties() { super.controlsToProperties(); String strPathname = m_tfRootPathname.getText(); m_properties.setProperty(BASE_URL_PARAM, strPathname); }
[ "public", "void", "controlsToProperties", "(", ")", "{", "super", ".", "controlsToProperties", "(", ")", ";", "String", "strPathname", "=", "m_tfRootPathname", ".", "getText", "(", ")", ";", "m_properties", ".", "setProperty", "(", "BASE_URL_PARAM", ",", "strPat...
/* Set the properties to the current control values.
[ "/", "*", "Set", "the", "properties", "to", "the", "current", "control", "values", "." ]
5af0f2292f56f29f70cbc26d0bfa72f89ae31be0
https://github.com/jbundle/util/blob/5af0f2292f56f29f70cbc26d0bfa72f89ae31be0/jbackup/src/main/java/org/jbundle/jbackup/destination/HttpDestinationPropertyView.java#L75-L80
test
Set the base URL parameter to the properties.
Of course, here is the Java code you requested: ```java public void controlsToProperties() { super.controlsToProperties(); String strPathname = m_tfRootPathname.getText(); m_properties.setProperty(BASE_URL_PARAM, strPathname); } ``` Hope this helps!
Unidata/thredds
visad/src/main/java/ucar/nc2/iosp/grid/GridHorizCoordSys.java
GridHorizCoordSys.addCoordSystemVariable
private void addCoordSystemVariable(NetcdfFile ncfile, String name, String dims) { Variable v = new Variable(ncfile, g, null, name); v.setDataType(DataType.CHAR); v.setDimensions(""); // scalar Array dataArray = Array.factory(DataType.CHAR, new int[0], new char[]{'0'}); v.setCachedData(dataArray, fa...
java
private void addCoordSystemVariable(NetcdfFile ncfile, String name, String dims) { Variable v = new Variable(ncfile, g, null, name); v.setDataType(DataType.CHAR); v.setDimensions(""); // scalar Array dataArray = Array.factory(DataType.CHAR, new int[0], new char[]{'0'}); v.setCachedData(dataArray, fa...
[ "private", "void", "addCoordSystemVariable", "(", "NetcdfFile", "ncfile", ",", "String", "name", ",", "String", "dims", ")", "{", "Variable", "v", "=", "new", "Variable", "(", "ncfile", ",", "g", ",", "null", ",", "name", ")", ";", "v", ".", "setDataType...
Add coordinate system variable @param ncfile netCDF file @param name name of the variable @param dims dimensions
[ "Add", "coordinate", "system", "variable" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/visad/src/main/java/ucar/nc2/iosp/grid/GridHorizCoordSys.java#L623-L636
test
Add a coord system variable to the NetcdfFile
Of course, here is the Java code you requested: ```java private void addCoordSystemVariable(NetcdfFile ncfile, String name, String dims) { Variable v = new Variable(ncfile, g, null, name); v.setDataType(DataType.CHAR); v.setDimensions(""); // scalar Array dataArray = Array.factory(DataType.CHAR, new in...
abmargb/jamppa
src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.randomString
public static String randomString(int length) { if (length < 1) { return null; } // Create a char buffer to put random letters and numbers in. char[] randBuffer = new char[length]; for (int i = 0; i < randBuffer.length; i++) { randBuffer[i] = numbersAndLet...
java
public static String randomString(int length) { if (length < 1) { return null; } // Create a char buffer to put random letters and numbers in. char[] randBuffer = new char[length]; for (int i = 0; i < randBuffer.length; i++) { randBuffer[i] = numbersAndLet...
[ "public", "static", "String", "randomString", "(", "int", "length", ")", "{", "if", "(", "length", "<", "1", ")", "{", "return", "null", ";", "}", "// Create a char buffer to put random letters and numbers in.", "char", "[", "]", "randBuffer", "=", "new", "char"...
Returns a random String of numbers and letters (lower and upper case) of the specified length. The method uses the Random class that is built-in to Java which is suitable for low to medium grade security uses. This means that the output is only pseudo random, i.e., each number is mathematically generated so is not trul...
[ "Returns", "a", "random", "String", "of", "numbers", "and", "letters", "(", "lower", "and", "upper", "case", ")", "of", "the", "specified", "length", ".", "The", "method", "uses", "the", "Random", "class", "that", "is", "built", "-", "in", "to", "Java", ...
76f253239923df40904c462e3b88e7278b36b282
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L989-L999
test
Generate a random string of the specified length.
Of course, here is the Java code you requested: ```java public static String randomString(int length) { if (length < 1) { return null; } // Create a char buffer to put random letters and numbers in. char[] randBuffer = new char[length]; for (int i = 0; i < randBuffer...
jboss/jboss-common-core
src/main/java/org/jboss/util/xml/DOMUtils.java
DOMUtils.getChildElements
public static Iterator getChildElements(Node node, String nodeName) { return getChildElementsIntern(node, new QName(nodeName)); }
java
public static Iterator getChildElements(Node node, String nodeName) { return getChildElementsIntern(node, new QName(nodeName)); }
[ "public", "static", "Iterator", "getChildElements", "(", "Node", "node", ",", "String", "nodeName", ")", "{", "return", "getChildElementsIntern", "(", "node", ",", "new", "QName", "(", "nodeName", ")", ")", ";", "}" ]
Gets the child elements for a given local name without namespace @param node @param nodeName @return the iterator
[ "Gets", "the", "child", "elements", "for", "a", "given", "local", "name", "without", "namespace" ]
c191bb18db83fa106c6913cf34ed47989b65dc97
https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/xml/DOMUtils.java#L508-L511
test
Get the child elements of a node.
Of course, here is the Java code you requested: ```java public static Iterator getChildElements(Node node, String nodeName) { return getChildElementsIntern(node, new QName(nodeName)); } ``` Hope this helps!
orientechnologies/orientdb
server/src/main/java/com/orientechnologies/orient/server/distributed/ODistributedResponseManagerImpl.java
ODistributedResponseManagerImpl.getMissingNodes
public List<String> getMissingNodes() { synchronousResponsesLock.lock(); try { final List<String> missingNodes = new ArrayList<String>(); for (Map.Entry<String, Object> entry : responses.entrySet()) if (entry.getValue() == NO_RESPONSE) missingNodes.add(entry.getKey()); retur...
java
public List<String> getMissingNodes() { synchronousResponsesLock.lock(); try { final List<String> missingNodes = new ArrayList<String>(); for (Map.Entry<String, Object> entry : responses.entrySet()) if (entry.getValue() == NO_RESPONSE) missingNodes.add(entry.getKey()); retur...
[ "public", "List", "<", "String", ">", "getMissingNodes", "(", ")", "{", "synchronousResponsesLock", ".", "lock", "(", ")", ";", "try", "{", "final", "List", "<", "String", ">", "missingNodes", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", ...
Returns the list of node names that didn't provide a response.
[ "Returns", "the", "list", "of", "node", "names", "that", "didn", "t", "provide", "a", "response", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/server/src/main/java/com/orientechnologies/orient/server/distributed/ODistributedResponseManagerImpl.java#L486-L499
test
Get the list of missing nodes.
Of course, here is the Java code you requested: ```java public List<String> getMissingNodes() { synchronousResponsesLock.lock(); try { final List<String> missingNodes = new ArrayList<String>(); for (Map.Entry<String, Object> entry : responses.entrySet()) if (entry.getValue() == NO_RESPONSE...
Unidata/thredds
visad/src/main/java/ucar/nc2/iosp/gempak/AbstractGempakStationFileReader.java
AbstractGempakStationFileReader.makeDateList
protected List<String> makeDateList(boolean unique) { Key date = dateTimeKeys.get(0); Key time = dateTimeKeys.get(1); List<int[]> toCheck; if (date.type.equals(ROW)) { toCheck = headers.rowHeaders; } else { toCheck = headers.colHeaders; } List<String> fileDates = new ArrayList<>(...
java
protected List<String> makeDateList(boolean unique) { Key date = dateTimeKeys.get(0); Key time = dateTimeKeys.get(1); List<int[]> toCheck; if (date.type.equals(ROW)) { toCheck = headers.rowHeaders; } else { toCheck = headers.colHeaders; } List<String> fileDates = new ArrayList<>(...
[ "protected", "List", "<", "String", ">", "makeDateList", "(", "boolean", "unique", ")", "{", "Key", "date", "=", "dateTimeKeys", ".", "get", "(", "0", ")", ";", "Key", "time", "=", "dateTimeKeys", ".", "get", "(", "1", ")", ";", "List", "<", "int", ...
Get the list of dates @param unique true for unique list @return the list of dates
[ "Get", "the", "list", "of", "dates" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/visad/src/main/java/ucar/nc2/iosp/gempak/AbstractGempakStationFileReader.java#L191-L220
test
Make a list of date time strings from the file.
Of course, here is the Java code you requested: ```java protected List<String> makeDateList(boolean unique) { Key date = dateTimeKeys.get(0); Key time = dateTimeKeys.get(1); List<int[]> toCheck; if (date.type.equals(ROW)) { toCheck = headers.rowHeaders; } else { toCheck = headers.colHea...
abmargb/jamppa
src/main/java/org/jivesoftware/smack/UserRoster.java
UserRoster.getPresence
public Presence getPresence(String user) { String key = getPresenceMapKey(StringUtils.parseBareAddress(user)); Map<String, Presence> userPresences = presenceMap.get(key); if (userPresences == null) { Presence presence = new Presence(Presence.Type.unavailable); presence.se...
java
public Presence getPresence(String user) { String key = getPresenceMapKey(StringUtils.parseBareAddress(user)); Map<String, Presence> userPresences = presenceMap.get(key); if (userPresences == null) { Presence presence = new Presence(Presence.Type.unavailable); presence.se...
[ "public", "Presence", "getPresence", "(", "String", "user", ")", "{", "String", "key", "=", "getPresenceMapKey", "(", "StringUtils", ".", "parseBareAddress", "(", "user", ")", ")", ";", "Map", "<", "String", ",", "Presence", ">", "userPresences", "=", "prese...
Returns the presence info for a particular user. If the user is offline, or if no presence data is available (such as when you are not subscribed to the user's presence updates), unavailable presence will be returned. <p> <p/> If the user has several presences (one for each resource), then the presence with highest pri...
[ "Returns", "the", "presence", "info", "for", "a", "particular", "user", ".", "If", "the", "user", "is", "offline", "or", "if", "no", "presence", "data", "is", "available", "(", "such", "as", "when", "you", "are", "not", "subscribed", "to", "the", "user",...
76f253239923df40904c462e3b88e7278b36b282
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/UserRoster.java#L525-L573
test
Gets the presence of a user.
Of course, here is the Java code you requested: ```java public Presence getPresence(String user) { String key = getPresenceMapKey(StringUtils.parseBareAddress(user)); Map<String, Presence> userPresences = presenceMap.get(key); if (userPresences == null) { Presence presence = new Pre...
redraiment/jactiverecord
src/main/java/me/zzp/util/Seq.java
Seq.map
public static List<String> map(Collection<?> from, String format) { List<String> to = new ArrayList<>(from.size()); for (Object e : from) { to.add(String.format(format, e)); } return to; }
java
public static List<String> map(Collection<?> from, String format) { List<String> to = new ArrayList<>(from.size()); for (Object e : from) { to.add(String.format(format, e)); } return to; }
[ "public", "static", "List", "<", "String", ">", "map", "(", "Collection", "<", "?", ">", "from", ",", "String", "format", ")", "{", "List", "<", "String", ">", "to", "=", "new", "ArrayList", "<>", "(", "from", ".", "size", "(", ")", ")", ";", "fo...
根据规定格式,对容器中的每个元素进行格式化,并返回格式化后的结果。 @param from 包含任意多个元素的容器。 @param format 格式化模板,与printf兼容。 @return 格式化后的新列表。
[ "根据规定格式,对容器中的每个元素进行格式化,并返回格式化后的结果。" ]
d051709c93204658e7f2cc96c9898201c7337269
https://github.com/redraiment/jactiverecord/blob/d051709c93204658e7f2cc96c9898201c7337269/src/main/java/me/zzp/util/Seq.java#L256-L262
test
Map a collection of strings to a list of strings.
Of course, here is the Java code you requested: ```java public static List<String> map(Collection<?> from, String format) { List<String> to = new ArrayList<>(from.size()); for (Object e : from) { to.add(String.format(format, e)); } return to; } ``` Hope this helps!
GojaFramework/goja
goja-web/src/main/java/goja/mvc/kits/Requests.java
Requests.ajax
public static boolean ajax(HttpServletRequest request) { String x_requested = request.getHeader("x-requested-with"); return !Strings.isNullOrEmpty(x_requested) && "XMLHttpRequest".equals(x_requested); }
java
public static boolean ajax(HttpServletRequest request) { String x_requested = request.getHeader("x-requested-with"); return !Strings.isNullOrEmpty(x_requested) && "XMLHttpRequest".equals(x_requested); }
[ "public", "static", "boolean", "ajax", "(", "HttpServletRequest", "request", ")", "{", "String", "x_requested", "=", "request", ".", "getHeader", "(", "\"x-requested-with\"", ")", ";", "return", "!", "Strings", ".", "isNullOrEmpty", "(", "x_requested", ")", "&&"...
判断当前Request是否位Ajax请求,通过消息头来进行判断. @param request 当前请求对象 @return 如果返回<code>true</code>则,表示当前的Request是由Ajax请求,否则反之
[ "判断当前Request是否位Ajax请求,通过消息头来进行判断", "." ]
77179b495f668fc1fa20accc912991df6bb2d917
https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-web/src/main/java/goja/mvc/kits/Requests.java#L514-L517
test
Checks if the request is an AJAX request.
Of course, here is the Java code you requested: ```java public static boolean ajax(HttpServletRequest request) { String x_requested = request.getHeader("x-requested-with"); return !Strings.isNullOrEmpty(x_requested) && "XMLHttpRequest".equals(x_requested); } ``` Hope this helps!
Koekiebox-PTY-LTD/Fluid
fluid-api/src/main/java/com/fluidbpm/program/api/vo/item/FluidItem.java
FluidItem.convertToFlatJSONObject
@XmlTransient public JSONObject convertToFlatJSONObject() { JSONObject returnVal = new JSONObject(); //Id... returnVal.put( FlatFormJSONMapping.FLUID_ITEM_ID, this.getId() == null ? JSONObject.NULL : this.getId()); //Flow ...
java
@XmlTransient public JSONObject convertToFlatJSONObject() { JSONObject returnVal = new JSONObject(); //Id... returnVal.put( FlatFormJSONMapping.FLUID_ITEM_ID, this.getId() == null ? JSONObject.NULL : this.getId()); //Flow ...
[ "@", "XmlTransient", "public", "JSONObject", "convertToFlatJSONObject", "(", ")", "{", "JSONObject", "returnVal", "=", "new", "JSONObject", "(", ")", ";", "//Id...", "returnVal", ".", "put", "(", "FlatFormJSONMapping", ".", "FLUID_ITEM_ID", ",", "this", ".", "ge...
Serialize {@code this} object into a JSONObject. Any fields provided with a Java {@code null} value will be stored as {@code JSONObject.Null}. {@code Field.Type.Table} fields are not supported and will be skipped. @return Flat {@code JSON} object (No inner fields). @see JSONObject
[ "Serialize", "{", "@code", "this", "}", "object", "into", "a", "JSONObject", "." ]
81153d865f71b84ca933532c7115717bc3979270
https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-api/src/main/java/com/fluidbpm/program/api/vo/item/FluidItem.java#L525-L555
test
Converts the CBE ID item to Flat JSON Object
Of course, here is the Java code you requested: ```java @XmlTransient public JSONObject convertToFlatJSONObject() { JSONObject returnVal = new JSONObject(); //Id... returnVal.put( FlatFormJSONMapping.FLUID_ITEM_ID, this.getId() == null ? ...
tony19/logback-android
logback-android/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java
SocketReceiver.run
public void run() { try { LoggerContext lc = (LoggerContext) getContext(); while (!Thread.currentThread().isInterrupted()) { SocketConnector connector = createConnector(address, port, 0, reconnectionDelay); connectorTask = activateConnector(connector); if (connect...
java
public void run() { try { LoggerContext lc = (LoggerContext) getContext(); while (!Thread.currentThread().isInterrupted()) { SocketConnector connector = createConnector(address, port, 0, reconnectionDelay); connectorTask = activateConnector(connector); if (connect...
[ "public", "void", "run", "(", ")", "{", "try", "{", "LoggerContext", "lc", "=", "(", "LoggerContext", ")", "getContext", "(", ")", ";", "while", "(", "!", "Thread", ".", "currentThread", "(", ")", ".", "isInterrupted", "(", ")", ")", "{", "SocketConnec...
{@inheritDoc}
[ "{" ]
028489c11ccfc1237a53923db06f22a90b41809c
https://github.com/tony19/logback-android/blob/028489c11ccfc1237a53923db06f22a90b41809c/logback-android/src/main/java/ch/qos/logback/classic/net/SocketReceiver.java#L115-L134
test
Run the main loop of the application.
Of course, here is the Java code you requested: ```java public void run() { try { LoggerContext lc = (LoggerContext) getContext(); while (!Thread.currentThread().isInterrupted()) { SocketConnector connector = createConnector(address, port, 0, reconnectionDelay); connecto...
streamsets/datacollector
common/src/main/java/com/streamsets/pipeline/lib/queue/XEvictingQueue.java
XEvictingQueue.add
@Override public boolean add(E e) { checkNotNull(e); // check before removing if (maxSize == 0) { return true; } if (size() == maxSize) { delegate.remove(); } delegate.add(e); return true; }
java
@Override public boolean add(E e) { checkNotNull(e); // check before removing if (maxSize == 0) { return true; } if (size() == maxSize) { delegate.remove(); } delegate.add(e); return true; }
[ "@", "Override", "public", "boolean", "add", "(", "E", "e", ")", "{", "checkNotNull", "(", "e", ")", ";", "// check before removing", "if", "(", "maxSize", "==", "0", ")", "{", "return", "true", ";", "}", "if", "(", "size", "(", ")", "==", "maxSize",...
Adds the given element to this queue. If the queue is currently full, the element at the head of the queue is evicted to make room. @return {@code true} always
[ "Adds", "the", "given", "element", "to", "this", "queue", ".", "If", "the", "queue", "is", "currently", "full", "the", "element", "at", "the", "head", "of", "the", "queue", "is", "evicted", "to", "make", "room", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/common/src/main/java/com/streamsets/pipeline/lib/queue/XEvictingQueue.java#L86-L96
test
Add an element to the list.
Of course, here is the Java code you requested: ```java @Override public boolean add(E e) { checkNotNull(e); // check before removing if (maxSize == 0) { return true; } if (size() == maxSize) { delegate.remove(); } delegate.add(e); return true; } ``` Hope this helps!
spring-projects/spring-security
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java
CustomUserTypesOAuth2UserService.setRequestEntityConverter
public final void setRequestEntityConverter(Converter<OAuth2UserRequest, RequestEntity<?>> requestEntityConverter) { Assert.notNull(requestEntityConverter, "requestEntityConverter cannot be null"); this.requestEntityConverter = requestEntityConverter; }
java
public final void setRequestEntityConverter(Converter<OAuth2UserRequest, RequestEntity<?>> requestEntityConverter) { Assert.notNull(requestEntityConverter, "requestEntityConverter cannot be null"); this.requestEntityConverter = requestEntityConverter; }
[ "public", "final", "void", "setRequestEntityConverter", "(", "Converter", "<", "OAuth2UserRequest", ",", "RequestEntity", "<", "?", ">", ">", "requestEntityConverter", ")", "{", "Assert", ".", "notNull", "(", "requestEntityConverter", ",", "\"requestEntityConverter cann...
Sets the {@link Converter} used for converting the {@link OAuth2UserRequest} to a {@link RequestEntity} representation of the UserInfo Request. @since 5.1 @param requestEntityConverter the {@link Converter} used for converting to a {@link RequestEntity} representation of the UserInfo Request
[ "Sets", "the", "{", "@link", "Converter", "}", "used", "for", "converting", "the", "{", "@link", "OAuth2UserRequest", "}", "to", "a", "{", "@link", "RequestEntity", "}", "representation", "of", "the", "UserInfo", "Request", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/CustomUserTypesOAuth2UserService.java#L104-L107
test
Sets the request entity converter.
Of course, here is the Java code you requested: ```java public final void setRequestEntityConverter(Converter<OAuth2UserRequest, RequestEntity<?>> requestEntityConverter) { Assert.notNull(requestEntityConverter, "requestEntityConverter cannot be null"); this.requestEntityConverter = requestEntityConverter; } ``` ...
subchen/jetbrick-all-1x
jetbrick-commons/src/main/java/jetbrick/lang/WildcharPathUtils.java
WildcharPathUtils.matchPath
public static boolean matchPath(String path, String pattern) { String[] pathElements = StringUtils.splitChars(path, PATH_SEPARATORS); String[] patternElements = StringUtils.splitChars(pattern, PATH_SEPARATORS); return matchTokens(pathElements, patternElements); }
java
public static boolean matchPath(String path, String pattern) { String[] pathElements = StringUtils.splitChars(path, PATH_SEPARATORS); String[] patternElements = StringUtils.splitChars(pattern, PATH_SEPARATORS); return matchTokens(pathElements, patternElements); }
[ "public", "static", "boolean", "matchPath", "(", "String", "path", ",", "String", "pattern", ")", "{", "String", "[", "]", "pathElements", "=", "StringUtils", ".", "splitChars", "(", "path", ",", "PATH_SEPARATORS", ")", ";", "String", "[", "]", "patternEleme...
Matches path against pattern using *, ? and ** wildcards. Both path and the pattern are tokenized on path separators (both \ and /). '**' represents deep tree wildcard, as in Ant.
[ "Matches", "path", "against", "pattern", "using", "*", "?", "and", "**", "wildcards", ".", "Both", "path", "and", "the", "pattern", "are", "tokenized", "on", "path", "separators", "(", "both", "\\", "and", "/", ")", ".", "**", "represents", "deep", "tree...
abe54629a508592287afe5ca4ffc93bf8bf4940c
https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/lang/WildcharPathUtils.java#L39-L43
test
Match path.
Of course, here is the Java code you requested: ```java public static boolean matchPath(String path, String pattern) { String[] pathElements = StringUtils.splitChars(path, PATH_SEPARATORS); String[] patternElements = StringUtils.splitChars(pattern, PATH_SEPARATORS); return matchTokens(pathEleme...
google/guice
core/src/com/google/inject/internal/Messages.java
Messages.mergeSources
static Message mergeSources(List<Object> sources, Message message) { List<Object> messageSources = message.getSources(); // It is possible that the end of getSources() and the beginning of message.getSources() are // equivalent, in this case we should drop the repeated source when joining the lists. The ...
java
static Message mergeSources(List<Object> sources, Message message) { List<Object> messageSources = message.getSources(); // It is possible that the end of getSources() and the beginning of message.getSources() are // equivalent, in this case we should drop the repeated source when joining the lists. The ...
[ "static", "Message", "mergeSources", "(", "List", "<", "Object", ">", "sources", ",", "Message", "message", ")", "{", "List", "<", "Object", ">", "messageSources", "=", "message", ".", "getSources", "(", ")", ";", "// It is possible that the end of getSources() an...
Prepends the list of sources to the given {@link Message}
[ "Prepends", "the", "list", "of", "sources", "to", "the", "given", "{" ]
a0552a16d813ead98fe73737fb001db336650251
https://github.com/google/guice/blob/a0552a16d813ead98fe73737fb001db336650251/core/src/com/google/inject/internal/Messages.java#L47-L63
test
Merge the sources of a message into a single message.
Of course, here is the Java code you requested: ```java static Message mergeSources(List<Object> sources, Message message) { List<Object> messageSources = message.getSources(); // It is possible that the end of getSources() and the beginning of message.getSources() are // equivalent, in this case we should...
rupertlssmith/lojix
lojix/power_model/src/main/com/thesett/aima/attribute/time/TimeUtils.java
TimeUtils.timeOfDayToTicks
public static long timeOfDayToTicks(int hour, int minute, int second, int millisecond) { return millisecond + (MILLIS_PER_SECOND * second) + (MILLIS_PER_MINUTE * minute) + (MILLIS_PER_HOUR * hour); }
java
public static long timeOfDayToTicks(int hour, int minute, int second, int millisecond) { return millisecond + (MILLIS_PER_SECOND * second) + (MILLIS_PER_MINUTE * minute) + (MILLIS_PER_HOUR * hour); }
[ "public", "static", "long", "timeOfDayToTicks", "(", "int", "hour", ",", "int", "minute", ",", "int", "second", ",", "int", "millisecond", ")", "{", "return", "millisecond", "+", "(", "MILLIS_PER_SECOND", "*", "second", ")", "+", "(", "MILLIS_PER_MINUTE", "*...
Converts a field by field time of day into millisecond ticks. @param hour The hours since midnight. @param minute The minutes. @param second The seconds. @param millisecond The milliseconds. @return Millisecond ticks since midnight.
[ "Converts", "a", "field", "by", "field", "time", "of", "day", "into", "millisecond", "ticks", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/power_model/src/main/com/thesett/aima/attribute/time/TimeUtils.java#L184-L187
test
timeOfDayToTicks This method converts a time of day into a number of milliseconds.
Of course, here is the Java code you requested: ```java public static long timeOfDayToTicks(int hour, int minute, int second, int millisecond) { return millisecond + (MILLIS_PER_SECOND * second) + (MILLIS_PER_MINUTE * minute) + (MILLIS_PER_HOUR * hour); } ``` Hope this helps!
demidenko05/beigesoft-replicator
src/main/java/org/beigesoft/replicator/service/DatabaseReaderIdenticalXml.java
DatabaseReaderIdenticalXml.readAndStoreEntities
@Override public final void readAndStoreEntities(final Map<String, Object> pAddParam, final Reader pReader) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTr...
java
@Override public final void readAndStoreEntities(final Map<String, Object> pAddParam, final Reader pReader) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTr...
[ "@", "Override", "public", "final", "void", "readAndStoreEntities", "(", "final", "Map", "<", "String", ",", "Object", ">", "pAddParam", ",", "final", "Reader", "pReader", ")", "throws", "Exception", "{", "try", "{", "this", ".", "srvDatabase", ".", "setIsAu...
<p> Read entities from stream (by given reader) and insert them into DB with no changes. DB must be emptied before coping. </p> @param pAddParam additional params @param pReader Reader @throws Exception - an exception
[ "<p", ">", "Read", "entities", "from", "stream", "(", "by", "given", "reader", ")", "and", "insert", "them", "into", "DB", "with", "no", "changes", ".", "DB", "must", "be", "emptied", "before", "coping", ".", "<", "/", "p", ">" ]
d3cb848c366d2f6fbf6c2fb5066f0abe577a24bf
https://github.com/demidenko05/beigesoft-replicator/blob/d3cb848c366d2f6fbf6c2fb5066f0abe577a24bf/src/main/java/org/beigesoft/replicator/service/DatabaseReaderIdenticalXml.java#L70-L89
test
Read and store entities.
Of course, here is the Java code you requested: ```java @Override public final void readAndStoreEntities(final Map<String, Object> pAddParam, final Reader pReader) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRAN...
GlenKPeterson/Paguro
src/main/java/org/organicdesign/fp/StaticImports.java
StaticImports.mutableSet
@SafeVarargs public static <T> MutableSet<T> mutableSet(T... items) { MutableSet<T> ret = PersistentHashSet.emptyMutable(); if (items == null) { return ret; } for (T t : items) { ret.put(t); } return ret; }
java
@SafeVarargs public static <T> MutableSet<T> mutableSet(T... items) { MutableSet<T> ret = PersistentHashSet.emptyMutable(); if (items == null) { return ret; } for (T t : items) { ret.put(t); } return ret; }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "MutableSet", "<", "T", ">", "mutableSet", "(", "T", "...", "items", ")", "{", "MutableSet", "<", "T", ">", "ret", "=", "PersistentHashSet", ".", "emptyMutable", "(", ")", ";", "if", "(", "items", ...
Returns a new MutableSet of the values. This data definition method is one of the few methods in this project that support varargs. If the input contains duplicate elements, later values overwrite earlier ones.
[ "Returns", "a", "new", "MutableSet", "of", "the", "values", ".", "This", "data", "definition", "method", "is", "one", "of", "the", "few", "methods", "in", "this", "project", "that", "support", "varargs", ".", "If", "the", "input", "contains", "duplicate", ...
eac0d64b2eb9496967334f635cdb270cffb2197b
https://github.com/GlenKPeterson/Paguro/blob/eac0d64b2eb9496967334f635cdb270cffb2197b/src/main/java/org/organicdesign/fp/StaticImports.java#L144-L152
test
Returns a mutable set of the specified items.
Of course, here is the Java code you requested: ```java @SafeVarargs public static <T> MutableSet<T> mutableSet(T... items) { MutableSet<T> ret = PersistentHashSet.emptyMutable(); if (items == null) { return ret; } for (T t : items) { ret.put(t); } return ret; ...
ArpNetworking/logback-steno
src/main/java/com/arpnetworking/steno/Logger.java
Logger.info
public void info( @Nullable final String event, @Nullable final String message, @Nullable final String dataKey1, @Nullable final String dataKey2, @Nullable final Object dataValue1, @Nullable final Object dataValue2, @Nullable final Thro...
java
public void info( @Nullable final String event, @Nullable final String message, @Nullable final String dataKey1, @Nullable final String dataKey2, @Nullable final Object dataValue1, @Nullable final Object dataValue2, @Nullable final Thro...
[ "public", "void", "info", "(", "@", "Nullable", "final", "String", "event", ",", "@", "Nullable", "final", "String", "message", ",", "@", "Nullable", "final", "String", "dataKey1", ",", "@", "Nullable", "final", "String", "dataKey2", ",", "@", "Nullable", ...
Log a message for a canonical event with supporting key-value pairs and a <code>Throwable</code> at the info level. This method is provided only for efficiency over the var-args method above as it avoids an array creation during invocation. @since 1.3.0 @param event The canonical event that occurred. @param message T...
[ "Log", "a", "message", "for", "a", "canonical", "event", "with", "supporting", "key", "-", "value", "pairs", "and", "a", "<code", ">", "Throwable<", "/", "code", ">", "at", "the", "info", "level", ".", "This", "method", "is", "provided", "only", "for", ...
abd5c68ce7d42c39f80ffbad6d162d5fed3a346e
https://github.com/ArpNetworking/logback-steno/blob/abd5c68ce7d42c39f80ffbad6d162d5fed3a346e/src/main/java/com/arpnetworking/steno/Logger.java#L978-L994
test
Logs an info event.
Of course, here is the Java code you requested: ```java public void info( @Nullable final String event, @Nullable final String message, @Nullable final String dataKey1, @Nullable final String dataKey2, @Nullable final Object dataValue1, @Nullable ...
PistoiaHELM/HELMNotationParser
src/main/java/org/helm/notation2/parser/notation/polymer/MonomerNotationUnitRNA.java
MonomerNotationUnitRNA.setRNAContents
private void setRNAContents(String str) throws NotationException { /* Nucleotide with all contents */ String[] list; // if (str.contains("(")) { List<String> items = extractContents(str); for (String item : items) { if(item.length()> 1){ if(!(item.startsWith("[") && item.endsWith...
java
private void setRNAContents(String str) throws NotationException { /* Nucleotide with all contents */ String[] list; // if (str.contains("(")) { List<String> items = extractContents(str); for (String item : items) { if(item.length()> 1){ if(!(item.startsWith("[") && item.endsWith...
[ "private", "void", "setRNAContents", "(", "String", "str", ")", "throws", "NotationException", "{", "/* Nucleotide with all contents */", "String", "[", "]", "list", ";", "// if (str.contains(\"(\")) {\r", "List", "<", "String", ">", "items", "=", "extractContents", "...
method to set for each nucleotide the sugar, the base and the phosphat @param str monomer notation @throws NotationException if single monomers are not in brackets
[ "method", "to", "set", "for", "each", "nucleotide", "the", "sugar", "the", "base", "and", "the", "phosphat" ]
685d7ab7886e9b5cc15fb904025fe6eee703f8f6
https://github.com/PistoiaHELM/HELMNotationParser/blob/685d7ab7886e9b5cc15fb904025fe6eee703f8f6/src/main/java/org/helm/notation2/parser/notation/polymer/MonomerNotationUnitRNA.java#L68-L102
test
method to set the contents of the nucleotide
Of course, here is the Java code you requested: ```java private void setRNAContents(String str) throws NotationException { /* Nucleotide with all contents */ String[] list; // if (str.contains("(")) { List<String> items = extractContents(str); for (String item : items) { if(item.length...
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.amb
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static <T> Observable<T> amb(Iterable<? extends ObservableSource<? extends T>> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); return RxJavaPlugins.onAssembly(new ObservableAmb<T>(null, sources)); ...
java
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static <T> Observable<T> amb(Iterable<? extends ObservableSource<? extends T>> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); return RxJavaPlugins.onAssembly(new ObservableAmb<T>(null, sources)); ...
[ "@", "CheckReturnValue", "@", "NonNull", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "static", "<", "T", ">", "Observable", "<", "T", ">", "amb", "(", "Iterable", "<", "?", "extends", "ObservableSource", "<", "?", "extends",...
Mirrors the one ObservableSource in an Iterable of several ObservableSources that first either emits an item or sends a termination notification. <p> <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code amb} does ...
[ "Mirrors", "the", "one", "ObservableSource", "in", "an", "Iterable", "of", "several", "ObservableSources", "that", "first", "either", "emits", "an", "item", "or", "sends", "a", "termination", "notification", ".", "<p", ">", "<img", "width", "=", "640", "height...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L118-L124
test
Creates an observable that emits all items from the source observable as an observable sequence of items.
Of course, here is the Java code you requested: ```java @CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static <T> Observable<T> amb(Iterable<? extends ObservableSource<? extends T>> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); return RxJava...
Unidata/thredds
cdm/src/main/java/ucar/nc2/NetcdfFile.java
NetcdfFile.removeVariable
public boolean removeVariable(Group g, String varName) { if (immutable) throw new IllegalStateException("Cant modify"); if (g == null) g = rootGroup; return g.removeVariable(varName); }
java
public boolean removeVariable(Group g, String varName) { if (immutable) throw new IllegalStateException("Cant modify"); if (g == null) g = rootGroup; return g.removeVariable(varName); }
[ "public", "boolean", "removeVariable", "(", "Group", "g", ",", "String", "varName", ")", "{", "if", "(", "immutable", ")", "throw", "new", "IllegalStateException", "(", "\"Cant modify\"", ")", ";", "if", "(", "g", "==", "null", ")", "g", "=", "rootGroup", ...
Remove a Variable from the given group by name. @param g remove from this group. If group is null, use root group @param varName name of variable to remove. @return true is variable found and removed
[ "Remove", "a", "Variable", "from", "the", "given", "group", "by", "name", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/NetcdfFile.java#L1841-L1845
test
Removes a variable from a group.
Of course, here is the Java code you requested: ```java public boolean removeVariable(Group g, String varName) { if (immutable) throw new IllegalStateException("Cant modify"); if (g == null) g = rootGroup; return g.removeVariable(varName); } ``` Hope this helps!
spring-projects/spring-security
core/src/main/java/org/springframework/security/access/method/MapBasedMethodSecurityMetadataSource.java
MapBasedMethodSecurityMetadataSource.addSecureMethod
private void addSecureMethod(RegisteredMethod method, List<ConfigAttribute> attr) { Assert.notNull(method, "RegisteredMethod required"); Assert.notNull(attr, "Configuration attribute required"); if (logger.isInfoEnabled()) { logger.info("Adding secure method [" + method + "] with attributes [" + attr + "]...
java
private void addSecureMethod(RegisteredMethod method, List<ConfigAttribute> attr) { Assert.notNull(method, "RegisteredMethod required"); Assert.notNull(attr, "Configuration attribute required"); if (logger.isInfoEnabled()) { logger.info("Adding secure method [" + method + "] with attributes [" + attr + "]...
[ "private", "void", "addSecureMethod", "(", "RegisteredMethod", "method", ",", "List", "<", "ConfigAttribute", ">", "attr", ")", "{", "Assert", ".", "notNull", "(", "method", ",", "\"RegisteredMethod required\"", ")", ";", "Assert", ".", "notNull", "(", "attr", ...
Add configuration attributes for a secure method. @param method the method to be secured @param attr required authorities associated with the method
[ "Add", "configuration", "attributes", "for", "a", "secure", "method", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/core/src/main/java/org/springframework/security/access/method/MapBasedMethodSecurityMetadataSource.java#L222-L230
test
Add a secure method to the security context.
Of course, here is the Java code you requested: ```java private void addSecureMethod(RegisteredMethod method, List<ConfigAttribute> attr) { Assert.notNull(method, "RegisteredMethod required"); Assert.notNull(attr, "Configuration attribute required"); if (logger.isInfoEnabled()) { logger.info("Adding secure me...
Unidata/thredds
ui/src/main/java/ucar/nc2/ui/point/StationRenderer.java
StationRenderer.pick
public ucar.unidata.geoloc.Station pick(Point2D pickPt) { if (world2Normal == null || pickPt == null || stations.isEmpty()) return null; world2Normal.transform(pickPt, ptN); // work in normalized coordinate space StationUI closest = (StationUI) stationGrid.findIntersection(ptN); setSelectedStation( clo...
java
public ucar.unidata.geoloc.Station pick(Point2D pickPt) { if (world2Normal == null || pickPt == null || stations.isEmpty()) return null; world2Normal.transform(pickPt, ptN); // work in normalized coordinate space StationUI closest = (StationUI) stationGrid.findIntersection(ptN); setSelectedStation( clo...
[ "public", "ucar", ".", "unidata", ".", "geoloc", ".", "Station", "pick", "(", "Point2D", "pickPt", ")", "{", "if", "(", "world2Normal", "==", "null", "||", "pickPt", "==", "null", "||", "stations", ".", "isEmpty", "(", ")", ")", "return", "null", ";", ...
Find station that contains this point. If it exists, make it the "selected" station. @param pickPt: world coordinates @return station that contains this point, or null if none.
[ "Find", "station", "that", "contains", "this", "point", ".", "If", "it", "exists", "make", "it", "the", "selected", "station", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/point/StationRenderer.java#L127-L135
test
Pick a station from the pick location.
Of course, here is the Java code you requested: ```java public ucar.unidata.geoloc.Station pick(Point2D pickPt) { if (world2Normal == null || pickPt == null || stations.isEmpty()) return null; world2Normal.transform(pickPt, ptN); // work in normalized coordinate space StationUI closest = (StationUI) stati...
tiefaces/TieFaces
src/org/tiefaces/components/websheet/configuration/EachCommand.java
EachCommand.buildEachObjects
@SuppressWarnings("rawtypes") private int buildEachObjects(String fullName, final ConfigBuildRef configBuildRef, final int atRow, final Map<String, Object> context, final List<RowsMapping> currentRowsMappingList, final Collection itemsCollection, final String objClassName) { int index = 0; int...
java
@SuppressWarnings("rawtypes") private int buildEachObjects(String fullName, final ConfigBuildRef configBuildRef, final int atRow, final Map<String, Object> context, final List<RowsMapping> currentRowsMappingList, final Collection itemsCollection, final String objClassName) { int index = 0; int...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "private", "int", "buildEachObjects", "(", "String", "fullName", ",", "final", "ConfigBuildRef", "configBuildRef", ",", "final", "int", "atRow", ",", "final", "Map", "<", "String", ",", "Object", ">", "context",...
Builds the each objects. @param fullName the full name @param configBuildRef the config build ref @param atRow the at row @param context the context @param currentRowsMappingList the current rows mapping list @param itemsCollection the items collection @param objClassName the obj class name @return the int
[ "Builds", "the", "each", "objects", "." ]
3b57b9701ed0f080b5fa4fa78269cc0c422b34ba
https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/configuration/EachCommand.java#L256-L304
test
Build each object in the collection.
Of course, here is the Java code you requested: ```java @SuppressWarnings("rawtypes") private int buildEachObjects(String fullName, final ConfigBuildRef configBuildRef, final int atRow, final Map<String, Object> context, final List<RowsMapping> currentRowsMappingList, final Collection itemsCollection...
wro4j/wro4j
wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/decorator/SupportAwareProcessorDecorator.java
SupportAwareProcessorDecorator.process
@Override public void process(final Resource resource, final Reader reader, final Writer writer) throws IOException { final ResourcePreProcessor decoratedProcessor = getDecoratedObject(); if (decoratedProcessor instanceof SupportAware) { if (!((SupportAware) decoratedProcessor).isSupported()) { ...
java
@Override public void process(final Resource resource, final Reader reader, final Writer writer) throws IOException { final ResourcePreProcessor decoratedProcessor = getDecoratedObject(); if (decoratedProcessor instanceof SupportAware) { if (!((SupportAware) decoratedProcessor).isSupported()) { ...
[ "@", "Override", "public", "void", "process", "(", "final", "Resource", "resource", ",", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "final", "ResourcePreProcessor", "decoratedProcessor", "=", "getDecoratedObject...
{@inheritDoc}
[ "{" ]
d2a3de71ab8bf0af7061fb6327501e08198338df
https://github.com/wro4j/wro4j/blob/d2a3de71ab8bf0af7061fb6327501e08198338df/wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/decorator/SupportAwareProcessorDecorator.java#L30-L40
test
Override the process method to check if the resource pre - processor is supported on this environment.
Of course, here is the Java code you requested: ```java @Override public void process(final Resource resource, final Reader reader, final Writer writer) throws IOException { final ResourcePreProcessor decoratedProcessor = getDecoratedObject(); if (decoratedProcessor instanceof SupportAware) { if ...
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java
ThreadObjectFactory.validateObject
public final boolean validateObject(Object obj) { log.debug(" validateObject..." + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; if(!rt.isDone()) { //if the thread is running the previous task, get another one. return false; } ...
java
public final boolean validateObject(Object obj) { log.debug(" validateObject..." + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; if(!rt.isDone()) { //if the thread is running the previous task, get another one. return false; } ...
[ "public", "final", "boolean", "validateObject", "(", "Object", "obj", ")", "{", "log", ".", "debug", "(", "\" validateObject...\"", "+", "obj", ")", ";", "if", "(", "obj", "instanceof", "WorkerThread", ")", "{", "WorkerThread", "rt", "=", "(", "WorkerThread"...
/* (non-Javadoc) @see org.apache.commons.pool.PoolableObjectFactory#validateObject(java.lang.Object)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
1b638be51997eafac4d368c14f62a16624a08d3e
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/threadpool/ThreadObjectFactory.java#L59-L74
test
ValidateObject Method.
Of course, here is the Java code you requested: ```java public final boolean validateObject(Object obj) { log.debug(" validateObject..." + obj); if (obj instanceof WorkerThread) { WorkerThread rt = (WorkerThread) obj; if(!rt.isDone()) { //if the thread is running the previous task, g...
apache/parquet-mr
parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/amend/ProtocolEventsAmender.java
ProtocolEventsAmender.checkSet
private void checkSet(Iterator<TProtocol> eventIter, ThriftField setFieldDefinition) throws TException { TSet thriftSet = acceptProtocol(eventIter.next()).readSetBegin(); ThriftField elementFieldDefinition = ((ThriftType.SetType) setFieldDefinition.getType()).getValues(); int setSize = thriftSet.size; f...
java
private void checkSet(Iterator<TProtocol> eventIter, ThriftField setFieldDefinition) throws TException { TSet thriftSet = acceptProtocol(eventIter.next()).readSetBegin(); ThriftField elementFieldDefinition = ((ThriftType.SetType) setFieldDefinition.getType()).getValues(); int setSize = thriftSet.size; f...
[ "private", "void", "checkSet", "(", "Iterator", "<", "TProtocol", ">", "eventIter", ",", "ThriftField", "setFieldDefinition", ")", "throws", "TException", "{", "TSet", "thriftSet", "=", "acceptProtocol", "(", "eventIter", ".", "next", "(", ")", ")", ".", "read...
check each element of the Set, make sure all the element contain required fields @param eventIter @param setFieldDefinition @throws TException
[ "check", "each", "element", "of", "the", "Set", "make", "sure", "all", "the", "element", "contain", "required", "fields" ]
62dcc68acaf64012bf731e103be780956f1f446d
https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/amend/ProtocolEventsAmender.java#L117-L125
test
check set.
Of course, here is the Java code you requested: ```java private void checkSet(Iterator<TProtocol> eventIter, ThriftField setFieldDefinition) throws TException { TSet thriftSet = acceptProtocol(eventIter.next()).readSetBegin(); ThriftField elementFieldDefinition = ((ThriftType.SetType) setFieldDefinition.getTyp...
blademainer/common_utils
common_helper/src/main/java/com/xiongyingqi/util/DateHelper.java
DateHelper.strToDate
public static Date strToDate(String strDate) { ParsePosition pos = new ParsePosition(0); Date strtodate = FORMATTER_SHORT.parse(strDate, pos); return strtodate; }
java
public static Date strToDate(String strDate) { ParsePosition pos = new ParsePosition(0); Date strtodate = FORMATTER_SHORT.parse(strDate, pos); return strtodate; }
[ "public", "static", "Date", "strToDate", "(", "String", "strDate", ")", "{", "ParsePosition", "pos", "=", "new", "ParsePosition", "(", "0", ")", ";", "Date", "strtodate", "=", "FORMATTER_SHORT", ".", "parse", "(", "strDate", ",", "pos", ")", ";", "return",...
将短时间格式字符串转换为时间 yyyy-MM-dd @param strDate @return
[ "将短时间格式字符串转换为时间", "yyyy", "-", "MM", "-", "dd" ]
ef6baf0367c16de95a28caab67a7d5842a6d13db
https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/DateHelper.java#L180-L184
test
Convert a string to a Date object.
Of course, here is the Java code you requested: ```java public static Date strToDate(String strDate) { ParsePosition pos = new ParsePosition(0); Date strtodate = FORMATTER_SHORT.parse(strDate, pos); return strtodate; } ``` Hope this helps!
ReactiveX/RxJava
src/main/java/io/reactivex/Flowable.java
Flowable.concatMapCompletableDelayError
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper, boolean tillTheEnd) { return concatMapCompletableDelayError(mapper, tillTheEnd, 2); ...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper, boolean tillTheEnd) { return concatMapCompletableDelayError(mapper, tillTheEnd, 2); ...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "public", "final", "Completable", "concatMapCompletableDelayError", "(", "Function", "<", "?", "super", ...
Maps the upstream items into {@link CompletableSource}s and subscribes to them one after the other terminates, optionally delaying all errors till both this {@code Flowable} and all inner {@code CompletableSource}s terminate. <p> <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-...
[ "Maps", "the", "upstream", "items", "into", "{" ]
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L7352-L7357
test
Concat map Completable delay error.
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public final Completable concatMapCompletableDelayError(Function<? super T, ? extends CompletableSource> mapper, boolean tillTheEnd) { retur...
wildfly/wildfly
iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/CorbaUtils.java
CorbaUtils.initMethodHandles
private static void initMethodHandles() throws ClassNotFoundException { // Get javax.rmi.CORBA.Stub class corbaStubClass = Class.forName("javax.rmi.CORBA.Stub"); // Get javax.rmi.CORBA.Stub.connect(org.omg.CORBA.ORB) method try { connectMethod = corbaStubClass.getMethod("co...
java
private static void initMethodHandles() throws ClassNotFoundException { // Get javax.rmi.CORBA.Stub class corbaStubClass = Class.forName("javax.rmi.CORBA.Stub"); // Get javax.rmi.CORBA.Stub.connect(org.omg.CORBA.ORB) method try { connectMethod = corbaStubClass.getMethod("co...
[ "private", "static", "void", "initMethodHandles", "(", ")", "throws", "ClassNotFoundException", "{", "// Get javax.rmi.CORBA.Stub class", "corbaStubClass", "=", "Class", ".", "forName", "(", "\"javax.rmi.CORBA.Stub\"", ")", ";", "// Get javax.rmi.CORBA.Stub.connect(org.omg.CORB...
Initializes reflection method handles for RMI-IIOP. @throws ClassNotFoundException javax.rmi.CORBA.* not available
[ "Initializes", "reflection", "method", "handles", "for", "RMI", "-", "IIOP", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/CorbaUtils.java#L250-L272
test
Initialize method handles for the CORBA stub and portable remote object.
Of course, here is the Java code you requested: ```java private static void initMethodHandles() throws ClassNotFoundException { // Get javax.rmi.CORBA.Stub class corbaStubClass = Class.forName("javax.rmi.CORBA.Stub"); // Get javax.rmi.CORBA.Stub.connect(org.omg.CORBA.ORB) method try {...
rest-assured/rest-assured
rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java
RequestSpecBuilder.setBody
public RequestSpecBuilder setBody(Object object, ObjectMapperType mapperType) { spec.body(object, mapperType); return this; }
java
public RequestSpecBuilder setBody(Object object, ObjectMapperType mapperType) { spec.body(object, mapperType); return this; }
[ "public", "RequestSpecBuilder", "setBody", "(", "Object", "object", ",", "ObjectMapperType", "mapperType", ")", "{", "spec", ".", "body", "(", "object", ",", "mapperType", ")", ";", "return", "this", ";", "}" ]
Specify an Object request content that will automatically be serialized to JSON or XML and sent with the request using a specific object mapper type. This works for the POST, PATCH and PUT methods only. Trying to do this for the other http methods will cause an exception to be thrown. <p> Example of use: <pre> Message ...
[ "Specify", "an", "Object", "request", "content", "that", "will", "automatically", "be", "serialized", "to", "JSON", "or", "XML", "and", "sent", "with", "the", "request", "using", "a", "specific", "object", "mapper", "type", ".", "This", "works", "for", "the"...
165a85b65070f5a07fe0045175613fb2c2811642
https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java#L157-L160
test
Sets the request body.
Of course, here is the Java code you requested: ```java public RequestSpecBuilder setBody(Object object, ObjectMapperType mapperType) { spec.body(object, mapperType); return this; } ``` Hope this helps!
wildfly/wildfly
pojo/src/main/java/org/jboss/as/pojo/descriptor/AbstractConfigVisitorNode.java
AbstractConfigVisitorNode.getTempBeanInfo
protected static BeanInfo getTempBeanInfo(ConfigVisitor visitor, String className) { return getTempBeanInfo(visitor, getType(visitor, className)); }
java
protected static BeanInfo getTempBeanInfo(ConfigVisitor visitor, String className) { return getTempBeanInfo(visitor, getType(visitor, className)); }
[ "protected", "static", "BeanInfo", "getTempBeanInfo", "(", "ConfigVisitor", "visitor", ",", "String", "className", ")", "{", "return", "getTempBeanInfo", "(", "visitor", ",", "getType", "(", "visitor", ",", "className", ")", ")", ";", "}" ]
Get temp bean info. @param visitor the visitor @param className the class name @return bean info
[ "Get", "temp", "bean", "info", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/pojo/src/main/java/org/jboss/as/pojo/descriptor/AbstractConfigVisitorNode.java#L67-L69
test
Get the temp bean info for the given class name.
Of course, here is the Java code you requested: ```java protected static BeanInfo getTempBeanInfo(ConfigVisitor visitor, String className) { return getTempBeanInfo(visitor, getType(visitor, className)); } ``` Hope this helps!