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
spring-projects/spring-security
config/src/main/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurer.java
SessionManagementConfigurer.getSessionAuthenticationStrategy
private SessionAuthenticationStrategy getSessionAuthenticationStrategy(H http) { if (this.sessionAuthenticationStrategy != null) { return this.sessionAuthenticationStrategy; } List<SessionAuthenticationStrategy> delegateStrategies = this.sessionAuthenticationStrategies; SessionAuthenticationStrategy defaultS...
java
private SessionAuthenticationStrategy getSessionAuthenticationStrategy(H http) { if (this.sessionAuthenticationStrategy != null) { return this.sessionAuthenticationStrategy; } List<SessionAuthenticationStrategy> delegateStrategies = this.sessionAuthenticationStrategies; SessionAuthenticationStrategy defaultS...
[ "private", "SessionAuthenticationStrategy", "getSessionAuthenticationStrategy", "(", "H", "http", ")", "{", "if", "(", "this", ".", "sessionAuthenticationStrategy", "!=", "null", ")", "{", "return", "this", ".", "sessionAuthenticationStrategy", ";", "}", "List", "<", ...
Gets the customized {@link SessionAuthenticationStrategy} if {@link #sessionAuthenticationStrategy(SessionAuthenticationStrategy)} was specified. Otherwise creates a default {@link SessionAuthenticationStrategy}. @return the {@link SessionAuthenticationStrategy} to use
[ "Gets", "the", "customized", "{", "@link", "SessionAuthenticationStrategy", "}", "if", "{", "@link", "#sessionAuthenticationStrategy", "(", "SessionAuthenticationStrategy", ")", "}", "was", "specified", ".", "Otherwise", "creates", "a", "default", "{", "@link", "Sessi...
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/config/src/main/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurer.java#L586-L624
test
Get the SessionAuthenticationStrategy
Of course, here is the Java code you requested: ```java private SessionAuthenticationStrategy getSessionAuthenticationStrategy(H http) { if (this.sessionAuthenticationStrategy != null) { return this.sessionAuthenticationStrategy; } List<SessionAuthenticationStrategy> delegateStrategies = this.sessionAuthentic...
orientechnologies/orientdb
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestWrapper.java
OHttpRequestWrapper.getArgument
public String getArgument(final int iPosition) { return args != null && args.length > iPosition ? args[iPosition] : null; }
java
public String getArgument(final int iPosition) { return args != null && args.length > iPosition ? args[iPosition] : null; }
[ "public", "String", "getArgument", "(", "final", "int", "iPosition", ")", "{", "return", "args", "!=", "null", "&&", "args", ".", "length", ">", "iPosition", "?", "args", "[", "iPosition", "]", ":", "null", ";", "}" ]
Returns the argument by position @return Array of arguments
[ "Returns", "the", "argument", "by", "position" ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpRequestWrapper.java#L130-L132
test
Gets the argument at the given position.
Of course, here is the Java code you requested: ```java public String getArgument(final int iPosition) { return args != null && args.length > iPosition ? args[iPosition] : null; } ``` Hope this helps!
wildfly/wildfly
jpa/subsystem/src/main/java/org/jboss/as/jpa/processor/PersistenceUnitServiceHandler.java
PersistenceUnitServiceHandler.getPersistenceProviderAdaptor
private static PersistenceProviderAdaptor getPersistenceProviderAdaptor( final PersistenceUnitMetadata pu, final PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder, final DeploymentUnit deploymentUnit, final PersistenceProvider provider, f...
java
private static PersistenceProviderAdaptor getPersistenceProviderAdaptor( final PersistenceUnitMetadata pu, final PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder, final DeploymentUnit deploymentUnit, final PersistenceProvider provider, f...
[ "private", "static", "PersistenceProviderAdaptor", "getPersistenceProviderAdaptor", "(", "final", "PersistenceUnitMetadata", "pu", ",", "final", "PersistenceProviderDeploymentHolder", "persistenceProviderDeploymentHolder", ",", "final", "DeploymentUnit", "deploymentUnit", ",", "fin...
Get the persistence provider adaptor. Will load the adapter module if needed. @param pu @param persistenceProviderDeploymentHolder @param provider @param platform @return @throws DeploymentUnitProcessingException
[ "Get", "the", "persistence", "provider", "adaptor", ".", "Will", "load", "the", "adapter", "module", "if", "needed", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/jpa/subsystem/src/main/java/org/jboss/as/jpa/processor/PersistenceUnitServiceHandler.java#L804-L849
test
Get the PersistenceProviderAdaptor for the persistence provider.
Of course, here is the Java code you requested: ```java private static PersistenceProviderAdaptor getPersistenceProviderAdaptor( final PersistenceUnitMetadata pu, final PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder, final DeploymentUnit deploymentUnit, ...
jcuda/jcublas
JCublasJava/src/main/java/jcuda/jcublas/JCublas.java
JCublas.cublasGetMatrix
public static int cublasGetMatrix (int rows, int cols, Pointer A, int lda, cuComplex B[], int offsetB, int ldb) { ByteBuffer byteBufferB = ByteBuffer.allocateDirect(B.length * 4 * 2); byteBufferB.order(ByteOrder.nativeOrder()); FloatBuffer floatBufferB = byteBufferB.asFloatBuffer(); ...
java
public static int cublasGetMatrix (int rows, int cols, Pointer A, int lda, cuComplex B[], int offsetB, int ldb) { ByteBuffer byteBufferB = ByteBuffer.allocateDirect(B.length * 4 * 2); byteBufferB.order(ByteOrder.nativeOrder()); FloatBuffer floatBufferB = byteBufferB.asFloatBuffer(); ...
[ "public", "static", "int", "cublasGetMatrix", "(", "int", "rows", ",", "int", "cols", ",", "Pointer", "A", ",", "int", "lda", ",", "cuComplex", "B", "[", "]", ",", "int", "offsetB", ",", "int", "ldb", ")", "{", "ByteBuffer", "byteBufferB", "=", "ByteBu...
Extended wrapper for arrays of cuComplex values. Note that this method only exists for convenience and compatibility with native C code. It is much more efficient to provide a Pointer to a float array that may store the complex numbers, where each pair of consecutive numbers in the array describes the real- and imagina...
[ "Extended", "wrapper", "for", "arrays", "of", "cuComplex", "values", ".", "Note", "that", "this", "method", "only", "exists", "for", "convenience", "and", "compatibility", "with", "native", "C", "code", ".", "It", "is", "much", "more", "efficient", "to", "pr...
80875235d24562073f4d66651dd17263f306427d
https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas.java#L578-L598
test
Standard Cublas Get Matrix.
Of course, here is the Java code you requested: ```java public static int cublasGetMatrix (int rows, int cols, Pointer A, int lda, cuComplex B[], int offsetB, int ldb) { ByteBuffer byteBufferB = ByteBuffer.allocateDirect(B.length * 4 * 2); byteBufferB.order(ByteOrder.nativeOrder()); Flo...
rupertlssmith/lojix
debugger/swing_utils/src/main/com/thesett/aima/logic/fol/wam/debugger/swing/JTextGrid.java
JTextGrid.paintComponent
protected void paintComponent(Graphics g) { Graphics2D graphics2D = (Graphics2D) g.create(); Rectangle clipRect = (Rectangle) g.getClip(); // Work out the area to be painted in grid coordinates against the clipping rectangle. int startCol = xToCol(clipRect.x); int startRow =...
java
protected void paintComponent(Graphics g) { Graphics2D graphics2D = (Graphics2D) g.create(); Rectangle clipRect = (Rectangle) g.getClip(); // Work out the area to be painted in grid coordinates against the clipping rectangle. int startCol = xToCol(clipRect.x); int startRow =...
[ "protected", "void", "paintComponent", "(", "Graphics", "g", ")", "{", "Graphics2D", "graphics2D", "=", "(", "Graphics2D", ")", "g", ".", "create", "(", ")", ";", "Rectangle", "clipRect", "=", "(", "Rectangle", ")", "g", ".", "getClip", "(", ")", ";", ...
{@inheritDoc} <p/>Renders the text grid model.
[ "{", "@inheritDoc", "}" ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/debugger/swing_utils/src/main/com/thesett/aima/logic/fol/wam/debugger/swing/JTextGrid.java#L128-L220
test
Paint the component of the .
Of course, here is the Java code you requested: ```java protected void paintComponent(Graphics g) { Graphics2D graphics2D = (Graphics2D) g.create(); Rectangle clipRect = (Rectangle) g.getClip(); // Work out the area to be painted in grid coordinates against the clipping rectangle. ...
real-logic/aeron
aeron-client/src/main/java/io/aeron/logbuffer/TermUnblocker.java
TermUnblocker.unblock
public static Status unblock( final UnsafeBuffer logMetaDataBuffer, final UnsafeBuffer termBuffer, final int blockedOffset, final int tailOffset, final int termId) { Status status = NO_ACTION; int frameLength = frameLengthVolatile(termBuffer, blockedOffset); ...
java
public static Status unblock( final UnsafeBuffer logMetaDataBuffer, final UnsafeBuffer termBuffer, final int blockedOffset, final int tailOffset, final int termId) { Status status = NO_ACTION; int frameLength = frameLengthVolatile(termBuffer, blockedOffset); ...
[ "public", "static", "Status", "unblock", "(", "final", "UnsafeBuffer", "logMetaDataBuffer", ",", "final", "UnsafeBuffer", "termBuffer", ",", "final", "int", "blockedOffset", ",", "final", "int", "tailOffset", ",", "final", "int", "termId", ")", "{", "Status", "s...
Attempt to unblock the current term at the current offset. <ol> <li>Current position length is &gt; 0, then return</li> <li>Current position length is 0, scan forward by frame alignment until, one of the following: <ol> <li>reach a non-0 length, unblock up to indicated position (check original frame length for non-0)</...
[ "Attempt", "to", "unblock", "the", "current", "term", "at", "the", "current", "offset", ".", "<ol", ">", "<li", ">", "Current", "position", "length", "is", "&gt", ";", "0", "then", "return<", "/", "li", ">", "<li", ">", "Current", "position", "length", ...
045c32f0256d1ea35d562520216affc281a41239
https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-client/src/main/java/io/aeron/logbuffer/TermUnblocker.java#L70-L120
test
Unblock a single entry from a log file.
Of course, here is the Java code you requested: ```java public static Status unblock( final UnsafeBuffer logMetaDataBuffer, final UnsafeBuffer termBuffer, final int blockedOffset, final int tailOffset, final int termId) { Status status = NO_ACTION; int frameL...
oblac/jodd
jodd-bean/src/main/java/jodd/bean/BeanProperty.java
BeanProperty.getGetter
public Getter getGetter(final boolean declared) { loadPropertyDescriptor(); return propertyDescriptor != null ? propertyDescriptor.getGetter(declared) : null; }
java
public Getter getGetter(final boolean declared) { loadPropertyDescriptor(); return propertyDescriptor != null ? propertyDescriptor.getGetter(declared) : null; }
[ "public", "Getter", "getGetter", "(", "final", "boolean", "declared", ")", "{", "loadPropertyDescriptor", "(", ")", ";", "return", "propertyDescriptor", "!=", "null", "?", "propertyDescriptor", ".", "getGetter", "(", "declared", ")", ":", "null", ";", "}" ]
Returns getter.
[ "Returns", "getter", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-bean/src/main/java/jodd/bean/BeanProperty.java#L122-L125
test
Gets the getter.
Of course, here is the Java code you requested: ```java public Getter getGetter(final boolean declared) { loadPropertyDescriptor(); return propertyDescriptor != null ? propertyDescriptor.getGetter(declared) : null; } ``` Hope this helps!
orientechnologies/orientdb
object/src/main/java/com/orientechnologies/orient/object/metadata/schema/OSchemaProxyObject.java
OSchemaProxyObject.synchronizeSchema
public synchronized void synchronizeSchema() { OObjectDatabaseTx database = ((OObjectDatabaseTx) ODatabaseRecordThreadLocal.instance().get().getDatabaseOwner()); Collection<Class<?>> registeredEntities = database.getEntityManager().getRegisteredEntities(); boolean automaticSchemaGeneration = database.isAuto...
java
public synchronized void synchronizeSchema() { OObjectDatabaseTx database = ((OObjectDatabaseTx) ODatabaseRecordThreadLocal.instance().get().getDatabaseOwner()); Collection<Class<?>> registeredEntities = database.getEntityManager().getRegisteredEntities(); boolean automaticSchemaGeneration = database.isAuto...
[ "public", "synchronized", "void", "synchronizeSchema", "(", ")", "{", "OObjectDatabaseTx", "database", "=", "(", "(", "OObjectDatabaseTx", ")", "ODatabaseRecordThreadLocal", ".", "instance", "(", ")", ".", "get", "(", ")", ".", "getDatabaseOwner", "(", ")", ")",...
Checks if all registered entities has schema generated, if not it generates it
[ "Checks", "if", "all", "registered", "entities", "has", "schema", "generated", "if", "not", "it", "generates", "it" ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/object/src/main/java/com/orientechnologies/orient/object/metadata/schema/OSchemaProxyObject.java#L383-L433
test
Synchronize the schema of the database.
Of course, here is the Java code you requested: ```java public synchronized void synchronizeSchema() { OObjectDatabaseTx database = ((OObjectDatabaseTx) ODatabaseRecordThreadLocal.instance().get().getDatabaseOwner()); Collection<Class<?>> registeredEntities = database.getEntityManager().getRegisteredEntities()...
ReactiveX/RxJava
src/main/java/io/reactivex/Flowable.java
Flowable.onBackpressureDrop
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> onBackpressureDrop() { return RxJavaPlugins.onAssembly(new FlowableOnBackpressureDrop<T>(this)); }
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> onBackpressureDrop() { return RxJavaPlugins.onAssembly(new FlowableOnBackpressureDrop<T>(this)); }
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "UNBOUNDED_IN", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", "onBackpressureDrop", "(", ")", "{", "return",...
Instructs a Publisher that is emitting items faster than its Subscriber can consume them to discard, rather than emit, those items that its Subscriber is not prepared to observe. <p> <img width="640" height="245" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/bp.obp.drop.png" alt=""> <p> If the d...
[ "Instructs", "a", "Publisher", "that", "is", "emitting", "items", "faster", "than", "its", "Subscriber", "can", "consume", "them", "to", "discard", "rather", "than", "emit", "those", "items", "that", "its", "Subscriber", "is", "not", "prepared", "to", "observe...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L11903-L11908
test
On backpressure drop.
Of course, here is the Java code you requested: ```java @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> onBackpressureDrop() { return RxJavaPlugins.onAssembly(new FlowableOnBackpressureDrop<T>(this)); } ``` ...
GojaFramework/goja
goja-core/src/main/java/goja/core/kits/MoneyKit.java
MoneyKit.divide
public MoneyKit divide(BigDecimal val, int roundingMode) { BigDecimal newCent = BigDecimal.valueOf(cent).divide(val, roundingMode); return newMoneyWithSameCurrency(newCent.longValue()); }
java
public MoneyKit divide(BigDecimal val, int roundingMode) { BigDecimal newCent = BigDecimal.valueOf(cent).divide(val, roundingMode); return newMoneyWithSameCurrency(newCent.longValue()); }
[ "public", "MoneyKit", "divide", "(", "BigDecimal", "val", ",", "int", "roundingMode", ")", "{", "BigDecimal", "newCent", "=", "BigDecimal", ".", "valueOf", "(", "cent", ")", ".", "divide", "(", "val", ",", "roundingMode", ")", ";", "return", "newMoneyWithSam...
货币除法。 <p/> <p/> 返回一个新的货币对象,币种与本货币对象相同,金额为本货币对象的金额除以除数。 本货币对象的值不变。如果相除后的金额不能转换为整数分,使用指定的取整模式 <code>roundingMode</code>进行取整。 @param val 除数 @param roundingMode 取整 @return 相除后的结果。
[ "货币除法。", "<p", "/", ">", "<p", "/", ">", "返回一个新的货币对象,币种与本货币对象相同,金额为本货币对象的金额除以除数。", "本货币对象的值不变。如果相除后的金额不能转换为整数分,使用指定的取整模式", "<code", ">", "roundingMode<", "/", "code", ">", "进行取整。" ]
77179b495f668fc1fa20accc912991df6bb2d917
https://github.com/GojaFramework/goja/blob/77179b495f668fc1fa20accc912991df6bb2d917/goja-core/src/main/java/goja/core/kits/MoneyKit.java#L439-L443
test
Divide the cent number by the given amount.
Of course, here is the Java code you requested: ```java public MoneyKit divide(BigDecimal val, int roundingMode) { BigDecimal newCent = BigDecimal.valueOf(cent).divide(val, roundingMode); return newMoneyWithSameCurrency(newCent.longValue()); } ``` Hope this helps!
groupon/Novie
novie-core/src/main/java/com/groupon/novie/internal/controllers/ApiController.java
ApiController.processJsonRequest
@RequestMapping(value = {"/{schema:[^\\.]+}", "/{schema}.json"}, produces = "application/json", headers = {"Accept=application/json"}) @ResponseBody public Report processJsonRequest(@PathVariable String schema, HttpServletRequest request) throws ServiceException, InvalidParameterException, InvalidSc...
java
@RequestMapping(value = {"/{schema:[^\\.]+}", "/{schema}.json"}, produces = "application/json", headers = {"Accept=application/json"}) @ResponseBody public Report processJsonRequest(@PathVariable String schema, HttpServletRequest request) throws ServiceException, InvalidParameterException, InvalidSc...
[ "@", "RequestMapping", "(", "value", "=", "{", "\"/{schema:[^\\\\.]+}\"", ",", "\"/{schema}.json\"", "}", ",", "produces", "=", "\"application/json\"", ",", "headers", "=", "{", "\"Accept=application/json\"", "}", ")", "@", "ResponseBody", "public", "Report", "proce...
<p> Handles requests that accept application/json. </p>
[ "<p", ">", "Handles", "requests", "that", "accept", "application", "/", "json", ".", "<", "/", "p", ">" ]
dc0a96652499c8abfc2b990b864a378d794a5234
https://github.com/groupon/Novie/blob/dc0a96652499c8abfc2b990b864a378d794a5234/novie-core/src/main/java/com/groupon/novie/internal/controllers/ApiController.java#L154-L160
test
Process a JSON request.
Of course, here is the Java code you requested: ```java @RequestMapping(value = {"/{schema:[^\\.]+}", "/{schema}.json"}, produces = "application/json", headers = {"Accept=application/json"}) @ResponseBody public Report processJsonRequest(@PathVariable String schema, HttpServletRequest request) throws ServiceEx...
oblac/jodd
jodd-core/src/main/java/jodd/util/cl/DefaultClassLoaderStrategy.java
DefaultClassLoaderStrategy.prepareArrayClassnameForLoading
public static String prepareArrayClassnameForLoading(String className) { int bracketCount = StringUtil.count(className, '['); if (bracketCount == 0) { // not an array return null; } String brackets = StringUtil.repeat('[', bracketCount); int bracketIndex = className.indexOf('['); className = classN...
java
public static String prepareArrayClassnameForLoading(String className) { int bracketCount = StringUtil.count(className, '['); if (bracketCount == 0) { // not an array return null; } String brackets = StringUtil.repeat('[', bracketCount); int bracketIndex = className.indexOf('['); className = classN...
[ "public", "static", "String", "prepareArrayClassnameForLoading", "(", "String", "className", ")", "{", "int", "bracketCount", "=", "StringUtil", ".", "count", "(", "className", ",", "'", "'", ")", ";", "if", "(", "bracketCount", "==", "0", ")", "{", "// not ...
Prepares classname for loading, respecting the arrays. Returns <code>null</code> if class name is not an array.
[ "Prepares", "classname", "for", "loading", "respecting", "the", "arrays", ".", "Returns", "<code", ">", "null<", "/", "code", ">", "if", "class", "name", "is", "not", "an", "array", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-core/src/main/java/jodd/util/cl/DefaultClassLoaderStrategy.java#L92-L113
test
prepare array class name for loading
Of course, here is the Java code you requested: ```java public static String prepareArrayClassnameForLoading(String className) { int bracketCount = StringUtil.count(className, '['); if (bracketCount == 0) { // not an array return null; } String brackets = StringUtil.repeat('[', bracketCount); int br...
google/openrtb
openrtb-core/src/main/java/com/google/openrtb/json/OpenRtbJsonWriter.java
OpenRtbJsonWriter.writeBidRequest
public void writeBidRequest(BidRequest req, OutputStream os) throws IOException { JsonGenerator gen = factory().getJsonFactory().createGenerator(os); writeBidRequest(req, gen); }
java
public void writeBidRequest(BidRequest req, OutputStream os) throws IOException { JsonGenerator gen = factory().getJsonFactory().createGenerator(os); writeBidRequest(req, gen); }
[ "public", "void", "writeBidRequest", "(", "BidRequest", "req", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "JsonGenerator", "gen", "=", "factory", "(", ")", ".", "getJsonFactory", "(", ")", ".", "createGenerator", "(", "os", ")", ";", "writ...
Serializes a {@link BidRequest} to JSON, streamed into an {@link OutputStream}. @see JsonFactory#createGenerator(OutputStream)
[ "Serializes", "a", "{", "@link", "BidRequest", "}", "to", "JSON", "streamed", "into", "an", "{", "@link", "OutputStream", "}", "." ]
384ed8dde6bd16ac2faab9afbe5b33367836fdec
https://github.com/google/openrtb/blob/384ed8dde6bd16ac2faab9afbe5b33367836fdec/openrtb-core/src/main/java/com/google/openrtb/json/OpenRtbJsonWriter.java#L98-L101
test
Write a bid request to an output stream.
Of course, here is the Java code you requested: ```java public void writeBidRequest(BidRequest req, OutputStream os) throws IOException { JsonGenerator gen = factory().getJsonFactory().createGenerator(os); writeBidRequest(req, gen); } ``` Hope this helps!
rupertlssmith/lojix
base/common/src/main/com/thesett/common/util/ByteBufferUtils.java
ByteBufferUtils.getIntFromBytes
public static int getIntFromBytes(byte[] buf, int offset) { int result = 0; result += buf[offset++] & 0xFF; result += ((buf[offset++] & 0xFF) << 8); result += ((buf[offset++] & 0xFF) << 16); result += ((buf[offset]) << 24); return result; }
java
public static int getIntFromBytes(byte[] buf, int offset) { int result = 0; result += buf[offset++] & 0xFF; result += ((buf[offset++] & 0xFF) << 8); result += ((buf[offset++] & 0xFF) << 16); result += ((buf[offset]) << 24); return result; }
[ "public", "static", "int", "getIntFromBytes", "(", "byte", "[", "]", "buf", ",", "int", "offset", ")", "{", "int", "result", "=", "0", ";", "result", "+=", "buf", "[", "offset", "++", "]", "&", "0xFF", ";", "result", "+=", "(", "(", "buf", "[", "...
Extracts an int from an array of bytes. @param buf The array of bytes to extract the int from. @param offset The offset of the start of the int in the byte array. @return An integer extracted from the 4 bytes of data.
[ "Extracts", "an", "int", "from", "an", "array", "of", "bytes", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/ByteBufferUtils.java#L42-L52
test
Get the int value from the byte array.
Of course, here is the Java code you requested: ```java public static int getIntFromBytes(byte[] buf, int offset) { int result = 0; result += buf[offset++] & 0xFF; result += ((buf[offset++] & 0xFF) << 8); result += ((buf[offset++] & 0xFF) << 16); result += ((buf[offset]) <<...
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.concatMapSingle
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> concatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper) { return concatMapSingle(mapper, 2); }
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> concatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper) { return concatMapSingle(mapper, 2); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "R", ">", "Observable", "<", "R", ">", "concatMapSingle", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "SingleSource", "<", ...
Maps the upstream items into {@link SingleSource}s and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either this {@code Observable} or the current inner {@code SingleSource} fail. <p> <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJa...
[ "Maps", "the", "upstream", "items", "into", "{" ]
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L7031-L7035
test
Concatenates the source of a sequence of items into a single sequence of items.
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> concatMapSingle(Function<? super T, ? extends SingleSource<? extends R>> mapper) { return concatMapSingle(mapper, 2); } ``` Hope this helps!
spring-projects/spring-security
web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java
AnonymousAuthenticationFilter.afterPropertiesSet
@Override public void afterPropertiesSet() { Assert.hasLength(key, "key must have length"); Assert.notNull(principal, "Anonymous authentication principal must be set"); Assert.notNull(authorities, "Anonymous authorities must be set"); }
java
@Override public void afterPropertiesSet() { Assert.hasLength(key, "key must have length"); Assert.notNull(principal, "Anonymous authentication principal must be set"); Assert.notNull(authorities, "Anonymous authorities must be set"); }
[ "@", "Override", "public", "void", "afterPropertiesSet", "(", ")", "{", "Assert", ".", "hasLength", "(", "key", ",", "\"key must have length\"", ")", ";", "Assert", ".", "notNull", "(", "principal", ",", "\"Anonymous authentication principal must be set\"", ")", ";"...
========================================================================================================
[ "========================================================================================================" ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/authentication/AnonymousAuthenticationFilter.java#L85-L90
test
This method is called after all properties have been set.
Of course, here is the Java code you requested: ```java @Override public void afterPropertiesSet() { Assert.hasLength(key, "key must have length"); Assert.notNull(principal, "Anonymous authentication principal must be set"); Assert.notNull(authorities, "Anonymous authorities must be set"); } ``` Hope this hel...
intellimate/IzouSDK
src/main/java/org/intellimate/izou/sdk/frameworks/presence/events/PresenceEvent.java
PresenceEvent.createPresenceEvent
public static Optional<PresenceEvent> createPresenceEvent(Identification source, boolean strict, boolean known, boolean firstEncounter, List<String> descriptors, Long timePassed) { try { if (strict) { descriptors.add(STRIC...
java
public static Optional<PresenceEvent> createPresenceEvent(Identification source, boolean strict, boolean known, boolean firstEncounter, List<String> descriptors, Long timePassed) { try { if (strict) { descriptors.add(STRIC...
[ "public", "static", "Optional", "<", "PresenceEvent", ">", "createPresenceEvent", "(", "Identification", "source", ",", "boolean", "strict", ",", "boolean", "known", ",", "boolean", "firstEncounter", ",", "List", "<", "String", ">", "descriptors", ",", "Long", "...
creates a new PresenceEvent @param source the caller @param strict whether the addon can guarantee that the user is around @param known true if the addon knows if the person encountered is the (main) user @param firstEncounter if the user was first encountered in the specified mode @param descriptors the descriptors @p...
[ "creates", "a", "new", "PresenceEvent" ]
bc8705ad48a6ca12a722f2b787be435949fa5d08
https://github.com/intellimate/IzouSDK/blob/bc8705ad48a6ca12a722f2b787be435949fa5d08/src/main/java/org/intellimate/izou/sdk/frameworks/presence/events/PresenceEvent.java#L97-L119
test
Creates a Presence Event object from the given Identification.
Of course, here is the Java code you requested: ```java public static Optional<PresenceEvent> createPresenceEvent(Identification source, boolean strict, boolean known, boolean firstEncounter, List<String> descriptors, Long timePassed) { try { ...
ReactiveX/RxJava
src/main/java/io/reactivex/Completable.java
Completable.observeOn
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return RxJavaPlugins.onAssembly(new CompletableObserveOn(this, scheduler)); }
java
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return RxJavaPlugins.onAssembly(new CompletableObserveOn(this, scheduler)); }
[ "@", "CheckReturnValue", "@", "NonNull", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "final", "Completable", "observeOn", "(", "final", "Scheduler", "scheduler", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "scheduler", ...
Returns a Completable which emits the terminal events from the thread of the specified scheduler. <p> <img width="640" height="523" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.observeOn.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code observeOn} operates on a {@link Schedule...
[ "Returns", "a", "Completable", "which", "emits", "the", "terminal", "events", "from", "the", "thread", "of", "the", "specified", "scheduler", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "523", "src", "=", "https", ":", "//", "raw", ".", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Completable.java#L1886-L1892
test
Observes the sequence of tokens in this sequence using the specified scheduler.
Of course, here is the Java code you requested: ```java @CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return RxJavaPlugins.onAssembly(new Comp...
js-lib-com/tiny-container
src/main/java/js/http/encoder/QueryParametersParser.java
QueryParametersParser.asObject
@SuppressWarnings("unchecked") private static <T> T asObject(String value, Type type) { if (value == null) { return (T) Types.getEmptyValue(type); } if (!Types.isArrayLike(type)) { if (!(type instanceof Class)) { throw new BugError("Generic value types are not supported."); } if (Conve...
java
@SuppressWarnings("unchecked") private static <T> T asObject(String value, Type type) { if (value == null) { return (T) Types.getEmptyValue(type); } if (!Types.isArrayLike(type)) { if (!(type instanceof Class)) { throw new BugError("Generic value types are not supported."); } if (Conve...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "<", "T", ">", "T", "asObject", "(", "String", "value", ",", "Type", "type", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "(", "T", ")", "Types", ".", "getEmp...
Helper method to convert string parameter to an instance of a given type. Requested <code>type</code> should be a value type as accepted by converter package or an array / collection of value types. In the later case <code>value</code> should be a comma separated string of items. If given <code>value</code> is null ret...
[ "Helper", "method", "to", "convert", "string", "parameter", "to", "an", "instance", "of", "a", "given", "type", ".", "Requested", "<code", ">", "type<", "/", "code", ">", "should", "be", "a", "value", "type", "as", "accepted", "by", "converter", "package",...
ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e
https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/http/encoder/QueryParametersParser.java#L263-L301
test
Returns the object represented by the given string value and type.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") private static <T> T asObject(String value, Type type) { if (value == null) { return (T) Types.getEmptyValue(type); } if (!Types.isArrayLike(type)) { if (!(type instanceof Class)) { throw new BugError("Gene...
demidenko05/beigesoft-replicator
src/main/java/org/beigesoft/replicator/service/ReplicatorXmlHttps.java
ReplicatorXmlHttps.requestCookiesGet
public final void requestCookiesGet( final Map<String, Object> pAddParams) throws Exception { String urlGetAuthCookStr = (String) pAddParams.get("urlGetAuthCookies"); URL urlGetAuthCookies = new URL(urlGetAuthCookStr); HttpsURLConnection urlConnection = null; BufferedReader reader = null; try { ...
java
public final void requestCookiesGet( final Map<String, Object> pAddParams) throws Exception { String urlGetAuthCookStr = (String) pAddParams.get("urlGetAuthCookies"); URL urlGetAuthCookies = new URL(urlGetAuthCookStr); HttpsURLConnection urlConnection = null; BufferedReader reader = null; try { ...
[ "public", "final", "void", "requestCookiesGet", "(", "final", "Map", "<", "String", ",", "Object", ">", "pAddParams", ")", "throws", "Exception", "{", "String", "urlGetAuthCookStr", "=", "(", "String", ")", "pAddParams", ".", "get", "(", "\"urlGetAuthCookies\"",...
<p>Connect to secure address with method GET to receive authenticate cookies.</p> @param pAddParams additional params @throws Exception - an exception
[ "<p", ">", "Connect", "to", "secure", "address", "with", "method", "GET", "to", "receive", "authenticate", "cookies", ".", "<", "/", "p", ">" ]
d3cb848c366d2f6fbf6c2fb5066f0abe577a24bf
https://github.com/demidenko05/beigesoft-replicator/blob/d3cb848c366d2f6fbf6c2fb5066f0abe577a24bf/src/main/java/org/beigesoft/replicator/service/ReplicatorXmlHttps.java#L323-L356
test
Request the Cookies.
Of course, here is the Java code you requested: ```java public final void requestCookiesGet( final Map<String, Object> pAddParams) throws Exception { String urlGetAuthCookStr = (String) pAddParams.get("urlGetAuthCookies"); URL urlGetAuthCookies = new URL(urlGetAuthCookStr); HttpsURLConnection urlConnec...
ReactiveX/RxJava
src/main/java/io/reactivex/Flowable.java
Flowable.forEachWhile
@CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate<? super T> onNext, Consumer<? super Throwable> onError) { return forEachWhile(onNext, onError, Functions.EMPTY_ACTION); }
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate<? super T> onNext, Consumer<? super Throwable> onError) { return forEachWhile(onNext, onError, Functions.EMPTY_ACTION); }
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "NONE", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Disposable", "forEachWhile", "(", "Predicate", "<", "?", "super", "T", ">", "o...
Subscribes to the {@link Publisher} and receives notifications for each element and error events until the onNext Predicate returns false. <dl> <dt><b>Backpressure:</b></dt> <dd>The operator consumes the source {@code Publisher} in an unbounded manner (i.e., no backpressure is applied to it).</dd> <dt><b>Scheduler:</b>...
[ "Subscribes", "to", "the", "{", "@link", "Publisher", "}", "and", "receives", "notifications", "for", "each", "element", "and", "error", "events", "until", "the", "onNext", "Predicate", "returns", "false", ".", "<dl", ">", "<dt", ">", "<b", ">", "Backpressur...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L10447-L10452
test
Iterates over the source code in the source code until the next value is found and an exception is thrown.
Of course, here is the Java code you requested: ```java @CheckReturnValue @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(Predicate<? super T> onNext, Consumer<? super Throwable> onError) { return forEachWhile(onNext, onError...
RestComm/jain-slee
container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileObjectPoolManagement.java
ProfileObjectPoolManagement.register
public void register() { MBeanServer mBeanServer = sleeContainer.getMBeanServer(); try { mBeanServer.registerMBean(this, new ObjectName(MBEAN_NAME)); } catch (Exception e) { logger.error("Failed to register", e); } }
java
public void register() { MBeanServer mBeanServer = sleeContainer.getMBeanServer(); try { mBeanServer.registerMBean(this, new ObjectName(MBEAN_NAME)); } catch (Exception e) { logger.error("Failed to register", e); } }
[ "public", "void", "register", "(", ")", "{", "MBeanServer", "mBeanServer", "=", "sleeContainer", ".", "getMBeanServer", "(", ")", ";", "try", "{", "mBeanServer", ".", "registerMBean", "(", "this", ",", "new", "ObjectName", "(", "MBEAN_NAME", ")", ")", ";", ...
---- MBEAN METHODS
[ "----", "MBEAN", "METHODS" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileObjectPoolManagement.java#L215-L222
test
Register the MBean with the SLEE container.
Of course, here is the Java code you requested: ```java public void register() { MBeanServer mBeanServer = sleeContainer.getMBeanServer(); try { mBeanServer.registerMBean(this, new ObjectName(MBEAN_NAME)); } catch (Exception e) { logger.error("Failed to register", e); } } ``` Hope this helps!
rupertlssmith/lojix
lojix/search/src/main/com/thesett/aima/search/examples/eightpuzzle/ManhattanHeuristic.java
ManhattanHeuristic.computeH
public float computeH(EightPuzzleState state, HeuristicSearchNode searchNode) { // Get the parent heuristic search node. HeuristicSearchNode parentNode = (HeuristicSearchNode) searchNode.getParent(); // Check if there is no parent, in which case this is the start state so the complete heuri...
java
public float computeH(EightPuzzleState state, HeuristicSearchNode searchNode) { // Get the parent heuristic search node. HeuristicSearchNode parentNode = (HeuristicSearchNode) searchNode.getParent(); // Check if there is no parent, in which case this is the start state so the complete heuri...
[ "public", "float", "computeH", "(", "EightPuzzleState", "state", ",", "HeuristicSearchNode", "searchNode", ")", "{", "// Get the parent heuristic search node.", "HeuristicSearchNode", "parentNode", "=", "(", "HeuristicSearchNode", ")", "searchNode", ".", "getParent", "(", ...
Returns heuristic evaluation of an eight puzzle board position as the manhattan distance of all tiles from their correct positions. @param state The EightPuzzleState to calculate the heuristic for. @param searchNode The heuristic search node for the state in some heuristic search. @return The heuristic estimat...
[ "Returns", "heuristic", "evaluation", "of", "an", "eight", "puzzle", "board", "position", "as", "the", "manhattan", "distance", "of", "all", "tiles", "from", "their", "correct", "positions", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/search/src/main/com/thesett/aima/search/examples/eightpuzzle/ManhattanHeuristic.java#L45-L198
test
Compute the H value of the Eight Puzzle state and the heuristic in the current state.
Of course, here is the Java code you requested: ```java public float computeH(EightPuzzleState state, HeuristicSearchNode searchNode) { // Get the parent heuristic search node. HeuristicSearchNode parentNode = (HeuristicSearchNode) searchNode.getParent(); // Check if there is no parent, in...
Unidata/thredds
httpservices/src/main/java/ucar/httpservices/HTTPSession.java
HTTPSession.mergedSettings
public Map<Prop, Object> mergedSettings() { Map<Prop, Object> merged; synchronized (this) {// keep coverity happy //Merge Settings; merged = HTTPUtil.merge(globalsettings, localsettings); } return Collections.unmodifiableMap(merged); }
java
public Map<Prop, Object> mergedSettings() { Map<Prop, Object> merged; synchronized (this) {// keep coverity happy //Merge Settings; merged = HTTPUtil.merge(globalsettings, localsettings); } return Collections.unmodifiableMap(merged); }
[ "public", "Map", "<", "Prop", ",", "Object", ">", "mergedSettings", "(", ")", "{", "Map", "<", "Prop", ",", "Object", ">", "merged", ";", "synchronized", "(", "this", ")", "{", "// keep coverity happy", "//Merge Settings;", "merged", "=", "HTTPUtil", ".", ...
/*package scope
[ "/", "*", "package", "scope" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/httpservices/src/main/java/ucar/httpservices/HTTPSession.java#L1271-L1279
test
Merge the global settings and local settings into a single map.
Of course, here is the Java code you requested: ```java public Map<Prop, Object> mergedSettings() { Map<Prop, Object> merged; synchronized (this) {// keep coverity happy //Merge Settings; merged = HTTPUtil.merge(globalsettings, localsettings); } return Collec...
js-lib-com/tiny-container
src/main/java/js/container/DependencyProcessor.java
DependencyProcessor.getDependencyValue
@SuppressWarnings("unchecked") protected static Object getDependencyValue(ManagedClassSPI hostManagedClass, Class<?> type) { Stack<Class<?>> stackTrace = dependenciesStack.get(); if (stackTrace == null) { stackTrace = new Stack<>(); dependenciesStack.set(stackTrace); } ContainerSPI container = hos...
java
@SuppressWarnings("unchecked") protected static Object getDependencyValue(ManagedClassSPI hostManagedClass, Class<?> type) { Stack<Class<?>> stackTrace = dependenciesStack.get(); if (stackTrace == null) { stackTrace = new Stack<>(); dependenciesStack.set(stackTrace); } ContainerSPI container = hos...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "static", "Object", "getDependencyValue", "(", "ManagedClassSPI", "hostManagedClass", ",", "Class", "<", "?", ">", "type", ")", "{", "Stack", "<", "Class", "<", "?", ">", ">", "stackTrace", "=", ...
Get dependency value of requested type. See class description for a discussion about supported types and circular dependencies. @param hostManagedClass managed class defining the context on which dependency is resolved, @param type dependency type. @return dependency instance, reused from container caches or fresh cre...
[ "Get", "dependency", "value", "of", "requested", "type", ".", "See", "class", "description", "for", "a", "discussion", "about", "supported", "types", "and", "circular", "dependencies", "." ]
ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e
https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/container/DependencyProcessor.java#L62-L130
test
Gets the value of the given managed class from the stack trace.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") protected static Object getDependencyValue(ManagedClassSPI hostManagedClass, Class<?> type) { Stack<Class<?>> stackTrace = dependenciesStack.get(); if (stackTrace == null) { stackTrace = new Stack<>(); dependenciesSt...
playframework/playframework
core/play-java/src/main/java/play/libs/Comet.java
Comet.string
public static Flow<String, ByteString, NotUsed> string(String callbackName) { return Flow.of(String.class) .map( str -> { return ByteString.fromString("'" + StringEscapeUtils.escapeEcmaScript(str) + "'"); }) .via(flow(callbackName)); }
java
public static Flow<String, ByteString, NotUsed> string(String callbackName) { return Flow.of(String.class) .map( str -> { return ByteString.fromString("'" + StringEscapeUtils.escapeEcmaScript(str) + "'"); }) .via(flow(callbackName)); }
[ "public", "static", "Flow", "<", "String", ",", "ByteString", ",", "NotUsed", ">", "string", "(", "String", "callbackName", ")", "{", "return", "Flow", ".", "of", "(", "String", ".", "class", ")", ".", "map", "(", "str", "->", "{", "return", "ByteStrin...
Produces a Flow of escaped ByteString from a series of String elements. Calls out to Comet.flow internally. @param callbackName the javascript callback method. @return a flow of ByteString elements.
[ "Produces", "a", "Flow", "of", "escaped", "ByteString", "from", "a", "series", "of", "String", "elements", ".", "Calls", "out", "to", "Comet", ".", "flow", "internally", "." ]
3c46dca803d24e715d85de678c59dcfac9525a00
https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play-java/src/main/java/play/libs/Comet.java#L53-L60
test
A flow that returns a string consisting of a sequence of bytes.
Of course, here is the Java code you requested: ```java public static Flow<String, ByteString, NotUsed> string(String callbackName) { return Flow.of(String.class) .map( str -> { return ByteString.fromString("'" + StringEscapeUtils.escapeEcmaScript(str) + "'"); }) ...
jcodec/jcodec
src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java
SBR.sbr_channel_pair_element
private int sbr_channel_pair_element(IBitStream ld) throws AACException { int n, result; if(ld.readBool()) { //reserved ld.readBits(4); ld.readBits(4); } this.bs_coupling = ld.readBool(); if(this.bs_coupling) { if((result = sbr_grid(ld, 0))>0) return result; /* need to copy some data fr...
java
private int sbr_channel_pair_element(IBitStream ld) throws AACException { int n, result; if(ld.readBool()) { //reserved ld.readBits(4); ld.readBits(4); } this.bs_coupling = ld.readBool(); if(this.bs_coupling) { if((result = sbr_grid(ld, 0))>0) return result; /* need to copy some data fr...
[ "private", "int", "sbr_channel_pair_element", "(", "IBitStream", "ld", ")", "throws", "AACException", "{", "int", "n", ",", "result", ";", "if", "(", "ld", ".", "readBool", "(", ")", ")", "{", "//reserved", "ld", ".", "readBits", "(", "4", ")", ";", "l...
/* table 6
[ "/", "*", "table", "6" ]
cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75
https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java#L643-L782
test
read the element of the SBR channel pair.
Of course, here is the Java code you requested: ```java private int sbr_channel_pair_element(IBitStream ld) throws AACException { int n, result; if(ld.readBool()) { //reserved ld.readBits(4); ld.readBits(4); } this.bs_coupling = ld.readBool(); if(this.bs_coupling) { if((result = sbr_grid(ld, 0...
spring-projects/spring-security
web/src/main/java/org/springframework/security/web/csrf/CsrfLogoutHandler.java
CsrfLogoutHandler.logout
public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { this.csrfTokenRepository.saveToken(null, request, response); }
java
public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { this.csrfTokenRepository.saveToken(null, request, response); }
[ "public", "void", "logout", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "Authentication", "authentication", ")", "{", "this", ".", "csrfTokenRepository", ".", "saveToken", "(", "null", ",", "request", ",", "response", ")", ";...
Clears the {@link CsrfToken} @see org.springframework.security.web.authentication.logout.LogoutHandler#logout(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.springframework.security.core.Authentication)
[ "Clears", "the", "{", "@link", "CsrfToken", "}" ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/csrf/CsrfLogoutHandler.java#L51-L54
test
Logout the user.
Of course, here is the Java code you requested: ```java public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { this.csrfTokenRepository.saveToken(null, request, response); } ``` Hope this helps!
ReactiveX/RxJava
src/main/java/io/reactivex/Completable.java
Completable.ambWith
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable ambWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); return ambArray(this, other); }
java
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable ambWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); return ambArray(this, other); }
[ "@", "CheckReturnValue", "@", "NonNull", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Completable", "ambWith", "(", "CompletableSource", "other", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "other", ",", "\"othe...
Returns a Completable that emits the a terminated event of either this Completable or the other Completable whichever fires first. <p> <img width="640" height="484" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.ambWith.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code ambWith} ...
[ "Returns", "a", "Completable", "that", "emits", "the", "a", "terminated", "event", "of", "either", "this", "Completable", "or", "the", "other", "Completable", "whichever", "fires", "first", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "484", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Completable.java#L1055-L1061
test
Ambis the two completions.
Of course, here is the Java code you requested: ```java @CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable ambWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); return ambArray(this, other); } ``` Hope this hel...
orientechnologies/orientdb
core/src/main/java/com/orientechnologies/orient/core/record/ORecordAbstract.java
ORecordAbstract.removeListener
protected void removeListener(final ORecordListener listener) { if (_listeners != null) { _listeners.remove(listener); if (_listeners.isEmpty()) _listeners = null; } }
java
protected void removeListener(final ORecordListener listener) { if (_listeners != null) { _listeners.remove(listener); if (_listeners.isEmpty()) _listeners = null; } }
[ "protected", "void", "removeListener", "(", "final", "ORecordListener", "listener", ")", "{", "if", "(", "_listeners", "!=", "null", ")", "{", "_listeners", ".", "remove", "(", "listener", ")", ";", "if", "(", "_listeners", ".", "isEmpty", "(", ")", ")", ...
Remove the current event listener. @see ORecordListener
[ "Remove", "the", "current", "event", "listener", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/record/ORecordAbstract.java#L473-L479
test
Remove a listener from the list of listeners.
Of course, here is the Java code you requested: ```java protected void removeListener(final ORecordListener listener) { if (_listeners != null) { _listeners.remove(listener); if (_listeners.isEmpty()) _listeners = null; } } ``` Hope this helps!
streamsets/datacollector
container/src/main/java/com/streamsets/datacollector/validation/ValidationUtil.java
ValidationUtil.validateStageConfiguration
public static boolean validateStageConfiguration( StageLibraryTask stageLibrary, boolean shouldBeSource, StageConfiguration stageConf, boolean notOnMainCanvas, IssueCreator issueCreator, boolean isPipelineFragment, Map<String, Object> constants, List<Issue> issues ) { boolean previ...
java
public static boolean validateStageConfiguration( StageLibraryTask stageLibrary, boolean shouldBeSource, StageConfiguration stageConf, boolean notOnMainCanvas, IssueCreator issueCreator, boolean isPipelineFragment, Map<String, Object> constants, List<Issue> issues ) { boolean previ...
[ "public", "static", "boolean", "validateStageConfiguration", "(", "StageLibraryTask", "stageLibrary", ",", "boolean", "shouldBeSource", ",", "StageConfiguration", "stageConf", ",", "boolean", "notOnMainCanvas", ",", "IssueCreator", "issueCreator", ",", "boolean", "isPipelin...
Validate given stage configuration.
[ "Validate", "given", "stage", "configuration", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/container/src/main/java/com/streamsets/datacollector/validation/ValidationUtil.java#L138-L440
test
Validate the given stage configuration.
Of course, here is the Java code you requested: ```java public static boolean validateStageConfiguration( StageLibraryTask stageLibrary, boolean shouldBeSource, StageConfiguration stageConf, boolean notOnMainCanvas, IssueCreator issueCreator, boolean isPipelineFragment, Map<String, Object> ...
jcodec/jcodec
src/main/java/org/jcodec/api/FrameGrab.java
FrameGrab.getNativeFrameAtFrame
public static Picture getNativeFrameAtFrame(SeekableDemuxerTrack vt, ContainerAdaptor decoder, int frameNumber) throws IOException, JCodecException { return new FrameGrab(vt, decoder).seekToFramePrecise(frameNumber).getNativeFrame(); }
java
public static Picture getNativeFrameAtFrame(SeekableDemuxerTrack vt, ContainerAdaptor decoder, int frameNumber) throws IOException, JCodecException { return new FrameGrab(vt, decoder).seekToFramePrecise(frameNumber).getNativeFrame(); }
[ "public", "static", "Picture", "getNativeFrameAtFrame", "(", "SeekableDemuxerTrack", "vt", ",", "ContainerAdaptor", "decoder", ",", "int", "frameNumber", ")", "throws", "IOException", ",", "JCodecException", "{", "return", "new", "FrameGrab", "(", "vt", ",", "decode...
Get a specified frame by number from an already open demuxer track @param vt @param decoder @param frameNumber @return @throws IOException @throws JCodecException
[ "Get", "a", "specified", "frame", "by", "number", "from", "an", "already", "open", "demuxer", "track" ]
cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75
https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/org/jcodec/api/FrameGrab.java#L325-L328
test
Get the native frame at the specified frame number.
Of course, here is the Java code you requested: ```java public static Picture getNativeFrameAtFrame(SeekableDemuxerTrack vt, ContainerAdaptor decoder, int frameNumber) throws IOException, JCodecException { return new FrameGrab(vt, decoder).seekToFramePrecise(frameNumber).getNativeFrame(); } ```...
ReactiveX/RxJava
src/main/java/io/reactivex/Single.java
Single.timer
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single<Long> timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); ObjectHelper.requireNonNull(scheduler, "scheduler is null"); r...
java
@CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single<Long> timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); ObjectHelper.requireNonNull(scheduler, "scheduler is null"); r...
[ "@", "CheckReturnValue", "@", "NonNull", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "static", "Single", "<", "Long", ">", "timer", "(", "final", "long", "delay", ",", "final", "TimeUnit", "unit", ",", "final", "Scheduler", ...
Signals success with 0L value after the given delay for each SingleObserver. <p> <img width="640" height="292" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.timer.s.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>you specify the {@link Scheduler} to signal on.</dd> </dl> @param delay the...
[ "Signals", "success", "with", "0L", "value", "after", "the", "given", "delay", "for", "each", "SingleObserver", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "292", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Single.java#L1338-L1345
test
Creates a timer with the specified delay and unit.
Of course, here is the Java code you requested: ```java @CheckReturnValue @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single<Long> timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); ObjectHelper....
amedia/meteo
meteo-jaxb/src/main/java/no/api/meteo/jaxb/probabilityforecast/v1_1/ObjectFactory.java
ObjectFactory.createLocationTypeProbability
@XmlElementDecl(namespace = "", name = "probability", scope = LocationType.class) public JAXBElement<Probability> createLocationTypeProbability(Probability value) { return new JAXBElement<Probability>(_LocationTypeProbability_QNAME, Probability.class, LocationType.class, value); }
java
@XmlElementDecl(namespace = "", name = "probability", scope = LocationType.class) public JAXBElement<Probability> createLocationTypeProbability(Probability value) { return new JAXBElement<Probability>(_LocationTypeProbability_QNAME, Probability.class, LocationType.class, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"\"", ",", "name", "=", "\"probability\"", ",", "scope", "=", "LocationType", ".", "class", ")", "public", "JAXBElement", "<", "Probability", ">", "createLocationTypeProbability", "(", "Probability", "value", ")", ...
Create an instance of {@link JAXBElement }{@code <}{@link Probability }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "Probability", "}", "{", "@code", ">", "}}" ]
cbb59e1c2f889d15c24f3625d1769b543d4af595
https://github.com/amedia/meteo/blob/cbb59e1c2f889d15c24f3625d1769b543d4af595/meteo-jaxb/src/main/java/no/api/meteo/jaxb/probabilityforecast/v1_1/ObjectFactory.java#L446-L449
test
Create an instance of the appropriate type of probability for a LocationType.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "", name = "probability", scope = LocationType.class) public JAXBElement<Probability> createLocationTypeProbability(Probability value) { return new JAXBElement<Probability>(_LocationTypeProbability_QNAME, Probability.class,...
Unidata/thredds
grib/src/main/java/ucar/nc2/grib/collection/GribCdmIndex.java
GribCdmIndex.makeTopIndexFileFromConfig
private static File makeTopIndexFileFromConfig(FeatureCollectionConfig config) { Formatter errlog = new Formatter(); CollectionSpecParser specp = config.getCollectionSpecParser(errlog); String name = StringUtil2.replace(config.collectionName, '\\', "/"); // String cname = DirectoryCollection.makeCollec...
java
private static File makeTopIndexFileFromConfig(FeatureCollectionConfig config) { Formatter errlog = new Formatter(); CollectionSpecParser specp = config.getCollectionSpecParser(errlog); String name = StringUtil2.replace(config.collectionName, '\\', "/"); // String cname = DirectoryCollection.makeCollec...
[ "private", "static", "File", "makeTopIndexFileFromConfig", "(", "FeatureCollectionConfig", "config", ")", "{", "Formatter", "errlog", "=", "new", "Formatter", "(", ")", ";", "CollectionSpecParser", "specp", "=", "config", ".", "getCollectionSpecParser", "(", "errlog",...
This is only used for the top level GribCollection. @param config use this FeatureCollectionConfig @return index File
[ "This", "is", "only", "used", "for", "the", "top", "level", "GribCollection", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/collection/GribCdmIndex.java#L110-L118
test
Create the top index file from the feature collection config.
Of course, here is the Java code you requested: ```java private static File makeTopIndexFileFromConfig(FeatureCollectionConfig config) { Formatter errlog = new Formatter(); CollectionSpecParser specp = config.getCollectionSpecParser(errlog); String name = StringUtil2.replace(config.collectionName, '\\', "...
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel1.java
BaseLevel1.copy
@Override public void copy(IComplexNDArray x, IComplexNDArray y) { if (x.data().dataType() == DataBuffer.Type.DOUBLE) zcopy(x.length(), x, BlasBufferUtil.getBlasStride(x), y, BlasBufferUtil.getBlasStride(y)); else ccopy(x.length(), x, BlasBufferUtil.getBlasStride(x), y, BlasB...
java
@Override public void copy(IComplexNDArray x, IComplexNDArray y) { if (x.data().dataType() == DataBuffer.Type.DOUBLE) zcopy(x.length(), x, BlasBufferUtil.getBlasStride(x), y, BlasBufferUtil.getBlasStride(y)); else ccopy(x.length(), x, BlasBufferUtil.getBlasStride(x), y, BlasB...
[ "@", "Override", "public", "void", "copy", "(", "IComplexNDArray", "x", ",", "IComplexNDArray", "y", ")", "{", "if", "(", "x", ".", "data", "(", ")", ".", "dataType", "(", ")", "==", "DataBuffer", ".", "Type", ".", "DOUBLE", ")", "zcopy", "(", "x", ...
copy a vector to another vector. @param x @param y
[ "copy", "a", "vector", "to", "another", "vector", "." ]
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel1.java#L377-L383
test
Copy the complex elements of two arrays.
Of course, here is the Java code you requested: ```java @Override public void copy(IComplexNDArray x, IComplexNDArray y) { if (x.data().dataType() == DataBuffer.Type.DOUBLE) zcopy(x.length(), x, BlasBufferUtil.getBlasStride(x), y, BlasBufferUtil.getBlasStride(y)); else ccopy...
rupertlssmith/lojix
base/common/src/main/com/thesett/common/util/CommandLineParser.java
CommandLineParser.addOptionsToProperties
public void addOptionsToProperties(Properties properties) { if (parsedProperties != null) { for (Object propKey : parsedProperties.keySet()) { String name = (String) propKey; String value = parsedProperties.getProperty(name); /...
java
public void addOptionsToProperties(Properties properties) { if (parsedProperties != null) { for (Object propKey : parsedProperties.keySet()) { String name = (String) propKey; String value = parsedProperties.getProperty(name); /...
[ "public", "void", "addOptionsToProperties", "(", "Properties", "properties", ")", "{", "if", "(", "parsedProperties", "!=", "null", ")", "{", "for", "(", "Object", "propKey", ":", "parsedProperties", ".", "keySet", "(", ")", ")", "{", "String", "name", "=", ...
If a command line has been parsed, calling this method sets all of its options that were set to the specified properties. @param properties The property set to the options to.
[ "If", "a", "command", "line", "has", "been", "parsed", "calling", "this", "method", "sets", "all", "of", "its", "options", "that", "were", "set", "to", "the", "specified", "properties", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/CommandLineParser.java#L589-L605
test
Add options to the properties.
Of course, here is the Java code you requested: ```java public void addOptionsToProperties(Properties properties) { if (parsedProperties != null) { for (Object propKey : parsedProperties.keySet()) { String name = (String) propKey; String value...
Unidata/thredds
tds/src/main/java/thredds/server/wfs/WFSController.java
WFSController.getFeature
private WFSExceptionWriter getFeature(PrintWriter out, HttpServletRequest hsreq, SimpleGeometryCSBuilder sgcs, String ftName, String fullFtName) { List<SimpleGeometry> geometryList = new ArrayList<SimpleGeometry>(); GeometryType geoT = sgcs.getGeometryType(ftName); if(geoT == null){ return new ...
java
private WFSExceptionWriter getFeature(PrintWriter out, HttpServletRequest hsreq, SimpleGeometryCSBuilder sgcs, String ftName, String fullFtName) { List<SimpleGeometry> geometryList = new ArrayList<SimpleGeometry>(); GeometryType geoT = sgcs.getGeometryType(ftName); if(geoT == null){ return new ...
[ "private", "WFSExceptionWriter", "getFeature", "(", "PrintWriter", "out", ",", "HttpServletRequest", "hsreq", ",", "SimpleGeometryCSBuilder", "sgcs", ",", "String", "ftName", ",", "String", "fullFtName", ")", "{", "List", "<", "SimpleGeometry", ">", "geometryList", ...
Processes GetFeature requests. @param out @return
[ "Processes", "GetFeature", "requests", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/tds/src/main/java/thredds/server/wfs/WFSController.java#L99-L161
test
Gets the feature information from the specified feature type.
Of course, here is the Java code you requested: ```java private WFSExceptionWriter getFeature(PrintWriter out, HttpServletRequest hsreq, SimpleGeometryCSBuilder sgcs, String ftName, String fullFtName) { List<SimpleGeometry> geometryList = new ArrayList<SimpleGeometry>(); GeometryType geoT = sgcs.getGeome...
rest-assured/rest-assured
rest-assured/src/main/java/io/restassured/config/HttpClientConfig.java
HttpClientConfig.httpClientFactory
public HttpClientConfig httpClientFactory(HttpClientFactory httpClientFactory) { return new HttpClientConfig(httpClientFactory, httpClientParams, httpMultipartMode, shouldReuseHttpClientInstance, NO_HTTP_CLIENT, true); }
java
public HttpClientConfig httpClientFactory(HttpClientFactory httpClientFactory) { return new HttpClientConfig(httpClientFactory, httpClientParams, httpMultipartMode, shouldReuseHttpClientInstance, NO_HTTP_CLIENT, true); }
[ "public", "HttpClientConfig", "httpClientFactory", "(", "HttpClientFactory", "httpClientFactory", ")", "{", "return", "new", "HttpClientConfig", "(", "httpClientFactory", ",", "httpClientParams", ",", "httpMultipartMode", ",", "shouldReuseHttpClientInstance", ",", "NO_HTTP_CL...
Set the http client factory that Rest Assured should use when making request. For each request REST Assured will invoke the factory to get the a the HttpClient instance. @param httpClientFactory The http client factory to use. @return An updated HttpClientConfig
[ "Set", "the", "http", "client", "factory", "that", "Rest", "Assured", "should", "use", "when", "making", "request", ".", "For", "each", "request", "REST", "Assured", "will", "invoke", "the", "factory", "to", "get", "the", "a", "the", "HttpClient", "instance"...
165a85b65070f5a07fe0045175613fb2c2811642
https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/config/HttpClientConfig.java#L222-L224
test
The HttpClientFactory to use for creating HttpClientConfig objects.
Of course, here is the Java code you requested: ```java public HttpClientConfig httpClientFactory(HttpClientFactory httpClientFactory) { return new HttpClientConfig(httpClientFactory, httpClientParams, httpMultipartMode, shouldReuseHttpClientInstance, NO_HTTP_CLIENT, true); } ``` Hope this helps!
jboss/jboss-common-core
src/main/java/org/jboss/util/xml/catalog/CatalogManager.java
CatalogManager.queryAllowOasisXMLCatalogPI
public boolean queryAllowOasisXMLCatalogPI () { String allow = System.getProperty(pAllowPI); if (allow == null) { if (resources==null) readProperties(); if (resources==null) return defaultOasisXMLCatalogPI; try { allow = resources.getString("allow-oasis-xml-catalog-pi"); } catch (Missi...
java
public boolean queryAllowOasisXMLCatalogPI () { String allow = System.getProperty(pAllowPI); if (allow == null) { if (resources==null) readProperties(); if (resources==null) return defaultOasisXMLCatalogPI; try { allow = resources.getString("allow-oasis-xml-catalog-pi"); } catch (Missi...
[ "public", "boolean", "queryAllowOasisXMLCatalogPI", "(", ")", "{", "String", "allow", "=", "System", ".", "getProperty", "(", "pAllowPI", ")", ";", "if", "(", "allow", "==", "null", ")", "{", "if", "(", "resources", "==", "null", ")", "readProperties", "("...
<p>Obtain the oasisXMLCatalogPI setting from the properties.</p> <p>In the properties, a value of 'yes', 'true', or '1' is considered true, anything else is false.</p> @return The oasisXMLCatalogPI setting from the propertyFile or the defaultOasisXMLCatalogPI.
[ "<p", ">", "Obtain", "the", "oasisXMLCatalogPI", "setting", "from", "the", "properties", ".", "<", "/", "p", ">" ]
c191bb18db83fa106c6913cf34ed47989b65dc97
https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/xml/catalog/CatalogManager.java#L738-L758
test
Query whether the user has permission to access the XML catalog PI.
Of course, here is the Java code you requested: ```java public boolean queryAllowOasisXMLCatalogPI () { String allow = System.getProperty(pAllowPI); if (allow == null) { if (resources==null) readProperties(); if (resources==null) return defaultOasisXMLCatalogPI; try { allow = resources.getS...
braintree/braintree_android
Core/src/main/java/com/braintreepayments/api/internal/HttpClient.java
HttpClient.post
public void post(final String path, final String data, final HttpResponseCallback callback) { if (path == null) { postCallbackOnMainThread(callback, new IllegalArgumentException("Path cannot be null")); return; } mThreadPool.submit(new Runnable() { @Override ...
java
public void post(final String path, final String data, final HttpResponseCallback callback) { if (path == null) { postCallbackOnMainThread(callback, new IllegalArgumentException("Path cannot be null")); return; } mThreadPool.submit(new Runnable() { @Override ...
[ "public", "void", "post", "(", "final", "String", "path", ",", "final", "String", "data", ",", "final", "HttpResponseCallback", "callback", ")", "{", "if", "(", "path", "==", "null", ")", "{", "postCallbackOnMainThread", "(", "callback", ",", "new", "Illegal...
Make a HTTP POST request using the base url and path provided. If the path is a full url, it will be used instead of the previously provided url. @param path The path or url to request from the server via HTTP POST @param data The body of the POST request @param callback The {@link HttpResponseCallback} to receive the...
[ "Make", "a", "HTTP", "POST", "request", "using", "the", "base", "url", "and", "path", "provided", ".", "If", "the", "path", "is", "a", "full", "url", "it", "will", "be", "used", "instead", "of", "the", "previously", "provided", "url", "." ]
07b32e6fad73f9fb8432971b0e79fc8c94b11873
https://github.com/braintree/braintree_android/blob/07b32e6fad73f9fb8432971b0e79fc8c94b11873/Core/src/main/java/com/braintreepayments/api/internal/HttpClient.java#L176-L192
test
Post a string to a URL using HTTP POST method.
Of course, here is the Java code you requested: ```java public void post(final String path, final String data, final HttpResponseCallback callback) { if (path == null) { postCallbackOnMainThread(callback, new IllegalArgumentException("Path cannot be null")); return; } m...
RestComm/jain-slee
container/resource/src/main/java/org/mobicents/slee/resource/ResourceAdaptorObjectImpl.java
ResourceAdaptorObjectImpl.setResourceAdaptorContext
public void setResourceAdaptorContext(ResourceAdaptorContext context) throws InvalidStateException { if (doTraceLogs) { logger.trace("setResourceAdaptorContext( context = " + context + " )"); } if (state == null) { state = ResourceAdaptorObjectState.UNCONFIGURED; object.setResourceAdaptorContex...
java
public void setResourceAdaptorContext(ResourceAdaptorContext context) throws InvalidStateException { if (doTraceLogs) { logger.trace("setResourceAdaptorContext( context = " + context + " )"); } if (state == null) { state = ResourceAdaptorObjectState.UNCONFIGURED; object.setResourceAdaptorContex...
[ "public", "void", "setResourceAdaptorContext", "(", "ResourceAdaptorContext", "context", ")", "throws", "InvalidStateException", "{", "if", "(", "doTraceLogs", ")", "{", "logger", ".", "trace", "(", "\"setResourceAdaptorContext( context = \"", "+", "context", "+", "\" )...
/* (non-Javadoc) @see org.mobicents.slee.container.resource.ResourceAdaptorObject# setResourceAdaptorContext(javax.slee.resource.ResourceAdaptorContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/resource/src/main/java/org/mobicents/slee/resource/ResourceAdaptorObjectImpl.java#L117-L131
test
Sets the resource adaptor context.
Of course, here is the Java code you requested: ```java public void setResourceAdaptorContext(ResourceAdaptorContext context) throws InvalidStateException { if (doTraceLogs) { logger.trace("setResourceAdaptorContext( context = " + context + " )"); } if (state == null) { state = ResourceAdaptorObj...
DDTH/ddth-cql-utils
src/main/java/com/github/ddth/cql/DseSessionManager.java
DseSessionManager.getCluster
public DseCluster getCluster(String hostsAndPorts, String username, String password, String authorizationId) { return getCluster( ClusterIdentifier.getInstance(hostsAndPorts, username, password, authorizationId)); }
java
public DseCluster getCluster(String hostsAndPorts, String username, String password, String authorizationId) { return getCluster( ClusterIdentifier.getInstance(hostsAndPorts, username, password, authorizationId)); }
[ "public", "DseCluster", "getCluster", "(", "String", "hostsAndPorts", ",", "String", "username", ",", "String", "password", ",", "String", "authorizationId", ")", "{", "return", "getCluster", "(", "ClusterIdentifier", ".", "getInstance", "(", "hostsAndPorts", ",", ...
Obtain a DSE cluster instance. @param hostsAndPorts format: "host1:port1,host2,host3:port3". If no port is specified, the {@link CqlUtils#DEFAULT_CASSANDRA_PORT} is used. @param username @param password @param authorizationId DSE allows a user to connect as another user or role, provide the name of the user/role you w...
[ "Obtain", "a", "DSE", "cluster", "instance", "." ]
debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489
https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/DseSessionManager.java#L151-L155
test
Get a DSE Cluster object from the hostsAndPorts username password and authorizationId
Of course, here is the Java code you requested: ```java public DseCluster getCluster(String hostsAndPorts, String username, String password, String authorizationId) { return getCluster( ClusterIdentifier.getInstance(hostsAndPorts, username, password, authorizationId)); } ``` Ho...
WASdev/ci.common
src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java
InstallFeatureUtil.getConfigDropinsFeatures
private Set<String> getConfigDropinsFeatures(Set<String> origResult, File serverDirectory, String folderName) { Set<String> result = origResult; File configDropinsFolder; try { configDropinsFolder = new File(new File(serverDirectory, "configDropins"), folderName).getCanonicalFile(); ...
java
private Set<String> getConfigDropinsFeatures(Set<String> origResult, File serverDirectory, String folderName) { Set<String> result = origResult; File configDropinsFolder; try { configDropinsFolder = new File(new File(serverDirectory, "configDropins"), folderName).getCanonicalFile(); ...
[ "private", "Set", "<", "String", ">", "getConfigDropinsFeatures", "(", "Set", "<", "String", ">", "origResult", ",", "File", "serverDirectory", ",", "String", "folderName", ")", "{", "Set", "<", "String", ">", "result", "=", "origResult", ";", "File", "confi...
Gets features from the configDropins's defaults or overrides directory @param origResult The features that have been parsed so far. @param serverDirectory The server directory @param folderName The folder under configDropins: either "defaults" or "overrides" @return The set of features to install, or empty set if the ...
[ "Gets", "features", "from", "the", "configDropins", "s", "defaults", "or", "overrides", "directory" ]
24fc917383e9ff60ea6a42972c86577fe0f4591e
https://github.com/WASdev/ci.common/blob/24fc917383e9ff60ea6a42972c86577fe0f4591e/src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java#L220-L256
test
Get the features from the configDropins directory.
Of course, here is the Java code you requested: ```java private Set<String> getConfigDropinsFeatures(Set<String> origResult, File serverDirectory, String folderName) { Set<String> result = origResult; File configDropinsFolder; try { configDropinsFolder = new File(new File(serverDire...
rest-assured/rest-assured
rest-assured/src/main/java/io/restassured/RestAssured.java
RestAssured.trustStore
public static void trustStore(File pathToJks, String password) { Validate.notNull(pathToJks, "Path to JKS on the file system cannot be null"); applyTrustStore(pathToJks, password); }
java
public static void trustStore(File pathToJks, String password) { Validate.notNull(pathToJks, "Path to JKS on the file system cannot be null"); applyTrustStore(pathToJks, password); }
[ "public", "static", "void", "trustStore", "(", "File", "pathToJks", ",", "String", "password", ")", "{", "Validate", ".", "notNull", "(", "pathToJks", ",", "\"Path to JKS on the file system cannot be null\"", ")", ";", "applyTrustStore", "(", "pathToJks", ",", "pass...
Use a trust store located on the file-system. See {@link #trustStore(String, String)} for more details. * <p> Note that this is just a shortcut for: </p> <pre> RestAssured.config = RestAssured.config().sslConfig(sslConfig().trustStore(pathToJks, password)); </pre> @param pathToJks The path to JKS file on the file-syst...
[ "Use", "a", "trust", "store", "located", "on", "the", "file", "-", "system", ".", "See", "{", "@link", "#trustStore", "(", "String", "String", ")", "}", "for", "more", "details", ".", "*", "<p", ">", "Note", "that", "this", "is", "just", "a", "shortc...
165a85b65070f5a07fe0045175613fb2c2811642
https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/RestAssured.java#L1685-L1688
test
Apply trust store to the file system.
Of course, here is the Java code you requested: ```java public static void trustStore(File pathToJks, String password) { Validate.notNull(pathToJks, "Path to JKS on the file system cannot be null"); applyTrustStore(pathToJks, password); } ``` Hope this helps!
eclipse/packagedrone
bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java
Parser.parsePageDirective
private void parsePageDirective(Node parent) throws JasperException { Attributes attrs = parseAttributes(); Node.PageDirective n = new Node.PageDirective(attrs, start, parent); /* * A page directive may contain multiple 'import' attributes, each of * which consists of a comma-separated list of package names. ...
java
private void parsePageDirective(Node parent) throws JasperException { Attributes attrs = parseAttributes(); Node.PageDirective n = new Node.PageDirective(attrs, start, parent); /* * A page directive may contain multiple 'import' attributes, each of * which consists of a comma-separated list of package names. ...
[ "private", "void", "parsePageDirective", "(", "Node", "parent", ")", "throws", "JasperException", "{", "Attributes", "attrs", "=", "parseAttributes", "(", ")", ";", "Node", ".", "PageDirective", "n", "=", "new", "Node", ".", "PageDirective", "(", "attrs", ",",...
/* Parses a page directive with the following syntax: PageDirective ::= ( S Attribute)*
[ "/", "*", "Parses", "a", "page", "directive", "with", "the", "following", "syntax", ":", "PageDirective", "::", "=", "(", "S", "Attribute", ")", "*" ]
3869c1643cdc6f7cb8b26097a7b6994683b13d7e
https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java#L406-L420
test
Parse a page directive node.
Of course, here is the Java code you requested: ```java private void parsePageDirective(Node parent) throws JasperException { Attributes attrs = parseAttributes(); Node.PageDirective n = new Node.PageDirective(attrs, start, parent); /* * A page directive may contain multiple 'import' attributes, each of * whic...
ReactiveX/RxJava
src/main/java/io/reactivex/Flowable.java
Flowable.intervalRange
@CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) { return intervalRange(start, count, initialDelay, period, unit, Schedulers...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) { return intervalRange(start, count, initialDelay, period, unit, Schedulers...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "ERROR", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "COMPUTATION", ")", "public", "static", "Flowable", "<", "Long", ">", "intervalRange", "(", "long", "start", ","...
Signals a range of long values, the first after some initial delay and the rest periodically after. <p> The sequence completes immediately after the last value (start + count - 1) has been reached. <dl> <dt><b>Backpressure:</b></dt> <dd>The operator signals a {@code MissingBackpressureException} if the downstream can't...
[ "Signals", "a", "range", "of", "long", "values", "the", "first", "after", "some", "initial", "delay", "and", "the", "rest", "periodically", "after", ".", "<p", ">", "The", "sequence", "completes", "immediately", "after", "the", "last", "value", "(", "start",...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L2552-L2557
test
Create an interval range of tokens from a sequence of tokens.
Of course, here is the Java code you requested: ```java @CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.COMPUTATION) public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit) { return intervalR...
wildfly/wildfly
iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/UrlUtil.java
UrlUtil.encode
public static String encode(String s, String enc) throws UnsupportedEncodingException { byte[] bytes = s.getBytes(enc); int count = bytes.length; /* * From RFC 2396: * * mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" * reserved = ...
java
public static String encode(String s, String enc) throws UnsupportedEncodingException { byte[] bytes = s.getBytes(enc); int count = bytes.length; /* * From RFC 2396: * * mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")" * reserved = ...
[ "public", "static", "String", "encode", "(", "String", "s", ",", "String", "enc", ")", "throws", "UnsupportedEncodingException", "{", "byte", "[", "]", "bytes", "=", "s", ".", "getBytes", "(", "enc", ")", ";", "int", "count", "=", "bytes", ".", "length",...
Encode a string for inclusion in a URI (according to RFC 2396). <p/> Unsafe characters are escaped by encoding them in three-character sequences '%xy', where 'xy' is the two-digit hexadecimal representation of the lower 8-bits of the character. <p/> The question mark '?' character is also escaped, as required by RFC 22...
[ "Encode", "a", "string", "for", "inclusion", "in", "a", "URI", "(", "according", "to", "RFC", "2396", ")", ".", "<p", "/", ">", "Unsafe", "characters", "are", "escaped", "by", "encoding", "them", "in", "three", "-", "character", "sequences", "%xy", "wher...
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/UrlUtil.java#L104-L133
test
Encode a String to a Base64 String.
Of course, here is the Java code you requested: ```java public static String encode(String s, String enc) throws UnsupportedEncodingException { byte[] bytes = s.getBytes(enc); int count = bytes.length; /* * From RFC 2396: * * mark = "-" | "_" | "." |...
oblac/jodd
jodd-servlet/src/main/java/jodd/servlet/DispatcherUtil.java
DispatcherUtil.isPageIncluded
public static boolean isPageIncluded(final HttpServletRequest request, final HttpServletResponse response) { return (response.isCommitted() || (getIncludeServletPath(request) != null)); }
java
public static boolean isPageIncluded(final HttpServletRequest request, final HttpServletResponse response) { return (response.isCommitted() || (getIncludeServletPath(request) != null)); }
[ "public", "static", "boolean", "isPageIncluded", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ")", "{", "return", "(", "response", ".", "isCommitted", "(", ")", "||", "(", "getIncludeServletPath", "(", "request", ...
Returns <code>true</code> if current page is included.
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "current", "page", "is", "included", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-servlet/src/main/java/jodd/servlet/DispatcherUtil.java#L266-L268
test
Check if the page is included in the response.
Of course, here is the Java code you requested: ```java public static boolean isPageIncluded(final HttpServletRequest request, final HttpServletResponse response) { return (response.isCommitted() || (getIncludeServletPath(request) != null)); } ``` Hope this helps!
rupertlssmith/lojix
lojix/logic/src/main/com/thesett/aima/logic/fol/isoprologparser/DynamicOperatorParser.java
DynamicOperatorParser.setOperator
public void setOperator(int name, String textName, int priority, OpSymbol.Associativity associativity) { // Check that the name of the operator is valid. // Check that the priority of the operator is valid. if ((priority < 0) || (priority > 1200)) { throw new IllegalArgu...
java
public void setOperator(int name, String textName, int priority, OpSymbol.Associativity associativity) { // Check that the name of the operator is valid. // Check that the priority of the operator is valid. if ((priority < 0) || (priority > 1200)) { throw new IllegalArgu...
[ "public", "void", "setOperator", "(", "int", "name", ",", "String", "textName", ",", "int", "priority", ",", "OpSymbol", ".", "Associativity", "associativity", ")", "{", "// Check that the name of the operator is valid.", "// Check that the priority of the operator is valid."...
Sets the priority and associativity of a named operator in this table. This method may be used to remove operators by some implementations, through a special setting of the priority value. A priority value of zero will remove any existing operator matching the fixity of the one specified (that is pre, or post/infix). T...
[ "Sets", "the", "priority", "and", "associativity", "of", "a", "named", "operator", "in", "this", "table", ".", "This", "method", "may", "be", "used", "to", "remove", "operators", "by", "some", "implementations", "through", "a", "special", "setting", "of", "t...
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/logic/src/main/com/thesett/aima/logic/fol/isoprologparser/DynamicOperatorParser.java#L363-L427
test
Sets the operator.
Of course, here is the Java code you requested: ```java public void setOperator(int name, String textName, int priority, OpSymbol.Associativity associativity) { // Check that the name of the operator is valid. // Check that the priority of the operator is valid. if ((priority < 0) || (prio...
playframework/playframework
core/play/src/main/java/play/Logger.java
Logger.debug
@Deprecated public static void debug(String message, Supplier<?>... args) { logger.debug(message, args); }
java
@Deprecated public static void debug(String message, Supplier<?>... args) { logger.debug(message, args); }
[ "@", "Deprecated", "public", "static", "void", "debug", "(", "String", "message", ",", "Supplier", "<", "?", ">", "...", "args", ")", "{", "logger", ".", "debug", "(", "message", ",", "args", ")", ";", "}" ]
Log a message with the DEBUG level. @param message message to log @param args Suppliers that contain arguments to apply to the message String @deprecated Deprecated as of 2.7.0. Create an instance of {@link ALogger} via {@link #of(String)} / {@link #of(Class)} and use the same-named method. Or use SLF4J directly.
[ "Log", "a", "message", "with", "the", "DEBUG", "level", "." ]
3c46dca803d24e715d85de678c59dcfac9525a00
https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play/src/main/java/play/Logger.java#L252-L255
test
Debug method.
Of course, here is the Java code you requested: ```java @Deprecated public static void debug(String message, Supplier<?>... args) { logger.debug(message, args); } ``` Hope this helps!
OpenEstate/OpenEstate-IO
ImmoXML/src/main/jaxb/org/openestate/io/immoxml/xml/ObjectFactory.java
ObjectFactory.createTelZentrale
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "tel_zentrale") public JAXBElement<String> createTelZentrale(String value) { return new JAXBElement<String>(_TelZentrale_QNAME, String.class, null, value); }
java
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "tel_zentrale") public JAXBElement<String> createTelZentrale(String value) { return new JAXBElement<String>(_TelZentrale_QNAME, String.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"http://www.immoxml.de\"", ",", "name", "=", "\"tel_zentrale\"", ")", "public", "JAXBElement", "<", "String", ">", "createTelZentrale", "(", "String", "value", ")", "{", "return", "new", "JAXBElement", "<", "String",...
Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "String", "}", "{", "@code", ">", "}}" ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/ImmoXML/src/main/jaxb/org/openestate/io/immoxml/xml/ObjectFactory.java#L1027-L1030
test
Create an instance of a tel_zentrale property.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://www.immoxml.de", name = "tel_zentrale") public JAXBElement<String> createTelZentrale(String value) { return new JAXBElement<String>(_TelZentrale_QNAME, String.class, null, value); } ``` Hope this helps!
Unidata/thredds
grib/src/main/java/ucar/nc2/grib/collection/Grib2PartitionBuilderFromIndex.java
Grib2PartitionBuilderFromIndex.openMutablePCFromIndex
@Nullable static PartitionCollectionMutable openMutablePCFromIndex(String name, RandomAccessFile raf, FeatureCollectionConfig config, org.slf4j.Logger logger) { Grib2PartitionBuilderFromIndex builder = new Grib2PartitionBuilderFromIndex(name, config, logger); if (builder.readIndex(raf)) return bu...
java
@Nullable static PartitionCollectionMutable openMutablePCFromIndex(String name, RandomAccessFile raf, FeatureCollectionConfig config, org.slf4j.Logger logger) { Grib2PartitionBuilderFromIndex builder = new Grib2PartitionBuilderFromIndex(name, config, logger); if (builder.readIndex(raf)) return bu...
[ "@", "Nullable", "static", "PartitionCollectionMutable", "openMutablePCFromIndex", "(", "String", "name", ",", "RandomAccessFile", "raf", ",", "FeatureCollectionConfig", "config", ",", "org", ".", "slf4j", ".", "Logger", "logger", ")", "{", "Grib2PartitionBuilderFromInd...
read in the index, index raf already open; return null on failure
[ "read", "in", "the", "index", "index", "raf", "already", "open", ";", "return", "null", "on", "failure" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/collection/Grib2PartitionBuilderFromIndex.java#L37-L46
test
Open a Mutable PC from the index.
Of course, here is the Java code you requested: ```java @Nullable static PartitionCollectionMutable openMutablePCFromIndex(String name, RandomAccessFile raf, FeatureCollectionConfig config, org.slf4j.Logger logger) { Grib2PartitionBuilderFromIndex builder = new Grib2PartitionBuilderFromIndex(name, config,...
Unidata/thredds
legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java
NetcdfFileWriteable.addVariable
public Variable addVariable(String varName, DataType dataType, Dimension[] dims) { ArrayList<Dimension> list = new ArrayList<Dimension>(); list.addAll(Arrays.asList(dims)); return addVariable(varName, dataType, list); }
java
public Variable addVariable(String varName, DataType dataType, Dimension[] dims) { ArrayList<Dimension> list = new ArrayList<Dimension>(); list.addAll(Arrays.asList(dims)); return addVariable(varName, dataType, list); }
[ "public", "Variable", "addVariable", "(", "String", "varName", ",", "DataType", "dataType", ",", "Dimension", "[", "]", "dims", ")", "{", "ArrayList", "<", "Dimension", ">", "list", "=", "new", "ArrayList", "<", "Dimension", ">", "(", ")", ";", "list", "...
Add a variable to the file. Must be in define mode. @param varName name of Variable, must be unique with the file. @param dataType type of underlying element @param dims array of Dimensions for the variable, must already have been added. Use an array of length 0 for a scalar variable. @return the Variable that ha...
[ "Add", "a", "variable", "to", "the", "file", ".", "Must", "be", "in", "define", "mode", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/ucar/nc2/NetcdfFileWriteable.java#L365-L369
test
Add a variable to the container.
Of course, here is the Java code you requested: ```java public Variable addVariable(String varName, DataType dataType, Dimension[] dims) { ArrayList<Dimension> list = new ArrayList<Dimension>(); list.addAll(Arrays.asList(dims)); return addVariable(varName, dataType, list); } ``` Hope this helps!
wildfly/wildfly
connector/src/main/java/org/jboss/as/connector/util/SecurityActions.java
SecurityActions.getConstructor
static Constructor<?> getConstructor(final Class<?> c, final Class<?>... params) throws NoSuchMethodException { if (System.getSecurityManager() == null) return c.getConstructor(params); Constructor<?> result = AccessController.doPrivileged(new PrivilegedAction<Constructor<?>>() ...
java
static Constructor<?> getConstructor(final Class<?> c, final Class<?>... params) throws NoSuchMethodException { if (System.getSecurityManager() == null) return c.getConstructor(params); Constructor<?> result = AccessController.doPrivileged(new PrivilegedAction<Constructor<?>>() ...
[ "static", "Constructor", "<", "?", ">", "getConstructor", "(", "final", "Class", "<", "?", ">", "c", ",", "final", "Class", "<", "?", ">", "...", "params", ")", "throws", "NoSuchMethodException", "{", "if", "(", "System", ".", "getSecurityManager", "(", ...
Get the constructor @param c The class @param params The parameters @return The constructor @throws NoSuchMethodException If a matching method is not found.
[ "Get", "the", "constructor" ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/connector/src/main/java/org/jboss/as/connector/util/SecurityActions.java#L104-L123
test
Get the Constructor of a class.
Of course, here is the Java code you requested: ```java static Constructor<?> getConstructor(final Class<?> c, final Class<?>... params) throws NoSuchMethodException { if (System.getSecurityManager() == null) return c.getConstructor(params); Constructor<?> result = AccessContro...
workplacesystems/utilsj
src/main/java/com/workplacesystems/utilsj/collections/TransactionalBidiTreeMap.java
TransactionalBidiTreeMap.isRed
private static <K,V> boolean isRed(final Node<K,V> node, final int index) { return ((node == null) ? false : node.isRed(index)); }
java
private static <K,V> boolean isRed(final Node<K,V> node, final int index) { return ((node == null) ? false : node.isRed(index)); }
[ "private", "static", "<", "K", ",", "V", ">", "boolean", "isRed", "(", "final", "Node", "<", "K", ",", "V", ">", "node", ",", "final", "int", "index", ")", "{", "return", "(", "(", "node", "==", "null", ")", "?", "false", ":", "node", ".", "isR...
is the specified node red? if the node does not exist, no, it's black, thank you @param node the node (may be null) in question @param index KEY or VALUE
[ "is", "the", "specified", "node", "red?", "if", "the", "node", "does", "not", "exist", "no", "it", "s", "black", "thank", "you" ]
1b638be51997eafac4d368c14f62a16624a08d3e
https://github.com/workplacesystems/utilsj/blob/1b638be51997eafac4d368c14f62a16624a08d3e/src/main/java/com/workplacesystems/utilsj/collections/TransactionalBidiTreeMap.java#L1224-L1229
test
Checks if the node is red.
Of course, here is the Java code you requested: ```java private static <K,V> boolean isRed(final Node<K,V> node, final int index) { return ((node == null) ? false : node.isRed(index)); } ``` Hope this helps!
akquinet/chameRIA
chameria-service/src/main/java/de/akquinet/chameria/services/ActivationUtils.java
ActivationUtils.containsArgument
public static boolean containsArgument(String[] args, String arg) { if (args == null || arg == null || arg.length() == 0 || args.length == 0) { return false; } else { for (String a : args) { if (a.equalsIgnoreCase(arg)) { return true; ...
java
public static boolean containsArgument(String[] args, String arg) { if (args == null || arg == null || arg.length() == 0 || args.length == 0) { return false; } else { for (String a : args) { if (a.equalsIgnoreCase(arg)) { return true; ...
[ "public", "static", "boolean", "containsArgument", "(", "String", "[", "]", "args", ",", "String", "arg", ")", "{", "if", "(", "args", "==", "null", "||", "arg", "==", "null", "||", "arg", ".", "length", "(", ")", "==", "0", "||", "args", ".", "len...
Checks if the arguments contains the argument <code>arg</code>. @param args the arguments @param arg the argument to find @return <code>true</code> if the
[ "Checks", "if", "the", "arguments", "contains", "the", "argument", "<code", ">", "arg<", "/", "code", ">", "." ]
a5c154e0d0f70f24381db93d57b70364e6c2db0b
https://github.com/akquinet/chameRIA/blob/a5c154e0d0f70f24381db93d57b70364e6c2db0b/chameria-service/src/main/java/de/akquinet/chameria/services/ActivationUtils.java#L34-L48
test
Checks if the given argument contains a value.
Of course, here is the Java code you requested: ```java public static boolean containsArgument(String[] args, String arg) { if (args == null || arg == null || arg.length() == 0 || args.length == 0) { return false; } else { for (String a : args) { if (a.equal...
abmargb/jamppa
src/main/java/org/jivesoftware/smack/XMPPConnection.java
XMPPConnection.shutdown
protected void shutdown(Presence unavailablePresence) { // Set presence to offline. if (packetWriter != null) { packetWriter.sendPacket(unavailablePresence); } this.setWasAuthenticated(authenticated); authenticated = false; if (packetReader != null) { ...
java
protected void shutdown(Presence unavailablePresence) { // Set presence to offline. if (packetWriter != null) { packetWriter.sendPacket(unavailablePresence); } this.setWasAuthenticated(authenticated); authenticated = false; if (packetReader != null) { ...
[ "protected", "void", "shutdown", "(", "Presence", "unavailablePresence", ")", "{", "// Set presence to offline.", "if", "(", "packetWriter", "!=", "null", ")", "{", "packetWriter", ".", "sendPacket", "(", "unavailablePresence", ")", ";", "}", "this", ".", "setWasA...
Closes the connection by setting presence to unavailable then closing the stream to the XMPP server. The shutdown logic will be used during a planned disconnection or when dealing with an unexpected disconnection. Unlike {@link #disconnect()} the connection's packet reader, packet writer, and {@link UserRoster} will no...
[ "Closes", "the", "connection", "by", "setting", "presence", "to", "unavailable", "then", "closing", "the", "stream", "to", "the", "XMPP", "server", ".", "The", "shutdown", "logic", "will", "be", "used", "during", "a", "planned", "disconnection", "or", "when", ...
76f253239923df40904c462e3b88e7278b36b282
https://github.com/abmargb/jamppa/blob/76f253239923df40904c462e3b88e7278b36b282/src/main/java/org/jivesoftware/smack/XMPPConnection.java#L465-L511
test
Shutdown the application.
Of course, here is the Java code you requested: ```java protected void shutdown(Presence unavailablePresence) { // Set presence to offline. if (packetWriter != null) { packetWriter.sendPacket(unavailablePresence); } this.setWasAuthenticated(authenticated); authentic...
streamsets/datacollector
hive-protolib/src/main/java/com/streamsets/pipeline/stage/processor/hive/HiveMetadataProcessor.java
HiveMetadataProcessor.getPartitionValuesFromRecord
@VisibleForTesting LinkedHashMap<String, String> getPartitionValuesFromRecord(ELVars variables) throws StageException { LinkedHashMap<String, String> values = new LinkedHashMap<>(); for (PartitionConfig pName: partitionConfigList) { String ret = HiveMetastoreUtil.resolveEL(elEvals.partitionValueELEval, ...
java
@VisibleForTesting LinkedHashMap<String, String> getPartitionValuesFromRecord(ELVars variables) throws StageException { LinkedHashMap<String, String> values = new LinkedHashMap<>(); for (PartitionConfig pName: partitionConfigList) { String ret = HiveMetastoreUtil.resolveEL(elEvals.partitionValueELEval, ...
[ "@", "VisibleForTesting", "LinkedHashMap", "<", "String", ",", "String", ">", "getPartitionValuesFromRecord", "(", "ELVars", "variables", ")", "throws", "StageException", "{", "LinkedHashMap", "<", "String", ",", "String", ">", "values", "=", "new", "LinkedHashMap",...
Obtain a list of partition values from record. @return LinkedHashMap that contains pairs of partition name-values @throws StageException
[ "Obtain", "a", "list", "of", "partition", "values", "from", "record", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/hive-protolib/src/main/java/com/streamsets/pipeline/stage/processor/hive/HiveMetadataProcessor.java#L695-L709
test
Get the partition values from the record.
Of course, here is the Java code you requested: ```java @VisibleForTesting LinkedHashMap<String, String> getPartitionValuesFromRecord(ELVars variables) throws StageException { LinkedHashMap<String, String> values = new LinkedHashMap<>(); for (PartitionConfig pName: partitionConfigList) { String ret = H...
wildfly/wildfly
ejb3/src/main/java/org/jboss/as/ejb3/timerservice/TimerServiceImpl.java
TimerServiceImpl.createCalendarTimer
private TimerImpl createCalendarTimer(ScheduleExpression schedule, Serializable info, boolean persistent, Method timeoutMethod) { if (this.isLifecycleCallbackInvocation() && !this.isSingletonBeanInvocation()) { throw EJB3_TIMER_LOGGER.failToCreateTimerDoLife...
java
private TimerImpl createCalendarTimer(ScheduleExpression schedule, Serializable info, boolean persistent, Method timeoutMethod) { if (this.isLifecycleCallbackInvocation() && !this.isSingletonBeanInvocation()) { throw EJB3_TIMER_LOGGER.failToCreateTimerDoLife...
[ "private", "TimerImpl", "createCalendarTimer", "(", "ScheduleExpression", "schedule", ",", "Serializable", "info", ",", "boolean", "persistent", ",", "Method", "timeoutMethod", ")", "{", "if", "(", "this", ".", "isLifecycleCallbackInvocation", "(", ")", "&&", "!", ...
Creates a calendar based {@link javax.ejb.Timer} @param schedule The {@link javax.ejb.ScheduleExpression} which will be used for creating scheduled timer tasks for a calendar based timer @param info {@link java.io.Serializable} info that will be made available through the newly created timer's {@link javax.ejb...
[ "Creates", "a", "calendar", "based", "{", "@link", "javax", ".", "ejb", ".", "Timer", "}" ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/TimerServiceImpl.java#L504-L543
test
create a calendar timer
Of course, here is the Java code you requested: ```java private TimerImpl createCalendarTimer(ScheduleExpression schedule, Serializable info, boolean persistent, Method timeoutMethod) { if (this.isLifecycleCallbackInvocation() && !this.isSingletonBeanInvocation()) { ...
tiefaces/TieFaces
src/org/tiefaces/components/websheet/TieWebSheetComponent.java
TieWebSheetComponent.encodeBegin
@Override public final void encodeBegin(final FacesContext context) throws IOException { webSheetBean = (TieWebSheetBean) this.getAttributes() .get(TieConstants.ATTRS_WEBSHEETBEAN); if ((webSheetBean != null) && (webSheetBean.getWebFormClientId() == ...
java
@Override public final void encodeBegin(final FacesContext context) throws IOException { webSheetBean = (TieWebSheetBean) this.getAttributes() .get(TieConstants.ATTRS_WEBSHEETBEAN); if ((webSheetBean != null) && (webSheetBean.getWebFormClientId() == ...
[ "@", "Override", "public", "final", "void", "encodeBegin", "(", "final", "FacesContext", "context", ")", "throws", "IOException", "{", "webSheetBean", "=", "(", "TieWebSheetBean", ")", "this", ".", "getAttributes", "(", ")", ".", "get", "(", "TieConstants", "....
/* (non-Javadoc) @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context .FacesContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
3b57b9701ed0f080b5fa4fa78269cc0c422b34ba
https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/TieWebSheetComponent.java#L54-L80
test
Override encodeBegin to add the necessary attributes to the UIComponent.
Of course, here is the Java code you requested: ```java @Override public final void encodeBegin(final FacesContext context) throws IOException { webSheetBean = (TieWebSheetBean) this.getAttributes() .get(TieConstants.ATTRS_WEBSHEETBEAN); if ((webSheetBean != null) ...
nyla-solutions/gedi-geode
gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/operations/functions/ExportJsonFunction.java
ExportJsonFunction.exportOnRegion
private boolean exportOnRegion(RegionFunctionContext rfc) { //get argument //check if region is partitioned Region<Object,Object> region = rfc.getDataSet(); return exportRegion(region); }
java
private boolean exportOnRegion(RegionFunctionContext rfc) { //get argument //check if region is partitioned Region<Object,Object> region = rfc.getDataSet(); return exportRegion(region); }
[ "private", "boolean", "exportOnRegion", "(", "RegionFunctionContext", "rfc", ")", "{", "//get argument \r", "//check if region is partitioned\r", "Region", "<", "Object", ",", "Object", ">", "region", "=", "rfc", ".", "getDataSet", "(", ")", ";", "return", "exportRe...
------------------------------------------------
[ "------------------------------------------------" ]
3dd71d6e66e941ce350b306b70677ee95a7d9eee
https://github.com/nyla-solutions/gedi-geode/blob/3dd71d6e66e941ce350b306b70677ee95a7d9eee/gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/operations/functions/ExportJsonFunction.java#L121-L131
test
Export on region.
Of course, here is the Java code you requested: ```java private boolean exportOnRegion(RegionFunctionContext rfc) { //get argument //check if region is partitioned Region<Object,Object> region = rfc.getDataSet(); return exportRegion(region); } ``` Hope this helps!
Unidata/thredds
httpservices/src/main/java/ucar/httpservices/HTTPSession.java
HTTPSession.kill
static protected synchronized void kill() { if(sessionList != null) { for(HTTPSession session : sessionList) { session.close(); } sessionList.clear(); connmgr.close(); } }
java
static protected synchronized void kill() { if(sessionList != null) { for(HTTPSession session : sessionList) { session.close(); } sessionList.clear(); connmgr.close(); } }
[ "static", "protected", "synchronized", "void", "kill", "(", ")", "{", "if", "(", "sessionList", "!=", "null", ")", "{", "for", "(", "HTTPSession", "session", ":", "sessionList", ")", "{", "session", ".", "close", "(", ")", ";", "}", "sessionList", ".", ...
obsolete
[ "obsolete" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/httpservices/src/main/java/ucar/httpservices/HTTPSession.java#L1579-L1588
test
Kill the session list and connmgr.
Of course, here is the Java code you requested: ```java static protected synchronized void kill() { if(sessionList != null) { for(HTTPSession session : sessionList) { session.close(); } sessionList.clear(); connmgr.close(); } } ```...
deeplearning4j/nd4j
nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.updateVariableNameAndReference
public SDVariable updateVariableNameAndReference(SDVariable varToUpdate, String newVarName) { if (varToUpdate == null) { throw new NullPointerException("Null input: No variable found for updating!"); } if (newVarName == null && variableMap.containsKey(varToUpdate.getVarName())) { ...
java
public SDVariable updateVariableNameAndReference(SDVariable varToUpdate, String newVarName) { if (varToUpdate == null) { throw new NullPointerException("Null input: No variable found for updating!"); } if (newVarName == null && variableMap.containsKey(varToUpdate.getVarName())) { ...
[ "public", "SDVariable", "updateVariableNameAndReference", "(", "SDVariable", "varToUpdate", ",", "String", "newVarName", ")", "{", "if", "(", "varToUpdate", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Null input: No variable found for updating!...
Updates the variable name property on the passed in variable, the reference in samediff, and returns the variable. <p> Note that if null for the new variable is passed in, it will just return the original input variable. @param varToUpdate the variable to update @param newVarName the new variable name @return the pas...
[ "Updates", "the", "variable", "name", "property", "on", "the", "passed", "in", "variable", "the", "reference", "in", "samediff", "and", "returns", "the", "variable", ".", "<p", ">", "Note", "that", "if", "null", "for", "the", "new", "variable", "is", "pass...
8f005bcecb240d1fbb83b9d390ad801d1d3b6933
https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L5523-L5542
test
Update the variable name and reference variable
Of course, here is the Java code you requested: ```java public SDVariable updateVariableNameAndReference(SDVariable varToUpdate, String newVarName) { if (varToUpdate == null) { throw new NullPointerException("Null input: No variable found for updating!"); } if (newVarName == null &...
wro4j/wro4j
wro4j-core/src/main/java/ro/isdc/wro/model/group/processor/Injector.java
Injector.getAllFields
private Collection<Field> getAllFields(final Object object) { final Collection<Field> fields = new ArrayList<Field>(); fields.addAll(Arrays.asList(object.getClass().getDeclaredFields())); // inspect super classes Class<?> superClass = object.getClass().getSuperclass(); while (superClass != null...
java
private Collection<Field> getAllFields(final Object object) { final Collection<Field> fields = new ArrayList<Field>(); fields.addAll(Arrays.asList(object.getClass().getDeclaredFields())); // inspect super classes Class<?> superClass = object.getClass().getSuperclass(); while (superClass != null...
[ "private", "Collection", "<", "Field", ">", "getAllFields", "(", "final", "Object", "object", ")", "{", "final", "Collection", "<", "Field", ">", "fields", "=", "new", "ArrayList", "<", "Field", ">", "(", ")", ";", "fields", ".", "addAll", "(", "Arrays",...
Return all fields for given object, also those from the super classes.
[ "Return", "all", "fields", "for", "given", "object", "also", "those", "from", "the", "super", "classes", "." ]
d2a3de71ab8bf0af7061fb6327501e08198338df
https://github.com/wro4j/wro4j/blob/d2a3de71ab8bf0af7061fb6327501e08198338df/wro4j-core/src/main/java/ro/isdc/wro/model/group/processor/Injector.java#L102-L112
test
Get all the fields of the entity.
Of course, here is the Java code you requested: ```java private Collection<Field> getAllFields(final Object object) { final Collection<Field> fields = new ArrayList<Field>(); fields.addAll(Arrays.asList(object.getClass().getDeclaredFields())); // inspect super classes Class<?> superClass = object.g...
rest-assured/rest-assured
rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java
DetailedCookieMatcher.maxAge
public DetailedCookieMatcher maxAge(Matcher<? super Integer> maxAgeMatcher) { return new DetailedCookieMatcher(and(Matchers.hasProperty("maxAge", maxAgeMatcher))); }
java
public DetailedCookieMatcher maxAge(Matcher<? super Integer> maxAgeMatcher) { return new DetailedCookieMatcher(and(Matchers.hasProperty("maxAge", maxAgeMatcher))); }
[ "public", "DetailedCookieMatcher", "maxAge", "(", "Matcher", "<", "?", "super", "Integer", ">", "maxAgeMatcher", ")", "{", "return", "new", "DetailedCookieMatcher", "(", "and", "(", "Matchers", ".", "hasProperty", "(", "\"maxAge\"", ",", "maxAgeMatcher", ")", ")...
Verifies whether max age of cookie satisfies specified matcher. @param maxAgeMatcher assertion for max age property @return A {@link DetailedCookieMatcher} instance with and-composed max age property assertion
[ "Verifies", "whether", "max", "age", "of", "cookie", "satisfies", "specified", "matcher", "." ]
165a85b65070f5a07fe0045175613fb2c2811642
https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java#L199-L201
test
Returns a new matcher that matches cookies with a maxAge value.
Of course, here is the Java code you requested: ```java public DetailedCookieMatcher maxAge(Matcher<? super Integer> maxAgeMatcher) { return new DetailedCookieMatcher(and(Matchers.hasProperty("maxAge", maxAgeMatcher))); } ``` Hope this helps!
RestComm/jain-slee
container/profiles/src/main/java/org/mobicents/slee/container/management/jmx/ProfileProvisioningMBeanImpl.java
ProfileProvisioningMBeanImpl.getProfile
public ObjectName getProfile(java.lang.String profileTableName, java.lang.String profileName) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("getProfile( profileTable = "+profileTableN...
java
public ObjectName getProfile(java.lang.String profileTableName, java.lang.String profileName) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("getProfile( profileTable = "+profileTableN...
[ "public", "ObjectName", "getProfile", "(", "java", ".", "lang", ".", "String", "profileTableName", ",", "java", ".", "lang", ".", "String", "profileName", ")", "throws", "NullPointerException", ",", "UnrecognizedProfileTableNameException", ",", "UnrecognizedProfileNameE...
/* (non-Javadoc) @see javax.slee.management.ProfileProvisioningMBean#getProfile(java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/profiles/src/main/java/org/mobicents/slee/container/management/jmx/ProfileProvisioningMBeanImpl.java#L295-L308
test
Gets the object name of a single profile.
Of course, here is the Java code you requested: ```java public ObjectName getProfile(java.lang.String profileTableName, java.lang.String profileName) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException { if (logger.isDebugEnabled()) { ...
arnohaase/a-foundation
a-foundation/src/main/java/com/ajjpj/afoundation/collection/immutable/AHashMap.java
AHashMap.fromJavaUtilMap
@SuppressWarnings("unused") public static <K,V> AHashMap<K,V> fromJavaUtilMap(Map<K,V> map) { return fromJavaUtilMap(DEFAULT_EQUALITY, map); }
java
@SuppressWarnings("unused") public static <K,V> AHashMap<K,V> fromJavaUtilMap(Map<K,V> map) { return fromJavaUtilMap(DEFAULT_EQUALITY, map); }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "<", "K", ",", "V", ">", "AHashMap", "<", "K", ",", "V", ">", "fromJavaUtilMap", "(", "Map", "<", "K", ",", "V", ">", "map", ")", "{", "return", "fromJavaUtilMap", "(", "DEFAULT_EQUAL...
Returns an AHashMap instance with default (i.e. equals-based) equalityForEquals, initializing it from the contents of a given <code>java.util.Map</code>.
[ "Returns", "an", "AHashMap", "instance", "with", "default", "(", "i", ".", "e", ".", "equals", "-", "based", ")", "equalityForEquals", "initializing", "it", "from", "the", "contents", "of", "a", "given", "<code", ">", "java", ".", "util", ".", "Map<", "/...
f3eef2ca89d67775f202a4c28140230a6229291e
https://github.com/arnohaase/a-foundation/blob/f3eef2ca89d67775f202a4c28140230a6229291e/a-foundation/src/main/java/com/ajjpj/afoundation/collection/immutable/AHashMap.java#L53-L56
test
Create an AHashMap from a JavaUtil map.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unused") public static <K,V> AHashMap<K,V> fromJavaUtilMap(Map<K,V> map) { return fromJavaUtilMap(DEFAULT_EQUALITY, map); } ``` Hope this helps!
ngageoint/geopackage-android
geopackage-sdk/src/main/java/mil/nga/geopackage/extension/style/FeatureStyleExtension.java
FeatureStyleExtension.getMappingDao
private StyleMappingDao getMappingDao(String tablePrefix, String featureTable) { String tableName = tablePrefix + featureTable; StyleMappingDao dao = null; if (geoPackage.isTable(tableName)) { dao = new StyleMappingDao(relatedTables.getUserDa...
java
private StyleMappingDao getMappingDao(String tablePrefix, String featureTable) { String tableName = tablePrefix + featureTable; StyleMappingDao dao = null; if (geoPackage.isTable(tableName)) { dao = new StyleMappingDao(relatedTables.getUserDa...
[ "private", "StyleMappingDao", "getMappingDao", "(", "String", "tablePrefix", ",", "String", "featureTable", ")", "{", "String", "tableName", "=", "tablePrefix", "+", "featureTable", ";", "StyleMappingDao", "dao", "=", "null", ";", "if", "(", "geoPackage", ".", "...
Get a Style Mapping DAO from a table name @param tablePrefix table name prefix @param featureTable feature table @return style mapping dao
[ "Get", "a", "Style", "Mapping", "DAO", "from", "a", "table", "name" ]
d19e9fcc636462c0f0ae1b7eca4acafae48de21b
https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/style/FeatureStyleExtension.java#L99-L107
test
Get the StyleMapping DAO
Of course, here is the Java code you requested: ```java private StyleMappingDao getMappingDao(String tablePrefix, String featureTable) { String tableName = tablePrefix + featureTable; StyleMappingDao dao = null; if (geoPackage.isTable(tableName)) { ...
Unidata/thredds
cdm/src/main/java/ucar/nc2/util/cache/FileCacheARC.java
FileCacheARC.release
@Override public boolean release(FileCacheable ncfile) throws IOException { if (ncfile == null) return false; if (disabled.get()) { ncfile.setFileCache(null); // prevent infinite loops ncfile.close(); return false; } // find it in the file cache int hashcode = System.identityHa...
java
@Override public boolean release(FileCacheable ncfile) throws IOException { if (ncfile == null) return false; if (disabled.get()) { ncfile.setFileCache(null); // prevent infinite loops ncfile.close(); return false; } // find it in the file cache int hashcode = System.identityHa...
[ "@", "Override", "public", "boolean", "release", "(", "FileCacheable", "ncfile", ")", "throws", "IOException", "{", "if", "(", "ncfile", "==", "null", ")", "return", "false", ";", "if", "(", "disabled", ".", "get", "(", ")", ")", "{", "ncfile", ".", "s...
Release the file. This unlocks it, updates its lastAccessed date. FileCacheable.close() needs to call this instead of actually closing. @param ncfile release the lock on this FileCacheable object. @throws IOException if file not in cache.
[ "Release", "the", "file", ".", "This", "unlocks", "it", "updates", "its", "lastAccessed", "date", ".", "FileCacheable", ".", "close", "()", "needs", "to", "call", "this", "instead", "of", "actually", "closing", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/util/cache/FileCacheARC.java#L299-L326
test
Release the file in the cache.
Of course, here is the Java code you requested: ```java @Override public boolean release(FileCacheable ncfile) throws IOException { if (ncfile == null) return false; if (disabled.get()) { ncfile.setFileCache(null); // prevent infinite loops ncfile.close(); return false; } // find ...
apache/parquet-mr
parquet-encoding/src/main/java/org/apache/parquet/column/values/bitpacking/BytePacker.java
BytePacker.unpack32Values
@Deprecated public void unpack32Values(byte[] input, int inPos, int[] output, int outPos) { unpack32Values(ByteBuffer.wrap(input), inPos, output, outPos); }
java
@Deprecated public void unpack32Values(byte[] input, int inPos, int[] output, int outPos) { unpack32Values(ByteBuffer.wrap(input), inPos, output, outPos); }
[ "@", "Deprecated", "public", "void", "unpack32Values", "(", "byte", "[", "]", "input", ",", "int", "inPos", ",", "int", "[", "]", "output", ",", "int", "outPos", ")", "{", "unpack32Values", "(", "ByteBuffer", ".", "wrap", "(", "input", ")", ",", "inPos...
Compatibility API @param input the input bytes @param inPos where to read from in input @param output the output values @param outPos where to write to in output
[ "Compatibility", "API" ]
62dcc68acaf64012bf731e103be780956f1f446d
https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-encoding/src/main/java/org/apache/parquet/column/values/bitpacking/BytePacker.java#L104-L107
test
Unpacks a sequence of 32 - bit integers from the input byte array.
Of course, here is the Java code you requested: ```java @Deprecated public void unpack32Values(byte[] input, int inPos, int[] output, int outPos) { unpack32Values(ByteBuffer.wrap(input), inPos, output, outPos); } ``` Hope this helps!
wildfly/wildfly
iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java
Util.isValidRMIIIOP
public static boolean isValidRMIIIOP(Class cls) throws RMIIIOPViolationException { if (cls.isPrimitive()) return true; if (cls.isArray()) return isValidRMIIIOP(cls.getComponentType()); // special interfaces if (cls == Serializable.class || cls == Ext...
java
public static boolean isValidRMIIIOP(Class cls) throws RMIIIOPViolationException { if (cls.isPrimitive()) return true; if (cls.isArray()) return isValidRMIIIOP(cls.getComponentType()); // special interfaces if (cls == Serializable.class || cls == Ext...
[ "public", "static", "boolean", "isValidRMIIIOP", "(", "Class", "cls", ")", "throws", "RMIIIOPViolationException", "{", "if", "(", "cls", ".", "isPrimitive", "(", ")", ")", "return", "true", ";", "if", "(", "cls", ".", "isArray", "(", ")", ")", "return", ...
Check if this class is valid for RMI/IIOP mapping. This method will either throw an exception or return true.
[ "Check", "if", "this", "class", "is", "valid", "for", "RMI", "/", "IIOP", "mapping", ".", "This", "method", "will", "either", "throw", "an", "exception", "or", "return", "true", "." ]
64896f1500fe465ad83d96ede9fa19d0c3747f18
https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java#L138-L172
test
Check if the class is a RMIIIOP class.
Of course, here is the Java code you requested: ```java public static boolean isValidRMIIIOP(Class cls) throws RMIIIOPViolationException { if (cls.isPrimitive()) return true; if (cls.isArray()) return isValidRMIIIOP(cls.getComponentType()); // special inter...
Unidata/thredds
dap4/d4cdm/src/main/java/dap4/cdm/NodeMap.java
NodeMap.put
public void put(CDM_T cdm, DAP_T dap) { assert (dap != null && cdm != null); cdm = (CDM_T)CDMNode.unwrap(cdm); int lh = cdm.localhash(); dapmap.put(lh, dap); cdmmap.put(dap, cdm); }
java
public void put(CDM_T cdm, DAP_T dap) { assert (dap != null && cdm != null); cdm = (CDM_T)CDMNode.unwrap(cdm); int lh = cdm.localhash(); dapmap.put(lh, dap); cdmmap.put(dap, cdm); }
[ "public", "void", "put", "(", "CDM_T", "cdm", ",", "DAP_T", "dap", ")", "{", "assert", "(", "dap", "!=", "null", "&&", "cdm", "!=", "null", ")", ";", "cdm", "=", "(", "CDM_T", ")", "CDMNode", ".", "unwrap", "(", "cdm", ")", ";", "int", "lh", "=...
Given a CDM_T <-> DAP_T pair, insert into the maps @param cdm @param dap
[ "Given", "a", "CDM_T", "<", "-", ">", "DAP_T", "pair", "insert", "into", "the", "maps" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/dap4/d4cdm/src/main/java/dap4/cdm/NodeMap.java#L80-L87
test
Put a single entry into the cache.
Of course, here is the Java code you requested: ```java public void put(CDM_T cdm, DAP_T dap) { assert (dap != null && cdm != null); cdm = (CDM_T)CDMNode.unwrap(cdm); int lh = cdm.localhash(); dapmap.put(lh, dap); cdmmap.put(dap, cdm); } ``` Hope this helps!
oblac/jodd
jodd-joy/src/main/java/jodd/joy/auth/AuthAction.java
AuthAction.tokenAsJson
protected JsonResult tokenAsJson(final T authToken) { final JsonObject jsonObject = new JsonObject(); jsonObject.put("token", userAuth.tokenValue(authToken)); return JsonResult.of(jsonObject); }
java
protected JsonResult tokenAsJson(final T authToken) { final JsonObject jsonObject = new JsonObject(); jsonObject.put("token", userAuth.tokenValue(authToken)); return JsonResult.of(jsonObject); }
[ "protected", "JsonResult", "tokenAsJson", "(", "final", "T", "authToken", ")", "{", "final", "JsonObject", "jsonObject", "=", "new", "JsonObject", "(", ")", ";", "jsonObject", ".", "put", "(", "\"token\"", ",", "userAuth", ".", "tokenValue", "(", "authToken", ...
Prepares the JSON payload that carries on the token value.
[ "Prepares", "the", "JSON", "payload", "that", "carries", "on", "the", "token", "value", "." ]
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-joy/src/main/java/jodd/joy/auth/AuthAction.java#L103-L109
test
Token as json.
Of course, here is the Java code you requested: ```java protected JsonResult tokenAsJson(final T authToken) { final JsonObject jsonObject = new JsonObject(); jsonObject.put("token", userAuth.tokenValue(authToken)); return JsonResult.of(jsonObject); } ``` Hope this helps!
awslabs/aws-hal-client-java
src/main/java/com/amazonaws/hal/client/HalJsonMapUnmarshaller.java
HalJsonMapUnmarshaller.unmarshall
@Override public Map<String, Object> unmarshall(JsonUnmarshallerContext context) throws Exception { Map<String, Object> map = new HashMap<>(); JsonToken token = context.getCurrentToken(); while (token != null && token != JsonToken.END_OBJECT) { if (token == JsonToken...
java
@Override public Map<String, Object> unmarshall(JsonUnmarshallerContext context) throws Exception { Map<String, Object> map = new HashMap<>(); JsonToken token = context.getCurrentToken(); while (token != null && token != JsonToken.END_OBJECT) { if (token == JsonToken...
[ "@", "Override", "public", "Map", "<", "String", ",", "Object", ">", "unmarshall", "(", "JsonUnmarshallerContext", "context", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "new", "HashMap", "<>", "(", ")", ";", "J...
-------------------------------------------------------------
[ "-------------------------------------------------------------" ]
bbbb67326f6f1ff6e583d6fa95a7768a0c60b62b
https://github.com/awslabs/aws-hal-client-java/blob/bbbb67326f6f1ff6e583d6fa95a7768a0c60b62b/src/main/java/com/amazonaws/hal/client/HalJsonMapUnmarshaller.java#L51-L77
test
Unmarshall a map of the XML document.
Of course, here is the Java code you requested: ```java @Override public Map<String, Object> unmarshall(JsonUnmarshallerContext context) throws Exception { Map<String, Object> map = new HashMap<>(); JsonToken token = context.getCurrentToken(); while (token != null && token != J...
vigna/fastutil
src/it/unimi/dsi/fastutil/io/FastBufferedInputStream.java
FastBufferedInputStream.readLine
public int readLine(final byte[] array, final int off, final int len, final EnumSet<LineTerminator> terminators) throws IOException { ByteArrays.ensureOffsetLength(array ,off, len); if (len == 0) return 0; // 0-length reads always return 0 if (noMoreCharacters()) return -1; int i, k = 0, remaining = len, read =...
java
public int readLine(final byte[] array, final int off, final int len, final EnumSet<LineTerminator> terminators) throws IOException { ByteArrays.ensureOffsetLength(array ,off, len); if (len == 0) return 0; // 0-length reads always return 0 if (noMoreCharacters()) return -1; int i, k = 0, remaining = len, read =...
[ "public", "int", "readLine", "(", "final", "byte", "[", "]", "array", ",", "final", "int", "off", ",", "final", "int", "len", ",", "final", "EnumSet", "<", "LineTerminator", ">", "terminators", ")", "throws", "IOException", "{", "ByteArrays", ".", "ensureO...
Reads a line into the given byte-array fragment. <p>Reading lines (i.e., characters) out of a byte stream is not always sensible (methods available to that purpose in old versions of Java have been mercilessly deprecated). Nonetheless, in several situations, such as when decoding network protocols or headers known to ...
[ "Reads", "a", "line", "into", "the", "given", "byte", "-", "array", "fragment", "." ]
192ce83affa4a6f2ad34a96c15b5f2ec2929cf1c
https://github.com/vigna/fastutil/blob/192ce83affa4a6f2ad34a96c15b5f2ec2929cf1c/src/it/unimi/dsi/fastutil/io/FastBufferedInputStream.java#L316-L396
test
Read a line from the input stream.
Of course, here is the Java code you requested: ```java public int readLine(final byte[] array, final int off, final int len, final EnumSet<LineTerminator> terminators) throws IOException { ByteArrays.ensureOffsetLength(array ,off, len); if (len == 0) return 0; // 0-length reads always return 0 if (noMoreCharact...
spring-projects/spring-security
core/src/main/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscoverer.java
AnnotationParameterNameDiscoverer.findParameterName
private String findParameterName(Annotation[] parameterAnnotations) { for (Annotation paramAnnotation : parameterAnnotations) { if (annotationClassesToUse.contains(paramAnnotation.annotationType() .getName())) { return (String) AnnotationUtils.getValue(paramAnnotation, "value"); } } return null; }
java
private String findParameterName(Annotation[] parameterAnnotations) { for (Annotation paramAnnotation : parameterAnnotations) { if (annotationClassesToUse.contains(paramAnnotation.annotationType() .getName())) { return (String) AnnotationUtils.getValue(paramAnnotation, "value"); } } return null; }
[ "private", "String", "findParameterName", "(", "Annotation", "[", "]", "parameterAnnotations", ")", "{", "for", "(", "Annotation", "paramAnnotation", ":", "parameterAnnotations", ")", "{", "if", "(", "annotationClassesToUse", ".", "contains", "(", "paramAnnotation", ...
Finds the parameter name from the provided {@link Annotation}s or null if it could not find it. The search is done by looking at the value property of the {@link #annotationClassesToUse}. @param parameterAnnotations the {@link Annotation}'s to search. @return
[ "Finds", "the", "parameter", "name", "from", "the", "provided", "{", "@link", "Annotation", "}", "s", "or", "null", "if", "it", "could", "not", "find", "it", ".", "The", "search", "is", "done", "by", "looking", "at", "the", "value", "property", "of", "...
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/core/src/main/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscoverer.java#L171-L179
test
Find parameter name.
Of course, here is the Java code you requested: ```java private String findParameterName(Annotation[] parameterAnnotations) { for (Annotation paramAnnotation : parameterAnnotations) { if (annotationClassesToUse.contains(paramAnnotation.annotationType() .getName())) { return (String) AnnotationUtils.getVa...
orientechnologies/orientdb
object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java
OObjectDatabaseTx.detach
public <RET> RET detach(final Object iPojo, boolean returnNonProxiedInstance) { return (RET) OObjectEntitySerializer.detach(iPojo, this, returnNonProxiedInstance); }
java
public <RET> RET detach(final Object iPojo, boolean returnNonProxiedInstance) { return (RET) OObjectEntitySerializer.detach(iPojo, this, returnNonProxiedInstance); }
[ "public", "<", "RET", ">", "RET", "detach", "(", "final", "Object", "iPojo", ",", "boolean", "returnNonProxiedInstance", ")", "{", "return", "(", "RET", ")", "OObjectEntitySerializer", ".", "detach", "(", "iPojo", ",", "this", ",", "returnNonProxiedInstance", ...
Method that detaches all fields contained in the document to the given object. @param <RET> @param iPojo :- the object to detach @param returnNonProxiedInstance :- defines if the return object will be a proxied instance or not. If set to TRUE and the object does not contains @Id and @Version fields ...
[ "Method", "that", "detaches", "all", "fields", "contained", "in", "the", "document", "to", "the", "given", "object", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java#L351-L353
test
Detach the object from the database.
Of course, here is the Java code you requested: ```java public <RET> RET detach(final Object iPojo, boolean returnNonProxiedInstance) { return (RET) OObjectEntitySerializer.detach(iPojo, this, returnNonProxiedInstance); } ``` Hope this helps!
tiefaces/TieFaces
src/org/tiefaces/components/websheet/configuration/ConfigurationHandler.java
ConfigurationHandler.getSheetConfiguration
private SheetConfiguration getSheetConfiguration(final Sheet sheet, final String formName, final int sheetRightCol) { SheetConfiguration sheetConfig = new SheetConfiguration(); sheetConfig.setFormName(formName); sheetConfig.setSheetName(sheet.getSheetName()); int leftCol = sheet.getLeftCol(); int l...
java
private SheetConfiguration getSheetConfiguration(final Sheet sheet, final String formName, final int sheetRightCol) { SheetConfiguration sheetConfig = new SheetConfiguration(); sheetConfig.setFormName(formName); sheetConfig.setSheetName(sheet.getSheetName()); int leftCol = sheet.getLeftCol(); int l...
[ "private", "SheetConfiguration", "getSheetConfiguration", "(", "final", "Sheet", "sheet", ",", "final", "String", "formName", ",", "final", "int", "sheetRightCol", ")", "{", "SheetConfiguration", "sheetConfig", "=", "new", "SheetConfiguration", "(", ")", ";", "sheet...
Gets the sheet configuration. @param sheet the sheet @param formName the form name @param sheetRightCol the sheet right col @return the sheet configuration
[ "Gets", "the", "sheet", "configuration", "." ]
3b57b9701ed0f080b5fa4fa78269cc0c422b34ba
https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/configuration/ConfigurationHandler.java#L114-L171
test
Gets the sheet configuration.
Of course, here is the Java code you requested: ```java private SheetConfiguration getSheetConfiguration(final Sheet sheet, final String formName, final int sheetRightCol) { SheetConfiguration sheetConfig = new SheetConfiguration(); sheetConfig.setFormName(formName); sheetConfig.setSheetName(sheet.getSh...
apache/parquet-mr
parquet-column/src/main/java/org/apache/parquet/io/FilteredRecordReader.java
FilteredRecordReader.skipToMatch
private void skipToMatch() { while (recordsRead < recordCount && !recordFilter.isMatch()) { State currentState = getState(0); do { ColumnReader columnReader = currentState.column; // currentLevel = depth + 1 at this point // set the current value if (columnReader.getCurr...
java
private void skipToMatch() { while (recordsRead < recordCount && !recordFilter.isMatch()) { State currentState = getState(0); do { ColumnReader columnReader = currentState.column; // currentLevel = depth + 1 at this point // set the current value if (columnReader.getCurr...
[ "private", "void", "skipToMatch", "(", ")", "{", "while", "(", "recordsRead", "<", "recordCount", "&&", "!", "recordFilter", ".", "isMatch", "(", ")", ")", "{", "State", "currentState", "=", "getState", "(", "0", ")", ";", "do", "{", "ColumnReader", "col...
Skips forwards until the filter finds the first match. Returns false if none found.
[ "Skips", "forwards", "until", "the", "filter", "finds", "the", "first", "match", ".", "Returns", "false", "if", "none", "found", "." ]
62dcc68acaf64012bf731e103be780956f1f446d
https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/io/FilteredRecordReader.java#L77-L96
test
Skip to the next record that matches the recordFilter.
Of course, here is the Java code you requested: ```java private void skipToMatch() { while (recordsRead < recordCount && !recordFilter.isMatch()) { State currentState = getState(0); do { ColumnReader columnReader = currentState.column; // currentLevel = depth + 1 at this point ...
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.onErrorResumeNext
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable<T> onErrorResumeNext(final ObservableSource<? extends T> next) { ObjectHelper.requireNonNull(next, "next is null"); return onErrorResumeNext(Functions.justFunction(next)); }
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable<T> onErrorResumeNext(final ObservableSource<? extends T> next) { ObjectHelper.requireNonNull(next, "next is null"); return onErrorResumeNext(Functions.justFunction(next)); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Observable", "<", "T", ">", "onErrorResumeNext", "(", "final", "ObservableSource", "<", "?", "extends", "T", ">", "next", ")", "{", "ObjectHelper", ...
Instructs an ObservableSource to pass control to another ObservableSource rather than invoking {@link Observer#onError onError} if it encounters an error. <p> <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/onErrorResumeNext.png" alt=""> <p> By default, when an Observ...
[ "Instructs", "an", "ObservableSource", "to", "pass", "control", "to", "another", "ObservableSource", "rather", "than", "invoking", "{", "@link", "Observer#onError", "onError", "}", "if", "it", "encounters", "an", "error", ".", "<p", ">", "<img", "width", "=", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L10082-L10087
test
A convenience method for onErrorResumeNext.
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Observable<T> onErrorResumeNext(final ObservableSource<? extends T> next) { ObjectHelper.requireNonNull(next, "next is null"); return onErrorResumeNext(Functions.justF...
streamsets/datacollector
container/src/main/java/com/streamsets/datacollector/runner/DetachedStage.java
DetachedStage.createDetachedStage
public<S> DetachedStageRuntime<? extends S> createDetachedStage( String jsonDefinition, StageLibraryTask stageLibrary, String pipelineId, String pipelineTitle, String rev, Stage.UserContext userContext, MetricRegistry metrics, ExecutionMode executionMode, DeliveryGuarantee deliveryGu...
java
public<S> DetachedStageRuntime<? extends S> createDetachedStage( String jsonDefinition, StageLibraryTask stageLibrary, String pipelineId, String pipelineTitle, String rev, Stage.UserContext userContext, MetricRegistry metrics, ExecutionMode executionMode, DeliveryGuarantee deliveryGu...
[ "public", "<", "S", ">", "DetachedStageRuntime", "<", "?", "extends", "S", ">", "createDetachedStage", "(", "String", "jsonDefinition", ",", "StageLibraryTask", "stageLibrary", ",", "String", "pipelineId", ",", "String", "pipelineTitle", ",", "String", "rev", ",",...
Create a new instance of a stage that does not directly live in the pipeline canvas.
[ "Create", "a", "new", "instance", "of", "a", "stage", "that", "does", "not", "directly", "live", "in", "the", "pipeline", "canvas", "." ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/container/src/main/java/com/streamsets/datacollector/runner/DetachedStage.java#L61-L111
test
Create a detached stage runtime.
Of course, here is the Java code you requested: ```java public<S> DetachedStageRuntime<? extends S> createDetachedStage( String jsonDefinition, StageLibraryTask stageLibrary, String pipelineId, String pipelineTitle, String rev, Stage.UserContext userContext, MetricRegistry metrics, Exec...
algolia/algoliasearch-client-android
algoliasearch/src/main/java/com/algolia/search/saas/AbstractQuery.java
AbstractQuery.parseFrom
public void parseFrom(@NonNull String queryParameters) { try { String[] parameters = queryParameters.split("&"); for (String parameter : parameters) { String[] components = parameter.split("="); if (components.length < 1 || components.length > 2) ...
java
public void parseFrom(@NonNull String queryParameters) { try { String[] parameters = queryParameters.split("&"); for (String parameter : parameters) { String[] components = parameter.split("="); if (components.length < 1 || components.length > 2) ...
[ "public", "void", "parseFrom", "(", "@", "NonNull", "String", "queryParameters", ")", "{", "try", "{", "String", "[", "]", "parameters", "=", "queryParameters", ".", "split", "(", "\"&\"", ")", ";", "for", "(", "String", "parameter", ":", "parameters", ")"...
Parse a URL query parameter string and store the resulting parameters into this query. @param queryParameters URL query parameter string.
[ "Parse", "a", "URL", "query", "parameter", "string", "and", "store", "the", "resulting", "parameters", "into", "this", "query", "." ]
3293ba6e6116a4f6c1face2cc606bc047d6d4a3c
https://github.com/algolia/algoliasearch-client-android/blob/3293ba6e6116a4f6c1face2cc606bc047d6d4a3c/algoliasearch/src/main/java/com/algolia/search/saas/AbstractQuery.java#L215-L230
test
Parses the URL query parameters into this object.
Of course, here is the Java code you requested: ```java public void parseFrom(@NonNull String queryParameters) { try { String[] parameters = queryParameters.split("&"); for (String parameter : parameters) { String[] components = parameter.split("="); if (...
Unidata/thredds
opendap/src/main/java/ucar/nc2/dods/ConvertD2N.java
ConvertD2N.iconvertDataPrimitiveArray
private void iconvertDataPrimitiveArray(PrimitiveVector pv, IndexIterator ii) { BaseType bt = pv.getTemplate(); // set the data value, using scalarIndex from Variable if (bt instanceof DString) { BaseTypePrimitiveVector bpv = (BaseTypePrimitiveVector) pv; for (int row=0; row < bpv.getLeng...
java
private void iconvertDataPrimitiveArray(PrimitiveVector pv, IndexIterator ii) { BaseType bt = pv.getTemplate(); // set the data value, using scalarIndex from Variable if (bt instanceof DString) { BaseTypePrimitiveVector bpv = (BaseTypePrimitiveVector) pv; for (int row=0; row < bpv.getLeng...
[ "private", "void", "iconvertDataPrimitiveArray", "(", "PrimitiveVector", "pv", ",", "IndexIterator", "ii", ")", "{", "BaseType", "bt", "=", "pv", ".", "getTemplate", "(", ")", ";", "// set the data value, using scalarIndex from Variable\r", "if", "(", "bt", "instanceo...
convert a DODS scalar value
[ "convert", "a", "DODS", "scalar", "value" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/opendap/src/main/java/ucar/nc2/dods/ConvertD2N.java#L458-L510
test
Iconvert data primitive array to IndexIterator
Of course, here is the Java code you requested: ```java private void iconvertDataPrimitiveArray(PrimitiveVector pv, IndexIterator ii) { BaseType bt = pv.getTemplate(); // set the data value, using scalarIndex from Variable if (bt instanceof DString) { BaseTypePrimitiveVector bpv = (BaseTypePrim...
RestComm/jain-slee
container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java
TracerImpl.sendNotification
void sendNotification(javax.slee.facilities.TraceLevel level, String message, Throwable t) { if (!isTraceable(level)) { return; } traceMBean.sendNotification(new TraceNotification(notificationSource.getNotificationSource().getTraceNotificationType(), traceMBean, notificationSource.getNotificationSource(), ...
java
void sendNotification(javax.slee.facilities.TraceLevel level, String message, Throwable t) { if (!isTraceable(level)) { return; } traceMBean.sendNotification(new TraceNotification(notificationSource.getNotificationSource().getTraceNotificationType(), traceMBean, notificationSource.getNotificationSource(), ...
[ "void", "sendNotification", "(", "javax", ".", "slee", ".", "facilities", ".", "TraceLevel", "level", ",", "String", "message", ",", "Throwable", "t", ")", "{", "if", "(", "!", "isTraceable", "(", "level", ")", ")", "{", "return", ";", "}", "traceMBean",...
THis is internaly called, by 1.1 tracers @param src
[ "THis", "is", "internaly", "called", "by", "1", ".", "1", "tracers" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java#L456-L461
test
Send a trace notification to the trace MBean.
Of course, here is the Java code you requested: ```java void sendNotification(javax.slee.facilities.TraceLevel level, String message, Throwable t) { if (!isTraceable(level)) { return; } traceMBean.sendNotification(new TraceNotification(notificationSource.getNotificationSource().getTraceNotificationType(),...
Unidata/thredds
cdm/src/main/java/thredds/client/catalog/tools/DataFactory.java
DataFactory.findAccessByDataFormatType
private Access findAccessByDataFormatType(List<Access> accessList, DataFormatType type) { for (Access a : accessList) { DataFormatType has = a.getDataFormatType(); if (has != null && type.toString().equalsIgnoreCase(has.toString())) return a; } return null; }
java
private Access findAccessByDataFormatType(List<Access> accessList, DataFormatType type) { for (Access a : accessList) { DataFormatType has = a.getDataFormatType(); if (has != null && type.toString().equalsIgnoreCase(has.toString())) return a; } return null; }
[ "private", "Access", "findAccessByDataFormatType", "(", "List", "<", "Access", ">", "accessList", ",", "DataFormatType", "type", ")", "{", "for", "(", "Access", "a", ":", "accessList", ")", "{", "DataFormatType", "has", "=", "a", ".", "getDataFormatType", "(",...
works against the accessList instead of the dataset list, so we can remove and try again
[ "works", "against", "the", "accessList", "instead", "of", "the", "dataset", "list", "so", "we", "can", "remove", "and", "try", "again" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/thredds/client/catalog/tools/DataFactory.java#L701-L708
test
Find access by data format type
Of course, here is the Java code you requested: ```java private Access findAccessByDataFormatType(List<Access> accessList, DataFormatType type) { for (Access a : accessList) { DataFormatType has = a.getDataFormatType(); if (has != null && type.toString().equalsIgnoreCase(has.toString())) return...
kocakosm/pitaya
src/org/kocakosm/pitaya/util/XArrays.java
XArrays.toObject
public static Float[] toObject(float... a) { if (a != null) { Float[] w = new Float[a.length]; for (int i = 0; i < a.length; i++) { w[i] = a[i]; } return w; } return null; }
java
public static Float[] toObject(float... a) { if (a != null) { Float[] w = new Float[a.length]; for (int i = 0; i < a.length; i++) { w[i] = a[i]; } return w; } return null; }
[ "public", "static", "Float", "[", "]", "toObject", "(", "float", "...", "a", ")", "{", "if", "(", "a", "!=", "null", ")", "{", "Float", "[", "]", "w", "=", "new", "Float", "[", "a", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ...
Converts an array of {@code float}s to an array of {@code Float}s. Returns {@code null} if the given array is {@code null}. Does not modify the input array. @param a the {@code Float} array to convert. @return the corresponding {@code Short} array.
[ "Converts", "an", "array", "of", "{", "@code", "float", "}", "s", "to", "an", "array", "of", "{", "@code", "Float", "}", "s", ".", "Returns", "{", "@code", "null", "}", "if", "the", "given", "array", "is", "{", "@code", "null", "}", ".", "Does", ...
f2b203b6cdb32723bd1249a1325a3bb5918bf99a
https://github.com/kocakosm/pitaya/blob/f2b203b6cdb32723bd1249a1325a3bb5918bf99a/src/org/kocakosm/pitaya/util/XArrays.java#L2116-L2126
test
To object.
Of course, here is the Java code you requested: ```java public static Float[] toObject(float... a) { if (a != null) { Float[] w = new Float[a.length]; for (int i = 0; i < a.length; i++) { w[i] = a[i]; } return w; } return null; } ``` Hope this helps!
Unidata/thredds
bufr/src/main/java/ucar/nc2/ft/point/bufr/BufrFeatureDatasetFactory.java
BufrFeatureDatasetFactory.isMine
@Override public Object isMine(FeatureType wantFeatureType, NetcdfDataset ncd, Formatter errlog) throws IOException { IOServiceProvider iosp = ncd.getIosp(); return (iosp != null && iosp instanceof BufrIosp2) ? true : null; }
java
@Override public Object isMine(FeatureType wantFeatureType, NetcdfDataset ncd, Formatter errlog) throws IOException { IOServiceProvider iosp = ncd.getIosp(); return (iosp != null && iosp instanceof BufrIosp2) ? true : null; }
[ "@", "Override", "public", "Object", "isMine", "(", "FeatureType", "wantFeatureType", ",", "NetcdfDataset", "ncd", ",", "Formatter", "errlog", ")", "throws", "IOException", "{", "IOServiceProvider", "iosp", "=", "ncd", ".", "getIosp", "(", ")", ";", "return", ...
LOOK fake
[ "LOOK", "fake" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/bufr/src/main/java/ucar/nc2/ft/point/bufr/BufrFeatureDatasetFactory.java#L63-L67
test
This method is used to determine if the image is mine.
Of course, here is the Java code you requested: ```java @Override public Object isMine(FeatureType wantFeatureType, NetcdfDataset ncd, Formatter errlog) throws IOException { IOServiceProvider iosp = ncd.getIosp(); return (iosp != null && iosp instanceof BufrIosp2) ? true : null; } ``` Hope this helps!
1gravity/Android-RTEditor
RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/HTMLWriter.java
HTMLWriter.writeAttributes
private void writeAttributes(Attributes atts) throws SAXException { int len = atts.getLength(); for (int i = 0; i < len; i++) { write(' '); writeName(atts.getURI(i), atts.getLocalName(i), atts.getQName(i), false); if (htmlMode &...
java
private void writeAttributes(Attributes atts) throws SAXException { int len = atts.getLength(); for (int i = 0; i < len; i++) { write(' '); writeName(atts.getURI(i), atts.getLocalName(i), atts.getQName(i), false); if (htmlMode &...
[ "private", "void", "writeAttributes", "(", "Attributes", "atts", ")", "throws", "SAXException", "{", "int", "len", "=", "atts", ".", "getLength", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "++", ")", "{", "writ...
Write out an attribute list, escaping values. <p> The names will have prefixes added to them. @param atts The attribute list to write. @throws org.xml.SAXException If there is an error writing the attribute list, this method will throw an IOException wrapped in a SAXException.
[ "Write", "out", "an", "attribute", "list", "escaping", "values", ".", "<p", ">", "The", "names", "will", "have", "prefixes", "added", "to", "them", "." ]
9d8fb4bb865b3b3d011e7633afedcdfb8d21754f
https://github.com/1gravity/Android-RTEditor/blob/9d8fb4bb865b3b3d011e7633afedcdfb8d21754f/RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/HTMLWriter.java#L885-L900
test
Write Attributes.
Of course, here is the Java code you requested: ```java private void writeAttributes(Attributes atts) throws SAXException { int len = atts.getLength(); for (int i = 0; i < len; i++) { write(' '); writeName(atts.getURI(i), atts.getLocalName(i), atts.getQName(i), ...
OpenEstate/OpenEstate-IO
ImmoXML/src/main/jaxb/org/openestate/io/immoxml/xml/ObjectFactory.java
ObjectFactory.createKaufpreisProQm
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "kaufpreis_pro_qm") @XmlJavaTypeAdapter(Adapter7 .class) public JAXBElement<BigDecimal> createKaufpreisProQm(BigDecimal value) { return new JAXBElement<BigDecimal>(_KaufpreisProQm_QNAME, BigDecimal.class, null, value); }
java
@XmlElementDecl(namespace = "http://www.immoxml.de", name = "kaufpreis_pro_qm") @XmlJavaTypeAdapter(Adapter7 .class) public JAXBElement<BigDecimal> createKaufpreisProQm(BigDecimal value) { return new JAXBElement<BigDecimal>(_KaufpreisProQm_QNAME, BigDecimal.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"http://www.immoxml.de\"", ",", "name", "=", "\"kaufpreis_pro_qm\"", ")", "@", "XmlJavaTypeAdapter", "(", "Adapter7", ".", "class", ")", "public", "JAXBElement", "<", "BigDecimal", ">", "createKaufpreisProQm", "(", "Bi...
Create an instance of {@link JAXBElement }{@code <}{@link BigDecimal }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "BigDecimal", "}", "{", "@code", ">", "}}" ]
f961dae78f40823f05a8c0d4e59d639e718aa18a
https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/ImmoXML/src/main/jaxb/org/openestate/io/immoxml/xml/ObjectFactory.java#L1257-L1261
test
Create an instance of a KaufpreisProQm value.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://www.immoxml.de", name = "kaufpreis_pro_qm") @XmlJavaTypeAdapter(Adapter7 .class) public JAXBElement<BigDecimal> createKaufpreisProQm(BigDecimal value) { return new JAXBElement<BigDecimal>(_KaufpreisProQm_QNAME, ...
sialcasa/mvvmFX
mvvmfx-cdi/src/main/java/de/saxsys/mvvmfx/cdi/MvvmfxCdiApplication.java
MvvmfxCdiApplication.init
@SuppressWarnings("unchecked") @Override public final void init() throws Exception { ctx = beanManager.createCreationalContext(null); injectionTarget = beanManager.createInjectionTarget( beanManager.createAnnotatedType((Class<MvvmfxCdiApplication>) this.getClass())); injectionTarget.inject(this, ctx); in...
java
@SuppressWarnings("unchecked") @Override public final void init() throws Exception { ctx = beanManager.createCreationalContext(null); injectionTarget = beanManager.createInjectionTarget( beanManager.createAnnotatedType((Class<MvvmfxCdiApplication>) this.getClass())); injectionTarget.inject(this, ctx); in...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "final", "void", "init", "(", ")", "throws", "Exception", "{", "ctx", "=", "beanManager", ".", "createCreationalContext", "(", "null", ")", ";", "injectionTarget", "=", "beanManager",...
This method is called when the javafx application is initialized. See {@link javafx.application.Application#init()} for more details. Unlike the original init method in {@link javafx.application.Application} this method contains logic to initialize the CDI container. For this reason this method is now final to preven...
[ "This", "method", "is", "called", "when", "the", "javafx", "application", "is", "initialized", ".", "See", "{", "@link", "javafx", ".", "application", ".", "Application#init", "()", "}", "for", "more", "details", "." ]
240566a358a8e01c94c0bbb99228140a69690d02
https://github.com/sialcasa/mvvmFX/blob/240566a358a8e01c94c0bbb99228140a69690d02/mvvmfx-cdi/src/main/java/de/saxsys/mvvmfx/cdi/MvvmfxCdiApplication.java#L84-L97
test
Initializes the application.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @Override public final void init() throws Exception { ctx = beanManager.createCreationalContext(null); injectionTarget = beanManager.createInjectionTarget( beanManager.createAnnotatedType((Class<MvvmfxCdiApplication>) this...
playframework/playframework
core/play/src/main/java/play/mvc/Results.java
Results.badRequest
public static Result badRequest(JsonNode content, JsonEncoding encoding) { return status(BAD_REQUEST, content, encoding); }
java
public static Result badRequest(JsonNode content, JsonEncoding encoding) { return status(BAD_REQUEST, content, encoding); }
[ "public", "static", "Result", "badRequest", "(", "JsonNode", "content", ",", "JsonEncoding", "encoding", ")", "{", "return", "status", "(", "BAD_REQUEST", ",", "content", ",", "encoding", ")", ";", "}" ]
Generates a 400 Bad Request result. @param content the result's body content as a play-json object @param encoding the encoding into which the json should be encoded @return the result
[ "Generates", "a", "400", "Bad", "Request", "result", "." ]
3c46dca803d24e715d85de678c59dcfac9525a00
https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play/src/main/java/play/mvc/Results.java#L1039-L1041
test
A bad request result.
Of course, here is the Java code you requested: ```java public static Result badRequest(JsonNode content, JsonEncoding encoding) { return status(BAD_REQUEST, content, encoding); } ``` Hope this helps!
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.zipWith
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper) { ObjectHelper.requireNonNull(other, "other is null"); return zip(this, other, zipper); ...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper) { ObjectHelper.requireNonNull(other, "other is null"); return zip(this, other, zipper); ...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "U", ",", "R", ">", "Observable", "<", "R", ">", "zipWith", "(", "ObservableSource", "<", "?", "extends", "U", ">", "other", ",", "BiFuncti...
Returns an Observable that emits items that are the result of applying a specified function to pairs of values, one each from the source ObservableSource and another specified ObservableSource. <p> <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt=""> <p> T...
[ "Returns", "an", "Observable", "that", "emits", "items", "that", "are", "the", "result", "of", "applying", "a", "specified", "function", "to", "pairs", "of", "values", "one", "each", "from", "the", "source", "ObservableSource", "and", "another", "specified", "...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L15347-L15353
test
Zip together this and other observable source with a CrazyNine - style application.
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other, BiFunction<? super T, ? super U, ? extends R> zipper) { ObjectHelper.requireNonNull(other, "other...
lessthanoptimal/GeoRegression
main/src/georegression/transform/twist/TwistOps_F64.java
TwistOps_F64.exponential
public static Se3_F64 exponential(TwistCoordinate_F64 twist , double theta , Se3_F64 motion ) { if( motion == null ) { motion = new Se3_F64(); } double w_norm = twist.w.norm(); if( w_norm == 0.0 ) { CommonOps_DDRM.setIdentity(motion.R); motion.T.x = twist.v.x*theta; motion.T.y = twist.v.y*theta; ...
java
public static Se3_F64 exponential(TwistCoordinate_F64 twist , double theta , Se3_F64 motion ) { if( motion == null ) { motion = new Se3_F64(); } double w_norm = twist.w.norm(); if( w_norm == 0.0 ) { CommonOps_DDRM.setIdentity(motion.R); motion.T.x = twist.v.x*theta; motion.T.y = twist.v.y*theta; ...
[ "public", "static", "Se3_F64", "exponential", "(", "TwistCoordinate_F64", "twist", ",", "double", "theta", ",", "Se3_F64", "motion", ")", "{", "if", "(", "motion", "==", "null", ")", "{", "motion", "=", "new", "Se3_F64", "(", ")", ";", "}", "double", "w_...
<p> Computes the exponential map for a twist:<br> exp(hat(xi)*theta) = [ SO , (I-SO)*(w cross v) + w*w<sup>T</sup>v&Theta; 0 , 1]<br> SO = exp(hat(w)*theta) </p> See page 42 in R. Murray, et. al. "A Mathematical Introduction to ROBOTIC MANIPULATION" 1994 @param twist Twist coordinate @param theta Magnitude of rotatio...
[ "<p", ">", "Computes", "the", "exponential", "map", "for", "a", "twist", ":", "<br", ">", "exp", "(", "hat", "(", "xi", ")", "*", "theta", ")", "=", "[", "SO", "(", "I", "-", "SO", ")", "*", "(", "w", "cross", "v", ")", "+", "w", "*", "w<su...
c067cd44a4e95bd826119f6e658bd82386ef289f
https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/transform/twist/TwistOps_F64.java#L100-L146
test
Computes the motion from the exponential equation.
Of course, here is the Java code you requested: ```java public static Se3_F64 exponential(TwistCoordinate_F64 twist , double theta , Se3_F64 motion ) { if( motion == null ) { motion = new Se3_F64(); } double w_norm = twist.w.norm(); if( w_norm == 0.0 ) { CommonOps_DDRM.setIdentity(motion.R); motion....
oblac/jodd
jodd-proxetta/src/main/java/jodd/asm7/ClassReader.java
ClassReader.getTypeAnnotationBytecodeOffset
private int getTypeAnnotationBytecodeOffset( final int[] typeAnnotationOffsets, final int typeAnnotationIndex) { if (typeAnnotationOffsets == null || typeAnnotationIndex >= typeAnnotationOffsets.length || readByte(typeAnnotationOffsets[typeAnnotationIndex]) < TypeReference.INSTANCEOF) { ...
java
private int getTypeAnnotationBytecodeOffset( final int[] typeAnnotationOffsets, final int typeAnnotationIndex) { if (typeAnnotationOffsets == null || typeAnnotationIndex >= typeAnnotationOffsets.length || readByte(typeAnnotationOffsets[typeAnnotationIndex]) < TypeReference.INSTANCEOF) { ...
[ "private", "int", "getTypeAnnotationBytecodeOffset", "(", "final", "int", "[", "]", "typeAnnotationOffsets", ",", "final", "int", "typeAnnotationIndex", ")", "{", "if", "(", "typeAnnotationOffsets", "==", "null", "||", "typeAnnotationIndex", ">=", "typeAnnotationOffsets...
Returns the bytecode offset corresponding to the specified JVMS 'type_annotation' structure, or -1 if there is no such type_annotation of if it does not have a bytecode offset. @param typeAnnotationOffsets the offset of each 'type_annotation' entry in a Runtime[In]VisibleTypeAnnotations attribute, or null. @param type...
[ "Returns", "the", "bytecode", "offset", "corresponding", "to", "the", "specified", "JVMS", "type_annotation", "structure", "or", "-", "1", "if", "there", "is", "no", "such", "type_annotation", "of", "if", "it", "does", "not", "have", "a", "bytecode", "offset",...
85ad7f813ec0e07ecd27042aeb47ff2047631fa5
https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-proxetta/src/main/java/jodd/asm7/ClassReader.java#L2596-L2604
test
Get the bytecode offset of a type annotation.
Of course, here is the Java code you requested: ```java private int getTypeAnnotationBytecodeOffset( final int[] typeAnnotationOffsets, final int typeAnnotationIndex) { if (typeAnnotationOffsets == null || typeAnnotationIndex >= typeAnnotationOffsets.length || readByte(typeAnnotationOffsets[t...
lessthanoptimal/GeoRegression
main/src/georegression/metric/Intersection2D_F64.java
Intersection2D_F64.intersection
public static double intersection( LineParametric2D_F64 a, LineParametric2D_F64 b ) { double t_a = b.getSlopeX() * ( a.getY() - b.getY() ) - b.getSlopeY() * ( a.getX() - b.getX() ); double bottom = b.getSlopeY() * a.getSlopeX() - a.getSlopeY() * b.getSlopeX(); if( bottom == 0 ) return Double.NaN; return t_...
java
public static double intersection( LineParametric2D_F64 a, LineParametric2D_F64 b ) { double t_a = b.getSlopeX() * ( a.getY() - b.getY() ) - b.getSlopeY() * ( a.getX() - b.getX() ); double bottom = b.getSlopeY() * a.getSlopeX() - a.getSlopeY() * b.getSlopeX(); if( bottom == 0 ) return Double.NaN; return t_...
[ "public", "static", "double", "intersection", "(", "LineParametric2D_F64", "a", ",", "LineParametric2D_F64", "b", ")", "{", "double", "t_a", "=", "b", ".", "getSlopeX", "(", ")", "*", "(", "a", ".", "getY", "(", ")", "-", "b", ".", "getY", "(", ")", ...
Finds the point of intersection between two lines. The point of intersection is specified as a point along the parametric line 'a'. (x,y) = (x_0,y_0) + t*(slope_x,slope_y), where 't' is the location returned. @param a Line. @param b Line. @return The location along 'target'. If the lines do not intersect or have in...
[ "Finds", "the", "point", "of", "intersection", "between", "two", "lines", ".", "The", "point", "of", "intersection", "is", "specified", "as", "a", "point", "along", "the", "parametric", "line", "a", ".", "(", "x", "y", ")", "=", "(", "x_0", "y_0", ")",...
c067cd44a4e95bd826119f6e658bd82386ef289f
https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/metric/Intersection2D_F64.java#L197-L205
test
Computes the intersection between two lines
Of course, here is the Java code you requested: ```java public static double intersection( LineParametric2D_F64 a, LineParametric2D_F64 b ) { double t_a = b.getSlopeX() * ( a.getY() - b.getY() ) - b.getSlopeY() * ( a.getX() - b.getX() ); double bottom = b.getSlopeY() * a.getSlopeX() - a.getSlopeY() * b.getSlopeX()...
Unidata/thredds
cdm/src/main/java/uk/ac/rdg/resc/edal/time/FixedYearVariableMonthChronology.java
FixedYearVariableMonthChronology.sumArray
private static int sumArray(int[] arr) { if (arr == null) throw new NullPointerException("null array"); if (arr.length == 0) throw new IllegalArgumentException("Zero-length array"); int sum = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] <= 0) { t...
java
private static int sumArray(int[] arr) { if (arr == null) throw new NullPointerException("null array"); if (arr.length == 0) throw new IllegalArgumentException("Zero-length array"); int sum = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] <= 0) { t...
[ "private", "static", "int", "sumArray", "(", "int", "[", "]", "arr", ")", "{", "if", "(", "arr", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"null array\"", ")", ";", "if", "(", "arr", ".", "length", "==", "0", ")", "throw", "ne...
Calculates the sum of the values in the given array. @throws NullPointerException if arr is null @throws IllegalArgumentException if arr is empty or contains zero or negative values.
[ "Calculates", "the", "sum", "of", "the", "values", "in", "the", "given", "array", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/uk/ac/rdg/resc/edal/time/FixedYearVariableMonthChronology.java#L79-L90
test
This method returns the sum of the elements in the array.
Of course, here is the Java code you requested: ```java private static int sumArray(int[] arr) { if (arr == null) throw new NullPointerException("null array"); if (arr.length == 0) throw new IllegalArgumentException("Zero-length array"); int sum = 0; for (int i = 0; i < arr.length; ...
Unidata/thredds
cdm/src/main/java/ucar/unidata/geoloc/ogc/WKTParser.java
WKTParser.eatTerm
private String eatTerm() throws ParseException { StringBuilder b = new StringBuilder(); for (; ; ) { char val = peek(); if (!Character.isJavaIdentifierPart(val)) { break; } b.append(getChar()); } return b.toString(); }
java
private String eatTerm() throws ParseException { StringBuilder b = new StringBuilder(); for (; ; ) { char val = peek(); if (!Character.isJavaIdentifierPart(val)) { break; } b.append(getChar()); } return b.toString(); }
[ "private", "String", "eatTerm", "(", ")", "throws", "ParseException", "{", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", ";", ";", ")", "{", "char", "val", "=", "peek", "(", ")", ";", "if", "(", "!", "Character", ".", ...
_more_ @return _more_ @throws ParseException _more_
[ "_more_" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/unidata/geoloc/ogc/WKTParser.java#L240-L250
test
Eats a term.
Of course, here is the Java code you requested: ```java private String eatTerm() throws ParseException { StringBuilder b = new StringBuilder(); for (; ; ) { char val = peek(); if (!Character.isJavaIdentifierPart(val)) { break; } b.append(getChar()); } return b.t...
Unidata/thredds
cdm/src/main/java/ucar/nc2/units/DateRange.java
DateRange.setEnd
public void setEnd(DateType end) { this.end = end; useEnd = true; if (useStart) { this.isMoving = this.start.isPresent() || this.end.isPresent(); useDuration = false; recalcDuration(); } else { this.isMoving = this.end.isPresent(); this.start = this.end.subtract(duration)...
java
public void setEnd(DateType end) { this.end = end; useEnd = true; if (useStart) { this.isMoving = this.start.isPresent() || this.end.isPresent(); useDuration = false; recalcDuration(); } else { this.isMoving = this.end.isPresent(); this.start = this.end.subtract(duration)...
[ "public", "void", "setEnd", "(", "DateType", "end", ")", "{", "this", ".", "end", "=", "end", ";", "useEnd", "=", "true", ";", "if", "(", "useStart", ")", "{", "this", ".", "isMoving", "=", "this", ".", "start", ".", "isPresent", "(", ")", "||", ...
Set the ending Date. Makes useEnd true. If useStart, recalculate the duration, else recalculate start. @param end ending Date
[ "Set", "the", "ending", "Date", ".", "Makes", "useEnd", "true", ".", "If", "useStart", "recalculate", "the", "duration", "else", "recalculate", "start", "." ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/units/DateRange.java#L293-L307
test
Sets the end date.
Of course, here is the Java code you requested: ```java public void setEnd(DateType end) { this.end = end; useEnd = true; if (useStart) { this.isMoving = this.start.isPresent() || this.end.isPresent(); useDuration = false; recalcDuration(); } else { this.isMoving = this.end.is...
robeio/robe
robe-assets/src/main/java/io/robe/assets/file/FileAsset.java
FileAsset.setAsset
public void setAsset(String path) { this.asset = new File(path); if (!this.asset.exists() || !this.asset.isFile()) throw new RuntimeException("File does not exist: " + path); }
java
public void setAsset(String path) { this.asset = new File(path); if (!this.asset.exists() || !this.asset.isFile()) throw new RuntimeException("File does not exist: " + path); }
[ "public", "void", "setAsset", "(", "String", "path", ")", "{", "this", ".", "asset", "=", "new", "File", "(", "path", ")", ";", "if", "(", "!", "this", ".", "asset", ".", "exists", "(", ")", "||", "!", "this", ".", "asset", ".", "isFile", "(", ...
Sets http http according to path. It must exist as http. @param path
[ "Sets", "http", "http", "according", "to", "path", ".", "It", "must", "exist", "as", "http", "." ]
a0a8c7cebd1f70f78cf24a66a002859e937badfe
https://github.com/robeio/robe/blob/a0a8c7cebd1f70f78cf24a66a002859e937badfe/robe-assets/src/main/java/io/robe/assets/file/FileAsset.java#L37-L41
test
Sets the asset file.
Of course, here is the Java code you requested: ```java public void setAsset(String path) { this.asset = new File(path); if (!this.asset.exists() || !this.asset.isFile()) throw new RuntimeException("File does not exist: " + path); } ``` Hope this helps!