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
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4AddressSection.java
IPv4AddressSection.getIPv4Count
private long getIPv4Count(boolean excludeZeroHosts, int segCount) { """ This was added so count available as a long and not as BigInteger """ if(!isMultiple()) { if(excludeZeroHosts && isZero()) { return 0L; } return 1L; } long result = getCount(i -> getSegment(i).getValueCount(), segCount);...
java
private long getIPv4Count(boolean excludeZeroHosts, int segCount) { if(!isMultiple()) { if(excludeZeroHosts && isZero()) { return 0L; } return 1L; } long result = getCount(i -> getSegment(i).getValueCount(), segCount); if(excludeZeroHosts && includesZeroHost()) { int prefixedSegment = getNetwork...
[ "private", "long", "getIPv4Count", "(", "boolean", "excludeZeroHosts", ",", "int", "segCount", ")", "{", "if", "(", "!", "isMultiple", "(", ")", ")", "{", "if", "(", "excludeZeroHosts", "&&", "isZero", "(", ")", ")", "{", "return", "0L", ";", "}", "ret...
This was added so count available as a long and not as BigInteger
[ "This", "was", "added", "so", "count", "available", "as", "a", "long", "and", "not", "as", "BigInteger" ]
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/ipv4/IPv4AddressSection.java#L768-L790
h2oai/h2o-3
h2o-core/src/main/java/water/util/StringUtils.java
StringUtils.toCharacterSet
public static HashSet<Character> toCharacterSet(String src) { """ Convert a string into the set of its characters. @param src Source string @return Set of characters within the source string """ int n = src.length(); HashSet<Character> res = new HashSet<>(n); for (int i = 0; i < n; i++) r...
java
public static HashSet<Character> toCharacterSet(String src) { int n = src.length(); HashSet<Character> res = new HashSet<>(n); for (int i = 0; i < n; i++) res.add(src.charAt(i)); return res; } public static Character[] toCharacterArray(String src) { return ArrayUtils.box(src.toCharArray()...
[ "public", "static", "HashSet", "<", "Character", ">", "toCharacterSet", "(", "String", "src", ")", "{", "int", "n", "=", "src", ".", "length", "(", ")", ";", "HashSet", "<", "Character", ">", "res", "=", "new", "HashSet", "<>", "(", "n", ")", ";", ...
Convert a string into the set of its characters. @param src Source string @return Set of characters within the source string
[ "Convert", "a", "string", "into", "the", "set", "of", "its", "characters", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/util/StringUtils.java#L172-L204
alkacon/opencms-core
src/org/opencms/util/CmsDateUtil.java
CmsDateUtil.parseDate
public static long parseDate(int year, int month, int date) { """ Returns the long value of a date created by the given integer values.<p> @param year the integer value of year @param month the integer value of month @param date the integer value of date @return the long value of a date created by the give...
java
public static long parseDate(int year, int month, int date) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month, date); return calendar.getTime().getTime(); }
[ "public", "static", "long", "parseDate", "(", "int", "year", ",", "int", "month", ",", "int", "date", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "set", "(", "year", ",", "month", ",", "date", ...
Returns the long value of a date created by the given integer values.<p> @param year the integer value of year @param month the integer value of month @param date the integer value of date @return the long value of a date created by the given integer values
[ "Returns", "the", "long", "value", "of", "a", "date", "created", "by", "the", "given", "integer", "values", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsDateUtil.java#L190-L195
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkIfElse
private Environment checkIfElse(Stmt.IfElse stmt, Environment environment, EnclosingScope scope) { """ Type check an if-statement. To do this, we check the environment through both sides of condition expression. Each can produce a different environment in the case that runtime type tests are used. These potentia...
java
private Environment checkIfElse(Stmt.IfElse stmt, Environment environment, EnclosingScope scope) { // Check condition and apply variable retypings. Environment trueEnvironment = checkCondition(stmt.getCondition(), true, environment); Environment falseEnvironment = checkCondition(stmt.getCondition(), false, enviro...
[ "private", "Environment", "checkIfElse", "(", "Stmt", ".", "IfElse", "stmt", ",", "Environment", "environment", ",", "EnclosingScope", "scope", ")", "{", "// Check condition and apply variable retypings.", "Environment", "trueEnvironment", "=", "checkCondition", "(", "stm...
Type check an if-statement. To do this, we check the environment through both sides of condition expression. Each can produce a different environment in the case that runtime type tests are used. These potentially updated environments are then passed through the true and false blocks which, in turn, produce updated env...
[ "Type", "check", "an", "if", "-", "statement", ".", "To", "do", "this", "we", "check", "the", "environment", "through", "both", "sides", "of", "condition", "expression", ".", "Each", "can", "produce", "a", "different", "environment", "in", "the", "case", "...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L574-L587
fleipold/jproc
src/main/java/org/buildobjects/process/ProcBuilder.java
ProcBuilder.run
public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException { """ Spawn the actual execution. This will block until the process terminates. @return the result of the successful execution @throws StartupException if the process can't be started @throws TimeoutException if ...
java
public ProcResult run() throws StartupException, TimeoutException, ExternalProcessFailureException { if (stdout != defaultStdout && outputConsumer != null) { throw new IllegalArgumentException("You can either ..."); } try { Proc proc = new Proc(command, args, env, stdin...
[ "public", "ProcResult", "run", "(", ")", "throws", "StartupException", ",", "TimeoutException", ",", "ExternalProcessFailureException", "{", "if", "(", "stdout", "!=", "defaultStdout", "&&", "outputConsumer", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentE...
Spawn the actual execution. This will block until the process terminates. @return the result of the successful execution @throws StartupException if the process can't be started @throws TimeoutException if the timeout kicked in @throws ExternalProcessFailureException if the external process returned a non-null exit val...
[ "Spawn", "the", "actual", "execution", ".", "This", "will", "block", "until", "the", "process", "terminates", "." ]
train
https://github.com/fleipold/jproc/blob/617f498c63a822c6b0506a2474b3bc954ea25c9a/src/main/java/org/buildobjects/process/ProcBuilder.java#L198-L212
radkovo/jStyleParser
src/main/java/cz/vutbr/web/css/CSSFactory.java
CSSFactory.assignDOM
public static final StyleMap assignDOM(Document doc, String encoding, URL base, String media, boolean useInheritance, final MatchCondition matchCond) { """ This is the same as {@link CSSFactory#assignDOM(Document, String, URL, MediaSpec, boolean)} but only the media type is provided instead of the com...
java
public static final StyleMap assignDOM(Document doc, String encoding, URL base, String media, boolean useInheritance, final MatchCondition matchCond) { return assignDOM(doc, encoding, base, new MediaSpec(media), useInheritance, matchCond); }
[ "public", "static", "final", "StyleMap", "assignDOM", "(", "Document", "doc", ",", "String", "encoding", ",", "URL", "base", ",", "String", "media", ",", "boolean", "useInheritance", ",", "final", "MatchCondition", "matchCond", ")", "{", "return", "assignDOM", ...
This is the same as {@link CSSFactory#assignDOM(Document, String, URL, MediaSpec, boolean)} but only the media type is provided instead of the complete media specification. @param doc DOM tree @param encoding The default encoding used for the referenced style sheets @param base Base URL against which all files are sea...
[ "This", "is", "the", "same", "as", "{", "@link", "CSSFactory#assignDOM", "(", "Document", "String", "URL", "MediaSpec", "boolean", ")", "}", "but", "only", "the", "media", "type", "is", "provided", "instead", "of", "the", "complete", "media", "specification", ...
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/css/CSSFactory.java#L770-L774
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java
PathUtils.checkCase
public static boolean checkCase(final File file, String pathToTest) { """ The artifact API is case sensitive even on a file system that is not case sensitive. This method will test that the case of the supplied <em>existing</em> file matches the case in the pathToTest. It is assumed that you already tested tha...
java
public static boolean checkCase(final File file, String pathToTest) { if (pathToTest == null || pathToTest.isEmpty()) { return true; } if (IS_OS_CASE_SENSITIVE) { // It is assumed that the file exists. Therefore, its case must // match if we know that the f...
[ "public", "static", "boolean", "checkCase", "(", "final", "File", "file", ",", "String", "pathToTest", ")", "{", "if", "(", "pathToTest", "==", "null", "||", "pathToTest", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "IS_O...
The artifact API is case sensitive even on a file system that is not case sensitive. This method will test that the case of the supplied <em>existing</em> file matches the case in the pathToTest. It is assumed that you already tested that the file exists using the pathToTest. Therefore, on a case sensitive files syste...
[ "The", "artifact", "API", "is", "case", "sensitive", "even", "on", "a", "file", "system", "that", "is", "not", "case", "sensitive", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/PathUtils.java#L1252-L1279
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.domain_task_filter_id_GET
public OvhTaskFilter domain_task_filter_id_GET(String domain, Long id) throws IOException { """ Get this object properties REST: GET /email/domain/{domain}/task/filter/{id} @param domain [required] Name of your domain name @param id [required] Id of task """ String qPath = "/email/domain/{domain}/task/f...
java
public OvhTaskFilter domain_task_filter_id_GET(String domain, Long id) throws IOException { String qPath = "/email/domain/{domain}/task/filter/{id}"; StringBuilder sb = path(qPath, domain, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhTaskFilter.class); }
[ "public", "OvhTaskFilter", "domain_task_filter_id_GET", "(", "String", "domain", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/{domain}/task/filter/{id}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Get this object properties REST: GET /email/domain/{domain}/task/filter/{id} @param domain [required] Name of your domain name @param id [required] Id of task
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1158-L1163
wnameless/rubycollect4j
src/main/java/net/sf/rubycollect4j/RubyObject.java
RubyObject.send
public static <E> E send(Object o, String methodName, Boolean arg) { """ Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a Boolean @return the result of the method called """ return send(o, methodName, (Object) arg); }
java
public static <E> E send(Object o, String methodName, Boolean arg) { return send(o, methodName, (Object) arg); }
[ "public", "static", "<", "E", ">", "E", "send", "(", "Object", "o", ",", "String", "methodName", ",", "Boolean", "arg", ")", "{", "return", "send", "(", "o", ",", "methodName", ",", "(", "Object", ")", "arg", ")", ";", "}" ]
Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a Boolean @return the result of the method called
[ "Executes", "a", "method", "of", "any", "Object", "by", "Java", "reflection", "." ]
train
https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyObject.java#L327-L329
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/linkedlist/LinkedList.java
LinkedList.newCursorAtBottom
public Cursor newCursorAtBottom(String name) { """ Synchronized. Creates a new cursor over this list, initially sitting at the bottoms of the list. """ if (tc.isEntryEnabled()) SibTr.entry(tc, "newCursorAtBottom", name); Cursor cursor = new Cursor(name,this,false); if (tc.isEntryEnab...
java
public Cursor newCursorAtBottom(String name) { if (tc.isEntryEnabled()) SibTr.entry(tc, "newCursorAtBottom", name); Cursor cursor = new Cursor(name,this,false); if (tc.isEntryEnabled()) SibTr.exit(tc, "newCursorAtBottom", cursor); return cursor; }
[ "public", "Cursor", "newCursorAtBottom", "(", "String", "name", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"newCursorAtBottom\"", ",", "name", ")", ";", "Cursor", "cursor", "=", "new", "Curso...
Synchronized. Creates a new cursor over this list, initially sitting at the bottoms of the list.
[ "Synchronized", ".", "Creates", "a", "new", "cursor", "over", "this", "list", "initially", "sitting", "at", "the", "bottoms", "of", "the", "list", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/linkedlist/LinkedList.java#L78-L89
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urltemplates/URLTemplates.java
URLTemplates.getTemplateNameByRef
public String getTemplateNameByRef( String refGroupName, String key ) { """ Retrieve a template name from a reference group in url-template-config. @param refGroupName the name of the template reference group. @param key the key to the particular template reference in the group. @return a template name from t...
java
public String getTemplateNameByRef( String refGroupName, String key ) { String templateName = null; Map/*< String, String >*/ templateRefGroup = ( Map ) _templateRefGroups.get( refGroupName ); if ( templateRefGroup != null ) { templateName = ( String ) templateRefGroup.ge...
[ "public", "String", "getTemplateNameByRef", "(", "String", "refGroupName", ",", "String", "key", ")", "{", "String", "templateName", "=", "null", ";", "Map", "/*< String, String >*/", "templateRefGroup", "=", "(", "Map", ")", "_templateRefGroups", ".", "get", "(",...
Retrieve a template name from a reference group in url-template-config. @param refGroupName the name of the template reference group. @param key the key to the particular template reference in the group. @return a template name from the reference group.
[ "Retrieve", "a", "template", "name", "from", "a", "reference", "group", "in", "url", "-", "template", "-", "config", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urltemplates/URLTemplates.java#L129-L139
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.create_TITLE_Image
protected BufferedImage create_TITLE_Image(final int WIDTH, final String TITLE, final String UNIT_STRING) { """ Returns the image with the given title and unitstring. @param WIDTH @param TITLE @param UNIT_STRING @return the image with the given title and unitstring. """ return create_TITLE_Image(WI...
java
protected BufferedImage create_TITLE_Image(final int WIDTH, final String TITLE, final String UNIT_STRING) { return create_TITLE_Image(WIDTH, TITLE, UNIT_STRING, null); }
[ "protected", "BufferedImage", "create_TITLE_Image", "(", "final", "int", "WIDTH", ",", "final", "String", "TITLE", ",", "final", "String", "UNIT_STRING", ")", "{", "return", "create_TITLE_Image", "(", "WIDTH", ",", "TITLE", ",", "UNIT_STRING", ",", "null", ")", ...
Returns the image with the given title and unitstring. @param WIDTH @param TITLE @param UNIT_STRING @return the image with the given title and unitstring.
[ "Returns", "the", "image", "with", "the", "given", "title", "and", "unitstring", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1411-L1413
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/image/VisualizeImageData.java
VisualizeImageData.grayMagnitudeTemp
public static BufferedImage grayMagnitudeTemp(ImageGray src, BufferedImage dst, double normalize) { """ <p> Renders a gray scale image using color values from cold to hot. </p> @param src Input single band image. @param dst Where the image is rendered into. If null a new BufferedImage will be cr...
java
public static BufferedImage grayMagnitudeTemp(ImageGray src, BufferedImage dst, double normalize) { if (normalize < 0) normalize = GImageStatistics.maxAbs(src); dst = checkInputs(src, dst); if (src.getDataType().isInteger()) { return grayMagnitudeTemp((GrayI) src, dst, (int) normalize); } else { thro...
[ "public", "static", "BufferedImage", "grayMagnitudeTemp", "(", "ImageGray", "src", ",", "BufferedImage", "dst", ",", "double", "normalize", ")", "{", "if", "(", "normalize", "<", "0", ")", "normalize", "=", "GImageStatistics", ".", "maxAbs", "(", "src", ")", ...
<p> Renders a gray scale image using color values from cold to hot. </p> @param src Input single band image. @param dst Where the image is rendered into. If null a new BufferedImage will be created and return. @param normalize Used to normalize the input image. @return Rendered image.
[ "<p", ">", "Renders", "a", "gray", "scale", "image", "using", "color", "values", "from", "cold", "to", "hot", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/image/VisualizeImageData.java#L186-L197
petergeneric/stdlib
service-manager/service-manager/src/main/java/com/peterphi/servicemanager/service/rest/resource/impl/ServiceManagerResourceRestServiceImpl.java
ServiceManagerResourceRestServiceImpl.provision
@Override public ResourceInstanceDTO provision(final String templateName, final ProvisionResourceParametersDTO parameters) { """ N.B. no {@link Transactional} annotation because the inner service does transaction management @param templateName @param parameters @return """ final Map<String, String> m...
java
@Override public ResourceInstanceDTO provision(final String templateName, final ProvisionResourceParametersDTO parameters) { final Map<String, String> metadata = ResourceKVP.toMap(parameters.metadata); ResourceInstanceEntity entity = service.newInstance(templateName, metadata); return getInstanceById(entity.g...
[ "@", "Override", "public", "ResourceInstanceDTO", "provision", "(", "final", "String", "templateName", ",", "final", "ProvisionResourceParametersDTO", "parameters", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "metadata", "=", "ResourceKVP", ".", "...
N.B. no {@link Transactional} annotation because the inner service does transaction management @param templateName @param parameters @return
[ "N", ".", "B", ".", "no", "{", "@link", "Transactional", "}", "annotation", "because", "the", "inner", "service", "does", "transaction", "management" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/service-manager/service-manager/src/main/java/com/peterphi/servicemanager/service/rest/resource/impl/ServiceManagerResourceRestServiceImpl.java#L77-L85
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.readTextFile
public DataStreamSource<String> readTextFile(String filePath, String charsetName) { """ Reads the given file line-by-line and creates a data stream that contains a string with the contents of each such line. The {@link java.nio.charset.Charset} with the given name will be used to read the files. <p><b>NOTES O...
java
public DataStreamSource<String> readTextFile(String filePath, String charsetName) { Preconditions.checkArgument(!StringUtils.isNullOrWhitespaceOnly(filePath), "The file path must not be null or blank."); TextInputFormat format = new TextInputFormat(new Path(filePath)); format.setFilesFilter(FilePathFilter.create...
[ "public", "DataStreamSource", "<", "String", ">", "readTextFile", "(", "String", "filePath", ",", "String", "charsetName", ")", "{", "Preconditions", ".", "checkArgument", "(", "!", "StringUtils", ".", "isNullOrWhitespaceOnly", "(", "filePath", ")", ",", "\"The fi...
Reads the given file line-by-line and creates a data stream that contains a string with the contents of each such line. The {@link java.nio.charset.Charset} with the given name will be used to read the files. <p><b>NOTES ON CHECKPOINTING: </b> The source monitors the path, creates the {@link org.apache.flink.core.fs.F...
[ "Reads", "the", "given", "file", "line", "-", "by", "-", "line", "and", "creates", "a", "data", "stream", "that", "contains", "a", "string", "with", "the", "contents", "of", "each", "such", "line", ".", "The", "{", "@link", "java", ".", "nio", ".", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L959-L968
line/armeria
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
ArmeriaHttpUtil.toNettyHttp2
public static Http2Headers toNettyHttp2(HttpHeaders in, boolean server) { """ Converts the specified Armeria HTTP/2 headers into Netty HTTP/2 headers. """ final Http2Headers out = new DefaultHttp2Headers(false, in.size()); // Trailing headers if it does not have :status. if (server && ...
java
public static Http2Headers toNettyHttp2(HttpHeaders in, boolean server) { final Http2Headers out = new DefaultHttp2Headers(false, in.size()); // Trailing headers if it does not have :status. if (server && in.status() == null) { for (Entry<AsciiString, String> entry : in) { ...
[ "public", "static", "Http2Headers", "toNettyHttp2", "(", "HttpHeaders", "in", ",", "boolean", "server", ")", "{", "final", "Http2Headers", "out", "=", "new", "DefaultHttp2Headers", "(", "false", ",", "in", ".", "size", "(", ")", ")", ";", "// Trailing headers ...
Converts the specified Armeria HTTP/2 headers into Netty HTTP/2 headers.
[ "Converts", "the", "specified", "Armeria", "HTTP", "/", "2", "headers", "into", "Netty", "HTTP", "/", "2", "headers", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java#L748-L779
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.getFlakeIdGeneratorConfig
public FlakeIdGeneratorConfig getFlakeIdGeneratorConfig(String name) { """ Returns the {@link FlakeIdGeneratorConfig} for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided ...
java
public FlakeIdGeneratorConfig getFlakeIdGeneratorConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, flakeIdGeneratorConfigMap, name, FlakeIdGeneratorConfig.class, new BiConsumer<FlakeIdGeneratorConfig, String>() { @Override public voi...
[ "public", "FlakeIdGeneratorConfig", "getFlakeIdGeneratorConfig", "(", "String", "name", ")", "{", "return", "ConfigUtils", ".", "getConfig", "(", "configPatternMatcher", ",", "flakeIdGeneratorConfigMap", ",", "name", ",", "FlakeIdGeneratorConfig", ".", "class", ",", "ne...
Returns the {@link FlakeIdGeneratorConfig} for the given name, creating one if necessary and adding it to the collection of known configurations. <p> The configuration is found by matching the configuration name pattern to the provided {@code name} without the partition qualifier (the part of the name after {@code '@'}...
[ "Returns", "the", "{", "@link", "FlakeIdGeneratorConfig", "}", "for", "the", "given", "name", "creating", "one", "if", "necessary", "and", "adding", "it", "to", "the", "collection", "of", "known", "configurations", ".", "<p", ">", "The", "configuration", "is",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L3052-L3060
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toTimespan
public static TimeSpan toTimespan(Object o) throws PageException { """ cast a Object to a TimeSpan Object (alias for toTimeSpan) @param o Object to cast @return casted TimeSpan Object @throws PageException """ TimeSpan ts = toTimespan(o, null); if (ts != null) return ts; throw new CasterException(o, "...
java
public static TimeSpan toTimespan(Object o) throws PageException { TimeSpan ts = toTimespan(o, null); if (ts != null) return ts; throw new CasterException(o, "timespan"); }
[ "public", "static", "TimeSpan", "toTimespan", "(", "Object", "o", ")", "throws", "PageException", "{", "TimeSpan", "ts", "=", "toTimespan", "(", "o", ",", "null", ")", ";", "if", "(", "ts", "!=", "null", ")", "return", "ts", ";", "throw", "new", "Caste...
cast a Object to a TimeSpan Object (alias for toTimeSpan) @param o Object to cast @return casted TimeSpan Object @throws PageException
[ "cast", "a", "Object", "to", "a", "TimeSpan", "Object", "(", "alias", "for", "toTimeSpan", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L3224-L3229
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Short.java
Short.parseShort
public static short parseShort(String s, int radix) throws NumberFormatException { """ Parses the string argument as a signed {@code short} in the radix specified by the second argument. The characters in the string must all be digits, of the specified radix (as determined by whether {@link java.lang.Ch...
java
public static short parseShort(String s, int radix) throws NumberFormatException { int i = Integer.parseInt(s, radix); if (i < MIN_VALUE || i > MAX_VALUE) throw new NumberFormatException( "Value out of range. Value:\"" + s + "\" Radix:" + radix); return (short...
[ "public", "static", "short", "parseShort", "(", "String", "s", ",", "int", "radix", ")", "throws", "NumberFormatException", "{", "int", "i", "=", "Integer", ".", "parseInt", "(", "s", ",", "radix", ")", ";", "if", "(", "i", "<", "MIN_VALUE", "||", "i",...
Parses the string argument as a signed {@code short} in the radix specified by the second argument. The characters in the string must all be digits, of the specified radix (as determined by whether {@link java.lang.Character#digit(char, int)} returns a nonnegative value) except that the first character may be an ASCII ...
[ "Parses", "the", "string", "argument", "as", "a", "signed", "{", "@code", "short", "}", "in", "the", "radix", "specified", "by", "the", "second", "argument", ".", "The", "characters", "in", "the", "string", "must", "all", "be", "digits", "of", "the", "sp...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Short.java#L117-L124
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/TimePickerSettings.java
TimePickerSettings.zApplyMinimumToggleTimeMenuButtonWidthInPixels
void zApplyMinimumToggleTimeMenuButtonWidthInPixels() { """ zApplyMinimumToggleTimeMenuButtonWidthInPixels, This applies the specified setting to the time picker. """ if (parent == null) { return; } Dimension menuButtonPreferredSize = parent.getComponentToggleTimeMenuButton...
java
void zApplyMinimumToggleTimeMenuButtonWidthInPixels() { if (parent == null) { return; } Dimension menuButtonPreferredSize = parent.getComponentToggleTimeMenuButton().getPreferredSize(); int width = menuButtonPreferredSize.width; int height = menuButtonPreferredSize.he...
[ "void", "zApplyMinimumToggleTimeMenuButtonWidthInPixels", "(", ")", "{", "if", "(", "parent", "==", "null", ")", "{", "return", ";", "}", "Dimension", "menuButtonPreferredSize", "=", "parent", ".", "getComponentToggleTimeMenuButton", "(", ")", ".", "getPreferredSize",...
zApplyMinimumToggleTimeMenuButtonWidthInPixels, This applies the specified setting to the time picker.
[ "zApplyMinimumToggleTimeMenuButtonWidthInPixels", "This", "applies", "the", "specified", "setting", "to", "the", "time", "picker", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/TimePickerSettings.java#L980-L991
rhuss/jolokia
agent/core/src/main/java/org/jolokia/util/DateUtil.java
DateUtil.fromISO8601
public static Date fromISO8601(String pDateString) { """ Parse an ISO-8601 string into an date object @param pDateString date string to parse @return the parse date @throws IllegalArgumentException if the provided string does not conform to ISO-8601 """ if (datatypeFactory != null) { r...
java
public static Date fromISO8601(String pDateString) { if (datatypeFactory != null) { return datatypeFactory.newXMLGregorianCalendar(pDateString.trim()).toGregorianCalendar().getTime(); } else { try { // Try on our own, works for most cases String da...
[ "public", "static", "Date", "fromISO8601", "(", "String", "pDateString", ")", "{", "if", "(", "datatypeFactory", "!=", "null", ")", "{", "return", "datatypeFactory", ".", "newXMLGregorianCalendar", "(", "pDateString", ".", "trim", "(", ")", ")", ".", "toGregor...
Parse an ISO-8601 string into an date object @param pDateString date string to parse @return the parse date @throws IllegalArgumentException if the provided string does not conform to ISO-8601
[ "Parse", "an", "ISO", "-", "8601", "string", "into", "an", "date", "object" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/util/DateUtil.java#L55-L69
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java
DefaultInternalConfiguration.getSubProperties
public Properties getSubProperties(final String prefix, final boolean truncate) { """ Returns a sub-set of the parameters contained in this configuration. @param prefix the prefix of the parameter keys which should be included. @param truncate if true, the prefix is truncated in the returned properties. @retu...
java
public Properties getSubProperties(final String prefix, final boolean truncate) { String cacheKey = truncate + prefix; Properties sub = subcontextCache.get(cacheKey); if (sub != null) { // make a copy so users can't change. Properties copy = new Properties(); copy.putAll(sub); return copy; } sub...
[ "public", "Properties", "getSubProperties", "(", "final", "String", "prefix", ",", "final", "boolean", "truncate", ")", "{", "String", "cacheKey", "=", "truncate", "+", "prefix", ";", "Properties", "sub", "=", "subcontextCache", ".", "get", "(", "cacheKey", ")...
Returns a sub-set of the parameters contained in this configuration. @param prefix the prefix of the parameter keys which should be included. @param truncate if true, the prefix is truncated in the returned properties. @return the properties sub-set, may be empty.
[ "Returns", "a", "sub", "-", "set", "of", "the", "parameters", "contained", "in", "this", "configuration", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/DefaultInternalConfiguration.java#L633-L671
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfSigGenericPKCS.java
PdfSigGenericPKCS.setExternalDigest
public void setExternalDigest(byte digest[], byte RSAdata[], String digestEncryptionAlgorithm) { """ Sets the digest/signature to an external calculated value. @param digest the digest. This is the actual signature @param RSAdata the extra data that goes into the data tag in PKCS#7 @param digestEncryptionAlgori...
java
public void setExternalDigest(byte digest[], byte RSAdata[], String digestEncryptionAlgorithm) { externalDigest = digest; externalRSAdata = RSAdata; this.digestEncryptionAlgorithm = digestEncryptionAlgorithm; }
[ "public", "void", "setExternalDigest", "(", "byte", "digest", "[", "]", ",", "byte", "RSAdata", "[", "]", ",", "String", "digestEncryptionAlgorithm", ")", "{", "externalDigest", "=", "digest", ";", "externalRSAdata", "=", "RSAdata", ";", "this", ".", "digestEn...
Sets the digest/signature to an external calculated value. @param digest the digest. This is the actual signature @param RSAdata the extra data that goes into the data tag in PKCS#7 @param digestEncryptionAlgorithm the encryption algorithm. It may must be <CODE>null</CODE> if the <CODE>digest</CODE> is also <CODE>null<...
[ "Sets", "the", "digest", "/", "signature", "to", "an", "external", "calculated", "value", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfSigGenericPKCS.java#L130-L134
cdapio/tephra
tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java
TransactionEdit.createCheckpoint
public static TransactionEdit createCheckpoint(long writePointer, long parentWritePointer) { """ Creates a new instance in the {@link State#CHECKPOINT} state. """ return new TransactionEdit(writePointer, 0L, State.CHECKPOINT, 0L, null, 0L, false, null, null, 0L, parentWritePointer, null); }
java
public static TransactionEdit createCheckpoint(long writePointer, long parentWritePointer) { return new TransactionEdit(writePointer, 0L, State.CHECKPOINT, 0L, null, 0L, false, null, null, 0L, parentWritePointer, null); }
[ "public", "static", "TransactionEdit", "createCheckpoint", "(", "long", "writePointer", ",", "long", "parentWritePointer", ")", "{", "return", "new", "TransactionEdit", "(", "writePointer", ",", "0L", ",", "State", ".", "CHECKPOINT", ",", "0L", ",", "null", ",",...
Creates a new instance in the {@link State#CHECKPOINT} state.
[ "Creates", "a", "new", "instance", "in", "the", "{" ]
train
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/persist/TransactionEdit.java#L294-L297
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/DocumentFactory.java
DocumentFactory.createRaw
public Document createRaw(@NonNull String content, @NonNull Language language) { """ Creates a document with the given content written in the given language. This method does not apply any {@link TextNormalizer} @param content the content @param language the language @return the document """ retur...
java
public Document createRaw(@NonNull String content, @NonNull Language language) { return createRaw("", content, language, Collections.emptyMap()); }
[ "public", "Document", "createRaw", "(", "@", "NonNull", "String", "content", ",", "@", "NonNull", "Language", "language", ")", "{", "return", "createRaw", "(", "\"\"", ",", "content", ",", "language", ",", "Collections", ".", "emptyMap", "(", ")", ")", ";"...
Creates a document with the given content written in the given language. This method does not apply any {@link TextNormalizer} @param content the content @param language the language @return the document
[ "Creates", "a", "document", "with", "the", "given", "content", "written", "in", "the", "given", "language", ".", "This", "method", "does", "not", "apply", "any", "{", "@link", "TextNormalizer", "}" ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/DocumentFactory.java#L205-L207
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_envVar_key_PUT
public void serviceName_envVar_key_PUT(String serviceName, String key, OvhEnvVar body) throws IOException { """ Alter this object properties REST: PUT /hosting/web/{serviceName}/envVar/{key} @param body [required] New object properties @param serviceName [required] The internal name of your hosting @param ke...
java
public void serviceName_envVar_key_PUT(String serviceName, String key, OvhEnvVar body) throws IOException { String qPath = "/hosting/web/{serviceName}/envVar/{key}"; StringBuilder sb = path(qPath, serviceName, key); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_envVar_key_PUT", "(", "String", "serviceName", ",", "String", "key", ",", "OvhEnvVar", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/envVar/{key}\"", ";", "StringBuilder", "sb", "=", "pa...
Alter this object properties REST: PUT /hosting/web/{serviceName}/envVar/{key} @param body [required] New object properties @param serviceName [required] The internal name of your hosting @param key [required] Name of the variable
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1787-L1791
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.symmLowerToFull
public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw ) { """ Given a symmetric matrix, which is represented by a lower triangular matrix, convert it back into a full symmetric matrix @param A (Input) Lower triangular matrix @param B (Output) Symmetric matrix. ...
java
public static void symmLowerToFull( DMatrixSparseCSC A , DMatrixSparseCSC B , @Nullable IGrowArray gw ) { ImplCommonOps_DSCC.symmLowerToFull(A, B, gw); }
[ "public", "static", "void", "symmLowerToFull", "(", "DMatrixSparseCSC", "A", ",", "DMatrixSparseCSC", "B", ",", "@", "Nullable", "IGrowArray", "gw", ")", "{", "ImplCommonOps_DSCC", ".", "symmLowerToFull", "(", "A", ",", "B", ",", "gw", ")", ";", "}" ]
Given a symmetric matrix, which is represented by a lower triangular matrix, convert it back into a full symmetric matrix @param A (Input) Lower triangular matrix @param B (Output) Symmetric matrix. @param gw (Optional) Workspace. Can be null.
[ "Given", "a", "symmetric", "matrix", "which", "is", "represented", "by", "a", "lower", "triangular", "matrix", "convert", "it", "back", "into", "a", "full", "symmetric", "matrix" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L323-L326
codelibs/jcifs
src/main/java/jcifs/smb1/netbios/NbtAddress.java
NbtAddress.getAllByAddress
public static NbtAddress[] getAllByAddress( String host, int type, String scope ) throws UnknownHostException { """ Retrieve all addresses of a host by it's address. NetBIOS hosts can have many ...
java
public static NbtAddress[] getAllByAddress( String host, int type, String scope ) throws UnknownHostException { return getAllByAddress( getByName( host, type, scope )); }
[ "public", "static", "NbtAddress", "[", "]", "getAllByAddress", "(", "String", "host", ",", "int", "type", ",", "String", "scope", ")", "throws", "UnknownHostException", "{", "return", "getAllByAddress", "(", "getByName", "(", "host", ",", "type", ",", "scope",...
Retrieve all addresses of a host by it's address. NetBIOS hosts can have many names for a given IP address. The name and IP address make the NetBIOS address. This provides a way to retrieve the other names for a host with the same IP address. See {@link #getByName} for a description of <code>type</code> and <code>scop...
[ "Retrieve", "all", "addresses", "of", "a", "host", "by", "it", "s", "address", ".", "NetBIOS", "hosts", "can", "have", "many", "names", "for", "a", "given", "IP", "address", ".", "The", "name", "and", "IP", "address", "make", "the", "NetBIOS", "address",...
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/netbios/NbtAddress.java#L499-L504
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreException.java
DatastoreException.translateAndThrow
static DatastoreException translateAndThrow(RetryHelperException ex) { """ Translate RetryHelperException to the DatastoreException that caused the error. This method will always throw an exception. @throws DatastoreException when {@code ex} was caused by a {@code DatastoreException} """ BaseServiceExc...
java
static DatastoreException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DatastoreException(UNKNOWN_CODE, ex.getMessage(), null, ex.getCause()); }
[ "static", "DatastoreException", "translateAndThrow", "(", "RetryHelperException", "ex", ")", "{", "BaseServiceException", ".", "translate", "(", "ex", ")", ";", "throw", "new", "DatastoreException", "(", "UNKNOWN_CODE", ",", "ex", ".", "getMessage", "(", ")", ",",...
Translate RetryHelperException to the DatastoreException that caused the error. This method will always throw an exception. @throws DatastoreException when {@code ex} was caused by a {@code DatastoreException}
[ "Translate", "RetryHelperException", "to", "the", "DatastoreException", "that", "caused", "the", "error", ".", "This", "method", "will", "always", "throw", "an", "exception", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreException.java#L65-L68
JodaOrg/joda-convert
src/main/java/org/joda/convert/StringConvert.java
StringConvert.tryRegister
private void tryRegister(String className, String fromStringMethodName) throws ClassNotFoundException { """ Tries to register a class using the standard toString/parse pattern. @param className the class name, not null @throws ClassNotFoundException if the class does not exist """ Class<?> cls = ...
java
private void tryRegister(String className, String fromStringMethodName) throws ClassNotFoundException { Class<?> cls = loadType(className); registerMethods(cls, "toString", fromStringMethodName); }
[ "private", "void", "tryRegister", "(", "String", "className", ",", "String", "fromStringMethodName", ")", "throws", "ClassNotFoundException", "{", "Class", "<", "?", ">", "cls", "=", "loadType", "(", "className", ")", ";", "registerMethods", "(", "cls", ",", "...
Tries to register a class using the standard toString/parse pattern. @param className the class name, not null @throws ClassNotFoundException if the class does not exist
[ "Tries", "to", "register", "a", "class", "using", "the", "standard", "toString", "/", "parse", "pattern", "." ]
train
https://github.com/JodaOrg/joda-convert/blob/266bd825f4550590d5dafdf4225c548559e0633b/src/main/java/org/joda/convert/StringConvert.java#L387-L390
joniles/mpxj
src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java
ProjectTreeController.addCalendar
private void addCalendar(MpxjTreeNode parentNode, final ProjectCalendar calendar) { """ Add a calendar node. @param parentNode parent node @param calendar calendar """ MpxjTreeNode calendarNode = new MpxjTreeNode(calendar, CALENDAR_EXCLUDED_METHODS) { @Override public String toString()...
java
private void addCalendar(MpxjTreeNode parentNode, final ProjectCalendar calendar) { MpxjTreeNode calendarNode = new MpxjTreeNode(calendar, CALENDAR_EXCLUDED_METHODS) { @Override public String toString() { return calendar.getName(); } }; parentNode.add(ca...
[ "private", "void", "addCalendar", "(", "MpxjTreeNode", "parentNode", ",", "final", "ProjectCalendar", "calendar", ")", "{", "MpxjTreeNode", "calendarNode", "=", "new", "MpxjTreeNode", "(", "calendar", ",", "CALENDAR_EXCLUDED_METHODS", ")", "{", "@", "Override", "pub...
Add a calendar node. @param parentNode parent node @param calendar calendar
[ "Add", "a", "calendar", "node", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/explorer/ProjectTreeController.java#L257-L283
larsga/Duke
duke-core/src/main/java/no/priv/garshol/duke/PropertyImpl.java
PropertyImpl.compare
public double compare(String v1, String v2) { """ Returns the probability that the records v1 and v2 came from represent the same entity, based on high and low probability settings etc. """ // FIXME: it should be possible here to say that, actually, we // didn't learn anything from comparing these tw...
java
public double compare(String v1, String v2) { // FIXME: it should be possible here to say that, actually, we // didn't learn anything from comparing these two values, so that // probability is set to 0.5. if (comparator == null) return 0.5; // we ignore properties with no comparator // first...
[ "public", "double", "compare", "(", "String", "v1", ",", "String", "v2", ")", "{", "// FIXME: it should be possible here to say that, actually, we", "// didn't learn anything from comparing these two values, so that", "// probability is set to 0.5.", "if", "(", "comparator", "==", ...
Returns the probability that the records v1 and v2 came from represent the same entity, based on high and low probability settings etc.
[ "Returns", "the", "probability", "that", "the", "records", "v1", "and", "v2", "came", "from", "represent", "the", "same", "entity", "based", "on", "high", "and", "low", "probability", "settings", "etc", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/PropertyImpl.java#L121-L155
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/Mapper.java
Mapper.keyAndValueNotNull
@SuppressWarnings("unchecked") public Mapper<K, V> keyAndValueNotNull() { """ Add a constraint that verifies that neither the key nor the value is null. If either is null, a {@link NullPointerException} is thrown. @return """ return addConstraint((MapConstraint<K, V>) MapConstraints.notNull()); }
java
@SuppressWarnings("unchecked") public Mapper<K, V> keyAndValueNotNull() { return addConstraint((MapConstraint<K, V>) MapConstraints.notNull()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Mapper", "<", "K", ",", "V", ">", "keyAndValueNotNull", "(", ")", "{", "return", "addConstraint", "(", "(", "MapConstraint", "<", "K", ",", "V", ">", ")", "MapConstraints", ".", "notNull", "(",...
Add a constraint that verifies that neither the key nor the value is null. If either is null, a {@link NullPointerException} is thrown. @return
[ "Add", "a", "constraint", "that", "verifies", "that", "neither", "the", "key", "nor", "the", "value", "is", "null", ".", "If", "either", "is", "null", "a", "{", "@link", "NullPointerException", "}", "is", "thrown", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/Mapper.java#L113-L116
puniverse/galaxy
src/main/java/co/paralleluniverse/galaxy/Grid.java
Grid.getInstance
public static Grid getInstance(String configFile, Properties properties) throws InterruptedException { """ Retrieves the grid instance, as defined in the given configuration file. @param configFile The name of the configuration file containing the grid definition. @param properties A {@link Properties Properti...
java
public static Grid getInstance(String configFile, Properties properties) throws InterruptedException { return getInstance(configFile == null ? null : new FileSystemResource(configFile), (Object) properties); }
[ "public", "static", "Grid", "getInstance", "(", "String", "configFile", ",", "Properties", "properties", ")", "throws", "InterruptedException", "{", "return", "getInstance", "(", "configFile", "==", "null", "?", "null", ":", "new", "FileSystemResource", "(", "conf...
Retrieves the grid instance, as defined in the given configuration file. @param configFile The name of the configuration file containing the grid definition. @param properties A {@link Properties Properties} object containing the grid's properties to be injected into placeholders in the configuration file. This parame...
[ "Retrieves", "the", "grid", "instance", "as", "defined", "in", "the", "given", "configuration", "file", "." ]
train
https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/galaxy/Grid.java#L73-L75
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/DescribeIdentityPoolResult.java
DescribeIdentityPoolResult.withSupportedLoginProviders
public DescribeIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { """ <p> Optional key:value pairs mapping provider names to provider app IDs. </p> @param supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs. @return...
java
public DescribeIdentityPoolResult withSupportedLoginProviders(java.util.Map<String, String> supportedLoginProviders) { setSupportedLoginProviders(supportedLoginProviders); return this; }
[ "public", "DescribeIdentityPoolResult", "withSupportedLoginProviders", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "supportedLoginProviders", ")", "{", "setSupportedLoginProviders", "(", "supportedLoginProviders", ")", ";", "return", "this",...
<p> Optional key:value pairs mapping provider names to provider app IDs. </p> @param supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Optional", "key", ":", "value", "pairs", "mapping", "provider", "names", "to", "provider", "app", "IDs", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/DescribeIdentityPoolResult.java#L252-L255
microfocus-idol/java-parametric-databases
hod/src/main/java/com/hp/autonomy/hod/databases/AbstractResourceMapper.java
AbstractResourceMapper.databaseForResource
protected Database databaseForResource(final TokenProxy<?, TokenType.Simple> tokenProxy, final Resource resource, final String domain) throws HodErrorException { """ Converts the given resource name to a database @param tokenProxy The token proxy to use to retrieve parametric fields @param resource The resource ...
java
protected Database databaseForResource(final TokenProxy<?, TokenType.Simple> tokenProxy, final Resource resource, final String domain) throws HodErrorException { final ResourceIdentifier resourceIdentifier = new ResourceIdentifier(domain, resource.getResource()); final Set<String> parametricFields; ...
[ "protected", "Database", "databaseForResource", "(", "final", "TokenProxy", "<", "?", ",", "TokenType", ".", "Simple", ">", "tokenProxy", ",", "final", "Resource", "resource", ",", "final", "String", "domain", ")", "throws", "HodErrorException", "{", "final", "R...
Converts the given resource name to a database @param tokenProxy The token proxy to use to retrieve parametric fields @param resource The resource @param domain The domain of the resource @return A database representation of the resource @throws HodErrorException
[ "Converts", "the", "given", "resource", "name", "to", "a", "database" ]
train
https://github.com/microfocus-idol/java-parametric-databases/blob/378a246a1857f911587106241712d16c2e118af2/hod/src/main/java/com/hp/autonomy/hod/databases/AbstractResourceMapper.java#L36-L54
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
AbstractHttp2ConnectionHandlerBuilder.codec
protected B codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) { """ Sets the {@link Http2ConnectionDecoder} and {@link Http2ConnectionEncoder} to use. """ enforceConstraint("codec", "server", isServer); enforceConstraint("codec", "maxReservedStreams", maxReservedStreams); ...
java
protected B codec(Http2ConnectionDecoder decoder, Http2ConnectionEncoder encoder) { enforceConstraint("codec", "server", isServer); enforceConstraint("codec", "maxReservedStreams", maxReservedStreams); enforceConstraint("codec", "connection", connection); enforceConstraint("codec", "fram...
[ "protected", "B", "codec", "(", "Http2ConnectionDecoder", "decoder", ",", "Http2ConnectionEncoder", "encoder", ")", "{", "enforceConstraint", "(", "\"codec\"", ",", "\"server\"", ",", "isServer", ")", ";", "enforceConstraint", "(", "\"codec\"", ",", "\"maxReservedStre...
Sets the {@link Http2ConnectionDecoder} and {@link Http2ConnectionEncoder} to use.
[ "Sets", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java#L254-L274
pandzel/RobotsTxt
src/main/java/com/panforge/robotstxt/RobotsTxtReader.java
RobotsTxtReader.parseEntry
private Entry parseEntry(String line) throws IOException { """ Parses line into entry. <p> Skip empty lines. Skip comments. Skip invalid lines. @param line line to parse @return entry or <code>null</code> if skipped @throws IOException parsing line fails """ line = StringUtils.trimToEmpty(line); ...
java
private Entry parseEntry(String line) throws IOException { line = StringUtils.trimToEmpty(line); if (line.startsWith("#")) { return null; } int colonIndex = line.indexOf(":"); if (colonIndex < 0) { return null; } String key = StringUtils.trimToNull(line.substring(0, colonIndex)...
[ "private", "Entry", "parseEntry", "(", "String", "line", ")", "throws", "IOException", "{", "line", "=", "StringUtils", ".", "trimToEmpty", "(", "line", ")", ";", "if", "(", "line", ".", "startsWith", "(", "\"#\"", ")", ")", "{", "return", "null", ";", ...
Parses line into entry. <p> Skip empty lines. Skip comments. Skip invalid lines. @param line line to parse @return entry or <code>null</code> if skipped @throws IOException parsing line fails
[ "Parses", "line", "into", "entry", ".", "<p", ">", "Skip", "empty", "lines", ".", "Skip", "comments", ".", "Skip", "invalid", "lines", "." ]
train
https://github.com/pandzel/RobotsTxt/blob/f5291d21675c87a97c0e77c37453cc112f8a12a9/src/main/java/com/panforge/robotstxt/RobotsTxtReader.java#L156-L180
ios-driver/ios-driver
server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java
SimulatorSettings.setVariation
public void setVariation(DeviceType device, DeviceVariation variation, String desiredSDKVersion) throws WebDriverException { """ update the preference to have the simulator start in the correct mode ( ie retina vs normal, iphone screen size ). """ deviceName = AppleMagicString.getSimulateDeviceValue...
java
public void setVariation(DeviceType device, DeviceVariation variation, String desiredSDKVersion) throws WebDriverException { deviceName = AppleMagicString.getSimulateDeviceValue(device, variation, desiredSDKVersion, instrumentsVersion); setDefaultSimulatorPreference("SimulateDevice", deviceName); Str...
[ "public", "void", "setVariation", "(", "DeviceType", "device", ",", "DeviceVariation", "variation", ",", "String", "desiredSDKVersion", ")", "throws", "WebDriverException", "{", "deviceName", "=", "AppleMagicString", ".", "getSimulateDeviceValue", "(", "device", ",", ...
update the preference to have the simulator start in the correct mode ( ie retina vs normal, iphone screen size ).
[ "update", "the", "preference", "to", "have", "the", "simulator", "start", "in", "the", "correct", "mode", "(", "ie", "retina", "vs", "normal", "iphone", "screen", "size", ")", "." ]
train
https://github.com/ios-driver/ios-driver/blob/a9744419508d970fbb1ce18e4326cc624b237c8b/server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java#L178-L191
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetRollingUpgradesInner.java
VirtualMachineScaleSetRollingUpgradesInner.startOSUpgrade
public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, String vmScaleSetName) { """ Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected....
java
public OperationStatusResponseInner startOSUpgrade(String resourceGroupName, String vmScaleSetName) { return startOSUpgradeWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "startOSUpgrade", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "startOSUpgradeWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "toBlocking", "(", ")", ...
Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. ...
[ "Starts", "a", "rolling", "upgrade", "to", "move", "all", "virtual", "machine", "scale", "set", "instances", "to", "the", "latest", "available", "Platform", "Image", "OS", "version", ".", "Instances", "which", "are", "already", "running", "the", "latest", "ava...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetRollingUpgradesInner.java#L243-L245
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java
ClientConfig.setProperty
public ClientConfig setProperty(String name, String value) { """ Sets the value of a named property. @param name property name @param value value of the property @return configured {@link com.hazelcast.client.config.ClientConfig} for chaining """ properties.put(name, value); return this; ...
java
public ClientConfig setProperty(String name, String value) { properties.put(name, value); return this; }
[ "public", "ClientConfig", "setProperty", "(", "String", "name", ",", "String", "value", ")", "{", "properties", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Sets the value of a named property. @param name property name @param value value of the property @return configured {@link com.hazelcast.client.config.ClientConfig} for chaining
[ "Sets", "the", "value", "of", "a", "named", "property", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java#L218-L221
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java
CurrencyHelper.getRounded
@Nonnull public static BigDecimal getRounded (@Nullable final ECurrency eCurrency, @Nonnull final BigDecimal aValue) { """ Get the passed value rounded to the appropriate number of fraction digits, based on this currencies default fraction digits.<br> The default scaling of this currency is used. @param eCu...
java
@Nonnull public static BigDecimal getRounded (@Nullable final ECurrency eCurrency, @Nonnull final BigDecimal aValue) { ValueEnforcer.notNull (aValue, "Value"); final PerCurrencySettings aPCS = getSettings (eCurrency); return aValue.setScale (aPCS.getScale (), aPCS.getRoundingMode ()); }
[ "@", "Nonnull", "public", "static", "BigDecimal", "getRounded", "(", "@", "Nullable", "final", "ECurrency", "eCurrency", ",", "@", "Nonnull", "final", "BigDecimal", "aValue", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aValue", ",", "\"Value\"", ")", ";",...
Get the passed value rounded to the appropriate number of fraction digits, based on this currencies default fraction digits.<br> The default scaling of this currency is used. @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param aValue The value t...
[ "Get", "the", "passed", "value", "rounded", "to", "the", "appropriate", "number", "of", "fraction", "digits", "based", "on", "this", "currencies", "default", "fraction", "digits", ".", "<br", ">", "The", "default", "scaling", "of", "this", "currency", "is", ...
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java#L661-L667
Inbot/inbot-utils
src/main/java/io/inbot/utils/SimpleStringTrie.java
SimpleStringTrie.from
public static SimpleStringTrie from(Map<String,?> map) { """ Useful if you want to build a trie for an existing map so you can figure out a matching prefix that has an entry @param map a map @return a SimpleStringTrie for the map. """ SimpleStringTrie st = new SimpleStringTrie(); map.keySet()...
java
public static SimpleStringTrie from(Map<String,?> map) { SimpleStringTrie st = new SimpleStringTrie(); map.keySet().forEach(key -> st.add(key)); return st; }
[ "public", "static", "SimpleStringTrie", "from", "(", "Map", "<", "String", ",", "?", ">", "map", ")", "{", "SimpleStringTrie", "st", "=", "new", "SimpleStringTrie", "(", ")", ";", "map", ".", "keySet", "(", ")", ".", "forEach", "(", "key", "->", "st", ...
Useful if you want to build a trie for an existing map so you can figure out a matching prefix that has an entry @param map a map @return a SimpleStringTrie for the map.
[ "Useful", "if", "you", "want", "to", "build", "a", "trie", "for", "an", "existing", "map", "so", "you", "can", "figure", "out", "a", "matching", "prefix", "that", "has", "an", "entry" ]
train
https://github.com/Inbot/inbot-utils/blob/3112bc08d4237e95fe0f8a219a5bbceb390d0505/src/main/java/io/inbot/utils/SimpleStringTrie.java#L55-L59
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java
DebugPhaseListener.createFieldDebugInfo
public static void createFieldDebugInfo(FacesContext facesContext, final String field, Object oldValue, Object newValue, String clientId) { """ Creates the field debug-info for the given field, which changed from oldValue to newValue in the given component. ATTENTION: this method is dupl...
java
public static void createFieldDebugInfo(FacesContext facesContext, final String field, Object oldValue, Object newValue, String clientId) { if ((oldValue == null && newValue == null) || (oldValue != null && oldValue.equals(newValue))) { // nothing...
[ "public", "static", "void", "createFieldDebugInfo", "(", "FacesContext", "facesContext", ",", "final", "String", "field", ",", "Object", "oldValue", ",", "Object", "newValue", ",", "String", "clientId", ")", "{", "if", "(", "(", "oldValue", "==", "null", "&&",...
Creates the field debug-info for the given field, which changed from oldValue to newValue in the given component. ATTENTION: this method is duplicate in UIInput. @param facesContext @param field @param oldValue @param newValue @param clientId
[ "Creates", "the", "field", "debug", "-", "info", "for", "the", "given", "field", "which", "changed", "from", "oldValue", "to", "newValue", "in", "the", "given", "component", ".", "ATTENTION", ":", "this", "method", "is", "duplicate", "in", "UIInput", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ui/DebugPhaseListener.java#L112-L154
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/xml/XmlIO.java
XmlIO.load
public static AnnotationMappingInfo load(final Reader reader) throws XmlOperateException { """ XMLを読み込み、{@link AnnotationMappingInfo}として取得する。 @since 0.5 @param reader @return @throws XmlOperateException XMLの読み込みに失敗した場合。 @throws IllegalArgumentException in is null. """ ArgUtils.notNull(reader, "re...
java
public static AnnotationMappingInfo load(final Reader reader) throws XmlOperateException { ArgUtils.notNull(reader, "reader"); final AnnotationMappingInfo xmlInfo; try { xmlInfo = JAXB.unmarshal(reader, AnnotationMappingInfo.class); } catch (DataBindi...
[ "public", "static", "AnnotationMappingInfo", "load", "(", "final", "Reader", "reader", ")", "throws", "XmlOperateException", "{", "ArgUtils", ".", "notNull", "(", "reader", ",", "\"reader\"", ")", ";", "final", "AnnotationMappingInfo", "xmlInfo", ";", "try", "{", ...
XMLを読み込み、{@link AnnotationMappingInfo}として取得する。 @since 0.5 @param reader @return @throws XmlOperateException XMLの読み込みに失敗した場合。 @throws IllegalArgumentException in is null.
[ "XMLを読み込み、", "{" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/xml/XmlIO.java#L62-L74
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java
ConsoleMenu.addMenuItem
public void addMenuItem(final String menuDisplay, final String methodName, final boolean repeat) { """ add an entry in the menu, sequentially @param menuDisplay how the entry will be displayed in the menu @param methodName name of the public method @param repeat call back for repeat """ menu.ad...
java
public void addMenuItem(final String menuDisplay, final String methodName, final boolean repeat) { menu.add(menuDisplay); methods.add(methodName); askForRepeat.add(Boolean.valueOf(repeat)); }
[ "public", "void", "addMenuItem", "(", "final", "String", "menuDisplay", ",", "final", "String", "methodName", ",", "final", "boolean", "repeat", ")", "{", "menu", ".", "add", "(", "menuDisplay", ")", ";", "methods", ".", "add", "(", "methodName", ")", ";",...
add an entry in the menu, sequentially @param menuDisplay how the entry will be displayed in the menu @param methodName name of the public method @param repeat call back for repeat
[ "add", "an", "entry", "in", "the", "menu", "sequentially" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java#L94-L98
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.updateServiceInstanceInternalStatus
public void updateServiceInstanceInternalStatus(String serviceName, String instanceId, OperationalStatus status) { """ Update ServiceInstance internal status. @param serviceName the service name. @param instanceId the instanceId. @param status the OeperationalStatus. """ ProtocolHeader header =...
java
public void updateServiceInstanceInternalStatus(String serviceName, String instanceId, OperationalStatus status){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.UpdateServiceInstanceInternalStatus); UpdateServiceInstanceInternalStatusProtocol protocol = new UpdateServ...
[ "public", "void", "updateServiceInstanceInternalStatus", "(", "String", "serviceName", ",", "String", "instanceId", ",", "OperationalStatus", "status", ")", "{", "ProtocolHeader", "header", "=", "new", "ProtocolHeader", "(", ")", ";", "header", ".", "setType", "(", ...
Update ServiceInstance internal status. @param serviceName the service name. @param instanceId the instanceId. @param status the OeperationalStatus.
[ "Update", "ServiceInstance", "internal", "status", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L452-L458
line/armeria
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
ServerBuilder.annotatedService
public ServerBuilder annotatedService(String pathPrefix, Object service, Iterable<?> exceptionHandlersAndConverters) { """ Binds the specified annotated service object under the specified path prefix. @param exceptionHandlersAndConverters an iterable object of {@link Ex...
java
public ServerBuilder annotatedService(String pathPrefix, Object service, Iterable<?> exceptionHandlersAndConverters) { return annotatedService(pathPrefix, service, Function.identity(), exceptionHandlersAndConverters); }
[ "public", "ServerBuilder", "annotatedService", "(", "String", "pathPrefix", ",", "Object", "service", ",", "Iterable", "<", "?", ">", "exceptionHandlersAndConverters", ")", "{", "return", "annotatedService", "(", "pathPrefix", ",", "service", ",", "Function", ".", ...
Binds the specified annotated service object under the specified path prefix. @param exceptionHandlersAndConverters an iterable object of {@link ExceptionHandlerFunction}, {@link RequestConverterFunction} and/or {@link ResponseConverterFunction}
[ "Binds", "the", "specified", "annotated", "service", "object", "under", "the", "specified", "path", "prefix", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java#L1067-L1070
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveUtils.java
HiveUtils.getPartitions
public static List<Partition> getPartitions(IMetaStoreClient client, Table table, Optional<String> filter) throws IOException { """ For backward compatibility when PathFilter is injected as a parameter. @param client @param table @param filter @return @throws IOException """ return getPartitions...
java
public static List<Partition> getPartitions(IMetaStoreClient client, Table table, Optional<String> filter) throws IOException { return getPartitions(client, table, filter, Optional.<HivePartitionExtendedFilter>absent()); }
[ "public", "static", "List", "<", "Partition", ">", "getPartitions", "(", "IMetaStoreClient", "client", ",", "Table", "table", ",", "Optional", "<", "String", ">", "filter", ")", "throws", "IOException", "{", "return", "getPartitions", "(", "client", ",", "tabl...
For backward compatibility when PathFilter is injected as a parameter. @param client @param table @param filter @return @throws IOException
[ "For", "backward", "compatibility", "when", "PathFilter", "is", "injected", "as", "a", "parameter", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveUtils.java#L116-L119
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/constraint/CSpread.java
CSpread.precedenceIfOverlap
private static void precedenceIfOverlap(ReconfigurationProblem rp, Slice d, Slice c) { """ Establish the precedence constraint {@code c.getEnd() <= d.getStart()} if the two slices may overlap. """ Model csp = rp.getModel(); //No need to place the constraints if the slices do not have a chance t...
java
private static void precedenceIfOverlap(ReconfigurationProblem rp, Slice d, Slice c) { Model csp = rp.getModel(); //No need to place the constraints if the slices do not have a chance to overlap if (!(c.getHoster().isInstantiated() && !d.getHoster().contains(c.getHoster().getValue())) ...
[ "private", "static", "void", "precedenceIfOverlap", "(", "ReconfigurationProblem", "rp", ",", "Slice", "d", ",", "Slice", "c", ")", "{", "Model", "csp", "=", "rp", ".", "getModel", "(", ")", ";", "//No need to place the constraints if the slices do not have a chance t...
Establish the precedence constraint {@code c.getEnd() <= d.getStart()} if the two slices may overlap.
[ "Establish", "the", "precedence", "constraint", "{" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/constraint/CSpread.java#L118-L129
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.deposit_depositId_details_depositDetailId_GET
public OvhDepositDetail deposit_depositId_details_depositDetailId_GET(String depositId, String depositDetailId) throws IOException { """ Get this object properties REST: GET /me/deposit/{depositId}/details/{depositDetailId} @param depositId [required] @param depositDetailId [required] """ String qPath =...
java
public OvhDepositDetail deposit_depositId_details_depositDetailId_GET(String depositId, String depositDetailId) throws IOException { String qPath = "/me/deposit/{depositId}/details/{depositDetailId}"; StringBuilder sb = path(qPath, depositId, depositDetailId); String resp = exec(qPath, "GET", sb.toString(), null)...
[ "public", "OvhDepositDetail", "deposit_depositId_details_depositDetailId_GET", "(", "String", "depositId", ",", "String", "depositDetailId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/deposit/{depositId}/details/{depositDetailId}\"", ";", "StringBuilder", ...
Get this object properties REST: GET /me/deposit/{depositId}/details/{depositDetailId} @param depositId [required] @param depositDetailId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3278-L3283
SnappyDataInc/snappydata
launcher/src/main/java/io/snappydata/tools/QuickLauncher.java
QuickLauncher.readStatus
private void readStatus(boolean emptyForMissing, final Path statusFile) { """ Returns the <code>Status</code> of the node. An empty status is returned if status file is missing and <code>emptyForMissing</code> argument is true else null is returned. """ this.status = null; if (Files.exists(statusFile...
java
private void readStatus(boolean emptyForMissing, final Path statusFile) { this.status = null; if (Files.exists(statusFile)) { // try some number of times if dsMsg is null for (int i = 1; i <= 3; i++) { this.status = Status.spinRead(baseName, statusFile); if (this.status.dsMsg != null...
[ "private", "void", "readStatus", "(", "boolean", "emptyForMissing", ",", "final", "Path", "statusFile", ")", "{", "this", ".", "status", "=", "null", ";", "if", "(", "Files", ".", "exists", "(", "statusFile", ")", ")", "{", "// try some number of times if dsMs...
Returns the <code>Status</code> of the node. An empty status is returned if status file is missing and <code>emptyForMissing</code> argument is true else null is returned.
[ "Returns", "the", "<code", ">", "Status<", "/", "code", ">", "of", "the", "node", ".", "An", "empty", "status", "is", "returned", "if", "status", "file", "is", "missing", "and", "<code", ">", "emptyForMissing<", "/", "code", ">", "argument", "is", "true"...
train
https://github.com/SnappyDataInc/snappydata/blob/96fe3e37e9f8d407ab68ef9e394083960acad21d/launcher/src/main/java/io/snappydata/tools/QuickLauncher.java#L440-L452
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.toWriter
public void toWriter(Writer writer, Properties outputProperties) throws TransformerException { """ Serialize the XML document to the given writer using the default {@link TransformerFactory} and {@link Transformer} classes. If output options are provided, these options are provided to the {@link Transfo...
java
public void toWriter(Writer writer, Properties outputProperties) throws TransformerException { this.toWriter(true, writer, outputProperties); }
[ "public", "void", "toWriter", "(", "Writer", "writer", ",", "Properties", "outputProperties", ")", "throws", "TransformerException", "{", "this", ".", "toWriter", "(", "true", ",", "writer", ",", "outputProperties", ")", ";", "}" ]
Serialize the XML document to the given writer using the default {@link TransformerFactory} and {@link Transformer} classes. If output options are provided, these options are provided to the {@link Transformer} serializer. @param writer a writer to which the serialized document is written. @param outputProperties sett...
[ "Serialize", "the", "XML", "document", "to", "the", "given", "writer", "using", "the", "default", "{", "@link", "TransformerFactory", "}", "and", "{", "@link", "Transformer", "}", "classes", ".", "If", "output", "options", "are", "provided", "these", "options"...
train
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L1342-L1345
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeMapData.java
UnsafeMapData.pointTo
public void pointTo(Object baseObject, long baseOffset, int sizeInBytes) { """ Update this UnsafeMapData to point to different backing data. @param baseObject the base object @param baseOffset the offset within the base object @param sizeInBytes the size of this map's backing data, in bytes """ // Rea...
java
public void pointTo(Object baseObject, long baseOffset, int sizeInBytes) { // Read the numBytes of key array from the first 8 bytes. final long keyArraySize = Platform.getLong(baseObject, baseOffset); assert keyArraySize >= 0 : "keyArraySize (" + keyArraySize + ") should >= 0"; assert keyArraySize <= In...
[ "public", "void", "pointTo", "(", "Object", "baseObject", ",", "long", "baseOffset", ",", "int", "sizeInBytes", ")", "{", "// Read the numBytes of key array from the first 8 bytes.", "final", "long", "keyArraySize", "=", "Platform", ".", "getLong", "(", "baseObject", ...
Update this UnsafeMapData to point to different backing data. @param baseObject the base object @param baseOffset the offset within the base object @param sizeInBytes the size of this map's backing data, in bytes
[ "Update", "this", "UnsafeMapData", "to", "point", "to", "different", "backing", "data", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeMapData.java#L81-L98
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java
JDBC4CallableStatement.setRowId
@Override public void setRowId(String parameterName, RowId x) throws SQLException { """ Sets the designated parameter to the given java.sql.RowId object. """ checkClosed(); throw SQLError.noSupport(); }
java
@Override public void setRowId(String parameterName, RowId x) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setRowId", "(", "String", "parameterName", ",", "RowId", "x", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.sql.RowId object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "RowId", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java#L855-L860
VoltDB/voltdb
src/frontend/org/voltdb/types/GeographyPointValue.java
GeographyPointValue.unflattenFromBuffer
public static GeographyPointValue unflattenFromBuffer(ByteBuffer inBuffer, int offset) { """ Deserializes a point from a ByteBuffer, at an absolute offset. @param inBuffer The ByteBuffer from which to read the bytes for a point. @param offset Absolute offset of point data in buffer. @return A new instance o...
java
public static GeographyPointValue unflattenFromBuffer(ByteBuffer inBuffer, int offset) { double lng = inBuffer.getDouble(offset); double lat = inBuffer.getDouble(offset + BYTES_IN_A_COORD); if (lat == 360.0 && lng == 360.0) { // This is a null point. return null; ...
[ "public", "static", "GeographyPointValue", "unflattenFromBuffer", "(", "ByteBuffer", "inBuffer", ",", "int", "offset", ")", "{", "double", "lng", "=", "inBuffer", ".", "getDouble", "(", "offset", ")", ";", "double", "lat", "=", "inBuffer", ".", "getDouble", "(...
Deserializes a point from a ByteBuffer, at an absolute offset. @param inBuffer The ByteBuffer from which to read the bytes for a point. @param offset Absolute offset of point data in buffer. @return A new instance of GeographyPointValue.
[ "Deserializes", "a", "point", "from", "a", "ByteBuffer", "at", "an", "absolute", "offset", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyPointValue.java#L230-L239
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java
KeyStore.getKey
public final Key getKey(String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { """ Returns the key associated with the given alias, using the given password to recover it. The key must have been associated with the alias by a call to <c...
java
public final Key getKey(String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { if (!initialized) { throw new KeyStoreException("Uninitialized keystore"); } return keyStoreSpi.engineGetKey(alias, password)...
[ "public", "final", "Key", "getKey", "(", "String", "alias", ",", "char", "[", "]", "password", ")", "throws", "KeyStoreException", ",", "NoSuchAlgorithmException", ",", "UnrecoverableKeyException", "{", "if", "(", "!", "initialized", ")", "{", "throw", "new", ...
Returns the key associated with the given alias, using the given password to recover it. The key must have been associated with the alias by a call to <code>setKeyEntry</code>, or by a call to <code>setEntry</code> with a <code>PrivateKeyEntry</code> or <code>SecretKeyEntry</code>. @param alias the alias name @param ...
[ "Returns", "the", "key", "associated", "with", "the", "given", "alias", "using", "the", "given", "password", "to", "recover", "it", ".", "The", "key", "must", "have", "been", "associated", "with", "the", "alias", "by", "a", "call", "to", "<code", ">", "s...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java#L827-L835
apache/incubator-gobblin
gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/writer/AsyncHttpWriter.java
AsyncHttpWriter.onFailure
@Deprecated protected void onFailure(AsyncRequest<D, RQ> asyncRequest, Throwable throwable) { """ Callback on failing to send the asyncRequest @deprecated Use {@link #onFailure(AsyncRequest, DispatchException)} """ for (AsyncRequest.Thunk thunk: asyncRequest.getThunks()) { thunk.callback.onFailu...
java
@Deprecated protected void onFailure(AsyncRequest<D, RQ> asyncRequest, Throwable throwable) { for (AsyncRequest.Thunk thunk: asyncRequest.getThunks()) { thunk.callback.onFailure(throwable); } }
[ "@", "Deprecated", "protected", "void", "onFailure", "(", "AsyncRequest", "<", "D", ",", "RQ", ">", "asyncRequest", ",", "Throwable", "throwable", ")", "{", "for", "(", "AsyncRequest", ".", "Thunk", "thunk", ":", "asyncRequest", ".", "getThunks", "(", ")", ...
Callback on failing to send the asyncRequest @deprecated Use {@link #onFailure(AsyncRequest, DispatchException)}
[ "Callback", "on", "failing", "to", "send", "the", "asyncRequest" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/writer/AsyncHttpWriter.java#L167-L172
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java
ParameterParser._getToken
@Nullable private String _getToken (final boolean bQuoted) { """ A helper method to process the parsed token. This method removes leading and trailing blanks as well as enclosing quotation marks, when necessary. @param bQuoted <tt>true</tt> if quotation marks are expected, <tt>false</tt> otherwise. @retur...
java
@Nullable private String _getToken (final boolean bQuoted) { // Trim leading white spaces while (m_nIndex1 < m_nIndex2 && Character.isWhitespace (m_aChars[m_nIndex1])) { m_nIndex1++; } // Trim trailing white spaces while (m_nIndex2 > m_nIndex1 && Character.isWhitespace (m_aChars[m_nInd...
[ "@", "Nullable", "private", "String", "_getToken", "(", "final", "boolean", "bQuoted", ")", "{", "// Trim leading white spaces", "while", "(", "m_nIndex1", "<", "m_nIndex2", "&&", "Character", ".", "isWhitespace", "(", "m_aChars", "[", "m_nIndex1", "]", ")", ")"...
A helper method to process the parsed token. This method removes leading and trailing blanks as well as enclosing quotation marks, when necessary. @param bQuoted <tt>true</tt> if quotation marks are expected, <tt>false</tt> otherwise. @return the token
[ "A", "helper", "method", "to", "process", "the", "parsed", "token", ".", "This", "method", "removes", "leading", "and", "trailing", "blanks", "as", "well", "as", "enclosing", "quotation", "marks", "when", "necessary", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java#L102-L130
joachimvda/jtransfo
core/src/main/java/org/jtransfo/internal/ConverterHelper.java
ConverterHelper.getDefaultTypeConverter
TypeConverter getDefaultTypeConverter(Type toField, Type domainField) { """ Get the default type converter given the field types to convert between. @param toField transfer object field class @param domainField domain object field class @return type converter """ for (TypeConverter typeConverter :...
java
TypeConverter getDefaultTypeConverter(Type toField, Type domainField) { for (TypeConverter typeConverter : typeConvertersInOrder) { if (typeConverter.canConvert(toField, domainField)) { return typeConverter; } } return new NoConversionTypeConverter(); // d...
[ "TypeConverter", "getDefaultTypeConverter", "(", "Type", "toField", ",", "Type", "domainField", ")", "{", "for", "(", "TypeConverter", "typeConverter", ":", "typeConvertersInOrder", ")", "{", "if", "(", "typeConverter", ".", "canConvert", "(", "toField", ",", "dom...
Get the default type converter given the field types to convert between. @param toField transfer object field class @param domainField domain object field class @return type converter
[ "Get", "the", "default", "type", "converter", "given", "the", "field", "types", "to", "convert", "between", "." ]
train
https://github.com/joachimvda/jtransfo/blob/eb1c72b64b09d6f3b6212bd3f1579cac5c983ea8/core/src/main/java/org/jtransfo/internal/ConverterHelper.java#L400-L407
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFileToDirectory
public static boolean copyFileToDirectory(final File source, final File destinationDir) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { """ Copies the given source file to the given destination directory. @param source The source file to copy in the destination directory. @para...
java
public static boolean copyFileToDirectory(final File source, final File destinationDir) throws FileIsNotADirectoryException, IOException, FileIsADirectoryException { return copyFileToDirectory(source, destinationDir, true); }
[ "public", "static", "boolean", "copyFileToDirectory", "(", "final", "File", "source", ",", "final", "File", "destinationDir", ")", "throws", "FileIsNotADirectoryException", ",", "IOException", ",", "FileIsADirectoryException", "{", "return", "copyFileToDirectory", "(", ...
Copies the given source file to the given destination directory. @param source The source file to copy in the destination directory. @param destinationDir The destination directory. @return 's true if the file is copied to the destination directory, otherwise false. @throws FileIsNotADirectoryException Is thrown if ...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "directory", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L593-L597
Jasig/uPortal
uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java
PropertiesManager.getPropertyUntrimmed
public static String getPropertyUntrimmed(String name) throws MissingPropertyException { """ Returns the value of a property for a given name including whitespace trailing the property value, but not including whitespace leading the property value. An UndeclaredPortalException is thrown if the property cannot be...
java
public static String getPropertyUntrimmed(String name) throws MissingPropertyException { if (PropertiesManager.props == null) loadProps(); if (props == null) { boolean alreadyReported = registerMissingProperty(name); throw new MissingPropertyException(name, alreadyReported); ...
[ "public", "static", "String", "getPropertyUntrimmed", "(", "String", "name", ")", "throws", "MissingPropertyException", "{", "if", "(", "PropertiesManager", ".", "props", "==", "null", ")", "loadProps", "(", ")", ";", "if", "(", "props", "==", "null", ")", "...
Returns the value of a property for a given name including whitespace trailing the property value, but not including whitespace leading the property value. An UndeclaredPortalException is thrown if the property cannot be found. This method will never return null. @param name the name of the requested property @return ...
[ "Returns", "the", "value", "of", "a", "property", "for", "a", "given", "name", "including", "whitespace", "trailing", "the", "property", "value", "but", "not", "including", "whitespace", "leading", "the", "property", "value", ".", "An", "UndeclaredPortalException"...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-core/src/main/java/org/apereo/portal/properties/PropertiesManager.java#L127-L141
apache/flink
flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSerializationUtil.java
TypeSerializerSerializationUtil.tryReadSerializer
public static <T> TypeSerializer<T> tryReadSerializer(DataInputView in, ClassLoader userCodeClassLoader) throws IOException { """ Reads from a data input view a {@link TypeSerializer} that was previously written using {@link #writeSerializer(DataOutputView, TypeSerializer)}. <p>If deserialization fails for any...
java
public static <T> TypeSerializer<T> tryReadSerializer(DataInputView in, ClassLoader userCodeClassLoader) throws IOException { return tryReadSerializer(in, userCodeClassLoader, false); }
[ "public", "static", "<", "T", ">", "TypeSerializer", "<", "T", ">", "tryReadSerializer", "(", "DataInputView", "in", ",", "ClassLoader", "userCodeClassLoader", ")", "throws", "IOException", "{", "return", "tryReadSerializer", "(", "in", ",", "userCodeClassLoader", ...
Reads from a data input view a {@link TypeSerializer} that was previously written using {@link #writeSerializer(DataOutputView, TypeSerializer)}. <p>If deserialization fails for any reason (corrupted serializer bytes, serializer class no longer in classpath, serializer class no longer valid, etc.), an {@link IOExcepti...
[ "Reads", "from", "a", "data", "input", "view", "a", "{", "@link", "TypeSerializer", "}", "that", "was", "previously", "written", "using", "{", "@link", "#writeSerializer", "(", "DataOutputView", "TypeSerializer", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSerializationUtil.java#L86-L88
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.hasProperty
public static boolean hasProperty(ClassNode classNode, String propertyName) { """ Returns whether a classNode has the specified property or not @param classNode The ClassNode @param propertyName The name of the property @return true if the property exists in the ClassNode """ if (classNode == n...
java
public static boolean hasProperty(ClassNode classNode, String propertyName) { if (classNode == null || !StringUtils.hasText(propertyName)) { return false; } final MethodNode method = classNode.getMethod(GrailsNameUtils.getGetterName(propertyName), Parameter.EMPTY_ARRAY); if ...
[ "public", "static", "boolean", "hasProperty", "(", "ClassNode", "classNode", ",", "String", "propertyName", ")", "{", "if", "(", "classNode", "==", "null", "||", "!", "StringUtils", ".", "hasText", "(", "propertyName", ")", ")", "{", "return", "false", ";", ...
Returns whether a classNode has the specified property or not @param classNode The ClassNode @param propertyName The name of the property @return true if the property exists in the ClassNode
[ "Returns", "whether", "a", "classNode", "has", "the", "specified", "property", "or", "not" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L118-L138
craftercms/deployer
src/main/java/org/craftercms/deployer/utils/ConfigUtils.java
ConfigUtils.getIntegerProperty
public static Integer getIntegerProperty(Configuration config, String key) throws DeployerConfigurationException { """ Returns the specified Integer property from the configuration @param config the configuration @param key the key of the property @return the Integer value of the property, or null if not f...
java
public static Integer getIntegerProperty(Configuration config, String key) throws DeployerConfigurationException { return getIntegerProperty(config, key, null); }
[ "public", "static", "Integer", "getIntegerProperty", "(", "Configuration", "config", ",", "String", "key", ")", "throws", "DeployerConfigurationException", "{", "return", "getIntegerProperty", "(", "config", ",", "key", ",", "null", ")", ";", "}" ]
Returns the specified Integer property from the configuration @param config the configuration @param key the key of the property @return the Integer value of the property, or null if not found @throws DeployerConfigurationException if an error occurred
[ "Returns", "the", "specified", "Integer", "property", "from", "the", "configuration" ]
train
https://github.com/craftercms/deployer/blob/3ed446e3cc8af1055de2de6f871907f90ef27f63/src/main/java/org/craftercms/deployer/utils/ConfigUtils.java#L170-L172
filosganga/geogson
core/src/main/java/com/github/filosganga/geogson/model/Polygon.java
Polygon.of
public static Polygon of(LinearRing perimeter, Stream<LinearRing> holes) { """ Creates a Polygon from the given perimeter and holes. @param perimeter The perimeter {@link LinearRing}. @param holes The holes {@link LinearRing} Stream. @return Polygon """ return new Polygon(AreaPositions.builder(...
java
public static Polygon of(LinearRing perimeter, Stream<LinearRing> holes) { return new Polygon(AreaPositions.builder() .addLinearPosition(perimeter.positions()) .addLinearPositions(holes .map(LinearRing::positions)::iterator) .build()); ...
[ "public", "static", "Polygon", "of", "(", "LinearRing", "perimeter", ",", "Stream", "<", "LinearRing", ">", "holes", ")", "{", "return", "new", "Polygon", "(", "AreaPositions", ".", "builder", "(", ")", ".", "addLinearPosition", "(", "perimeter", ".", "posit...
Creates a Polygon from the given perimeter and holes. @param perimeter The perimeter {@link LinearRing}. @param holes The holes {@link LinearRing} Stream. @return Polygon
[ "Creates", "a", "Polygon", "from", "the", "given", "perimeter", "and", "holes", "." ]
train
https://github.com/filosganga/geogson/blob/f0c7b0adfecc174caa8a03a6c19d301c7a47d4a0/core/src/main/java/com/github/filosganga/geogson/model/Polygon.java#L76-L83
arquillian/arquillian-extension-warp
impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SecurityActions.java
SecurityActions.newInstance
static <T> T newInstance(final String className, final Class<?>[] argumentTypes, final Object[] arguments, final Class<T> expectedType) { """ Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation. @param className Full classname o...
java
static <T> T newInstance(final String className, final Class<?>[] argumentTypes, final Object[] arguments, final Class<T> expectedType) { if (className == null) { throw new IllegalArgumentException("ClassName must be specified"); } if (argumentTypes == null) { thr...
[ "static", "<", "T", ">", "T", "newInstance", "(", "final", "String", "className", ",", "final", "Class", "<", "?", ">", "[", "]", "argumentTypes", ",", "final", "Object", "[", "]", "arguments", ",", "final", "Class", "<", "T", ">", "expectedType", ")",...
Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation. @param className Full classname of class to create @param argumentTypes The constructor argument types @param arguments The constructor arguments @return a new instance @throws IllegalArgume...
[ "Create", "a", "new", "instance", "by", "finding", "a", "constructor", "that", "matches", "the", "argumentTypes", "signature", "using", "the", "arguments", "for", "instantiation", "." ]
train
https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/impl/src/main/java/org/jboss/arquillian/warp/impl/client/execution/SecurityActions.java#L120-L150
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/utils/Utils.java
Utils.newTypeInstance
@SuppressWarnings("unchecked") public static <T> T newTypeInstance(String className, Class<T> returnClass) { """ Creates a new instance of the given class name. @param <T> the type parameter @param className the class object for which a new instance should be created. @param returnClass the retu...
java
@SuppressWarnings("unchecked") public static <T> T newTypeInstance(String className, Class<T> returnClass) { try { Class<T> clazz = (Class<T>) Class.forName(className); return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException | ClassNotFoundExcepti...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "newTypeInstance", "(", "String", "className", ",", "Class", "<", "T", ">", "returnClass", ")", "{", "try", "{", "Class", "<", "T", ">", "clazz", "=", "(", "Cla...
Creates a new instance of the given class name. @param <T> the type parameter @param className the class object for which a new instance should be created. @param returnClass the return class @return the new instance of class clazz.
[ "Creates", "a", "new", "instance", "of", "the", "given", "class", "name", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/utils/Utils.java#L96-L104
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, T4, T5, R> Func5<T1, T2, T3, T4, T5, R> toFunc( final Action5<T1, T2, T3, T4, T5> action, final R result) { """ Converts an {@link Action5} to a function that calls the action and returns a specified value. @param action the {@link Action5} to convert @param result the va...
java
public static <T1, T2, T3, T4, T5, R> Func5<T1, T2, T3, T4, T5, R> toFunc( final Action5<T1, T2, T3, T4, T5> action, final R result) { return new Func5<T1, T2, T3, T4, T5, R>() { @Override public R call(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { action.call(t1, t2, ...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "R", ">", "Func5", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "R", ">", "toFunc", "(", "final", "Action5", "<", "T1", ",", "T2", ",", "T3", "...
Converts an {@link Action5} to a function that calls the action and returns a specified value. @param action the {@link Action5} to convert @param result the value to return from the function call @return a {@link Func5} that calls {@code action} and returns {@code result}
[ "Converts", "an", "{", "@link", "Action5", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "a", "specified", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L287-L296
alkacon/opencms-core
src/org/opencms/jsp/CmsJspNavBuilder.java
CmsJspNavBuilder.getNavigationForResource
public CmsJspNavElement getNavigationForResource(String sitePath) { """ Returns a navigation element for the named resource.<p> @param sitePath the resource name to get the navigation information for, must be a full path name, e.g. "/docs/index.html" @return a navigation element for the given resource "...
java
public CmsJspNavElement getNavigationForResource(String sitePath) { CmsJspNavElement result = getNavigationForResource(sitePath, CmsResourceFilter.DEFAULT, false); if ((result != null) && (result.getNavContext() == null)) { result.setNavContext(new NavContext(this, Visibility.navigation, Cm...
[ "public", "CmsJspNavElement", "getNavigationForResource", "(", "String", "sitePath", ")", "{", "CmsJspNavElement", "result", "=", "getNavigationForResource", "(", "sitePath", ",", "CmsResourceFilter", ".", "DEFAULT", ",", "false", ")", ";", "if", "(", "(", "result",...
Returns a navigation element for the named resource.<p> @param sitePath the resource name to get the navigation information for, must be a full path name, e.g. "/docs/index.html" @return a navigation element for the given resource
[ "Returns", "a", "navigation", "element", "for", "the", "named", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspNavBuilder.java#L589-L596
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java
ImageHandlerBuilder.cropToAspect
public ImageHandlerBuilder cropToAspect(int width, int height) { """ Crop the image to a given aspect. <br> The aspect is the desired proportions of the image, which will be kept when cropping. <p> The usecase for this method is when you have an image, that you want to crop into a certain proportion, but want...
java
public ImageHandlerBuilder cropToAspect(int width, int height) { int original_width = image.getWidth(); int original_height = image.getHeight(); int bound_width = width; int bound_height = height; int new_width = original_width; int new_height = original_height; ...
[ "public", "ImageHandlerBuilder", "cropToAspect", "(", "int", "width", ",", "int", "height", ")", "{", "int", "original_width", "=", "image", ".", "getWidth", "(", ")", ";", "int", "original_height", "=", "image", ".", "getHeight", "(", ")", ";", "int", "bo...
Crop the image to a given aspect. <br> The aspect is the desired proportions of the image, which will be kept when cropping. <p> The usecase for this method is when you have an image, that you want to crop into a certain proportion, but want to keep the original dimensions as much as possible. @param width @param heigh...
[ "Crop", "the", "image", "to", "a", "given", "aspect", ".", "<br", ">", "The", "aspect", "is", "the", "desired", "proportions", "of", "the", "image", "which", "will", "be", "kept", "when", "cropping", ".", "<p", ">", "The", "usecase", "for", "this", "me...
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java#L123-L171
hector-client/hector
core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java
HFactory.createKeyspace
public static Keyspace createKeyspace(String keyspace, Cluster cluster, ConsistencyLevelPolicy consistencyLevelPolicy, FailoverPolicy failoverPolicy) { """ Creates a Keyspace with the given consistency level. For a reference to the consistency level, please refer to http://wiki.apache.org/cassandra/AP...
java
public static Keyspace createKeyspace(String keyspace, Cluster cluster, ConsistencyLevelPolicy consistencyLevelPolicy, FailoverPolicy failoverPolicy) { return new ExecutingKeyspace(keyspace, cluster.getConnectionManager(), consistencyLevelPolicy, failoverPolicy, cluster.getCredentials()); }
[ "public", "static", "Keyspace", "createKeyspace", "(", "String", "keyspace", ",", "Cluster", "cluster", ",", "ConsistencyLevelPolicy", "consistencyLevelPolicy", ",", "FailoverPolicy", "failoverPolicy", ")", "{", "return", "new", "ExecutingKeyspace", "(", "keyspace", ","...
Creates a Keyspace with the given consistency level. For a reference to the consistency level, please refer to http://wiki.apache.org/cassandra/API. @param keyspace @param cluster @param consistencyLevelPolicy @param failoverPolicy @return
[ "Creates", "a", "Keyspace", "with", "the", "given", "consistency", "level", ".", "For", "a", "reference", "to", "the", "consistency", "level", "please", "refer", "to", "http", ":", "//", "wiki", ".", "apache", ".", "org", "/", "cassandra", "/", "API", "....
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java#L271-L276
alibaba/canal
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java
LogBuffer.getFullString
public final String getFullString(final int len, String charsetName) { """ Return next fix-length string from buffer without null-terminate checking. Fix bug #17 {@link https ://github.com/AlibabaTech/canal/issues/17 } """ if (position + len > origin + limit) throw new IllegalArgumentException("limi...
java
public final String getFullString(final int len, String charsetName) { if (position + len > origin + limit) throw new IllegalArgumentException("limit excceed: " + (position + len - origin)); try { String st...
[ "public", "final", "String", "getFullString", "(", "final", "int", "len", ",", "String", "charsetName", ")", "{", "if", "(", "position", "+", "len", ">", "origin", "+", "limit", ")", "throw", "new", "IllegalArgumentException", "(", "\"limit excceed: \"", "+", ...
Return next fix-length string from buffer without null-terminate checking. Fix bug #17 {@link https ://github.com/AlibabaTech/canal/issues/17 }
[ "Return", "next", "fix", "-", "length", "string", "from", "buffer", "without", "null", "-", "terminate", "checking", ".", "Fix", "bug", "#17", "{" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogBuffer.java#L1122-L1133
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java
DE9IMRelation.getRCC8Relations
public static Type[] getRCC8Relations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) { """ Get the RCC8 relation(s) existing between two {@link GeometricShapeVariable}s. @param gv1 The first {@link GeometricShapeVariable} (the source of the directed edge). @param gv2 The second {@link GeometricShapeVari...
java
public static Type[] getRCC8Relations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) { return getRelations(gv1, gv2, true); }
[ "public", "static", "Type", "[", "]", "getRCC8Relations", "(", "GeometricShapeVariable", "gv1", ",", "GeometricShapeVariable", "gv2", ")", "{", "return", "getRelations", "(", "gv1", ",", "gv2", ",", "true", ")", ";", "}" ]
Get the RCC8 relation(s) existing between two {@link GeometricShapeVariable}s. @param gv1 The first {@link GeometricShapeVariable} (the source of the directed edge). @param gv2 The second {@link GeometricShapeVariable} (the destination of the directed edge). @return The RCC8 relation(s) existing between the two given {...
[ "Get", "the", "RCC8", "relation", "(", "s", ")", "existing", "between", "two", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java#L67-L69
acromusashi/acromusashi-stream-ml
src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java
LofCalculator.calculateReachDistance
protected static double calculateReachDistance(LofPoint basePoint, LofPoint targetPoint) { """ basePointのtargetPointに関する到達可能距離(Reachability distance)を算出する。 @param basePoint 算出元対象点 @param targetPoint 算出先対象点 @return 到達可能距離 """ double distance = MathUtils.distance(basePoint.getDataPoint(), targetPoin...
java
protected static double calculateReachDistance(LofPoint basePoint, LofPoint targetPoint) { double distance = MathUtils.distance(basePoint.getDataPoint(), targetPoint.getDataPoint()); double reachDistance = (double) ComparatorUtils.max(distance, targetPoint.getkDistance(), Comparator...
[ "protected", "static", "double", "calculateReachDistance", "(", "LofPoint", "basePoint", ",", "LofPoint", "targetPoint", ")", "{", "double", "distance", "=", "MathUtils", ".", "distance", "(", "basePoint", ".", "getDataPoint", "(", ")", ",", "targetPoint", ".", ...
basePointのtargetPointに関する到達可能距離(Reachability distance)を算出する。 @param basePoint 算出元対象点 @param targetPoint 算出先対象点 @return 到達可能距離
[ "basePointのtargetPointに関する到達可能距離", "(", "Reachability", "distance", ")", "を算出する。" ]
train
https://github.com/acromusashi/acromusashi-stream-ml/blob/26d6799a917cacda68e21d506c75cfeb17d832a6/src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java#L365-L372
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/Util.java
Util.checkIfMultipleOf8AndGT0
public static void checkIfMultipleOf8AndGT0(final long v, final String argName) { """ Checks if parameter v is a multiple of 8 and greater than zero. @param v The parameter to check @param argName This name will be part of the error message if the check fails. """ if (((v & 0X7L) == 0L) && (v > 0L)) { ...
java
public static void checkIfMultipleOf8AndGT0(final long v, final String argName) { if (((v & 0X7L) == 0L) && (v > 0L)) { return; } throw new SketchesArgumentException("The value of the parameter \"" + argName + "\" must be a positive multiple of 8 and greater than zero: " + v); }
[ "public", "static", "void", "checkIfMultipleOf8AndGT0", "(", "final", "long", "v", ",", "final", "String", "argName", ")", "{", "if", "(", "(", "(", "v", "&", "0X7", "L", ")", "==", "0L", ")", "&&", "(", "v", ">", "0L", ")", ")", "{", "return", "...
Checks if parameter v is a multiple of 8 and greater than zero. @param v The parameter to check @param argName This name will be part of the error message if the check fails.
[ "Checks", "if", "parameter", "v", "is", "a", "multiple", "of", "8", "and", "greater", "than", "zero", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/Util.java#L330-L336
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.getObjectMetadata
public ObjectMetadata getObjectMetadata(String bucketName, String key) { """ Gets the metadata for the specified Bos object without actually fetching the object itself. This is useful in obtaining only the object metadata, and avoids wasting bandwidth on fetching the object data. <p> The object metadata cont...
java
public ObjectMetadata getObjectMetadata(String bucketName, String key) { return this.getObjectMetadata(new GetObjectMetadataRequest(bucketName, key)); }
[ "public", "ObjectMetadata", "getObjectMetadata", "(", "String", "bucketName", ",", "String", "key", ")", "{", "return", "this", ".", "getObjectMetadata", "(", "new", "GetObjectMetadataRequest", "(", "bucketName", ",", "key", ")", ")", ";", "}" ]
Gets the metadata for the specified Bos object without actually fetching the object itself. This is useful in obtaining only the object metadata, and avoids wasting bandwidth on fetching the object data. <p> The object metadata contains information such as content type, content disposition, etc., as well as custom use...
[ "Gets", "the", "metadata", "for", "the", "specified", "Bos", "object", "without", "actually", "fetching", "the", "object", "itself", ".", "This", "is", "useful", "in", "obtaining", "only", "the", "object", "metadata", "and", "avoids", "wasting", "bandwidth", "...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L757-L759
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java
WriteExcelUtils.writeWorkBook
public static <T> void writeWorkBook(File file, int excelType, List<T> beans) throws WriteExcelException { """ 向工作簿中写入beans,所有bean写在一个Sheet中,默认以bean中的所有属性作为标题且写入第0行,0-based。 日期格式采用默认类型。并输出到指定file中 @param file 指定Excel输出文件 @param excelType 输出Excel文件类型{@link #XLSX}或者{@link #XLS},此类型必须与file文件名后缀匹配 @param be...
java
public static <T> void writeWorkBook(File file, int excelType, List<T> beans) throws WriteExcelException { WriteExcelUtils.writeWorkBook(file, excelType, beans, null); }
[ "public", "static", "<", "T", ">", "void", "writeWorkBook", "(", "File", "file", ",", "int", "excelType", ",", "List", "<", "T", ">", "beans", ")", "throws", "WriteExcelException", "{", "WriteExcelUtils", ".", "writeWorkBook", "(", "file", ",", "excelType", ...
向工作簿中写入beans,所有bean写在一个Sheet中,默认以bean中的所有属性作为标题且写入第0行,0-based。 日期格式采用默认类型。并输出到指定file中 @param file 指定Excel输出文件 @param excelType 输出Excel文件类型{@link #XLSX}或者{@link #XLS},此类型必须与file文件名后缀匹配 @param beans 指定写入的Beans(或者泛型为Map) @throws WriteExcelException
[ "向工作簿中写入beans,所有bean写在一个Sheet中", "默认以bean中的所有属性作为标题且写入第0行,0", "-", "based。", "日期格式采用默认类型。并输出到指定file中" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java#L269-L271
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java
JavaBean.getProperty
@SuppressWarnings("unchecked") public static <T> T getProperty(Object bean, String name) throws SystemException { """ Retrieve the bean property @param bean the bean @param name the property name @param <T> the type class of the property for casting @return the property @throws SystemException the...
java
@SuppressWarnings("unchecked") public static <T> T getProperty(Object bean, String name) throws SystemException { try { return (T)getNestedProperty(bean, name); } catch (Exception e) { throw new SystemException("Get property \""+name+"\" ERROR:"+e....
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "getProperty", "(", "Object", "bean", ",", "String", "name", ")", "throws", "SystemException", "{", "try", "{", "return", "(", "T", ")", "getNestedProperty", "(", "...
Retrieve the bean property @param bean the bean @param name the property name @param <T> the type class of the property for casting @return the property @throws SystemException the an unknown error occurs
[ "Retrieve", "the", "bean", "property" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java#L463-L475
selenide/selenide
src/main/java/com/codeborne/selenide/Condition.java
Condition.cssValue
public static Condition cssValue(final String propertyName, final String expectedValue) { """ Checks if css property (style) applies for the element. Both explicit and computed properties are supported. <p> Note that if css property is missing {@link WebElement#getCssValue} return empty string. In this case yo...
java
public static Condition cssValue(final String propertyName, final String expectedValue) { return new Condition("cssValue") { @Override public boolean apply(Driver driver, WebElement element) { String actualValue = element.getCssValue(propertyName); return defaultString(expectedValue).equ...
[ "public", "static", "Condition", "cssValue", "(", "final", "String", "propertyName", ",", "final", "String", "expectedValue", ")", "{", "return", "new", "Condition", "(", "\"cssValue\"", ")", "{", "@", "Override", "public", "boolean", "apply", "(", "Driver", "...
Checks if css property (style) applies for the element. Both explicit and computed properties are supported. <p> Note that if css property is missing {@link WebElement#getCssValue} return empty string. In this case you should assert against empty string. <p> Sample: <p> {@code <input style="font-size: 12">} <p> {@code ...
[ "Checks", "if", "css", "property", "(", "style", ")", "applies", "for", "the", "element", ".", "Both", "explicit", "and", "computed", "properties", "are", "supported", ".", "<p", ">", "Note", "that", "if", "css", "property", "is", "missing", "{", "@link", ...
train
https://github.com/selenide/selenide/blob/b867baf171942cf07725d83a985237428569883f/src/main/java/com/codeborne/selenide/Condition.java#L401-L419
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java
BytecodeUtils.newHashMap
public static Expression newHashMap( Iterable<? extends Expression> keys, Iterable<? extends Expression> values) { """ Returns an expression that returns a new {@link HashMap} containing all the given entries. """ return newMap(keys, values, ConstructorRef.HASH_MAP_CAPACITY, HASH_MAP_TYPE); }
java
public static Expression newHashMap( Iterable<? extends Expression> keys, Iterable<? extends Expression> values) { return newMap(keys, values, ConstructorRef.HASH_MAP_CAPACITY, HASH_MAP_TYPE); }
[ "public", "static", "Expression", "newHashMap", "(", "Iterable", "<", "?", "extends", "Expression", ">", "keys", ",", "Iterable", "<", "?", "extends", "Expression", ">", "values", ")", "{", "return", "newMap", "(", "keys", ",", "values", ",", "ConstructorRef...
Returns an expression that returns a new {@link HashMap} containing all the given entries.
[ "Returns", "an", "expression", "that", "returns", "a", "new", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java#L898-L901
saxsys/SynchronizeFX
kryo-serializer/src/main/java/de/saxsys/synchronizefx/kryo/KryoSerializer.java
KryoSerializer.registerSerializableClass
public <T> void registerSerializableClass(final Class<T> clazz, final Serializer<T> serializer) { """ Registers a class that may be send over the network. Use this method only before the first invocation of either {@link KryoSerializer#serialize(List)} or {@link KryoSerializer#deserialize(byte[])}. If you invo...
java
public <T> void registerSerializableClass(final Class<T> clazz, final Serializer<T> serializer) { kryo.registerSerializableClass(clazz, serializer); }
[ "public", "<", "T", ">", "void", "registerSerializableClass", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Serializer", "<", "T", ">", "serializer", ")", "{", "kryo", ".", "registerSerializableClass", "(", "clazz", ",", "serializer", ")", ...
Registers a class that may be send over the network. Use this method only before the first invocation of either {@link KryoSerializer#serialize(List)} or {@link KryoSerializer#deserialize(byte[])}. If you invoke it after these methods it is not guaranteed that the {@link Kryo} used by these methods will actually use y...
[ "Registers", "a", "class", "that", "may", "be", "send", "over", "the", "network", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/kryo-serializer/src/main/java/de/saxsys/synchronizefx/kryo/KryoSerializer.java#L52-L54
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java
SheetResourcesImpl.getSheetAsPDF
public void getSheetAsPDF(long id, OutputStream outputStream, PaperSize paperSize) throws SmartsheetException { """ Get a sheet as a PDF file. It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP header Exceptions: IllegalArgumentException : if outputSt...
java
public void getSheetAsPDF(long id, OutputStream outputStream, PaperSize paperSize) throws SmartsheetException { getSheetAsFile(id, paperSize, outputStream, "application/pdf"); }
[ "public", "void", "getSheetAsPDF", "(", "long", "id", ",", "OutputStream", "outputStream", ",", "PaperSize", "paperSize", ")", "throws", "SmartsheetException", "{", "getSheetAsFile", "(", "id", ",", "paperSize", ",", "outputStream", ",", "\"application/pdf\"", ")", ...
Get a sheet as a PDF file. It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP header Exceptions: IllegalArgumentException : if outputStream is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is a...
[ "Get", "a", "sheet", "as", "a", "PDF", "file", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L363-L365
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java
AuthorizationProcessManager.createRegistrationParams
private HashMap<String, String> createRegistrationParams() { """ Generate the params that will be used during the registration phase @return Map with all the parameters """ registrationKeyPair = KeyPairUtility.generateRandomKeyPair(); JSONObject csrJSON = new JSONObject(); HashMap<Str...
java
private HashMap<String, String> createRegistrationParams() { registrationKeyPair = KeyPairUtility.generateRandomKeyPair(); JSONObject csrJSON = new JSONObject(); HashMap<String, String> params; try { DeviceIdentity deviceData = new BaseDeviceIdentity(preferences.deviceIdent...
[ "private", "HashMap", "<", "String", ",", "String", ">", "createRegistrationParams", "(", ")", "{", "registrationKeyPair", "=", "KeyPairUtility", ".", "generateRandomKeyPair", "(", ")", ";", "JSONObject", "csrJSON", "=", "new", "JSONObject", "(", ")", ";", "Hash...
Generate the params that will be used during the registration phase @return Map with all the parameters
[ "Generate", "the", "params", "that", "will", "be", "used", "during", "the", "registration", "phase" ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java#L163-L189
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/scene2d/Actors.java
Actors.setAlpha
public static void setAlpha(final Stage stage, final float alpha) { """ Null-safe alpha setting method. @param stage its root actor's alpha will be modified, affecting all actors in the stage. Can be null. @param alpha will replace current actor's alpha. """ if (stage != null) { setAlph...
java
public static void setAlpha(final Stage stage, final float alpha) { if (stage != null) { setAlpha(stage.getRoot(), alpha); } }
[ "public", "static", "void", "setAlpha", "(", "final", "Stage", "stage", ",", "final", "float", "alpha", ")", "{", "if", "(", "stage", "!=", "null", ")", "{", "setAlpha", "(", "stage", ".", "getRoot", "(", ")", ",", "alpha", ")", ";", "}", "}" ]
Null-safe alpha setting method. @param stage its root actor's alpha will be modified, affecting all actors in the stage. Can be null. @param alpha will replace current actor's alpha.
[ "Null", "-", "safe", "alpha", "setting", "method", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/scene2d/Actors.java#L154-L158
jinahya/hex-codec
src/main/java/com/github/jinahya/codec/HexDecoder.java
HexDecoder.decodeToString
public String decodeToString(final byte[] input, final String outputCharset) throws UnsupportedEncodingException { """ Decodes given sequence of nibbles into a string. @param input the nibbles to decode @param outputCharset the charset name to encode output string @return the decoded string. @thr...
java
public String decodeToString(final byte[] input, final String outputCharset) throws UnsupportedEncodingException { return new String(decode(input), outputCharset); }
[ "public", "String", "decodeToString", "(", "final", "byte", "[", "]", "input", ",", "final", "String", "outputCharset", ")", "throws", "UnsupportedEncodingException", "{", "return", "new", "String", "(", "decode", "(", "input", ")", ",", "outputCharset", ")", ...
Decodes given sequence of nibbles into a string. @param input the nibbles to decode @param outputCharset the charset name to encode output string @return the decoded string. @throws UnsupportedEncodingException if outputCharset is not supported
[ "Decodes", "given", "sequence", "of", "nibbles", "into", "a", "string", "." ]
train
https://github.com/jinahya/hex-codec/blob/159aa54010821655496177e76a3ef35a49fbd433/src/main/java/com/github/jinahya/codec/HexDecoder.java#L218-L222
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzleResultSet.java
DrizzleResultSet.getDate
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException { """ Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object in the Java programming language. This method uses the given calendar to construct ...
java
public Date getDate(final int columnIndex, final Calendar cal) throws SQLException { try { return getValueObject(columnIndex).getDate(cal); } catch (ParseException e) { throw SQLExceptionMapper.getSQLException("Could not parse as date"); } }
[ "public", "Date", "getDate", "(", "final", "int", "columnIndex", ",", "final", "Calendar", "cal", ")", "throws", "SQLException", "{", "try", "{", "return", "getValueObject", "(", "columnIndex", ")", ".", "getDate", "(", "cal", ")", ";", "}", "catch", "(", ...
Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>java.sql.Date</code> object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone...
[ "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "java", ".", "sql", ".", "Date<", "/", "code", ">", "object"...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleResultSet.java#L2078-L2084
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setDurableExecutorConfigs
public Config setDurableExecutorConfigs(Map<String, DurableExecutorConfig> durableExecutorConfigs) { """ Sets the map of durable executor configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param durableExecutorConfigs the durab...
java
public Config setDurableExecutorConfigs(Map<String, DurableExecutorConfig> durableExecutorConfigs) { this.durableExecutorConfigs.clear(); this.durableExecutorConfigs.putAll(durableExecutorConfigs); for (Entry<String, DurableExecutorConfig> entry : durableExecutorConfigs.entrySet()) { ...
[ "public", "Config", "setDurableExecutorConfigs", "(", "Map", "<", "String", ",", "DurableExecutorConfig", ">", "durableExecutorConfigs", ")", "{", "this", ".", "durableExecutorConfigs", ".", "clear", "(", ")", ";", "this", ".", "durableExecutorConfigs", ".", "putAll...
Sets the map of durable executor configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param durableExecutorConfigs the durable executor configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "durable", "executor", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", "will", "be", "obtained", "in", "the", "future", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L2181-L2188
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_transpose.java
DZcs_transpose.cs_transpose
public static DZcs cs_transpose(DZcs A, boolean values) { """ Computes the transpose of a sparse matrix, C =A'; @param A column-compressed matrix @param values pattern only if false, both pattern and values otherwise @return C=A', null on error """ int p, q, j, Cp[], Ci[], n, m, Ap[], Ai[], w[] ; ...
java
public static DZcs cs_transpose(DZcs A, boolean values) { int p, q, j, Cp[], Ci[], n, m, Ap[], Ai[], w[] ; DZcsa Cx = new DZcsa(), Ax = new DZcsa() ; DZcs C ; if (!CS_CSC (A)) return (null) ; /* check inputs */ m = A.m ; n = A.n ; Ap = A.p ; Ai = A.i ; Ax.x = A.x ; C = cs_spalloc (n, m, Ap [n], val...
[ "public", "static", "DZcs", "cs_transpose", "(", "DZcs", "A", ",", "boolean", "values", ")", "{", "int", "p", ",", "q", ",", "j", ",", "Cp", "[", "]", ",", "Ci", "[", "]", ",", "n", ",", "m", ",", "Ap", "[", "]", ",", "Ai", "[", "]", ",", ...
Computes the transpose of a sparse matrix, C =A'; @param A column-compressed matrix @param values pattern only if false, both pattern and values otherwise @return C=A', null on error
[ "Computes", "the", "transpose", "of", "a", "sparse", "matrix", "C", "=", "A", ";" ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_transpose.java#L53-L75
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newWriteOnlyException
public static WriteOnlyException newWriteOnlyException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link WriteOnlyException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Th...
java
public static WriteOnlyException newWriteOnlyException(Throwable cause, String message, Object... args) { return new WriteOnlyException(format(message, args), cause); }
[ "public", "static", "WriteOnlyException", "newWriteOnlyException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "WriteOnlyException", "(", "format", "(", "message", ",", "args", ")", ",", "cause", ...
Constructs and initializes a new {@link WriteOnlyException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link WriteOnlyException} was thrown. @param message {@link String} describing...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "WriteOnlyException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Objec...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L971-L973
line/armeria
core/src/main/java/com/linecorp/armeria/client/SessionProtocolNegotiationCache.java
SessionProtocolNegotiationCache.isUnsupported
public static boolean isUnsupported(SocketAddress remoteAddress, SessionProtocol protocol) { """ Returns {@code true} if the specified {@code remoteAddress} is known to have no support for the specified {@link SessionProtocol}. """ final String key = key(remoteAddress); final CacheEntry e; ...
java
public static boolean isUnsupported(SocketAddress remoteAddress, SessionProtocol protocol) { final String key = key(remoteAddress); final CacheEntry e; final long stamp = lock.readLock(); try { e = cache.get(key); } finally { lock.unlockRead(stamp); ...
[ "public", "static", "boolean", "isUnsupported", "(", "SocketAddress", "remoteAddress", ",", "SessionProtocol", "protocol", ")", "{", "final", "String", "key", "=", "key", "(", "remoteAddress", ")", ";", "final", "CacheEntry", "e", ";", "final", "long", "stamp", ...
Returns {@code true} if the specified {@code remoteAddress} is known to have no support for the specified {@link SessionProtocol}.
[ "Returns", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/client/SessionProtocolNegotiationCache.java#L63-L79
tvesalainen/util
util/src/main/java/org/vesalainen/ui/Transforms.java
Transforms.createScreenTransform
public static AffineTransform createScreenTransform(Rectangle2D userBounds, Rectangle2D screenBounds, boolean keepAspectRatio) { """ Creates translation that translates userBounds in Cartesian coordinates to screenBound in screen coordinates. <p>In Cartesian y grows up while in screen y grows down @param userBo...
java
public static AffineTransform createScreenTransform(Rectangle2D userBounds, Rectangle2D screenBounds, boolean keepAspectRatio) { return createScreenTransform(userBounds, screenBounds, keepAspectRatio, new AffineTransform()); }
[ "public", "static", "AffineTransform", "createScreenTransform", "(", "Rectangle2D", "userBounds", ",", "Rectangle2D", "screenBounds", ",", "boolean", "keepAspectRatio", ")", "{", "return", "createScreenTransform", "(", "userBounds", ",", "screenBounds", ",", "keepAspectRa...
Creates translation that translates userBounds in Cartesian coordinates to screenBound in screen coordinates. <p>In Cartesian y grows up while in screen y grows down @param userBounds @param screenBounds @param keepAspectRatio @return
[ "Creates", "translation", "that", "translates", "userBounds", "in", "Cartesian", "coordinates", "to", "screenBound", "in", "screen", "coordinates", ".", "<p", ">", "In", "Cartesian", "y", "grows", "up", "while", "in", "screen", "y", "grows", "down" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/Transforms.java#L43-L46
looly/hutool
hutool-aop/src/main/java/cn/hutool/aop/ProxyUtil.java
ProxyUtil.newProxyInstance
@SuppressWarnings("unchecked") public static <T> T newProxyInstance(ClassLoader classloader, InvocationHandler invocationHandler, Class<?>... interfaces) { """ 创建动态代理对象<br> 动态代理对象的创建原理是:<br> 假设创建的代理对象名为 $Proxy0<br> 1、根据传入的interfaces动态生成一个类,实现interfaces中的接口<br> 2、通过传入的classloder将刚生成的类加载到jvm中。即将$Proxy0类load<br...
java
@SuppressWarnings("unchecked") public static <T> T newProxyInstance(ClassLoader classloader, InvocationHandler invocationHandler, Class<?>... interfaces) { return (T) Proxy.newProxyInstance(classloader, interfaces, invocationHandler); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "newProxyInstance", "(", "ClassLoader", "classloader", ",", "InvocationHandler", "invocationHandler", ",", "Class", "<", "?", ">", "...", "interfaces", ")", "{", "return"...
创建动态代理对象<br> 动态代理对象的创建原理是:<br> 假设创建的代理对象名为 $Proxy0<br> 1、根据传入的interfaces动态生成一个类,实现interfaces中的接口<br> 2、通过传入的classloder将刚生成的类加载到jvm中。即将$Proxy0类load<br> 3、调用$Proxy0的$Proxy0(InvocationHandler)构造函数 创建$Proxy0的对象,并且用interfaces参数遍历其所有接口的方法,这些实现方法的实现本质上是通过反射调用被代理对象的方法<br> 4、将$Proxy0的实例返回给客户端。 <br> 5、当调用代理类的相应方法时,相当于调用 {@link I...
[ "创建动态代理对象<br", ">", "动态代理对象的创建原理是:<br", ">", "假设创建的代理对象名为", "$Proxy0<br", ">", "1、根据传入的interfaces动态生成一个类,实现interfaces中的接口<br", ">", "2、通过传入的classloder将刚生成的类加载到jvm中。即将$Proxy0类load<br", ">", "3、调用$Proxy0的$Proxy0", "(", "InvocationHandler", ")", "构造函数", "创建$Proxy0的对象,并且用interfaces参数遍历其所...
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-aop/src/main/java/cn/hutool/aop/ProxyUtil.java#L57-L60
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET
public ArrayList<Long> organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException { """ Mailing list account member REST: GET /email/exchange/{organizationName}/service/{exchangeService...
java
public ArrayList<Long> organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET(String organizationName, String exchangeService, String mailingListAddress) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddres...
[ "public", "ArrayList", "<", "Long", ">", "organizationName_service_exchangeService_mailingList_mailingListAddress_member_account_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "mailingListAddress", ")", "throws", "IOException", "{", "S...
Mailing list account member REST: GET /email/exchange/{organizationName}/service/{exchangeService}/mailingList/{mailingListAddress}/member/account @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service @param maili...
[ "Mailing", "list", "account", "member" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L1060-L1065
belaban/JGroups
src/org/jgroups/util/MessageBatch.java
MessageBatch.getMatchingMessages
public Collection<Message> getMatchingMessages(final short id, boolean remove) { """ Removes and returns all messages which have a header with ID == id """ return map((msg, batch) -> { if(msg != null && msg.getHeader(id) != null) { if(remove) batch.remove...
java
public Collection<Message> getMatchingMessages(final short id, boolean remove) { return map((msg, batch) -> { if(msg != null && msg.getHeader(id) != null) { if(remove) batch.remove(msg); return msg; } return null; })...
[ "public", "Collection", "<", "Message", ">", "getMatchingMessages", "(", "final", "short", "id", ",", "boolean", "remove", ")", "{", "return", "map", "(", "(", "msg", ",", "batch", ")", "->", "{", "if", "(", "msg", "!=", "null", "&&", "msg", ".", "ge...
Removes and returns all messages which have a header with ID == id
[ "Removes", "and", "returns", "all", "messages", "which", "have", "a", "header", "with", "ID", "==", "id" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/MessageBatch.java#L285-L294
redkale/redkale
src/org/redkale/net/http/HttpRequest.java
HttpRequest.getRequstURIPath
public float getRequstURIPath(String prefix, float defvalue) { """ 获取请求URL分段中含prefix段的float值 <br> 例如请求URL /pipes/record/query/point:40.0 <br> 获取time参数: float point = request.getRequstURIPath("point:", 0.0f); @param prefix prefix段前缀 @param defvalue 默认float值 @return float值 """ String val ...
java
public float getRequstURIPath(String prefix, float defvalue) { String val = getRequstURIPath(prefix, null); try { return val == null ? defvalue : Float.parseFloat(val); } catch (NumberFormatException e) { return defvalue; } }
[ "public", "float", "getRequstURIPath", "(", "String", "prefix", ",", "float", "defvalue", ")", "{", "String", "val", "=", "getRequstURIPath", "(", "prefix", ",", "null", ")", ";", "try", "{", "return", "val", "==", "null", "?", "defvalue", ":", "Float", ...
获取请求URL分段中含prefix段的float值 <br> 例如请求URL /pipes/record/query/point:40.0 <br> 获取time参数: float point = request.getRequstURIPath("point:", 0.0f); @param prefix prefix段前缀 @param defvalue 默认float值 @return float值
[ "获取请求URL分段中含prefix段的float值", "<br", ">", "例如请求URL", "/", "pipes", "/", "record", "/", "query", "/", "point", ":", "40", ".", "0", "<br", ">", "获取time参数", ":", "float", "point", "=", "request", ".", "getRequstURIPath", "(", "point", ":", "0", ".", "0f", ...
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L897-L904
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsInner.java
WorkflowRunActionRepetitionsInner.listAsync
public Observable<List<WorkflowRunActionRepetitionDefinitionInner>> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { """ Get all of a workflow run action repetitions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param ru...
java
public Observable<List<WorkflowRunActionRepetitionDefinitionInner>> listAsync(String resourceGroupName, String workflowName, String runName, String actionName) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).map(new Func1<ServiceResponse<List<WorkflowRunActionRepetiti...
[ "public", "Observable", "<", "List", "<", "WorkflowRunActionRepetitionDefinitionInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "String", "runName", ",", "String", "actionName", ")", "{", "return", "listWithServic...
Get all of a workflow run action repetitions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @param actionName The workflow action name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to th...
[ "Get", "all", "of", "a", "workflow", "run", "action", "repetitions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionRepetitionsInner.java#L111-L118
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
MultiUserChat.changeSubject
public void changeSubject(final String subject) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Changes the subject within the room. As a default, only users with a role of "moderator" are allowed to change the subject in a room. Although some rooms may be configu...
java
public void changeSubject(final String subject) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { Message message = createMessage(); message.setSubject(subject); // Wait for an error or confirmation message back from the server. StanzaFilter re...
[ "public", "void", "changeSubject", "(", "final", "String", "subject", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "Message", "message", "=", "createMessage", "(", ")", ";", "message",...
Changes the subject within the room. As a default, only users with a role of "moderator" are allowed to change the subject in a room. Although some rooms may be configured to allow a mere participant or even a visitor to change the subject. @param subject the new room's subject to set. @throws XMPPErrorException if so...
[ "Changes", "the", "subject", "within", "the", "room", ".", "As", "a", "default", "only", "users", "with", "a", "role", "of", "moderator", "are", "allowed", "to", "change", "the", "subject", "in", "a", "room", ".", "Although", "some", "rooms", "may", "be"...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java#L2026-L2040
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.notEmpty
public static String notEmpty(String value, String name) { """ Check that a string is not null and not empty. If null or emtpy throws an IllegalArgumentException. @param value value. @param name parameter name for the exception message. @return the given value. """ return notEmpty(value, name, nul...
java
public static String notEmpty(String value, String name) { return notEmpty(value, name, null); }
[ "public", "static", "String", "notEmpty", "(", "String", "value", ",", "String", "name", ")", "{", "return", "notEmpty", "(", "value", ",", "name", ",", "null", ")", ";", "}" ]
Check that a string is not null and not empty. If null or emtpy throws an IllegalArgumentException. @param value value. @param name parameter name for the exception message. @return the given value.
[ "Check", "that", "a", "string", "is", "not", "null", "and", "not", "empty", ".", "If", "null", "or", "emtpy", "throws", "an", "IllegalArgumentException", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L93-L95
threerings/playn
html/src/playn/html/HtmlGL20.java
HtmlGL20.getTypedArray
protected ArrayBufferView getTypedArray(Buffer buffer, int type, int byteSize) { """ Returns the typed array of the given native buffer. Set byteSize to -1 to use remaining() """ if (!(buffer instanceof HasArrayBufferView)) { throw new RuntimeException("Native buffer required " + buffer); } ...
java
protected ArrayBufferView getTypedArray(Buffer buffer, int type, int byteSize) { if (!(buffer instanceof HasArrayBufferView)) { throw new RuntimeException("Native buffer required " + buffer); } HasArrayBufferView arrayHolder = (HasArrayBufferView) buffer; int bufferElementSize = arrayHolder.getEle...
[ "protected", "ArrayBufferView", "getTypedArray", "(", "Buffer", "buffer", ",", "int", "type", ",", "int", "byteSize", ")", "{", "if", "(", "!", "(", "buffer", "instanceof", "HasArrayBufferView", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Native...
Returns the typed array of the given native buffer. Set byteSize to -1 to use remaining()
[ "Returns", "the", "typed", "array", "of", "the", "given", "native", "buffer", ".", "Set", "byteSize", "to", "-", "1", "to", "use", "remaining", "()" ]
train
https://github.com/threerings/playn/blob/c266eeb39188dcada4b00992a0d1199759e03d42/html/src/playn/html/HtmlGL20.java#L286-L319