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
grails/grails-core
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java
DefaultGrailsApplication.addOverridableArtefact
public GrailsClass addOverridableArtefact(String artefactType, @SuppressWarnings("rawtypes") Class artefactClass) { """ Adds an artefact of the given type for the given Class. @param artefactType The type of the artefact as defined by a ArtefactHandler instance @param artefactClass A Class instance that match...
java
public GrailsClass addOverridableArtefact(String artefactType, @SuppressWarnings("rawtypes") Class artefactClass) { return addArtefact(artefactType, artefactClass, true); }
[ "public", "GrailsClass", "addOverridableArtefact", "(", "String", "artefactType", ",", "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "Class", "artefactClass", ")", "{", "return", "addArtefact", "(", "artefactType", ",", "artefactClass", ",", "true", ")", ";", ...
Adds an artefact of the given type for the given Class. @param artefactType The type of the artefact as defined by a ArtefactHandler instance @param artefactClass A Class instance that matches the type defined by the ArtefactHandler @return The GrailsClass if successful or null if it couldn't be added @throws GrailsC...
[ "Adds", "an", "artefact", "of", "the", "given", "type", "for", "the", "given", "Class", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java#L801-L803
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/api/loader/FileBatch.java
FileBatch.readFromZip
public static FileBatch readFromZip(InputStream is) throws IOException { """ Read a FileBatch from the specified input stream. This method assumes the FileBatch was previously saved to zip format using {@link #writeAsZip(File)} or {@link #writeAsZip(OutputStream)} @param is Input stream to read from @return T...
java
public static FileBatch readFromZip(InputStream is) throws IOException { String originalUris = null; Map<Integer, byte[]> bytesMap = new HashMap<>(); try (ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is))) { ZipEntry ze; while ((ze = zis.getNextEntry())...
[ "public", "static", "FileBatch", "readFromZip", "(", "InputStream", "is", ")", "throws", "IOException", "{", "String", "originalUris", "=", "null", ";", "Map", "<", "Integer", ",", "byte", "[", "]", ">", "bytesMap", "=", "new", "HashMap", "<>", "(", ")", ...
Read a FileBatch from the specified input stream. This method assumes the FileBatch was previously saved to zip format using {@link #writeAsZip(File)} or {@link #writeAsZip(OutputStream)} @param is Input stream to read from @return The loaded FileBatch @throws IOException If an error occurs during reading
[ "Read", "a", "FileBatch", "from", "the", "specified", "input", "stream", ".", "This", "method", "assumes", "the", "FileBatch", "was", "previously", "saved", "to", "zip", "format", "using", "{", "@link", "#writeAsZip", "(", "File", ")", "}", "or", "{", "@li...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/api/loader/FileBatch.java#L59-L85
hibernate/hibernate-ogm
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java
MongoDBDialect.objectForInsert
private static Document objectForInsert(Tuple tuple, Document dbObject) { """ Creates a Document that can be passed to the MongoDB batch insert function """ MongoDBTupleSnapshot snapshot = (MongoDBTupleSnapshot) tuple.getSnapshot(); for ( TupleOperation operation : tuple.getOperations() ) { String colum...
java
private static Document objectForInsert(Tuple tuple, Document dbObject) { MongoDBTupleSnapshot snapshot = (MongoDBTupleSnapshot) tuple.getSnapshot(); for ( TupleOperation operation : tuple.getOperations() ) { String column = operation.getColumn(); if ( notInIdField( snapshot, column ) ) { switch ( operati...
[ "private", "static", "Document", "objectForInsert", "(", "Tuple", "tuple", ",", "Document", "dbObject", ")", "{", "MongoDBTupleSnapshot", "snapshot", "=", "(", "MongoDBTupleSnapshot", ")", "tuple", ".", "getSnapshot", "(", ")", ";", "for", "(", "TupleOperation", ...
Creates a Document that can be passed to the MongoDB batch insert function
[ "Creates", "a", "Document", "that", "can", "be", "passed", "to", "the", "MongoDB", "batch", "insert", "function" ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java#L554-L571
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addBetween
public void addBetween(Object attribute, Object value1, Object value2) { """ Adds BETWEEN criteria, customer_id between 1 and 10 @param attribute The field name to be used @param value1 The lower boundary @param value2 The upper boundary """ // PAW // addSelectionCriteria(ValueCriteria.bui...
java
public void addBetween(Object attribute, Object value1, Object value2) { // PAW // addSelectionCriteria(ValueCriteria.buildBeweenCriteria(attribute, value1, value2, getAlias())); addSelectionCriteria(ValueCriteria.buildBeweenCriteria(attribute, value1, value2, getUserAlias(attribute))); }
[ "public", "void", "addBetween", "(", "Object", "attribute", ",", "Object", "value1", ",", "Object", "value2", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildBeweenCriteria(attribute, value1, value2, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria"...
Adds BETWEEN criteria, customer_id between 1 and 10 @param attribute The field name to be used @param value1 The lower boundary @param value2 The upper boundary
[ "Adds", "BETWEEN", "criteria", "customer_id", "between", "1", "and", "10" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L735-L740
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java
HTMLEncoder.percentEncode
private static void percentEncode(Writer writer, char c, String characterEncoding) throws IOException { """ Encode a unicode char value in percentEncode, decoding its bytes using a specified characterEncoding. @param c @param characterEncoding @return """ String app = null; if (c > (char)...
java
private static void percentEncode(Writer writer, char c, String characterEncoding) throws IOException { String app = null; if (c > (char)((short)0x007F)) { //percent encode in the proper encoding to be consistent //app = percentEncodeNonUsAsciiCharacter(writer c, char...
[ "private", "static", "void", "percentEncode", "(", "Writer", "writer", ",", "char", "c", ",", "String", "characterEncoding", ")", "throws", "IOException", "{", "String", "app", "=", "null", ";", "if", "(", "c", ">", "(", "char", ")", "(", "(", "short", ...
Encode a unicode char value in percentEncode, decoding its bytes using a specified characterEncoding. @param c @param characterEncoding @return
[ "Encode", "a", "unicode", "char", "value", "in", "percentEncode", "decoding", "its", "bytes", "using", "a", "specified", "characterEncoding", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java#L1152-L1170
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilInterpreter.java
StencilInterpreter.getLocation
ExecutionLocation getLocation(ParserRuleContext object) { """ Retrieves location information for a model object @param object Model object to locate @return Location for the provided model object """ Token start = object.getStart(); return new ExecutionLocation(currentScope.declaringEnvironment.pat...
java
ExecutionLocation getLocation(ParserRuleContext object) { Token start = object.getStart(); return new ExecutionLocation(currentScope.declaringEnvironment.path, start.getLine(), start.getCharPositionInLine() + 1); }
[ "ExecutionLocation", "getLocation", "(", "ParserRuleContext", "object", ")", "{", "Token", "start", "=", "object", ".", "getStart", "(", ")", ";", "return", "new", "ExecutionLocation", "(", "currentScope", ".", "declaringEnvironment", ".", "path", ",", "start", ...
Retrieves location information for a model object @param object Model object to locate @return Location for the provided model object
[ "Retrieves", "location", "information", "for", "a", "model", "object" ]
train
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilInterpreter.java#L2903-L2906
undertow-io/undertow
core/src/main/java/io/undertow/util/FlexBase64.java
FlexBase64.encodeStringURL
public static String encodeStringURL(ByteBuffer source, boolean wrap) { """ Encodes a fixed and complete byte buffer into a Base64url String. <p>This method is only useful for applications which require a String and have all data to be encoded up-front. Note that byte arrays or buffers are almost always a bett...
java
public static String encodeStringURL(ByteBuffer source, boolean wrap) { return Encoder.encodeString(source, wrap, true); }
[ "public", "static", "String", "encodeStringURL", "(", "ByteBuffer", "source", ",", "boolean", "wrap", ")", "{", "return", "Encoder", ".", "encodeString", "(", "source", ",", "wrap", ",", "true", ")", ";", "}" ]
Encodes a fixed and complete byte buffer into a Base64url String. <p>This method is only useful for applications which require a String and have all data to be encoded up-front. Note that byte arrays or buffers are almost always a better storage choice. They consume half the memory and can be reused (modified). In oth...
[ "Encodes", "a", "fixed", "and", "complete", "byte", "buffer", "into", "a", "Base64url", "String", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/FlexBase64.java#L253-L255
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/handlers/socks/Socks5LogicHandler.java
Socks5LogicHandler.doHandshake
public synchronized void doHandshake(final NextFilter nextFilter) { """ Performs the handshake process. @param nextFilter the next filter """ LOGGER.debug(" doHandshake()"); // Send request writeRequest(nextFilter, request, (Integer) getSession().getAttribute( HANDSH...
java
public synchronized void doHandshake(final NextFilter nextFilter) { LOGGER.debug(" doHandshake()"); // Send request writeRequest(nextFilter, request, (Integer) getSession().getAttribute( HANDSHAKE_STEP)); }
[ "public", "synchronized", "void", "doHandshake", "(", "final", "NextFilter", "nextFilter", ")", "{", "LOGGER", ".", "debug", "(", "\" doHandshake()\"", ")", ";", "// Send request", "writeRequest", "(", "nextFilter", ",", "request", ",", "(", "Integer", ")", "get...
Performs the handshake process. @param nextFilter the next filter
[ "Performs", "the", "handshake", "process", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/handlers/socks/Socks5LogicHandler.java#L87-L93
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/PELoader.java
PELoader.loadData
private PEData loadData() throws IOException { """ Loads the PE file header data into a PEData instance. @return header data @throws IOException if file can not be read @throws IllegalStateException if no valid PE file """ PESignature pesig = new PESignature(file); pesig.read(); ...
java
private PEData loadData() throws IOException { PESignature pesig = new PESignature(file); pesig.read(); checkState(pesig.exists(), "no valid pe file, signature not found"); // read all headers try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { ...
[ "private", "PEData", "loadData", "(", ")", "throws", "IOException", "{", "PESignature", "pesig", "=", "new", "PESignature", "(", "file", ")", ";", "pesig", ".", "read", "(", ")", ";", "checkState", "(", "pesig", ".", "exists", "(", ")", ",", "\"no valid ...
Loads the PE file header data into a PEData instance. @return header data @throws IOException if file can not be read @throws IllegalStateException if no valid PE file
[ "Loads", "the", "PE", "file", "header", "data", "into", "a", "PEData", "instance", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/PELoader.java#L86-L113
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/event.java
event.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ event_responses result = (event_responses) service.get_payload_formatte...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { event_responses result = (event_responses) service.get_payload_formatter().string_to_resource(event_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXIS...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "event_responses", "result", "=", "(", "event_responses", ")", "service", ".", "get_payload_formatter", "(",...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/event.java#L373-L390
copper-engine/copper-engine
projects/copper-coreengine/src/main/java/org/copperengine/core/persistent/MySqlDialect.java
MySqlDialect.doLock
@Override protected void doLock(Connection con, final String lockContext) throws SQLException { """ Note: For MySQL the advisory lock only applies to the current connection, if the connection terminates, it will release the lock automatically. If you try to lock multiple times on the same lockContext, for t...
java
@Override protected void doLock(Connection con, final String lockContext) throws SQLException { logger.debug("Trying to acquire db lock for '{}'", lockContext); PreparedStatement stmt = con.prepareStatement("select get_lock(?,?)"); stmt.setString(1, lockContext); stmt.setInt(2, ...
[ "@", "Override", "protected", "void", "doLock", "(", "Connection", "con", ",", "final", "String", "lockContext", ")", "throws", "SQLException", "{", "logger", ".", "debug", "(", "\"Trying to acquire db lock for '{}'\"", ",", "lockContext", ")", ";", "PreparedStateme...
Note: For MySQL the advisory lock only applies to the current connection, if the connection terminates, it will release the lock automatically. If you try to lock multiple times on the same lockContext, for the same connection, you need to release multiple times, it won't deadlock since version 5.7.5, please consult: <...
[ "Note", ":", "For", "MySQL", "the", "advisory", "lock", "only", "applies", "to", "the", "current", "connection", "if", "the", "connection", "terminates", "it", "will", "release", "the", "lock", "automatically", ".", "If", "you", "try", "to", "lock", "multipl...
train
https://github.com/copper-engine/copper-engine/blob/92acf748a1be3d2d49e86b04e180bd19b1745c15/projects/copper-coreengine/src/main/java/org/copperengine/core/persistent/MySqlDialect.java#L120-L148
wildfly/wildfly-core
elytron/src/main/java/org/wildfly/extension/elytron/ServiceStateDefinition.java
ServiceStateDefinition.populateResponse
static void populateResponse(final ModelNode response, final ServiceController<?> serviceController) { """ Populate the supplied response {@link ModelNode} with information about the supplied {@link ServiceController} @param response the response to populate. @param serviceController the {@link ServiceControll...
java
static void populateResponse(final ModelNode response, final ServiceController<?> serviceController) { response.set(serviceController.getState().toString()); }
[ "static", "void", "populateResponse", "(", "final", "ModelNode", "response", ",", "final", "ServiceController", "<", "?", ">", "serviceController", ")", "{", "response", ".", "set", "(", "serviceController", ".", "getState", "(", ")", ".", "toString", "(", ")"...
Populate the supplied response {@link ModelNode} with information about the supplied {@link ServiceController} @param response the response to populate. @param serviceController the {@link ServiceController} to use when populating the response.
[ "Populate", "the", "supplied", "response", "{", "@link", "ModelNode", "}", "with", "information", "about", "the", "supplied", "{", "@link", "ServiceController", "}" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/elytron/src/main/java/org/wildfly/extension/elytron/ServiceStateDefinition.java#L46-L48
Karumi/HeaderRecyclerView
library/src/main/java/com/karumi/headerrecyclerview/HeaderRecyclerViewAdapter.java
HeaderRecyclerViewAdapter.onBindViewHolder
@Override public final void onBindViewHolder(VH holder, int position) { """ Invokes onBindHeaderViewHolder, onBindItemViewHolder or onBindFooterViewHOlder methods based on the position param. """ if (isHeaderPosition(position)) { onBindHeaderViewHolder(holder, position); } else if (isFooterPosit...
java
@Override public final void onBindViewHolder(VH holder, int position) { if (isHeaderPosition(position)) { onBindHeaderViewHolder(holder, position); } else if (isFooterPosition(position)) { onBindFooterViewHolder(holder, position); } else { onBindItemViewHolder(holder, position); } }
[ "@", "Override", "public", "final", "void", "onBindViewHolder", "(", "VH", "holder", ",", "int", "position", ")", "{", "if", "(", "isHeaderPosition", "(", "position", ")", ")", "{", "onBindHeaderViewHolder", "(", "holder", ",", "position", ")", ";", "}", "...
Invokes onBindHeaderViewHolder, onBindItemViewHolder or onBindFooterViewHOlder methods based on the position param.
[ "Invokes", "onBindHeaderViewHolder", "onBindItemViewHolder", "or", "onBindFooterViewHOlder", "methods", "based", "on", "the", "position", "param", "." ]
train
https://github.com/Karumi/HeaderRecyclerView/blob/c018472a1b15de661d8aec153bd5f555ef1e9a37/library/src/main/java/com/karumi/headerrecyclerview/HeaderRecyclerViewAdapter.java#L81-L89
Waikato/moa
moa/src/main/java/moa/classifiers/lazy/neighboursearch/KDTree.java
KDTree.kNearestNeighbours
public Instances kNearestNeighbours(Instance target, int k) throws Exception { """ Returns the k nearest neighbours of the supplied instance. &gt;k neighbours are returned if there are more than one neighbours at the kth boundary. @param target The instance to find the nearest neighbours for. @param k The ...
java
public Instances kNearestNeighbours(Instance target, int k) throws Exception { checkMissing(target); MyHeap heap = new MyHeap(k); findNearestNeighbours(target, m_Root, k, heap, 0.0); Instances neighbours = new Instances(m_Instances, (heap.size() + heap .noOfKthNearest())); m_DistanceLi...
[ "public", "Instances", "kNearestNeighbours", "(", "Instance", "target", ",", "int", "k", ")", "throws", "Exception", "{", "checkMissing", "(", "target", ")", ";", "MyHeap", "heap", "=", "new", "MyHeap", "(", "k", ")", ";", "findNearestNeighbours", "(", "targ...
Returns the k nearest neighbours of the supplied instance. &gt;k neighbours are returned if there are more than one neighbours at the kth boundary. @param target The instance to find the nearest neighbours for. @param k The number of neighbours to find. @return The k nearest neighbours (or &gt;k if more there are th...
[ "Returns", "the", "k", "nearest", "neighbours", "of", "the", "supplied", "instance", ".", "&gt", ";", "k", "neighbours", "are", "returned", "if", "there", "are", "more", "than", "one", "neighbours", "at", "the", "kth", "boundary", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/lazy/neighboursearch/KDTree.java#L328-L359
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java
DataFrameJoiner.inner
public Table inner(Table table2, String col2Name, boolean allowDuplicateColumnNames) { """ Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double col...
java
public Table inner(Table table2, String col2Name, boolean allowDuplicateColumnNames) { return inner(table2, allowDuplicateColumnNames, col2Name); }
[ "public", "Table", "inner", "(", "Table", "table2", ",", "String", "col2Name", ",", "boolean", "allowDuplicateColumnNames", ")", "{", "return", "inner", "(", "table2", ",", "allowDuplicateColumnNames", ",", "col2Name", ")", ";", "}" ]
Joins the joiner to the table2, using the given column for the second table and returns the resulting table @param table2 The table to join with @param col2Name The column to join on. If col2Name refers to a double column, the join is performed after rounding to integers. @param allowDuplicateColumnNames if {@code f...
[ "Joins", "the", "joiner", "to", "the", "table2", "using", "the", "given", "column", "for", "the", "second", "table", "and", "returns", "the", "resulting", "table" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/joining/DataFrameJoiner.java#L129-L131
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addGreaterThan
public void addGreaterThan(Object attribute, Object value) { """ Adds Greater Than (>) criteria, customer_id > 10034 @param attribute The field name to be used @param value An object representing the value of the field """ // PAW // addSelectionCriteria(ValueCriteria.buildGreaterCriteria(a...
java
public void addGreaterThan(Object attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildGreaterCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildGreaterCriteria(attribute, value, getUserAlias(attribute))); }
[ "public", "void", "addGreaterThan", "(", "Object", "attribute", ",", "Object", "value", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildGreaterCriteria(attribute, value, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildGreaterCriteria", ...
Adds Greater Than (>) criteria, customer_id > 10034 @param attribute The field name to be used @param value An object representing the value of the field
[ "Adds", "Greater", "Than", "(", ">", ")", "criteria", "customer_id", ">", "10034" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L507-L512
strator-dev/greenpepper
greenpepper-open/greenpepper-maven-runner/src/main/java/com/greenpepper/maven/runner/util/ReflectionUtils.java
ReflectionUtils.setDebugEnabled
public static void setDebugEnabled(ClassLoader classLoader, boolean isDebug) throws Exception { """ <p>setDebugEnabled.</p> @param classLoader a {@link java.lang.ClassLoader} object. @param isDebug a boolean. @throws java.lang.Exception if any. """ Class<?> greenPepperClass = classLoad...
java
public static void setDebugEnabled(ClassLoader classLoader, boolean isDebug) throws Exception { Class<?> greenPepperClass = classLoader.loadClass("com.greenpepper.GreenPepper"); Method setDebugEnabledMethod = greenPepperClass.getMethod("setDebugEnabled", boolean.class); setDebugE...
[ "public", "static", "void", "setDebugEnabled", "(", "ClassLoader", "classLoader", ",", "boolean", "isDebug", ")", "throws", "Exception", "{", "Class", "<", "?", ">", "greenPepperClass", "=", "classLoader", ".", "loadClass", "(", "\"com.greenpepper.GreenPepper\"", ")...
<p>setDebugEnabled.</p> @param classLoader a {@link java.lang.ClassLoader} object. @param isDebug a boolean. @throws java.lang.Exception if any.
[ "<p", ">", "setDebugEnabled", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/greenpepper-maven-runner/src/main/java/com/greenpepper/maven/runner/util/ReflectionUtils.java#L73-L79
javalite/activeweb
activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java
HttpSupport.outputStream
protected OutputStream outputStream(String contentType, Map headers, int status) { """ Use to send raw data to HTTP client. @param contentType content type @param headers set of headers. @param status status. @return instance of output stream to send raw data directly to HTTP client. """ try { ...
java
protected OutputStream outputStream(String contentType, Map headers, int status) { try { RequestContext.setControllerResponse(new NopResponse(contentType, status)); if (headers != null) { for (Object key : headers.keySet()) { if (headers.get(key) != n...
[ "protected", "OutputStream", "outputStream", "(", "String", "contentType", ",", "Map", "headers", ",", "int", "status", ")", "{", "try", "{", "RequestContext", ".", "setControllerResponse", "(", "new", "NopResponse", "(", "contentType", ",", "status", ")", ")", ...
Use to send raw data to HTTP client. @param contentType content type @param headers set of headers. @param status status. @return instance of output stream to send raw data directly to HTTP client.
[ "Use", "to", "send", "raw", "data", "to", "HTTP", "client", "." ]
train
https://github.com/javalite/activeweb/blob/f25f589da94852b6f5625182360732e0861794a6/activeweb/src/main/java/org/javalite/activeweb/HttpSupport.java#L1573-L1588
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClient.java
KnowledgeBasesClient.createKnowledgeBase
public final KnowledgeBase createKnowledgeBase(String parent, KnowledgeBase knowledgeBase) { """ Creates a knowledge base. <p>Sample code: <pre><code> try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); KnowledgeBase knowledge...
java
public final KnowledgeBase createKnowledgeBase(String parent, KnowledgeBase knowledgeBase) { CreateKnowledgeBaseRequest request = CreateKnowledgeBaseRequest.newBuilder() .setParent(parent) .setKnowledgeBase(knowledgeBase) .build(); return createKnowledgeBase(request)...
[ "public", "final", "KnowledgeBase", "createKnowledgeBase", "(", "String", "parent", ",", "KnowledgeBase", "knowledgeBase", ")", "{", "CreateKnowledgeBaseRequest", "request", "=", "CreateKnowledgeBaseRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent",...
Creates a knowledge base. <p>Sample code: <pre><code> try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); KnowledgeBase knowledgeBase = KnowledgeBase.newBuilder().build(); KnowledgeBase response = knowledgeBasesClient.createKnowledgeBase(...
[ "Creates", "a", "knowledge", "base", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClient.java#L434-L442
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java
PublisherCreateOperation.removePartitionResults
private void removePartitionResults(QueryResult queryResult, int partitionId) { """ Remove matching entries from given result set with the given partition ID. """ List<QueryResultRow> rows = queryResult.getRows(); rows.removeIf(resultRow -> getPartitionId(resultRow) == partitionId); }
java
private void removePartitionResults(QueryResult queryResult, int partitionId) { List<QueryResultRow> rows = queryResult.getRows(); rows.removeIf(resultRow -> getPartitionId(resultRow) == partitionId); }
[ "private", "void", "removePartitionResults", "(", "QueryResult", "queryResult", ",", "int", "partitionId", ")", "{", "List", "<", "QueryResultRow", ">", "rows", "=", "queryResult", ".", "getRows", "(", ")", ";", "rows", ".", "removeIf", "(", "resultRow", "->",...
Remove matching entries from given result set with the given partition ID.
[ "Remove", "matching", "entries", "from", "given", "result", "set", "with", "the", "given", "partition", "ID", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java#L197-L200
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/XMLFactory.java
XMLFactory.newDocument
@Nonnull public static Document newDocument (@Nonnull final DocumentBuilder aDocBuilder, @Nullable final EXMLVersion eVersion) { """ Create a new XML document without document type using a custom document builder. @param aDocBuilder The document builder to use. May not be <code>null</code>. @param eVersion...
java
@Nonnull public static Document newDocument (@Nonnull final DocumentBuilder aDocBuilder, @Nullable final EXMLVersion eVersion) { ValueEnforcer.notNull (aDocBuilder, "DocBuilder"); final Document aDoc = aDocBuilder.newDocument (); aDoc.setXmlVersion ((eVersion != null ? eVersion : EXMLVersion.XML_10).ge...
[ "@", "Nonnull", "public", "static", "Document", "newDocument", "(", "@", "Nonnull", "final", "DocumentBuilder", "aDocBuilder", ",", "@", "Nullable", "final", "EXMLVersion", "eVersion", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDocBuilder", ",", "\"DocBuild...
Create a new XML document without document type using a custom document builder. @param aDocBuilder The document builder to use. May not be <code>null</code>. @param eVersion The XML version to use. If <code>null</code> is passed, {@link EXMLVersion#XML_10} will be used. @return The created document. Never <code>null<...
[ "Create", "a", "new", "XML", "document", "without", "document", "type", "using", "a", "custom", "document", "builder", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/XMLFactory.java#L303-L311
bwkimmel/java-util
src/main/java/ca/eandb/util/args/ArgumentProcessor.java
ArgumentProcessor.addCommand
public void addCommand(String key, Command<? super T> handler) { """ Adds a new command handler. @param key The <code>String</code> that identifies this command. The command may be triggered by a command line argument with this value. @param handler The <code>Command</code> that is used to process the comman...
java
public void addCommand(String key, Command<? super T> handler) { commands.put(key, handler); }
[ "public", "void", "addCommand", "(", "String", "key", ",", "Command", "<", "?", "super", "T", ">", "handler", ")", "{", "commands", ".", "put", "(", "key", ",", "handler", ")", ";", "}" ]
Adds a new command handler. @param key The <code>String</code> that identifies this command. The command may be triggered by a command line argument with this value. @param handler The <code>Command</code> that is used to process the command.
[ "Adds", "a", "new", "command", "handler", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/args/ArgumentProcessor.java#L539-L541
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.addComputeNodeUser
public void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Adds a user account to the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId T...
java
public void addComputeNodeUser(String poolId, String nodeId, ComputeNodeUser user, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { ComputeNodeAddUserOptions options = new ComputeNodeAddUserOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBeha...
[ "public", "void", "addComputeNodeUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "ComputeNodeUser", "user", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "ComputeNo...
Adds a user account to the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node where the user account will be created. @param user The user account to be created. @param additionalBehaviors A collection of {@link BatchClientBehavior} instanc...
[ "Adds", "a", "user", "account", "to", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L96-L102
facebookarchive/hadoop-20
src/contrib/namespace-notifier/src/java/org/apache/hadoop/hdfs/notifier/server/ServerCore.java
ServerCore.getClientsForNotification
@Override public Set<Long> getClientsForNotification(NamespaceNotification n) { """ Used to get the set of clients for which a notification should be sent. While iterating over this set, you should use synchronized() on it to avoid data inconsistency (or ordering problems). @param n the notification for whi...
java
@Override public Set<Long> getClientsForNotification(NamespaceNotification n) { String eventPath = NotifierUtils.getBasePath(n); if (LOG.isDebugEnabled()) { LOG.debug("getClientsForNotification called for " + NotifierUtils.asString(n) + ". Searching at path " + eventPath); } List<Strin...
[ "@", "Override", "public", "Set", "<", "Long", ">", "getClientsForNotification", "(", "NamespaceNotification", "n", ")", "{", "String", "eventPath", "=", "NotifierUtils", ".", "getBasePath", "(", "n", ")", ";", "if", "(", "LOG", ".", "isDebugEnabled", "(", "...
Used to get the set of clients for which a notification should be sent. While iterating over this set, you should use synchronized() on it to avoid data inconsistency (or ordering problems). @param n the notification for which we want to get the set of clients @return the set of clients or null if there are no clients...
[ "Used", "to", "get", "the", "set", "of", "clients", "for", "which", "a", "notification", "should", "be", "sent", ".", "While", "iterating", "over", "this", "set", "you", "should", "use", "synchronized", "()", "on", "it", "to", "avoid", "data", "inconsisten...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/namespace-notifier/src/java/org/apache/hadoop/hdfs/notifier/server/ServerCore.java#L506-L524
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/StringUtils.java
StringUtils.defaultIfBlank
@NullSafe public static String defaultIfBlank(String value, String... defaultValues) { """ Defaults the given String to the first non-blank default value if the given String is blank, otherwise returns the given String. @param value the String to evaluate if blank. @param defaultValues an array of default S...
java
@NullSafe public static String defaultIfBlank(String value, String... defaultValues) { if (isBlank(value)) { for (String defaultValue : defaultValues) { if (hasText(defaultValue)) { return defaultValue; } } } return value; }
[ "@", "NullSafe", "public", "static", "String", "defaultIfBlank", "(", "String", "value", ",", "String", "...", "defaultValues", ")", "{", "if", "(", "isBlank", "(", "value", ")", ")", "{", "for", "(", "String", "defaultValue", ":", "defaultValues", ")", "{...
Defaults the given String to the first non-blank default value if the given String is blank, otherwise returns the given String. @param value the String to evaluate if blank. @param defaultValues an array of default String values to use if the given String is blank. @return the first non-blank default String value if ...
[ "Defaults", "the", "given", "String", "to", "the", "first", "non", "-", "blank", "default", "value", "if", "the", "given", "String", "is", "blank", "otherwise", "returns", "the", "given", "String", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/StringUtils.java#L204-L216
json-path/JsonPath
json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java
AbstractJsonProvider.getMapValue
public Object getMapValue(Object obj, String key) { """ Extracts a value from an map @param obj a map @param key property key @return the map entry or {@link com.jayway.jsonpath.spi.json.JsonProvider#UNDEFINED} for missing properties """ Map m = (Map) obj; if(!m.containsKey(key)){ ...
java
public Object getMapValue(Object obj, String key){ Map m = (Map) obj; if(!m.containsKey(key)){ return JsonProvider.UNDEFINED; } else { return m.get(key); } }
[ "public", "Object", "getMapValue", "(", "Object", "obj", ",", "String", "key", ")", "{", "Map", "m", "=", "(", "Map", ")", "obj", ";", "if", "(", "!", "m", ".", "containsKey", "(", "key", ")", ")", "{", "return", "JsonProvider", ".", "UNDEFINED", "...
Extracts a value from an map @param obj a map @param key property key @return the map entry or {@link com.jayway.jsonpath.spi.json.JsonProvider#UNDEFINED} for missing properties
[ "Extracts", "a", "value", "from", "an", "map" ]
train
https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java#L72-L79
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WNumberFieldRenderer.java
WNumberFieldRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WNumberField. @param component the WNumberField to paint. @param renderContext the RenderContext to paint to. """ WNumberField field = (WNumberField) component; XmlStringBuilder x...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WNumberField field = (WNumberField) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = field.isReadOnly(); BigDecimal value = field.getValue(); String userText = field.getText()...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WNumberField", "field", "=", "(", "WNumberField", ")", "component", ";", "XmlStringBuilder", "xml", "=", "rende...
Paints the given WNumberField. @param component the WNumberField to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WNumberField", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WNumberFieldRenderer.java#L25-L69
hibernate/hibernate-ogm
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/InfinispanDialect.java
InfinispanDialect.getLockingStrategy
@Override public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode) { """ Get a strategy instance which knows how to acquire a database-level lock of the specified/mode for this dialect. @param lockable The persister for the entity to be locked. @param lockMode The type of lock to be ac...
java
@Override public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode) { if ( lockMode == LockMode.PESSIMISTIC_FORCE_INCREMENT ) { return new PessimisticForceIncrementLockingStrategy( lockable, lockMode ); } else if ( lockMode == LockMode.PESSIMISTIC_WRITE ) { return new InfinispanPessim...
[ "@", "Override", "public", "LockingStrategy", "getLockingStrategy", "(", "Lockable", "lockable", ",", "LockMode", "lockMode", ")", "{", "if", "(", "lockMode", "==", "LockMode", ".", "PESSIMISTIC_FORCE_INCREMENT", ")", "{", "return", "new", "PessimisticForceIncrementLo...
Get a strategy instance which knows how to acquire a database-level lock of the specified/mode for this dialect. @param lockable The persister for the entity to be locked. @param lockMode The type of lock to be acquired. @return The appropriate locking strategy. @since 3.2
[ "Get", "a", "strategy", "instance", "which", "knows", "how", "to", "acquire", "a", "database", "-", "level", "lock", "of", "the", "specified", "/", "mode", "for", "this", "dialect", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/InfinispanDialect.java#L96-L117
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.beginCreateAsync
public Observable<RedisResourceInner> beginCreateAsync(String resourceGroupName, String name, RedisCreateParameters parameters) { """ Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. @param resourceGroupName The name of the resource group. @param name The name of the Red...
java
public Observable<RedisResourceInner> beginCreateAsync(String resourceGroupName, String name, RedisCreateParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, name, parameters).map(new Func1<ServiceResponse<RedisResourceInner>, RedisResourceInner>() { @Override ...
[ "public", "Observable", "<", "RedisResourceInner", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "RedisCreateParameters", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "na...
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param parameters Parameters supplied to the Create Redis operation. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Create", "or", "replace", "(", "overwrite", "/", "recreate", "with", "potential", "downtime", ")", "an", "existing", "Redis", "cache", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L439-L446
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java
OuterReferenceResolver.whenNeedsOuterParam
private void whenNeedsOuterParam(TypeElement type, Runnable runnable) { """ Executes the runnable if or when the given type needs an outer param. """ if (captureInfo.needsOuterParam(type)) { runnable.run(); } else if (ElementUtil.isLocal(type)) { Scope scope = findScopeForType(type); ...
java
private void whenNeedsOuterParam(TypeElement type, Runnable runnable) { if (captureInfo.needsOuterParam(type)) { runnable.run(); } else if (ElementUtil.isLocal(type)) { Scope scope = findScopeForType(type); if (scope != null) { scope.onOuterParam.add(captureCurrentScope(runnable)); ...
[ "private", "void", "whenNeedsOuterParam", "(", "TypeElement", "type", ",", "Runnable", "runnable", ")", "{", "if", "(", "captureInfo", ".", "needsOuterParam", "(", "type", ")", ")", "{", "runnable", ".", "run", "(", ")", ";", "}", "else", "if", "(", "Ele...
Executes the runnable if or when the given type needs an outer param.
[ "Executes", "the", "runnable", "if", "or", "when", "the", "given", "type", "needs", "an", "outer", "param", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java#L201-L210
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/GelfMessageBuilder.java
GelfMessageBuilder.withField
public GelfMessageBuilder withField(String key, String value) { """ Add an additional field. @param key the key @param value the value @return GelfMessageBuilder """ this.additionalFields.put(key, value); return this; }
java
public GelfMessageBuilder withField(String key, String value) { this.additionalFields.put(key, value); return this; }
[ "public", "GelfMessageBuilder", "withField", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "additionalFields", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add an additional field. @param key the key @param value the value @return GelfMessageBuilder
[ "Add", "an", "additional", "field", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/GelfMessageBuilder.java#L145-L148
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDateTime.java
LocalDateTime.readResolve
private Object readResolve() { """ Handle broken serialization from other tools. @return the resolved object, not null """ if (iChronology == null) { return new LocalDateTime(iLocalMillis, ISOChronology.getInstanceUTC()); } if (DateTimeZone.UTC.equals(iChronology.getZone())...
java
private Object readResolve() { if (iChronology == null) { return new LocalDateTime(iLocalMillis, ISOChronology.getInstanceUTC()); } if (DateTimeZone.UTC.equals(iChronology.getZone()) == false) { return new LocalDateTime(iLocalMillis, iChronology.withUTC()); } ...
[ "private", "Object", "readResolve", "(", ")", "{", "if", "(", "iChronology", "==", "null", ")", "{", "return", "new", "LocalDateTime", "(", "iLocalMillis", ",", "ISOChronology", ".", "getInstanceUTC", "(", ")", ")", ";", "}", "if", "(", "DateTimeZone", "."...
Handle broken serialization from other tools. @return the resolved object, not null
[ "Handle", "broken", "serialization", "from", "other", "tools", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDateTime.java#L521-L529
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesManagementApi.java
DevicesManagementApi.updateTaskForDevice
public DeviceTaskUpdateResponse updateTaskForDevice(String tid, String did, DeviceTaskUpdateRequest deviceTaskUpdateRequest) throws ApiException { """ Updates a task for a specific device - For now just allows changing the state to cancelled. Updates a task for a specific device - For now just allows changing the...
java
public DeviceTaskUpdateResponse updateTaskForDevice(String tid, String did, DeviceTaskUpdateRequest deviceTaskUpdateRequest) throws ApiException { ApiResponse<DeviceTaskUpdateResponse> resp = updateTaskForDeviceWithHttpInfo(tid, did, deviceTaskUpdateRequest); return resp.getData(); }
[ "public", "DeviceTaskUpdateResponse", "updateTaskForDevice", "(", "String", "tid", ",", "String", "did", ",", "DeviceTaskUpdateRequest", "deviceTaskUpdateRequest", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceTaskUpdateResponse", ">", "resp", "=", "updat...
Updates a task for a specific device - For now just allows changing the state to cancelled. Updates a task for a specific device - For now just allows changing the state to cancelled. @param tid Task ID. (required) @param did Device ID. (required) @param deviceTaskUpdateRequest Device task update request (required) @re...
[ "Updates", "a", "task", "for", "a", "specific", "device", "-", "For", "now", "just", "allows", "changing", "the", "state", "to", "cancelled", ".", "Updates", "a", "task", "for", "a", "specific", "device", "-", "For", "now", "just", "allows", "changing", ...
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesManagementApi.java#L1942-L1945
Azure/azure-sdk-for-java
datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/FilesInner.java
FilesInner.readAsync
public Observable<FileStorageInfoInner> readAsync(String groupName, String serviceName, String projectName, String fileName) { """ Request storage information for downloading the file content. This method is used for requesting storage information using which contents of the file can be downloaded. @param grou...
java
public Observable<FileStorageInfoInner> readAsync(String groupName, String serviceName, String projectName, String fileName) { return readWithServiceResponseAsync(groupName, serviceName, projectName, fileName).map(new Func1<ServiceResponse<FileStorageInfoInner>, FileStorageInfoInner>() { @Override ...
[ "public", "Observable", "<", "FileStorageInfoInner", ">", "readAsync", "(", "String", "groupName", ",", "String", "serviceName", ",", "String", "projectName", ",", "String", "fileName", ")", "{", "return", "readWithServiceResponseAsync", "(", "groupName", ",", "serv...
Request storage information for downloading the file content. This method is used for requesting storage information using which contents of the file can be downloaded. @param groupName Name of the resource group @param serviceName Name of the service @param projectName Name of the project @param fileName Name of the ...
[ "Request", "storage", "information", "for", "downloading", "the", "file", "content", ".", "This", "method", "is", "used", "for", "requesting", "storage", "information", "using", "which", "contents", "of", "the", "file", "can", "be", "downloaded", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/FilesInner.java#L713-L720
alkacon/opencms-core
src/org/opencms/widgets/A_CmsSelectWidget.java
A_CmsSelectWidget.getSelectedValue
protected String getSelectedValue(CmsObject cms, I_CmsWidgetParameter param) { """ Returns the currently selected value of the select widget.<p> If a value is found in the given parameter, this is used. Otherwise the default value of the select options are used. If there is neither a parameter value nor a def...
java
protected String getSelectedValue(CmsObject cms, I_CmsWidgetParameter param) { String paramValue = param.getStringValue(cms); if (CmsStringUtil.isEmpty(paramValue)) { CmsSelectWidgetOption option = CmsSelectWidgetOption.getDefaultOption(m_selectOptions); if (option != null) { ...
[ "protected", "String", "getSelectedValue", "(", "CmsObject", "cms", ",", "I_CmsWidgetParameter", "param", ")", "{", "String", "paramValue", "=", "param", ".", "getStringValue", "(", "cms", ")", ";", "if", "(", "CmsStringUtil", ".", "isEmpty", "(", "paramValue", ...
Returns the currently selected value of the select widget.<p> If a value is found in the given parameter, this is used. Otherwise the default value of the select options are used. If there is neither a parameter value nor a default value, <code>null</code> is returned.<p> @param cms the current users OpenCms context ...
[ "Returns", "the", "currently", "selected", "value", "of", "the", "select", "widget", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/A_CmsSelectWidget.java#L269-L279
wisdom-framework/wisdom
core/wisdom-ipojo-module/src/main/java/org/wisdom/ipojo/module/WisdomControllerVisitor.java
WisdomControllerVisitor.visitEnd
public void visitEnd() { """ End of the visit. Declare the "component", "provides" and "instance" elements. @see org.objectweb.asm.AnnotationVisitor#visitEnd() """ String classname = workbench.getType().getClassName(); component.addAttribute(new Attribute("classname", classname)); ...
java
public void visitEnd() { String classname = workbench.getType().getClassName(); component.addAttribute(new Attribute("classname", classname)); // Generates the provides attribute. component.addElement(ElementHelper.getProvidesElement(null)); // Detect that Controller is imple...
[ "public", "void", "visitEnd", "(", ")", "{", "String", "classname", "=", "workbench", ".", "getType", "(", ")", ".", "getClassName", "(", ")", ";", "component", ".", "addAttribute", "(", "new", "Attribute", "(", "\"classname\"", ",", "classname", ")", ")",...
End of the visit. Declare the "component", "provides" and "instance" elements. @see org.objectweb.asm.AnnotationVisitor#visitEnd()
[ "End", "of", "the", "visit", ".", "Declare", "the", "component", "provides", "and", "instance", "elements", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-ipojo-module/src/main/java/org/wisdom/ipojo/module/WisdomControllerVisitor.java#L59-L84
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java
SpiderService.deleteBatch
public BatchResult deleteBatch(TableDefinition tableDef, DBObjectBatch batch) { """ Delete a batch of objects from the given table. All objects must have an ID assigned. Deleting an already-deleted object is a no-op. @param tableDef Table containing objects to be deleted. @param batch {@link DBObjectBatc...
java
public BatchResult deleteBatch(TableDefinition tableDef, DBObjectBatch batch) { checkServiceState(); List<String> objIDs = new ArrayList<>(); for (DBObject dbObj : batch.getObjects()) { Utils.require(!Utils.isEmpty(dbObj.getObjectID()), "All objects must have _ID defined"); ...
[ "public", "BatchResult", "deleteBatch", "(", "TableDefinition", "tableDef", ",", "DBObjectBatch", "batch", ")", "{", "checkServiceState", "(", ")", ";", "List", "<", "String", ">", "objIDs", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "DBObject...
Delete a batch of objects from the given table. All objects must have an ID assigned. Deleting an already-deleted object is a no-op. @param tableDef Table containing objects to be deleted. @param batch {@link DBObjectBatch} defining objects to be deleted. Only the _ID field of each DBObject is used. @return ...
[ "Delete", "a", "batch", "of", "objects", "from", "the", "given", "table", ".", "All", "objects", "must", "have", "an", "ID", "assigned", ".", "Deleting", "an", "already", "-", "deleted", "object", "is", "a", "no", "-", "op", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java#L254-L263
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java
AlternativeAlignment.super_pos_alig
private void super_pos_alig(Atom[]ca1,Atom[]ca2,int[] idx1, int[] idx2, boolean getRMS) throws StructureException { """ Superimposes two molecules according to residue index list idx1 and idx2. Does not change the original coordinates. as an internal result the rotation matrix and shift vectors for are set @p...
java
private void super_pos_alig(Atom[]ca1,Atom[]ca2,int[] idx1, int[] idx2, boolean getRMS) throws StructureException{ //System.out.println("superpos alig "); Atom[] ca1subset = new Atom[idx1.length]; Atom[] ca2subset = new Atom[idx2.length]; for (int i = 0 ; i < idx1.length;i++){ //System.out.println("idx1 "+...
[ "private", "void", "super_pos_alig", "(", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ",", "int", "[", "]", "idx1", ",", "int", "[", "]", "idx2", ",", "boolean", "getRMS", ")", "throws", "StructureException", "{", "//System.out.println(\"superpo...
Superimposes two molecules according to residue index list idx1 and idx2. Does not change the original coordinates. as an internal result the rotation matrix and shift vectors for are set @param ca1 Atom set 1 @param ca2 Atom set 2 @param idx1 idx positions in set1 @param idx2 idx positions in set2 @param getRMS a fla...
[ "Superimposes", "two", "molecules", "according", "to", "residue", "index", "list", "idx1", "and", "idx2", ".", "Does", "not", "change", "the", "original", "coordinates", ".", "as", "an", "internal", "result", "the", "rotation", "matrix", "and", "shift", "vecto...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java#L768-L794
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java
TypeHandlerUtils.convertSqlXml
public static Object convertSqlXml(Object sqlXml, String value) throws SQLException { """ Transfers data from String into sql.SQLXML @param sqlXml sql.SQLXML which would be filled @param value array of bytes @return sql.SQLXML from String @throws SQLException """ return convertSqlXml(sqlXml, val...
java
public static Object convertSqlXml(Object sqlXml, String value) throws SQLException { return convertSqlXml(sqlXml, value.getBytes()); }
[ "public", "static", "Object", "convertSqlXml", "(", "Object", "sqlXml", ",", "String", "value", ")", "throws", "SQLException", "{", "return", "convertSqlXml", "(", "sqlXml", ",", "value", ".", "getBytes", "(", ")", ")", ";", "}" ]
Transfers data from String into sql.SQLXML @param sqlXml sql.SQLXML which would be filled @param value array of bytes @return sql.SQLXML from String @throws SQLException
[ "Transfers", "data", "from", "String", "into", "sql", ".", "SQLXML" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L362-L364
dita-ot/dita-ot
src/main/java/org/dita/dost/util/XMLSerializer.java
XMLSerializer.writeStartElement
public void writeStartElement(final String uri, final String qName) throws SAXException { """ Write start element without attributes. @param qName element QName @throws SAXException if processing the event failed """ processStartElement(); final QName res = new QName(uri, qName); ad...
java
public void writeStartElement(final String uri, final String qName) throws SAXException { processStartElement(); final QName res = new QName(uri, qName); addNamespace(res.uri, res.prefix, res); elementStack.addFirst(res); // push openStartElement = true; }
[ "public", "void", "writeStartElement", "(", "final", "String", "uri", ",", "final", "String", "qName", ")", "throws", "SAXException", "{", "processStartElement", "(", ")", ";", "final", "QName", "res", "=", "new", "QName", "(", "uri", ",", "qName", ")", ";...
Write start element without attributes. @param qName element QName @throws SAXException if processing the event failed
[ "Write", "start", "element", "without", "attributes", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLSerializer.java#L169-L175
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.findByGroupId
@Override public List<CPOptionValue> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the cp option values where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary key...
java
@Override public List<CPOptionValue> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPOptionValue", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp option values where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. S...
[ "Returns", "a", "range", "of", "all", "the", "cp", "option", "values", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L1528-L1531
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/cdn/CdnClient.java
CdnClient.setDomainIpACL
public SetDomainIpACLResponse setDomainIpACL(SetDomainIpACLRequest request) { """ Update IpACL rules of specified domain acceleration. @param request The request containing all of the options related to the update request. @return Result of the setDomainIpACL operation returned by the service. """ ...
java
public SetDomainIpACLResponse setDomainIpACL(SetDomainIpACLRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(request, HttpMethodName.PUT, DOMAIN, request.getDomain(), "config"); internalRequest.addParameter("ipA...
[ "public", "SetDomainIpACLResponse", "setDomainIpACL", "(", "SetDomainIpACLRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "request",...
Update IpACL rules of specified domain acceleration. @param request The request containing all of the options related to the update request. @return Result of the setDomainIpACL operation returned by the service.
[ "Update", "IpACL", "rules", "of", "specified", "domain", "acceleration", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/cdn/CdnClient.java#L412-L418
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.getDeltaCWithPathPrefix
public <C> DbxDeltaC<C> getDeltaCWithPathPrefix(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor, String pathPrefix) throws DbxException { """ Same as {@link #getDeltaCWithPathPrefix(Collector, String, String, boolean)} with {...
java
public <C> DbxDeltaC<C> getDeltaCWithPathPrefix(Collector<DbxDeltaC.Entry<DbxEntry>, C> collector, /*@Nullable*/String cursor, String pathPrefix) throws DbxException { return getDeltaCWithPathPrefix(collector, cursor, pathPrefix, false); }
[ "public", "<", "C", ">", "DbxDeltaC", "<", "C", ">", "getDeltaCWithPathPrefix", "(", "Collector", "<", "DbxDeltaC", ".", "Entry", "<", "DbxEntry", ">", ",", "C", ">", "collector", ",", "/*@Nullable*/", "String", "cursor", ",", "String", "pathPrefix", ")", ...
Same as {@link #getDeltaCWithPathPrefix(Collector, String, String, boolean)} with {@code includeMediaInfo} set to {@code false}.
[ "Same", "as", "{" ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1563-L1568
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GitLabApiClient.java
GitLabApiClient.getWithAccepts
protected Response getWithAccepts(MultivaluedMap<String, String> queryParams, URL url, String accepts) { """ Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint. @param queryParams multivalue map of request parameter...
java
protected Response getWithAccepts(MultivaluedMap<String, String> queryParams, URL url, String accepts) { return (invocation(url, queryParams, accepts).get()); }
[ "protected", "Response", "getWithAccepts", "(", "MultivaluedMap", "<", "String", ",", "String", ">", "queryParams", ",", "URL", "url", ",", "String", "accepts", ")", "{", "return", "(", "invocation", "(", "url", ",", "queryParams", ",", "accepts", ")", ".", ...
Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint. @param queryParams multivalue map of request parameters @param url the fully formed path to the GitLab API endpoint @param accepts if non-empty will set the Accepts header...
[ "Perform", "an", "HTTP", "GET", "call", "with", "the", "specified", "query", "parameters", "and", "URL", "returning", "a", "ClientResponse", "instance", "with", "the", "data", "returned", "from", "the", "endpoint", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L413-L415
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getProcessInstances
@Override public List<ProcessInstance> getProcessInstances(String masterRequestId, String processName) throws ProcessException, DataAccessException { """ Returns the process instances by process name and master request ID. @param processName @param masterRequestId @return the list of process instances...
java
@Override public List<ProcessInstance> getProcessInstances(String masterRequestId, String processName) throws ProcessException, DataAccessException { TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { Process procdef = ProcessCach...
[ "@", "Override", "public", "List", "<", "ProcessInstance", ">", "getProcessInstances", "(", "String", "masterRequestId", ",", "String", "processName", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "TransactionWrapper", "transaction", "=", "null", ...
Returns the process instances by process name and master request ID. @param processName @param masterRequestId @return the list of process instances. If the process definition is not found, null is returned; if process definition is found but no process instances are found, an empty list is returned. @throws ProcessEx...
[ "Returns", "the", "process", "instances", "by", "process", "name", "and", "master", "request", "ID", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L377-L392
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java
DocumentReference.set
@Nonnull public ApiFuture<WriteResult> set(@Nonnull Object pojo) { """ Overwrites the document referred to by this DocumentReference. If no document exists yet, it will be created. If a document already exists, it will be overwritten. @param pojo The POJO that will be used to populate the document contents. ...
java
@Nonnull public ApiFuture<WriteResult> set(@Nonnull Object pojo) { WriteBatch writeBatch = firestore.batch(); return extractFirst(writeBatch.set(this, pojo).commit()); }
[ "@", "Nonnull", "public", "ApiFuture", "<", "WriteResult", ">", "set", "(", "@", "Nonnull", "Object", "pojo", ")", "{", "WriteBatch", "writeBatch", "=", "firestore", ".", "batch", "(", ")", ";", "return", "extractFirst", "(", "writeBatch", ".", "set", "(",...
Overwrites the document referred to by this DocumentReference. If no document exists yet, it will be created. If a document already exists, it will be overwritten. @param pojo The POJO that will be used to populate the document contents. @return An ApiFuture that will be resolved when the write finishes.
[ "Overwrites", "the", "document", "referred", "to", "by", "this", "DocumentReference", ".", "If", "no", "document", "exists", "yet", "it", "will", "be", "created", ".", "If", "a", "document", "already", "exists", "it", "will", "be", "overwritten", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java#L198-L202
netty/netty
example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java
HelloWorldHttp2Handler.onDataRead
private static void onDataRead(ChannelHandlerContext ctx, Http2DataFrame data) throws Exception { """ If receive a frame with end-of-stream set, send a pre-canned response. """ Http2FrameStream stream = data.stream(); if (data.isEndStream()) { sendResponse(ctx, stream, data.content...
java
private static void onDataRead(ChannelHandlerContext ctx, Http2DataFrame data) throws Exception { Http2FrameStream stream = data.stream(); if (data.isEndStream()) { sendResponse(ctx, stream, data.content()); } else { // We do not send back the response to the remote-peer...
[ "private", "static", "void", "onDataRead", "(", "ChannelHandlerContext", "ctx", ",", "Http2DataFrame", "data", ")", "throws", "Exception", "{", "Http2FrameStream", "stream", "=", "data", ".", "stream", "(", ")", ";", "if", "(", "data", ".", "isEndStream", "(",...
If receive a frame with end-of-stream set, send a pre-canned response.
[ "If", "receive", "a", "frame", "with", "end", "-", "of", "-", "stream", "set", "send", "a", "pre", "-", "canned", "response", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http2/helloworld/frame/server/HelloWorldHttp2Handler.java#L73-L85
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterTraining
public void getCharacterTraining(String API, String name, Callback<CharacterTraining> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Character Training API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Training">here</a><br/> Give user the access to {@link Callba...
java
public void getCharacterTraining(String API, String name, Callback<CharacterTraining> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterTraining(name, API).enqueue(callback); }
[ "public", "void", "getCharacterTraining", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterTraining", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "("...
For more info on Character Training API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Training">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param API API key @param name chara...
[ "For", "more", "info", "on", "Character", "Training", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Training", ">", "here<", "/", "a", ">", "<br", "/", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L861-L864
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/IdClassMetadata.java
IdClassMetadata.findIdReadMethod
private MethodHandle findIdReadMethod() { """ Creates and returns the MethodHandle for reading the underlying ID. @return the MethodHandle for reading the underlying ID. """ try { Method readMethod = clazz.getMethod(READ_METHOD_NAME); Class<?> dataClass = readMethod.getReturnType(); Da...
java
private MethodHandle findIdReadMethod() { try { Method readMethod = clazz.getMethod(READ_METHOD_NAME); Class<?> dataClass = readMethod.getReturnType(); DataType dataType = IdentifierMetadata.DataType.forClass(dataClass); if (dataType == null) { String pattern = "Method %s in class %s...
[ "private", "MethodHandle", "findIdReadMethod", "(", ")", "{", "try", "{", "Method", "readMethod", "=", "clazz", ".", "getMethod", "(", "READ_METHOD_NAME", ")", ";", "Class", "<", "?", ">", "dataClass", "=", "readMethod", ".", "getReturnType", "(", ")", ";", ...
Creates and returns the MethodHandle for reading the underlying ID. @return the MethodHandle for reading the underlying ID.
[ "Creates", "and", "returns", "the", "MethodHandle", "for", "reading", "the", "underlying", "ID", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/IdClassMetadata.java#L108-L124
Alluxio/alluxio
core/common/src/main/java/alluxio/metrics/Metric.java
Metric.getMetricNameWithUserTag
public static String getMetricNameWithUserTag(String metricName, String userName) { """ Gets a metric name with a specific user tag. @param metricName the name of the metric @param userName the user @return a metric name with the user tagged """ UserMetricKey k = new UserMetricKey(metricName, userName...
java
public static String getMetricNameWithUserTag(String metricName, String userName) { UserMetricKey k = new UserMetricKey(metricName, userName); String result = CACHED_METRICS.get(k); if (result != null) { return result; } return CACHED_METRICS.computeIfAbsent(k, key -> metricName + "." + Common...
[ "public", "static", "String", "getMetricNameWithUserTag", "(", "String", "metricName", ",", "String", "userName", ")", "{", "UserMetricKey", "k", "=", "new", "UserMetricKey", "(", "metricName", ",", "userName", ")", ";", "String", "result", "=", "CACHED_METRICS", ...
Gets a metric name with a specific user tag. @param metricName the name of the metric @param userName the user @return a metric name with the user tagged
[ "Gets", "a", "metric", "name", "with", "a", "specific", "user", "tag", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/metrics/Metric.java#L223-L231
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java
CommonConfigUtils.getIntegerConfigAttribute
public int getIntegerConfigAttribute(Map<String, Object> props, String key, int defaultValue) { """ Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned. """ if (props.containsKey(key)) { ...
java
public int getIntegerConfigAttribute(Map<String, Object> props, String key, int defaultValue) { if (props.containsKey(key)) { return (Integer) props.get(key); } return defaultValue; }
[ "public", "int", "getIntegerConfigAttribute", "(", "Map", "<", "String", ",", "Object", ">", "props", ",", "String", "key", ",", "int", "defaultValue", ")", "{", "if", "(", "props", ".", "containsKey", "(", "key", ")", ")", "{", "return", "(", "Integer",...
Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned.
[ "Returns", "the", "value", "for", "the", "configuration", "attribute", "matching", "the", "key", "provided", ".", "If", "the", "value", "does", "not", "exist", "or", "is", "empty", "the", "provided", "default", "value", "will", "be", "returned", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java#L141-L146
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java
DoradusServer.startEmbedded
public static void startEmbedded(String[] args, String[] services) { """ Entrypoint method to embed a Doradus server in an application. The args parameter is the same as {@link #startServer(String[])} and {@link #main(String[])}, which override doradus.yaml file defaults. However, instead of starting all service...
java
public static void startEmbedded(String[] args, String[] services) { instance().initEmbedded(args, services); instance().start(); }
[ "public", "static", "void", "startEmbedded", "(", "String", "[", "]", "args", ",", "String", "[", "]", "services", ")", "{", "instance", "(", ")", ".", "initEmbedded", "(", "args", ",", "services", ")", ";", "instance", "(", ")", ".", "start", "(", "...
Entrypoint method to embed a Doradus server in an application. The args parameter is the same as {@link #startServer(String[])} and {@link #main(String[])}, which override doradus.yaml file defaults. However, instead of starting all services, only those in the given services parameter plus "required" services are start...
[ "Entrypoint", "method", "to", "embed", "a", "Doradus", "server", "in", "an", "application", ".", "The", "args", "parameter", "is", "the", "same", "as", "{", "@link", "#startServer", "(", "String", "[]", ")", "}", "and", "{", "@link", "#main", "(", "Strin...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/DoradusServer.java#L165-L168
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsUserEditDialog.java
CmsUserEditDialog.setUserPasswordStatus
private void setUserPasswordStatus(CmsUser user, boolean reset) { """ Sets the password status for the user.<p> @param user CmsUser @param reset true or false """ if (reset) { user.setAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET, "true"); } else { u...
java
private void setUserPasswordStatus(CmsUser user, boolean reset) { if (reset) { user.setAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET, "true"); } else { user.deleteAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET); } CmsUserTable.USER_...
[ "private", "void", "setUserPasswordStatus", "(", "CmsUser", "user", ",", "boolean", "reset", ")", "{", "if", "(", "reset", ")", "{", "user", ".", "setAdditionalInfo", "(", "CmsUserSettings", ".", "ADDITIONAL_INFO_PASSWORD_RESET", ",", "\"true\"", ")", ";", "}", ...
Sets the password status for the user.<p> @param user CmsUser @param reset true or false
[ "Sets", "the", "password", "status", "for", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsUserEditDialog.java#L1406-L1414
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/EnglishTreebankParserParams.java
EnglishTreebankParserParams.treeReaderFactory
public TreeReaderFactory treeReaderFactory() { """ Makes appropriate TreeReaderFactory with all options specified """ return new TreeReaderFactory() { public TreeReader newTreeReader(Reader in) { return new PennTreeReader(in, new LabeledScoredTreeFactory(), new NPTmpRetainingTreeNormalizer...
java
public TreeReaderFactory treeReaderFactory() { return new TreeReaderFactory() { public TreeReader newTreeReader(Reader in) { return new PennTreeReader(in, new LabeledScoredTreeFactory(), new NPTmpRetainingTreeNormalizer(englishTrain.splitTMP, englishTrain.splitSGapped == 5, englishTrain.leaveItAll,...
[ "public", "TreeReaderFactory", "treeReaderFactory", "(", ")", "{", "return", "new", "TreeReaderFactory", "(", ")", "{", "public", "TreeReader", "newTreeReader", "(", "Reader", "in", ")", "{", "return", "new", "PennTreeReader", "(", "in", ",", "new", "LabeledScor...
Makes appropriate TreeReaderFactory with all options specified
[ "Makes", "appropriate", "TreeReaderFactory", "with", "all", "options", "specified" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/EnglishTreebankParserParams.java#L172-L178
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerTransportReceiveListener.java
ServerTransportReceiveListener.attachConnectionListener
private void attachConnectionListener(Conversation conversation, SICoreConnection conn) { """ Helper method used to register the SICoreConnection with the connection listener. @param conversation @param conn """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entr...
java
private void attachConnectionListener(Conversation conversation, SICoreConnection conn) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "attachConnectionListener", new Object[] { convers...
[ "private", "void", "attachConnectionListener", "(", "Conversation", "conversation", ",", "SICoreConnection", "conn", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "ent...
Helper method used to register the SICoreConnection with the connection listener. @param conversation @param conn
[ "Helper", "method", "used", "to", "register", "the", "SICoreConnection", "with", "the", "connection", "listener", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/ServerTransportReceiveListener.java#L1631-L1665
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/Utils.java
Utils.checkForEqualSize
public static void checkForEqualSize(Tuple t0, Tuple t1) { """ Checks whether given given {@link Tuple}s have equal {@link Tuple#getSize() size}, and throws an <code>IllegalArgumentException</code> if not. @param t0 The first tuple @param t1 The second tuple @throws IllegalArgumentException If the given tup...
java
public static void checkForEqualSize(Tuple t0, Tuple t1) { if (t0.getSize() != t1.getSize()) { throw new IllegalArgumentException( "Sizes do not match: "+t0.getSize()+ " and "+t1.getSize()); } }
[ "public", "static", "void", "checkForEqualSize", "(", "Tuple", "t0", ",", "Tuple", "t1", ")", "{", "if", "(", "t0", ".", "getSize", "(", ")", "!=", "t1", ".", "getSize", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Sizes do not...
Checks whether given given {@link Tuple}s have equal {@link Tuple#getSize() size}, and throws an <code>IllegalArgumentException</code> if not. @param t0 The first tuple @param t1 The second tuple @throws IllegalArgumentException If the given tuples do not have the same {@link Tuple#getSize() size}
[ "Checks", "whether", "given", "given", "{", "@link", "Tuple", "}", "s", "have", "equal", "{", "@link", "Tuple#getSize", "()", "size", "}", "and", "throws", "an", "<code", ">", "IllegalArgumentException<", "/", "code", ">", "if", "not", "." ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/Utils.java#L47-L55
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/util/Position.java
Position.encodePosition
public static int encodePosition(int line, int col) { """ Encode line and column numbers in an integer as: {@code line-number << LINESHIFT + column-number }. {@link Position#NOPOS} represents an undefined position. @param line number of line (first is 1) @param col number of character on line (first is ...
java
public static int encodePosition(int line, int col) { if (line < 1) throw new IllegalArgumentException("line must be greater than 0"); if (col < 1) throw new IllegalArgumentException("column must be greater than 0"); if (line > MAXLINE || col > MAXCOLUMN) { r...
[ "public", "static", "int", "encodePosition", "(", "int", "line", ",", "int", "col", ")", "{", "if", "(", "line", "<", "1", ")", "throw", "new", "IllegalArgumentException", "(", "\"line must be greater than 0\"", ")", ";", "if", "(", "col", "<", "1", ")", ...
Encode line and column numbers in an integer as: {@code line-number << LINESHIFT + column-number }. {@link Position#NOPOS} represents an undefined position. @param line number of line (first is 1) @param col number of character on line (first is 1) @return an encoded position or {@link Position#NOPOS} if th...
[ "Encode", "line", "and", "column", "numbers", "in", "an", "integer", "as", ":", "{", "@code", "line", "-", "number", "<<", "LINESHIFT", "+", "column", "-", "number", "}", ".", "{", "@link", "Position#NOPOS", "}", "represents", "an", "undefined", "position"...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/util/Position.java#L92-L102
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/resolve/EnumTextResolverWithPropertiesOverrideAndFallback.java
EnumTextResolverWithPropertiesOverrideAndFallback._getResourceBundle
@Nullable private ResourceBundle _getResourceBundle (@Nonnull @Nonempty final String sBundleName, @Nonnull final Locale aLocale) { """ Get the cached {@link ResourceBundle}. It is assumed, that the locale name is contained within the bundle name!! @param sBundleName Name of the bundle. May not be <code>null...
java
@Nullable private ResourceBundle _getResourceBundle (@Nonnull @Nonempty final String sBundleName, @Nonnull final Locale aLocale) { ResourceBundle ret = m_aRWLock.readLocked ( () -> { if (!m_bUseResourceBundleCache) { // Do not use the cache! return ResourceBundleHelper.getResourceBun...
[ "@", "Nullable", "private", "ResourceBundle", "_getResourceBundle", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sBundleName", ",", "@", "Nonnull", "final", "Locale", "aLocale", ")", "{", "ResourceBundle", "ret", "=", "m_aRWLock", ".", "readLocked", ...
Get the cached {@link ResourceBundle}. It is assumed, that the locale name is contained within the bundle name!! @param sBundleName Name of the bundle. May not be <code>null</code>. @param aLocale Locale to use. May not be <code>null</code>. @return <code>null</code> if no such bundle exists
[ "Get", "the", "cached", "{", "@link", "ResourceBundle", "}", ".", "It", "is", "assumed", "that", "the", "locale", "name", "is", "contained", "within", "the", "bundle", "name!!" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/resolve/EnumTextResolverWithPropertiesOverrideAndFallback.java#L109-L140
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificateOperationAsync
public ServiceFuture<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested, final ServiceCallback<CertificateOperation> serviceCallback) { """ Updates a certificate operation. Updates a certificate creation operation that is already in pro...
java
public ServiceFuture<CertificateOperation> updateCertificateOperationAsync(String vaultBaseUrl, String certificateName, boolean cancellationRequested, final ServiceCallback<CertificateOperation> serviceCallback) { return ServiceFuture.fromResponse(updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl,...
[ "public", "ServiceFuture", "<", "CertificateOperation", ">", "updateCertificateOperationAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "boolean", "cancellationRequested", ",", "final", "ServiceCallback", "<", "CertificateOperation", ">", "serv...
Updates a certificate operation. Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @param cancellationRequ...
[ "Updates", "a", "certificate", "operation", ".", "Updates", "a", "certificate", "creation", "operation", "that", "is", "already", "in", "progress", ".", "This", "operation", "requires", "the", "certificates", "/", "update", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7656-L7658
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/request/HttpRequestTimer.java
HttpRequestTimer.startTimer
public HttpRequestAbortTaskTracker startTimer(final HttpRequestBase apacheRequest, final int requestTimeoutMillis) { """ Start the timer with the specified timeout and return a object that can be used to track the state of the timer and cancel it if need be. @param apacheRequest HTTP request this timer will a...
java
public HttpRequestAbortTaskTracker startTimer(final HttpRequestBase apacheRequest, final int requestTimeoutMillis) { if (isTimeoutDisabled(requestTimeoutMillis)) { return NoOpHttpRequestAbortTaskTracker.INSTANCE; } else if (executor == null) { initializeExecutor(); }...
[ "public", "HttpRequestAbortTaskTracker", "startTimer", "(", "final", "HttpRequestBase", "apacheRequest", ",", "final", "int", "requestTimeoutMillis", ")", "{", "if", "(", "isTimeoutDisabled", "(", "requestTimeoutMillis", ")", ")", "{", "return", "NoOpHttpRequestAbortTaskT...
Start the timer with the specified timeout and return a object that can be used to track the state of the timer and cancel it if need be. @param apacheRequest HTTP request this timer will abort if triggered. @param requestTimeoutMillis A positive value here enables the timer, a non-positive value disables it and retur...
[ "Start", "the", "timer", "with", "the", "specified", "timeout", "and", "return", "a", "object", "that", "can", "be", "used", "to", "track", "the", "state", "of", "the", "timer", "and", "cancel", "it", "if", "need", "be", "." ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-core/src/main/java/com/ibm/cloud/objectstorage/http/timers/request/HttpRequestTimer.java#L54-L63
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.getAndCheckEntityType
public static EntityType getAndCheckEntityType(EntityDataModel entityDataModel, Class<?> javaType) { """ Gets the OData type for a Java type and checks if the OData type is an entity type; throws an exception if the OData type is not an entity type. @param entityDataModel The entity data model. @param javaTyp...
java
public static EntityType getAndCheckEntityType(EntityDataModel entityDataModel, Class<?> javaType) { return checkIsEntityType(getAndCheckType(entityDataModel, javaType)); }
[ "public", "static", "EntityType", "getAndCheckEntityType", "(", "EntityDataModel", "entityDataModel", ",", "Class", "<", "?", ">", "javaType", ")", "{", "return", "checkIsEntityType", "(", "getAndCheckType", "(", "entityDataModel", ",", "javaType", ")", ")", ";", ...
Gets the OData type for a Java type and checks if the OData type is an entity type; throws an exception if the OData type is not an entity type. @param entityDataModel The entity data model. @param javaType The Java type. @return The OData entity type for the Java type. @throws ODataSystemException If there is ...
[ "Gets", "the", "OData", "type", "for", "a", "Java", "type", "and", "checks", "if", "the", "OData", "type", "is", "an", "entity", "type", ";", "throws", "an", "exception", "if", "the", "OData", "type", "is", "not", "an", "entity", "type", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L236-L238
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/RuntimeUtil.java
RuntimeUtil.exec
public static Process exec(String[] envp, File dir, String... cmds) { """ 执行命令<br> 命令带参数时参数可作为其中一个参数,也可以将命令和参数组合为一个字符串传入 @param envp 环境变量参数,传入形式为key=value,null表示继承系统环境变量 @param dir 执行命令所在目录(用于相对路径命令执行),null表示使用当前进程执行的目录 @param cmds 命令 @return {@link Process} @since 4.1.6 """ if (ArrayUtil.isEmpty(cm...
java
public static Process exec(String[] envp, File dir, String... cmds) { if (ArrayUtil.isEmpty(cmds)) { throw new NullPointerException("Command is empty !"); } // 单条命令的情况 if (1 == cmds.length) { final String cmd = cmds[0]; if (StrUtil.isBlank(cmd)) { throw new NullPointerException("Command i...
[ "public", "static", "Process", "exec", "(", "String", "[", "]", "envp", ",", "File", "dir", ",", "String", "...", "cmds", ")", "{", "if", "(", "ArrayUtil", ".", "isEmpty", "(", "cmds", ")", ")", "{", "throw", "new", "NullPointerException", "(", "\"Comm...
执行命令<br> 命令带参数时参数可作为其中一个参数,也可以将命令和参数组合为一个字符串传入 @param envp 环境变量参数,传入形式为key=value,null表示继承系统环境变量 @param dir 执行命令所在目录(用于相对路径命令执行),null表示使用当前进程执行的目录 @param cmds 命令 @return {@link Process} @since 4.1.6
[ "执行命令<br", ">", "命令带参数时参数可作为其中一个参数,也可以将命令和参数组合为一个字符串传入" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/RuntimeUtil.java#L122-L140
google/closure-compiler
src/com/google/javascript/jscomp/PolymerPassStaticUtils.java
PolymerPassStaticUtils.getTypeFromProperty
static JSTypeExpression getTypeFromProperty( MemberDefinition property, AbstractCompiler compiler) { """ Gets the JSTypeExpression for a given property using its "type" key. @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#configuring-properties """ if (property.info != null && pro...
java
static JSTypeExpression getTypeFromProperty( MemberDefinition property, AbstractCompiler compiler) { if (property.info != null && property.info.hasType()) { return property.info.getType(); } String typeString; if (property.value.isObjectLit()) { Node typeValue = NodeUtil.getFirstPropM...
[ "static", "JSTypeExpression", "getTypeFromProperty", "(", "MemberDefinition", "property", ",", "AbstractCompiler", "compiler", ")", "{", "if", "(", "property", ".", "info", "!=", "null", "&&", "property", ".", "info", ".", "hasType", "(", ")", ")", "{", "retur...
Gets the JSTypeExpression for a given property using its "type" key. @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#configuring-properties
[ "Gets", "the", "JSTypeExpression", "for", "a", "given", "property", "using", "its", "type", "key", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PolymerPassStaticUtils.java#L207-L246
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java
WalletProtobufSerializer.writeWallet
public void writeWallet(Wallet wallet, OutputStream output) throws IOException { """ Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.<p> Equivalent to {@code walletToProto(wallet).writeTo(output);} """ Protos.Wallet walletProto = walletToProto(wa...
java
public void writeWallet(Wallet wallet, OutputStream output) throws IOException { Protos.Wallet walletProto = walletToProto(wallet); final CodedOutputStream codedOutput = CodedOutputStream.newInstance(output, this.walletWriteBufferSize); walletProto.writeTo(codedOutput); codedOutput.flush...
[ "public", "void", "writeWallet", "(", "Wallet", "wallet", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "Protos", ".", "Wallet", "walletProto", "=", "walletToProto", "(", "wallet", ")", ";", "final", "CodedOutputStream", "codedOutput", "=", "...
Formats the given wallet (transactions and keys) to the given output stream in protocol buffer format.<p> Equivalent to {@code walletToProto(wallet).writeTo(output);}
[ "Formats", "the", "given", "wallet", "(", "transactions", "and", "keys", ")", "to", "the", "given", "output", "stream", "in", "protocol", "buffer", "format", ".", "<p", ">" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java#L152-L157
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.java
ProfilePackageSummaryBuilder.buildInterfaceSummary
public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) { """ Build the summary for the interfaces in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the interface summary will be added """ ...
java
public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) { String interfaceTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Interface_Summary"), configuration.getText("doclet.interfaces")); ...
[ "public", "void", "buildInterfaceSummary", "(", "XMLNode", "node", ",", "Content", "summaryContentTree", ")", "{", "String", "interfaceTableSummary", "=", "configuration", ".", "getText", "(", "\"doclet.Member_Table_Summary\"", ",", "configuration", ".", "getText", "(",...
Build the summary for the interfaces in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the interface summary will be added
[ "Build", "the", "summary", "for", "the", "interfaces", "in", "this", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.java#L180-L200
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/retry/RetryPolicies.java
RetryPolicies.retryByException
public static final RetryPolicy retryByException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) { """ <p> Set a default policy with some explicit handlers for specific exceptions. </p> """ return new Excepti...
java
public static final RetryPolicy retryByException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) { return new ExceptionDependentRetry(defaultPolicy, exceptionToPolicyMap); }
[ "public", "static", "final", "RetryPolicy", "retryByException", "(", "RetryPolicy", "defaultPolicy", ",", "Map", "<", "Class", "<", "?", "extends", "Exception", ">", ",", "RetryPolicy", ">", "exceptionToPolicyMap", ")", "{", "return", "new", "ExceptionDependentRetry...
<p> Set a default policy with some explicit handlers for specific exceptions. </p>
[ "<p", ">", "Set", "a", "default", "policy", "with", "some", "explicit", "handlers", "for", "specific", "exceptions", ".", "<", "/", "p", ">" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/retry/RetryPolicies.java#L108-L111
m-m-m/util
core/src/main/java/net/sf/mmm/util/filter/base/FilterRuleChainXmlParser.java
FilterRuleChainXmlParser.parseChain
public FilterRuleChain<String> parseChain(InputStream inStream) throws IOException, SAXException { """ This method parses the chain from the given {@code inStream}. The XML contained in {@code inStream} needs to contain the chain rules as child-nodes of the {@link Document#getDocumentElement() root-element}. The ...
java
public FilterRuleChain<String> parseChain(InputStream inStream) throws IOException, SAXException { try { Document xmlDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inStream); return parseChain(xmlDoc.getDocumentElement()); } catch (ParserConfigurationException e) { ...
[ "public", "FilterRuleChain", "<", "String", ">", "parseChain", "(", "InputStream", "inStream", ")", "throws", "IOException", ",", "SAXException", "{", "try", "{", "Document", "xmlDoc", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ".", "newDocumentB...
This method parses the chain from the given {@code inStream}. The XML contained in {@code inStream} needs to contain the chain rules as child-nodes of the {@link Document#getDocumentElement() root-element}. The name of the root-element is ignored (use e.g. "chain"). @param inStream is the stream containing the XML to ...
[ "This", "method", "parses", "the", "chain", "from", "the", "given", "{", "@code", "inStream", "}", ".", "The", "XML", "contained", "in", "{", "@code", "inStream", "}", "needs", "to", "contain", "the", "chain", "rules", "as", "child", "-", "nodes", "of", ...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/core/src/main/java/net/sf/mmm/util/filter/base/FilterRuleChainXmlParser.java#L110-L120
alipay/sofa-hessian
src/main/java/com/caucho/services/server/AbstractSkeleton.java
AbstractSkeleton.mangleName
public static String mangleName(Method method, boolean isFull) { """ Creates a unique mangled method name based on the method name and the method parameters. @param method the method to mangle @param isFull if true, mangle the full classname @return a mangled string. """ StringBuffer sb = new S...
java
public static String mangleName(Method method, boolean isFull) { StringBuffer sb = new StringBuffer(); sb.append(method.getName()); Class[] params = method.getParameterTypes(); for (int i = 0; i < params.length; i++) { sb.append('_'); sb.append(mangleClass(p...
[ "public", "static", "String", "mangleName", "(", "Method", "method", ",", "boolean", "isFull", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "sb", ".", "append", "(", "method", ".", "getName", "(", ")", ")", ";", "Class", "...
Creates a unique mangled method name based on the method name and the method parameters. @param method the method to mangle @param isFull if true, mangle the full classname @return a mangled string.
[ "Creates", "a", "unique", "mangled", "method", "name", "based", "on", "the", "method", "name", "and", "the", "method", "parameters", "." ]
train
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/services/server/AbstractSkeleton.java#L155-L168
sebastiangraf/jSCSI
bundles/target/src/main/java/org/jscsi/target/util/BitManip.java
BitManip.getBit
public static boolean getBit (final byte b, final int bitNumber) { """ Returns <code>true</code>, if the bit at the given position is set to <code>one</code> and <code>false</code> if it is set to <code>zero</code> . The bits are numbered in big-endian format, from 0 (LSB) to 7 (MSB). <p> <code> +---+---+---+-...
java
public static boolean getBit (final byte b, final int bitNumber) { int number = b; number >>>= bitNumber; number &= 1; if (number == 1) return true; return false; }
[ "public", "static", "boolean", "getBit", "(", "final", "byte", "b", ",", "final", "int", "bitNumber", ")", "{", "int", "number", "=", "b", ";", "number", ">>>=", "bitNumber", ";", "number", "&=", "1", ";", "if", "(", "number", "==", "1", ")", "return...
Returns <code>true</code>, if the bit at the given position is set to <code>one</code> and <code>false</code> if it is set to <code>zero</code> . The bits are numbered in big-endian format, from 0 (LSB) to 7 (MSB). <p> <code> +---+---+---+---+---+---+---+---+<br> | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | bit number<br> +---+--...
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "bit", "at", "the", "given", "position", "is", "set", "to", "<code", ">", "one<", "/", "code", ">", "and", "<code", ">", "false<", "/", "code", ">", "if", "it", "is", "set", "to", "...
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/util/BitManip.java#L68-L74
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspElFunctions.java
CmsJspElFunctions.convertRawResource
public static CmsResource convertRawResource(CmsObject cms, Object input) throws CmsException { """ Returns a resource created from an Object.<p> <ul> <li>If the input is already a {@link CmsResource}, it is casted to the resource and returned unchanged. <li>If the input is a String, the given OpenCms context...
java
public static CmsResource convertRawResource(CmsObject cms, Object input) throws CmsException { CmsResource result; if (input instanceof CmsResource) { // input is already a resource result = (CmsResource)input; } else if (input instanceof String) { if (CmsUU...
[ "public", "static", "CmsResource", "convertRawResource", "(", "CmsObject", "cms", ",", "Object", "input", ")", "throws", "CmsException", "{", "CmsResource", "result", ";", "if", "(", "input", "instanceof", "CmsResource", ")", "{", "// input is already a resource", "...
Returns a resource created from an Object.<p> <ul> <li>If the input is already a {@link CmsResource}, it is casted to the resource and returned unchanged. <li>If the input is a String, the given OpenCms context is used to read a resource with this name from the VFS. <li>If the input is a {@link CmsUUID}, the given Ope...
[ "Returns", "a", "resource", "created", "from", "an", "Object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspElFunctions.java#L306-L328
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/reporter/EventReporter.java
EventReporter.getMetricName
protected String getMetricName(Map<String, String> metadata, String eventName) { """ Constructs the metric key to be emitted. The actual event name is enriched with the current job and task id to be able to keep track of its origin @param metadata metadata of the actual {@link GobblinTrackingEvent} @param eve...
java
protected String getMetricName(Map<String, String> metadata, String eventName) { return JOINER.join(METRIC_KEY_PREFIX, metadata.get(METADATA_JOB_ID), metadata.get(METADATA_TASK_ID), EVENTS_QUALIFIER, eventName); }
[ "protected", "String", "getMetricName", "(", "Map", "<", "String", ",", "String", ">", "metadata", ",", "String", "eventName", ")", "{", "return", "JOINER", ".", "join", "(", "METRIC_KEY_PREFIX", ",", "metadata", ".", "get", "(", "METADATA_JOB_ID", ")", ",",...
Constructs the metric key to be emitted. The actual event name is enriched with the current job and task id to be able to keep track of its origin @param metadata metadata of the actual {@link GobblinTrackingEvent} @param eventName name of the actual {@link GobblinTrackingEvent} @return prefix of the metric key
[ "Constructs", "the", "metric", "key", "to", "be", "emitted", ".", "The", "actual", "event", "name", "is", "enriched", "with", "the", "current", "job", "and", "task", "id", "to", "be", "able", "to", "keep", "track", "of", "its", "origin" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/reporter/EventReporter.java#L168-L171
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.getByResourceGroupAsync
public Observable<ApplicationGatewayInner> getByResourceGroupAsync(String resourceGroupName, String applicationGatewayName) { """ Gets the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalA...
java
public Observable<ApplicationGatewayInner> getByResourceGroupAsync(String resourceGroupName, String applicationGatewayName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1<ServiceResponse<ApplicationGatewayInner>, ApplicationGatewayInner>() { ...
[ "public", "Observable", "<", "ApplicationGatewayInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "applicationGate...
Gets the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ApplicationGatewayInner object
[ "Gets", "the", "specified", "application", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L346-L353
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsWidgetDialog.java
CmsWidgetDialog.actionToggleElement
public void actionToggleElement() { """ Adds or removes an optional element.<p> Depends on the value stored in the <code>{@link CmsDialog#getAction()}</code> method.<p> """ // get the necessary parameters to add/remove the element int index = 0; try { index = Integer.par...
java
public void actionToggleElement() { // get the necessary parameters to add/remove the element int index = 0; try { index = Integer.parseInt(getParamElementIndex()); } catch (Exception e) { // ignore, should not happen } String name = getParamEleme...
[ "public", "void", "actionToggleElement", "(", ")", "{", "// get the necessary parameters to add/remove the element", "int", "index", "=", "0", ";", "try", "{", "index", "=", "Integer", ".", "parseInt", "(", "getParamElementIndex", "(", ")", ")", ";", "}", "catch",...
Adds or removes an optional element.<p> Depends on the value stored in the <code>{@link CmsDialog#getAction()}</code> method.<p>
[ "Adds", "or", "removes", "an", "optional", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsWidgetDialog.java#L182-L215
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getMatch
public Future<MatchDetail> getMatch(long matchId, boolean includeTimeline) { """ Retrieves the specified match. @param matchId The id of the match. @param includeTimeline Whether or not the event timeline should be retrieved. @return The match details. @see <a href="https://developer.riotgames.com/api/methods#...
java
public Future<MatchDetail> getMatch(long matchId, boolean includeTimeline) { return new ApiFuture<>(() -> handler.getMatch(matchId, includeTimeline)); }
[ "public", "Future", "<", "MatchDetail", ">", "getMatch", "(", "long", "matchId", ",", "boolean", "includeTimeline", ")", "{", "return", "new", "ApiFuture", "<>", "(", "(", ")", "->", "handler", ".", "getMatch", "(", "matchId", ",", "includeTimeline", ")", ...
Retrieves the specified match. @param matchId The id of the match. @param includeTimeline Whether or not the event timeline should be retrieved. @return The match details. @see <a href="https://developer.riotgames.com/api/methods#!/806/2848">Official API Documentation</a>
[ "Retrieves", "the", "specified", "match", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L976-L978
jenkinsci/jenkins
core/src/main/java/hudson/model/AutoCompletionCandidates.java
AutoCompletionCandidates.ofJobNames
public static <T extends Item> AutoCompletionCandidates ofJobNames(final Class<T> type, final String value, @CheckForNull Item self, ItemGroup container) { """ Auto-completes possible job names. @param type Limit the auto-completion to the subtype of this type. @param value The value the user has typed in. M...
java
public static <T extends Item> AutoCompletionCandidates ofJobNames(final Class<T> type, final String value, @CheckForNull Item self, ItemGroup container) { if (self==container) container = self.getParent(); return ofJobNames(type, value, container); }
[ "public", "static", "<", "T", "extends", "Item", ">", "AutoCompletionCandidates", "ofJobNames", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "String", "value", ",", "@", "CheckForNull", "Item", "self", ",", "ItemGroup", "container", ")", "{", ...
Auto-completes possible job names. @param type Limit the auto-completion to the subtype of this type. @param value The value the user has typed in. Matched as a prefix. @param self The contextual item for which the auto-completion is provided to. For example, if you are configuring a job, this is the job being configu...
[ "Auto", "-", "completes", "possible", "job", "names", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/AutoCompletionCandidates.java#L93-L97
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/jhlabs/image/Gradient.java
Gradient.addKnot
public void addKnot(int x, int color, int type) { """ Add a new knot. @param x the knot position @param color the color @param type the knot type @see #removeKnot """ int[] nx = new int[numKnots+1]; int[] ny = new int[numKnots+1]; byte[] nt = new byte[numKnots+1]; System.arraycopy(xKnots, 0, nx, 0,...
java
public void addKnot(int x, int color, int type) { int[] nx = new int[numKnots+1]; int[] ny = new int[numKnots+1]; byte[] nt = new byte[numKnots+1]; System.arraycopy(xKnots, 0, nx, 0, numKnots); System.arraycopy(yKnots, 0, ny, 0, numKnots); System.arraycopy(knotTypes, 0, nt, 0, numKnots); xKnots = nx; yK...
[ "public", "void", "addKnot", "(", "int", "x", ",", "int", "color", ",", "int", "type", ")", "{", "int", "[", "]", "nx", "=", "new", "int", "[", "numKnots", "+", "1", "]", ";", "int", "[", "]", "ny", "=", "new", "int", "[", "numKnots", "+", "1...
Add a new knot. @param x the knot position @param color the color @param type the knot type @see #removeKnot
[ "Add", "a", "new", "knot", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/jhlabs/image/Gradient.java#L240-L260
grails/grails-core
grails-spring/src/main/groovy/grails/spring/BeanBuilder.java
BeanBuilder.loadBeans
public void loadBeans(Resource[] resources) { """ Loads a set of given beans @param resources The resources to load @throws IOException Thrown if there is an error reading one of the passes resources """ @SuppressWarnings("rawtypes") Closure beans = new Closure(this) { private static fina...
java
public void loadBeans(Resource[] resources) { @SuppressWarnings("rawtypes") Closure beans = new Closure(this) { private static final long serialVersionUID = -2778328821635253740L; @Override public Object call(Object... args) { invokeBeanDefiningClosure((Closu...
[ "public", "void", "loadBeans", "(", "Resource", "[", "]", "resources", ")", "{", "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "Closure", "beans", "=", "new", "Closure", "(", "this", ")", "{", "private", "static", "final", "long", "serialVersionUID", "=...
Loads a set of given beans @param resources The resources to load @throws IOException Thrown if there is an error reading one of the passes resources
[ "Loads", "a", "set", "of", "given", "beans" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-spring/src/main/groovy/grails/spring/BeanBuilder.java#L453-L487
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java
Transform1D.setTranslation
@Inline(value = "setTranslate($1, null, $2, $3)") public void setTranslation(List<? extends S> path, double curvilineCoord, double shiftCoord) { """ Set the position. <p>If the given <var>path</var> contains only one segment, the transformation will follow the segment's direction. @param path the path to f...
java
@Inline(value = "setTranslate($1, null, $2, $3)") public void setTranslation(List<? extends S> path, double curvilineCoord, double shiftCoord) { setTranslation(path, null, curvilineCoord, shiftCoord); }
[ "@", "Inline", "(", "value", "=", "\"setTranslate($1, null, $2, $3)\"", ")", "public", "void", "setTranslation", "(", "List", "<", "?", "extends", "S", ">", "path", ",", "double", "curvilineCoord", ",", "double", "shiftCoord", ")", "{", "setTranslation", "(", ...
Set the position. <p>If the given <var>path</var> contains only one segment, the transformation will follow the segment's direction. @param path the path to follow. @param curvilineCoord the curviline translation. @param shiftCoord the shifting translation.
[ "Set", "the", "position", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L302-L305
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/BoardsApi.java
BoardsApi.updateBoardList
public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException { """ Updates an existing Issue Board list. This call is used to change list position. <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre> ...
java
public BoardList updateBoardList(Object projectIdOrPath, Integer boardId, Integer listId, Integer position) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("position", position, true); Response response = putWithFormData(Response.Status.OK, formData, "p...
[ "public", "BoardList", "updateBoardList", "(", "Object", "projectIdOrPath", ",", "Integer", "boardId", ",", "Integer", "listId", ",", "Integer", "position", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")",...
Updates an existing Issue Board list. This call is used to change list position. <pre><code>GitLab Endpoint: PUT /projects/:id/boards/:board_id/lists/:list_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param boardId the ID of the board @param list...
[ "Updates", "an", "existing", "Issue", "Board", "list", ".", "This", "call", "is", "used", "to", "change", "list", "position", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L309-L314
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/impl/RetryStateImpl.java
RetryStateImpl.createDelayStream
protected static PrimitiveIterator.OfLong createDelayStream(Duration delay, Duration jitter) { """ Returns a stream of times in nanoseconds, randomly distributed between delay-jitter and delay+jitter <p> protected only to allow unit testing @param delay the delay duration @param jitter the jitter duration ...
java
protected static PrimitiveIterator.OfLong createDelayStream(Duration delay, Duration jitter) { if (jitter.isZero()) { // No jitter, return an infinite stream of the delay duration long delayNanos = asClampedNanos(delay); return LongStream.generate(() -> delayNanos).iterator()...
[ "protected", "static", "PrimitiveIterator", ".", "OfLong", "createDelayStream", "(", "Duration", "delay", ",", "Duration", "jitter", ")", "{", "if", "(", "jitter", ".", "isZero", "(", ")", ")", "{", "// No jitter, return an infinite stream of the delay duration", "lon...
Returns a stream of times in nanoseconds, randomly distributed between delay-jitter and delay+jitter <p> protected only to allow unit testing @param delay the delay duration @param jitter the jitter duration @return stream of times in nanoseconds within delay +/- jitter
[ "Returns", "a", "stream", "of", "times", "in", "nanoseconds", "randomly", "distributed", "between", "delay", "-", "jitter", "and", "delay", "+", "jitter", "<p", ">", "protected", "only", "to", "allow", "unit", "testing" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/impl/RetryStateImpl.java#L151-L162
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByTimeZoneCanonicalId
public Iterable<DUser> queryByTimeZoneCanonicalId(java.lang.String timeZoneCanonicalId) { """ query-by method for field timeZoneCanonicalId @param timeZoneCanonicalId the specified attribute @return an Iterable of DUsers for the specified timeZoneCanonicalId """ return queryByField(null, DUserMapper.Fiel...
java
public Iterable<DUser> queryByTimeZoneCanonicalId(java.lang.String timeZoneCanonicalId) { return queryByField(null, DUserMapper.Field.TIMEZONECANONICALID.getFieldName(), timeZoneCanonicalId); }
[ "public", "Iterable", "<", "DUser", ">", "queryByTimeZoneCanonicalId", "(", "java", ".", "lang", ".", "String", "timeZoneCanonicalId", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "TIMEZONECANONICALID", ".", "getFieldName...
query-by method for field timeZoneCanonicalId @param timeZoneCanonicalId the specified attribute @return an Iterable of DUsers for the specified timeZoneCanonicalId
[ "query", "-", "by", "method", "for", "field", "timeZoneCanonicalId" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L250-L252
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog/plugins/pipelineprocessor/processors/PipelineInterpreter.java
PipelineInterpreter.processForPipelines
public List<Message> processForPipelines(Message message, Set<String> pipelineIds, InterpreterListener interpreterListener, State state) { """ Given a set of pipeline ids, process ...
java
public List<Message> processForPipelines(Message message, Set<String> pipelineIds, InterpreterListener interpreterListener, State state) { final Map<String, Pipeline> currentPip...
[ "public", "List", "<", "Message", ">", "processForPipelines", "(", "Message", "message", ",", "Set", "<", "String", ">", "pipelineIds", ",", "InterpreterListener", "interpreterListener", ",", "State", "state", ")", "{", "final", "Map", "<", "String", ",", "Pip...
Given a set of pipeline ids, process the given message according to the passed state. This method returns the list of messages produced by the configuration in state, it does not look at the database or any other external resource besides what is being passed as parameters. This can be used to simulate pipelines with...
[ "Given", "a", "set", "of", "pipeline", "ids", "process", "the", "given", "message", "according", "to", "the", "passed", "state", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog/plugins/pipelineprocessor/processors/PipelineInterpreter.java#L233-L244
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java
Partitioner.getSnapshotLowWatermark
private long getSnapshotLowWatermark(WatermarkType watermarkType, long previousWatermark, int deltaForNextWatermark) { """ Get low water mark @param watermarkType Watermark type @param previousWatermark Previous water mark @param deltaForNextWatermark delta number for next water mark @return Previous waterma...
java
private long getSnapshotLowWatermark(WatermarkType watermarkType, long previousWatermark, int deltaForNextWatermark) { LOG.debug("Getting snapshot low water mark"); String timeZone = this.state.getProp(ConfigurationKeys.SOURCE_TIMEZONE, ConfigurationKeys.DEFAULT_SOURCE_TIMEZONE); if (isPreviousWatermarkExis...
[ "private", "long", "getSnapshotLowWatermark", "(", "WatermarkType", "watermarkType", ",", "long", "previousWatermark", ",", "int", "deltaForNextWatermark", ")", "{", "LOG", ".", "debug", "(", "\"Getting snapshot low water mark\"", ")", ";", "String", "timeZone", "=", ...
Get low water mark @param watermarkType Watermark type @param previousWatermark Previous water mark @param deltaForNextWatermark delta number for next water mark @return Previous watermark (fallback to {@link ConfigurationKeys#SOURCE_QUERYBASED_START_VALUE} iff previous watermark is unavailable)
[ "Get", "low", "water", "mark" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/partition/Partitioner.java#L369-L390
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.listHostingEnvironmentDetectorResponsesWithServiceResponseAsync
public Observable<ServiceResponse<Page<DetectorResponseInner>>> listHostingEnvironmentDetectorResponsesWithServiceResponseAsync(final String resourceGroupName, final String name) { """ List Hosting Environment Detector Responses. List Hosting Environment Detector Responses. @param resourceGroupName Name of the...
java
public Observable<ServiceResponse<Page<DetectorResponseInner>>> listHostingEnvironmentDetectorResponsesWithServiceResponseAsync(final String resourceGroupName, final String name) { return listHostingEnvironmentDetectorResponsesSinglePageAsync(resourceGroupName, name) .concatMap(new Func1<ServiceResp...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DetectorResponseInner", ">", ">", ">", "listHostingEnvironmentDetectorResponsesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", ...
List Hosting Environment Detector Responses. List Hosting Environment Detector Responses. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Site Name @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;Detecto...
[ "List", "Hosting", "Environment", "Detector", "Responses", ".", "List", "Hosting", "Environment", "Detector", "Responses", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L267-L279
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/MapView.java
MapView.getBounds
public Bbox getBounds() { """ Given the information in this MapView object, what is the currently visible area? @return Notice that at this moment an Axis Aligned Bounding Box is returned! This means that rotating is not yet possible. """ double w = getViewSpaceWidth(); double h = getViewSpaceHeight();...
java
public Bbox getBounds() { double w = getViewSpaceWidth(); double h = getViewSpaceHeight(); double x = viewState.getX() - w / 2; double y = viewState.getY() - h / 2; return new Bbox(x, y, w, h); }
[ "public", "Bbox", "getBounds", "(", ")", "{", "double", "w", "=", "getViewSpaceWidth", "(", ")", ";", "double", "h", "=", "getViewSpaceHeight", "(", ")", ";", "double", "x", "=", "viewState", ".", "getX", "(", ")", "-", "w", "/", "2", ";", "double", ...
Given the information in this MapView object, what is the currently visible area? @return Notice that at this moment an Axis Aligned Bounding Box is returned! This means that rotating is not yet possible.
[ "Given", "the", "information", "in", "this", "MapView", "object", "what", "is", "the", "currently", "visible", "area?" ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/MapView.java#L377-L383
ow2-chameleon/fuchsia
importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java
ZWaveController.handleApplicationCommandRequest
private void handleApplicationCommandRequest(SerialMessage incomingMessage) { """ Handles incoming Application Command Request. @param incomingMessage the request message to process. """ logger.trace("Handle Message Application Command Request"); int nodeId = incomingMessage.getMessagePayloadByte(1); lo...
java
private void handleApplicationCommandRequest(SerialMessage incomingMessage) { logger.trace("Handle Message Application Command Request"); int nodeId = incomingMessage.getMessagePayloadByte(1); logger.debug("Application Command Request from Node " + nodeId); ZWaveNode node = getNode(nodeId); if (node == nul...
[ "private", "void", "handleApplicationCommandRequest", "(", "SerialMessage", "incomingMessage", ")", "{", "logger", ".", "trace", "(", "\"Handle Message Application Command Request\"", ")", ";", "int", "nodeId", "=", "incomingMessage", ".", "getMessagePayloadByte", "(", "1...
Handles incoming Application Command Request. @param incomingMessage the request message to process.
[ "Handles", "incoming", "Application", "Command", "Request", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java#L228-L266
citiususc/hipster
hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java
Maze2D.putObstacleRectangle
public void putObstacleRectangle(Point a, Point b) { """ Fill a rectangle defined by points a and b with occupied tiles. @param a point a of the rectangle. @param b point b of the rectangle. """ updateRectangle(a, b, Symbol.OCCUPIED); }
java
public void putObstacleRectangle(Point a, Point b) { updateRectangle(a, b, Symbol.OCCUPIED); }
[ "public", "void", "putObstacleRectangle", "(", "Point", "a", ",", "Point", "b", ")", "{", "updateRectangle", "(", "a", ",", "b", ",", "Symbol", ".", "OCCUPIED", ")", ";", "}" ]
Fill a rectangle defined by points a and b with occupied tiles. @param a point a of the rectangle. @param b point b of the rectangle.
[ "Fill", "a", "rectangle", "defined", "by", "points", "a", "and", "b", "with", "occupied", "tiles", "." ]
train
https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java#L296-L298
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java
TouchActions.doubleTap
public TouchActions doubleTap(WebElement onElement) { """ Allows the execution of double tap on the screen, analogous to double click using a Mouse. @param onElement The {@link WebElement} to double tap @return self """ if (touchScreen != null) { action.addAction(new DoubleTapAction(touchScreen, ...
java
public TouchActions doubleTap(WebElement onElement) { if (touchScreen != null) { action.addAction(new DoubleTapAction(touchScreen, (Locatable) onElement)); } return this; }
[ "public", "TouchActions", "doubleTap", "(", "WebElement", "onElement", ")", "{", "if", "(", "touchScreen", "!=", "null", ")", "{", "action", ".", "addAction", "(", "new", "DoubleTapAction", "(", "touchScreen", ",", "(", "Locatable", ")", "onElement", ")", ")...
Allows the execution of double tap on the screen, analogous to double click using a Mouse. @param onElement The {@link WebElement} to double tap @return self
[ "Allows", "the", "execution", "of", "double", "tap", "on", "the", "screen", "analogous", "to", "double", "click", "using", "a", "Mouse", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java#L129-L134
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java
Uris.getRawDirectory
public static String getRawDirectory(final URI uri, final boolean strict) { """ Returns the raw (and normalized) directory portion of the given URI. The directory is the raw path, up to and including the last slash. This means that all directories start and end with a slash (but may be a single slash only). ...
java
public static String getRawDirectory(final URI uri, final boolean strict) { return esc(strict).escapePath(getDirectory(getRawPath(uri, strict))); }
[ "public", "static", "String", "getRawDirectory", "(", "final", "URI", "uri", ",", "final", "boolean", "strict", ")", "{", "return", "esc", "(", "strict", ")", ".", "escapePath", "(", "getDirectory", "(", "getRawPath", "(", "uri", ",", "strict", ")", ")", ...
Returns the raw (and normalized) directory portion of the given URI. The directory is the raw path, up to and including the last slash. This means that all directories start and end with a slash (but may be a single slash only). @param uri the URI to extract the directory from @param strict whether or not to do stri...
[ "Returns", "the", "raw", "(", "and", "normalized", ")", "directory", "portion", "of", "the", "given", "URI", ".", "The", "directory", "is", "the", "raw", "path", "up", "to", "and", "including", "the", "last", "slash", ".", "This", "means", "that", "all",...
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L183-L185
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
MultiIndex.refreshIndexList
public void refreshIndexList() throws IOException { """ Refresh list of indexes. Used to be called asynchronously when list changes. New, actual list is read from IndexInfos. @throws IOException """ synchronized (updateMonitor) { // release reader if any releaseMultiReader(); ...
java
public void refreshIndexList() throws IOException { synchronized (updateMonitor) { // release reader if any releaseMultiReader(); // prepare added/removed sets Set<String> newList = new HashSet<String>(indexNames.getNames()); // remove removed indexes ...
[ "public", "void", "refreshIndexList", "(", ")", "throws", "IOException", "{", "synchronized", "(", "updateMonitor", ")", "{", "// release reader if any", "releaseMultiReader", "(", ")", ";", "// prepare added/removed sets", "Set", "<", "String", ">", "newList", "=", ...
Refresh list of indexes. Used to be called asynchronously when list changes. New, actual list is read from IndexInfos. @throws IOException
[ "Refresh", "list", "of", "indexes", ".", "Used", "to", "be", "called", "asynchronously", "when", "list", "changes", ".", "New", "actual", "list", "is", "read", "from", "IndexInfos", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java#L3449-L3504
mapbox/mapbox-java
services-turf/src/main/java/com/mapbox/turf/TurfConversion.java
TurfConversion.convertLength
public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { """ Converts a distance to the default units. Use {@link TurfConversion#convertLength(double, String, String)} to specify a unit to convert to. @param...
java
public static double convertLength(@FloatRange(from = 0) double distance, @NonNull @TurfUnitCriteria String originalUnit) { return convertLength(distance, originalUnit, TurfConstants.UNIT_DEFAULT); }
[ "public", "static", "double", "convertLength", "(", "@", "FloatRange", "(", "from", "=", "0", ")", "double", "distance", ",", "@", "NonNull", "@", "TurfUnitCriteria", "String", "originalUnit", ")", "{", "return", "convertLength", "(", "distance", ",", "origina...
Converts a distance to the default units. Use {@link TurfConversion#convertLength(double, String, String)} to specify a unit to convert to. @param distance double representing a distance value @param originalUnit of the distance, must be one of the units defined in {@link TurfUnitCriteria} @return converted distan...
[ "Converts", "a", "distance", "to", "the", "default", "units", ".", "Use", "{", "@link", "TurfConversion#convertLength", "(", "double", "String", "String", ")", "}", "to", "specify", "a", "unit", "to", "convert", "to", "." ]
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-turf/src/main/java/com/mapbox/turf/TurfConversion.java#L143-L146
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/descriptor/JsonModelDescriptorReader.java
JsonModelDescriptorReader.extractTableFromJson
public static Table extractTableFromJson(final JsonObject modelJson, final String tablePath) { """ Extracts a Table from H2O's model serialized into JSON. @param modelJson Full JSON representation of a model @param tablePath Path in the given JSON to the desired table. Levels are dot-separated. @return An ins...
java
public static Table extractTableFromJson(final JsonObject modelJson, final String tablePath) { Objects.requireNonNull(modelJson); JsonElement potentialTableJson = findInJson(modelJson, tablePath); if (potentialTableJson.isJsonNull()) { System.out.println(String.format("Failed to extr...
[ "public", "static", "Table", "extractTableFromJson", "(", "final", "JsonObject", "modelJson", ",", "final", "String", "tablePath", ")", "{", "Objects", ".", "requireNonNull", "(", "modelJson", ")", ";", "JsonElement", "potentialTableJson", "=", "findInJson", "(", ...
Extracts a Table from H2O's model serialized into JSON. @param modelJson Full JSON representation of a model @param tablePath Path in the given JSON to the desired table. Levels are dot-separated. @return An instance of {@link Table}, if there was a table found by following the given path. Otherwise null.
[ "Extracts", "a", "Table", "from", "H2O", "s", "model", "serialized", "into", "JSON", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/descriptor/JsonModelDescriptorReader.java#L36-L90
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.getByResourceGroupAsync
public Observable<VirtualNetworkInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { """ Gets the specified virtual network by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @throws IllegalArg...
java
public Observable<VirtualNetworkInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInner>() { @Override ...
[ "public", "Observable", "<", "VirtualNetworkInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkName", ...
Gets the specified virtual network by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualNetworkInner object
[ "Gets", "the", "specified", "virtual", "network", "by", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L314-L321
elki-project/elki
addons/uncertain/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/uncertain/UKMeans.java
UKMeans.assignToNearestCluster
protected boolean assignToNearestCluster(Relation<DiscreteUncertainObject> relation, List<double[]> means, List<? extends ModifiableDBIDs> clusters, WritableIntegerDataStore assignment, double[] varsum) { """ Returns a list of clusters. The k<sup>th</sup> cluster contains the ids of those FeatureVectors, that are...
java
protected boolean assignToNearestCluster(Relation<DiscreteUncertainObject> relation, List<double[]> means, List<? extends ModifiableDBIDs> clusters, WritableIntegerDataStore assignment, double[] varsum) { assert (k == means.size()); boolean changed = false; Arrays.fill(varsum, 0.); for(DBIDIter iditer =...
[ "protected", "boolean", "assignToNearestCluster", "(", "Relation", "<", "DiscreteUncertainObject", ">", "relation", ",", "List", "<", "double", "[", "]", ">", "means", ",", "List", "<", "?", "extends", "ModifiableDBIDs", ">", "clusters", ",", "WritableIntegerDataS...
Returns a list of clusters. The k<sup>th</sup> cluster contains the ids of those FeatureVectors, that are nearest to the k<sup>th</sup> mean. @param relation the database to cluster @param means a list of k means @param clusters cluster assignment @param assignment Current cluster assignment @param varsum Variance sum...
[ "Returns", "a", "list", "of", "clusters", ".", "The", "k<sup", ">", "th<", "/", "sup", ">", "cluster", "contains", "the", "ids", "of", "those", "FeatureVectors", "that", "are", "nearest", "to", "the", "k<sup", ">", "th<", "/", "sup", ">", "mean", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/uncertain/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/uncertain/UKMeans.java#L193-L212
grpc/grpc-java
alts/src/main/java/io/grpc/alts/internal/BufUnwrapper.java
BufUnwrapper.writableNioBuffers
ByteBuffer[] writableNioBuffers(ByteBuf buf) { """ Called to get access to the underlying NIO buffers for a {@link ByteBuf} that will be used for writing. """ // Set the writer index to the capacity to guarantee that the returned NIO buffers will have // the capacity available. int readerIndex = b...
java
ByteBuffer[] writableNioBuffers(ByteBuf buf) { // Set the writer index to the capacity to guarantee that the returned NIO buffers will have // the capacity available. int readerIndex = buf.readerIndex(); int writerIndex = buf.writerIndex(); buf.readerIndex(writerIndex); buf.writerIndex(buf.capac...
[ "ByteBuffer", "[", "]", "writableNioBuffers", "(", "ByteBuf", "buf", ")", "{", "// Set the writer index to the capacity to guarantee that the returned NIO buffers will have", "// the capacity available.", "int", "readerIndex", "=", "buf", ".", "readerIndex", "(", ")", ";", "i...
Called to get access to the underlying NIO buffers for a {@link ByteBuf} that will be used for writing.
[ "Called", "to", "get", "access", "to", "the", "underlying", "NIO", "buffers", "for", "a", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/alts/src/main/java/io/grpc/alts/internal/BufUnwrapper.java#L33-L48
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java
CommerceAddressRestrictionPersistenceImpl.findAll
@Override public List<CommerceAddressRestriction> findAll() { """ Returns all the commerce address restrictions. @return the commerce address restrictions """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceAddressRestriction> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceAddressRestriction", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce address restrictions. @return the commerce address restrictions
[ "Returns", "all", "the", "commerce", "address", "restrictions", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java#L2030-L2033
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/publickey/AbstractKnownHostsKeyVerification.java
AbstractKnownHostsKeyVerification.verifyHost
public boolean verifyHost(String host, SshPublicKey pk) throws SshException { """ <p> Verifies a host key against the list of known_hosts. </p> <p> If the host unknown or the key does not match the currently allowed host key the abstract <code>onUnknownHost</code> or <code>onHostKeyMismatch</code> methods ...
java
public boolean verifyHost(String host, SshPublicKey pk) throws SshException { return verifyHost(host, pk, true); }
[ "public", "boolean", "verifyHost", "(", "String", "host", ",", "SshPublicKey", "pk", ")", "throws", "SshException", "{", "return", "verifyHost", "(", "host", ",", "pk", ",", "true", ")", ";", "}" ]
<p> Verifies a host key against the list of known_hosts. </p> <p> If the host unknown or the key does not match the currently allowed host key the abstract <code>onUnknownHost</code> or <code>onHostKeyMismatch</code> methods are called so that the caller may identify and allow the host. </p> @param host the name of t...
[ "<p", ">", "Verifies", "a", "host", "key", "against", "the", "list", "of", "known_hosts", ".", "<", "/", "p", ">" ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/publickey/AbstractKnownHostsKeyVerification.java#L419-L421
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/ObjectWrapper.java
ObjectWrapper.setSimpleValue
public void setSimpleValue(String propertyName, Object value) { """ Sets the value of the specified property in the wrapped object. @param propertyName the name of the simple property whose value is to be updated, cannot be {@code null} @param value the value to set, can be {@code null} @throws Illegal...
java
public void setSimpleValue(String propertyName, Object value) { setSimpleValue(object, getPropertyOrThrow(bean, propertyName), value); }
[ "public", "void", "setSimpleValue", "(", "String", "propertyName", ",", "Object", "value", ")", "{", "setSimpleValue", "(", "object", ",", "getPropertyOrThrow", "(", "bean", ",", "propertyName", ")", ",", "value", ")", ";", "}" ]
Sets the value of the specified property in the wrapped object. @param propertyName the name of the simple property whose value is to be updated, cannot be {@code null} @param value the value to set, can be {@code null} @throws IllegalArgumentException if the property parameter is {@code null} @throws NullPoint...
[ "Sets", "the", "value", "of", "the", "specified", "property", "in", "the", "wrapped", "object", "." ]
train
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/ObjectWrapper.java#L314-L316
phax/ph-oton
ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java
AbstractJSBlock.staticInvoke
@Nonnull public JSInvocation staticInvoke (@Nullable final AbstractJSClass aType, @Nonnull final String sMethod) { """ Creates a static invocation statement. @param aType Type to use @param sMethod Method name to invoke @return Never <code>null</code>. """ final JSInvocation aInvocation = new JSIn...
java
@Nonnull public JSInvocation staticInvoke (@Nullable final AbstractJSClass aType, @Nonnull final String sMethod) { final JSInvocation aInvocation = new JSInvocation (aType, sMethod); return addStatement (aInvocation); }
[ "@", "Nonnull", "public", "JSInvocation", "staticInvoke", "(", "@", "Nullable", "final", "AbstractJSClass", "aType", ",", "@", "Nonnull", "final", "String", "sMethod", ")", "{", "final", "JSInvocation", "aInvocation", "=", "new", "JSInvocation", "(", "aType", ",...
Creates a static invocation statement. @param aType Type to use @param sMethod Method name to invoke @return Never <code>null</code>.
[ "Creates", "a", "static", "invocation", "statement", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java#L535-L540
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java
WeightInitUtil.reshapeWeights
public static INDArray reshapeWeights(long[] shape, INDArray paramsView, char flatteningOrder) { """ Reshape the parameters view, without modifying the paramsView array values. @param shape Shape to reshape @param paramsView Parameters array view @param flatteningOrder Order in which parameters...
java
public static INDArray reshapeWeights(long[] shape, INDArray paramsView, char flatteningOrder) { return paramsView.reshape(flatteningOrder, shape); }
[ "public", "static", "INDArray", "reshapeWeights", "(", "long", "[", "]", "shape", ",", "INDArray", "paramsView", ",", "char", "flatteningOrder", ")", "{", "return", "paramsView", ".", "reshape", "(", "flatteningOrder", ",", "shape", ")", ";", "}" ]
Reshape the parameters view, without modifying the paramsView array values. @param shape Shape to reshape @param paramsView Parameters array view @param flatteningOrder Order in which parameters are flattened/reshaped
[ "Reshape", "the", "parameters", "view", "without", "modifying", "the", "paramsView", "array", "values", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java#L220-L222