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
jenkinsci/jenkins
core/src/main/java/hudson/Launcher.java
Launcher.printCommandLine
protected final void printCommandLine(@Nonnull String[] cmd, @CheckForNull FilePath workDir) { """ Prints out the command line to the listener so that users know what we are doing. """ StringBuilder buf = new StringBuilder(); if (workDir != null) { buf.append('['); if(sh...
java
protected final void printCommandLine(@Nonnull String[] cmd, @CheckForNull FilePath workDir) { StringBuilder buf = new StringBuilder(); if (workDir != null) { buf.append('['); if(showFullPath) buf.append(workDir.getRemote()); else buf.a...
[ "protected", "final", "void", "printCommandLine", "(", "@", "Nonnull", "String", "[", "]", "cmd", ",", "@", "CheckForNull", "FilePath", "workDir", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "workDir", "!=", "nu...
Prints out the command line to the listener so that users know what we are doing.
[ "Prints", "out", "the", "command", "line", "to", "the", "listener", "so", "that", "users", "know", "what", "we", "are", "doing", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Launcher.java#L742-L765
joniles/mpxj
src/main/java/net/sf/mpxj/common/FieldTypeHelper.java
FieldTypeHelper.getPlaceholder
private static FieldType getPlaceholder(final Class<?> type, final int fieldID) { """ Generate a placeholder for an unknown type. @param type expected type @param fieldID field ID @return placeholder """ return new FieldType() { @Override public FieldTypeClass getFieldTypeClass() ...
java
private static FieldType getPlaceholder(final Class<?> type, final int fieldID) { return new FieldType() { @Override public FieldTypeClass getFieldTypeClass() { return FieldTypeClass.UNKNOWN; } @Override public String name() { return "...
[ "private", "static", "FieldType", "getPlaceholder", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "int", "fieldID", ")", "{", "return", "new", "FieldType", "(", ")", "{", "@", "Override", "public", "FieldTypeClass", "getFieldTypeClass", "(", ")...
Generate a placeholder for an unknown type. @param type expected type @param fieldID field ID @return placeholder
[ "Generate", "a", "placeholder", "for", "an", "unknown", "type", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FieldTypeHelper.java#L218-L262
GCRC/nunaliit
nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/StreamUtils.java
StreamUtils.copyStream
static public void copyStream(Reader reader, Writer writer, int transferBufferSize) throws IOException { """ Copy all the characters from a reader to a writer. @param reader Input character stream @param writer Output character stream @param transferBufferSize Size of character buffer used to transfer character...
java
static public void copyStream(Reader reader, Writer writer, int transferBufferSize) throws IOException { if( transferBufferSize < 1 ) { throw new IOException("Transfer buffer size can not be smaller than 1"); } char[] buffer = new char[transferBufferSize]; int bytesRead = reader.read(buffer); while( byte...
[ "static", "public", "void", "copyStream", "(", "Reader", "reader", ",", "Writer", "writer", ",", "int", "transferBufferSize", ")", "throws", "IOException", "{", "if", "(", "transferBufferSize", "<", "1", ")", "{", "throw", "new", "IOException", "(", "\"Transfe...
Copy all the characters from a reader to a writer. @param reader Input character stream @param writer Output character stream @param transferBufferSize Size of character buffer used to transfer characters from one stream to the other @throws IOException
[ "Copy", "all", "the", "characters", "from", "a", "reader", "to", "a", "writer", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/StreamUtils.java#L64-L77
spring-projects/spring-social
spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java
ConnectController.oauth2ErrorCallback
@RequestMapping(value="/ { """ Process an error callback from an OAuth 2 authorization as described at https://tools.ietf.org/html/rfc6749#section-4.1.2.1. Called after upon redirect from an OAuth 2 provider when there is some sort of error during authorization, typically because the user denied authorization. @...
java
@RequestMapping(value="/{providerId}", method=RequestMethod.GET, params="error") public RedirectView oauth2ErrorCallback(@PathVariable String providerId, @RequestParam("error") String error, @RequestParam(value="error_description", required=false) String errorDescription, @RequestParam(value="error_uri", re...
[ "@", "RequestMapping", "(", "value", "=", "\"/{providerId}\"", ",", "method", "=", "RequestMethod", ".", "GET", ",", "params", "=", "\"error\"", ")", "public", "RedirectView", "oauth2ErrorCallback", "(", "@", "PathVariable", "String", "providerId", ",", "@", "Re...
Process an error callback from an OAuth 2 authorization as described at https://tools.ietf.org/html/rfc6749#section-4.1.2.1. Called after upon redirect from an OAuth 2 provider when there is some sort of error during authorization, typically because the user denied authorization. @param providerId the provider ID that ...
[ "Process", "an", "error", "callback", "from", "an", "OAuth", "2", "authorization", "as", "described", "at", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc6749#section", "-", "4", ".", "1", ".", "2", ".", "1", ".", "Calle...
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java#L310-L322
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/ClassUtils.java
ClassUtils.getShortClassName
public static String getShortClassName(final Object object, final String valueIfNull) { """ <p>Gets the class name minus the package name for an {@code Object}.</p> @param object the class to get the short name for, may be null @param valueIfNull the value to return if null @return the class name of the obj...
java
public static String getShortClassName(final Object object, final String valueIfNull) { if (object == null) { return valueIfNull; } return getShortClassName(object.getClass()); }
[ "public", "static", "String", "getShortClassName", "(", "final", "Object", "object", ",", "final", "String", "valueIfNull", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "valueIfNull", ";", "}", "return", "getShortClassName", "(", "object", ...
<p>Gets the class name minus the package name for an {@code Object}.</p> @param object the class to get the short name for, may be null @param valueIfNull the value to return if null @return the class name of the object without the package name, or the null value
[ "<p", ">", "Gets", "the", "class", "name", "minus", "the", "package", "name", "for", "an", "{", "@code", "Object", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/ClassUtils.java#L176-L181
wkgcass/Style
src/main/java/net/cassite/style/aggregation/ListFuncSup.java
ListFuncSup.forEach
public <R> R forEach(RFunc2<R, T, IteratorInfo<R>> func, int index) { """ define a function to deal with each element in the list with given start index @param func a function takes in each element from list and iterator info<br> and returns last loop value @param index the index where to start iteration ...
java
public <R> R forEach(RFunc2<R, T, IteratorInfo<R>> func, int index) { return forEach($(func), index); }
[ "public", "<", "R", ">", "R", "forEach", "(", "RFunc2", "<", "R", ",", "T", ",", "IteratorInfo", "<", "R", ">", ">", "func", ",", "int", "index", ")", "{", "return", "forEach", "(", "$", "(", "func", ")", ",", "index", ")", ";", "}" ]
define a function to deal with each element in the list with given start index @param func a function takes in each element from list and iterator info<br> and returns last loop value @param index the index where to start iteration @return return 'last loop value'.<br> check <a href="https://github.com/wkgcass/Style/"...
[ "define", "a", "function", "to", "deal", "with", "each", "element", "in", "the", "list", "with", "given", "start", "index" ]
train
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/aggregation/ListFuncSup.java#L123-L125
neo4j/neo4j-java-driver
driver/src/main/java/org/neo4j/driver/internal/util/Preconditions.java
Preconditions.checkArgument
public static void checkArgument( Object argument, Class<?> expectedClass ) { """ Assert that given argument is of expected type. @param argument the object to check. @param expectedClass the expected type. @throws IllegalArgumentException if argument is not of expected type. """ if ( !expectedCla...
java
public static void checkArgument( Object argument, Class<?> expectedClass ) { if ( !expectedClass.isInstance( argument ) ) { throw new IllegalArgumentException( "Argument expected to be of type: " + expectedClass.getName() + " but was: " + argument ); } }
[ "public", "static", "void", "checkArgument", "(", "Object", "argument", ",", "Class", "<", "?", ">", "expectedClass", ")", "{", "if", "(", "!", "expectedClass", ".", "isInstance", "(", "argument", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(...
Assert that given argument is of expected type. @param argument the object to check. @param expectedClass the expected type. @throws IllegalArgumentException if argument is not of expected type.
[ "Assert", "that", "given", "argument", "is", "of", "expected", "type", "." ]
train
https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/util/Preconditions.java#L49-L55
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/ws/kernel/service/util/OperatingSystem.java
OperatingSystem.executeProgramWithInput
@FFDCIgnore( { """ On recent JDKs, this should do a fork that doesn't duplicate the whole virtual address space. @param input Optional stdin. @param commandLine The program and any arguments. @return A list of Strings for the output @throws OperatingSystemException If return code is not 0. """ IOExce...
java
@FFDCIgnore({ IOException.class, InterruptedException.class }) public static List<String> executeProgramWithInput(String input, String... commandLine) throws OperatingSystemException { try { ProcessBuilder builder = new ProcessBuilder(); builder.command(commandLine); Pr...
[ "@", "FFDCIgnore", "(", "{", "IOException", ".", "class", ",", "InterruptedException", ".", "class", "}", ")", "public", "static", "List", "<", "String", ">", "executeProgramWithInput", "(", "String", "input", ",", "String", "...", "commandLine", ")", "throws"...
On recent JDKs, this should do a fork that doesn't duplicate the whole virtual address space. @param input Optional stdin. @param commandLine The program and any arguments. @return A list of Strings for the output @throws OperatingSystemException If return code is not 0.
[ "On", "recent", "JDKs", "this", "should", "do", "a", "fork", "that", "doesn", "t", "duplicate", "the", "whole", "virtual", "address", "space", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/ws/kernel/service/util/OperatingSystem.java#L142-L184
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/rendertheme/rule/RenderTheme.java
RenderTheme.matchNode
public synchronized void matchNode(RenderCallback renderCallback, final RenderContext renderContext, PointOfInterest poi) { """ Matches a node with the given parameters against this RenderTheme. @param renderCallback the callback implementation which will be executed on each match. @param renderContext @param...
java
public synchronized void matchNode(RenderCallback renderCallback, final RenderContext renderContext, PointOfInterest poi) { MatchingCacheKey matchingCacheKey = new MatchingCacheKey(poi.tags, renderContext.rendererJob.tile.zoomLevel, Closed.NO); List<RenderInstruction> matchingList = this.poiMatchingCac...
[ "public", "synchronized", "void", "matchNode", "(", "RenderCallback", "renderCallback", ",", "final", "RenderContext", "renderContext", ",", "PointOfInterest", "poi", ")", "{", "MatchingCacheKey", "matchingCacheKey", "=", "new", "MatchingCacheKey", "(", "poi", ".", "t...
Matches a node with the given parameters against this RenderTheme. @param renderCallback the callback implementation which will be executed on each match. @param renderContext @param poi the point of interest.
[ "Matches", "a", "node", "with", "the", "given", "parameters", "against", "this", "RenderTheme", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/rendertheme/rule/RenderTheme.java#L133-L152
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.findAny
public <T> T findAny(Class<T> classType, String uri) { """ This method finds any document given a URI. <p>The URI must be URI-encoded.</p> <P> Example usage retrieving the Foo POJO with document ID "exampleId" from the database "exampleDb" in the "example" Cloudant account. </P> <pre> {@code Foo foo = db.f...
java
public <T> T findAny(Class<T> classType, String uri) { return db.findAny(classType, uri); }
[ "public", "<", "T", ">", "T", "findAny", "(", "Class", "<", "T", ">", "classType", ",", "String", "uri", ")", "{", "return", "db", ".", "findAny", "(", "classType", ",", "uri", ")", ";", "}" ]
This method finds any document given a URI. <p>The URI must be URI-encoded.</p> <P> Example usage retrieving the Foo POJO with document ID "exampleId" from the database "exampleDb" in the "example" Cloudant account. </P> <pre> {@code Foo foo = db.findAny(Foo.class, "https://example.cloudant.com/exampleDb/exampleId"); }...
[ "This", "method", "finds", "any", "document", "given", "a", "URI", ".", "<p", ">", "The", "URI", "must", "be", "URI", "-", "encoded", ".", "<", "/", "p", ">", "<P", ">", "Example", "usage", "retrieving", "the", "Foo", "POJO", "with", "document", "ID"...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L825-L827
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/message/analytics/GenericAnalyticsRequest.java
GenericAnalyticsRequest.jsonQuery
public static GenericAnalyticsRequest jsonQuery(String jsonQuery, String bucket, String username, String password) { """ Create a {@link GenericAnalyticsRequest} and mark it as containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single ...
java
public static GenericAnalyticsRequest jsonQuery(String jsonQuery, String bucket, String username, String password) { return jsonQuery(jsonQuery, bucket, username, password, NO_PRIORITY); }
[ "public", "static", "GenericAnalyticsRequest", "jsonQuery", "(", "String", "jsonQuery", ",", "String", "bucket", ",", "String", "username", ",", "String", "password", ")", "{", "return", "jsonQuery", "(", "jsonQuery", ",", "bucket", ",", "username", ",", "passwo...
Create a {@link GenericAnalyticsRequest} and mark it as containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object: <pre>{"statement":"SELECT * FROM default"}</pre>. @param jsonQuery the Analytics ...
[ "Create", "a", "{", "@link", "GenericAnalyticsRequest", "}", "and", "mark", "it", "as", "containing", "a", "full", "Analytics", "query", "in", "Json", "form", "(", "including", "additional", "query", "parameters", ")", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/message/analytics/GenericAnalyticsRequest.java#L132-L134
grpc/grpc-java
xds/src/main/java/io/grpc/xds/XdsLoadReportStore.java
XdsLoadReportStore.interceptPickResult
PickResult interceptPickResult(PickResult pickResult, Locality locality) { """ Intercepts a in-locality PickResult with load recording {@link ClientStreamTracer.Factory}. """ if (!pickResult.getStatus().isOk()) { return pickResult; } XdsClientLoadRecorder.ClientLoadCounter counter = localityL...
java
PickResult interceptPickResult(PickResult pickResult, Locality locality) { if (!pickResult.getStatus().isOk()) { return pickResult; } XdsClientLoadRecorder.ClientLoadCounter counter = localityLoadCounters.get(locality); if (counter == null) { return pickResult; } ClientStreamTracer.F...
[ "PickResult", "interceptPickResult", "(", "PickResult", "pickResult", ",", "Locality", "locality", ")", "{", "if", "(", "!", "pickResult", ".", "getStatus", "(", ")", ".", "isOk", "(", ")", ")", "{", "return", "pickResult", ";", "}", "XdsClientLoadRecorder", ...
Intercepts a in-locality PickResult with load recording {@link ClientStreamTracer.Factory}.
[ "Intercepts", "a", "in", "-", "locality", "PickResult", "with", "load", "recording", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/xds/src/main/java/io/grpc/xds/XdsLoadReportStore.java#L139-L153
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java
MiniTemplator.generateOutput
public void generateOutput(String outputFileName) throws IOException { """ Generates the HTML page and writes it into a file. @param outputFileName name of the file to which the generated HTML page will be written. @throws IOException when an i/o error occurs while writing to the file. """ FileOut...
java
public void generateOutput(String outputFileName) throws IOException { FileOutputStream stream = null; OutputStreamWriter writer = null; try { stream = new FileOutputStream(outputFileName); writer = new OutputStreamWriter(stream, charset); generateOutput...
[ "public", "void", "generateOutput", "(", "String", "outputFileName", ")", "throws", "IOException", "{", "FileOutputStream", "stream", "=", "null", ";", "OutputStreamWriter", "writer", "=", "null", ";", "try", "{", "stream", "=", "new", "FileOutputStream", "(", "...
Generates the HTML page and writes it into a file. @param outputFileName name of the file to which the generated HTML page will be written. @throws IOException when an i/o error occurs while writing to the file.
[ "Generates", "the", "HTML", "page", "and", "writes", "it", "into", "a", "file", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L621-L636
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java
MySQLMetadataDAO.findAllTaskDefs
private List<TaskDef> findAllTaskDefs(Connection tx) { """ Query persistence for all defined {@link TaskDef} data. @param tx The {@link Connection} to use for queries. @return A new {@code List<TaskDef>} with all the {@code TaskDef} data that was retrieved. """ final String READ_ALL_TASKDEF_QUERY =...
java
private List<TaskDef> findAllTaskDefs(Connection tx) { final String READ_ALL_TASKDEF_QUERY = "SELECT json_data FROM meta_task_def"; return query(tx, READ_ALL_TASKDEF_QUERY, q -> q.executeAndFetch(TaskDef.class)); }
[ "private", "List", "<", "TaskDef", ">", "findAllTaskDefs", "(", "Connection", "tx", ")", "{", "final", "String", "READ_ALL_TASKDEF_QUERY", "=", "\"SELECT json_data FROM meta_task_def\"", ";", "return", "query", "(", "tx", ",", "READ_ALL_TASKDEF_QUERY", ",", "q", "->...
Query persistence for all defined {@link TaskDef} data. @param tx The {@link Connection} to use for queries. @return A new {@code List<TaskDef>} with all the {@code TaskDef} data that was retrieved.
[ "Query", "persistence", "for", "all", "defined", "{", "@link", "TaskDef", "}", "data", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java#L410-L414
Netflix/dyno
dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/hash/Murmur2Hash.java
Murmur2Hash.hash32
public static int hash32(final String text) { """ Generates 32 bit hash from a string. @param text string to hash @return 32 bit hash of the given string """ final byte[] bytes = text.getBytes(); return hash32(bytes, bytes.length); }
java
public static int hash32(final String text) { final byte[] bytes = text.getBytes(); return hash32(bytes, bytes.length); }
[ "public", "static", "int", "hash32", "(", "final", "String", "text", ")", "{", "final", "byte", "[", "]", "bytes", "=", "text", ".", "getBytes", "(", ")", ";", "return", "hash32", "(", "bytes", ",", "bytes", ".", "length", ")", ";", "}" ]
Generates 32 bit hash from a string. @param text string to hash @return 32 bit hash of the given string
[ "Generates", "32", "bit", "hash", "from", "a", "string", "." ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/hash/Murmur2Hash.java#L101-L104
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java
DBaseFileReader.readDateRecordValue
@SuppressWarnings("checkstyle:magicnumber") private static int readDateRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData, int rawOffset, OutputParameter<Date> value) throws IOException { """ Read a DATE record value. @param field is the current parsed field. @param nrecord is the nu...
java
@SuppressWarnings("checkstyle:magicnumber") private static int readDateRecordValue(DBaseFileField field, int nrecord, int nfield, byte[] rawData, int rawOffset, OutputParameter<Date> value) throws IOException { final GregorianCalendar cal = new GregorianCalendar(); final int year = ((rawData[rawOffset] & 0xFF) ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:magicnumber\"", ")", "private", "static", "int", "readDateRecordValue", "(", "DBaseFileField", "field", ",", "int", "nrecord", ",", "int", "nfield", ",", "byte", "[", "]", "rawData", ",", "int", "rawOffset", ",", "Outp...
Read a DATE record value. @param field is the current parsed field. @param nrecord is the number of the record @param nfield is the number of the field @param rawData raw data @param rawOffset is the index at which the data could be obtained @param value will be set with the value extracted from the dBASE file @return...
[ "Read", "a", "DATE", "record", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1086-L1109
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java
MapApi.getNullableString
public static String getNullableString(final Map map, final Object... path) { """ Get string value by path. @param map subject @param path nodes to walk in map @return value """ return getNullable(map, String.class, path); }
java
public static String getNullableString(final Map map, final Object... path) { return getNullable(map, String.class, path); }
[ "public", "static", "String", "getNullableString", "(", "final", "Map", "map", ",", "final", "Object", "...", "path", ")", "{", "return", "getNullable", "(", "map", ",", "String", ".", "class", ",", "path", ")", ";", "}" ]
Get string value by path. @param map subject @param path nodes to walk in map @return value
[ "Get", "string", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java#L177-L179
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.dropTableOrView
void dropTableOrView(Session session, Table table, boolean cascade) { """ Drops the specified user-defined view or table from this Database object. <p> The process of dropping a table or view includes: <OL> <LI> checking that the specified Session's currently connected User has the right to perform this oper...
java
void dropTableOrView(Session session, Table table, boolean cascade) { // ft - concurrent session.commit(false); if (table.isView()) { removeSchemaObject(table.getName(), cascade); } else { dropTable(session, table, cascade); } }
[ "void", "dropTableOrView", "(", "Session", "session", ",", "Table", "table", ",", "boolean", "cascade", ")", "{", "// ft - concurrent", "session", ".", "commit", "(", "false", ")", ";", "if", "(", "table", ".", "isView", "(", ")", ")", "{", "removeSchemaOb...
Drops the specified user-defined view or table from this Database object. <p> The process of dropping a table or view includes: <OL> <LI> checking that the specified Session's currently connected User has the right to perform this operation and refusing to proceed if not by throwing. <LI> checking for referential cons...
[ "Drops", "the", "specified", "user", "-", "defined", "view", "or", "table", "from", "this", "Database", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L582-L592
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/JcNumber.java
JcNumber.mod
public JcNumber mod(Number val) { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the remainder of dividing one number by another, return a <b>JcNumber</b></i></div> <br/> """ JcNumber ret = new JcNumber(va...
java
public JcNumber mod(Number val) { JcNumber ret = new JcNumber(val, this, OPERATOR.Number.MOD); QueryRecorder.recordInvocationConditional(this, "mod", ret, QueryRecorder.literal(val)); return ret; }
[ "public", "JcNumber", "mod", "(", "Number", "val", ")", "{", "JcNumber", "ret", "=", "new", "JcNumber", "(", "val", ",", "this", ",", "OPERATOR", ".", "Number", ".", "MOD", ")", ";", "QueryRecorder", ".", "recordInvocationConditional", "(", "this", ",", ...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the remainder of dividing one number by another, return a <b>JcNumber</b></i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/JcNumber.java#L157-L161
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.updateEvse
public Evse updateEvse(Long chargingStationTypeId, Evse evse) { """ Update an evse. @param evse evse object to update. @return updated evse. """ ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); Evse existingEvse = getEvseById(chargingS...
java
public Evse updateEvse(Long chargingStationTypeId, Evse evse) { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); Evse existingEvse = getEvseById(chargingStationType, evse.getId()); chargingStationType.getEvses().remove(existingEvse); ...
[ "public", "Evse", "updateEvse", "(", "Long", "chargingStationTypeId", ",", "Evse", "evse", ")", "{", "ChargingStationType", "chargingStationType", "=", "chargingStationTypeRepository", ".", "findOne", "(", "chargingStationTypeId", ")", ";", "Evse", "existingEvse", "=", ...
Update an evse. @param evse evse object to update. @return updated evse.
[ "Update", "an", "evse", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L272-L283
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/types/CharacterType.java
CharacterType.getRightTrimSise
public static int getRightTrimSise(String s, char trim) { """ /* public static Object concat(Object a, Object b) { if (a == null || b == null) { return null; } return a.toString() + b.toString(); } """ int endindex = s.length(); for (--endindex; endindex >= 0 && s.charAt(endindex) =...
java
public static int getRightTrimSise(String s, char trim) { int endindex = s.length(); for (--endindex; endindex >= 0 && s.charAt(endindex) == trim; endindex--) {} endindex++; return endindex; }
[ "public", "static", "int", "getRightTrimSise", "(", "String", "s", ",", "char", "trim", ")", "{", "int", "endindex", "=", "s", ".", "length", "(", ")", ";", "for", "(", "--", "endindex", ";", "endindex", ">=", "0", "&&", "s", ".", "charAt", "(", "e...
/* public static Object concat(Object a, Object b) { if (a == null || b == null) { return null; } return a.toString() + b.toString(); }
[ "/", "*", "public", "static", "Object", "concat", "(", "Object", "a", "Object", "b", ")", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/types/CharacterType.java#L965-L975
alibaba/simpleimage
simpleimage.core/src/main/java/com/alibaba/simpleimage/util/PaletteBuilder.java
PaletteBuilder.getSrcColor
private int getSrcColor(int x, int y) { """ 原方法签名 private Color getSrcColor(int x, int y),原实现返回一个Color对象,对于一张上百万像素的图片,将会产生 上百万个对象,对性能有严重影响,顾改为返回整形,作为替代 @param x @param y @return """ int argb = srcColorModel.getRGB(srcRaster.getDataElements(x, y, null)); if (transparency == Transparency.OPAQ...
java
private int getSrcColor(int x, int y) { int argb = srcColorModel.getRGB(srcRaster.getDataElements(x, y, null)); if (transparency == Transparency.OPAQUE) { argb = 0xff000000 | argb; } return argb; }
[ "private", "int", "getSrcColor", "(", "int", "x", ",", "int", "y", ")", "{", "int", "argb", "=", "srcColorModel", ".", "getRGB", "(", "srcRaster", ".", "getDataElements", "(", "x", ",", "y", ",", "null", ")", ")", ";", "if", "(", "transparency", "=="...
原方法签名 private Color getSrcColor(int x, int y),原实现返回一个Color对象,对于一张上百万像素的图片,将会产生 上百万个对象,对性能有严重影响,顾改为返回整形,作为替代 @param x @param y @return
[ "原方法签名", "private", "Color", "getSrcColor", "(", "int", "x", "int", "y", ")", ",原实现返回一个Color对象,对于一张上百万像素的图片,将会产生", "上百万个对象,对性能有严重影响,顾改为返回整形,作为替代" ]
train
https://github.com/alibaba/simpleimage/blob/aabe559c267402b754c2ad606b796c4c6570788c/simpleimage.core/src/main/java/com/alibaba/simpleimage/util/PaletteBuilder.java#L161-L168
jhipster/jhipster
jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java
QueryService.buildReferringEntitySpecification
protected <OTHER, X> Specification<ENTITY> buildReferringEntitySpecification(Filter<X> filter, SingularAttribute<? super ENTITY, OTHER> reference, SingularAtt...
java
protected <OTHER, X> Specification<ENTITY> buildReferringEntitySpecification(Filter<X> filter, SingularAttribute<? super ENTITY, OTHER> reference, SingularAtt...
[ "protected", "<", "OTHER", ",", "X", ">", "Specification", "<", "ENTITY", ">", "buildReferringEntitySpecification", "(", "Filter", "<", "X", ">", "filter", ",", "SingularAttribute", "<", "?", "super", "ENTITY", ",", "OTHER", ">", "reference", ",", "SingularAtt...
Helper function to return a specification for filtering on one-to-one or many-to-one reference. Usage: <pre> Specification&lt;Employee&gt; specByProjectId = buildReferringEntitySpecification(criteria.getProjectId(), Employee_.project, Project_.id); Specification&lt;Employee&gt; specByProjectName = buildReferringEntityS...
[ "Helper", "function", "to", "return", "a", "specification", "for", "filtering", "on", "one", "-", "to", "-", "one", "or", "many", "-", "to", "-", "one", "reference", ".", "Usage", ":", "<pre", ">", "Specification&lt", ";", "Employee&gt", ";", "specByProjec...
train
https://github.com/jhipster/jhipster/blob/5dcf4239c7cc035e188ef02447d3c628fac5c5d9/jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java#L184-L188
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobsInner.java
DscCompilationJobsInner.get
public DscCompilationJobInner get(String resourceGroupName, String automationAccountName, UUID compilationJobId) { """ Retrieve the Dsc configuration compilation job identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. ...
java
public DscCompilationJobInner get(String resourceGroupName, String automationAccountName, UUID compilationJobId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, compilationJobId).toBlocking().single().body(); }
[ "public", "DscCompilationJobInner", "get", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "compilationJobId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "compilati...
Retrieve the Dsc configuration compilation job identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param compilationJobId The Dsc configuration compilation job id. @throws IllegalArgumentException thrown if parameters fail th...
[ "Retrieve", "the", "Dsc", "configuration", "compilation", "job", "identified", "by", "job", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobsInner.java#L197-L199
sstrickx/yahoofinance-api
src/main/java/yahoofinance/YahooFinance.java
YahooFinance.get
public static Stock get(String symbol, Calendar from) throws IOException { """ Sends a request with the historical quotes included starting from the specified {@link Calendar} date at the default interval (monthly). Returns null if the data can't be retrieved from Yahoo Finance. @param symbol the symb...
java
public static Stock get(String symbol, Calendar from) throws IOException { return YahooFinance.get(symbol, from, HistQuotesRequest.DEFAULT_TO, HistQuotesRequest.DEFAULT_INTERVAL); }
[ "public", "static", "Stock", "get", "(", "String", "symbol", ",", "Calendar", "from", ")", "throws", "IOException", "{", "return", "YahooFinance", ".", "get", "(", "symbol", ",", "from", ",", "HistQuotesRequest", ".", "DEFAULT_TO", ",", "HistQuotesRequest", "....
Sends a request with the historical quotes included starting from the specified {@link Calendar} date at the default interval (monthly). Returns null if the data can't be retrieved from Yahoo Finance. @param symbol the symbol of the stock for which you want to retrieve information @param from start dat...
[ "Sends", "a", "request", "with", "the", "historical", "quotes", "included", "starting", "from", "the", "specified", "{", "@link", "Calendar", "}", "date", "at", "the", "default", "interval", "(", "monthly", ")", ".", "Returns", "null", "if", "the", "data", ...
train
https://github.com/sstrickx/yahoofinance-api/blob/2766ba52fc5cccf9b4da5c06423d68059cf0a6e6/src/main/java/yahoofinance/YahooFinance.java#L127-L129
micronaut-projects/micronaut-core
discovery-client/src/main/java/io/micronaut/discovery/aws/route53/registration/Route53AutoNamingRegistrationClient.java
Route53AutoNamingRegistrationClient.createService
public String createService(AWSServiceDiscovery serviceDiscovery, String name, String description, String namespaceId, Long ttl) { """ Create service, helper for integration tests. @param serviceDiscovery service discovery instance @param name name of the service @param description description of the service @...
java
public String createService(AWSServiceDiscovery serviceDiscovery, String name, String description, String namespaceId, Long ttl) { if (serviceDiscovery == null) { serviceDiscovery = AWSServiceDiscoveryClient.builder().withClientConfiguration(clientConfiguration.getClientConfiguration()).build(); ...
[ "public", "String", "createService", "(", "AWSServiceDiscovery", "serviceDiscovery", ",", "String", "name", ",", "String", "description", ",", "String", "namespaceId", ",", "Long", "ttl", ")", "{", "if", "(", "serviceDiscovery", "==", "null", ")", "{", "serviceD...
Create service, helper for integration tests. @param serviceDiscovery service discovery instance @param name name of the service @param description description of the service @param namespaceId namespaceId to attach it to (get via cli or api call) @param ttl time to live for checking pulse @return serviceId
[ "Create", "service", "helper", "for", "integration", "tests", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/aws/route53/registration/Route53AutoNamingRegistrationClient.java#L359-L371
jboss/jboss-el-api_spec
src/main/java/javax/el/ELManager.java
ELManager.mapFunction
public void mapFunction(String prefix, String function, Method meth) { """ Maps a static method to an EL function. @param prefix The namespace of the functions, can be "". @param function The name of the function. @param meth The static method to be invoked when the function is used. """ getELContex...
java
public void mapFunction(String prefix, String function, Method meth) { getELContext().getFunctionMapper().mapFunction(prefix, function, meth); }
[ "public", "void", "mapFunction", "(", "String", "prefix", ",", "String", "function", ",", "Method", "meth", ")", "{", "getELContext", "(", ")", ".", "getFunctionMapper", "(", ")", ".", "mapFunction", "(", "prefix", ",", "function", ",", "meth", ")", ";", ...
Maps a static method to an EL function. @param prefix The namespace of the functions, can be "". @param function The name of the function. @param meth The static method to be invoked when the function is used.
[ "Maps", "a", "static", "method", "to", "an", "EL", "function", "." ]
train
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELManager.java#L122-L124
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.applyOverrideForce
private SortedSet<String> applyOverrideForce(String configurationId, Map<String, Object> parameterValues, SortedSet<String> ancestorLockedParameterNames) { """ Apply forced overrides for a configurationId. @param configurationId Configuration id @param parameterValues Parameter values @param ancestorLocke...
java
private SortedSet<String> applyOverrideForce(String configurationId, Map<String, Object> parameterValues, SortedSet<String> ancestorLockedParameterNames) { for (Parameter<?> parameter : allParameters) { Object overrideValue = parameterOverride.getOverrideForce(configurationId, parameter); if (over...
[ "private", "SortedSet", "<", "String", ">", "applyOverrideForce", "(", "String", "configurationId", ",", "Map", "<", "String", ",", "Object", ">", "parameterValues", ",", "SortedSet", "<", "String", ">", "ancestorLockedParameterNames", ")", "{", "for", "(", "Par...
Apply forced overrides for a configurationId. @param configurationId Configuration id @param parameterValues Parameter values @param ancestorLockedParameterNames Set of locked parameter names on the configuration levels above. @return Set of locked parameter names on this configuration level combined with the from the ...
[ "Apply", "forced", "overrides", "for", "a", "configurationId", "." ]
train
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L228-L241
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
TaskSlotTable.addTask
public boolean addTask(Task task) throws SlotNotFoundException, SlotNotActiveException { """ Add the given task to the slot identified by the task's allocation id. @param task to add to the task slot with the respective allocation id @throws SlotNotFoundException if there was no slot for the given allocation i...
java
public boolean addTask(Task task) throws SlotNotFoundException, SlotNotActiveException { Preconditions.checkNotNull(task); TaskSlot taskSlot = getTaskSlot(task.getAllocationId()); if (taskSlot != null) { if (taskSlot.isActive(task.getJobID(), task.getAllocationId())) { if (taskSlot.add(task)) { task...
[ "public", "boolean", "addTask", "(", "Task", "task", ")", "throws", "SlotNotFoundException", ",", "SlotNotActiveException", "{", "Preconditions", ".", "checkNotNull", "(", "task", ")", ";", "TaskSlot", "taskSlot", "=", "getTaskSlot", "(", "task", ".", "getAllocati...
Add the given task to the slot identified by the task's allocation id. @param task to add to the task slot with the respective allocation id @throws SlotNotFoundException if there was no slot for the given allocation id @throws SlotNotActiveException if there was no slot active for task's job and allocation id @return...
[ "Add", "the", "given", "task", "to", "the", "slot", "identified", "by", "the", "task", "s", "allocation", "id", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java#L471-L491
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java
RSAUtils.decryptWithPrivateKey
public static byte[] decryptWithPrivateKey(byte[] privateKeyData, byte[] encryptedData) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException { """ Decrypt encrypted data with RSA pr...
java
public static byte[] decryptWithPrivateKey(byte[] privateKeyData, byte[] encryptedData) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException { return decryptWithPrivateKey(privat...
[ "public", "static", "byte", "[", "]", "decryptWithPrivateKey", "(", "byte", "[", "]", "privateKeyData", ",", "byte", "[", "]", "encryptedData", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "InvalidKeyException", ",", "NoSuchPaddingEx...
Decrypt encrypted data with RSA private key, using {@link #DEFAULT_CIPHER_TRANSFORMATION}. <p> Note: if long data was encrypted using {@link #encryptWithPublicKey(byte[], byte[])}, it will be correctly decrypted. </p> @param privateKeyData RSA private key data (value of {@link RSAPrivateKey#getEncoded()}) @param encr...
[ "Decrypt", "encrypted", "data", "with", "RSA", "private", "key", "using", "{", "@link", "#DEFAULT_CIPHER_TRANSFORMATION", "}", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/RSAUtils.java#L721-L725
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java
MarkdownParser.findSpanEnd
private int findSpanEnd(TextCursor cursor, int spanStart, int limit, char span) { """ Searching for valid formatting span end @param cursor text cursor @param spanStart expected span start @param limit maximum index in cursor @param span span control character @return span end, -1 if not found ...
java
private int findSpanEnd(TextCursor cursor, int spanStart, int limit, char span) { for (int i = spanStart + 1; i < limit; i++) { char c = cursor.text.charAt(i); if (c == span) { // Check prev and next symbols if (isGoodAnchor(cursor.text, i + 1) && isNotSym...
[ "private", "int", "findSpanEnd", "(", "TextCursor", "cursor", ",", "int", "spanStart", ",", "int", "limit", ",", "char", "span", ")", "{", "for", "(", "int", "i", "=", "spanStart", "+", "1", ";", "i", "<", "limit", ";", "i", "++", ")", "{", "char",...
Searching for valid formatting span end @param cursor text cursor @param spanStart expected span start @param limit maximum index in cursor @param span span control character @return span end, -1 if not found
[ "Searching", "for", "valid", "formatting", "span", "end" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/markdown/MarkdownParser.java#L293-L304
UrielCh/ovh-java-sdk
ovh-java-sdk-vrack/src/main/java/net/minidev/ovh/api/ApiOvhVrack.java
ApiOvhVrack.serviceName_dedicatedServerInterface_dedicatedServerInterface_GET
public OvhDedicatedServerInterface serviceName_dedicatedServerInterface_dedicatedServerInterface_GET(String serviceName, String dedicatedServerInterface) throws IOException { """ Get this object properties REST: GET /vrack/{serviceName}/dedicatedServerInterface/{dedicatedServerInterface} @param serviceName [re...
java
public OvhDedicatedServerInterface serviceName_dedicatedServerInterface_dedicatedServerInterface_GET(String serviceName, String dedicatedServerInterface) throws IOException { String qPath = "/vrack/{serviceName}/dedicatedServerInterface/{dedicatedServerInterface}"; StringBuilder sb = path(qPath, serviceName, dedica...
[ "public", "OvhDedicatedServerInterface", "serviceName_dedicatedServerInterface_dedicatedServerInterface_GET", "(", "String", "serviceName", ",", "String", "dedicatedServerInterface", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vrack/{serviceName}/dedicatedServerInt...
Get this object properties REST: GET /vrack/{serviceName}/dedicatedServerInterface/{dedicatedServerInterface} @param serviceName [required] The internal name of your vrack @param dedicatedServerInterface [required] Dedicated Server Interface
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vrack/src/main/java/net/minidev/ovh/api/ApiOvhVrack.java#L570-L575
watchrabbit/rabbit-executor
src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java
ExecutorCommand.observe
public void observe(CheckedRunnable runnable, CheckedRunnable onSuccess, Consumer<Exception> onFailure) { """ Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. If callable throws exception t...
java
public void observe(CheckedRunnable runnable, CheckedRunnable onSuccess, Consumer<Exception> onFailure) { service.executeAsynchronously(wrap(runnable, onSuccess, onFailure), config); }
[ "public", "void", "observe", "(", "CheckedRunnable", "runnable", ",", "CheckedRunnable", "onSuccess", ",", "Consumer", "<", "Exception", ">", "onFailure", ")", "{", "service", ".", "executeAsynchronously", "(", "wrap", "(", "runnable", ",", "onSuccess", ",", "on...
Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. If callable throws exception then {@code onFailure} method is called @param runnable method fired by executor @param onSuccess method fired if cal...
[ "Invokes", "runnable", "asynchronously", "with", "respecting", "circuit", "logic", "and", "cache", "logic", "if", "configured", ".", "If", "callable", "completed", "with", "success", "then", "the", "{", "@code", "onSuccess", "}", "method", "is", "called", ".", ...
train
https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L200-L202
appium/java-client
src/main/java/io/appium/java_client/events/EventFiringObjectFactory.java
EventFiringObjectFactory.getEventFiringObject
@SuppressWarnings("unchecked") public static <T> T getEventFiringObject(T t, WebDriver driver, Collection<Listener> listeners) { """ This method makes an event firing object. @param t an original {@link Object} that is supposed to be listenable @param driver an instance of {@link org.openqa.selenium.WebDr...
java
@SuppressWarnings("unchecked") public static <T> T getEventFiringObject(T t, WebDriver driver, Collection<Listener> listeners) { final List<Listener> listenerList = new ArrayList<>(); for (Listener listener : ServiceLoader.load( Listener.class)) { listenerList.add(listen...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getEventFiringObject", "(", "T", "t", ",", "WebDriver", "driver", ",", "Collection", "<", "Listener", ">", "listeners", ")", "{", "final", "List", "<", "Listener", ...
This method makes an event firing object. @param t an original {@link Object} that is supposed to be listenable @param driver an instance of {@link org.openqa.selenium.WebDriver} @param listeners is a collection of {@link io.appium.java_client.events.api.Listener} that is supposed to be used for the event firing @para...
[ "This", "method", "makes", "an", "event", "firing", "object", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/events/EventFiringObjectFactory.java#L28-L43
graylog-labs/syslog4j-graylog2
src/main/java/org/graylog2/syslog4j/impl/message/processor/SyslogMessageProcessor.java
SyslogMessageProcessor.createSyslogHeader
public String createSyslogHeader(int facility, int level, String localName, boolean sendLocalTimestamp, boolean sendLocalName) { """ /* (non-Javadoc) @see org.graylog2.syslog4j.SyslogMessageProcessorIF#createSyslogHeader(int, int, java.lang.String, boolean, boolean) This is compatible with BSD protocol """...
java
public String createSyslogHeader(int facility, int level, String localName, boolean sendLocalTimestamp, boolean sendLocalName) { StringBuffer buffer = new StringBuffer(); appendPriority(buffer, facility, level); if (sendLocalTimestamp) { appendTimestamp(buffer, new Date()); ...
[ "public", "String", "createSyslogHeader", "(", "int", "facility", ",", "int", "level", ",", "String", "localName", ",", "boolean", "sendLocalTimestamp", ",", "boolean", "sendLocalName", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";...
/* (non-Javadoc) @see org.graylog2.syslog4j.SyslogMessageProcessorIF#createSyslogHeader(int, int, java.lang.String, boolean, boolean) This is compatible with BSD protocol
[ "/", "*", "(", "non", "-", "Javadoc", ")", "@see", "org", ".", "graylog2", ".", "syslog4j", ".", "SyslogMessageProcessorIF#createSyslogHeader", "(", "int", "int", "java", ".", "lang", ".", "String", "boolean", "boolean", ")" ]
train
https://github.com/graylog-labs/syslog4j-graylog2/blob/374bc20d77c3aaa36a68bec5125dd82ce0a88aab/src/main/java/org/graylog2/syslog4j/impl/message/processor/SyslogMessageProcessor.java#L67-L81
Waikato/moa
moa/src/main/java/moa/classifiers/lazy/neighboursearch/kdtrees/KMeansInpiredMethod.java
KMeansInpiredMethod.quickSort
protected static void quickSort(Instances insts, int[] indices, int attidx, int left, int right) { """ Sorts the instances according to the given attribute/dimension. The sorting is done on the master index array and not on the actual instances object. @param insts The instances on which the tree is (or is t...
java
protected static void quickSort(Instances insts, int[] indices, int attidx, int left, int right) { if (left < right) { int middle = partition(insts, indices, attidx, left, right); quickSort(insts, indices, attidx, left, middle); quickSort(insts, indices, attidx, middle + 1, right); } }
[ "protected", "static", "void", "quickSort", "(", "Instances", "insts", ",", "int", "[", "]", "indices", ",", "int", "attidx", ",", "int", "left", ",", "int", "right", ")", "{", "if", "(", "left", "<", "right", ")", "{", "int", "middle", "=", "partiti...
Sorts the instances according to the given attribute/dimension. The sorting is done on the master index array and not on the actual instances object. @param insts The instances on which the tree is (or is to be) built. @param indices The master index array containing indices of the instances. @param attidx The dimensi...
[ "Sorts", "the", "instances", "according", "to", "the", "given", "attribute", "/", "dimension", ".", "The", "sorting", "is", "done", "on", "the", "master", "index", "array", "and", "not", "on", "the", "actual", "instances", "object", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/lazy/neighboursearch/kdtrees/KMeansInpiredMethod.java#L273-L280
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/Statement.java
Statement.writeIOExceptionMethod
public final void writeIOExceptionMethod(int access, Method method, ClassVisitor visitor) { """ Writes this statement to the {@link ClassVisitor} as a method. @param access The access modifiers of the method @param method The method signature @param visitor The class visitor to write it to """ writeMe...
java
public final void writeIOExceptionMethod(int access, Method method, ClassVisitor visitor) { writeMethodTo(new CodeBuilder(access, method, IO_EXCEPTION_ARRAY, visitor)); }
[ "public", "final", "void", "writeIOExceptionMethod", "(", "int", "access", ",", "Method", "method", ",", "ClassVisitor", "visitor", ")", "{", "writeMethodTo", "(", "new", "CodeBuilder", "(", "access", ",", "method", ",", "IO_EXCEPTION_ARRAY", ",", "visitor", ")"...
Writes this statement to the {@link ClassVisitor} as a method. @param access The access modifiers of the method @param method The method signature @param visitor The class visitor to write it to
[ "Writes", "this", "statement", "to", "the", "{", "@link", "ClassVisitor", "}", "as", "a", "method", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/Statement.java#L135-L137
h2oai/h2o-3
h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask2.java
DeepLearningTask2.setupLocal
@Override public void setupLocal() { """ Do the local computation: Perform one DeepLearningTask (with run_local=true) iteration. Pass over all the data (will be replicated in dfork() here), and use _sync_fraction random rows. This calls DeepLearningTask's reduce() between worker threads that update the same lo...
java
@Override public void setupLocal() { super.setupLocal(); _res = new DeepLearningTask(_jobKey, _sharedmodel, _sync_fraction, _iteration, this); addToPendingCount(1); _res.dfork(null, _fr, true /*run_local*/); }
[ "@", "Override", "public", "void", "setupLocal", "(", ")", "{", "super", ".", "setupLocal", "(", ")", ";", "_res", "=", "new", "DeepLearningTask", "(", "_jobKey", ",", "_sharedmodel", ",", "_sync_fraction", ",", "_iteration", ",", "this", ")", ";", "addToP...
Do the local computation: Perform one DeepLearningTask (with run_local=true) iteration. Pass over all the data (will be replicated in dfork() here), and use _sync_fraction random rows. This calls DeepLearningTask's reduce() between worker threads that update the same local model_info via Hogwild! Once the computation i...
[ "Do", "the", "local", "computation", ":", "Perform", "one", "DeepLearningTask", "(", "with", "run_local", "=", "true", ")", "iteration", ".", "Pass", "over", "all", "the", "data", "(", "will", "be", "replicated", "in", "dfork", "()", "here", ")", "and", ...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deeplearning/DeepLearningTask2.java#L47-L53
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MppBitFlag.java
MppBitFlag.setValue
public void setValue(FieldContainer container, byte[] data) { """ Extracts the value of this bit flag from the supplied byte array and sets the value in the supplied container. @param container container @param data byte array """ if (data != null) { container.set(m_type, ((MPPUtility...
java
public void setValue(FieldContainer container, byte[] data) { if (data != null) { container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue); } }
[ "public", "void", "setValue", "(", "FieldContainer", "container", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "data", "!=", "null", ")", "{", "container", ".", "set", "(", "m_type", ",", "(", "(", "MPPUtility", ".", "getInt", "(", "data", ","...
Extracts the value of this bit flag from the supplied byte array and sets the value in the supplied container. @param container container @param data byte array
[ "Extracts", "the", "value", "of", "this", "bit", "flag", "from", "the", "supplied", "byte", "array", "and", "sets", "the", "value", "in", "the", "supplied", "container", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MppBitFlag.java#L37-L43
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/websocket/encode/Generator.java
Generator.generateWholeFrame
public void generateWholeFrame(Frame frame, ByteBuffer buf) { """ Generate the whole frame (header + payload copy) into a single ByteBuffer. <p> Note: This is slow, moves lots of memory around. Only use this if you must (such as in unit testing). @param frame the frame to generate @param buf the buffer to ...
java
public void generateWholeFrame(Frame frame, ByteBuffer buf) { buf.put(generateHeaderBytes(frame)); if (frame.hasPayload()) { if (readOnly) { buf.put(frame.getPayload().slice()); } else { buf.put(frame.getPayload()); } } }
[ "public", "void", "generateWholeFrame", "(", "Frame", "frame", ",", "ByteBuffer", "buf", ")", "{", "buf", ".", "put", "(", "generateHeaderBytes", "(", "frame", ")", ")", ";", "if", "(", "frame", ".", "hasPayload", "(", ")", ")", "{", "if", "(", "readOn...
Generate the whole frame (header + payload copy) into a single ByteBuffer. <p> Note: This is slow, moves lots of memory around. Only use this if you must (such as in unit testing). @param frame the frame to generate @param buf the buffer to output the generated frame to
[ "Generate", "the", "whole", "frame", "(", "header", "+", "payload", "copy", ")", "into", "a", "single", "ByteBuffer", ".", "<p", ">", "Note", ":", "This", "is", "slow", "moves", "lots", "of", "memory", "around", ".", "Only", "use", "this", "if", "you",...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/encode/Generator.java#L286-L295
anotheria/configureme
src/main/java/org/configureme/mbean/util/MBeanRegisterUtil.java
MBeanRegisterUtil.buildObjectName
private static String buildObjectName(final Object object, final String... parameters) { """ Return object name with which will be register in {@link MBeanServer}. @param object provided object @param parameters additional parameters @return object name """ final StringBuilder objectName = new Strin...
java
private static String buildObjectName(final Object object, final String... parameters) { final StringBuilder objectName = new StringBuilder(); objectName.append(object.getClass().getPackage().getName()); objectName.append(":type="); objectName.append(object.getClass().getName()); if (parameters.length > 0) { ...
[ "private", "static", "String", "buildObjectName", "(", "final", "Object", "object", ",", "final", "String", "...", "parameters", ")", "{", "final", "StringBuilder", "objectName", "=", "new", "StringBuilder", "(", ")", ";", "objectName", ".", "append", "(", "ob...
Return object name with which will be register in {@link MBeanServer}. @param object provided object @param parameters additional parameters @return object name
[ "Return", "object", "name", "with", "which", "will", "be", "register", "in", "{", "@link", "MBeanServer", "}", "." ]
train
https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/mbean/util/MBeanRegisterUtil.java#L59-L80
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java
OutputsInner.updateAsync
public Observable<OutputInner> updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch) { """ Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest ...
java
public Observable<OutputInner> updateAsync(String resourceGroupName, String jobName, String outputName, OutputInner output, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, jobName, outputName, output, ifMatch).map(new Func1<ServiceResponseWithHeaders<OutputInner, OutputsUpdateHeaders>...
[ "public", "Observable", "<", "OutputInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "String", "outputName", ",", "OutputInner", "output", ",", "String", "ifMatch", ")", "{", "return", "updateWithServiceResponseAsync", "...
Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the A...
[ "Updates", "an", "existing", "output", "under", "an", "existing", "streaming", "job", ".", "This", "can", "be", "used", "to", "partially", "update", "(", "ie", ".", "update", "one", "or", "two", "properties", ")", "an", "output", "without", "affecting", "t...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java#L449-L456
b3log/latke
latke-core/src/main/java/org/b3log/latke/util/Strings.java
Strings.containsIgnoreCase
public static boolean containsIgnoreCase(final String string, final String[] strings) { """ Determines whether the specified strings contains the specified string, ignoring case considerations. @param string the specified string @param strings the specified strings @return {@code true} if the specified strin...
java
public static boolean containsIgnoreCase(final String string, final String[] strings) { if (null == strings) { return false; } return Arrays.stream(strings).anyMatch(str -> StringUtils.equalsIgnoreCase(string, str)); }
[ "public", "static", "boolean", "containsIgnoreCase", "(", "final", "String", "string", ",", "final", "String", "[", "]", "strings", ")", "{", "if", "(", "null", "==", "strings", ")", "{", "return", "false", ";", "}", "return", "Arrays", ".", "stream", "(...
Determines whether the specified strings contains the specified string, ignoring case considerations. @param string the specified string @param strings the specified strings @return {@code true} if the specified strings contains the specified string, ignoring case considerations, returns {@code false} otherwise
[ "Determines", "whether", "the", "specified", "strings", "contains", "the", "specified", "string", "ignoring", "case", "considerations", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/util/Strings.java#L207-L213
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java
ReferenceEntityLockService.convert
@Override public void convert(IEntityLock lock, int newType, int newDuration) throws LockingException { """ Attempts to change the lock's <code>lockType</code> to <code>newType</code>. @param lock IEntityLock @param newType int @param newDuration int @exception org.apereo.portal.concurrency.LockingExcept...
java
@Override public void convert(IEntityLock lock, int newType, int newDuration) throws LockingException { if (lock.getLockType() == newType) { throw new LockingException( "Could not convert " + lock + " : old and new lock TYPEs are the same."); } if (!isValidLo...
[ "@", "Override", "public", "void", "convert", "(", "IEntityLock", "lock", ",", "int", "newType", ",", "int", "newDuration", ")", "throws", "LockingException", "{", "if", "(", "lock", ".", "getLockType", "(", ")", "==", "newType", ")", "{", "throw", "new", ...
Attempts to change the lock's <code>lockType</code> to <code>newType</code>. @param lock IEntityLock @param newType int @param newDuration int @exception org.apereo.portal.concurrency.LockingException
[ "Attempts", "to", "change", "the", "lock", "s", "<code", ">", "lockType<", "/", "code", ">", "to", "<code", ">", "newType<", "/", "code", ">", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/ReferenceEntityLockService.java#L75-L105
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java
AipImageClassify.logoAdd
public JSONObject logoAdd(byte[] image, String brief, HashMap<String, String> options) { """ logo商标识别—添加接口 使用入库接口请先在[控制台](https://console.bce.baidu.com/ai/#/ai/imagerecognition/overview/index)创建应用并申请建库,建库成功后方可正常使用。 @param image - 二进制图像数据 @param brief - brief,检索时带回。此处要传对应的name与code字段,name长度小于100B,code长度小于150B ...
java
public JSONObject logoAdd(byte[] image, String brief, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); String base64Content = Base64Util.encode(image); request.addBody("image", base64Content); request.addBody("brie...
[ "public", "JSONObject", "logoAdd", "(", "byte", "[", "]", "image", ",", "String", "brief", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "req...
logo商标识别—添加接口 使用入库接口请先在[控制台](https://console.bce.baidu.com/ai/#/ai/imagerecognition/overview/index)创建应用并申请建库,建库成功后方可正常使用。 @param image - 二进制图像数据 @param brief - brief,检索时带回。此处要传对应的name与code字段,name长度小于100B,code长度小于150B @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject
[ "logo商标识别—添加接口", "使用入库接口请先在", "[", "控制台", "]", "(", "https", ":", "//", "console", ".", "bce", ".", "baidu", ".", "com", "/", "ai", "/", "#", "/", "ai", "/", "imagerecognition", "/", "overview", "/", "index", ")", "创建应用并申请建库,建库成功后方可正常使用。" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java#L224-L238
cdk/cdk
base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java
IsotopeFactory.getExactMass
public double getExactMass(Integer atomicNumber, Integer massNumber) { """ Get the exact mass of a specified isotope for an atom. @param atomicNumber atomic number @param massNumber the mass number @return the exact mass """ if (atomicNumber == null || massNumber == null) return 0; ...
java
public double getExactMass(Integer atomicNumber, Integer massNumber) { if (atomicNumber == null || massNumber == null) return 0; for (IIsotope isotope : this.isotopes[atomicNumber]) { if (isotope.getMassNumber().equals(massNumber)) return isotope.getExactMass(); ...
[ "public", "double", "getExactMass", "(", "Integer", "atomicNumber", ",", "Integer", "massNumber", ")", "{", "if", "(", "atomicNumber", "==", "null", "||", "massNumber", "==", "null", ")", "return", "0", ";", "for", "(", "IIsotope", "isotope", ":", "this", ...
Get the exact mass of a specified isotope for an atom. @param atomicNumber atomic number @param massNumber the mass number @return the exact mass
[ "Get", "the", "exact", "mass", "of", "a", "specified", "isotope", "for", "an", "atom", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L243-L251
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/internal/stream/SpliteratorBasedStream.java
SpliteratorBasedStream.mergeMap
public <R> ReactiveSeq<R> mergeMap(final Function<? super T, ? extends Publisher<? extends R>> mapper) { """ A potentially asynchronous flatMap operation where data from each publisher may arrive out of order @param mapper @return """ return mergeMap(256,mapper); }
java
public <R> ReactiveSeq<R> mergeMap(final Function<? super T, ? extends Publisher<? extends R>> mapper) { return mergeMap(256,mapper); }
[ "public", "<", "R", ">", "ReactiveSeq", "<", "R", ">", "mergeMap", "(", "final", "Function", "<", "?", "super", "T", ",", "?", "extends", "Publisher", "<", "?", "extends", "R", ">", ">", "mapper", ")", "{", "return", "mergeMap", "(", "256", ",", "m...
A potentially asynchronous flatMap operation where data from each publisher may arrive out of order @param mapper @return
[ "A", "potentially", "asynchronous", "flatMap", "operation", "where", "data", "from", "each", "publisher", "may", "arrive", "out", "of", "order" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/internal/stream/SpliteratorBasedStream.java#L354-L356
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java
StreamInterceptingTunnel.interceptStream
public void interceptStream(int index, OutputStream stream) throws GuacamoleException { """ Intercept all data received along the stream having the given index, writing that data to the given OutputStream. The OutputStream will automatically be closed when the stream ends. If there is no such stream...
java
public void interceptStream(int index, OutputStream stream) throws GuacamoleException { // Log beginning of intercepted stream logger.debug("Intercepting output stream #{} of tunnel \"{}\".", index, getUUID()); try { outputStreamFilter.interceptStream(in...
[ "public", "void", "interceptStream", "(", "int", "index", ",", "OutputStream", "stream", ")", "throws", "GuacamoleException", "{", "// Log beginning of intercepted stream", "logger", ".", "debug", "(", "\"Intercepting output stream #{} of tunnel \\\"{}\\\".\"", ",", "index", ...
Intercept all data received along the stream having the given index, writing that data to the given OutputStream. The OutputStream will automatically be closed when the stream ends. If there is no such stream, then the OutputStream will be closed immediately. This function will block until all received data has been wr...
[ "Intercept", "all", "data", "received", "along", "the", "stream", "having", "the", "given", "index", "writing", "that", "data", "to", "the", "given", "OutputStream", ".", "The", "OutputStream", "will", "automatically", "be", "closed", "when", "the", "stream", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/tunnel/StreamInterceptingTunnel.java#L91-L108
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java
JBBPTextWriter.Float
public JBBPTextWriter Float(final float[] values, int off, int len) throws IOException { """ Print values from float array @param values float value array, must not be null @param off offset to the first element @param len number of elements to print @return the context @throws IOException it will be ...
java
public JBBPTextWriter Float(final float[] values, int off, int len) throws IOException { while (len-- > 0) { this.Float(values[off++]); } return this; }
[ "public", "JBBPTextWriter", "Float", "(", "final", "float", "[", "]", "values", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "while", "(", "len", "--", ">", "0", ")", "{", "this", ".", "Float", "(", "values", "[", "off", ...
Print values from float array @param values float value array, must not be null @param off offset to the first element @param len number of elements to print @return the context @throws IOException it will be thrown for transport error @since 1.4.0
[ "Print", "values", "from", "float", "array" ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java#L974-L979
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java
ModelsEngine.getFlowDirection
public static int getFlowDirection( int i, int j ) { """ Returns the flow direction value for a given point as indexes (i, j) of the dir matrix. @param i @param j @return """ int flow = -1; for( int k = 1; k < 9; k++ ) { if (ModelsSupporter.DIR[k][0] == i && ModelsSupporter.DIR...
java
public static int getFlowDirection( int i, int j ) { int flow = -1; for( int k = 1; k < 9; k++ ) { if (ModelsSupporter.DIR[k][0] == i && ModelsSupporter.DIR[k][1] == j) { flow = k; } } return flow; }
[ "public", "static", "int", "getFlowDirection", "(", "int", "i", ",", "int", "j", ")", "{", "int", "flow", "=", "-", "1", ";", "for", "(", "int", "k", "=", "1", ";", "k", "<", "9", ";", "k", "++", ")", "{", "if", "(", "ModelsSupporter", ".", "...
Returns the flow direction value for a given point as indexes (i, j) of the dir matrix. @param i @param j @return
[ "Returns", "the", "flow", "direction", "value", "for", "a", "given", "point", "as", "indexes", "(", "i", "j", ")", "of", "the", "dir", "matrix", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/libs/modules/ModelsEngine.java#L975-L983
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.browseTaskSandBox
public Optional<SingularitySandbox> browseTaskSandBox(String taskId, String path) { """ Retrieve information about a specific task's sandbox @param taskId The task ID to browse @param path The path to browse from. if not specified it will browse from the sandbox root. @return A {@link SingularitySandbox} ...
java
public Optional<SingularitySandbox> browseTaskSandBox(String taskId, String path) { final Function<String, String> requestUrl = (host) -> String.format(SANDBOX_BROWSE_FORMAT, getApiBase(host), taskId); return getSingleWithParams(requestUrl, "browse sandbox for task", taskId, Optional.of(ImmutableMap.of("path",...
[ "public", "Optional", "<", "SingularitySandbox", ">", "browseTaskSandBox", "(", "String", "taskId", ",", "String", "path", ")", "{", "final", "Function", "<", "String", ",", "String", ">", "requestUrl", "=", "(", "host", ")", "-", ">", "String", ".", "form...
Retrieve information about a specific task's sandbox @param taskId The task ID to browse @param path The path to browse from. if not specified it will browse from the sandbox root. @return A {@link SingularitySandbox} object that captures the information for the path to a specific task's Mesos sandbox
[ "Retrieve", "information", "about", "a", "specific", "task", "s", "sandbox" ]
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1284-L1289
ThreeTen/threetenbp
src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java
Jdk8Methods.safeSubtract
public static int safeSubtract(int a, int b) { """ Safely subtracts one int from another. @param a the first value @param b the second value to subtract from the first @return the result @throws ArithmeticException if the result overflows an int """ int result = a - b; // check for a ch...
java
public static int safeSubtract(int a, int b) { int result = a - b; // check for a change of sign in the result when the inputs have the different signs if ((a ^ result) < 0 && (a ^ b) < 0) { throw new ArithmeticException("Subtraction overflows an int: " + a + " - " + b); } ...
[ "public", "static", "int", "safeSubtract", "(", "int", "a", ",", "int", "b", ")", "{", "int", "result", "=", "a", "-", "b", ";", "// check for a change of sign in the result when the inputs have the different signs", "if", "(", "(", "a", "^", "result", ")", "<",...
Safely subtracts one int from another. @param a the first value @param b the second value to subtract from the first @return the result @throws ArithmeticException if the result overflows an int
[ "Safely", "subtracts", "one", "int", "from", "another", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java#L180-L187
Red5/red5-io
src/main/java/org/red5/io/mp3/impl/MP3Stream.java
MP3Stream.createHeader
private static AudioFrame createHeader(HeaderBitField bits) { """ Creates an {@code AudioFrame} object based on the given header field. If the header field contains invalid values, result is <b>null</b>. @param bits the header bit field @return the {@code AudioFrame} """ if (bits.get(21, 23) != 7)...
java
private static AudioFrame createHeader(HeaderBitField bits) { if (bits.get(21, 23) != 7) { return null; } int mpegVer = bits.get(19, 20); int layer = bits.get(17, 18); int bitRateCode = bits.get(12, 15); int sampleRateCode = bits.get(10, 11); int paddi...
[ "private", "static", "AudioFrame", "createHeader", "(", "HeaderBitField", "bits", ")", "{", "if", "(", "bits", ".", "get", "(", "21", ",", "23", ")", "!=", "7", ")", "{", "return", "null", ";", "}", "int", "mpegVer", "=", "bits", ".", "get", "(", "...
Creates an {@code AudioFrame} object based on the given header field. If the header field contains invalid values, result is <b>null</b>. @param bits the header bit field @return the {@code AudioFrame}
[ "Creates", "an", "{", "@code", "AudioFrame", "}", "object", "based", "on", "the", "given", "header", "field", ".", "If", "the", "header", "field", "contains", "invalid", "values", "result", "is", "<b", ">", "null<", "/", "b", ">", "." ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/mp3/impl/MP3Stream.java#L179-L198
knowm/XChange
xchange-cryptonit/src/main/java/org/knowm/xchange/cryptonit2/CryptonitAdapters.java
CryptonitAdapters.adaptAccountInfo
public static AccountInfo adaptAccountInfo(CryptonitBalance cryptonitBalance, String userName) { """ Adapts a CryptonitBalance to an AccountInfo @param cryptonitBalance The Cryptonit balance @param userName The user name @return The account info """ // Adapt to XChange DTOs List<Balance> balances...
java
public static AccountInfo adaptAccountInfo(CryptonitBalance cryptonitBalance, String userName) { // Adapt to XChange DTOs List<Balance> balances = new ArrayList<>(); for (CryptonitBalance.Balance b : cryptonitBalance.getBalances()) { Balance xchangeBalance = new Balance( Curre...
[ "public", "static", "AccountInfo", "adaptAccountInfo", "(", "CryptonitBalance", "cryptonitBalance", ",", "String", "userName", ")", "{", "// Adapt to XChange DTOs", "List", "<", "Balance", ">", "balances", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ...
Adapts a CryptonitBalance to an AccountInfo @param cryptonitBalance The Cryptonit balance @param userName The user name @return The account info
[ "Adapts", "a", "CryptonitBalance", "to", "an", "AccountInfo" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-cryptonit/src/main/java/org/knowm/xchange/cryptonit2/CryptonitAdapters.java#L54-L72
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyEncoder.java
KeyEncoder.encodeDesc
public static int encodeDesc(Byte value, byte[] dst, int dstOffset) { """ Encodes the given signed Byte object into exactly 1 or 2 bytes for descending order. If the Byte object is never expected to be null, consider encoding as a byte primitive. @param value optional signed Byte value to encode @param dst d...
java
public static int encodeDesc(Byte value, byte[] dst, int dstOffset) { if (value == null) { dst[dstOffset] = NULL_BYTE_LOW; return 1; } else { dst[dstOffset] = NOT_NULL_BYTE_LOW; dst[dstOffset + 1] = (byte)(value ^ 0x7f); return 2; ...
[ "public", "static", "int", "encodeDesc", "(", "Byte", "value", ",", "byte", "[", "]", "dst", ",", "int", "dstOffset", ")", "{", "if", "(", "value", "==", "null", ")", "{", "dst", "[", "dstOffset", "]", "=", "NULL_BYTE_LOW", ";", "return", "1", ";", ...
Encodes the given signed Byte object into exactly 1 or 2 bytes for descending order. If the Byte object is never expected to be null, consider encoding as a byte primitive. @param value optional signed Byte value to encode @param dst destination for encoded bytes @param dstOffset offset into destination array @return ...
[ "Encodes", "the", "given", "signed", "Byte", "object", "into", "exactly", "1", "or", "2", "bytes", "for", "descending", "order", ".", "If", "the", "Byte", "object", "is", "never", "expected", "to", "be", "null", "consider", "encoding", "as", "a", "byte", ...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyEncoder.java#L126-L135
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Collectors.java
Collectors.groupingBy
public static <T, K, A, D> Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier, Collector<? super T, A, D> downstream) { """ Returns a {@code Collector} implementing a cascaded "group by" operation on input elements of type {@code T}, gro...
java
public static <T, K, A, D> Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier, Collector<? super T, A, D> downstream) { return groupingBy(classifier, HashMap::new, downstream); }
[ "public", "static", "<", "T", ",", "K", ",", "A", ",", "D", ">", "Collector", "<", "T", ",", "?", ",", "Map", "<", "K", ",", "D", ">", ">", "groupingBy", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "classifier", ",...
Returns a {@code Collector} implementing a cascaded "group by" operation on input elements of type {@code T}, grouping elements according to a classification function, and then performing a reduction operation on the values associated with a given key using the specified downstream {@code Collector}. <p>The classifica...
[ "Returns", "a", "{", "@code", "Collector", "}", "implementing", "a", "cascaded", "group", "by", "operation", "on", "input", "elements", "of", "type", "{", "@code", "T", "}", "grouping", "elements", "according", "to", "a", "classification", "function", "and", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Collectors.java#L850-L854
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/model/TorqueModelDef.java
TorqueModelDef.addForeignkeys
private void addForeignkeys(ReferenceDescriptorDef refDef, TableDef tableDef) { """ Adds foreignkey(s) for the reference to the corresponding table(s). @param refDef The reference @param tableDef The table of the class owning the reference """ if (!refDef.getBooleanProperty(PropertyHelper.OJB_PR...
java
private void addForeignkeys(ReferenceDescriptorDef refDef, TableDef tableDef) { if (!refDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_DATABASE_FOREIGNKEY, true)) { // we shall not generate a database foreignkey return; } // a foreignkey is added ...
[ "private", "void", "addForeignkeys", "(", "ReferenceDescriptorDef", "refDef", ",", "TableDef", "tableDef", ")", "{", "if", "(", "!", "refDef", ".", "getBooleanProperty", "(", "PropertyHelper", ".", "OJB_PROPERTY_DATABASE_FOREIGNKEY", ",", "true", ")", ")", "{", "/...
Adds foreignkey(s) for the reference to the corresponding table(s). @param refDef The reference @param tableDef The table of the class owning the reference
[ "Adds", "foreignkey", "(", "s", ")", "for", "the", "reference", "to", "the", "corresponding", "table", "(", "s", ")", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/TorqueModelDef.java#L198-L237
graphql-java/graphql-java
src/main/java/graphql/execution/instrumentation/tracing/TracingSupport.java
TracingSupport.beginField
public TracingContext beginField(DataFetchingEnvironment dataFetchingEnvironment, boolean trivialDataFetcher) { """ This should be called to start the trace of a field, with {@link TracingContext#onEnd()} being called to end the call. @param dataFetchingEnvironment the data fetching that is occurring @param t...
java
public TracingContext beginField(DataFetchingEnvironment dataFetchingEnvironment, boolean trivialDataFetcher) { if (!includeTrivialDataFetchers && trivialDataFetcher) { return () -> { // nothing to do }; } long startFieldFetch = System.nanoTime(); ...
[ "public", "TracingContext", "beginField", "(", "DataFetchingEnvironment", "dataFetchingEnvironment", ",", "boolean", "trivialDataFetcher", ")", "{", "if", "(", "!", "includeTrivialDataFetchers", "&&", "trivialDataFetcher", ")", "{", "return", "(", ")", "->", "{", "// ...
This should be called to start the trace of a field, with {@link TracingContext#onEnd()} being called to end the call. @param dataFetchingEnvironment the data fetching that is occurring @param trivialDataFetcher if the data fetcher is considered trivial @return a context to call end on
[ "This", "should", "be", "called", "to", "start", "the", "trace", "of", "a", "field", "with", "{", "@link", "TracingContext#onEnd", "()", "}", "being", "called", "to", "end", "the", "call", "." ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/instrumentation/tracing/TracingSupport.java#L64-L87
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/live/internal/AgentManager.java
AgentManager.updateRingingAgents
private void updateRingingAgents(String channelCalling, AsteriskAgentImpl agent) { """ Updates state of agent, if the call in a queue was redirect to the next agent because the ringed agent doesn't answer the call. After reset state, put the next agent in charge. @param channelCalling @param agent """ ...
java
private void updateRingingAgents(String channelCalling, AsteriskAgentImpl agent) { synchronized (ringingAgents) { if (ringingAgents.containsKey(channelCalling)) { updateAgentState(ringingAgents.get(channelCalling), AgentState.AGENT_IDLE); } ...
[ "private", "void", "updateRingingAgents", "(", "String", "channelCalling", ",", "AsteriskAgentImpl", "agent", ")", "{", "synchronized", "(", "ringingAgents", ")", "{", "if", "(", "ringingAgents", ".", "containsKey", "(", "channelCalling", ")", ")", "{", "updateAge...
Updates state of agent, if the call in a queue was redirect to the next agent because the ringed agent doesn't answer the call. After reset state, put the next agent in charge. @param channelCalling @param agent
[ "Updates", "state", "of", "agent", "if", "the", "call", "in", "a", "queue", "was", "redirect", "to", "the", "next", "agent", "because", "the", "ringed", "agent", "doesn", "t", "answer", "the", "call", ".", "After", "reset", "state", "put", "the", "next",...
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AgentManager.java#L187-L197
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/cash/ParameterizationFunction.java
ParameterizationFunction.extremum_alpha_n
private double extremum_alpha_n(int n, double[] alpha) { """ Determines the value for alpha_n where this function has a (local) extremum. @param n the index of the angle @param alpha the already determined alpha_values for the extremum @return the value for alpha_n where this function has a (local) extremum ...
java
private double extremum_alpha_n(int n, double[] alpha) { // arctan(infinity) = PI/2 if(vec.doubleValue(n) == 0) { return MathUtil.HALFPI; } double tan = 0; for(int j = n + 1; j < vec.getDimensionality(); j++) { double alpha_j = j == vec.getDimensionality() - 1 ? 0 : alpha[j]; tan ...
[ "private", "double", "extremum_alpha_n", "(", "int", "n", ",", "double", "[", "]", "alpha", ")", "{", "// arctan(infinity) = PI/2", "if", "(", "vec", ".", "doubleValue", "(", "n", ")", "==", "0", ")", "{", "return", "MathUtil", ".", "HALFPI", ";", "}", ...
Determines the value for alpha_n where this function has a (local) extremum. @param n the index of the angle @param alpha the already determined alpha_values for the extremum @return the value for alpha_n where this function has a (local) extremum
[ "Determines", "the", "value", "for", "alpha_n", "where", "this", "function", "has", "a", "(", "local", ")", "extremum", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/cash/ParameterizationFunction.java#L491-L512
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java
MicronautConsole.reinitialize
public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException { """ Use in testing when System.out, System.err or System.in change. @param systemIn The system in @param systemOut The system out @param systemErr The system err @throws IOException if there is ...
java
public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException { if (reader != null) { reader.shutdown(); } initialize(systemIn, systemOut, systemErr); }
[ "public", "void", "reinitialize", "(", "InputStream", "systemIn", ",", "PrintStream", "systemOut", ",", "PrintStream", "systemErr", ")", "throws", "IOException", "{", "if", "(", "reader", "!=", "null", ")", "{", "reader", ".", "shutdown", "(", ")", ";", "}",...
Use in testing when System.out, System.err or System.in change. @param systemIn The system in @param systemOut The system out @param systemErr The system err @throws IOException if there is an error
[ "Use", "in", "testing", "when", "System", ".", "out", "System", ".", "err", "or", "System", ".", "in", "change", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L196-L201
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/Native.java
Native.epollBusyWait
public static int epollBusyWait(FileDescriptor epollFd, EpollEventArray events) throws IOException { """ Non-blocking variant of {@link #epollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)} that will also hint to processor we are in a busy-wait loop. """ int ready = epollBusyWait0(ep...
java
public static int epollBusyWait(FileDescriptor epollFd, EpollEventArray events) throws IOException { int ready = epollBusyWait0(epollFd.intValue(), events.memoryAddress(), events.length()); if (ready < 0) { throw newIOException("epoll_wait", ready); } return ready; }
[ "public", "static", "int", "epollBusyWait", "(", "FileDescriptor", "epollFd", ",", "EpollEventArray", "events", ")", "throws", "IOException", "{", "int", "ready", "=", "epollBusyWait0", "(", "epollFd", ".", "intValue", "(", ")", ",", "events", ".", "memoryAddres...
Non-blocking variant of {@link #epollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)} that will also hint to processor we are in a busy-wait loop.
[ "Non", "-", "blocking", "variant", "of", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/Native.java#L128-L134
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/InputTypeUtil.java
InputTypeUtil.getPreProcessorForInputTypeCnn3DLayers
public static InputPreProcessor getPreProcessorForInputTypeCnn3DLayers(InputType inputType, String layerName) { """ Utility method for determining the appropriate preprocessor for CNN layers, such as {@link ConvolutionLayer} and {@link SubsamplingLayer} @param inputType Input type to get the preprocessor f...
java
public static InputPreProcessor getPreProcessorForInputTypeCnn3DLayers(InputType inputType, String layerName) { switch (inputType.getType()) { case FF: log.info("Automatic addition of FF -> CNN3D preprocessors: not yet implemented (layer name: \"" + la...
[ "public", "static", "InputPreProcessor", "getPreProcessorForInputTypeCnn3DLayers", "(", "InputType", "inputType", ",", "String", "layerName", ")", "{", "switch", "(", "inputType", ".", "getType", "(", ")", ")", "{", "case", "FF", ":", "log", ".", "info", "(", ...
Utility method for determining the appropriate preprocessor for CNN layers, such as {@link ConvolutionLayer} and {@link SubsamplingLayer} @param inputType Input type to get the preprocessor for @return Null if no preprocessor is required; otherwise the appropriate preprocessor for the given input type
[ "Utility", "method", "for", "determining", "the", "appropriate", "preprocessor", "for", "CNN", "layers", "such", "as", "{", "@link", "ConvolutionLayer", "}", "and", "{", "@link", "SubsamplingLayer", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/conf/layers/InputTypeUtil.java#L417-L433
albfernandez/itext2
src/main/java/com/lowagie/text/factories/ElementFactory.java
ElementFactory.getSection
public static Section getSection(Section parent, Properties attributes) { """ Creates a Section object based on a list of properties. @param attributes @return a Section """ Section section = parent.addSection(""); setSectionParameters(section, attributes); return section; }
java
public static Section getSection(Section parent, Properties attributes) { Section section = parent.addSection(""); setSectionParameters(section, attributes); return section; }
[ "public", "static", "Section", "getSection", "(", "Section", "parent", ",", "Properties", "attributes", ")", "{", "Section", "section", "=", "parent", ".", "addSection", "(", "\"\"", ")", ";", "setSectionParameters", "(", "section", ",", "attributes", ")", ";"...
Creates a Section object based on a list of properties. @param attributes @return a Section
[ "Creates", "a", "Section", "object", "based", "on", "a", "list", "of", "properties", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/factories/ElementFactory.java#L485-L489
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuTexRefSetArray
public static int cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, int Flags) { """ Binds an array as a texture reference. <pre> CUresult cuTexRefSetArray ( CUtexref hTexRef, CUarray hArray, unsigned int Flags ) </pre> <div> <p>Binds an array as a texture reference. Binds the CUDA array <tt>hArray</t...
java
public static int cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, int Flags) { return checkResult(cuTexRefSetArrayNative(hTexRef, hArray, Flags)); }
[ "public", "static", "int", "cuTexRefSetArray", "(", "CUtexref", "hTexRef", ",", "CUarray", "hArray", ",", "int", "Flags", ")", "{", "return", "checkResult", "(", "cuTexRefSetArrayNative", "(", "hTexRef", ",", "hArray", ",", "Flags", ")", ")", ";", "}" ]
Binds an array as a texture reference. <pre> CUresult cuTexRefSetArray ( CUtexref hTexRef, CUarray hArray, unsigned int Flags ) </pre> <div> <p>Binds an array as a texture reference. Binds the CUDA array <tt>hArray</tt> to the texture reference <tt>hTexRef</tt>. Any previous address or CUDA array state associated wit...
[ "Binds", "an", "array", "as", "a", "texture", "reference", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L9718-L9721
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/content/CmsMergePages.java
CmsMergePages.getResourceNameInOtherFolder
private String getResourceNameInOtherFolder(String resName, String sourceMergeFolder, String targetMergefolder) { """ Gets the name of a resource in the other merge folder.<p> @param resName the complete path of a resource @param sourceMergeFolder the path to the source merge folder @param targetMergefolder t...
java
private String getResourceNameInOtherFolder(String resName, String sourceMergeFolder, String targetMergefolder) { // get the resourcename of the resouce to test without the source merge folder String resourcename = resName.substring(sourceMergeFolder.length()); // get the complete path of the r...
[ "private", "String", "getResourceNameInOtherFolder", "(", "String", "resName", ",", "String", "sourceMergeFolder", ",", "String", "targetMergefolder", ")", "{", "// get the resourcename of the resouce to test without the source merge folder", "String", "resourcename", "=", "resNa...
Gets the name of a resource in the other merge folder.<p> @param resName the complete path of a resource @param sourceMergeFolder the path to the source merge folder @param targetMergefolder the path to the target merge folder @return the name of a resource in the other merge folder
[ "Gets", "the", "name", "of", "a", "resource", "in", "the", "other", "merge", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/CmsMergePages.java#L551-L557
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java
Pixel.setRGB_preserveAlpha
public void setRGB_preserveAlpha(int r, int g, int b) { """ Sets an RGB value at the position currently referenced by this Pixel. The present alpha value will not be altered by this operation. Each channel value is assumed to be 8bit and otherwise truncated. @param r red @param g green @param b blue @throws ...
java
public void setRGB_preserveAlpha(int r, int g, int b){ setValue((getValue() & 0xff000000 ) | Pixel.argb(0, r, g, b)); }
[ "public", "void", "setRGB_preserveAlpha", "(", "int", "r", ",", "int", "g", ",", "int", "b", ")", "{", "setValue", "(", "(", "getValue", "(", ")", "&", "0xff000000", ")", "|", "Pixel", ".", "argb", "(", "0", ",", "r", ",", "g", ",", "b", ")", "...
Sets an RGB value at the position currently referenced by this Pixel. The present alpha value will not be altered by this operation. Each channel value is assumed to be 8bit and otherwise truncated. @param r red @param g green @param b blue @throws ArrayIndexOutOfBoundsException if this Pixel's index is not in range of...
[ "Sets", "an", "RGB", "value", "at", "the", "position", "currently", "referenced", "by", "this", "Pixel", ".", "The", "present", "alpha", "value", "will", "not", "be", "altered", "by", "this", "operation", ".", "Each", "channel", "value", "is", "assumed", "...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java#L382-L384
twilio/twilio-java
src/main/java/com/twilio/http/Response.java
Response.getContent
public String getContent() { """ Get the the content of the response. <p> If there is a content string, that will be returned. Otherwise, will get content from input stream </p> @return the content string """ if (content != null) { return content; } if (stream != n...
java
public String getContent() { if (content != null) { return content; } if (stream != null) { Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A"); if (!scanner.hasNext()) { return ""; } String data = scan...
[ "public", "String", "getContent", "(", ")", "{", "if", "(", "content", "!=", "null", ")", "{", "return", "content", ";", "}", "if", "(", "stream", "!=", "null", ")", "{", "Scanner", "scanner", "=", "new", "Scanner", "(", "stream", ",", "\"UTF-8\"", "...
Get the the content of the response. <p> If there is a content string, that will be returned. Otherwise, will get content from input stream </p> @return the content string
[ "Get", "the", "the", "content", "of", "the", "response", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/http/Response.java#L51-L70
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/Utils.java
Utils.endsWith
public static boolean endsWith(String str, char ch) { """ Indicate if the given string ends with the given character. This is essentially the same as {@link String#endsWith(String)} except that it tests for ending with a character instead of a String. False is returned if the given string is null, empty, or its...
java
public static boolean endsWith(String str, char ch) { return str != null && str.length() > 0 && str.charAt(str.length() - 1) == ch; }
[ "public", "static", "boolean", "endsWith", "(", "String", "str", ",", "char", "ch", ")", "{", "return", "str", "!=", "null", "&&", "str", ".", "length", "(", ")", ">", "0", "&&", "str", ".", "charAt", "(", "str", ".", "length", "(", ")", "-", "1"...
Indicate if the given string ends with the given character. This is essentially the same as {@link String#endsWith(String)} except that it tests for ending with a character instead of a String. False is returned if the given string is null, empty, or its last character does not match ch. @param str String to be test...
[ "Indicate", "if", "the", "given", "string", "ends", "with", "the", "given", "character", ".", "This", "is", "essentially", "the", "same", "as", "{", "@link", "String#endsWith", "(", "String", ")", "}", "except", "that", "it", "tests", "for", "ending", "wit...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/Utils.java#L644-L648
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/ValueMap.java
ValueMap.getValueMap
public <T extends ValueMap> T getValueMap(String key, Class<T> clazz) { """ Returns the value mapped by {@code key} if it exists and if it can be coerced to the given type. The expected subclass MUST have a constructor that accepts a {@link Map}. """ Object value = get(key); return coerceToValueMap(va...
java
public <T extends ValueMap> T getValueMap(String key, Class<T> clazz) { Object value = get(key); return coerceToValueMap(value, clazz); }
[ "public", "<", "T", "extends", "ValueMap", ">", "T", "getValueMap", "(", "String", "key", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Object", "value", "=", "get", "(", "key", ")", ";", "return", "coerceToValueMap", "(", "value", ",", "clazz", "...
Returns the value mapped by {@code key} if it exists and if it can be coerced to the given type. The expected subclass MUST have a constructor that accepts a {@link Map}.
[ "Returns", "the", "value", "mapped", "by", "{" ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/ValueMap.java#L327-L330
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ServerCommandListener.java
ServerCommandListener.asyncResponse
private synchronized void asyncResponse(String command, SocketChannel sc) { """ Creates a single thread to wait for the command to complete then respond. """ if (closed) { Utils.tryToClose(sc); } else { Thread thread = new Thread(new ResponseThread(command, sc), "kernel...
java
private synchronized void asyncResponse(String command, SocketChannel sc) { if (closed) { Utils.tryToClose(sc); } else { Thread thread = new Thread(new ResponseThread(command, sc), "kernel-" + command + "-command-response"); // We allow a maximum of one outstanding s...
[ "private", "synchronized", "void", "asyncResponse", "(", "String", "command", ",", "SocketChannel", "sc", ")", "{", "if", "(", "closed", ")", "{", "Utils", ".", "tryToClose", "(", "sc", ")", ";", "}", "else", "{", "Thread", "thread", "=", "new", "Thread"...
Creates a single thread to wait for the command to complete then respond.
[ "Creates", "a", "single", "thread", "to", "wait", "for", "the", "command", "to", "complete", "then", "respond", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ServerCommandListener.java#L474-L488
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getValue
public static Object getValue(Object obj, String field) { """ Gets value. @param obj the obj @param field the field @return the value """ Method getter = getGetterMethod(obj.getClass(), field); try { return getter.invoke(obj); } catch (IllegalAccessException | Invoca...
java
public static Object getValue(Object obj, String field) { Method getter = getGetterMethod(obj.getClass(), field); try { return getter.invoke(obj); } catch (IllegalAccessException | InvocationTargetException e) { return null; } }
[ "public", "static", "Object", "getValue", "(", "Object", "obj", ",", "String", "field", ")", "{", "Method", "getter", "=", "getGetterMethod", "(", "obj", ".", "getClass", "(", ")", ",", "field", ")", ";", "try", "{", "return", "getter", ".", "invoke", ...
Gets value. @param obj the obj @param field the field @return the value
[ "Gets", "value", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L237-L245
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/DataHandler.java
DataHandler.pushFcmRegistrationId
@Deprecated public void pushFcmRegistrationId(String fcmId, boolean register) { """ Sends the FCM registration ID to CleverTap. @param fcmId The FCM registration ID @param register Boolean indicating whether to register or not for receiving push messages from CleverTap. Set this to true to receive pus...
java
@Deprecated public void pushFcmRegistrationId(String fcmId, boolean register) { CleverTapAPI cleverTapAPI = weakReference.get(); if (cleverTapAPI == null) { Logger.d("CleverTap Instance is null."); } else { cleverTapAPI.pushFcmRegistrationId(fcmId, register); ...
[ "@", "Deprecated", "public", "void", "pushFcmRegistrationId", "(", "String", "fcmId", ",", "boolean", "register", ")", "{", "CleverTapAPI", "cleverTapAPI", "=", "weakReference", ".", "get", "(", ")", ";", "if", "(", "cleverTapAPI", "==", "null", ")", "{", "L...
Sends the FCM registration ID to CleverTap. @param fcmId The FCM registration ID @param register Boolean indicating whether to register or not for receiving push messages from CleverTap. Set this to true to receive push messages from CleverTap, and false to not receive any messages from CleverTap. @deprecated use {...
[ "Sends", "the", "FCM", "registration", "ID", "to", "CleverTap", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/DataHandler.java#L43-L51
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java
AbstractJcrNode.findBestPropertyDefinition
final JcrPropertyDefinition findBestPropertyDefinition( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, org.modeshape.jcr.value.Property property, ...
java
final JcrPropertyDefinition findBestPropertyDefinition( Name primaryTypeNameOfParent, Collection<Name> mixinTypeNamesOfParent, org.modeshape.jcr.value.Property property, ...
[ "final", "JcrPropertyDefinition", "findBestPropertyDefinition", "(", "Name", "primaryTypeNameOfParent", ",", "Collection", "<", "Name", ">", "mixinTypeNamesOfParent", ",", "org", ".", "modeshape", ".", "jcr", ".", "value", ".", "Property", "property", ",", "boolean", ...
Find the best property definition in this node's primary type and mixin types. @param primaryTypeNameOfParent the name of the primary type for the parent node; may not be null @param mixinTypeNamesOfParent the names of the mixin types for the parent node; may be null or empty if there are no mixins to include in the s...
[ "Find", "the", "best", "property", "definition", "in", "this", "node", "s", "primary", "type", "and", "mixin", "types", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/AbstractJcrNode.java#L495-L528
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/CachedRemoteTable.java
CachedRemoteTable.getRemoteDatabase
public RemoteDatabase getRemoteDatabase(Map<String, Object> properties) throws RemoteException { """ Get/Make this remote database session for this table session. @param properties The client database properties (Typically for transaction support). """ return m_tableRemote.getRemoteDatabase(properties...
java
public RemoteDatabase getRemoteDatabase(Map<String, Object> properties) throws RemoteException { return m_tableRemote.getRemoteDatabase(properties); }
[ "public", "RemoteDatabase", "getRemoteDatabase", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "return", "m_tableRemote", ".", "getRemoteDatabase", "(", "properties", ")", ";", "}" ]
Get/Make this remote database session for this table session. @param properties The client database properties (Typically for transaction support).
[ "Get", "/", "Make", "this", "remote", "database", "session", "for", "this", "table", "session", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/CachedRemoteTable.java#L710-L713
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java
AbstractShortColumn.readShort
protected int readShort(int offset, byte[] data) { """ Read a two byte integer from the data. @param offset current offset into data block @param data data block @return int value """ int result = 0; int i = offset + m_offset; for (int shiftBy = 0; shiftBy < 16; shiftBy += 8) { ...
java
protected int readShort(int offset, byte[] data) { int result = 0; int i = offset + m_offset; for (int shiftBy = 0; shiftBy < 16; shiftBy += 8) { result |= ((data[i] & 0xff)) << shiftBy; ++i; } return result; }
[ "protected", "int", "readShort", "(", "int", "offset", ",", "byte", "[", "]", "data", ")", "{", "int", "result", "=", "0", ";", "int", "i", "=", "offset", "+", "m_offset", ";", "for", "(", "int", "shiftBy", "=", "0", ";", "shiftBy", "<", "16", ";...
Read a two byte integer from the data. @param offset current offset into data block @param data data block @return int value
[ "Read", "a", "two", "byte", "integer", "from", "the", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/AbstractShortColumn.java#L49-L59
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassOptionPaneUI.java
SeaGlassOptionPaneUI.createMessageArea
@Override protected Container createMessageArea() { """ Called from {@link #installComponents} to create a {@code Container} containing the body of the message. The icon is the created by calling {@link #addIcon}. """ JPanel top = new JPanel(); top.setName("OptionPane.messageArea"); ...
java
@Override protected Container createMessageArea() { JPanel top = new JPanel(); top.setName("OptionPane.messageArea"); top.setLayout(new BorderLayout()); /* Fill the body. */ Container body = new JPanel(new GridBagLayout()); Container realBody = new JPanel(new...
[ "@", "Override", "protected", "Container", "createMessageArea", "(", ")", "{", "JPanel", "top", "=", "new", "JPanel", "(", ")", ";", "top", ".", "setName", "(", "\"OptionPane.messageArea\"", ")", ";", "top", ".", "setLayout", "(", "new", "BorderLayout", "(",...
Called from {@link #installComponents} to create a {@code Container} containing the body of the message. The icon is the created by calling {@link #addIcon}.
[ "Called", "from", "{" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassOptionPaneUI.java#L249-L286
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.getHistoryForTask
@Deprecated public Optional<SingularityTaskIdHistory> getHistoryForTask(String requestId, String runId) { """ Retrieve the task id and state for an inactive task by its runId @param requestId The request ID to search for @param runId The run ID to search for @return A {@link SingularityTaskIdHistory} obj...
java
@Deprecated public Optional<SingularityTaskIdHistory> getHistoryForTask(String requestId, String runId) { return getTaskIdHistoryByRunId(requestId, runId); }
[ "@", "Deprecated", "public", "Optional", "<", "SingularityTaskIdHistory", ">", "getHistoryForTask", "(", "String", "requestId", ",", "String", "runId", ")", "{", "return", "getTaskIdHistoryByRunId", "(", "requestId", ",", "runId", ")", ";", "}" ]
Retrieve the task id and state for an inactive task by its runId @param requestId The request ID to search for @param runId The run ID to search for @return A {@link SingularityTaskIdHistory} object if the task exists @deprecated use {@link #getTaskIdHistoryByRunId}
[ "Retrieve", "the", "task", "id", "and", "state", "for", "an", "inactive", "task", "by", "its", "runId" ]
train
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1151-L1154
qiniu/java-sdk
src/main/java/com/qiniu/storage/BucketManager.java
BucketManager.copy
public void copy(String fromBucket, String fromFileKey, String toBucket, String toFileKey) throws QiniuException { """ 复制文件,要求空间在同一账号下 @param fromBucket 源空间名称 @param fromFileKey 源文件名称 @param toBucket 目的空间名称 @param toFileKey 目的文件名称 @throws QiniuException """ Response res = copy(...
java
public void copy(String fromBucket, String fromFileKey, String toBucket, String toFileKey) throws QiniuException { Response res = copy(fromBucket, fromFileKey, toBucket, toFileKey, false); if (!res.isOK()) { throw new QiniuException(res); } res.close(); }
[ "public", "void", "copy", "(", "String", "fromBucket", ",", "String", "fromFileKey", ",", "String", "toBucket", ",", "String", "toFileKey", ")", "throws", "QiniuException", "{", "Response", "res", "=", "copy", "(", "fromBucket", ",", "fromFileKey", ",", "toBuc...
复制文件,要求空间在同一账号下 @param fromBucket 源空间名称 @param fromFileKey 源文件名称 @param toBucket 目的空间名称 @param toFileKey 目的文件名称 @throws QiniuException
[ "复制文件,要求空间在同一账号下" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/BucketManager.java#L386-L393
greese/dasein-persist
src/main/java/org/dasein/persist/PersistentFactory.java
PersistentFactory.addSearch
public void addSearch(String field, Class<? extends Execution> cls) { """ Adds a query for searches on a specified field. @param field the field to search on @param cls the class of the query that performs the search """ searches.put(field, cls); }
java
public void addSearch(String field, Class<? extends Execution> cls) { searches.put(field, cls); }
[ "public", "void", "addSearch", "(", "String", "field", ",", "Class", "<", "?", "extends", "Execution", ">", "cls", ")", "{", "searches", ".", "put", "(", "field", ",", "cls", ")", ";", "}" ]
Adds a query for searches on a specified field. @param field the field to search on @param cls the class of the query that performs the search
[ "Adds", "a", "query", "for", "searches", "on", "a", "specified", "field", "." ]
train
https://github.com/greese/dasein-persist/blob/1104621ad1670a45488b093b984ec1db4c7be781/src/main/java/org/dasein/persist/PersistentFactory.java#L307-L309
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newProperty
public Feature newProperty(String id, String lemma, List<Span<Term>> references) { """ Creates a new property. It receives it's ID as an argument. The property is added to the document. @param id the ID of the property. @param lemma the lemma of the property. @param references different mentions (list of target...
java
public Feature newProperty(String id, String lemma, List<Span<Term>> references) { idManager.updateCounter(AnnotationType.PROPERTY, id); Feature newProperty = new Feature(id, lemma, references); annotationContainer.add(newProperty, Layer.PROPERTIES, AnnotationType.PROPERTY); return newProperty; }
[ "public", "Feature", "newProperty", "(", "String", "id", ",", "String", "lemma", ",", "List", "<", "Span", "<", "Term", ">", ">", "references", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "PROPERTY", ",", "id", ")", ";", "Fea...
Creates a new property. It receives it's ID as an argument. The property is added to the document. @param id the ID of the property. @param lemma the lemma of the property. @param references different mentions (list of targets) to the same property. @return a new coreference.
[ "Creates", "a", "new", "property", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "property", "is", "added", "to", "the", "document", "." ]
train
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L902-L907
h2oai/h2o-2
src/main/java/water/api/Frames.java
Frames.serveOneOrAll
private Response serveOneOrAll(Map<String, Frame> framesMap) { """ For one or more Frame from the KV store, sumamrize and enhance them and Response containing a map of them. """ // returns empty sets if !this.find_compatible_models Pair<Map<String, Model>, Map<String, Set<String>>> models_info = fetchM...
java
private Response serveOneOrAll(Map<String, Frame> framesMap) { // returns empty sets if !this.find_compatible_models Pair<Map<String, Model>, Map<String, Set<String>>> models_info = fetchModels(); Map<String, Model> all_models = models_info.getFirst(); Map<String, Set<String>> all_models_cols = models_i...
[ "private", "Response", "serveOneOrAll", "(", "Map", "<", "String", ",", "Frame", ">", "framesMap", ")", "{", "// returns empty sets if !this.find_compatible_models", "Pair", "<", "Map", "<", "String", ",", "Model", ">", ",", "Map", "<", "String", ",", "Set", "...
For one or more Frame from the KV store, sumamrize and enhance them and Response containing a map of them.
[ "For", "one", "or", "more", "Frame", "from", "the", "KV", "store", "sumamrize", "and", "enhance", "them", "and", "Response", "containing", "a", "map", "of", "them", "." ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/api/Frames.java#L172-L201
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.svgCircleSegment
public static Element svgCircleSegment(SVGPlot svgp, double centerx, double centery, double angleStart, double angleDelta, double innerRadius, double outerRadius) { """ Create a circle segment. @param svgp Plot to draw to @param centerx Center X position @param centery Center Y position @param angleStart Sta...
java
public static Element svgCircleSegment(SVGPlot svgp, double centerx, double centery, double angleStart, double angleDelta, double innerRadius, double outerRadius) { final DoubleWrapper tmp = new DoubleWrapper(); // To return cosine double sin1st = FastMath.sinAndCos(angleStart, tmp); double cos1st = tmp.val...
[ "public", "static", "Element", "svgCircleSegment", "(", "SVGPlot", "svgp", ",", "double", "centerx", ",", "double", "centery", ",", "double", "angleStart", ",", "double", "angleDelta", ",", "double", "innerRadius", ",", "double", "outerRadius", ")", "{", "final"...
Create a circle segment. @param svgp Plot to draw to @param centerx Center X position @param centery Center Y position @param angleStart Starting angle @param angleDelta Angle delta @param innerRadius inner radius @param outerRadius outer radius @return SVG element representing this circle segment
[ "Create", "a", "circle", "segment", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L678-L705
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/Options.java
Options.setOptionOrWarn
public int setOptionOrWarn(String[] flags, int i) { """ Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the opti...
java
public int setOptionOrWarn(String[] flags, int i) { int j = setOptionFlag(flags, i); if (j == i) { j = tlpParams.setOptionFlag(flags, i); } if (j == i) { System.err.println("WARNING! lexparser.Options: Unknown option ignored: " + flags[i]); j++; } return j; }
[ "public", "int", "setOptionOrWarn", "(", "String", "[", "]", "flags", ",", "int", "i", ")", "{", "int", "j", "=", "setOptionFlag", "(", "flags", ",", "i", ")", ";", "if", "(", "j", "==", "i", ")", "{", "j", "=", "tlpParams", ".", "setOptionFlag", ...
Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is set in the language-particular TreebankLangParserParams. No...
[ "Set", "an", "option", "based", "on", "a", "String", "array", "in", "the", "style", "of", "commandline", "flags", ".", "The", "option", "may", "be", "either", "one", "known", "by", "the", "Options", "object", "or", "one", "recognized", "by", "the", "Tree...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/Options.java#L130-L140
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.updateAsync
public <T extends IEntity> void updateAsync(T entity, CallbackHandler callbackHandler) throws FMSException { """ Method to update the record of the corresponding entity in asynchronous fashion @param entity the entity @param callbackHandler the callback handler @throws FMSException """ IntuitMe...
java
public <T extends IEntity> void updateAsync(T entity, CallbackHandler callbackHandler) throws FMSException { IntuitMessage intuitMessage = prepareUpdate(entity); //set callback handler intuitMessage.getRequestElements().setCallbackHandler(callbackHandler); //execute async interceptors...
[ "public", "<", "T", "extends", "IEntity", ">", "void", "updateAsync", "(", "T", "entity", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "IntuitMessage", "intuitMessage", "=", "prepareUpdate", "(", "entity", ")", ";", "//set callbac...
Method to update the record of the corresponding entity in asynchronous fashion @param entity the entity @param callbackHandler the callback handler @throws FMSException
[ "Method", "to", "update", "the", "record", "of", "the", "corresponding", "entity", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L799-L808
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.runUninterruptibly
public static void runUninterruptibly(final long timeout, final TimeUnit unit, final Try.BiConsumer<Long, TimeUnit, InterruptedException> cmd) { """ Note: Copied from Google Guava under Apache License v2.0 <br /> <br /> If a thread is interrupted during such a call, the call continues to block until the resul...
java
public static void runUninterruptibly(final long timeout, final TimeUnit unit, final Try.BiConsumer<Long, TimeUnit, InterruptedException> cmd) { N.checkArgNotNull(unit, "unit"); N.checkArgNotNull(cmd); boolean interrupted = false; try { long remainingNanos = unit.toN...
[ "public", "static", "void", "runUninterruptibly", "(", "final", "long", "timeout", ",", "final", "TimeUnit", "unit", ",", "final", "Try", ".", "BiConsumer", "<", "Long", ",", "TimeUnit", ",", "InterruptedException", ">", "cmd", ")", "{", "N", ".", "checkArgN...
Note: Copied from Google Guava under Apache License v2.0 <br /> <br /> If a thread is interrupted during such a call, the call continues to block until the result is available or the timeout elapses, and only then re-interrupts the thread. @param timeout @param unit @param cmd
[ "Note", ":", "Copied", "from", "Google", "Guava", "under", "Apache", "License", "v2", ".", "0", "<br", "/", ">", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L28000-L28025
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getUntilFirstIncl
@Nullable public static String getUntilFirstIncl (@Nullable final String sStr, @Nullable final String sSearch) { """ Get everything from the string up to and including the first passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</c...
java
@Nullable public static String getUntilFirstIncl (@Nullable final String sStr, @Nullable final String sSearch) { return _getUntilFirst (sStr, sSearch, true); }
[ "@", "Nullable", "public", "static", "String", "getUntilFirstIncl", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "return", "_getUntilFirst", "(", "sStr", ",", "sSearch", ",", "true", ")", ";",...
Get everything from the string up to and including the first passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @return <code>null</code> if the passed string does not contain the search string. If the search string is empty, the empty...
[ "Get", "everything", "from", "the", "string", "up", "to", "and", "including", "the", "first", "passed", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4802-L4806
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/AbstractSQLTransform.java
AbstractSQLTransform.generateReadValueFromCursor
@Override public void generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName) { """ /* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.SQLTransform#generateReadValueFromCursor(com.squareup.javapoet.Meth...
java
@Override public void generateReadValueFromCursor(Builder methodBuilder, SQLiteDaoDefinition daoDefinition, TypeName paramTypeName, String cursorName, String indexName) { // except for supported result type, each transform does not need to // implements this method throw new KriptonProcessorException("Something ...
[ "@", "Override", "public", "void", "generateReadValueFromCursor", "(", "Builder", "methodBuilder", ",", "SQLiteDaoDefinition", "daoDefinition", ",", "TypeName", "paramTypeName", ",", "String", "cursorName", ",", "String", "indexName", ")", "{", "// except for supported re...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.SQLTransform#generateReadValueFromCursor(com.squareup.javapoet.MethodSpec.Builder, com.abubusoft.kripton.processor.sqlite.model.SQLiteDaoDefinition, com.squareup.javapoet.TypeName, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/AbstractSQLTransform.java#L80-L85
atomix/atomix
cluster/src/main/java/io/atomix/cluster/MemberBuilder.java
MemberBuilder.withAddress
@Deprecated public MemberBuilder withAddress(String host, int port) { """ Sets the member host/port. @param host the host name @param port the port number @return the member builder @throws io.atomix.utils.net.MalformedAddressException if a valid {@link Address} cannot be constructed from the arguments @d...
java
@Deprecated public MemberBuilder withAddress(String host, int port) { return withAddress(Address.from(host, port)); }
[ "@", "Deprecated", "public", "MemberBuilder", "withAddress", "(", "String", "host", ",", "int", "port", ")", "{", "return", "withAddress", "(", "Address", ".", "from", "(", "host", ",", "port", ")", ")", ";", "}" ]
Sets the member host/port. @param host the host name @param port the port number @return the member builder @throws io.atomix.utils.net.MalformedAddressException if a valid {@link Address} cannot be constructed from the arguments @deprecated since 3.1. Use {@link #withHost(String)} and {@link #withPort(int)} instead
[ "Sets", "the", "member", "host", "/", "port", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/cluster/src/main/java/io/atomix/cluster/MemberBuilder.java#L90-L93
aerogear/aerogear-unifiedpush-server
jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/InstallationManagementEndpoint.java
InstallationManagementEndpoint.updateInstallation
@PUT @Path("/ { """ Update Installation of specified Variant @param entity new info of {@link Installation} @param variantId id of {@link org.jboss.aerogear.unifiedpush.api.Variant} @param installationId id of {@link Installation} @return updated {@link Installation} @st...
java
@PUT @Path("/{installationID}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response updateInstallation(Installation entity, @PathParam("variantID") String variantId, @PathParam("installationID") String installationId) { Installation installation = clientI...
[ "@", "PUT", "@", "Path", "(", "\"/{installationID}\"", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "public", "Response", "updateInstallation", "(", "Installation", "entity",...
Update Installation of specified Variant @param entity new info of {@link Installation} @param variantId id of {@link org.jboss.aerogear.unifiedpush.api.Variant} @param installationId id of {@link Installation} @return updated {@link Installation} @statuscode 204 The Installation update...
[ "Update", "Installation", "of", "specified", "Variant" ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/InstallationManagementEndpoint.java#L155-L171
phax/ph-oton
ph-oton-uicore/src/main/java/com/helger/photon/uicore/html/swf/HCSWFObject.java
HCSWFObject.addObjectAttr
@Nonnull public final HCSWFObject addObjectAttr (@Nonnull final String sName, final String sValue) { """ Add an attribute to the created <code>object</code> tag @param sName Attribute name @param sValue Attribute value @return this """ if (!JSMarshaller.isJSIdentifier (sName)) throw new Ille...
java
@Nonnull public final HCSWFObject addObjectAttr (@Nonnull final String sName, final String sValue) { if (!JSMarshaller.isJSIdentifier (sName)) throw new IllegalArgumentException ("The name '" + sName + "' is not a legal JS identifier!"); if (m_aObjectAttrs == null) m_aObjectAttrs = new CommonsL...
[ "@", "Nonnull", "public", "final", "HCSWFObject", "addObjectAttr", "(", "@", "Nonnull", "final", "String", "sName", ",", "final", "String", "sValue", ")", "{", "if", "(", "!", "JSMarshaller", ".", "isJSIdentifier", "(", "sName", ")", ")", "throw", "new", "...
Add an attribute to the created <code>object</code> tag @param sName Attribute name @param sValue Attribute value @return this
[ "Add", "an", "attribute", "to", "the", "created", "<code", ">", "object<", "/", "code", ">", "tag" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uicore/src/main/java/com/helger/photon/uicore/html/swf/HCSWFObject.java#L241-L251
nlalevee/jsourcemap
jsourcemap/src/java/org/hibnet/jsourcemap/BasicSourceMapConsumer.java
BasicSourceMapConsumer.generatedPositionFor
@Override public GeneratedPosition generatedPositionFor(String source, int line, int column, Bias bias) { """ Returns the generated line and column information for the original source, line, and column positions provided. The only argument is an object with the following properties: - source: The filename ...
java
@Override public GeneratedPosition generatedPositionFor(String source, int line, int column, Bias bias) { if (this.sourceRoot != null) { source = Util.relative(this.sourceRoot, source); } if (!this._sources.has(source)) { return new GeneratedPosition(); } ...
[ "@", "Override", "public", "GeneratedPosition", "generatedPositionFor", "(", "String", "source", ",", "int", "line", ",", "int", "column", ",", "Bias", "bias", ")", "{", "if", "(", "this", ".", "sourceRoot", "!=", "null", ")", "{", "source", "=", "Util", ...
Returns the generated line and column information for the original source, line, and column positions provided. The only argument is an object with the following properties: - source: The filename of the original source. - line: The line number in the original source. - column: The column number in the original source...
[ "Returns", "the", "generated", "line", "and", "column", "information", "for", "the", "original", "source", "line", "and", "column", "positions", "provided", ".", "The", "only", "argument", "is", "an", "object", "with", "the", "following", "properties", ":" ]
train
https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/BasicSourceMapConsumer.java#L424-L454
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java
KinesisStreamImporterConfig.getPropertyAsLong
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) { """ get property value as long. @param props The properties @param propertyName property name @param defaultValue The default value @return property value """ String value = props.getProperty(propert...
java
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) { String value = props.getProperty(propertyName, "").trim(); if (value.isEmpty()) { return defaultValue; } try { long val = Long.parseLong(value); if (val <=...
[ "public", "static", "long", "getPropertyAsLong", "(", "Properties", "props", ",", "String", "propertyName", ",", "long", "defaultValue", ")", "{", "String", "value", "=", "props", ".", "getProperty", "(", "propertyName", ",", "\"\"", ")", ".", "trim", "(", "...
get property value as long. @param props The properties @param propertyName property name @param defaultValue The default value @return property value
[ "get", "property", "value", "as", "long", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kinesis/KinesisStreamImporterConfig.java#L232-L248
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getWriter
public static BufferedWriter getWriter(File file, Charset charset, boolean isAppend) throws IORuntimeException { """ 获得一个带缓存的写入对象 @param file 输出文件 @param charset 字符集 @param isAppend 是否追加 @return BufferedReader对象 @throws IORuntimeException IO异常 """ return FileWriter.create(file, charset).getWriter(isA...
java
public static BufferedWriter getWriter(File file, Charset charset, boolean isAppend) throws IORuntimeException { return FileWriter.create(file, charset).getWriter(isAppend); }
[ "public", "static", "BufferedWriter", "getWriter", "(", "File", "file", ",", "Charset", "charset", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "FileWriter", ".", "create", "(", "file", ",", "charset", ")", ".", "getWriter", ...
获得一个带缓存的写入对象 @param file 输出文件 @param charset 字符集 @param isAppend 是否追加 @return BufferedReader对象 @throws IORuntimeException IO异常
[ "获得一个带缓存的写入对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2624-L2626
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/ValidationFilter.java
ValidationFilter.setValidateMap
public void setValidateMap(final Map<QName, Map<String, Set<String>>> validateMap) { """ Set valid attribute values. <p>The contents of the map is in pseudo-code {@code Map<AttName, Map<ElemName, <Set<Value>>>}. For default element mapping, the value is {@code *}. """ this.validateMap = validateMa...
java
public void setValidateMap(final Map<QName, Map<String, Set<String>>> validateMap) { this.validateMap = validateMap; }
[ "public", "void", "setValidateMap", "(", "final", "Map", "<", "QName", ",", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", ">", "validateMap", ")", "{", "this", ".", "validateMap", "=", "validateMap", ";", "}" ]
Set valid attribute values. <p>The contents of the map is in pseudo-code {@code Map<AttName, Map<ElemName, <Set<Value>>>}. For default element mapping, the value is {@code *}.
[ "Set", "valid", "attribute", "values", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ValidationFilter.java#L56-L58
allure-framework/allure1
allure-model/src/main/java/ru/yandex/qatools/allure/config/AllureNamingUtils.java
AllureNamingUtils.replaceBadXmlCharactersBySpace
public static void replaceBadXmlCharactersBySpace(char[] cbuf, int off, int len) { """ Replace bad xml charactes in given array by space @param cbuf buffer to replace in @param off Offset from which to start reading characters @param len Number of characters to be replaced """ for (int i = off; ...
java
public static void replaceBadXmlCharactersBySpace(char[] cbuf, int off, int len) { for (int i = off; i < off + len; i++) { if (isBadXmlCharacter(cbuf[i])) { cbuf[i] = '\u0020'; } } }
[ "public", "static", "void", "replaceBadXmlCharactersBySpace", "(", "char", "[", "]", "cbuf", ",", "int", "off", ",", "int", "len", ")", "{", "for", "(", "int", "i", "=", "off", ";", "i", "<", "off", "+", "len", ";", "i", "++", ")", "{", "if", "("...
Replace bad xml charactes in given array by space @param cbuf buffer to replace in @param off Offset from which to start reading characters @param len Number of characters to be replaced
[ "Replace", "bad", "xml", "charactes", "in", "given", "array", "by", "space" ]
train
https://github.com/allure-framework/allure1/blob/9a816fa05d8b894a917b7ebb7fd1a4056dee4693/allure-model/src/main/java/ru/yandex/qatools/allure/config/AllureNamingUtils.java#L63-L69
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ClassHelper.java
ClassHelper.newInstance
public static Object newInstance(Class target, Class[] types, Object[] args, boolean makeAccessible) throws InstantiationException, IllegalAccessException, ...
java
public static Object newInstance(Class target, Class[] types, Object[] args, boolean makeAccessible) throws InstantiationException, IllegalAccessException, ...
[ "public", "static", "Object", "newInstance", "(", "Class", "target", ",", "Class", "[", "]", "types", ",", "Object", "[", "]", "args", ",", "boolean", "makeAccessible", ")", "throws", "InstantiationException", ",", "IllegalAccessException", ",", "IllegalArgumentEx...
Returns a new instance of the given class, using the constructor with the specified parameter types. This method can also use private constructors if <code>makeAccessible</code> is set to <code>true</code> (and there are no other security constraints). @param target The class to instantiate @param types ...
[ "Returns", "a", "new", "instance", "of", "the", "given", "class", "using", "the", "constructor", "with", "the", "specified", "parameter", "types", ".", "This", "method", "can", "also", "use", "private", "constructors", "if", "<code", ">", "makeAccessible<", "/...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L201-L223
uniform-java/uniform
src/main/java/net/uniform/impl/ElementWithOptions.java
ElementWithOptions.addOptionToGroup
public ElementWithOptions addOptionToGroup(String value, String text, String groupId) { """ Adds an option to the group of this element with the given id. If the group is not found, it's created with null text. @param value Unique value in this element @param text Option text @param groupId Id of the option gr...
java
public ElementWithOptions addOptionToGroup(String value, String text, String groupId) { if (value == null) { value = ""; } value = value.trim(); this.addOptionToGroup(new Option(value, text), groupId); return this; }
[ "public", "ElementWithOptions", "addOptionToGroup", "(", "String", "value", ",", "String", "text", ",", "String", "groupId", ")", "{", "if", "(", "value", "==", "null", ")", "{", "value", "=", "\"\"", ";", "}", "value", "=", "value", ".", "trim", "(", ...
Adds an option to the group of this element with the given id. If the group is not found, it's created with null text. @param value Unique value in this element @param text Option text @param groupId Id of the option group @return This element
[ "Adds", "an", "option", "to", "the", "group", "of", "this", "element", "with", "the", "given", "id", ".", "If", "the", "group", "is", "not", "found", "it", "s", "created", "with", "null", "text", "." ]
train
https://github.com/uniform-java/uniform/blob/0b84f0db562253165bc06c69f631e464dca0cb48/src/main/java/net/uniform/impl/ElementWithOptions.java#L137-L147
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java
ReferenceIndividualGroupService.findGroupWithLock
@Override public ILockableEntityGroup findGroupWithLock(String key, String owner, int secs) throws GroupsException { """ Returns a pre-existing <code>ILockableEntityGroup</code> or null if the group is not found. """ throwExceptionIfNotInternallyManaged(); Class groupType = IC...
java
@Override public ILockableEntityGroup findGroupWithLock(String key, String owner, int secs) throws GroupsException { throwExceptionIfNotInternallyManaged(); Class groupType = ICompositeGroupService.GROUP_ENTITY_TYPE; try { IEntityLock lock = (sec...
[ "@", "Override", "public", "ILockableEntityGroup", "findGroupWithLock", "(", "String", "key", ",", "String", "owner", ",", "int", "secs", ")", "throws", "GroupsException", "{", "throwExceptionIfNotInternallyManaged", "(", ")", ";", "Class", "groupType", "=", "ICompo...
Returns a pre-existing <code>ILockableEntityGroup</code> or null if the group is not found.
[ "Returns", "a", "pre", "-", "existing", "<code", ">", "ILockableEntityGroup<", "/", "code", ">", "or", "null", "if", "the", "group", "is", "not", "found", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java#L235-L261
twitter/cloudhopper-commons
ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java
SslContextFactory.loadTrustStore
protected KeyStore loadTrustStore() throws Exception { """ Override this method to provide alternate way to load a truststore. @return the key store instance @throws Exception """ return getKeyStore(trustStoreInputStream, sslConfig.getTrustStorePath(), sslConfig.getTrustStoreType(), sslConfig...
java
protected KeyStore loadTrustStore() throws Exception { return getKeyStore(trustStoreInputStream, sslConfig.getTrustStorePath(), sslConfig.getTrustStoreType(), sslConfig.getTrustStoreProvider(), sslConfig.getTrustStorePassword()); }
[ "protected", "KeyStore", "loadTrustStore", "(", ")", "throws", "Exception", "{", "return", "getKeyStore", "(", "trustStoreInputStream", ",", "sslConfig", ".", "getTrustStorePath", "(", ")", ",", "sslConfig", ".", "getTrustStoreType", "(", ")", ",", "sslConfig", "....
Override this method to provide alternate way to load a truststore. @return the key store instance @throws Exception
[ "Override", "this", "method", "to", "provide", "alternate", "way", "to", "load", "a", "truststore", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java#L195-L199