repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java
JsonUtil.writeJsonValueMap
public static void writeJsonValueMap(JsonWriter writer, StringFilter filter, ValueMap values, MappingRules mapping) throws RepositoryException, IOException { if (values != null) { TreeMap<String, Object> sortedProperties = new TreeMap<>(); ...
java
public static void writeJsonValueMap(JsonWriter writer, StringFilter filter, ValueMap values, MappingRules mapping) throws RepositoryException, IOException { if (values != null) { TreeMap<String, Object> sortedProperties = new TreeMap<>(); ...
[ "public", "static", "void", "writeJsonValueMap", "(", "JsonWriter", "writer", ",", "StringFilter", "filter", ",", "ValueMap", "values", ",", "MappingRules", "mapping", ")", "throws", "RepositoryException", ",", "IOException", "{", "if", "(", "values", "!=", "null"...
Write all properties of an node accepted by the filter into an JSON array. @param writer the JSON writer object (with the JSON state) @param filter the property name filter @param values the Sling ValueMap to write @throws javax.jcr.RepositoryException error on accessing JCR @throws java.io.IOException error...
[ "Write", "all", "properties", "of", "an", "node", "accepted", "by", "the", "filter", "into", "an", "JSON", "array", "." ]
ebc79f559f6022c935240c19102539bdfb1bd1e2
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/JsonUtil.java#L710-L737
train
Write a value map to a JSON writer.
Of course, here is the Java code you requested: ```java public static void writeJsonValueMap(JsonWriter writer, StringFilter filter, ValueMap values, MappingRules mapping) throws RepositoryException, IOException { if (values != null) { TreeMap<St...
subchen/jetbrick-all-1x
jetbrick-commons/src/main/java/jetbrick/beans/ClassLoaderUtils.java
ClassLoaderUtils.loadClass
public static Class<?> loadClass(final String qualifiedClassName, ClassLoader loader) { try { return loadClassEx(qualifiedClassName, loader); } catch (ClassNotFoundException e) { return null; } }
java
public static Class<?> loadClass(final String qualifiedClassName, ClassLoader loader) { try { return loadClassEx(qualifiedClassName, loader); } catch (ClassNotFoundException e) { return null; } }
[ "public", "static", "Class", "<", "?", ">", "loadClass", "(", "final", "String", "qualifiedClassName", ",", "ClassLoader", "loader", ")", "{", "try", "{", "return", "loadClassEx", "(", "qualifiedClassName", ",", "loader", ")", ";", "}", "catch", "(", "ClassN...
使用默认的 ClassLoader 去载入类. @return null if class not found
[ "使用默认的", "ClassLoader", "去载入类", "." ]
abe54629a508592287afe5ca4ffc93bf8bf4940c
https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/beans/ClassLoaderUtils.java#L62-L68
test
Load Class.
Of course, here is the Java code you requested: ```java public static Class<?> loadClass(final String qualifiedClassName, ClassLoader loader) { try { return loadClassEx(qualifiedClassName, loader); } catch (ClassNotFoundException e) { return null; } } ``` Hope this ...
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java
ReferenceEntityLockService.convert
@Override public void convert(IEntityLock lock, int newType) throws LockingException { convert(lock, newType, defaultLockPeriod); }
java
@Override public void convert(IEntityLock lock, int newType) throws LockingException { convert(lock, newType, defaultLockPeriod); }
[ "@", "Override", "public", "void", "convert", "(", "IEntityLock", "lock", ",", "int", "newType", ")", "throws", "LockingException", "{", "convert", "(", "lock", ",", "newType", ",", "defaultLockPeriod", ")", ";", "}" ]
Attempts to change the lock's <code>lockType</code> to <code>newType</code>. @param lock IEntityLock @param newType int @exception org.apereo.portal.concurrency.LockingException
[ "Attempts", "to", "change", "the", "lock", "s", "<code", ">", "lockType<", "/", "code", ">", "to", "<code", ">", "newType<", "/", "code", ">", "." ]
c1986542abb9acd214268f2df21c6305ad2f262b
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java#L63-L66
train
This method is called to convert an entity lock to a new type.
Of course, here is the Java code you requested: ```java @Override public void convert(IEntityLock lock, int newType) throws LockingException { convert(lock, newType, defaultLockPeriod); } ``` Hope this helps!
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/indexing/BranchUniversalObject.java
BranchUniversalObject.getReferredBranchUniversalObject
public static BranchUniversalObject getReferredBranchUniversalObject() { BranchUniversalObject branchUniversalObject = null; Branch branchInstance = Branch.getInstance(); try { if (branchInstance != null && branchInstance.getLatestReferringParams() != null) { // Check...
java
public static BranchUniversalObject getReferredBranchUniversalObject() { BranchUniversalObject branchUniversalObject = null; Branch branchInstance = Branch.getInstance(); try { if (branchInstance != null && branchInstance.getLatestReferringParams() != null) { // Check...
[ "public", "static", "BranchUniversalObject", "getReferredBranchUniversalObject", "(", ")", "{", "BranchUniversalObject", "branchUniversalObject", "=", "null", ";", "Branch", "branchInstance", "=", "Branch", ".", "getInstance", "(", ")", ";", "try", "{", "if", "(", "...
Get the {@link BranchUniversalObject} associated with the latest deep linking. This should retrieve the exact object used for creating the deep link. This should be called only after initialising Branch Session. @return A {@link BranchUniversalObject} used to create the deep link that started the this app session. Nul...
[ "Get", "the", "{", "@link", "BranchUniversalObject", "}", "associated", "with", "the", "latest", "deep", "linking", ".", "This", "should", "retrieve", "the", "exact", "object", "used", "for", "creating", "the", "deep", "link", ".", "This", "should", "be", "c...
e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/indexing/BranchUniversalObject.java#L765-L782
train
Get the BranchUniversalObject object that was created by the Branch.
Of course, here is the Java code you requested: ```java public static BranchUniversalObject getReferredBranchUniversalObject() { BranchUniversalObject branchUniversalObject = null; Branch branchInstance = Branch.getInstance(); try { if (branchInstance != null && branchInstance.getLa...
jkuhnert/ognl
src/main/java/ognl/OgnlParser.java
OgnlParser.equalityExpression
final public void equalityExpression() throws ParseException { relationalExpression(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 15: case 16: case 17: case 18: ; break; default: jj_la1[13] = jj_gen; break label_7;...
java
final public void equalityExpression() throws ParseException { relationalExpression(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 15: case 16: case 17: case 18: ; break; default: jj_la1[13] = jj_gen; break label_7;...
[ "final", "public", "void", "equalityExpression", "(", ")", "throws", "ParseException", "{", "relationalExpression", "(", ")", ";", "label_7", ":", "while", "(", "true", ")", "{", "switch", "(", "(", "jj_ntk", "==", "-", "1", ")", "?", "jj_ntk", "(", ")",...
equality/inequality (==/!=) (level 6)
[ "equality", "/", "inequality", "(", "==", "/", "!", "=", ")", "(", "level", "6", ")" ]
53d51a30c8c299b750dede779d05cb84beee73c3
https://github.com/jkuhnert/ognl/blob/53d51a30c8c299b750dede779d05cb84beee73c3/src/main/java/ognl/OgnlParser.java#L404-L504
test
11. 2 The equality expression
Of course, here is the Java code you requested: ```java final public void equalityExpression() throws ParseException { relationalExpression(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 15: case 16: case 17: case 18: ; break; def...
cucumber-attic/gherkin2
java/src/main/java/gherkin/lexer/Fr.java
Fr.scan
public void scan(String source) { String input = source + "\n%_FEATURE_END_%"; byte[] data = null; try { data = input.getBytes("UTF-8"); } catch(UnsupportedEncodingException e) { throw new RuntimeException(e); } int cs, p = 0, pe = data.length; int eof = pe; int lineNumber ...
java
public void scan(String source) { String input = source + "\n%_FEATURE_END_%"; byte[] data = null; try { data = input.getBytes("UTF-8"); } catch(UnsupportedEncodingException e) { throw new RuntimeException(e); } int cs, p = 0, pe = data.length; int eof = pe; int lineNumber ...
[ "public", "void", "scan", "(", "String", "source", ")", "{", "String", "input", "=", "source", "+", "\"\\n%_FEATURE_END_%\"", ";", "byte", "[", "]", "data", "=", "null", ";", "try", "{", "data", "=", "input", ".", "getBytes", "(", "\"UTF-8\"", ")", ";"...
line 159 "ragel/i18n/fr.java.rl"
[ "line", "159", "ragel", "/", "i18n", "/", "fr", ".", "java", ".", "rl" ]
6c8d2fa293bd40b0a67e8dc00cf2ea68dadce607
https://github.com/cucumber-attic/gherkin2/blob/6c8d2fa293bd40b0a67e8dc00cf2ea68dadce607/java/src/main/java/gherkin/lexer/Fr.java#L631-L967
train
Scan the source string for features.
Of course, here is the Java code you requested: ```java public void scan(String source) { String input = source + "\n%_FEATURE_END_%"; byte[] data = null; try { data = input.getBytes("UTF-8"); } catch(UnsupportedEncodingException e) { throw new RuntimeException(e); } int cs, p = 0,...
stripe/stripe-android
stripe/src/main/java/com/stripe/android/IssuingCardPinService.java
IssuingCardPinService.updatePin
public void updatePin( @NonNull String cardId, @NonNull String newPin, @NonNull String verificationId, @NonNull String userOneTimeCode, @NonNull IssuingCardPinUpdateListener listener ) { Map<String, Object> arguments = new HashMap<>(); arg...
java
public void updatePin( @NonNull String cardId, @NonNull String newPin, @NonNull String verificationId, @NonNull String userOneTimeCode, @NonNull IssuingCardPinUpdateListener listener ) { Map<String, Object> arguments = new HashMap<>(); arg...
[ "public", "void", "updatePin", "(", "@", "NonNull", "String", "cardId", ",", "@", "NonNull", "String", "newPin", ",", "@", "NonNull", "String", "verificationId", ",", "@", "NonNull", "String", "userOneTimeCode", ",", "@", "NonNull", "IssuingCardPinUpdateListener",...
Retrieves a PIN for a given card @param cardId the ID of the card (looks like ic_abcdef1234) @param newPin the new desired PIN @param verificationId the ID of the verification that was sent to the cardholder (typically server-side, through /v1/issuing/verifications) @param userOneTimeCode the one-ti...
[ "Retrieves", "a", "PIN", "for", "a", "given", "card" ]
0f199255f3769a3b84583fe3ace47bfae8c3b1c8
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/IssuingCardPinService.java#L110-L127
train
Update the specified CARTESIAN Pin.
Of course, here is the Java code you requested: ```java public void updatePin( @NonNull String cardId, @NonNull String newPin, @NonNull String verificationId, @NonNull String userOneTimeCode, @NonNull IssuingCardPinUpdateListener listener ) { Map...
opensourceBIM/BIMserver
BimServer/src/org/bimserver/longaction/LongActionManager.java
LongActionManager.shutdownGracefully
public synchronized void shutdownGracefully() { running = false; Iterator<LongAction<?>> iterator = actions.values().iterator(); while (iterator.hasNext()) { LongAction<?> longAction = iterator.next(); longAction.waitForCompletion(); } }
java
public synchronized void shutdownGracefully() { running = false; Iterator<LongAction<?>> iterator = actions.values().iterator(); while (iterator.hasNext()) { LongAction<?> longAction = iterator.next(); longAction.waitForCompletion(); } }
[ "public", "synchronized", "void", "shutdownGracefully", "(", ")", "{", "running", "=", "false", ";", "Iterator", "<", "LongAction", "<", "?", ">", ">", "iterator", "=", "actions", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "while", "(", "...
/* Untested method
[ "/", "*", "Untested", "method" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/BimServer/src/org/bimserver/longaction/LongActionManager.java#L89-L96
train
Shutdown the long action thread.
Of course, here is the Java code you requested: ```java public synchronized void shutdownGracefully() { running = false; Iterator<LongAction<?>> iterator = actions.values().iterator(); while (iterator.hasNext()) { LongAction<?> longAction = iterator.next(); longAction.waitForCompletion(); } } ```...
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/NativeLibraryLoader.java
NativeLibraryLoader.getPlatformLibraryName
public static String getPlatformLibraryName(final String aLibraryName) { String libName = null; switch (getArchitecture()) { case LINUX_32: case LINUX_64: case LINUX_ARM: libName = LIB_PREFIX + aLibraryName + ".so"; break; ...
java
public static String getPlatformLibraryName(final String aLibraryName) { String libName = null; switch (getArchitecture()) { case LINUX_32: case LINUX_64: case LINUX_ARM: libName = LIB_PREFIX + aLibraryName + ".so"; break; ...
[ "public", "static", "String", "getPlatformLibraryName", "(", "final", "String", "aLibraryName", ")", "{", "String", "libName", "=", "null", ";", "switch", "(", "getArchitecture", "(", ")", ")", "{", "case", "LINUX_32", ":", "case", "LINUX_64", ":", "case", "...
Gets the library name for the current platform. @param aLibraryName The platform-independent library name @return The library name for the current platform
[ "Gets", "the", "library", "name", "for", "the", "current", "platform", "." ]
54e822ae4c11b3d74793fd82a1a535ffafffaf45
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/NativeLibraryLoader.java#L158-L182
train
Get the platform library name.
Of course, here is the Java code you requested: ```java public static String getPlatformLibraryName(final String aLibraryName) { String libName = null; switch (getArchitecture()) { case LINUX_32: case LINUX_64: case LINUX_ARM: libName = LIB_PREFIX + ...
Jasig/uPortal
uPortal-security/uPortal-security-services/src/main/java/org/apereo/portal/services/EntityNameFinderService.java
EntityNameFinderService.initialize
private synchronized void initialize() { Iterator types = EntityTypesLocator.getEntityTypes().getAllEntityTypes(); String factoryName = null; while (types.hasNext()) { Class type = (Class) types.next(); if (type != Object.class) { String factoryKey = ...
java
private synchronized void initialize() { Iterator types = EntityTypesLocator.getEntityTypes().getAllEntityTypes(); String factoryName = null; while (types.hasNext()) { Class type = (Class) types.next(); if (type != Object.class) { String factoryKey = ...
[ "private", "synchronized", "void", "initialize", "(", ")", "{", "Iterator", "types", "=", "EntityTypesLocator", ".", "getEntityTypes", "(", ")", ".", "getAllEntityTypes", "(", ")", ";", "String", "factoryName", "=", "null", ";", "while", "(", "types", ".", "...
Gets all the entity types and tries to instantiate and cache a finder for each one. There needn't be a finder for every entity type, so if there's no entry in the portal.properties, we just log the fact and continue.
[ "Gets", "all", "the", "entity", "types", "and", "tries", "to", "instantiate", "and", "cache", "a", "finder", "for", "each", "one", ".", "There", "needn", "t", "be", "a", "finder", "for", "every", "entity", "type", "so", "if", "there", "s", "no", "entry...
c1986542abb9acd214268f2df21c6305ad2f262b
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-security/uPortal-security-services/src/main/java/org/apereo/portal/services/EntityNameFinderService.java#L61-L98
train
Initialize the entity type finder service.
Of course, here is the Java code you requested: ```java private synchronized void initialize() { Iterator types = EntityTypesLocator.getEntityTypes().getAllEntityTypes(); String factoryName = null; while (types.hasNext()) { Class type = (Class) types.next(); if (type !=...
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/migration/MigrateToExtensionSettings.java
MigrateToExtensionSettings.getFeeds
private static List<Feed> getFeeds( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class); String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'EN...
java
private static List<Feed> getFeeds( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class); String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'EN...
[ "private", "static", "List", "<", "Feed", ">", "getFeeds", "(", "AdWordsServicesInterface", "adWordsServices", ",", "AdWordsSession", "session", ")", "throws", "RemoteException", "{", "FeedServiceInterface", "feedService", "=", "adWordsServices", ".", "get", "(", "ses...
Returns a list of all enabled feeds.
[ "Returns", "a", "list", "of", "all", "enabled", "feeds", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/migration/MigrateToExtensionSettings.java#L314-L333
train
Gets the list of all the user s NCRs.
Of course, here is the Java code you requested: ```java private static List<Feed> getFeeds( AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException { FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class); String query = "SELECT Id, Na...
lunisolar/magma
magma-func-builder/src/main/java/eu/lunisolar/magma/func/build/supplier/LFltSupplierBuilder.java
LFltSupplierBuilder.fltSupplierFrom
@Nonnull public static LFltSupplier fltSupplierFrom(Consumer<LFltSupplierBuilder> buildingFunction) { LFltSupplierBuilder builder = new LFltSupplierBuilder(); buildingFunction.accept(builder); return builder.build(); }
java
@Nonnull public static LFltSupplier fltSupplierFrom(Consumer<LFltSupplierBuilder> buildingFunction) { LFltSupplierBuilder builder = new LFltSupplierBuilder(); buildingFunction.accept(builder); return builder.build(); }
[ "@", "Nonnull", "public", "static", "LFltSupplier", "fltSupplierFrom", "(", "Consumer", "<", "LFltSupplierBuilder", ">", "buildingFunction", ")", "{", "LFltSupplierBuilder", "builder", "=", "new", "LFltSupplierBuilder", "(", ")", ";", "buildingFunction", ".", "accept"...
One of ways of creating builder. This is possibly the least verbose way where compiler should be able to guess the generic parameters.
[ "One", "of", "ways", "of", "creating", "builder", ".", "This", "is", "possibly", "the", "least", "verbose", "way", "where", "compiler", "should", "be", "able", "to", "guess", "the", "generic", "parameters", "." ]
83809c6d1a33d913aec6c49920251e4f0be8b213
https://github.com/lunisolar/magma/blob/83809c6d1a33d913aec6c49920251e4f0be8b213/magma-func-builder/src/main/java/eu/lunisolar/magma/func/build/supplier/LFltSupplierBuilder.java#L82-L87
train
Create a flt supplier from a consumer.
Of course, here is the Java code you requested: ```java @Nonnull public static LFltSupplier fltSupplierFrom(Consumer<LFltSupplierBuilder> buildingFunction) { LFltSupplierBuilder builder = new LFltSupplierBuilder(); buildingFunction.accept(builder); return builder.build(); } ``` Hope this helps!
EsupPortail/esup-smsu-api
src/main/java/org/esupportail/smsuapi/business/purge/PurgeSms.java
PurgeSms.purgeSmsOlderThan
private void purgeSmsOlderThan(final Date date) { logger.debug("Starting purge of SMS table with parameter : \n" + " - date : " + date); final int nbSmsDeleted = daoService.deleteSmsOlderThan(date); logger.debug("End purge of SMS table, result : \n" + " - number of sms deleted : " + nb...
java
private void purgeSmsOlderThan(final Date date) { logger.debug("Starting purge of SMS table with parameter : \n" + " - date : " + date); final int nbSmsDeleted = daoService.deleteSmsOlderThan(date); logger.debug("End purge of SMS table, result : \n" + " - number of sms deleted : " + nb...
[ "private", "void", "purgeSmsOlderThan", "(", "final", "Date", "date", ")", "{", "logger", ".", "debug", "(", "\"Starting purge of SMS table with parameter : \\n\"", "+", "\" - date : \"", "+", "date", ")", ";", "final", "int", "nbSmsDeleted", "=", "daoService", ".",...
Purge the Sms in db with date older than the specified date. @param date
[ "Purge", "the", "Sms", "in", "db", "with", "date", "older", "than", "the", "specified", "date", "." ]
7b6a4388065adfd84655dbc83f37080874953b20
https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/purge/PurgeSms.java#L41-L49
train
Purges the SMS table with a date older than the given date.
Of course, here is the Java code you requested: ```java private void purgeSmsOlderThan(final Date date) { logger.debug("Starting purge of SMS table with parameter : \n" + " - date : " + date); final int nbSmsDeleted = daoService.deleteSmsOlderThan(date); logger.debug("End purge of SMS table, res...
orientechnologies/orientdb
core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerCSVAbstract.java
ORecordSerializerCSVAbstract.linkToStream
private static OIdentifiable linkToStream(final StringBuilder buffer, final ODocument iParentRecord, Object iLinked) { if (iLinked == null) // NULL REFERENCE return null; OIdentifiable resultRid = null; ORID rid; if (iLinked instanceof ORID) { // JUST THE REFERENCE ri...
java
private static OIdentifiable linkToStream(final StringBuilder buffer, final ODocument iParentRecord, Object iLinked) { if (iLinked == null) // NULL REFERENCE return null; OIdentifiable resultRid = null; ORID rid; if (iLinked instanceof ORID) { // JUST THE REFERENCE ri...
[ "private", "static", "OIdentifiable", "linkToStream", "(", "final", "StringBuilder", "buffer", ",", "final", "ODocument", "iParentRecord", ",", "Object", "iLinked", ")", "{", "if", "(", "iLinked", "==", "null", ")", "// NULL REFERENCE\r", "return", "null", ";", ...
Serialize the link. @param buffer @param iParentRecord @param iLinked Can be an instance of ORID or a Record<?> @return
[ "Serialize", "the", "link", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerCSVAbstract.java#L64-L107
test
Link to stream.
Of course, here is the Java code you requested: ```java private static OIdentifiable linkToStream(final StringBuilder buffer, final ODocument iParentRecord, Object iLinked) { if (iLinked == null) // NULL REFERENCE return null; OIdentifiable resultRid = null; ORID rid; if (iLinked ...
airbnb/lottie-android
lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java
GradientColorParser.parse
@Override public GradientColor parse(JsonReader reader, float scale) throws IOException { List<Float> array = new ArrayList<>(); // The array was started by Keyframe because it thought that this may be an array of keyframes // but peek returned a number so it considered it a static array of numbers. ...
java
@Override public GradientColor parse(JsonReader reader, float scale) throws IOException { List<Float> array = new ArrayList<>(); // The array was started by Keyframe because it thought that this may be an array of keyframes // but peek returned a number so it considered it a static array of numbers. ...
[ "@", "Override", "public", "GradientColor", "parse", "(", "JsonReader", "reader", ",", "float", "scale", ")", "throws", "IOException", "{", "List", "<", "Float", ">", "array", "=", "new", "ArrayList", "<>", "(", ")", ";", "// The array was started by Keyframe be...
Both the color stops and opacity stops are in the same array. There are {@link #colorPoints} colors sequentially as: [ ..., position, red, green, blue, ... ] The remainder of the array is the opacity stops sequentially as: [ ..., position, opacity, ... ]
[ "Both", "the", "color", "stops", "and", "opacity", "stops", "are", "in", "the", "same", "array", ".", "There", "are", "{", "@link", "#colorPoints", "}", "colors", "sequentially", "as", ":", "[", "...", "position", "red", "green", "blue", "...", "]" ]
126dabdc9f586c87822f85fe1128cdad439d30fa
https://github.com/airbnb/lottie-android/blob/126dabdc9f586c87822f85fe1128cdad439d30fa/lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java#L43-L91
train
Parse a gradient color from a JSON reader.
Of course, here is the Java code you requested: ```java @Override public GradientColor parse(JsonReader reader, float scale) throws IOException { List<Float> array = new ArrayList<>(); // The array was started by Keyframe because it thought that this may be an array of keyframes // but peek returned ...
hal/core
gui/src/main/java/org/jboss/as/console/client/administration/accesscontrol/AccessControlFinder.java
AccessControlFinder.openWindow
public void openWindow(final String title, final int width, final int height, final IsWidget content) { closeWindow(); window = new DefaultWindow(title); window.setWidth(480); window.setHeight(360); window.trapWidget(content.asWidget()); window.setGlassEnabled(true); ...
java
public void openWindow(final String title, final int width, final int height, final IsWidget content) { closeWindow(); window = new DefaultWindow(title); window.setWidth(480); window.setHeight(360); window.trapWidget(content.asWidget()); window.setGlassEnabled(true); ...
[ "public", "void", "openWindow", "(", "final", "String", "title", ",", "final", "int", "width", ",", "final", "int", "height", ",", "final", "IsWidget", "content", ")", "{", "closeWindow", "(", ")", ";", "window", "=", "new", "DefaultWindow", "(", "title", ...
------------------------------------------------------ window management
[ "------------------------------------------------------", "window", "management" ]
d6d03f0bb128dc0470f5dc75fdb1ea1014400602
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/administration/accesscontrol/AccessControlFinder.java#L248-L256
train
Open window.
Of course, here is the Java code you requested: ```java public void openWindow(final String title, final int width, final int height, final IsWidget content) { closeWindow(); window = new DefaultWindow(title); window.setWidth(480); window.setHeight(360); window.trapWidget(conten...
Stratio/stratio-cassandra
src/java/org/apache/cassandra/utils/BloomCalculations.java
BloomCalculations.computeBloomSpec
public static BloomSpecification computeBloomSpec(int bucketsPerElement) { assert bucketsPerElement >= 1; assert bucketsPerElement <= probs.length - 1; return new BloomSpecification(optKPerBuckets[bucketsPerElement], bucketsPerElement); }
java
public static BloomSpecification computeBloomSpec(int bucketsPerElement) { assert bucketsPerElement >= 1; assert bucketsPerElement <= probs.length - 1; return new BloomSpecification(optKPerBuckets[bucketsPerElement], bucketsPerElement); }
[ "public", "static", "BloomSpecification", "computeBloomSpec", "(", "int", "bucketsPerElement", ")", "{", "assert", "bucketsPerElement", ">=", "1", ";", "assert", "bucketsPerElement", "<=", "probs", ".", "length", "-", "1", ";", "return", "new", "BloomSpecification",...
Given the number of buckets that can be used per element, return a specification that minimizes the false positive rate. @param bucketsPerElement The number of buckets per element for the filter. @return A spec that minimizes the false positive rate.
[ "Given", "the", "number", "of", "buckets", "that", "can", "be", "used", "per", "element", "return", "a", "specification", "that", "minimizes", "the", "false", "positive", "rate", "." ]
f6416b43ad5309083349ad56266450fa8c6a2106
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/utils/BloomCalculations.java#L97-L102
train
Compute a BloomSpecification for a given number of buckets.
Of course, here is the Java code you requested: ```java public static BloomSpecification computeBloomSpec(int bucketsPerElement) { assert bucketsPerElement >= 1; assert bucketsPerElement <= probs.length - 1; return new BloomSpecification(optKPerBuckets[bucketsPerElement], bucketsPerElement)...
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/views/OAuth20DefaultUserProfileViewRenderer.java
OAuth20DefaultUserProfileViewRenderer.getRenderedUserProfile
protected String getRenderedUserProfile(final Map<String, Object> model) { if (oauthProperties.getUserProfileViewType() == OAuthProperties.UserProfileViewTypes.FLAT) { val flattened = new LinkedHashMap<String, Object>(); if (model.containsKey(MODEL_ATTRIBUTE_ATTRIBUTES)) { ...
java
protected String getRenderedUserProfile(final Map<String, Object> model) { if (oauthProperties.getUserProfileViewType() == OAuthProperties.UserProfileViewTypes.FLAT) { val flattened = new LinkedHashMap<String, Object>(); if (model.containsKey(MODEL_ATTRIBUTE_ATTRIBUTES)) { ...
[ "protected", "String", "getRenderedUserProfile", "(", "final", "Map", "<", "String", ",", "Object", ">", "model", ")", "{", "if", "(", "oauthProperties", ".", "getUserProfileViewType", "(", ")", "==", "OAuthProperties", ".", "UserProfileViewTypes", ".", "FLAT", ...
Gets rendered user profile. @param model the model @return the rendered user profile
[ "Gets", "rendered", "user", "profile", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/views/OAuth20DefaultUserProfileViewRenderer.java#L42-L58
train
Gets rendered user profile.
Of course, here is the Java code you requested: ```java protected String getRenderedUserProfile(final Map<String, Object> model) { if (oauthProperties.getUserProfileViewType() == OAuthProperties.UserProfileViewTypes.FLAT) { val flattened = new LinkedHashMap<String, Object>(); if (model....
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifyVpcEndpointServiceConfigurationRequest.java
ModifyVpcEndpointServiceConfigurationRequest.withAddNetworkLoadBalancerArns
public ModifyVpcEndpointServiceConfigurationRequest withAddNetworkLoadBalancerArns(String... addNetworkLoadBalancerArns) { if (this.addNetworkLoadBalancerArns == null) { setAddNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<String>(addNetworkLoadBalancerArns.length)); } ...
java
public ModifyVpcEndpointServiceConfigurationRequest withAddNetworkLoadBalancerArns(String... addNetworkLoadBalancerArns) { if (this.addNetworkLoadBalancerArns == null) { setAddNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<String>(addNetworkLoadBalancerArns.length)); } ...
[ "public", "ModifyVpcEndpointServiceConfigurationRequest", "withAddNetworkLoadBalancerArns", "(", "String", "...", "addNetworkLoadBalancerArns", ")", "{", "if", "(", "this", ".", "addNetworkLoadBalancerArns", "==", "null", ")", "{", "setAddNetworkLoadBalancerArns", "(", "new",...
<p> The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service configuration. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setAddNetworkLoadBalancerArns(java.util.Collection)} or {@link #withAddNetworkLoadBalancerArns(java.util.Collection)} if yo...
[ "<p", ">", "The", "Amazon", "Resource", "Names", "(", "ARNs", ")", "of", "Network", "Load", "Balancers", "to", "add", "to", "your", "service", "configuration", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifyVpcEndpointServiceConfigurationRequest.java#L194-L202
train
Sets the addNetworkLoadBalancerArns value for this ModifyVpcEndpointServiceConfigurationRequest.
Of course, here is the Java code you requested: ```java public ModifyVpcEndpointServiceConfigurationRequest withAddNetworkLoadBalancerArns(String... addNetworkLoadBalancerArns) { if (this.addNetworkLoadBalancerArns == null) { setAddNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList<...
javamonkey/beetl2.0
beetl-core/src/main/java/org/beetl/core/GroupTemplate.java
GroupTemplate.runScript
public Map runScript(String key, Map<String, Object> paras, Writer w, ResourceLoader loader) throws ScriptEvalError { Template t = loadScriptTemplate(key, loader); t.fastBinding(paras); if (w == null) { t.render(); } else { t.renderTo(w); } try { Map map = getSrirptTopScope...
java
public Map runScript(String key, Map<String, Object> paras, Writer w, ResourceLoader loader) throws ScriptEvalError { Template t = loadScriptTemplate(key, loader); t.fastBinding(paras); if (w == null) { t.render(); } else { t.renderTo(w); } try { Map map = getSrirptTopScope...
[ "public", "Map", "runScript", "(", "String", "key", ",", "Map", "<", "String", ",", "Object", ">", "paras", ",", "Writer", "w", ",", "ResourceLoader", "loader", ")", "throws", "ScriptEvalError", "{", "Template", "t", "=", "loadScriptTemplate", "(", "key", ...
执行某个脚本,参数是paras,返回的是顶级变量 @param key @param paras @param w @param loader 额外的资源管理器就在脚本 @return @throws ScriptEvalError
[ "执行某个脚本,参数是paras,返回的是顶级变量" ]
f32f729ad238079df5aca6e38a3c3ba0a55c78d6
https://github.com/javamonkey/beetl2.0/blob/f32f729ad238079df5aca6e38a3c3ba0a55c78d6/beetl-core/src/main/java/org/beetl/core/GroupTemplate.java#L389-L420
train
Runs a script with the specified parameters and writes the results to the specified Writer.
Of course, here is the Java code you requested: ```java public Map runScript(String key, Map<String, Object> paras, Writer w, ResourceLoader loader) throws ScriptEvalError { Template t = loadScriptTemplate(key, loader); t.fastBinding(paras); if (w == null) { t.render(); } else { t.render...
liferay/com-liferay-commerce
commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/base/CPDefinitionGroupedEntryLocalServiceBaseImpl.java
CPDefinitionGroupedEntryLocalServiceBaseImpl.dynamicQueryCount
@Override public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) { return cpDefinitionGroupedEntryPersistence.countWithDynamicQuery(dynamicQuery, projection); }
java
@Override public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) { return cpDefinitionGroupedEntryPersistence.countWithDynamicQuery(dynamicQuery, projection); }
[ "@", "Override", "public", "long", "dynamicQueryCount", "(", "DynamicQuery", "dynamicQuery", ",", "Projection", "projection", ")", "{", "return", "cpDefinitionGroupedEntryPersistence", ".", "countWithDynamicQuery", "(", "dynamicQuery", ",", "projection", ")", ";", "}" ]
Returns the number of rows matching the dynamic query. @param dynamicQuery the dynamic query @param projection the projection to apply to the query @return the number of rows matching the dynamic query
[ "Returns", "the", "number", "of", "rows", "matching", "the", "dynamic", "query", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-grouped-service/src/main/java/com/liferay/commerce/product/type/grouped/service/base/CPDefinitionGroupedEntryLocalServiceBaseImpl.java#L215-L220
train
Executes the dynamic query on the database and returns the number of rows matching the dynamic query.
Of course, here is the Java code you requested: ```java @Override public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) { return cpDefinitionGroupedEntryPersistence.countWithDynamicQuery(dynamicQuery, projection); } ``` Hope this helps!
galan/commons
src/main/java/de/galan/commons/util/Measure.java
Measure.run
public void run(ExceptionalRunnable runnable) throws Exception { initStartTotal(); long startInvokation = System.currentTimeMillis(); runnable.run(); invoked(System.currentTimeMillis() - startInvokation); }
java
public void run(ExceptionalRunnable runnable) throws Exception { initStartTotal(); long startInvokation = System.currentTimeMillis(); runnable.run(); invoked(System.currentTimeMillis() - startInvokation); }
[ "public", "void", "run", "(", "ExceptionalRunnable", "runnable", ")", "throws", "Exception", "{", "initStartTotal", "(", ")", ";", "long", "startInvokation", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "runnable", ".", "run", "(", ")", ";", "invo...
Measure the invokation time of the given ExceptionalRunnable.
[ "Measure", "the", "invokation", "time", "of", "the", "given", "ExceptionalRunnable", "." ]
45d2f36c69958d3f847e5fed66603ea629471822
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/util/Measure.java#L82-L87
train
Run the exceptional runnable.
Of course, here is the Java code you requested: ```java public void run(ExceptionalRunnable runnable) throws Exception { initStartTotal(); long startInvokation = System.currentTimeMillis(); runnable.run(); invoked(System.currentTimeMillis() - startInvokation); } ``` Hope this helps!
fedups/com.obdobion.algebrain
src/main/java/com/obdobion/algebrain/function/FuncStringIndexOf.java
FuncStringIndexOf.resolve
@Override public void resolve(final ValueStack values) throws Exception { if (values.size() < getParameterCount()) throw new Exception("missing operands for " + toString()); try { final char chr = values.popString().charAt(0); final String target = val...
java
@Override public void resolve(final ValueStack values) throws Exception { if (values.size() < getParameterCount()) throw new Exception("missing operands for " + toString()); try { final char chr = values.popString().charAt(0); final String target = val...
[ "@", "Override", "public", "void", "resolve", "(", "final", "ValueStack", "values", ")", "throws", "Exception", "{", "if", "(", "values", ".", "size", "(", ")", "<", "getParameterCount", "(", ")", ")", "throw", "new", "Exception", "(", "\"missing operands fo...
{@inheritDoc}
[ "{" ]
d0adaa9fbbba907bdcf820961e9058b0d2b15a8a
https://github.com/fedups/com.obdobion.algebrain/blob/d0adaa9fbbba907bdcf820961e9058b0d2b15a8a/src/main/java/com/obdobion/algebrain/function/FuncStringIndexOf.java#L42-L58
train
Resolves the value of a CIDCTYPE.
Of course, here is the Java code you requested: ```java @Override public void resolve(final ValueStack values) throws Exception { if (values.size() < getParameterCount()) throw new Exception("missing operands for " + toString()); try { final char chr = values.pop...
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/extra/spath/SPathFilter.java
SPathFilter.startElement
public void startElement(String uri, String localName, String qName, Attributes a) throws SAXException { // always update the depth depth++; // if we're in an accepted section, simply pass through if (isAccepted()) { getContentHandler().startElement(uri, localName, qName, a); retu...
java
public void startElement(String uri, String localName, String qName, Attributes a) throws SAXException { // always update the depth depth++; // if we're in an accepted section, simply pass through if (isAccepted()) { getContentHandler().startElement(uri, localName, qName, a); retu...
[ "public", "void", "startElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "a", ")", "throws", "SAXException", "{", "// always update the depth", "depth", "++", ";", "// if we're in an accepted section, simply pass thr...
Filter for startElement().
[ "Filter", "for", "startElement", "()", "." ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/extra/spath/SPathFilter.java#L157-L196
train
Start an XML element.
Of course, here is the Java code you requested: ```java public void startElement(String uri, String localName, String qName, Attributes a) throws SAXException { // always update the depth depth++; // if we're in an accepted section, simply pass through if (isAccepted()) { getContentHa...
citygml4j/citygml4j
src-gen/main/java/net/opengis/citygml/tunnel/_2/HollowSpaceType.java
HollowSpaceType.get_GenericApplicationPropertyOfHollowSpace
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfHollowSpace() { if (_GenericApplicationPropertyOfHollowSpace == null) { _GenericApplicationPropertyOfHollowSpace = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPropertyOfHollowSpace; }
java
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfHollowSpace() { if (_GenericApplicationPropertyOfHollowSpace == null) { _GenericApplicationPropertyOfHollowSpace = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPropertyOfHollowSpace; }
[ "public", "List", "<", "JAXBElement", "<", "Object", ">", ">", "get_GenericApplicationPropertyOfHollowSpace", "(", ")", "{", "if", "(", "_GenericApplicationPropertyOfHollowSpace", "==", "null", ")", "{", "_GenericApplicationPropertyOfHollowSpace", "=", "new", "ArrayList",...
Gets the value of the genericApplicationPropertyOfHollowSpace property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the genericAppli...
[ "Gets", "the", "value", "of", "the", "genericApplicationPropertyOfHollowSpace", "property", "." ]
9155997d5ecf7e8f19411a02ba047f13375b97b9
https://github.com/citygml4j/citygml4j/blob/9155997d5ecf7e8f19411a02ba047f13375b97b9/src-gen/main/java/net/opengis/citygml/tunnel/_2/HollowSpaceType.java#L375-L380
train
Gets the value of the genericApplicationPropertyOfHollowSpace property.
Of course, here is the Java code you requested: ```java public List<JAXBElement<Object>> get_GenericApplicationPropertyOfHollowSpace() { if (_GenericApplicationPropertyOfHollowSpace == null) { _GenericApplicationPropertyOfHollowSpace = new ArrayList<JAXBElement<Object>>(); } return ...
authlete/authlete-java-jaxrs
src/main/java/com/authlete/jaxrs/BaseJwksEndpoint.java
BaseJwksEndpoint.handle
public Response handle(AuthleteApi api) { try { // Create a handler. JwksRequestHandler handler = new JwksRequestHandler(api); // Delegate the task to the handler. return handler.handle(); } catch (WebApplicationException e) { ...
java
public Response handle(AuthleteApi api) { try { // Create a handler. JwksRequestHandler handler = new JwksRequestHandler(api); // Delegate the task to the handler. return handler.handle(); } catch (WebApplicationException e) { ...
[ "public", "Response", "handle", "(", "AuthleteApi", "api", ")", "{", "try", "{", "// Create a handler.", "JwksRequestHandler", "handler", "=", "new", "JwksRequestHandler", "(", "api", ")", ";", "// Delegate the task to the handler.", "return", "handler", ".", "handle"...
Handle a request for a JWK Set document. <p> This method internally creates a {@link JwksRequestHandler} instance and calls its {@link JwksRequestHandler#handle()} method. Then, this method uses the value returned from the {@code handle()} method as a response from this method. </p> <p> When {@code JwksRequestHandler...
[ "Handle", "a", "request", "for", "a", "JWK", "Set", "document", "." ]
9b043732c57b5ad2aebb8ffebb5ab56b9c5d86ad
https://github.com/authlete/authlete-java-jaxrs/blob/9b043732c57b5ad2aebb8ffebb5ab56b9c5d86ad/src/main/java/com/authlete/jaxrs/BaseJwksEndpoint.java#L80-L98
valid
Handle a request to the Jwks API.
Of course, here is the Java code you requested: ```java public Response handle(AuthleteApi api) { try { // Create a handler. JwksRequestHandler handler = new JwksRequestHandler(api); // Delegate the task to the handler. return handler.handle(); ...
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/validation/FieldErrorBuilder.java
FieldErrorBuilder.address
public FieldErrorBuilder address(final Optional<CellPosition> address) { address.ifPresent(a -> address(a)); return this; }
java
public FieldErrorBuilder address(final Optional<CellPosition> address) { address.ifPresent(a -> address(a)); return this; }
[ "public", "FieldErrorBuilder", "address", "(", "final", "Optional", "<", "CellPosition", ">", "address", ")", "{", "address", ".", "ifPresent", "(", "a", "->", "address", "(", "a", ")", ")", ";", "return", "this", ";", "}" ]
セルのアドレス情報を設定します。 <p>値が存在する場合のみ設定されます。</p> @param address アドレス情報 @return 自身のインスタンス
[ "セルのアドレス情報を設定します。", "<p", ">", "値が存在する場合のみ設定されます。<", "/", "p", ">" ]
a0c6b25c622e5f3a50b199ef685d2ee46ad5483c
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/validation/FieldErrorBuilder.java#L151-L154
train
Adds the address field to the error.
Of course, here is the Java code you requested: ```java public FieldErrorBuilder address(final Optional<CellPosition> address) { address.ifPresent(a -> address(a)); return this; } ``` Hope this helps!
jbundle/jbundle
main/calendar/src/main/java/org/jbundle/main/calendar/db/CalendarControl.java
CalendarControl.setupField
public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 1) //{ // fiel...
java
public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 1) //{ // fiel...
[ "public", "BaseField", "setupField", "(", "int", "iFieldSeq", ")", "{", "BaseField", "field", "=", "null", ";", "//if (iFieldSeq == 0)", "//{", "// field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);", "// field.setHidden(true);", "//}", "//if (iFiel...
Add this field in the Record's field sequence.
[ "Add", "this", "field", "in", "the", "Record", "s", "field", "sequence", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/calendar/src/main/java/org/jbundle/main/calendar/db/CalendarControl.java#L79-L125
train
Set up the Field for the CRTC Specifications.
Of course, here is the Java code you requested: ```java public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} ...
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/annotations/parser/antlr/internal/InternalXbaseWithAnnotationsParser.java
InternalXbaseWithAnnotationsParser.synpred29_InternalXbaseWithAnnotations_fragment
public final void synpred29_InternalXbaseWithAnnotations_fragment() throws RecognitionException { // InternalXbaseWithAnnotations.g:3015:4: ( ( ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) ) // InternalXbaseWithAnnotations.g:3015:5: ( ( ( ( ruleJvmFormalPa...
java
public final void synpred29_InternalXbaseWithAnnotations_fragment() throws RecognitionException { // InternalXbaseWithAnnotations.g:3015:4: ( ( ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) ) // InternalXbaseWithAnnotations.g:3015:5: ( ( ( ( ruleJvmFormalPa...
[ "public", "final", "void", "synpred29_InternalXbaseWithAnnotations_fragment", "(", ")", "throws", "RecognitionException", "{", "// InternalXbaseWithAnnotations.g:3015:4: ( ( ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )", "// InternalXbaseWithAnnotat...
$ANTLR start synpred29_InternalXbaseWithAnnotations
[ "$ANTLR", "start", "synpred29_InternalXbaseWithAnnotations" ]
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/annotations/parser/antlr/internal/InternalXbaseWithAnnotationsParser.java#L19881-L19982
train
synpred29_InternalXbaseWithAnnotations_fragment returns true if the input is a synpred29_InternalXbaseWithAnnotations.
Of course, here is the Java code you requested: ```java public final void synpred29_InternalXbaseWithAnnotations_fragment() throws RecognitionException { // InternalXbaseWithAnnotations.g:3015:4: ( ( ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) ) // Inter...
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/FittingsApi.java
FittingsApi.postCharactersCharacterIdFittings
public CharacterFittingResponse postCharactersCharacterIdFittings(Integer characterId, String datasource, String token, CharacterFitting characterFitting) throws ApiException { ApiResponse<CharacterFittingResponse> resp = postCharactersCharacterIdFittingsWithHttpInfo(characterId, dat...
java
public CharacterFittingResponse postCharactersCharacterIdFittings(Integer characterId, String datasource, String token, CharacterFitting characterFitting) throws ApiException { ApiResponse<CharacterFittingResponse> resp = postCharactersCharacterIdFittingsWithHttpInfo(characterId, dat...
[ "public", "CharacterFittingResponse", "postCharactersCharacterIdFittings", "(", "Integer", "characterId", ",", "String", "datasource", ",", "String", "token", ",", "CharacterFitting", "characterFitting", ")", "throws", "ApiException", "{", "ApiResponse", "<", "CharacterFitt...
Create fitting Save a new fitting for a character --- SSO Scope: esi-fittings.write_fittings.v1 @param characterId An EVE character ID (required) @param datasource The server name you would like data from (optional, default to tranquility) @param token Access token to use if unable to set a header (optional) @param ch...
[ "Create", "fitting", "Save", "a", "new", "fitting", "for", "a", "character", "---", "SSO", "Scope", ":", "esi", "-", "fittings", ".", "write_fittings", ".", "v1" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/FittingsApi.java#L465-L470
train
PostCharactersCharacterIdFittings This method is used to post a character fitting in a CDN.
Of course, here is the Java code you requested: ```java public CharacterFittingResponse postCharactersCharacterIdFittings(Integer characterId, String datasource, String token, CharacterFitting characterFitting) throws ApiException { ApiResponse<CharacterFittingResponse> resp = postCharactersCharact...
j256/ormlite-android
src/main/java/com/j256/ormlite/android/AndroidCompiledStatement.java
AndroidCompiledStatement.getCursor
public Cursor getCursor() throws SQLException { if (cursor == null) { String finalSql = null; try { if (max == null) { finalSql = sql; } else { finalSql = sql + " LIMIT " + max; } if (cancelQueriesEnabled) { cancellationHook = apiCompatibility.createCancellationHook(); } c...
java
public Cursor getCursor() throws SQLException { if (cursor == null) { String finalSql = null; try { if (max == null) { finalSql = sql; } else { finalSql = sql + " LIMIT " + max; } if (cancelQueriesEnabled) { cancellationHook = apiCompatibility.createCancellationHook(); } c...
[ "public", "Cursor", "getCursor", "(", ")", "throws", "SQLException", "{", "if", "(", "cursor", "==", "null", ")", "{", "String", "finalSql", "=", "null", ";", "try", "{", "if", "(", "max", "==", "null", ")", "{", "finalSql", "=", "sql", ";", "}", "...
* This is mostly an internal class but is exposed for those people who need access to the Cursor itself. <p> NOTE: This is not thread safe. Not sure if we need it, but keep that in mind. </p>
[ "*", "This", "is", "mostly", "an", "internal", "class", "but", "is", "exposed", "for", "those", "people", "who", "need", "access", "to", "the", "Cursor", "itself", "." ]
e82327a868ae242f994730fe2389f79684d7bcab
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/AndroidCompiledStatement.java#L181-L202
train
Get a cursor for the SQL statement.
Of course, here is the Java code you requested: ```java public Cursor getCursor() throws SQLException { if (cursor == null) { String finalSql = null; try { if (max == null) { finalSql = sql; } else { finalSql = sql + " LIMIT " + max; } if (cancelQueriesEnabled) { cancellationHook...
googleapis/google-cloud-java
google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java
AutoMlClient.importDataAsync
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> importDataAsync( String name, InputConfig inputConfig) { ImportDataRequest request = ImportDataRequest.newBuilder().setName(name).setInpu...
java
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> importDataAsync( String name, InputConfig inputConfig) { ImportDataRequest request = ImportDataRequest.newBuilder().setName(name).setInpu...
[ "@", "BetaApi", "(", "\"The surface for long-running operations is not stable yet and may change in the future.\"", ")", "public", "final", "OperationFuture", "<", "Empty", ",", "OperationMetadata", ">", "importDataAsync", "(", "String", "name", ",", "InputConfig", "inputConfig...
Imports data into a dataset. For Tables this method can only be called on an empty Dataset. <p>For Tables: &#42; A [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be explicitly set. Returns an empty response in the [response][google.longrunning.Operation.response] field when i...
[ "Imports", "data", "into", "a", "dataset", ".", "For", "Tables", "this", "method", "can", "only", "be", "called", "on", "an", "empty", "Dataset", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java#L768-L776
train
Asynchronously imports the data of a single CID language file into a CID language file.
Of course, here is the Java code you requested: ```java @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> importDataAsync( String name, InputConfig inputConfig) { ImportDataRequest request = ...
ModeShape/modeshape
modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java
DocumentFactory.newDocument
public static EditableDocument newDocument( String name1, Object value1, String name2, Object value2 ) { return new DocumentEditor(new BasicDocument(name1, value1, name...
java
public static EditableDocument newDocument( String name1, Object value1, String name2, Object value2 ) { return new DocumentEditor(new BasicDocument(name1, value1, name...
[ "public", "static", "EditableDocument", "newDocument", "(", "String", "name1", ",", "Object", "value1", ",", "String", "name2", ",", "Object", "value2", ")", "{", "return", "new", "DocumentEditor", "(", "new", "BasicDocument", "(", "name1", ",", "value1", ",",...
Create a new editable document, initialized with two fields, that can be used as a new document entry in a SchematicDb or as nested documents for other documents. @param name1 the name of the first field in the resulting document; if null, the field will not be added to the returned document @param value1 the value of...
[ "Create", "a", "new", "editable", "document", "initialized", "with", "two", "fields", "that", "can", "be", "used", "as", "a", "new", "document", "entry", "in", "a", "SchematicDb", "or", "as", "nested", "documents", "for", "other", "documents", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-schematic/src/main/java/org/modeshape/schematic/DocumentFactory.java#L86-L91
train
Creates an editable document from the given two elements.
Of course, here is the Java code you requested: ```java public static EditableDocument newDocument( String name1, Object value1, String name2, Object value2 ) { return...
czyzby/gdx-lml
lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlSyntax.java
DefaultLmlSyntax.registerTextFieldAttributes
protected void registerTextFieldAttributes() { addAttributeProcessor(new BlinkTimeLmlAttribute(), "blink", "blinkTime"); addAttributeProcessor(new CursorLmlAttribute(), "cursor", "cursorPosition"); addAttributeProcessor(new DigitsOnlyLmlAttribute(), "digitsOnly", "numeric"); addAttribute...
java
protected void registerTextFieldAttributes() { addAttributeProcessor(new BlinkTimeLmlAttribute(), "blink", "blinkTime"); addAttributeProcessor(new CursorLmlAttribute(), "cursor", "cursorPosition"); addAttributeProcessor(new DigitsOnlyLmlAttribute(), "digitsOnly", "numeric"); addAttribute...
[ "protected", "void", "registerTextFieldAttributes", "(", ")", "{", "addAttributeProcessor", "(", "new", "BlinkTimeLmlAttribute", "(", ")", ",", "\"blink\"", ",", "\"blinkTime\"", ")", ";", "addAttributeProcessor", "(", "new", "CursorLmlAttribute", "(", ")", ",", "\"...
TextField widget attributes.
[ "TextField", "widget", "attributes", "." ]
7623b322e6afe49ad4dd636c80c230150a1cfa4e
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/lml/src/main/java/com/github/czyzby/lml/parser/impl/DefaultLmlSyntax.java#L688-L701
train
TextField attributes.
Of course, here is the Java code you requested: ```java protected void registerTextFieldAttributes() { addAttributeProcessor(new BlinkTimeLmlAttribute(), "blink", "blinkTime"); addAttributeProcessor(new CursorLmlAttribute(), "cursor", "cursorPosition"); addAttributeProcessor(new DigitsOnlyLmlAt...
SG-O/miIO
src/main/java/de/sg_o/app/miio/vacuum/VacuumConsumableStatus.java
VacuumConsumableStatus.reset
public void reset(String name){ if (name.equals(Names.MAIN_BRUSH.toString())) mainBrushWorkTime = 0; if (name.equals(Names.SENSOR.toString())) sensorTimeSinceCleaning = 0; if (name.equals(Names.SIDE_BRUSH.toString())) sideBrushWorkTime = 0; if (name.equals(Names.FILTER.toString())) filte...
java
public void reset(String name){ if (name.equals(Names.MAIN_BRUSH.toString())) mainBrushWorkTime = 0; if (name.equals(Names.SENSOR.toString())) sensorTimeSinceCleaning = 0; if (name.equals(Names.SIDE_BRUSH.toString())) sideBrushWorkTime = 0; if (name.equals(Names.FILTER.toString())) filte...
[ "public", "void", "reset", "(", "String", "name", ")", "{", "if", "(", "name", ".", "equals", "(", "Names", ".", "MAIN_BRUSH", ".", "toString", "(", ")", ")", ")", "mainBrushWorkTime", "=", "0", ";", "if", "(", "name", ".", "equals", "(", "Names", ...
Reset a consumable. @param name The consumable to reset.
[ "Reset", "a", "consumable", "." ]
f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/vacuum/VacuumConsumableStatus.java#L100-L105
train
Resets the cache by deleting all the attributes of the given class.
Of course, here is the Java code you requested: ```java public void reset(String name){ if (name.equals(Names.MAIN_BRUSH.toString())) mainBrushWorkTime = 0; if (name.equals(Names.SENSOR.toString())) sensorTimeSinceCleaning = 0; if (name.equals(Names.SIDE_BRUSH.toString())) sideBrushWorkTime = 0...
zxing/zxing
core/src/main/java/com/google/zxing/datamatrix/encoder/HighLevelEncoder.java
HighLevelEncoder.encodeHighLevel
public static String encodeHighLevel(String msg) { return encodeHighLevel(msg, SymbolShapeHint.FORCE_NONE, null, null); }
java
public static String encodeHighLevel(String msg) { return encodeHighLevel(msg, SymbolShapeHint.FORCE_NONE, null, null); }
[ "public", "static", "String", "encodeHighLevel", "(", "String", "msg", ")", "{", "return", "encodeHighLevel", "(", "msg", ",", "SymbolShapeHint", ".", "FORCE_NONE", ",", "null", ",", "null", ")", ";", "}" ]
Performs message encoding of a DataMatrix message using the algorithm described in annex P of ISO/IEC 16022:2000(E). @param msg the message @return the encoded message (the char values range from 0 to 255)
[ "Performs", "message", "encoding", "of", "a", "DataMatrix", "message", "using", "the", "algorithm", "described", "in", "annex", "P", "of", "ISO", "/", "IEC", "16022", ":", "2000", "(", "E", ")", "." ]
653ac2a3beb11481eff82e7d5f2bab8a745f7fac
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/datamatrix/encoder/HighLevelEncoder.java#L141-L143
train
Encode high level message.
Of course, here is the Java code you requested: ```java public static String encodeHighLevel(String msg) { return encodeHighLevel(msg, SymbolShapeHint.FORCE_NONE, null, null); } ``` Hope this helps!
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/beans/ChangeListenerMap.java
ChangeListenerMap.get
public final synchronized L[] get(String name) { return (this.map != null) ? this.map.get(name) : null; }
java
public final synchronized L[] get(String name) { return (this.map != null) ? this.map.get(name) : null; }
[ "public", "final", "synchronized", "L", "[", "]", "get", "(", "String", "name", ")", "{", "return", "(", "this", ".", "map", "!=", "null", ")", "?", "this", ".", "map", ".", "get", "(", "name", ")", ":", "null", ";", "}" ]
Returns the list of listeners for the specified property. @param name the name of the property @return the corresponding list of listeners
[ "Returns", "the", "list", "of", "listeners", "for", "the", "specified", "property", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/beans/ChangeListenerMap.java#L134-L138
train
Gets the cID language.
Of course, here is the Java code you requested: ```java public final synchronized L[] get(String name) { return (this.map != null) ? this.map.get(name) : null; } ``` Hope this helps!
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPD9AbstractReader.java
MPD9AbstractReader.processCalendar
protected void processCalendar(Row row) { Integer uniqueID = row.getInteger("CAL_UID"); if (NumberHelper.getInt(uniqueID) > 0) { boolean baseCalendar = row.getBoolean("CAL_IS_BASE_CAL"); ProjectCalendar cal; if (baseCalendar == true) { cal = m_project...
java
protected void processCalendar(Row row) { Integer uniqueID = row.getInteger("CAL_UID"); if (NumberHelper.getInt(uniqueID) > 0) { boolean baseCalendar = row.getBoolean("CAL_IS_BASE_CAL"); ProjectCalendar cal; if (baseCalendar == true) { cal = m_project...
[ "protected", "void", "processCalendar", "(", "Row", "row", ")", "{", "Integer", "uniqueID", "=", "row", ".", "getInteger", "(", "\"CAL_UID\"", ")", ";", "if", "(", "NumberHelper", ".", "getInt", "(", "uniqueID", ")", ">", "0", ")", "{", "boolean", "baseC...
Read a calendar. @param row calendar data
[ "Read", "a", "calendar", "." ]
143ea0e195da59cd108f13b3b06328e9542337e8
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9AbstractReader.java#L240-L264
train
Process calendar data.
Of course, here is the Java code you requested: ```java protected void processCalendar(Row row) { Integer uniqueID = row.getInteger("CAL_UID"); if (NumberHelper.getInt(uniqueID) > 0) { boolean baseCalendar = row.getBoolean("CAL_IS_BASE_CAL"); ProjectCalendar cal; if (bas...
hawtio/hawtio
tooling/hawtio-maven-plugin/src/main/java/io/hawt/maven/main/SpringMain.java
SpringMain.parseArguments
protected void parseArguments(String[] arguments) { LinkedList<String> args = new LinkedList<String>(Arrays.asList(arguments)); boolean valid = true; while (!args.isEmpty()) { String arg = args.removeFirst(); boolean handled = false; for (Option option : opt...
java
protected void parseArguments(String[] arguments) { LinkedList<String> args = new LinkedList<String>(Arrays.asList(arguments)); boolean valid = true; while (!args.isEmpty()) { String arg = args.removeFirst(); boolean handled = false; for (Option option : opt...
[ "protected", "void", "parseArguments", "(", "String", "[", "]", "arguments", ")", "{", "LinkedList", "<", "String", ">", "args", "=", "new", "LinkedList", "<", "String", ">", "(", "Arrays", ".", "asList", "(", "arguments", ")", ")", ";", "boolean", "vali...
Parses the command line arguments.
[ "Parses", "the", "command", "line", "arguments", "." ]
d8b1c8f246307c0313ba297a494106d0859f3ffd
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/tooling/hawtio-maven-plugin/src/main/java/io/hawt/maven/main/SpringMain.java#L66-L91
train
Parse command line arguments.
Of course, here is the Java code you requested: ```java protected void parseArguments(String[] arguments) { LinkedList<String> args = new LinkedList<String>(Arrays.asList(arguments)); boolean valid = true; while (!args.isEmpty()) { String arg = args.removeFirst(); bool...
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java
Timestamp.getDaysInMonthBound
private static String getDaysInMonthBound(int year, int month) { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month); cal.set(Calendar.DAY_OF_MONTH, 1); return new Integer(cal.getActualMaximum(Calendar.DAY_OF_MONTH)).toString(); ...
java
private static String getDaysInMonthBound(int year, int month) { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month); cal.set(Calendar.DAY_OF_MONTH, 1); return new Integer(cal.getActualMaximum(Calendar.DAY_OF_MONTH)).toString(); ...
[ "private", "static", "String", "getDaysInMonthBound", "(", "int", "year", ",", "int", "month", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", "TimeZone", ".", "getTimeZone", "(", "\"GMT\"", ")", ")", ";", "cal", ".", "set", "(", "...
/* ALL STATIC METHOD BELOW HERE: =============================
[ "/", "*" ]
da74c3a59a5b5a5c365bd4702dcb45d263535794
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java#L250-L256
train
Get the days in month bound.
Of course, here is the Java code you requested: ```java private static String getDaysInMonthBound(int year, int month) { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month); cal.set(Calendar.DAY_OF_MONTH, 1); return new Integer(...
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java
Director.getFeatureLicense
public Set<InstallLicense> getFeatureLicense(Collection<String> featureIds, File fromDir, String toExtension, boolean offlineOnly, Locale locale) throws InstallException { Set<InstallLicense> licenses = new HashSet<InstallLicense>(); ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>();...
java
public Set<InstallLicense> getFeatureLicense(Collection<String> featureIds, File fromDir, String toExtension, boolean offlineOnly, Locale locale) throws InstallException { Set<InstallLicense> licenses = new HashSet<InstallLicense>(); ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>();...
[ "public", "Set", "<", "InstallLicense", ">", "getFeatureLicense", "(", "Collection", "<", "String", ">", "featureIds", ",", "File", "fromDir", ",", "String", "toExtension", ",", "boolean", "offlineOnly", ",", "Locale", "locale", ")", "throws", "InstallException", ...
Creates a set of install licenses for all features to be installed @param featureIds collection of feature ids as strings to get the licenses from @param fromDir the directory of the features @param toExtension location of a product extension @param offlineOnly if features should be only retrieved locally @param local...
[ "Creates", "a", "set", "of", "install", "licenses", "for", "all", "features", "to", "be", "installed" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L556-L591
train
Get the licenses for a set of feature ids.
Of course, here is the Java code you requested: ```java public Set<InstallLicense> getFeatureLicense(Collection<String> featureIds, File fromDir, String toExtension, boolean offlineOnly, Locale locale) throws InstallException { Set<InstallLicense> licenses = new HashSet<InstallLicense>(); ArrayList<Ins...
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java
HsqlByteArrayOutputStream.write
public void write(char[] c, int off, int len) { ensureRoom(len * 2); for (int i = off; i < len; i++) { int v = c[i]; buffer[count++] = (byte) (v >>> 8); buffer[count++] = (byte) v; } }
java
public void write(char[] c, int off, int len) { ensureRoom(len * 2); for (int i = off; i < len; i++) { int v = c[i]; buffer[count++] = (byte) (v >>> 8); buffer[count++] = (byte) v; } }
[ "public", "void", "write", "(", "char", "[", "]", "c", ",", "int", "off", ",", "int", "len", ")", "{", "ensureRoom", "(", "len", "*", "2", ")", ";", "for", "(", "int", "i", "=", "off", ";", "i", "<", "len", ";", "i", "++", ")", "{", "int", ...
additional public methods not in similar java.util classes
[ "additional", "public", "methods", "not", "in", "similar", "java", ".", "util", "classes" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java#L282-L292
train
Write a char array to the output stream.
Of course, here is the Java code you requested: ```java public void write(char[] c, int off, int len) { ensureRoom(len * 2); for (int i = off; i < len; i++) { int v = c[i]; buffer[count++] = (byte) (v >>> 8); buffer[count++] = (byte) v; } } ``` Hope t...
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerFactoryImpl.java
EntityManagerFactoryImpl.initSecondLevelCache
private CacheProvider initSecondLevelCache(final PersistenceUnitMetadata puMetadata) { String classResourceName = (String) getProperties().get(PersistenceProperties.KUNDERA_CACHE_CONFIG_RESOURCE); classResourceName = classResourceName != null ? classResourceName : puMetadata ...
java
private CacheProvider initSecondLevelCache(final PersistenceUnitMetadata puMetadata) { String classResourceName = (String) getProperties().get(PersistenceProperties.KUNDERA_CACHE_CONFIG_RESOURCE); classResourceName = classResourceName != null ? classResourceName : puMetadata ...
[ "private", "CacheProvider", "initSecondLevelCache", "(", "final", "PersistenceUnitMetadata", "puMetadata", ")", "{", "String", "classResourceName", "=", "(", "String", ")", "getProperties", "(", ")", ".", "get", "(", "PersistenceProperties", ".", "KUNDERA_CACHE_CONFIG_R...
Inits the second level cache. @return the cache provider
[ "Inits", "the", "second", "level", "cache", "." ]
268958ab1ec09d14ec4d9184f0c8ded7a9158908
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/EntityManagerFactoryImpl.java#L416-L458
train
Initializes the second level cache.
Of course, here is the Java code you requested: ```java private CacheProvider initSecondLevelCache(final PersistenceUnitMetadata puMetadata) { String classResourceName = (String) getProperties().get(PersistenceProperties.KUNDERA_CACHE_CONFIG_RESOURCE); classResourceName = classResourceName !...
belaban/JGroups
src/org/jgroups/protocols/SenderSendsBundler.java
SenderSendsBundler.send
public void send(Message msg) throws Exception { num_senders.incrementAndGet(); long size=msg.size(); lock.lock(); try { if(count + size >= transport.getMaxBundleSize()) sendBundledMessages(); addMessage(msg, size); // at this point,...
java
public void send(Message msg) throws Exception { num_senders.incrementAndGet(); long size=msg.size(); lock.lock(); try { if(count + size >= transport.getMaxBundleSize()) sendBundledMessages(); addMessage(msg, size); // at this point,...
[ "public", "void", "send", "(", "Message", "msg", ")", "throws", "Exception", "{", "num_senders", ".", "incrementAndGet", "(", ")", ";", "long", "size", "=", "msg", ".", "size", "(", ")", ";", "lock", ".", "lock", "(", ")", ";", "try", "{", "if", "(...
current senders adding msgs to the bundler
[ "current", "senders", "adding", "msgs", "to", "the", "bundler" ]
bd3ca786aa57fed41dfbc10a94b1281e388be03b
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/protocols/SenderSendsBundler.java#L14-L33
train
Send a message to all the sender threads.
Of course, here is the Java code you requested: ```java public void send(Message msg) throws Exception { num_senders.incrementAndGet(); long size=msg.size(); lock.lock(); try { if(count + size >= transport.getMaxBundleSize()) sendBundledMessages(); ...
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.load
private void load(final String resourceName) { boolean found = false; try { resources.push(resourceName); // Try classloader - load the resources in reverse order of the enumeration. Since later-loaded resources // override earlier-loaded ones, this better corresponds to the usual classpath behaviour. ...
java
private void load(final String resourceName) { boolean found = false; try { resources.push(resourceName); // Try classloader - load the resources in reverse order of the enumeration. Since later-loaded resources // override earlier-loaded ones, this better corresponds to the usual classpath behaviour. ...
[ "private", "void", "load", "(", "final", "String", "resourceName", ")", "{", "boolean", "found", "=", "false", ";", "try", "{", "resources", ".", "push", "(", "resourceName", ")", ";", "// Try classloader - load the resources in reverse order of the enumeration. Since ...
Try loading the given resource name. There may be several resources corresponding to that name... @param resourceName the path of the resource to load from.
[ "Try", "loading", "the", "given", "resource", "name", ".", "There", "may", "be", "several", "resources", "corresponding", "to", "that", "name", "..." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L373-L462
train
Load the resource with the given name.
Of course, here is the Java code you requested: ```java private void load(final String resourceName) { boolean found = false; try { resources.push(resourceName); // Try classloader - load the resources in reverse order of the enumeration. Since later-loaded resources // override earlier-loaded ones, th...
alkacon/opencms-core
src/org/opencms/loader/CmsResourceManager.java
CmsResourceManager.initResourceTypes
private synchronized void initResourceTypes() throws CmsConfigurationException { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STARTING_LOADER_CONFIG_0)); } CmsResourceManagerConfiguration newConfiguration = new CmsResourceManagerC...
java
private synchronized void initResourceTypes() throws CmsConfigurationException { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STARTING_LOADER_CONFIG_0)); } CmsResourceManagerConfiguration newConfiguration = new CmsResourceManagerC...
[ "private", "synchronized", "void", "initResourceTypes", "(", ")", "throws", "CmsConfigurationException", "{", "if", "(", "CmsLog", ".", "INIT", ".", "isInfoEnabled", "(", ")", ")", "{", "CmsLog", ".", "INIT", ".", "info", "(", "Messages", ".", "get", "(", ...
Initializes member variables required for storing the resource types.<p> @throws CmsConfigurationException in case of duplicate resource types in the configuration
[ "Initializes", "member", "variables", "required", "for", "storing", "the", "resource", "types", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsResourceManager.java#L1449-L1540
train
Initialize the resource types.
Of course, here is the Java code you requested: ```java private synchronized void initResourceTypes() throws CmsConfigurationException { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_STARTING_LOADER_CONFIG_0)); } CmsResourceManage...
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java
FourierTransform.transformBluestein
private static void transformBluestein(double[] real, double[] imag) { int n = real.length; int m = Integer.highestOneBit(n * 2 + 1) << 1; // Trignometric tables double[] cosTable = new double[n]; double[] sinTable = new double[n]; for (int i = 0; i < n; i++) { ...
java
private static void transformBluestein(double[] real, double[] imag) { int n = real.length; int m = Integer.highestOneBit(n * 2 + 1) << 1; // Trignometric tables double[] cosTable = new double[n]; double[] sinTable = new double[n]; for (int i = 0; i < n; i++) { ...
[ "private", "static", "void", "transformBluestein", "(", "double", "[", "]", "real", ",", "double", "[", "]", "imag", ")", "{", "int", "n", "=", "real", ".", "length", ";", "int", "m", "=", "Integer", ".", "highestOneBit", "(", "n", "*", "2", "+", "...
/* Computes the discrete Fourier transform (DFT) of the given complex vector, storing the result back into the vector. The vector can have any length. This requires the convolution function, which in turn requires the radix-2 FFT function. Uses Bluestein's chirp z-transform algorithm.
[ "/", "*", "Computes", "the", "discrete", "Fourier", "transform", "(", "DFT", ")", "of", "the", "given", "complex", "vector", "storing", "the", "result", "back", "into", "the", "vector", ".", "The", "vector", "can", "have", "any", "length", ".", "This", "...
0369ae674f9e664bccc5f9e161ae7e7a3b949a1e
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java#L303-L342
train
Transform Bluestein.
Of course, here is the Java code you requested: ```java private static void transformBluestein(double[] real, double[] imag) { int n = real.length; int m = Integer.highestOneBit(n * 2 + 1) << 1; // Trignometric tables double[] cosTable = new double[n]; double[] sinTable =...
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterServiceImpl.java
ClusterServiceImpl.setClusterId
void setClusterId(String newClusterId) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; assert clusterId == null : "Cluster ID should be null: " + clusterId; clusterId = newClusterId; }
java
void setClusterId(String newClusterId) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; assert clusterId == null : "Cluster ID should be null: " + clusterId; clusterId = newClusterId; }
[ "void", "setClusterId", "(", "String", "newClusterId", ")", "{", "assert", "lock", ".", "isHeldByCurrentThread", "(", ")", ":", "\"Called without holding cluster service lock!\"", ";", "assert", "clusterId", "==", "null", ":", "\"Cluster ID should be null: \"", "+", "cl...
called under cluster service lock
[ "called", "under", "cluster", "service", "lock" ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterServiceImpl.java#L735-L739
train
Sets the cluster ID.
Of course, here is the Java code you requested: ```java void setClusterId(String newClusterId) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; assert clusterId == null : "Cluster ID should be null: " + clusterId; clusterId = newClusterId; } ``` Hope ...
Unidata/thredds
ui/src/main/java/ucar/nc2/ui/geoloc/NavigatedPanel.java
NavigatedPanel.setLatLonCenterMapArea
public void setLatLonCenterMapArea( double lat, double lon) { ProjectionPoint center = project.latLonToProj(lat, lon); ProjectionRect ma = getMapArea(); ma.setX( center.getX() - ma.getWidth()/2); ma.setY( center.getY() - ma.getHeight()/2); setMapArea(ma); }
java
public void setLatLonCenterMapArea( double lat, double lon) { ProjectionPoint center = project.latLonToProj(lat, lon); ProjectionRect ma = getMapArea(); ma.setX( center.getX() - ma.getWidth()/2); ma.setY( center.getY() - ma.getHeight()/2); setMapArea(ma); }
[ "public", "void", "setLatLonCenterMapArea", "(", "double", "lat", ",", "double", "lon", ")", "{", "ProjectionPoint", "center", "=", "project", ".", "latLonToProj", "(", "lat", ",", "lon", ")", ";", "ProjectionRect", "ma", "=", "getMapArea", "(", ")", ";", ...
set the center point of the MapArea
[ "set", "the", "center", "point", "of", "the", "MapArea" ]
d2d68f9eee87f345625211324d71d5dc3e162ee1
https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/geoloc/NavigatedPanel.java#L338-L346
test
Set the map area of the map from the lat lon coordinate system.
Of course, here is the Java code you requested: ```java public void setLatLonCenterMapArea( double lat, double lon) { ProjectionPoint center = project.latLonToProj(lat, lon); ProjectionRect ma = getMapArea(); ma.setX( center.getX() - ma.getWidth()/2); ma.setY( center.getY() - ma.getHeight()/2); s...
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.unescapeUriQueryParam
public static void unescapeUriQueryParam(final char[] text, final int offset, final int len, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be n...
java
public static void unescapeUriQueryParam(final char[] text, final int offset, final int len, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be n...
[ "public", "static", "void", "unescapeUriQueryParam", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", ...
<p> Perform am URI query parameter (name or value) <strong>unescape</strong> operation on a <tt>char[]</tt> input. </p> <p> This method will unescape every percent-encoded (<tt>%HH</tt>) sequences present in input, even for those characters that do not need to be percent-encoded in this context (unreserved characters c...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<...
ec5435fb3508c2eed25d8165dc27ded2602cae13
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L2625-L2648
train
Unescapes a string of characters in a URI query parameter.
Of course, here is the Java code you requested: ```java public static void unescapeUriQueryParam(final char[] text, final int offset, final int len, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw ne...
codecentric/zucchini
zucchini-web/src/main/java/de/codecentric/zucchini/web/steps/SelectContext.java
SelectContext.text
public SelectStep text(String text) { return new SelectStep(element, text, SelectStep.OptionSelectorType.TEXT); }
java
public SelectStep text(String text) { return new SelectStep(element, text, SelectStep.OptionSelectorType.TEXT); }
[ "public", "SelectStep", "text", "(", "String", "text", ")", "{", "return", "new", "SelectStep", "(", "element", ",", "text", ",", "SelectStep", ".", "OptionSelectorType", ".", "TEXT", ")", ";", "}" ]
Selects an option by its text. @param text The text of the option that shall be selected. @return A {@link de.codecentric.zucchini.web.steps.SelectStep} that selects an option by its text.
[ "Selects", "an", "option", "by", "its", "text", "." ]
61541cd8ce666ef21ad943486a7c0eb53310ed5a
https://github.com/codecentric/zucchini/blob/61541cd8ce666ef21ad943486a7c0eb53310ed5a/zucchini-web/src/main/java/de/codecentric/zucchini/web/steps/SelectContext.java#L72-L74
train
Adds a text option step to the select.
Of course, here is the Java code you requested: ```java public SelectStep text(String text) { return new SelectStep(element, text, SelectStep.OptionSelectorType.TEXT); } ``` Hope this helps!
spring-projects/spring-security
samples/xml/contacts/src/main/java/sample/contact/AddDeleteContactController.java
AddDeleteContactController.addContact
@RequestMapping(value = "/secure/add.htm", method = RequestMethod.POST) public String addContact(WebContact form, BindingResult result) { validator.validate(form, result); if (result.hasErrors()) { return "add"; } Contact contact = new Contact(form.getName(), form.getEmail()); contactManager.create(cont...
java
@RequestMapping(value = "/secure/add.htm", method = RequestMethod.POST) public String addContact(WebContact form, BindingResult result) { validator.validate(form, result); if (result.hasErrors()) { return "add"; } Contact contact = new Contact(form.getName(), form.getEmail()); contactManager.create(cont...
[ "@", "RequestMapping", "(", "value", "=", "\"/secure/add.htm\"", ",", "method", "=", "RequestMethod", ".", "POST", ")", "public", "String", "addContact", "(", "WebContact", "form", ",", "BindingResult", "result", ")", "{", "validator", ".", "validate", "(", "f...
Handles the submission of the contact form, creating a new instance if the username and email are valid.
[ "Handles", "the", "submission", "of", "the", "contact", "form", "creating", "a", "new", "instance", "if", "the", "username", "and", "email", "are", "valid", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/samples/xml/contacts/src/main/java/sample/contact/AddDeleteContactController.java#L57-L69
test
Add a new contact to the security system
Of course, here is the Java code you requested: ```java @RequestMapping(value = "/secure/add.htm", method = RequestMethod.POST) public String addContact(WebContact form, BindingResult result) { validator.validate(form, result); if (result.hasErrors()) { return "add"; } Contact contact = new Contact(form....
maddingo/sojo
src/main/java/net/sf/sojo/core/ConversionIterator.java
ConversionIterator.iterate
protected final Object iterate(final Object pvSourceObject, final Object pvNewTargetObject, final Iterator<?> pvIterator, final IConverterExtension pvConverter) { int pos = 0; // cycle detection for Collections if (getWithCycleDetection() && cycleDetector.cycleDetection(pvSourceObject)) { throw new Con...
java
protected final Object iterate(final Object pvSourceObject, final Object pvNewTargetObject, final Iterator<?> pvIterator, final IConverterExtension pvConverter) { int pos = 0; // cycle detection for Collections if (getWithCycleDetection() && cycleDetector.cycleDetection(pvSourceObject)) { throw new Con...
[ "protected", "final", "Object", "iterate", "(", "final", "Object", "pvSourceObject", ",", "final", "Object", "pvNewTargetObject", ",", "final", "Iterator", "<", "?", ">", "pvIterator", ",", "final", "IConverterExtension", "pvConverter", ")", "{", "int", "pos", "...
This is the main iterate method. This method has a counter of recursion and handle the event before and after conversion. This method is calling from the convert-method. The order of calling methods is: <ol> <li>doTransformIteratorObject2KeyValuePair <li>doConvert <li>doAddObject </ol> @param pvSourceObject The old Co...
[ "This", "is", "the", "main", "iterate", "method", ".", "This", "method", "has", "a", "counter", "of", "recursion", "and", "handle", "the", "event", "before", "and", "after", "conversion", ".", "This", "method", "is", "calling", "from", "the", "convert", "-...
99e9e0a146b502deb7f507fe0623227402ed675b
https://github.com/maddingo/sojo/blob/99e9e0a146b502deb7f507fe0623227402ed675b/src/main/java/net/sf/sojo/core/ConversionIterator.java#L100-L136
train
Iterate method.
Of course, here is the Java code you requested: ```java protected final Object iterate(final Object pvSourceObject, final Object pvNewTargetObject, final Iterator<?> pvIterator, final IConverterExtension pvConverter) { int pos = 0; // cycle detection for Collections if (getWithCycleDetection() && cycleDet...
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/TypePoolInfoMap.java
TypePoolInfoMap.get
public V get(ResourceType type, PoolInfo poolInfo) { Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type); if (poolInfoMap == null) { return null; } return poolInfoMap.get(poolInfo); }
java
public V get(ResourceType type, PoolInfo poolInfo) { Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type); if (poolInfoMap == null) { return null; } return poolInfoMap.get(poolInfo); }
[ "public", "V", "get", "(", "ResourceType", "type", ",", "PoolInfo", "poolInfo", ")", "{", "Map", "<", "PoolInfo", ",", "V", ">", "poolInfoMap", "=", "typePoolInfoMap", ".", "get", "(", "type", ")", ";", "if", "(", "poolInfoMap", "==", "null", ")", "{",...
Get the value with the appropriate keys @param type Resource type @param poolInfo Pool info @param value Value to put @return Previous value, can be null if if wasn't set
[ "Get", "the", "value", "with", "the", "appropriate", "keys" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/TypePoolInfoMap.java#L61-L67
train
Get the value of a resource pool.
Of course, here is the Java code you requested: ```java public V get(ResourceType type, PoolInfo poolInfo) { Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type); if (poolInfoMap == null) { return null; } return poolInfoMap.get(poolInfo); } ``` Hope this helps!
streamsets/datacollector
salesforce-lib/src/main/java/com/streamsets/pipeline/stage/origin/salesforce/ForceSource.java
ForceSource.produce
@Override public String produce(String lastSourceOffset, int maxBatchSize, BatchMaker batchMaker) throws StageException { String nextSourceOffset = null; LOG.debug("lastSourceOffset: {}", lastSourceOffset); // send event only once for each time we run out of data. if(shouldSendNoMoreDataEvent) { ...
java
@Override public String produce(String lastSourceOffset, int maxBatchSize, BatchMaker batchMaker) throws StageException { String nextSourceOffset = null; LOG.debug("lastSourceOffset: {}", lastSourceOffset); // send event only once for each time we run out of data. if(shouldSendNoMoreDataEvent) { ...
[ "@", "Override", "public", "String", "produce", "(", "String", "lastSourceOffset", ",", "int", "maxBatchSize", ",", "BatchMaker", "batchMaker", ")", "throws", "StageException", "{", "String", "nextSourceOffset", "=", "null", ";", "LOG", ".", "debug", "(", "\"las...
{@inheritDoc}
[ "{" ]
ea63245ea14d59d5229248387f0628f46131eae5
https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/salesforce-lib/src/main/java/com/streamsets/pipeline/stage/origin/salesforce/ForceSource.java#L458-L508
test
This method is called by the base class to produce a sequence of events.
Of course, here is the Java code you requested: ```java @Override public String produce(String lastSourceOffset, int maxBatchSize, BatchMaker batchMaker) throws StageException { String nextSourceOffset = null; LOG.debug("lastSourceOffset: {}", lastSourceOffset); // send event only once for each time we...
aws/aws-sdk-java
aws-java-sdk-codecommit/src/main/java/com/amazonaws/services/codecommit/model/CreateCommitRequest.java
CreateCommitRequest.withSetFileModes
public CreateCommitRequest withSetFileModes(SetFileModeEntry... setFileModes) { if (this.setFileModes == null) { setSetFileModes(new java.util.ArrayList<SetFileModeEntry>(setFileModes.length)); } for (SetFileModeEntry ele : setFileModes) { this.setFileModes.add(ele); ...
java
public CreateCommitRequest withSetFileModes(SetFileModeEntry... setFileModes) { if (this.setFileModes == null) { setSetFileModes(new java.util.ArrayList<SetFileModeEntry>(setFileModes.length)); } for (SetFileModeEntry ele : setFileModes) { this.setFileModes.add(ele); ...
[ "public", "CreateCommitRequest", "withSetFileModes", "(", "SetFileModeEntry", "...", "setFileModes", ")", "{", "if", "(", "this", ".", "setFileModes", "==", "null", ")", "{", "setSetFileModes", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "SetFileMode...
<p> The file modes to update for files in this commit. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setSetFileModes(java.util.Collection)} or {@link #withSetFileModes(java.util.Collection)} if you want to override the existing values. </p> @param setFileModes The file...
[ "<p", ">", "The", "file", "modes", "to", "update", "for", "files", "in", "this", "commit", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "lis...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codecommit/src/main/java/com/amazonaws/services/codecommit/model/CreateCommitRequest.java#L596-L604
train
A list of file modes to use for the commit.
Of course, here is the Java code you requested: ```java public CreateCommitRequest withSetFileModes(SetFileModeEntry... setFileModes) { if (this.setFileModes == null) { setSetFileModes(new java.util.ArrayList<SetFileModeEntry>(setFileModes.length)); } for (SetFileModeEntry ele : set...
eigengo/specs2-spring
src/main/java/org/specs2/spring/Environment.java
Environment.addBean
void addBean(Bean bean) { if (bean == null) return; this.beans.add(new BeanDefinition(bean.name(), bean.clazz())); }
java
void addBean(Bean bean) { if (bean == null) return; this.beans.add(new BeanDefinition(bean.name(), bean.clazz())); }
[ "void", "addBean", "(", "Bean", "bean", ")", "{", "if", "(", "bean", "==", "null", ")", "return", ";", "this", ".", "beans", ".", "add", "(", "new", "BeanDefinition", "(", "bean", ".", "name", "(", ")", ",", "bean", ".", "clazz", "(", ")", ")", ...
Adds a Bean definition @param bean the bean, or {@code null}.
[ "Adds", "a", "Bean", "definition" ]
96f411d997a83cac41cb2127e58afee0ef92133b
https://github.com/eigengo/specs2-spring/blob/96f411d997a83cac41cb2127e58afee0ef92133b/src/main/java/org/specs2/spring/Environment.java#L96-L99
train
Add a bean to the list of beans.
Of course, here is the Java code you requested: ```java void addBean(Bean bean) { if (bean == null) return; this.beans.add(new BeanDefinition(bean.name(), bean.clazz())); } ``` Hope this helps!
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.deleteReferenceImage
public final void deleteReferenceImage(String name) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder().setName(name).build(); deleteReferenceImage(request); }
java
public final void deleteReferenceImage(String name) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder().setName(name).build(); deleteReferenceImage(request); }
[ "public", "final", "void", "deleteReferenceImage", "(", "String", "name", ")", "{", "DeleteReferenceImageRequest", "request", "=", "DeleteReferenceImageRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", ")", ".", "build", "(", ")", ";", "deleteR...
Permanently deletes a reference image. <p>The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. <p>The actual image files are not deleted from Google Cloud Storage. <p>Possible errors: <p>&#42; Returns NOT_FO...
[ "Permanently", "deletes", "a", "reference", "image", "." ]
d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L1357-L1362
train
Delete a reference image.
Of course, here is the Java code you requested: ```java public final void deleteReferenceImage(String name) { DeleteReferenceImageRequest request = DeleteReferenceImageRequest.newBuilder().setName(name).build(); deleteReferenceImage(request); } ``` Hope this helps!
kiswanij/jk-util
src/main/java/com/jk/util/mime/MagicMimeEntry.java
MagicMimeEntry.matchShort
private boolean matchShort(final ByteBuffer bbuf, final ByteOrder bo, final boolean needMask, final short sMask) throws IOException { bbuf.order(bo); short got; final String testContent = getContent(); if (testContent.startsWith("0x")) { got = (short) Integer.parseInt(testContent.substring(2), 16); } else ...
java
private boolean matchShort(final ByteBuffer bbuf, final ByteOrder bo, final boolean needMask, final short sMask) throws IOException { bbuf.order(bo); short got; final String testContent = getContent(); if (testContent.startsWith("0x")) { got = (short) Integer.parseInt(testContent.substring(2), 16); } else ...
[ "private", "boolean", "matchShort", "(", "final", "ByteBuffer", "bbuf", ",", "final", "ByteOrder", "bo", ",", "final", "boolean", "needMask", ",", "final", "short", "sMask", ")", "throws", "IOException", "{", "bbuf", ".", "order", "(", "bo", ")", ";", "sho...
Match short. @param bbuf the bbuf @param bo the bo @param needMask the need mask @param sMask the s mask @return true, if successful @throws IOException Signals that an I/O exception has occurred.
[ "Match", "short", "." ]
8e0c85818423406f769444c76194a748e0a0fc0a
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/mime/MagicMimeEntry.java#L595-L618
train
Match short.
Of course, here is the Java code you requested: ```java private boolean matchShort(final ByteBuffer bbuf, final ByteOrder bo, final boolean needMask, final short sMask) throws IOException { bbuf.order(bo); short got; final String testContent = getContent(); if (testContent.startsWith("0x")) { got = (short) ...
networknt/light-4j
client/src/main/java/com/networknt/client/Http2Client.java
Http2Client.connectAsync
public CompletableFuture<ClientConnection> connectAsync(URI uri) { return this.connectAsync(null, uri, com.networknt.client.Http2Client.WORKER, com.networknt.client.Http2Client.SSL, com.networknt.client.Http2Client.BUFFER_POOL, OptionMap.create(UndertowOptions.ENABLE_HTTP2, true)); }
java
public CompletableFuture<ClientConnection> connectAsync(URI uri) { return this.connectAsync(null, uri, com.networknt.client.Http2Client.WORKER, com.networknt.client.Http2Client.SSL, com.networknt.client.Http2Client.BUFFER_POOL, OptionMap.create(UndertowOptions.ENABLE_HTTP2, true)); }
[ "public", "CompletableFuture", "<", "ClientConnection", ">", "connectAsync", "(", "URI", "uri", ")", "{", "return", "this", ".", "connectAsync", "(", "null", ",", "uri", ",", "com", ".", "networknt", ".", "client", ".", "Http2Client", ".", "WORKER", ",", "...
Create async connection with default config value
[ "Create", "async", "connection", "with", "default", "config", "value" ]
2a60257c60663684c8f6dc8b5ea3cf184e534db6
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/Http2Client.java#L714-L717
train
Creates a new connection asynchronously.
Of course, here is the Java code you requested: ```java public CompletableFuture<ClientConnection> connectAsync(URI uri) { return this.connectAsync(null, uri, com.networknt.client.Http2Client.WORKER, com.networknt.client.Http2Client.SSL, com.networknt.client.Http2Client.BUFFER_POOL, OptionMap.c...
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Input.java
Input.removeMouseListener
public void removeMouseListener(MouseListener listener) { mouseListeners.remove(listener); mouseListenersToAdd.remove(listener); if (!controllerListeners.contains(listener) && !keyListeners.contains(listener)) { allListeners.remove(listener); } }
java
public void removeMouseListener(MouseListener listener) { mouseListeners.remove(listener); mouseListenersToAdd.remove(listener); if (!controllerListeners.contains(listener) && !keyListeners.contains(listener)) { allListeners.remove(listener); } }
[ "public", "void", "removeMouseListener", "(", "MouseListener", "listener", ")", "{", "mouseListeners", ".", "remove", "(", "listener", ")", ";", "mouseListenersToAdd", ".", "remove", "(", "listener", ")", ";", "if", "(", "!", "controllerListeners", ".", "contain...
Remove a mouse listener that will no longer be notified @param listener The listen to be removed
[ "Remove", "a", "mouse", "listener", "that", "will", "no", "longer", "be", "notified" ]
8251f88a0ed6a70e726d2468842455cd1f80893f
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Input.java#L632-L639
train
Removes a mouse listener.
Of course, here is the Java code you requested: ```java public void removeMouseListener(MouseListener listener) { mouseListeners.remove(listener); mouseListenersToAdd.remove(listener); if (!controllerListeners.contains(listener) && !keyListeners.contains(listener)) { allListeners.remove(listener); ...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getRegionForSupplementalData
@Deprecated public static String getRegionForSupplementalData( ULocale locale, boolean inferRegion) { String region = locale.getKeywordValue("rg"); if (region != null && region.length() == 6) { String regionUpper = AsciiUtil.toUpperString(region); ...
java
@Deprecated public static String getRegionForSupplementalData( ULocale locale, boolean inferRegion) { String region = locale.getKeywordValue("rg"); if (region != null && region.length() == 6) { String regionUpper = AsciiUtil.toUpperString(region); ...
[ "@", "Deprecated", "public", "static", "String", "getRegionForSupplementalData", "(", "ULocale", "locale", ",", "boolean", "inferRegion", ")", "{", "String", "region", "=", "locale", ".", "getKeywordValue", "(", "\"rg\"", ")", ";", "if", "(", "region", "!=", "...
<strong>[icu]</strong> Get the region to use for supplemental data lookup. Uses (1) any region specified by locale tag "rg"; if none then (2) any unicode_region_tag in the locale ID; if none then (3) if inferRegion is TRUE, the region suggested by getLikelySubtags on the localeID. If no region is found, returns empty s...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Get", "the", "region", "to", "use", "for", "supplemental", "data", "lookup", ".", "Uses", "(", "1", ")", "any", "region", "specified", "by", "locale", "tag", "rg", ";", "if", "none", "then", ...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L945-L961
train
Get the region for supplemental data.
Of course, here is the Java code you requested: ```java @Deprecated public static String getRegionForSupplementalData( ULocale locale, boolean inferRegion) { String region = locale.getKeywordValue("rg"); if (region != null && region.length() == 6) { String re...
naver/nbase-arc
api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayClient.java
GatewayClient.zincrby
public Double zincrby(final String key, final double score, final String member) { return this.execute(new RedisClusterCallback<Double>() { public Double doInRedisCluster(RedisCluster redisCluster) { return redisCluster.zincrby(key, score, member); } public i...
java
public Double zincrby(final String key, final double score, final String member) { return this.execute(new RedisClusterCallback<Double>() { public Double doInRedisCluster(RedisCluster redisCluster) { return redisCluster.zincrby(key, score, member); } public i...
[ "public", "Double", "zincrby", "(", "final", "String", "key", ",", "final", "double", "score", ",", "final", "String", "member", ")", "{", "return", "this", ".", "execute", "(", "new", "RedisClusterCallback", "<", "Double", ">", "(", ")", "{", "public", ...
/* @see RedisClusterCommands#zincrby(java.lang.String, double, java.lang.String)
[ "/", "*" ]
d4ce8a258527160c09b55e34acc1542651a8bbb3
https://github.com/naver/nbase-arc/blob/d4ce8a258527160c09b55e34acc1542651a8bbb3/api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayClient.java#L2818-L2832
valid
Zincrby - Double.
Of course, here is the Java code you requested: ```java public Double zincrby(final String key, final double score, final String member) { return this.execute(new RedisClusterCallback<Double>() { public Double doInRedisCluster(RedisCluster redisCluster) { return redisCluster.zincrby...
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_group_GET
public ArrayList<OvhInstanceGroup> project_serviceName_instance_group_GET(String serviceName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group"; StringBuilder sb = path(qPath, serviceName); query(sb, "region", region); String resp = exec(qPath, "GET", sb.toString()...
java
public ArrayList<OvhInstanceGroup> project_serviceName_instance_group_GET(String serviceName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group"; StringBuilder sb = path(qPath, serviceName); query(sb, "region", region); String resp = exec(qPath, "GET", sb.toString()...
[ "public", "ArrayList", "<", "OvhInstanceGroup", ">", "project_serviceName_instance_group_GET", "(", "String", "serviceName", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/group\"", ";", "StringBu...
Get the detail of a group REST: GET /cloud/project/{serviceName}/instance/group @param region [required] Instance region @param serviceName [required] Project id
[ "Get", "the", "detail", "of", "a", "group" ]
6d531a40e56e09701943e334c25f90f640c55701
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2116-L2122
train
Get all the groups in the specified region
Of course, here is the Java code you requested: ```java public ArrayList<OvhInstanceGroup> project_serviceName_instance_group_GET(String serviceName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/group"; StringBuilder sb = path(qPath, serviceName); query(sb, "region", ...
stagemonitor/stagemonitor
stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java
MailRequest.createTextMimePart
private MimePart createTextMimePart() throws MessagingException { MimePart bodyPart = new MimeBodyPart(); bodyPart.setText(textPart); return bodyPart; }
java
private MimePart createTextMimePart() throws MessagingException { MimePart bodyPart = new MimeBodyPart(); bodyPart.setText(textPart); return bodyPart; }
[ "private", "MimePart", "createTextMimePart", "(", ")", "throws", "MessagingException", "{", "MimePart", "bodyPart", "=", "new", "MimeBodyPart", "(", ")", ";", "bodyPart", ".", "setText", "(", "textPart", ")", ";", "return", "bodyPart", ";", "}" ]
Creates a MimePart from text part. @return mimePart from HTML string @throws MessagingException
[ "Creates", "a", "MimePart", "from", "text", "part", "." ]
7a1bf6848906f816aa465983f602ea1f1e8f2b7b
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/MailRequest.java#L125-L129
train
Creates a MimePart with text part.
Of course, here is the Java code you requested: ```java private MimePart createTextMimePart() throws MessagingException { MimePart bodyPart = new MimeBodyPart(); bodyPart.setText(textPart); return bodyPart; } ``` Hope this helps!
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/FastaReaderHelper.java
FastaReaderHelper.readFastaRNASequence
public static LinkedHashMap<String, RNASequence> readFastaRNASequence(File file, boolean lazySequenceLoad) throws IOException { if (!lazySequenceLoad) { return readFastaRNASequence(file); } FastaReader<RNASequence, NucleotideCompound> fastaProxyReader = new FastaReader<RNASequence, NucleotideCompound>( ...
java
public static LinkedHashMap<String, RNASequence> readFastaRNASequence(File file, boolean lazySequenceLoad) throws IOException { if (!lazySequenceLoad) { return readFastaRNASequence(file); } FastaReader<RNASequence, NucleotideCompound> fastaProxyReader = new FastaReader<RNASequence, NucleotideCompound>( ...
[ "public", "static", "LinkedHashMap", "<", "String", ",", "RNASequence", ">", "readFastaRNASequence", "(", "File", "file", ",", "boolean", "lazySequenceLoad", ")", "throws", "IOException", "{", "if", "(", "!", "lazySequenceLoad", ")", "{", "return", "readFastaRNASe...
Selecting lazySequenceLoad=true will parse the FASTA file and figure out the accessionid and offsets and return sequence objects that can in the future read the sequence from the disk. This allows the loading of large fasta files where you are only interested in one sequence based on accession id. @param file @param la...
[ "Selecting", "lazySequenceLoad", "=", "true", "will", "parse", "the", "FASTA", "file", "and", "figure", "out", "the", "accessionid", "and", "offsets", "and", "return", "sequence", "objects", "that", "can", "in", "the", "future", "read", "the", "sequence", "fro...
a1c71a8e3d40cc32104b1d387a3d3b560b43356e
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/FastaReaderHelper.java#L82-L99
train
Read a FASTA RNA sequence from a file.
Of course, here is the Java code you requested: ```java public static LinkedHashMap<String, RNASequence> readFastaRNASequence(File file, boolean lazySequenceLoad) throws IOException { if (!lazySequenceLoad) { return readFastaRNASequence(file); } FastaReader<RNASequence, NucleotideCompound> fastaProxyReader =...
xiancloud/xian
xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/persistence/DBManagerFactory.java
DBManagerFactory.getInstance
public static DBManager getInstance() { if (dbManager == null) { synchronized (lock){ if(dbManager == null){ dbManager = new RedisDBManager(); } } } return dbManager; }
java
public static DBManager getInstance() { if (dbManager == null) { synchronized (lock){ if(dbManager == null){ dbManager = new RedisDBManager(); } } } return dbManager; }
[ "public", "static", "DBManager", "getInstance", "(", ")", "{", "if", "(", "dbManager", "==", "null", ")", "{", "synchronized", "(", "lock", ")", "{", "if", "(", "dbManager", "==", "null", ")", "{", "dbManager", "=", "new", "RedisDBManager", "(", ")", "...
并发安全的
[ "并发安全的" ]
1948e088545553d2745b2c86d8b5a64988bb850e
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/persistence/DBManagerFactory.java#L32-L41
train
Get the instance of the DBManager.
Of course, here is the Java code you requested: ```java public static DBManager getInstance() { if (dbManager == null) { synchronized (lock){ if(dbManager == null){ dbManager = new RedisDBManager(); } } } return dbManag...
softindex/datakernel
cloud-dataflow/src/main/java/io/datakernel/dataflow/graph/DataGraph.java
DataGraph.execute
public void execute() { Map<Partition, List<Node>> map = getNodesByPartition(); for (Partition partition : map.keySet()) { List<Node> nodes = map.get(partition); partition.execute(nodes); } }
java
public void execute() { Map<Partition, List<Node>> map = getNodesByPartition(); for (Partition partition : map.keySet()) { List<Node> nodes = map.get(partition); partition.execute(nodes); } }
[ "public", "void", "execute", "(", ")", "{", "Map", "<", "Partition", ",", "List", "<", "Node", ">", ">", "map", "=", "getNodesByPartition", "(", ")", ";", "for", "(", "Partition", "partition", ":", "map", ".", "keySet", "(", ")", ")", "{", "List", ...
Executes the defined operations on all partitions.
[ "Executes", "the", "defined", "operations", "on", "all", "partitions", "." ]
090ca1116416c14d463d49d275cb1daaafa69c56
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/cloud-dataflow/src/main/java/io/datakernel/dataflow/graph/DataGraph.java#L69-L75
train
Execute the operation on all partitions.
Of course, here is the Java code you requested: ```java public void execute() { Map<Partition, List<Node>> map = getNodesByPartition(); for (Partition partition : map.keySet()) { List<Node> nodes = map.get(partition); partition.execute(nodes); } } ``` Hope this helps!
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getAllDungeonName
public void getAllDungeonName(Callback<List<String>> callback) throws NullPointerException { gw2API.getAllDungeonName().enqueue(callback); }
java
public void getAllDungeonName(Callback<List<String>> callback) throws NullPointerException { gw2API.getAllDungeonName().enqueue(callback); }
[ "public", "void", "getAllDungeonName", "(", "Callback", "<", "List", "<", "String", ">", ">", "callback", ")", "throws", "NullPointerException", "{", "gw2API", ".", "getAllDungeonName", "(", ")", ".", "enqueue", "(", "callback", ")", ";", "}" ]
For more info on Dungeons API go <a href="https://wiki.guildwars2.com/wiki/API:2/dungeons">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param callback callback that is going to be used for {@link Call#...
[ "For", "more", "info", "on", "Dungeons", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "dungeons", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", ...
c8a43b51f363b032074fb152ee6efe657e33e525
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1273-L1275
train
Get all dungeon names
Of course, here is the Java code you requested: ```java public void getAllDungeonName(Callback<List<String>> callback) throws NullPointerException { gw2API.getAllDungeonName().enqueue(callback); } ``` Hope this helps!
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/j/LongTuples.java
LongTuples.min
public static long min(LongTuple t) { return LongTupleFunctions.reduce( t, Long.MAX_VALUE, Math::min); }
java
public static long min(LongTuple t) { return LongTupleFunctions.reduce( t, Long.MAX_VALUE, Math::min); }
[ "public", "static", "long", "min", "(", "LongTuple", "t", ")", "{", "return", "LongTupleFunctions", ".", "reduce", "(", "t", ",", "Long", ".", "MAX_VALUE", ",", "Math", "::", "min", ")", ";", "}" ]
Computes the minimum value that occurs in the given tuple, or <code>Long.MAX_VALUE</code> if the given tuple has a size of 0. @param t The input tuple @return The minimum value
[ "Computes", "the", "minimum", "value", "that", "occurs", "in", "the", "given", "tuple", "or", "<code", ">", "Long", ".", "MAX_VALUE<", "/", "code", ">", "if", "the", "given", "tuple", "has", "a", "size", "of", "0", "." ]
bcb655aaf5fc88af6194f73a27cca079186ff559
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/j/LongTuples.java#L831-L835
train
Returns the minimum value of the tuple in a sequence of bytes.
Of course, here is the Java code you requested: ```java public static long min(LongTuple t) { return LongTupleFunctions.reduce( t, Long.MAX_VALUE, Math::min); } ``` Hope this helps!
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockEc2Controller.java
MockEc2Controller.cleanupTerminatedInstances
public void cleanupTerminatedInstances(final long period) { if (null == cleanupTerminatedInstancesTimer) { // "double checked locking" for the cleanup timer synchronized (this) { if (null == cleanupTerminatedInstancesTimer) { Runnable cleanupTerminat...
java
public void cleanupTerminatedInstances(final long period) { if (null == cleanupTerminatedInstancesTimer) { // "double checked locking" for the cleanup timer synchronized (this) { if (null == cleanupTerminatedInstancesTimer) { Runnable cleanupTerminat...
[ "public", "void", "cleanupTerminatedInstances", "(", "final", "long", "period", ")", "{", "if", "(", "null", "==", "cleanupTerminatedInstancesTimer", ")", "{", "// \"double checked locking\" for the cleanup timer", "synchronized", "(", "this", ")", "{", "if", "(", "nu...
Clean up terminated mock instances after a pre-defined period. Period is defined in aws-mock.properties (or if not overridden, as defined in aws-mock-default.properties) @param period time period to clean up terminated instances
[ "Clean", "up", "terminated", "mock", "instances", "after", "a", "pre", "-", "defined", "period", ".", "Period", "is", "defined", "in", "aws", "-", "mock", ".", "properties", "(", "or", "if", "not", "overridden", "as", "defined", "in", "aws", "-", "mock",...
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockEc2Controller.java#L393-L428
train
Cleanup terminated instances.
Of course, here is the Java code you requested: ```java public void cleanupTerminatedInstances(final long period) { if (null == cleanupTerminatedInstancesTimer) { // "double checked locking" for the cleanup timer synchronized (this) { if (null == cleanupTerminatedInstan...
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterServiceImpl.java
ClusterServiceImpl.shouldAcceptMastership
private boolean shouldAcceptMastership(MemberMap memberMap, MemberImpl candidate) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; for (MemberImpl member : memberMap.headMemberSet(candidate, false)) { if (!membershipManager.isMemberSuspected(member.getA...
java
private boolean shouldAcceptMastership(MemberMap memberMap, MemberImpl candidate) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; for (MemberImpl member : memberMap.headMemberSet(candidate, false)) { if (!membershipManager.isMemberSuspected(member.getA...
[ "private", "boolean", "shouldAcceptMastership", "(", "MemberMap", "memberMap", ",", "MemberImpl", "candidate", ")", "{", "assert", "lock", ".", "isHeldByCurrentThread", "(", ")", ":", "\"Called without holding cluster service lock!\"", ";", "for", "(", "MemberImpl", "me...
mastership is accepted when all members before the candidate is suspected
[ "mastership", "is", "accepted", "when", "all", "members", "before", "the", "candidate", "is", "suspected" ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterServiceImpl.java#L285-L298
train
Checks if the candidate member is suspected at the moment and if so returns true.
Of course, here is the Java code you requested: ```java private boolean shouldAcceptMastership(MemberMap memberMap, MemberImpl candidate) { assert lock.isHeldByCurrentThread() : "Called without holding cluster service lock!"; for (MemberImpl member : memberMap.headMemberSet(candidate, false)) { ...
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/tracer/TraceEvent.java
TraceEvent.asText
public static String asText(TraceEvent event) { switch (event.getType()) { case GET_CONNECTION_LISTENER: return "getConnectionListener()"; case GET_CONNECTION_LISTENER_NEW: return "getConnectionListener(true)"; case GET_INTERLEAVING_CONNECTION_LISTENER: ...
java
public static String asText(TraceEvent event) { switch (event.getType()) { case GET_CONNECTION_LISTENER: return "getConnectionListener()"; case GET_CONNECTION_LISTENER_NEW: return "getConnectionListener(true)"; case GET_INTERLEAVING_CONNECTION_LISTENER: ...
[ "public", "static", "String", "asText", "(", "TraceEvent", "event", ")", "{", "switch", "(", "event", ".", "getType", "(", ")", ")", "{", "case", "GET_CONNECTION_LISTENER", ":", "return", "\"getConnectionListener()\"", ";", "case", "GET_CONNECTION_LISTENER_NEW", "...
As text @param event The event @return The text
[ "As", "text" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/tracer/TraceEvent.java#L352-L446
train
As text for TraceEvent
Of course, here is the Java code you requested: ```java public static String asText(TraceEvent event) { switch (event.getType()) { case GET_CONNECTION_LISTENER: return "getConnectionListener()"; case GET_CONNECTION_LISTENER_NEW: return "getConnectionListener(tru...
lotaris/rox-client-java
rox-client-java/src/main/java/com/lotaris/rox/common/config/Configuration.java
Configuration.uidAlreadyUsed
private boolean uidAlreadyUsed(String category, String projectName, String uid) { if (uid == null) { return false; } else { for (File versionDirectory : getUidFilesForProject(category, projectName)) { String uidRead = readUid(new File(versionDirectory, "latest")); if (uidRead != null && !uid...
java
private boolean uidAlreadyUsed(String category, String projectName, String uid) { if (uid == null) { return false; } else { for (File versionDirectory : getUidFilesForProject(category, projectName)) { String uidRead = readUid(new File(versionDirectory, "latest")); if (uidRead != null && !uid...
[ "private", "boolean", "uidAlreadyUsed", "(", "String", "category", ",", "String", "projectName", ",", "String", "uid", ")", "{", "if", "(", "uid", "==", "null", ")", "{", "return", "false", ";", "}", "else", "{", "for", "(", "File", "versionDirectory", "...
Check if a UID was already used in any context @param category The category to check @param projectName The project name to check @param uid The UID to validate @return True if the UID is present for at least one version of a project in a category, false otherwise
[ "Check", "if", "a", "UID", "was", "already", "used", "in", "any", "context" ]
1b33f7560347c382c59a40c4037d175ab8127fde
https://github.com/lotaris/rox-client-java/blob/1b33f7560347c382c59a40c4037d175ab8127fde/rox-client-java/src/main/java/com/lotaris/rox/common/config/Configuration.java#L507-L525
train
Checks if the uid already used in the given category and project are already used.
Of course, here is the Java code you requested: ```java private boolean uidAlreadyUsed(String category, String projectName, String uid) { if (uid == null) { return false; } else { for (File versionDirectory : getUidFilesForProject(category, projectName)) { String uidRead = readUid(new File(versionDi...
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/deepboof/BaseImageClassifier.java
BaseImageClassifier.preprocess
protected Planar<GrayF32> preprocess(Planar<GrayF32> image) { // Shrink the image to input size if( image.width == imageSize && image.height == imageSize ) { this.imageRgb.setTo(image); } else if( image.width < imageSize || image.height < imageSize ) { throw new IllegalArgumentException("Image width or heig...
java
protected Planar<GrayF32> preprocess(Planar<GrayF32> image) { // Shrink the image to input size if( image.width == imageSize && image.height == imageSize ) { this.imageRgb.setTo(image); } else if( image.width < imageSize || image.height < imageSize ) { throw new IllegalArgumentException("Image width or heig...
[ "protected", "Planar", "<", "GrayF32", ">", "preprocess", "(", "Planar", "<", "GrayF32", ">", "image", ")", "{", "// Shrink the image to input size", "if", "(", "image", ".", "width", "==", "imageSize", "&&", "image", ".", "height", "==", "imageSize", ")", "...
Massage the input image into a format recognized by the network
[ "Massage", "the", "input", "image", "into", "a", "format", "recognized", "by", "the", "network" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/deepboof/BaseImageClassifier.java#L104-L114
train
Preprocessing of the image.
Of course, here is the Java code you requested: ```java protected Planar<GrayF32> preprocess(Planar<GrayF32> image) { // Shrink the image to input size if( image.width == imageSize && image.height == imageSize ) { this.imageRgb.setTo(image); } else if( image.width < imageSize || image.height < imageSize ) { ...
schaloner/deadbolt-2-java
code/app/be/objectify/deadbolt/java/DeadboltAnalyzer.java
DeadboltAnalyzer.hasRole
public boolean hasRole(final Optional<? extends Subject> subjectOption, final String roleName) { return getRoleNames(subjectOption).contains(roleName); }
java
public boolean hasRole(final Optional<? extends Subject> subjectOption, final String roleName) { return getRoleNames(subjectOption).contains(roleName); }
[ "public", "boolean", "hasRole", "(", "final", "Optional", "<", "?", "extends", "Subject", ">", "subjectOption", ",", "final", "String", "roleName", ")", "{", "return", "getRoleNames", "(", "subjectOption", ")", ".", "contains", "(", "roleName", ")", ";", "}"...
Check if the subject has the given role. @param subjectOption an option for the subject @param roleName the name of the role @return true iff the subject has the role represented by the role name
[ "Check", "if", "the", "subject", "has", "the", "given", "role", "." ]
84890eb4565fb6172b7d8e824f64d547ddacfcc7
https://github.com/schaloner/deadbolt-2-java/blob/84890eb4565fb6172b7d8e824f64d547ddacfcc7/code/app/be/objectify/deadbolt/java/DeadboltAnalyzer.java#L86-L90
valid
Check if a subject has a specific role.
Of course, here is the Java code you requested: ```java public boolean hasRole(final Optional<? extends Subject> subjectOption, final String roleName) { return getRoleNames(subjectOption).contains(roleName); } ``` Hope this helps!
sonyxperiadev/gerrit-events
src/main/java/com/sonymobile/tools/gerrit/gerritevents/workers/AbstractJsonObjectWork.java
AbstractJsonObjectWork.perform
protected void perform(JSONObject json, Coordinator coordinator, Provider provider) { logger.trace("Extracting event from JSON."); GerritEvent event = GerritJsonEventFactory.getEvent(json); if (event != null) { if (event instanceof GerritTriggeredEvent) { GerritTrigge...
java
protected void perform(JSONObject json, Coordinator coordinator, Provider provider) { logger.trace("Extracting event from JSON."); GerritEvent event = GerritJsonEventFactory.getEvent(json); if (event != null) { if (event instanceof GerritTriggeredEvent) { GerritTrigge...
[ "protected", "void", "perform", "(", "JSONObject", "json", ",", "Coordinator", "coordinator", ",", "Provider", "provider", ")", "{", "logger", ".", "trace", "(", "\"Extracting event from JSON.\"", ")", ";", "GerritEvent", "event", "=", "GerritJsonEventFactory", ".",...
Parses the JSONObject into a Java bean and sends the parsed {@link GerritEvent} down the inheritance chain. @param json the JSONObject to work on. @param coordinator the coordinator. @param provider the Gerrit server info
[ "Parses", "the", "JSONObject", "into", "a", "Java", "bean", "and", "sends", "the", "parsed", "{" ]
9a443d13dded85cc4709136ac33989f2bbb34fe2
https://github.com/sonyxperiadev/gerrit-events/blob/9a443d13dded85cc4709136ac33989f2bbb34fe2/src/main/java/com/sonymobile/tools/gerrit/gerritevents/workers/AbstractJsonObjectWork.java#L67-L81
train
Perform the action.
Of course, here is the Java code you requested: ```java protected void perform(JSONObject json, Coordinator coordinator, Provider provider) { logger.trace("Extracting event from JSON."); GerritEvent event = GerritJsonEventFactory.getEvent(json); if (event != null) { if (event instan...
redbox-mint/redbox
plugins/transformer/vital-fedora2/src/main/java/com/googlecode/fascinator/redbox/VitalTransformer.java
VitalTransformer.processObject
private DigitalObject processObject(DigitalObject object, JsonSimple workflow, Properties metadata) throws TransformerException { String oid = object.getId(); String title = workflow.getString(null, Strings.NODE_FORMDATA, "title"); FedoraClient fedora = null; try...
java
private DigitalObject processObject(DigitalObject object, JsonSimple workflow, Properties metadata) throws TransformerException { String oid = object.getId(); String title = workflow.getString(null, Strings.NODE_FORMDATA, "title"); FedoraClient fedora = null; try...
[ "private", "DigitalObject", "processObject", "(", "DigitalObject", "object", ",", "JsonSimple", "workflow", ",", "Properties", "metadata", ")", "throws", "TransformerException", "{", "String", "oid", "=", "object", ".", "getId", "(", ")", ";", "String", "title", ...
Middle level wrapping method for processing objects. Now we are looking at what actually needs to be done. Has the object already been put in VITAL, or is it new. @param object The Object in question @param workflow The workflow data for the object @param metadata The Object's metadata
[ "Middle", "level", "wrapping", "method", "for", "processing", "objects", ".", "Now", "we", "are", "looking", "at", "what", "actually", "needs", "to", "be", "done", ".", "Has", "the", "object", "already", "been", "put", "in", "VITAL", "or", "is", "it", "n...
1db230f218031b85c48c8603cbb04fce7ac6de0c
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transformer/vital-fedora2/src/main/java/com/googlecode/fascinator/redbox/VitalTransformer.java#L573-L658
train
Process the object.
Of course, here is the Java code you requested: ```java private DigitalObject processObject(DigitalObject object, JsonSimple workflow, Properties metadata) throws TransformerException { String oid = object.getId(); String title = workflow.getString(null, Strings.NODE_FORMDATA, "...
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.iri
public static Validator<CharSequence> iri(@NonNull final Context context, @StringRes final int resourceId) { return new IRIValidator(context, resourceId); }
java
public static Validator<CharSequence> iri(@NonNull final Context context, @StringRes final int resourceId) { return new IRIValidator(context, resourceId); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "iri", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ")", "{", "return", "new", "IRIValidator", "(", "context", ",", "resourceId", ")", ";",...
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid IRIs. IRIs are internationalized URLs according to RFC 3987, which are for example used as internet addresses. Empty texts are also accepted. @param context The context, which should be used to retrieve the error messa...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "represent", "valid", "IRIs", ".", "IRIs", "are", "internationalized", "URLs", "according", "to", "RFC", "3987", "which", "are", "for",...
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L1088-L1091
train
Create a validator for the IRI.
Of course, here is the Java code you requested: ```java public static Validator<CharSequence> iri(@NonNull final Context context, @StringRes final int resourceId) { return new IRIValidator(context, resourceId); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-eks/src/main/java/com/amazonaws/services/eks/model/LogSetup.java
LogSetup.withTypes
public LogSetup withTypes(String... types) { if (this.types == null) { setTypes(new java.util.ArrayList<String>(types.length)); } for (String ele : types) { this.types.add(ele); } return this; }
java
public LogSetup withTypes(String... types) { if (this.types == null) { setTypes(new java.util.ArrayList<String>(types.length)); } for (String ele : types) { this.types.add(ele); } return this; }
[ "public", "LogSetup", "withTypes", "(", "String", "...", "types", ")", "{", "if", "(", "this", ".", "types", "==", "null", ")", "{", "setTypes", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "String", ">", "(", "types", ".", "length", ")", ...
<p> The available cluster control plane log types. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setTypes(java.util.Collection)} or {@link #withTypes(java.util.Collection)} if you want to override the existing values. </p> @param types The available cluster control pla...
[ "<p", ">", "The", "available", "cluster", "control", "plane", "log", "types", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-eks/src/main/java/com/amazonaws/services/eks/model/LogSetup.java#L93-L101
train
A list of the type names to use for the log.
Of course, here is the Java code you requested: ```java public LogSetup withTypes(String... types) { if (this.types == null) { setTypes(new java.util.ArrayList<String>(types.length)); } for (String ele : types) { this.types.add(ele); } return this; } ...
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/BlockReconstructor.java
BlockReconstructor.chooseDatanode
private DatanodeInfo chooseDatanode(DatanodeInfo[] locationsToAvoid, DatanodeInfo[] live) throws IOException { LOG.info("Choosing a datanode from " + live.length + " live nodes while avoiding " + locationsToAvoid.length); Random rand = new Random(); DatanodeInfo chosen = ...
java
private DatanodeInfo chooseDatanode(DatanodeInfo[] locationsToAvoid, DatanodeInfo[] live) throws IOException { LOG.info("Choosing a datanode from " + live.length + " live nodes while avoiding " + locationsToAvoid.length); Random rand = new Random(); DatanodeInfo chosen = ...
[ "private", "DatanodeInfo", "chooseDatanode", "(", "DatanodeInfo", "[", "]", "locationsToAvoid", ",", "DatanodeInfo", "[", "]", "live", ")", "throws", "IOException", "{", "LOG", ".", "info", "(", "\"Choosing a datanode from \"", "+", "live", ".", "length", "+", "...
Choose a datanode (hostname:portnumber). The datanode is chosen at random from the live datanodes. @param locationsToAvoid locations to avoid. @return A chosen datanode. @throws IOException
[ "Choose", "a", "datanode", "(", "hostname", ":", "portnumber", ")", ".", "The", "datanode", "is", "chosen", "at", "random", "from", "the", "live", "datanodes", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockReconstructor.java#L612-L636
train
Choose a datanode from live and locationsToAvoid.
Of course, here is the Java code you requested: ```java private DatanodeInfo chooseDatanode(DatanodeInfo[] locationsToAvoid, DatanodeInfo[] live) throws IOException { LOG.info("Choosing a datanode from " + live.length + " live nodes while avoiding " + locationsToAvoid.length); ...
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java
ScriptStackTrace.getScriptLineMap
public static LineMap getScriptLineMap(String className, ClassLoader loader) { try { Class cl = loader.loadClass(className); LineMap map = _scriptMap.get(cl); if (map == null) { map = loadScriptMap(cl); _scriptMap.put(cl, map); } return map; } catch (Throwable ...
java
public static LineMap getScriptLineMap(String className, ClassLoader loader) { try { Class cl = loader.loadClass(className); LineMap map = _scriptMap.get(cl); if (map == null) { map = loadScriptMap(cl); _scriptMap.put(cl, map); } return map; } catch (Throwable ...
[ "public", "static", "LineMap", "getScriptLineMap", "(", "String", "className", ",", "ClassLoader", "loader", ")", "{", "try", "{", "Class", "cl", "=", "loader", ".", "loadClass", "(", "className", ")", ";", "LineMap", "map", "=", "_scriptMap", ".", "get", ...
Loads the local line map for a class.
[ "Loads", "the", "local", "line", "map", "for", "a", "class", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/ScriptStackTrace.java#L130-L146
train
Get the script line map for a class name.
Of course, here is the Java code you requested: ```java public static LineMap getScriptLineMap(String className, ClassLoader loader) { try { Class cl = loader.loadClass(className); LineMap map = _scriptMap.get(cl); if (map == null) { map = loadScriptMap(cl); _scriptMap.put(cl,...
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/Envelope3D.java
Envelope3D.isIntersecting
public boolean isIntersecting(Envelope3D other) { return !isEmpty() && !other.isEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && // check that x projections overlap ((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin) && // check that y projections overlap ((zmin <= oth...
java
public boolean isIntersecting(Envelope3D other) { return !isEmpty() && !other.isEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && // check that x projections overlap ((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin) && // check that y projections overlap ((zmin <= oth...
[ "public", "boolean", "isIntersecting", "(", "Envelope3D", "other", ")", "{", "return", "!", "isEmpty", "(", ")", "&&", "!", "other", ".", "isEmpty", "(", ")", "&&", "(", "(", "xmin", "<=", "other", ".", "xmin", ")", "?", "xmax", ">=", "other", ".", ...
Checks if this envelope intersects the other. @return True if this envelope intersects the other.
[ "Checks", "if", "this", "envelope", "intersects", "the", "other", "." ]
494da8ec953d76e7c6072afbc081abfe48ff07cf
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Envelope3D.java#L254-L258
train
Checks if this envelope intersects the other.
Of course, here is the Java code you requested: ```java public boolean isIntersecting(Envelope3D other) { return !isEmpty() && !other.isEmpty() && ((xmin <= other.xmin) ? xmax >= other.xmin : other.xmax >= xmin) && // check that x projections overlap ((ymin <= other.ymin) ? ymax >= other.ymin : other.ymax >= ymin...
sitoolkit/sit-wt-all
sit-wt-runtime/src/main/java/io/sitoolkit/wt/domain/debug/DebugSupport.java
DebugSupport.getNextIndex
protected int getNextIndex(final int currentIndex) { if (!isPaused()) { return currentIndex + 1; } int ret = currentIndex; while (isPaused()) { sendStepPausing(ret + 1); try { Thread.sleep(getPauseSpan()); ...
java
protected int getNextIndex(final int currentIndex) { if (!isPaused()) { return currentIndex + 1; } int ret = currentIndex; while (isPaused()) { sendStepPausing(ret + 1); try { Thread.sleep(getPauseSpan()); ...
[ "protected", "int", "getNextIndex", "(", "final", "int", "currentIndex", ")", "{", "if", "(", "!", "isPaused", "(", ")", ")", "{", "return", "currentIndex", "+", "1", ";", "}", "int", "ret", "=", "currentIndex", ";", "while", "(", "isPaused", "(", ")",...
次に実行すべきテストステップインデックスを返します。 また内部では以下の処理を行います。 <ul> <li>テスト実行スレッドの待機(一時停止) <li>一時停止中のテストスクリプトの変更の監視と再読込 <li>一時停止中の入力コマンドの制御 <li>実行前後のテストステップのコンソール表示 </ul> @param currentIndex 現在のテストステップインデックス @return 次に実行するテストステップインデックス
[ "次に実行すべきテストステップインデックスを返します。", "また内部では以下の処理を行います。", "<ul", ">", "<li", ">", "テスト実行スレッドの待機", "(", "一時停止", ")", "<li", ">", "一時停止中のテストスクリプトの変更の監視と再読込", "<li", ">", "一時停止中の入力コマンドの制御", "<li", ">", "実行前後のテストステップのコンソール表示", "<", "/", "ul", ">" ]
efabde27aa731a5602d2041e137721a22f4fd27a
https://github.com/sitoolkit/sit-wt-all/blob/efabde27aa731a5602d2041e137721a22f4fd27a/sit-wt-runtime/src/main/java/io/sitoolkit/wt/domain/debug/DebugSupport.java#L141-L208
train
Gets the next index of the TIFF entry.
Of course, here is the Java code you requested: ```java protected int getNextIndex(final int currentIndex) { if (!isPaused()) { return currentIndex + 1; } int ret = currentIndex; while (isPaused()) { sendStepPausing(ret + 1); try { ...
alipay/sofa-hessian
src/main/java/com/caucho/hessian/io/HessianDebugOutputStream.java
HessianDebugOutputStream.close
@Override public void close() throws IOException { OutputStream os = _os; _os = null; if (os != null) { _state.next(-1); os.close(); } _state.println(); }
java
@Override public void close() throws IOException { OutputStream os = _os; _os = null; if (os != null) { _state.next(-1); os.close(); } _state.println(); }
[ "@", "Override", "public", "void", "close", "(", ")", "throws", "IOException", "{", "OutputStream", "os", "=", "_os", ";", "_os", "=", "null", ";", "if", "(", "os", "!=", "null", ")", "{", "_state", ".", "next", "(", "-", "1", ")", ";", "os", "."...
closes the stream.
[ "closes", "the", "stream", "." ]
89e4f5af28602101dab7b498995018871616357b
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/hessian/io/HessianDebugOutputStream.java#L139-L152
train
Close the underlying stream.
Of course, here is the Java code you requested: ```java @Override public void close() throws IOException { OutputStream os = _os; _os = null; if (os != null) { _state.next(-1); os.close(); } _state.println(); } ``` Hope this helps!
hudson3-plugins/dry-plugin
src/main/java/hudson/plugins/dry/ThresholdValidation.java
ThresholdValidation.validate
private FormValidation validate(final String highThreshold, final String normalThreshold, final String message) { try { int high = Integer.parseInt(highThreshold); int normal = Integer.parseInt(normalThreshold); if (isValid(normal, high)) { return FormValidati...
java
private FormValidation validate(final String highThreshold, final String normalThreshold, final String message) { try { int high = Integer.parseInt(highThreshold); int normal = Integer.parseInt(normalThreshold); if (isValid(normal, high)) { return FormValidati...
[ "private", "FormValidation", "validate", "(", "final", "String", "highThreshold", ",", "final", "String", "normalThreshold", ",", "final", "String", "message", ")", "{", "try", "{", "int", "high", "=", "Integer", ".", "parseInt", "(", "highThreshold", ")", ";"...
Performs on-the-fly validation on thresholds for high and normal warnings. @param highThreshold the threshold for high warnings @param normalThreshold the threshold for normal warnings @param message the validation message @return the validation result
[ "Performs", "on", "-", "the", "-", "fly", "validation", "on", "thresholds", "for", "high", "and", "normal", "warnings", "." ]
798d6e27cf414572777c3226147c4e6b3f28f485
https://github.com/hudson3-plugins/dry-plugin/blob/798d6e27cf414572777c3226147c4e6b3f28f485/src/main/java/hudson/plugins/dry/ThresholdValidation.java#L53-L65
valid
Validate the CRS.
Of course, here is the Java code you requested: ```java private FormValidation validate(final String highThreshold, final String normalThreshold, final String message) { try { int high = Integer.parseInt(highThreshold); int normal = Integer.parseInt(normalThreshold); if (isV...
jenkinsci/jenkins
core/src/main/java/hudson/FilePath.java
FilePath.act
public <T> T act(final FileCallable<T> callable) throws IOException, InterruptedException { return act(callable,callable.getClass().getClassLoader()); }
java
public <T> T act(final FileCallable<T> callable) throws IOException, InterruptedException { return act(callable,callable.getClass().getClassLoader()); }
[ "public", "<", "T", ">", "T", "act", "(", "final", "FileCallable", "<", "T", ">", "callable", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "act", "(", "callable", ",", "callable", ".", "getClass", "(", ")", ".", "getClassLoader...
Executes some program on the machine that this {@link FilePath} exists, so that one can perform local file operations.
[ "Executes", "some", "program", "on", "the", "machine", "that", "this", "{" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/FilePath.java#L1057-L1059
train
Act on a file callable.
Of course, here is the Java code you requested: ```java public <T> T act(final FileCallable<T> callable) throws IOException, InterruptedException { return act(callable,callable.getClass().getClassLoader()); } ``` Hope this helps!
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java
ExpressRouteCrossConnectionPeeringsInner.beginCreateOrUpdateAsync
public Observable<ExpressRouteCrossConnectionPeeringInner> beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, pe...
java
public Observable<ExpressRouteCrossConnectionPeeringInner> beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, pe...
[ "public", "Observable", "<", "ExpressRouteCrossConnectionPeeringInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "String", "peeringName", ",", "ExpressRouteCrossConnectionPeeringInner", "peeringParameters", ")...
Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param peeringName The name of the peering. @param peeringParameters Parameters supplied to the create or update Ex...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "ExpressRouteCrossConnection", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java#L594-L601
train
Creates or updates a peer.
Of course, here is the Java code you requested: ```java public Observable<ExpressRouteCrossConnectionPeeringInner> beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return beginCreateOrUpdateWithServic...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateUUID
public static <T extends CharSequence> T validateUUID(T value, String errorMsg) throws ValidateException { if (false == isUUID(value)) { throw new ValidateException(errorMsg); } return value; }
java
public static <T extends CharSequence> T validateUUID(T value, String errorMsg) throws ValidateException { if (false == isUUID(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "validateUUID", "(", "T", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isUUID", "(", "value", ")", ")", "{", "throw", "new", "Va...
验证是否为UUID<br> 包括带横线标准格式和不带横线的简单模式 @param <T> 字符串类型 @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常
[ "验证是否为UUID<br", ">", "包括带横线标准格式和不带横线的简单模式" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L1002-L1007
train
Validate UUID.
Of course, here is the Java code you requested: ```java public static <T extends CharSequence> T validateUUID(T value, String errorMsg) throws ValidateException { if (false == isUUID(value)) { throw new ValidateException(errorMsg); } return value; } ``` Hope this helps!
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java
PrimitiveParameter.getPosition
public Long getPosition() { Interval interval = getInterval(); if (interval != null) { return interval.getMinStart(); } else { return null; } }
java
public Long getPosition() { Interval interval = getInterval(); if (interval != null) { return interval.getMinStart(); } else { return null; } }
[ "public", "Long", "getPosition", "(", ")", "{", "Interval", "interval", "=", "getInterval", "(", ")", ";", "if", "(", "interval", "!=", "null", ")", "{", "return", "interval", ".", "getMinStart", "(", ")", ";", "}", "else", "{", "return", "null", ";", ...
Returns this parameter's timestamp (or other kind of position value). A <code>null</code> value means the timestamp is unknown. @return a {@link Long}.
[ "Returns", "this", "parameter", "s", "timestamp", "(", "or", "other", "kind", "of", "position", "value", ")", ".", "A", "<code", ">", "null<", "/", "code", ">", "value", "means", "the", "timestamp", "is", "unknown", "." ]
5a620d1a407c7a5426d1cf17d47b97717cf71634
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/PrimitiveParameter.java#L67-L74
train
Gets the position of the calendar.
Of course, here is the Java code you requested: ```java public Long getPosition() { Interval interval = getInterval(); if (interval != null) { return interval.getMinStart(); } else { return null; } } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java
AmazonEC2Client.describeInstanceAttribute
@Override public DescribeInstanceAttributeResult describeInstanceAttribute(DescribeInstanceAttributeRequest request) { request = beforeClientExecution(request); return executeDescribeInstanceAttribute(request); }
java
@Override public DescribeInstanceAttributeResult describeInstanceAttribute(DescribeInstanceAttributeRequest request) { request = beforeClientExecution(request); return executeDescribeInstanceAttribute(request); }
[ "@", "Override", "public", "DescribeInstanceAttributeResult", "describeInstanceAttribute", "(", "DescribeInstanceAttributeRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDescribeInstanceAttribute", "(", "requ...
<p> Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>userData</code> | <code>disableApiTermination</code> | <code>instanceInitiatedShutdownBehavior</code> ...
[ "<p", ">", "Describes", "the", "specified", "attribute", "of", "the", "specified", "instance", ".", "You", "can", "specify", "only", "one", "attribute", "at", "a", "time", ".", "Valid", "attribute", "values", "are", ":", "<code", ">", "instanceType<", "/", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java#L9817-L9821
train
Retrieves the attributes of an instance.
Of course, here is the Java code you requested: ```java @Override public DescribeInstanceAttributeResult describeInstanceAttribute(DescribeInstanceAttributeRequest request) { request = beforeClientExecution(request); return executeDescribeInstanceAttribute(request); } ``` Hope this helps!
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONNavi.java
JSONNavi.set
public JSONNavi<T> set(String key, long value) { return set(key, Long.valueOf(value)); }
java
public JSONNavi<T> set(String key, long value) { return set(key, Long.valueOf(value)); }
[ "public", "JSONNavi", "<", "T", ">", "set", "(", "String", "key", ",", "long", "value", ")", "{", "return", "set", "(", "key", ",", "Long", ".", "valueOf", "(", "value", ")", ")", ";", "}" ]
write an value in the current object @param key key to access @param value new value @return this
[ "write", "an", "value", "in", "the", "current", "object" ]
bfb3daef039e22a7bbff5f76bf14ea23330cd70e
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONNavi.java#L239-L241
train
Sets a long value.
Of course, here is the Java code you requested: ```java public JSONNavi<T> set(String key, long value) { return set(key, Long.valueOf(value)); } ``` Hope this helps!
phax/ph-schematron
ph-schematron/src/main/java/com/helger/schematron/pure/exchange/PSReader.java
PSReader.readPhaseFromXML
@Nonnull public PSPhase readPhaseFromXML (@Nonnull final IMicroElement ePhase) { final PSPhase ret = new PSPhase (); final PSRichGroup aRichGroup = new PSRichGroup (); ePhase.forAllAttributes ( (sNS, sAttrName, sVal) -> { final String sAttrValue = _getAttributeValue (sVal); if (sAttrName.eq...
java
@Nonnull public PSPhase readPhaseFromXML (@Nonnull final IMicroElement ePhase) { final PSPhase ret = new PSPhase (); final PSRichGroup aRichGroup = new PSRichGroup (); ePhase.forAllAttributes ( (sNS, sAttrName, sVal) -> { final String sAttrValue = _getAttributeValue (sVal); if (sAttrName.eq...
[ "@", "Nonnull", "public", "PSPhase", "readPhaseFromXML", "(", "@", "Nonnull", "final", "IMicroElement", "ePhase", ")", "{", "final", "PSPhase", "ret", "=", "new", "PSPhase", "(", ")", ";", "final", "PSRichGroup", "aRichGroup", "=", "new", "PSRichGroup", "(", ...
Read a &lt;phase&gt; element @param ePhase The source micro element. Never <code>null</code>. @return The created domain object. May not be <code>null</code>.
[ "Read", "a", "&lt", ";", "phase&gt", ";", "element" ]
7475956eed408fb42face4b84684f8d751db0e43
https://github.com/phax/ph-schematron/blob/7475956eed408fb42face4b84684f8d751db0e43/ph-schematron/src/main/java/com/helger/schematron/pure/exchange/PSReader.java#L848-L887
valid
Read the PHASE element from the XML.
Of course, here is the Java code you requested: ```java @Nonnull public PSPhase readPhaseFromXML (@Nonnull final IMicroElement ePhase) { final PSPhase ret = new PSPhase (); final PSRichGroup aRichGroup = new PSRichGroup (); ePhase.forAllAttributes ( (sNS, sAttrName, sVal) -> { final String sAttr...
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.auth_createToken
public String auth_createToken() throws FacebookException, IOException { T d = this.callMethod(FacebookMethod.AUTH_CREATE_TOKEN); return extractString(d); }
java
public String auth_createToken() throws FacebookException, IOException { T d = this.callMethod(FacebookMethod.AUTH_CREATE_TOKEN); return extractString(d); }
[ "public", "String", "auth_createToken", "(", ")", "throws", "FacebookException", ",", "IOException", "{", "T", "d", "=", "this", ".", "callMethod", "(", "FacebookMethod", ".", "AUTH_CREATE_TOKEN", ")", ";", "return", "extractString", "(", "d", ")", ";", "}" ]
Call this function and store the result, using it to generate the appropriate login url and then to retrieve the session information. @return an authentication token
[ "Call", "this", "function", "and", "store", "the", "result", "using", "it", "to", "generate", "the", "appropriate", "login", "url", "and", "then", "to", "retrieve", "the", "session", "information", "." ]
fd7011d2803ab1d205b140768a760c8c69e0c997
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1907-L1911
train
Create a new token in the Facebook server.
Of course, here is the Java code you requested: ```java public String auth_createToken() throws FacebookException, IOException { T d = this.callMethod(FacebookMethod.AUTH_CREATE_TOKEN); return extractString(d); } ``` Hope this helps!
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
FSDataset.updateBlock
public void updateBlock(int namespaceId, Block oldblock, Block newblock) throws IOException { if (oldblock.getBlockId() != newblock.getBlockId()) { throw new IOException("Cannot update oldblock (=" + oldblock + ") to newblock (=" + newblock + ")."); } // Protect against a straggler updatebl...
java
public void updateBlock(int namespaceId, Block oldblock, Block newblock) throws IOException { if (oldblock.getBlockId() != newblock.getBlockId()) { throw new IOException("Cannot update oldblock (=" + oldblock + ") to newblock (=" + newblock + ")."); } // Protect against a straggler updatebl...
[ "public", "void", "updateBlock", "(", "int", "namespaceId", ",", "Block", "oldblock", ",", "Block", "newblock", ")", "throws", "IOException", "{", "if", "(", "oldblock", ".", "getBlockId", "(", ")", "!=", "newblock", ".", "getBlockId", "(", ")", ")", "{", ...
{@inheritDoc}
[ "{" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java#L1858-L1890
train
Update a block in the namespace.
Of course, here is the Java code you requested: ```java public void updateBlock(int namespaceId, Block oldblock, Block newblock) throws IOException { if (oldblock.getBlockId() != newblock.getBlockId()) { throw new IOException("Cannot update oldblock (=" + oldblock + ") to newblock (=" + newblock + ...
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/metadata/RepositoryTags.java
RepositoryTags.getOpeningTagById
public String getOpeningTagById(int elementId, String attributes) { return "<" + table.getKeyByValue(new Integer(elementId)) + " " + attributes + ">"; }
java
public String getOpeningTagById(int elementId, String attributes) { return "<" + table.getKeyByValue(new Integer(elementId)) + " " + attributes + ">"; }
[ "public", "String", "getOpeningTagById", "(", "int", "elementId", ",", "String", "attributes", ")", "{", "return", "\"<\"", "+", "table", ".", "getKeyByValue", "(", "new", "Integer", "(", "elementId", ")", ")", "+", "\" \"", "+", "attributes", "+", "\">\"", ...
returns the opening xml-tag associated with the repository element with id <code>elementId</code>. @return the resulting tag
[ "returns", "the", "opening", "xml", "-", "tag", "associated", "with", "the", "repository", "element", "with", "id", "<code", ">", "elementId<", "/", "code", ">", "." ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java#L231-L234
train
Gets the opening tag by element id and attributes.
Of course, here is the Java code you requested: ```java public String getOpeningTagById(int elementId, String attributes) { return "<" + table.getKeyByValue(new Integer(elementId)) + " " + attributes + ">"; } ``` Hope this helps!
jcodec/jcodec
src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java
SBR.sbr_single_channel_element
private int sbr_single_channel_element(IBitStream ld) throws AACException { int result; if(ld.readBool()) { ld.readBits(4); //reserved } if((result = sbr_grid(ld, 0))>0) return result; sbr_dtdf(ld, 0); invf_mode(ld, 0); sbr_envelope(ld, 0); sbr_noise(ld, 0); NoiseEnvelope.dequantChannel(this...
java
private int sbr_single_channel_element(IBitStream ld) throws AACException { int result; if(ld.readBool()) { ld.readBits(4); //reserved } if((result = sbr_grid(ld, 0))>0) return result; sbr_dtdf(ld, 0); invf_mode(ld, 0); sbr_envelope(ld, 0); sbr_noise(ld, 0); NoiseEnvelope.dequantChannel(this...
[ "private", "int", "sbr_single_channel_element", "(", "IBitStream", "ld", ")", "throws", "AACException", "{", "int", "result", ";", "if", "(", "ld", ".", "readBool", "(", ")", ")", "{", "ld", ".", "readBits", "(", "4", ")", ";", "//reserved", "}", "if", ...
/* table 5
[ "/", "*", "table", "5" ]
cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75
https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java#L571-L640
test
SBR Single Channel Element
Of course, here is the Java code you requested: ```java private int sbr_single_channel_element(IBitStream ld) throws AACException { int result; if(ld.readBool()) { ld.readBits(4); //reserved } if((result = sbr_grid(ld, 0))>0) return result; sbr_dtdf(ld, 0); invf_mode(ld, 0); sbr_envelope(ld, 0);...
rapidoid/rapidoid
rapidoid-rest/src/main/java/org/rapidoid/setup/OnRoute.java
OnRoute.mvc
public void mvc(String response) { HttpHandlers.registerPredefined(setup, verb, path, mvcOpts(), response); }
java
public void mvc(String response) { HttpHandlers.registerPredefined(setup, verb, path, mvcOpts(), response); }
[ "public", "void", "mvc", "(", "String", "response", ")", "{", "HttpHandlers", ".", "registerPredefined", "(", "setup", ",", "verb", ",", "path", ",", "mvcOpts", "(", ")", ",", "response", ")", ";", "}" ]
/* MVC
[ "/", "*", "MVC" ]
1775344bcf4abbee289d474b34d553ff6bc821b0
https://github.com/rapidoid/rapidoid/blob/1775344bcf4abbee289d474b34d553ff6bc821b0/rapidoid-rest/src/main/java/org/rapidoid/setup/OnRoute.java#L339-L341
train
Register a MVC response handler.
Of course, here is the Java code you requested: ```java public void mvc(String response) { HttpHandlers.registerPredefined(setup, verb, path, mvcOpts(), response); } ``` Hope this helps!
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/PropagateTransform.java
PropagateTransform._propagateMetricTransform
private void _propagateMetricTransform(Metric metric, long windowSizeInSeconds, QueryContext queryContext) { // if the datapoint set is empty or has a single datapoint, return directly if(metric.getDatapoints().isEmpty() || metric.getDatapoints().size() == 1) { return; } Long[] startAn...
java
private void _propagateMetricTransform(Metric metric, long windowSizeInSeconds, QueryContext queryContext) { // if the datapoint set is empty or has a single datapoint, return directly if(metric.getDatapoints().isEmpty() || metric.getDatapoints().size() == 1) { return; } Long[] startAn...
[ "private", "void", "_propagateMetricTransform", "(", "Metric", "metric", ",", "long", "windowSizeInSeconds", ",", "QueryContext", "queryContext", ")", "{", "// if the datapoint set is empty or has a single datapoint, return directly", "if", "(", "metric", ".", "getDatapoints", ...
~ Methods **************************************************************************************************************************************
[ "~", "Methods", "**************************************************************************************************************************************" ]
121b59a268da264316cded6a3e9271366a23cd86
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/PropagateTransform.java#L55-L107
train
propagate metric transform.
Of course, here is the Java code you requested: ```java private void _propagateMetricTransform(Metric metric, long windowSizeInSeconds, QueryContext queryContext) { // if the datapoint set is empty or has a single datapoint, return directly if(metric.getDatapoints().isEmpty() || metric.getDatapoints()....
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/container/impl/metadata/BpmPlatformXmlParse.java
BpmPlatformXmlParse.parseRootElement
protected void parseRootElement() { JobExecutorXmlImpl jobExecutor = new JobExecutorXmlImpl(); List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>(); for (Element element : rootElement.elements()) { if(JOB_EXECUTOR.equals(element.getTagName())) { parseJobExecutor(element...
java
protected void parseRootElement() { JobExecutorXmlImpl jobExecutor = new JobExecutorXmlImpl(); List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>(); for (Element element : rootElement.elements()) { if(JOB_EXECUTOR.equals(element.getTagName())) { parseJobExecutor(element...
[ "protected", "void", "parseRootElement", "(", ")", "{", "JobExecutorXmlImpl", "jobExecutor", "=", "new", "JobExecutorXmlImpl", "(", ")", ";", "List", "<", "ProcessEngineXml", ">", "processEngines", "=", "new", "ArrayList", "<", "ProcessEngineXml", ">", "(", ")", ...
We know this is a <code>&lt;bpm-platform ../&gt;</code> element
[ "We", "know", "this", "is", "a", "<code", ">", "&lt", ";", "bpm", "-", "platform", "..", "/", "&gt", ";", "<", "/", "code", ">", "element" ]
1a464fc887ef3760e53d6f91b9e5b871a0d77cc0
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/container/impl/metadata/BpmPlatformXmlParse.java#L59-L77
train
Parse the root element of the XML file.
Of course, here is the Java code you requested: ```java protected void parseRootElement() { JobExecutorXmlImpl jobExecutor = new JobExecutorXmlImpl(); List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>(); for (Element element : rootElement.elements()) { if(JOB_EXECUTOR.equals(...