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 |
|---|---|---|---|---|---|---|---|---|---|---|
DDTH/ddth-commons | ddth-commons-core/src/main/java/com/github/ddth/commons/utils/ThriftUtils.java | ThriftUtils.createThreadedServer | public static TServer createThreadedServer(TProcessorFactory processorFactory,
TProtocolFactory protocolFactory, int port, int maxWorkerThreads,
int clientTimeoutMillisecs, int maxFrameSize) throws TTransportException {
"""
Helper method to create a new framed-transport, threaded-{@link TSe... | java | public static TServer createThreadedServer(TProcessorFactory processorFactory,
TProtocolFactory protocolFactory, int port, int maxWorkerThreads,
int clientTimeoutMillisecs, int maxFrameSize) throws TTransportException {
if (maxWorkerThreads < 1) {
maxWorkerThreads = Math.max(... | [
"public",
"static",
"TServer",
"createThreadedServer",
"(",
"TProcessorFactory",
"processorFactory",
",",
"TProtocolFactory",
"protocolFactory",
",",
"int",
"port",
",",
"int",
"maxWorkerThreads",
",",
"int",
"clientTimeoutMillisecs",
",",
"int",
"maxFrameSize",
")",
"t... | Helper method to create a new framed-transport, threaded-{@link TServer}.
<p>
Note: if {@code maxWorkerThreads < 1}, the {@link TServer} is created
with {@code maxWorkerThreads} =
{@code Math.max(2, Runtime.getRuntime().availableProcessors())}
</p>
@param processorFactory
@param protocolFactory
@param port
@param max... | [
"Helper",
"method",
"to",
"create",
"a",
"new",
"framed",
"-",
"transport",
"threaded",
"-",
"{",
"@link",
"TServer",
"}",
"."
] | train | https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/ThriftUtils.java#L101-L115 |
deeplearning4j/deeplearning4j | datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java | Configuration.setPattern | public void setPattern(String name, Pattern pattern) {
"""
Set the given property to <code>Pattern</code>.
If the pattern is passed as null, sets the empty pattern which results in
further calls to getPattern(...) returning the default value.
@param name property name
@param pattern new value
"""
... | java | public void setPattern(String name, Pattern pattern) {
if (null == pattern) {
set(name, null);
} else {
set(name, pattern.pattern());
}
} | [
"public",
"void",
"setPattern",
"(",
"String",
"name",
",",
"Pattern",
"pattern",
")",
"{",
"if",
"(",
"null",
"==",
"pattern",
")",
"{",
"set",
"(",
"name",
",",
"null",
")",
";",
"}",
"else",
"{",
"set",
"(",
"name",
",",
"pattern",
".",
"pattern... | Set the given property to <code>Pattern</code>.
If the pattern is passed as null, sets the empty pattern which results in
further calls to getPattern(...) returning the default value.
@param name property name
@param pattern new value | [
"Set",
"the",
"given",
"property",
"to",
"<code",
">",
"Pattern<",
"/",
"code",
">",
".",
"If",
"the",
"pattern",
"is",
"passed",
"as",
"null",
"sets",
"the",
"empty",
"pattern",
"which",
"results",
"in",
"further",
"calls",
"to",
"getPattern",
"(",
"...... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/conf/Configuration.java#L649-L655 |
toddfast/typeconverter | src/main/java/com/toddfast/util/convert/TypeConverter.java | TypeConverter.asLong | public static long asLong(Object value, long nullValue) {
"""
Return the value converted to a long
or the specified alternate value if the original value is null. Note,
this method still throws {@link IllegalArgumentException} if the value
is not null and could not be converted.
@param value
The value to be... | java | public static long asLong(Object value, long nullValue) {
value=convert(Long.class,value);
if (value!=null) {
return ((Long)value).longValue();
}
else {
return nullValue;
}
} | [
"public",
"static",
"long",
"asLong",
"(",
"Object",
"value",
",",
"long",
"nullValue",
")",
"{",
"value",
"=",
"convert",
"(",
"Long",
".",
"class",
",",
"value",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"return",
"(",
"(",
"Long",
")... | Return the value converted to a long
or the specified alternate value if the original value is null. Note,
this method still throws {@link IllegalArgumentException} if the value
is not null and could not be converted.
@param value
The value to be converted
@param nullValue
The value to be returned if {@link value} is ... | [
"Return",
"the",
"value",
"converted",
"to",
"a",
"long",
"or",
"the",
"specified",
"alternate",
"value",
"if",
"the",
"original",
"value",
"is",
"null",
".",
"Note",
"this",
"method",
"still",
"throws",
"{",
"@link",
"IllegalArgumentException",
"}",
"if",
"... | train | https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L561-L569 |
aws/aws-sdk-java | aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/model/RawRequest.java | RawRequest.queryParameter | public RawRequest queryParameter(String name, String value) {
"""
Set a query parameter value for the underlying HTTP request.
<p>
Query parameters set with this method will be merged with query
parameters found in the configured {@link SdkRequestConfig}.
@param name The name of the header.
@param value The... | java | public RawRequest queryParameter(String name, String value) {
queryParameters.computeIfAbsent(name, k -> new ArrayList<>());
queryParameters.get(name).add(value);
setRequestConfigDirty();
return this;
} | [
"public",
"RawRequest",
"queryParameter",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"queryParameters",
".",
"computeIfAbsent",
"(",
"name",
",",
"k",
"->",
"new",
"ArrayList",
"<>",
"(",
")",
")",
";",
"queryParameters",
".",
"get",
"(",
"na... | Set a query parameter value for the underlying HTTP request.
<p>
Query parameters set with this method will be merged with query
parameters found in the configured {@link SdkRequestConfig}.
@param name The name of the header.
@param value The value of the header.
@return This object for method chaining. | [
"Set",
"a",
"query",
"parameter",
"value",
"for",
"the",
"underlying",
"HTTP",
"request",
".",
"<p",
">",
"Query",
"parameters",
"set",
"with",
"this",
"method",
"will",
"be",
"merged",
"with",
"query",
"parameters",
"found",
"in",
"the",
"configured",
"{",
... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/model/RawRequest.java#L117-L122 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/codec/Rot.java | Rot.encodeChar | private static char encodeChar(char c, int offset, boolean isDecodeNumber) {
"""
解码字符
@param c 字符
@param offset 位移
@param isDecodeNumber 是否解码数字
@return 解码后的字符串
"""
if (isDecodeNumber) {
if (c >= CHAR0 && c <= CHAR9) {
c -= CHAR0;
c = (char) ((c + offset) % 10);
c += CHAR0;
}
... | java | private static char encodeChar(char c, int offset, boolean isDecodeNumber) {
if (isDecodeNumber) {
if (c >= CHAR0 && c <= CHAR9) {
c -= CHAR0;
c = (char) ((c + offset) % 10);
c += CHAR0;
}
}
// A == 65, Z == 90
if (c >= ACHAR && c <= ZCHAR) {
c -= ACHAR;
c = (char) ((c + off... | [
"private",
"static",
"char",
"encodeChar",
"(",
"char",
"c",
",",
"int",
"offset",
",",
"boolean",
"isDecodeNumber",
")",
"{",
"if",
"(",
"isDecodeNumber",
")",
"{",
"if",
"(",
"c",
">=",
"CHAR0",
"&&",
"c",
"<=",
"CHAR9",
")",
"{",
"c",
"-=",
"CHAR0... | 解码字符
@param c 字符
@param offset 位移
@param isDecodeNumber 是否解码数字
@return 解码后的字符串 | [
"解码字符"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/codec/Rot.java#L106-L128 |
apache/flink | flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java | SegmentsUtil.setLong | public static void setLong(MemorySegment[] segments, int offset, long value) {
"""
set long from segments.
@param segments target segments.
@param offset value offset.
"""
if (inFirstSegment(segments, offset, 8)) {
segments[0].putLong(offset, value);
} else {
setLongMultiSegments(segments, offset... | java | public static void setLong(MemorySegment[] segments, int offset, long value) {
if (inFirstSegment(segments, offset, 8)) {
segments[0].putLong(offset, value);
} else {
setLongMultiSegments(segments, offset, value);
}
} | [
"public",
"static",
"void",
"setLong",
"(",
"MemorySegment",
"[",
"]",
"segments",
",",
"int",
"offset",
",",
"long",
"value",
")",
"{",
"if",
"(",
"inFirstSegment",
"(",
"segments",
",",
"offset",
",",
"8",
")",
")",
"{",
"segments",
"[",
"0",
"]",
... | set long from segments.
@param segments target segments.
@param offset value offset. | [
"set",
"long",
"from",
"segments",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L755-L761 |
duracloud/duracloud | durastore/src/main/java/org/duracloud/durastore/rest/ContentRest.java | ContentRest.putContent | @PUT
public Response putContent(@PathParam("spaceID") String spaceID,
@PathParam("contentID") String contentID,
@QueryParam("storeID") String storeID,
@HeaderParam(COPY_SOURCE_HEADER) String copySource,
... | java | @PUT
public Response putContent(@PathParam("spaceID") String spaceID,
@PathParam("contentID") String contentID,
@QueryParam("storeID") String storeID,
@HeaderParam(COPY_SOURCE_HEADER) String copySource,
... | [
"@",
"PUT",
"public",
"Response",
"putContent",
"(",
"@",
"PathParam",
"(",
"\"spaceID\"",
")",
"String",
"spaceID",
",",
"@",
"PathParam",
"(",
"\"contentID\"",
")",
"String",
"contentID",
",",
"@",
"QueryParam",
"(",
"\"storeID\"",
")",
"String",
"storeID",
... | see ContentResource.addContent() and ContentResource.copyContent().
@return 201 response indicating content added/copied successfully | [
"see",
"ContentResource",
".",
"addContent",
"()",
"and",
"ContentResource",
".",
"copyContent",
"()",
"."
] | train | https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/ContentRest.java#L396-L408 |
jwtk/jjwt | api/src/main/java/io/jsonwebtoken/Jwts.java | Jwts.jwsHeader | public static JwsHeader jwsHeader(Map<String, Object> header) {
"""
Returns a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs.
@return a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with t... | java | public static JwsHeader jwsHeader(Map<String, Object> header) {
return Classes.newInstance("io.jsonwebtoken.impl.DefaultJwsHeader", MAP_ARG, header);
} | [
"public",
"static",
"JwsHeader",
"jwsHeader",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"header",
")",
"{",
"return",
"Classes",
".",
"newInstance",
"(",
"\"io.jsonwebtoken.impl.DefaultJwsHeader\"",
",",
"MAP_ARG",
",",
"header",
")",
";",
"}"
] | Returns a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs.
@return a new {@link JwsHeader} instance suitable for digitally signed JWTs (aka 'JWS's), populated with the
specified name/value pairs.
@see JwtBuilder#setHeader(Header) | [
"Returns",
"a",
"new",
"{",
"@link",
"JwsHeader",
"}",
"instance",
"suitable",
"for",
"digitally",
"signed",
"JWTs",
"(",
"aka",
"JWS",
"s",
")",
"populated",
"with",
"the",
"specified",
"name",
"/",
"value",
"pairs",
"."
] | train | https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/Jwts.java#L75-L77 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfContentByte.java | PdfContentByte.getKernArray | public static PdfTextArray getKernArray(String text, BaseFont font) {
"""
Constructs a kern array for a text in a certain font
@param text the text
@param font the font
@return a PdfTextArray
"""
PdfTextArray pa = new PdfTextArray();
StringBuffer acc = new StringBuffer();
int len = t... | java | public static PdfTextArray getKernArray(String text, BaseFont font) {
PdfTextArray pa = new PdfTextArray();
StringBuffer acc = new StringBuffer();
int len = text.length() - 1;
char c[] = text.toCharArray();
if (len >= 0)
acc.append(c, 0, 1);
for (int k = 0; k ... | [
"public",
"static",
"PdfTextArray",
"getKernArray",
"(",
"String",
"text",
",",
"BaseFont",
"font",
")",
"{",
"PdfTextArray",
"pa",
"=",
"new",
"PdfTextArray",
"(",
")",
";",
"StringBuffer",
"acc",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"int",
"len",
"... | Constructs a kern array for a text in a certain font
@param text the text
@param font the font
@return a PdfTextArray | [
"Constructs",
"a",
"kern",
"array",
"for",
"a",
"text",
"in",
"a",
"certain",
"font"
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1451-L1473 |
unbescape/unbescape | src/main/java/org/unbescape/properties/PropertiesEscape.java | PropertiesEscape.escapePropertiesValueMinimal | public static void escapePropertiesValueMinimal(final String text, final Writer writer)
throws IOException {
"""
<p>
Perform a Java Properties Value level 1 (only basic set) <strong>escape</strong> operation
on a <tt>String</tt> input, writing results to a <tt>Writer</tt>.
</p>
<p>
<em>Level 1</em... | java | public static void escapePropertiesValueMinimal(final String text, final Writer writer)
throws IOException {
escapePropertiesValue(text, writer, PropertiesValueEscapeLevel.LEVEL_1_BASIC_ESCAPE_SET);
} | [
"public",
"static",
"void",
"escapePropertiesValueMinimal",
"(",
"final",
"String",
"text",
",",
"final",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"escapePropertiesValue",
"(",
"text",
",",
"writer",
",",
"PropertiesValueEscapeLevel",
".",
"LEVEL_1_BASIC... | <p>
Perform a Java Properties Value level 1 (only basic set) <strong>escape</strong> operation
on a <tt>String</tt> input, writing results to a <tt>Writer</tt>.
</p>
<p>
<em>Level 1</em> means this method will only escape the Java Properties basic escape set:
</p>
<ul>
<li>The <em>Single Escape Characters</em>:
<tt>	... | [
"<p",
">",
"Perform",
"a",
"Java",
"Properties",
"Value",
"level",
"1",
"(",
"only",
"basic",
"set",
")",
"<strong",
">",
"escape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"String<",
"/",
"tt",
">",
"input",
"writing",
"results",
"to",... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L336-L339 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/XmlHttpResponse.java | XmlHttpResponse.getRawXPath | public String getRawXPath(String xPathExpr, Object... params) {
"""
Gets XPath value without checking whether response is valid.
@param xPathExpr expression to apply to response.
@param params values to put inside expression before evaluation
@return result of xpath expression.
"""
return getRawXPat... | java | public String getRawXPath(String xPathExpr, Object... params) {
return getRawXPath(getResponse(), xPathExpr, params);
} | [
"public",
"String",
"getRawXPath",
"(",
"String",
"xPathExpr",
",",
"Object",
"...",
"params",
")",
"{",
"return",
"getRawXPath",
"(",
"getResponse",
"(",
")",
",",
"xPathExpr",
",",
"params",
")",
";",
"}"
] | Gets XPath value without checking whether response is valid.
@param xPathExpr expression to apply to response.
@param params values to put inside expression before evaluation
@return result of xpath expression. | [
"Gets",
"XPath",
"value",
"without",
"checking",
"whether",
"response",
"is",
"valid",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/XmlHttpResponse.java#L63-L65 |
xhsun/gw2wrapper | src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java | AsynchronousRequest.getCharacterSAB | public void getCharacterSAB(String API, String name, Callback<CharacterSAB> callback) throws GuildWars2Exception, NullPointerException {
"""
For more info on Character SAB API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Super_Adventure_Box_.28sab.29">here</a><br/>
Give user the access to {@link ... | java | public void getCharacterSAB(String API, String name, Callback<CharacterSAB> callback) throws GuildWars2Exception, NullPointerException {
isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name));
gw2API.getCharacterSAB(name, API).enqueue(callback);
} | [
"public",
"void",
"getCharacterSAB",
"(",
"String",
"API",
",",
"String",
"name",
",",
"Callback",
"<",
"CharacterSAB",
">",
"callback",
")",
"throws",
"GuildWars2Exception",
",",
"NullPointerException",
"{",
"isParamValid",
"(",
"new",
"ParamChecker",
"(",
"Param... | For more info on Character SAB API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Super_Adventure_Box_.28sab.29">here</a><br/>
Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions
@param API API key
@para... | [
"For",
"more",
"info",
"on",
"Character",
"SAB",
"API",
"go",
"<a",
"href",
"=",
"https",
":",
"//",
"wiki",
".",
"guildwars2",
".",
"com",
"/",
"wiki",
"/",
"API",
":",
"2",
"/",
"characters#Super_Adventure_Box_",
".",
"28sab",
".",
"29",
">",
"here<"... | train | https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L813-L816 |
apereo/cas | support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java | SamlMetadataUIParserAction.verifyRegisteredService | protected void verifyRegisteredService(final RequestContext requestContext, final RegisteredService registeredService) {
"""
Verify registered service.
@param requestContext the request context
@param registeredService the registered service
"""
if (registeredService == null || !registeredServic... | java | protected void verifyRegisteredService(final RequestContext requestContext, final RegisteredService registeredService) {
if (registeredService == null || !registeredService.getAccessStrategy().isServiceAccessAllowed()) {
LOGGER.debug("Service [{}] is not recognized/allowed by the CAS service registr... | [
"protected",
"void",
"verifyRegisteredService",
"(",
"final",
"RequestContext",
"requestContext",
",",
"final",
"RegisteredService",
"registeredService",
")",
"{",
"if",
"(",
"registeredService",
"==",
"null",
"||",
"!",
"registeredService",
".",
"getAccessStrategy",
"(... | Verify registered service.
@param requestContext the request context
@param registeredService the registered service | [
"Verify",
"registered",
"service",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java#L89-L97 |
jenkinsci/jenkins | core/src/main/java/jenkins/model/GlobalConfiguration.java | GlobalConfiguration.configure | @Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
"""
By default, calls {@link StaplerRequest#bindJSON(Object, JSONObject)},
appropriate when your implementation has getters and setters for all fields.
<p>{@inheritDoc}
"""
req.bindJSON(this, json);
... | java | @Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
req.bindJSON(this, json);
return true;
} | [
"@",
"Override",
"public",
"boolean",
"configure",
"(",
"StaplerRequest",
"req",
",",
"JSONObject",
"json",
")",
"throws",
"FormException",
"{",
"req",
".",
"bindJSON",
"(",
"this",
",",
"json",
")",
";",
"return",
"true",
";",
"}"
] | By default, calls {@link StaplerRequest#bindJSON(Object, JSONObject)},
appropriate when your implementation has getters and setters for all fields.
<p>{@inheritDoc} | [
"By",
"default",
"calls",
"{"
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/GlobalConfiguration.java#L65-L69 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java | PropertyBuilder.buildSignature | public void buildSignature(XMLNode node, Content propertyDocTree) {
"""
Build the signature.
@param node the XML element that specifies which components to document
@param propertyDocTree the content tree to which the documentation will be added
"""
propertyDocTree.addContent(writer.getSignature(cu... | java | public void buildSignature(XMLNode node, Content propertyDocTree) {
propertyDocTree.addContent(writer.getSignature(currentProperty));
} | [
"public",
"void",
"buildSignature",
"(",
"XMLNode",
"node",
",",
"Content",
"propertyDocTree",
")",
"{",
"propertyDocTree",
".",
"addContent",
"(",
"writer",
".",
"getSignature",
"(",
"currentProperty",
")",
")",
";",
"}"
] | Build the signature.
@param node the XML element that specifies which components to document
@param propertyDocTree the content tree to which the documentation will be added | [
"Build",
"the",
"signature",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java#L164-L166 |
WiQuery/wiquery | wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/accordion/Accordion.java | Accordion.setIcons | public Accordion setIcons(UiIcon header, UiIcon headerSelected) {
"""
Icons to use for headers.
@param header
@param headerSelected
@return instance of the current component
"""
setIcons(new AccordionIcon(header, headerSelected));
return this;
} | java | public Accordion setIcons(UiIcon header, UiIcon headerSelected)
{
setIcons(new AccordionIcon(header, headerSelected));
return this;
} | [
"public",
"Accordion",
"setIcons",
"(",
"UiIcon",
"header",
",",
"UiIcon",
"headerSelected",
")",
"{",
"setIcons",
"(",
"new",
"AccordionIcon",
"(",
"header",
",",
"headerSelected",
")",
")",
";",
"return",
"this",
";",
"}"
] | Icons to use for headers.
@param header
@param headerSelected
@return instance of the current component | [
"Icons",
"to",
"use",
"for",
"headers",
"."
] | train | https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/accordion/Accordion.java#L323-L327 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.getEntitySuggestionsAsync | public Observable<List<EntitiesSuggestionExample>> getEntitySuggestionsAsync(UUID appId, String versionId, UUID entityId, GetEntitySuggestionsOptionalParameter getEntitySuggestionsOptionalParameter) {
"""
Get suggestion examples that would improve the accuracy of the entity model.
@param appId The application I... | java | public Observable<List<EntitiesSuggestionExample>> getEntitySuggestionsAsync(UUID appId, String versionId, UUID entityId, GetEntitySuggestionsOptionalParameter getEntitySuggestionsOptionalParameter) {
return getEntitySuggestionsWithServiceResponseAsync(appId, versionId, entityId, getEntitySuggestionsOptionalPar... | [
"public",
"Observable",
"<",
"List",
"<",
"EntitiesSuggestionExample",
">",
">",
"getEntitySuggestionsAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"GetEntitySuggestionsOptionalParameter",
"getEntitySuggestionsOptionalParameter",
")... | Get suggestion examples that would improve the accuracy of the entity model.
@param appId The application ID.
@param versionId The version ID.
@param entityId The target entity extractor model to enhance.
@param getEntitySuggestionsOptionalParameter the object representing the optional parameters to be set before call... | [
"Get",
"suggestion",
"examples",
"that",
"would",
"improve",
"the",
"accuracy",
"of",
"the",
"entity",
"model",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L5287-L5294 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedceph/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedceph.java | ApiOvhDedicatedceph.serviceName_user_userName_pool_PUT | public String serviceName_user_userName_pool_PUT(String serviceName, String userName, Boolean classRead, Boolean classWrite, Boolean execute, String poolName, Boolean read, Boolean write) throws IOException {
"""
Update user-pool permission for single pool
REST: PUT /dedicated/ceph/{serviceName}/user/{userName}... | java | public String serviceName_user_userName_pool_PUT(String serviceName, String userName, Boolean classRead, Boolean classWrite, Boolean execute, String poolName, Boolean read, Boolean write) throws IOException {
String qPath = "/dedicated/ceph/{serviceName}/user/{userName}/pool";
StringBuilder sb = path(qPath, service... | [
"public",
"String",
"serviceName_user_userName_pool_PUT",
"(",
"String",
"serviceName",
",",
"String",
"userName",
",",
"Boolean",
"classRead",
",",
"Boolean",
"classWrite",
",",
"Boolean",
"execute",
",",
"String",
"poolName",
",",
"Boolean",
"read",
",",
"Boolean"... | Update user-pool permission for single pool
REST: PUT /dedicated/ceph/{serviceName}/user/{userName}/pool
@param userName [required] Name of ceph user
@param serviceName [required] ID of cluster
@param write [required] Write permission
@param execute [required] Execute permission
@param classWrite [required] Class writ... | [
"Update",
"user",
"-",
"pool",
"permission",
"for",
"single",
"pool"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedceph/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedceph.java#L304-L316 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/access/permission/CombinationManagementPermission.java | CombinationManagementPermission.addUnderlyingPermission | public void addUnderlyingPermission(String permissionName, ManagementPermission underlyingPermission) {
"""
Adds a permission.
<p>
This method should not be called after the instance has been made visible to another thread
than the one that constructed it.
</p>
@param permissionName name of the permission to ... | java | public void addUnderlyingPermission(String permissionName, ManagementPermission underlyingPermission) {
assert underlyingPermission.getActionEffect() == getActionEffect() : "incompatible ActionEffect";
if (combinationPolicy == CombinationPolicy.REJECTING && underlyingPermissions.size() > 0) {
... | [
"public",
"void",
"addUnderlyingPermission",
"(",
"String",
"permissionName",
",",
"ManagementPermission",
"underlyingPermission",
")",
"{",
"assert",
"underlyingPermission",
".",
"getActionEffect",
"(",
")",
"==",
"getActionEffect",
"(",
")",
":",
"\"incompatible ActionE... | Adds a permission.
<p>
This method should not be called after the instance has been made visible to another thread
than the one that constructed it.
</p>
@param permissionName name of the permission to add. Cannot be {@code null}
@param underlyingPermission the permission. Cannot be {@code null} | [
"Adds",
"a",
"permission",
".",
"<p",
">",
"This",
"method",
"should",
"not",
"be",
"called",
"after",
"the",
"instance",
"has",
"been",
"made",
"visible",
"to",
"another",
"thread",
"than",
"the",
"one",
"that",
"constructed",
"it",
".",
"<",
"/",
"p",
... | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/access/permission/CombinationManagementPermission.java#L60-L66 |
marklogic/marklogic-contentpump | mapreduce/src/main/java/com/marklogic/mapreduce/ForestReader.java | ForestReader.setSkipKey | protected void setSkipKey(String sub, int line, int col, String reason) {
"""
Set the result as
DocumentURI key.
@param uri Source string of document URI.
@param line Line number in the source if applicable; -1 otherwise.
@param col Column number in the source if applicable; -1 otherwise.
@param reason Reas... | java | protected void setSkipKey(String sub, int line, int col, String reason) {
if (srcId == null) {
srcId = split.getPath().toString();
}
if (key == null) {
key = new DocumentURIWithSourceInfo("", srcId, sub, line, col);
} else {
key.setUri("");
... | [
"protected",
"void",
"setSkipKey",
"(",
"String",
"sub",
",",
"int",
"line",
",",
"int",
"col",
",",
"String",
"reason",
")",
"{",
"if",
"(",
"srcId",
"==",
"null",
")",
"{",
"srcId",
"=",
"split",
".",
"getPath",
"(",
")",
".",
"toString",
"(",
")... | Set the result as
DocumentURI key.
@param uri Source string of document URI.
@param line Line number in the source if applicable; -1 otherwise.
@param col Column number in the source if applicable; -1 otherwise.
@param reason Reason for skipping.
@return true if key indicates the record is to be skipped; false
otherw... | [
"Set",
"the",
"result",
"as",
"DocumentURI",
"key",
"."
] | train | https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mapreduce/src/main/java/com/marklogic/mapreduce/ForestReader.java#L226-L244 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/RoundedBorder.java | RoundedBorder.getInteriorRectangle | public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) {
"""
Gets the interior rectangle.
@param c
the target component.
@param b
the border.
@param x
the x coordinate.
@param y
the y coordinate.
@param width
the width.
@param height
the height.
@ret... | java | public static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height) {
final Insets insets;
if (b != null) {
insets = b.getBorderInsets(c);
} else {
insets = new Insets(0, 0, 0, 0);
}
return new Rectangle(x + insets.le... | [
"public",
"static",
"Rectangle",
"getInteriorRectangle",
"(",
"Component",
"c",
",",
"Border",
"b",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"final",
"Insets",
"insets",
";",
"if",
"(",
"b",
"!=",
"null",
... | Gets the interior rectangle.
@param c
the target component.
@param b
the border.
@param x
the x coordinate.
@param y
the y coordinate.
@param width
the width.
@param height
the height.
@return the rectangle. | [
"Gets",
"the",
"interior",
"rectangle",
"."
] | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/RoundedBorder.java#L167-L180 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java | Gen.genStat | public void genStat(JCTree tree, Env<GenContext> env, int crtFlags) {
"""
Derived visitor method: check whether CharacterRangeTable
should be emitted, if so, put a new entry into CRTable
and call method to generate bytecode.
If not, just call method to generate bytecode.
@see #genStat(JCTree, Env)
@param... | java | public void genStat(JCTree tree, Env<GenContext> env, int crtFlags) {
if (!genCrt) {
genStat(tree, env);
return;
}
int startpc = code.curCP();
genStat(tree, env);
if (tree.hasTag(Tag.BLOCK)) crtFlags |= CRT_BLOCK;
code.crt.put(tree, crtFlags, start... | [
"public",
"void",
"genStat",
"(",
"JCTree",
"tree",
",",
"Env",
"<",
"GenContext",
">",
"env",
",",
"int",
"crtFlags",
")",
"{",
"if",
"(",
"!",
"genCrt",
")",
"{",
"genStat",
"(",
"tree",
",",
"env",
")",
";",
"return",
";",
"}",
"int",
"startpc",... | Derived visitor method: check whether CharacterRangeTable
should be emitted, if so, put a new entry into CRTable
and call method to generate bytecode.
If not, just call method to generate bytecode.
@see #genStat(JCTree, Env)
@param tree The tree to be visited.
@param env The environment to use.
@param c... | [
"Derived",
"visitor",
"method",
":",
"check",
"whether",
"CharacterRangeTable",
"should",
"be",
"emitted",
"if",
"so",
"put",
"a",
"new",
"entry",
"into",
"CRTable",
"and",
"call",
"method",
"to",
"generate",
"bytecode",
".",
"If",
"not",
"just",
"call",
"me... | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L612-L621 |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.splitBracketsAsList | @Pure
@Inline(value = "textUtil.splitAsList(' {
"""
Split the given string according to brackets.
The brackets are used to delimit the groups
of characters.
<p>Examples:
<ul>
<li><code>splitBrackets("{a}{b}{cd}")</code> returns the array
<code>["a","b","cd"]</code></li>
<li><code>splitBrackets("abcd")</c... | java | @Pure
@Inline(value = "textUtil.splitAsList('{', '}', $1)", imported = {TextUtil.class})
public static List<String> splitBracketsAsList(String str) {
return splitAsList('{', '}', str);
} | [
"@",
"Pure",
"@",
"Inline",
"(",
"value",
"=",
"\"textUtil.splitAsList('{', '}', $1)\"",
",",
"imported",
"=",
"{",
"TextUtil",
".",
"class",
"}",
")",
"public",
"static",
"List",
"<",
"String",
">",
"splitBracketsAsList",
"(",
"String",
"str",
")",
"{",
"re... | Split the given string according to brackets.
The brackets are used to delimit the groups
of characters.
<p>Examples:
<ul>
<li><code>splitBrackets("{a}{b}{cd}")</code> returns the array
<code>["a","b","cd"]</code></li>
<li><code>splitBrackets("abcd")</code> returns the array
<code>["abcd"]</code></li>
<li><code>splitB... | [
"Split",
"the",
"given",
"string",
"according",
"to",
"brackets",
".",
"The",
"brackets",
"are",
"used",
"to",
"delimit",
"the",
"groups",
"of",
"characters",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L663-L667 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java | PerspectiveOps.projectionCombine | public static void projectionCombine( DMatrixRMaj M , Vector3D_F64 T , DMatrixRMaj P ) {
"""
P = [M|T]
@param M (Input) 3x3 matrix
@param T (Input) 3x1 vector
@param P (Output) [M,T]
"""
CommonOps_DDRM.insert(M,P,0,0);
P.data[3] = T.x;
P.data[7] = T.y;
P.data[11] = T.z;
} | java | public static void projectionCombine( DMatrixRMaj M , Vector3D_F64 T , DMatrixRMaj P ) {
CommonOps_DDRM.insert(M,P,0,0);
P.data[3] = T.x;
P.data[7] = T.y;
P.data[11] = T.z;
} | [
"public",
"static",
"void",
"projectionCombine",
"(",
"DMatrixRMaj",
"M",
",",
"Vector3D_F64",
"T",
",",
"DMatrixRMaj",
"P",
")",
"{",
"CommonOps_DDRM",
".",
"insert",
"(",
"M",
",",
"P",
",",
"0",
",",
"0",
")",
";",
"P",
".",
"data",
"[",
"3",
"]",... | P = [M|T]
@param M (Input) 3x3 matrix
@param T (Input) 3x1 vector
@param P (Output) [M,T] | [
"P",
"=",
"[",
"M|T",
"]"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L677-L682 |
cubedtear/aritzh | aritzh-gameEngine/src/main/java/io/github/aritzhack/aritzh/awt/util/SpriteUtil.java | SpriteUtil.rotate90 | public static Sprite rotate90(Sprite original, Rotation angle) {
"""
Rotates an image by multiples of 90 degrees
This is a much faster version of
{@link io.github.aritzhack.aritzh.awt.util.SpriteUtil#rotate(io.github.aritzhack.aritzh.awt.render.Sprite, double) SpriteUtil.rotate(Sprite, double)}
@param origina... | java | public static Sprite rotate90(Sprite original, Rotation angle) {
int newWidth = angle == Rotation._180 ? original.getWidth() : original.getHeight();
int newHeight = angle == Rotation._180 ? original.getHeight() : original.getWidth();
int[] newPix = new int[original.getPixels().length];
for (int x = 0; x < orig... | [
"public",
"static",
"Sprite",
"rotate90",
"(",
"Sprite",
"original",
",",
"Rotation",
"angle",
")",
"{",
"int",
"newWidth",
"=",
"angle",
"==",
"Rotation",
".",
"_180",
"?",
"original",
".",
"getWidth",
"(",
")",
":",
"original",
".",
"getHeight",
"(",
"... | Rotates an image by multiples of 90 degrees
This is a much faster version of
{@link io.github.aritzhack.aritzh.awt.util.SpriteUtil#rotate(io.github.aritzhack.aritzh.awt.render.Sprite, double) SpriteUtil.rotate(Sprite, double)}
@param original The sprite to rotate
@param angle The rotation angle
@return The rotated ... | [
"Rotates",
"an",
"image",
"by",
"multiples",
"of",
"90",
"degrees",
"This",
"is",
"a",
"much",
"faster",
"version",
"of",
"{",
"@link",
"io",
".",
"github",
".",
"aritzhack",
".",
"aritzh",
".",
"awt",
".",
"util",
".",
"SpriteUtil#rotate",
"(",
"io",
... | train | https://github.com/cubedtear/aritzh/blob/bc7493447a1a6088c4a7306ca4d0f0c20278364f/aritzh-gameEngine/src/main/java/io/github/aritzhack/aritzh/awt/util/SpriteUtil.java#L367-L381 |
liferay/com-liferay-commerce | commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java | CommerceNotificationAttachmentPersistenceImpl.findByUuid | @Override
public List<CommerceNotificationAttachment> findByUuid(String uuid,
int start, int end) {
"""
Returns a range of all the commerce notification attachments where uuid = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>e... | java | @Override
public List<CommerceNotificationAttachment> findByUuid(String uuid,
int start, int end) {
return findByUuid(uuid, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceNotificationAttachment",
">",
"findByUuid",
"(",
"String",
"uuid",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByUuid",
"(",
"uuid",
",",
"start",
",",
"end",
",",
"null",
")",
";",
"}... | Returns a range of all the commerce notification attachments where uuid = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"notification",
"attachments",
"where",
"uuid",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationAttachmentPersistenceImpl.java#L145-L149 |
apptentive/apptentive-android | apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java | Util.copyFile | public static int copyFile(String from, String to) {
"""
This function copies file from one location to another
@param from the full path to the source file
@param to the full path to the destination file
@return total bytes copied. 0 indicates
"""
InputStream inStream = null;
FileOutputStream fs = ... | java | public static int copyFile(String from, String to) {
InputStream inStream = null;
FileOutputStream fs = null;
try {
int bytesum = 0;
int byteread;
File oldfile = new File(from);
if (oldfile.exists()) {
inStream = new FileInputStream(from);
fs = new FileOutputStream(to);
byte[] buffer = new... | [
"public",
"static",
"int",
"copyFile",
"(",
"String",
"from",
",",
"String",
"to",
")",
"{",
"InputStream",
"inStream",
"=",
"null",
";",
"FileOutputStream",
"fs",
"=",
"null",
";",
"try",
"{",
"int",
"bytesum",
"=",
"0",
";",
"int",
"byteread",
";",
"... | This function copies file from one location to another
@param from the full path to the source file
@param to the full path to the destination file
@return total bytes copied. 0 indicates | [
"This",
"function",
"copies",
"file",
"from",
"one",
"location",
"to",
"another"
] | train | https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L705-L728 |
apache/groovy | src/main/groovy/groovy/lang/ExpandoMetaClass.java | ExpandoMetaClass.invokeStaticMethod | public Object invokeStaticMethod(Object object, String methodName, Object[] arguments) {
"""
Overrides default implementation just in case a static invoke method has been set on ExpandoMetaClass
@see MetaClassImpl#invokeStaticMethod(Object, String, Object[])
"""
if (invokeStaticMethodMethod != null)... | java | public Object invokeStaticMethod(Object object, String methodName, Object[] arguments) {
if (invokeStaticMethodMethod != null) {
MetaClassHelper.unwrap(arguments);
return invokeStaticMethodMethod.invoke(object, new Object[]{methodName, arguments});
}
return super.invokeSt... | [
"public",
"Object",
"invokeStaticMethod",
"(",
"Object",
"object",
",",
"String",
"methodName",
",",
"Object",
"[",
"]",
"arguments",
")",
"{",
"if",
"(",
"invokeStaticMethodMethod",
"!=",
"null",
")",
"{",
"MetaClassHelper",
".",
"unwrap",
"(",
"arguments",
"... | Overrides default implementation just in case a static invoke method has been set on ExpandoMetaClass
@see MetaClassImpl#invokeStaticMethod(Object, String, Object[]) | [
"Overrides",
"default",
"implementation",
"just",
"in",
"case",
"a",
"static",
"invoke",
"method",
"has",
"been",
"set",
"on",
"ExpandoMetaClass"
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/ExpandoMetaClass.java#L1133-L1139 |
kevinherron/opc-ua-stack | stack-client/src/main/java/com/digitalpetri/opcua/stack/client/UaTcpStackClient.java | UaTcpStackClient.findServers | public static CompletableFuture<ApplicationDescription[]> findServers(String endpointUrl) {
"""
Query the FindServers service at the given endpoint URL.
<p>
The endpoint URL(s) for each server {@link ApplicationDescription} returned can then be used in a
{@link #getEndpoints(String)} call to discover the endpoi... | java | public static CompletableFuture<ApplicationDescription[]> findServers(String endpointUrl) {
UaTcpStackClientConfig config = UaTcpStackClientConfig.builder()
.setEndpointUrl(endpointUrl)
.build();
UaTcpStackClient client = new UaTcpStackClient(config);
FindServer... | [
"public",
"static",
"CompletableFuture",
"<",
"ApplicationDescription",
"[",
"]",
">",
"findServers",
"(",
"String",
"endpointUrl",
")",
"{",
"UaTcpStackClientConfig",
"config",
"=",
"UaTcpStackClientConfig",
".",
"builder",
"(",
")",
".",
"setEndpointUrl",
"(",
"en... | Query the FindServers service at the given endpoint URL.
<p>
The endpoint URL(s) for each server {@link ApplicationDescription} returned can then be used in a
{@link #getEndpoints(String)} call to discover the endpoints for that server.
@param endpointUrl the endpoint URL to find servers at.
@return the {@link Applica... | [
"Query",
"the",
"FindServers",
"service",
"at",
"the",
"given",
"endpoint",
"URL",
".",
"<p",
">",
"The",
"endpoint",
"URL",
"(",
"s",
")",
"for",
"each",
"server",
"{",
"@link",
"ApplicationDescription",
"}",
"returned",
"can",
"then",
"be",
"used",
"in",... | train | https://github.com/kevinherron/opc-ua-stack/blob/007f4e5c4ff102814bec17bb7c41f27e2e52f2fd/stack-client/src/main/java/com/digitalpetri/opcua/stack/client/UaTcpStackClient.java#L390-L404 |
msgpack/msgpack-java | msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java | MessageUnpacker.unpackFloat | public float unpackFloat()
throws IOException {
"""
Reads a float.
This method rounds value to the range of float when precision of the read value is larger than the range of float. This may happen when {@link #getNextFormat()} returns FLOAT64.
@return the read value
@throws MessageTypeException... | java | public float unpackFloat()
throws IOException
{
byte b = readByte();
switch (b) {
case Code.FLOAT32: // float
float fv = readFloat();
return fv;
case Code.FLOAT64: // double
double dv = readDouble();
... | [
"public",
"float",
"unpackFloat",
"(",
")",
"throws",
"IOException",
"{",
"byte",
"b",
"=",
"readByte",
"(",
")",
";",
"switch",
"(",
"b",
")",
"{",
"case",
"Code",
".",
"FLOAT32",
":",
"// float",
"float",
"fv",
"=",
"readFloat",
"(",
")",
";",
"ret... | Reads a float.
This method rounds value to the range of float when precision of the read value is larger than the range of float. This may happen when {@link #getNextFormat()} returns FLOAT64.
@return the read value
@throws MessageTypeException when value is not MessagePack Float type
@throws IOException when underly... | [
"Reads",
"a",
"float",
"."
] | train | https://github.com/msgpack/msgpack-java/blob/16e370e348215a72a14c210b42d448d513aee015/msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java#L1079-L1092 |
jenkinsci/jenkins | core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java | HudsonPrivateSecurityRealm.doCreateFirstAccount | @RequirePOST
public void doCreateFirstAccount(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
"""
Creates a first admin user account.
<p>
This can be run by anyone, but only to create the very first user account.
"""
if(hasSomeUser()) {
rsp.sendError(... | java | @RequirePOST
public void doCreateFirstAccount(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
if(hasSomeUser()) {
rsp.sendError(SC_UNAUTHORIZED,"First user was already created");
return;
}
User u = createAccount(req, rsp, false, "firstU... | [
"@",
"RequirePOST",
"public",
"void",
"doCreateFirstAccount",
"(",
"StaplerRequest",
"req",
",",
"StaplerResponse",
"rsp",
")",
"throws",
"IOException",
",",
"ServletException",
"{",
"if",
"(",
"hasSomeUser",
"(",
")",
")",
"{",
"rsp",
".",
"sendError",
"(",
"... | Creates a first admin user account.
<p>
This can be run by anyone, but only to create the very first user account. | [
"Creates",
"a",
"first",
"admin",
"user",
"account",
"."
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java#L348-L359 |
kwon37xi/hibernate4-memcached | hibernate4-memcached-spymemcached-adapter/src/main/java/kr/pe/kwonnam/hibernate4memcached/spymemcached/SpyMemcachedAdapter.java | SpyMemcachedAdapter.getNamespacedKey | String getNamespacedKey(CacheNamespace cacheNamespace, String key) {
"""
Return cache namespace decorated key.
@param cacheNamespace cache namespace
@param key cache key
@return namespace infomation prefixed cache key
"""
String namespaceIndicator = getNamespaceIndicator(cacheNamespace);
... | java | String getNamespacedKey(CacheNamespace cacheNamespace, String key) {
String namespaceIndicator = getNamespaceIndicator(cacheNamespace);
if (cacheNamespace.isNamespaceExpirationRequired() == false) {
return namespaceIndicator + ":" + key;
}
String namespaceIndicatorKey = nam... | [
"String",
"getNamespacedKey",
"(",
"CacheNamespace",
"cacheNamespace",
",",
"String",
"key",
")",
"{",
"String",
"namespaceIndicator",
"=",
"getNamespaceIndicator",
"(",
"cacheNamespace",
")",
";",
"if",
"(",
"cacheNamespace",
".",
"isNamespaceExpirationRequired",
"(",
... | Return cache namespace decorated key.
@param cacheNamespace cache namespace
@param key cache key
@return namespace infomation prefixed cache key | [
"Return",
"cache",
"namespace",
"decorated",
"key",
"."
] | train | https://github.com/kwon37xi/hibernate4-memcached/blob/e0b2839ab257b2602344f54ca53c564044f3585d/hibernate4-memcached-spymemcached-adapter/src/main/java/kr/pe/kwonnam/hibernate4memcached/spymemcached/SpyMemcachedAdapter.java#L133-L145 |
knowm/XChange | xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/service/BitstampAccountService.java | BitstampAccountService.requestDepositAddress | @Override
public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
"""
This returns the currently set deposit address. It will not generate a new address (ie.
repeated calls will return the same address).
"""
if (currency.equals(Currency.BTC)) {
return getBi... | java | @Override
public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
if (currency.equals(Currency.BTC)) {
return getBitstampBitcoinDepositAddress().getDepositAddress();
} else if (currency.equals(Currency.LTC)) {
return getBitstampLitecoinDepositAddress().getD... | [
"@",
"Override",
"public",
"String",
"requestDepositAddress",
"(",
"Currency",
"currency",
",",
"String",
"...",
"arguments",
")",
"throws",
"IOException",
"{",
"if",
"(",
"currency",
".",
"equals",
"(",
"Currency",
".",
"BTC",
")",
")",
"{",
"return",
"getB... | This returns the currently set deposit address. It will not generate a new address (ie.
repeated calls will return the same address). | [
"This",
"returns",
"the",
"currently",
"set",
"deposit",
"address",
".",
"It",
"will",
"not",
"generate",
"a",
"new",
"address",
"(",
"ie",
".",
"repeated",
"calls",
"will",
"return",
"the",
"same",
"address",
")",
"."
] | train | https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/service/BitstampAccountService.java#L113-L128 |
google/error-prone-javac | src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java | AbstractExecutableMemberWriter.addParameters | protected void addParameters(ExecutableMemberDoc member, Content htmltree, int indentSize) {
"""
Add all the parameters for the executable member.
@param member the member to write parameters for.
@param htmltree the content tree to which the parameters information will be added.
"""
addParameters(... | java | protected void addParameters(ExecutableMemberDoc member, Content htmltree, int indentSize) {
addParameters(member, true, htmltree, indentSize);
} | [
"protected",
"void",
"addParameters",
"(",
"ExecutableMemberDoc",
"member",
",",
"Content",
"htmltree",
",",
"int",
"indentSize",
")",
"{",
"addParameters",
"(",
"member",
",",
"true",
",",
"htmltree",
",",
"indentSize",
")",
";",
"}"
] | Add all the parameters for the executable member.
@param member the member to write parameters for.
@param htmltree the content tree to which the parameters information will be added. | [
"Add",
"all",
"the",
"parameters",
"for",
"the",
"executable",
"member",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java#L175-L177 |
tvesalainen/util | security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java | SSLServerSocketChannel.open | public static SSLServerSocketChannel open(int port, SSLContext sslContext) throws IOException {
"""
Creates and binds SSLServerSocketChannel using given SSLContext.
@param port
@param sslContext
@return
@throws IOException
"""
return open(new InetSocketAddress(port), sslContext);
} | java | public static SSLServerSocketChannel open(int port, SSLContext sslContext) throws IOException
{
return open(new InetSocketAddress(port), sslContext);
} | [
"public",
"static",
"SSLServerSocketChannel",
"open",
"(",
"int",
"port",
",",
"SSLContext",
"sslContext",
")",
"throws",
"IOException",
"{",
"return",
"open",
"(",
"new",
"InetSocketAddress",
"(",
"port",
")",
",",
"sslContext",
")",
";",
"}"
] | Creates and binds SSLServerSocketChannel using given SSLContext.
@param port
@param sslContext
@return
@throws IOException | [
"Creates",
"and",
"binds",
"SSLServerSocketChannel",
"using",
"given",
"SSLContext",
"."
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java#L94-L97 |
io7m/jaffirm | com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java | Invariants.checkInvariantD | public static double checkInvariantD(
final double value,
final DoublePredicate predicate,
final DoubleFunction<String> describer) {
"""
A {@code double} specialized version of {@link #checkInvariant(Object,
Predicate, Function)}
@param value The value
@param predicate The predicate
@param de... | java | public static double checkInvariantD(
final double value,
final DoublePredicate predicate,
final DoubleFunction<String> describer)
{
final boolean ok;
try {
ok = predicate.test(value);
} catch (final Throwable e) {
final Violations violations = singleViolation(failedPredicate(e));
... | [
"public",
"static",
"double",
"checkInvariantD",
"(",
"final",
"double",
"value",
",",
"final",
"DoublePredicate",
"predicate",
",",
"final",
"DoubleFunction",
"<",
"String",
">",
"describer",
")",
"{",
"final",
"boolean",
"ok",
";",
"try",
"{",
"ok",
"=",
"... | A {@code double} specialized version of {@link #checkInvariant(Object,
Predicate, Function)}
@param value The value
@param predicate The predicate
@param describer The describer of the predicate
@return value
@throws InvariantViolationException If the predicate is false | [
"A",
"{",
"@code",
"double",
"}",
"specialized",
"version",
"of",
"{",
"@link",
"#checkInvariant",
"(",
"Object",
"Predicate",
"Function",
")",
"}"
] | train | https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java#L521-L536 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java | CPMeasurementUnitPersistenceImpl.findAll | @Override
public List<CPMeasurementUnit> findAll(int start, int end) {
"""
Returns a range of all the cp measurement units.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result ... | java | @Override
public List<CPMeasurementUnit> findAll(int start, int end) {
return findAll(start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CPMeasurementUnit",
">",
"findAll",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findAll",
"(",
"start",
",",
"end",
",",
"null",
")",
";",
"}"
] | Returns a range of all the cp measurement units.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"cp",
"measurement",
"units",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java#L4146-L4149 |
Samsung/GearVRf | GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java | GVRMaterial.setTextureAtlasInfo | public void setTextureAtlasInfo(String key, float[] offset, float[] scale) {
"""
Set the light map information(offset and scale) at UV space to
map the light map texture to the mesh.
@param key
Prefix name of the uniform at light map shader:
([key]_texture, [key]_offset and [key]_scale.
@param offset
Array... | java | public void setTextureAtlasInfo(String key, float[] offset, float[] scale) {
setTextureOffset(key, offset);
setTextureScale(key, scale);
} | [
"public",
"void",
"setTextureAtlasInfo",
"(",
"String",
"key",
",",
"float",
"[",
"]",
"offset",
",",
"float",
"[",
"]",
"scale",
")",
"{",
"setTextureOffset",
"(",
"key",
",",
"offset",
")",
";",
"setTextureScale",
"(",
"key",
",",
"scale",
")",
";",
... | Set the light map information(offset and scale) at UV space to
map the light map texture to the mesh.
@param key
Prefix name of the uniform at light map shader:
([key]_texture, [key]_offset and [key]_scale.
@param offset
Array with x and y offset values at UV space
to map the 2D texture to the mesh.
@param scale
Array... | [
"Set",
"the",
"light",
"map",
"information",
"(",
"offset",
"and",
"scale",
")",
"at",
"UV",
"space",
"to",
"map",
"the",
"light",
"map",
"texture",
"to",
"the",
"mesh",
"."
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRMaterial.java#L280-L283 |
ZuInnoTe/hadoopoffice | flinkds/src/main/java/org/zuinnote/flink/office/excel/SimpleExcelFlinkFileInputFormat.java | SimpleExcelFlinkFileInputFormat.reopen | public void reopen(FileInputSplit split, Tuple3<Long, Long, GenericDataType[]> state) throws IOException {
"""
*
Restore reading from a certain row/sheet position and restore schema without
rereadingit.
@param split
@param state
@throws IOException
"""
this.customSchema = state.f2;
this.open(split);... | java | public void reopen(FileInputSplit split, Tuple3<Long, Long, GenericDataType[]> state) throws IOException {
this.customSchema = state.f2;
this.open(split);
this.getOfficeReader().getCurrentParser().setCurrentSheet(state.f0);
this.getOfficeReader().getCurrentParser().setCurrentRow(state.f1);
} | [
"public",
"void",
"reopen",
"(",
"FileInputSplit",
"split",
",",
"Tuple3",
"<",
"Long",
",",
"Long",
",",
"GenericDataType",
"[",
"]",
">",
"state",
")",
"throws",
"IOException",
"{",
"this",
".",
"customSchema",
"=",
"state",
".",
"f2",
";",
"this",
"."... | *
Restore reading from a certain row/sheet position and restore schema without
rereadingit.
@param split
@param state
@throws IOException | [
"*",
"Restore",
"reading",
"from",
"a",
"certain",
"row",
"/",
"sheet",
"position",
"and",
"restore",
"schema",
"without",
"rereadingit",
"."
] | train | https://github.com/ZuInnoTe/hadoopoffice/blob/58fc9223ee290bcb14847aaaff3fadf39c465e46/flinkds/src/main/java/org/zuinnote/flink/office/excel/SimpleExcelFlinkFileInputFormat.java#L143-L149 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java | ManagementClient.deleteRule | public Void deleteRule(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException {
"""
Deletes the rule for a given topic-subscription.
@param topicPath - The name of the topic.
@param subscriptionName - The name of the subscription.
@param ruleName - The name ... | java | public Void deleteRule(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException {
return Utils.completeFuture(this.asyncClient.deleteRuleAsync(topicPath, subscriptionName, ruleName));
} | [
"public",
"Void",
"deleteRule",
"(",
"String",
"topicPath",
",",
"String",
"subscriptionName",
",",
"String",
"ruleName",
")",
"throws",
"ServiceBusException",
",",
"InterruptedException",
"{",
"return",
"Utils",
".",
"completeFuture",
"(",
"this",
".",
"asyncClient... | Deletes the rule for a given topic-subscription.
@param topicPath - The name of the topic.
@param subscriptionName - The name of the subscription.
@param ruleName - The name of the rule.
@throws IllegalArgumentException - path is not null / empty / too long / invalid.
@throws TimeoutException - The operation times out.... | [
"Deletes",
"the",
"rule",
"for",
"a",
"given",
"topic",
"-",
"subscription",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L615-L617 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java | ManagedDatabasesInner.beginCreateOrUpdateAsync | public Observable<ManagedDatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) {
"""
Creates a new database or updates an existing database.
@param resourceGroupName The name of the resource group that contains the res... | java | public Observable<ManagedDatabaseInner> beginCreateOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).map(new Func1<Servic... | [
"public",
"Observable",
"<",
"ManagedDatabaseInner",
">",
"beginCreateOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"managedInstanceName",
",",
"String",
"databaseName",
",",
"ManagedDatabaseInner",
"parameters",
")",
"{",
"return",
"beginCreateOrUpdate... | Creates a new database or updates an existing database.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param managedInstanceName The name of the managed instance.
@param databaseName The name of the datab... | [
"Creates",
"a",
"new",
"database",
"or",
"updates",
"an",
"existing",
"database",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L628-L635 |
goldmansachs/gs-collections | collections/src/main/java/com/gs/collections/impl/utility/internal/RandomAccessListIterate.java | RandomAccessListIterate.forEachInBoth | public static <T1, T2> void forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1, ? super T2> procedure) {
"""
For each element in both of the Lists, operation is evaluated with both elements as parameters.
"""
if (list1 != null && list2 != null)
{
int size1 = list1.s... | java | public static <T1, T2> void forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1, ? super T2> procedure)
{
if (list1 != null && list2 != null)
{
int size1 = list1.size();
int size2 = list2.size();
if (size1 == size2)
{
fo... | [
"public",
"static",
"<",
"T1",
",",
"T2",
">",
"void",
"forEachInBoth",
"(",
"List",
"<",
"T1",
">",
"list1",
",",
"List",
"<",
"T2",
">",
"list2",
",",
"Procedure2",
"<",
"?",
"super",
"T1",
",",
"?",
"super",
"T2",
">",
"procedure",
")",
"{",
"... | For each element in both of the Lists, operation is evaluated with both elements as parameters. | [
"For",
"each",
"element",
"in",
"both",
"of",
"the",
"Lists",
"operation",
"is",
"evaluated",
"with",
"both",
"elements",
"as",
"parameters",
"."
] | train | https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/internal/RandomAccessListIterate.java#L690-L711 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | SeaGlassSynthPainterImpl.paintBackground | private void paintBackground(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) {
"""
Paint the object's background.
@param ctx the SynthContext.
@param g the Graphics context.
@param x the x location corresponding to the upper-left
coordinate to paint.... | java | private void paintBackground(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) {
// if the background color of the component is 100% transparent
// then we should not paint any background graphics. This is a solution
// for there being no way of turning off Nim... | [
"private",
"void",
"paintBackground",
"(",
"SynthContext",
"ctx",
",",
"Graphics",
"g",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"w",
",",
"int",
"h",
",",
"AffineTransform",
"transform",
")",
"{",
"// if the background color of the component is 100% transpar... | Paint the object's background.
@param ctx the SynthContext.
@param g the Graphics context.
@param x the x location corresponding to the upper-left
coordinate to paint.
@param y the y location corresponding to the upper left
coordinate to paint.
@param w the width to paint.
@param ... | [
"Paint",
"the",
"object",
"s",
"background",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java#L133-L148 |
BoltsFramework/Bolts-Android | bolts-tasks/src/main/java/bolts/Task.java | Task.onSuccessTask | public <TContinuationResult> Task<TContinuationResult> onSuccessTask(
final Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor) {
"""
Runs a continuation when a task completes successfully, forwarding along
{@link java.lang.Exception}s or cancellation.
"""
return onSucc... | java | public <TContinuationResult> Task<TContinuationResult> onSuccessTask(
final Continuation<TResult, Task<TContinuationResult>> continuation, Executor executor) {
return onSuccessTask(continuation, executor, null);
} | [
"public",
"<",
"TContinuationResult",
">",
"Task",
"<",
"TContinuationResult",
">",
"onSuccessTask",
"(",
"final",
"Continuation",
"<",
"TResult",
",",
"Task",
"<",
"TContinuationResult",
">",
">",
"continuation",
",",
"Executor",
"executor",
")",
"{",
"return",
... | Runs a continuation when a task completes successfully, forwarding along
{@link java.lang.Exception}s or cancellation. | [
"Runs",
"a",
"continuation",
"when",
"a",
"task",
"completes",
"successfully",
"forwarding",
"along",
"{"
] | train | https://github.com/BoltsFramework/Bolts-Android/blob/54e9cb8bdd4950aa4d418dcbc0ea65414762aef5/bolts-tasks/src/main/java/bolts/Task.java#L791-L794 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/db/DataTracker.java | DataTracker.markCompactedSSTablesReplaced | public void markCompactedSSTablesReplaced(Collection<SSTableReader> oldSSTables, Collection<SSTableReader> allReplacements, OperationType compactionType) {
"""
that they have been replaced by the provided sstables, which must have been performed by an earlier replaceReaders() call
"""
removeSSTablesFro... | java | public void markCompactedSSTablesReplaced(Collection<SSTableReader> oldSSTables, Collection<SSTableReader> allReplacements, OperationType compactionType)
{
removeSSTablesFromTracker(oldSSTables);
releaseReferences(oldSSTables, false);
notifySSTablesChanged(oldSSTables, allReplacements, compa... | [
"public",
"void",
"markCompactedSSTablesReplaced",
"(",
"Collection",
"<",
"SSTableReader",
">",
"oldSSTables",
",",
"Collection",
"<",
"SSTableReader",
">",
"allReplacements",
",",
"OperationType",
"compactionType",
")",
"{",
"removeSSTablesFromTracker",
"(",
"oldSSTable... | that they have been replaced by the provided sstables, which must have been performed by an earlier replaceReaders() call | [
"that",
"they",
"have",
"been",
"replaced",
"by",
"the",
"provided",
"sstables",
"which",
"must",
"have",
"been",
"performed",
"by",
"an",
"earlier",
"replaceReaders",
"()",
"call"
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/DataTracker.java#L275-L281 |
dropbox/dropbox-sdk-java | src/main/java/com/dropbox/core/v1/DbxClientV1.java | DbxClientV1.getMetadata | public /*@Nullable*/DbxEntry getMetadata(final String path, boolean includeMediaInfo)
throws DbxException {
"""
Get the file or folder metadata for a given path.
<pre>
DbxClientV1 dbxClient = ...
DbxEntry entry = dbxClient.getMetadata("/Photos");
if (entry == null) {
System.out.println("No file or f... | java | public /*@Nullable*/DbxEntry getMetadata(final String path, boolean includeMediaInfo)
throws DbxException
{
DbxPathV1.checkArg("path", path);
String host = this.host.getApi();
String apiPath = "1/metadata/auto" + path;
/*@Nullable*/String[] params = {
"list", "fa... | [
"public",
"/*@Nullable*/",
"DbxEntry",
"getMetadata",
"(",
"final",
"String",
"path",
",",
"boolean",
"includeMediaInfo",
")",
"throws",
"DbxException",
"{",
"DbxPathV1",
".",
"checkArg",
"(",
"\"path\"",
",",
"path",
")",
";",
"String",
"host",
"=",
"this",
"... | Get the file or folder metadata for a given path.
<pre>
DbxClientV1 dbxClient = ...
DbxEntry entry = dbxClient.getMetadata("/Photos");
if (entry == null) {
System.out.println("No file or folder at that path.");
} else {
System.out.print(entry.toStringMultiline());
}
</pre>
@param path
The path to the file or folder (... | [
"Get",
"the",
"file",
"or",
"folder",
"metadata",
"for",
"a",
"given",
"path",
"."
] | train | https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L115-L137 |
dottydingo/hyperion | core/src/main/java/com/dottydingo/hyperion/core/endpoint/pipeline/phase/CreatePhase.java | CreatePhase.processLegacyRequest | protected void processLegacyRequest(HyperionContext hyperionContext) {
"""
Process a legacy V1 request (single item)
@param hyperionContext The context
"""
EndpointRequest request = hyperionContext.getEndpointRequest();
EndpointResponse response = hyperionContext.getEndpointResponse();
... | java | protected void processLegacyRequest(HyperionContext hyperionContext)
{
EndpointRequest request = hyperionContext.getEndpointRequest();
EndpointResponse response = hyperionContext.getEndpointResponse();
ApiVersionPlugin<ApiObject<Serializable>,PersistentObject<Serializable>,Serializable> api... | [
"protected",
"void",
"processLegacyRequest",
"(",
"HyperionContext",
"hyperionContext",
")",
"{",
"EndpointRequest",
"request",
"=",
"hyperionContext",
".",
"getEndpointRequest",
"(",
")",
";",
"EndpointResponse",
"response",
"=",
"hyperionContext",
".",
"getEndpointRespo... | Process a legacy V1 request (single item)
@param hyperionContext The context | [
"Process",
"a",
"legacy",
"V1",
"request",
"(",
"single",
"item",
")"
] | train | https://github.com/dottydingo/hyperion/blob/c4d119c90024a88c0335d7d318e9ccdb70149764/core/src/main/java/com/dottydingo/hyperion/core/endpoint/pipeline/phase/CreatePhase.java#L48-L79 |
pebble/pebble-android-sdk | PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java | PebbleDictionary.addString | public void addString(int key, String value) {
"""
Associate the specified String with the provided key in the dictionary. If another key-value pair with the same
key is already present in the dictionary, it will be replaced.
@param key
key with which the specified value is associated
@param value
value to ... | java | public void addString(int key, String value) {
PebbleTuple t =
PebbleTuple.create(key, PebbleTuple.TupleType.STRING, PebbleTuple.Width.NONE, value);
addTuple(t);
} | [
"public",
"void",
"addString",
"(",
"int",
"key",
",",
"String",
"value",
")",
"{",
"PebbleTuple",
"t",
"=",
"PebbleTuple",
".",
"create",
"(",
"key",
",",
"PebbleTuple",
".",
"TupleType",
".",
"STRING",
",",
"PebbleTuple",
".",
"Width",
".",
"NONE",
","... | Associate the specified String with the provided key in the dictionary. If another key-value pair with the same
key is already present in the dictionary, it will be replaced.
@param key
key with which the specified value is associated
@param value
value to be associated with the specified key | [
"Associate",
"the",
"specified",
"String",
"with",
"the",
"provided",
"key",
"in",
"the",
"dictionary",
".",
"If",
"another",
"key",
"-",
"value",
"pair",
"with",
"the",
"same",
"key",
"is",
"already",
"present",
"in",
"the",
"dictionary",
"it",
"will",
"b... | train | https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L92-L96 |
square/okhttp | okhttp/src/main/java/okhttp3/internal/http/HttpHeaders.java | HttpHeaders.varyHeaders | public static Headers varyHeaders(Response response) {
"""
Returns the subset of the headers in {@code response}'s request that impact the content of
response's body.
"""
// Use the request headers sent over the network, since that's what the
// response varies on. Otherwise OkHttp-supplied headers li... | java | public static Headers varyHeaders(Response response) {
// Use the request headers sent over the network, since that's what the
// response varies on. Otherwise OkHttp-supplied headers like
// "Accept-Encoding: gzip" may be lost.
Headers requestHeaders = response.networkResponse().request().headers();
... | [
"public",
"static",
"Headers",
"varyHeaders",
"(",
"Response",
"response",
")",
"{",
"// Use the request headers sent over the network, since that's what the",
"// response varies on. Otherwise OkHttp-supplied headers like",
"// \"Accept-Encoding: gzip\" may be lost.",
"Headers",
"requestH... | Returns the subset of the headers in {@code response}'s request that impact the content of
response's body. | [
"Returns",
"the",
"subset",
"of",
"the",
"headers",
"in",
"{"
] | train | https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/http/HttpHeaders.java#L122-L129 |
UrielCh/ovh-java-sdk | ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java | ApiOvhHostingweb.serviceName_envVar_key_GET | public OvhEnvVar serviceName_envVar_key_GET(String serviceName, String key) throws IOException {
"""
Get this object properties
REST: GET /hosting/web/{serviceName}/envVar/{key}
@param serviceName [required] The internal name of your hosting
@param key [required] Name of the variable
"""
String qPath = ... | java | public OvhEnvVar serviceName_envVar_key_GET(String serviceName, String key) throws IOException {
String qPath = "/hosting/web/{serviceName}/envVar/{key}";
StringBuilder sb = path(qPath, serviceName, key);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhEnvVar.class);
} | [
"public",
"OvhEnvVar",
"serviceName_envVar_key_GET",
"(",
"String",
"serviceName",
",",
"String",
"key",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/hosting/web/{serviceName}/envVar/{key}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",... | Get this object properties
REST: GET /hosting/web/{serviceName}/envVar/{key}
@param serviceName [required] The internal name of your hosting
@param key [required] Name of the variable | [
"Get",
"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#L1772-L1777 |
katharsis-project/katharsis-framework | katharsis-core/src/main/java/io/katharsis/core/internal/utils/PropertyUtils.java | PropertyUtils.getProperty | public static Object getProperty(Object bean, String field) {
"""
Get bean's property value. The sequence of searches for getting a value is as follows:
<ol>
<li>All class fields are found using {@link ClassUtils#getClassFields(Class)}</li>
<li>Search for a field with the name of the desired one is made</li>
<... | java | public static Object getProperty(Object bean, String field) {
INSTANCE.checkParameters(bean, field);
try {
return INSTANCE.getPropertyValue(bean, field);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw handleReflectionExcept... | [
"public",
"static",
"Object",
"getProperty",
"(",
"Object",
"bean",
",",
"String",
"field",
")",
"{",
"INSTANCE",
".",
"checkParameters",
"(",
"bean",
",",
"field",
")",
";",
"try",
"{",
"return",
"INSTANCE",
".",
"getPropertyValue",
"(",
"bean",
",",
"fie... | Get bean's property value. The sequence of searches for getting a value is as follows:
<ol>
<li>All class fields are found using {@link ClassUtils#getClassFields(Class)}</li>
<li>Search for a field with the name of the desired one is made</li>
<li>If a field is found and it's a non-public field, the value is returned u... | [
"Get",
"bean",
"s",
"property",
"value",
".",
"The",
"sequence",
"of",
"searches",
"for",
"getting",
"a",
"value",
"is",
"as",
"follows",
":",
"<ol",
">",
"<li",
">",
"All",
"class",
"fields",
"are",
"found",
"using",
"{",
"@link",
"ClassUtils#getClassFiel... | train | https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/core/internal/utils/PropertyUtils.java#L45-L53 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/util/PropertiesBuilder.java | PropertiesBuilder.fromXml | public static PropertiesBuilder fromXml(InputStream inputStream) {
"""
Factory method to load {@link Properties} from the given XML {@link InputStream}.
@param inputStream an XML input source containing the {@link Properties} to load.
@return an instance of the {@link PropertiesBuilder} class initialized with ... | java | public static PropertiesBuilder fromXml(InputStream inputStream) {
try {
Properties defaults = new Properties();
defaults.loadFromXML(inputStream);
return from(defaults);
}
catch (IOException cause) {
throw new SystemException(String.format("Failed to load properties from input stre... | [
"public",
"static",
"PropertiesBuilder",
"fromXml",
"(",
"InputStream",
"inputStream",
")",
"{",
"try",
"{",
"Properties",
"defaults",
"=",
"new",
"Properties",
"(",
")",
";",
"defaults",
".",
"loadFromXML",
"(",
"inputStream",
")",
";",
"return",
"from",
"(",... | Factory method to load {@link Properties} from the given XML {@link InputStream}.
@param inputStream an XML input source containing the {@link Properties} to load.
@return an instance of the {@link PropertiesBuilder} class initialized with the properties
from the given XML input source.
@throws SystemException if the ... | [
"Factory",
"method",
"to",
"load",
"{",
"@link",
"Properties",
"}",
"from",
"the",
"given",
"XML",
"{",
"@link",
"InputStream",
"}",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/PropertiesBuilder.java#L181-L191 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/container/impl/metadata/PropertyHelper.java | PropertyHelper.convertToClass | public static Object convertToClass(String value, Class<?> clazz) {
"""
Converts a value to the type of the given field.
@param value
@param field
@return
"""
Object propertyValue;
if (clazz.isAssignableFrom(int.class)) {
propertyValue = Integer.parseInt(value);
}
else if (clazz.isAssi... | java | public static Object convertToClass(String value, Class<?> clazz) {
Object propertyValue;
if (clazz.isAssignableFrom(int.class)) {
propertyValue = Integer.parseInt(value);
}
else if (clazz.isAssignableFrom(long.class)) {
propertyValue = Long.parseLong(value);
}
else if (clazz.isAssig... | [
"public",
"static",
"Object",
"convertToClass",
"(",
"String",
"value",
",",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"Object",
"propertyValue",
";",
"if",
"(",
"clazz",
".",
"isAssignableFrom",
"(",
"int",
".",
"class",
")",
")",
"{",
"propertyValue",
... | Converts a value to the type of the given field.
@param value
@param field
@return | [
"Converts",
"a",
"value",
"to",
"the",
"type",
"of",
"the",
"given",
"field",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/container/impl/metadata/PropertyHelper.java#L59-L76 |
VoltDB/voltdb | src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java | RejoinTaskBuffer.appendTask | public int appendTask(long sourceHSId, TransactionInfoBaseMessage task) throws IOException {
"""
Appends a task message to the buffer.
@param sourceHSId
@param task
@throws IOException If the buffer is not of the type TASK
@return how many bytes are left in this buffer for adding a new task
"""
Pre... | java | public int appendTask(long sourceHSId, TransactionInfoBaseMessage task) throws IOException {
Preconditions.checkState(compiledSize == 0, "buffer is already compiled");
final int msgSerializedSize = task.getSerializedSize();
ensureCapacity(taskHeaderSize() + msgSerializedSize);
ByteBuff... | [
"public",
"int",
"appendTask",
"(",
"long",
"sourceHSId",
",",
"TransactionInfoBaseMessage",
"task",
")",
"throws",
"IOException",
"{",
"Preconditions",
".",
"checkState",
"(",
"compiledSize",
"==",
"0",
",",
"\"buffer is already compiled\"",
")",
";",
"final",
"int... | Appends a task message to the buffer.
@param sourceHSId
@param task
@throws IOException If the buffer is not of the type TASK
@return how many bytes are left in this buffer for adding a new task | [
"Appends",
"a",
"task",
"message",
"to",
"the",
"buffer",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/RejoinTaskBuffer.java#L150-L173 |
apache/fluo | modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java | Bytes.compareTo | public int compareTo(byte[] bytes, int offset, int len) {
"""
Compares this to the passed bytes, byte by byte, returning a negative, zero, or positive result
if the first sequence is less than, equal to, or greater than the second. The comparison is
performed starting with the first byte of each sequence, and pr... | java | public int compareTo(byte[] bytes, int offset, int len) {
Preconditions.checkArgument(offset >= 0 && len >= 0 && offset + len <= bytes.length);
return compareToUnchecked(bytes, offset, len);
} | [
"public",
"int",
"compareTo",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"offset",
">=",
"0",
"&&",
"len",
">=",
"0",
"&&",
"offset",
"+",
"len",
"<=",
"bytes",
".",
... | Compares this to the passed bytes, byte by byte, returning a negative, zero, or positive result
if the first sequence is less than, equal to, or greater than the second. The comparison is
performed starting with the first byte of each sequence, and proceeds until a pair of bytes
differs, or one sequence runs out of byt... | [
"Compares",
"this",
"to",
"the",
"passed",
"bytes",
"byte",
"by",
"byte",
"returning",
"a",
"negative",
"zero",
"or",
"positive",
"result",
"if",
"the",
"first",
"sequence",
"is",
"less",
"than",
"equal",
"to",
"or",
"greater",
"than",
"the",
"second",
"."... | train | https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java#L233-L236 |
salesforce/Argus | ArgusCore/src/main/java/com/salesforce/dva/argus/service/jpa/DefaultJPAService.java | DefaultJPAService.deleteEntity | protected <E extends Identifiable> void deleteEntity(EntityManager em, E entity) {
"""
Removes an entity from the database.
@param <E> The entity type.
@param em The entity manager to use. Cannot be null.
@param entity The entity to remove. Cannot be null.
"""
requireArgument(em != null, "T... | java | protected <E extends Identifiable> void deleteEntity(EntityManager em, E entity) {
requireArgument(em != null, "The entity manager cannot be null.");
requireArgument(entity != null, "The entity cannot be null.");
if (!em.contains(entity)) {
Identifiable attached = findEntity(em, entity.getId(), entity.getClass... | [
"protected",
"<",
"E",
"extends",
"Identifiable",
">",
"void",
"deleteEntity",
"(",
"EntityManager",
"em",
",",
"E",
"entity",
")",
"{",
"requireArgument",
"(",
"em",
"!=",
"null",
",",
"\"The entity manager cannot be null.\"",
")",
";",
"requireArgument",
"(",
... | Removes an entity from the database.
@param <E> The entity type.
@param em The entity manager to use. Cannot be null.
@param entity The entity to remove. Cannot be null. | [
"Removes",
"an",
"entity",
"from",
"the",
"database",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/jpa/DefaultJPAService.java#L102-L111 |
networknt/light-4j | client/src/main/java/org/apache/hc/core5/util/copied/CharArrayBuffer.java | CharArrayBuffer.substringTrimmed | public String substringTrimmed(final int beginIndex, final int endIndex) {
"""
Returns a substring of this buffer with leading and trailing whitespace
omitted. The substring begins with the first non-whitespace character
from {@code beginIndex} and extends to the last
non-whitespace character with the index les... | java | public String substringTrimmed(final int beginIndex, final int endIndex) {
if (beginIndex < 0) {
throw new IndexOutOfBoundsException("Negative beginIndex: " + beginIndex);
}
if (endIndex > this.len) {
throw new IndexOutOfBoundsException("endIndex: " + endIndex + " > lengt... | [
"public",
"String",
"substringTrimmed",
"(",
"final",
"int",
"beginIndex",
",",
"final",
"int",
"endIndex",
")",
"{",
"if",
"(",
"beginIndex",
"<",
"0",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"Negative beginIndex: \"",
"+",
"beginIndex",
"... | Returns a substring of this buffer with leading and trailing whitespace
omitted. The substring begins with the first non-whitespace character
from {@code beginIndex} and extends to the last
non-whitespace character with the index lesser than
{@code endIndex}.
@param beginIndex the beginning index, inclusive.
@p... | [
"Returns",
"a",
"substring",
"of",
"this",
"buffer",
"with",
"leading",
"and",
"trailing",
"whitespace",
"omitted",
".",
"The",
"substring",
"begins",
"with",
"the",
"first",
"non",
"-",
"whitespace",
"character",
"from",
"{",
"@code",
"beginIndex",
"}",
"and"... | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/util/copied/CharArrayBuffer.java#L452-L471 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java | NetworkWatchersInner.getByResourceGroup | public NetworkWatcherInner getByResourceGroup(String resourceGroupName, String networkWatcherName) {
"""
Gets the specified network watcher by resource group.
@param resourceGroupName The name of the resource group.
@param networkWatcherName The name of the network watcher.
@throws IllegalArgumentException th... | java | public NetworkWatcherInner getByResourceGroup(String resourceGroupName, String networkWatcherName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body();
} | [
"public",
"NetworkWatcherInner",
"getByResourceGroup",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkWatcherName",
")",
"{",
"return",
"getByResourceGroupWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"networkWatcherName",
")",
".",
"toBlocking",
"(",
... | Gets the specified network watcher by resource group.
@param resourceGroupName The name of the resource group.
@param networkWatcherName The name of the network watcher.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws ... | [
"Gets",
"the",
"specified",
"network",
"watcher",
"by",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L295-L297 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionGroupConfig.java | CollisionGroupConfig.exports | public static void exports(Xml root, CollisionGroup group) {
"""
Export the collision group data as a node.
@param root The node root (must not be <code>null</code>).
@param group The collision group to export (must not be <code>null</code>).
@throws LionEngineException If error on writing.
"""
C... | java | public static void exports(Xml root, CollisionGroup group)
{
Check.notNull(root);
Check.notNull(group);
final Xml node = root.createChild(NODE_COLLISION);
node.writeString(ATT_GROUP, group.getName());
for (final CollisionFormula formula : group.getFormulas())
... | [
"public",
"static",
"void",
"exports",
"(",
"Xml",
"root",
",",
"CollisionGroup",
"group",
")",
"{",
"Check",
".",
"notNull",
"(",
"root",
")",
";",
"Check",
".",
"notNull",
"(",
"group",
")",
";",
"final",
"Xml",
"node",
"=",
"root",
".",
"createChild... | Export the collision group data as a node.
@param root The node root (must not be <code>null</code>).
@param group The collision group to export (must not be <code>null</code>).
@throws LionEngineException If error on writing. | [
"Export",
"the",
"collision",
"group",
"data",
"as",
"a",
"node",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionGroupConfig.java#L126-L139 |
Drivemode/TypefaceHelper | TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java | TypefaceHelper.setTypeface | public <D extends Dialog> void setTypeface(D dialog, String typefaceName) {
"""
Set the typeface for the dialog view.
@param dialog the dialog.
@param typefaceName typeface name.
"""
setTypeface(dialog, typefaceName, 0);
} | java | public <D extends Dialog> void setTypeface(D dialog, String typefaceName) {
setTypeface(dialog, typefaceName, 0);
} | [
"public",
"<",
"D",
"extends",
"Dialog",
">",
"void",
"setTypeface",
"(",
"D",
"dialog",
",",
"String",
"typefaceName",
")",
"{",
"setTypeface",
"(",
"dialog",
",",
"typefaceName",
",",
"0",
")",
";",
"}"
] | Set the typeface for the dialog view.
@param dialog the dialog.
@param typefaceName typeface name. | [
"Set",
"the",
"typeface",
"for",
"the",
"dialog",
"view",
"."
] | train | https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L466-L468 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java | MockRequest.addParameterForButton | public void addParameterForButton(final UIContext uic, final WButton button) {
"""
Convenience method that adds a parameter emulating a button press.
@param uic the current user's UIContext
@param button the button to add a parameter for.
"""
UIContextHolder.pushContext(uic);
try {
setParameter(butt... | java | public void addParameterForButton(final UIContext uic, final WButton button) {
UIContextHolder.pushContext(uic);
try {
setParameter(button.getId(), "x");
} finally {
UIContextHolder.popContext();
}
} | [
"public",
"void",
"addParameterForButton",
"(",
"final",
"UIContext",
"uic",
",",
"final",
"WButton",
"button",
")",
"{",
"UIContextHolder",
".",
"pushContext",
"(",
"uic",
")",
";",
"try",
"{",
"setParameter",
"(",
"button",
".",
"getId",
"(",
")",
",",
"... | Convenience method that adds a parameter emulating a button press.
@param uic the current user's UIContext
@param button the button to add a parameter for. | [
"Convenience",
"method",
"that",
"adds",
"a",
"parameter",
"emulating",
"a",
"button",
"press",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/MockRequest.java#L90-L97 |
facebookarchive/hadoop-20 | src/examples/org/apache/hadoop/examples/dancing/DancingLinks.java | DancingLinks.addColumn | public void addColumn(ColumnName name, boolean primary) {
"""
Add a column to the table
@param name The name of the column, which will be returned as part of
solutions
@param primary Is the column required for a solution?
"""
ColumnHeader<ColumnName> top = new ColumnHeader<ColumnName>(name, 0);
top.... | java | public void addColumn(ColumnName name, boolean primary) {
ColumnHeader<ColumnName> top = new ColumnHeader<ColumnName>(name, 0);
top.up = top;
top.down = top;
if (primary) {
Node<ColumnName> tail = head.left;
tail.right = top;
top.left = tail;
top.right = head;
head.left = t... | [
"public",
"void",
"addColumn",
"(",
"ColumnName",
"name",
",",
"boolean",
"primary",
")",
"{",
"ColumnHeader",
"<",
"ColumnName",
">",
"top",
"=",
"new",
"ColumnHeader",
"<",
"ColumnName",
">",
"(",
"name",
",",
"0",
")",
";",
"top",
".",
"up",
"=",
"t... | Add a column to the table
@param name The name of the column, which will be returned as part of
solutions
@param primary Is the column required for a solution? | [
"Add",
"a",
"column",
"to",
"the",
"table"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/examples/org/apache/hadoop/examples/dancing/DancingLinks.java#L114-L129 |
groupon/odo | browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java | BrowserMobProxyHandler.wireUpSslWithCyberVilliansCAOdo | protected X509Certificate wireUpSslWithCyberVilliansCAOdo(String host, SslListener listener) {
"""
This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request
@param host
@param listener
"""
host = requestOriginalHostName.get();
// ... | java | protected X509Certificate wireUpSslWithCyberVilliansCAOdo(String host, SslListener listener) {
host = requestOriginalHostName.get();
// Add cybervillians CA(from browsermob)
try {
// see https://github.com/webmetrics/browsermob-proxy/issues/105
String escapedHost = host.... | [
"protected",
"X509Certificate",
"wireUpSslWithCyberVilliansCAOdo",
"(",
"String",
"host",
",",
"SslListener",
"listener",
")",
"{",
"host",
"=",
"requestOriginalHostName",
".",
"get",
"(",
")",
";",
"// Add cybervillians CA(from browsermob)",
"try",
"{",
"// see https://g... | This function wires up a SSL Listener with the cyber villians root CA and cert with the correct CNAME for the request
@param host
@param listener | [
"This",
"function",
"wires",
"up",
"a",
"SSL",
"Listener",
"with",
"the",
"cyber",
"villians",
"root",
"CA",
"and",
"cert",
"with",
"the",
"correct",
"CNAME",
"for",
"the",
"request"
] | train | https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/browsermob-proxy/src/main/java/com/groupon/odo/bmp/BrowserMobProxyHandler.java#L450-L467 |
EMCECS/nfs-client-java | src/main/java/com/emc/ecs/nfsclient/nfs/io/NfsFileBase.java | NfsFileBase.setParentFileAndName | private void setParentFileAndName(F parentFile, String name, LinkTracker<N, F> linkTracker) throws IOException {
"""
This method handles special cases, such as symbolic links in the parent
directory, empty filenames, or the special names "." and "..". The
algorithm required is simplified by the fact that special... | java | private void setParentFileAndName(F parentFile, String name, LinkTracker<N, F> linkTracker) throws IOException {
if (parentFile != null) {
parentFile = parentFile.followLinks(linkTracker);
if (StringUtils.isBlank(name) || ".".equals(name)) {
name = parentFile.getName();
... | [
"private",
"void",
"setParentFileAndName",
"(",
"F",
"parentFile",
",",
"String",
"name",
",",
"LinkTracker",
"<",
"N",
",",
"F",
">",
"linkTracker",
")",
"throws",
"IOException",
"{",
"if",
"(",
"parentFile",
"!=",
"null",
")",
"{",
"parentFile",
"=",
"pa... | This method handles special cases, such as symbolic links in the parent
directory, empty filenames, or the special names "." and "..". The
algorithm required is simplified by the fact that special cases for the
parent file are handled before this is called, as the path is always
resolved from the bottom up. This means ... | [
"This",
"method",
"handles",
"special",
"cases",
"such",
"as",
"symbolic",
"links",
"in",
"the",
"parent",
"directory",
"empty",
"filenames",
"or",
"the",
"special",
"names",
".",
"and",
"..",
".",
"The",
"algorithm",
"required",
"is",
"simplified",
"by",
"t... | train | https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/nfs/io/NfsFileBase.java#L1292-L1312 |
BorderTech/wcomponents | wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Base64Util.java | Base64Util.encodeString | public static String encodeString(final String string, final String encoding) throws
UnsupportedEncodingException {
"""
Encodes a string into Base64 format. No blanks or line breaks are inserted.
@param string a String to be encoded.
@param encoding The character encoding of the string.
@return A String wi... | java | public static String encodeString(final String string, final String encoding) throws
UnsupportedEncodingException {
byte[] stringBytes = string.getBytes(encoding);
return encode(stringBytes);
} | [
"public",
"static",
"String",
"encodeString",
"(",
"final",
"String",
"string",
",",
"final",
"String",
"encoding",
")",
"throws",
"UnsupportedEncodingException",
"{",
"byte",
"[",
"]",
"stringBytes",
"=",
"string",
".",
"getBytes",
"(",
"encoding",
")",
";",
... | Encodes a string into Base64 format. No blanks or line breaks are inserted.
@param string a String to be encoded.
@param encoding The character encoding of the string.
@return A String with the Base64 encoded data.
@throws UnsupportedEncodingException if the java runtime does not support <code>encoding</code>. | [
"Encodes",
"a",
"string",
"into",
"Base64",
"format",
".",
"No",
"blanks",
"or",
"line",
"breaks",
"are",
"inserted",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/Base64Util.java#L102-L106 |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/HttpPath.java | HttpPath.fsWalk | public PathImpl fsWalk(String userPath,
Map<String,Object> attributes,
String uri) {
"""
Scans the path portion of the URI, i.e. everything after the
host and port.
@param userPath the user's supplied path
@param attributes the attributes for the new path
@param uri ... | java | public PathImpl fsWalk(String userPath,
Map<String,Object> attributes,
String uri)
{
String path;
String query = null;
int queryIndex = uri.indexOf('?');
if (queryIndex >= 0) {
path = uri.substring(0, queryIndex);
query = uri.substring(queryIndex +... | [
"public",
"PathImpl",
"fsWalk",
"(",
"String",
"userPath",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
",",
"String",
"uri",
")",
"{",
"String",
"path",
";",
"String",
"query",
"=",
"null",
";",
"int",
"queryIndex",
"=",
"uri",
".",
"i... | Scans the path portion of the URI, i.e. everything after the
host and port.
@param userPath the user's supplied path
@param attributes the attributes for the new path
@param uri the full uri for the new path.
@return the found path. | [
"Scans",
"the",
"path",
"portion",
"of",
"the",
"URI",
"i",
".",
"e",
".",
"everything",
"after",
"the",
"host",
"and",
"port",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/HttpPath.java#L240-L257 |
jbundle/jbundle | thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/memory/MemoryRemoteTable.java | MemoryRemoteTable.doSetHandle | public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException {
"""
Reposition to this record using this bookmark.
<p />In the thin implementation, you can only read using the primary key as the bookmark.
JiniTables can't access the datasource on... | java | public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException
{
return this.seek(null, 0, null, strFields, bookmark);
} | [
"public",
"Object",
"doSetHandle",
"(",
"Object",
"bookmark",
",",
"int",
"iOpenMode",
",",
"String",
"strFields",
",",
"int",
"iHandleType",
")",
"throws",
"DBException",
",",
"RemoteException",
"{",
"return",
"this",
".",
"seek",
"(",
"null",
",",
"0",
","... | Reposition to this record using this bookmark.
<p />In the thin implementation, you can only read using the primary key as the bookmark.
JiniTables can't access the datasource on the server, so they must use the bookmark. | [
"Reposition",
"to",
"this",
"record",
"using",
"this",
"bookmark",
".",
"<p",
"/",
">",
"In",
"the",
"thin",
"implementation",
"you",
"can",
"only",
"read",
"using",
"the",
"primary",
"key",
"as",
"the",
"bookmark",
".",
"JiniTables",
"can",
"t",
"access",... | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/memory/MemoryRemoteTable.java#L226-L229 |
matomo-org/piwik-java-tracker | src/main/java/org/piwik/java/tracking/PiwikRequest.java | PiwikRequest.addToJsonArray | private void addToJsonArray(String key, JsonValue value) {
"""
Add a value to the json array at the specified parameter
@param key the key of the json array to add to
@param value the value to add. Cannot be null
"""
if (value == null){
throw new NullPointerException("Value cannot be nul... | java | private void addToJsonArray(String key, JsonValue value){
if (value == null){
throw new NullPointerException("Value cannot be null.");
}
PiwikJsonArray a = (PiwikJsonArray)parameters.get(key);
if (a == null){
a = new PiwikJsonArray();
paramete... | [
"private",
"void",
"addToJsonArray",
"(",
"String",
"key",
",",
"JsonValue",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Value cannot be null.\"",
")",
";",
"}",
"PiwikJsonArray",
"a",
"=",
"... | Add a value to the json array at the specified parameter
@param key the key of the json array to add to
@param value the value to add. Cannot be null | [
"Add",
"a",
"value",
"to",
"the",
"json",
"array",
"at",
"the",
"specified",
"parameter"
] | train | https://github.com/matomo-org/piwik-java-tracker/blob/23df71d27a89e89dc7a539b2eda88c90a206458b/src/main/java/org/piwik/java/tracking/PiwikRequest.java#L1912-L1923 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cdndedicated/src/main/java/net/minidev/ovh/api/ApiOvhCdndedicated.java | ApiOvhCdndedicated.serviceName_quota_GET | public ArrayList<OvhStatsDataType> serviceName_quota_GET(String serviceName, OvhStatsPeriodEnum period) throws IOException {
"""
Return quota history
REST: GET /cdn/dedicated/{serviceName}/quota
@param period [required]
@param serviceName [required] The internal name of your CDN offer
"""
String qPath =... | java | public ArrayList<OvhStatsDataType> serviceName_quota_GET(String serviceName, OvhStatsPeriodEnum period) throws IOException {
String qPath = "/cdn/dedicated/{serviceName}/quota";
StringBuilder sb = path(qPath, serviceName);
query(sb, "period", period);
String resp = exec(qPath, "GET", sb.toString(), null);
ret... | [
"public",
"ArrayList",
"<",
"OvhStatsDataType",
">",
"serviceName_quota_GET",
"(",
"String",
"serviceName",
",",
"OvhStatsPeriodEnum",
"period",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cdn/dedicated/{serviceName}/quota\"",
";",
"StringBuilder",
"sb"... | Return quota history
REST: GET /cdn/dedicated/{serviceName}/quota
@param period [required]
@param serviceName [required] The internal name of your CDN offer | [
"Return",
"quota",
"history"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cdndedicated/src/main/java/net/minidev/ovh/api/ApiOvhCdndedicated.java#L537-L543 |
Azure/azure-sdk-for-java | logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/SchemasInner.java | SchemasInner.createOrUpdateAsync | public Observable<IntegrationAccountSchemaInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema) {
"""
Creates or updates an integration account schema.
@param resourceGroupName The resource group name.
@param integrationAcco... | java | public Observable<IntegrationAccountSchemaInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String schemaName, IntegrationAccountSchemaInner schema) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, schemaName, schema).map(new Func1<Serv... | [
"public",
"Observable",
"<",
"IntegrationAccountSchemaInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"integrationAccountName",
",",
"String",
"schemaName",
",",
"IntegrationAccountSchemaInner",
"schema",
")",
"{",
"return",
"createOrU... | Creates or updates an integration account schema.
@param resourceGroupName The resource group name.
@param integrationAccountName The integration account name.
@param schemaName The integration account schema name.
@param schema The integration account schema.
@throws IllegalArgumentException thrown if parameters fail... | [
"Creates",
"or",
"updates",
"an",
"integration",
"account",
"schema",
"."
] | 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/SchemasInner.java#L477-L484 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/util/chunkcollision/ChunkCollision.java | ChunkCollision.onGetCollisionBoxes | @SubscribeEvent
public void onGetCollisionBoxes(GetCollisionBoxesEvent event)
// public void getCollisionBoxes(World world, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity entity) {
"""
Gets the collision bounding boxes for the intersecting chunks.<br>
Called via ASM from {@link World#getCollisionBoxes(Ent... | java | @SubscribeEvent
public void onGetCollisionBoxes(GetCollisionBoxesEvent event)
// public void getCollisionBoxes(World world, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity entity)
{
//no mask, no need to check for collision
if (event.getAabb() == null)
return;
for (Chunk chunk : ChunkBlockHandler.getA... | [
"@",
"SubscribeEvent",
"public",
"void",
"onGetCollisionBoxes",
"(",
"GetCollisionBoxesEvent",
"event",
")",
"//\tpublic void getCollisionBoxes(World world, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity entity)",
"{",
"//no mask, no need to check for collision",
"if",
"(",
"event"... | Gets the collision bounding boxes for the intersecting chunks.<br>
Called via ASM from {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}
@param event the event | [
"Gets",
"the",
"collision",
"bounding",
"boxes",
"for",
"the",
"intersecting",
"chunks",
".",
"<br",
">",
"Called",
"via",
"ASM",
"from",
"{",
"@link",
"World#getCollisionBoxes",
"(",
"Entity",
"AxisAlignedBB",
")",
"}"
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/chunkcollision/ChunkCollision.java#L105-L115 |
pmwmedia/tinylog | log4j1.2-api/src/main/java/org/apache/log4j/Category.java | Category.assertLog | public void assertLog(final boolean assertion, final String msg) {
"""
If {@code assertion} parameter is {@code false}, then logs {@code msg} as an {@link #error(Object) error}
statement.
<p>
The {@code assert} method has been renamed to {@code assertLog} because {@code assert} is a language reserved
word in... | java | public void assertLog(final boolean assertion, final String msg) {
if (!assertion && MINIMUM_LEVEL_COVERS_ERROR) {
provider.log(STACKTRACE_DEPTH, null, org.tinylog.Level.ERROR, null, msg, (Object[]) null);
}
} | [
"public",
"void",
"assertLog",
"(",
"final",
"boolean",
"assertion",
",",
"final",
"String",
"msg",
")",
"{",
"if",
"(",
"!",
"assertion",
"&&",
"MINIMUM_LEVEL_COVERS_ERROR",
")",
"{",
"provider",
".",
"log",
"(",
"STACKTRACE_DEPTH",
",",
"null",
",",
"org",... | If {@code assertion} parameter is {@code false}, then logs {@code msg} as an {@link #error(Object) error}
statement.
<p>
The {@code assert} method has been renamed to {@code assertLog} because {@code assert} is a language reserved
word in JDK 1.4.
</p>
@param assertion
{@code true} for dropping the passed message, {@... | [
"If",
"{",
"@code",
"assertion",
"}",
"parameter",
"is",
"{",
"@code",
"false",
"}",
"then",
"logs",
"{",
"@code",
"msg",
"}",
"as",
"an",
"{",
"@link",
"#error",
"(",
"Object",
")",
"error",
"}",
"statement",
"."
] | train | https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/log4j1.2-api/src/main/java/org/apache/log4j/Category.java#L137-L141 |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java | SystemPropertyContext.addOrReplaceProperty | @SuppressWarnings("WeakerAccess")
void addOrReplaceProperty(final String name, final Object value) {
"""
Adds or replaces the system property. If the system property already exists with a different value on
{@link #restore()} the system property will be set back to it's previous value.
@param name the nam... | java | @SuppressWarnings("WeakerAccess")
void addOrReplaceProperty(final String name, final Object value) {
final String currentValue = SecurityActions.setPropertyPrivileged(name, value.toString());
if (currentValue != null) {
propertiesToReset.put(name, currentValue);
} else {
... | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"void",
"addOrReplaceProperty",
"(",
"final",
"String",
"name",
",",
"final",
"Object",
"value",
")",
"{",
"final",
"String",
"currentValue",
"=",
"SecurityActions",
".",
"setPropertyPrivileged",
"(",
"name",
... | Adds or replaces the system property. If the system property already exists with a different value on
{@link #restore()} the system property will be set back to it's previous value.
@param name the name of the property
@param value the value to set | [
"Adds",
"or",
"replaces",
"the",
"system",
"property",
".",
"If",
"the",
"system",
"property",
"already",
"exists",
"with",
"a",
"different",
"value",
"on",
"{",
"@link",
"#restore",
"()",
"}",
"the",
"system",
"property",
"will",
"be",
"set",
"back",
"to"... | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java#L105-L113 |
apache/groovy | subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java | Sql.firstRow | public GroovyRowResult firstRow(Map params, String sql) throws SQLException {
"""
A variant of {@link #firstRow(String, java.util.List)}
useful when providing the named parameters as named arguments.
@param params a map containing the named parameters
@param sql the SQL statement
@return a GroovyRowResult... | java | public GroovyRowResult firstRow(Map params, String sql) throws SQLException {
return firstRow(sql, singletonList(params));
} | [
"public",
"GroovyRowResult",
"firstRow",
"(",
"Map",
"params",
",",
"String",
"sql",
")",
"throws",
"SQLException",
"{",
"return",
"firstRow",
"(",
"sql",
",",
"singletonList",
"(",
"params",
")",
")",
";",
"}"
] | A variant of {@link #firstRow(String, java.util.List)}
useful when providing the named parameters as named arguments.
@param params a map containing the named parameters
@param sql the SQL statement
@return a GroovyRowResult object or <code>null</code> if no row is found
@throws SQLException if a database access er... | [
"A",
"variant",
"of",
"{",
"@link",
"#firstRow",
"(",
"String",
"java",
".",
"util",
".",
"List",
")",
"}",
"useful",
"when",
"providing",
"the",
"named",
"parameters",
"as",
"named",
"arguments",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L2272-L2274 |
nextreports/nextreports-engine | src/ro/nextreports/engine/util/DateUtil.java | DateUtil.addHours | public static Date addHours(Date d, int hours) {
"""
Add hours to a date
@param d date
@param hours hours
@return new date
"""
Calendar cal = Calendar.getInstance();
cal.setTime(d);
cal.add(Calendar.HOUR_OF_DAY, hours);
return cal.getTime();
} | java | public static Date addHours(Date d, int hours) {
Calendar cal = Calendar.getInstance();
cal.setTime(d);
cal.add(Calendar.HOUR_OF_DAY, hours);
return cal.getTime();
} | [
"public",
"static",
"Date",
"addHours",
"(",
"Date",
"d",
",",
"int",
"hours",
")",
"{",
"Calendar",
"cal",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"cal",
".",
"setTime",
"(",
"d",
")",
";",
"cal",
".",
"add",
"(",
"Calendar",
".",
"HOU... | Add hours to a date
@param d date
@param hours hours
@return new date | [
"Add",
"hours",
"to",
"a",
"date"
] | train | https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/DateUtil.java#L457-L462 |
TestFX/Monocle | src/main/java/com/sun/glass/ui/monocle/LinuxTouchTransform.java | LinuxTouchTransform.getValue | int getValue(LinuxEventBuffer buffer) {
"""
Gets the transformed pixel coordinate of the current event in the buffer
provided.
@param buffer A LinuxEventBuffer containing a raw event line
@return a transformed value in screen space
"""
int axis = buffer.getEventCode();
int value = buffer.g... | java | int getValue(LinuxEventBuffer buffer) {
int axis = buffer.getEventCode();
int value = buffer.getEventValue();
int i;
for (i = 0; i < axes.length && axes[i] != -1; i++) {
if (axes[i] == axis) {
return transform(i, value);
}
}
if (i =... | [
"int",
"getValue",
"(",
"LinuxEventBuffer",
"buffer",
")",
"{",
"int",
"axis",
"=",
"buffer",
".",
"getEventCode",
"(",
")",
";",
"int",
"value",
"=",
"buffer",
".",
"getEventValue",
"(",
")",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"... | Gets the transformed pixel coordinate of the current event in the buffer
provided.
@param buffer A LinuxEventBuffer containing a raw event line
@return a transformed value in screen space | [
"Gets",
"the",
"transformed",
"pixel",
"coordinate",
"of",
"the",
"current",
"event",
"in",
"the",
"buffer",
"provided",
"."
] | train | https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/LinuxTouchTransform.java#L72-L91 |
bozaro/git-lfs-java | gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java | Client.putObject | public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta) throws IOException {
"""
Upload object with specified hash and size.
@param streamProvider Object stream provider.
@param meta Object metadata.
@return Return true is object is uploaded successfully and ... | java | public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta) throws IOException {
return doWork(auth -> {
final ObjectRes links = doRequest(auth, new MetaPost(meta), AuthHelper.join(auth.getHref(), PATH_OBJECTS));
return links != null && putObject(streamProvider, meta... | [
"public",
"boolean",
"putObject",
"(",
"@",
"NotNull",
"final",
"StreamProvider",
"streamProvider",
",",
"@",
"NotNull",
"final",
"Meta",
"meta",
")",
"throws",
"IOException",
"{",
"return",
"doWork",
"(",
"auth",
"->",
"{",
"final",
"ObjectRes",
"links",
"=",... | Upload object with specified hash and size.
@param streamProvider Object stream provider.
@param meta Object metadata.
@return Return true is object is uploaded successfully and false if object is already uploaded.
@throws IOException On some errors. | [
"Upload",
"object",
"with",
"specified",
"hash",
"and",
"size",
"."
] | train | https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L214-L219 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java | DeviceManagerClient.createDevice | public final Device createDevice(RegistryName parent, Device device) {
"""
Creates a device in a device registry.
<p>Sample code:
<pre><code>
try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
Devic... | java | public final Device createDevice(RegistryName parent, Device device) {
CreateDeviceRequest request =
CreateDeviceRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setDevice(device)
.build();
return createDevice(request);
} | [
"public",
"final",
"Device",
"createDevice",
"(",
"RegistryName",
"parent",
",",
"Device",
"device",
")",
"{",
"CreateDeviceRequest",
"request",
"=",
"CreateDeviceRequest",
".",
"newBuilder",
"(",
")",
".",
"setParent",
"(",
"parent",
"==",
"null",
"?",
"null",
... | Creates a device in a device registry.
<p>Sample code:
<pre><code>
try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) {
RegistryName parent = RegistryName.of("[PROJECT]", "[LOCATION]", "[REGISTRY]");
Device device = Device.newBuilder().build();
Device response = deviceManagerClient.createDev... | [
"Creates",
"a",
"device",
"in",
"a",
"device",
"registry",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java#L704-L712 |
phax/ph-oton | ph-oton-html/src/main/java/com/helger/html/markdown/Emitter.java | Emitter._findInlineToken | private int _findInlineToken (final String sIn, final int nStart, final EMarkToken eToken) {
"""
Finds the position of the given Token in the given String.
@param sIn
The String to search on.
@param nStart
The starting character position.
@param eToken
The token to find.
@return The position of the token ... | java | private int _findInlineToken (final String sIn, final int nStart, final EMarkToken eToken)
{
int nPos = nStart;
while (nPos < sIn.length ())
{
if (_getToken (sIn, nPos) == eToken)
return nPos;
nPos++;
}
return -1;
} | [
"private",
"int",
"_findInlineToken",
"(",
"final",
"String",
"sIn",
",",
"final",
"int",
"nStart",
",",
"final",
"EMarkToken",
"eToken",
")",
"{",
"int",
"nPos",
"=",
"nStart",
";",
"while",
"(",
"nPos",
"<",
"sIn",
".",
"length",
"(",
")",
")",
"{",
... | Finds the position of the given Token in the given String.
@param sIn
The String to search on.
@param nStart
The starting character position.
@param eToken
The token to find.
@return The position of the token or -1 if none could be found. | [
"Finds",
"the",
"position",
"of",
"the",
"given",
"Token",
"in",
"the",
"given",
"String",
"."
] | train | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/markdown/Emitter.java#L258-L268 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java | ApiOvhEmaildomain.domain_mailingList_POST | public OvhTaskMl domain_mailingList_POST(String domain, OvhDomainMlLanguageEnum language, String name, OvhDomainMlOptionsStruct options, String ownerEmail, String replyTo) throws IOException {
"""
Create new mailingList
REST: POST /email/domain/{domain}/mailingList
@param replyTo [required] Email to reply of m... | java | public OvhTaskMl domain_mailingList_POST(String domain, OvhDomainMlLanguageEnum language, String name, OvhDomainMlOptionsStruct options, String ownerEmail, String replyTo) throws IOException {
String qPath = "/email/domain/{domain}/mailingList";
StringBuilder sb = path(qPath, domain);
HashMap<String, Object>o = n... | [
"public",
"OvhTaskMl",
"domain_mailingList_POST",
"(",
"String",
"domain",
",",
"OvhDomainMlLanguageEnum",
"language",
",",
"String",
"name",
",",
"OvhDomainMlOptionsStruct",
"options",
",",
"String",
"ownerEmail",
",",
"String",
"replyTo",
")",
"throws",
"IOException",... | Create new mailingList
REST: POST /email/domain/{domain}/mailingList
@param replyTo [required] Email to reply of mailing list
@param options [required] Options of mailing list
@param ownerEmail [required] Owner Email
@param language [required] Language of mailing list
@param name [required] Mailing list name
@param do... | [
"Create",
"new",
"mailingList"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L1650-L1661 |
jglobus/JGlobus | gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java | SocketPool.checkIn | public synchronized void checkIn(SocketBox sb) {
"""
Before calling this method, the socket needs to be first add()ed to the pool and checked out. Note: checking in a
socket that is not reusable will cause its removal from the pool.
"""
if (((ManagedSocketBox) sb).getStatus() != ManagedSocketBox.BUSY... | java | public synchronized void checkIn(SocketBox sb) {
if (((ManagedSocketBox) sb).getStatus() != ManagedSocketBox.BUSY) {
throw new IllegalArgumentException("The socket is already marked free, cannot check it in twice.");
}
if (!busySockets.containsKey(sb)) {
throw new ... | [
"public",
"synchronized",
"void",
"checkIn",
"(",
"SocketBox",
"sb",
")",
"{",
"if",
"(",
"(",
"(",
"ManagedSocketBox",
")",
"sb",
")",
".",
"getStatus",
"(",
")",
"!=",
"ManagedSocketBox",
".",
"BUSY",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Before calling this method, the socket needs to be first add()ed to the pool and checked out. Note: checking in a
socket that is not reusable will cause its removal from the pool. | [
"Before",
"calling",
"this",
"method",
"the",
"socket",
"needs",
"to",
"be",
"first",
"add",
"()",
"ed",
"to",
"the",
"pool",
"and",
"checked",
"out",
".",
"Note",
":",
"checking",
"in",
"a",
"socket",
"that",
"is",
"not",
"reusable",
"will",
"cause",
... | train | https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/SocketPool.java#L122-L146 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java | CommonFilter.makeValue | private IValue makeValue(String value, boolean ipAddress) throws FilterException {
"""
Helper to make the value for the condition. It's either a IP address (ValueAddressRange) or a
string (ValueString).
@param value
@param ipAddress
@return
@throws FilterException
"""
if (ipAddress)
... | java | private IValue makeValue(String value, boolean ipAddress) throws FilterException {
if (ipAddress)
return new ValueAddressRange(value);
return new ValueString(value);
} | [
"private",
"IValue",
"makeValue",
"(",
"String",
"value",
",",
"boolean",
"ipAddress",
")",
"throws",
"FilterException",
"{",
"if",
"(",
"ipAddress",
")",
"return",
"new",
"ValueAddressRange",
"(",
"value",
")",
";",
"return",
"new",
"ValueString",
"(",
"value... | Helper to make the value for the condition. It's either a IP address (ValueAddressRange) or a
string (ValueString).
@param value
@param ipAddress
@return
@throws FilterException | [
"Helper",
"to",
"make",
"the",
"value",
"for",
"the",
"condition",
".",
"It",
"s",
"either",
"a",
"IP",
"address",
"(",
"ValueAddressRange",
")",
"or",
"a",
"string",
"(",
"ValueString",
")",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java#L295-L299 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java | ManagedDatabasesInner.completeRestore | public void completeRestore(String locationName, UUID operationId, String lastBackupName) {
"""
Completes the restore operation on a managed database.
@param locationName The name of the region where the resource is located.
@param operationId Management operation id that this request tries to complete.
@para... | java | public void completeRestore(String locationName, UUID operationId, String lastBackupName) {
completeRestoreWithServiceResponseAsync(locationName, operationId, lastBackupName).toBlocking().last().body();
} | [
"public",
"void",
"completeRestore",
"(",
"String",
"locationName",
",",
"UUID",
"operationId",
",",
"String",
"lastBackupName",
")",
"{",
"completeRestoreWithServiceResponseAsync",
"(",
"locationName",
",",
"operationId",
",",
"lastBackupName",
")",
".",
"toBlocking",
... | Completes the restore operation on a managed database.
@param locationName The name of the region where the resource is located.
@param operationId Management operation id that this request tries to complete.
@param lastBackupName The last backup name to apply
@throws IllegalArgumentException thrown if parameters fail... | [
"Completes",
"the",
"restore",
"operation",
"on",
"a",
"managed",
"database",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L125-L127 |
tvesalainen/util | util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java | DoubleMatrix.getInstance | public static DoubleMatrix getInstance(int rows, int cols, ItemSupplier s) {
"""
Returns new DoubleMatrix initialized by function
@param rows
@param cols
@param s
@return
"""
DoubleMatrix m = new DoubleMatrix(rows, cols);
ItemConsumer c = m.consumer;
for (int i = 0; i < rows; i++... | java | public static DoubleMatrix getInstance(int rows, int cols, ItemSupplier s)
{
DoubleMatrix m = new DoubleMatrix(rows, cols);
ItemConsumer c = m.consumer;
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < cols; j++)
{
c.set(i, j, s.get... | [
"public",
"static",
"DoubleMatrix",
"getInstance",
"(",
"int",
"rows",
",",
"int",
"cols",
",",
"ItemSupplier",
"s",
")",
"{",
"DoubleMatrix",
"m",
"=",
"new",
"DoubleMatrix",
"(",
"rows",
",",
"cols",
")",
";",
"ItemConsumer",
"c",
"=",
"m",
".",
"consu... | Returns new DoubleMatrix initialized by function
@param rows
@param cols
@param s
@return | [
"Returns",
"new",
"DoubleMatrix",
"initialized",
"by",
"function"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java#L657-L669 |
qspin/qtaste | plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/server/TabGetter.java | TabGetter.executeCommand | @Override
public String executeCommand(int timeout, String componentName, Object... data) throws QTasteException {
"""
Executes the a command on a component.
@param timeout a timeout for the command execution (not used here)
@param componentName name of the component to execute the command on.
@param data... | java | @Override
public String executeCommand(int timeout, String componentName, Object... data) throws QTasteException {
Component component = getComponentByName(componentName);
// sanity checks
if (component == null) {
throw new QTasteTestFailException("Unable to find the component ... | [
"@",
"Override",
"public",
"String",
"executeCommand",
"(",
"int",
"timeout",
",",
"String",
"componentName",
",",
"Object",
"...",
"data",
")",
"throws",
"QTasteException",
"{",
"Component",
"component",
"=",
"getComponentByName",
"(",
"componentName",
")",
";",
... | Executes the a command on a component.
@param timeout a timeout for the command execution (not used here)
@param componentName name of the component to execute the command on.
@param data additional data (not used here)
@return the selected tab index, title or id, according to the specified info selector.
@throws QTas... | [
"Executes",
"the",
"a",
"command",
"on",
"a",
"component",
"."
] | train | https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/server/TabGetter.java#L61-L102 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java | CharTrie.getSurrogateValue | public final char getSurrogateValue(char lead, char trail) {
"""
Get the value associated with a pair of surrogates.
@param lead a lead surrogate
@param trail a trail surrogate
"""
int offset = getSurrogateOffset(lead, trail);
if (offset > 0) {
return m_data_[offset];
}
... | java | public final char getSurrogateValue(char lead, char trail)
{
int offset = getSurrogateOffset(lead, trail);
if (offset > 0) {
return m_data_[offset];
}
return m_initialValue_;
} | [
"public",
"final",
"char",
"getSurrogateValue",
"(",
"char",
"lead",
",",
"char",
"trail",
")",
"{",
"int",
"offset",
"=",
"getSurrogateOffset",
"(",
"lead",
",",
"trail",
")",
";",
"if",
"(",
"offset",
">",
"0",
")",
"{",
"return",
"m_data_",
"[",
"of... | Get the value associated with a pair of surrogates.
@param lead a lead surrogate
@param trail a trail surrogate | [
"Get",
"the",
"value",
"associated",
"with",
"a",
"pair",
"of",
"surrogates",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java#L166-L173 |
languagetool-org/languagetool | languagetool-core/src/main/java/org/languagetool/rules/patterns/PatternToken.java | PatternToken.compile | public PatternToken compile(AnalyzedTokenReadings token, Synthesizer synth) throws IOException {
"""
Prepare PatternToken for matching by formatting its string token and POS (if the Element is supposed
to refer to some other token).
@param token the token specified as {@link AnalyzedTokenReadings}
@param synth ... | java | public PatternToken compile(AnalyzedTokenReadings token, Synthesizer synth) throws IOException {
PatternToken compiledPatternToken;
try {
compiledPatternToken = (PatternToken) clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Could not clone element", e);
}
... | [
"public",
"PatternToken",
"compile",
"(",
"AnalyzedTokenReadings",
"token",
",",
"Synthesizer",
"synth",
")",
"throws",
"IOException",
"{",
"PatternToken",
"compiledPatternToken",
";",
"try",
"{",
"compiledPatternToken",
"=",
"(",
"PatternToken",
")",
"clone",
"(",
... | Prepare PatternToken for matching by formatting its string token and POS (if the Element is supposed
to refer to some other token).
@param token the token specified as {@link AnalyzedTokenReadings}
@param synth the language synthesizer ({@link Synthesizer}) | [
"Prepare",
"PatternToken",
"for",
"matching",
"by",
"formatting",
"its",
"string",
"token",
"and",
"POS",
"(",
"if",
"the",
"Element",
"is",
"supposed",
"to",
"refer",
"to",
"some",
"other",
"token",
")",
"."
] | train | https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/patterns/PatternToken.java#L526-L535 |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedDate.java | InternationalFixedDate.ofYearDay | static InternationalFixedDate ofYearDay(int prolepticYear, int dayOfYear) {
"""
Obtains a {@code InternationalFixedDate} representing a date in the International fixed calendar
system from the proleptic-year and day-of-year fields.
<p>
This returns a {@code InternationalFixedDate} with the specified fields.
Th... | java | static InternationalFixedDate ofYearDay(int prolepticYear, int dayOfYear) {
YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA);
ChronoField.DAY_OF_YEAR.checkValidValue(dayOfYear);
boolean isLeapYear = INSTANCE.isLeapYear(prolepticYear);
int lastDoy = (DAYS_IN_YEAR + (isL... | [
"static",
"InternationalFixedDate",
"ofYearDay",
"(",
"int",
"prolepticYear",
",",
"int",
"dayOfYear",
")",
"{",
"YEAR_RANGE",
".",
"checkValidValue",
"(",
"prolepticYear",
",",
"ChronoField",
".",
"YEAR_OF_ERA",
")",
";",
"ChronoField",
".",
"DAY_OF_YEAR",
".",
"... | Obtains a {@code InternationalFixedDate} representing a date in the International fixed calendar
system from the proleptic-year and day-of-year fields.
<p>
This returns a {@code InternationalFixedDate} with the specified fields.
The day must be valid for the year, otherwise an exception will be thrown.
@param prolepti... | [
"Obtains",
"a",
"{",
"@code",
"InternationalFixedDate",
"}",
"representing",
"a",
"date",
"in",
"the",
"International",
"fixed",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
".",
"<p",
">",
... | train | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedDate.java#L248-L270 |
jenkinsci/jenkins | core/src/main/java/hudson/model/ResourceController.java | ResourceController.execute | public void execute(@Nonnull Runnable task, final ResourceActivity activity ) throws InterruptedException {
"""
Performs the task that requires the given list of resources.
<p>
The execution is blocked until the resource is available.
@throws InterruptedException
the thread can be interrupted while waiting... | java | public void execute(@Nonnull Runnable task, final ResourceActivity activity ) throws InterruptedException {
final ResourceList resources = activity.getResourceList();
_withLock(new NotReallyRoleSensitiveCallable<Void,InterruptedException>() {
@Override
public Void call() throws I... | [
"public",
"void",
"execute",
"(",
"@",
"Nonnull",
"Runnable",
"task",
",",
"final",
"ResourceActivity",
"activity",
")",
"throws",
"InterruptedException",
"{",
"final",
"ResourceList",
"resources",
"=",
"activity",
".",
"getResourceList",
"(",
")",
";",
"_withLock... | Performs the task that requires the given list of resources.
<p>
The execution is blocked until the resource is available.
@throws InterruptedException
the thread can be interrupted while waiting for the available resources. | [
"Performs",
"the",
"task",
"that",
"requires",
"the",
"given",
"list",
"of",
"resources",
"."
] | train | https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ResourceController.java#L79-L109 |
aws/aws-sdk-java | aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/model/GetIdentityNotificationAttributesResult.java | GetIdentityNotificationAttributesResult.withNotificationAttributes | public GetIdentityNotificationAttributesResult withNotificationAttributes(java.util.Map<String, IdentityNotificationAttributes> notificationAttributes) {
"""
<p>
A map of Identity to IdentityNotificationAttributes.
</p>
@param notificationAttributes
A map of Identity to IdentityNotificationAttributes.
@retu... | java | public GetIdentityNotificationAttributesResult withNotificationAttributes(java.util.Map<String, IdentityNotificationAttributes> notificationAttributes) {
setNotificationAttributes(notificationAttributes);
return this;
} | [
"public",
"GetIdentityNotificationAttributesResult",
"withNotificationAttributes",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"IdentityNotificationAttributes",
">",
"notificationAttributes",
")",
"{",
"setNotificationAttributes",
"(",
"notificationAttributes",
... | <p>
A map of Identity to IdentityNotificationAttributes.
</p>
@param notificationAttributes
A map of Identity to IdentityNotificationAttributes.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"A",
"map",
"of",
"Identity",
"to",
"IdentityNotificationAttributes",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/model/GetIdentityNotificationAttributesResult.java#L76-L79 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java | JsonPathUtils.evaluateAsString | public static String evaluateAsString(String payload, String jsonPathExpression) {
"""
Evaluate JsonPath expression on given payload string and return result as string.
@param payload
@param jsonPathExpression
@return
"""
try {
JSONParser parser = new JSONParser(JSONParser.MODE_JSON_SIMP... | java | public static String evaluateAsString(String payload, String jsonPathExpression) {
try {
JSONParser parser = new JSONParser(JSONParser.MODE_JSON_SIMPLE);
Object receivedJson = parser.parse(payload);
ReadContext readerContext = JsonPath.parse(receivedJson);
return... | [
"public",
"static",
"String",
"evaluateAsString",
"(",
"String",
"payload",
",",
"String",
"jsonPathExpression",
")",
"{",
"try",
"{",
"JSONParser",
"parser",
"=",
"new",
"JSONParser",
"(",
"JSONParser",
".",
"MODE_JSON_SIMPLE",
")",
";",
"Object",
"receivedJson",... | Evaluate JsonPath expression on given payload string and return result as string.
@param payload
@param jsonPathExpression
@return | [
"Evaluate",
"JsonPath",
"expression",
"on",
"given",
"payload",
"string",
"and",
"return",
"result",
"as",
"string",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/json/JsonPathUtils.java#L104-L114 |
looly/hutool | hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java | JschUtil.createSftp | public static Sftp createSftp(String sshHost, int sshPort, String sshUser, String sshPass) {
"""
创建Sftp
@param sshHost 远程主机
@param sshPort 远程主机端口
@param sshUser 远程主机用户名
@param sshPass 远程主机密码
@return {@link Sftp}
@since 4.0.3
"""
return new Sftp(sshHost, sshPort, sshUser, sshPass);
} | java | public static Sftp createSftp(String sshHost, int sshPort, String sshUser, String sshPass) {
return new Sftp(sshHost, sshPort, sshUser, sshPass);
} | [
"public",
"static",
"Sftp",
"createSftp",
"(",
"String",
"sshHost",
",",
"int",
"sshPort",
",",
"String",
"sshUser",
",",
"String",
"sshPass",
")",
"{",
"return",
"new",
"Sftp",
"(",
"sshHost",
",",
"sshPort",
",",
"sshUser",
",",
"sshPass",
")",
";",
"}... | 创建Sftp
@param sshHost 远程主机
@param sshPort 远程主机端口
@param sshUser 远程主机用户名
@param sshPass 远程主机密码
@return {@link Sftp}
@since 4.0.3 | [
"创建Sftp"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java#L184-L186 |
wdullaer/MaterialDateTimePicker | library/src/main/java/com/wdullaer/materialdatetimepicker/time/RadialPickerLayout.java | RadialPickerLayout.snapOnly30s | private static int snapOnly30s(int degrees, int forceHigherOrLower) {
"""
Returns mapping of any input degrees (0 to 360) to one of 12 visible output degrees (all
multiples of 30), where the input will be "snapped" to the closest visible degrees.
@param degrees The input degrees
@param forceHigherOrLower The ou... | java | private static int snapOnly30s(int degrees, int forceHigherOrLower) {
int stepSize = HOUR_VALUE_TO_DEGREES_STEP_SIZE;
int floor = (degrees / stepSize) * stepSize;
int ceiling = floor + stepSize;
if (forceHigherOrLower == 1) {
degrees = ceiling;
} else if (forceHigherO... | [
"private",
"static",
"int",
"snapOnly30s",
"(",
"int",
"degrees",
",",
"int",
"forceHigherOrLower",
")",
"{",
"int",
"stepSize",
"=",
"HOUR_VALUE_TO_DEGREES_STEP_SIZE",
";",
"int",
"floor",
"=",
"(",
"degrees",
"/",
"stepSize",
")",
"*",
"stepSize",
";",
"int"... | Returns mapping of any input degrees (0 to 360) to one of 12 visible output degrees (all
multiples of 30), where the input will be "snapped" to the closest visible degrees.
@param degrees The input degrees
@param forceHigherOrLower The output may be forced to either the higher or lower step, or may
be allowed to snap t... | [
"Returns",
"mapping",
"of",
"any",
"input",
"degrees",
"(",
"0",
"to",
"360",
")",
"to",
"one",
"of",
"12",
"visible",
"output",
"degrees",
"(",
"all",
"multiples",
"of",
"30",
")",
"where",
"the",
"input",
"will",
"be",
"snapped",
"to",
"the",
"closes... | train | https://github.com/wdullaer/MaterialDateTimePicker/blob/0a8fe28f19db4f5a5a6cfc525a852416232873a8/library/src/main/java/com/wdullaer/materialdatetimepicker/time/RadialPickerLayout.java#L411-L430 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java | PatternProps.skipWhiteSpace | public static int skipWhiteSpace(CharSequence s, int i) {
"""
Skips over Pattern_White_Space starting at index i of the CharSequence.
@return The smallest index at or after i with a non-white space character.
"""
while(i<s.length() && isWhiteSpace(s.charAt(i))) {
++i;
}
ret... | java | public static int skipWhiteSpace(CharSequence s, int i) {
while(i<s.length() && isWhiteSpace(s.charAt(i))) {
++i;
}
return i;
} | [
"public",
"static",
"int",
"skipWhiteSpace",
"(",
"CharSequence",
"s",
",",
"int",
"i",
")",
"{",
"while",
"(",
"i",
"<",
"s",
".",
"length",
"(",
")",
"&&",
"isWhiteSpace",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
")",
")",
"{",
"++",
"i",
";",
... | Skips over Pattern_White_Space starting at index i of the CharSequence.
@return The smallest index at or after i with a non-white space character. | [
"Skips",
"over",
"Pattern_White_Space",
"starting",
"at",
"index",
"i",
"of",
"the",
"CharSequence",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java#L95-L100 |
Javacord/Javacord | javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java | MessageSetImpl.requestAsMessages | private static MessageSet requestAsMessages(TextChannel channel, int limit, long before, long after) {
"""
Requests the messages from Discord.
@param channel The channel of which to get messages from.
@param limit The limit of messages to get.
@param before Get messages before the message with this id.
@para... | java | private static MessageSet requestAsMessages(TextChannel channel, int limit, long before, long after) {
DiscordApiImpl api = (DiscordApiImpl) channel.getApi();
return new MessageSetImpl(
requestAsJsonNodes(channel, limit, before, after).stream()
.map(jsonNode -> ap... | [
"private",
"static",
"MessageSet",
"requestAsMessages",
"(",
"TextChannel",
"channel",
",",
"int",
"limit",
",",
"long",
"before",
",",
"long",
"after",
")",
"{",
"DiscordApiImpl",
"api",
"=",
"(",
"DiscordApiImpl",
")",
"channel",
".",
"getApi",
"(",
")",
"... | Requests the messages from Discord.
@param channel The channel of which to get messages from.
@param limit The limit of messages to get.
@param before Get messages before the message with this id.
@param after Get messages after the message with this id.
@return The messages. | [
"Requests",
"the",
"messages",
"from",
"Discord",
"."
] | train | https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java#L757-L763 |
tzaeschke/zoodb | src/org/zoodb/internal/util/FormattedStringBuilder.java | FormattedStringBuilder.fillBuffer | private FormattedStringBuilder fillBuffer(int newLength, char c) {
"""
Attempts to append <tt>c</tt> until the buffer gets the length <tt>
newLength</tt>. If the buffer is already as long or longer than <tt>
newLength</tt>, then nothing is appended.
@param newLength Minimal new length of the returned buffer.
@... | java | private FormattedStringBuilder fillBuffer(int newLength, char c) {
for (int i = _delegate.length(); i < newLength; i++ ) {
_delegate.append(c);
}
return this;
} | [
"private",
"FormattedStringBuilder",
"fillBuffer",
"(",
"int",
"newLength",
",",
"char",
"c",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"_delegate",
".",
"length",
"(",
")",
";",
"i",
"<",
"newLength",
";",
"i",
"++",
")",
"{",
"_delegate",
".",
"append",... | Attempts to append <tt>c</tt> until the buffer gets the length <tt>
newLength</tt>. If the buffer is already as long or longer than <tt>
newLength</tt>, then nothing is appended.
@param newLength Minimal new length of the returned buffer.
@param c Character to append.
@return The updated instance of FormattedStringBuil... | [
"Attempts",
"to",
"append",
"<tt",
">",
"c<",
"/",
"tt",
">",
"until",
"the",
"buffer",
"gets",
"the",
"length",
"<tt",
">",
"newLength<",
"/",
"tt",
">",
".",
"If",
"the",
"buffer",
"is",
"already",
"as",
"long",
"or",
"longer",
"than",
"<tt",
">",
... | train | https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/util/FormattedStringBuilder.java#L176-L181 |
davidcarboni/cryptolite-java | src/main/java/com/github/davidcarboni/cryptolite/DigitalSignature.java | DigitalSignature.verify | public boolean verify(String content, PublicKey publicKey, String signature) {
"""
Verifies whether the given content matches the given signature.
@param content The content to be verified.
@param publicKey The public key to use in the verification process.
@param signature The signature with which the cont... | java | public boolean verify(String content, PublicKey publicKey, String signature) {
byte[] bytes = content.getBytes(StandardCharsets.UTF_8);
InputStream input = new ByteArrayInputStream(bytes);
return verify(input, publicKey, signature);
// ByteArrayInputStream does not need to be closed.
... | [
"public",
"boolean",
"verify",
"(",
"String",
"content",
",",
"PublicKey",
"publicKey",
",",
"String",
"signature",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"content",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
";",
"InputStream",
"input",... | Verifies whether the given content matches the given signature.
@param content The content to be verified.
@param publicKey The public key to use in the verification process.
@param signature The signature with which the content is to be verified. This can be obtained via
{@link Keys#newKeyPair()}.
@return If the co... | [
"Verifies",
"whether",
"the",
"given",
"content",
"matches",
"the",
"given",
"signature",
"."
] | train | https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/DigitalSignature.java#L113-L120 |
VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java | JDBC4PreparedStatement.setClob | @Override
public void setClob(int parameterIndex, Clob x) throws SQLException {
"""
Sets the designated parameter to the given java.sql.Clob object.
"""
checkParameterBounds(parameterIndex);
throw SQLError.noSupport();
} | java | @Override
public void setClob(int parameterIndex, Clob x) throws SQLException
{
checkParameterBounds(parameterIndex);
throw SQLError.noSupport();
} | [
"@",
"Override",
"public",
"void",
"setClob",
"(",
"int",
"parameterIndex",
",",
"Clob",
"x",
")",
"throws",
"SQLException",
"{",
"checkParameterBounds",
"(",
"parameterIndex",
")",
";",
"throw",
"SQLError",
".",
"noSupport",
"(",
")",
";",
"}"
] | Sets the designated parameter to the given java.sql.Clob object. | [
"Sets",
"the",
"designated",
"parameter",
"to",
"the",
"given",
"java",
".",
"sql",
".",
"Clob",
"object",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L294-L299 |
alkacon/opencms-core | src-gwt/org/opencms/ade/contenteditor/widgetregistry/client/A_NativeWidgetFactory.java | A_NativeWidgetFactory.createNativeWrapedElement | private NativeEditWidget createNativeWrapedElement(String configuration, Element element) {
"""
Creates a widget wrapped in a native java script object.<p>
@param configuration the widget configuration
@param element the element to use
@return the wrapped widget
"""
return NativeEditWidget.wr... | java | private NativeEditWidget createNativeWrapedElement(String configuration, Element element) {
return NativeEditWidget.wrapWidget(createInlineWidget(configuration, element), false);
} | [
"private",
"NativeEditWidget",
"createNativeWrapedElement",
"(",
"String",
"configuration",
",",
"Element",
"element",
")",
"{",
"return",
"NativeEditWidget",
".",
"wrapWidget",
"(",
"createInlineWidget",
"(",
"configuration",
",",
"element",
")",
",",
"false",
")",
... | Creates a widget wrapped in a native java script object.<p>
@param configuration the widget configuration
@param element the element to use
@return the wrapped widget | [
"Creates",
"a",
"widget",
"wrapped",
"in",
"a",
"native",
"java",
"script",
"object",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/contenteditor/widgetregistry/client/A_NativeWidgetFactory.java#L103-L106 |
moparisthebest/beehive | beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/RowMapperFactory.java | RowMapperFactory.getMapper | private static RowMapper getMapper(Class<? extends RowMapper> rowMapper, ResultSet rs, Class returnType, Calendar cal) {
"""
Create an instance of the RowMapper class.
@param rowMapper
@param rs ResultSet we are mapping from.
@param returnType Class to map rows to.
@param cal Calendar instance... | java | private static RowMapper getMapper(Class<? extends RowMapper> rowMapper, ResultSet rs, Class returnType, Calendar cal)
{
Constructor c = null;
try {
c = rowMapper.getDeclaredConstructor(_params);
return (RowMapper) c.newInstance(new Object[]{rs, returnType, cal});
} c... | [
"private",
"static",
"RowMapper",
"getMapper",
"(",
"Class",
"<",
"?",
"extends",
"RowMapper",
">",
"rowMapper",
",",
"ResultSet",
"rs",
",",
"Class",
"returnType",
",",
"Calendar",
"cal",
")",
"{",
"Constructor",
"c",
"=",
"null",
";",
"try",
"{",
"c",
... | Create an instance of the RowMapper class.
@param rowMapper
@param rs ResultSet we are mapping from.
@param returnType Class to map rows to.
@param cal Calendar instance for date/time values.
@return A RowMapper instance. | [
"Create",
"an",
"instance",
"of",
"the",
"RowMapper",
"class",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/RowMapperFactory.java#L155-L170 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.