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
UrielCh/ovh-java-sdk
ovh-java-sdk-hpcspot/src/main/java/net/minidev/ovh/api/ApiOvhHpcspot.java
ApiOvhHpcspot.serviceName_consumption_GET
public ArrayList<Long> serviceName_consumption_GET(String serviceName, Date hpcspotItemEndDate_from, Date hpcspotItemEndDate_to, Long hpcspotItemId, Long orderId, OvhConsumptionTypeEnum type) throws IOException { """ Details of the consumption of your account REST: GET /hpcspot/{serviceName}/consumption @param...
java
public ArrayList<Long> serviceName_consumption_GET(String serviceName, Date hpcspotItemEndDate_from, Date hpcspotItemEndDate_to, Long hpcspotItemId, Long orderId, OvhConsumptionTypeEnum type) throws IOException { String qPath = "/hpcspot/{serviceName}/consumption"; StringBuilder sb = path(qPath, serviceName); que...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_consumption_GET", "(", "String", "serviceName", ",", "Date", "hpcspotItemEndDate_from", ",", "Date", "hpcspotItemEndDate_to", ",", "Long", "hpcspotItemId", ",", "Long", "orderId", ",", "OvhConsumptionTypeEnum", "type...
Details of the consumption of your account REST: GET /hpcspot/{serviceName}/consumption @param hpcspotItemEndDate_from [required] Filter the value of hpcspotItemEndDate property (>=) @param hpcspotItemId [required] Filter the value of hpcspotItemId property (=) @param orderId [required] Filter the value of orderId pro...
[ "Details", "of", "the", "consumption", "of", "your", "account" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hpcspot/src/main/java/net/minidev/ovh/api/ApiOvhHpcspot.java#L88-L98
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfw_stats.java
appfw_stats.get_nitro_response
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { """ <pre> converts nitro response into object and returns the object array in case of get request. </pre> """ appfw_stats[] resources = new appfw_stats[1]; appfw_response result = (appfw_response) serv...
java
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { appfw_stats[] resources = new appfw_stats[1]; appfw_response result = (appfw_response) service.get_payload_formatter().string_to_resource(appfw_response.class, response); if(result.errorcode != 0) { if (resu...
[ "protected", "base_resource", "[", "]", "get_nitro_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "appfw_stats", "[", "]", "resources", "=", "new", "appfw_stats", "[", "1", "]", ";", "appfw_response", "res...
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "converts", "nitro", "response", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appfw/appfw_stats.java#L707-L726
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getPvPGameInfo
public void getPvPGameInfo(String api, String[] ids, Callback<List<PvPGame>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on pvp games API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/games">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response...
java
public void getPvPGameInfo(String api, String[] ids, Callback<List<PvPGame>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, api), new ParamChecker(ids)); gw2API.getPvPGameInfo(api, processIds(ids)).enqueue(callback); }
[ "public", "void", "getPvPGameInfo", "(", "String", "api", ",", "String", "[", "]", "ids", ",", "Callback", "<", "List", "<", "PvPGame", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", ...
For more info on pvp games API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/games">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param api Guild Wars 2 API key @param ids list of pvp...
[ "For", "more", "info", "on", "pvp", "games", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "pvp", "/", "games", ">", "here<", "/", "a", ">", "<br", "/", ">", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2054-L2057
jhy/jsoup
src/main/java/org/jsoup/nodes/Element.java
Element.prependElement
public Element prependElement(String tagName) { """ Create a new element by tag name, and add it as the first child. @param tagName the name of the tag (e.g. {@code div}). @return the new element, to allow you to add content to it, e.g.: {@code parent.prependElement("h1").attr("id", "header").text("Welcome");...
java
public Element prependElement(String tagName) { Element child = new Element(Tag.valueOf(tagName, NodeUtils.parser(this).settings()), baseUri()); prependChild(child); return child; }
[ "public", "Element", "prependElement", "(", "String", "tagName", ")", "{", "Element", "child", "=", "new", "Element", "(", "Tag", ".", "valueOf", "(", "tagName", ",", "NodeUtils", ".", "parser", "(", "this", ")", ".", "settings", "(", ")", ")", ",", "b...
Create a new element by tag name, and add it as the first child. @param tagName the name of the tag (e.g. {@code div}). @return the new element, to allow you to add content to it, e.g.: {@code parent.prependElement("h1").attr("id", "header").text("Welcome");}
[ "Create", "a", "new", "element", "by", "tag", "name", "and", "add", "it", "as", "the", "first", "child", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Element.java#L507-L511
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.roundDown
private static double roundDown(final double n, final int p) { """ Returns a value rounded to p digits after decimal. If p is negative, then the number is rounded to places to the left of the decimal point. eg. 10.23 rounded to -1 will give: 10. If p is zero, the returned value is rounded to the nearest integr...
java
private static double roundDown(final double n, final int p) { double retval; if (Double.isNaN(n) || Double.isInfinite(n)) { retval = Double.NaN; } else { if (p != 0) { final double temp = Math.pow(10, p); retval = sign(n) * Math.r...
[ "private", "static", "double", "roundDown", "(", "final", "double", "n", ",", "final", "int", "p", ")", "{", "double", "retval", ";", "if", "(", "Double", ".", "isNaN", "(", "n", ")", "||", "Double", ".", "isInfinite", "(", "n", ")", ")", "{", "ret...
Returns a value rounded to p digits after decimal. If p is negative, then the number is rounded to places to the left of the decimal point. eg. 10.23 rounded to -1 will give: 10. If p is zero, the returned value is rounded to the nearest integral value. <p>If n is negative, the resulting value is obtained as the round-...
[ "Returns", "a", "value", "rounded", "to", "p", "digits", "after", "decimal", ".", "If", "p", "is", "negative", "then", "the", "number", "is", "rounded", "to", "places", "to", "the", "left", "of", "the", "decimal", "point", ".", "eg", ".", "10", ".", ...
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L601-L616
aalmiray/Json-lib
src/main/java/net/sf/json/regexp/RegexpUtils.java
RegexpUtils.getMatcher
public static RegexpMatcher getMatcher( String pattern, boolean multiline ) { """ Returns a RegexpMatcher that works in a specific environment.<br> When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher. """ if( isJDK13() ){ retu...
java
public static RegexpMatcher getMatcher( String pattern, boolean multiline ) { if( isJDK13() ){ return new Perl5RegexpMatcher( pattern, true ); }else{ return new JdkRegexpMatcher( pattern, true ); } }
[ "public", "static", "RegexpMatcher", "getMatcher", "(", "String", "pattern", ",", "boolean", "multiline", ")", "{", "if", "(", "isJDK13", "(", ")", ")", "{", "return", "new", "Perl5RegexpMatcher", "(", "pattern", ",", "true", ")", ";", "}", "else", "{", ...
Returns a RegexpMatcher that works in a specific environment.<br> When in a JVM 1.3.1 it will return a Perl5RegexpMatcher, if the JVM is younger (1.4+) it will return a JdkRegexpMatcher.
[ "Returns", "a", "RegexpMatcher", "that", "works", "in", "a", "specific", "environment", ".", "<br", ">", "When", "in", "a", "JVM", "1", ".", "3", ".", "1", "it", "will", "return", "a", "Perl5RegexpMatcher", "if", "the", "JVM", "is", "younger", "(", "1"...
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/regexp/RegexpUtils.java#L48-L54
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/util/XmlUtil.java
XmlUtil.newInputSource
public static InputSource newInputSource(Reader reader, String systemId) { """ Create an InputSource from a Reader. The systemId will be wrapped for use with JSTL's EntityResolver and UriResolver. @param reader the source of the XML @param systemId the system id @return a configured InputSource """ ...
java
public static InputSource newInputSource(Reader reader, String systemId) { InputSource source = new InputSource(reader); source.setSystemId(wrapSystemId(systemId)); return source; }
[ "public", "static", "InputSource", "newInputSource", "(", "Reader", "reader", ",", "String", "systemId", ")", "{", "InputSource", "source", "=", "new", "InputSource", "(", "reader", ")", ";", "source", ".", "setSystemId", "(", "wrapSystemId", "(", "systemId", ...
Create an InputSource from a Reader. The systemId will be wrapped for use with JSTL's EntityResolver and UriResolver. @param reader the source of the XML @param systemId the system id @return a configured InputSource
[ "Create", "an", "InputSource", "from", "a", "Reader", "." ]
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/util/XmlUtil.java#L215-L219
rubenlagus/TelegramBots
telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMedia.java
InputMedia.setMedia
public T setMedia(File mediaFile, String fileName) { """ Use this setter to send new file. @param mediaFile File to send @return This object """ this.newMediaFile = mediaFile; this.isNewMedia = true; this.mediaName = fileName; this.media = "attach://" + fileName; retur...
java
public T setMedia(File mediaFile, String fileName) { this.newMediaFile = mediaFile; this.isNewMedia = true; this.mediaName = fileName; this.media = "attach://" + fileName; return (T) this; }
[ "public", "T", "setMedia", "(", "File", "mediaFile", ",", "String", "fileName", ")", "{", "this", ".", "newMediaFile", "=", "mediaFile", ";", "this", ".", "isNewMedia", "=", "true", ";", "this", ".", "mediaName", "=", "fileName", ";", "this", ".", "media...
Use this setter to send new file. @param mediaFile File to send @return This object
[ "Use", "this", "setter", "to", "send", "new", "file", "." ]
train
https://github.com/rubenlagus/TelegramBots/blob/d62354915d7664597a40fd9858f16bce67ef1478/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMedia.java#L91-L97
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplace.java
CmsWorkplace.substituteSiteTitleStatic
public static String substituteSiteTitleStatic(String title, Locale locale) { """ Substitutes the site title.<p> @param title the raw site title @param locale the localel @return the locale specific site title """ if (title.equals(CmsSiteManagerImpl.SHARED_FOLDER_TITLE)) { return Me...
java
public static String substituteSiteTitleStatic(String title, Locale locale) { if (title.equals(CmsSiteManagerImpl.SHARED_FOLDER_TITLE)) { return Messages.get().getBundle(locale).key(Messages.GUI_SHARED_TITLE_0); } return title; }
[ "public", "static", "String", "substituteSiteTitleStatic", "(", "String", "title", ",", "Locale", "locale", ")", "{", "if", "(", "title", ".", "equals", "(", "CmsSiteManagerImpl", ".", "SHARED_FOLDER_TITLE", ")", ")", "{", "return", "Messages", ".", "get", "("...
Substitutes the site title.<p> @param title the raw site title @param locale the localel @return the locale specific site title
[ "Substitutes", "the", "site", "title", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplace.java#L974-L981
google/closure-templates
java/src/com/google/template/soy/error/SoyErrors.java
SoyErrors.getDidYouMeanMessage
public static String getDidYouMeanMessage(Iterable<String> allNames, String wrongName) { """ Given a collection of strings and a name that isn't contained in it. Return a message that suggests one of the names. <p>Returns the empty string if {@code allNames} is empty or there is no close match. """ Str...
java
public static String getDidYouMeanMessage(Iterable<String> allNames, String wrongName) { String closestName = getClosest(allNames, wrongName); if (closestName != null) { return String.format(" Did you mean '%s'?", closestName); } return ""; }
[ "public", "static", "String", "getDidYouMeanMessage", "(", "Iterable", "<", "String", ">", "allNames", ",", "String", "wrongName", ")", "{", "String", "closestName", "=", "getClosest", "(", "allNames", ",", "wrongName", ")", ";", "if", "(", "closestName", "!="...
Given a collection of strings and a name that isn't contained in it. Return a message that suggests one of the names. <p>Returns the empty string if {@code allNames} is empty or there is no close match.
[ "Given", "a", "collection", "of", "strings", "and", "a", "name", "that", "isn", "t", "contained", "in", "it", ".", "Return", "a", "message", "that", "suggests", "one", "of", "the", "names", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/error/SoyErrors.java#L37-L43
threerings/nenya
core/src/main/java/com/threerings/media/animation/ScaleAnimation.java
ScaleAnimation.getSize
public static Point getSize (float scale, Mirage image) { """ Computes the width and height to which an image should be scaled. """ int width = Math.max(0, Math.round(image.getWidth() * scale)); int height = Math.max(0, Math.round(image.getHeight() * scale)); return new Point(width, h...
java
public static Point getSize (float scale, Mirage image) { int width = Math.max(0, Math.round(image.getWidth() * scale)); int height = Math.max(0, Math.round(image.getHeight() * scale)); return new Point(width, height); }
[ "public", "static", "Point", "getSize", "(", "float", "scale", ",", "Mirage", "image", ")", "{", "int", "width", "=", "Math", ".", "max", "(", "0", ",", "Math", ".", "round", "(", "image", ".", "getWidth", "(", ")", "*", "scale", ")", ")", ";", "...
Computes the width and height to which an image should be scaled.
[ "Computes", "the", "width", "and", "height", "to", "which", "an", "image", "should", "be", "scaled", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/animation/ScaleAnimation.java#L94-L99
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java
GlobalConfiguration.loadYAMLResource
private static Configuration loadYAMLResource(File file) { """ Loads a YAML-file of key-value pairs. <p>Colon and whitespace ": " separate key and value (one per line). The hash tag "#" starts a single-line comment. <p>Example: <pre> jobmanager.rpc.address: localhost # network address for communication w...
java
private static Configuration loadYAMLResource(File file) { final Configuration config = new Configuration(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)))){ String line; int lineNo = 0; while ((line = reader.readLine()) != null) { lineNo++; // 1...
[ "private", "static", "Configuration", "loadYAMLResource", "(", "File", "file", ")", "{", "final", "Configuration", "config", "=", "new", "Configuration", "(", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStrea...
Loads a YAML-file of key-value pairs. <p>Colon and whitespace ": " separate key and value (one per line). The hash tag "#" starts a single-line comment. <p>Example: <pre> jobmanager.rpc.address: localhost # network address for communication with the job manager jobmanager.rpc.port : 6123 # network port to con...
[ "Loads", "a", "YAML", "-", "file", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L160-L201
apache/incubator-druid
core/src/main/java/org/apache/druid/java/util/emitter/core/Batch.java
Batch.tryReserveEventSizeAndLock
private int tryReserveEventSizeAndLock(long state, int size) { """ Returns the buffer offset at which the caller has reserved the ability to write `size` bytes exclusively, or negative number, if the reservation attempt failed. """ Preconditions.checkArgument(size > 0); int bufferWatermark = bufferWat...
java
private int tryReserveEventSizeAndLock(long state, int size) { Preconditions.checkArgument(size > 0); int bufferWatermark = bufferWatermark(state); while (true) { if (compareAndSetState(state, state + size + PARTY)) { return bufferWatermark; } state = getState(); if (isSeal...
[ "private", "int", "tryReserveEventSizeAndLock", "(", "long", "state", ",", "int", "size", ")", "{", "Preconditions", ".", "checkArgument", "(", "size", ">", "0", ")", ";", "int", "bufferWatermark", "=", "bufferWatermark", "(", "state", ")", ";", "while", "("...
Returns the buffer offset at which the caller has reserved the ability to write `size` bytes exclusively, or negative number, if the reservation attempt failed.
[ "Returns", "the", "buffer", "offset", "at", "which", "the", "caller", "has", "reserved", "the", "ability", "to", "write", "size", "bytes", "exclusively", "or", "negative", "number", "if", "the", "reservation", "attempt", "failed", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/java/util/emitter/core/Batch.java#L198-L217
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10Attribute
public static void escapeXml10Attribute(final String text, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { """ <p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing ...
java
public static void escapeXml10Attribute(final String text, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { escapeXml(text, writer, XmlEscapeSymbols.XML10_ATTRIBUTE_SYMBOLS, type, level); }
[ "public", "static", "void", "escapeXml10Attribute", "(", "final", "String", "text", ",", "final", "Writer", "writer", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "throws", "IOException", "{", "escapeXml", "(", "text", ","...
<p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing results to a <tt>Writer</tt>. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xm...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "0", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "meant", "to", "be", "an", "XML", "attribute", "value", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1126-L1129
jenkinsci/jenkins
core/src/main/java/hudson/model/Descriptor.java
Descriptor.findByDescribableClassName
public static @CheckForNull <T extends Descriptor> T findByDescribableClassName(Collection<? extends T> list, String className) { """ Finds a descriptor from a collection by the class name of the {@link Describable} it describes. @param className should match {@link Class#getName} of a {@link #clazz} @since 1.61...
java
public static @CheckForNull <T extends Descriptor> T findByDescribableClassName(Collection<? extends T> list, String className) { for (T d : list) { if(d.clazz.getName().equals(className)) return d; } return null; }
[ "public", "static", "@", "CheckForNull", "<", "T", "extends", "Descriptor", ">", "T", "findByDescribableClassName", "(", "Collection", "<", "?", "extends", "T", ">", "list", ",", "String", "className", ")", "{", "for", "(", "T", "d", ":", "list", ")", "{...
Finds a descriptor from a collection by the class name of the {@link Describable} it describes. @param className should match {@link Class#getName} of a {@link #clazz} @since 1.610
[ "Finds", "a", "descriptor", "from", "a", "collection", "by", "the", "class", "name", "of", "the", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Descriptor.java#L1099-L1105
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/ServiceUtils.java
ServiceUtils.getPartCount
public static Integer getPartCount(GetObjectRequest getObjectRequest, AmazonS3 s3) { """ Returns the part count of the object represented by the getObjectRequest. @param getObjectRequest The request to check. @param s3 The Amazon s3 client. @return The number of parts in the object if it is multipart obj...
java
public static Integer getPartCount(GetObjectRequest getObjectRequest, AmazonS3 s3) { ValidationUtils.assertNotNull(s3, "S3 client"); ValidationUtils.assertNotNull(getObjectRequest, "GetObjectRequest"); GetObjectMetadataRequest getObjectMetadataRequest = RequestCopyUtils.createGetObjectMetadataR...
[ "public", "static", "Integer", "getPartCount", "(", "GetObjectRequest", "getObjectRequest", ",", "AmazonS3", "s3", ")", "{", "ValidationUtils", ".", "assertNotNull", "(", "s3", ",", "\"S3 client\"", ")", ";", "ValidationUtils", ".", "assertNotNull", "(", "getObjectR...
Returns the part count of the object represented by the getObjectRequest. @param getObjectRequest The request to check. @param s3 The Amazon s3 client. @return The number of parts in the object if it is multipart object, otherwise returns null.
[ "Returns", "the", "part", "count", "of", "the", "object", "represented", "by", "the", "getObjectRequest", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/ServiceUtils.java#L514-L522
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.cartesianPower
public static <T> StreamEx<List<T>> cartesianPower(int n, Collection<T> source) { """ Returns a new {@code StreamEx} which elements are {@link List} objects containing all possible n-tuples of the elements of supplied collection. The whole stream forms an n-fold Cartesian product of input collection with itself...
java
public static <T> StreamEx<List<T>> cartesianPower(int n, Collection<T> source) { if (n == 0) return StreamEx.of(new ConstSpliterator.OfRef<>(Collections.emptyList(), 1, true)); return of(new CrossSpliterator.ToList<>(Collections.nCopies(n, source))); }
[ "public", "static", "<", "T", ">", "StreamEx", "<", "List", "<", "T", ">", ">", "cartesianPower", "(", "int", "n", ",", "Collection", "<", "T", ">", "source", ")", "{", "if", "(", "n", "==", "0", ")", "return", "StreamEx", ".", "of", "(", "new", ...
Returns a new {@code StreamEx} which elements are {@link List} objects containing all possible n-tuples of the elements of supplied collection. The whole stream forms an n-fold Cartesian product of input collection with itself or n-ary Cartesian power of the input collection. <p> Every stream element is the {@code Lis...
[ "Returns", "a", "new", "{", "@code", "StreamEx", "}", "which", "elements", "are", "{", "@link", "List", "}", "objects", "containing", "all", "possible", "n", "-", "tuples", "of", "the", "elements", "of", "supplied", "collection", ".", "The", "whole", "stre...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L3173-L3177
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java
GlobusPathMatchingResourcePatternResolver.getPathUntilWildcard
private String getPathUntilWildcard(String locationPatternString, boolean defaultToLocaldir) { """ Returns a substring of the locationPattern from the beginning to the first occurrence of * or ? If this is unsuccessful, start at current directory ./ @param locationPatternString The Ant-Style location pattern. ...
java
private String getPathUntilWildcard(String locationPatternString, boolean defaultToLocaldir) { String currentLocationPatternString; int locationPatternStringLength = locationPatternString.length(); //Find the first occurrence of * or ?, if none, set idx to locationPatternLength int sta...
[ "private", "String", "getPathUntilWildcard", "(", "String", "locationPatternString", ",", "boolean", "defaultToLocaldir", ")", "{", "String", "currentLocationPatternString", ";", "int", "locationPatternStringLength", "=", "locationPatternString", ".", "length", "(", ")", ...
Returns a substring of the locationPattern from the beginning to the first occurrence of * or ? If this is unsuccessful, start at current directory ./ @param locationPatternString The Ant-Style location pattern. @return A substring of the locationPatternString from the beginning to the first occurrence of a wildcard c...
[ "Returns", "a", "substring", "of", "the", "locationPattern", "from", "the", "beginning", "to", "the", "first", "occurrence", "of", "*", "or", "?", "If", "this", "is", "unsuccessful", "start", "at", "current", "directory", ".", "/" ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java#L119-L136
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java
Configuration.registerTableOverride
@Deprecated public SchemaAndTable registerTableOverride(String schema, String oldTable, String newSchema, String newTable) { """ Register a schema specific table override @param schema schema of table @param oldTable table to override @param newSchema override schema @param newTable override table @retu...
java
@Deprecated public SchemaAndTable registerTableOverride(String schema, String oldTable, String newSchema, String newTable) { return registerTableOverride(new SchemaAndTable(schema, oldTable), new SchemaAndTable(newSchema, newTable)); }
[ "@", "Deprecated", "public", "SchemaAndTable", "registerTableOverride", "(", "String", "schema", ",", "String", "oldTable", ",", "String", "newSchema", ",", "String", "newTable", ")", "{", "return", "registerTableOverride", "(", "new", "SchemaAndTable", "(", "schema...
Register a schema specific table override @param schema schema of table @param oldTable table to override @param newSchema override schema @param newTable override table @return previous override value @deprecated Use {@link #setDynamicNameMapping(NameMapping)} instead.
[ "Register", "a", "schema", "specific", "table", "override" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/Configuration.java#L368-L371
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyServerBuilder.java
NettyServerBuilder.keepAliveTime
public NettyServerBuilder keepAliveTime(long keepAliveTime, TimeUnit timeUnit) { """ Sets a custom keepalive time, the delay time for sending next keepalive ping. An unreasonably small value might be increased, and {@code Long.MAX_VALUE} nano seconds or an unreasonably large value will disable keepalive. @sin...
java
public NettyServerBuilder keepAliveTime(long keepAliveTime, TimeUnit timeUnit) { checkArgument(keepAliveTime > 0L, "keepalive time must be positive"); keepAliveTimeInNanos = timeUnit.toNanos(keepAliveTime); keepAliveTimeInNanos = KeepAliveManager.clampKeepAliveTimeInNanos(keepAliveTimeInNanos); if (keep...
[ "public", "NettyServerBuilder", "keepAliveTime", "(", "long", "keepAliveTime", ",", "TimeUnit", "timeUnit", ")", "{", "checkArgument", "(", "keepAliveTime", ">", "0L", ",", "\"keepalive time must be positive\"", ")", ";", "keepAliveTimeInNanos", "=", "timeUnit", ".", ...
Sets a custom keepalive time, the delay time for sending next keepalive ping. An unreasonably small value might be increased, and {@code Long.MAX_VALUE} nano seconds or an unreasonably large value will disable keepalive. @since 1.3.0
[ "Sets", "a", "custom", "keepalive", "time", "the", "delay", "time", "for", "sending", "next", "keepalive", "ping", ".", "An", "unreasonably", "small", "value", "might", "be", "increased", "and", "{", "@code", "Long", ".", "MAX_VALUE", "}", "nano", "seconds",...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyServerBuilder.java#L371-L384
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/TimeUtil.java
TimeUtil.timeInMsOrTimeIfNullUnit
public static long timeInMsOrTimeIfNullUnit(long time, TimeUnit timeUnit) { """ Convert time to milliseconds based on the given time unit. If time unit is null, then input time is treated as milliseconds. @param time The input time @param timeUnit The time unit to base the conversion on @return The milliseco...
java
public static long timeInMsOrTimeIfNullUnit(long time, TimeUnit timeUnit) { return timeUnit != null ? timeUnit.toMillis(time) : time; }
[ "public", "static", "long", "timeInMsOrTimeIfNullUnit", "(", "long", "time", ",", "TimeUnit", "timeUnit", ")", "{", "return", "timeUnit", "!=", "null", "?", "timeUnit", ".", "toMillis", "(", "time", ")", ":", "time", ";", "}" ]
Convert time to milliseconds based on the given time unit. If time unit is null, then input time is treated as milliseconds. @param time The input time @param timeUnit The time unit to base the conversion on @return The millisecond representation of the time based on the unit, or the time itself if the unit is <code>n...
[ "Convert", "time", "to", "milliseconds", "based", "on", "the", "given", "time", "unit", ".", "If", "time", "unit", "is", "null", "then", "input", "time", "is", "treated", "as", "milliseconds", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/TimeUtil.java#L59-L61
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/beans/ELTools.java
ELTools.createValueExpression
public static ValueExpression createValueExpression(String p_expression, Class<?> expectedType) { """ Utility method to create a JSF Value expression from p_expression with exprectedType class as return @param p_expression @param expectedType @return """ FacesContext context = FacesContext.getCurrentIn...
java
public static ValueExpression createValueExpression(String p_expression, Class<?> expectedType) { FacesContext context = FacesContext.getCurrentInstance(); ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory(); ELContext elContext = context.getELContext(); if (null == expectedTyp...
[ "public", "static", "ValueExpression", "createValueExpression", "(", "String", "p_expression", ",", "Class", "<", "?", ">", "expectedType", ")", "{", "FacesContext", "context", "=", "FacesContext", ".", "getCurrentInstance", "(", ")", ";", "ExpressionFactory", "expr...
Utility method to create a JSF Value expression from p_expression with exprectedType class as return @param p_expression @param expectedType @return
[ "Utility", "method", "to", "create", "a", "JSF", "Value", "expression", "from", "p_expression", "with", "exprectedType", "class", "as", "return" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/beans/ELTools.java#L68-L78
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsCrudCouldNotFindCrudTable
public FessMessages addErrorsCrudCouldNotFindCrudTable(String property, String arg0) { """ Add the created action message for the key 'errors.crud_could_not_find_crud_table' with parameters. <pre> message: Could not find the data({0}). </pre> @param property The property name for the message. (NotNull) @param...
java
public FessMessages addErrorsCrudCouldNotFindCrudTable(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_crud_could_not_find_crud_table, arg0)); return this; }
[ "public", "FessMessages", "addErrorsCrudCouldNotFindCrudTable", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_crud_could_not_find_crud_table...
Add the created action message for the key 'errors.crud_could_not_find_crud_table' with parameters. <pre> message: Could not find the data({0}). </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "crud_could_not_find_crud_table", "with", "parameters", ".", "<pre", ">", "message", ":", "Could", "not", "find", "the", "data", "(", "{", "0", "}", ")", ".", "<", "/", "pr...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L2170-L2174
DJCordhose/jmte
src/com/floreysoft/jmte/util/Util.java
Util.streamToString
public static String streamToString(InputStream is, String charsetName) { """ Transforms a stream into a string. @param is the stream to be transformed @param charsetName encoding of the file @return the string containing the content of the stream """ try { Reader r = null; try { r = new...
java
public static String streamToString(InputStream is, String charsetName) { try { Reader r = null; try { r = new BufferedReader(new InputStreamReader(is, charsetName)); return readerToString(r); } finally { if (r != null) { try { r.close(); } catch (IOException e) { ...
[ "public", "static", "String", "streamToString", "(", "InputStream", "is", ",", "String", "charsetName", ")", "{", "try", "{", "Reader", "r", "=", "null", ";", "try", "{", "r", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "is", ",", ...
Transforms a stream into a string. @param is the stream to be transformed @param charsetName encoding of the file @return the string containing the content of the stream
[ "Transforms", "a", "stream", "into", "a", "string", "." ]
train
https://github.com/DJCordhose/jmte/blob/7334e6d111cc2198c5cf69ee336584ab9e192fe5/src/com/floreysoft/jmte/util/Util.java#L124-L142
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java
WaveformPreviewComponent.setWaveformPreview
public void setWaveformPreview(WaveformPreview preview, int duration, CueList cueList) { """ Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param preview the waveform preview to display @param duration the playback du...
java
public void setWaveformPreview(WaveformPreview preview, int duration, CueList cueList) { updateWaveform(preview); this.duration.set(duration); this.cueList.set(cueList); clearPlaybackState(); repaint(); }
[ "public", "void", "setWaveformPreview", "(", "WaveformPreview", "preview", ",", "int", "duration", ",", "CueList", "cueList", ")", "{", "updateWaveform", "(", "preview", ")", ";", "this", ".", "duration", ".", "set", "(", "duration", ")", ";", "this", ".", ...
Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param preview the waveform preview to display @param duration the playback duration, in seconds, of the track whose waveform we are drawing, so we can translate times into positio...
[ "Change", "the", "waveform", "preview", "being", "drawn", ".", "This", "will", "be", "quickly", "overruled", "if", "a", "player", "is", "being", "monitored", "but", "can", "be", "used", "in", "other", "contexts", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformPreviewComponent.java#L466-L472
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java
GVRGenericConstraint.setLinearLowerLimits
public void setLinearLowerLimits(float limitX, float limitY, float limitZ) { """ Sets the lower limits for the "moving" body translation relative to joint point. @param limitX the X axis lower translation limit @param limitY the Y axis lower translation limit @param limitZ the Z axis lower translation limit ...
java
public void setLinearLowerLimits(float limitX, float limitY, float limitZ) { Native3DGenericConstraint.setLinearLowerLimits(getNative(), limitX, limitY, limitZ); }
[ "public", "void", "setLinearLowerLimits", "(", "float", "limitX", ",", "float", "limitY", ",", "float", "limitZ", ")", "{", "Native3DGenericConstraint", ".", "setLinearLowerLimits", "(", "getNative", "(", ")", ",", "limitX", ",", "limitY", ",", "limitZ", ")", ...
Sets the lower limits for the "moving" body translation relative to joint point. @param limitX the X axis lower translation limit @param limitY the Y axis lower translation limit @param limitZ the Z axis lower translation limit
[ "Sets", "the", "lower", "limits", "for", "the", "moving", "body", "translation", "relative", "to", "joint", "point", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRGenericConstraint.java#L65-L67
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/authentication/AuthenticationApi.java
AuthenticationApi.signOutPost
public ModelApiResponse signOutPost(String authorization, Boolean global) throws AuthenticationApiException { """ Sign-out a logged in user Sign-out the current user and invalidate either the current token or all tokens associated with the user. @param authorization The OAuth 2 bearer access token you received...
java
public ModelApiResponse signOutPost(String authorization, Boolean global) throws AuthenticationApiException { try { return authenticationApi.signOut(authorization, global); } catch (ApiException e) { throw new AuthenticationApiException("Error sign out", e); } }
[ "public", "ModelApiResponse", "signOutPost", "(", "String", "authorization", ",", "Boolean", "global", ")", "throws", "AuthenticationApiException", "{", "try", "{", "return", "authenticationApi", ".", "signOut", "(", "authorization", ",", "global", ")", ";", "}", ...
Sign-out a logged in user Sign-out the current user and invalidate either the current token or all tokens associated with the user. @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Autho...
[ "Sign", "-", "out", "a", "logged", "in", "user", "Sign", "-", "out", "the", "current", "user", "and", "invalidate", "either", "the", "current", "token", "or", "all", "tokens", "associated", "with", "the", "user", "." ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/authentication/AuthenticationApi.java#L169-L175
groupe-sii/ogham
ogham-core/src/main/java/fr/sii/ogham/core/template/context/SimpleContext.java
SimpleContext.addValue
public final SimpleContext addValue(String variable, Object value) { """ Add a new variable entry. @param variable the name of the variable @param value the value of the variable @return the context for fluent use """ variables.put(variable, value); return this; }
java
public final SimpleContext addValue(String variable, Object value) { variables.put(variable, value); return this; }
[ "public", "final", "SimpleContext", "addValue", "(", "String", "variable", ",", "Object", "value", ")", "{", "variables", ".", "put", "(", "variable", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add a new variable entry. @param variable the name of the variable @param value the value of the variable @return the context for fluent use
[ "Add", "a", "new", "variable", "entry", "." ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-core/src/main/java/fr/sii/ogham/core/template/context/SimpleContext.java#L56-L59
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/adapter/urbridge/URBridge.java
URBridge.setCustomProperties
private void setCustomProperties(List<Map<String, String>> propList) throws WIMException { """ Set Custom UR Bridge properties. @param propList @throws WIMException """ final String METHODNAME = "setCustomProperties"; customPropertyMap = new HashMap<String, String>(); if (propList =...
java
private void setCustomProperties(List<Map<String, String>> propList) throws WIMException { final String METHODNAME = "setCustomProperties"; customPropertyMap = new HashMap<String, String>(); if (propList == null) { return; } Iterator<Map<String, String>> itr = propLis...
[ "private", "void", "setCustomProperties", "(", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "propList", ")", "throws", "WIMException", "{", "final", "String", "METHODNAME", "=", "\"setCustomProperties\"", ";", "customPropertyMap", "=", "new", "Has...
Set Custom UR Bridge properties. @param propList @throws WIMException
[ "Set", "Custom", "UR", "Bridge", "properties", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.core/src/com/ibm/ws/security/wim/adapter/urbridge/URBridge.java#L315-L333
mozilla/rhino
src/org/mozilla/javascript/Sorting.java
Sorting.hybridSort
public static void hybridSort(Object[] a, Comparator<Object> cmp) { """ /* Hybrid sorting mechanism similar to Introsort by David Musser. Uses quicksort's partitioning mechanism recursively until the resulting array is small or the recursion is too deep, and then use insertion sort for the rest. This is the sa...
java
public static void hybridSort(Object[] a, Comparator<Object> cmp) { hybridSort(a, 0, a.length - 1, cmp, log2(a.length) * 2); }
[ "public", "static", "void", "hybridSort", "(", "Object", "[", "]", "a", ",", "Comparator", "<", "Object", ">", "cmp", ")", "{", "hybridSort", "(", "a", ",", "0", ",", "a", ".", "length", "-", "1", ",", "cmp", ",", "log2", "(", "a", ".", "length",...
/* Hybrid sorting mechanism similar to Introsort by David Musser. Uses quicksort's partitioning mechanism recursively until the resulting array is small or the recursion is too deep, and then use insertion sort for the rest. This is the same basic algorithm used by the GNU Standard C++ library.
[ "/", "*", "Hybrid", "sorting", "mechanism", "similar", "to", "Introsort", "by", "David", "Musser", ".", "Uses", "quicksort", "s", "partitioning", "mechanism", "recursively", "until", "the", "resulting", "array", "is", "small", "or", "the", "recursion", "is", "...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Sorting.java#L34-L37
groupon/monsoon
history/src/main/java/com/groupon/lex/metrics/history/xdr/TSDataScanDir.java
TSDataScanDir.metadata_end_cmp_
private static int metadata_end_cmp_(MetaData x, MetaData y) { """ Comparator, in order to sort MetaData based on the end timestamp. @param x One of the MetaData to compare. @param y Another one of the MetaData to compare. @return Comparator result. """ return x.getEnd().compareTo(y.getEnd()); ...
java
private static int metadata_end_cmp_(MetaData x, MetaData y) { return x.getEnd().compareTo(y.getEnd()); }
[ "private", "static", "int", "metadata_end_cmp_", "(", "MetaData", "x", ",", "MetaData", "y", ")", "{", "return", "x", ".", "getEnd", "(", ")", ".", "compareTo", "(", "y", ".", "getEnd", "(", ")", ")", ";", "}" ]
Comparator, in order to sort MetaData based on the end timestamp. @param x One of the MetaData to compare. @param y Another one of the MetaData to compare. @return Comparator result.
[ "Comparator", "in", "order", "to", "sort", "MetaData", "based", "on", "the", "end", "timestamp", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/history/src/main/java/com/groupon/lex/metrics/history/xdr/TSDataScanDir.java#L186-L188
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.management.j2ee/src/com/ibm/ws/jca/management/j2ee/internal/JCAResourceMBeanImpl.java
JCAResourceMBeanImpl.setConnectionFactoryChild
protected JCAConnectionFactoryMBeanImpl setConnectionFactoryChild(String key, JCAConnectionFactoryMBeanImpl cf) { """ setConnectionFactoryChild add a child of type JCAConnectionFactoryMBeanImpl to this MBean. @param key the String value which will be used as the key for the JCAConnectionFactoryMBeanImpl item @...
java
protected JCAConnectionFactoryMBeanImpl setConnectionFactoryChild(String key, JCAConnectionFactoryMBeanImpl cf) { return cfMBeanChildrenList.put(key, cf); }
[ "protected", "JCAConnectionFactoryMBeanImpl", "setConnectionFactoryChild", "(", "String", "key", ",", "JCAConnectionFactoryMBeanImpl", "cf", ")", "{", "return", "cfMBeanChildrenList", ".", "put", "(", "key", ",", "cf", ")", ";", "}" ]
setConnectionFactoryChild add a child of type JCAConnectionFactoryMBeanImpl to this MBean. @param key the String value which will be used as the key for the JCAConnectionFactoryMBeanImpl item @param cf the JCAConnectionFactoryMBeanImpl value to be associated with the specified key @return The previous value associated...
[ "setConnectionFactoryChild", "add", "a", "child", "of", "type", "JCAConnectionFactoryMBeanImpl", "to", "this", "MBean", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.management.j2ee/src/com/ibm/ws/jca/management/j2ee/internal/JCAResourceMBeanImpl.java#L243-L245
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.findByUserId
@Override public List<CommerceWishList> findByUserId(long userId, int start, int end) { """ Returns a range of all the commerce wish lists where userId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary ...
java
@Override public List<CommerceWishList> findByUserId(long userId, int start, int end) { return findByUserId(userId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWishList", ">", "findByUserId", "(", "long", "userId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByUserId", "(", "userId", ",", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce wish lists where userId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set....
[ "Returns", "a", "range", "of", "all", "the", "commerce", "wish", "lists", "where", "userId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L2040-L2043
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/PolicyIndexBase.java
PolicyIndexBase.handleDocument
protected AbstractPolicy handleDocument(Document doc, PolicyFinder policyFinder) throws ParsingException { """ A private method that handles reading the policy and creates the correct kind of AbstractPolicy. Because this makes use of the policyFinder, it cannot be reused between finders. Consider moving to poli...
java
protected AbstractPolicy handleDocument(Document doc, PolicyFinder policyFinder) throws ParsingException { // handle the policy, if it's a known type Element root = doc.getDocumentElement(); String name = root.getTagName(); // see what type of policy this is if (name.equals("Pol...
[ "protected", "AbstractPolicy", "handleDocument", "(", "Document", "doc", ",", "PolicyFinder", "policyFinder", ")", "throws", "ParsingException", "{", "// handle the policy, if it's a known type", "Element", "root", "=", "doc", ".", "getDocumentElement", "(", ")", ";", "...
A private method that handles reading the policy and creates the correct kind of AbstractPolicy. Because this makes use of the policyFinder, it cannot be reused between finders. Consider moving to policyManager, which is not intended to be reused outside of a policyFinderModule, which is not intended to be reused among...
[ "A", "private", "method", "that", "handles", "reading", "the", "policy", "and", "creates", "the", "correct", "kind", "of", "AbstractPolicy", ".", "Because", "this", "makes", "use", "of", "the", "policyFinder", "it", "cannot", "be", "reused", "between", "finder...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/PolicyIndexBase.java#L271-L285
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountOrganizationRelPersistenceImpl.java
CommerceAccountOrganizationRelPersistenceImpl.findAll
@Override public List<CommerceAccountOrganizationRel> findAll(int start, int end) { """ Returns a range of all the commerce account organization rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they...
java
@Override public List<CommerceAccountOrganizationRel> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccountOrganizationRel", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce account organization rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setti...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "account", "organization", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountOrganizationRelPersistenceImpl.java#L1639-L1642
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertTrue
public static void assertTrue(@Nullable final String message, final boolean condition) { """ Assert condition flag is TRUE. GEL will be notified about error. @param message message describing situation @param condition condition which must be true @throws AssertionError if the condition is not true @since ...
java
public static void assertTrue(@Nullable final String message, final boolean condition) { if (!condition) { final AssertionError error = new AssertionError(GetUtils.ensureNonNull(message, "Condition must be TRUE")); MetaErrorListeners.fireError(error.getMessage(), error); throw error; } }
[ "public", "static", "void", "assertTrue", "(", "@", "Nullable", "final", "String", "message", ",", "final", "boolean", "condition", ")", "{", "if", "(", "!", "condition", ")", "{", "final", "AssertionError", "error", "=", "new", "AssertionError", "(", "GetUt...
Assert condition flag is TRUE. GEL will be notified about error. @param message message describing situation @param condition condition which must be true @throws AssertionError if the condition is not true @since 1.0
[ "Assert", "condition", "flag", "is", "TRUE", ".", "GEL", "will", "be", "notified", "about", "error", "." ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L165-L171
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestApiClient.java
RestApiClient.deleteMemberGroup
public Response deleteMemberGroup(String roomName, String groupName) { """ Delete member group from chatroom. @param roomName the room name @param groupName the groupName @return the response """ return restClient.delete("chatrooms/" + roomName + "/members/group/" + groupName, ne...
java
public Response deleteMemberGroup(String roomName, String groupName) { return restClient.delete("chatrooms/" + roomName + "/members/group/" + groupName, new HashMap<String, String>()); }
[ "public", "Response", "deleteMemberGroup", "(", "String", "roomName", ",", "String", "groupName", ")", "{", "return", "restClient", ".", "delete", "(", "\"chatrooms/\"", "+", "roomName", "+", "\"/members/group/\"", "+", "groupName", ",", "new", "HashMap", "<", "...
Delete member group from chatroom. @param roomName the room name @param groupName the groupName @return the response
[ "Delete", "member", "group", "from", "chatroom", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestApiClient.java#L423-L426
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
OtpInputStream.readN
public int readN(final byte[] abuf, final int off, final int len) throws OtpErlangDecodeException { """ Read an array of bytes from the stream. The method reads at most len bytes from the input stream into offset off of the buffer. @return the number of bytes read. @exception OtpErlangDecodeExce...
java
public int readN(final byte[] abuf, final int off, final int len) throws OtpErlangDecodeException { if (len == 0 && available() == 0) { return 0; } final int i = super.read(abuf, off, len); if (i < 0) { throw new OtpErlangDecodeException("Cannot read f...
[ "public", "int", "readN", "(", "final", "byte", "[", "]", "abuf", ",", "final", "int", "off", ",", "final", "int", "len", ")", "throws", "OtpErlangDecodeException", "{", "if", "(", "len", "==", "0", "&&", "available", "(", ")", "==", "0", ")", "{", ...
Read an array of bytes from the stream. The method reads at most len bytes from the input stream into offset off of the buffer. @return the number of bytes read. @exception OtpErlangDecodeException if the next byte cannot be read.
[ "Read", "an", "array", "of", "bytes", "from", "the", "stream", ".", "The", "method", "reads", "at", "most", "len", "bytes", "from", "the", "input", "stream", "into", "offset", "off", "of", "the", "buffer", "." ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L126-L136
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/SendAutomationSignalRequest.java
SendAutomationSignalRequest.setPayload
public void setPayload(java.util.Map<String, java.util.List<String>> payload) { """ <p> The data sent with the signal. The data schema depends on the type of signal used in the request. </p> @param payload The data sent with the signal. The data schema depends on the type of signal used in the request. "...
java
public void setPayload(java.util.Map<String, java.util.List<String>> payload) { this.payload = payload; }
[ "public", "void", "setPayload", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "payload", ")", "{", "this", ".", "payload", "=", "payload", ";", "}" ]
<p> The data sent with the signal. The data schema depends on the type of signal used in the request. </p> @param payload The data sent with the signal. The data schema depends on the type of signal used in the request.
[ "<p", ">", "The", "data", "sent", "with", "the", "signal", ".", "The", "data", "schema", "depends", "on", "the", "type", "of", "signal", "used", "in", "the", "request", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/SendAutomationSignalRequest.java#L167-L169
darcy-framework/darcy-ui
src/main/java/com/redhat/darcy/ui/Elements.java
Elements.elements
@SuppressWarnings("unchecked") public static <T extends Element> List<T> elements(Class<T> type, Locator locator) { """ Looks up a automation-library-specific implementation for that element type, assuming an implementation is registered for that class. """ if (!type.isInterface()) { t...
java
@SuppressWarnings("unchecked") public static <T extends Element> List<T> elements(Class<T> type, Locator locator) { if (!type.isInterface()) { throw new IllegalArgumentException("Element type must be an interface, was: " + type); } InvocationHandler invocationHandler = new Eleme...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "Element", ">", "List", "<", "T", ">", "elements", "(", "Class", "<", "T", ">", "type", ",", "Locator", "locator", ")", "{", "if", "(", "!", "type", ".", "is...
Looks up a automation-library-specific implementation for that element type, assuming an implementation is registered for that class.
[ "Looks", "up", "a", "automation", "-", "library", "-", "specific", "implementation", "for", "that", "element", "type", "assuming", "an", "implementation", "is", "registered", "for", "that", "class", "." ]
train
https://github.com/darcy-framework/darcy-ui/blob/ae0d89a1ca45f8257ef2764a01e4cfe68f432e33/src/main/java/com/redhat/darcy/ui/Elements.java#L77-L88
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java
DefaultDOManager.getNumObjectsWithVersion
private int getNumObjectsWithVersion(Connection conn, int n) throws SQLException { """ Get the number of objects in the registry whose system version is equal to the given value. If n is less than one, return the total number of objects in the registry. """ PreparedStatement st = null; ...
java
private int getNumObjectsWithVersion(Connection conn, int n) throws SQLException { PreparedStatement st = null; try { String query; // Because we are dealing with only two Strings, one of which is fixed, // take advantage of String.concat if (...
[ "private", "int", "getNumObjectsWithVersion", "(", "Connection", "conn", ",", "int", "n", ")", "throws", "SQLException", "{", "PreparedStatement", "st", "=", "null", ";", "try", "{", "String", "query", ";", "// Because we are dealing with only two Strings, one of which ...
Get the number of objects in the registry whose system version is equal to the given value. If n is less than one, return the total number of objects in the registry.
[ "Get", "the", "number", "of", "objects", "in", "the", "registry", "whose", "system", "version", "is", "equal", "to", "the", "given", "value", ".", "If", "n", "is", "less", "than", "one", "return", "the", "total", "number", "of", "objects", "in", "the", ...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java#L2104-L2126
alkacon/opencms-core
src/org/opencms/staticexport/CmsLinkManager.java
CmsLinkManager.substituteLink
public String substituteLink(CmsObject cms, String link) { """ Returns a link <i>from</i> the URI stored in the provided OpenCms user context <i>to</i> the VFS resource indicated by the given <code>link</code> in the current site, for use on web pages.<p> The provided <code>link</code> is assumed to be the co...
java
public String substituteLink(CmsObject cms, String link) { return substituteLink(cms, link, null, false); }
[ "public", "String", "substituteLink", "(", "CmsObject", "cms", ",", "String", "link", ")", "{", "return", "substituteLink", "(", "cms", ",", "link", ",", "null", ",", "false", ")", ";", "}" ]
Returns a link <i>from</i> the URI stored in the provided OpenCms user context <i>to</i> the VFS resource indicated by the given <code>link</code> in the current site, for use on web pages.<p> The provided <code>link</code> is assumed to be the contained in the site currently set in the provided OpenCms user context <...
[ "Returns", "a", "link", "<i", ">", "from<", "/", "i", ">", "the", "URI", "stored", "in", "the", "provided", "OpenCms", "user", "context", "<i", ">", "to<", "/", "i", ">", "the", "VFS", "resource", "indicated", "by", "the", "given", "<code", ">", "lin...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L682-L685
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java
Calc.getCentroid
public static final Atom getCentroid(Atom[] atomSet) { """ Returns the centroid of the set of atoms. @param atomSet a set of Atoms @return an Atom representing the Centroid of the set of atoms """ // if we don't catch this case, the centroid returned is (NaN,NaN,NaN), which can cause lots of problems d...
java
public static final Atom getCentroid(Atom[] atomSet){ // if we don't catch this case, the centroid returned is (NaN,NaN,NaN), which can cause lots of problems down the line if (atomSet.length==0) throw new IllegalArgumentException("Atom array has length 0, can't calculate centroid!"); double[] coords = new ...
[ "public", "static", "final", "Atom", "getCentroid", "(", "Atom", "[", "]", "atomSet", ")", "{", "// if we don't catch this case, the centroid returned is (NaN,NaN,NaN), which can cause lots of problems down the line", "if", "(", "atomSet", ".", "length", "==", "0", ")", "th...
Returns the centroid of the set of atoms. @param atomSet a set of Atoms @return an Atom representing the Centroid of the set of atoms
[ "Returns", "the", "centroid", "of", "the", "set", "of", "atoms", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java#L771-L799
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/clienthandler/ClientEventHandler.java
ClientEventHandler.invokeExecuteMethod
protected void invokeExecuteMethod(Method method, Object listener, Object userAgent) { """ Invoke the execute method @param method the execute method @param listener the listener @param userAgent the user agent object """ ReflectMethodUtil.invokeExecuteMethod( method, listener, contex...
java
protected void invokeExecuteMethod(Method method, Object listener, Object userAgent) { ReflectMethodUtil.invokeExecuteMethod( method, listener, context, userAgent); }
[ "protected", "void", "invokeExecuteMethod", "(", "Method", "method", ",", "Object", "listener", ",", "Object", "userAgent", ")", "{", "ReflectMethodUtil", ".", "invokeExecuteMethod", "(", "method", ",", "listener", ",", "context", ",", "userAgent", ")", ";", "}"...
Invoke the execute method @param method the execute method @param listener the listener @param userAgent the user agent object
[ "Invoke", "the", "execute", "method" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/clienthandler/ClientEventHandler.java#L121-L124
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/LocaleUtils.java
LocaleUtils.getAvailableLocaleSuffixesForBundle
public static List<String> getAvailableLocaleSuffixesForBundle(String messageBundlePath, ServletContext servletContext) { """ Returns the list of available locale suffixes for a message resource bundle @param messageBundlePath the resource bundle path @param servletContext the servlet context @return th...
java
public static List<String> getAvailableLocaleSuffixesForBundle(String messageBundlePath, ServletContext servletContext) { return getAvailableLocaleSuffixesForBundle(messageBundlePath, MSG_RESOURCE_BUNDLE_SUFFIX, servletContext); }
[ "public", "static", "List", "<", "String", ">", "getAvailableLocaleSuffixesForBundle", "(", "String", "messageBundlePath", ",", "ServletContext", "servletContext", ")", "{", "return", "getAvailableLocaleSuffixesForBundle", "(", "messageBundlePath", ",", "MSG_RESOURCE_BUNDLE_S...
Returns the list of available locale suffixes for a message resource bundle @param messageBundlePath the resource bundle path @param servletContext the servlet context @return the list of available locale suffixes for a message resource bundle
[ "Returns", "the", "list", "of", "available", "locale", "suffixes", "for", "a", "message", "resource", "bundle" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/LocaleUtils.java#L112-L116
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/util/FormatUtilities.java
FormatUtilities.getDateTime
static public long getDateTime(String s, String format, TimeZone tz) { """ Returns the given date time parsed using the given format. @param s The formatted date to be parsed @param format The format to use when parsing the date @param tz The timezone associated with the date @return The given date parsed usin...
java
static public long getDateTime(String s, String format, TimeZone tz) { long ret = 0L; SimpleDateFormat df = null; try { if(s != null && s.length() > 0) { df = formatPool.getFormat(format); df.setTimeZone(tz); Da...
[ "static", "public", "long", "getDateTime", "(", "String", "s", ",", "String", "format", ",", "TimeZone", "tz", ")", "{", "long", "ret", "=", "0L", ";", "SimpleDateFormat", "df", "=", "null", ";", "try", "{", "if", "(", "s", "!=", "null", "&&", "s", ...
Returns the given date time parsed using the given format. @param s The formatted date to be parsed @param format The format to use when parsing the date @param tz The timezone associated with the date @return The given date parsed using the given format
[ "Returns", "the", "given", "date", "time", "parsed", "using", "the", "given", "format", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/FormatUtilities.java#L310-L333
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/ble/SendBuffer.java
SendBuffer.send
public void send(byte[] data, int id) { """ Add a packet to the buffer to be sent. If no other packets are in the buffer, it will be sent immediately. @param data The packet to be sent @param id The ID of the packet to be used in debug messages and callbacks """ boolean isFirstPacket = (packet...
java
public void send(byte[] data, int id) { boolean isFirstPacket = (packets.size() == 0); packets.add(data); ids.add(id); if (isFirstPacket) { scheduleSendTask(true); } Log.d(TAG, "Added packet " + id + " to buffer; " + packets.size() + " packets in buffer"); ...
[ "public", "void", "send", "(", "byte", "[", "]", "data", ",", "int", "id", ")", "{", "boolean", "isFirstPacket", "=", "(", "packets", ".", "size", "(", ")", "==", "0", ")", ";", "packets", ".", "add", "(", "data", ")", ";", "ids", ".", "add", "...
Add a packet to the buffer to be sent. If no other packets are in the buffer, it will be sent immediately. @param data The packet to be sent @param id The ID of the packet to be used in debug messages and callbacks
[ "Add", "a", "packet", "to", "the", "buffer", "to", "be", "sent", ".", "If", "no", "other", "packets", "are", "in", "the", "buffer", "it", "will", "be", "sent", "immediately", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/ble/SendBuffer.java#L49-L57
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/bayesian/ConditionalProbabilityTable.java
ConditionalProbabilityTable.dataPointToCord
public int dataPointToCord(DataPointPair<Integer> dataPoint, int targetClass, int[] cord) { """ Converts a data point pair into a coordinate. The paired value contains the value for the predicting index. Though this value will not be used if the predicting class of the original data set was not used to make the t...
java
public int dataPointToCord(DataPointPair<Integer> dataPoint, int targetClass, int[] cord) { if(cord.length != getDimensionSize()) throw new ArithmeticException("Storage space and CPT dimension miss match"); DataPoint dp = dataPoint.getDataPoint(); int skipVal = -1; //Set ...
[ "public", "int", "dataPointToCord", "(", "DataPointPair", "<", "Integer", ">", "dataPoint", ",", "int", "targetClass", ",", "int", "[", "]", "cord", ")", "{", "if", "(", "cord", ".", "length", "!=", "getDimensionSize", "(", ")", ")", "throw", "new", "Ari...
Converts a data point pair into a coordinate. The paired value contains the value for the predicting index. Though this value will not be used if the predicting class of the original data set was not used to make the table. @param dataPoint the DataPointPair to convert @param targetClass the index in the original data...
[ "Converts", "a", "data", "point", "pair", "into", "a", "coordinate", ".", "The", "paired", "value", "contains", "the", "value", "for", "the", "predicting", "index", ".", "Though", "this", "value", "will", "not", "be", "used", "if", "the", "predicting", "cl...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/bayesian/ConditionalProbabilityTable.java#L102-L124
tommyettinger/RegExodus
src/main/java/regexodus/Matcher.java
Matcher.setTarget
public final void setTarget(Matcher m, int groupId) { """ This method allows to efficiently pass data between matchers. Note that a matcher may pass data to itself:<pre> Matcher m=new Pattern("\\w+").matcher(myString); if(m.find())m.setTarget(m,m.SUFFIX); //forget all that is not a suffix </pre> Resets curren...
java
public final void setTarget(Matcher m, int groupId) { MemReg mr = m.bounds(groupId); if (mr == null) throw new IllegalArgumentException("group #" + groupId + " is not assigned"); data = m.data; offset = mr.in; end = mr.out; cache = m.cache; cacheLength = m.cacheLe...
[ "public", "final", "void", "setTarget", "(", "Matcher", "m", ",", "int", "groupId", ")", "{", "MemReg", "mr", "=", "m", ".", "bounds", "(", "groupId", ")", ";", "if", "(", "mr", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"gro...
This method allows to efficiently pass data between matchers. Note that a matcher may pass data to itself:<pre> Matcher m=new Pattern("\\w+").matcher(myString); if(m.find())m.setTarget(m,m.SUFFIX); //forget all that is not a suffix </pre> Resets current search position to zero. @param m - a matcher that is a sou...
[ "This", "method", "allows", "to", "efficiently", "pass", "data", "between", "matchers", ".", "Note", "that", "a", "matcher", "may", "pass", "data", "to", "itself", ":", "<pre", ">", "Matcher", "m", "=", "new", "Pattern", "(", "\\\\", "w", "+", ")", "."...
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/Matcher.java#L213-L227
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java
WindowsJNIFaxClientSpi.winResumeFaxJob
private void winResumeFaxJob(String serverName,int faxJobID) { """ This function will resume an existing fax job. @param serverName The fax server name @param faxJobID The fax job ID """ synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call th...
java
private void winResumeFaxJob(String serverName,int faxJobID) { synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call this.preNativeCall(); //invoke native WindowsJNIFaxClientSpi.resumeFaxJobNative(serverName,faxJobID); ...
[ "private", "void", "winResumeFaxJob", "(", "String", "serverName", ",", "int", "faxJobID", ")", "{", "synchronized", "(", "WindowsFaxClientSpiHelper", ".", "NATIVE_LOCK", ")", "{", "//pre native call", "this", ".", "preNativeCall", "(", ")", ";", "//invoke native", ...
This function will resume an existing fax job. @param serverName The fax server name @param faxJobID The fax job ID
[ "This", "function", "will", "resume", "an", "existing", "fax", "job", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java#L308-L318
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/DataChecksum.java
DataChecksum.writeValue
public int writeValue( byte[] buf, int offset, boolean reset ) throws IOException { """ Writes the current checksum to a buffer. If <i>reset</i> is true, then resets the checksum. @return number of bytes written. Will be equal to getChecksumSize(); """ if ( size <= 0 ) { ...
java
public int writeValue( byte[] buf, int offset, boolean reset ) throws IOException { if ( size <= 0 ) { return 0; } if ( size == 4 ) { int checksum = (int) summer.getValue(); writeIntToBuf(checksum, buf, offset); } else { throw...
[ "public", "int", "writeValue", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "boolean", "reset", ")", "throws", "IOException", "{", "if", "(", "size", "<=", "0", ")", "{", "return", "0", ";", "}", "if", "(", "size", "==", "4", ")", "{"...
Writes the current checksum to a buffer. If <i>reset</i> is true, then resets the checksum. @return number of bytes written. Will be equal to getChecksumSize();
[ "Writes", "the", "current", "checksum", "to", "a", "buffer", ".", "If", "<i", ">", "reset<", "/", "i", ">", "is", "true", "then", "resets", "the", "checksum", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/DataChecksum.java#L201-L219
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSearchReplaceThread.java
CmsSearchReplaceThread.replaceInContent
private byte[] replaceInContent( CmsObject cmsObject, I_CmsReport report, CmsFile file, byte[] contents, boolean replace) throws Exception { """ Performs the replacement in content.<p> @param cmsObject the cms context @param report the report to print messages to @p...
java
private byte[] replaceInContent( CmsObject cmsObject, I_CmsReport report, CmsFile file, byte[] contents, boolean replace) throws Exception { if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_settings.getLocale())) { Locale contentLocale = CmsLocaleManager.ge...
[ "private", "byte", "[", "]", "replaceInContent", "(", "CmsObject", "cmsObject", ",", "I_CmsReport", "report", ",", "CmsFile", "file", ",", "byte", "[", "]", "contents", ",", "boolean", "replace", ")", "throws", "Exception", "{", "if", "(", "CmsStringUtil", "...
Performs the replacement in content.<p> @param cmsObject the cms context @param report the report to print messages to @param file the file object @param contents the byte content @param replace signals whether to execute a replacement or not @return the new content if a replacement has been performed @throws Except...
[ "Performs", "the", "replacement", "in", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSearchReplaceThread.java#L394-L430
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
XMLFilterImpl.setFeature
public void setFeature (String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { """ Set the value of a feature. <p>This will always fail if the parent is null.</p> @param name The feature name. @param value The requested feature value. @exception org.xml.sax.SAXNotRecog...
java
public void setFeature (String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException { if (parent != null) { parent.setFeature(name, value); } else { throw new SAXNotRecognizedException("Feature: " + name); } }
[ "public", "void", "setFeature", "(", "String", "name", ",", "boolean", "value", ")", "throws", "SAXNotRecognizedException", ",", "SAXNotSupportedException", "{", "if", "(", "parent", "!=", "null", ")", "{", "parent", ".", "setFeature", "(", "name", ",", "value...
Set the value of a feature. <p>This will always fail if the parent is null.</p> @param name The feature name. @param value The requested feature value. @exception org.xml.sax.SAXNotRecognizedException If the feature value can't be assigned or retrieved from the parent. @exception org.xml.sax.SAXNotSupportedException ...
[ "Set", "the", "value", "of", "a", "feature", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java#L149-L157
OpenLiberty/open-liberty
dev/com.ibm.ws.rest.handler/src/com/ibm/ws/rest/handler/internal/servlet/RESTProxyServlet.java
RESTProxyServlet.getAndSetRESTHandlerContainer
private synchronized void getAndSetRESTHandlerContainer(HttpServletRequest request) throws ServletException { """ Grabs the RESTHandlerContainer from the OSGi service registry and stores it to {@link #REST_HANDLER_CONTAINER}. @param request The HttpServletRequest from which we'll get the OSGi BundleContext @t...
java
private synchronized void getAndSetRESTHandlerContainer(HttpServletRequest request) throws ServletException { if (REST_HANDLER_CONTAINER == null) { //Get the bundle context HttpSession session = request.getSession(); ServletContext sc = session.getServletContext(); ...
[ "private", "synchronized", "void", "getAndSetRESTHandlerContainer", "(", "HttpServletRequest", "request", ")", "throws", "ServletException", "{", "if", "(", "REST_HANDLER_CONTAINER", "==", "null", ")", "{", "//Get the bundle context", "HttpSession", "session", "=", "reque...
Grabs the RESTHandlerContainer from the OSGi service registry and stores it to {@link #REST_HANDLER_CONTAINER}. @param request The HttpServletRequest from which we'll get the OSGi BundleContext @throws ServletException When the RESTHandlerContainer service is unavailable
[ "Grabs", "the", "RESTHandlerContainer", "from", "the", "OSGi", "service", "registry", "and", "stores", "it", "to", "{", "@link", "#REST_HANDLER_CONTAINER", "}", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.rest.handler/src/com/ibm/ws/rest/handler/internal/servlet/RESTProxyServlet.java#L135-L150
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java
FaceListsImpl.addFaceFromUrlAsync
public Observable<PersistedFace> addFaceFromUrlAsync(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter) { """ Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and pe...
java
public Observable<PersistedFace> addFaceFromUrlAsync(String faceListId, String url, AddFaceFromUrlOptionalParameter addFaceFromUrlOptionalParameter) { return addFaceFromUrlWithServiceResponseAsync(faceListId, url, addFaceFromUrlOptionalParameter).map(new Func1<ServiceResponse<PersistedFace>, PersistedFace>() { ...
[ "public", "Observable", "<", "PersistedFace", ">", "addFaceFromUrlAsync", "(", "String", "faceListId", ",", "String", "url", ",", "AddFaceFromUrlOptionalParameter", "addFaceFromUrlOptionalParameter", ")", "{", "return", "addFaceFromUrlWithServiceResponseAsync", "(", "faceList...
Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire. @param faceListId Id referencing a particular face list. @param url Publicly reachable URL of an image @param addFaceFromUrlOpti...
[ "Add", "a", "face", "to", "a", "face", "list", ".", "The", "input", "face", "is", "specified", "as", "an", "image", "with", "a", "targetFace", "rectangle", ".", "It", "returns", "a", "persistedFaceId", "representing", "the", "added", "face", "and", "persis...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java#L778-L785
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java
MinecraftTypeHelper.blockColourMatches
public static boolean blockColourMatches(IBlockState bs, List<Colour> allowedColours) { """ Test whether this block has a colour attribute which matches the list of allowed colours @param bs blockstate to test @param allowedColours list of allowed Colour enum values @return true if the block matches. """ ...
java
public static boolean blockColourMatches(IBlockState bs, List<Colour> allowedColours) { for (IProperty prop : bs.getProperties().keySet()) { if (prop.getName().equals("color") && prop.getValueClass() == net.minecraft.item.EnumDyeColor.class) { // The block in ...
[ "public", "static", "boolean", "blockColourMatches", "(", "IBlockState", "bs", ",", "List", "<", "Colour", ">", "allowedColours", ")", "{", "for", "(", "IProperty", "prop", ":", "bs", ".", "getProperties", "(", ")", ".", "keySet", "(", ")", ")", "{", "if...
Test whether this block has a colour attribute which matches the list of allowed colours @param bs blockstate to test @param allowedColours list of allowed Colour enum values @return true if the block matches.
[ "Test", "whether", "this", "block", "has", "a", "colour", "attribute", "which", "matches", "the", "list", "of", "allowed", "colours" ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java#L103-L119
snazy/ohc
ohc-core/src/main/java/org/caffinitas/ohc/linked/Timeouts.java
Timeouts.remove
void remove(long hashEntryAdr, long expireAt) { """ Remote a cache entry. @param hashEntryAdr address of the cache entry @param expireAt absolute expiration timestamp """ int slot = slot(expireAt); slots[slot].remove(hashEntryAdr); }
java
void remove(long hashEntryAdr, long expireAt) { int slot = slot(expireAt); slots[slot].remove(hashEntryAdr); }
[ "void", "remove", "(", "long", "hashEntryAdr", ",", "long", "expireAt", ")", "{", "int", "slot", "=", "slot", "(", "expireAt", ")", ";", "slots", "[", "slot", "]", ".", "remove", "(", "hashEntryAdr", ")", ";", "}" ]
Remote a cache entry. @param hashEntryAdr address of the cache entry @param expireAt absolute expiration timestamp
[ "Remote", "a", "cache", "entry", "." ]
train
https://github.com/snazy/ohc/blob/af47142711993a3eaaf3b496332c27e2b43454e4/ohc-core/src/main/java/org/caffinitas/ohc/linked/Timeouts.java#L95-L99
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java
RingBuffer.publishEvents
public void publishEvents(EventTranslatorVararg<E> translator, int batchStartsAt, int batchSize, Object[]... args) { """ Allows a variable number of user supplied arguments per event. @param translator The user specified translation for the event @param batchStartsAt The first element of the array which is wit...
java
public void publishEvents(EventTranslatorVararg<E> translator, int batchStartsAt, int batchSize, Object[]... args) { checkBounds(batchStartsAt, batchSize, args); final long finalSequence = sequencer.next(batchSize); translateAndPublishBatch(translator, batchStartsAt, batchSize, finalSequence, ar...
[ "public", "void", "publishEvents", "(", "EventTranslatorVararg", "<", "E", ">", "translator", ",", "int", "batchStartsAt", ",", "int", "batchSize", ",", "Object", "[", "]", "...", "args", ")", "{", "checkBounds", "(", "batchStartsAt", ",", "batchSize", ",", ...
Allows a variable number of user supplied arguments per event. @param translator The user specified translation for the event @param batchStartsAt The first element of the array which is within the batch. @param batchSize The actual size of the batch @param args User supplied arguments, one Object[] per event. @see #p...
[ "Allows", "a", "variable", "number", "of", "user", "supplied", "arguments", "per", "event", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java#L773-L777
geomajas/geomajas-project-client-gwt2
plugin/print/impl/src/main/java/org/geomajas/gwt2/plugin/print/client/template/impl/DefaultTemplateBuilder.java
DefaultTemplateBuilder.createFittingBox
public Bbox createFittingBox(Bbox bbox, double newRatio) { """ Creates the largest possible bounding box that fits around the specified bounding box but has a different width/height ratio. and the same centerpoint. @param bbox @param newRatio width/height ratio @return bbox """ double oldRatio = bbox....
java
public Bbox createFittingBox(Bbox bbox, double newRatio) { double oldRatio = bbox.getWidth() / bbox.getHeight(); double newWidth = bbox.getWidth(); double newHeight = bbox.getHeight(); if (newRatio < oldRatio) { // Keep width of bbox , decrease height to fullfill newRatio newHeight = newWidth / newRatio; ...
[ "public", "Bbox", "createFittingBox", "(", "Bbox", "bbox", ",", "double", "newRatio", ")", "{", "double", "oldRatio", "=", "bbox", ".", "getWidth", "(", ")", "/", "bbox", ".", "getHeight", "(", ")", ";", "double", "newWidth", "=", "bbox", ".", "getWidth"...
Creates the largest possible bounding box that fits around the specified bounding box but has a different width/height ratio. and the same centerpoint. @param bbox @param newRatio width/height ratio @return bbox
[ "Creates", "the", "largest", "possible", "bounding", "box", "that", "fits", "around", "the", "specified", "bounding", "box", "but", "has", "a", "different", "width", "/", "height", "ratio", ".", "and", "the", "same", "centerpoint", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/print/impl/src/main/java/org/geomajas/gwt2/plugin/print/client/template/impl/DefaultTemplateBuilder.java#L347-L362
real-logic/agrona
agrona/src/main/java/org/agrona/IoUtil.java
IoUtil.mapNewFile
public static MappedByteBuffer mapNewFile(final File location, final long length, final boolean fillWithZeros) { """ Create a new file, and optionally fill with 0s, and return a {@link java.nio.MappedByteBuffer} for the file. <p> The file itself will be closed, but the mapping will persist. @param location ...
java
public static MappedByteBuffer mapNewFile(final File location, final long length, final boolean fillWithZeros) { MappedByteBuffer mappedByteBuffer = null; try (FileChannel channel = FileChannel.open(location.toPath(), CREATE_NEW, READ, WRITE)) { mappedByteBuffer = channel.map(REA...
[ "public", "static", "MappedByteBuffer", "mapNewFile", "(", "final", "File", "location", ",", "final", "long", "length", ",", "final", "boolean", "fillWithZeros", ")", "{", "MappedByteBuffer", "mappedByteBuffer", "=", "null", ";", "try", "(", "FileChannel", "channe...
Create a new file, and optionally fill with 0s, and return a {@link java.nio.MappedByteBuffer} for the file. <p> The file itself will be closed, but the mapping will persist. @param location of the file to create and map @param length of the file to create and map @param fillWithZeros to force allocation. ...
[ "Create", "a", "new", "file", "and", "optionally", "fill", "with", "0s", "and", "return", "a", "{", "@link", "java", ".", "nio", ".", "MappedByteBuffer", "}", "for", "the", "file", ".", "<p", ">", "The", "file", "itself", "will", "be", "closed", "but",...
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/IoUtil.java#L395-L417
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java
NullArgumentException.validateNotEmptyContent
public static void validateNotEmptyContent( String[] arrayToCheck, boolean trim, String argumentName ) throws NullArgumentException { """ Validates that the string array instance is not null and that it has entries that are not null or empty. @param arrayToCheck The object to be tested. @param trim ...
java
public static void validateNotEmptyContent( String[] arrayToCheck, boolean trim, String argumentName ) throws NullArgumentException { validateNotEmpty( arrayToCheck, argumentName ); for( int i = 0; i < arrayToCheck.length; i++ ) { validateNotEmpty( arrayToCheck[ i ], arra...
[ "public", "static", "void", "validateNotEmptyContent", "(", "String", "[", "]", "arrayToCheck", ",", "boolean", "trim", ",", "String", "argumentName", ")", "throws", "NullArgumentException", "{", "validateNotEmpty", "(", "arrayToCheck", ",", "argumentName", ")", ";"...
Validates that the string array instance is not null and that it has entries that are not null or empty. @param arrayToCheck The object to be tested. @param trim If the elements should be trimmed before checking if empty @param argumentName The name of the object, which is used to construct the exception messa...
[ "Validates", "that", "the", "string", "array", "instance", "is", "not", "null", "and", "that", "it", "has", "entries", "that", "are", "not", "null", "or", "empty", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java#L176-L188
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/UcsApi.java
UcsApi.setCallComment
public ApiSuccessResponse setCallComment(String id, CallCommentData callCommentData) throws ApiException { """ Set the comment for the call @param id id of the Interaction (required) @param callCommentData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error ...
java
public ApiSuccessResponse setCallComment(String id, CallCommentData callCommentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = setCallCommentWithHttpInfo(id, callCommentData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "setCallComment", "(", "String", "id", ",", "CallCommentData", "callCommentData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "setCallCommentWithHttpInfo", "(", "id", ",", "callCommentDa...
Set the comment for the call @param id id of the Interaction (required) @param callCommentData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Set", "the", "comment", "for", "the", "call" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UcsApi.java#L1785-L1788
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, T4, T5, T6, T7, T8> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Void> toFunc( final Action8<T1, T2, T3, T4, T5, T6, T7, T8> action) { """ Converts an {@link Action8} to a function that calls the action and returns {@code null}. @param action the {@link Action8} to convert @retu...
java
public static <T1, T2, T3, T4, T5, T6, T7, T8> Func8<T1, T2, T3, T4, T5, T6, T7, T8, Void> toFunc( final Action8<T1, T2, T3, T4, T5, T6, T7, T8> action) { return toFunc(action, (Void) null); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ">", "Func8", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "Void", ">", "toFunc", ...
Converts an {@link Action8} to a function that calls the action and returns {@code null}. @param action the {@link Action8} to convert @return a {@link Func8} that calls {@code action} and returns {@code null}
[ "Converts", "an", "{", "@link", "Action8", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L168-L171
jbossws/jbossws-cxf
modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
MetadataBuilder.getTypeNamespace
private static String getTypeNamespace(String packageName) { """ Extracts the typeNS given the package name Algorithm is based on the one specified in JAXWS v2.0 spec """ StringBuilder sb = new StringBuilder("http://"); //Generate tokens with '.' as delimiter StringTokenizer st = new String...
java
private static String getTypeNamespace(String packageName) { StringBuilder sb = new StringBuilder("http://"); //Generate tokens with '.' as delimiter StringTokenizer st = new StringTokenizer(packageName, "."); //Have a LIFO queue for the tokens Stack<String> stk = new Stack<String>();...
[ "private", "static", "String", "getTypeNamespace", "(", "String", "packageName", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"http://\"", ")", ";", "//Generate tokens with '.' as delimiter", "StringTokenizer", "st", "=", "new", "StringTokenizer"...
Extracts the typeNS given the package name Algorithm is based on the one specified in JAXWS v2.0 spec
[ "Extracts", "the", "typeNS", "given", "the", "package", "name", "Algorithm", "is", "based", "on", "the", "one", "specified", "in", "JAXWS", "v2", ".", "0", "spec" ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java#L330-L356
josueeduardo/snappy
plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/LaunchedURLClassLoader.java
LaunchedURLClassLoader.definePackageForFindClass
private void definePackageForFindClass(final String name, final String packageName) { """ Define a package before a {@code findClass} call is made. This is necessary to ensure that the appropriate manifest for nested JARs associated with the package. @param name the class name being found @param packag...
java
private void definePackageForFindClass(final String name, final String packageName) { try { AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { @Override public Object run() { String path = name.replace('.', '/').concat(".class"...
[ "private", "void", "definePackageForFindClass", "(", "final", "String", "name", ",", "final", "String", "packageName", ")", "{", "try", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedExceptionAction", "<", "Object", ">", "(", ")", "{", "@",...
Define a package before a {@code findClass} call is made. This is necessary to ensure that the appropriate manifest for nested JARs associated with the package. @param name the class name being found @param packageName the package
[ "Define", "a", "package", "before", "a", "{", "@code", "findClass", "}", "call", "is", "made", ".", "This", "is", "necessary", "to", "ensure", "that", "the", "appropriate", "manifest", "for", "nested", "JARs", "associated", "with", "the", "package", "." ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/LaunchedURLClassLoader.java#L205-L235
wisdom-framework/wisdom
extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/visitor/RamlControllerVisitor.java
RamlControllerVisitor.addBodyToAction
private void addBodyToAction(ControllerRouteModel<Raml> elem, Action action) { """ Add the body specification to the given action. <p> <p> Body can contain one example for each content-type supported. The example must be define in the same order as the content-type. <p> </p> @param elem The ControllerRo...
java
private void addBodyToAction(ControllerRouteModel<Raml> elem, Action action) { action.setBody(new LinkedHashMap<String, MimeType>(elem.getBodyMimes().size())); //the samples must be define in the same order as the accept! Iterator<String> bodySamples = elem.getBodySamples().iterator(); ...
[ "private", "void", "addBodyToAction", "(", "ControllerRouteModel", "<", "Raml", ">", "elem", ",", "Action", "action", ")", "{", "action", ".", "setBody", "(", "new", "LinkedHashMap", "<", "String", ",", "MimeType", ">", "(", "elem", ".", "getBodyMimes", "(",...
Add the body specification to the given action. <p> <p> Body can contain one example for each content-type supported. The example must be define in the same order as the content-type. <p> </p> @param elem The ControllerRouteModel that contains the body specification. @param action The Action on which to add the body...
[ "Add", "the", "body", "specification", "to", "the", "given", "action", ".", "<p", ">", "<p", ">", "Body", "can", "contain", "one", "example", "for", "each", "content", "-", "type", "supported", ".", "The", "example", "must", "be", "define", "in", "the", ...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/visitor/RamlControllerVisitor.java#L273-L286
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.getArgumentForFunction
static Node getArgumentForFunction(Node function, int index) { """ Given the function, this returns the nth argument or null if no such parameter exists. """ checkState(function.isFunction()); return getNthSibling( function.getSecondChild().getFirstChild(), index); }
java
static Node getArgumentForFunction(Node function, int index) { checkState(function.isFunction()); return getNthSibling( function.getSecondChild().getFirstChild(), index); }
[ "static", "Node", "getArgumentForFunction", "(", "Node", "function", ",", "int", "index", ")", "{", "checkState", "(", "function", ".", "isFunction", "(", ")", ")", ";", "return", "getNthSibling", "(", "function", ".", "getSecondChild", "(", ")", ".", "getFi...
Given the function, this returns the nth argument or null if no such parameter exists.
[ "Given", "the", "function", "this", "returns", "the", "nth", "argument", "or", "null", "if", "no", "such", "parameter", "exists", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L5210-L5214
korpling/ANNIS
annis-visualizers/src/main/java/annis/visualizers/component/sentstructurejs/SentStructureJsComponent.java
SentStructureJsComponent.includeNode
@Override public boolean includeNode(SNode node) { """ Implements the includeNode method of the org.corpus_tools.salt.util.ExportFilter interface. """ // if node is a token or no configuration set, output the node if (node instanceof SToken || configurations.get(0) == null) { return true; } Set<S...
java
@Override public boolean includeNode(SNode node) { // if node is a token or no configuration set, output the node if (node instanceof SToken || configurations.get(0) == null) { return true; } Set<SAnnotation> nodeAnnotations = node.getAnnotations(); return includeObject(nodeAnnotations, displayedNodeAnn...
[ "@", "Override", "public", "boolean", "includeNode", "(", "SNode", "node", ")", "{", "// if node is a token or no configuration set, output the node", "if", "(", "node", "instanceof", "SToken", "||", "configurations", ".", "get", "(", "0", ")", "==", "null", ")", ...
Implements the includeNode method of the org.corpus_tools.salt.util.ExportFilter interface.
[ "Implements", "the", "includeNode", "method", "of", "the", "org", ".", "corpus_tools", ".", "salt", ".", "util", ".", "ExportFilter", "interface", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-visualizers/src/main/java/annis/visualizers/component/sentstructurejs/SentStructureJsComponent.java#L421-L431
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java
Option.createFlag
public static Option createFlag(String name, String description) { """ Creates a new flag type option. These types of options are used to indicate some application switch is either on or off. @param name The name of the option @param description The description of the option used to display usage ...
java
public static Option createFlag(String name, String description) { return new Option(Type.FLAG, name, 0, description); }
[ "public", "static", "Option", "createFlag", "(", "String", "name", ",", "String", "description", ")", "{", "return", "new", "Option", "(", "Type", ".", "FLAG", ",", "name", ",", "0", ",", "description", ")", ";", "}" ]
Creates a new flag type option. These types of options are used to indicate some application switch is either on or off. @param name The name of the option @param description The description of the option used to display usage @return The option
[ "Creates", "a", "new", "flag", "type", "option", ".", "These", "types", "of", "options", "are", "used", "to", "indicate", "some", "application", "switch", "is", "either", "on", "or", "off", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/util/Option.java#L97-L99
Stratio/stratio-cassandra
src/java/org/apache/cassandra/locator/AbstractEndpointSnitch.java
AbstractEndpointSnitch.sortByProximity
public void sortByProximity(final InetAddress address, List<InetAddress> addresses) { """ Sorts the <tt>List</tt> of node addresses, in-place, by proximity to the given address @param address the address to sort the proximity by @param addresses the nodes to sort """ Collections.sort(addresses, new C...
java
public void sortByProximity(final InetAddress address, List<InetAddress> addresses) { Collections.sort(addresses, new Comparator<InetAddress>() { public int compare(InetAddress a1, InetAddress a2) { return compareEndpoints(address, a1, a2); } ...
[ "public", "void", "sortByProximity", "(", "final", "InetAddress", "address", ",", "List", "<", "InetAddress", ">", "addresses", ")", "{", "Collections", ".", "sort", "(", "addresses", ",", "new", "Comparator", "<", "InetAddress", ">", "(", ")", "{", "public"...
Sorts the <tt>List</tt> of node addresses, in-place, by proximity to the given address @param address the address to sort the proximity by @param addresses the nodes to sort
[ "Sorts", "the", "<tt", ">", "List<", "/", "tt", ">", "of", "node", "addresses", "in", "-", "place", "by", "proximity", "to", "the", "given", "address" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/locator/AbstractEndpointSnitch.java#L47-L56
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.replaceTypeVariablesWithUpperBounds
static TypeMirror replaceTypeVariablesWithUpperBounds(Types types, TypeMirror type) { """ <p>Use this when you want a field's type that can be used from a static context (e.g. where the type vars are no longer available).</p> <p>Must never be called on types that have recursive type arguments, e.g. {@literal ...
java
static TypeMirror replaceTypeVariablesWithUpperBounds(Types types, TypeMirror type) { return type.accept(UpperBoundSubstitutingVisitor.INSTANCE, types); }
[ "static", "TypeMirror", "replaceTypeVariablesWithUpperBounds", "(", "Types", "types", ",", "TypeMirror", "type", ")", "{", "return", "type", ".", "accept", "(", "UpperBoundSubstitutingVisitor", ".", "INSTANCE", ",", "types", ")", ";", "}" ]
<p>Use this when you want a field's type that can be used from a static context (e.g. where the type vars are no longer available).</p> <p>Must never be called on types that have recursive type arguments, e.g. {@literal T extends Comparable<T>}.</p>
[ "<p", ">", "Use", "this", "when", "you", "want", "a", "field", "s", "type", "that", "can", "be", "used", "from", "a", "static", "context", "(", "e", ".", "g", ".", "where", "the", "type", "vars", "are", "no", "longer", "available", ")", ".", "<", ...
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L494-L496
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java
SqlFunctionUtils.splitIndex
public static String splitIndex(String str, int character, int index) { """ Split target string with custom separator and pick the index-th(start with 0) result. @param str target string. @param character int value of the separator character @param index index of the result which you want. @return the stri...
java
public static String splitIndex(String str, int character, int index) { if (character > 255 || character < 1 || index < 0) { return null; } String[] values = StringUtils.splitPreserveAllTokens(str, (char) character); if (index >= values.length) { return null; } else { return values[index]; } }
[ "public", "static", "String", "splitIndex", "(", "String", "str", ",", "int", "character", ",", "int", "index", ")", "{", "if", "(", "character", ">", "255", "||", "character", "<", "1", "||", "index", "<", "0", ")", "{", "return", "null", ";", "}", ...
Split target string with custom separator and pick the index-th(start with 0) result. @param str target string. @param character int value of the separator character @param index index of the result which you want. @return the string at the index of split results.
[ "Split", "target", "string", "with", "custom", "separator", "and", "pick", "the", "index", "-", "th", "(", "start", "with", "0", ")", "result", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java#L330-L340
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.getByResourceGroup
public VirtualNetworkGatewayConnectionInner getByResourceGroup(String resourceGroupName, String virtualNetworkGatewayConnectionName) { """ Gets the specified virtual network gateway connection by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName...
java
public VirtualNetworkGatewayConnectionInner getByResourceGroup(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); }
[ "public", "VirtualNetworkGatewayConnectionInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayCon...
Gets the specified virtual network gateway connection by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudExcepti...
[ "Gets", "the", "specified", "virtual", "network", "gateway", "connection", "by", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L306-L308
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java
SibRaConnection.invokeCommand
@Override public Serializable invokeCommand(String key, String commandName, Serializable commandData) throws SIConnectionDroppedException, SIConnectionUnavailableException, SINotAuthorizedException, SIResourceException, SIIncorrectCallException, SICommandI...
java
@Override public Serializable invokeCommand(String key, String commandName, Serializable commandData) throws SIConnectionDroppedException, SIConnectionUnavailableException, SINotAuthorizedException, SIResourceException, SIIncorrectCallException, SICommandI...
[ "@", "Override", "public", "Serializable", "invokeCommand", "(", "String", "key", ",", "String", "commandName", ",", "Serializable", "commandData", ")", "throws", "SIConnectionDroppedException", ",", "SIConnectionUnavailableException", ",", "SINotAuthorizedException", ",", ...
Calls invokeCommand on the delegate connection. @throws SINotAuthorizedException @throws SICommandInvocationFailedException @throws SIIncorrectCallException @throws SIResourceException @throws SIConnectionUnavailableException @throws SIConnectionDroppedException @see com.ibm.wsspi.sib.core.SICoreConnection#invokeComma...
[ "Calls", "invokeCommand", "on", "the", "delegate", "connection", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java#L245-L253
netty/netty
buffer/src/main/java/io/netty/buffer/Unpooled.java
Unpooled.copiedBuffer
public static ByteBuf copiedBuffer(byte[] array, int offset, int length) { """ Creates a new big-endian buffer whose content is a copy of the specified {@code array}'s sub-region. The new buffer's {@code readerIndex} and {@code writerIndex} are {@code 0} and the specified {@code length} respectively. """ ...
java
public static ByteBuf copiedBuffer(byte[] array, int offset, int length) { if (length == 0) { return EMPTY_BUFFER; } byte[] copy = PlatformDependent.allocateUninitializedArray(length); System.arraycopy(array, offset, copy, 0, length); return wrappedBuffer(copy); }
[ "public", "static", "ByteBuf", "copiedBuffer", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "{", "return", "EMPTY_BUFFER", ";", "}", "byte", "[", "]", "copy", "=", "Platfor...
Creates a new big-endian buffer whose content is a copy of the specified {@code array}'s sub-region. The new buffer's {@code readerIndex} and {@code writerIndex} are {@code 0} and the specified {@code length} respectively.
[ "Creates", "a", "new", "big", "-", "endian", "buffer", "whose", "content", "is", "a", "copy", "of", "the", "specified", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/Unpooled.java#L372-L379
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.resumeAppStream
public ResumeAppStreamResponse resumeAppStream(String app, String stream) { """ Resume your app stream by app name and stream name @param app app name @param stream stream name @return the response """ ResumeAppStreamRequest request = new ResumeAppStreamRequest(); request.setApp(app); ...
java
public ResumeAppStreamResponse resumeAppStream(String app, String stream) { ResumeAppStreamRequest request = new ResumeAppStreamRequest(); request.setApp(app); request.setStream(stream); return resumeAppStream(request); }
[ "public", "ResumeAppStreamResponse", "resumeAppStream", "(", "String", "app", ",", "String", "stream", ")", "{", "ResumeAppStreamRequest", "request", "=", "new", "ResumeAppStreamRequest", "(", ")", ";", "request", ".", "setApp", "(", "app", ")", ";", "request", ...
Resume your app stream by app name and stream name @param app app name @param stream stream name @return the response
[ "Resume", "your", "app", "stream", "by", "app", "name", "and", "stream", "name" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L964-L969
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withDouble
public Postcard withDouble(@Nullable String key, double value) { """ Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key. @param key a String, or null @param value a double @return current """ mBundle.putDouble(key, value); return this;...
java
public Postcard withDouble(@Nullable String key, double value) { mBundle.putDouble(key, value); return this; }
[ "public", "Postcard", "withDouble", "(", "@", "Nullable", "String", "key", ",", "double", "value", ")", "{", "mBundle", ".", "putDouble", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key. @param key a String, or null @param value a double @return current
[ "Inserts", "a", "double", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", "." ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L309-L312
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Scheduler.java
Scheduler.schedulePeriodicallyDirect
@NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { """ Schedules a periodic execution of the given task with the given initial time delay and repeat period. <p> This method is safe to be called from multiple threads but the...
java
@NonNull public Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) { final Worker w = createWorker(); final Runnable decoratedRun = RxJavaPlugins.onSchedule(run); PeriodicDirectTask periodicTask = new PeriodicDirectTask(deco...
[ "@", "NonNull", "public", "Disposable", "schedulePeriodicallyDirect", "(", "@", "NonNull", "Runnable", "run", ",", "long", "initialDelay", ",", "long", "period", ",", "@", "NonNull", "TimeUnit", "unit", ")", "{", "final", "Worker", "w", "=", "createWorker", "(...
Schedules a periodic execution of the given task with the given initial time delay and repeat period. <p> This method is safe to be called from multiple threads but there are no ordering guarantees between tasks. <p> The periodic execution is at a fixed rate, that is, the first execution will be after the {@code init...
[ "Schedules", "a", "periodic", "execution", "of", "the", "given", "task", "with", "the", "given", "initial", "time", "delay", "and", "repeat", "period", "." ]
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Scheduler.java#L226-L240
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.isLowerOrder
public static boolean isLowerOrder(IBond.Order first, IBond.Order second) { """ Returns true if the first bond has a lower bond order than the second bond. It returns false if the bond order is equal, and if the order of the first bond is larger than that of the second. Also returns false if either bond order i...
java
public static boolean isLowerOrder(IBond.Order first, IBond.Order second) { if (first == null || second == null || first == IBond.Order.UNSET || second == IBond.Order.UNSET) return false; return first.compareTo(second) < 0; }
[ "public", "static", "boolean", "isLowerOrder", "(", "IBond", ".", "Order", "first", ",", "IBond", ".", "Order", "second", ")", "{", "if", "(", "first", "==", "null", "||", "second", "==", "null", "||", "first", "==", "IBond", ".", "Order", ".", "UNSET"...
Returns true if the first bond has a lower bond order than the second bond. It returns false if the bond order is equal, and if the order of the first bond is larger than that of the second. Also returns false if either bond order is unset. @param first The first bond order object @param second The second bond order ...
[ "Returns", "true", "if", "the", "first", "bond", "has", "a", "lower", "bond", "order", "than", "the", "second", "bond", ".", "It", "returns", "false", "if", "the", "bond", "order", "is", "equal", "and", "if", "the", "order", "of", "the", "first", "bond...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L72-L76
jenkinsci/jenkins
core/src/main/java/hudson/util/IOUtils.java
IOUtils.readFirstLine
public static String readFirstLine(InputStream is, String encoding) throws IOException { """ Read the first line of the given stream, close it, and return that line. @param encoding If null, use the platform default encoding. @since 1.422 """ try (BufferedReader reader = new BufferedReader( ...
java
public static String readFirstLine(InputStream is, String encoding) throws IOException { try (BufferedReader reader = new BufferedReader( encoding == null ? new InputStreamReader(is) : new InputStreamReader(is, encoding))) { return reader.readLine(); } }
[ "public", "static", "String", "readFirstLine", "(", "InputStream", "is", ",", "String", "encoding", ")", "throws", "IOException", "{", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "encoding", "==", "null", "?", "new", "InputStreamRe...
Read the first line of the given stream, close it, and return that line. @param encoding If null, use the platform default encoding. @since 1.422
[ "Read", "the", "first", "line", "of", "the", "given", "stream", "close", "it", "and", "return", "that", "line", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/IOUtils.java#L146-L151
wildfly/wildfly-core
controller-client/src/main/java/org/jboss/as/controller/client/helpers/Operations.java
Operations.createReadResourceOperation
public static ModelNode createReadResourceOperation(final ModelNode address, final boolean recursive) { """ Creates an operation to read a resource. @param address the address to create the read for @param recursive whether to search recursively or not @return the operation """ final ModelNode...
java
public static ModelNode createReadResourceOperation(final ModelNode address, final boolean recursive) { final ModelNode op = createOperation(READ_RESOURCE_OPERATION, address); op.get(RECURSIVE).set(recursive); return op; }
[ "public", "static", "ModelNode", "createReadResourceOperation", "(", "final", "ModelNode", "address", ",", "final", "boolean", "recursive", ")", "{", "final", "ModelNode", "op", "=", "createOperation", "(", "READ_RESOURCE_OPERATION", ",", "address", ")", ";", "op", ...
Creates an operation to read a resource. @param address the address to create the read for @param recursive whether to search recursively or not @return the operation
[ "Creates", "an", "operation", "to", "read", "a", "resource", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller-client/src/main/java/org/jboss/as/controller/client/helpers/Operations.java#L245-L249
alkacon/opencms-core
src/org/opencms/ui/components/categoryselect/CmsCategoryTree.java
CmsCategoryTree.loadCategories
void loadCategories(CmsObject cms, String contextPath) { """ Loads the categories for the given context path.<p> @param cms the cms context @param contextPath the context path """ m_checkboxes.clear(); m_container.removeAllItems(); List<CmsCategory> categories; Locale wpLo...
java
void loadCategories(CmsObject cms, String contextPath) { m_checkboxes.clear(); m_container.removeAllItems(); List<CmsCategory> categories; Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms); CmsCategoryService catService = CmsCategoryService.getInstance(); ...
[ "void", "loadCategories", "(", "CmsObject", "cms", ",", "String", "contextPath", ")", "{", "m_checkboxes", ".", "clear", "(", ")", ";", "m_container", ".", "removeAllItems", "(", ")", ";", "List", "<", "CmsCategory", ">", "categories", ";", "Locale", "wpLoca...
Loads the categories for the given context path.<p> @param cms the cms context @param contextPath the context path
[ "Loads", "the", "categories", "for", "the", "given", "context", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/categoryselect/CmsCategoryTree.java#L213-L231
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/EncodingInfo.java
EncodingInfo.inEncoding
private static boolean inEncoding(char ch, String encoding) { """ This is heart of the code that determines if a given character is in the given encoding. This method is probably expensive, and the answer should be cached. <p> This method is not a public API, and should only be used internally within the seri...
java
private static boolean inEncoding(char ch, String encoding) { boolean isInEncoding; try { char cArray[] = new char[1]; cArray[0] = ch; // Construct a String from the char String s = new String(cArray); // Encode the String into a sequence of b...
[ "private", "static", "boolean", "inEncoding", "(", "char", "ch", ",", "String", "encoding", ")", "{", "boolean", "isInEncoding", ";", "try", "{", "char", "cArray", "[", "]", "=", "new", "char", "[", "1", "]", ";", "cArray", "[", "0", "]", "=", "ch", ...
This is heart of the code that determines if a given character is in the given encoding. This method is probably expensive, and the answer should be cached. <p> This method is not a public API, and should only be used internally within the serializer. @param ch the char in question, that is not a high char of a high/lo...
[ "This", "is", "heart", "of", "the", "code", "that", "determines", "if", "a", "given", "character", "is", "in", "the", "given", "encoding", ".", "This", "method", "is", "probably", "expensive", "and", "the", "answer", "should", "be", "cached", ".", "<p", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/EncodingInfo.java#L425-L447
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/EmailApi.java
EmailApi.replyEmail
public ApiSuccessResponse replyEmail(String id, ReplyData replyData) throws ApiException { """ reply email Reply to inbound email interaction specified in the id path parameter @param id id of interaction to reply (required) @param replyData Request parameters. (optional) @return ApiSuccessResponse @throws Ap...
java
public ApiSuccessResponse replyEmail(String id, ReplyData replyData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = replyEmailWithHttpInfo(id, replyData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "replyEmail", "(", "String", "id", ",", "ReplyData", "replyData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "replyEmailWithHttpInfo", "(", "id", ",", "replyData", ")", ";", "retu...
reply email Reply to inbound email interaction specified in the id path parameter @param id id of interaction to reply (required) @param replyData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "reply", "email", "Reply", "to", "inbound", "email", "interaction", "specified", "in", "the", "id", "path", "parameter" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/EmailApi.java#L636-L639
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.setDateTime
public void setDateTime(Element el, String key, DateTime value) { """ sets a datetime value to a XML Element @param el Element to set value on it @param key key to set @param value value to set """ if (value != null) { String str = value.castToString(null); if (str != null) el.setAttribute(key,...
java
public void setDateTime(Element el, String key, DateTime value) { if (value != null) { String str = value.castToString(null); if (str != null) el.setAttribute(key, str); } }
[ "public", "void", "setDateTime", "(", "Element", "el", ",", "String", "key", ",", "DateTime", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "String", "str", "=", "value", ".", "castToString", "(", "null", ")", ";", "if", "(", "str", ...
sets a datetime value to a XML Element @param el Element to set value on it @param key key to set @param value value to set
[ "sets", "a", "datetime", "value", "to", "a", "XML", "Element" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L412-L417
ebean-orm/ebean-querybean
src/main/java/io/ebean/typequery/TQRootBean.java
TQRootBean.fetchQuery
public R fetchQuery(String path, String properties) { """ Specify a path and properties to load using a "query join". <pre>{@code List<Customer> customers = new QCustomer() // eager fetch contacts using a "query join" .fetchQuery("contacts", "email, firstName, lastName") .findList(); }</pre> @param...
java
public R fetchQuery(String path, String properties) { query.fetchQuery(path, properties); return root; }
[ "public", "R", "fetchQuery", "(", "String", "path", ",", "String", "properties", ")", "{", "query", ".", "fetchQuery", "(", "path", ",", "properties", ")", ";", "return", "root", ";", "}" ]
Specify a path and properties to load using a "query join". <pre>{@code List<Customer> customers = new QCustomer() // eager fetch contacts using a "query join" .fetchQuery("contacts", "email, firstName, lastName") .findList(); }</pre> @param path the property path of an associated (OneToOne, OneToMany, ManyToOne or...
[ "Specify", "a", "path", "and", "properties", "to", "load", "using", "a", "query", "join", "." ]
train
https://github.com/ebean-orm/ebean-querybean/blob/821650cb817c9c0fdcc97f93408dc79170b12423/src/main/java/io/ebean/typequery/TQRootBean.java#L322-L325
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/internal/gosu/util/RabinKarpHash.java
RabinKarpHash.rollHash
private int rollHash(int hashvalue, String str, int i) { """ Update rolling hash values. @param hashvalue @param str @param i @return """ // 'roll' hash char outchar = str.charAt(str.length() - 1 - i); char inchar = str.charAt(str.length() - _block - 1 - i); hashvalue = A * hashvalue + CHAR...
java
private int rollHash(int hashvalue, String str, int i) { // 'roll' hash char outchar = str.charAt(str.length() - 1 - i); char inchar = str.charAt(str.length() - _block - 1 - i); hashvalue = A * hashvalue + CHAR_HASHES[inchar] - _Apowblock * CHAR_HASHES[outchar]; return hashvalue; }
[ "private", "int", "rollHash", "(", "int", "hashvalue", ",", "String", "str", ",", "int", "i", ")", "{", "// 'roll' hash", "char", "outchar", "=", "str", ".", "charAt", "(", "str", ".", "length", "(", ")", "-", "1", "-", "i", ")", ";", "char", "inch...
Update rolling hash values. @param hashvalue @param str @param i @return
[ "Update", "rolling", "hash", "values", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/internal/gosu/util/RabinKarpHash.java#L121-L127
haraldk/TwelveMonkeys
common/common-io/src/main/java/com/twelvemonkeys/io/FileUtil.java
FileUtil.visitFiles
@SuppressWarnings( { """ Visits all files in {@code pDirectory}. Optionally filtered through a {@link FileFilter}. @param pDirectory the directory to visit files in @param pFilter the filter, may be {@code null}, meaning all files will be visited @param pVisitor the visitor @throws IllegalArgumentException...
java
@SuppressWarnings({"ResultOfMethodCallIgnored"}) public static void visitFiles(final File pDirectory, final FileFilter pFilter, final Visitor<File> pVisitor) { Validate.notNull(pDirectory, "directory"); Validate.notNull(pVisitor, "visitor"); pDirectory.listFiles(new FileFilter() { ...
[ "@", "SuppressWarnings", "(", "{", "\"ResultOfMethodCallIgnored\"", "}", ")", "public", "static", "void", "visitFiles", "(", "final", "File", "pDirectory", ",", "final", "FileFilter", "pFilter", ",", "final", "Visitor", "<", "File", ">", "pVisitor", ")", "{", ...
Visits all files in {@code pDirectory}. Optionally filtered through a {@link FileFilter}. @param pDirectory the directory to visit files in @param pFilter the filter, may be {@code null}, meaning all files will be visited @param pVisitor the visitor @throws IllegalArgumentException if either {@code pDirectory} or {@c...
[ "Visits", "all", "files", "in", "{", "@code", "pDirectory", "}", ".", "Optionally", "filtered", "through", "a", "{", "@link", "FileFilter", "}", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-io/src/main/java/com/twelvemonkeys/io/FileUtil.java#L1068-L1082
Netflix/eureka
eureka-client/src/main/java/com/netflix/discovery/util/DeserializerStringCache.java
DeserializerStringCache.init
public static ObjectReader init(ObjectReader reader, DeserializationContext context) { """ adds an existing DeserializerStringCache from the DeserializationContext to an ObjectReader @param reader a new ObjectReader @param context an existing DeserializationContext containing a DeserializerStringCache @re...
java
public static ObjectReader init(ObjectReader reader, DeserializationContext context) { return withCache(context, cache -> { if (cache == null) throw new IllegalStateException(); return reader.withAttribute(ATTR_STRING_CACHE, cache); }); }
[ "public", "static", "ObjectReader", "init", "(", "ObjectReader", "reader", ",", "DeserializationContext", "context", ")", "{", "return", "withCache", "(", "context", ",", "cache", "->", "{", "if", "(", "cache", "==", "null", ")", "throw", "new", "IllegalStateE...
adds an existing DeserializerStringCache from the DeserializationContext to an ObjectReader @param reader a new ObjectReader @param context an existing DeserializationContext containing a DeserializerStringCache @return a wrapped ObjectReader with the string cache attribute
[ "adds", "an", "existing", "DeserializerStringCache", "from", "the", "DeserializationContext", "to", "an", "ObjectReader" ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/util/DeserializerStringCache.java#L76-L82
VoltDB/voltdb
third_party/java/src/org/apache/log4j/helpers/TCPSyslogWriter.java
TCPSyslogWriter.write
public void write(final char[] data, final int start, final int count) throws IOException { """ Opens TCP socket connection, sends the {@code count} chars out of the {@code data} parameter starting with {@code start} and closes the connection. """ write(new...
java
public void write(final char[] data, final int start, final int count) throws IOException { write(new String(data, start, count)); }
[ "public", "void", "write", "(", "final", "char", "[", "]", "data", ",", "final", "int", "start", ",", "final", "int", "count", ")", "throws", "IOException", "{", "write", "(", "new", "String", "(", "data", ",", "start", ",", "count", ")", ")", ";", ...
Opens TCP socket connection, sends the {@code count} chars out of the {@code data} parameter starting with {@code start} and closes the connection.
[ "Opens", "TCP", "socket", "connection", "sends", "the", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/log4j/helpers/TCPSyslogWriter.java#L138-L142
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/io/async/AsyncLibrary.java
AsyncLibrary.multiIO3
@Override public boolean multiIO3(long iobufferAddress, long position, int count, boolean isRead, boolean forceQueue, long bytesRequested, boolean useJITBuffer) throws AsyncException { """ /* @see com.ibm.io.async.IAsyncProvider#multiIO3(long, long, int,...
java
@Override public boolean multiIO3(long iobufferAddress, long position, int count, boolean isRead, boolean forceQueue, long bytesRequested, boolean useJITBuffer) throws AsyncException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { ...
[ "@", "Override", "public", "boolean", "multiIO3", "(", "long", "iobufferAddress", ",", "long", "position", ",", "int", "count", ",", "boolean", "isRead", ",", "boolean", "forceQueue", ",", "long", "bytesRequested", ",", "boolean", "useJITBuffer", ")", "throws", ...
/* @see com.ibm.io.async.IAsyncProvider#multiIO3(long, long, int, boolean, boolean, long, boolean)
[ "/", "*" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/AsyncLibrary.java#L687-L695
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/DirectoryResourceFileSource.java
DirectoryResourceFileSource.populateFileList
private void populateFileList(ResourceFileList list, File root, boolean recurse) throws IOException { """ add all files matching this.filter beneath root to list, recursing if recurse is set. @param list @param root @param recurse @throws IOException """ if(root.isDirectory()) { File[] files = ro...
java
private void populateFileList(ResourceFileList list, File root, boolean recurse) throws IOException { if(root.isDirectory()) { File[] files = root.listFiles(); if(files != null) { for(File file : files) { if(file.isFile() && filter.accept(root, file.getName())) { ResourceFileLocation location =...
[ "private", "void", "populateFileList", "(", "ResourceFileList", "list", ",", "File", "root", ",", "boolean", "recurse", ")", "throws", "IOException", "{", "if", "(", "root", ".", "isDirectory", "(", ")", ")", "{", "File", "[", "]", "files", "=", "root", ...
add all files matching this.filter beneath root to list, recursing if recurse is set. @param list @param root @param recurse @throws IOException
[ "add", "all", "files", "matching", "this", ".", "filter", "beneath", "root", "to", "list", "recursing", "if", "recurse", "is", "set", "." ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/DirectoryResourceFileSource.java#L68-L87
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/jmx/JmxUtil.java
JmxUtil.buildJmxDomain
public static String buildJmxDomain(String domain, MBeanServer mBeanServer, String groupName) { """ Build the JMX domain name. @param domain The JMX domain name @param mBeanServer the {@link MBeanServer} where to check whether the JMX domain is allowed or not. @param groupName String containing the group nam...
java
public static String buildJmxDomain(String domain, MBeanServer mBeanServer, String groupName) { return findJmxDomain(domain, mBeanServer, groupName); }
[ "public", "static", "String", "buildJmxDomain", "(", "String", "domain", ",", "MBeanServer", "mBeanServer", ",", "String", "groupName", ")", "{", "return", "findJmxDomain", "(", "domain", ",", "mBeanServer", ",", "groupName", ")", ";", "}" ]
Build the JMX domain name. @param domain The JMX domain name @param mBeanServer the {@link MBeanServer} where to check whether the JMX domain is allowed or not. @param groupName String containing the group name for the JMX MBean @return A string that combines the allowed JMX domain and the group name
[ "Build", "the", "JMX", "domain", "name", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/jmx/JmxUtil.java#L47-L49
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/api/rendering/DataGridTagModel.java
DataGridTagModel.addResourceOverride
public void addResourceOverride(String key, String value) { """ <p> This method provides support for overriding the messages available in the {@link DataGridResourceProvider} on a per-message basis. The key and value parameters here will override (or add) a message available via the {@link DataGridResourceProv...
java
public void addResourceOverride(String key, String value) { OverridableDataGridResourceProvider overrideResourceProvider = null; if(!(_resourceProvider instanceof OverridableDataGridResourceProvider)) { overrideResourceProvider = new OverridableDataGridResourceProvider(_resourceProvider); ...
[ "public", "void", "addResourceOverride", "(", "String", "key", ",", "String", "value", ")", "{", "OverridableDataGridResourceProvider", "overrideResourceProvider", "=", "null", ";", "if", "(", "!", "(", "_resourceProvider", "instanceof", "OverridableDataGridResourceProvid...
<p> This method provides support for overriding the messages available in the {@link DataGridResourceProvider} on a per-message basis. The key and value parameters here will override (or add) a message available via the {@link DataGridResourceProvider} without requiring an entire Java properties file or custom {@link ...
[ "<p", ">", "This", "method", "provides", "support", "for", "overriding", "the", "messages", "available", "in", "the", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/api/rendering/DataGridTagModel.java#L368-L380
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java
ExcelWriter.writeRow
@SuppressWarnings( { """ 写出一行,根据rowBean数据类型不同,写出情况如下: <pre> 1、如果为Iterable,直接写出一行 2、如果为Map,isWriteKeyAsHead为true写出两行,Map的keys做为一行,values做为第二行,否则只写出一行values 3、如果为Bean,转为Map写出,isWriteKeyAsHead为true写出两行,Map的keys做为一行,values做为第二行,否则只写出一行values </pre> @param rowBean 写出的Bean @param isWriteKeyAsHead 为true写出两行,Ma...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public ExcelWriter writeRow(Object rowBean, boolean isWriteKeyAsHead) { if (rowBean instanceof Iterable) { return writeRow((Iterable<?>) rowBean); } Map rowMap = null; if (rowBean instanceof Map) { if (MapUtil.isNotEmpty(this.headerAlias)) { rowM...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "ExcelWriter", "writeRow", "(", "Object", "rowBean", ",", "boolean", "isWriteKeyAsHead", ")", "{", "if", "(", "rowBean", "instanceof", "Iterable", ")", "{", "return", ...
写出一行,根据rowBean数据类型不同,写出情况如下: <pre> 1、如果为Iterable,直接写出一行 2、如果为Map,isWriteKeyAsHead为true写出两行,Map的keys做为一行,values做为第二行,否则只写出一行values 3、如果为Bean,转为Map写出,isWriteKeyAsHead为true写出两行,Map的keys做为一行,values做为第二行,否则只写出一行values </pre> @param rowBean 写出的Bean @param isWriteKeyAsHead 为true写出两行,Map的keys做为一行,values做为第二行,否则只写出一行values @r...
[ "写出一行,根据rowBean数据类型不同,写出情况如下:" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java#L677-L701
eclipse/xtext-core
org.eclipse.xtext.util/src/org/eclipse/xtext/util/JavaStringConverter.java
JavaStringConverter.convertFromJavaString
public String convertFromJavaString(String string, boolean useUnicode) { """ Resolve Java control character sequences to the actual character value. Optionally handle unicode escape sequences, too. """ int firstEscapeSequence = string.indexOf('\\'); if (firstEscapeSequence == -1) { return string; } ...
java
public String convertFromJavaString(String string, boolean useUnicode) { int firstEscapeSequence = string.indexOf('\\'); if (firstEscapeSequence == -1) { return string; } int length = string.length(); StringBuilder result = new StringBuilder(length); appendRegion(string, 0, firstEscapeSequence, result); ...
[ "public", "String", "convertFromJavaString", "(", "String", "string", ",", "boolean", "useUnicode", ")", "{", "int", "firstEscapeSequence", "=", "string", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "firstEscapeSequence", "==", "-", "1", ")", "{", ...
Resolve Java control character sequences to the actual character value. Optionally handle unicode escape sequences, too.
[ "Resolve", "Java", "control", "character", "sequences", "to", "the", "actual", "character", "value", ".", "Optionally", "handle", "unicode", "escape", "sequences", "too", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/JavaStringConverter.java#L23-L32
rythmengine/rythmengine
src/main/java/org/rythmengine/toString/ToStringStyle.java
ToStringStyle.appendFieldStart
protected void appendFieldStart(StringBuilder buffer, String fieldName) { """ <p>Append to the <code>toString</code> the field start.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name """ if (useFieldNames && fieldName != null) { buffer.appe...
java
protected void appendFieldStart(StringBuilder buffer, String fieldName) { if (useFieldNames && fieldName != null) { buffer.append(fieldName); buffer.append(fieldNameValueSeparator); } }
[ "protected", "void", "appendFieldStart", "(", "StringBuilder", "buffer", ",", "String", "fieldName", ")", "{", "if", "(", "useFieldNames", "&&", "fieldName", "!=", "null", ")", "{", "buffer", ".", "append", "(", "fieldName", ")", ";", "buffer", ".", "append"...
<p>Append to the <code>toString</code> the field start.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "the", "field", "start", ".", "<", "/", "p", ">" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/toString/ToStringStyle.java#L1518-L1523
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.ws
public Javalin ws(@NotNull String path, @NotNull Consumer<WsHandler> ws, @NotNull Set<Role> permittedRoles) { """ Adds a WebSocket handler on the specified path with the specified roles. Requires an access manager to be set on the instance. @see AccessManager @see <a href="https://javalin.io/documentation#web...
java
public Javalin ws(@NotNull String path, @NotNull Consumer<WsHandler> ws, @NotNull Set<Role> permittedRoles) { return addWsHandler(WsHandlerType.WEBSOCKET, path, ws, permittedRoles); }
[ "public", "Javalin", "ws", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "WsHandler", ">", "ws", ",", "@", "NotNull", "Set", "<", "Role", ">", "permittedRoles", ")", "{", "return", "addWsHandler", "(", "WsHandlerType", ".", ...
Adds a WebSocket handler on the specified path with the specified roles. Requires an access manager to be set on the instance. @see AccessManager @see <a href="https://javalin.io/documentation#websockets">WebSockets in docs</a>
[ "Adds", "a", "WebSocket", "handler", "on", "the", "specified", "path", "with", "the", "specified", "roles", ".", "Requires", "an", "access", "manager", "to", "be", "set", "on", "the", "instance", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L534-L536
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetSdkRequest.java
GetSdkRequest.withParameters
public GetSdkRequest withParameters(java.util.Map<String, String> parameters) { """ <p> A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> ...
java
public GetSdkRequest withParameters(java.util.Map<String, String> parameters) { setParameters(parameters); return this; }
[ "public", "GetSdkRequest", "withParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "setParameters", "(", "parameters", ")", ";", "return", "this", ";", "}" ]
<p> A string-to-string key-value map of query parameters <code>sdkType</code>-dependent properties of the SDK. For <code>sdkType</code> of <code>objectivec</code> or <code>swift</code>, a parameter named <code>classPrefix</code> is required. For <code>sdkType</code> of <code>android</code>, parameters named <code>group...
[ "<p", ">", "A", "string", "-", "to", "-", "string", "key", "-", "value", "map", "of", "query", "parameters", "<code", ">", "sdkType<", "/", "code", ">", "-", "dependent", "properties", "of", "the", "SDK", ".", "For", "<code", ">", "sdkType<", "/", "c...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetSdkRequest.java#L257-L260
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._orderByDescending
public void _orderByDescending(String field, OrderingType ordering) { """ Order the results by the specified fields The fields are the names of the fields to sort, defaulting to sorting by descending. You can prefix a field name with '-' to indicate sorting by descending or '+' to sort by ascending @param field...
java
public void _orderByDescending(String field, OrderingType ordering) { assertNoRawQuery(); String f = ensureValidFieldName(field, false); orderByTokens.add(OrderByToken.createDescending(f, ordering)); }
[ "public", "void", "_orderByDescending", "(", "String", "field", ",", "OrderingType", "ordering", ")", "{", "assertNoRawQuery", "(", ")", ";", "String", "f", "=", "ensureValidFieldName", "(", "field", ",", "false", ")", ";", "orderByTokens", ".", "add", "(", ...
Order the results by the specified fields The fields are the names of the fields to sort, defaulting to sorting by descending. You can prefix a field name with '-' to indicate sorting by descending or '+' to sort by ascending @param field Field to use @param ordering Ordering type
[ "Order", "the", "results", "by", "the", "specified", "fields", "The", "fields", "are", "the", "names", "of", "the", "fields", "to", "sort", "defaulting", "to", "sorting", "by", "descending", ".", "You", "can", "prefix", "a", "field", "name", "with", "-", ...
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L955-L959