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
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java
KeyValueHandler.handleObserveRequest
private static BinaryMemcacheRequest handleObserveRequest(final ChannelHandlerContext ctx, final ObserveRequest msg) { """ Encodes a {@link ObserveRequest} into its lower level representation. @return a ready {@link BinaryMemcacheRequest}. """ String key = msg.key(); short keyLength ...
java
private static BinaryMemcacheRequest handleObserveRequest(final ChannelHandlerContext ctx, final ObserveRequest msg) { String key = msg.key(); short keyLength = (short) msg.keyBytes().length; ByteBuf content = ctx.alloc().buffer(); content.writeShort(msg.partition()); con...
[ "private", "static", "BinaryMemcacheRequest", "handleObserveRequest", "(", "final", "ChannelHandlerContext", "ctx", ",", "final", "ObserveRequest", "msg", ")", "{", "String", "key", "=", "msg", ".", "key", "(", ")", ";", "short", "keyLength", "=", "(", "short", ...
Encodes a {@link ObserveRequest} into its lower level representation. @return a ready {@link BinaryMemcacheRequest}.
[ "Encodes", "a", "{", "@link", "ObserveRequest", "}", "into", "its", "lower", "level", "representation", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueHandler.java#L668-L681
virgo47/javasimon
examples/src/main/java/org/javasimon/examples/jmx/MonitoredApplication.java
MonitoredApplication.doInsert
protected final void doInsert(Connection c) throws SQLException { """ Executes prepared insert into table <i>foo</i>. @param c connection to DB @throws SQLException if something goes wrong """ PreparedStatement stmt = null; try { stmt = c.prepareStatement("insert into foo values (?, ?) "); s...
java
protected final void doInsert(Connection c) throws SQLException { PreparedStatement stmt = null; try { stmt = c.prepareStatement("insert into foo values (?, ?) "); stmt.setInt(1, rand.nextInt(99999)); stmt.setString(2, "This is a text"); stmt.executeUpdate(); } finally { if (stmt != null) ...
[ "protected", "final", "void", "doInsert", "(", "Connection", "c", ")", "throws", "SQLException", "{", "PreparedStatement", "stmt", "=", "null", ";", "try", "{", "stmt", "=", "c", ".", "prepareStatement", "(", "\"insert into foo values (?, ?) \"", ")", ";", "stm...
Executes prepared insert into table <i>foo</i>. @param c connection to DB @throws SQLException if something goes wrong
[ "Executes", "prepared", "insert", "into", "table", "<i", ">", "foo<", "/", "i", ">", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/examples/src/main/java/org/javasimon/examples/jmx/MonitoredApplication.java#L58-L70
davidmoten/rxjava2-extras
src/main/java/com/github/davidmoten/rx2/flowable/Transformers.java
Transformers.collectStats
@SuppressWarnings("unchecked") public static <T extends Number> FlowableTransformer<T, Statistics> collectStats() { """ <p> Converts a stream of {@code Number} to a stream of {@link Statistics} about those numbers. <p> <img src= "https://raw.githubusercontent.com/davidmoten/rxjava2-extras/master/src/doc...
java
@SuppressWarnings("unchecked") public static <T extends Number> FlowableTransformer<T, Statistics> collectStats() { return (FlowableTransformer<T, Statistics>) CollectStatsHolder.INSTANCE; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "Number", ">", "FlowableTransformer", "<", "T", ",", "Statistics", ">", "collectStats", "(", ")", "{", "return", "(", "FlowableTransformer", "<", "T", ",", "Statistics...
<p> Converts a stream of {@code Number} to a stream of {@link Statistics} about those numbers. <p> <img src= "https://raw.githubusercontent.com/davidmoten/rxjava2-extras/master/src/docs/collectStats.png" alt="image"> @param <T> item type @return transformer that converts a stream of Number to a stream of Statistics
[ "<p", ">", "Converts", "a", "stream", "of", "{", "@code", "Number", "}", "to", "a", "stream", "of", "{", "@link", "Statistics", "}", "about", "those", "numbers", "." ]
train
https://github.com/davidmoten/rxjava2-extras/blob/bf5ece3f97191f29a81957a6529bc3cfa4d7b328/src/main/java/com/github/davidmoten/rx2/flowable/Transformers.java#L169-L172
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <T1, R> Func1<T1, Observable<R>> toAsync(Func1<? super T1, ? extends R> func) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param...
java
public static <T1, R> Func1<T1, Observable<R>> toAsync(Func1<? super T1, ? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "R", ">", "Func1", "<", "T1", ",", "Observable", "<", "R", ">", ">", "toAsync", "(", "Func1", "<", "?", "super", "T1", ",", "?", "extends", "R", ">", "func", ")", "{", "return", "toAsync", "(", "func", ",", "...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <T1> first parameter type of the action @param <R> the result type @param func the function to convert @re...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L207-L209
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/category/CmsCategoryTree.java
CmsCategoryTree.setListEnabled
private void setListEnabled(CmsList<? extends I_CmsListItem> list, boolean enabled, String disabledReason) { """ Sets the given tree list enabled/disabled.<p> @param list the list of tree items @param enabled <code>true</code> to enable @param disabledReason the disable reason, will be displayed as check box ...
java
private void setListEnabled(CmsList<? extends I_CmsListItem> list, boolean enabled, String disabledReason) { for (Widget child : list) { CmsTreeItem treeItem = (CmsTreeItem)child; if (enabled) { treeItem.getCheckBox().enable(); } else { ...
[ "private", "void", "setListEnabled", "(", "CmsList", "<", "?", "extends", "I_CmsListItem", ">", "list", ",", "boolean", "enabled", ",", "String", "disabledReason", ")", "{", "for", "(", "Widget", "child", ":", "list", ")", "{", "CmsTreeItem", "treeItem", "="...
Sets the given tree list enabled/disabled.<p> @param list the list of tree items @param enabled <code>true</code> to enable @param disabledReason the disable reason, will be displayed as check box title
[ "Sets", "the", "given", "tree", "list", "enabled", "/", "disabled", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/category/CmsCategoryTree.java#L1036-L1047
spockframework/spock
spock-spring/src/main/java/org/spockframework/spring/UnwrapAopProxyExtension.java
UnwrapAopProxyExtension.getUltimateTargetObject
public static <T> T getUltimateTargetObject(Object candidate) { """ Taken from {@link org.springframework.test.util.AopTestUtils#getUltimateTargetObject(java.lang.Object)} and copied to provide support for versions earlier then Spring 4.2 Get the ultimate <em>target</em> object of the supplied {@code candidate...
java
public static <T> T getUltimateTargetObject(Object candidate) { Assert.notNull(candidate, "Candidate must not be null"); try { if (AopUtils.isAopProxy(candidate) && (candidate instanceof Advised)) { Object target = ((Advised) candidate).getTargetSource().getTarget(); if (target != null) { ...
[ "public", "static", "<", "T", ">", "T", "getUltimateTargetObject", "(", "Object", "candidate", ")", "{", "Assert", ".", "notNull", "(", "candidate", ",", "\"Candidate must not be null\"", ")", ";", "try", "{", "if", "(", "AopUtils", ".", "isAopProxy", "(", "...
Taken from {@link org.springframework.test.util.AopTestUtils#getUltimateTargetObject(java.lang.Object)} and copied to provide support for versions earlier then Spring 4.2 Get the ultimate <em>target</em> object of the supplied {@code candidate} object, unwrapping not only a top-level proxy but also any number of neste...
[ "Taken", "from", "{", "@link", "org", ".", "springframework", ".", "test", ".", "util", ".", "AopTestUtils#getUltimateTargetObject", "(", "java", ".", "lang", ".", "Object", ")", "}", "and", "copied", "to", "provide", "support", "for", "versions", "earlier", ...
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-spring/src/main/java/org/spockframework/spring/UnwrapAopProxyExtension.java#L51-L65
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.chflags
public void chflags(String resourcename, int flags) throws CmsException { """ Changes the resource flags of a resource.<p> The resource flags are used to indicate various "special" conditions for a resource. Most notably, the "internal only" setting which signals that a resource can not be directly requested ...
java
public void chflags(String resourcename, int flags) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).chflags(this, m_securityManager, resource, flags); }
[ "public", "void", "chflags", "(", "String", "resourcename", ",", "int", "flags", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "readResource", "(", "resourcename", ",", "CmsResourceFilter", ".", "IGNORE_EXPIRATION", ")", ";", "getResourceType",...
Changes the resource flags of a resource.<p> The resource flags are used to indicate various "special" conditions for a resource. Most notably, the "internal only" setting which signals that a resource can not be directly requested with it's URL.<p> @param resourcename the name of the resource to change the flags for...
[ "Changes", "the", "resource", "flags", "of", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L478-L482
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
StandardAtomGenerator.generatePeriodicSymbol
AtomSymbol generatePeriodicSymbol(final int number, final int hydrogens, final int mass, final int charge, final int unpaired, HydrogenPosition position) { """ Generate an atom symbol for a periodic element with the specified number of hydrogens, ionic charge, mass, @param...
java
AtomSymbol generatePeriodicSymbol(final int number, final int hydrogens, final int mass, final int charge, final int unpaired, HydrogenPosition position) { TextOutline element = number == 0 ? new TextOutline("*", font) : new TextOu...
[ "AtomSymbol", "generatePeriodicSymbol", "(", "final", "int", "number", ",", "final", "int", "hydrogens", ",", "final", "int", "mass", ",", "final", "int", "charge", ",", "final", "int", "unpaired", ",", "HydrogenPosition", "position", ")", "{", "TextOutline", ...
Generate an atom symbol for a periodic element with the specified number of hydrogens, ionic charge, mass, @param number atomic number @param hydrogens labelled hydrogen count @param mass atomic mass @param charge ionic formal charge @param unpaired number of unpaired electrons @param position placement o...
[ "Generate", "an", "atom", "symbol", "for", "a", "periodic", "element", "with", "the", "specified", "number", "of", "hydrogens", "ionic", "charge", "mass" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L374-L410
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.classNotConfigured
public static void classNotConfigured(Class<?> clazz) { """ Thrown when the xml configuration of the clazz doesn't exist. @param clazz class to check """ throw new MappingNotFoundException(MSG.INSTANCE.message(Constants.mappingNotFoundException1, clazz.getSimpleName())); }
java
public static void classNotConfigured(Class<?> clazz){ throw new MappingNotFoundException(MSG.INSTANCE.message(Constants.mappingNotFoundException1, clazz.getSimpleName())); }
[ "public", "static", "void", "classNotConfigured", "(", "Class", "<", "?", ">", "clazz", ")", "{", "throw", "new", "MappingNotFoundException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "Constants", ".", "mappingNotFoundException1", ",", "clazz", ".", "g...
Thrown when the xml configuration of the clazz doesn't exist. @param clazz class to check
[ "Thrown", "when", "the", "xml", "configuration", "of", "the", "clazz", "doesn", "t", "exist", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L537-L539
Harium/keel
src/main/java/com/harium/keel/catalano/core/ArraysUtil.java
ArraysUtil.Argsort
public static int[] Argsort(final float[] array, final boolean ascending) { """ Returns the indices that would sort an array. @param array Array. @param ascending Ascending order. @return Array of indices. """ Integer[] indexes = new Integer[array.length]; for (int i = 0; i < indexes.l...
java
public static int[] Argsort(final float[] array, final boolean ascending) { Integer[] indexes = new Integer[array.length]; for (int i = 0; i < indexes.length; i++) { indexes[i] = i; } Arrays.sort(indexes, new Comparator<Integer>() { @Override public in...
[ "public", "static", "int", "[", "]", "Argsort", "(", "final", "float", "[", "]", "array", ",", "final", "boolean", "ascending", ")", "{", "Integer", "[", "]", "indexes", "=", "new", "Integer", "[", "array", ".", "length", "]", ";", "for", "(", "int",...
Returns the indices that would sort an array. @param array Array. @param ascending Ascending order. @return Array of indices.
[ "Returns", "the", "indices", "that", "would", "sort", "an", "array", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/ArraysUtil.java#L105-L117
trellis-ldp/trellis
components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlSerializer.java
HtmlSerializer.write
@Override public void write(final Stream<Triple> triples, final OutputStream out, final String subject) { """ Send the content to an output stream. @param triples the triples @param out the output stream @param subject the subject """ final Writer writer = new OutputStreamWriter(out, UTF_8); ...
java
@Override public void write(final Stream<Triple> triples, final OutputStream out, final String subject) { final Writer writer = new OutputStreamWriter(out, UTF_8); try { template .execute(writer, new HtmlData(namespaceService, subject, triples.collect(toList()), css, js, ...
[ "@", "Override", "public", "void", "write", "(", "final", "Stream", "<", "Triple", ">", "triples", ",", "final", "OutputStream", "out", ",", "final", "String", "subject", ")", "{", "final", "Writer", "writer", "=", "new", "OutputStreamWriter", "(", "out", ...
Send the content to an output stream. @param triples the triples @param out the output stream @param subject the subject
[ "Send", "the", "content", "to", "an", "output", "stream", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/rdfa/src/main/java/org/trellisldp/rdfa/HtmlSerializer.java#L150-L160
susom/database
src/main/java/com/github/susom/database/DatabaseProvider.java
DatabaseProvider.fromPool
@CheckReturnValue public static Builder fromPool(Pool pool) { """ Use an externally configured DataSource, Flavor, and optionally a shutdown hook. The shutdown hook may be null if you don't want calls to Builder.close() to attempt any shutdown. The DataSource and Flavor are mandatory. """ return new Bu...
java
@CheckReturnValue public static Builder fromPool(Pool pool) { return new BuilderImpl(pool.poolShutdown, () -> { try { return pool.dataSource.getConnection(); } catch (Exception e) { throw new DatabaseException("Unable to obtain a connection from the DataSource", e); } }, new ...
[ "@", "CheckReturnValue", "public", "static", "Builder", "fromPool", "(", "Pool", "pool", ")", "{", "return", "new", "BuilderImpl", "(", "pool", ".", "poolShutdown", ",", "(", ")", "->", "{", "try", "{", "return", "pool", ".", "dataSource", ".", "getConnect...
Use an externally configured DataSource, Flavor, and optionally a shutdown hook. The shutdown hook may be null if you don't want calls to Builder.close() to attempt any shutdown. The DataSource and Flavor are mandatory.
[ "Use", "an", "externally", "configured", "DataSource", "Flavor", "and", "optionally", "a", "shutdown", "hook", ".", "The", "shutdown", "hook", "may", "be", "null", "if", "you", "don", "t", "want", "calls", "to", "Builder", ".", "close", "()", "to", "attemp...
train
https://github.com/susom/database/blob/25add9e08ad863712f9b5e319b6cb826f6f97640/src/main/java/com/github/susom/database/DatabaseProvider.java#L108-L117
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/CausticUtil.java
CausticUtil.getImageData
public static ByteBuffer getImageData(InputStream source, Format format, Rectangle size) { """ Gets the {@link java.io.InputStream}'s data as a {@link java.nio.ByteBuffer}. The image data reading is done according to the {@link com.flowpowered.caustic.api.gl.Texture.Format}. The image size is stored in the passed...
java
public static ByteBuffer getImageData(InputStream source, Format format, Rectangle size) { try { final BufferedImage image = ImageIO.read(source); size.setSize(image.getWidth(), image.getHeight()); return getImageData(image, format); } catch (IOException ex) { ...
[ "public", "static", "ByteBuffer", "getImageData", "(", "InputStream", "source", ",", "Format", "format", ",", "Rectangle", "size", ")", "{", "try", "{", "final", "BufferedImage", "image", "=", "ImageIO", ".", "read", "(", "source", ")", ";", "size", ".", "...
Gets the {@link java.io.InputStream}'s data as a {@link java.nio.ByteBuffer}. The image data reading is done according to the {@link com.flowpowered.caustic.api.gl.Texture.Format}. The image size is stored in the passed {@link Rectangle} instance. The returned buffer is flipped an ready for reading. @param source The ...
[ "Gets", "the", "{", "@link", "java", ".", "io", ".", "InputStream", "}", "s", "data", "as", "a", "{", "@link", "java", ".", "nio", ".", "ByteBuffer", "}", ".", "The", "image", "data", "reading", "is", "done", "according", "to", "the", "{", "@link", ...
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/CausticUtil.java#L126-L134
Netflix/karyon
karyon2-governator/src/main/java/netflix/karyon/Karyon.java
Karyon.forRequestHandler
public static KaryonServer forRequestHandler(int port, final RequestHandler<ByteBuf, ByteBuf> handler, BootstrapModule... bootstrapModules) { """ Creates a new {@link KaryonServer} that has a single HTTP server instance which delegates all request handling to {@lin...
java
public static KaryonServer forRequestHandler(int port, final RequestHandler<ByteBuf, ByteBuf> handler, BootstrapModule... bootstrapModules) { HttpServer<ByteBuf, ByteBuf> httpServer = KaryonTransport.newHttpServer(port, new RequestHandler<ByteBuf,...
[ "public", "static", "KaryonServer", "forRequestHandler", "(", "int", "port", ",", "final", "RequestHandler", "<", "ByteBuf", ",", "ByteBuf", ">", "handler", ",", "BootstrapModule", "...", "bootstrapModules", ")", "{", "HttpServer", "<", "ByteBuf", ",", "ByteBuf", ...
Creates a new {@link KaryonServer} that has a single HTTP server instance which delegates all request handling to {@link RequestHandler}. The {@link HttpServer} is created using {@link KaryonTransport#newHttpServer(int, HttpRequestHandler)} @param port Port for the server. @param handler Request Handler @param bootstr...
[ "Creates", "a", "new", "{", "@link", "KaryonServer", "}", "that", "has", "a", "single", "HTTP", "server", "instance", "which", "delegates", "all", "request", "handling", "to", "{", "@link", "RequestHandler", "}", ".", "The", "{", "@link", "HttpServer", "}", ...
train
https://github.com/Netflix/karyon/blob/d50bc0ff37693ef3fbda373e90a109d1f92e0b9a/karyon2-governator/src/main/java/netflix/karyon/Karyon.java#L63-L74
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java
AbstractSearchStructure.setMetadata
public boolean setMetadata(int iid, Object metaData) { """ This method is used to set the metadata of a previously indexed vector. If the metadata is already set, this methods replaces it. @param iid The internal id of the vector @param metaData A java object of any class with the @persistent annotation @r...
java
public boolean setMetadata(int iid, Object metaData) { if (iid < 0 || iid > loadCounter) { System.out.println("Internal id " + iid + " is out of range!"); return false; } MetaDataEntity mde = new MetaDataEntity(iid, metaData); PrimaryIndex<Integer, MetaDataEntity> primaryIndex = iidToMetadataDB.getP...
[ "public", "boolean", "setMetadata", "(", "int", "iid", ",", "Object", "metaData", ")", "{", "if", "(", "iid", "<", "0", "||", "iid", ">", "loadCounter", ")", "{", "System", ".", "out", ".", "println", "(", "\"Internal id \"", "+", "iid", "+", "\" is ou...
This method is used to set the metadata of a previously indexed vector. If the metadata is already set, this methods replaces it. @param iid The internal id of the vector @param metaData A java object of any class with the @persistent annotation @return true if metadata is successfully set, false otherwise
[ "This", "method", "is", "used", "to", "set", "the", "metadata", "of", "a", "previously", "indexed", "vector", ".", "If", "the", "metadata", "is", "already", "set", "this", "methods", "replaces", "it", "." ]
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java#L508-L523
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/composite/CompositeTagAttributeUtils.java
CompositeTagAttributeUtils.containsUnspecifiedAttributes
public static boolean containsUnspecifiedAttributes(Tag tag, String[] standardAttributesSorted) { """ Returns true if the given Tag contains attributes that are not specified in standardAttributesSorted. NOTE that standardAttributesSorted has to be alphabetically sorted in order to use binary search. @param ta...
java
public static boolean containsUnspecifiedAttributes(Tag tag, String[] standardAttributesSorted) { for (TagAttribute attribute : tag.getAttributes().getAll()) { final String name = attribute.getLocalName(); if (Arrays.binarySearch(standardAttributesSorted, name) < 0) ...
[ "public", "static", "boolean", "containsUnspecifiedAttributes", "(", "Tag", "tag", ",", "String", "[", "]", "standardAttributesSorted", ")", "{", "for", "(", "TagAttribute", "attribute", ":", "tag", ".", "getAttributes", "(", ")", ".", "getAll", "(", ")", ")",...
Returns true if the given Tag contains attributes that are not specified in standardAttributesSorted. NOTE that standardAttributesSorted has to be alphabetically sorted in order to use binary search. @param tag @param standardAttributesSorted @return
[ "Returns", "true", "if", "the", "given", "Tag", "contains", "attributes", "that", "are", "not", "specified", "in", "standardAttributesSorted", ".", "NOTE", "that", "standardAttributesSorted", "has", "to", "be", "alphabetically", "sorted", "in", "order", "to", "use...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/composite/CompositeTagAttributeUtils.java#L76-L87
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/randomizers/range/LongRangeRandomizer.java
LongRangeRandomizer.aNewLongRangeRandomizer
public static LongRangeRandomizer aNewLongRangeRandomizer(final Long min, final Long max, final long seed) { """ Create a new {@link LongRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link LongRangeRandomizer}. """ return new LongRangeRandom...
java
public static LongRangeRandomizer aNewLongRangeRandomizer(final Long min, final Long max, final long seed) { return new LongRangeRandomizer(min, max, seed); }
[ "public", "static", "LongRangeRandomizer", "aNewLongRangeRandomizer", "(", "final", "Long", "min", ",", "final", "Long", "max", ",", "final", "long", "seed", ")", "{", "return", "new", "LongRangeRandomizer", "(", "min", ",", "max", ",", "seed", ")", ";", "}"...
Create a new {@link LongRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link LongRangeRandomizer}.
[ "Create", "a", "new", "{", "@link", "LongRangeRandomizer", "}", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/randomizers/range/LongRangeRandomizer.java#L73-L75
briandilley/jsonrpc4j
src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java
JsonRpcClient.writeNotification
public void writeNotification(String methodName, Object argument, OutputStream output) throws IOException { """ Writes a JSON-RPC notification to the given {@link OutputStream}. @param methodName the method to invoke @param argument the method argument @param output the {@link OutputStream} to write to...
java
public void writeNotification(String methodName, Object argument, OutputStream output) throws IOException { internalWriteRequest(methodName, argument, output, null); }
[ "public", "void", "writeNotification", "(", "String", "methodName", ",", "Object", "argument", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "internalWriteRequest", "(", "methodName", ",", "argument", ",", "output", ",", "null", ")", ";", "}"...
Writes a JSON-RPC notification to the given {@link OutputStream}. @param methodName the method to invoke @param argument the method argument @param output the {@link OutputStream} to write to @throws IOException on error @see #writeRequest(String, Object, OutputStream, String)
[ "Writes", "a", "JSON", "-", "RPC", "notification", "to", "the", "given", "{", "@link", "OutputStream", "}", "." ]
train
https://github.com/briandilley/jsonrpc4j/blob/d749762c9295b92d893677a8c7be2a14dd43b3bb/src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java#L569-L571
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/Forward.java
Forward.addQueryParam
public void addQueryParam( String paramName, String value ) { """ Add a query parameter to the URI returned by {@link #getPath}. @param paramName the name of the query parameter. @param value the value of the query parameter, or <code>null</code> if there is no value. """ if ( _queryString == null ...
java
public void addQueryParam( String paramName, String value ) { if ( _queryString == null ) { _queryString = new InternalStringBuilder( "?" ); } else { _queryString.append( '&' ); } _queryString.append( paramName ); ...
[ "public", "void", "addQueryParam", "(", "String", "paramName", ",", "String", "value", ")", "{", "if", "(", "_queryString", "==", "null", ")", "{", "_queryString", "=", "new", "InternalStringBuilder", "(", "\"?\"", ")", ";", "}", "else", "{", "_queryString",...
Add a query parameter to the URI returned by {@link #getPath}. @param paramName the name of the query parameter. @param value the value of the query parameter, or <code>null</code> if there is no value.
[ "Add", "a", "query", "parameter", "to", "the", "URI", "returned", "by", "{", "@link", "#getPath", "}", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/Forward.java#L918-L935
esigate/esigate
esigate-core/src/main/java/org/esigate/Driver.java
Driver.performRendering
private CloseableHttpResponse performRendering(String pageUrl, DriverRequest originalRequest, CloseableHttpResponse response, Renderer[] renderers) throws HttpErrorPage, IOException { """ Performs rendering on an HttpResponse. <p> Rendering is only performed if page can be parsed. @param pageUrl ...
java
private CloseableHttpResponse performRendering(String pageUrl, DriverRequest originalRequest, CloseableHttpResponse response, Renderer[] renderers) throws HttpErrorPage, IOException { if (!contentTypeHelper.isTextContentType(response)) { LOG.debug("'{}' is binary on no transformation to...
[ "private", "CloseableHttpResponse", "performRendering", "(", "String", "pageUrl", ",", "DriverRequest", "originalRequest", ",", "CloseableHttpResponse", "response", ",", "Renderer", "[", "]", "renderers", ")", "throws", "HttpErrorPage", ",", "IOException", "{", "if", ...
Performs rendering on an HttpResponse. <p> Rendering is only performed if page can be parsed. @param pageUrl The remove url from which the body was retrieved. @param originalRequest The request received by esigate. @param response The response which will be rendered. @param renderers list of renderers to apply. @retur...
[ "Performs", "rendering", "on", "an", "HttpResponse", ".", "<p", ">", "Rendering", "is", "only", "performed", "if", "page", "can", "be", "parsed", "." ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/Driver.java#L356-L380
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
public static <T> T getAt(Iterator<T> self, int idx) { """ Support the subscript operator for an Iterator. The iterator will be partially exhausted up until the idx entry after returning if a +ve or 0 idx is used, or fully exhausted if a -ve idx is used or no corresponding entry was found. Typical usage: <pre ...
java
public static <T> T getAt(Iterator<T> self, int idx) { if (idx < 0) { // calculate whole list in this case // recommend avoiding -ve's as this is not as efficient List<T> list = toList(self); int adjustedIndex = idx + list.size(); if (adjustedIndex < 0...
[ "public", "static", "<", "T", ">", "T", "getAt", "(", "Iterator", "<", "T", ">", "self", ",", "int", "idx", ")", "{", "if", "(", "idx", "<", "0", ")", "{", "// calculate whole list in this case", "// recommend avoiding -ve's as this is not as efficient", "List",...
Support the subscript operator for an Iterator. The iterator will be partially exhausted up until the idx entry after returning if a +ve or 0 idx is used, or fully exhausted if a -ve idx is used or no corresponding entry was found. Typical usage: <pre class="groovyTestCase"> def iter = [2, "a", 5.3].iterator() assert i...
[ "Support", "the", "subscript", "operator", "for", "an", "Iterator", ".", "The", "iterator", "will", "be", "partially", "exhausted", "up", "until", "the", "idx", "entry", "after", "returning", "if", "a", "+", "ve", "or", "0", "idx", "is", "used", "or", "f...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L7894-L7915
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.Float
public JBBPDslBuilder Float(final String name) { """ Add named float field @param name name of the field, can be null for anonymous @return the builder instance, must not be null """ final Item item = new Item(BinType.FLOAT, name, this.byteOrder); this.addItem(item); return this; }
java
public JBBPDslBuilder Float(final String name) { final Item item = new Item(BinType.FLOAT, name, this.byteOrder); this.addItem(item); return this; }
[ "public", "JBBPDslBuilder", "Float", "(", "final", "String", "name", ")", "{", "final", "Item", "item", "=", "new", "Item", "(", "BinType", ".", "FLOAT", ",", "name", ",", "this", ".", "byteOrder", ")", ";", "this", ".", "addItem", "(", "item", ")", ...
Add named float field @param name name of the field, can be null for anonymous @return the builder instance, must not be null
[ "Add", "named", "float", "field" ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1223-L1227
lucee/Lucee
core/src/main/java/lucee/commons/img/Captcha.java
Captcha.writeOut
public static void writeOut(BufferedImage image, OutputStream os, String format) throws IOException { """ write out image object to a output stream @param image @param os @param format @throws IOException """ ImageIO.write(image, format, os); }
java
public static void writeOut(BufferedImage image, OutputStream os, String format) throws IOException { ImageIO.write(image, format, os); }
[ "public", "static", "void", "writeOut", "(", "BufferedImage", "image", ",", "OutputStream", "os", ",", "String", "format", ")", "throws", "IOException", "{", "ImageIO", ".", "write", "(", "image", ",", "format", ",", "os", ")", ";", "}" ]
write out image object to a output stream @param image @param os @param format @throws IOException
[ "write", "out", "image", "object", "to", "a", "output", "stream" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/img/Captcha.java#L51-L54
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.deleteAllSeries
public Result<DeleteSummary> deleteAllSeries() { """ Deletes all Series in a database. @return A DeleteSummary providing information about the series deleted. @see DeleteSummary @since 1.0.0 """ URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/", API_VERS...
java
public Result<DeleteSummary> deleteAllSeries() { URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/", API_VERSION)); builder.addParameter("allow_truncation", "true"); uri = builder.build(); } catch (URISyntaxException e) { String message = "Could not...
[ "public", "Result", "<", "DeleteSummary", ">", "deleteAllSeries", "(", ")", "{", "URI", "uri", "=", "null", ";", "try", "{", "URIBuilder", "builder", "=", "new", "URIBuilder", "(", "String", ".", "format", "(", "\"/%s/series/\"", ",", "API_VERSION", ")", "...
Deletes all Series in a database. @return A DeleteSummary providing information about the series deleted. @see DeleteSummary @since 1.0.0
[ "Deletes", "all", "Series", "in", "a", "database", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L272-L286
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java
BaseLuceneStorage.doGet
protected Document doGet(String spaceId, String key) throws IOException { """ Fetch a document, identified by {@code spaceId:key}, from index. @param spaceId @param key @return @throws IOException """ Term termGet = buildIdTerm(spaceId, key); IndexSearcher indexSearcher = getIndexSearcher...
java
protected Document doGet(String spaceId, String key) throws IOException { Term termGet = buildIdTerm(spaceId, key); IndexSearcher indexSearcher = getIndexSearcher(); TopDocs result = indexSearcher.search(new TermQuery(termGet), 1); ScoreDoc[] hits = result != null ? result.scoreDocs : nu...
[ "protected", "Document", "doGet", "(", "String", "spaceId", ",", "String", "key", ")", "throws", "IOException", "{", "Term", "termGet", "=", "buildIdTerm", "(", "spaceId", ",", "key", ")", ";", "IndexSearcher", "indexSearcher", "=", "getIndexSearcher", "(", ")...
Fetch a document, identified by {@code spaceId:key}, from index. @param spaceId @param key @return @throws IOException
[ "Fetch", "a", "document", "identified", "by", "{", "@code", "spaceId", ":", "key", "}", "from", "index", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/lucene/BaseLuceneStorage.java#L296-L303
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java
AnnotationTypeElementDocImpl.defaultValue
public AnnotationValue defaultValue() { """ Returns the default value of this element. Returns null if this element has no default. """ return (sym.defaultValue == null) ? null : new AnnotationValueImpl(env, sym.defaultValue); }
java
public AnnotationValue defaultValue() { return (sym.defaultValue == null) ? null : new AnnotationValueImpl(env, sym.defaultValue); }
[ "public", "AnnotationValue", "defaultValue", "(", ")", "{", "return", "(", "sym", ".", "defaultValue", "==", "null", ")", "?", "null", ":", "new", "AnnotationValueImpl", "(", "env", ",", "sym", ".", "defaultValue", ")", ";", "}" ]
Returns the default value of this element. Returns null if this element has no default.
[ "Returns", "the", "default", "value", "of", "this", "element", ".", "Returns", "null", "if", "this", "element", "has", "no", "default", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/AnnotationTypeElementDocImpl.java#L85-L89
btrplace/scheduler
api/src/main/java/org/btrplace/plan/event/Action.java
Action.applyEvents
public boolean applyEvents(Hook k, Model i) { """ Apply the events attached to a given hook. @param k the hook @param i the model to modify with the application of the events @return {@code true} iff all the events were applied successfully """ for (Event n : getEvents(k)) { if (!n.app...
java
public boolean applyEvents(Hook k, Model i) { for (Event n : getEvents(k)) { if (!n.apply(i)) { return false; } } return true; }
[ "public", "boolean", "applyEvents", "(", "Hook", "k", ",", "Model", "i", ")", "{", "for", "(", "Event", "n", ":", "getEvents", "(", "k", ")", ")", "{", "if", "(", "!", "n", ".", "apply", "(", "i", ")", ")", "{", "return", "false", ";", "}", "...
Apply the events attached to a given hook. @param k the hook @param i the model to modify with the application of the events @return {@code true} iff all the events were applied successfully
[ "Apply", "the", "events", "attached", "to", "a", "given", "hook", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/plan/event/Action.java#L107-L114
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addEqualsCondition
protected void addEqualsCondition(final String propertyName, final String value) { """ Add a Field Search Condition that will search a field for a specified value using the following SQL logic: {@code field = 'value'} @param propertyName The name of the field as defined in the Entity mapping class. @param val...
java
protected void addEqualsCondition(final String propertyName, final String value) { addEqualsCondition(getRootPath().get(propertyName).as(String.class), value); }
[ "protected", "void", "addEqualsCondition", "(", "final", "String", "propertyName", ",", "final", "String", "value", ")", "{", "addEqualsCondition", "(", "getRootPath", "(", ")", ".", "get", "(", "propertyName", ")", ".", "as", "(", "String", ".", "class", ")...
Add a Field Search Condition that will search a field for a specified value using the following SQL logic: {@code field = 'value'} @param propertyName The name of the field as defined in the Entity mapping class. @param value The value to search against.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "search", "a", "field", "for", "a", "specified", "value", "using", "the", "following", "SQL", "logic", ":", "{", "@code", "field", "=", "value", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L441-L443
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/Preserve.java
Preserve.newPreserve
public static List<Preserve> newPreserve(Collection<VM> vms, String r, int q) { """ Make multiple constraints @param vms the VMs involved in the constraints @param r the resource identifier @param q the the minimum amount of resources to allocate to each VM. >= 0 @return a list of constraints """ ...
java
public static List<Preserve> newPreserve(Collection<VM> vms, String r, int q) { return vms.stream().map(v -> new Preserve(v, r, q)).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "Preserve", ">", "newPreserve", "(", "Collection", "<", "VM", ">", "vms", ",", "String", "r", ",", "int", "q", ")", "{", "return", "vms", ".", "stream", "(", ")", ".", "map", "(", "v", "->", "new", "Preserve", "(", ...
Make multiple constraints @param vms the VMs involved in the constraints @param r the resource identifier @param q the the minimum amount of resources to allocate to each VM. >= 0 @return a list of constraints
[ "Make", "multiple", "constraints" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/Preserve.java#L133-L135
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/AbstractJPAComponent.java
AbstractJPAComponent.hasAppManagedPC
@Override public boolean hasAppManagedPC(Collection<InjectionBinding<?>> injectionBindings, String ejbName, Set<String> persistenceRefNames) { """ 465813 // switch to 'bindings' d511673 """ return JPAExE...
java
@Override public boolean hasAppManagedPC(Collection<InjectionBinding<?>> injectionBindings, String ejbName, Set<String> persistenceRefNames) { return JPAExEntityManager.hasAppManagedPC(injectionBindings, ejbName, persistenceRefNames);...
[ "@", "Override", "public", "boolean", "hasAppManagedPC", "(", "Collection", "<", "InjectionBinding", "<", "?", ">", ">", "injectionBindings", ",", "String", "ejbName", ",", "Set", "<", "String", ">", "persistenceRefNames", ")", "{", "return", "JPAExEntityManager",...
465813 // switch to 'bindings' d511673
[ "465813", "//", "switch", "to", "bindings", "d511673" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/AbstractJPAComponent.java#L333-L339
beanshell/beanshell
src/main/java/bsh/Invocable.java
Invocable.invokeTarget
private synchronized Object invokeTarget(Object base, Object[] pars) throws Throwable { """ All purpose MethodHandle invoke implementation, with or without args. @param base represents the base object instance. @param pars parameter arguments @return invocation result @throws Throwable combined exc...
java
private synchronized Object invokeTarget(Object base, Object[] pars) throws Throwable { Reflect.logInvokeMethod("Invoking method (entry): ", this, pars); List<Object> params = collectParamaters(base, pars); Reflect.logInvokeMethod("Invoking method (after): ", this, params); i...
[ "private", "synchronized", "Object", "invokeTarget", "(", "Object", "base", ",", "Object", "[", "]", "pars", ")", "throws", "Throwable", "{", "Reflect", ".", "logInvokeMethod", "(", "\"Invoking method (entry): \"", ",", "this", ",", "pars", ")", ";", "List", "...
All purpose MethodHandle invoke implementation, with or without args. @param base represents the base object instance. @param pars parameter arguments @return invocation result @throws Throwable combined exceptions
[ "All", "purpose", "MethodHandle", "invoke", "implementation", "with", "or", "without", "args", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Invocable.java#L189-L199
mockito/mockito
src/main/java/org/mockito/internal/stubbing/InvocationContainerImpl.java
InvocationContainerImpl.addAnswer
public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive, Strictness stubbingStrictness) { """ Adds new stubbed answer and returns the invocation matcher the answer was added to. """ Invocation invocation = invocationForStubbing.getInvocation(); mockingProgress().stubbingC...
java
public StubbedInvocationMatcher addAnswer(Answer answer, boolean isConsecutive, Strictness stubbingStrictness) { Invocation invocation = invocationForStubbing.getInvocation(); mockingProgress().stubbingCompleted(); if (answer instanceof ValidableAnswer) { ((ValidableAnswer) answer).v...
[ "public", "StubbedInvocationMatcher", "addAnswer", "(", "Answer", "answer", ",", "boolean", "isConsecutive", ",", "Strictness", "stubbingStrictness", ")", "{", "Invocation", "invocation", "=", "invocationForStubbing", ".", "getInvocation", "(", ")", ";", "mockingProgres...
Adds new stubbed answer and returns the invocation matcher the answer was added to.
[ "Adds", "new", "stubbed", "answer", "and", "returns", "the", "invocation", "matcher", "the", "answer", "was", "added", "to", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/stubbing/InvocationContainerImpl.java#L66-L82
aws/aws-sdk-java
aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/ReEncryptRequest.java
ReEncryptRequest.setSourceEncryptionContext
public void setSourceEncryptionContext(java.util.Map<String, String> sourceEncryptionContext) { """ <p> Encryption context used to encrypt and decrypt the data specified in the <code>CiphertextBlob</code> parameter. </p> @param sourceEncryptionContext Encryption context used to encrypt and decrypt the data s...
java
public void setSourceEncryptionContext(java.util.Map<String, String> sourceEncryptionContext) { this.sourceEncryptionContext = sourceEncryptionContext == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>( sourceEncryptionContext); }
[ "public", "void", "setSourceEncryptionContext", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "sourceEncryptionContext", ")", "{", "this", ".", "sourceEncryptionContext", "=", "sourceEncryptionContext", "==", "null", "?", "null", ":", ...
<p> Encryption context used to encrypt and decrypt the data specified in the <code>CiphertextBlob</code> parameter. </p> @param sourceEncryptionContext Encryption context used to encrypt and decrypt the data specified in the <code>CiphertextBlob</code> parameter.
[ "<p", ">", "Encryption", "context", "used", "to", "encrypt", "and", "decrypt", "the", "data", "specified", "in", "the", "<code", ">", "CiphertextBlob<", "/", "code", ">", "parameter", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kms/src/main/java/com/amazonaws/services/kms/model/ReEncryptRequest.java#L190-L193
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java
KTypeVTypeHashMap.addTo
@Override public VType addTo(KType key, VType incrementValue) { """ Adds <code>incrementValue</code> to any existing value for the given <code>key</code> or inserts <code>incrementValue</code> if <code>key</code> did not previously exist. @param key The key of the value to adjust. @param incrementValue The ...
java
@Override public VType addTo(KType key, VType incrementValue) { return putOrAdd(key, incrementValue, incrementValue); }
[ "@", "Override", "public", "VType", "addTo", "(", "KType", "key", ",", "VType", "incrementValue", ")", "{", "return", "putOrAdd", "(", "key", ",", "incrementValue", ",", "incrementValue", ")", ";", "}" ]
Adds <code>incrementValue</code> to any existing value for the given <code>key</code> or inserts <code>incrementValue</code> if <code>key</code> did not previously exist. @param key The key of the value to adjust. @param incrementValue The value to put or add to the existing value if <code>key</code> exists. @return R...
[ "Adds", "<code", ">", "incrementValue<", "/", "code", ">", "to", "any", "existing", "value", "for", "the", "given", "<code", ">", "key<", "/", "code", ">", "or", "inserts", "<code", ">", "incrementValue<", "/", "code", ">", "if", "<code", ">", "key<", ...
train
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java#L275-L279
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java
SerializerBase.fireCommentEvent
protected void fireCommentEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException { """ Report the comment trace event @param chars content of comment @param start starting index of comment to output @param length number of characters to output """ if (m_tracer != null) ...
java
protected void fireCommentEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException { if (m_tracer != null) { flushMyWriter(); m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_COMMENT, new String(chars, start, length)); } }
[ "protected", "void", "fireCommentEvent", "(", "char", "[", "]", "chars", ",", "int", "start", ",", "int", "length", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "if", "(", "m_tracer", "!=", "null", ")", "{", "flushMyWriter", ...
Report the comment trace event @param chars content of comment @param start starting index of comment to output @param length number of characters to output
[ "Report", "the", "comment", "trace", "event" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1061-L1069
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.removeFromNavigation
public void removeFromNavigation(CmsUUID entryId) { """ Removes the entry with the given site-path from navigation.<p> @param entryId the entry id """ CmsClientSitemapEntry entry = getEntryById(entryId); CmsClientSitemapEntry parent = getEntry(CmsResource.getParentFolder(entry.getSitePath()...
java
public void removeFromNavigation(CmsUUID entryId) { CmsClientSitemapEntry entry = getEntryById(entryId); CmsClientSitemapEntry parent = getEntry(CmsResource.getParentFolder(entry.getSitePath())); CmsSitemapChange change = new CmsSitemapChange(entry.getId(), entry.getSitePath(), ChangeType.remov...
[ "public", "void", "removeFromNavigation", "(", "CmsUUID", "entryId", ")", "{", "CmsClientSitemapEntry", "entry", "=", "getEntryById", "(", "entryId", ")", ";", "CmsClientSitemapEntry", "parent", "=", "getEntry", "(", "CmsResource", ".", "getParentFolder", "(", "entr...
Removes the entry with the given site-path from navigation.<p> @param entryId the entry id
[ "Removes", "the", "entry", "with", "the", "given", "site", "-", "path", "from", "navigation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L1816-L1829
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryMarshallerByType.java
BigQueryMarshallerByType.toBytes
@Override public ByteBuffer toBytes(T object) { """ Validates that the type of the object to serialize is the same as the type for which schema was generated. The type should match exactly as interface and abstract classes are not supported. """ if (!type.equals(object.getClass())) { throw new Run...
java
@Override public ByteBuffer toBytes(T object) { if (!type.equals(object.getClass())) { throw new RuntimeException( "The type of the object does not match the parameter type of this marshaller. "); } Map<String, Object> jsonObject = dataMarshaller.mapFieldNameToValue(object); ByteArrayO...
[ "@", "Override", "public", "ByteBuffer", "toBytes", "(", "T", "object", ")", "{", "if", "(", "!", "type", ".", "equals", "(", "object", ".", "getClass", "(", ")", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"The type of the object does not matc...
Validates that the type of the object to serialize is the same as the type for which schema was generated. The type should match exactly as interface and abstract classes are not supported.
[ "Validates", "that", "the", "type", "of", "the", "object", "to", "serialize", "is", "the", "same", "as", "the", "type", "for", "which", "schema", "was", "generated", ".", "The", "type", "should", "match", "exactly", "as", "interface", "and", "abstract", "c...
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQueryMarshallerByType.java#L55-L70
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/beetl/BeetlUtil.java
BeetlUtil.renderFromStr
public static Writer renderFromStr(String templateContent, Map<String, Object> bindingMap, Writer writer) { """ 渲染模板 @param templateContent 模板内容 @param bindingMap 绑定参数 @param writer {@link Writer} 渲染后写入的目标Writer @return {@link Writer} """ return render(getStrTemplate(templateContent), bindingMap, writ...
java
public static Writer renderFromStr(String templateContent, Map<String, Object> bindingMap, Writer writer) { return render(getStrTemplate(templateContent), bindingMap, writer); }
[ "public", "static", "Writer", "renderFromStr", "(", "String", "templateContent", ",", "Map", "<", "String", ",", "Object", ">", "bindingMap", ",", "Writer", "writer", ")", "{", "return", "render", "(", "getStrTemplate", "(", "templateContent", ")", ",", "bindi...
渲染模板 @param templateContent 模板内容 @param bindingMap 绑定参数 @param writer {@link Writer} 渲染后写入的目标Writer @return {@link Writer}
[ "渲染模板" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/beetl/BeetlUtil.java#L237-L239
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConfigurationImpl.java
ConfigurationImpl.getContent
@Override public Content getContent(String key, Object o) { """ Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text """ return contents.getConte...
java
@Override public Content getContent(String key, Object o) { return contents.getContent(key, o); }
[ "@", "Override", "public", "Content", "getContent", "(", "String", "key", ",", "Object", "o", ")", "{", "return", "contents", ".", "getContent", "(", "key", ",", "o", ")", ";", "}" ]
Get the configuration string as a content. @param key the key to look for in the configuration file @param o string or content argument added to configuration text @return a content tree for the text
[ "Get", "the", "configuration", "string", "as", "a", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConfigurationImpl.java#L488-L491
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.deleteApiKey
public JSONObject deleteApiKey(String key, RequestOptions requestOptions) throws AlgoliaException { """ Delete an existing api key @param requestOptions Options to pass to this request """ return client.deleteRequest("/1/indexes/" + encodedIndexName + "/keys/" + key, requestOptions); }
java
public JSONObject deleteApiKey(String key, RequestOptions requestOptions) throws AlgoliaException { return client.deleteRequest("/1/indexes/" + encodedIndexName + "/keys/" + key, requestOptions); }
[ "public", "JSONObject", "deleteApiKey", "(", "String", "key", ",", "RequestOptions", "requestOptions", ")", "throws", "AlgoliaException", "{", "return", "client", ".", "deleteRequest", "(", "\"/1/indexes/\"", "+", "encodedIndexName", "+", "\"/keys/\"", "+", "key", "...
Delete an existing api key @param requestOptions Options to pass to this request
[ "Delete", "an", "existing", "api", "key" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L1021-L1023
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java
BigDecimalExtensions.operator_power
@Pure @Inline(value="$1.pow($2)") public static BigDecimal operator_power(BigDecimal a, int exponent) { """ The <code>power</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param exponent the exponent. @return <code>a.pow(b)</code> @throws NullPointerException if {@code a} is <code...
java
@Pure @Inline(value="$1.pow($2)") public static BigDecimal operator_power(BigDecimal a, int exponent) { return a.pow(exponent); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"$1.pow($2)\"", ")", "public", "static", "BigDecimal", "operator_power", "(", "BigDecimal", "a", ",", "int", "exponent", ")", "{", "return", "a", ".", "pow", "(", "exponent", ")", ";", "}" ]
The <code>power</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param exponent the exponent. @return <code>a.pow(b)</code> @throws NullPointerException if {@code a} is <code>null</code>.
[ "The", "<code", ">", "power<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java#L83-L87
molgenis/molgenis
molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/RelationTransformer.java
RelationTransformer.transformExtends
static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { """ Changes the parent of an {@link EntityType} to let it inherit from another, new EntityType. Does nothing if the Map does not contain the ID of the current parent EntityType. @param entityType the EntityType to upd...
java
static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) { if (newEntityTypes.isEmpty()) { return; } EntityType entityTypeExtends = entityType.getExtends(); if (entityTypeExtends != null) { String extendsId = entityTypeExtends.getId(); if (newEntityT...
[ "static", "void", "transformExtends", "(", "EntityType", "entityType", ",", "Map", "<", "String", ",", "EntityType", ">", "newEntityTypes", ")", "{", "if", "(", "newEntityTypes", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "EntityType", "entityTy...
Changes the parent of an {@link EntityType} to let it inherit from another, new EntityType. Does nothing if the Map does not contain the ID of the current parent EntityType. @param entityType the EntityType to update @param newEntityTypes a Map of (old) EntityType IDs and new EntityTypes
[ "Changes", "the", "parent", "of", "an", "{", "@link", "EntityType", "}", "to", "let", "it", "inherit", "from", "another", "new", "EntityType", ".", "Does", "nothing", "if", "the", "Map", "does", "not", "contain", "the", "ID", "of", "the", "current", "par...
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-navigator/src/main/java/org/molgenis/navigator/copy/service/RelationTransformer.java#L50-L62
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCreateCategoryMenuEntry.java
CmsCreateCategoryMenuEntry.askForNewCategoryInfo
public static void askForNewCategoryInfo(CmsUUID parentId, final AsyncCallback<CmsCategoryTitleAndName> callback) { """ Asks the user for a new category's name and title.<p> @param parentId the parent category @param callback the callback to call with the user-supplied information """ CmsSitemapCa...
java
public static void askForNewCategoryInfo(CmsUUID parentId, final AsyncCallback<CmsCategoryTitleAndName> callback) { CmsSitemapCategoryData categoryData = CmsSitemapView.getInstance().getController().getCategoryData(); CmsCategoryTreeEntry entry = categoryData.getEntryById(parentId); String cap...
[ "public", "static", "void", "askForNewCategoryInfo", "(", "CmsUUID", "parentId", ",", "final", "AsyncCallback", "<", "CmsCategoryTitleAndName", ">", "callback", ")", "{", "CmsSitemapCategoryData", "categoryData", "=", "CmsSitemapView", ".", "getInstance", "(", ")", "....
Asks the user for a new category's name and title.<p> @param parentId the parent category @param callback the callback to call with the user-supplied information
[ "Asks", "the", "user", "for", "a", "new", "category", "s", "name", "and", "title", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/hoverbar/CmsCreateCategoryMenuEntry.java#L116-L150
ralscha/extdirectspring
src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectFormPostResult.java
ExtDirectFormPostResult.addErrors
@SuppressWarnings("unchecked") public void addErrors(String field, List<String> errors) { """ Adds multiple error messages to a specific field. Does not overwrite already existing errors. @param field the name of the field @param errors a collection of error messages """ Assert.notNull(field, "field mu...
java
@SuppressWarnings("unchecked") public void addErrors(String field, List<String> errors) { Assert.notNull(field, "field must not be null"); Assert.notNull(errors, "field must not be null"); // do not overwrite existing errors Map<String, List<String>> errorMap = (Map<String, List<String>>) this.result .get...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "addErrors", "(", "String", "field", ",", "List", "<", "String", ">", "errors", ")", "{", "Assert", ".", "notNull", "(", "field", ",", "\"field must not be null\"", ")", ";", "Assert", "."...
Adds multiple error messages to a specific field. Does not overwrite already existing errors. @param field the name of the field @param errors a collection of error messages
[ "Adds", "multiple", "error", "messages", "to", "a", "specific", "field", ".", "Does", "not", "overwrite", "already", "existing", "errors", "." ]
train
https://github.com/ralscha/extdirectspring/blob/4b018497c4e7503033f91d0491b4e74bf8291d2c/src/main/java/ch/ralscha/extdirectspring/bean/ExtDirectFormPostResult.java#L197-L218
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/icon/IconRenderer.java
IconRenderer.decode
@Override public void decode(FacesContext context, UIComponent component) { """ This methods receives and processes input made by the user. More specifically, it ckecks whether the user has interacted with the current b:selectBooleanCheckbox. The default implementation simply stores the input value in the list...
java
@Override public void decode(FacesContext context, UIComponent component) { Icon icon = (Icon) component; if (icon.isDisabled() || icon.isReadonly()) { return; } decodeBehaviors(context, icon); // moved to AJAXRenderer new AJAXRenderer().decode(context, component); }
[ "@", "Override", "public", "void", "decode", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "Icon", "icon", "=", "(", "Icon", ")", "component", ";", "if", "(", "icon", ".", "isDisabled", "(", ")", "||", "icon", ".", "isReadonl...
This methods receives and processes input made by the user. More specifically, it ckecks whether the user has interacted with the current b:selectBooleanCheckbox. The default implementation simply stores the input value in the list of submitted values. If the validation checks are passed, the values in the <code>submit...
[ "This", "methods", "receives", "and", "processes", "input", "made", "by", "the", "user", ".", "More", "specifically", "it", "ckecks", "whether", "the", "user", "has", "interacted", "with", "the", "current", "b", ":", "selectBooleanCheckbox", ".", "The", "defau...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/icon/IconRenderer.java#L54-L64
schallee/alib4j
jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java
JVMLauncher.getProcessBuilder
public static ProcessBuilder getProcessBuilder(String mainClass, List<URL> classPath, String...args) throws LauncherException { """ Get a process loader for a JVM. @param mainClass Main class to run @param classPath List of urls to use for the new JVM's class path. @param args Additional command line parameter...
java
public static ProcessBuilder getProcessBuilder(String mainClass, List<URL> classPath, String...args) throws LauncherException { return getProcessBuilder(mainClass, classPath, Arrays.asList(args)); }
[ "public", "static", "ProcessBuilder", "getProcessBuilder", "(", "String", "mainClass", ",", "List", "<", "URL", ">", "classPath", ",", "String", "...", "args", ")", "throws", "LauncherException", "{", "return", "getProcessBuilder", "(", "mainClass", ",", "classPat...
Get a process loader for a JVM. @param mainClass Main class to run @param classPath List of urls to use for the new JVM's class path. @param args Additional command line parameters @return ProcessBuilder that has not been started.
[ "Get", "a", "process", "loader", "for", "a", "JVM", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java#L207-L210
molgenis/molgenis
molgenis-semantic-search/src/main/java/org/molgenis/semanticsearch/service/impl/SemanticSearchServiceHelper.java
SemanticSearchServiceHelper.createDisMaxQueryRuleForTerms
public QueryRule createDisMaxQueryRuleForTerms(List<String> queryTerms) { """ Create disMaxJunc query rule based a list of queryTerm. All queryTerms are lower cased and stop words are removed @return disMaxJunc queryRule """ List<QueryRule> rules = new ArrayList<>(); queryTerms .stream() ...
java
public QueryRule createDisMaxQueryRuleForTerms(List<String> queryTerms) { List<QueryRule> rules = new ArrayList<>(); queryTerms .stream() .filter(StringUtils::isNotEmpty) .map(this::escapeCharsExcludingCaretChar) .forEach( query -> { rules.add(new QueryR...
[ "public", "QueryRule", "createDisMaxQueryRuleForTerms", "(", "List", "<", "String", ">", "queryTerms", ")", "{", "List", "<", "QueryRule", ">", "rules", "=", "new", "ArrayList", "<>", "(", ")", ";", "queryTerms", ".", "stream", "(", ")", ".", "filter", "("...
Create disMaxJunc query rule based a list of queryTerm. All queryTerms are lower cased and stop words are removed @return disMaxJunc queryRule
[ "Create", "disMaxJunc", "query", "rule", "based", "a", "list", "of", "queryTerm", ".", "All", "queryTerms", "are", "lower", "cased", "and", "stop", "words", "are", "removed" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-semantic-search/src/main/java/org/molgenis/semanticsearch/service/impl/SemanticSearchServiceHelper.java#L101-L115
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java
SearchUrl.updateSearchTuningRuleUrl
public static MozuUrl updateSearchTuningRuleUrl(String responseFields, String searchTuningRuleCode) { """ Get Resource Url for UpdateSearchTuningRule @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only ...
java
public static MozuUrl updateSearchTuningRuleUrl(String responseFields, String searchTuningRuleCode) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCode}?responseFields={responseFields}"); formatter.formatUrl("responseFields", responseFields); ...
[ "public", "static", "MozuUrl", "updateSearchTuningRuleUrl", "(", "String", "responseFields", ",", "String", "searchTuningRuleCode", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/search/searchtuningrules/{searchTuningRuleCod...
Get Resource Url for UpdateSearchTuningRule @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. @param searchTunin...
[ "Get", "Resource", "Url", "for", "UpdateSearchTuningRule" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/SearchUrl.java#L178-L184
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java
PrimaveraPMFileReader.addUserDefinedField
private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name) { """ Map the Primavera UDF to a custom field. @param fieldType parent object type @param dataType UDF data type @param name UDF name @return FieldType instance """ FieldType field = null; ...
java
private FieldType addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name) { FieldType field = null; try { switch (fieldType) { case TASK: { do { field = m_taskUdfCounters....
[ "private", "FieldType", "addUserDefinedField", "(", "FieldTypeClass", "fieldType", ",", "UserFieldDataType", "dataType", ",", "String", "name", ")", "{", "FieldType", "field", "=", "null", ";", "try", "{", "switch", "(", "fieldType", ")", "{", "case", "TASK", ...
Map the Primavera UDF to a custom field. @param fieldType parent object type @param dataType UDF data type @param name UDF name @return FieldType instance
[ "Map", "the", "Primavera", "UDF", "to", "a", "custom", "field", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L274-L328
osmdroid/osmdroid
osmdroid-mapsforge/src/main/java/org/osmdroid/mapsforge/MapsForgeTileSource.java
MapsForgeTileSource.createFromFiles
public static MapsForgeTileSource createFromFiles(File[] file, XmlRenderTheme theme, String themeName, MultiMapDataStore.DataPolicy dataPolicy, HillsRenderConfig hillsRenderConfig) { """ Creates a new MapsForgeTileSource from file[]. <p></p> Parameters minZoom and maxZoom are obtained from the database. If they...
java
public static MapsForgeTileSource createFromFiles(File[] file, XmlRenderTheme theme, String themeName, MultiMapDataStore.DataPolicy dataPolicy, HillsRenderConfig hillsRenderConfig) { //these settings are ignored and are set based on .map file info int minZoomLevel = MIN_ZOOM; int maxZoomLevel = ...
[ "public", "static", "MapsForgeTileSource", "createFromFiles", "(", "File", "[", "]", "file", ",", "XmlRenderTheme", "theme", ",", "String", "themeName", ",", "MultiMapDataStore", ".", "DataPolicy", "dataPolicy", ",", "HillsRenderConfig", "hillsRenderConfig", ")", "{",...
Creates a new MapsForgeTileSource from file[]. <p></p> Parameters minZoom and maxZoom are obtained from the database. If they cannot be obtained from the DB, the default values as defined by this class are used, which is zoom = 3-20 @param file @param theme this can be null, in which case the default them will be ...
[ "Creates", "a", "new", "MapsForgeTileSource", "from", "file", "[]", ".", "<p", ">", "<", "/", "p", ">", "Parameters", "minZoom", "and", "maxZoom", "are", "obtained", "from", "the", "database", ".", "If", "they", "cannot", "be", "obtained", "from", "the", ...
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-mapsforge/src/main/java/org/osmdroid/mapsforge/MapsForgeTileSource.java#L167-L174
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpXcsrsymmdqHost
public static int cusolverSpXcsrsymmdqHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer p) { """ <pre> --------- CPU symmdq Symmetric minimum degree algorithm by quotient gr...
java
public static int cusolverSpXcsrsymmdqHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer p) { return checkResult(cusolverSpXcsrsymmdqHostNative(handle, n, nnzA, descrA...
[ "public", "static", "int", "cusolverSpXcsrsymmdqHost", "(", "cusolverSpHandle", "handle", ",", "int", "n", ",", "int", "nnzA", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", "p", ")", "{", "return",...
<pre> --------- CPU symmdq Symmetric minimum degree algorithm by quotient graph </pre>
[ "<pre", ">", "---------", "CPU", "symmdq", "Symmetric", "minimum", "degree", "algorithm", "by", "quotient", "graph" ]
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L1382-L1392
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/locking/RemoteLockMapImpl.java
RemoteLockMapImpl.getReaders
public Collection getReaders(Object obj) { """ returns a collection of Reader LockEntries for object obj. If now LockEntries could be found an empty Vector is returned. """ Collection result = null; try { Identity oid = new Identity(obj, getBroker()); byte select...
java
public Collection getReaders(Object obj) { Collection result = null; try { Identity oid = new Identity(obj, getBroker()); byte selector = (byte) 'r'; byte[] requestBarr = buildRequestArray(oid, selector); HttpURLConnection conn = g...
[ "public", "Collection", "getReaders", "(", "Object", "obj", ")", "{", "Collection", "result", "=", "null", ";", "try", "{", "Identity", "oid", "=", "new", "Identity", "(", "obj", ",", "getBroker", "(", ")", ")", ";", "byte", "selector", "=", "(", "byte...
returns a collection of Reader LockEntries for object obj. If now LockEntries could be found an empty Vector is returned.
[ "returns", "a", "collection", "of", "Reader", "LockEntries", "for", "object", "obj", ".", "If", "now", "LockEntries", "could", "be", "found", "an", "empty", "Vector", "is", "returned", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/locking/RemoteLockMapImpl.java#L146-L177
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java
RecommendationsInner.resetAllFiltersForWebApp
public void resetAllFiltersForWebApp(String resourceGroupName, String siteName) { """ Reset all recommendation opt-out settings for an app. Reset all recommendation opt-out settings for an app. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Name of the app. ...
java
public void resetAllFiltersForWebApp(String resourceGroupName, String siteName) { resetAllFiltersForWebAppWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().body(); }
[ "public", "void", "resetAllFiltersForWebApp", "(", "String", "resourceGroupName", ",", "String", "siteName", ")", "{", "resetAllFiltersForWebAppWithServiceResponseAsync", "(", "resourceGroupName", ",", "siteName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ...
Reset all recommendation opt-out settings for an app. Reset all recommendation opt-out settings for an app. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Name of the app. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExceptio...
[ "Reset", "all", "recommendation", "opt", "-", "out", "settings", "for", "an", "app", ".", "Reset", "all", "recommendation", "opt", "-", "out", "settings", "for", "an", "app", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java#L1119-L1121
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/TextOnlyLayout.java
TextOnlyLayout.printContentVerticalDivider
@Override public void printContentVerticalDivider(ChainWriter out, WebSiteRequest req, HttpServletResponse resp, int direction, int colspan, int rowspan, String align, String width) { """ Starts one line of content with the initial colspan set to the provided colspan. """ out.print(" </td>\n"); switch(...
java
@Override public void printContentVerticalDivider(ChainWriter out, WebSiteRequest req, HttpServletResponse resp, int direction, int colspan, int rowspan, String align, String width) { out.print(" </td>\n"); switch(direction) { case UP_AND_DOWN: out.print(" <td>&#160;</td>\n"); break; case NONE:...
[ "@", "Override", "public", "void", "printContentVerticalDivider", "(", "ChainWriter", "out", ",", "WebSiteRequest", "req", ",", "HttpServletResponse", "resp", ",", "int", "direction", ",", "int", "colspan", ",", "int", "rowspan", ",", "String", "align", ",", "St...
Starts one line of content with the initial colspan set to the provided colspan.
[ "Starts", "one", "line", "of", "content", "with", "the", "initial", "colspan", "set", "to", "the", "provided", "colspan", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/TextOnlyLayout.java#L401-L423
apache/flink
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/ProgramTargetDescriptor.java
ProgramTargetDescriptor.of
public static <C> ProgramTargetDescriptor of(C clusterId, JobID jobId, String webInterfaceUrl) { """ Creates a program target description from deployment classes. @param clusterId cluster id @param jobId job id @param <C> cluster id type @return program target descriptor """ String clusterIdString; t...
java
public static <C> ProgramTargetDescriptor of(C clusterId, JobID jobId, String webInterfaceUrl) { String clusterIdString; try { // check if cluster id has a toString method clusterId.getClass().getDeclaredMethod("toString"); clusterIdString = clusterId.toString(); } catch (NoSuchMethodException e) { cl...
[ "public", "static", "<", "C", ">", "ProgramTargetDescriptor", "of", "(", "C", "clusterId", ",", "JobID", "jobId", ",", "String", "webInterfaceUrl", ")", "{", "String", "clusterIdString", ";", "try", "{", "// check if cluster id has a toString method", "clusterId", "...
Creates a program target description from deployment classes. @param clusterId cluster id @param jobId job id @param <C> cluster id type @return program target descriptor
[ "Creates", "a", "program", "target", "description", "from", "deployment", "classes", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/ProgramTargetDescriptor.java#L69-L79
beanshell/beanshell
src/main/java/bsh/Name.java
Name.toObject
public Object toObject( CallStack callstack, Interpreter interpreter ) throws UtilEvalError { """ Resolve possibly complex name to an object value. Throws EvalError on various failures. A null object value is indicated by a Primitive.NULL. A return type of Primitive.VOID comes from attempting to acces...
java
public Object toObject( CallStack callstack, Interpreter interpreter ) throws UtilEvalError { return toObject( callstack, interpreter, false ); }
[ "public", "Object", "toObject", "(", "CallStack", "callstack", ",", "Interpreter", "interpreter", ")", "throws", "UtilEvalError", "{", "return", "toObject", "(", "callstack", ",", "interpreter", ",", "false", ")", ";", "}" ]
Resolve possibly complex name to an object value. Throws EvalError on various failures. A null object value is indicated by a Primitive.NULL. A return type of Primitive.VOID comes from attempting to access an undefined variable. Some cases: myVariable myVariable.foo myVariable.foo.bar java.awt.GridBagConstraints.BOTH...
[ "Resolve", "possibly", "complex", "name", "to", "an", "object", "value", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Name.java#L174-L178
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.transformEntries
public static boolean transformEntries(final File zip, final ZipEntryTransformerEntry[] entries) { """ Changes an existing ZIP file: transforms a given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entry transformers. @return <code>true</code> if the entry was replaced. ...
java
public static boolean transformEntries(final File zip, final ZipEntryTransformerEntry[] entries) { return operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { return transformEntries(zip, entries, tmpFile); } }); }
[ "public", "static", "boolean", "transformEntries", "(", "final", "File", "zip", ",", "final", "ZipEntryTransformerEntry", "[", "]", "entries", ")", "{", "return", "operateInPlace", "(", "zip", ",", "new", "InPlaceAction", "(", ")", "{", "public", "boolean", "a...
Changes an existing ZIP file: transforms a given entries in it. @param zip an existing ZIP file (only read). @param entries ZIP entry transformers. @return <code>true</code> if the entry was replaced.
[ "Changes", "an", "existing", "ZIP", "file", ":", "transforms", "a", "given", "entries", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2874-L2880
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDetectorResponse
public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { """ Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource be...
java
public DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName, DateTime startTime, DateTime endTime, String timeGrain) { return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain).toBlocki...
[ "public", "DetectorResponseInner", "getSiteDetectorResponse", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "detectorName", ",", "DateTime", "startTime", ",", "DateTime", "endTime", ",", "String", "timeGrain", ")", "{", "return", "getSi...
Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param detectorName Detector Resource Name @param startTime Start Time @param endTime End Time @param timeGrain Time Grain @throws IllegalArgumentExceptio...
[ "Get", "site", "detector", "response", ".", "Get", "site", "detector", "response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L762-L764
facebookarchive/hadoop-20
src/core/org/apache/hadoop/security/SecurityUtil.java
SecurityUtil.getSubject
public static Subject getSubject(UserGroupInformation ugi) { """ Get the {@link Subject} for the user identified by <code>ugi</code>. @param ugi user @return the {@link Subject} for the user identified by <code>ugi</code> """ if (ugi == null) { return null; } Set<Principal> principals ...
java
public static Subject getSubject(UserGroupInformation ugi) { if (ugi == null) { return null; } Set<Principal> principals = // Number of principals = username + #groups new HashSet<Principal>(ugi.getGroupNames().length+1); User userPrincipal = new User(ugi.getUserName()); pri...
[ "public", "static", "Subject", "getSubject", "(", "UserGroupInformation", "ugi", ")", "{", "if", "(", "ugi", "==", "null", ")", "{", "return", "null", ";", "}", "Set", "<", "Principal", ">", "principals", "=", "// Number of principals = username + #groups ", "ne...
Get the {@link Subject} for the user identified by <code>ugi</code>. @param ugi user @return the {@link Subject} for the user identified by <code>ugi</code>
[ "Get", "the", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/security/SecurityUtil.java#L69-L87
wanglinsong/thx-android
uia-client/src/main/java/com/android/uiautomator/stub/Rect.java
Rect.setIntersect
public boolean setIntersect(Rect a, Rect b) { """ If rectangles a and b intersect, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects() @para...
java
public boolean setIntersect(Rect a, Rect b) { if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) { left = Math.max(a.left, b.left); top = Math.max(a.top, b.top); right = Math.min(a.right, b.right); bottom = Math.min(a.bottom, b.botto...
[ "public", "boolean", "setIntersect", "(", "Rect", "a", ",", "Rect", "b", ")", "{", "if", "(", "a", ".", "left", "<", "b", ".", "right", "&&", "b", ".", "left", "<", "a", ".", "right", "&&", "a", ".", "top", "<", "b", ".", "bottom", "&&", "b",...
If rectangles a and b intersect, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects() @param a The first rectangle being intersected with @param b The ...
[ "If", "rectangles", "a", "and", "b", "intersect", "return", "true", "and", "set", "this", "rectangle", "to", "that", "intersection", "otherwise", "return", "false", "and", "do", "not", "change", "this", "rectangle", ".", "No", "check", "is", "performed", "to...
train
https://github.com/wanglinsong/thx-android/blob/4a98c4181b3e8876e688591737da37627c07e72b/uia-client/src/main/java/com/android/uiautomator/stub/Rect.java#L452-L461
icode/ameba
src/main/java/ameba/db/ebean/migration/PlatformDdlWriter.java
PlatformDdlWriter.processMigration
public void processMigration(Migration dbMigration, DdlWrite write) throws IOException { """ <p>processMigration.</p> @param dbMigration a {@link io.ebeaninternal.dbmigration.migration.Migration} object. @param write a {@link io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite} object. @throws java.io.I...
java
public void processMigration(Migration dbMigration, DdlWrite write) throws IOException { DdlHandler handler = handler(); handler.generateProlog(write); List<ChangeSet> changeSets = dbMigration.getChangeSet(); for (ChangeSet changeSet : changeSets) { if (isApply(changeSet)) { ...
[ "public", "void", "processMigration", "(", "Migration", "dbMigration", ",", "DdlWrite", "write", ")", "throws", "IOException", "{", "DdlHandler", "handler", "=", "handler", "(", ")", ";", "handler", ".", "generateProlog", "(", "write", ")", ";", "List", "<", ...
<p>processMigration.</p> @param dbMigration a {@link io.ebeaninternal.dbmigration.migration.Migration} object. @param write a {@link io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite} object. @throws java.io.IOException if any.
[ "<p", ">", "processMigration", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/migration/PlatformDdlWriter.java#L46-L58
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipAssert.java
SipAssert.assertHeaderContains
public static void assertHeaderContains(SipMessage sipMessage, String header, String value) { """ Asserts that the given SIP message contains at least one occurrence of the specified header and that at least one occurrence of this header contains the given value. The assertion fails if no occurrence of the heade...
java
public static void assertHeaderContains(SipMessage sipMessage, String header, String value) { assertHeaderContains(null, sipMessage, header, value); // value is case // sensitive? }
[ "public", "static", "void", "assertHeaderContains", "(", "SipMessage", "sipMessage", ",", "String", "header", ",", "String", "value", ")", "{", "assertHeaderContains", "(", "null", ",", "sipMessage", ",", "header", ",", "value", ")", ";", "// value is case\r", "...
Asserts that the given SIP message contains at least one occurrence of the specified header and that at least one occurrence of this header contains the given value. The assertion fails if no occurrence of the header contains the value or if the header is not present in the mesage. @param sipMessage the SIP message. @...
[ "Asserts", "that", "the", "given", "SIP", "message", "contains", "at", "least", "one", "occurrence", "of", "the", "specified", "header", "and", "that", "at", "least", "one", "occurrence", "of", "this", "header", "contains", "the", "given", "value", ".", "The...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipAssert.java#L162-L165
taimos/RESTUtils
src/main/java/de/taimos/restutils/RESTAssert.java
RESTAssert.assertNotNull
public static void assertNotNull(final Object object, final StatusType status) { """ assert that object is not null @param object the object to check @param status the status code to throw @throws WebApplicationException with given status code """ RESTAssert.assertTrue(object != null, status); }
java
public static void assertNotNull(final Object object, final StatusType status) { RESTAssert.assertTrue(object != null, status); }
[ "public", "static", "void", "assertNotNull", "(", "final", "Object", "object", ",", "final", "StatusType", "status", ")", "{", "RESTAssert", ".", "assertTrue", "(", "object", "!=", "null", ",", "status", ")", ";", "}" ]
assert that object is not null @param object the object to check @param status the status code to throw @throws WebApplicationException with given status code
[ "assert", "that", "object", "is", "not", "null" ]
train
https://github.com/taimos/RESTUtils/blob/bdb1bf9a2eb13ede0eec6f071c10cb2698313501/src/main/java/de/taimos/restutils/RESTAssert.java#L160-L162
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
StreamSegmentReadIndex.createDataNotAvailableRead
private ReadResultEntryBase createDataNotAvailableRead(long streamSegmentOffset, int maxLength) { """ Creates a ReadResultEntry that is a placeholder for data that is not currently available in memory. @param streamSegmentOffset The Offset in the StreamSegment where to the ReadResultEntry starts at. @param max...
java
private ReadResultEntryBase createDataNotAvailableRead(long streamSegmentOffset, int maxLength) { maxLength = getLengthUntilNextEntry(streamSegmentOffset, maxLength); long storageLength = this.metadata.getStorageLength(); if (streamSegmentOffset < storageLength) { // Requested data e...
[ "private", "ReadResultEntryBase", "createDataNotAvailableRead", "(", "long", "streamSegmentOffset", ",", "int", "maxLength", ")", "{", "maxLength", "=", "getLengthUntilNextEntry", "(", "streamSegmentOffset", ",", "maxLength", ")", ";", "long", "storageLength", "=", "thi...
Creates a ReadResultEntry that is a placeholder for data that is not currently available in memory. @param streamSegmentOffset The Offset in the StreamSegment where to the ReadResultEntry starts at. @param maxLength The maximum length of the Read, from the Offset of this ReadResultEntry.
[ "Creates", "a", "ReadResultEntry", "that", "is", "a", "placeholder", "for", "data", "that", "is", "not", "currently", "available", "in", "memory", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java#L922-L942
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.loadJarClassifier
public void loadJarClassifier(String modelName, Properties props) { """ This function will load a classifier that is stored inside a jar file (if it is so stored). The classifier should be specified as its full filename, but the path in the jar file (<code>/classifiers/</code>) is coded in this class. If the cl...
java
public void loadJarClassifier(String modelName, Properties props) { Timing.startDoing("Loading JAR-internal classifier " + modelName); try { InputStream is = getClass().getResourceAsStream(modelName); if (modelName.endsWith(".gz")) { is = new GZIPInputStream(is); } is = ne...
[ "public", "void", "loadJarClassifier", "(", "String", "modelName", ",", "Properties", "props", ")", "{", "Timing", ".", "startDoing", "(", "\"Loading JAR-internal classifier \"", "+", "modelName", ")", ";", "try", "{", "InputStream", "is", "=", "getClass", "(", ...
This function will load a classifier that is stored inside a jar file (if it is so stored). The classifier should be specified as its full filename, but the path in the jar file (<code>/classifiers/</code>) is coded in this class. If the classifier is not stored in the jar file or this is not run from inside a jar file...
[ "This", "function", "will", "load", "a", "classifier", "that", "is", "stored", "inside", "a", "jar", "file", "(", "if", "it", "is", "so", "stored", ")", ".", "The", "classifier", "should", "be", "specified", "as", "its", "full", "filename", "but", "the",...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1691-L1706
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.createLoadsBasedOnDescriptor
public static void createLoadsBasedOnDescriptor(MethodVisitor mv, String descriptor, int startindex) { """ Create the set of LOAD instructions to load the method parameters. Take into account the size and type. @param mv the method visitor to recieve the load instructions @param descriptor the complete method ...
java
public static void createLoadsBasedOnDescriptor(MethodVisitor mv, String descriptor, int startindex) { int slot = startindex; int descriptorpos = 1; // start after the '(' char ch; while ((ch = descriptor.charAt(descriptorpos)) != ')') { switch (ch) { case '[': mv.visitVarInsn(ALOAD, slot); slo...
[ "public", "static", "void", "createLoadsBasedOnDescriptor", "(", "MethodVisitor", "mv", ",", "String", "descriptor", ",", "int", "startindex", ")", "{", "int", "slot", "=", "startindex", ";", "int", "descriptorpos", "=", "1", ";", "// start after the '('", "char",...
Create the set of LOAD instructions to load the method parameters. Take into account the size and type. @param mv the method visitor to recieve the load instructions @param descriptor the complete method descriptor (eg. "(ILjava/lang/String;)V") - params and return type are skipped @param startindex the initial index ...
[ "Create", "the", "set", "of", "LOAD", "instructions", "to", "load", "the", "method", "parameters", ".", "Take", "into", "account", "the", "size", "and", "type", "." ]
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L193-L247
alkacon/opencms-core
src/org/opencms/main/OpenCms.java
OpenCms.addCmsEventListener
public static void addCmsEventListener(I_CmsEventListener listener, int[] eventTypes) { """ Add a cms event listener that listens only to particular events.<p> @param listener the listener to add @param eventTypes the events to listen for """ OpenCmsCore.getInstance().getEventManager().addCmsEvent...
java
public static void addCmsEventListener(I_CmsEventListener listener, int[] eventTypes) { OpenCmsCore.getInstance().getEventManager().addCmsEventListener(listener, eventTypes); }
[ "public", "static", "void", "addCmsEventListener", "(", "I_CmsEventListener", "listener", ",", "int", "[", "]", "eventTypes", ")", "{", "OpenCmsCore", ".", "getInstance", "(", ")", ".", "getEventManager", "(", ")", ".", "addCmsEventListener", "(", "listener", ",...
Add a cms event listener that listens only to particular events.<p> @param listener the listener to add @param eventTypes the events to listen for
[ "Add", "a", "cms", "event", "listener", "that", "listens", "only", "to", "particular", "events", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCms.java#L147-L150
protostuff/protostuff
protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java
GraphIOUtil.mergeFrom
public static <T> void mergeFrom(byte[] data, T message, Schema<T> schema) { """ Merges the {@code message} with the byte array using the given {@code schema}. """ mergeFrom(data, 0, data.length, message, schema); }
java
public static <T> void mergeFrom(byte[] data, T message, Schema<T> schema) { mergeFrom(data, 0, data.length, message, schema); }
[ "public", "static", "<", "T", ">", "void", "mergeFrom", "(", "byte", "[", "]", "data", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ")", "{", "mergeFrom", "(", "data", ",", "0", ",", "data", ".", "length", ",", "message", ",", "sc...
Merges the {@code message} with the byte array using the given {@code schema}.
[ "Merges", "the", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java#L39-L42
betfair/cougar
cougar-framework/socket-transport/src/main/java/com/betfair/cougar/transport/socket/PooledServerConnectedObjectManager.java
PooledServerConnectedObjectManager.processHeapStateCreation
private HeapState processHeapStateCreation(final ConnectedResponse result, final String heapUri) { """ note, you must have the subterm lock before calling this method """ if (!subTermLock.isHeldByCurrentThread()) { throw new IllegalStateException("You must have the subTermLock before callin...
java
private HeapState processHeapStateCreation(final ConnectedResponse result, final String heapUri) { if (!subTermLock.isHeldByCurrentThread()) { throw new IllegalStateException("You must have the subTermLock before calling this method"); } final HeapState newState = new HeapState(resul...
[ "private", "HeapState", "processHeapStateCreation", "(", "final", "ConnectedResponse", "result", ",", "final", "String", "heapUri", ")", "{", "if", "(", "!", "subTermLock", ".", "isHeldByCurrentThread", "(", ")", ")", "{", "throw", "new", "IllegalStateException", ...
note, you must have the subterm lock before calling this method
[ "note", "you", "must", "have", "the", "subterm", "lock", "before", "calling", "this", "method" ]
train
https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-framework/socket-transport/src/main/java/com/betfair/cougar/transport/socket/PooledServerConnectedObjectManager.java#L185-L213
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/transform/XMLTransformerFactory.java
XMLTransformerFactory.newTemplates
@Nullable public static Templates newTemplates (@Nonnull final TransformerFactory aFactory, @Nonnull final IReadableResource aResource) { """ Create a new XSLT Template for the passed resource. @param aFactory The transformer factory to be used. May not be <code>null</...
java
@Nullable public static Templates newTemplates (@Nonnull final TransformerFactory aFactory, @Nonnull final IReadableResource aResource) { ValueEnforcer.notNull (aResource, "Resource"); return newTemplates (aFactory, TransformSourceFactory.create (aResource)); }
[ "@", "Nullable", "public", "static", "Templates", "newTemplates", "(", "@", "Nonnull", "final", "TransformerFactory", "aFactory", ",", "@", "Nonnull", "final", "IReadableResource", "aResource", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aResource", ",", "\"R...
Create a new XSLT Template for the passed resource. @param aFactory The transformer factory to be used. May not be <code>null</code>. @param aResource The resource to be templated. May not be <code>null</code>. @return <code>null</code> if something goes wrong
[ "Create", "a", "new", "XSLT", "Template", "for", "the", "passed", "resource", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/transform/XMLTransformerFactory.java#L273-L280
alkacon/opencms-core
src/org/opencms/importexport/A_CmsImport.java
A_CmsImport.getLocale
protected Locale getLocale(String destination, List<CmsProperty> properties) { """ Returns the appropriate locale for the given destination.<p> @param destination the destination path (parent must exist) @param properties the properties to check at first @return the locale """ String localeName...
java
protected Locale getLocale(String destination, List<CmsProperty> properties) { String localeName = CmsProperty.get(CmsPropertyDefinition.PROPERTY_LOCALE, properties).getValue(); if (localeName != null) { // locale was already set on the files properties return OpenCms.getLocale...
[ "protected", "Locale", "getLocale", "(", "String", "destination", ",", "List", "<", "CmsProperty", ">", "properties", ")", "{", "String", "localeName", "=", "CmsProperty", ".", "get", "(", "CmsPropertyDefinition", ".", "PROPERTY_LOCALE", ",", "properties", ")", ...
Returns the appropriate locale for the given destination.<p> @param destination the destination path (parent must exist) @param properties the properties to check at first @return the locale
[ "Returns", "the", "appropriate", "locale", "for", "the", "given", "destination", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/A_CmsImport.java#L629-L639
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java
StandardDirectoryAgentServer.handleUDPAttrRqst
protected void handleUDPAttrRqst(AttrRqst attrRqst, InetSocketAddress localAddress, InetSocketAddress remoteAddress) { """ Handles unicast UDP AttrRqst message arrived to this directory agent. <br /> This directory agent will reply with a list of attributes of matching services. @param attrRqst the AttrR...
java
protected void handleUDPAttrRqst(AttrRqst attrRqst, InetSocketAddress localAddress, InetSocketAddress remoteAddress) { // Match scopes, RFC 2608, 11.1 if (!scopes.weakMatch(attrRqst.getScopes())) { udpAttrRply.perform(localAddress, remoteAddress, attrRqst, SLPError.SCOPE_NOT_SUPP...
[ "protected", "void", "handleUDPAttrRqst", "(", "AttrRqst", "attrRqst", ",", "InetSocketAddress", "localAddress", ",", "InetSocketAddress", "remoteAddress", ")", "{", "// Match scopes, RFC 2608, 11.1", "if", "(", "!", "scopes", ".", "weakMatch", "(", "attrRqst", ".", "...
Handles unicast UDP AttrRqst message arrived to this directory agent. <br /> This directory agent will reply with a list of attributes of matching services. @param attrRqst the AttrRqst message to handle @param localAddress the socket address the message arrived to @param remoteAddress the socket address the mes...
[ "Handles", "unicast", "UDP", "AttrRqst", "message", "arrived", "to", "this", "directory", "agent", ".", "<br", "/", ">", "This", "directory", "agent", "will", "reply", "with", "a", "list", "of", "attributes", "of", "matching", "services", "." ]
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java#L618-L632
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java
Postconditions.checkPostconditionL
public static long checkPostconditionL( final long value, final LongPredicate predicate, final LongFunction<String> describer) { """ A {@code long} specialized version of {@link #checkPostcondition(Object, Predicate, Function)} @param value The value @param predicate The predicate @param desc...
java
public static long checkPostconditionL( final long value, final LongPredicate predicate, final LongFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { throw failed( e, Long.valueOf(value), singleVio...
[ "public", "static", "long", "checkPostconditionL", "(", "final", "long", "value", ",", "final", "LongPredicate", "predicate", ",", "final", "LongFunction", "<", "String", ">", "describer", ")", "{", "final", "boolean", "ok", ";", "try", "{", "ok", "=", "pred...
A {@code long} specialized version of {@link #checkPostcondition(Object, Predicate, Function)} @param value The value @param predicate The predicate @param describer The describer of the predicate @return value @throws PostconditionViolationException If the predicate is false
[ "A", "{", "@code", "long", "}", "specialized", "version", "of", "{", "@link", "#checkPostcondition", "(", "Object", "Predicate", "Function", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java#L445-L461
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java
ConfigValidator.ensurePropertyNotConfigured
public static void ensurePropertyNotConfigured(HazelcastProperties properties, HazelcastProperty hazelcastProperty) throws ConfigurationException { """ Throws {@link ConfigurationException} if given group property is defined within Hazelcast properties. @param properties Group properties @param haz...
java
public static void ensurePropertyNotConfigured(HazelcastProperties properties, HazelcastProperty hazelcastProperty) throws ConfigurationException { if (properties.containsKey(hazelcastProperty)) { throw new ConfigurationException("Service start failed. The legacy property " + hazelcastPr...
[ "public", "static", "void", "ensurePropertyNotConfigured", "(", "HazelcastProperties", "properties", ",", "HazelcastProperty", "hazelcastProperty", ")", "throws", "ConfigurationException", "{", "if", "(", "properties", ".", "containsKey", "(", "hazelcastProperty", ")", ")...
Throws {@link ConfigurationException} if given group property is defined within Hazelcast properties. @param properties Group properties @param hazelcastProperty property to be checked @throws ConfigurationException
[ "Throws", "{", "@link", "ConfigurationException", "}", "if", "given", "group", "property", "is", "defined", "within", "Hazelcast", "properties", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java#L497-L504
redkale/redkale
src/org/redkale/net/http/HttpResponse.java
HttpResponse.finish
@SuppressWarnings("unchecked") public void finish(final Convert convert, final Type type, final Object obj) { """ 将结果对象输出 @param convert 指定的Convert @param type 指定的类型 @param obj 输出对象 """ if (obj == null) { finish("null"); } else if (obj instanceof CompletableFutur...
java
@SuppressWarnings("unchecked") public void finish(final Convert convert, final Type type, final Object obj) { if (obj == null) { finish("null"); } else if (obj instanceof CompletableFuture) { ((CompletableFuture) obj).whenComplete((v, e) -> { if (e != nu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "finish", "(", "final", "Convert", "convert", ",", "final", "Type", "type", ",", "final", "Object", "obj", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "finish", "(", "\"null\""...
将结果对象输出 @param convert 指定的Convert @param type 指定的类型 @param obj 输出对象
[ "将结果对象输出" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpResponse.java#L467-L484
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.getByResourceGroupAsync
public Observable<VirtualMachineScaleSetInner> getByResourceGroupAsync(String resourceGroupName, String vmScaleSetName) { """ Display information about a virtual machine scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgum...
java
public Observable<VirtualMachineScaleSetInner> getByResourceGroupAsync(String resourceGroupName, String vmScaleSetName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { ...
[ "public", "Observable", "<", "VirtualMachineScaleSetInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ...
Display information about a virtual machine scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualMachineScaleSetInner object
[ "Display", "information", "about", "a", "virtual", "machine", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L729-L736
Jasig/uPortal
uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java
UserAccountHelper.fixPortletPath
private String fixPortletPath(HttpServletRequest request, IPortalUrlBuilder urlBuilder) { """ This entire method is a hack! The login portlet URL only seems to load correctly if you pass in the folder name for the guest layout. For the short term, allow configuration of the folder name and manually re-write the ...
java
private String fixPortletPath(HttpServletRequest request, IPortalUrlBuilder urlBuilder) { String path = urlBuilder.getUrlString(); String context = request.getContextPath(); if (StringUtils.isBlank(context)) { context = "/"; } if (!path.startsWith(context + "/f/")) {...
[ "private", "String", "fixPortletPath", "(", "HttpServletRequest", "request", ",", "IPortalUrlBuilder", "urlBuilder", ")", "{", "String", "path", "=", "urlBuilder", ".", "getUrlString", "(", ")", ";", "String", "context", "=", "request", ".", "getContextPath", "(",...
This entire method is a hack! The login portlet URL only seems to load correctly if you pass in the folder name for the guest layout. For the short term, allow configuration of the folder name and manually re-write the URL to include the folder if it doesn't already. <p>This is terrible and needs to go away as soon as...
[ "This", "entire", "method", "is", "a", "hack!", "The", "login", "portlet", "URL", "only", "seems", "to", "load", "correctly", "if", "you", "pass", "in", "the", "folder", "name", "for", "the", "guest", "layout", ".", "For", "the", "short", "term", "allow"...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/account/UserAccountHelper.java#L515-L527
elki-project/elki
elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java
NNDescent.boundSize
private void boundSize(HashSetModifiableDBIDs set, int items) { """ Bound the size of a set by random sampling. @param set Set to process @param items Maximum size """ if(set.size() > items) { DBIDs sample = DBIDUtil.randomSample(set, items, rnd); set.clear(); set.addDBIDs(sample); ...
java
private void boundSize(HashSetModifiableDBIDs set, int items) { if(set.size() > items) { DBIDs sample = DBIDUtil.randomSample(set, items, rnd); set.clear(); set.addDBIDs(sample); } }
[ "private", "void", "boundSize", "(", "HashSetModifiableDBIDs", "set", ",", "int", "items", ")", "{", "if", "(", "set", ".", "size", "(", ")", ">", "items", ")", "{", "DBIDs", "sample", "=", "DBIDUtil", ".", "randomSample", "(", "set", ",", "items", ","...
Bound the size of a set by random sampling. @param set Set to process @param items Maximum size
[ "Bound", "the", "size", "of", "a", "set", "by", "random", "sampling", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-preprocessed/src/main/java/de/lmu/ifi/dbs/elki/index/preprocessed/knn/NNDescent.java#L281-L287
apereo/cas
support/cas-server-support-aup-core/src/main/java/org/apereo/cas/aup/AcceptableUsagePolicyStatus.java
AcceptableUsagePolicyStatus.setProperty
public AcceptableUsagePolicyStatus setProperty(final String name, final Object value) { """ Sets property. @param name the name @param value the value @return the property """ this.properties.remove(name); addProperty(name, value); return this; }
java
public AcceptableUsagePolicyStatus setProperty(final String name, final Object value) { this.properties.remove(name); addProperty(name, value); return this; }
[ "public", "AcceptableUsagePolicyStatus", "setProperty", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "this", ".", "properties", ".", "remove", "(", "name", ")", ";", "addProperty", "(", "name", ",", "value", ")", ";", "return", ...
Sets property. @param name the name @param value the value @return the property
[ "Sets", "property", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aup-core/src/main/java/org/apereo/cas/aup/AcceptableUsagePolicyStatus.java#L55-L59
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.asType
@SuppressWarnings("unchecked") public static <T> T asType(GString self, Class<T> c) { """ Converts the GString to a File, or delegates to the default {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#asType(Object, Class)} @param self a GString @param c the desired class @return the converted ob...
java
@SuppressWarnings("unchecked") public static <T> T asType(GString self, Class<T> c) { if (c == File.class) { return (T) new File(self.toString()); } else if (Number.class.isAssignableFrom(c) || c.isPrimitive()) { return asType(self.toString(), c); } return Def...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "asType", "(", "GString", "self", ",", "Class", "<", "T", ">", "c", ")", "{", "if", "(", "c", "==", "File", ".", "class", ")", "{", "return", "(", "T", ")...
Converts the GString to a File, or delegates to the default {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#asType(Object, Class)} @param self a GString @param c the desired class @return the converted object @since 1.5.0
[ "Converts", "the", "GString", "to", "a", "File", "or", "delegates", "to", "the", "default", "{", "@link", "org", ".", "codehaus", ".", "groovy", ".", "runtime", ".", "DefaultGroovyMethods#asType", "(", "Object", "Class", ")", "}" ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L152-L160
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java
SeleniumDriverSetup.startDriver
public boolean startDriver(String driverClassName, final Map<String, Object> profile) throws Exception { """ Creates an instance of the specified class an injects it into SeleniumHelper, so other fixtures can use it. @param driverClassName name of Java class of WebDriver to use. @param profile profile to use (fo...
java
public boolean startDriver(String driverClassName, final Map<String, Object> profile) throws Exception { if (OVERRIDE_ACTIVE) { return true; } DriverFactory driverFactory = new LocalDriverFactory(driverClassName, profile); WebDriver driver = setAndUseDriverFactory(driverFact...
[ "public", "boolean", "startDriver", "(", "String", "driverClassName", ",", "final", "Map", "<", "String", ",", "Object", ">", "profile", ")", "throws", "Exception", "{", "if", "(", "OVERRIDE_ACTIVE", ")", "{", "return", "true", ";", "}", "DriverFactory", "dr...
Creates an instance of the specified class an injects it into SeleniumHelper, so other fixtures can use it. @param driverClassName name of Java class of WebDriver to use. @param profile profile to use (for firefox, chrome mobile and IE only for now) @return true if instance was created and injected into SeleniumHelper....
[ "Creates", "an", "instance", "of", "the", "specified", "class", "an", "injects", "it", "into", "SeleniumHelper", "so", "other", "fixtures", "can", "use", "it", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java#L61-L69
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java
TaskClient.pollTask
public Task pollTask(String taskType, String workerId, String domain) { """ Perform a poll for a task of a specific task type. @param taskType The taskType to poll for @param domain The domain of the task type @param workerId Name of the client worker. Used for logging. @return Task waiting to be executed....
java
public Task pollTask(String taskType, String workerId, String domain) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(domain), "Domain cannot be blank"); Preconditions.checkArgument(StringUtils.isNot...
[ "public", "Task", "pollTask", "(", "String", "taskType", ",", "String", "workerId", ",", "String", "domain", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ...
Perform a poll for a task of a specific task type. @param taskType The taskType to poll for @param domain The domain of the task type @param workerId Name of the client worker. Used for logging. @return Task waiting to be executed.
[ "Perform", "a", "poll", "for", "a", "task", "of", "a", "specific", "task", "type", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java#L35-L48
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java
GalleryImagesInner.update
public GalleryImageInner update(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageFragment galleryImage) { """ Modify properties of gallery images. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param galleryImag...
java
public GalleryImageInner update(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageFragment galleryImage) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).toBlocking().single().body(); }
[ "public", "GalleryImageInner", "update", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "galleryImageName", ",", "GalleryImageFragment", "galleryImage", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Modify properties of gallery images. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param galleryImageName The name of the gallery Image. @param galleryImage Represents an image from the Azure Marketplace @throws IllegalArgumentException thrown if parameter...
[ "Modify", "properties", "of", "gallery", "images", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java#L746-L748
aol/cyclops
cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java
LazyReact.fromAdapter
public <U> FutureStream<U> fromAdapter(final Adapter<U> adapter) { """ Generate a FutureStream from the data flowing into the prodiced Adapter <pre> {@code Topic<Integer> topic = new Topic<>(); new LazyReact(10,10).fromAdapter(topic) .forEach(this::process); //on anther thread topic.offer(100); topic...
java
public <U> FutureStream<U> fromAdapter(final Adapter<U> adapter) { final Subscription sub = new Subscription(); return new FutureStreamImpl(this,()->adapter.stream(sub)){ @Override public ReactiveSeq<U> stream() { return (ReactiveSeq<U>)adapter.stream(sub); ...
[ "public", "<", "U", ">", "FutureStream", "<", "U", ">", "fromAdapter", "(", "final", "Adapter", "<", "U", ">", "adapter", ")", "{", "final", "Subscription", "sub", "=", "new", "Subscription", "(", ")", ";", "return", "new", "FutureStreamImpl", "(", "this...
Generate a FutureStream from the data flowing into the prodiced Adapter <pre> {@code Topic<Integer> topic = new Topic<>(); new LazyReact(10,10).fromAdapter(topic) .forEach(this::process); //on anther thread topic.offer(100); topic.offer(200); } </pre> @param adapter Adapter to construct FutureStream from @return ...
[ "Generate", "a", "FutureStream", "from", "the", "data", "flowing", "into", "the", "prodiced", "Adapter", "<pre", ">", "{", "@code" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java#L848-L858
jeremylong/DependencyCheck
utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java
Settings.getDataFile
protected File getDataFile(@NotNull final String key) { """ Returns a value from the properties file as a File object. If the value was specified as a system property or passed in via the -Dprop=value argument - this method will return the value from the system properties before the values in the contained conf...
java
protected File getDataFile(@NotNull final String key) { final String file = getString(key); LOGGER.debug("Settings.getDataFile() - file: '{}'", file); if (file == null) { return null; } if (file.startsWith("[JAR]")) { LOGGER.debug("Settings.getDataFile() -...
[ "protected", "File", "getDataFile", "(", "@", "NotNull", "final", "String", "key", ")", "{", "final", "String", "file", "=", "getString", "(", "key", ")", ";", "LOGGER", ".", "debug", "(", "\"Settings.getDataFile() - file: '{}'\"", ",", "file", ")", ";", "if...
Returns a value from the properties file as a File object. If the value was specified as a system property or passed in via the -Dprop=value argument - this method will return the value from the system properties before the values in the contained configuration file. This method will check the configured base director...
[ "Returns", "a", "value", "from", "the", "properties", "file", "as", "a", "File", "object", ".", "If", "the", "value", "was", "specified", "as", "a", "system", "property", "or", "passed", "in", "via", "the", "-", "Dprop", "=", "value", "argument", "-", ...
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java#L848-L863
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/CFFFontSubset.java
CFFFontSubset.CreateKeys
protected void CreateKeys(OffsetItem fdarrayRef,OffsetItem fdselectRef,OffsetItem charsetRef,OffsetItem charstringsRef) { """ Function adds the keys into the TopDict @param fdarrayRef OffsetItem for the FDArray @param fdselectRef OffsetItem for the FDSelect @param charsetRef OffsetItem for the CharSet @param c...
java
protected void CreateKeys(OffsetItem fdarrayRef,OffsetItem fdselectRef,OffsetItem charsetRef,OffsetItem charstringsRef) { // create an FDArray key OutputList.addLast(fdarrayRef); OutputList.addLast(new UInt8Item((char)12)); OutputList.addLast(new UInt8Item((char)36)); // create an ...
[ "protected", "void", "CreateKeys", "(", "OffsetItem", "fdarrayRef", ",", "OffsetItem", "fdselectRef", ",", "OffsetItem", "charsetRef", ",", "OffsetItem", "charstringsRef", ")", "{", "// create an FDArray key", "OutputList", ".", "addLast", "(", "fdarrayRef", ")", ";",...
Function adds the keys into the TopDict @param fdarrayRef OffsetItem for the FDArray @param fdselectRef OffsetItem for the FDSelect @param charsetRef OffsetItem for the CharSet @param charstringsRef OffsetItem for the CharString
[ "Function", "adds", "the", "keys", "into", "the", "TopDict" ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java#L1276-L1292
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.typeText
public void typeText(EditText editText, String text) { """ Types text in the specified EditText. @param editText the {@link EditText} to type text in @param text the text to type in the {@link EditText} field """ if(config.commandLogging){ Log.d(config.commandLoggingTag, "typeText("+editText+", \""+te...
java
public void typeText(EditText editText, String text) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "typeText("+editText+", \""+text+"\")"); } editText = (EditText) waiter.waitForView(editText, Timeout.getSmallTimeout()); textEnterer.typeText(editText, text); }
[ "public", "void", "typeText", "(", "EditText", "editText", ",", "String", "text", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"typeText(\"", "+", "editText", "+", "\", \\\...
Types text in the specified EditText. @param editText the {@link EditText} to type text in @param text the text to type in the {@link EditText} field
[ "Types", "text", "in", "the", "specified", "EditText", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L2728-L2735
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonKeyedStream.java
PythonKeyedStream.time_window
public PythonWindowedStream time_window(Time size, Time slide) { """ A thin wrapper layer over {@link KeyedStream#timeWindow(Time, Time)}. @param size The size of the window. @return The python wrapper {@link PythonWindowedStream} """ return new PythonWindowedStream<TimeWindow>(this.stream.timeWindow(siz...
java
public PythonWindowedStream time_window(Time size, Time slide) { return new PythonWindowedStream<TimeWindow>(this.stream.timeWindow(size, slide)); }
[ "public", "PythonWindowedStream", "time_window", "(", "Time", "size", ",", "Time", "slide", ")", "{", "return", "new", "PythonWindowedStream", "<", "TimeWindow", ">", "(", "this", ".", "stream", ".", "timeWindow", "(", "size", ",", "slide", ")", ")", ";", ...
A thin wrapper layer over {@link KeyedStream#timeWindow(Time, Time)}. @param size The size of the window. @return The python wrapper {@link PythonWindowedStream}
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "KeyedStream#timeWindow", "(", "Time", "Time", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonKeyedStream.java#L74-L76
alkacon/opencms-core
src/org/opencms/ui/sitemap/CmsSitemapTreeController.java
CmsSitemapTreeController.openTargetPage
private void openTargetPage(CmsSitemapTreeNodeData nodeData, boolean second) { """ Opens the page corresponding to a sitemap entry.<p> @param nodeData the node bean @param second true if the user has clicked on the second resource box in a tree node """ CmsUUID id = nodeData.getClientEntry().getId...
java
private void openTargetPage(CmsSitemapTreeNodeData nodeData, boolean second) { CmsUUID id = nodeData.getClientEntry().getId(); CmsUUID defaultFileId = nodeData.getClientEntry().getDefaultFileId(); CmsUUID targetId = defaultFileId; if (targetId == null) { targetId = id; ...
[ "private", "void", "openTargetPage", "(", "CmsSitemapTreeNodeData", "nodeData", ",", "boolean", "second", ")", "{", "CmsUUID", "id", "=", "nodeData", ".", "getClientEntry", "(", ")", ".", "getId", "(", ")", ";", "CmsUUID", "defaultFileId", "=", "nodeData", "."...
Opens the page corresponding to a sitemap entry.<p> @param nodeData the node bean @param second true if the user has clicked on the second resource box in a tree node
[ "Opens", "the", "page", "corresponding", "to", "a", "sitemap", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/sitemap/CmsSitemapTreeController.java#L1240-L1274
ag-gipp/MathMLTools
mathml-core/src/main/java/com/formulasearchengine/mathmltools/helper/CMMLHelper.java
CMMLHelper.getElement
public static Node getElement(Node node, String xExpr, XPath xPath) throws XPathExpressionException { """ Extracts a single node for the specified XPath expression. @param node the node @param xExpr expression @param xPath the x path @return Node @throws XPathExpressionException the xpath expression except...
java
public static Node getElement(Node node, String xExpr, XPath xPath) throws XPathExpressionException { return (Node) xPath.compile(xExpr).evaluate(node, XPathConstants.NODE); }
[ "public", "static", "Node", "getElement", "(", "Node", "node", ",", "String", "xExpr", ",", "XPath", "xPath", ")", "throws", "XPathExpressionException", "{", "return", "(", "Node", ")", "xPath", ".", "compile", "(", "xExpr", ")", ".", "evaluate", "(", "nod...
Extracts a single node for the specified XPath expression. @param node the node @param xExpr expression @param xPath the x path @return Node @throws XPathExpressionException the xpath expression exception
[ "Extracts", "a", "single", "node", "for", "the", "specified", "XPath", "expression", "." ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-core/src/main/java/com/formulasearchengine/mathmltools/helper/CMMLHelper.java#L144-L146
virgo47/javasimon
core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java
QuantilesCallback.onStopwatchAdd
@Override public void onStopwatchAdd(Stopwatch stopwatch, Split split, StopwatchSample sample) { """ When a split is added, if buckets have been initialized, the value is added to appropriate bucket. """ onStopwatchSplit(split.getStopwatch(), split); }
java
@Override public void onStopwatchAdd(Stopwatch stopwatch, Split split, StopwatchSample sample) { onStopwatchSplit(split.getStopwatch(), split); }
[ "@", "Override", "public", "void", "onStopwatchAdd", "(", "Stopwatch", "stopwatch", ",", "Split", "split", ",", "StopwatchSample", "sample", ")", "{", "onStopwatchSplit", "(", "split", ".", "getStopwatch", "(", ")", ",", "split", ")", ";", "}" ]
When a split is added, if buckets have been initialized, the value is added to appropriate bucket.
[ "When", "a", "split", "is", "added", "if", "buckets", "have", "been", "initialized", "the", "value", "is", "added", "to", "appropriate", "bucket", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/quantiles/QuantilesCallback.java#L163-L166
SimonVT/android-menudrawer
menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java
MenuDrawer.setMenuView
public void setMenuView(View view) { """ Set the menu view to an explicit view. @param view The menu view. """ setMenuView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); }
java
public void setMenuView(View view) { setMenuView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); }
[ "public", "void", "setMenuView", "(", "View", "view", ")", "{", "setMenuView", "(", "view", ",", "new", "LayoutParams", "(", "LayoutParams", ".", "MATCH_PARENT", ",", "LayoutParams", ".", "MATCH_PARENT", ")", ")", ";", "}" ]
Set the menu view to an explicit view. @param view The menu view.
[ "Set", "the", "menu", "view", "to", "an", "explicit", "view", "." ]
train
https://github.com/SimonVT/android-menudrawer/blob/59e8d18e109c77d911b8b63232d66d5f0551cf6a/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java#L1421-L1423
VoltDB/voltdb
src/frontend/org/voltdb/utils/CatalogUtil.java
CatalogUtil.getSignatureForTable
public static String getSignatureForTable(String name, SortedMap<Integer, VoltType> schema) { """ Get a string signature for the table represented by the args @param name The name of the table @param schema A sorted map of the columns in the table, keyed by column index @return The table signature string. "...
java
public static String getSignatureForTable(String name, SortedMap<Integer, VoltType> schema) { StringBuilder sb = new StringBuilder(); sb.append(name).append(SIGNATURE_TABLE_NAME_SEPARATOR); for (VoltType t : schema.values()) { sb.append(t.getSignatureChar()); } return...
[ "public", "static", "String", "getSignatureForTable", "(", "String", "name", ",", "SortedMap", "<", "Integer", ",", "VoltType", ">", "schema", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "name", ")...
Get a string signature for the table represented by the args @param name The name of the table @param schema A sorted map of the columns in the table, keyed by column index @return The table signature string.
[ "Get", "a", "string", "signature", "for", "the", "table", "represented", "by", "the", "args" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2875-L2882
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArrayFor
public static <T> Level0ArrayOperator<Float[],Float> onArrayFor(final Float... elements) { """ <p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining """ retur...
java
public static <T> Level0ArrayOperator<Float[],Float> onArrayFor(final Float... elements) { return onArrayOf(Types.FLOAT, VarArgsUtil.asRequiredObjectArray(elements)); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Float", "[", "]", ",", "Float", ">", "onArrayFor", "(", "final", "Float", "...", "elements", ")", "{", "return", "onArrayOf", "(", "Types", ".", "FLOAT", ",", "VarArgsUtil", ".", "asRequiredOb...
<p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "array", "with", "the", "specified", "elements", "and", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L932-L934
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXtypeSemanticSequencer.java
AbstractXtypeSemanticSequencer.sequence_JvmTypeReference
protected void sequence_JvmTypeReference(ISerializationContext context, JvmGenericArrayTypeReference semanticObject) { """ Contexts: JvmTypeReference returns JvmGenericArrayTypeReference JvmTypeReference.JvmGenericArrayTypeReference_0_1_0_0 returns JvmGenericArrayTypeReference JvmArgumentTypeReference returns J...
java
protected void sequence_JvmTypeReference(ISerializationContext context, JvmGenericArrayTypeReference semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, TypesPackage.Literals.JVM_GENERIC_ARRAY_TYPE_REFERENCE__COMPONENT_TYPE) == ValueTransient.YES) errorAcceptor.a...
[ "protected", "void", "sequence_JvmTypeReference", "(", "ISerializationContext", "context", ",", "JvmGenericArrayTypeReference", "semanticObject", ")", "{", "if", "(", "errorAcceptor", "!=", "null", ")", "{", "if", "(", "transientValues", ".", "isValueTransient", "(", ...
Contexts: JvmTypeReference returns JvmGenericArrayTypeReference JvmTypeReference.JvmGenericArrayTypeReference_0_1_0_0 returns JvmGenericArrayTypeReference JvmArgumentTypeReference returns JvmGenericArrayTypeReference Constraint: componentType=JvmTypeReference_JvmGenericArrayTypeReference_0_1_0_0
[ "Contexts", ":", "JvmTypeReference", "returns", "JvmGenericArrayTypeReference", "JvmTypeReference", ".", "JvmGenericArrayTypeReference_0_1_0_0", "returns", "JvmGenericArrayTypeReference", "JvmArgumentTypeReference", "returns", "JvmGenericArrayTypeReference" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXtypeSemanticSequencer.java#L239-L247
infinispan/infinispan
core/src/main/java/org/infinispan/util/concurrent/CommandAckCollector.java
CommandAckCollector.backupAck
public void backupAck(long id, Address from, int topologyId) { """ Acknowledges a write operation completion in the backup owner. @param id the id from {@link CommandInvocationId#getId()}. @param from the backup owner. @param topologyId the topology id. """ BaseAckTarget ackTarget = co...
java
public void backupAck(long id, Address from, int topologyId) { BaseAckTarget ackTarget = collectorMap.get(id); if (ackTarget instanceof SingleKeyCollector) { ((SingleKeyCollector) ackTarget).backupAck(topologyId, from); } else if (ackTarget instanceof MultiTargetCollectorImpl) { ((Mu...
[ "public", "void", "backupAck", "(", "long", "id", ",", "Address", "from", ",", "int", "topologyId", ")", "{", "BaseAckTarget", "ackTarget", "=", "collectorMap", ".", "get", "(", "id", ")", ";", "if", "(", "ackTarget", "instanceof", "SingleKeyCollector", ")",...
Acknowledges a write operation completion in the backup owner. @param id the id from {@link CommandInvocationId#getId()}. @param from the backup owner. @param topologyId the topology id.
[ "Acknowledges", "a", "write", "operation", "completion", "in", "the", "backup", "owner", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/concurrent/CommandAckCollector.java#L165-L172
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.defineOwnProperties
public void defineOwnProperties(Context cx, ScriptableObject props) { """ Defines one or more properties on this object. @param cx the current Context @param props a map of property ids to property descriptors """ Object[] ids = props.getIds(false, true); ScriptableObject[] descs = new Scri...
java
public void defineOwnProperties(Context cx, ScriptableObject props) { Object[] ids = props.getIds(false, true); ScriptableObject[] descs = new ScriptableObject[ids.length]; for (int i = 0, len = ids.length; i < len; ++i) { Object descObj = ScriptRuntime.getObjectElem(props, ids[i], c...
[ "public", "void", "defineOwnProperties", "(", "Context", "cx", ",", "ScriptableObject", "props", ")", "{", "Object", "[", "]", "ids", "=", "props", ".", "getIds", "(", "false", ",", "true", ")", ";", "ScriptableObject", "[", "]", "descs", "=", "new", "Sc...
Defines one or more properties on this object. @param cx the current Context @param props a map of property ids to property descriptors
[ "Defines", "one", "or", "more", "properties", "on", "this", "object", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L1877-L1889
schallee/alib4j
jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java
JVMLauncher.getProcessBuilder
public static ProcessBuilder getProcessBuilder(Class<?> mainClass, String...args) throws LauncherException { """ Get a process loader for a JVM. The class path for the JVM is computed based on the class loaders for the main class. @param mainClass Main class to run @param args Additional command line parameters...
java
public static ProcessBuilder getProcessBuilder(Class<?> mainClass, String...args) throws LauncherException { return getProcessBuilder(mainClass, Arrays.asList(args)); }
[ "public", "static", "ProcessBuilder", "getProcessBuilder", "(", "Class", "<", "?", ">", "mainClass", ",", "String", "...", "args", ")", "throws", "LauncherException", "{", "return", "getProcessBuilder", "(", "mainClass", ",", "Arrays", ".", "asList", "(", "args"...
Get a process loader for a JVM. The class path for the JVM is computed based on the class loaders for the main class. @param mainClass Main class to run @param args Additional command line parameters @return ProcessBuilder that has not been started.
[ "Get", "a", "process", "loader", "for", "a", "JVM", ".", "The", "class", "path", "for", "the", "JVM", "is", "computed", "based", "on", "the", "class", "loaders", "for", "the", "main", "class", "." ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/jvm/src/main/java/net/darkmist/alib/jvm/JVMLauncher.java#L182-L185
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.addFriends
public ResponseWrapper addFriends(String username, String...users) throws APIConnectionException, APIRequestException { """ Add friends to username @param username Necessary @param users username to be add @return No content @throws APIConnectionException connect exception @throws APIRequestExcept...
java
public ResponseWrapper addFriends(String username, String...users) throws APIConnectionException, APIRequestException { return _userClient.addFriends(username, users); }
[ "public", "ResponseWrapper", "addFriends", "(", "String", "username", ",", "String", "...", "users", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_userClient", ".", "addFriends", "(", "username", ",", "users", ")", ";", "}" ...
Add friends to username @param username Necessary @param users username to be add @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Add", "friends", "to", "username" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L290-L293
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java
MarkLogicRepositoryConnection.getStatements
public RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred) throws RepositoryException { """ returns all statements @param subj @param pred @param obj @param includeInferred @throws RepositoryException """ try { if (isQuadMode()) { ...
java
public RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred) throws RepositoryException { try { if (isQuadMode()) { TupleQuery tupleQuery = prepareTupleQuery(GET_STATEMENTS); setBindings(tupleQuery, subj, pred, obj); ...
[ "public", "RepositoryResult", "<", "Statement", ">", "getStatements", "(", "Resource", "subj", ",", "URI", "pred", ",", "Value", "obj", ",", "boolean", "includeInferred", ")", "throws", "RepositoryException", "{", "try", "{", "if", "(", "isQuadMode", "(", ")",...
returns all statements @param subj @param pred @param obj @param includeInferred @throws RepositoryException
[ "returns", "all", "statements" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java#L497-L537