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
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java
TrmMessageFactoryImpl.createInboundTrmFirstContactMessage
public TrmFirstContactMessage createInboundTrmFirstContactMessage(byte rawMessage[], int offset, int length) throws MessageDecodeFailedException { """ Create a TrmFirstContactMessage to represent an inbound message. @param rawMessage The inboun...
java
public TrmFirstContactMessage createInboundTrmFirstContactMessage(byte rawMessage[], int offset, int length) throws MessageDecodeFailedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createInboundTrmFir...
[ "public", "TrmFirstContactMessage", "createInboundTrmFirstContactMessage", "(", "byte", "rawMessage", "[", "]", ",", "int", "offset", ",", "int", "length", ")", "throws", "MessageDecodeFailedException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ...
Create a TrmFirstContactMessage to represent an inbound message. @param rawMessage The inbound byte array containging a complete message @param offset The offset in the byte array at which the message begins @param length The length of the message within the byte array @return The new TrmFirstContactMessag...
[ "Create", "a", "TrmFirstContactMessage", "to", "represent", "an", "inbound", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/TrmMessageFactoryImpl.java#L336-L346
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3d.java
Path3d.getClosestPointTo
public static Point3d getClosestPointTo(PathIterator3d pathIterator, double x, double y, double z) { """ Replies the point on the path that is closest to the given point. <p> <strong>CAUTION:</strong> This function works only on path iterators that are replying polyline primitives, ie. if the {@link PathIterat...
java
public static Point3d getClosestPointTo(PathIterator3d pathIterator, double x, double y, double z) { Point3d closest = null; double bestDist = Double.POSITIVE_INFINITY; Point3d candidate; AbstractPathElement3D pe = pathIterator.next(); Path3d subPath; if (pe.type != PathElementType.MOVE_TO) { throw new ...
[ "public", "static", "Point3d", "getClosestPointTo", "(", "PathIterator3d", "pathIterator", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "Point3d", "closest", "=", "null", ";", "double", "bestDist", "=", "Double", ".", "POSITIVE_INFINIT...
Replies the point on the path that is closest to the given point. <p> <strong>CAUTION:</strong> This function works only on path iterators that are replying polyline primitives, ie. if the {@link PathIterator3d#isPolyline()} of <var>pi</var> is replying <code>true</code>. {@link #getClosestPointTo(Point3D)} avoids this...
[ "Replies", "the", "point", "on", "the", "path", "that", "is", "closest", "to", "the", "given", "point", ".", "<p", ">", "<strong", ">", "CAUTION", ":", "<", "/", "strong", ">", "This", "function", "works", "only", "on", "path", "iterators", "that", "ar...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3d.java#L106-L172
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/InterceptorMetaDataHelper.java
InterceptorMetaDataHelper.validateLifeCycleSignature
public static void validateLifeCycleSignature(InterceptorMethodKind kind, String lifeCycle, Method m, boolean ejbClass, J2EEName name) throws EJBConfigurationException { """ Verify that a specified life cycle event interceptor method has correct method modifiers, parameter types, return type, ...
java
public static void validateLifeCycleSignature(InterceptorMethodKind kind, String lifeCycle, Method m, boolean ejbClass, J2EEName name) throws EJBConfigurationException { // Validate method signature except for the parameter types, // which is done by this method. validate...
[ "public", "static", "void", "validateLifeCycleSignature", "(", "InterceptorMethodKind", "kind", ",", "String", "lifeCycle", ",", "Method", "m", ",", "boolean", "ejbClass", ",", "J2EEName", "name", ")", "throws", "EJBConfigurationException", "{", "// Validate method sign...
Verify that a specified life cycle event interceptor method has correct method modifiers, parameter types, return type, and exception types for the throws clause. Note, if parameter types is known to be valid, then use the {@link #validateLifeCycleSignatureExceptParameters(String, Method) method of this class to skip ...
[ "Verify", "that", "a", "specified", "life", "cycle", "event", "interceptor", "method", "has", "correct", "method", "modifiers", "parameter", "types", "return", "type", "and", "exception", "types", "for", "the", "throws", "clause", ".", "Note", "if", "parameter",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/metadata/ejb/InterceptorMetaDataHelper.java#L787-L827
ops4j/org.ops4j.base
ops4j-base-spi/src/main/java/org/ops4j/spi/SafeServiceLoader.java
SafeServiceLoader.parseLine
private void parseLine( List<String> names, String line ) { """ Parses a single line of a META-INF/services resources. If the line contains a class name, the name is added to the given list. @param names list of class names @param line line to be parsed """ int commentPos = line.indexOf( '#' ); ...
java
private void parseLine( List<String> names, String line ) { int commentPos = line.indexOf( '#' ); if( commentPos >= 0 ) { line = line.substring( 0, commentPos ); } line = line.trim(); if( !line.isEmpty() && !names.contains( line ) ) { n...
[ "private", "void", "parseLine", "(", "List", "<", "String", ">", "names", ",", "String", "line", ")", "{", "int", "commentPos", "=", "line", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "commentPos", ">=", "0", ")", "{", "line", "=", "line",...
Parses a single line of a META-INF/services resources. If the line contains a class name, the name is added to the given list. @param names list of class names @param line line to be parsed
[ "Parses", "a", "single", "line", "of", "a", "META", "-", "INF", "/", "services", "resources", ".", "If", "the", "line", "contains", "a", "class", "name", "the", "name", "is", "added", "to", "the", "given", "list", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-spi/src/main/java/org/ops4j/spi/SafeServiceLoader.java#L180-L192
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java
RobustLoaderWriterResilienceStrategy.putAllFailure
@Override public void putAllFailure(Map<? extends K, ? extends V> entries, StoreAccessException e) { """ Write all entries to the loader-writer. @param entries the entries being put @param e the triggered failure """ try { loaderWriter.writeAll(entries.entrySet()); // FIXME: bad typing that we ...
java
@Override public void putAllFailure(Map<? extends K, ? extends V> entries, StoreAccessException e) { try { loaderWriter.writeAll(entries.entrySet()); // FIXME: bad typing that we should fix } catch(BulkCacheWritingException e1) { throw e1; } catch (Exception e1) { throw ExceptionFactory....
[ "@", "Override", "public", "void", "putAllFailure", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "entries", ",", "StoreAccessException", "e", ")", "{", "try", "{", "loaderWriter", ".", "writeAll", "(", "entries", ".", "entrySet", ...
Write all entries to the loader-writer. @param entries the entries being put @param e the triggered failure
[ "Write", "all", "entries", "to", "the", "loader", "-", "writer", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java#L290-L301
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.diffAlgorithm
private EDiff diffAlgorithm(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth) throws TTIOException { """ Main algorithm to compute diffs between two nodes. @param paramNewRtx {@link IReadTransaction} on new revision @param paramOldRtx {@link IReadTransacti...
java
private EDiff diffAlgorithm(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth) throws TTIOException { EDiff diff = null; // Check if node has been deleted. if (paramDepth.getOldDepth() > paramDepth.getNewDepth()) { diff = EDiff.DEL...
[ "private", "EDiff", "diffAlgorithm", "(", "final", "INodeReadTrx", "paramNewRtx", ",", "final", "INodeReadTrx", "paramOldRtx", ",", "final", "DepthCounter", "paramDepth", ")", "throws", "TTIOException", "{", "EDiff", "diff", "=", "null", ";", "// Check if node has bee...
Main algorithm to compute diffs between two nodes. @param paramNewRtx {@link IReadTransaction} on new revision @param paramOldRtx {@link IReadTransaction} on old revision @param paramDepth {@link DepthCounter} container for current depths of both transaction cursors @return kind of diff @throws TTIOException
[ "Main", "algorithm", "to", "compute", "diffs", "between", "two", "nodes", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L381-L410
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/DataFrames.java
DataFrames.std
public static Column std(DataRowsFacade dataFrame, String columnName) { """ Standard deviation for a column @param dataFrame the dataframe to get the column from @param columnName the name of the column to get the standard deviation for @return the column that represents the standard deviation """ ...
java
public static Column std(DataRowsFacade dataFrame, String columnName) { return functions.sqrt(var(dataFrame, columnName)); }
[ "public", "static", "Column", "std", "(", "DataRowsFacade", "dataFrame", ",", "String", "columnName", ")", "{", "return", "functions", ".", "sqrt", "(", "var", "(", "dataFrame", ",", "columnName", ")", ")", ";", "}" ]
Standard deviation for a column @param dataFrame the dataframe to get the column from @param columnName the name of the column to get the standard deviation for @return the column that represents the standard deviation
[ "Standard", "deviation", "for", "a", "column" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/DataFrames.java#L74-L76
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/DateGenerator.java
DateGenerator.doFormatCookieDate
public void doFormatCookieDate(StringBuilder buf, long date) { """ Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookies @param buf the buffer to format the date into @param date the date in milliseconds """ gc.setTimeInMillis(date); int day_of_week = gc.get(Calendar.DAY_OF_WEEK); in...
java
public void doFormatCookieDate(StringBuilder buf, long date) { gc.setTimeInMillis(date); int day_of_week = gc.get(Calendar.DAY_OF_WEEK); int day_of_month = gc.get(Calendar.DAY_OF_MONTH); int month = gc.get(Calendar.MONTH); int year = gc.get(Calendar.YEAR); year = year % ...
[ "public", "void", "doFormatCookieDate", "(", "StringBuilder", "buf", ",", "long", "date", ")", "{", "gc", ".", "setTimeInMillis", "(", "date", ")", ";", "int", "day_of_week", "=", "gc", ".", "get", "(", "Calendar", ".", "DAY_OF_WEEK", ")", ";", "int", "d...
Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookies @param buf the buffer to format the date into @param date the date in milliseconds
[ "Format", "EEE", "dd", "-", "MMM", "-", "yy", "HH", ":", "mm", ":", "ss", "GMT", "for", "cookies" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/DateGenerator.java#L115-L148
vtatai/srec
core/src/main/java/com/github/srec/command/method/MethodCommand.java
MethodCommand.callMethod
public Value callMethod(ExecutionContext context, Map<String, Value> params) { """ Executes the method call. @param context The execution context @param params The parameters to run the method @return The return value from the method call """ validateParameters(params); fillDefaultValues(p...
java
public Value callMethod(ExecutionContext context, Map<String, Value> params) { validateParameters(params); fillDefaultValues(params); return internalCallMethod(context, params); }
[ "public", "Value", "callMethod", "(", "ExecutionContext", "context", ",", "Map", "<", "String", ",", "Value", ">", "params", ")", "{", "validateParameters", "(", "params", ")", ";", "fillDefaultValues", "(", "params", ")", ";", "return", "internalCallMethod", ...
Executes the method call. @param context The execution context @param params The parameters to run the method @return The return value from the method call
[ "Executes", "the", "method", "call", "." ]
train
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/method/MethodCommand.java#L77-L81
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandNodes
private void expandNodes(DeLiCluTree index, SpatialPrimitiveDistanceFunction<V> distFunction, SpatialObjectPair nodePair, DataStore<KNNList> knns) { """ Expands the spatial nodes of the specified pair. @param index the index storing the objects @param distFunction the spatial distance function of this algorith...
java
private void expandNodes(DeLiCluTree index, SpatialPrimitiveDistanceFunction<V> distFunction, SpatialObjectPair nodePair, DataStore<KNNList> knns) { DeLiCluNode node1 = index.getNode(((SpatialDirectoryEntry) nodePair.entry1).getPageID()); DeLiCluNode node2 = index.getNode(((SpatialDirectoryEntry) nodePair.entry...
[ "private", "void", "expandNodes", "(", "DeLiCluTree", "index", ",", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "SpatialObjectPair", "nodePair", ",", "DataStore", "<", "KNNList", ">", "knns", ")", "{", "DeLiCluNode", "node1", "=", "inde...
Expands the spatial nodes of the specified pair. @param index the index storing the objects @param distFunction the spatial distance function of this algorithm @param nodePair the pair of nodes to be expanded @param knns the knn list
[ "Expands", "the", "spatial", "nodes", "of", "the", "specified", "pair", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L209-L221
samskivert/pythagoras
src/main/java/pythagoras/f/Line.java
Line.setLine
public void setLine (float x1, float y1, float x2, float y2) { """ Sets the start and end point of this line to the specified values. """ this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; }
java
public void setLine (float x1, float y1, float x2, float y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; }
[ "public", "void", "setLine", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ")", "{", "this", ".", "x1", "=", "x1", ";", "this", ".", "y1", "=", "y1", ";", "this", ".", "x2", "=", "x2", ";", "this", ".", "y2",...
Sets the start and end point of this line to the specified values.
[ "Sets", "the", "start", "and", "end", "point", "of", "this", "line", "to", "the", "specified", "values", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Line.java#L51-L56
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TerminalTextUtils.java
TerminalTextUtils.getANSIControlSequenceLength
public static int getANSIControlSequenceLength(String string, int index) { """ Given a string and an index in that string, returns the number of characters starting at index that make up a complete ANSI control sequence. If there is no control sequence starting there, the method will return 0. @param string Stri...
java
public static int getANSIControlSequenceLength(String string, int index) { int len = 0, restlen = string.length() - index; if (restlen >= 3) { // Control sequences require a minimum of three characters char esc = string.charAt(index), bracket = string.charAt(index+1); ...
[ "public", "static", "int", "getANSIControlSequenceLength", "(", "String", "string", ",", "int", "index", ")", "{", "int", "len", "=", "0", ",", "restlen", "=", "string", ".", "length", "(", ")", "-", "index", ";", "if", "(", "restlen", ">=", "3", ")", ...
Given a string and an index in that string, returns the number of characters starting at index that make up a complete ANSI control sequence. If there is no control sequence starting there, the method will return 0. @param string String to scan for control sequences @param index Index in the string where the control se...
[ "Given", "a", "string", "and", "an", "index", "in", "that", "string", "returns", "the", "number", "of", "characters", "starting", "at", "index", "that", "make", "up", "a", "complete", "ANSI", "control", "sequence", ".", "If", "there", "is", "no", "control"...
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TerminalTextUtils.java#L64-L88
joniles/mpxj
src/main/java/net/sf/mpxj/utility/TimephasedUtility.java
TimephasedUtility.getRangeCost
private Double getRangeCost(ProjectCalendar projectCalendar, TimescaleUnits rangeUnits, DateRange range, List<TimephasedCost> assignments, int startIndex) { """ For a given date range, determine the cost, based on the timephased resource assignment data. @param projectCalendar calendar used for the resource as...
java
private Double getRangeCost(ProjectCalendar projectCalendar, TimescaleUnits rangeUnits, DateRange range, List<TimephasedCost> assignments, int startIndex) { Double result; switch (rangeUnits) { case MINUTES: case HOURS: { result = getRangeCostSubDay(projectCa...
[ "private", "Double", "getRangeCost", "(", "ProjectCalendar", "projectCalendar", ",", "TimescaleUnits", "rangeUnits", ",", "DateRange", "range", ",", "List", "<", "TimephasedCost", ">", "assignments", ",", "int", "startIndex", ")", "{", "Double", "result", ";", "sw...
For a given date range, determine the cost, based on the timephased resource assignment data. @param projectCalendar calendar used for the resource assignment calendar @param rangeUnits timescale units @param range target date range @param assignments timephased resource assignments @param startIndex index at which to...
[ "For", "a", "given", "date", "range", "determine", "the", "cost", "based", "on", "the", "timephased", "resource", "assignment", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/utility/TimephasedUtility.java#L396-L417
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_dynHost_login_login_GET
public OvhDynHostLogin zone_zoneName_dynHost_login_login_GET(String zoneName, String login) throws IOException { """ Get this object properties REST: GET /domain/zone/{zoneName}/dynHost/login/{login} @param zoneName [required] The internal name of your zone @param login [required] Login """ String qPath...
java
public OvhDynHostLogin zone_zoneName_dynHost_login_login_GET(String zoneName, String login) throws IOException { String qPath = "/domain/zone/{zoneName}/dynHost/login/{login}"; StringBuilder sb = path(qPath, zoneName, login); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhDynHo...
[ "public", "OvhDynHostLogin", "zone_zoneName_dynHost_login_login_GET", "(", "String", "zoneName", ",", "String", "login", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/dynHost/login/{login}\"", ";", "StringBuilder", "sb", "=", "path", ...
Get this object properties REST: GET /domain/zone/{zoneName}/dynHost/login/{login} @param zoneName [required] The internal name of your zone @param login [required] Login
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L438-L443
graphql-java/graphql-java
src/main/java/graphql/schema/diff/DiffSet.java
DiffSet.diffSet
public static DiffSet diffSet(GraphQLSchema schemaOld, GraphQLSchema schemaNew) { """ Creates a diff set out of the result of 2 schemas. @param schemaOld the older schema @param schemaNew the newer schema @return a diff set representing them """ Map<String, Object> introspectionOld = introspect(...
java
public static DiffSet diffSet(GraphQLSchema schemaOld, GraphQLSchema schemaNew) { Map<String, Object> introspectionOld = introspect(schemaOld); Map<String, Object> introspectionNew = introspect(schemaNew); return diffSet(introspectionOld, introspectionNew); }
[ "public", "static", "DiffSet", "diffSet", "(", "GraphQLSchema", "schemaOld", ",", "GraphQLSchema", "schemaNew", ")", "{", "Map", "<", "String", ",", "Object", ">", "introspectionOld", "=", "introspect", "(", "schemaOld", ")", ";", "Map", "<", "String", ",", ...
Creates a diff set out of the result of 2 schemas. @param schemaOld the older schema @param schemaNew the newer schema @return a diff set representing them
[ "Creates", "a", "diff", "set", "out", "of", "the", "result", "of", "2", "schemas", "." ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/schema/diff/DiffSet.java#L63-L67
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java
ZoomableGraphicsContext.quadraticCurveTo
public void quadraticCurveTo(double xc, double yc, double x1, double y1) { """ Adds segments to the current path to make a quadratic Bezier curve. The coordinates are transformed by the current transform as they are added to the path and unaffected by subsequent changes to the transform. The current path is a p...
java
public void quadraticCurveTo(double xc, double yc, double x1, double y1) { this.gc.quadraticCurveTo( doc2fxX(xc), doc2fxY(yc), doc2fxX(x1), doc2fxY(y1)); }
[ "public", "void", "quadraticCurveTo", "(", "double", "xc", ",", "double", "yc", ",", "double", "x1", ",", "double", "y1", ")", "{", "this", ".", "gc", ".", "quadraticCurveTo", "(", "doc2fxX", "(", "xc", ")", ",", "doc2fxY", "(", "yc", ")", ",", "doc2...
Adds segments to the current path to make a quadratic Bezier curve. The coordinates are transformed by the current transform as they are added to the path and unaffected by subsequent changes to the transform. The current path is a path attribute used for any of the path methods as specified in the Rendering Attributes...
[ "Adds", "segments", "to", "the", "current", "path", "to", "make", "a", "quadratic", "Bezier", "curve", ".", "The", "coordinates", "are", "transformed", "by", "the", "current", "transform", "as", "they", "are", "added", "to", "the", "path", "and", "unaffected...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomableGraphicsContext.java#L1248-L1252
rainerhahnekamp/sneakythrow
src/main/java/com/rainerhahnekamp/sneakythrow/Sneaky.java
Sneaky.sneak
public static <T, E extends Exception> T sneak(SneakySupplier<T, E> supplier) { """ returns a value from a lambda (Supplier) that can potentially throw an exception. @param supplier Supplier that can throw an exception @param <T> type of supplier's return value @return a Supplier as defined in java.util.funct...
java
public static <T, E extends Exception> T sneak(SneakySupplier<T, E> supplier) { return sneaked(supplier).get(); }
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "T", "sneak", "(", "SneakySupplier", "<", "T", ",", "E", ">", "supplier", ")", "{", "return", "sneaked", "(", "supplier", ")", ".", "get", "(", ")", ";", "}" ]
returns a value from a lambda (Supplier) that can potentially throw an exception. @param supplier Supplier that can throw an exception @param <T> type of supplier's return value @return a Supplier as defined in java.util.function
[ "returns", "a", "value", "from", "a", "lambda", "(", "Supplier", ")", "that", "can", "potentially", "throw", "an", "exception", "." ]
train
https://github.com/rainerhahnekamp/sneakythrow/blob/789eb3c8df4287742f88548f1569654ff2b38390/src/main/java/com/rainerhahnekamp/sneakythrow/Sneaky.java#L83-L85
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optSize
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Size optSize(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional {@link android.util.Size} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.Size}. The bundle argument is all...
java
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static Size optSize(@Nullable Bundle bundle, @Nullable String key) { return optSize(bundle, key, null); }
[ "@", "Nullable", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "public", "static", "Size", "optSize", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optSize", "(", "bundle...
Returns a optional {@link android.util.Size} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.Size}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will return ...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L871-L875
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/face/AipFace.java
AipFace.videoFaceliveness
public JSONObject videoFaceliveness(String sessionId, String video, HashMap<String, String> options) { """ 视频活体检测接口接口 @param sessionId - 语音校验码会话id,使用此接口的前提是已经调用了语音校验码接口 @param video - 本地图片路径 @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject """ try { ...
java
public JSONObject videoFaceliveness(String sessionId, String video, HashMap<String, String> options) { try { byte[] data = Util.readFileByBytes(video); return videoFaceliveness(sessionId, data, options); } catch (IOException e) { e.printStackTrace(); retur...
[ "public", "JSONObject", "videoFaceliveness", "(", "String", "sessionId", ",", "String", "video", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "try", "{", "byte", "[", "]", "data", "=", "Util", ".", "readFileByBytes", "(", "video"...
视频活体检测接口接口 @param sessionId - 语音校验码会话id,使用此接口的前提是已经调用了语音校验码接口 @param video - 本地图片路径 @param options - 可选参数对象,key: value都为string类型 options - options列表: @return JSONObject
[ "视频活体检测接口接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/face/AipFace.java#L466-L474
orhanobut/dialogplus
dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlus.java
DialogPlus.onAttached
private void onAttached(View view) { """ It is called when the show() method is called @param view is the dialog plus view """ decorView.addView(view); contentContainer.startAnimation(inAnim); contentContainer.requestFocus(); holder.setOnKeyListener(new View.OnKeyListener() { @Overrid...
java
private void onAttached(View view) { decorView.addView(view); contentContainer.startAnimation(inAnim); contentContainer.requestFocus(); holder.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { switch (event.getAction()) { ...
[ "private", "void", "onAttached", "(", "View", "view", ")", "{", "decorView", ".", "addView", "(", "view", ")", ";", "contentContainer", ".", "startAnimation", "(", "inAnim", ")", ";", "contentContainer", ".", "requestFocus", "(", ")", ";", "holder", ".", "...
It is called when the show() method is called @param view is the dialog plus view
[ "It", "is", "called", "when", "the", "show", "()", "method", "is", "called" ]
train
https://github.com/orhanobut/dialogplus/blob/291bf4daaa3c81bf5537125f547913beb8ee2c17/dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlus.java#L343-L368
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
BridgeMethodResolver.isBridgedCandidateFor
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) { """ Returns {@code true} if the supplied '{@code candidateMethod}' can be consider a validate candidate for the {@link Method} that is {@link Method#isBridge() bridged} by the supplied {@link Method bridge Method}. This m...
java
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) { return (!candidateMethod.isBridge() && !candidateMethod.equals(bridgeMethod) && candidateMethod.getName().equals(bridgeMethod.getName()) && candidateMethod.getParameterTypes().length == bridgeMethod.getParameterTypes()...
[ "private", "static", "boolean", "isBridgedCandidateFor", "(", "Method", "candidateMethod", ",", "Method", "bridgeMethod", ")", "{", "return", "(", "!", "candidateMethod", ".", "isBridge", "(", ")", "&&", "!", "candidateMethod", ".", "equals", "(", "bridgeMethod", ...
Returns {@code true} if the supplied '{@code candidateMethod}' can be consider a validate candidate for the {@link Method} that is {@link Method#isBridge() bridged} by the supplied {@link Method bridge Method}. This method performs inexpensive checks and can be used quickly filter for a set of possible matches.
[ "Returns", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java#L121-L125
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/util/DocumentationHelper.java
DocumentationHelper.prettyprint
private void prettyprint(String xmlLogsFile, FileOutputStream htmlReportFile) throws Exception { """ Apply xslt stylesheet to xml logs file and crate an HTML report file. @param xmlLogsFile @param htmlReportFile """ TransformerFactory tFactory = TransformerFactory.newInstance(); ...
java
private void prettyprint(String xmlLogsFile, FileOutputStream htmlReportFile) throws Exception { TransformerFactory tFactory = TransformerFactory.newInstance(); // Fortify Mod: prevent external entity injection tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); ...
[ "private", "void", "prettyprint", "(", "String", "xmlLogsFile", ",", "FileOutputStream", "htmlReportFile", ")", "throws", "Exception", "{", "TransformerFactory", "tFactory", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "// Fortify Mod: prevent external en...
Apply xslt stylesheet to xml logs file and crate an HTML report file. @param xmlLogsFile @param htmlReportFile
[ "Apply", "xslt", "stylesheet", "to", "xml", "logs", "file", "and", "crate", "an", "HTML", "report", "file", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/util/DocumentationHelper.java#L92-L108
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/Parameterized.java
Parameterized.setParameters
protected final void setParameters(Map<String, String> parameters) { """ Sets the parameters with name-value pairs from the supplied Map. This is protected because it is intended to only be called by subclasses where super(Map m) is not possible to call at the start of the constructor. Server.java:Server(URL) i...
java
protected final void setParameters(Map<String, String> parameters) { if (parameters == null) { m_parameters.clear(); } else { m_parameters.clear(); Parameter p; for (String key:parameters.keySet()) { p = new Parameter(key); ...
[ "protected", "final", "void", "setParameters", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "if", "(", "parameters", "==", "null", ")", "{", "m_parameters", ".", "clear", "(", ")", ";", "}", "else", "{", "m_parameters", ".", "...
Sets the parameters with name-value pairs from the supplied Map. This is protected because it is intended to only be called by subclasses where super(Map m) is not possible to call at the start of the constructor. Server.java:Server(URL) is an example of this. @param parameters The map from which to derive the name-va...
[ "Sets", "the", "parameters", "with", "name", "-", "value", "pairs", "from", "the", "supplied", "Map", ".", "This", "is", "protected", "because", "it", "is", "intended", "to", "only", "be", "called", "by", "subclasses", "where", "super", "(", "Map", "m", ...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/Parameterized.java#L62-L75
rhuss/jolokia
agent/core/src/main/java/org/jolokia/restrictor/policy/MBeanPolicyConfig.java
MBeanPolicyConfig.addValues
void addValues(ObjectName pOName, Set<String> pReadAttributes, Set<String> pWriteAttributes, Set<String> pOperations) { """ Add for a given MBean a set of read/write attributes and operations @param pOName MBean name (which should not be pattern) @param pReadAttributes read attributes @param pWriteAttributes ...
java
void addValues(ObjectName pOName, Set<String> pReadAttributes, Set<String> pWriteAttributes, Set<String> pOperations) { readAttributes.put(pOName,pReadAttributes); writeAttributes.put(pOName,pWriteAttributes); operations.put(pOName,pOperations); if (pOName.isPattern()) { addP...
[ "void", "addValues", "(", "ObjectName", "pOName", ",", "Set", "<", "String", ">", "pReadAttributes", ",", "Set", "<", "String", ">", "pWriteAttributes", ",", "Set", "<", "String", ">", "pOperations", ")", "{", "readAttributes", ".", "put", "(", "pOName", "...
Add for a given MBean a set of read/write attributes and operations @param pOName MBean name (which should not be pattern) @param pReadAttributes read attributes @param pWriteAttributes write attributes @param pOperations operations
[ "Add", "for", "a", "given", "MBean", "a", "set", "of", "read", "/", "write", "attributes", "and", "operations" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/restrictor/policy/MBeanPolicyConfig.java#L57-L64
cdk/cdk
base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java
CDKAtomTypeMatcher.countAttachedBonds
private int countAttachedBonds(List<IBond> connectedBonds, IAtom atom, IBond.Order order, String symbol) { """ Count the number of doubly bonded atoms. @param connectedBonds bonds connected to the atom @param atom the atom being looked at @param order the desired bond order of the attached bonds @param symbo...
java
private int countAttachedBonds(List<IBond> connectedBonds, IAtom atom, IBond.Order order, String symbol) { // count the number of double bonded oxygens int neighborcount = connectedBonds.size(); int doubleBondedAtoms = 0; for (int i = neighborcount - 1; i >= 0; i--) { IBond b...
[ "private", "int", "countAttachedBonds", "(", "List", "<", "IBond", ">", "connectedBonds", ",", "IAtom", "atom", ",", "IBond", ".", "Order", "order", ",", "String", "symbol", ")", "{", "// count the number of double bonded oxygens", "int", "neighborcount", "=", "co...
Count the number of doubly bonded atoms. @param connectedBonds bonds connected to the atom @param atom the atom being looked at @param order the desired bond order of the attached bonds @param symbol If not null, then it only counts the double bonded atoms which match the given symbol. @return the number of doubly bon...
[ "Count", "the", "number", "of", "doubly", "bonded", "atoms", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java#L2451-L2471
milaboratory/milib
src/main/java/com/milaboratory/core/sequence/SequenceQuality.java
SequenceQuality.create
public static SequenceQuality create(QualityFormat format, byte[] data, int from, int length, boolean check) { """ Factory method for the SequenceQualityPhred object. It performs all necessary range checks if required. @param format format of encoded quality values @param data byte with encoded quality value...
java
public static SequenceQuality create(QualityFormat format, byte[] data, int from, int length, boolean check) { if (from + length >= data.length || from < 0 || length < 0) throw new IllegalArgumentException(); //For performance final byte valueOffset = format.getOffset(), ...
[ "public", "static", "SequenceQuality", "create", "(", "QualityFormat", "format", ",", "byte", "[", "]", "data", ",", "int", "from", ",", "int", "length", ",", "boolean", "check", ")", "{", "if", "(", "from", "+", "length", ">=", "data", ".", "length", ...
Factory method for the SequenceQualityPhred object. It performs all necessary range checks if required. @param format format of encoded quality values @param data byte with encoded quality values @param from starting position in {@code data} @param length number of bytes to parse @param check determines whether r...
[ "Factory", "method", "for", "the", "SequenceQualityPhred", "object", ".", "It", "performs", "all", "necessary", "range", "checks", "if", "required", "." ]
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L348-L365
OpenLiberty/open-liberty
dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java
LifecycleCallbackHelper.doPostConstruct
public void doPostConstruct(Object instance, List<LifecycleCallback> postConstructs) throws InjectionException { """ Processes the PostConstruct callback method for the login callback handler class @param instance the instance object of the login callback handler class @param postConstructs a list of PostConst...
java
public void doPostConstruct(Object instance, List<LifecycleCallback> postConstructs) throws InjectionException { doPostConstruct(instance.getClass(), postConstructs, instance); }
[ "public", "void", "doPostConstruct", "(", "Object", "instance", ",", "List", "<", "LifecycleCallback", ">", "postConstructs", ")", "throws", "InjectionException", "{", "doPostConstruct", "(", "instance", ".", "getClass", "(", ")", ",", "postConstructs", ",", "inst...
Processes the PostConstruct callback method for the login callback handler class @param instance the instance object of the login callback handler class @param postConstructs a list of PostConstruct metadata in the application client module @throws InjectionException
[ "Processes", "the", "PostConstruct", "callback", "method", "for", "the", "login", "callback", "handler", "class" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L60-L62
googlegenomics/utils-java
src/main/java/com/google/cloud/genomics/utils/grpc/ReadStreamIterator.java
ReadStreamIterator.enforceShardBoundary
public static ReadStreamIterator enforceShardBoundary(ManagedChannel channel, StreamReadsRequest request, Requirement shardBoundary, String fields) { """ Create a stream iterator that can enforce shard boundary semantics. @param channel The ManagedChannel. @param request The request for the shard of data...
java
public static ReadStreamIterator enforceShardBoundary(ManagedChannel channel, StreamReadsRequest request, Requirement shardBoundary, String fields) { Predicate<Read> shardPredicate = (ShardBoundary.Requirement.STRICT == shardBoundary) ? ShardBoundary .getStrictReadPredicate(request.getStar...
[ "public", "static", "ReadStreamIterator", "enforceShardBoundary", "(", "ManagedChannel", "channel", ",", "StreamReadsRequest", "request", ",", "Requirement", "shardBoundary", ",", "String", "fields", ")", "{", "Predicate", "<", "Read", ">", "shardPredicate", "=", "(",...
Create a stream iterator that can enforce shard boundary semantics. @param channel The ManagedChannel. @param request The request for the shard of data. @param shardBoundary The shard boundary semantics to enforce. @param fields Used to check whether the specified fields would meet the minimum required fields for the ...
[ "Create", "a", "stream", "iterator", "that", "can", "enforce", "shard", "boundary", "semantics", "." ]
train
https://github.com/googlegenomics/utils-java/blob/7205d5b4e4f61fc6b93acb4bdd76b93df5b5f612/src/main/java/com/google/cloud/genomics/utils/grpc/ReadStreamIterator.java#L70-L76
podio/podio-java
src/main/java/com/podio/tag/TagAPI.java
TagAPI.getTagsOnSpace
public List<TagCount> getTagsOnSpace(int spaceId, int limit, String text) { """ Returns the tags on the given space. This includes both items and statuses. The tags are ordered firstly by the number of uses, secondly by the tag text. @param spaceId The id of the space to return tags from @param limit limit...
java
public List<TagCount> getTagsOnSpace(int spaceId, int limit, String text) { MultivaluedMap<String, String> params=new MultivaluedMapImpl(); params.add("limit", new Integer(limit).toString()); if ((text != null) && (!text.isEmpty())) { params.add("text", text); } return getTagsOnSpace(spaceId, params); }
[ "public", "List", "<", "TagCount", ">", "getTagsOnSpace", "(", "int", "spaceId", ",", "int", "limit", ",", "String", "text", ")", "{", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "=", "new", "MultivaluedMapImpl", "(", ")", ";", "params",...
Returns the tags on the given space. This includes both items and statuses. The tags are ordered firstly by the number of uses, secondly by the tag text. @param spaceId The id of the space to return tags from @param limit limit on number of tags returned (max 250) @param text text of tag to search for @return The list...
[ "Returns", "the", "tags", "on", "the", "given", "space", ".", "This", "includes", "both", "items", "and", "statuses", ".", "The", "tags", "are", "ordered", "firstly", "by", "the", "number", "of", "uses", "secondly", "by", "the", "tag", "text", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/tag/TagAPI.java#L255-L262
albfernandez/itext2
src/main/java/com/lowagie/text/FontFactory.java
FontFactory.getFont
public static Font getFont(String fontname, String encoding, float size, int style, Color color) { """ Constructs a <CODE>Font</CODE>-object. @param fontname the name of the font @param encoding the encoding of the font @param size the size of this font @param style the style of this font @par...
java
public static Font getFont(String fontname, String encoding, float size, int style, Color color) { return getFont(fontname, encoding, defaultEmbedding, size, style, color); }
[ "public", "static", "Font", "getFont", "(", "String", "fontname", ",", "String", "encoding", ",", "float", "size", ",", "int", "style", ",", "Color", "color", ")", "{", "return", "getFont", "(", "fontname", ",", "encoding", ",", "defaultEmbedding", ",", "s...
Constructs a <CODE>Font</CODE>-object. @param fontname the name of the font @param encoding the encoding of the font @param size the size of this font @param style the style of this font @param color the <CODE>Color</CODE> of this font. @return the Font constructed based on the parameters
[ "Constructs", "a", "<CODE", ">", "Font<", "/", "CODE", ">", "-", "object", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/FontFactory.java#L225-L227
b3log/latke
latke-core/src/main/java/org/b3log/latke/repository/jdbc/util/JdbcUtil.java
JdbcUtil.executeSql
public static boolean executeSql(final String sql, final Connection connection, final boolean isDebug) throws SQLException { """ Executes the specified SQL with the specified connection. @param sql the specified SQL @param connection connection the specified connection @param isDebug the specified d...
java
public static boolean executeSql(final String sql, final Connection connection, final boolean isDebug) throws SQLException { if (isDebug || LOGGER.isTraceEnabled()) { LOGGER.log(Level.INFO, "Executing SQL [" + sql + "]"); } final Statement statement = connection.createStatement(); ...
[ "public", "static", "boolean", "executeSql", "(", "final", "String", "sql", ",", "final", "Connection", "connection", ",", "final", "boolean", "isDebug", ")", "throws", "SQLException", "{", "if", "(", "isDebug", "||", "LOGGER", ".", "isTraceEnabled", "(", ")",...
Executes the specified SQL with the specified connection. @param sql the specified SQL @param connection connection the specified connection @param isDebug the specified debug flag @return {@code true} if success, returns {@false} otherwise @throws SQLException SQLException
[ "Executes", "the", "specified", "SQL", "with", "the", "specified", "connection", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/repository/jdbc/util/JdbcUtil.java#L60-L70
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PrincipalUser.java
PrincipalUser.createDefaultUser
private static PrincipalUser createDefaultUser() { """ /* Method provided to be called using reflection to discretely create the admin user if needed. """ PrincipalUser result = new PrincipalUser("default", "default@default.com"); result.id = BigInteger.valueOf(2); result.setPrivileged...
java
private static PrincipalUser createDefaultUser() { PrincipalUser result = new PrincipalUser("default", "default@default.com"); result.id = BigInteger.valueOf(2); result.setPrivileged(false); return result; }
[ "private", "static", "PrincipalUser", "createDefaultUser", "(", ")", "{", "PrincipalUser", "result", "=", "new", "PrincipalUser", "(", "\"default\"", ",", "\"default@default.com\"", ")", ";", "result", ".", "id", "=", "BigInteger", ".", "valueOf", "(", "2", ")",...
/* Method provided to be called using reflection to discretely create the admin user if needed.
[ "/", "*", "Method", "provided", "to", "be", "called", "using", "reflection", "to", "discretely", "create", "the", "admin", "user", "if", "needed", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PrincipalUser.java#L281-L287
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java
EJSHome.createRemoteBusinessObject
public Object createRemoteBusinessObject(String interfaceName, boolean useSupporting) throws RemoteException, CreateException, ClassNotFoundException, EJBConfigurationException { """ Returns an Object (wrapper) representing the specifi...
java
public Object createRemoteBusinessObject(String interfaceName, boolean useSupporting) throws RemoteException, CreateException, ClassNotFoundException, EJBConfigurationException { final boolean isTraceOn = TraceComponent.isAnyTr...
[ "public", "Object", "createRemoteBusinessObject", "(", "String", "interfaceName", ",", "boolean", "useSupporting", ")", "throws", "RemoteException", ",", "CreateException", ",", "ClassNotFoundException", ",", "EJBConfigurationException", "{", "final", "boolean", "isTraceOn"...
Returns an Object (wrapper) representing the specified EJB 3.0 Business Remote Interface, managed by this home. <p> This method provides a Business Object (wrapper) factory capability, for use during business interface injection or lookup. It is called directly for Stateless Session beans, or through the basic wrapper...
[ "Returns", "an", "Object", "(", "wrapper", ")", "representing", "the", "specified", "EJB", "3", ".", "0", "Business", "Remote", "Interface", "managed", "by", "this", "home", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java#L1611-L1650
codeprimate-software/cp-elements
src/main/java/org/cp/elements/tools/io/ListFiles.java
ListFiles.listFiles
public void listFiles(File directory, String indent) { """ Lists the contents of the given {@link File directory} displayed from the given {@link String indent}. @param directory {@link File} referring to the directory for which the contents will be listed. @param indent {@link String} containing the character...
java
public void listFiles(File directory, String indent) { directory = validateDirectory(directory); indent = Optional.ofNullable(indent).filter(StringUtils::hasText).orElse(StringUtils.EMPTY_STRING); printDirectoryName(indent, directory); String directoryContentIndent = buildDirectoryContentIndent(inden...
[ "public", "void", "listFiles", "(", "File", "directory", ",", "String", "indent", ")", "{", "directory", "=", "validateDirectory", "(", "directory", ")", ";", "indent", "=", "Optional", ".", "ofNullable", "(", "indent", ")", ".", "filter", "(", "StringUtils"...
Lists the contents of the given {@link File directory} displayed from the given {@link String indent}. @param directory {@link File} referring to the directory for which the contents will be listed. @param indent {@link String} containing the characters of the indent in which to begin the view of the directory hierarc...
[ "Lists", "the", "contents", "of", "the", "given", "{", "@link", "File", "directory", "}", "displayed", "from", "the", "given", "{", "@link", "String", "indent", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/tools/io/ListFiles.java#L158-L175
cryptomator/cryptolib
src/main/java/org/cryptomator/cryptolib/Cryptors.java
Cryptors.ciphertextSize
public static long ciphertextSize(long cleartextSize, Cryptor cryptor) { """ Calculates the size of the ciphertext resulting from the given cleartext encrypted with the given cryptor. @param cleartextSize Length of a unencrypted payload. @param cryptor The cryptor which defines the cleartext/ciphertext ratio ...
java
public static long ciphertextSize(long cleartextSize, Cryptor cryptor) { checkArgument(cleartextSize >= 0, "expected cleartextSize to be positive, but was %s", cleartextSize); long cleartextChunkSize = cryptor.fileContentCryptor().cleartextChunkSize(); long ciphertextChunkSize = cryptor.fileContentCryptor().ciphe...
[ "public", "static", "long", "ciphertextSize", "(", "long", "cleartextSize", ",", "Cryptor", "cryptor", ")", "{", "checkArgument", "(", "cleartextSize", ">=", "0", ",", "\"expected cleartextSize to be positive, but was %s\"", ",", "cleartextSize", ")", ";", "long", "cl...
Calculates the size of the ciphertext resulting from the given cleartext encrypted with the given cryptor. @param cleartextSize Length of a unencrypted payload. @param cryptor The cryptor which defines the cleartext/ciphertext ratio @return Ciphertext length of a <code>cleartextSize</code>-sized cleartext encrypted w...
[ "Calculates", "the", "size", "of", "the", "ciphertext", "resulting", "from", "the", "given", "cleartext", "encrypted", "with", "the", "given", "cryptor", "." ]
train
https://github.com/cryptomator/cryptolib/blob/33bc881f6ee7d4924043ea6309efd2c063ec3638/src/main/java/org/cryptomator/cryptolib/Cryptors.java#L65-L75
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_redirection_POST
public OvhTaskSpecialAccount domain_redirection_POST(String domain, String from, Boolean localCopy, String to) throws IOException { """ Create new redirection in server REST: POST /email/domain/{domain}/redirection @param from [required] Name of redirection @param localCopy [required] If true keep a local cop...
java
public OvhTaskSpecialAccount domain_redirection_POST(String domain, String from, Boolean localCopy, String to) throws IOException { String qPath = "/email/domain/{domain}/redirection"; StringBuilder sb = path(qPath, domain); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "from", from); a...
[ "public", "OvhTaskSpecialAccount", "domain_redirection_POST", "(", "String", "domain", ",", "String", "from", ",", "Boolean", "localCopy", ",", "String", "to", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/redirection\"", ";", "S...
Create new redirection in server REST: POST /email/domain/{domain}/redirection @param from [required] Name of redirection @param localCopy [required] If true keep a local copy @param to [required] Target of account @param domain [required] Name of your domain name
[ "Create", "new", "redirection", "in", "server" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1071-L1080
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.missingRequired
public static XMLStreamException missingRequired(final XMLExtendedStreamReader reader, final Set<?> required) { """ Get an exception reporting a missing, required XML attribute. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return the exception...
java
public static XMLStreamException missingRequired(final XMLExtendedStreamReader reader, final Set<?> required) { Set<String> set = new HashSet<>(); for (Object o : required) { String toString = o.toString(); set.add(toString); } return wrapMissingRequiredAttribute(...
[ "public", "static", "XMLStreamException", "missingRequired", "(", "final", "XMLExtendedStreamReader", "reader", ",", "final", "Set", "<", "?", ">", "required", ")", "{", "Set", "<", "String", ">", "set", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "...
Get an exception reporting a missing, required XML attribute. @param reader the stream reader @param required a set of enums whose toString method returns the attribute name @return the exception
[ "Get", "an", "exception", "reporting", "a", "missing", "required", "XML", "attribute", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L206-L216
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
PackageSummaryBuilder.buildErrorSummary
public void buildErrorSummary(XMLNode node, Content summaryContentTree) { """ Build the summary for the errors in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the error summary will be added """ String err...
java
public void buildErrorSummary(XMLNode node, Content summaryContentTree) { String errorTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Error_Summary"), configuration.getText("doclet.errors")); String[] error...
[ "public", "void", "buildErrorSummary", "(", "XMLNode", "node", ",", "Content", "summaryContentTree", ")", "{", "String", "errorTableSummary", "=", "configuration", ".", "getText", "(", "\"doclet.Member_Table_Summary\"", ",", "configuration", ".", "getText", "(", "\"do...
Build the summary for the errors in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the error summary will be added
[ "Build", "the", "summary", "for", "the", "errors", "in", "this", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java#L284-L305
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/command/MySQLCommandExecutorFactory.java
MySQLCommandExecutorFactory.newInstance
public static CommandExecutor newInstance(final MySQLCommandPacketType commandPacketType, final CommandPacket commandPacket, final BackendConnection backendConnection) { """ Create new instance of packet executor. @param commandPacketType command packet type for MySQL @param commandPacket command packet for My...
java
public static CommandExecutor newInstance(final MySQLCommandPacketType commandPacketType, final CommandPacket commandPacket, final BackendConnection backendConnection) { log.debug("Execute packet type: {}, value: {}", commandPacketType, commandPacket); switch (commandPacketType) { case COM_Q...
[ "public", "static", "CommandExecutor", "newInstance", "(", "final", "MySQLCommandPacketType", "commandPacketType", ",", "final", "CommandPacket", "commandPacket", ",", "final", "BackendConnection", "backendConnection", ")", "{", "log", ".", "debug", "(", "\"Execute packet...
Create new instance of packet executor. @param commandPacketType command packet type for MySQL @param commandPacket command packet for MySQL @param backendConnection backend connection @return command executor
[ "Create", "new", "instance", "of", "packet", "executor", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/command/MySQLCommandExecutorFactory.java#L60-L82
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResponseResult.java
GetIntegrationResponseResult.withResponseTemplates
public GetIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { """ <p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the ke...
java
public GetIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "GetIntegrationResponseResult", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value. </p> @param responseTemplates The collection of response templates for the integration r...
[ "<p", ">", "The", "collection", "of", "response", "templates", "for", "the", "integration", "response", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", ".", "Response", "templates", "are", "represented", "as", "a",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResponseResult.java#L448-L451
johncarl81/transfuse
transfuse/src/main/java/org/androidtransfuse/analysis/module/ModuleTransactionWorker.java
ModuleTransactionWorker.createConfigurationsForModuleType
private void createConfigurationsForModuleType(ImmutableList.Builder<ModuleConfiguration> configurations, ASTType module, ASTType scanTarget, Set<MethodSignature> scanned, Map<String, Set<MethodSignature>> packagePrivateScanned) { """ Recursive method that finds module methods and annotations on all parents of mod...
java
private void createConfigurationsForModuleType(ImmutableList.Builder<ModuleConfiguration> configurations, ASTType module, ASTType scanTarget, Set<MethodSignature> scanned, Map<String, Set<MethodSignature>> packagePrivateScanned) { configureModuleAnnotations(configurations, module, scanTarget, scanTarget.getAnn...
[ "private", "void", "createConfigurationsForModuleType", "(", "ImmutableList", ".", "Builder", "<", "ModuleConfiguration", ">", "configurations", ",", "ASTType", "module", ",", "ASTType", "scanTarget", ",", "Set", "<", "MethodSignature", ">", "scanned", ",", "Map", "...
Recursive method that finds module methods and annotations on all parents of moduleAncestor and moduleAncestor, but creates configuration based on the module. This allows any class in the module hierarchy to contribute annotations or providers that can be overridden by subclasses. @param configurations the holder for ...
[ "Recursive", "method", "that", "finds", "module", "methods", "and", "annotations", "on", "all", "parents", "of", "moduleAncestor", "and", "moduleAncestor", "but", "creates", "configuration", "based", "on", "the", "module", ".", "This", "allows", "any", "class", ...
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse/src/main/java/org/androidtransfuse/analysis/module/ModuleTransactionWorker.java#L124-L148
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/value/ValueStoragePlugin.java
ValueStoragePlugin.createURL
public URL createURL(String resourceId) throws MalformedURLException { """ Creates an {@link URL} corresponding to the given resource within the context of the current {@link ValueStoragePlugin} @param resourceId the id of the resource for which we want the corresponding URL @return the URL corresponding to the...
java
public URL createURL(String resourceId) throws MalformedURLException { StringBuilder url = new StringBuilder(64); url.append(ValueStorageURLStreamHandler.PROTOCOL); url.append(":/"); url.append(repository); url.append('/'); url.append(workspace); url.append('/'); url.a...
[ "public", "URL", "createURL", "(", "String", "resourceId", ")", "throws", "MalformedURLException", "{", "StringBuilder", "url", "=", "new", "StringBuilder", "(", "64", ")", ";", "url", ".", "append", "(", "ValueStorageURLStreamHandler", ".", "PROTOCOL", ")", ";"...
Creates an {@link URL} corresponding to the given resource within the context of the current {@link ValueStoragePlugin} @param resourceId the id of the resource for which we want the corresponding URL @return the URL corresponding to the given resource id @throws MalformedURLException if the URL was not properly formed
[ "Creates", "an", "{" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/storage/value/ValueStoragePlugin.java#L195-L208
micronaut-projects/micronaut-core
tracing/src/main/java/io/micronaut/tracing/instrument/http/AbstractOpenTracingFilter.java
AbstractOpenTracingFilter.setErrorTags
protected void setErrorTags(Span span, Throwable error) { """ Sets the error tags to use on the span. @param span The span @param error The error """ if (error != null) { String message = error.getMessage(); if (message == null) { message = error.getClass().g...
java
protected void setErrorTags(Span span, Throwable error) { if (error != null) { String message = error.getMessage(); if (message == null) { message = error.getClass().getSimpleName(); } span.setTag(TAG_ERROR, message); } }
[ "protected", "void", "setErrorTags", "(", "Span", "span", ",", "Throwable", "error", ")", "{", "if", "(", "error", "!=", "null", ")", "{", "String", "message", "=", "error", ".", "getMessage", "(", ")", ";", "if", "(", "message", "==", "null", ")", "...
Sets the error tags to use on the span. @param span The span @param error The error
[ "Sets", "the", "error", "tags", "to", "use", "on", "the", "span", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/tracing/src/main/java/io/micronaut/tracing/instrument/http/AbstractOpenTracingFilter.java#L80-L88
tango-controls/JTango
client/src/main/java/org/tango/client/database/Database.java
Database.setClassProperties
@Override public void setClassProperties(final String name, final Map<String, String[]> properties) throws DevFailed { """ Set a tango class properties. (execute DbPutClassProperty on DB device) @param name The class name @param properties The properties names and values. @throws DevFailed """ ...
java
@Override public void setClassProperties(final String name, final Map<String, String[]> properties) throws DevFailed { cache.setClassProperties(name, properties); }
[ "@", "Override", "public", "void", "setClassProperties", "(", "final", "String", "name", ",", "final", "Map", "<", "String", ",", "String", "[", "]", ">", "properties", ")", "throws", "DevFailed", "{", "cache", ".", "setClassProperties", "(", "name", ",", ...
Set a tango class properties. (execute DbPutClassProperty on DB device) @param name The class name @param properties The properties names and values. @throws DevFailed
[ "Set", "a", "tango", "class", "properties", ".", "(", "execute", "DbPutClassProperty", "on", "DB", "device", ")" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/org/tango/client/database/Database.java#L173-L176
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.setMilliseconds
public static Date setMilliseconds(final Date date, final int amount) { """ Sets the milliseconds field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws Il...
java
public static Date setMilliseconds(final Date date, final int amount) { return set(date, Calendar.MILLISECOND, amount); }
[ "public", "static", "Date", "setMilliseconds", "(", "final", "Date", "date", ",", "final", "int", "amount", ")", "{", "return", "set", "(", "date", ",", "Calendar", ".", "MILLISECOND", ",", "amount", ")", ";", "}" ]
Sets the milliseconds field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumentException if the date is null @since 2.4
[ "Sets", "the", "milliseconds", "field", "to", "a", "date", "returning", "a", "new", "object", ".", "The", "original", "{", "@code", "Date", "}", "is", "unchanged", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L631-L633
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/api/RepositoryServiceV1.java
RepositoryServiceV1.patchRepository
@Consumes("application/json-patch+json") @Patch("/projects/ { """ PATCH /projects/{projectName}/repos/{repoName} <p>Patches a repository with the JSON_PATCH. Currently, only unremove repository operation is supported. """projectName}/repos/{repoName}") @RequiresRole(roles = ProjectRole.OWNER) pu...
java
@Consumes("application/json-patch+json") @Patch("/projects/{projectName}/repos/{repoName}") @RequiresRole(roles = ProjectRole.OWNER) public CompletableFuture<RepositoryDto> patchRepository(@Param("repoName") String repoName, Project project, ...
[ "@", "Consumes", "(", "\"application/json-patch+json\"", ")", "@", "Patch", "(", "\"/projects/{projectName}/repos/{repoName}\"", ")", "@", "RequiresRole", "(", "roles", "=", "ProjectRole", ".", "OWNER", ")", "public", "CompletableFuture", "<", "RepositoryDto", ">", "p...
PATCH /projects/{projectName}/repos/{repoName} <p>Patches a repository with the JSON_PATCH. Currently, only unremove repository operation is supported.
[ "PATCH", "/", "projects", "/", "{", "projectName", "}", "/", "repos", "/", "{", "repoName", "}" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/RepositoryServiceV1.java#L149-L160
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java
CommsByteBuffer.getXid
public synchronized Xid getXid() { """ Reads an Xid from the current position in the buffer. @return Returns an Xid """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getXid"); checkReleased(); int formatId = getInt(); int glidLength = getInt(); ...
java
public synchronized Xid getXid() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getXid"); checkReleased(); int formatId = getInt(); int glidLength = getInt(); byte[] globalTransactionId = get(glidLength); int blqfLength = getInt(); byte...
[ "public", "synchronized", "Xid", "getXid", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"getXid\"", ")", ";", "checkReleased", ...
Reads an Xid from the current position in the buffer. @return Returns an Xid
[ "Reads", "an", "Xid", "from", "the", "current", "position", "in", "the", "buffer", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java#L917-L933
wealthfront/kawala
kawala-converters/src/main/java/com/kaching/platform/converters/ConstructorAnalysis.java
ConstructorAnalysis.analyse
static AnalysisResult analyse( Class<?> klass, Constructor<?> constructor) throws IOException { """ Produces an assignment or field names to values or fails. @throws IllegalConstructorException """ Class<?>[] parameterTypes = constructor.getParameterTypes(); InputStream in = klass.getResourceAsS...
java
static AnalysisResult analyse( Class<?> klass, Constructor<?> constructor) throws IOException { Class<?>[] parameterTypes = constructor.getParameterTypes(); InputStream in = klass.getResourceAsStream("/" + klass.getName().replace('.', '/') + ".class"); if (in == null) { throw new IllegalArgument...
[ "static", "AnalysisResult", "analyse", "(", "Class", "<", "?", ">", "klass", ",", "Constructor", "<", "?", ">", "constructor", ")", "throws", "IOException", "{", "Class", "<", "?", ">", "[", "]", "parameterTypes", "=", "constructor", ".", "getParameterTypes"...
Produces an assignment or field names to values or fails. @throws IllegalConstructorException
[ "Produces", "an", "assignment", "or", "field", "names", "to", "values", "or", "fails", "." ]
train
https://github.com/wealthfront/kawala/blob/acf24b7a9ef6e2f0fc1e862d44cfa4dcc4da8f6e/kawala-converters/src/main/java/com/kaching/platform/converters/ConstructorAnalysis.java#L61-L71
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/FieldMap.java
FieldMap.getFieldData
protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Var2Data varData) { """ Retrieve a single field value. @param id parent entity ID @param type field type @param fixedData fixed data block @param varData var data block @return field value """ Object result = null; ...
java
protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Var2Data varData) { Object result = null; FieldItem item = m_map.get(type); if (item != null) { result = item.read(id, fixedData, varData); } return result; }
[ "protected", "Object", "getFieldData", "(", "Integer", "id", ",", "FieldType", "type", ",", "byte", "[", "]", "[", "]", "fixedData", ",", "Var2Data", "varData", ")", "{", "Object", "result", "=", "null", ";", "FieldItem", "item", "=", "m_map", ".", "get"...
Retrieve a single field value. @param id parent entity ID @param type field type @param fixedData fixed data block @param varData var data block @return field value
[ "Retrieve", "a", "single", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/FieldMap.java#L542-L553
apache/spark
core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java
TaskMemoryManager.encodePageNumberAndOffset
public long encodePageNumberAndOffset(MemoryBlock page, long offsetInPage) { """ Given a memory page and offset within that page, encode this address into a 64-bit long. This address will remain valid as long as the corresponding page has not been freed. @param page a data page allocated by {@link TaskMemoryMa...
java
public long encodePageNumberAndOffset(MemoryBlock page, long offsetInPage) { if (tungstenMemoryMode == MemoryMode.OFF_HEAP) { // In off-heap mode, an offset is an absolute address that may require a full 64 bits to // encode. Due to our page size limitation, though, we can convert this into an offset th...
[ "public", "long", "encodePageNumberAndOffset", "(", "MemoryBlock", "page", ",", "long", "offsetInPage", ")", "{", "if", "(", "tungstenMemoryMode", "==", "MemoryMode", ".", "OFF_HEAP", ")", "{", "// In off-heap mode, an offset is an absolute address that may require a full 64 ...
Given a memory page and offset within that page, encode this address into a 64-bit long. This address will remain valid as long as the corresponding page has not been freed. @param page a data page allocated by {@link TaskMemoryManager#allocatePage}/ @param offsetInPage an offset in this page which incorporates the ba...
[ "Given", "a", "memory", "page", "and", "offset", "within", "that", "page", "encode", "this", "address", "into", "a", "64", "-", "bit", "long", ".", "This", "address", "will", "remain", "valid", "as", "long", "as", "the", "corresponding", "page", "has", "...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java#L363-L371
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 JSMethod aMethod) { """ Creates a static invocation statement. @param aType Type to use @param aMethod Method to invoke @return Never <code>null</code>. """ final JSInvocation aInvocation = new JSInvoc...
java
@Nonnull public JSInvocation staticInvoke (@Nullable final AbstractJSClass aType, @Nonnull final JSMethod aMethod) { final JSInvocation aInvocation = new JSInvocation (aType, aMethod); return addStatement (aInvocation); }
[ "@", "Nonnull", "public", "JSInvocation", "staticInvoke", "(", "@", "Nullable", "final", "AbstractJSClass", "aType", ",", "@", "Nonnull", "final", "JSMethod", "aMethod", ")", "{", "final", "JSInvocation", "aInvocation", "=", "new", "JSInvocation", "(", "aType", ...
Creates a static invocation statement. @param aType Type to use @param aMethod Method 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#L551-L556
JodaOrg/joda-time
src/main/java/org/joda/time/field/FieldUtils.java
FieldUtils.getWrappedValue
public static int getWrappedValue(int value, int minValue, int maxValue) { """ Utility method that ensures the given value lies within the field's legal value range. @param value the value to fit into the wrapped value range @param minValue the wrap range minimum value. @param maxValue the wrap range maximu...
java
public static int getWrappedValue(int value, int minValue, int maxValue) { if (minValue >= maxValue) { throw new IllegalArgumentException("MIN > MAX"); } int wrapRange = maxValue - minValue + 1; value -= minValue; if (value >= 0) { return (value % wrapRa...
[ "public", "static", "int", "getWrappedValue", "(", "int", "value", ",", "int", "minValue", ",", "int", "maxValue", ")", "{", "if", "(", "minValue", ">=", "maxValue", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"MIN > MAX\"", ")", ";", "}", ...
Utility method that ensures the given value lies within the field's legal value range. @param value the value to fit into the wrapped value range @param minValue the wrap range minimum value. @param maxValue the wrap range maximum value. This must be greater than minValue (checked by the method). @return the wrapped...
[ "Utility", "method", "that", "ensures", "the", "given", "value", "lies", "within", "the", "field", "s", "legal", "value", "range", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/field/FieldUtils.java#L330-L348
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Capacities.java
Capacities.createSkillDelegatorIfPossible
@Pure public static <C extends Capacity> C createSkillDelegatorIfPossible(Skill originalSkill, Class<C> capacity, AgentTrait capacityCaller) throws ClassCastException { """ Create a delegator for the given skill when it is possible. <p>The delegator is wrapping the original skill in order to set the value o...
java
@Pure public static <C extends Capacity> C createSkillDelegatorIfPossible(Skill originalSkill, Class<C> capacity, AgentTrait capacityCaller) throws ClassCastException { try { return Capacities.createSkillDelegator(originalSkill, capacity, capacityCaller); } catch (Exception e) { return capacity.cast(origi...
[ "@", "Pure", "public", "static", "<", "C", "extends", "Capacity", ">", "C", "createSkillDelegatorIfPossible", "(", "Skill", "originalSkill", ",", "Class", "<", "C", ">", "capacity", ",", "AgentTrait", "capacityCaller", ")", "throws", "ClassCastException", "{", "...
Create a delegator for the given skill when it is possible. <p>The delegator is wrapping the original skill in order to set the value of the caller that will be replied by {@link #getCaller()}. The associated caller is given as argument. <p>The delegator is an instance of an specific inner type, sub-type of {@link Ca...
[ "Create", "a", "delegator", "for", "the", "given", "skill", "when", "it", "is", "possible", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/Capacities.java#L122-L130
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/natures/AddSarlNatureHandler.java
AddSarlNatureHandler.doConvert
protected void doConvert(IProject project, IProgressMonitor monitor) throws ExecutionException { """ Convert the given project. @param project the project to convert.. @param monitor the progress monitor. @throws ExecutionException if something going wrong. """ monitor.setTaskName(MessageFormat.format(M...
java
protected void doConvert(IProject project, IProgressMonitor monitor) throws ExecutionException { monitor.setTaskName(MessageFormat.format(Messages.AddSarlNatureHandler_2, project.getName())); final SubMonitor mon = SubMonitor.convert(monitor, 2); if (this.configurator.canConfigure(project, Collections.emptySet(),...
[ "protected", "void", "doConvert", "(", "IProject", "project", ",", "IProgressMonitor", "monitor", ")", "throws", "ExecutionException", "{", "monitor", ".", "setTaskName", "(", "MessageFormat", ".", "format", "(", "Messages", ".", "AddSarlNatureHandler_2", ",", "proj...
Convert the given project. @param project the project to convert.. @param monitor the progress monitor. @throws ExecutionException if something going wrong.
[ "Convert", "the", "given", "project", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/natures/AddSarlNatureHandler.java#L116-L123
pravega/pravega
common/src/main/java/io/pravega/common/lang/ProcessStarter.java
ProcessStarter.sysProp
public ProcessStarter sysProp(String name, Object value) { """ Includes the given System Property as part of the start. @param name The System Property Name. @param value The System Property Value. This will have toString() invoked on it. @return This object instance. """ this.systemProps.put(nam...
java
public ProcessStarter sysProp(String name, Object value) { this.systemProps.put(name, value.toString()); return this; }
[ "public", "ProcessStarter", "sysProp", "(", "String", "name", ",", "Object", "value", ")", "{", "this", ".", "systemProps", ".", "put", "(", "name", ",", "value", ".", "toString", "(", ")", ")", ";", "return", "this", ";", "}" ]
Includes the given System Property as part of the start. @param name The System Property Name. @param value The System Property Value. This will have toString() invoked on it. @return This object instance.
[ "Includes", "the", "given", "System", "Property", "as", "part", "of", "the", "start", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/lang/ProcessStarter.java#L70-L73
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/CausticUtil.java
CausticUtil.checkVersion
public static void checkVersion(GLVersioned required, GLVersioned object) { """ Checks if two OpenGL versioned object have compatible version. Throws an exception if that's not the case. A version is determined to be compatible with another is it's lower than the said version. This isn't always true when deprecat...
java
public static void checkVersion(GLVersioned required, GLVersioned object) { if (!debug) { return; } final GLVersion requiredVersion = required.getGLVersion(); final GLVersion objectVersion = object.getGLVersion(); if (objectVersion.getMajor() > requiredVersion.getMajo...
[ "public", "static", "void", "checkVersion", "(", "GLVersioned", "required", ",", "GLVersioned", "object", ")", "{", "if", "(", "!", "debug", ")", "{", "return", ";", "}", "final", "GLVersion", "requiredVersion", "=", "required", ".", "getGLVersion", "(", ")"...
Checks if two OpenGL versioned object have compatible version. Throws an exception if that's not the case. A version is determined to be compatible with another is it's lower than the said version. This isn't always true when deprecation is involved, but it's an acceptable way of doing this in most implementations. @p...
[ "Checks", "if", "two", "OpenGL", "versioned", "object", "have", "compatible", "version", ".", "Throws", "an", "exception", "if", "that", "s", "not", "the", "case", ".", "A", "version", "is", "determined", "to", "be", "compatible", "with", "another", "is", ...
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/CausticUtil.java#L106-L115
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java
CommerceWarehouseItemPersistenceImpl.countByCPI_CPIU
@Override public int countByCPI_CPIU(long CProductId, String CPInstanceUuid) { """ Returns the number of commerce warehouse items where CProductId = &#63; and CPInstanceUuid = &#63;. @param CProductId the c product ID @param CPInstanceUuid the cp instance uuid @return the number of matching commerce warehous...
java
@Override public int countByCPI_CPIU(long CProductId, String CPInstanceUuid) { FinderPath finderPath = FINDER_PATH_COUNT_BY_CPI_CPIU; Object[] finderArgs = new Object[] { CProductId, CPInstanceUuid }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundl...
[ "@", "Override", "public", "int", "countByCPI_CPIU", "(", "long", "CProductId", ",", "String", "CPInstanceUuid", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_CPI_CPIU", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{...
Returns the number of commerce warehouse items where CProductId = &#63; and CPInstanceUuid = &#63;. @param CProductId the c product ID @param CPInstanceUuid the cp instance uuid @return the number of matching commerce warehouse items
[ "Returns", "the", "number", "of", "commerce", "warehouse", "items", "where", "CProductId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java#L1409-L1470
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java
Logging.debugFine
public void debugFine(CharSequence message, Throwable e) { """ Log a message at the 'fine' debugging level. You should check isDebugging() before building the message. @param message Informational log message. @param e Exception """ log(Level.FINE, message, e); }
java
public void debugFine(CharSequence message, Throwable e) { log(Level.FINE, message, e); }
[ "public", "void", "debugFine", "(", "CharSequence", "message", ",", "Throwable", "e", ")", "{", "log", "(", "Level", ".", "FINE", ",", "message", ",", "e", ")", ";", "}" ]
Log a message at the 'fine' debugging level. You should check isDebugging() before building the message. @param message Informational log message. @param e Exception
[ "Log", "a", "message", "at", "the", "fine", "debugging", "level", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java#L445-L447
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/Partition.java
Partition.splitBefore
public Partition splitBefore(int cellIndex, int splitElement) { """ Splits this partition by taking the cell at cellIndex and making two new cells - the first with the singleton splitElement and the second with the rest of the elements from that cell. @param cellIndex the index of the cell to split on @param...
java
public Partition splitBefore(int cellIndex, int splitElement) { Partition r = new Partition(); // copy the cells up to cellIndex for (int j = 0; j < cellIndex; j++) { r.addCell(this.copyBlock(j)); } // split the block at block index r.addSingletonCell(splitEl...
[ "public", "Partition", "splitBefore", "(", "int", "cellIndex", ",", "int", "splitElement", ")", "{", "Partition", "r", "=", "new", "Partition", "(", ")", ";", "// copy the cells up to cellIndex", "for", "(", "int", "j", "=", "0", ";", "j", "<", "cellIndex", ...
Splits this partition by taking the cell at cellIndex and making two new cells - the first with the singleton splitElement and the second with the rest of the elements from that cell. @param cellIndex the index of the cell to split on @param splitElement the element to put in its own cell @return a new (finer) Partiti...
[ "Splits", "this", "partition", "by", "taking", "the", "cell", "at", "cellIndex", "and", "making", "two", "new", "cells", "-", "the", "first", "with", "the", "singleton", "splitElement", "and", "the", "second", "with", "the", "rest", "of", "the", "elements", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/Partition.java#L222-L240
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPreferences.java
CmsPreferences.buildSelectDeleteFileMode
public String buildSelectDeleteFileMode(String htmlAttributes) { """ Builds the html for the default delete file mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default delete file mode select box """ List<String> options = ne...
java
public String buildSelectDeleteFileMode(String htmlAttributes) { List<String> options = new ArrayList<String>(2); options.add(key(Messages.GUI_PREF_PRESERVE_SIBLINGS_0)); options.add(key(Messages.GUI_PREF_DELETE_SIBLINGS_0)); List<String> values = new ArrayList<String>(2); value...
[ "public", "String", "buildSelectDeleteFileMode", "(", "String", "htmlAttributes", ")", "{", "List", "<", "String", ">", "options", "=", "new", "ArrayList", "<", "String", ">", "(", "2", ")", ";", "options", ".", "add", "(", "key", "(", "Messages", ".", "...
Builds the html for the default delete file mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default delete file mode select box
[ "Builds", "the", "html", "for", "the", "default", "delete", "file", "mode", "select", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L627-L637
knightliao/disconf
disconf-core/src/main/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java
ProtocolSupport.ensureExists
protected void ensureExists(final String path, final byte[] data, final List<ACL> acl, final CreateMode flags) { """ Ensures that the given path exists with the given data, ACL and flags @param path @param acl @param flags """ try { retryOperation(new ZooKeeperOperation() { ...
java
protected void ensureExists(final String path, final byte[] data, final List<ACL> acl, final CreateMode flags) { try { retryOperation(new ZooKeeperOperation() { public boolean execute() throws KeeperException, InterruptedException { Stat stat = zookeeper.exists(pa...
[ "protected", "void", "ensureExists", "(", "final", "String", "path", ",", "final", "byte", "[", "]", "data", ",", "final", "List", "<", "ACL", ">", "acl", ",", "final", "CreateMode", "flags", ")", "{", "try", "{", "retryOperation", "(", "new", "ZooKeeper...
Ensures that the given path exists with the given data, ACL and flags @param path @param acl @param flags
[ "Ensures", "that", "the", "given", "path", "exists", "with", "the", "given", "data", "ACL", "and", "flags" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-core/src/main/java/org/apache/zookeeper/recipes/lock/ProtocolSupport.java#L155-L172
mlhartme/sushi
src/main/java/net/oneandone/sushi/xml/Builder.java
Builder.parseString
public Document parseString(String text) throws SAXException { """ This method is not called "parse" to avoid confusion with file parsing methods """ try { return parse(new InputSource(new StringReader(text))); } catch (IOException e) { throw new RuntimeException("unexpe...
java
public Document parseString(String text) throws SAXException { try { return parse(new InputSource(new StringReader(text))); } catch (IOException e) { throw new RuntimeException("unexpected world exception while reading memory stream", e); } }
[ "public", "Document", "parseString", "(", "String", "text", ")", "throws", "SAXException", "{", "try", "{", "return", "parse", "(", "new", "InputSource", "(", "new", "StringReader", "(", "text", ")", ")", ")", ";", "}", "catch", "(", "IOException", "e", ...
This method is not called "parse" to avoid confusion with file parsing methods
[ "This", "method", "is", "not", "called", "parse", "to", "avoid", "confusion", "with", "file", "parsing", "methods" ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/xml/Builder.java#L53-L59
aehrc/ontology-core
ontology-import/src/main/java/au/csiro/ontology/importer/rf2/RF2Importer.java
RF2Importer.loadModuleDependencies
protected IModuleDependencyRefset loadModuleDependencies(RF2Input input) throws ImportException { """ Loads all the module dependency information from all RF2 inputs into a single {@link IModuleDependencyRefset}. @return @throws ImportException """ Set<InputStream> iss = new HashSet<>(); In...
java
protected IModuleDependencyRefset loadModuleDependencies(RF2Input input) throws ImportException { Set<InputStream> iss = new HashSet<>(); InputType inputType = input.getInputType(); for(String md : input.getModuleDependenciesRefsetFiles()) { try { iss.add(input.getInp...
[ "protected", "IModuleDependencyRefset", "loadModuleDependencies", "(", "RF2Input", "input", ")", "throws", "ImportException", "{", "Set", "<", "InputStream", ">", "iss", "=", "new", "HashSet", "<>", "(", ")", ";", "InputType", "inputType", "=", "input", ".", "ge...
Loads all the module dependency information from all RF2 inputs into a single {@link IModuleDependencyRefset}. @return @throws ImportException
[ "Loads", "all", "the", "module", "dependency", "information", "from", "all", "RF2", "inputs", "into", "a", "single", "{", "@link", "IModuleDependencyRefset", "}", "." ]
train
https://github.com/aehrc/ontology-core/blob/446aa691119f2bbcb8d184566084b8da7a07a44e/ontology-import/src/main/java/au/csiro/ontology/importer/rf2/RF2Importer.java#L138-L152
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubClassOfAxiomImpl_CustomFieldSerializer.java
OWLSubClassOfAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLSubClassOfAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google....
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLSubClassOfAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLSubClassOfAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubClassOfAxiomImpl_CustomFieldSerializer.java#L97-L100
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.invokeUpdateHandler
public String invokeUpdateHandler(String updateHandlerUri, String docId, Params params) { """ Invokes an Update Handler. <P>Example usage:</P> <pre> {@code final String newValue = "foo bar"; Params params = new Params() .addParam("field", "title") .addParam("value", new...
java
public String invokeUpdateHandler(String updateHandlerUri, String docId, Params params) { assertNotEmpty(params, "params"); return db.invokeUpdateHandler(updateHandlerUri, docId, params.getInternalParams()); }
[ "public", "String", "invokeUpdateHandler", "(", "String", "updateHandlerUri", ",", "String", "docId", ",", "Params", "params", ")", "{", "assertNotEmpty", "(", "params", ",", "\"params\"", ")", ";", "return", "db", ".", "invokeUpdateHandler", "(", "updateHandlerUr...
Invokes an Update Handler. <P>Example usage:</P> <pre> {@code final String newValue = "foo bar"; Params params = new Params() .addParam("field", "title") .addParam("value", newValue); String output = db.invokeUpdateHandler("example/example_update", "exampleId", params); } </pre> <pre> Params params = new Params() .add...
[ "Invokes", "an", "Update", "Handler", ".", "<P", ">", "Example", "usage", ":", "<", "/", "P", ">", "<pre", ">", "{", "@code", "final", "String", "newValue", "=", "foo", "bar", ";", "Params", "params", "=", "new", "Params", "()", ".", "addParam", "(",...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L1378-L1382
riversun/d6
src/main/java/org/riversun/d6/core/D6Crud.java
D6Crud.execSelectTable
public <T extends D6Model> T[] execSelectTable(String preparedSql, Class<T> modelClazz) { """ Execute select statement for the single table. @param preparedSql @param modelClazz @return """ return execSelectTable(preparedSql, null, modelClazz); }
java
public <T extends D6Model> T[] execSelectTable(String preparedSql, Class<T> modelClazz) { return execSelectTable(preparedSql, null, modelClazz); }
[ "public", "<", "T", "extends", "D6Model", ">", "T", "[", "]", "execSelectTable", "(", "String", "preparedSql", ",", "Class", "<", "T", ">", "modelClazz", ")", "{", "return", "execSelectTable", "(", "preparedSql", ",", "null", ",", "modelClazz", ")", ";", ...
Execute select statement for the single table. @param preparedSql @param modelClazz @return
[ "Execute", "select", "statement", "for", "the", "single", "table", "." ]
train
https://github.com/riversun/d6/blob/2798bd876b9380dbfea8182d11ad306cb1b0e114/src/main/java/org/riversun/d6/core/D6Crud.java#L770-L772
petergeneric/stdlib
guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java
OAuth2SessionRef.getAuthFlowStartEndpoint
public URI getAuthFlowStartEndpoint(final String returnTo, final String scope) { """ Get the endpoint to redirect a client to in order to start an OAuth2 Authorisation Flow @param returnTo The URI to redirect the user back to once the authorisation flow completes successfully. If not specified then the user w...
java
public URI getAuthFlowStartEndpoint(final String returnTo, final String scope) { final String oauthServiceRoot = (oauthServiceRedirectEndpoint != null) ? oauthServiceRedirectEndpoint : oauthServiceEndpoint; final String endpoint = oauthServiceRoot...
[ "public", "URI", "getAuthFlowStartEndpoint", "(", "final", "String", "returnTo", ",", "final", "String", "scope", ")", "{", "final", "String", "oauthServiceRoot", "=", "(", "oauthServiceRedirectEndpoint", "!=", "null", ")", "?", "oauthServiceRedirectEndpoint", ":", ...
Get the endpoint to redirect a client to in order to start an OAuth2 Authorisation Flow @param returnTo The URI to redirect the user back to once the authorisation flow completes successfully. If not specified then the user will be directed to the root of this webapp. @return
[ "Get", "the", "endpoint", "to", "redirect", "a", "client", "to", "in", "order", "to", "start", "an", "OAuth2", "Authorisation", "Flow" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/webapp/src/main/java/com/peterphi/std/guice/web/rest/auth/oauth2/OAuth2SessionRef.java#L140-L159
matthewhorridge/owlapi-gwt
owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/util/SimpleRenderer.java
SimpleRenderer.setPrefix
public void setPrefix(@Nonnull String prefixName, @Nonnull String prefix) { """ Sets a prefix name for a given prefix. Note that prefix names MUST end with a colon. @param prefixName The prefix name (ending with a colon) @param prefix The prefix that the prefix name maps to """ if (!isUsingDefau...
java
public void setPrefix(@Nonnull String prefixName, @Nonnull String prefix) { if (!isUsingDefaultShortFormProvider()) { resetShortFormProvider(); } ((DefaultPrefixManager) shortFormProvider).setPrefix(prefixName, prefix); }
[ "public", "void", "setPrefix", "(", "@", "Nonnull", "String", "prefixName", ",", "@", "Nonnull", "String", "prefix", ")", "{", "if", "(", "!", "isUsingDefaultShortFormProvider", "(", ")", ")", "{", "resetShortFormProvider", "(", ")", ";", "}", "(", "(", "D...
Sets a prefix name for a given prefix. Note that prefix names MUST end with a colon. @param prefixName The prefix name (ending with a colon) @param prefix The prefix that the prefix name maps to
[ "Sets", "a", "prefix", "name", "for", "a", "given", "prefix", ".", "Note", "that", "prefix", "names", "MUST", "end", "with", "a", "colon", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/util/SimpleRenderer.java#L74-L79
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addSuccessDeleteFile
public FessMessages addSuccessDeleteFile(String property, String arg0) { """ Add the created action message for the key 'success.delete_file' with parameters. <pre> message: Deleted {0} file. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNu...
java
public FessMessages addSuccessDeleteFile(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(SUCCESS_delete_file, arg0)); return this; }
[ "public", "FessMessages", "addSuccessDeleteFile", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "SUCCESS_delete_file", ",", "arg0", ")", ")"...
Add the created action message for the key 'success.delete_file' with parameters. <pre> message: Deleted {0} file. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "success", ".", "delete_file", "with", "parameters", ".", "<pre", ">", "message", ":", "Deleted", "{", "0", "}", "file", ".", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L2390-L2394
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java
SpoofChecker.getNumerics
private void getNumerics(String input, UnicodeSet result) { """ Computes the set of numerics for a string, according to UTS 39 section 5.3. """ result.clear(); for (int utf16Offset = 0; utf16Offset < input.length();) { int codePoint = Character.codePointAt(input, utf16Offset); ...
java
private void getNumerics(String input, UnicodeSet result) { result.clear(); for (int utf16Offset = 0; utf16Offset < input.length();) { int codePoint = Character.codePointAt(input, utf16Offset); utf16Offset += Character.charCount(codePoint); // Store a representative...
[ "private", "void", "getNumerics", "(", "String", "input", ",", "UnicodeSet", "result", ")", "{", "result", ".", "clear", "(", ")", ";", "for", "(", "int", "utf16Offset", "=", "0", ";", "utf16Offset", "<", "input", ".", "length", "(", ")", ";", ")", "...
Computes the set of numerics for a string, according to UTS 39 section 5.3.
[ "Computes", "the", "set", "of", "numerics", "for", "a", "string", "according", "to", "UTS", "39", "section", "5", ".", "3", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1549-L1563
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/ds/PGConnectionPoolDataSource.java
PGConnectionPoolDataSource.getPooledConnection
public PooledConnection getPooledConnection(String user, String password) throws SQLException { """ Gets a connection which may be pooled by the app server or middleware implementation of DataSource. @throws java.sql.SQLException Occurs when the physical database connection cannot be established. """ ...
java
public PooledConnection getPooledConnection(String user, String password) throws SQLException { return new PGPooledConnection(getConnection(user, password), defaultAutoCommit); }
[ "public", "PooledConnection", "getPooledConnection", "(", "String", "user", ",", "String", "password", ")", "throws", "SQLException", "{", "return", "new", "PGPooledConnection", "(", "getConnection", "(", "user", ",", "password", ")", ",", "defaultAutoCommit", ")", ...
Gets a connection which may be pooled by the app server or middleware implementation of DataSource. @throws java.sql.SQLException Occurs when the physical database connection cannot be established.
[ "Gets", "a", "connection", "which", "may", "be", "pooled", "by", "the", "app", "server", "or", "middleware", "implementation", "of", "DataSource", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/ds/PGConnectionPoolDataSource.java#L68-L70
rythmengine/rythmengine
src/main/java/org/rythmengine/RythmEngine.java
RythmEngine.registerTemplate
public void registerTemplate(String name, ITemplate template) { """ Register a tag using the given name <p/> <p>Not an API for user application</p> @param name @param template """ if (null == template) throw new NullPointerException(); // if (_templates.containsKey(name)) { // r...
java
public void registerTemplate(String name, ITemplate template) { if (null == template) throw new NullPointerException(); // if (_templates.containsKey(name)) { // return false; // } _templates.put(name, template); return; }
[ "public", "void", "registerTemplate", "(", "String", "name", ",", "ITemplate", "template", ")", "{", "if", "(", "null", "==", "template", ")", "throw", "new", "NullPointerException", "(", ")", ";", "// if (_templates.containsKey(name)) {", "// return...
Register a tag using the given name <p/> <p>Not an API for user application</p> @param name @param template
[ "Register", "a", "tag", "using", "the", "given", "name", "<p", "/", ">", "<p", ">", "Not", "an", "API", "for", "user", "application<", "/", "p", ">" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/RythmEngine.java#L1653-L1660
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getUntilFirstExcl
@Nullable public static String getUntilFirstExcl (@Nullable final String sStr, @Nullable final String sSearch) { """ Get everything from the string up to and excluding the first passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</c...
java
@Nullable public static String getUntilFirstExcl (@Nullable final String sStr, @Nullable final String sSearch) { return _getUntilFirst (sStr, sSearch, false); }
[ "@", "Nullable", "public", "static", "String", "getUntilFirstExcl", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "return", "_getUntilFirst", "(", "sStr", ",", "sSearch", ",", "false", ")", ";"...
Get everything from the string up to and excluding the first passed string. @param sStr The source string. May be <code>null</code>. @param sSearch The string to search. May be <code>null</code>. @return <code>null</code> if the passed string does not contain the search string. If the search string is empty, the empty...
[ "Get", "everything", "from", "the", "string", "up", "to", "and", "excluding", "the", "first", "passed", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4818-L4822
opsbears/owc-dic
src/main/java/com/opsbears/webcomponents/dic/InjectorConfiguration.java
InjectorConfiguration.withScopedAlias
public <TAbstract, TImplementation extends TAbstract> InjectorConfiguration withScopedAlias( Class scope, Class<TAbstract> abstractDefinition, Class<TImplementation> implementationDefinition ) { """ Defines that instead of the class/interface passed in abstractDefinition, the class spec...
java
public <TAbstract, TImplementation extends TAbstract> InjectorConfiguration withScopedAlias( Class scope, Class<TAbstract> abstractDefinition, Class<TImplementation> implementationDefinition ) { if (abstractDefinition.equals(Injector.class)) { throw new DependencyInjectio...
[ "public", "<", "TAbstract", ",", "TImplementation", "extends", "TAbstract", ">", "InjectorConfiguration", "withScopedAlias", "(", "Class", "scope", ",", "Class", "<", "TAbstract", ">", "abstractDefinition", ",", "Class", "<", "TImplementation", ">", "implementationDef...
Defines that instead of the class/interface passed in abstractDefinition, the class specified in implementationDefinition should be used. The specified replacement class must be defined as injectable. @param abstractDefinition the abstract class or interface to replace. @param implementationDefinition the implementati...
[ "Defines", "that", "instead", "of", "the", "class", "/", "interface", "passed", "in", "abstractDefinition", "the", "class", "specified", "in", "implementationDefinition", "should", "be", "used", ".", "The", "specified", "replacement", "class", "must", "be", "defin...
train
https://github.com/opsbears/owc-dic/blob/eb254ca993b26c299292a01598b358a31f323566/src/main/java/com/opsbears/webcomponents/dic/InjectorConfiguration.java#L914-L933
xwiki/xwiki-rendering
xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java
IconTransformation.mergeTree
private void mergeTree(Block targetTree, Block sourceTree) { """ Merged two XDOM trees. @param targetTree the tree to merge into @param sourceTree the tree to merge """ for (Block block : sourceTree.getChildren()) { // Check if the current block exists in the target tree at the same pla...
java
private void mergeTree(Block targetTree, Block sourceTree) { for (Block block : sourceTree.getChildren()) { // Check if the current block exists in the target tree at the same place in the tree int pos = indexOf(targetTree.getChildren(), block); if (pos > -1) { ...
[ "private", "void", "mergeTree", "(", "Block", "targetTree", ",", "Block", "sourceTree", ")", "{", "for", "(", "Block", "block", ":", "sourceTree", ".", "getChildren", "(", ")", ")", "{", "// Check if the current block exists in the target tree at the same place in the t...
Merged two XDOM trees. @param targetTree the tree to merge into @param sourceTree the tree to merge
[ "Merged", "two", "XDOM", "trees", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-icon/src/main/java/org/xwiki/rendering/internal/transformation/icon/IconTransformation.java#L155-L167
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/config/DefaultGosuProfilingService.java
DefaultGosuProfilingService.completed
public void completed(long startTime, long endTime, String path, String location, int count, long waitTime) { """ This will log a profiling event, note that the start time and end times should have been captured from the same clock, for example IEntityAccess.getCurrentTime(). @param startTime the start of the ...
java
public void completed(long startTime, long endTime, String path, String location, int count, long waitTime) { ILogger logger = CommonServices.getEntityAccess().getLogger(); if (logger.isDebugEnabled()) { if (endTime <= 0) { endTime = CommonServices.getEntityAccess().getCurrentTime().getTime(); ...
[ "public", "void", "completed", "(", "long", "startTime", ",", "long", "endTime", ",", "String", "path", ",", "String", "location", ",", "int", "count", ",", "long", "waitTime", ")", "{", "ILogger", "logger", "=", "CommonServices", ".", "getEntityAccess", "("...
This will log a profiling event, note that the start time and end times should have been captured from the same clock, for example IEntityAccess.getCurrentTime(). @param startTime the start of the profiled code @param endTime the end of the profiled code (if 0 will use IEntityAccess.getCurrentTime()) @param path ...
[ "This", "will", "log", "a", "profiling", "event", "note", "that", "the", "start", "time", "and", "end", "times", "should", "have", "been", "captured", "from", "the", "same", "clock", "for", "example", "IEntityAccess", ".", "getCurrentTime", "()", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/config/DefaultGosuProfilingService.java#L25-L38
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/RequestUtils.java
RequestUtils.getServletURL
public static String getServletURL (HttpServletRequest req, String path) { """ Prepends the server, port and servlet context path to the supplied path, resulting in a fully-formed URL for requesting a servlet. """ StringBuffer buf = req.getRequestURL(); String sname = req.getServletPath(); ...
java
public static String getServletURL (HttpServletRequest req, String path) { StringBuffer buf = req.getRequestURL(); String sname = req.getServletPath(); buf.delete(buf.length() - sname.length(), buf.length()); if (!path.startsWith("/")) { buf.append("/"); } ...
[ "public", "static", "String", "getServletURL", "(", "HttpServletRequest", "req", ",", "String", "path", ")", "{", "StringBuffer", "buf", "=", "req", ".", "getRequestURL", "(", ")", ";", "String", "sname", "=", "req", ".", "getServletPath", "(", ")", ";", "...
Prepends the server, port and servlet context path to the supplied path, resulting in a fully-formed URL for requesting a servlet.
[ "Prepends", "the", "server", "port", "and", "servlet", "context", "path", "to", "the", "supplied", "path", "resulting", "in", "a", "fully", "-", "formed", "URL", "for", "requesting", "a", "servlet", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/RequestUtils.java#L75-L85
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfStamper.java
PdfStamper.createSignature
public static PdfStamper createSignature(PdfReader reader, OutputStream os, char pdfVersion, File tempFile, boolean append) throws DocumentException, IOException { """ Applies a digital signature to a document, possibly as a new revision, making possible multiple signatures. The returned PdfStamper can be used n...
java
public static PdfStamper createSignature(PdfReader reader, OutputStream os, char pdfVersion, File tempFile, boolean append) throws DocumentException, IOException { PdfStamper stp; if (tempFile == null) { ByteBuffer bout = new ByteBuffer(); stp = new PdfStamper(reader, bout, pdfVe...
[ "public", "static", "PdfStamper", "createSignature", "(", "PdfReader", "reader", ",", "OutputStream", "os", ",", "char", "pdfVersion", ",", "File", "tempFile", ",", "boolean", "append", ")", "throws", "DocumentException", ",", "IOException", "{", "PdfStamper", "st...
Applies a digital signature to a document, possibly as a new revision, making possible multiple signatures. The returned PdfStamper can be used normally as the signature is only applied when closing. <p> A possible use for adding a signature without invalidating an existing one is: <p> <pre> KeyStore ks = KeyStore.getI...
[ "Applies", "a", "digital", "signature", "to", "a", "document", "possibly", "as", "a", "new", "revision", "making", "possible", "multiple", "signatures", ".", "The", "returned", "PdfStamper", "can", "be", "used", "normally", "as", "the", "signature", "is", "onl...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfStamper.java#L657-L683
threerings/nenya
core/src/main/java/com/threerings/media/image/ImageUtil.java
ImageUtil.createTracedImage
public static BufferedImage createTracedImage ( ImageCreator isrc, BufferedImage src, Color tcolor, int thickness) { """ Creates and returns a new image consisting of the supplied image traced with the given color and thickness. """ return createTracedImage(isrc, src, tcolor, thickness, 1.0f, ...
java
public static BufferedImage createTracedImage ( ImageCreator isrc, BufferedImage src, Color tcolor, int thickness) { return createTracedImage(isrc, src, tcolor, thickness, 1.0f, 1.0f); }
[ "public", "static", "BufferedImage", "createTracedImage", "(", "ImageCreator", "isrc", ",", "BufferedImage", "src", ",", "Color", "tcolor", ",", "int", "thickness", ")", "{", "return", "createTracedImage", "(", "isrc", ",", "src", ",", "tcolor", ",", "thickness"...
Creates and returns a new image consisting of the supplied image traced with the given color and thickness.
[ "Creates", "and", "returns", "a", "new", "image", "consisting", "of", "the", "supplied", "image", "traced", "with", "the", "given", "color", "and", "thickness", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ImageUtil.java#L261-L265
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java
BoxApiMetadata.getFolderMetadataRequest
public BoxRequestsMetadata.GetItemMetadata getFolderMetadataRequest(String id, String template) { """ Gets a request that retrieves the metadata for a specific template on a folder @param id id of the folder to retrieve metadata for @param template metadata template requested @return request to retriev...
java
public BoxRequestsMetadata.GetItemMetadata getFolderMetadataRequest(String id, String template) { BoxRequestsMetadata.GetItemMetadata request = new BoxRequestsMetadata.GetItemMetadata(getFolderMetadataUrl(id, template), mSession); return request; }
[ "public", "BoxRequestsMetadata", ".", "GetItemMetadata", "getFolderMetadataRequest", "(", "String", "id", ",", "String", "template", ")", "{", "BoxRequestsMetadata", ".", "GetItemMetadata", "request", "=", "new", "BoxRequestsMetadata", ".", "GetItemMetadata", "(", "getF...
Gets a request that retrieves the metadata for a specific template on a folder @param id id of the folder to retrieve metadata for @param template metadata template requested @return request to retrieve metadata on a folder
[ "Gets", "a", "request", "that", "retrieves", "the", "metadata", "for", "a", "specific", "template", "on", "a", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java#L201-L204
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java
CrosstabBuilder.setColumnStyles
public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { """ Should be called after all columns have been created @param headerStyle @param totalStyle @param totalHeaderStyle @return """ crosstab.setColumnHeaderStyle(headerStyle); crosstab.setColumnTotalhe...
java
public CrosstabBuilder setColumnStyles(Style headerStyle, Style totalStyle, Style totalHeaderStyle) { crosstab.setColumnHeaderStyle(headerStyle); crosstab.setColumnTotalheaderStyle(totalHeaderStyle); crosstab.setColumnTotalStyle(totalStyle); return this; }
[ "public", "CrosstabBuilder", "setColumnStyles", "(", "Style", "headerStyle", ",", "Style", "totalStyle", ",", "Style", "totalHeaderStyle", ")", "{", "crosstab", ".", "setColumnHeaderStyle", "(", "headerStyle", ")", ";", "crosstab", ".", "setColumnTotalheaderStyle", "(...
Should be called after all columns have been created @param headerStyle @param totalStyle @param totalHeaderStyle @return
[ "Should", "be", "called", "after", "all", "columns", "have", "been", "created" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/CrosstabBuilder.java#L399-L404
mnlipp/jgrapes
org.jgrapes.http/src/org/jgrapes/http/HttpServer.java
HttpServer.onPurge
@Handler(channels = NetworkChannel.class) public void onPurge(Purge event, IOSubchannel netChannel) { """ Forwards a {@link Purge} event to the application channel. @param event the event @param netChannel the net channel """ LinkedIOSubchannel.downstreamChannel(this, netChannel, We...
java
@Handler(channels = NetworkChannel.class) public void onPurge(Purge event, IOSubchannel netChannel) { LinkedIOSubchannel.downstreamChannel(this, netChannel, WebAppMsgChannel.class).ifPresent(appChannel -> { appChannel.handlePurge(event); }); }
[ "@", "Handler", "(", "channels", "=", "NetworkChannel", ".", "class", ")", "public", "void", "onPurge", "(", "Purge", "event", ",", "IOSubchannel", "netChannel", ")", "{", "LinkedIOSubchannel", ".", "downstreamChannel", "(", "this", ",", "netChannel", ",", "We...
Forwards a {@link Purge} event to the application channel. @param event the event @param netChannel the net channel
[ "Forwards", "a", "{", "@link", "Purge", "}", "event", "to", "the", "application", "channel", "." ]
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.http/src/org/jgrapes/http/HttpServer.java#L284-L290
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java
StringUtils.requireNotNullNorEmpty
public static <CS extends CharSequence> CS requireNotNullNorEmpty(CS cs, String message) { """ Require a {@link CharSequence} to be neither null, nor empty. @param cs CharSequence @param message error message @param <CS> CharSequence type @return cs """ if (isNullOrEmpty(cs)) { throw ...
java
public static <CS extends CharSequence> CS requireNotNullNorEmpty(CS cs, String message) { if (isNullOrEmpty(cs)) { throw new IllegalArgumentException(message); } return cs; }
[ "public", "static", "<", "CS", "extends", "CharSequence", ">", "CS", "requireNotNullNorEmpty", "(", "CS", "cs", ",", "String", "message", ")", "{", "if", "(", "isNullOrEmpty", "(", "cs", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "messag...
Require a {@link CharSequence} to be neither null, nor empty. @param cs CharSequence @param message error message @param <CS> CharSequence type @return cs
[ "Require", "a", "{", "@link", "CharSequence", "}", "to", "be", "neither", "null", "nor", "empty", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java#L449-L454
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.insertArg
public Signature insertArg(String beforeName, String name, Class<?> type) { """ Insert an argument (name + type) into the signature before the argument with the given name. @param beforeName the name of the argument before which to insert @param name the name of the new argument @param type the t...
java
public Signature insertArg(String beforeName, String name, Class<?> type) { return insertArgs(argOffset(beforeName), new String[]{name}, new Class<?>[]{type}); }
[ "public", "Signature", "insertArg", "(", "String", "beforeName", ",", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "return", "insertArgs", "(", "argOffset", "(", "beforeName", ")", ",", "new", "String", "[", "]", "{", "name", "}", "...
Insert an argument (name + type) into the signature before the argument with the given name. @param beforeName the name of the argument before which to insert @param name the name of the new argument @param type the type of the new argument @return a new signature with the added arguments
[ "Insert", "an", "argument", "(", "name", "+", "type", ")", "into", "the", "signature", "before", "the", "argument", "with", "the", "given", "name", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L263-L265
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newResourceNotFoundException
public static ResourceNotFoundException newResourceNotFoundException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link ResourceNotFoundException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}...
java
public static ResourceNotFoundException newResourceNotFoundException(Throwable cause, String message, Object... args) { return new ResourceNotFoundException(format(message, args), cause); }
[ "public", "static", "ResourceNotFoundException", "newResourceNotFoundException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "ResourceNotFoundException", "(", "format", "(", "message", ",", "args", ")...
Constructs and initializes a new {@link ResourceNotFoundException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link ResourceNotFoundException} was thrown. @param message {@link Stri...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "ResourceNotFoundException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L509-L513
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFStatement.java
SFStatement.addProperty
public void addProperty(String propertyName, Object propertyValue) throws SFException { """ Add a statement parameter <p> Make sure a property is not added more than once and the number of properties does not exceed limit. @param propertyName property name @param propertyValue property value @throws SFE...
java
public void addProperty(String propertyName, Object propertyValue) throws SFException { statementParametersMap.put(propertyName, propertyValue); // for query timeout, we implement it on client side for now if ("query_timeout".equalsIgnoreCase(propertyName)) { queryTimeout = (Integer) property...
[ "public", "void", "addProperty", "(", "String", "propertyName", ",", "Object", "propertyValue", ")", "throws", "SFException", "{", "statementParametersMap", ".", "put", "(", "propertyName", ",", "propertyValue", ")", ";", "// for query timeout, we implement it on client s...
Add a statement parameter <p> Make sure a property is not added more than once and the number of properties does not exceed limit. @param propertyName property name @param propertyValue property value @throws SFException if too many parameters for a statement
[ "Add", "a", "statement", "parameter", "<p", ">", "Make", "sure", "a", "property", "is", "not", "added", "more", "than", "once", "and", "the", "number", "of", "properties", "does", "not", "exceed", "limit", "." ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFStatement.java#L101-L118
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java
StringSupport.getRootStackTrace
public static String getRootStackTrace(Throwable t, int depth) { """ Retrieves stack trace from throwable. @param t @param depth @return """ while(t.getCause() != null) { t = t.getCause(); } return getStackTrace(t, depth, null); }
java
public static String getRootStackTrace(Throwable t, int depth) { while(t.getCause() != null) { t = t.getCause(); } return getStackTrace(t, depth, null); }
[ "public", "static", "String", "getRootStackTrace", "(", "Throwable", "t", ",", "int", "depth", ")", "{", "while", "(", "t", ".", "getCause", "(", ")", "!=", "null", ")", "{", "t", "=", "t", ".", "getCause", "(", ")", ";", "}", "return", "getStackTrac...
Retrieves stack trace from throwable. @param t @param depth @return
[ "Retrieves", "stack", "trace", "from", "throwable", "." ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/misc/StringSupport.java#L960-L966
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/RedmineManagerFactory.java
RedmineManagerFactory.createUnauthenticated
public static RedmineManager createUnauthenticated(String uri, HttpClient httpClient) { """ Creates a non-authenticating redmine manager. @param uri redmine manager URI. @param httpClient you can provide your own pre-configured HttpClient if you want to contr...
java
public static RedmineManager createUnauthenticated(String uri, HttpClient httpClient) { return createWithUserAuth(uri, null, null, httpClient); }
[ "public", "static", "RedmineManager", "createUnauthenticated", "(", "String", "uri", ",", "HttpClient", "httpClient", ")", "{", "return", "createWithUserAuth", "(", "uri", ",", "null", ",", "null", ",", "httpClient", ")", ";", "}" ]
Creates a non-authenticating redmine manager. @param uri redmine manager URI. @param httpClient you can provide your own pre-configured HttpClient if you want to control connection pooling, manage connections eviction, closing, etc.
[ "Creates", "a", "non", "-", "authenticating", "redmine", "manager", "." ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/RedmineManagerFactory.java#L75-L78
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.findClosestPointOnTriangle
public static int findClosestPointOnTriangle(Vector2fc v0, Vector2fc v1, Vector2fc v2, Vector2fc p, Vector2f result) { """ Determine the closest point on the triangle with the vertices <code>v0</code>, <code>v1</code>, <code>v2</code> between that triangle and the given point <code>p</code> and store that point i...
java
public static int findClosestPointOnTriangle(Vector2fc v0, Vector2fc v1, Vector2fc v2, Vector2fc p, Vector2f result) { return findClosestPointOnTriangle(v0.x(), v0.y(), v1.x(), v1.y(), v2.x(), v2.y(), p.x(), p.y(), result); }
[ "public", "static", "int", "findClosestPointOnTriangle", "(", "Vector2fc", "v0", ",", "Vector2fc", "v1", ",", "Vector2fc", "v2", ",", "Vector2fc", "p", ",", "Vector2f", "result", ")", "{", "return", "findClosestPointOnTriangle", "(", "v0", ".", "x", "(", ")", ...
Determine the closest point on the triangle with the vertices <code>v0</code>, <code>v1</code>, <code>v2</code> between that triangle and the given point <code>p</code> and store that point into the given <code>result</code>. <p> Additionally, this method returns whether the closest point is a vertex ({@link #POINT_ON_...
[ "Determine", "the", "closest", "point", "on", "the", "triangle", "with", "the", "vertices", "<code", ">", "v0<", "/", "code", ">", "<code", ">", "v1<", "/", "code", ">", "<code", ">", "v2<", "/", "code", ">", "between", "that", "triangle", "and", "the"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L4192-L4194
GoogleCloudPlatform/appengine-pipelines
java/src/main/java/com/google/appengine/tools/pipeline/impl/model/Barrier.java
Barrier.getEgParentKey
private static Key getEgParentKey(Type type, Key jobKey) { """ Returns the entity group parent of a Barrier of the specified type. <p> According to our <a href="http://goto/java-pipeline-model">transactional model</a>: If B is the finalize barrier of a Job J, then the entity group parent of B is J. Run barrier...
java
private static Key getEgParentKey(Type type, Key jobKey) { switch (type) { case RUN: return null; case FINALIZE: if (null == jobKey) { throw new IllegalArgumentException("jobKey is null"); } break; } return jobKey; }
[ "private", "static", "Key", "getEgParentKey", "(", "Type", "type", ",", "Key", "jobKey", ")", "{", "switch", "(", "type", ")", "{", "case", "RUN", ":", "return", "null", ";", "case", "FINALIZE", ":", "if", "(", "null", "==", "jobKey", ")", "{", "thro...
Returns the entity group parent of a Barrier of the specified type. <p> According to our <a href="http://goto/java-pipeline-model">transactional model</a>: If B is the finalize barrier of a Job J, then the entity group parent of B is J. Run barriers do not have an entity group parent.
[ "Returns", "the", "entity", "group", "parent", "of", "a", "Barrier", "of", "the", "specified", "type", ".", "<p", ">", "According", "to", "our", "<a", "href", "=", "http", ":", "//", "goto", "/", "java", "-", "pipeline", "-", "model", ">", "transaction...
train
https://github.com/GoogleCloudPlatform/appengine-pipelines/blob/277394648dac3e8214677af898935d07399ac8e1/java/src/main/java/com/google/appengine/tools/pipeline/impl/model/Barrier.java#L82-L93
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toMultiLineStringFromOptions
public MultiLineString toMultiLineStringFromOptions( MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) { """ Convert a {@link MultiPolylineOptions} to a {@link MultiLineString} @param multiPolylineOptions multi polyline options @param hasZ has z flag...
java
public MultiLineString toMultiLineStringFromOptions( MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) { MultiLineString multiLineString = new MultiLineString(hasZ, hasM); for (PolylineOptions polyline : multiPolylineOptions .getPolylineOpti...
[ "public", "MultiLineString", "toMultiLineStringFromOptions", "(", "MultiPolylineOptions", "multiPolylineOptions", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "MultiLineString", "multiLineString", "=", "new", "MultiLineString", "(", "hasZ", ",", "hasM", ")"...
Convert a {@link MultiPolylineOptions} to a {@link MultiLineString} @param multiPolylineOptions multi polyline options @param hasZ has z flag @param hasM has m flag @return multi line string
[ "Convert", "a", "{", "@link", "MultiPolylineOptions", "}", "to", "a", "{", "@link", "MultiLineString", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L935-L948
apache/flink
flink-core/src/main/java/org/apache/flink/util/StringUtils.java
StringUtils.getRandomString
public static String getRandomString(Random rnd, int minLength, int maxLength, char minValue, char maxValue) { """ Creates a random string with a length within the given interval. The string contains only characters that can be represented as a single code point. @param rnd The random used to create the string...
java
public static String getRandomString(Random rnd, int minLength, int maxLength, char minValue, char maxValue) { int len = rnd.nextInt(maxLength - minLength + 1) + minLength; char[] data = new char[len]; int diff = maxValue - minValue + 1; for (int i = 0; i < data.length; i++) { data[i] = (char) (rnd.nextInt...
[ "public", "static", "String", "getRandomString", "(", "Random", "rnd", ",", "int", "minLength", ",", "int", "maxLength", ",", "char", "minValue", ",", "char", "maxValue", ")", "{", "int", "len", "=", "rnd", ".", "nextInt", "(", "maxLength", "-", "minLength...
Creates a random string with a length within the given interval. The string contains only characters that can be represented as a single code point. @param rnd The random used to create the strings. @param minLength The minimum string length. @param maxLength The maximum string length (inclusive). @param minValue The ...
[ "Creates", "a", "random", "string", "with", "a", "length", "within", "the", "given", "interval", ".", "The", "string", "contains", "only", "characters", "that", "can", "be", "represented", "as", "a", "single", "code", "point", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/StringUtils.java#L240-L250
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/CategoryGraph.java
CategoryGraph.getPathLengthInNodes
public int getPathLengthInNodes(Category node1, Category node2) throws WikiApiException { """ Gets the path length between two category nodes - measured in "nodes". @param node1 The first node. @param node2 The second node. @return The number of nodes of the path between node1 and node2. 0, if the nodes are ide...
java
public int getPathLengthInNodes(Category node1, Category node2) throws WikiApiException { int retValue = getPathLengthInEdges(node1, node2); if (retValue == 0) { return 0; } else if (retValue > 0) { return (--retValue); } else if (retValue == -1)...
[ "public", "int", "getPathLengthInNodes", "(", "Category", "node1", ",", "Category", "node2", ")", "throws", "WikiApiException", "{", "int", "retValue", "=", "getPathLengthInEdges", "(", "node1", ",", "node2", ")", ";", "if", "(", "retValue", "==", "0", ")", ...
Gets the path length between two category nodes - measured in "nodes". @param node1 The first node. @param node2 The second node. @return The number of nodes of the path between node1 and node2. 0, if the nodes are identical or neighbors. -1, if no path exists.
[ "Gets", "the", "path", "length", "between", "two", "category", "nodes", "-", "measured", "in", "nodes", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/CategoryGraph.java#L779-L795
sebastiangraf/jSCSI
bundles/targetExtensions/scsi/src/org/jscsi/scsi/tasks/management/DefaultTaskSet.java
DefaultTaskSet.poll
public Task poll(long timeout, TimeUnit unit) throws InterruptedException { """ Retrieves and removes the task at the head of the queue. Blocks on both an empty set and all blocking boundaries specified in SAM-2. <p> The maximum wait time is twice the timeout. This occurs because first we wait for the set to b...
java
public Task poll(long timeout, TimeUnit unit) throws InterruptedException { lock.lockInterruptibly(); try { // wait for the set to be not empty timeout = unit.toNanos(timeout); while (this.dormant.size() == 0) { _logger.trace("Task set empt...
[ "public", "Task", "poll", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "lock", ".", "lockInterruptibly", "(", ")", ";", "try", "{", "// wait for the set to be not empty\r", "timeout", "=", "unit", ".", "toNanos", "...
Retrieves and removes the task at the head of the queue. Blocks on both an empty set and all blocking boundaries specified in SAM-2. <p> The maximum wait time is twice the timeout. This occurs because first we wait for the set to be not empty, then we wait for the task to be unblocked.
[ "Retrieves", "and", "removes", "the", "task", "at", "the", "head", "of", "the", "queue", ".", "Blocks", "on", "both", "an", "empty", "set", "and", "all", "blocking", "boundaries", "specified", "in", "SAM", "-", "2", ".", "<p", ">", "The", "maximum", "w...
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/targetExtensions/scsi/src/org/jscsi/scsi/tasks/management/DefaultTaskSet.java#L350-L404
saxsys/SynchronizeFX
transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java
SychronizeFXWebsocketServer.onOpen
public void onOpen(final Session session, final String channelName) { """ Pass {@link OnOpen} events of the Websocket API to this method to handle new clients. @param session The client that has connected. @param channelName The name of the channel this client connected too. @throws IllegalArgumentException I...
java
public void onOpen(final Session session, final String channelName) { final SynchronizeFXWebsocketChannel channel; synchronized (channels) { channel = getChannelOrFail(channelName); clients.put(session, channel); } channel.newClient(session); }
[ "public", "void", "onOpen", "(", "final", "Session", "session", ",", "final", "String", "channelName", ")", "{", "final", "SynchronizeFXWebsocketChannel", "channel", ";", "synchronized", "(", "channels", ")", "{", "channel", "=", "getChannelOrFail", "(", "channelN...
Pass {@link OnOpen} events of the Websocket API to this method to handle new clients. @param session The client that has connected. @param channelName The name of the channel this client connected too. @throws IllegalArgumentException If the channel passed as argument does not exist.
[ "Pass", "{", "@link", "OnOpen", "}", "events", "of", "the", "Websocket", "API", "to", "this", "method", "to", "handle", "new", "clients", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java#L172-L179
ReactiveX/RxNetty
rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java
TrailingHeaders.addHeader
public TrailingHeaders addHeader(CharSequence name, Object value) { """ Adds an HTTP trailing header with the passed {@code name} and {@code value} to this request. @param name Name of the header. @param value Value for the header. @return {@code this}. """ lastHttpContent.trailingHeaders().add(...
java
public TrailingHeaders addHeader(CharSequence name, Object value) { lastHttpContent.trailingHeaders().add(name, value); return this; }
[ "public", "TrailingHeaders", "addHeader", "(", "CharSequence", "name", ",", "Object", "value", ")", "{", "lastHttpContent", ".", "trailingHeaders", "(", ")", ".", "add", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds an HTTP trailing header with the passed {@code name} and {@code value} to this request. @param name Name of the header. @param value Value for the header. @return {@code this}.
[ "Adds", "an", "HTTP", "trailing", "header", "with", "the", "passed", "{", "@code", "name", "}", "and", "{", "@code", "value", "}", "to", "this", "request", "." ]
train
https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java#L49-L52
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseDoubleObj
@Nullable public static Double parseDoubleObj (@Nullable final String sStr, @Nullable final Double aDefault) { """ Parse the given {@link String} as {@link Double}. Note: both the locale independent form of a double can be parsed here (e.g. 4.523) as well as a localized form using the comma as the decimal sepa...
java
@Nullable public static Double parseDoubleObj (@Nullable final String sStr, @Nullable final Double aDefault) { final double dValue = parseDouble (sStr, Double.NaN); return Double.isNaN (dValue) ? aDefault : Double.valueOf (dValue); }
[ "@", "Nullable", "public", "static", "Double", "parseDoubleObj", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "Double", "aDefault", ")", "{", "final", "double", "dValue", "=", "parseDouble", "(", "sStr", ",", "Double", ".",...
Parse the given {@link String} as {@link Double}. Note: both the locale independent form of a double can be parsed here (e.g. 4.523) as well as a localized form using the comma as the decimal separator (e.g. the German 4,523). @param sStr The string to parse. May be <code>null</code>. @param aDefault The default value...
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "{", "@link", "Double", "}", ".", "Note", ":", "both", "the", "locale", "independent", "form", "of", "a", "double", "can", "be", "parsed", "here", "(", "e", ".", "g", ".", "4", ".", "523",...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L567-L572
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java
MLEDependencyGrammar.addRule
public void addRule(IntDependency dependency, double count) { """ Add this dependency with the given count to the grammar. This is the main entry point of MLEDependencyGrammarExtractor. This is a dependency represented in the full tag space. """ if ( ! directional) { dependency = new IntDependenc...
java
public void addRule(IntDependency dependency, double count) { if ( ! directional) { dependency = new IntDependency(dependency.head, dependency.arg, false, dependency.distance); } if (verbose) System.err.println("Adding dep " + dependency); // coreDependencies.incrementCount(dependency, cou...
[ "public", "void", "addRule", "(", "IntDependency", "dependency", ",", "double", "count", ")", "{", "if", "(", "!", "directional", ")", "{", "dependency", "=", "new", "IntDependency", "(", "dependency", ".", "head", ",", "dependency", ".", "arg", ",", "fals...
Add this dependency with the given count to the grammar. This is the main entry point of MLEDependencyGrammarExtractor. This is a dependency represented in the full tag space.
[ "Add", "this", "dependency", "with", "the", "given", "count", "to", "the", "grammar", ".", "This", "is", "the", "main", "entry", "point", "of", "MLEDependencyGrammarExtractor", ".", "This", "is", "a", "dependency", "represented", "in", "the", "full", "tag", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java#L343-L359
grpc/grpc-java
stub/src/main/java/io/grpc/stub/AbstractStub.java
AbstractStub.withOption
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869") public final <T> S withOption(CallOptions.Key<T> key, T value) { """ Sets a custom option to be passed to client interceptors on the channel {@link io.grpc.ClientInterceptor} via the CallOptions parameter. @since 1.0.0 @param key the option b...
java
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1869") public final <T> S withOption(CallOptions.Key<T> key, T value) { return build(channel, callOptions.withOption(key, value)); }
[ "@", "ExperimentalApi", "(", "\"https://github.com/grpc/grpc-java/issues/1869\"", ")", "public", "final", "<", "T", ">", "S", "withOption", "(", "CallOptions", ".", "Key", "<", "T", ">", "key", ",", "T", "value", ")", "{", "return", "build", "(", "channel", ...
Sets a custom option to be passed to client interceptors on the channel {@link io.grpc.ClientInterceptor} via the CallOptions parameter. @since 1.0.0 @param key the option being set @param value the value for the key
[ "Sets", "a", "custom", "option", "to", "be", "passed", "to", "client", "interceptors", "on", "the", "channel", "{", "@link", "io", ".", "grpc", ".", "ClientInterceptor", "}", "via", "the", "CallOptions", "parameter", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/AbstractStub.java#L174-L177
operasoftware/operaprestodriver
src/com/opera/core/systems/QuickWidget.java
QuickWidget.dragAndDropOn
public void dragAndDropOn(QuickWidget widget, DropPosition dropPos) { """ Drags this widget onto the specified widget at the given drop position @param widget the widget to drop this widget onto @param dropPos the position to drop this widget into, CENTER, EDGE or BETWEEN """ /* ...
java
public void dragAndDropOn(QuickWidget widget, DropPosition dropPos) { /* * FIXME: Handle MousePosition */ Point currentLocation = getCenterLocation(); Point dropPoint = getDropPoint(widget, dropPos); List<ModifierPressed> alist = new ArrayList<ModifierP...
[ "public", "void", "dragAndDropOn", "(", "QuickWidget", "widget", ",", "DropPosition", "dropPos", ")", "{", "/*\n * FIXME: Handle MousePosition\n */", "Point", "currentLocation", "=", "getCenterLocation", "(", ")", ";", "Point", ...
Drags this widget onto the specified widget at the given drop position @param widget the widget to drop this widget onto @param dropPos the position to drop this widget into, CENTER, EDGE or BETWEEN
[ "Drags", "this", "widget", "onto", "the", "specified", "widget", "at", "the", "given", "drop", "position" ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/QuickWidget.java#L136-L149