repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
banq/jdonframework
src/main/java/com/jdon/container/visitor/http/HttpSessionVisitorFactoryImp.java
HttpSessionVisitorFactoryImp.createtVisitor
public ComponentVisitor createtVisitor(SessionWrapper session, TargetMetaDef targetMetaDef) { """ return a ComponentVisitor with cache. the httpSession is used for optimizing the component performance @param request @param targetMetaDef @return """ if (session != null) return createtSessionVisitor...
java
public ComponentVisitor createtVisitor(SessionWrapper session, TargetMetaDef targetMetaDef) { if (session != null) return createtSessionVisitor(session, targetMetaDef); else return new NoSessionProxyComponentVisitor(componentVisitor, targetMetaRequestsHolder); }
[ "public", "ComponentVisitor", "createtVisitor", "(", "SessionWrapper", "session", ",", "TargetMetaDef", "targetMetaDef", ")", "{", "if", "(", "session", "!=", "null", ")", "return", "createtSessionVisitor", "(", "session", ",", "targetMetaDef", ")", ";", "else", "...
return a ComponentVisitor with cache. the httpSession is used for optimizing the component performance @param request @param targetMetaDef @return
[ "return", "a", "ComponentVisitor", "with", "cache", ".", "the", "httpSession", "is", "used", "for", "optimizing", "the", "component", "performance" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/visitor/http/HttpSessionVisitorFactoryImp.java#L53-L59
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SessionUtilExternalBrowser.java
SessionUtilExternalBrowser.getSSOUrl
private String getSSOUrl(int port) throws SFException, SnowflakeSQLException { """ Gets SSO URL and proof key @return SSO URL. @throws SFException if Snowflake error occurs @throws SnowflakeSQLException if Snowflake SQL error occurs """ try { String serverUrl = loginInput.getServer...
java
private String getSSOUrl(int port) throws SFException, SnowflakeSQLException { try { String serverUrl = loginInput.getServerUrl(); String authenticator = loginInput.getAuthenticator(); URIBuilder fedUriBuilder = new URIBuilder(serverUrl); fedUriBuilder.setPath(SessionUtil.SF_PATH_AUTH...
[ "private", "String", "getSSOUrl", "(", "int", "port", ")", "throws", "SFException", ",", "SnowflakeSQLException", "{", "try", "{", "String", "serverUrl", "=", "loginInput", ".", "getServerUrl", "(", ")", ";", "String", "authenticator", "=", "loginInput", ".", ...
Gets SSO URL and proof key @return SSO URL. @throws SFException if Snowflake error occurs @throws SnowflakeSQLException if Snowflake SQL error occurs
[ "Gets", "SSO", "URL", "and", "proof", "key" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SessionUtilExternalBrowser.java#L188-L254
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java
PiContactDetectionDescriptor.isANeighboorsInAnAtomContainer
private boolean isANeighboorsInAnAtomContainer(List<IAtom> neighs, IAtomContainer ac) { """ Gets if neighbours of an atom are in an atom container. @param neighs array of atoms @param ac AtomContainer @return The boolean result """ boolean isIn = false; int count = 0; ...
java
private boolean isANeighboorsInAnAtomContainer(List<IAtom> neighs, IAtomContainer ac) { boolean isIn = false; int count = 0; for (IAtom neigh : neighs) { if (ac.contains(neigh)) { count += 1; } } if (count > 0) { isIn = true; ...
[ "private", "boolean", "isANeighboorsInAnAtomContainer", "(", "List", "<", "IAtom", ">", "neighs", ",", "IAtomContainer", "ac", ")", "{", "boolean", "isIn", "=", "false", ";", "int", "count", "=", "0", ";", "for", "(", "IAtom", "neigh", ":", "neighs", ")", ...
Gets if neighbours of an atom are in an atom container. @param neighs array of atoms @param ac AtomContainer @return The boolean result
[ "Gets", "if", "neighbours", "of", "an", "atom", "are", "in", "an", "atom", "container", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/atompair/PiContactDetectionDescriptor.java#L202-L214
getsentry/sentry-java
sentry/src/main/java/io/sentry/event/interfaces/SentryException.java
SentryException.extractExceptionQueue
public static Deque<SentryException> extractExceptionQueue(Throwable throwable) { """ Transforms a {@link Throwable} into a Queue of {@link SentryException}. <p> Exceptions are stored in the queue from the most recent one to the oldest one. @param throwable throwable to transform in a queue of exceptions. @r...
java
public static Deque<SentryException> extractExceptionQueue(Throwable throwable) { Deque<SentryException> exceptions = new ArrayDeque<>(); Set<Throwable> circularityDetector = new HashSet<>(); StackTraceElement[] childExceptionStackTrace = new StackTraceElement[0]; //Stack the exceptions...
[ "public", "static", "Deque", "<", "SentryException", ">", "extractExceptionQueue", "(", "Throwable", "throwable", ")", "{", "Deque", "<", "SentryException", ">", "exceptions", "=", "new", "ArrayDeque", "<>", "(", ")", ";", "Set", "<", "Throwable", ">", "circul...
Transforms a {@link Throwable} into a Queue of {@link SentryException}. <p> Exceptions are stored in the queue from the most recent one to the oldest one. @param throwable throwable to transform in a queue of exceptions. @return a queue of exception with StackTrace.
[ "Transforms", "a", "{", "@link", "Throwable", "}", "into", "a", "Queue", "of", "{", "@link", "SentryException", "}", ".", "<p", ">", "Exceptions", "are", "stored", "in", "the", "queue", "from", "the", "most", "recent", "one", "to", "the", "oldest", "one"...
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/event/interfaces/SentryException.java#L70-L83
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.sendSticker
@ObjectiveCName("sendStickerWithPeer:withSticker:") public void sendSticker(Peer peer, Sticker sticker) { """ Send document without preview @param peer destination peer @param sticker sticker to send """ modules.getMessagesModule().sendSticker(peer, sticker); }
java
@ObjectiveCName("sendStickerWithPeer:withSticker:") public void sendSticker(Peer peer, Sticker sticker) { modules.getMessagesModule().sendSticker(peer, sticker); }
[ "@", "ObjectiveCName", "(", "\"sendStickerWithPeer:withSticker:\"", ")", "public", "void", "sendSticker", "(", "Peer", "peer", ",", "Sticker", "sticker", ")", "{", "modules", ".", "getMessagesModule", "(", ")", ".", "sendSticker", "(", "peer", ",", "sticker", ")...
Send document without preview @param peer destination peer @param sticker sticker to send
[ "Send", "document", "without", "preview" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L1004-L1007
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/Router.java
Router.findControllerNamePart
protected static String findControllerNamePart(String pack, String uri) { """ Now that we know that this controller is under a package, need to find the controller short name. @param pack part of the package of the controller, taken from URI: value between "app.controllers" and controller name. @param uri uri...
java
protected static String findControllerNamePart(String pack, String uri) { String temp = uri.startsWith("/") ? uri.substring(1) : uri; temp = temp.replace("/", "."); if (temp.length() > pack.length()) temp = temp.substring(pack.length() + 1); if (temp.equals("") ) ...
[ "protected", "static", "String", "findControllerNamePart", "(", "String", "pack", ",", "String", "uri", ")", "{", "String", "temp", "=", "uri", ".", "startsWith", "(", "\"/\"", ")", "?", "uri", ".", "substring", "(", "1", ")", ":", "uri", ";", "temp", ...
Now that we know that this controller is under a package, need to find the controller short name. @param pack part of the package of the controller, taken from URI: value between "app.controllers" and controller name. @param uri uri from request @return controller name
[ "Now", "that", "we", "know", "that", "this", "controller", "is", "under", "a", "package", "need", "to", "find", "the", "controller", "short", "name", "." ]
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/Router.java#L388-L398
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/crypto/Crypto.java
Crypto.getPublicKeyFromString
public PublicKey getPublicKeyFromString(String key) throws MangooEncryptionException { """ Generates Public Key from Base64 encoded string @param key Base64 encoded string which represents the key @return The PublicKey @throws MangooEncryptionException if getting public key from string fails """ ...
java
public PublicKey getPublicKeyFromString(String key) throws MangooEncryptionException { Objects.requireNonNull(key, Required.KEY.toString()); try { return KeyFactory.getInstance(ALGORITHM).generatePublic(new X509EncodedKeySpec(decodeBase64(key))); } catch (InvalidKeySpecExcep...
[ "public", "PublicKey", "getPublicKeyFromString", "(", "String", "key", ")", "throws", "MangooEncryptionException", "{", "Objects", ".", "requireNonNull", "(", "key", ",", "Required", ".", "KEY", ".", "toString", "(", ")", ")", ";", "try", "{", "return", "KeyFa...
Generates Public Key from Base64 encoded string @param key Base64 encoded string which represents the key @return The PublicKey @throws MangooEncryptionException if getting public key from string fails
[ "Generates", "Public", "Key", "from", "Base64", "encoded", "string" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/crypto/Crypto.java#L311-L319
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java
ProxyHandler.isForbidden
protected boolean isForbidden(URI uri) { """ Is URL Forbidden. @return True if the URL is not forbidden. Calls isForbidden(scheme,host,port,true); """ String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return isForbidden(scheme, host, port...
java
protected boolean isForbidden(URI uri) { String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return isForbidden(scheme, host, port, true); }
[ "protected", "boolean", "isForbidden", "(", "URI", "uri", ")", "{", "String", "scheme", "=", "uri", ".", "getScheme", "(", ")", ";", "String", "host", "=", "uri", ".", "getHost", "(", ")", ";", "int", "port", "=", "uri", ".", "getPort", "(", ")", "...
Is URL Forbidden. @return True if the URL is not forbidden. Calls isForbidden(scheme,host,port,true);
[ "Is", "URL", "Forbidden", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java#L568-L574
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/Screen.java
Screen.setSelectQuery
public boolean setSelectQuery(Rec recMaint, boolean bUpdateOnSelect) { """ Find the sub-screen that uses this grid query and set for selection. When you select a new record here, you read the same record in the SelectQuery. @param recMaint The record which is synced on record change. @param bUpdateOnSelect Do I...
java
public boolean setSelectQuery(Rec recMaint, boolean bUpdateOnSelect) { if (recMaint == null) { return true; // BaseTable Set! } if (this.getMainRecord() != null) if (this.getMainRecord() != recMaint) if (this.getMainRecord().getBaseRecord()....
[ "public", "boolean", "setSelectQuery", "(", "Rec", "recMaint", ",", "boolean", "bUpdateOnSelect", ")", "{", "if", "(", "recMaint", "==", "null", ")", "{", "return", "true", ";", "// BaseTable Set!", "}", "if", "(", "this", ".", "getMainRecord", "(", ")", "...
Find the sub-screen that uses this grid query and set for selection. When you select a new record here, you read the same record in the SelectQuery. @param recMaint The record which is synced on record change. @param bUpdateOnSelect Do I update the current record if a selection occurs. @return True if successful.
[ "Find", "the", "sub", "-", "screen", "that", "uses", "this", "grid", "query", "and", "set", "for", "selection", ".", "When", "you", "select", "a", "new", "record", "here", "you", "read", "the", "same", "record", "in", "the", "SelectQuery", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/Screen.java#L257-L271
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java
MessageAction.clearFiles
@CheckReturnValue public MessageAction clearFiles(BiConsumer<String, InputStream> finalizer) { """ Clears all previously added files @param finalizer BiConsumer useful to <b>close</b> remaining resources, the consumer will receive the name as a string parameter and the resource as {@code InputStream}. ...
java
@CheckReturnValue public MessageAction clearFiles(BiConsumer<String, InputStream> finalizer) { Checks.notNull(finalizer, "Finalizer"); for (Iterator<Map.Entry<String, InputStream>> it = files.entrySet().iterator(); it.hasNext();) { Map.Entry<String, InputStream> entry = it.ne...
[ "@", "CheckReturnValue", "public", "MessageAction", "clearFiles", "(", "BiConsumer", "<", "String", ",", "InputStream", ">", "finalizer", ")", "{", "Checks", ".", "notNull", "(", "finalizer", ",", "\"Finalizer\"", ")", ";", "for", "(", "Iterator", "<", "Map", ...
Clears all previously added files @param finalizer BiConsumer useful to <b>close</b> remaining resources, the consumer will receive the name as a string parameter and the resource as {@code InputStream}. @return Updated MessageAction for chaining convenience @see java.io.Closeable
[ "Clears", "all", "previously", "added", "files" ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/MessageAction.java#L516-L528
andrehertwig/admintool
admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java
AdminToolMenuUtils.isActiveInMenuTree
public boolean isActiveInMenuTree(MenuEntry activeMenu, MenuEntry actualEntry) { """ checks if actualEntry contains the activeMenuName in entry itself and its sub entries @param activeMenuName @param actualEntry current iterated object @return """ return actualEntry.flattened().anyMatch( entry -> c...
java
public boolean isActiveInMenuTree(MenuEntry activeMenu, MenuEntry actualEntry) { return actualEntry.flattened().anyMatch( entry -> checkForNull(entry, activeMenu) ? entry.getName().equals(activeMenu.getName()): false); }
[ "public", "boolean", "isActiveInMenuTree", "(", "MenuEntry", "activeMenu", ",", "MenuEntry", "actualEntry", ")", "{", "return", "actualEntry", ".", "flattened", "(", ")", ".", "anyMatch", "(", "entry", "->", "checkForNull", "(", "entry", ",", "activeMenu", ")", ...
checks if actualEntry contains the activeMenuName in entry itself and its sub entries @param activeMenuName @param actualEntry current iterated object @return
[ "checks", "if", "actualEntry", "contains", "the", "activeMenuName", "in", "entry", "itself", "and", "its", "sub", "entries" ]
train
https://github.com/andrehertwig/admintool/blob/6d391e2d26969b70e3ccabfc34202abe8d915080/admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java#L119-L122
wildfly/wildfly-core
logging/src/main/java/org/jboss/as/logging/LoggingOperations.java
LoggingOperations.addCommitStep
static void addCommitStep(final OperationContext context, final ConfigurationPersistence configurationPersistence) { """ Adds a {@link Stage#RUNTIME runtime} step to the context that will commit or rollback any logging changes. Also if not a logging profile writes the {@code logging.properties} file. <p> Note t...
java
static void addCommitStep(final OperationContext context, final ConfigurationPersistence configurationPersistence) { // This should only check that it's a server for the commit step. The logging.properties may need to be written // in ADMIN_ONLY mode if (context.getProcessType().isServer()) { ...
[ "static", "void", "addCommitStep", "(", "final", "OperationContext", "context", ",", "final", "ConfigurationPersistence", "configurationPersistence", ")", "{", "// This should only check that it's a server for the commit step. The logging.properties may need to be written", "// in ADMIN_...
Adds a {@link Stage#RUNTIME runtime} step to the context that will commit or rollback any logging changes. Also if not a logging profile writes the {@code logging.properties} file. <p> Note the commit step will only be added if process type is a {@linkplain org.jboss.as.controller.ProcessType#isServer() server}. </p> ...
[ "Adds", "a", "{", "@link", "Stage#RUNTIME", "runtime", "}", "step", "to", "the", "context", "that", "will", "commit", "or", "rollback", "any", "logging", "changes", ".", "Also", "if", "not", "a", "logging", "profile", "writes", "the", "{", "@code", "loggin...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/logging/src/main/java/org/jboss/as/logging/LoggingOperations.java#L62-L68
JodaOrg/joda-time
src/main/java/org/joda/time/DateTime.java
DateTime.withDurationAdded
public DateTime withDurationAdded(ReadableDuration durationToAdd, int scalar) { """ Returns a copy of this datetime with the specified duration added. <p> If the addition is zero, then <code>this</code> is returned. @param durationToAdd the duration to add to this one, null means zero @param scalar the amo...
java
public DateTime withDurationAdded(ReadableDuration durationToAdd, int scalar) { if (durationToAdd == null || scalar == 0) { return this; } return withDurationAdded(durationToAdd.getMillis(), scalar); }
[ "public", "DateTime", "withDurationAdded", "(", "ReadableDuration", "durationToAdd", ",", "int", "scalar", ")", "{", "if", "(", "durationToAdd", "==", "null", "||", "scalar", "==", "0", ")", "{", "return", "this", ";", "}", "return", "withDurationAdded", "(", ...
Returns a copy of this datetime with the specified duration added. <p> If the addition is zero, then <code>this</code> is returned. @param durationToAdd the duration to add to this one, null means zero @param scalar the amount of times to add, such as -1 to subtract once @return a copy of this datetime with the dura...
[ "Returns", "a", "copy", "of", "this", "datetime", "with", "the", "specified", "duration", "added", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTime.java#L915-L920
venmo/cursor-utils
cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java
IterableCursorWrapper.getShort
public short getShort(String columnName, short defaultValue) { """ Convenience alias to {@code getShort\(getColumnIndex(columnName))}. If the column does not exist for the cursor, return {@code defaultValue}. """ int index = getColumnIndex(columnName); if (isValidIndex(index)) { re...
java
public short getShort(String columnName, short defaultValue) { int index = getColumnIndex(columnName); if (isValidIndex(index)) { return getShort(index); } else { return defaultValue; } }
[ "public", "short", "getShort", "(", "String", "columnName", ",", "short", "defaultValue", ")", "{", "int", "index", "=", "getColumnIndex", "(", "columnName", ")", ";", "if", "(", "isValidIndex", "(", "index", ")", ")", "{", "return", "getShort", "(", "inde...
Convenience alias to {@code getShort\(getColumnIndex(columnName))}. If the column does not exist for the cursor, return {@code defaultValue}.
[ "Convenience", "alias", "to", "{" ]
train
https://github.com/venmo/cursor-utils/blob/52cf91c4253346632fe70b8d7b7eab8bbcc9b248/cursor-utils/src/main/java/com/venmo/cursor/IterableCursorWrapper.java#L190-L197
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/DTDNotationAttr.java
DTDNotationAttr.validateDefault
@Override public void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException { """ Method called by the validator to ask attribute to verify that the default it has (if any) is valid for such type. """ // First, basic checks that it's a valid non-empty name...
java
@Override public void validateDefault(InputProblemReporter rep, boolean normalize) throws XMLStreamException { // First, basic checks that it's a valid non-empty name: String def = validateDefaultName(rep, normalize); // And then that it's one of listed values: String sh...
[ "@", "Override", "public", "void", "validateDefault", "(", "InputProblemReporter", "rep", ",", "boolean", "normalize", ")", "throws", "XMLStreamException", "{", "// First, basic checks that it's a valid non-empty name:", "String", "def", "=", "validateDefaultName", "(", "re...
Method called by the validator to ask attribute to verify that the default it has (if any) is valid for such type.
[ "Method", "called", "by", "the", "validator", "to", "ask", "attribute", "to", "verify", "that", "the", "default", "it", "has", "(", "if", "any", ")", "is", "valid", "for", "such", "type", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/DTDNotationAttr.java#L86-L104
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/DateUtils.java
DateUtils.parseDate
public static Date parseDate(String str, Locale locale, String... parsePatterns) throws ParseException { """ <p>Parses a string representing a date by trying a variety of different parsers, using the default date format symbols for the given locale.</p> <p/> <p>The parse will try each parse pattern in turn. A ...
java
public static Date parseDate(String str, Locale locale, String... parsePatterns) throws ParseException { return parseDateWithLeniency(str, locale, parsePatterns, true); }
[ "public", "static", "Date", "parseDate", "(", "String", "str", ",", "Locale", "locale", ",", "String", "...", "parsePatterns", ")", "throws", "ParseException", "{", "return", "parseDateWithLeniency", "(", "str", ",", "locale", ",", "parsePatterns", ",", "true", ...
<p>Parses a string representing a date by trying a variety of different parsers, using the default date format symbols for the given locale.</p> <p/> <p>The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string. If no parse patterns match, a ParseExcepti...
[ "<p", ">", "Parses", "a", "string", "representing", "a", "date", "by", "trying", "a", "variety", "of", "different", "parsers", "using", "the", "default", "date", "format", "symbols", "for", "the", "given", "locale", ".", "<", "/", "p", ">", "<p", "/", ...
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/DateUtils.java#L73-L75
hector-client/hector
object-mapper/src/main/java/me/prettyprint/hom/EntityManagerImpl.java
EntityManagerImpl.find
@Override public <T> T find(Class<T> clazz, Object id) { """ Load an entity instance. If the ID does not map to a persisted entity, then null is returned. @param <T> The type of entity to load for compile time type checking @param clazz The type of entity to load for runtime instance creation @param id ...
java
@Override public <T> T find(Class<T> clazz, Object id) { if (null == clazz) { throw new IllegalArgumentException("clazz cannot be null"); } if (null == id) { throw new IllegalArgumentException("id cannot be null"); } CFMappingDef<T> cfMapDef = cacheMgr.getCfMapDef(clazz, false); i...
[ "@", "Override", "public", "<", "T", ">", "T", "find", "(", "Class", "<", "T", ">", "clazz", ",", "Object", "id", ")", "{", "if", "(", "null", "==", "clazz", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"clazz cannot be null\"", ")", ";...
Load an entity instance. If the ID does not map to a persisted entity, then null is returned. @param <T> The type of entity to load for compile time type checking @param clazz The type of entity to load for runtime instance creation @param id ID of the instance to load @return instance of Entity or null if can't ...
[ "Load", "an", "entity", "instance", ".", "If", "the", "ID", "does", "not", "map", "to", "a", "persisted", "entity", "then", "null", "is", "returned", "." ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/object-mapper/src/main/java/me/prettyprint/hom/EntityManagerImpl.java#L147-L163
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java
Parse.cloneRoot
public Parse cloneRoot(final Parse node, final int parseIndex) { """ Clones the right frontier of this root parse up to and including the specified node. @param node The last node in the right frontier of the parse tree which should be cloned. @param parseIndex The child index of the parse for this root no...
java
public Parse cloneRoot(final Parse node, final int parseIndex) { final Parse c = (Parse) this.clone(); final Parse fc = c.parts.get(parseIndex); c.parts.set(parseIndex, fc.clone(node)); return c; }
[ "public", "Parse", "cloneRoot", "(", "final", "Parse", "node", ",", "final", "int", "parseIndex", ")", "{", "final", "Parse", "c", "=", "(", "Parse", ")", "this", ".", "clone", "(", ")", ";", "final", "Parse", "fc", "=", "c", ".", "parts", ".", "ge...
Clones the right frontier of this root parse up to and including the specified node. @param node The last node in the right frontier of the parse tree which should be cloned. @param parseIndex The child index of the parse for this root node. @return A clone of this root parse and its right frontier up to and including...
[ "Clones", "the", "right", "frontier", "of", "this", "root", "parse", "up", "to", "and", "including", "the", "specified", "node", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L236-L241
denisneuling/apitrary.jar
apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/unmarshalling/JsonResponseConsumer.java
JsonResponseConsumer.onString
protected void onString(String text, String fieldName, JsonParser jp) { """ <p> onString. </p> @param text a {@link java.lang.String} object. @param fieldName a {@link java.lang.String} object. @param jp a {@link org.codehaus.jackson.JsonParser} object. """ log.trace(fieldName + " " + text); }
java
protected void onString(String text, String fieldName, JsonParser jp) { log.trace(fieldName + " " + text); }
[ "protected", "void", "onString", "(", "String", "text", ",", "String", "fieldName", ",", "JsonParser", "jp", ")", "{", "log", ".", "trace", "(", "fieldName", "+", "\" \"", "+", "text", ")", ";", "}" ]
<p> onString. </p> @param text a {@link java.lang.String} object. @param fieldName a {@link java.lang.String} object. @param jp a {@link org.codehaus.jackson.JsonParser} object.
[ "<p", ">", "onString", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/apitrary.jar/blob/b7f639a1e735c60ba2b1b62851926757f5de8628/apitrary-orm/apitrary-orm-core/src/main/java/com/apitrary/orm/core/unmarshalling/JsonResponseConsumer.java#L266-L268
f2prateek/dart
henson/src/main/java/dart/henson/Bundler.java
Bundler.put
public Bundler put(String key, Bundle value) { """ Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return this bundler instance to chain metho...
java
public Bundler put(String key, Bundle value) { delegate.putBundle(key, value); return this; }
[ "public", "Bundler", "put", "(", "String", "key", ",", "Bundle", "value", ")", "{", "delegate", ".", "putBundle", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Bundle object, or null @return this bundler instance to chain method calls
[ "Inserts", "a", "Bundle", "value", "into", "the", "mapping", "of", "the", "underlying", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/f2prateek/dart/blob/7163b1b148e5141817975ae7dad99d58a8589aeb/henson/src/main/java/dart/henson/Bundler.java#L127-L130
eclipse/hawkbit
hawkbit-security-integration/src/main/java/org/eclipse/hawkbit/security/ControllerPreAuthenticatedSecurityHeaderFilter.java
ControllerPreAuthenticatedSecurityHeaderFilter.getIssuerHashHeader
private String getIssuerHashHeader(final DmfTenantSecurityToken secruityToken, final String knownIssuerHashes) { """ Iterates over the {@link #sslIssuerHashBasicHeader} basic header {@code X-Ssl-Issuer-Hash-%d} and try to finds the same hash as known. It's ok if we find the the hash in any the trusted CA chain t...
java
private String getIssuerHashHeader(final DmfTenantSecurityToken secruityToken, final String knownIssuerHashes) { // there may be several knownIssuerHashes configured for the tenant final List<String> knownHashes = splitMultiHashBySemicolon(knownIssuerHashes); // iterate over the headers until w...
[ "private", "String", "getIssuerHashHeader", "(", "final", "DmfTenantSecurityToken", "secruityToken", ",", "final", "String", "knownIssuerHashes", ")", "{", "// there may be several knownIssuerHashes configured for the tenant", "final", "List", "<", "String", ">", "knownHashes",...
Iterates over the {@link #sslIssuerHashBasicHeader} basic header {@code X-Ssl-Issuer-Hash-%d} and try to finds the same hash as known. It's ok if we find the the hash in any the trusted CA chain to accept this request for this tenant.
[ "Iterates", "over", "the", "{" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-integration/src/main/java/org/eclipse/hawkbit/security/ControllerPreAuthenticatedSecurityHeaderFilter.java#L123-L143
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectSphereSphere
public static boolean intersectSphereSphere(Vector3fc centerA, float radiusSquaredA, Vector3fc centerB, float radiusSquaredB, Vector4f centerAndRadiusOfIntersectionCircle) { """ Test whether the one sphere with center <code>centerA</code> and square radius <code>radiusSquaredA</code> intersects the other sphere w...
java
public static boolean intersectSphereSphere(Vector3fc centerA, float radiusSquaredA, Vector3fc centerB, float radiusSquaredB, Vector4f centerAndRadiusOfIntersectionCircle) { return intersectSphereSphere(centerA.x(), centerA.y(), centerA.z(), radiusSquaredA, centerB.x(), centerB.y(), centerB.z(), radiusSquaredB,...
[ "public", "static", "boolean", "intersectSphereSphere", "(", "Vector3fc", "centerA", ",", "float", "radiusSquaredA", ",", "Vector3fc", "centerB", ",", "float", "radiusSquaredB", ",", "Vector4f", "centerAndRadiusOfIntersectionCircle", ")", "{", "return", "intersectSphereSp...
Test whether the one sphere with center <code>centerA</code> and square radius <code>radiusSquaredA</code> intersects the other sphere with center <code>centerB</code> and square radius <code>radiusSquaredB</code>, and store the center of the circle of intersection in the <code>(x, y, z)</code> components of the suppli...
[ "Test", "whether", "the", "one", "sphere", "with", "center", "<code", ">", "centerA<", "/", "code", ">", "and", "square", "radius", "<code", ">", "radiusSquaredA<", "/", "code", ">", "intersects", "the", "other", "sphere", "with", "center", "<code", ">", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L805-L807
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java
JDBC4CallableStatement.setSQLXML
@Override public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { """ Sets the designated parameter to the given java.sql.SQLXML object. """ checkClosed(); throw SQLError.noSupport(); }
java
@Override public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setSQLXML", "(", "String", "parameterName", ",", "SQLXML", "xmlObject", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.sql.SQLXML object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "SQLXML", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java#L871-L876
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BeanPropertyName.java
BeanPropertyName.toDashedForm
public static String toDashedForm(String name, int start) { """ Return the specified Java Bean property name in dashed form. @param name the source name @param start the starting char @return the dashed from """ StringBuilder result = new StringBuilder(); String replaced = name.replace('_', '-'); for ...
java
public static String toDashedForm(String name, int start) { StringBuilder result = new StringBuilder(); String replaced = name.replace('_', '-'); for (int i = start; i < replaced.length(); i++) { char ch = replaced.charAt(i); if (Character.isUpperCase(ch) && result.length() > 0 && result.charAt(result....
[ "public", "static", "String", "toDashedForm", "(", "String", "name", ",", "int", "start", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "String", "replaced", "=", "name", ".", "replace", "(", "'", "'", ",", "'", "'", ...
Return the specified Java Bean property name in dashed form. @param name the source name @param start the starting char @return the dashed from
[ "Return", "the", "specified", "Java", "Bean", "property", "name", "in", "dashed", "form", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BeanPropertyName.java#L45-L57
andrewoma/dexx
collection/src/main/java/com/github/andrewoma/dexx/collection/Vector.java
VectorPointer.gotoFreshPosWritable1
public void gotoFreshPosWritable1(int oldIndex, int newIndex, int xor) { """ ensures structure is dirty and at pos newIndex and writable at level 0 """ stabilize(oldIndex); gotoFreshPosWritable0(oldIndex, newIndex, xor); }
java
public void gotoFreshPosWritable1(int oldIndex, int newIndex, int xor) { stabilize(oldIndex); gotoFreshPosWritable0(oldIndex, newIndex, xor); }
[ "public", "void", "gotoFreshPosWritable1", "(", "int", "oldIndex", ",", "int", "newIndex", ",", "int", "xor", ")", "{", "stabilize", "(", "oldIndex", ")", ";", "gotoFreshPosWritable0", "(", "oldIndex", ",", "newIndex", ",", "xor", ")", ";", "}" ]
ensures structure is dirty and at pos newIndex and writable at level 0
[ "ensures", "structure", "is", "dirty", "and", "at", "pos", "newIndex", "and", "writable", "at", "level", "0" ]
train
https://github.com/andrewoma/dexx/blob/96755b325e90c84ffa006365dde9ddf89c83c6ca/collection/src/main/java/com/github/andrewoma/dexx/collection/Vector.java#L1071-L1074
alkacon/opencms-core
src/org/opencms/ade/containerpage/inherited/CmsInheritedContainerState.java
CmsInheritedContainerState.computeVisibility
void computeVisibility(List<Boolean> visibilities, CmsInheritanceInfo info) { """ Computes the visibility for an element.<p> @param visibilities the visibilities for the element in the sequence of parent configurations.<p> @param info the object in which the visibility should be stored """ boo...
java
void computeVisibility(List<Boolean> visibilities, CmsInheritanceInfo info) { boolean visible = true; boolean inherited = true; boolean parentVisible = true; for (Boolean visibility : visibilities) { parentVisible = visible; if (visibility == Boolean.TRUE)...
[ "void", "computeVisibility", "(", "List", "<", "Boolean", ">", "visibilities", ",", "CmsInheritanceInfo", "info", ")", "{", "boolean", "visible", "=", "true", ";", "boolean", "inherited", "=", "true", ";", "boolean", "parentVisible", "=", "true", ";", "for", ...
Computes the visibility for an element.<p> @param visibilities the visibilities for the element in the sequence of parent configurations.<p> @param info the object in which the visibility should be stored
[ "Computes", "the", "visibility", "for", "an", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/inherited/CmsInheritedContainerState.java#L262-L282
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.of
public static LongStreamEx of(LongStream stream) { """ Returns a {@code LongStreamEx} object which wraps given {@link LongStream}. <p> The supplied stream must not be consumed or closed when this method is called. No operation must be performed on the supplied stream after it's wrapped. @param stream ori...
java
public static LongStreamEx of(LongStream stream) { return stream instanceof LongStreamEx ? (LongStreamEx) stream : new LongStreamEx(stream, StreamContext.of(stream)); }
[ "public", "static", "LongStreamEx", "of", "(", "LongStream", "stream", ")", "{", "return", "stream", "instanceof", "LongStreamEx", "?", "(", "LongStreamEx", ")", "stream", ":", "new", "LongStreamEx", "(", "stream", ",", "StreamContext", ".", "of", "(", "stream...
Returns a {@code LongStreamEx} object which wraps given {@link LongStream}. <p> The supplied stream must not be consumed or closed when this method is called. No operation must be performed on the supplied stream after it's wrapped. @param stream original stream @return the wrapped stream @since 0.0.8
[ "Returns", "a", "{", "@code", "LongStreamEx", "}", "object", "which", "wraps", "given", "{", "@link", "LongStream", "}", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L1637-L1640
kefirfromperm/kefirbb
src/org/kefirsf/bb/proc/ProcEmail.java
ProcEmail.parseLength
int parseLength(Source source, int offset, ProcPatternElement terminator) { """ Parse URL. The offset must be on a URL element @param source text source @param offset offset for parsing @param terminator a terminator element which can be used to cut some URL parts. Can be null. @return URL length or ...
java
int parseLength(Source source, int offset, ProcPatternElement terminator) { int length = 0; // An authority data like john.smith:pa55W0RD@ int authorityLength = parseAuthority(source, offset + length); if (authorityLength <= 0) { return -1; } length += author...
[ "int", "parseLength", "(", "Source", "source", ",", "int", "offset", ",", "ProcPatternElement", "terminator", ")", "{", "int", "length", "=", "0", ";", "// An authority data like john.smith:pa55W0RD@", "int", "authorityLength", "=", "parseAuthority", "(", "source", ...
Parse URL. The offset must be on a URL element @param source text source @param offset offset for parsing @param terminator a terminator element which can be used to cut some URL parts. Can be null. @return URL length or -1 if it is not a URL.
[ "Parse", "URL", ".", "The", "offset", "must", "be", "on", "a", "URL", "element" ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/proc/ProcEmail.java#L47-L67
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java
FieldDescriptorConstraints.ensureLength
private void ensureLength(FieldDescriptorDef fieldDef, String checkLevel) { """ Constraint that ensures that the field has a length if the jdbc type requires it. @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked in all levels) """ if (!fie...
java
private void ensureLength(FieldDescriptorDef fieldDef, String checkLevel) { if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_LENGTH)) { String defaultLength = JdbcTypeHelper.getDefaultLengthFor(fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE)); if (defa...
[ "private", "void", "ensureLength", "(", "FieldDescriptorDef", "fieldDef", ",", "String", "checkLevel", ")", "{", "if", "(", "!", "fieldDef", ".", "hasProperty", "(", "PropertyHelper", ".", "OJB_PROPERTY_LENGTH", ")", ")", "{", "String", "defaultLength", "=", "Jd...
Constraint that ensures that the field has a length if the jdbc type requires it. @param fieldDef The field descriptor @param checkLevel The current check level (this constraint is checked in all levels)
[ "Constraint", "that", "ensures", "that", "the", "field", "has", "a", "length", "if", "the", "jdbc", "type", "requires", "it", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L240-L255
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.updateAsync
public Observable<AppServiceCertificateOrderInner> updateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { """ Create or update a certificate purchase order. Create or update a certificate purchase order. @param resourceGroupNam...
java
public Observable<AppServiceCertificateOrderInner> updateAsync(String resourceGroupName, String certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) { return updateWithServiceResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).map(new Func1...
[ "public", "Observable", "<", "AppServiceCertificateOrderInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "AppServiceCertificateOrderPatchResource", "certificateDistinguishedName", ")", "{", "return", "updateWithServiceRes...
Create or update a certificate purchase order. Create or update a certificate purchase order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param certificateDistinguishedName Distinguished name to to use for the certificat...
[ "Create", "or", "update", "a", "certificate", "purchase", "order", ".", "Create", "or", "update", "a", "certificate", "purchase", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L893-L900
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.element
public JSONObject element( String key, Collection value ) { """ Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection. @param key A key string. @param value A Collection value. @return this. @throws JSONException """ return element( key, va...
java
public JSONObject element( String key, Collection value ) { return element( key, value, new JsonConfig() ); }
[ "public", "JSONObject", "element", "(", "String", "key", ",", "Collection", "value", ")", "{", "return", "element", "(", "key", ",", "value", ",", "new", "JsonConfig", "(", ")", ")", ";", "}" ]
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection. @param key A key string. @param value A Collection value. @return this. @throws JSONException
[ "Put", "a", "key", "/", "value", "pair", "in", "the", "JSONObject", "where", "the", "value", "will", "be", "a", "JSONArray", "which", "is", "produced", "from", "a", "Collection", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1583-L1585
exoplatform/jcr
applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
BackupClientImpl.getWorkspaceEntry
private WorkspaceEntry getWorkspaceEntry(InputStream wEntryStream, String repositoryName, String workspaceName) throws FileNotFoundException, JiBXException, RepositoryConfigurationException { """ getWorkspaceEntry. @param wEntryStream InputStream, the workspace configuration @param workspaceName ...
java
private WorkspaceEntry getWorkspaceEntry(InputStream wEntryStream, String repositoryName, String workspaceName) throws FileNotFoundException, JiBXException, RepositoryConfigurationException { RepositoryEntry rEntry = getRepositoryEntry(wEntryStream, repositoryName); WorkspaceEntry wsEnt...
[ "private", "WorkspaceEntry", "getWorkspaceEntry", "(", "InputStream", "wEntryStream", ",", "String", "repositoryName", ",", "String", "workspaceName", ")", "throws", "FileNotFoundException", ",", "JiBXException", ",", "RepositoryConfigurationException", "{", "RepositoryEntry"...
getWorkspaceEntry. @param wEntryStream InputStream, the workspace configuration @param workspaceName String, the workspace name @return WorkspaceEntry return the workspace entry @throws FileNotFoundException will be generated the FileNotFoundException @throws JiBXException will be generated the JiBXException @throws R...
[ "getWorkspaceEntry", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java#L1214-L1231
twitter/chill
chill-hadoop/src/main/java/com/twitter/chill/hadoop/Varint.java
Varint.writeUnsignedVarLong
public static void writeUnsignedVarLong(long value, DataOutputStream out) throws IOException { """ Encodes a value using the variable-length encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>. Zig-zag is not used, so input must not be negative. If...
java
public static void writeUnsignedVarLong(long value, DataOutputStream out) throws IOException { while ((value & 0xFFFFFFFFFFFFFF80L) != 0L) { out.writeByte(((int) value & 0x7F) | 0x80); value >>>= 7; } out.writeByte((int) value & 0x7F); }
[ "public", "static", "void", "writeUnsignedVarLong", "(", "long", "value", ",", "DataOutputStream", "out", ")", "throws", "IOException", "{", "while", "(", "(", "value", "&", "0xFFFFFFFFFFFFFF80", "L", ")", "!=", "0L", ")", "{", "out", ".", "writeByte", "(", ...
Encodes a value using the variable-length encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>. Zig-zag is not used, so input must not be negative. If values can be negative, use {@link #writeSignedVarLong(long, java.io.DataOutputStream)} instead. This meth...
[ "Encodes", "a", "value", "using", "the", "variable", "-", "length", "encoding", "from", "<a", "href", "=", "http", ":", "//", "code", ".", "google", ".", "com", "/", "apis", "/", "protocolbuffers", "/", "docs", "/", "encoding", ".", "html", ">", "Googl...
train
https://github.com/twitter/chill/blob/0919984ec3aeb320ff522911c726425e9f18ea41/chill-hadoop/src/main/java/com/twitter/chill/hadoop/Varint.java#L71-L77
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java
AbstractHBCIJob.saveReturnValues
protected void saveReturnValues(HBCIMsgStatus status, int sref) { """ /* speichert die HBCI-Rückgabewerte für diesen GV im outStore ab. Dazu werden alle RetSegs durchgesehen; diejenigen, die den aktuellen GV betreffen, werden im @c data Property unter dem namen @c ret_i.* gespeichert. @i entspricht dabei dem @...
java
protected void saveReturnValues(HBCIMsgStatus status, int sref) { List<HBCIRetVal> retVals = status.segStatus.getRetVals(); String segref = Integer.toString(sref); retVals.forEach(retVal -> { if (retVal.segref != null && retVal.segref.equals(segref)) { jobResult.jobS...
[ "protected", "void", "saveReturnValues", "(", "HBCIMsgStatus", "status", ",", "int", "sref", ")", "{", "List", "<", "HBCIRetVal", ">", "retVals", "=", "status", ".", "segStatus", ".", "getRetVals", "(", ")", ";", "String", "segref", "=", "Integer", ".", "t...
/* speichert die HBCI-Rückgabewerte für diesen GV im outStore ab. Dazu werden alle RetSegs durchgesehen; diejenigen, die den aktuellen GV betreffen, werden im @c data Property unter dem namen @c ret_i.* gespeichert. @i entspricht dabei dem @c retValCounter.
[ "/", "*", "speichert", "die", "HBCI", "-", "Rückgabewerte", "für", "diesen", "GV", "im", "outStore", "ab", ".", "Dazu", "werden", "alle", "RetSegs", "durchgesehen", ";", "diejenigen", "die", "den", "aktuellen", "GV", "betreffen", "werden", "im" ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java#L774-L791
looly/hutool
hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java
Scheduler.schedule
public Scheduler schedule(Setting cronSetting) { """ 批量加入配置文件中的定时任务<br> 配置文件格式为: xxx.xxx.xxx.Class.method = * * * * * @param cronSetting 定时任务设置文件 @return this """ if (CollectionUtil.isNotEmpty(cronSetting)) { String group; for (Entry<String, LinkedHashMap<String, String>> groupedEntry : cronSet...
java
public Scheduler schedule(Setting cronSetting) { if (CollectionUtil.isNotEmpty(cronSetting)) { String group; for (Entry<String, LinkedHashMap<String, String>> groupedEntry : cronSetting.getGroupedMap().entrySet()) { group = groupedEntry.getKey(); for (Entry<String, String> entry : groupedEntry.getV...
[ "public", "Scheduler", "schedule", "(", "Setting", "cronSetting", ")", "{", "if", "(", "CollectionUtil", ".", "isNotEmpty", "(", "cronSetting", ")", ")", "{", "String", "group", ";", "for", "(", "Entry", "<", "String", ",", "LinkedHashMap", "<", "String", ...
批量加入配置文件中的定时任务<br> 配置文件格式为: xxx.xxx.xxx.Class.method = * * * * * @param cronSetting 定时任务设置文件 @return this
[ "批量加入配置文件中的定时任务<br", ">", "配置文件格式为:", "xxx", ".", "xxx", ".", "xxx", ".", "Class", ".", "method", "=", "*", "*", "*", "*", "*" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java#L176-L197
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/juel/TreeValueExpression.java
TreeValueExpression.setValue
@Override public void setValue(ELContext context, Object value) throws ELException { """ Evaluates the expression as an lvalue and assigns the given value. @param context used to resolve properties (<code>base.property</code> and <code>base[property]</code>) and to perform the assignment to the last base/proper...
java
@Override public void setValue(ELContext context, Object value) throws ELException { node.setValue(bindings, context, value); }
[ "@", "Override", "public", "void", "setValue", "(", "ELContext", "context", ",", "Object", "value", ")", "throws", "ELException", "{", "node", ".", "setValue", "(", "bindings", ",", "context", ",", "value", ")", ";", "}" ]
Evaluates the expression as an lvalue and assigns the given value. @param context used to resolve properties (<code>base.property</code> and <code>base[property]</code>) and to perform the assignment to the last base/property pair @throws ELException if evaluation fails (e.g. property not found, type conversion failed,...
[ "Evaluates", "the", "expression", "as", "an", "lvalue", "and", "assigns", "the", "given", "value", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/juel/TreeValueExpression.java#L136-L139
Netflix/karyon
karyon2-governator/src/main/java/netflix/karyon/Karyon.java
Karyon.forWebSocketServer
public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server, BootstrapModule... bootstrapModules) { """ Creates a new {@link KaryonServer} which combines lifecycle of the passed WebSockets {@link RxServer} with ...
java
public static KaryonServer forWebSocketServer(RxServer<? extends WebSocketFrame, ? extends WebSocketFrame> server, BootstrapModule... bootstrapModules) { return new RxNettyServerBackedServer(server, bootstrapModules); }
[ "public", "static", "KaryonServer", "forWebSocketServer", "(", "RxServer", "<", "?", "extends", "WebSocketFrame", ",", "?", "extends", "WebSocketFrame", ">", "server", ",", "BootstrapModule", "...", "bootstrapModules", ")", "{", "return", "new", "RxNettyServerBackedSe...
Creates a new {@link KaryonServer} which combines lifecycle of the passed WebSockets {@link RxServer} with it's own lifecycle. @param server WebSocket server @param bootstrapModules Additional bootstrapModules if any. @return {@link KaryonServer} which is to be used to start the created server.
[ "Creates", "a", "new", "{", "@link", "KaryonServer", "}", "which", "combines", "lifecycle", "of", "the", "passed", "WebSockets", "{", "@link", "RxServer", "}", "with", "it", "s", "own", "lifecycle", "." ]
train
https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-governator/src/main/java/netflix/karyon/Karyon.java#L217-L220
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findAll
@Override public List<CommerceOrder> findAll(int start, int end) { """ Returns a range of all the commerce orders. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus...
java
@Override public List<CommerceOrder> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce orders. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "orders", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L6978-L6981
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/ScheduledEventQueue.java
ScheduledEventQueue.scheduleInternalEvent
public void scheduleInternalEvent(String name, Date time, String message, String reference) { """ Schedule a timer task, or a delayed event @param name event name @param time this must be database time (such as new Date(DatabaseAccess.getCurrentTime()+difference_in_milliseconds) @param message message content f...
java
public void scheduleInternalEvent(String name, Date time, String message, String reference) { schedule(name, time, message, reference); }
[ "public", "void", "scheduleInternalEvent", "(", "String", "name", ",", "Date", "time", ",", "String", "message", ",", "String", "reference", ")", "{", "schedule", "(", "name", ",", "time", ",", "message", ",", "reference", ")", ";", "}" ]
Schedule a timer task, or a delayed event @param name event name @param time this must be database time (such as new Date(DatabaseAccess.getCurrentTime()+difference_in_milliseconds) @param message message content for delayed event; null o/w
[ "Schedule", "a", "timer", "task", "or", "a", "delayed", "event" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/ScheduledEventQueue.java#L171-L173
LearnLib/learnlib
algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java
AbstractTTTLearner.createNewState
private void createNewState(AbstractBaseDTNode<I, D> newNode) { """ Create a new state during extraction on-the-fly. This is required if a node in the DT has an incoming transition with a certain label, but in its subtree there are no leaves with this label as their state label. @param newNode the extracted n...
java
private void createNewState(AbstractBaseDTNode<I, D> newNode) { TTTTransition<I, D> newTreeTrans = newNode.getIncoming().choose(); assert newTreeTrans != null; TTTState<I, D> newState = createState(newTreeTrans); link(newNode, newState); initializeState(newState); }
[ "private", "void", "createNewState", "(", "AbstractBaseDTNode", "<", "I", ",", "D", ">", "newNode", ")", "{", "TTTTransition", "<", "I", ",", "D", ">", "newTreeTrans", "=", "newNode", ".", "getIncoming", "(", ")", ".", "choose", "(", ")", ";", "assert", ...
Create a new state during extraction on-the-fly. This is required if a node in the DT has an incoming transition with a certain label, but in its subtree there are no leaves with this label as their state label. @param newNode the extracted node
[ "Create", "a", "new", "state", "during", "extraction", "on", "-", "the", "-", "fly", ".", "This", "is", "required", "if", "a", "node", "in", "the", "DT", "has", "an", "incoming", "transition", "with", "a", "certain", "label", "but", "in", "its", "subtr...
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java#L745-L752
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java
HttpUploadRequest.setBasicAuth
public B setBasicAuth(final String username, final String password) { """ Sets the HTTP Basic Authentication header. @param username HTTP Basic Auth username @param password HTTP Basic Auth password @return self instance """ String auth = Base64.encodeToString((username + ":" + password).getBytes(),...
java
public B setBasicAuth(final String username, final String password) { String auth = Base64.encodeToString((username + ":" + password).getBytes(), Base64.NO_WRAP); httpParams.addHeader("Authorization", "Basic " + auth); return self(); }
[ "public", "B", "setBasicAuth", "(", "final", "String", "username", ",", "final", "String", "password", ")", "{", "String", "auth", "=", "Base64", ".", "encodeToString", "(", "(", "username", "+", "\":\"", "+", "password", ")", ".", "getBytes", "(", ")", ...
Sets the HTTP Basic Authentication header. @param username HTTP Basic Auth username @param password HTTP Basic Auth password @return self instance
[ "Sets", "the", "HTTP", "Basic", "Authentication", "header", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java#L72-L76
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiTransport.java
RmiTransport.openFile
@Override public void openFile(String repositoryHash, String filename, Date currentDate) throws JournalException { """ check state, send the open request, open a very special writer, write the file opening, set state """ try { super.tes...
java
@Override public void openFile(String repositoryHash, String filename, Date currentDate) throws JournalException { try { super.testStateChange(State.FILE_OPEN); writer = new RmiTransportWriter(receiver, repositoryHash, filename); ...
[ "@", "Override", "public", "void", "openFile", "(", "String", "repositoryHash", ",", "String", "filename", ",", "Date", "currentDate", ")", "throws", "JournalException", "{", "try", "{", "super", ".", "testStateChange", "(", "State", ".", "FILE_OPEN", ")", ";"...
check state, send the open request, open a very special writer, write the file opening, set state
[ "check", "state", "send", "the", "open", "request", "open", "a", "very", "special", "writer", "write", "the", "file", "opening", "set", "state" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multicast/rmi/RmiTransport.java#L169-L191
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildSerializedForm
public void buildSerializedForm(XMLNode node, Content serializedTree) throws DocletException { """ Build the serialized form. @param node the XML element that specifies which components to document @param serializedTree content tree to which the documentation will be added @throws DocletException if there is ...
java
public void buildSerializedForm(XMLNode node, Content serializedTree) throws DocletException { serializedTree = writer.getHeader(configuration.getText( "doclet.Serialized_Form")); buildChildren(node, serializedTree); writer.addFooter(serializedTree); writer.printDocument(...
[ "public", "void", "buildSerializedForm", "(", "XMLNode", "node", ",", "Content", "serializedTree", ")", "throws", "DocletException", "{", "serializedTree", "=", "writer", ".", "getHeader", "(", "configuration", ".", "getText", "(", "\"doclet.Serialized_Form\"", ")", ...
Build the serialized form. @param node the XML element that specifies which components to document @param serializedTree content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "serialized", "form", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L160-L166
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/GeometryCoordinateDimension.java
GeometryCoordinateDimension.convert
public static LinearRing convert(LinearRing linearRing,int dimension) { """ Force the dimension of the LinearRing and update correctly the coordinate dimension @param linearRing @param dimension @return """ return gf.createLinearRing(convertSequence(linearRing.getCoordinates(),dimension)); }
java
public static LinearRing convert(LinearRing linearRing,int dimension) { return gf.createLinearRing(convertSequence(linearRing.getCoordinates(),dimension)); }
[ "public", "static", "LinearRing", "convert", "(", "LinearRing", "linearRing", ",", "int", "dimension", ")", "{", "return", "gf", ".", "createLinearRing", "(", "convertSequence", "(", "linearRing", ".", "getCoordinates", "(", ")", ",", "dimension", ")", ")", ";...
Force the dimension of the LinearRing and update correctly the coordinate dimension @param linearRing @param dimension @return
[ "Force", "the", "dimension", "of", "the", "LinearRing", "and", "update", "correctly", "the", "coordinate", "dimension" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/GeometryCoordinateDimension.java#L154-L156
upwork/java-upwork
src/com/Upwork/api/Routers/Activities/Team.java
Team.updateBatch
public JSONObject updateBatch(String company, HashMap<String, String> params) throws JSONException { """ Update a group of oTask/Activity records @param company Company ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.put("/otas...
java
public JSONObject updateBatch(String company, HashMap<String, String> params) throws JSONException { return oClient.put("/otask/v1/tasks/companies/" + company + "/tasks/batch", params); }
[ "public", "JSONObject", "updateBatch", "(", "String", "company", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "put", "(", "\"/otask/v1/tasks/companies/\"", "+", "company", "+", "\"/ta...
Update a group of oTask/Activity records @param company Company ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Update", "a", "group", "of", "oTask", "/", "Activity", "records" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Activities/Team.java#L149-L151
azkaban/azkaban
azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java
HttpRequestUtils.filterAdminOnlyFlowParams
public static void filterAdminOnlyFlowParams(final UserManager userManager, final ExecutionOptions options, final User user) throws ExecutorManagerException { """ <pre> Remove following flow param if submitting user is not an Azkaban admin FLOW_PRIORITY USE_EXECUTOR @param userManager @param options @p...
java
public static void filterAdminOnlyFlowParams(final UserManager userManager, final ExecutionOptions options, final User user) throws ExecutorManagerException { if (options == null || options.getFlowParameters() == null) { return; } final Map<String, String> params = options.getFlowParameters(); ...
[ "public", "static", "void", "filterAdminOnlyFlowParams", "(", "final", "UserManager", "userManager", ",", "final", "ExecutionOptions", "options", ",", "final", "User", "user", ")", "throws", "ExecutorManagerException", "{", "if", "(", "options", "==", "null", "||", ...
<pre> Remove following flow param if submitting user is not an Azkaban admin FLOW_PRIORITY USE_EXECUTOR @param userManager @param options @param user </pre>
[ "<pre", ">", "Remove", "following", "flow", "param", "if", "submitting", "user", "is", "not", "an", "Azkaban", "admin", "FLOW_PRIORITY", "USE_EXECUTOR" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/server/HttpRequestUtils.java#L131-L146
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeCreateMBean
public void writeCreateMBean(OutputStream out, CreateMBean value) throws IOException { """ Encode a CreateMBean instance as JSON: { "className" : String, "objectName" : ObjectName, "loaderName" : ObjectName, "params" : [ POJO* ], "signature" : [ String* ], "useLoader" : Boolean, "useSignatue" : Boolean } ...
java
public void writeCreateMBean(OutputStream out, CreateMBean value) throws IOException { writeStartObject(out); writeStringField(out, OM_CLASSNAME, value.className); writeObjectNameField(out, OM_OBJECTNAME, value.objectName); writeObjectNameField(out, OM_LOADERNAME, value.loaderName); ...
[ "public", "void", "writeCreateMBean", "(", "OutputStream", "out", ",", "CreateMBean", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writeStringField", "(", "out", ",", "OM_CLASSNAME", ",", "value", ".", "className", ")", ...
Encode a CreateMBean instance as JSON: { "className" : String, "objectName" : ObjectName, "loaderName" : ObjectName, "params" : [ POJO* ], "signature" : [ String* ], "useLoader" : Boolean, "useSignatue" : Boolean } @param out The stream to write JSON to @param value The CreateMBean instance to encode. Can't be null. @...
[ "Encode", "a", "CreateMBean", "instance", "as", "JSON", ":", "{", "className", ":", "String", "objectName", ":", "ObjectName", "loaderName", ":", "ObjectName", "params", ":", "[", "POJO", "*", "]", "signature", ":", "[", "String", "*", "]", "useLoader", ":...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1143-L1153
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AbstractAddStepHandler.java
AbstractAddStepHandler.rollbackRuntime
@SuppressWarnings("deprecation") protected void rollbackRuntime(OperationContext context, final ModelNode operation, final Resource resource) { """ Rollback runtime changes made in {@link #performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}. Any services that ...
java
@SuppressWarnings("deprecation") protected void rollbackRuntime(OperationContext context, final ModelNode operation, final Resource resource) { rollbackRuntime(context, operation, resource.getModel(), new ArrayList<ServiceController<?>>(0)); }
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "protected", "void", "rollbackRuntime", "(", "OperationContext", "context", ",", "final", "ModelNode", "operation", ",", "final", "Resource", "resource", ")", "{", "rollbackRuntime", "(", "context", ",", "operati...
Rollback runtime changes made in {@link #performRuntime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}. Any services that were added in {@link org.jboss.as.controller.OperationContext.Stage#RUNTIME} will be automatically removed after this method executes. Called from the {@link ...
[ "Rollback", "runtime", "changes", "made", "in", "{", "@link", "#performRuntime", "(", "OperationContext", "org", ".", "jboss", ".", "dmr", ".", "ModelNode", "org", ".", "jboss", ".", "as", ".", "controller", ".", "registry", ".", "Resource", ")", "}", ".",...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AbstractAddStepHandler.java#L374-L377
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java
FineUploader5Session.setParams
@Nonnull public FineUploader5Session setParams (@Nullable final Map <String, String> aParams) { """ Any parameters you would like passed with the associated GET request to your server. @param aParams New parameters to be set. @return this """ m_aSessionParams.setAll (aParams); return this; }
java
@Nonnull public FineUploader5Session setParams (@Nullable final Map <String, String> aParams) { m_aSessionParams.setAll (aParams); return this; }
[ "@", "Nonnull", "public", "FineUploader5Session", "setParams", "(", "@", "Nullable", "final", "Map", "<", "String", ",", "String", ">", "aParams", ")", "{", "m_aSessionParams", ".", "setAll", "(", "aParams", ")", ";", "return", "this", ";", "}" ]
Any parameters you would like passed with the associated GET request to your server. @param aParams New parameters to be set. @return this
[ "Any", "parameters", "you", "would", "like", "passed", "with", "the", "associated", "GET", "request", "to", "your", "server", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java#L144-L149
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/scoping/Scopes.java
Scopes.scopeFor
public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements, final Function<T, QualifiedName> nameComputation, IScope outer) { """ creates a scope using the passed function to compute the names and sets the passed scope as the parent scope """ return new SimpleScope(outer,scopedElemen...
java
public static <T extends EObject> IScope scopeFor(Iterable<? extends T> elements, final Function<T, QualifiedName> nameComputation, IScope outer) { return new SimpleScope(outer,scopedElementsFor(elements, nameComputation)); }
[ "public", "static", "<", "T", "extends", "EObject", ">", "IScope", "scopeFor", "(", "Iterable", "<", "?", "extends", "T", ">", "elements", ",", "final", "Function", "<", "T", ",", "QualifiedName", ">", "nameComputation", ",", "IScope", "outer", ")", "{", ...
creates a scope using the passed function to compute the names and sets the passed scope as the parent scope
[ "creates", "a", "scope", "using", "the", "passed", "function", "to", "compute", "the", "names", "and", "sets", "the", "passed", "scope", "as", "the", "parent", "scope" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/scoping/Scopes.java#L68-L71
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java
TypeHandlerUtils.convertSqlXml
public static Object convertSqlXml(Connection conn, InputStream input) throws SQLException { """ Transfers data from InputStream into sql.SQLXML <p/> Using default locale. If different locale is required see {@link #convertSqlXml(java.sql.Connection, String)} @param conn connection for which sql.SQLXML obje...
java
public static Object convertSqlXml(Connection conn, InputStream input) throws SQLException { return convertSqlXml(conn, toByteArray(input)); }
[ "public", "static", "Object", "convertSqlXml", "(", "Connection", "conn", ",", "InputStream", "input", ")", "throws", "SQLException", "{", "return", "convertSqlXml", "(", "conn", ",", "toByteArray", "(", "input", ")", ")", ";", "}" ]
Transfers data from InputStream into sql.SQLXML <p/> Using default locale. If different locale is required see {@link #convertSqlXml(java.sql.Connection, String)} @param conn connection for which sql.SQLXML object would be created @param input InputStream @return sql.SQLXML from InputStream @throws SQLException
[ "Transfers", "data", "from", "InputStream", "into", "sql", ".", "SQLXML", "<p", "/", ">", "Using", "default", "locale", ".", "If", "different", "locale", "is", "required", "see", "{", "@link", "#convertSqlXml", "(", "java", ".", "sql", ".", "Connection", "...
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L320-L322
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/OptionUtil.java
OptionUtil.println
private static void println(StringBuilder buf, int width, String data) { """ Simple writing helper with no indentation. @param buf Buffer to write to @param width Width to use for linewraps @param data Data to write. """ for(String line : FormatUtil.splitAtLastBlank(data, width)) { buf.append(li...
java
private static void println(StringBuilder buf, int width, String data) { for(String line : FormatUtil.splitAtLastBlank(data, width)) { buf.append(line); if(!line.endsWith(FormatUtil.NEWLINE)) { buf.append(FormatUtil.NEWLINE); } } }
[ "private", "static", "void", "println", "(", "StringBuilder", "buf", ",", "int", "width", ",", "String", "data", ")", "{", "for", "(", "String", "line", ":", "FormatUtil", ".", "splitAtLastBlank", "(", "data", ",", "width", ")", ")", "{", "buf", ".", "...
Simple writing helper with no indentation. @param buf Buffer to write to @param width Width to use for linewraps @param data Data to write.
[ "Simple", "writing", "helper", "with", "no", "indentation", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/OptionUtil.java#L107-L114
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
ClassBuilder.buildMemberDetails
public void buildMemberDetails(XMLNode node, Content classContentTree) { """ Build the member details contents of the page. @param node the XML element that specifies which components to document @param classContentTree the content tree to which the documentation will be added """ Content memberDet...
java
public void buildMemberDetails(XMLNode node, Content classContentTree) { Content memberDetailsTree = writer.getMemberTreeHeader(); buildChildren(node, memberDetailsTree); classContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree)); }
[ "public", "void", "buildMemberDetails", "(", "XMLNode", "node", ",", "Content", "classContentTree", ")", "{", "Content", "memberDetailsTree", "=", "writer", ".", "getMemberTreeHeader", "(", ")", ";", "buildChildren", "(", "node", ",", "memberDetailsTree", ")", ";"...
Build the member details contents of the page. @param node the XML element that specifies which components to document @param classContentTree the content tree to which the documentation will be added
[ "Build", "the", "member", "details", "contents", "of", "the", "page", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java#L352-L356
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/EJBMDOrchestrator.java
EJBMDOrchestrator.dealWithUnsatisfiedXMLTimers
private String dealWithUnsatisfiedXMLTimers(Map<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> xmlTimers, BeanMetaData bmd) throws EJBConfigurationException { """ Verifies that all timers of a certain parm type (1, 0, or unspecified parm) were successfully mapped to a Method. @param xmlTimers List of Timer inst...
java
private String dealWithUnsatisfiedXMLTimers(Map<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> xmlTimers, BeanMetaData bmd) throws EJBConfigurationException { String mostRecentMethodWithError = null; for (Map.Entry<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> entry : xmlTimers.entrySet()) { ...
[ "private", "String", "dealWithUnsatisfiedXMLTimers", "(", "Map", "<", "String", ",", "List", "<", "com", ".", "ibm", ".", "ws", ".", "javaee", ".", "dd", ".", "ejb", ".", "Timer", ">", ">", "xmlTimers", ",", "BeanMetaData", "bmd", ")", "throws", "EJBConf...
Verifies that all timers of a certain parm type (1, 0, or unspecified parm) were successfully mapped to a Method. @param xmlTimers List of Timer instances representing timers defined in xml. @param bmd BeanMetaData @return @throws EJBConfigurationException
[ "Verifies", "that", "all", "timers", "of", "a", "certain", "parm", "type", "(", "1", "0", "or", "unspecified", "parm", ")", "were", "successfully", "mapped", "to", "a", "Method", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/EJBMDOrchestrator.java#L5293-L5305
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_migration_GET
public ArrayList<OvhMigration> project_serviceName_migration_GET(String serviceName) throws IOException { """ Get planned migrations REST: GET /cloud/project/{serviceName}/migration @param serviceName [required] Service name API beta """ String qPath = "/cloud/project/{serviceName}/migration"; Strin...
java
public ArrayList<OvhMigration> project_serviceName_migration_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/migration"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t10); }
[ "public", "ArrayList", "<", "OvhMigration", ">", "project_serviceName_migration_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/migration\"", ";", "StringBuilder", "sb", "=", "path", "(", "qP...
Get planned migrations REST: GET /cloud/project/{serviceName}/migration @param serviceName [required] Service name API beta
[ "Get", "planned", "migrations" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1074-L1079
btaz/data-util
src/main/java/com/btaz/util/collections/Sets.java
Sets.symmetricDifference
public static <T> Set<T> symmetricDifference(Set<T> setA, Set<T> setB) { """ This method finds the symmetric difference between set A and set B i.e. which items does not exist in either set A or set B. This is the opposite of the intersect of set A and set B. @param setA set A @param setB set B @param <T> type...
java
public static <T> Set<T> symmetricDifference(Set<T> setA, Set<T> setB) { Set<T> union = union(setA, setB); Set<T> intersection = intersection(setA, setB); return difference(union, intersection); }
[ "public", "static", "<", "T", ">", "Set", "<", "T", ">", "symmetricDifference", "(", "Set", "<", "T", ">", "setA", ",", "Set", "<", "T", ">", "setB", ")", "{", "Set", "<", "T", ">", "union", "=", "union", "(", "setA", ",", "setB", ")", ";", "...
This method finds the symmetric difference between set A and set B i.e. which items does not exist in either set A or set B. This is the opposite of the intersect of set A and set B. @param setA set A @param setB set B @param <T> type @return a new set containing the symmetric difference
[ "This", "method", "finds", "the", "symmetric", "difference", "between", "set", "A", "and", "set", "B", "i", ".", "e", ".", "which", "items", "does", "not", "exist", "in", "either", "set", "A", "or", "set", "B", ".", "This", "is", "the", "opposite", "...
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/collections/Sets.java#L81-L85
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.listSiteDiagnosticCategoriesWithServiceResponseAsync
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { """ Get Diagnostics Categories. Get Diagnostics Categories. @param resourceGroupName Name of the resource group to which the resource b...
java
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesWithServiceResponseAsync(final String resourceGroupName, final String siteName) { return listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName) .concatMap(new Func1<ServiceResponse<Page<Di...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DiagnosticCategoryInner", ">", ">", ">", "listSiteDiagnosticCategoriesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "siteName", ")", "{", "return", "list...
Get Diagnostics Categories. Get Diagnostics Categories. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;DiagnosticCategoryInner&gt; object
[ "Get", "Diagnostics", "Categories", ".", "Get", "Diagnostics", "Categories", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L231-L243
sakserv/hadoop-mini-clusters
hadoop-mini-clusters-yarn/src/main/java/com/github/sakserv/minicluster/yarn/InJvmContainerExecutor.java
InJvmContainerExecutor.doLaunch
private int doLaunch(Container container, Path containerWorkDir) throws Exception { """ Will launch containers within the same JVM as this Container Executor. It will do so by: - extracting Container's class name and program arguments from the launch script (e.g., launch_container.sh) - Creating an isolated Cla...
java
private int doLaunch(Container container, Path containerWorkDir) throws Exception { Map<String, String> environment = container.getLaunchContext().getEnvironment(); EnvironmentUtils.putAll(environment); Set<URL> additionalClassPathUrls = this.filterAndBuildUserClasspath(container); Exe...
[ "private", "int", "doLaunch", "(", "Container", "container", ",", "Path", "containerWorkDir", ")", "throws", "Exception", "{", "Map", "<", "String", ",", "String", ">", "environment", "=", "container", ".", "getLaunchContext", "(", ")", ".", "getEnvironment", ...
Will launch containers within the same JVM as this Container Executor. It will do so by: - extracting Container's class name and program arguments from the launch script (e.g., launch_container.sh) - Creating an isolated ClassLoader for each container - Calling doLaunchContainer(..) method to launch Container
[ "Will", "launch", "containers", "within", "the", "same", "JVM", "as", "this", "Container", "Executor", ".", "It", "will", "do", "so", "by", ":", "-", "extracting", "Container", "s", "class", "name", "and", "program", "arguments", "from", "the", "launch", "...
train
https://github.com/sakserv/hadoop-mini-clusters/blob/c3915274714b457cf7e1af62f2f289274510dc0b/hadoop-mini-clusters-yarn/src/main/java/com/github/sakserv/minicluster/yarn/InJvmContainerExecutor.java#L197-L233
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/msvc/VisualStudioNETProjectWriter.java
VisualStudioNETProjectWriter.isGroupMember
private boolean isGroupMember(final String filter, final File candidate) { """ Returns true if the file has an extension that appears in the group filter. @param filter String group filter @param candidate File file @return boolean true if member of group """ final String fileName = candidate.getNa...
java
private boolean isGroupMember(final String filter, final File candidate) { final String fileName = candidate.getName(); final int lastDot = fileName.lastIndexOf('.'); if (lastDot >= 0 && lastDot < fileName.length() - 1) { final String extension = ";" + fileName.substring(lastDot + 1).toLowerCase() + "...
[ "private", "boolean", "isGroupMember", "(", "final", "String", "filter", ",", "final", "File", "candidate", ")", "{", "final", "String", "fileName", "=", "candidate", ".", "getName", "(", ")", ";", "final", "int", "lastDot", "=", "fileName", ".", "lastIndexO...
Returns true if the file has an extension that appears in the group filter. @param filter String group filter @param candidate File file @return boolean true if member of group
[ "Returns", "true", "if", "the", "file", "has", "an", "extension", "that", "appears", "in", "the", "group", "filter", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/msvc/VisualStudioNETProjectWriter.java#L586-L595
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractUserTaskBuilder.java
AbstractUserTaskBuilder.camundaTaskListenerClass
public B camundaTaskListenerClass(String eventName, String fullQualifiedClassName) { """ Add a class based task listener with specified event name @param eventName - event names to listen to @param fullQualifiedClassName - a string representing a class @return the builder object """ CamundaTaskListene...
java
public B camundaTaskListenerClass(String eventName, String fullQualifiedClassName) { CamundaTaskListener executionListener = createInstance(CamundaTaskListener.class); executionListener.setCamundaEvent(eventName); executionListener.setCamundaClass(fullQualifiedClassName); addExtensionElement(executionL...
[ "public", "B", "camundaTaskListenerClass", "(", "String", "eventName", ",", "String", "fullQualifiedClassName", ")", "{", "CamundaTaskListener", "executionListener", "=", "createInstance", "(", "CamundaTaskListener", ".", "class", ")", ";", "executionListener", ".", "se...
Add a class based task listener with specified event name @param eventName - event names to listen to @param fullQualifiedClassName - a string representing a class @return the builder object
[ "Add", "a", "class", "based", "task", "listener", "with", "specified", "event", "name" ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractUserTaskBuilder.java#L201-L209
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java
GoogleCloudStorageImpl.getObject
private StorageObject getObject(StorageResourceId resourceId) throws IOException { """ Gets the object with the given resourceId. @param resourceId identifies a StorageObject @return the object with the given name or null if object not found @throws IOException if the object exists but cannot be accesse...
java
private StorageObject getObject(StorageResourceId resourceId) throws IOException { logger.atFine().log("getObject(%s)", resourceId); Preconditions.checkArgument( resourceId.isStorageObject(), "Expected full StorageObject id, got %s", resourceId); String bucketName = resourceId.getBucketName();...
[ "private", "StorageObject", "getObject", "(", "StorageResourceId", "resourceId", ")", "throws", "IOException", "{", "logger", ".", "atFine", "(", ")", ".", "log", "(", "\"getObject(%s)\"", ",", "resourceId", ")", ";", "Preconditions", ".", "checkArgument", "(", ...
Gets the object with the given resourceId. @param resourceId identifies a StorageObject @return the object with the given name or null if object not found @throws IOException if the object exists but cannot be accessed
[ "Gets", "the", "object", "with", "the", "given", "resourceId", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java#L1834-L1852
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/reflect/AbstractFixture.java
AbstractFixture.getGetter
protected Method getGetter(Class type, String name) { """ <p>getGetter.</p> @param type a {@link java.lang.Class} object. @param name a {@link java.lang.String} object. @return a {@link java.lang.reflect.Method} object. """ return introspector(type).getGetter( toJavaIdentifierForm(name)); }
java
protected Method getGetter(Class type, String name) { return introspector(type).getGetter( toJavaIdentifierForm(name)); }
[ "protected", "Method", "getGetter", "(", "Class", "type", ",", "String", "name", ")", "{", "return", "introspector", "(", "type", ")", ".", "getGetter", "(", "toJavaIdentifierForm", "(", "name", ")", ")", ";", "}" ]
<p>getGetter.</p> @param type a {@link java.lang.Class} object. @param name a {@link java.lang.String} object. @return a {@link java.lang.reflect.Method} object.
[ "<p", ">", "getGetter", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/reflect/AbstractFixture.java#L130-L133
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java
XmlDataProviderImpl.getDataAsHashtable
@Override public Hashtable<String, Object> getDataAsHashtable() { """ Gets xml data and returns in a hashtable instead of an Object 2D array. Only compatible with a xml file formatted to return a map. <br> <br> XML file example: <pre> <items> <item> <key>k1</key> <value>val1</value> </item> <item> ...
java
@Override public Hashtable<String, Object> getDataAsHashtable() { logger.entering(); if (null == resource.getCls()) { resource.setCls(KeyValueMap.class); } Hashtable<String, Object> dataHashTable = new Hashtable<>(); try { JAXBContext context = JAXBCo...
[ "@", "Override", "public", "Hashtable", "<", "String", ",", "Object", ">", "getDataAsHashtable", "(", ")", "{", "logger", ".", "entering", "(", ")", ";", "if", "(", "null", "==", "resource", ".", "getCls", "(", ")", ")", "{", "resource", ".", "setCls",...
Gets xml data and returns in a hashtable instead of an Object 2D array. Only compatible with a xml file formatted to return a map. <br> <br> XML file example: <pre> <items> <item> <key>k1</key> <value>val1</value> </item> <item> <key>k2</key> <value>val2</value> </item> <item> <key>k3</key> <value>val3</value> </item>...
[ "Gets", "xml", "data", "and", "returns", "in", "a", "hashtable", "instead", "of", "an", "Object", "2D", "array", ".", "Only", "compatible", "with", "a", "xml", "file", "formatted", "to", "return", "a", "map", ".", "<br", ">", "<br", ">", "XML", "file",...
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L312-L336
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.write
public File write(byte[] data, int off, int len, boolean isAppend) throws IORuntimeException { """ 写入数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @param isAppend 是否追加模式 @return 目标文件 @throws IORuntimeException IO异常 """ FileOutputStream out = null; try { out = new FileOutputStream(Fil...
java
public File write(byte[] data, int off, int len, boolean isAppend) throws IORuntimeException { FileOutputStream out = null; try { out = new FileOutputStream(FileUtil.touch(file), isAppend); out.write(data, off, len); out.flush(); }catch(IOException e){ throw new IORuntimeException(e); } fina...
[ "public", "File", "write", "(", "byte", "[", "]", "data", ",", "int", "off", ",", "int", "len", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "FileOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileOutputS...
写入数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @param isAppend 是否追加模式 @return 目标文件 @throws IORuntimeException IO异常
[ "写入数据到文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L287-L299
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readParentFolder
public CmsResource readParentFolder(CmsRequestContext context, CmsUUID structureId) throws CmsException { """ Returns the parent folder to the given structure id.<p> @param context the current request context @param structureId the child structure id @return the parent folder <code>{@link CmsResource}</code...
java
public CmsResource readParentFolder(CmsRequestContext context, CmsUUID structureId) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsResource result = null; try { result = m_driverManager.readParentFolder(dbc, structureId); } catch (Excep...
[ "public", "CmsResource", "readParentFolder", "(", "CmsRequestContext", "context", ",", "CmsUUID", "structureId", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "CmsResource", "result...
Returns the parent folder to the given structure id.<p> @param context the current request context @param structureId the child structure id @return the parent folder <code>{@link CmsResource}</code> @throws CmsException if something goes wrong
[ "Returns", "the", "parent", "folder", "to", "the", "given", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4629-L4647
TheHortonMachine/hortonmachine
gui/src/main/java/org/hortonmachine/gui/spatialtoolbox/core/ModuleDescription.java
ModuleDescription.addInput
public void addInput( String fieldName, String type, String description, String defaultValue, String uiHint ) { """ Adds an input field to the module. @param fieldName the name of the field (accessed through reflection). @param type the chanonical name of the class of the field. @param description a descripti...
java
public void addInput( String fieldName, String type, String description, String defaultValue, String uiHint ) { if (fieldName == null) { throw new IllegalArgumentException("field name is mandatory"); } if (type == null) { throw new IllegalArgumentException("field type is ...
[ "public", "void", "addInput", "(", "String", "fieldName", ",", "String", "type", ",", "String", "description", ",", "String", "defaultValue", ",", "String", "uiHint", ")", "{", "if", "(", "fieldName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentE...
Adds an input field to the module. @param fieldName the name of the field (accessed through reflection). @param type the chanonical name of the class of the field. @param description a description of the field. @param defaultValue a default value or <code>null</code>. @param uiHint
[ "Adds", "an", "input", "field", "to", "the", "module", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gui/src/main/java/org/hortonmachine/gui/spatialtoolbox/core/ModuleDescription.java#L118-L142
haraldk/TwelveMonkeys
imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGLosslessDecoderWrapper.java
JPEGLosslessDecoderWrapper.to24Bit3ComponentRGB
private BufferedImage to24Bit3ComponentRGB(int[][] decoded, int width, int height) { """ Converts the decoded buffer into a BufferedImage. precision: 8 bit, componentCount = 3 @param decoded data buffer @param width of the image @param height of the image @return a BufferedImage.TYPE_3BYTE_RGB """ ...
java
private BufferedImage to24Bit3ComponentRGB(int[][] decoded, int width, int height) { BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); byte[] imageBuffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); for (int i = 0; i < imageBuffer.length ...
[ "private", "BufferedImage", "to24Bit3ComponentRGB", "(", "int", "[", "]", "[", "]", "decoded", ",", "int", "width", ",", "int", "height", ")", "{", "BufferedImage", "image", "=", "new", "BufferedImage", "(", "width", ",", "height", ",", "BufferedImage", ".",...
Converts the decoded buffer into a BufferedImage. precision: 8 bit, componentCount = 3 @param decoded data buffer @param width of the image @param height of the image @return a BufferedImage.TYPE_3BYTE_RGB
[ "Converts", "the", "decoded", "buffer", "into", "a", "BufferedImage", ".", "precision", ":", "8", "bit", "componentCount", "=", "3" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGLosslessDecoderWrapper.java#L180-L192
geomajas/geomajas-project-client-gwt2
plugin/tms/tms/src/main/java/org/geomajas/gwt2/plugin/tms/client/TmsClient.java
TmsClient.getTileMapService
public void getTileMapService(final String baseUrl, final Callback<TileMapServiceInfo, String> callback) { """ Fetch the capabilities of a TileMapService and parse it. This is the base URL that contains a list of TileMaps. @param baseUrl The URL that points to the TileMapService. @param callback The callback ...
java
public void getTileMapService(final String baseUrl, final Callback<TileMapServiceInfo, String> callback) { RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, baseUrl); builder.setHeader("Cache-Control", "no-cache"); builder.setHeader("Pragma", "no-cache"); try { builder.sendRequest(null, new Req...
[ "public", "void", "getTileMapService", "(", "final", "String", "baseUrl", ",", "final", "Callback", "<", "TileMapServiceInfo", ",", "String", ">", "callback", ")", "{", "RequestBuilder", "builder", "=", "new", "RequestBuilder", "(", "RequestBuilder", ".", "GET", ...
Fetch the capabilities of a TileMapService and parse it. This is the base URL that contains a list of TileMaps. @param baseUrl The URL that points to the TileMapService. @param callback The callback tat contains the parsed capabilities as a {@link org.geomajas.gwt2.plugin.tms.client .configuration.TileMapServiceInfo}...
[ "Fetch", "the", "capabilities", "of", "a", "TileMapService", "and", "parse", "it", ".", "This", "is", "the", "base", "URL", "that", "contains", "a", "list", "of", "TileMaps", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/tms/tms/src/main/java/org/geomajas/gwt2/plugin/tms/client/TmsClient.java#L218-L242
jpelzer/pelzer-util
src/main/java/com/pelzer/util/StringMan.java
StringMan.getNullAsValue
public static String getNullAsValue(String input, String value) { """ Returns the specified string value if input is null, otherwise returns the original input string untouched. @param input String to be evaluated @param value String to substitute if input is null """ return (input == null) ? value...
java
public static String getNullAsValue(String input, String value) { return (input == null) ? value : input; }
[ "public", "static", "String", "getNullAsValue", "(", "String", "input", ",", "String", "value", ")", "{", "return", "(", "input", "==", "null", ")", "?", "value", ":", "input", ";", "}" ]
Returns the specified string value if input is null, otherwise returns the original input string untouched. @param input String to be evaluated @param value String to substitute if input is null
[ "Returns", "the", "specified", "string", "value", "if", "input", "is", "null", "otherwise", "returns", "the", "original", "input", "string", "untouched", "." ]
train
https://github.com/jpelzer/pelzer-util/blob/ec14f2573fd977d1442dba5d1507a264f5ea9aa6/src/main/java/com/pelzer/util/StringMan.java#L51-L53
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/core/ConfigTemplate.java
ConfigTemplate.newSubdirectory
private File newSubdirectory(File parentDirectory, String path) { """ Creates a new subdirectory under the specified parent directory. @param parentDirectory The directory under which the subdirectory will be created. @param path The full path of the subdirectory. @return The subdirectory just created. ""...
java
private File newSubdirectory(File parentDirectory, String path) { File dir = new File(parentDirectory, path); if (!dir.exists()) { dir.mkdirs(); } return dir; }
[ "private", "File", "newSubdirectory", "(", "File", "parentDirectory", ",", "String", "path", ")", "{", "File", "dir", "=", "new", "File", "(", "parentDirectory", ",", "path", ")", ";", "if", "(", "!", "dir", ".", "exists", "(", ")", ")", "{", "dir", ...
Creates a new subdirectory under the specified parent directory. @param parentDirectory The directory under which the subdirectory will be created. @param path The full path of the subdirectory. @return The subdirectory just created.
[ "Creates", "a", "new", "subdirectory", "under", "the", "specified", "parent", "directory", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/core/ConfigTemplate.java#L165-L173
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/matching/ConsumerMonitorRegistrar.java
ConsumerMonitorRegistrar.addConsumerToRegisteredMonitors
public void addConsumerToRegisteredMonitors( MonitoredConsumer mc, ArrayList exactMonitorList, ArrayList wildcardMonitorList) { """ Method addConsumerToRegisteredMonitors This method adds a new consumer to the appropriate places in each of the monitor maps. @param mc @param exactMonitorList @p...
java
public void addConsumerToRegisteredMonitors( MonitoredConsumer mc, ArrayList exactMonitorList, ArrayList wildcardMonitorList) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "addConsumerToRegisteredMonitors", new Object[] { mc, ...
[ "public", "void", "addConsumerToRegisteredMonitors", "(", "MonitoredConsumer", "mc", ",", "ArrayList", "exactMonitorList", ",", "ArrayList", "wildcardMonitorList", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEn...
Method addConsumerToRegisteredMonitors This method adds a new consumer to the appropriate places in each of the monitor maps. @param mc @param exactMonitorList @param wildcardMonitorList
[ "Method", "addConsumerToRegisteredMonitors" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/matching/ConsumerMonitorRegistrar.java#L707-L728
apereo/cas
support/cas-server-support-surrogate-authentication-couchdb/src/main/java/org/apereo/cas/couchdb/surrogate/SurrogateAuthorizationCouchDbRepository.java
SurrogateAuthorizationCouchDbRepository.findBySurrogatePrincipal
@View(name = "by_surrogate_principal", map = "function(doc) { """ Find by surrogate, principal, service touple for authorization check. @param surrogate Surrogate user to validate access. @param principal Principal to validate the surrogate can access. @return Surrogate/principal if authorized """ if(doc.su...
java
@View(name = "by_surrogate_principal", map = "function(doc) { if(doc.surrogate && doc.principal) { emit([doc.principal, doc.surrogate], doc) } }") public List<CouchDbSurrogateAuthorization> findBySurrogatePrincipal(final String surrogate, final String principal) { return queryView("by_surrogate_principal", ...
[ "@", "View", "(", "name", "=", "\"by_surrogate_principal\"", ",", "map", "=", "\"function(doc) { if(doc.surrogate && doc.principal) { emit([doc.principal, doc.surrogate], doc) } }\"", ")", "public", "List", "<", "CouchDbSurrogateAuthorization", ">", "findBySurrogatePrincipal", "(",...
Find by surrogate, principal, service touple for authorization check. @param surrogate Surrogate user to validate access. @param principal Principal to validate the surrogate can access. @return Surrogate/principal if authorized
[ "Find", "by", "surrogate", "principal", "service", "touple", "for", "authorization", "check", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-surrogate-authentication-couchdb/src/main/java/org/apereo/cas/couchdb/surrogate/SurrogateAuthorizationCouchDbRepository.java#L40-L43
ujmp/universal-java-matrix-package
ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java
Ginv.divideRowBy
public static void divideRowBy(DenseDoubleMatrix2D matrix, long aRow, long fromCol, double value) { """ Divide the row from this column position by this value @param matrix the matrix to modify @param aRow the row to process @param fromCol starting from column @param value the value to divide """ l...
java
public static void divideRowBy(DenseDoubleMatrix2D matrix, long aRow, long fromCol, double value) { long cols = matrix.getColumnCount(); for (long col = fromCol; col < cols; col++) { matrix.setDouble(matrix.getDouble(aRow, col) / value, aRow, col); } }
[ "public", "static", "void", "divideRowBy", "(", "DenseDoubleMatrix2D", "matrix", ",", "long", "aRow", ",", "long", "fromCol", ",", "double", "value", ")", "{", "long", "cols", "=", "matrix", ".", "getColumnCount", "(", ")", ";", "for", "(", "long", "col", ...
Divide the row from this column position by this value @param matrix the matrix to modify @param aRow the row to process @param fromCol starting from column @param value the value to divide
[ "Divide", "the", "row", "from", "this", "column", "position", "by", "this", "value" ]
train
https://github.com/ujmp/universal-java-matrix-package/blob/b7e1d293adeadaf35d208ffe8884028d6c06b63b/ujmp-core/src/main/java/org/ujmp/core/doublematrix/calculation/general/decomposition/Ginv.java#L693-L698
liyiorg/weixin-popular
src/main/java/weixin/popular/api/PayMchAPI.java
PayMchAPI.payDownloadfundflow
public static PayDownloadfundflowResult payDownloadfundflow(PayDownloadfundflow payDownloadfundflow,String key) { """ 下载资金账单<br> 商户可以通过该接口下载自2017年6月1日起 的历史资金流水账单。<br> 说明:<br> 1、资金账单中的数据反映的是商户微信账户资金变动情况;<br> 2、当日账单在次日上午9点开始生成,建议商户在上午10点以后获取;<br> 3、资金账单中涉及金额的字段单位为“元”。<br> @since 2.8.18 @param payDownloadfundf...
java
public static PayDownloadfundflowResult payDownloadfundflow(PayDownloadfundflow payDownloadfundflow,String key){ Map<String,String> map = MapUtil.objectToMap(payDownloadfundflow); String sign_type = map.get("sign_type"); //设置默认签名类型HMAC-SHA256 if(sign_type == null || "".equals(sign_type)){ sign_type = "HMAC-S...
[ "public", "static", "PayDownloadfundflowResult", "payDownloadfundflow", "(", "PayDownloadfundflow", "payDownloadfundflow", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "MapUtil", ".", "objectToMap", "(", "payDownloadfundflow", ...
下载资金账单<br> 商户可以通过该接口下载自2017年6月1日起 的历史资金流水账单。<br> 说明:<br> 1、资金账单中的数据反映的是商户微信账户资金变动情况;<br> 2、当日账单在次日上午9点开始生成,建议商户在上午10点以后获取;<br> 3、资金账单中涉及金额的字段单位为“元”。<br> @since 2.8.18 @param payDownloadfundflow payDownloadfundflow @param key key @return PayDownloadfundflowResult 对象,请求成功时包含以下数据:<br> data 文本表格数据 <br> sign_type 签名类型 <br> ...
[ "下载资金账单<br", ">", "商户可以通过该接口下载自2017年6月1日起", "的历史资金流水账单。<br", ">", "说明:<br", ">", "1、资金账单中的数据反映的是商户微信账户资金变动情况;<br", ">", "2、当日账单在次日上午9点开始生成,建议商户在上午10点以后获取;<br", ">", "3、资金账单中涉及金额的字段单位为“元”。<br", ">" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/PayMchAPI.java#L315-L366
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/BeanELResolver.java
BeanELResolver.getValue
@Override public Object getValue(ELContext context, Object base, Object property) { """ If the base object is not null, returns the current value of the given property on this bean. If the base is not null, the propertyResolved property of the ELContext object must be set to true by this resolver, before return...
java
@Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } Object result = null; if (isResolvable(base)) { Method method = toBeanProperty(base, property).getReadMethod(); if (method == null) { throw new PropertyNot...
[ "@", "Override", "public", "Object", "getValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "Object", ...
If the base object is not null, returns the current value of the given property on this bean. If the base is not null, the propertyResolved property of the ELContext object must be set to true by this resolver, before returning. If this property is not true after this method is called, the caller should ignore the retu...
[ "If", "the", "base", "object", "is", "not", "null", "returns", "the", "current", "value", "of", "the", "given", "property", "on", "this", "bean", ".", "If", "the", "base", "is", "not", "null", "the", "propertyResolved", "property", "of", "the", "ELContext"...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/BeanELResolver.java#L291-L312
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreReader.java
DefaultDatastoreReader.loadByKey
public <E> List<E> loadByKey(Class<E> entityClass, List<DatastoreKey> keys) { """ Retrieves and returns the entities for the given keys. @param entityClass the expected result type @param keys the entity keys @return the entities for the given keys. If one or more requested keys do not exist in the Cloud D...
java
public <E> List<E> loadByKey(Class<E> entityClass, List<DatastoreKey> keys) { Key[] nativeKeys = DatastoreUtils.toNativeKeys(keys); return fetch(entityClass, nativeKeys); }
[ "public", "<", "E", ">", "List", "<", "E", ">", "loadByKey", "(", "Class", "<", "E", ">", "entityClass", ",", "List", "<", "DatastoreKey", ">", "keys", ")", "{", "Key", "[", "]", "nativeKeys", "=", "DatastoreUtils", ".", "toNativeKeys", "(", "keys", ...
Retrieves and returns the entities for the given keys. @param entityClass the expected result type @param keys the entity keys @return the entities for the given keys. If one or more requested keys do not exist in the Cloud Datastore, the corresponding item in the returned list be <code>null</code>. @throws EntityMan...
[ "Retrieves", "and", "returns", "the", "entities", "for", "the", "given", "keys", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreReader.java#L246-L249
google/closure-compiler
src/com/google/javascript/rhino/jstype/UnionType.java
UnionType.anyMatch
private static boolean anyMatch(Predicate<JSType> predicate, ImmutableList<JSType> universe) { """ Returns whether anything in {@code universe} matches {@code predicate}. <p>This method is designed to minimize allocations since it is expected to be called <em>very</em> often. That's why is doesn't: <ul> <l...
java
private static boolean anyMatch(Predicate<JSType> predicate, ImmutableList<JSType> universe) { for (int i = 0; i < universe.size(); i++) { if (predicate.test(universe.get(i))) { return true; } } return false; }
[ "private", "static", "boolean", "anyMatch", "(", "Predicate", "<", "JSType", ">", "predicate", ",", "ImmutableList", "<", "JSType", ">", "universe", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "universe", ".", "size", "(", ")", ";", "i...
Returns whether anything in {@code universe} matches {@code predicate}. <p>This method is designed to minimize allocations since it is expected to be called <em>very</em> often. That's why is doesn't: <ul> <li>instantiate {@link Iterator}s <li>instantiate {@link Stream}s <li>(un)box primitives <li>expect closure gene...
[ "Returns", "whether", "anything", "in", "{", "@code", "universe", "}", "matches", "{", "@code", "predicate", "}", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/UnionType.java#L675-L682
RestComm/media-core
spi/src/main/java/org/restcomm/media/core/spi/utils/Text.java
Text.differentChars
private boolean differentChars(char c1, char c2) { """ Compares two chars. @param c1 the first char @param c2 the second char @return true if first and second chars are different. """ if (65 <= c1 && c1 < 97) { c1 +=32; } if (65 <= c2 && c2 < 97) { c2 +=32;...
java
private boolean differentChars(char c1, char c2) { if (65 <= c1 && c1 < 97) { c1 +=32; } if (65 <= c2 && c2 < 97) { c2 +=32; } return c1 != c2; }
[ "private", "boolean", "differentChars", "(", "char", "c1", ",", "char", "c2", ")", "{", "if", "(", "65", "<=", "c1", "&&", "c1", "<", "97", ")", "{", "c1", "+=", "32", ";", "}", "if", "(", "65", "<=", "c2", "&&", "c2", "<", "97", ")", "{", ...
Compares two chars. @param c1 the first char @param c2 the second char @return true if first and second chars are different.
[ "Compares", "two", "chars", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/spi/src/main/java/org/restcomm/media/core/spi/utils/Text.java#L483-L492
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/mediatype/hal/DefaultCurieProvider.java
DefaultCurieProvider.getCurieHref
protected String getCurieHref(String name, UriTemplate template) { """ Returns the href for the {@link Curie} instance to be created. Will prepend the current application URI (servlet mapping) in case the template is not an absolute one in the first place. @param name will never be {@literal null} or empty. @...
java
protected String getCurieHref(String name, UriTemplate template) { if (template.toString().startsWith("http")) { return template.toString(); } String applicationUri = ServletUriComponentsBuilder.fromCurrentServletMapping().build().expand().toString(); return applicationUri.concat(template.toString()); }
[ "protected", "String", "getCurieHref", "(", "String", "name", ",", "UriTemplate", "template", ")", "{", "if", "(", "template", ".", "toString", "(", ")", ".", "startsWith", "(", "\"http\"", ")", ")", "{", "return", "template", ".", "toString", "(", ")", ...
Returns the href for the {@link Curie} instance to be created. Will prepend the current application URI (servlet mapping) in case the template is not an absolute one in the first place. @param name will never be {@literal null} or empty. @param template will never be {@literal null}. @return the {@link String} to be u...
[ "Returns", "the", "href", "for", "the", "{", "@link", "Curie", "}", "instance", "to", "be", "created", ".", "Will", "prepend", "the", "current", "application", "URI", "(", "servlet", "mapping", ")", "in", "case", "the", "template", "is", "not", "an", "ab...
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/mediatype/hal/DefaultCurieProvider.java#L137-L145
undertow-io/undertow
core/src/main/java/io/undertow/util/PathMatcher.java
PathMatcher.addPrefixPath
public synchronized PathMatcher addPrefixPath(final String path, final T handler) { """ Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. <p> The match is done on a prefix bases, so registering /foo will also match /bar. Exact path matches are taken...
java
public synchronized PathMatcher addPrefixPath(final String path, final T handler) { if (path.isEmpty()) { throw UndertowMessages.MESSAGES.pathMustBeSpecified(); } final String normalizedPath = URLUtils.normalizeSlashes(path); if (PathMatcher.STRING_PATH_SEPARATOR.equals(nor...
[ "public", "synchronized", "PathMatcher", "addPrefixPath", "(", "final", "String", "path", ",", "final", "T", "handler", ")", "{", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "throw", "UndertowMessages", ".", "MESSAGES", ".", "pathMustBeSpecified", ...
Adds a path prefix and a handler for that path. If the path does not start with a / then one will be prepended. <p> The match is done on a prefix bases, so registering /foo will also match /bar. Exact path matches are taken into account first. <p> If / is specified as the path then it will replace the default handler. ...
[ "Adds", "a", "path", "prefix", "and", "a", "handler", "for", "that", "path", ".", "If", "the", "path", "does", "not", "start", "with", "a", "/", "then", "one", "will", "be", "prepended", ".", "<p", ">", "The", "match", "is", "done", "on", "a", "pre...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/PathMatcher.java#L113-L129
cbeust/jcommander
src/main/java/com/beust/jcommander/DefaultUsageFormatter.java
DefaultUsageFormatter.getI18nString
public static String getI18nString(ResourceBundle bundle, String key, String def) { """ Returns the internationalized version of the string if available, otherwise it returns <tt>def</tt>. @return the internationalized version of the string if available, otherwise it returns <tt>def</tt> """ String ...
java
public static String getI18nString(ResourceBundle bundle, String key, String def) { String s = bundle != null ? bundle.getString(key) : null; return s != null ? s : def; }
[ "public", "static", "String", "getI18nString", "(", "ResourceBundle", "bundle", ",", "String", "key", ",", "String", "def", ")", "{", "String", "s", "=", "bundle", "!=", "null", "?", "bundle", ".", "getString", "(", "key", ")", ":", "null", ";", "return"...
Returns the internationalized version of the string if available, otherwise it returns <tt>def</tt>. @return the internationalized version of the string if available, otherwise it returns <tt>def</tt>
[ "Returns", "the", "internationalized", "version", "of", "the", "string", "if", "available", "otherwise", "it", "returns", "<tt", ">", "def<", "/", "tt", ">", "." ]
train
https://github.com/cbeust/jcommander/blob/85cb6f7217e15f62225185ffd97491f34b7b49bb/src/main/java/com/beust/jcommander/DefaultUsageFormatter.java#L362-L365
srikalyc/Sql4D
Sql4Ddriver/src/main/java/com/yahoo/sql4d/sql4ddriver/BaseJoiner.java
BaseJoiner.dataItemAt
protected JSONObject dataItemAt(JSONObject jsonItem, RequestType requestType, ActionType action) { """ Extract the data item from json(based on the request type) and also fill in the headers as a side affect. @param jsonItem @param requestType @param action @return """ JSONObject eachRow = null; ...
java
protected JSONObject dataItemAt(JSONObject jsonItem, RequestType requestType, ActionType action) { JSONObject eachRow = null; if (requestType == RequestType.GROUPBY) { eachRow = jsonItem.getJSONObject("event"); } else if (requestType == RequestType.TIMESERIES) { each...
[ "protected", "JSONObject", "dataItemAt", "(", "JSONObject", "jsonItem", ",", "RequestType", "requestType", ",", "ActionType", "action", ")", "{", "JSONObject", "eachRow", "=", "null", ";", "if", "(", "requestType", "==", "RequestType", ".", "GROUPBY", ")", "{", ...
Extract the data item from json(based on the request type) and also fill in the headers as a side affect. @param jsonItem @param requestType @param action @return
[ "Extract", "the", "data", "item", "from", "json", "(", "based", "on", "the", "request", "type", ")", "and", "also", "fill", "in", "the", "headers", "as", "a", "side", "affect", "." ]
train
https://github.com/srikalyc/Sql4D/blob/2c052fe60ead5a16277c798a3440de7d4f6f24f6/Sql4Ddriver/src/main/java/com/yahoo/sql4d/sql4ddriver/BaseJoiner.java#L71-L81
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/generator/io/GeneratorSetJson.java
GeneratorSetJson.asGeneratorSet
public static IGeneratorSet asGeneratorSet( JsonObject json) { """ Returns the IGeneratorSet represented by the given JSON object. """ GeneratorSet generatorSet = new GeneratorSet(); // Get generator definitions json.keySet().stream() .forEach( function -> { try { ...
java
public static IGeneratorSet asGeneratorSet( JsonObject json) { GeneratorSet generatorSet = new GeneratorSet(); // Get generator definitions json.keySet().stream() .forEach( function -> { try { generatorSet.addGenerator( validFunction( function), asGenerator( json.getJs...
[ "public", "static", "IGeneratorSet", "asGeneratorSet", "(", "JsonObject", "json", ")", "{", "GeneratorSet", "generatorSet", "=", "new", "GeneratorSet", "(", ")", ";", "// Get generator definitions", "json", ".", "keySet", "(", ")", ".", "stream", "(", ")", ".", ...
Returns the IGeneratorSet represented by the given JSON object.
[ "Returns", "the", "IGeneratorSet", "represented", "by", "the", "given", "JSON", "object", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/generator/io/GeneratorSetJson.java#L41-L59
jenkinsci/jenkins
core/src/main/java/jenkins/util/FullDuplexHttpService.java
FullDuplexHttpService.download
public synchronized void download(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { """ This is where we send the data to the client. <p> If this connection is lost, we'll abort the channel. """ rsp.setStatus(HttpServletResponse.SC_OK); // server->client c...
java
public synchronized void download(StaplerRequest req, StaplerResponse rsp) throws InterruptedException, IOException { rsp.setStatus(HttpServletResponse.SC_OK); // server->client channel. // this is created first, and this controls the lifespan of the channel rsp.addHeader("Transfer-Enco...
[ "public", "synchronized", "void", "download", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "InterruptedException", ",", "IOException", "{", "rsp", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_OK", ")", ";", "// server->client...
This is where we send the data to the client. <p> If this connection is lost, we'll abort the channel.
[ "This", "is", "where", "we", "send", "the", "data", "to", "the", "client", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/FullDuplexHttpService.java#L85-L121
indeedeng/proctor
proctor-store-svn/src/main/java/com/indeed/proctor/store/SvnPersisterCoreImpl.java
SvnPersisterCoreImpl.getMostRecentLogEntry
private SVNLogEntry getMostRecentLogEntry(final SVNClientManager clientManager, final String path, final SVNRevision startRevision) throws SVNException { """ Returns the most recent log entry startRevision. startRevision should not be HEAD because the path @HEAD could be deleted. @param path @param startRevis...
java
private SVNLogEntry getMostRecentLogEntry(final SVNClientManager clientManager, final String path, final SVNRevision startRevision) throws SVNException { final String[] targetPaths = {path}; final SVNLogClient logClient = clientManager.getLogClient(); final FilterableSVNLogEntryHandler handler ...
[ "private", "SVNLogEntry", "getMostRecentLogEntry", "(", "final", "SVNClientManager", "clientManager", ",", "final", "String", "path", ",", "final", "SVNRevision", "startRevision", ")", "throws", "SVNException", "{", "final", "String", "[", "]", "targetPaths", "=", "...
Returns the most recent log entry startRevision. startRevision should not be HEAD because the path @HEAD could be deleted. @param path @param startRevision @return @throws SVNException
[ "Returns", "the", "most", "recent", "log", "entry", "startRevision", ".", "startRevision", "should", "not", "be", "HEAD", "because", "the", "path", "@HEAD", "could", "be", "deleted", "." ]
train
https://github.com/indeedeng/proctor/blob/b7795acfc26a30d013655d0e0fa1d3f8d0576571/proctor-store-svn/src/main/java/com/indeed/proctor/store/SvnPersisterCoreImpl.java#L215-L238
oasp/oasp4j
modules/json/src/main/java/io/oasp/module/json/common/base/ObjectMapperFactory.java
ObjectMapperFactory.getExtensionModule
public SimpleModule getExtensionModule() { """ Gets access to a generic extension {@link SimpleModule module} for customizations to Jackson JSON mapping. @see SimpleModule#addSerializer(Class, com.fasterxml.jackson.databind.JsonSerializer) @see SimpleModule#addDeserializer(Class, com.fasterxml.jackson.databind...
java
public SimpleModule getExtensionModule() { if (this.extensionModule == null) { this.extensionModule = new SimpleModule("oasp.ExtensionModule", new Version(1, 0, 0, null, GROUP_ID, ARTIFACT_ID)); } return this.extensionModule; }
[ "public", "SimpleModule", "getExtensionModule", "(", ")", "{", "if", "(", "this", ".", "extensionModule", "==", "null", ")", "{", "this", ".", "extensionModule", "=", "new", "SimpleModule", "(", "\"oasp.ExtensionModule\"", ",", "new", "Version", "(", "1", ",",...
Gets access to a generic extension {@link SimpleModule module} for customizations to Jackson JSON mapping. @see SimpleModule#addSerializer(Class, com.fasterxml.jackson.databind.JsonSerializer) @see SimpleModule#addDeserializer(Class, com.fasterxml.jackson.databind.JsonDeserializer) @return extensionModule
[ "Gets", "access", "to", "a", "generic", "extension", "{", "@link", "SimpleModule", "module", "}", "for", "customizations", "to", "Jackson", "JSON", "mapping", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/json/src/main/java/io/oasp/module/json/common/base/ObjectMapperFactory.java#L50-L57
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLister.java
ClassLister.updateClasses
protected void updateClasses(HashMap<String,HashSet<Class>> cache, String superclass, HashSet<Class> names) { """ Updates cache for the superclass. @param cache the cache to update @param superclass the superclass @param names the names to add """ if (!cache.containsKey(superclass)) cache.put(su...
java
protected void updateClasses(HashMap<String,HashSet<Class>> cache, String superclass, HashSet<Class> names) { if (!cache.containsKey(superclass)) cache.put(superclass, names); else cache.get(superclass).addAll(names); }
[ "protected", "void", "updateClasses", "(", "HashMap", "<", "String", ",", "HashSet", "<", "Class", ">", ">", "cache", ",", "String", "superclass", ",", "HashSet", "<", "Class", ">", "names", ")", "{", "if", "(", "!", "cache", ".", "containsKey", "(", "...
Updates cache for the superclass. @param cache the cache to update @param superclass the superclass @param names the names to add
[ "Updates", "cache", "for", "the", "superclass", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLister.java#L252-L257
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.getString
private static final String getString(CharacterIterator text, int start, int length) { """ Gets a substring out of a CharacterIterator Java porting note: Not available in ICU4C @param text CharacterIterator @param start start offset @param length of substring @return substring from text starting at start ...
java
private static final String getString(CharacterIterator text, int start, int length) { StringBuilder result = new StringBuilder(length); int offset = text.getIndex(); text.setIndex(start); for (int i = 0; i < length; i++) { result.append(text.current()); text.next...
[ "private", "static", "final", "String", "getString", "(", "CharacterIterator", "text", ",", "int", "start", ",", "int", "length", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", "length", ")", ";", "int", "offset", "=", "text", ".", ...
Gets a substring out of a CharacterIterator Java porting note: Not available in ICU4C @param text CharacterIterator @param start start offset @param length of substring @return substring from text starting at start and length length
[ "Gets", "a", "substring", "out", "of", "a", "CharacterIterator" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L1580-L1590
G2G3Digital/substeps-framework
core/src/main/java/com/technophobia/substeps/runner/syntax/SubStepDefinitionParser.java
SubStepDefinitionParser.storeForPatternOrThrowException
private void storeForPatternOrThrowException(final String newPattern, final ParentStep parentStep) throws DuplicatePatternException { """ /* private void processDirective(final Directive d, final String remainder, final File source, final int lineNumber) { this.currentDirective = d; switch (this.c...
java
private void storeForPatternOrThrowException(final String newPattern, final ParentStep parentStep) throws DuplicatePatternException { if (!this.parentMap.containsPattern(newPattern)) { this.parentMap.put(newPattern, parentStep); } else { throw new DuplicatePatternExc...
[ "private", "void", "storeForPatternOrThrowException", "(", "final", "String", "newPattern", ",", "final", "ParentStep", "parentStep", ")", "throws", "DuplicatePatternException", "{", "if", "(", "!", "this", ".", "parentMap", ".", "containsPattern", "(", "newPattern", ...
/* private void processDirective(final Directive d, final String remainder, final File source, final int lineNumber) { this.currentDirective = d; switch (this.currentDirective) { case DEFINITION: { // build up a Step from the remainder final Step parent = new Step(remainder, true, source, lineNumber); if (this.cur...
[ "/", "*", "private", "void", "processDirective", "(", "final", "Directive", "d", "final", "String", "remainder", "final", "File", "source", "final", "int", "lineNumber", ")", "{", "this", ".", "currentDirective", "=", "d", ";" ]
train
https://github.com/G2G3Digital/substeps-framework/blob/c1ec6487e1673a7dae54b5e7b62a96f602cd280a/core/src/main/java/com/technophobia/substeps/runner/syntax/SubStepDefinitionParser.java#L246-L255
alkacon/opencms-core
src/org/opencms/jsp/decorator/CmsHtmlDecorator.java
CmsHtmlDecorator.startsWithDelimiter
private boolean startsWithDelimiter(String word, String[] delimiters) { """ Checks if a word starts with a given delimiter.<p> @param word the word to test @param delimiters array of delimiter strings @return true if the word starts with the delimiter, false otherwiese """ boolean delim = false; ...
java
private boolean startsWithDelimiter(String word, String[] delimiters) { boolean delim = false; for (int i = 0; i < delimiters.length; i++) { if (word.startsWith(delimiters[i])) { delim = true; break; } } return delim; }
[ "private", "boolean", "startsWithDelimiter", "(", "String", "word", ",", "String", "[", "]", "delimiters", ")", "{", "boolean", "delim", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "delimiters", ".", "length", ";", "i", "++", ...
Checks if a word starts with a given delimiter.<p> @param word the word to test @param delimiters array of delimiter strings @return true if the word starts with the delimiter, false otherwiese
[ "Checks", "if", "a", "word", "starts", "with", "a", "given", "delimiter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/decorator/CmsHtmlDecorator.java#L514-L524
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/scripting/ExecutableScript.java
ExecutableScript.execute
public Object execute(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings) { """ <p>Evaluates the script using the provided engine and bindings</p> @param scriptEngine the script engine to use for evaluating the script. @param variableScope the variable scope of the execution @param bind...
java
public Object execute(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings) { return evaluate(scriptEngine, variableScope, bindings); }
[ "public", "Object", "execute", "(", "ScriptEngine", "scriptEngine", ",", "VariableScope", "variableScope", ",", "Bindings", "bindings", ")", "{", "return", "evaluate", "(", "scriptEngine", ",", "variableScope", ",", "bindings", ")", ";", "}" ]
<p>Evaluates the script using the provided engine and bindings</p> @param scriptEngine the script engine to use for evaluating the script. @param variableScope the variable scope of the execution @param bindings the bindings to use for evaluating the script. @throws ProcessEngineException in case the script cannot be ...
[ "<p", ">", "Evaluates", "the", "script", "using", "the", "provided", "engine", "and", "bindings<", "/", "p", ">" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/scripting/ExecutableScript.java#L62-L64
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/Model.java
Model.getSqlPara
public SqlPara getSqlPara(String key, Model model) { """ 可以在模板中利用 Model 自身的属性参与动态生成 sql,例如: select * from user where nickName = #(nickName) new Account().setNickName("James").getSqlPara(...) 注意:由于 dao 对象上的 attrs 不允许读写,不要调用其 getSqlPara(String) 方法 public SqlPara getSqlPara(String key) { return getSqlPara(ke...
java
public SqlPara getSqlPara(String key, Model model) { return getSqlPara(key, model.attrs); }
[ "public", "SqlPara", "getSqlPara", "(", "String", "key", ",", "Model", "model", ")", "{", "return", "getSqlPara", "(", "key", ",", "model", ".", "attrs", ")", ";", "}" ]
可以在模板中利用 Model 自身的属性参与动态生成 sql,例如: select * from user where nickName = #(nickName) new Account().setNickName("James").getSqlPara(...) 注意:由于 dao 对象上的 attrs 不允许读写,不要调用其 getSqlPara(String) 方法 public SqlPara getSqlPara(String key) { return getSqlPara(key, this.attrs); }
[ "可以在模板中利用", "Model", "自身的属性参与动态生成", "sql,例如:", "select", "*", "from", "user", "where", "nickName", "=", "#", "(", "nickName", ")", "new", "Account", "()", ".", "setNickName", "(", "James", ")", ".", "getSqlPara", "(", "...", ")" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/Model.java#L1038-L1040
k3po/k3po
lang/src/main/java/org/kaazing/k3po/lang/el/FunctionMapper.java
FunctionMapper.newFunctionMapper
public static FunctionMapper newFunctionMapper() { """ Creates a new Function Mapper. @return returns an instance of the FunctionMapper """ ServiceLoader<FunctionMapperSpi> loader = loadFunctionMapperSpi(); // load FunctionMapperSpi instances ConcurrentMap<String, FunctionMapperSpi> f...
java
public static FunctionMapper newFunctionMapper() { ServiceLoader<FunctionMapperSpi> loader = loadFunctionMapperSpi(); // load FunctionMapperSpi instances ConcurrentMap<String, FunctionMapperSpi> functionMappers = new ConcurrentHashMap<>(); for (FunctionMapperSpi functionMapperSpi : load...
[ "public", "static", "FunctionMapper", "newFunctionMapper", "(", ")", "{", "ServiceLoader", "<", "FunctionMapperSpi", ">", "loader", "=", "loadFunctionMapperSpi", "(", ")", ";", "// load FunctionMapperSpi instances", "ConcurrentMap", "<", "String", ",", "FunctionMapperSpi"...
Creates a new Function Mapper. @return returns an instance of the FunctionMapper
[ "Creates", "a", "new", "Function", "Mapper", "." ]
train
https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/lang/src/main/java/org/kaazing/k3po/lang/el/FunctionMapper.java#L44-L58
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java
AttributedString.attributeValuesMatch
private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) { """ returns whether all specified attributes have equal values in the runs with the given indices """ Iterator iterator = attributes.iterator(); while (iterator.hasNext()) { Attribute key = (Attribu...
java
private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) { Iterator iterator = attributes.iterator(); while (iterator.hasNext()) { Attribute key = (Attribute) iterator.next(); if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {...
[ "private", "boolean", "attributeValuesMatch", "(", "Set", "attributes", ",", "int", "runIndex1", ",", "int", "runIndex2", ")", "{", "Iterator", "iterator", "=", "attributes", ".", "iterator", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")",...
returns whether all specified attributes have equal values in the runs with the given indices
[ "returns", "whether", "all", "specified", "attributes", "have", "equal", "values", "in", "the", "runs", "with", "the", "given", "indices" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java#L653-L662
dickschoeller/gedbrowser
geoservice-persistence/src/main/java/org/schoellerfamily/geoservice/model/GeoServiceBounds.java
GeoServiceBounds.createBounds
public static Feature createBounds(final String id, final LngLatAlt southwest, final LngLatAlt northeast) { """ Build a bounding box feature. @param id the ID string @param southwest the southwest corner of the bounding box @param northeast the northeast corner of the bounding box @re...
java
public static Feature createBounds(final String id, final LngLatAlt southwest, final LngLatAlt northeast) { final Feature feature = new Feature(); feature.setId(id); if (northeast == null || southwest == null) { throw new IllegalArgumentException( ...
[ "public", "static", "Feature", "createBounds", "(", "final", "String", "id", ",", "final", "LngLatAlt", "southwest", ",", "final", "LngLatAlt", "northeast", ")", "{", "final", "Feature", "feature", "=", "new", "Feature", "(", ")", ";", "feature", ".", "setId...
Build a bounding box feature. @param id the ID string @param southwest the southwest corner of the bounding box @param northeast the northeast corner of the bounding box @return the Feature for the new bounds
[ "Build", "a", "bounding", "box", "feature", "." ]
train
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/geoservice-persistence/src/main/java/org/schoellerfamily/geoservice/model/GeoServiceBounds.java#L54-L81
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_traffic_duration_POST
public OvhOrder dedicated_server_serviceName_traffic_duration_POST(String serviceName, String duration, OvhTrafficOrderEnum traffic) throws IOException { """ Create order REST: POST /order/dedicated/server/{serviceName}/traffic/{duration} @param traffic [required] amount of traffic to allocate @param serviceN...
java
public OvhOrder dedicated_server_serviceName_traffic_duration_POST(String serviceName, String duration, OvhTrafficOrderEnum traffic) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/traffic/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new...
[ "public", "OvhOrder", "dedicated_server_serviceName_traffic_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhTrafficOrderEnum", "traffic", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName}/traffi...
Create order REST: POST /order/dedicated/server/{serviceName}/traffic/{duration} @param traffic [required] amount of traffic to allocate @param serviceName [required] The internal name of your dedicated server @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2273-L2280
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.bucketSort
public static <T extends Comparable<T>> void bucketSort(final List<T> c, final int fromIndex, final int toIndex) { """ Note: All the objects with same value will be replaced with first element with the same value. @param c @param fromIndex @param toIndex """ Array.bucketSort(c, fromIndex, toIndex...
java
public static <T extends Comparable<T>> void bucketSort(final List<T> c, final int fromIndex, final int toIndex) { Array.bucketSort(c, fromIndex, toIndex); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "void", "bucketSort", "(", "final", "List", "<", "T", ">", "c", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ")", "{", "Array", ".", "bucketSort", "(", "c...
Note: All the objects with same value will be replaced with first element with the same value. @param c @param fromIndex @param toIndex
[ "Note", ":", "All", "the", "objects", "with", "same", "value", "will", "be", "replaced", "with", "first", "element", "with", "the", "same", "value", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L12044-L12046
googleapis/google-cloud-java
google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Acl.java
Acl.of
public static Acl of(Entity entity, Role role) { """ Returns an {@code Acl} object. @param entity the entity for this ACL object @param role the role to associate to the {@code entity} object """ return newBuilder(entity, role).build(); }
java
public static Acl of(Entity entity, Role role) { return newBuilder(entity, role).build(); }
[ "public", "static", "Acl", "of", "(", "Entity", "entity", ",", "Role", "role", ")", "{", "return", "newBuilder", "(", "entity", ",", "role", ")", ".", "build", "(", ")", ";", "}" ]
Returns an {@code Acl} object. @param entity the entity for this ACL object @param role the role to associate to the {@code entity} object
[ "Returns", "an", "{", "@code", "Acl", "}", "object", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Acl.java#L442-L444
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Error.java
Error.insertStrings
private static String insertStrings(String message, Object[] add) { """ Compose error message by inserting the strings in the add variables in placeholders within the error message. The message string contains $$ markers for each context variable. Context variables are supplied in the add parameter. (by Loic Le...
java
private static String insertStrings(String message, Object[] add) { StringBuffer sb = new StringBuffer(message.length() + 32); int lastIndex = 0; int escIndex = message.length(); // removed test: i < add.length // because if mainErrorMessage is equal t...
[ "private", "static", "String", "insertStrings", "(", "String", "message", ",", "Object", "[", "]", "add", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "message", ".", "length", "(", ")", "+", "32", ")", ";", "int", "lastIndex", "=", ...
Compose error message by inserting the strings in the add variables in placeholders within the error message. The message string contains $$ markers for each context variable. Context variables are supplied in the add parameter. (by Loic Lefevre) @param message message string @param add optional parameters @ret...
[ "Compose", "error", "message", "by", "inserting", "the", "strings", "in", "the", "add", "variables", "in", "placeholders", "within", "the", "error", "message", ".", "The", "message", "string", "contains", "$$", "markers", "for", "each", "context", "variable", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Error.java#L153-L182
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setTopicConfigs
public Config setTopicConfigs(Map<String, TopicConfig> topicConfigs) { """ Sets the map of {@link com.hazelcast.core.ITopic} configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param topicConfigs the topic configuration map to s...
java
public Config setTopicConfigs(Map<String, TopicConfig> topicConfigs) { this.topicConfigs.clear(); this.topicConfigs.putAll(topicConfigs); for (final Entry<String, TopicConfig> entry : this.topicConfigs.entrySet()) { entry.getValue().setName(entry.getKey()); } return t...
[ "public", "Config", "setTopicConfigs", "(", "Map", "<", "String", ",", "TopicConfig", ">", "topicConfigs", ")", "{", "this", ".", "topicConfigs", ".", "clear", "(", ")", ";", "this", ".", "topicConfigs", ".", "putAll", "(", "topicConfigs", ")", ";", "for",...
Sets the map of {@link com.hazelcast.core.ITopic} configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param topicConfigs the topic configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "{", "@link", "com", ".", "hazelcast", ".", "core", ".", "ITopic", "}", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", "w...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L1774-L1781