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 |
|---|---|---|---|---|---|---|---|---|---|---|
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java | HtmlTree.DD | public static HtmlTree DD(Content body) {
"""
Generates a DD tag with some content.
@param body content for the tag
@return an HtmlTree object for the DD tag
"""
HtmlTree htmltree = new HtmlTree(HtmlTag.DD, nullCheck(body));
return htmltree;
} | java | public static HtmlTree DD(Content body) {
HtmlTree htmltree = new HtmlTree(HtmlTag.DD, nullCheck(body));
return htmltree;
} | [
"public",
"static",
"HtmlTree",
"DD",
"(",
"Content",
"body",
")",
"{",
"HtmlTree",
"htmltree",
"=",
"new",
"HtmlTree",
"(",
"HtmlTag",
".",
"DD",
",",
"nullCheck",
"(",
"body",
")",
")",
";",
"return",
"htmltree",
";",
"}"
] | Generates a DD tag with some content.
@param body content for the tag
@return an HtmlTree object for the DD tag | [
"Generates",
"a",
"DD",
"tag",
"with",
"some",
"content",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L310-L313 |
RestComm/sipunit | src/main/java/org/cafesip/sipunit/SipAssert.java | SipAssert.assertResponseReceived | public static void assertResponseReceived(String msg, int statusCode, MessageListener obj) {
"""
Asserts that the given message listener object received a response with the indicated status
code. Assertion failure output includes the given message text.
@param msg message text to output if the assertion fails.... | java | public static void assertResponseReceived(String msg, int statusCode, MessageListener obj) {
assertNotNull("Null assert object passed in", obj);
assertTrue(msg, responseReceived(statusCode, obj));
} | [
"public",
"static",
"void",
"assertResponseReceived",
"(",
"String",
"msg",
",",
"int",
"statusCode",
",",
"MessageListener",
"obj",
")",
"{",
"assertNotNull",
"(",
"\"Null assert object passed in\"",
",",
"obj",
")",
";",
"assertTrue",
"(",
"msg",
",",
"responseR... | Asserts that the given message listener object received a response with the indicated status
code. Assertion failure output includes the given message text.
@param msg message text to output if the assertion fails.
@param statusCode The response status code to check for (eg, SipResponse.RINGING)
@param obj The Message... | [
"Asserts",
"that",
"the",
"given",
"message",
"listener",
"object",
"received",
"a",
"response",
"with",
"the",
"indicated",
"status",
"code",
".",
"Assertion",
"failure",
"output",
"includes",
"the",
"given",
"message",
"text",
"."
] | train | https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipAssert.java#L272-L275 |
adorsys/hbci4java-adorsys | src/main/java/org/kapott/hbci/sepa/SepaVersion.java | SepaVersion.findType | private static Type findType(String type, String value) throws IllegalArgumentException {
"""
Liefert den enum-Type fuer den angegebenen Wert.
@param type der Type. "pain", "camt".
@param value der Wert. 001, 002, 008, ....
@return der zugehoerige Enum-Wert.
@throws IllegalArgumentException wenn der Typ unb... | java | private static Type findType(String type, String value) throws IllegalArgumentException {
if (type == null || type.length() == 0)
throw new IllegalArgumentException("no SEPA type type given");
if (value == null || value.length() == 0)
throw new IllegalArgumentException("no SEPA ... | [
"private",
"static",
"Type",
"findType",
"(",
"String",
"type",
",",
"String",
"value",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"type",
"==",
"null",
"||",
"type",
".",
"length",
"(",
")",
"==",
"0",
")",
"throw",
"new",
"IllegalArgument... | Liefert den enum-Type fuer den angegebenen Wert.
@param type der Type. "pain", "camt".
@param value der Wert. 001, 002, 008, ....
@return der zugehoerige Enum-Wert.
@throws IllegalArgumentException wenn der Typ unbekannt ist. | [
"Liefert",
"den",
"enum",
"-",
"Type",
"fuer",
"den",
"angegebenen",
"Wert",
"."
] | train | https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/sepa/SepaVersion.java#L182-L194 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/cli/CliClient.java | CliClient.columnNameAsBytes | private ByteBuffer columnNameAsBytes(String column, CfDef columnFamilyDef) {
"""
Converts column name into byte[] according to comparator type
@param column - column name from parser
@param columnFamilyDef - column family from parser
@return ByteBuffer bytes - into which column name was converted according to c... | java | private ByteBuffer columnNameAsBytes(String column, CfDef columnFamilyDef)
{
String comparatorClass = columnFamilyDef.comparator_type;
return getBytesAccordingToType(column, getFormatType(comparatorClass));
} | [
"private",
"ByteBuffer",
"columnNameAsBytes",
"(",
"String",
"column",
",",
"CfDef",
"columnFamilyDef",
")",
"{",
"String",
"comparatorClass",
"=",
"columnFamilyDef",
".",
"comparator_type",
";",
"return",
"getBytesAccordingToType",
"(",
"column",
",",
"getFormatType",
... | Converts column name into byte[] according to comparator type
@param column - column name from parser
@param columnFamilyDef - column family from parser
@return ByteBuffer bytes - into which column name was converted according to comparator type | [
"Converts",
"column",
"name",
"into",
"byte",
"[]",
"according",
"to",
"comparator",
"type"
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2583-L2587 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java | VirtualNetworkPeeringsInner.listAsync | public Observable<Page<VirtualNetworkPeeringInner>> listAsync(final String resourceGroupName, final String virtualNetworkName) {
"""
Gets all virtual network peerings in a virtual network.
@param resourceGroupName The name of the resource group.
@param virtualNetworkName The name of the virtual network.
@thro... | java | public Observable<Page<VirtualNetworkPeeringInner>> listAsync(final String resourceGroupName, final String virtualNetworkName) {
return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName)
.map(new Func1<ServiceResponse<Page<VirtualNetworkPeeringInner>>, Page<VirtualNetworkPeeringInne... | [
"public",
"Observable",
"<",
"Page",
"<",
"VirtualNetworkPeeringInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"virtualNetworkName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
... | Gets all virtual network peerings in a virtual network.
@param resourceGroupName The name of the resource group.
@param virtualNetworkName The name of the virtual network.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<VirtualNetworkPeeringInner>... | [
"Gets",
"all",
"virtual",
"network",
"peerings",
"in",
"a",
"virtual",
"network",
"."
] | 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/VirtualNetworkPeeringsInner.java#L581-L589 |
jayantk/jklol | src/com/jayantkrish/jklol/cvsm/CvsmSufficientStatistics.java | CvsmSufficientStatistics.incrementEntry | public void incrementEntry(int i, SufficientStatistics increment) {
"""
Adds {@code increment} to the {@code i}th parameter vector in
this.
@param i
@param increment
"""
ensureStatisticInstantiated(i);
statistics.get(i).increment(increment, 1.0);
} | java | public void incrementEntry(int i, SufficientStatistics increment) {
ensureStatisticInstantiated(i);
statistics.get(i).increment(increment, 1.0);
} | [
"public",
"void",
"incrementEntry",
"(",
"int",
"i",
",",
"SufficientStatistics",
"increment",
")",
"{",
"ensureStatisticInstantiated",
"(",
"i",
")",
";",
"statistics",
".",
"get",
"(",
"i",
")",
".",
"increment",
"(",
"increment",
",",
"1.0",
")",
";",
"... | Adds {@code increment} to the {@code i}th parameter vector in
this.
@param i
@param increment | [
"Adds",
"{",
"@code",
"increment",
"}",
"to",
"the",
"{",
"@code",
"i",
"}",
"th",
"parameter",
"vector",
"in",
"this",
"."
] | train | https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/cvsm/CvsmSufficientStatistics.java#L110-L113 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java | VirtualNetworkTapsInner.beginDelete | public void beginDelete(String resourceGroupName, String tapName) {
"""
Deletes the specified virtual network tap.
@param resourceGroupName The name of the resource group.
@param tapName The name of the virtual network tap.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws Clo... | java | public void beginDelete(String resourceGroupName, String tapName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, tapName).toBlocking().single().body();
} | [
"public",
"void",
"beginDelete",
"(",
"String",
"resourceGroupName",
",",
"String",
"tapName",
")",
"{",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"tapName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
")",
".",
"body",
"(",... | Deletes the specified virtual network tap.
@param resourceGroupName The name of the resource group.
@param tapName The name of the virtual network tap.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException a... | [
"Deletes",
"the",
"specified",
"virtual",
"network",
"tap",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java#L191-L193 |
apereo/cas | support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java | LdapUtils.newLdaptiveSearchFilter | public static SearchFilter newLdaptiveSearchFilter(final String filterQuery, final List<String> params) {
"""
Constructs a new search filter using {@link SearchExecutor#getSearchFilter()} as a template and
the username as a parameter.
@param filterQuery the query filter
@param params the username
@retur... | java | public static SearchFilter newLdaptiveSearchFilter(final String filterQuery, final List<String> params) {
return newLdaptiveSearchFilter(filterQuery, LDAP_SEARCH_FILTER_DEFAULT_PARAM_NAME, params);
} | [
"public",
"static",
"SearchFilter",
"newLdaptiveSearchFilter",
"(",
"final",
"String",
"filterQuery",
",",
"final",
"List",
"<",
"String",
">",
"params",
")",
"{",
"return",
"newLdaptiveSearchFilter",
"(",
"filterQuery",
",",
"LDAP_SEARCH_FILTER_DEFAULT_PARAM_NAME",
","... | Constructs a new search filter using {@link SearchExecutor#getSearchFilter()} as a template and
the username as a parameter.
@param filterQuery the query filter
@param params the username
@return Search filter with parameters applied. | [
"Constructs",
"a",
"new",
"search",
"filter",
"using",
"{",
"@link",
"SearchExecutor#getSearchFilter",
"()",
"}",
"as",
"a",
"template",
"and",
"the",
"username",
"as",
"a",
"parameter",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L512-L514 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java | ExecuteSQLQueryBuilder.validateScript | public ExecuteSQLQueryBuilder validateScript(Resource scriptResource, String type, Charset charset) {
"""
Validate SQL result set via validation script, for instance Groovy.
@param scriptResource
@param type
@param charset
"""
ScriptValidationContext scriptValidationContext = new ScriptValidationCon... | java | public ExecuteSQLQueryBuilder validateScript(Resource scriptResource, String type, Charset charset) {
ScriptValidationContext scriptValidationContext = new ScriptValidationContext(type);
try {
scriptValidationContext.setValidationScript(FileUtils.readToString(scriptResource, charset));
... | [
"public",
"ExecuteSQLQueryBuilder",
"validateScript",
"(",
"Resource",
"scriptResource",
",",
"String",
"type",
",",
"Charset",
"charset",
")",
"{",
"ScriptValidationContext",
"scriptValidationContext",
"=",
"new",
"ScriptValidationContext",
"(",
"type",
")",
";",
"try"... | Validate SQL result set via validation script, for instance Groovy.
@param scriptResource
@param type
@param charset | [
"Validate",
"SQL",
"result",
"set",
"via",
"validation",
"script",
"for",
"instance",
"Groovy",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java#L197-L206 |
unbescape/unbescape | src/main/java/org/unbescape/uri/UriEscape.java | UriEscape.unescapeUriPathSegment | public static void unescapeUriPathSegment(final char[] text, final int offset, final int len, final Writer writer)
throws IOException {
"""
<p>
Perform am URI path segment <strong>unescape</strong> operation
on a <tt>char[]</tt> input using <tt>UTF-8</tt> as encoding.
</p>
<p>
This method will une... | java | public static void unescapeUriPathSegment(final char[] text, final int offset, final int len, final Writer writer)
throws IOException {
unescapeUriPathSegment(text, offset, len, writer, DEFAULT_ENCODING);
} | [
"public",
"static",
"void",
"unescapeUriPathSegment",
"(",
"final",
"char",
"[",
"]",
"text",
",",
"final",
"int",
"offset",
",",
"final",
"int",
"len",
",",
"final",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"unescapeUriPathSegment",
"(",
"text",... | <p>
Perform am URI path segment <strong>unescape</strong> operation
on a <tt>char[]</tt> input using <tt>UTF-8</tt> as encoding.
</p>
<p>
This method will unescape every percent-encoded (<tt>%HH</tt>) sequences present in input,
even for those characters that do not need to be percent-encoded in this context (unreserve... | [
"<p",
">",
"Perform",
"am",
"URI",
"path",
"segment",
"<strong",
">",
"unescape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"char",
"[]",
"<",
"/",
"tt",
">",
"input",
"using",
"<tt",
">",
"UTF",
"-",
"8<",
"/",
"tt",
">",
"as",
"e... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L2506-L2509 |
rhuss/jolokia | agent/core/src/main/java/org/jolokia/handler/list/MBeanInfoData.java | MBeanInfoData.handleException | public void handleException(ObjectName pName, InstanceNotFoundException pExp) throws InstanceNotFoundException {
"""
Add an exception which occurred during extraction of an {@link MBeanInfo} for
a certain {@link ObjectName} to this map.
@param pName MBean name for which the error occurred
@param pExp exceptio... | java | public void handleException(ObjectName pName, InstanceNotFoundException pExp) throws InstanceNotFoundException {
// This happen happens for JBoss 7.1 in some cases (i.e. ResourceAdapterModule)
if (pathStack.size() == 0) {
addException(pName, pExp);
} else {
throw new Instan... | [
"public",
"void",
"handleException",
"(",
"ObjectName",
"pName",
",",
"InstanceNotFoundException",
"pExp",
")",
"throws",
"InstanceNotFoundException",
"{",
"// This happen happens for JBoss 7.1 in some cases (i.e. ResourceAdapterModule)",
"if",
"(",
"pathStack",
".",
"size",
"(... | Add an exception which occurred during extraction of an {@link MBeanInfo} for
a certain {@link ObjectName} to this map.
@param pName MBean name for which the error occurred
@param pExp exception occurred
@throws IllegalStateException if this method decides to rethrow the exception | [
"Add",
"an",
"exception",
"which",
"occurred",
"during",
"extraction",
"of",
"an",
"{",
"@link",
"MBeanInfo",
"}",
"for",
"a",
"certain",
"{",
"@link",
"ObjectName",
"}",
"to",
"this",
"map",
"."
] | train | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/list/MBeanInfoData.java#L238-L245 |
Azure/azure-sdk-for-java | notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java | NotificationHubsInner.get | public NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName) {
"""
Lists the notification hubs associated with a namespace.
@param resourceGroupName The name of the resource group.
@param namespaceName The namespace name.
@param notificationHubName The no... | java | public NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName) {
return getWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body();
} | [
"public",
"NotificationHubResourceInner",
"get",
"(",
"String",
"resourceGroupName",
",",
"String",
"namespaceName",
",",
"String",
"notificationHubName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"namespaceName",
",",
"notificationHu... | Lists the notification hubs associated with a namespace.
@param resourceGroupName The name of the resource group.
@param namespaceName The namespace name.
@param notificationHubName The notification hub name.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the... | [
"Lists",
"the",
"notification",
"hubs",
"associated",
"with",
"a",
"namespace",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java#L622-L624 |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/remote/codec/AbstractHttpCommandCodec.java | AbstractHttpCommandCodec.defineCommand | @Override
public void defineCommand(String name, HttpMethod method, String pathPattern) {
"""
Defines a new command mapping.
@param name The command name.
@param method The HTTP method to use for the command.
@param pathPattern The URI path pattern for the command. When encoding a command, each
path segmen... | java | @Override
public void defineCommand(String name, HttpMethod method, String pathPattern) {
defineCommand(name, new CommandSpec(method, pathPattern));
} | [
"@",
"Override",
"public",
"void",
"defineCommand",
"(",
"String",
"name",
",",
"HttpMethod",
"method",
",",
"String",
"pathPattern",
")",
"{",
"defineCommand",
"(",
"name",
",",
"new",
"CommandSpec",
"(",
"method",
",",
"pathPattern",
")",
")",
";",
"}"
] | Defines a new command mapping.
@param name The command name.
@param method The HTTP method to use for the command.
@param pathPattern The URI path pattern for the command. When encoding a command, each
path segment prefixed with a ":" will be replaced with the corresponding parameter
from the encoded command. | [
"Defines",
"a",
"new",
"command",
"mapping",
"."
] | train | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/codec/AbstractHttpCommandCodec.java#L296-L299 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/application/impl/metadata/ProcessesXmlParse.java | ProcessesXmlParse.parseRootElement | @Override
protected void parseRootElement() {
"""
we know this is a <code><process-application ... /></code> structure.
"""
List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>();
List<ProcessArchiveXml> processArchives = new ArrayList<ProcessArchiveXml>();
for (Element... | java | @Override
protected void parseRootElement() {
List<ProcessEngineXml> processEngines = new ArrayList<ProcessEngineXml>();
List<ProcessArchiveXml> processArchives = new ArrayList<ProcessArchiveXml>();
for (Element element : rootElement.elements()) {
if(PROCESS_ENGINE.equals(element.getTagName())) {... | [
"@",
"Override",
"protected",
"void",
"parseRootElement",
"(",
")",
"{",
"List",
"<",
"ProcessEngineXml",
">",
"processEngines",
"=",
"new",
"ArrayList",
"<",
"ProcessEngineXml",
">",
"(",
")",
";",
"List",
"<",
"ProcessArchiveXml",
">",
"processArchives",
"=",
... | we know this is a <code><process-application ... /></code> structure. | [
"we",
"know",
"this",
"is",
"a",
"<code",
">",
"<",
";",
"process",
"-",
"application",
"...",
"/",
">",
";",
"<",
"/",
"code",
">",
"structure",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/application/impl/metadata/ProcessesXmlParse.java#L67-L87 |
mgormley/prim | src/main/java/edu/jhu/prim/sample/PairSampler.java | PairSampler.sampleOrderedPairs | public static Collection<OrderedPair> sampleOrderedPairs(int minI, int maxI, int minJ, int maxJ, double prop) {
"""
Sample with replacement ordered pairs of integers.
@param minI The minimum value for i (inclusive).
@param maxI The maximum value for i (exclusive).
@param minJ The minimum value for j (inclusiv... | java | public static Collection<OrderedPair> sampleOrderedPairs(int minI, int maxI, int minJ, int maxJ, double prop) {
int numI = maxI - minI;
int numJ = maxJ - minJ;
// Count the max number possible:
long maxPairs = numI * numJ;
Collection<OrderedPair> sample... | [
"public",
"static",
"Collection",
"<",
"OrderedPair",
">",
"sampleOrderedPairs",
"(",
"int",
"minI",
",",
"int",
"maxI",
",",
"int",
"minJ",
",",
"int",
"maxJ",
",",
"double",
"prop",
")",
"{",
"int",
"numI",
"=",
"maxI",
"-",
"minI",
";",
"int",
"numJ... | Sample with replacement ordered pairs of integers.
@param minI The minimum value for i (inclusive).
@param maxI The maximum value for i (exclusive).
@param minJ The minimum value for j (inclusive).
@param maxJ The maximum value for j (exclusive).
@param prop The proportion of possible pairs to return.
@return A collec... | [
"Sample",
"with",
"replacement",
"ordered",
"pairs",
"of",
"integers",
"."
] | train | https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/sample/PairSampler.java#L27-L57 |
joelittlejohn/jsonschema2pojo | jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ArrayRule.java | ArrayRule.apply | @Override
public JClass apply(String nodeName, JsonNode node, JsonNode parent, JPackage jpackage, Schema schema) {
"""
<p>Applies this schema rule to take the required code generation steps.</p>
<p>When constructs of type "array" appear in the schema, these are mapped to
Java collections in the generated P... | java | @Override
public JClass apply(String nodeName, JsonNode node, JsonNode parent, JPackage jpackage, Schema schema) {
boolean uniqueItems = node.has("uniqueItems") && node.get("uniqueItems").asBoolean();
boolean rootSchemaIsArray = !schema.isGenerated();
JType itemType;
if (node.has("... | [
"@",
"Override",
"public",
"JClass",
"apply",
"(",
"String",
"nodeName",
",",
"JsonNode",
"node",
",",
"JsonNode",
"parent",
",",
"JPackage",
"jpackage",
",",
"Schema",
"schema",
")",
"{",
"boolean",
"uniqueItems",
"=",
"node",
".",
"has",
"(",
"\"uniqueItem... | <p>Applies this schema rule to take the required code generation steps.</p>
<p>When constructs of type "array" appear in the schema, these are mapped to
Java collections in the generated POJO. If the array is marked as having
"uniqueItems" then the resulting Java type is {@link Set}, if not, then
the resulting Java ty... | [
"<p",
">",
"Applies",
"this",
"schema",
"rule",
"to",
"take",
"the",
"required",
"code",
"generation",
"steps",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/ArrayRule.java#L75-L100 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java | DdosProtectionPlansInner.beginCreateOrUpdate | public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) {
"""
Creates or updates a DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection... | java | public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().single().body();
} | [
"public",
"DdosProtectionPlanInner",
"beginCreateOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"ddosProtectionPlanName",
",",
"DdosProtectionPlanInner",
"parameters",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",... | Creates or updates a DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection plan.
@param parameters Parameters supplied to the create or update operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@thr... | [
"Creates",
"or",
"updates",
"a",
"DDoS",
"protection",
"plan",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L426-L428 |
JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java | FXMLUtils.convertFxmlUrl | private static <M extends Model> URL convertFxmlUrl(final M model, final String fxmlPath) {
"""
Convert The url of fxml files to allow local and path loading.
@param model the model class that will be used for relative loading
@param fxmlPath the path of the fxml file (relative or absolute)
@return the FXML... | java | private static <M extends Model> URL convertFxmlUrl(final M model, final String fxmlPath) {
URL fxmlUrl = null;
// Replace all '.' separator by path separator '/'
if (model != null) {
// Try to load the resource from the same path as the model class
fxmlUrl = model.g... | [
"private",
"static",
"<",
"M",
"extends",
"Model",
">",
"URL",
"convertFxmlUrl",
"(",
"final",
"M",
"model",
",",
"final",
"String",
"fxmlPath",
")",
"{",
"URL",
"fxmlUrl",
"=",
"null",
";",
"// Replace all '.' separator by path separator '/'\r",
"if",
"(",
"mod... | Convert The url of fxml files to allow local and path loading.
@param model the model class that will be used for relative loading
@param fxmlPath the path of the fxml file (relative or absolute)
@return the FXML file URL
@param <M> the model type that will manage this fxml node | [
"Convert",
"The",
"url",
"of",
"fxml",
"files",
"to",
"allow",
"local",
"and",
"path",
"loading",
"."
] | train | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/fxml/FXMLUtils.java#L156-L169 |
fengwenyi/JavaLib | src/main/java/com/fengwenyi/javalib/util/RSAUtil.java | RSAUtil.publicKeyEncrypt | public static String publicKeyEncrypt(String key, String plainText) throws NoSuchAlgorithmException,
InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, BadPaddingException,
IllegalBlockSizeException, UnsupportedEncodingException {
"""
公钥加密
@param key [ellipsis]
@param p... | java | public static String publicKeyEncrypt(String key, String plainText) throws NoSuchAlgorithmException,
InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, BadPaddingException,
IllegalBlockSizeException, UnsupportedEncodingException {
PublicKey publicKey = commonGetPublick... | [
"public",
"static",
"String",
"publicKeyEncrypt",
"(",
"String",
"key",
",",
"String",
"plainText",
")",
"throws",
"NoSuchAlgorithmException",
",",
"InvalidKeySpecException",
",",
"NoSuchPaddingException",
",",
"InvalidKeyException",
",",
"BadPaddingException",
",",
"Ille... | 公钥加密
@param key [ellipsis]
@param plainText [ellipsis]
@return [ellipsis]
@throws NoSuchAlgorithmException [ellipsis]
@throws InvalidKeySpecException [ellipsis]
@throws NoSuchPaddingException [ellipsis]
@throws InvalidKeyException [ellipsis]
@throws BadPaddingException [ellipsis]
@throws IllegalBlockSizeException [elli... | [
"公钥加密"
] | train | https://github.com/fengwenyi/JavaLib/blob/14838b13fb11c024e41be766aa3e13ead4be1703/src/main/java/com/fengwenyi/javalib/util/RSAUtil.java#L121-L131 |
realtime-framework/RealtimeMessaging-Android | library/src/main/java/ibt/ortc/extensibility/OrtcClient.java | OrtcClient.subscribeWithNotifications | public void subscribeWithNotifications(String channel, boolean subscribeOnReconnect, OnMessage onMessage) {
"""
Subscribe the specified channel in order to receive messages in that
channel with a support of Google Cloud Messaging.
@param channel
Channel to be subscribed
@param subscribeOnReconnect
Indicates... | java | public void subscribeWithNotifications(String channel, boolean subscribeOnReconnect, OnMessage onMessage){
_subscribeWithNotifications(channel, subscribeOnReconnect, onMessage, false);
} | [
"public",
"void",
"subscribeWithNotifications",
"(",
"String",
"channel",
",",
"boolean",
"subscribeOnReconnect",
",",
"OnMessage",
"onMessage",
")",
"{",
"_subscribeWithNotifications",
"(",
"channel",
",",
"subscribeOnReconnect",
",",
"onMessage",
",",
"false",
")",
... | Subscribe the specified channel in order to receive messages in that
channel with a support of Google Cloud Messaging.
@param channel
Channel to be subscribed
@param subscribeOnReconnect
Indicates if the channel should be subscribe if the event on
reconnected is fired
@param onMessage
Event handler that will be called... | [
"Subscribe",
"the",
"specified",
"channel",
"in",
"order",
"to",
"receive",
"messages",
"in",
"that",
"channel",
"with",
"a",
"support",
"of",
"Google",
"Cloud",
"Messaging",
"."
] | train | https://github.com/realtime-framework/RealtimeMessaging-Android/blob/f0d87b92ed7c591bcfe2b9cf45b947865570e061/library/src/main/java/ibt/ortc/extensibility/OrtcClient.java#L893-L895 |
jenetics/jenetics | jenetics.tool/src/main/java/io/jenetics/tool/trial/TrialMeter.java | TrialMeter.sample | public void sample(final Function<T, double[]> function) {
"""
Calculates the test values for all parameters. The length of the
resulting {@code double[]} array must be {@link #dataSize()}.
@param function the test function
"""
_params.values()
.subSeq(_dataSet.nextParamIndex())
.forEach(p -> _data... | java | public void sample(final Function<T, double[]> function) {
_params.values()
.subSeq(_dataSet.nextParamIndex())
.forEach(p -> _dataSet.add(function.apply(p)));
} | [
"public",
"void",
"sample",
"(",
"final",
"Function",
"<",
"T",
",",
"double",
"[",
"]",
">",
"function",
")",
"{",
"_params",
".",
"values",
"(",
")",
".",
"subSeq",
"(",
"_dataSet",
".",
"nextParamIndex",
"(",
")",
")",
".",
"forEach",
"(",
"p",
... | Calculates the test values for all parameters. The length of the
resulting {@code double[]} array must be {@link #dataSize()}.
@param function the test function | [
"Calculates",
"the",
"test",
"values",
"for",
"all",
"parameters",
".",
"The",
"length",
"of",
"the",
"resulting",
"{",
"@code",
"double",
"[]",
"}",
"array",
"must",
"be",
"{",
"@link",
"#dataSize",
"()",
"}",
"."
] | train | https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.tool/src/main/java/io/jenetics/tool/trial/TrialMeter.java#L146-L150 |
eurekaclinical/javautil | src/main/java/org/arp/javautil/string/StringUtil.java | StringUtil.escapeDelimitedColumn | public static String escapeDelimitedColumn(String str, char delimiter) {
"""
Escapes a column in a delimited file.
@param str a column {@link String}.
@param delimiter the file's delimiter character.
@return the escaped column {@link String}.
"""
if (str == null || (containsNone(str, SEARCH_CHARS)... | java | public static String escapeDelimitedColumn(String str, char delimiter) {
if (str == null || (containsNone(str, SEARCH_CHARS) && str.indexOf(delimiter) < 0)) {
return str;
} else {
StringBuilder writer = new StringBuilder();
writer.append(QUOTE);
for (int j... | [
"public",
"static",
"String",
"escapeDelimitedColumn",
"(",
"String",
"str",
",",
"char",
"delimiter",
")",
"{",
"if",
"(",
"str",
"==",
"null",
"||",
"(",
"containsNone",
"(",
"str",
",",
"SEARCH_CHARS",
")",
"&&",
"str",
".",
"indexOf",
"(",
"delimiter",... | Escapes a column in a delimited file.
@param str a column {@link String}.
@param delimiter the file's delimiter character.
@return the escaped column {@link String}. | [
"Escapes",
"a",
"column",
"in",
"a",
"delimited",
"file",
"."
] | train | https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/string/StringUtil.java#L276-L292 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/BufferUtil.java | BufferUtil.copy | public static ByteBuffer copy(ByteBuffer src, int srcStart, ByteBuffer dest, int destStart, int length) {
"""
拷贝ByteBuffer
@param src 源ByteBuffer
@param srcStart 源开始的位置
@param dest 目标ByteBuffer
@param destStart 目标开始的位置
@param length 长度
@return 目标ByteBuffer
"""
System.arraycopy(src.array(), srcStart,... | java | public static ByteBuffer copy(ByteBuffer src, int srcStart, ByteBuffer dest, int destStart, int length) {
System.arraycopy(src.array(), srcStart, dest.array(), destStart, length);
return dest;
} | [
"public",
"static",
"ByteBuffer",
"copy",
"(",
"ByteBuffer",
"src",
",",
"int",
"srcStart",
",",
"ByteBuffer",
"dest",
",",
"int",
"destStart",
",",
"int",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"src",
".",
"array",
"(",
")",
",",
"srcStart... | 拷贝ByteBuffer
@param src 源ByteBuffer
@param srcStart 源开始的位置
@param dest 目标ByteBuffer
@param destStart 目标开始的位置
@param length 长度
@return 目标ByteBuffer | [
"拷贝ByteBuffer"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/BufferUtil.java#L65-L68 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/selenium/PageSourceSaver.java | PageSourceSaver.savePageSource | public String savePageSource(String fileName) {
"""
Saves current page's source, as new file.
@param fileName filename to use for saved page.
@return wiki Url, if file was created inside wiki's files dir, absolute filename otherwise.
"""
List<WebElement> framesWithFakeSources = new ArrayList<>(2);
... | java | public String savePageSource(String fileName) {
List<WebElement> framesWithFakeSources = new ArrayList<>(2);
Map<String, String> sourceReplacements = new HashMap<>();
List<WebElement> frames = getFrames();
for (WebElement frame : frames) {
String newLocation = saveFrameSource... | [
"public",
"String",
"savePageSource",
"(",
"String",
"fileName",
")",
"{",
"List",
"<",
"WebElement",
">",
"framesWithFakeSources",
"=",
"new",
"ArrayList",
"<>",
"(",
"2",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"sourceReplacements",
"=",
"new",... | Saves current page's source, as new file.
@param fileName filename to use for saved page.
@return wiki Url, if file was created inside wiki's files dir, absolute filename otherwise. | [
"Saves",
"current",
"page",
"s",
"source",
"as",
"new",
"file",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/PageSourceSaver.java#L46-L70 |
JOML-CI/JOML | src/org/joml/Matrix4f.java | Matrix4f.translationRotate | public Matrix4f translationRotate(float tx, float ty, float tz, Quaternionfc quat) {
"""
Set <code>this</code> matrix to <code>T * R</code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code> and
<code>R</code> is a rotation - and possibly scaling - transformation specified by the given ... | java | public Matrix4f translationRotate(float tx, float ty, float tz, Quaternionfc quat) {
return translationRotate(tx, ty, tz, quat.x(), quat.y(), quat.z(), quat.w());
} | [
"public",
"Matrix4f",
"translationRotate",
"(",
"float",
"tx",
",",
"float",
"ty",
",",
"float",
"tz",
",",
"Quaternionfc",
"quat",
")",
"{",
"return",
"translationRotate",
"(",
"tx",
",",
"ty",
",",
"tz",
",",
"quat",
".",
"x",
"(",
")",
",",
"quat",
... | Set <code>this</code> matrix to <code>T * R</code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code> and
<code>R</code> is a rotation - and possibly scaling - transformation specified by the given quaternion.
<p>
When transforming a vector by the resulting matrix the rotation - and possibly ... | [
"Set",
"<code",
">",
"this<",
"/",
"code",
">",
"matrix",
"to",
"<code",
">",
"T",
"*",
"R<",
"/",
"code",
">",
"where",
"<code",
">",
"T<",
"/",
"code",
">",
"is",
"a",
"translation",
"by",
"the",
"given",
"<code",
">",
"(",
"tx",
"ty",
"tz",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L4479-L4481 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java | DdosProtectionPlansInner.getByResourceGroupAsync | public Observable<DdosProtectionPlanInner> getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) {
"""
Gets information about the specified DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection pla... | java | public Observable<DdosProtectionPlanInner> getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1<ServiceResponse<DdosProtectionPlanInner>, DdosProtectionPlanInner>() {
... | [
"public",
"Observable",
"<",
"DdosProtectionPlanInner",
">",
"getByResourceGroupAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"ddosProtectionPlanName",
")",
"{",
"return",
"getByResourceGroupWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"ddosProtectionP... | Gets information about the specified DDoS protection plan.
@param resourceGroupName The name of the resource group.
@param ddosProtectionPlanName The name of the DDoS protection plan.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the DdosProtectionPlanInner object | [
"Gets",
"information",
"about",
"the",
"specified",
"DDoS",
"protection",
"plan",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L291-L298 |
facebookarchive/swift | swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java | ThriftCodecByteCodeGenerator.buildUnion | private LocalVariableDefinition buildUnion(MethodDefinition read, Map<Short, LocalVariableDefinition> unionData) {
"""
Defines the code to build the struct instance using the data in the local variables.
"""
// construct the instance and store it in the instance local variable
LocalVariableDefi... | java | private LocalVariableDefinition buildUnion(MethodDefinition read, Map<Short, LocalVariableDefinition> unionData)
{
// construct the instance and store it in the instance local variable
LocalVariableDefinition instance = constructUnionInstance(read);
// switch (fieldId)
read.loadVari... | [
"private",
"LocalVariableDefinition",
"buildUnion",
"(",
"MethodDefinition",
"read",
",",
"Map",
"<",
"Short",
",",
"LocalVariableDefinition",
">",
"unionData",
")",
"{",
"// construct the instance and store it in the instance local variable",
"LocalVariableDefinition",
"instance... | Defines the code to build the struct instance using the data in the local variables. | [
"Defines",
"the",
"code",
"to",
"build",
"the",
"struct",
"instance",
"using",
"the",
"data",
"in",
"the",
"local",
"variables",
"."
] | train | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L603-L642 |
CenturyLinkCloud/mdw | mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java | ProcessExecutorImpl.createTransitionInstances | void createTransitionInstances(ProcessInstance processInstanceVO,
List<Transition> transitions, Long fromActInstId)
throws ProcessException,DataAccessException {
"""
Handles the work Transitions for the passed in collection of Items
"""
TransitionInstance transInst;
for (... | java | void createTransitionInstances(ProcessInstance processInstanceVO,
List<Transition> transitions, Long fromActInstId)
throws ProcessException,DataAccessException {
TransitionInstance transInst;
for (Transition transition : transitions) {
try {
if (tooMany... | [
"void",
"createTransitionInstances",
"(",
"ProcessInstance",
"processInstanceVO",
",",
"List",
"<",
"Transition",
">",
"transitions",
",",
"Long",
"fromActInstId",
")",
"throws",
"ProcessException",
",",
"DataAccessException",
"{",
"TransitionInstance",
"transInst",
";",
... | Handles the work Transitions for the passed in collection of Items | [
"Handles",
"the",
"work",
"Transitions",
"for",
"the",
"passed",
"in",
"collection",
"of",
"Items"
] | train | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessExecutorImpl.java#L467-L502 |
alkacon/opencms-core | src-gwt/org/opencms/ade/sitemap/client/alias/CmsImportResultList.java | CmsImportResultList.addRow | public void addRow(String leftText, String rightText, String styleName) {
"""
Adds a single line of the import result to the widget.<p>
@param leftText the text to display on the left
@param rightText the text to display on the right
@param styleName the style which should be applied to the right text
"""... | java | public void addRow(String leftText, String rightText, String styleName) {
ensureTable();
ensureNoEmptyLabel();
int row = m_table.getRowCount();
m_table.setWidget(row, 0, new Label(leftText));
Label rightLabel = new Label(rightText);
rightLabel.addStyleName(styleNa... | [
"public",
"void",
"addRow",
"(",
"String",
"leftText",
",",
"String",
"rightText",
",",
"String",
"styleName",
")",
"{",
"ensureTable",
"(",
")",
";",
"ensureNoEmptyLabel",
"(",
")",
";",
"int",
"row",
"=",
"m_table",
".",
"getRowCount",
"(",
")",
";",
"... | Adds a single line of the import result to the widget.<p>
@param leftText the text to display on the left
@param rightText the text to display on the right
@param styleName the style which should be applied to the right text | [
"Adds",
"a",
"single",
"line",
"of",
"the",
"import",
"result",
"to",
"the",
"widget",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/alias/CmsImportResultList.java#L124-L134 |
apache/spark | sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnarBatchReader.java | OrcColumnarBatchReader.initBatch | public void initBatch(
TypeDescription orcSchema,
StructField[] requiredFields,
int[] requestedDataColIds,
int[] requestedPartitionColIds,
InternalRow partitionValues) {
"""
Initialize columnar batch by setting required schema and partition information.
With this information, this cr... | java | public void initBatch(
TypeDescription orcSchema,
StructField[] requiredFields,
int[] requestedDataColIds,
int[] requestedPartitionColIds,
InternalRow partitionValues) {
wrap = new VectorizedRowBatchWrap(orcSchema.createRowBatch(capacity));
assert(!wrap.batch().selectedInUse); // `... | [
"public",
"void",
"initBatch",
"(",
"TypeDescription",
"orcSchema",
",",
"StructField",
"[",
"]",
"requiredFields",
",",
"int",
"[",
"]",
"requestedDataColIds",
",",
"int",
"[",
"]",
"requestedPartitionColIds",
",",
"InternalRow",
"partitionValues",
")",
"{",
"wra... | Initialize columnar batch by setting required schema and partition information.
With this information, this creates ColumnarBatch with the full schema.
@param orcSchema Schema from ORC file reader.
@param requiredFields All the fields that are required to return, including partition fields.
@param requestedDataColIds ... | [
"Initialize",
"columnar",
"batch",
"by",
"setting",
"required",
"schema",
"and",
"partition",
"information",
".",
"With",
"this",
"information",
"this",
"creates",
"ColumnarBatch",
"with",
"the",
"full",
"schema",
"."
] | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/orc/OrcColumnarBatchReader.java#L143-L189 |
bazaarvoice/ostrich | core/src/main/java/com/bazaarvoice/ostrich/metrics/Metrics.java | Metrics.forInstance | public static InstanceMetrics forInstance(MetricRegistry metrics, Object instance, String serviceName) {
"""
Create a metrics instance that corresponds to a single instance of a class. This is useful for cases where there
exists one instance per service. For example in a ServicePool.
"""
return new ... | java | public static InstanceMetrics forInstance(MetricRegistry metrics, Object instance, String serviceName) {
return new InstanceMetrics(metrics, instance, serviceName);
} | [
"public",
"static",
"InstanceMetrics",
"forInstance",
"(",
"MetricRegistry",
"metrics",
",",
"Object",
"instance",
",",
"String",
"serviceName",
")",
"{",
"return",
"new",
"InstanceMetrics",
"(",
"metrics",
",",
"instance",
",",
"serviceName",
")",
";",
"}"
] | Create a metrics instance that corresponds to a single instance of a class. This is useful for cases where there
exists one instance per service. For example in a ServicePool. | [
"Create",
"a",
"metrics",
"instance",
"that",
"corresponds",
"to",
"a",
"single",
"instance",
"of",
"a",
"class",
".",
"This",
"is",
"useful",
"for",
"cases",
"where",
"there",
"exists",
"one",
"instance",
"per",
"service",
".",
"For",
"example",
"in",
"a"... | train | https://github.com/bazaarvoice/ostrich/blob/13591867870ab23445253f11fc872662a8028191/core/src/main/java/com/bazaarvoice/ostrich/metrics/Metrics.java#L39-L41 |
craterdog/java-security-framework | java-certificate-management-api/src/main/java/craterdog/security/CertificateManager.java | CertificateManager.encodeKeyStore | public final String encodeKeyStore(KeyStore keyStore, char[] password) {
"""
This method encodes a PKCS12 format key store into a base 64 string format.
@param keyStore The PKCS12 format key store to be encoded.
@param password The password to be used to encrypt the byte stream.
@return The base 64 encoded st... | java | public final String encodeKeyStore(KeyStore keyStore, char[] password) {
logger.entry();
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
keyStore.store(out, password);
out.flush();
byte[] bytes = out.toByteArray();
String encodedKeySt... | [
"public",
"final",
"String",
"encodeKeyStore",
"(",
"KeyStore",
"keyStore",
",",
"char",
"[",
"]",
"password",
")",
"{",
"logger",
".",
"entry",
"(",
")",
";",
"try",
"(",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
")",
... | This method encodes a PKCS12 format key store into a base 64 string format.
@param keyStore The PKCS12 format key store to be encoded.
@param password The password to be used to encrypt the byte stream.
@return The base 64 encoded string. | [
"This",
"method",
"encodes",
"a",
"PKCS12",
"format",
"key",
"store",
"into",
"a",
"base",
"64",
"string",
"format",
"."
] | train | https://github.com/craterdog/java-security-framework/blob/a5634c19812d473b608bc11060f5cbb4b4b0b5da/java-certificate-management-api/src/main/java/craterdog/security/CertificateManager.java#L223-L237 |
alkacon/opencms-core | src/org/opencms/file/CmsObject.java | CmsObject.createGroup | public CmsGroup createGroup(String groupFqn, String description, int flags, String parent) throws CmsException {
"""
Creates a new user group.<p>
@param groupFqn the name of the new group
@param description the description of the new group
@param flags the flags for the new group
@param parent the parent gro... | java | public CmsGroup createGroup(String groupFqn, String description, int flags, String parent) throws CmsException {
return m_securityManager.createGroup(m_context, groupFqn, description, flags, parent);
} | [
"public",
"CmsGroup",
"createGroup",
"(",
"String",
"groupFqn",
",",
"String",
"description",
",",
"int",
"flags",
",",
"String",
"parent",
")",
"throws",
"CmsException",
"{",
"return",
"m_securityManager",
".",
"createGroup",
"(",
"m_context",
",",
"groupFqn",
... | Creates a new user group.<p>
@param groupFqn the name of the new group
@param description the description of the new group
@param flags the flags for the new group
@param parent the parent group (or <code>null</code>)
@return a <code>{@link CmsGroup}</code> object representing the newly created group
@throws CmsExce... | [
"Creates",
"a",
"new",
"user",
"group",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L658-L661 |
Jasig/resource-server | resource-server-core/src/main/java/org/jasig/resource/aggr/ResourcesAggregatorImpl.java | ResourcesAggregatorImpl.willAggregateWith | protected boolean willAggregateWith(Js first, Js second) {
"""
Similar to the {@link #equals(Object)} method, this will return
true if this object and the argument are "aggregatable".
2 {@link Js} objects are aggregatable if and only if:
<ol>
<li>Neither object returns true for {@link #isAbsolute()}</li>
<l... | java | protected boolean willAggregateWith(Js first, Js second) {
Validate.notNull(first, "Js cannot be null");
Validate.notNull(second, "Js cannot be null");
// never aggregate absolutes
if(this.resourcesDao.isAbsolute(first) || this.resourcesDao.isAbsolute(second)) {
retu... | [
"protected",
"boolean",
"willAggregateWith",
"(",
"Js",
"first",
",",
"Js",
"second",
")",
"{",
"Validate",
".",
"notNull",
"(",
"first",
",",
"\"Js cannot be null\"",
")",
";",
"Validate",
".",
"notNull",
"(",
"second",
",",
"\"Js cannot be null\"",
")",
";",... | Similar to the {@link #equals(Object)} method, this will return
true if this object and the argument are "aggregatable".
2 {@link Js} objects are aggregatable if and only if:
<ol>
<li>Neither object returns true for {@link #isAbsolute()}</li>
<li>The values of their "conditional" properties are equivalent</li>
</ol>
... | [
"Similar",
"to",
"the",
"{",
"@link",
"#equals",
"(",
"Object",
")",
"}",
"method",
"this",
"will",
"return",
"true",
"if",
"this",
"object",
"and",
"the",
"argument",
"are",
"aggregatable",
"."
] | train | https://github.com/Jasig/resource-server/blob/13375f716777ec3c99ae9917f672881d4aa32df3/resource-server-core/src/main/java/org/jasig/resource/aggr/ResourcesAggregatorImpl.java#L512-L524 |
alkacon/opencms-core | src/org/opencms/ui/apps/A_CmsWorkplaceApp.java | A_CmsWorkplaceApp.openSubView | public void openSubView(String state, boolean updateState) {
"""
Opens the requested sub view.<p>
@param state the state
@param updateState <code>true</code> to update the state URL token
"""
if (updateState) {
CmsAppWorkplaceUi.get().changeCurrentAppState(state);
}
Com... | java | public void openSubView(String state, boolean updateState) {
if (updateState) {
CmsAppWorkplaceUi.get().changeCurrentAppState(state);
}
Component comp = getComponentForState(state);
if (comp != null) {
comp.setSizeFull();
m_rootLayout.setMainContent(c... | [
"public",
"void",
"openSubView",
"(",
"String",
"state",
",",
"boolean",
"updateState",
")",
"{",
"if",
"(",
"updateState",
")",
"{",
"CmsAppWorkplaceUi",
".",
"get",
"(",
")",
".",
"changeCurrentAppState",
"(",
"state",
")",
";",
"}",
"Component",
"comp",
... | Opens the requested sub view.<p>
@param state the state
@param updateState <code>true</code> to update the state URL token | [
"Opens",
"the",
"requested",
"sub",
"view",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/A_CmsWorkplaceApp.java#L292-L306 |
leadware/jpersistence-tools | jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/OrderContainer.java | OrderContainer.add | public OrderContainer add(String property, OrderType orderType) {
"""
Methode d'ajout d'un ordre de tri
@param property Propriete a ordonner
@param orderType Type d'ordre
@return Conteneur d'ordre de tri
"""
// Si la ppt est nulle
if(property == null || property.trim().length() == 0) return this;
... | java | public OrderContainer add(String property, OrderType orderType) {
// Si la ppt est nulle
if(property == null || property.trim().length() == 0) return this;
// Si le Type d'ordre est null
if(orderType == null) return this;
// Ajout
orders.put(property.trim(), orderType);
// On retour... | [
"public",
"OrderContainer",
"add",
"(",
"String",
"property",
",",
"OrderType",
"orderType",
")",
"{",
"// Si la ppt est nulle\r",
"if",
"(",
"property",
"==",
"null",
"||",
"property",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"==",
"0",
")",
"retur... | Methode d'ajout d'un ordre de tri
@param property Propriete a ordonner
@param orderType Type d'ordre
@return Conteneur d'ordre de tri | [
"Methode",
"d",
"ajout",
"d",
"un",
"ordre",
"de",
"tri"
] | train | https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/OrderContainer.java#L62-L75 |
alibaba/otter | shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java | ZkClientx.createPersistent | public void createPersistent(String path, Object data) throws ZkInterruptedException, IllegalArgumentException,
ZkException, RuntimeException {
"""
Create a persistent node.
@param path
@param data
@throws ZkInterruptedException if operation was interr... | java | public void createPersistent(String path, Object data) throws ZkInterruptedException, IllegalArgumentException,
ZkException, RuntimeException {
create(path, data, CreateMode.PERSISTENT);
} | [
"public",
"void",
"createPersistent",
"(",
"String",
"path",
",",
"Object",
"data",
")",
"throws",
"ZkInterruptedException",
",",
"IllegalArgumentException",
",",
"ZkException",
",",
"RuntimeException",
"{",
"create",
"(",
"path",
",",
"data",
",",
"CreateMode",
"... | Create a persistent node.
@param path
@param data
@throws ZkInterruptedException if operation was interrupted, or a required reconnection got interrupted
@throws IllegalArgumentException if called from anything except the ZooKeeper event thread
@throws ZkException if any ZooKeeper exception occurred
@throws RuntimeExc... | [
"Create",
"a",
"persistent",
"node",
"."
] | train | https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java#L348-L351 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java | RangeClient.preparedStatement | private int preparedStatement(Cassandra.Client client) {
"""
get prepared statement id from cache, otherwise prepare it from Cassandra server
"""
Integer itemId = preparedStatements.get(client);
if (itemId == null)
{
CqlPreparedResult result;
... | java | private int preparedStatement(Cassandra.Client client)
{
Integer itemId = preparedStatements.get(client);
if (itemId == null)
{
CqlPreparedResult result;
try
{
result = client.prepare_cql3_query(ByteBufferUti... | [
"private",
"int",
"preparedStatement",
"(",
"Cassandra",
".",
"Client",
"client",
")",
"{",
"Integer",
"itemId",
"=",
"preparedStatements",
".",
"get",
"(",
"client",
")",
";",
"if",
"(",
"itemId",
"==",
"null",
")",
"{",
"CqlPreparedResult",
"result",
";",
... | get prepared statement id from cache, otherwise prepare it from Cassandra server | [
"get",
"prepared",
"statement",
"id",
"from",
"cache",
"otherwise",
"prepare",
"it",
"from",
"Cassandra",
"server"
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/cql3/CqlRecordWriter.java#L292-L315 |
SeaCloudsEU/SeaCloudsPlatform | sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRestEntity.java | EnforcementJobRestEntity.getEnforcements | @GET
public List<EnforcementJob> getEnforcements() {
"""
Get the list of available enforcements
<pre>
GET /enforcements
Request:
GET /enforcements HTTP/1.1
Accept: application/xml
Response:
{@code
<?xml version="1.0" encoding="UTF-8"?>
<collection href="/enforcements">
<items offset="0" total... | java | @GET
public List<EnforcementJob> getEnforcements() {
logger.debug("StartOf getEnforcements - REQUEST for /enforcements");
EnforcementJobHelperE enforcementJobHelper = getHelper();
List<EnforcementJob> enforcementJobList = enforcementJobHelper.getEnforcements();
logger.debug("EndOf ge... | [
"@",
"GET",
"public",
"List",
"<",
"EnforcementJob",
">",
"getEnforcements",
"(",
")",
"{",
"logger",
".",
"debug",
"(",
"\"StartOf getEnforcements - REQUEST for /enforcements\"",
")",
";",
"EnforcementJobHelperE",
"enforcementJobHelper",
"=",
"getHelper",
"(",
")",
"... | Get the list of available enforcements
<pre>
GET /enforcements
Request:
GET /enforcements HTTP/1.1
Accept: application/xml
Response:
{@code
<?xml version="1.0" encoding="UTF-8"?>
<collection href="/enforcements">
<items offset="0" total="1">
<enforcement_job>
<agreement_id>agreement04</agreement_id>
<enabled>false... | [
"Get",
"the",
"list",
"of",
"available",
"enforcements"
] | train | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/EnforcementJobRestEntity.java#L103-L110 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRule.java | NFRule.power | static long power(long base, short exponent) {
"""
This is an equivalent to Math.pow that accurately works on 64-bit numbers
@param base The base
@param exponent The exponent
@return radix ** exponent
@see Math#pow(double, double)
"""
if (exponent < 0) {
throw new IllegalArgumentExcepti... | java | static long power(long base, short exponent) {
if (exponent < 0) {
throw new IllegalArgumentException("Exponent can not be negative");
}
if (base < 0) {
throw new IllegalArgumentException("Base can not be negative");
}
long result = 1;
while (expon... | [
"static",
"long",
"power",
"(",
"long",
"base",
",",
"short",
"exponent",
")",
"{",
"if",
"(",
"exponent",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Exponent can not be negative\"",
")",
";",
"}",
"if",
"(",
"base",
"<",
"0",
... | This is an equivalent to Math.pow that accurately works on 64-bit numbers
@param base The base
@param exponent The exponent
@return radix ** exponent
@see Math#pow(double, double) | [
"This",
"is",
"an",
"equivalent",
"to",
"Math",
".",
"pow",
"that",
"accurately",
"works",
"on",
"64",
"-",
"bit",
"numbers"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRule.java#L836-L852 |
mikepenz/MaterialDrawer | library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java | AccountHeaderBuilder.onProfileImageClick | private void onProfileImageClick(View v, boolean current) {
"""
calls the mOnAccountHEaderProfileImageListener and continues with the actions afterwards
@param v
@param current
"""
IProfile profile = (IProfile) v.getTag(R.id.material_drawer_profile_header);
boolean consumed = false;
... | java | private void onProfileImageClick(View v, boolean current) {
IProfile profile = (IProfile) v.getTag(R.id.material_drawer_profile_header);
boolean consumed = false;
if (mOnAccountHeaderProfileImageListener != null) {
consumed = mOnAccountHeaderProfileImageListener.onProfileImageClick(... | [
"private",
"void",
"onProfileImageClick",
"(",
"View",
"v",
",",
"boolean",
"current",
")",
"{",
"IProfile",
"profile",
"=",
"(",
"IProfile",
")",
"v",
".",
"getTag",
"(",
"R",
".",
"id",
".",
"material_drawer_profile_header",
")",
";",
"boolean",
"consumed"... | calls the mOnAccountHEaderProfileImageListener and continues with the actions afterwards
@param v
@param current | [
"calls",
"the",
"mOnAccountHEaderProfileImageListener",
"and",
"continues",
"with",
"the",
"actions",
"afterwards"
] | train | https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java#L1217-L1229 |
andkulikov/Transitions-Everywhere | library(1.x)/src/main/java/com/transitionseverywhere/Transition.java | Transition.excludeTarget | @NonNull
public Transition excludeTarget(@Nullable Class type, boolean exclude) {
"""
Whether to add the given type to the list of types to exclude from this
transition. The <code>exclude</code> parameter specifies whether the target
type should be added to or removed from the excluded list.
<p/>
<p>Exclud... | java | @NonNull
public Transition excludeTarget(@Nullable Class type, boolean exclude) {
mTargetTypeExcludes = excludeObject(mTargetTypeExcludes, type, exclude);
return this;
} | [
"@",
"NonNull",
"public",
"Transition",
"excludeTarget",
"(",
"@",
"Nullable",
"Class",
"type",
",",
"boolean",
"exclude",
")",
"{",
"mTargetTypeExcludes",
"=",
"excludeObject",
"(",
"mTargetTypeExcludes",
",",
"type",
",",
"exclude",
")",
";",
"return",
"this",... | Whether to add the given type to the list of types to exclude from this
transition. The <code>exclude</code> parameter specifies whether the target
type should be added to or removed from the excluded list.
<p/>
<p>Excluding targets is a general mechanism for allowing transitions to run on
a view hierarchy while skippi... | [
"Whether",
"to",
"add",
"the",
"given",
"type",
"to",
"the",
"list",
"of",
"types",
"to",
"exclude",
"from",
"this",
"transition",
".",
"The",
"<code",
">",
"exclude<",
"/",
"code",
">",
"parameter",
"specifies",
"whether",
"the",
"target",
"type",
"should... | train | https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/Transition.java#L1293-L1297 |
infinispan/infinispan | core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java | TotalOrderManager.ensureOrder | public final void ensureOrder(TotalOrderRemoteTransactionState state, Collection<?> keysModified) throws InterruptedException {
"""
It ensures the validation order for the transaction corresponding to the prepare command. This allow the prepare
command to be moved to a thread pool.
@param state the total order... | java | public final void ensureOrder(TotalOrderRemoteTransactionState state, Collection<?> keysModified) throws InterruptedException {
//the retries due to state transfer re-uses the same state. we need that the keys previous locked to be release
//in order to insert it again in the keys locked.
//NOTE: this... | [
"public",
"final",
"void",
"ensureOrder",
"(",
"TotalOrderRemoteTransactionState",
"state",
",",
"Collection",
"<",
"?",
">",
"keysModified",
")",
"throws",
"InterruptedException",
"{",
"//the retries due to state transfer re-uses the same state. we need that the keys previous lock... | It ensures the validation order for the transaction corresponding to the prepare command. This allow the prepare
command to be moved to a thread pool.
@param state the total order prepare state | [
"It",
"ensures",
"the",
"validation",
"order",
"for",
"the",
"transaction",
"corresponding",
"to",
"the",
"prepare",
"command",
".",
"This",
"allow",
"the",
"prepare",
"command",
"to",
"be",
"moved",
"to",
"a",
"thread",
"pool",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java#L65-L93 |
VoltDB/voltdb | src/frontend/org/voltdb/types/GeographyValue.java | GeographyValue.add | @Deprecated
public GeographyValue add(GeographyPointValue offset) {
"""
Create a new GeographyValue which is offset from this one
by the given point. The latitude and longitude values
stay in range because we are using the normalizing operations
in GeographyPointValue.
@param offset The point by which ... | java | @Deprecated
public GeographyValue add(GeographyPointValue offset) {
List<List<GeographyPointValue>> newLoops = new ArrayList<>();
for (List<XYZPoint> oneLoop : m_loops) {
List<GeographyPointValue> loop = new ArrayList<>();
for (XYZPoint p : oneLoop) {
loop.add... | [
"@",
"Deprecated",
"public",
"GeographyValue",
"add",
"(",
"GeographyPointValue",
"offset",
")",
"{",
"List",
"<",
"List",
"<",
"GeographyPointValue",
">>",
"newLoops",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"List",
"<",
"XYZPoint",
">",
... | Create a new GeographyValue which is offset from this one
by the given point. The latitude and longitude values
stay in range because we are using the normalizing operations
in GeographyPointValue.
@param offset The point by which to translate vertices in this
@return The resulting GeographyValue. | [
"Create",
"a",
"new",
"GeographyValue",
"which",
"is",
"offset",
"from",
"this",
"one",
"by",
"the",
"given",
"point",
".",
"The",
"latitude",
"and",
"longitude",
"values",
"stay",
"in",
"range",
"because",
"we",
"are",
"using",
"the",
"normalizing",
"operat... | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/types/GeographyValue.java#L788-L800 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java | ApiOvhEmaildomain.delegatedAccount_email_filter_name_DELETE | public ArrayList<OvhTaskFilter> delegatedAccount_email_filter_name_DELETE(String email, String name) throws IOException {
"""
Delete an existing filter
REST: DELETE /email/domain/delegatedAccount/{email}/filter/{name}
@param email [required] Email
@param name [required] Filter name
"""
String qPath = "/... | java | public ArrayList<OvhTaskFilter> delegatedAccount_email_filter_name_DELETE(String email, String name) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}";
StringBuilder sb = path(qPath, email, name);
String resp = exec(qPath, "DELETE", sb.toString(), null);
return convertTo... | [
"public",
"ArrayList",
"<",
"OvhTaskFilter",
">",
"delegatedAccount_email_filter_name_DELETE",
"(",
"String",
"email",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/email/domain/delegatedAccount/{email}/filter/{name}\"",
";",
"StringB... | Delete an existing filter
REST: DELETE /email/domain/delegatedAccount/{email}/filter/{name}
@param email [required] Email
@param name [required] Filter name | [
"Delete",
"an",
"existing",
"filter"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L258-L263 |
doanduyhai/Achilles | achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java | AbstractManagerFactoryBuilder.withRuntimeCodecs | public T withRuntimeCodecs(Map<CodecSignature<?, ?>, Codec<?, ?>> runtimeCodecs) {
"""
Specify runtime codecs to register with Achilles
<br/>
<pre class="code"><code class="java">
<strong>final Codec<MyBean, String> beanCodec = new .... // Create your codec with initialization logic here</strong>
<stro... | java | public T withRuntimeCodecs(Map<CodecSignature<?, ?>, Codec<?, ?>> runtimeCodecs) {
if (!configMap.containsKey(RUNTIME_CODECS)) {
configMap.put(RUNTIME_CODECS, new HashMap<CodecSignature<?, ?>, Codec<?, ?>>());
}
configMap.<Map<CodecSignature<?, ?>, Codec<?, ?>>>getTyped(RUNTIME_CODEC... | [
"public",
"T",
"withRuntimeCodecs",
"(",
"Map",
"<",
"CodecSignature",
"<",
"?",
",",
"?",
">",
",",
"Codec",
"<",
"?",
",",
"?",
">",
">",
"runtimeCodecs",
")",
"{",
"if",
"(",
"!",
"configMap",
".",
"containsKey",
"(",
"RUNTIME_CODECS",
")",
")",
"... | Specify runtime codecs to register with Achilles
<br/>
<pre class="code"><code class="java">
<strong>final Codec<MyBean, String> beanCodec = new .... // Create your codec with initialization logic here</strong>
<strong>final Codec<MyEnum, String> enumCodec = new .... // Create your codec with initializatio... | [
"Specify",
"runtime",
"codecs",
"to",
"register",
"with",
"Achilles",
"<br",
"/",
">",
"<pre",
"class",
"=",
"code",
">",
"<code",
"class",
"=",
"java",
">"
] | train | https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/bootstrap/AbstractManagerFactoryBuilder.java#L541-L547 |
yanzhenjie/AndServer | api/src/main/java/com/yanzhenjie/andserver/util/CollectionUtils.java | CollectionUtils.containsInstance | public static boolean containsInstance(Collection<?> collection, Object element) {
"""
Check whether the given Collection contains the given element instance. <p>Enforces the given instance to be
present, rather than returning {@code true} for an equal element as well.
@param collection the Collection to check... | java | public static boolean containsInstance(Collection<?> collection, Object element) {
if (collection != null) {
for (Object candidate : collection) {
if (candidate == element) {
return true;
}
}
}
return false;
} | [
"public",
"static",
"boolean",
"containsInstance",
"(",
"Collection",
"<",
"?",
">",
"collection",
",",
"Object",
"element",
")",
"{",
"if",
"(",
"collection",
"!=",
"null",
")",
"{",
"for",
"(",
"Object",
"candidate",
":",
"collection",
")",
"{",
"if",
... | Check whether the given Collection contains the given element instance. <p>Enforces the given instance to be
present, rather than returning {@code true} for an equal element as well.
@param collection the Collection to check.
@param element the element to look for.
@return {@code true} if found, {@code false} else. | [
"Check",
"whether",
"the",
"given",
"Collection",
"contains",
"the",
"given",
"element",
"instance",
".",
"<p",
">",
"Enforces",
"the",
"given",
"instance",
"to",
"be",
"present",
"rather",
"than",
"returning",
"{",
"@code",
"true",
"}",
"for",
"an",
"equal"... | train | https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/util/CollectionUtils.java#L170-L179 |
citrusframework/citrus | modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/model/ManagedBeanDefinition.java | ManagedBeanDefinition.createMBeanInfo | public MBeanInfo createMBeanInfo() {
"""
Create managed bean info with all constructors, operations, notifications and attributes.
@return
"""
if (type != null) {
return new MBeanInfo(type.getName(), description, getAttributeInfo(), getConstructorInfo(), getOperationInfo(), getNotification... | java | public MBeanInfo createMBeanInfo() {
if (type != null) {
return new MBeanInfo(type.getName(), description, getAttributeInfo(), getConstructorInfo(), getOperationInfo(), getNotificationInfo());
} else {
return new MBeanInfo(name, description, getAttributeInfo(), getConstructorInfo... | [
"public",
"MBeanInfo",
"createMBeanInfo",
"(",
")",
"{",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"return",
"new",
"MBeanInfo",
"(",
"type",
".",
"getName",
"(",
")",
",",
"description",
",",
"getAttributeInfo",
"(",
")",
",",
"getConstructorInfo",
"(",
... | Create managed bean info with all constructors, operations, notifications and attributes.
@return | [
"Create",
"managed",
"bean",
"info",
"with",
"all",
"constructors",
"operations",
"notifications",
"and",
"attributes",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/model/ManagedBeanDefinition.java#L75-L81 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/ColumnText.java | ColumnText.showTextAligned | public static void showTextAligned(PdfContentByte canvas, int alignment, Phrase phrase, float x, float y, float rotation) {
"""
Shows a line of text. Only the first line is written.
@param canvas where the text is to be written to
@param alignment the alignment
@param phrase the <CODE>Phrase</CODE> with the t... | java | public static void showTextAligned(PdfContentByte canvas, int alignment, Phrase phrase, float x, float y, float rotation) {
showTextAligned(canvas, alignment, phrase, x, y, rotation, PdfWriter.RUN_DIRECTION_NO_BIDI, 0);
} | [
"public",
"static",
"void",
"showTextAligned",
"(",
"PdfContentByte",
"canvas",
",",
"int",
"alignment",
",",
"Phrase",
"phrase",
",",
"float",
"x",
",",
"float",
"y",
",",
"float",
"rotation",
")",
"{",
"showTextAligned",
"(",
"canvas",
",",
"alignment",
",... | Shows a line of text. Only the first line is written.
@param canvas where the text is to be written to
@param alignment the alignment
@param phrase the <CODE>Phrase</CODE> with the text
@param x the x reference position
@param y the y reference position
@param rotation the rotation to be applied in degrees countercloc... | [
"Shows",
"a",
"line",
"of",
"text",
".",
"Only",
"the",
"first",
"line",
"is",
"written",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/ColumnText.java#L1141-L1143 |
querydsl/querydsl | querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java | AbstractMySQLQuery.straightJoin | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C straightJoin() {
"""
STRAIGHT_JOIN forces the optimizer to join the tables in the order in which they are listed
in the FROM clause. You can use this to speed up a query if the optimizer joins the tables
in nonoptimal order. STRAIGHT_... | java | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C straightJoin() {
return addFlag(Position.AFTER_SELECT, STRAIGHT_JOIN);
} | [
"@",
"WithBridgeMethods",
"(",
"value",
"=",
"MySQLQuery",
".",
"class",
",",
"castRequired",
"=",
"true",
")",
"public",
"C",
"straightJoin",
"(",
")",
"{",
"return",
"addFlag",
"(",
"Position",
".",
"AFTER_SELECT",
",",
"STRAIGHT_JOIN",
")",
";",
"}"
] | STRAIGHT_JOIN forces the optimizer to join the tables in the order in which they are listed
in the FROM clause. You can use this to speed up a query if the optimizer joins the tables
in nonoptimal order. STRAIGHT_JOIN also can be used in the table_references list.
@return the current object | [
"STRAIGHT_JOIN",
"forces",
"the",
"optimizer",
"to",
"join",
"the",
"tables",
"in",
"the",
"order",
"in",
"which",
"they",
"are",
"listed",
"in",
"the",
"FROM",
"clause",
".",
"You",
"can",
"use",
"this",
"to",
"speed",
"up",
"a",
"query",
"if",
"the",
... | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L201-L204 |
KyoriPowered/lunar | src/main/java/net/kyori/lunar/EvenMoreObjects.java | EvenMoreObjects.make | public static <T> @NonNull T make(final @NonNull T value, final @NonNull Consumer<T> consumer) {
"""
Configures {@code value} using {@code consumer}.
@param value the value
@param consumer the consumer
@param <T> the value type
@return the value
"""
consumer.accept(value);
return value;
} | java | public static <T> @NonNull T make(final @NonNull T value, final @NonNull Consumer<T> consumer) {
consumer.accept(value);
return value;
} | [
"public",
"static",
"<",
"T",
">",
"@",
"NonNull",
"T",
"make",
"(",
"final",
"@",
"NonNull",
"T",
"value",
",",
"final",
"@",
"NonNull",
"Consumer",
"<",
"T",
">",
"consumer",
")",
"{",
"consumer",
".",
"accept",
"(",
"value",
")",
";",
"return",
... | Configures {@code value} using {@code consumer}.
@param value the value
@param consumer the consumer
@param <T> the value type
@return the value | [
"Configures",
"{",
"@code",
"value",
"}",
"using",
"{",
"@code",
"consumer",
"}",
"."
] | train | https://github.com/KyoriPowered/lunar/blob/6856747d9034a2fe0c8d0a8a0150986797732b5c/src/main/java/net/kyori/lunar/EvenMoreObjects.java#L60-L63 |
ops4j/org.ops4j.pax.wicket | service/src/main/java/org/ops4j/pax/wicket/internal/filter/FilterTrackerCustomizer.java | FilterTrackerCustomizer.removedService | public void removedService(ServiceReference<FilterFactory> reference, FilterFactoryReference service) {
"""
<p>removedService.</p>
@param reference a {@link org.osgi.framework.ServiceReference} object.
@param service a {@link org.ops4j.pax.wicket.internal.filter.FilterFactoryReference} object.
"""
... | java | public void removedService(ServiceReference<FilterFactory> reference, FilterFactoryReference service) {
bundleContext.ungetService(reference);
if (service != null) {
service.dispose();
LOGGER.debug("removed filterFactory for application {}", applicationName);
}
} | [
"public",
"void",
"removedService",
"(",
"ServiceReference",
"<",
"FilterFactory",
">",
"reference",
",",
"FilterFactoryReference",
"service",
")",
"{",
"bundleContext",
".",
"ungetService",
"(",
"reference",
")",
";",
"if",
"(",
"service",
"!=",
"null",
")",
"{... | <p>removedService.</p>
@param reference a {@link org.osgi.framework.ServiceReference} object.
@param service a {@link org.ops4j.pax.wicket.internal.filter.FilterFactoryReference} object. | [
"<p",
">",
"removedService",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/filter/FilterTrackerCustomizer.java#L90-L96 |
WolfgangFahl/Mediawiki-Japi | src/main/java/com/bitplan/mediawiki/japi/SiteInfoImpl.java | SiteInfoImpl.mapNamespace | public String mapNamespace(String ns, SiteInfo targetWiki) throws Exception {
"""
map the given namespace to the target wiki
@param ns
@param targetWiki
@return the namespace name for the target wiki
@throws Exception
"""
Map<String, Ns> sourceMap = this.getNamespaces();
Map<Integer, Ns> targetMa... | java | public String mapNamespace(String ns, SiteInfo targetWiki) throws Exception {
Map<String, Ns> sourceMap = this.getNamespaces();
Map<Integer, Ns> targetMap = targetWiki.getNamespacesById();
Ns sourceNs = sourceMap.get(ns);
if (sourceNs == null) {
if (debug)
LOGGER.log(Level.WARNING, "can no... | [
"public",
"String",
"mapNamespace",
"(",
"String",
"ns",
",",
"SiteInfo",
"targetWiki",
")",
"throws",
"Exception",
"{",
"Map",
"<",
"String",
",",
"Ns",
">",
"sourceMap",
"=",
"this",
".",
"getNamespaces",
"(",
")",
";",
"Map",
"<",
"Integer",
",",
"Ns"... | map the given namespace to the target wiki
@param ns
@param targetWiki
@return the namespace name for the target wiki
@throws Exception | [
"map",
"the",
"given",
"namespace",
"to",
"the",
"target",
"wiki"
] | train | https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/SiteInfoImpl.java#L153-L172 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/actions/SendMessageAction.java | SendMessageAction.createMessage | protected Message createMessage(TestContext context, String messageType) {
"""
Create message to be sent.
@param context
@param messageType
@return
"""
if (dataDictionary != null) {
messageBuilder.setDataDictionary(dataDictionary);
}
return messageBuilder.buildMessageCon... | java | protected Message createMessage(TestContext context, String messageType) {
if (dataDictionary != null) {
messageBuilder.setDataDictionary(dataDictionary);
}
return messageBuilder.buildMessageContent(context, messageType, MessageDirection.OUTBOUND);
} | [
"protected",
"Message",
"createMessage",
"(",
"TestContext",
"context",
",",
"String",
"messageType",
")",
"{",
"if",
"(",
"dataDictionary",
"!=",
"null",
")",
"{",
"messageBuilder",
".",
"setDataDictionary",
"(",
"dataDictionary",
")",
";",
"}",
"return",
"mess... | Create message to be sent.
@param context
@param messageType
@return | [
"Create",
"message",
"to",
"be",
"sent",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/actions/SendMessageAction.java#L158-L164 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/rnn/ReverseTimeSeriesVertex.java | ReverseTimeSeriesVertex.revertTimeSeries | private static INDArray revertTimeSeries(INDArray input, INDArray mask, LayerWorkspaceMgr workspaceMgr, ArrayType type) {
"""
Reverts the element order of a tensor along the 3rd axis (time series axis).
A masking tensor is used to restrict the revert to meaningful elements and keep the padding in place.
This m... | java | private static INDArray revertTimeSeries(INDArray input, INDArray mask, LayerWorkspaceMgr workspaceMgr, ArrayType type) {
// Get number of samples
val n = input.size(0);
// Get maximal length of a time series
val m = input.size(2);
// Create empty output
INDArray out = ... | [
"private",
"static",
"INDArray",
"revertTimeSeries",
"(",
"INDArray",
"input",
",",
"INDArray",
"mask",
",",
"LayerWorkspaceMgr",
"workspaceMgr",
",",
"ArrayType",
"type",
")",
"{",
"// Get number of samples",
"val",
"n",
"=",
"input",
".",
"size",
"(",
"0",
")"... | Reverts the element order of a tensor along the 3rd axis (time series axis).
A masking tensor is used to restrict the revert to meaningful elements and keep the padding in place.
This method is self-inverse in the following sense:
{@code revertTensor( revertTensor (input, mask), mask )}
equals
{@code input}
@param inp... | [
"Reverts",
"the",
"element",
"order",
"of",
"a",
"tensor",
"along",
"the",
"3rd",
"axis",
"(",
"time",
"series",
"axis",
")",
".",
"A",
"masking",
"tensor",
"is",
"used",
"to",
"restrict",
"the",
"revert",
"to",
"meaningful",
"elements",
"and",
"keep",
"... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/rnn/ReverseTimeSeriesVertex.java#L132-L187 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java | AbstractInvokable.triggerCheckpointOnBarrier | public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetrics checkpointMetrics) throws Exception {
"""
This method is called when a checkpoint is triggered as a result of receiving checkpoint
barriers on all input streams.
@param checkpoin... | java | public void triggerCheckpointOnBarrier(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetrics checkpointMetrics) throws Exception {
throw new UnsupportedOperationException(String.format("triggerCheckpointOnBarrier not supported by %s", this.getClass().getName()));
} | [
"public",
"void",
"triggerCheckpointOnBarrier",
"(",
"CheckpointMetaData",
"checkpointMetaData",
",",
"CheckpointOptions",
"checkpointOptions",
",",
"CheckpointMetrics",
"checkpointMetrics",
")",
"throws",
"Exception",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
... | This method is called when a checkpoint is triggered as a result of receiving checkpoint
barriers on all input streams.
@param checkpointMetaData Meta data for about this checkpoint
@param checkpointOptions Options for performing this checkpoint
@param checkpointMetrics Metrics about this checkpoint
@throws Exception... | [
"This",
"method",
"is",
"called",
"when",
"a",
"checkpoint",
"is",
"triggered",
"as",
"a",
"result",
"of",
"receiving",
"checkpoint",
"barriers",
"on",
"all",
"input",
"streams",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java#L225-L227 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.setPointAt | public boolean setPointAt(int index, double x, double y, boolean canonize) {
"""
Set the specified point at the given index.
<p>If the <var>index</var> is negative, it will corresponds
to an index starting from the end of the list.
@param index is the index of the desired point
@param x is the new value of... | java | public boolean setPointAt(int index, double x, double y, boolean canonize) {
final int count = getPointCount();
int idx = index;
if (idx < 0) {
idx = count + idx;
}
if (idx < 0) {
throw new IndexOutOfBoundsException(idx + "<0"); //$NON-NLS-1$
}
if (idx >= count) {
throw new IndexOutOfBoundsExcept... | [
"public",
"boolean",
"setPointAt",
"(",
"int",
"index",
",",
"double",
"x",
",",
"double",
"y",
",",
"boolean",
"canonize",
")",
"{",
"final",
"int",
"count",
"=",
"getPointCount",
"(",
")",
";",
"int",
"idx",
"=",
"index",
";",
"if",
"(",
"idx",
"<"... | Set the specified point at the given index.
<p>If the <var>index</var> is negative, it will corresponds
to an index starting from the end of the list.
@param index is the index of the desired point
@param x is the new value of the point
@param y is the new value of the point
@param canonize indicates if the function ... | [
"Set",
"the",
"specified",
"point",
"at",
"the",
"given",
"index",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L937-L965 |
Samsung/GearVRf | GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java | GVRScriptManager.addVariable | @Override
public void addVariable(String varName, Object value) {
"""
Add a variable to the scripting context.
@param varName The variable name.
@param value The variable value.
"""
synchronized (mGlobalVariables) {
mGlobalVariables.put(varName, value);
}
refreshGlob... | java | @Override
public void addVariable(String varName, Object value) {
synchronized (mGlobalVariables) {
mGlobalVariables.put(varName, value);
}
refreshGlobalBindings();
} | [
"@",
"Override",
"public",
"void",
"addVariable",
"(",
"String",
"varName",
",",
"Object",
"value",
")",
"{",
"synchronized",
"(",
"mGlobalVariables",
")",
"{",
"mGlobalVariables",
".",
"put",
"(",
"varName",
",",
"value",
")",
";",
"}",
"refreshGlobalBindings... | Add a variable to the scripting context.
@param varName The variable name.
@param value The variable value. | [
"Add",
"a",
"variable",
"to",
"the",
"scripting",
"context",
"."
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L172-L178 |
docker-java/docker-java | src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java | DefaultDockerClientConfig.overrideDockerPropertiesWithSettingsFromUserHome | private static Properties overrideDockerPropertiesWithSettingsFromUserHome(Properties p, Properties systemProperties) {
"""
Creates a new Properties object containing values overridden from ${user.home}/.docker.io.properties
@param p
The original set of properties to override
@return A copy of the original Pr... | java | private static Properties overrideDockerPropertiesWithSettingsFromUserHome(Properties p, Properties systemProperties) {
Properties overriddenProperties = new Properties();
overriddenProperties.putAll(p);
final File usersDockerPropertiesFile = new File(systemProperties.getProperty("user.home"),
... | [
"private",
"static",
"Properties",
"overrideDockerPropertiesWithSettingsFromUserHome",
"(",
"Properties",
"p",
",",
"Properties",
"systemProperties",
")",
"{",
"Properties",
"overriddenProperties",
"=",
"new",
"Properties",
"(",
")",
";",
"overriddenProperties",
".",
"put... | Creates a new Properties object containing values overridden from ${user.home}/.docker.io.properties
@param p
The original set of properties to override
@return A copy of the original Properties with overridden values | [
"Creates",
"a",
"new",
"Properties",
"object",
"containing",
"values",
"overridden",
"from",
"$",
"{",
"user",
".",
"home",
"}",
"/",
".",
"docker",
".",
"io",
".",
"properties"
] | train | https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/DefaultDockerClientConfig.java#L137-L151 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/transform/EnumBindTransform.java | EnumBindTransform.generateParseOnJackson | @Override
public void generateParseOnJackson(BindTypeContext context, Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) {
"""
/* (non-Javadoc)
@see com.abubusoft.kripton.processor.bind.transform.BindTransform#generateParseOnJackson(com.abubusoft.kripton.process... | java | @Override
public void generateParseOnJackson(BindTypeContext context, Builder methodBuilder, String parserName, TypeName beanClass, String beanName, BindProperty property) {
if (property.isNullable()) {
methodBuilder.beginControlFlow("if ($L.currentToken()!=$T.VALUE_NULL)", parserName, JsonToken.class);
} else ... | [
"@",
"Override",
"public",
"void",
"generateParseOnJackson",
"(",
"BindTypeContext",
"context",
",",
"Builder",
"methodBuilder",
",",
"String",
"parserName",
",",
"TypeName",
"beanClass",
",",
"String",
"beanName",
",",
"BindProperty",
"property",
")",
"{",
"if",
... | /* (non-Javadoc)
@see com.abubusoft.kripton.processor.bind.transform.BindTransform#generateParseOnJackson(com.abubusoft.kripton.processor.bind.BindTypeContext, com.squareup.javapoet.MethodSpec.Builder, java.lang.String, com.squareup.javapoet.TypeName, java.lang.String, com.abubusoft.kripton.processor.bind.model.BindPro... | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/transform/EnumBindTransform.java#L156-L168 |
lessthanoptimal/BoofCV | examples/src/main/java/boofcv/examples/features/ExampleFitPolygon.java | ExampleFitPolygon.fitCannyBinary | public static void fitCannyBinary( GrayF32 input ) {
"""
Detects contours inside the binary image generated by canny. Only the external contour is relevant. Often
easier to deal with than working with Canny edges directly.
"""
BufferedImage displayImage = new BufferedImage(input.width,input.height,Buffere... | java | public static void fitCannyBinary( GrayF32 input ) {
BufferedImage displayImage = new BufferedImage(input.width,input.height,BufferedImage.TYPE_INT_RGB);
GrayU8 binary = new GrayU8(input.width,input.height);
// Finds edges inside the image
CannyEdge<GrayF32,GrayF32> canny =
FactoryEdgeDetectors.canny(2, f... | [
"public",
"static",
"void",
"fitCannyBinary",
"(",
"GrayF32",
"input",
")",
"{",
"BufferedImage",
"displayImage",
"=",
"new",
"BufferedImage",
"(",
"input",
".",
"width",
",",
"input",
".",
"height",
",",
"BufferedImage",
".",
"TYPE_INT_RGB",
")",
";",
"GrayU8... | Detects contours inside the binary image generated by canny. Only the external contour is relevant. Often
easier to deal with than working with Canny edges directly. | [
"Detects",
"contours",
"inside",
"the",
"binary",
"image",
"generated",
"by",
"canny",
".",
"Only",
"the",
"external",
"contour",
"is",
"relevant",
".",
"Often",
"easier",
"to",
"deal",
"with",
"than",
"working",
"with",
"Canny",
"edges",
"directly",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/features/ExampleFitPolygon.java#L146-L174 |
dihedron/dihedron-commons | src/main/java/org/dihedron/core/xml/DOMReader.java | DOMReader.loadDocument | public static void loadDocument(URL xml, URL xsd, DOMHandler handler, boolean validate) throws IOException, InvalidArgumentException, SAXException, ParserConfigurationException, Exception {
"""
Parses an XML document and passes it on to the given handler, or to
a lambda expression for handling.
@param xml
the... | java | public static void loadDocument(URL xml, URL xsd, DOMHandler handler, boolean validate) throws IOException, InvalidArgumentException, SAXException, ParserConfigurationException, Exception {
if(xml == null || xsd == null) {
logger.error("input URLs are not valid");
throw new InvalidArgumentException("Invalid ... | [
"public",
"static",
"void",
"loadDocument",
"(",
"URL",
"xml",
",",
"URL",
"xsd",
",",
"DOMHandler",
"handler",
",",
"boolean",
"validate",
")",
"throws",
"IOException",
",",
"InvalidArgumentException",
",",
"SAXException",
",",
"ParserConfigurationException",
",",
... | Parses an XML document and passes it on to the given handler, or to
a lambda expression for handling.
@param xml
the URL of the XML to parse.
@param xsd
the URL of the XML's schema definition.
@param handler
the handler that will handle the document.
@param validate
whether validation against the given schema should b... | [
"Parses",
"an",
"XML",
"document",
"and",
"passes",
"it",
"on",
"to",
"the",
"given",
"handler",
"or",
"to",
"a",
"lambda",
"expression",
"for",
"handling",
"."
] | train | https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/xml/DOMReader.java#L158-L202 |
aalmiray/Json-lib | src/main/java/net/sf/json/JSONArray.java | JSONArray.toList | public static List toList( JSONArray jsonArray, Class objectClass ) {
"""
Creates a List from a JSONArray.
@deprecated replaced by toCollection
@see #toCollection(JSONArray,Class)
"""
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.setRootClass( objectClass );
return toList( jsonArra... | java | public static List toList( JSONArray jsonArray, Class objectClass ) {
JsonConfig jsonConfig = new JsonConfig();
jsonConfig.setRootClass( objectClass );
return toList( jsonArray, jsonConfig );
} | [
"public",
"static",
"List",
"toList",
"(",
"JSONArray",
"jsonArray",
",",
"Class",
"objectClass",
")",
"{",
"JsonConfig",
"jsonConfig",
"=",
"new",
"JsonConfig",
"(",
")",
";",
"jsonConfig",
".",
"setRootClass",
"(",
"objectClass",
")",
";",
"return",
"toList"... | Creates a List from a JSONArray.
@deprecated replaced by toCollection
@see #toCollection(JSONArray,Class) | [
"Creates",
"a",
"List",
"from",
"a",
"JSONArray",
"."
] | train | https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONArray.java#L421-L425 |
EdwardRaff/JSAT | JSAT/src/jsat/classifiers/linear/kernelized/OSKL.java | OSKL.setG | public void setG(double G) {
"""
Sets the sparsification parameter G. Increasing G reduces the number of
updates to the model, which increases sparsity but may reduce accuracy.
Decreasing G increases the update rate reducing sparsity. The original
paper tests values of G ∈ {1, 2, 4, 10}
@param G the spars... | java | public void setG(double G)
{
if(G < 1 || Double.isInfinite(G) || Double.isNaN(G))
throw new IllegalArgumentException("G must be in [1, Infinity), not " + G);
this.G = G;
} | [
"public",
"void",
"setG",
"(",
"double",
"G",
")",
"{",
"if",
"(",
"G",
"<",
"1",
"||",
"Double",
".",
"isInfinite",
"(",
"G",
")",
"||",
"Double",
".",
"isNaN",
"(",
"G",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"G must be in [1, I... | Sets the sparsification parameter G. Increasing G reduces the number of
updates to the model, which increases sparsity but may reduce accuracy.
Decreasing G increases the update rate reducing sparsity. The original
paper tests values of G ∈ {1, 2, 4, 10}
@param G the sparsification parameter in [1, ∞) | [
"Sets",
"the",
"sparsification",
"parameter",
"G",
".",
"Increasing",
"G",
"reduces",
"the",
"number",
"of",
"updates",
"to",
"the",
"model",
"which",
"increases",
"sparsity",
"but",
"may",
"reduce",
"accuracy",
".",
"Decreasing",
"G",
"increases",
"the",
"upd... | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/kernelized/OSKL.java#L194-L199 |
alipay/sofa-rpc | core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterInvoker.java | FilterInvoker.getMethodParam | protected Object getMethodParam(String methodName, String paramKey) {
"""
取得方法的特殊参数配置
@param methodName 方法名
@param paramKey 参数关键字
@return 都找不到为null method param
"""
if (CommonUtils.isEmpty(configContext)) {
return null;
}
Object o = configContext.get(buildMethodKey(me... | java | protected Object getMethodParam(String methodName, String paramKey) {
if (CommonUtils.isEmpty(configContext)) {
return null;
}
Object o = configContext.get(buildMethodKey(methodName, paramKey));
return o == null ? configContext.get(paramKey) : o;
} | [
"protected",
"Object",
"getMethodParam",
"(",
"String",
"methodName",
",",
"String",
"paramKey",
")",
"{",
"if",
"(",
"CommonUtils",
".",
"isEmpty",
"(",
"configContext",
")",
")",
"{",
"return",
"null",
";",
"}",
"Object",
"o",
"=",
"configContext",
".",
... | 取得方法的特殊参数配置
@param methodName 方法名
@param paramKey 参数关键字
@return 都找不到为null method param | [
"取得方法的特殊参数配置"
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterInvoker.java#L202-L208 |
vakinge/jeesuite-libs | jeesuite-common/src/main/java/com/jeesuite/common/crypt/DES.java | DES.encrypt | public static String encrypt(String key,String data) {
"""
DES算法,加密
@param data 待加密字符串
@param key 加密私钥,长度不能够小于8位
@return 加密后的字节数组,一般结合Base64编码使用
@throws InvalidAlgorithmParameterException
@throws Exception
"""
if(data == null)
return null;
try{
DESKeySpec dks = new DESKeySpec(key.... | java | public static String encrypt(String key,String data) {
if(data == null)
return null;
try{
DESKeySpec dks = new DESKeySpec(key.getBytes());
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
//key的长度不能够小于8位字节
Key secretKey = keyFactory.generateSecret(dk... | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"key",
",",
"String",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"return",
"null",
";",
"try",
"{",
"DESKeySpec",
"dks",
"=",
"new",
"DESKeySpec",
"(",
"key",
".",
"getBytes",
"(",
... | DES算法,加密
@param data 待加密字符串
@param key 加密私钥,长度不能够小于8位
@return 加密后的字节数组,一般结合Base64编码使用
@throws InvalidAlgorithmParameterException
@throws Exception | [
"DES算法,加密"
] | train | https://github.com/vakinge/jeesuite-libs/blob/c48fe2c7fbd294892cf4030dbec96e744dd3e386/jeesuite-common/src/main/java/com/jeesuite/common/crypt/DES.java#L28-L45 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java | WordVectorSerializer.writeWordVectors | @Deprecated
public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull OutputStream outputStream) throws IOException {
"""
Writes the word vectors to the given OutputStream. Note that this assumes an in memory cache.
@param vec the word2vec to write
@param outputStream - OutputStream, whe... | java | @Deprecated
public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull OutputStream outputStream) throws IOException {
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8))) {
writeWordVectors(vec, writer);
}
} | [
"@",
"Deprecated",
"public",
"static",
"void",
"writeWordVectors",
"(",
"@",
"NonNull",
"Word2Vec",
"vec",
",",
"@",
"NonNull",
"OutputStream",
"outputStream",
")",
"throws",
"IOException",
"{",
"try",
"(",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",... | Writes the word vectors to the given OutputStream. Note that this assumes an in memory cache.
@param vec the word2vec to write
@param outputStream - OutputStream, where all data should be sent to
the path to write
@throws IOException | [
"Writes",
"the",
"word",
"vectors",
"to",
"the",
"given",
"OutputStream",
".",
"Note",
"that",
"this",
"assumes",
"an",
"in",
"memory",
"cache",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L1511-L1516 |
qos-ch/cal10n | cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java | MessageConveyor.getMessage | public <E extends Enum<?>> String getMessage(E key, Object... args)
throws MessageConveyorException {
"""
Given an enum as key, find the resource bundle corresponding to this locale and return
the message corresponding to the key passed as parameter (internationalized per this locale).
<p/>
<p/>
The ... | java | public <E extends Enum<?>> String getMessage(E key, Object... args)
throws MessageConveyorException {
Class<? extends Enum<?>> declaringClass = key.getDeclaringClass();
String declaringClassName = declaringClass.getName();
CAL10NBundle rb = cache.get(declaringClassName);
if (rb == null || rb... | [
"public",
"<",
"E",
"extends",
"Enum",
"<",
"?",
">",
">",
"String",
"getMessage",
"(",
"E",
"key",
",",
"Object",
"...",
"args",
")",
"throws",
"MessageConveyorException",
"{",
"Class",
"<",
"?",
"extends",
"Enum",
"<",
"?",
">",
">",
"declaringClass",
... | Given an enum as key, find the resource bundle corresponding to this locale and return
the message corresponding to the key passed as parameter (internationalized per this locale).
<p/>
<p/>
The name of the resource bundle is defined via the {@link BaseName}
annotation whereas the locale is specified in this MessageCon... | [
"Given",
"an",
"enum",
"as",
"key",
"find",
"the",
"resource",
"bundle",
"corresponding",
"to",
"this",
"locale",
"and",
"return",
"the",
"message",
"corresponding",
"to",
"the",
"key",
"passed",
"as",
"parameter",
"(",
"internationalized",
"per",
"this",
"loc... | train | https://github.com/qos-ch/cal10n/blob/22c048801fb6d04c991a0c8c01bb6fb97ef50b37/cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java#L69-L92 |
groovy/groovy-core | subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java | Sql.eachRow | public void eachRow(String sql, int offset, int maxRows, Closure closure) throws SQLException {
"""
Performs the given SQL query calling the given <code>closure</code> with each row of the result set starting at
the provided <code>offset</code>, and including up to <code>maxRows</code> number of rows.
The row wi... | java | public void eachRow(String sql, int offset, int maxRows, Closure closure) throws SQLException {
eachRow(sql, (Closure) null, offset, maxRows, closure);
} | [
"public",
"void",
"eachRow",
"(",
"String",
"sql",
",",
"int",
"offset",
",",
"int",
"maxRows",
",",
"Closure",
"closure",
")",
"throws",
"SQLException",
"{",
"eachRow",
"(",
"sql",
",",
"(",
"Closure",
")",
"null",
",",
"offset",
",",
"maxRows",
",",
... | Performs the given SQL query calling the given <code>closure</code> with each row of the result set starting at
the provided <code>offset</code>, and including up to <code>maxRows</code> number of rows.
The row will be a <code>GroovyResultSet</code> which is a <code>ResultSet</code>
that supports accessing the fields u... | [
"Performs",
"the",
"given",
"SQL",
"query",
"calling",
"the",
"given",
"<code",
">",
"closure<",
"/",
"code",
">",
"with",
"each",
"row",
"of",
"the",
"result",
"set",
"starting",
"at",
"the",
"provided",
"<code",
">",
"offset<",
"/",
"code",
">",
"and",... | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1116-L1118 |
census-instrumentation/opencensus-java | contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardMetrics.java | DropWizardMetrics.collectTimer | private Metric collectTimer(MetricName dropwizardMetric, Timer timer) {
"""
Returns a {@code Metric} collected from {@link Timer}.
@param dropwizardMetric the metric name.
@param timer the timer object to collect
@return a {@code Metric}.
"""
String metricName = DropWizardUtils.generateFullMetricName(... | java | private Metric collectTimer(MetricName dropwizardMetric, Timer timer) {
String metricName = DropWizardUtils.generateFullMetricName(dropwizardMetric.getKey(), "timer");
String metricDescription =
DropWizardUtils.generateFullMetricDescription(dropwizardMetric.getKey(), timer);
final AbstractMap.Simple... | [
"private",
"Metric",
"collectTimer",
"(",
"MetricName",
"dropwizardMetric",
",",
"Timer",
"timer",
")",
"{",
"String",
"metricName",
"=",
"DropWizardUtils",
".",
"generateFullMetricName",
"(",
"dropwizardMetric",
".",
"getKey",
"(",
")",
",",
"\"timer\"",
")",
";"... | Returns a {@code Metric} collected from {@link Timer}.
@param dropwizardMetric the metric name.
@param timer the timer object to collect
@return a {@code Metric}. | [
"Returns",
"a",
"{",
"@code",
"Metric",
"}",
"collected",
"from",
"{",
"@link",
"Timer",
"}",
"."
] | train | https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardMetrics.java#L222-L236 |
landawn/AbacusUtil | src/com/landawn/abacus/util/StringUtil.java | StringUtil.lastOrdinalIndexOf | public static int lastOrdinalIndexOf(final String str, final String substr, final int ordinal) {
"""
<p>
Finds the n-th last index within a String, handling {@code null}.
</p>
@param str
@param substr
@param ordinal
the n-th last {@code searchStr} to find
@return the n-th last index of the search CharSequ... | java | public static int lastOrdinalIndexOf(final String str, final String substr, final int ordinal) {
return ordinalIndexOf(str, substr, ordinal, true);
} | [
"public",
"static",
"int",
"lastOrdinalIndexOf",
"(",
"final",
"String",
"str",
",",
"final",
"String",
"substr",
",",
"final",
"int",
"ordinal",
")",
"{",
"return",
"ordinalIndexOf",
"(",
"str",
",",
"substr",
",",
"ordinal",
",",
"true",
")",
";",
"}"
] | <p>
Finds the n-th last index within a String, handling {@code null}.
</p>
@param str
@param substr
@param ordinal
the n-th last {@code searchStr} to find
@return the n-th last index of the search CharSequence, {@code -1} (
{@code N.INDEX_NOT_FOUND}) if no match or {@code null} or empty
string input | [
"<p",
">",
"Finds",
"the",
"n",
"-",
"th",
"last",
"index",
"within",
"a",
"String",
"handling",
"{",
"@code",
"null",
"}",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/StringUtil.java#L3830-L3832 |
trellis-ldp/trellis | components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java | TriplestoreResourceService.buildUpdateModificationRequest | private UpdateRequest buildUpdateModificationRequest(final IRI identifier, final Literal time) {
"""
This code is equivalent to the SPARQL query below.
<p><pre><code>
WITH trellis:PreferServerManaged
DELETE { IDENTIFIER dc:modified ?time }
INSERT { IDENTIFIER dc:modified TIME }
WHERE { IDENTIFIER dc:modifie... | java | private UpdateRequest buildUpdateModificationRequest(final IRI identifier, final Literal time) {
final UpdateRequest req = new UpdateRequest();
final Var modified = Var.alloc(MODIFIED);
final UpdateDeleteInsert modify = new UpdateDeleteInsert();
modify.setWithIRI(rdf.asJenaNode(PreferSer... | [
"private",
"UpdateRequest",
"buildUpdateModificationRequest",
"(",
"final",
"IRI",
"identifier",
",",
"final",
"Literal",
"time",
")",
"{",
"final",
"UpdateRequest",
"req",
"=",
"new",
"UpdateRequest",
"(",
")",
";",
"final",
"Var",
"modified",
"=",
"Var",
".",
... | This code is equivalent to the SPARQL query below.
<p><pre><code>
WITH trellis:PreferServerManaged
DELETE { IDENTIFIER dc:modified ?time }
INSERT { IDENTIFIER dc:modified TIME }
WHERE { IDENTIFIER dc:modified ?time } .
</code></pre></p> | [
"This",
"code",
"is",
"equivalent",
"to",
"the",
"SPARQL",
"query",
"below",
"."
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResourceService.java#L291-L306 |
betfair/cougar | cougar-framework/jetty-transport/src/main/java/com/betfair/cougar/transport/impl/protocol/http/AbstractHttpCommandProcessor.java | AbstractHttpCommandProcessor.resolveContextForErrorHandling | protected DehydratedExecutionContext resolveContextForErrorHandling(DehydratedExecutionContext ctx, HttpCommand command) {
"""
Resolves an HttpCommand to an ExecutionContext for the error logging scenario. This will
never throw an exception although it might return null. The process is:
<li>If a non null context... | java | protected DehydratedExecutionContext resolveContextForErrorHandling(DehydratedExecutionContext ctx, HttpCommand command) {
if (ctx != null) return ctx;
try {
return contextResolution.resolveExecutionContext(protocol, command, null);
} catch (RuntimeException e) {
// Well ... | [
"protected",
"DehydratedExecutionContext",
"resolveContextForErrorHandling",
"(",
"DehydratedExecutionContext",
"ctx",
",",
"HttpCommand",
"command",
")",
"{",
"if",
"(",
"ctx",
"!=",
"null",
")",
"return",
"ctx",
";",
"try",
"{",
"return",
"contextResolution",
".",
... | Resolves an HttpCommand to an ExecutionContext for the error logging scenario. This will
never throw an exception although it might return null. The process is:
<li>If a non null context is passed,us it</li>
<li>Otherwise try and resolve a context from the commmand</li>
<li>If that fail, return null</li>
@param ctx
the... | [
"Resolves",
"an",
"HttpCommand",
"to",
"an",
"ExecutionContext",
"for",
"the",
"error",
"logging",
"scenario",
".",
"This",
"will",
"never",
"throw",
"an",
"exception",
"although",
"it",
"might",
"return",
"null",
".",
"The",
"process",
"is",
":",
"<li",
">"... | train | https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-framework/jetty-transport/src/main/java/com/betfair/cougar/transport/impl/protocol/http/AbstractHttpCommandProcessor.java#L215-L224 |
Azure/azure-sdk-for-java | recoveryservices.backup/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_06_01/implementation/ProtectionPoliciesInner.java | ProtectionPoliciesInner.createOrUpdateAsync | public Observable<ProtectionPolicyResourceInner> createOrUpdateAsync(String vaultName, String resourceGroupName, String policyName, ProtectionPolicyResourceInner resourceProtectionPolicy) {
"""
Creates or modifies a backup policy. This is an asynchronous operation. Use the GetPolicyOperationResult API to Get the o... | java | public Observable<ProtectionPolicyResourceInner> createOrUpdateAsync(String vaultName, String resourceGroupName, String policyName, ProtectionPolicyResourceInner resourceProtectionPolicy) {
return createOrUpdateWithServiceResponseAsync(vaultName, resourceGroupName, policyName, resourceProtectionPolicy).map(new ... | [
"public",
"Observable",
"<",
"ProtectionPolicyResourceInner",
">",
"createOrUpdateAsync",
"(",
"String",
"vaultName",
",",
"String",
"resourceGroupName",
",",
"String",
"policyName",
",",
"ProtectionPolicyResourceInner",
"resourceProtectionPolicy",
")",
"{",
"return",
"crea... | Creates or modifies a backup policy. This is an asynchronous operation. Use the GetPolicyOperationResult API to Get the operation status.
@param vaultName The name of the Recovery Services vault.
@param resourceGroupName The name of the resource group associated with the Recovery Services vault.
@param policyName The ... | [
"Creates",
"or",
"modifies",
"a",
"backup",
"policy",
".",
"This",
"is",
"an",
"asynchronous",
"operation",
".",
"Use",
"the",
"GetPolicyOperationResult",
"API",
"to",
"Get",
"the",
"operation",
"status",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_06_01/implementation/ProtectionPoliciesInner.java#L211-L218 |
oaqa/uima-ecd | src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java | SimplePipelineRev803.runPipeline | public static void runPipeline(final CAS cas, final AnalysisEngine... engines)
throws UIMAException, IOException {
"""
Run a sequence of {@link AnalysisEngine analysis engines} over a {@link CAS}. This method
does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like
{@lin... | java | public static void runPipeline(final CAS cas, final AnalysisEngine... engines)
throws UIMAException, IOException {
if (engines.length == 0) {
return;
}
CasIterator casIter = engines[0].processAndOutputNewCASes(cas);
AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engines.len... | [
"public",
"static",
"void",
"runPipeline",
"(",
"final",
"CAS",
"cas",
",",
"final",
"AnalysisEngine",
"...",
"engines",
")",
"throws",
"UIMAException",
",",
"IOException",
"{",
"if",
"(",
"engines",
".",
"length",
"==",
"0",
")",
"{",
"return",
";",
"}",
... | Run a sequence of {@link AnalysisEngine analysis engines} over a {@link CAS}. This method
does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like
{@link AnalysisEngine#collectionProcessComplete()}. This is left to the caller.
@param cas
the CAS to process
@param engines
a sequence ... | [
"Run",
"a",
"sequence",
"of",
"{",
"@link",
"AnalysisEngine",
"analysis",
"engines",
"}",
"over",
"a",
"{",
"@link",
"CAS",
"}",
".",
"This",
"method",
"does",
"not",
"{",
"@link",
"AnalysisEngine#destroy",
"()",
"destroy",
"}",
"the",
"engines",
"or",
"se... | train | https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java#L251-L263 |
googleapis/cloud-bigtable-client | bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/TracingUtilities.java | TracingUtilities.addDescriptor | private static void addDescriptor(List<String> descriptors, ServiceDescriptor serviceDescriptor) {
"""
Reads a list of {@link MethodDescriptor}s from a {@link ServiceDescriptor} and creates a list
of Open Census tags.
@param descriptors a {@link} of Strings to add Open Census tags to
@param serviceDescriptor ... | java | private static void addDescriptor(List<String> descriptors, ServiceDescriptor serviceDescriptor) {
for (MethodDescriptor<?, ?> method : serviceDescriptor.getMethods()) {
// This is added by Cloud Bigtable's AbstractRetryingOperation
descriptors.add("Operation." + method.getFullMethodName().replace('/', ... | [
"private",
"static",
"void",
"addDescriptor",
"(",
"List",
"<",
"String",
">",
"descriptors",
",",
"ServiceDescriptor",
"serviceDescriptor",
")",
"{",
"for",
"(",
"MethodDescriptor",
"<",
"?",
",",
"?",
">",
"method",
":",
"serviceDescriptor",
".",
"getMethods",... | Reads a list of {@link MethodDescriptor}s from a {@link ServiceDescriptor} and creates a list
of Open Census tags.
@param descriptors a {@link} of Strings to add Open Census tags to
@param serviceDescriptor A {@link ServiceDescriptor} that contains a list of RPCs that are
provided by that service | [
"Reads",
"a",
"list",
"of",
"{",
"@link",
"MethodDescriptor",
"}",
"s",
"from",
"a",
"{",
"@link",
"ServiceDescriptor",
"}",
"and",
"creates",
"a",
"list",
"of",
"Open",
"Census",
"tags",
"."
] | train | https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/util/TracingUtilities.java#L81-L86 |
EdwardRaff/JSAT | JSAT/src/jsat/linear/EigenValueDecomposition.java | EigenValueDecomposition.sortByEigenValue | public void sortByEigenValue(Comparator<Double> cmp) {
"""
Sorts the eigen values and the corresponding eigenvector columns by the
associated eigen value. Sorting can not occur if complex values are
present.
@param cmp the comparator to use to sort the eigen values
"""
if(isComplex())
th... | java | public void sortByEigenValue(Comparator<Double> cmp)
{
if(isComplex())
throw new ArithmeticException("Eigen values can not be sorted due to complex results");
IndexTable it = new IndexTable(DoubleList.unmodifiableView(d, d.length), cmp);
for(int i = 0; i < d.length; i++)... | [
"public",
"void",
"sortByEigenValue",
"(",
"Comparator",
"<",
"Double",
">",
"cmp",
")",
"{",
"if",
"(",
"isComplex",
"(",
")",
")",
"throw",
"new",
"ArithmeticException",
"(",
"\"Eigen values can not be sorted due to complex results\"",
")",
";",
"IndexTable",
"it"... | Sorts the eigen values and the corresponding eigenvector columns by the
associated eigen value. Sorting can not occur if complex values are
present.
@param cmp the comparator to use to sort the eigen values | [
"Sorts",
"the",
"eigen",
"values",
"and",
"the",
"corresponding",
"eigenvector",
"columns",
"by",
"the",
"associated",
"eigen",
"value",
".",
"Sorting",
"can",
"not",
"occur",
"if",
"complex",
"values",
"are",
"present",
"."
] | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/EigenValueDecomposition.java#L692-L708 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/resources/BundleHandler.java | BundleHandler.getBundleHandle | public static int getBundleHandle(String name, ClassLoader cl) {
"""
Retrieves an <code>int</code> handle to the <code>ResourceBundle</code>
object corresponding to the specified name and current
<code>Locale</code>, using the specified <code>ClassLoader</code>. <p>
@return <code>int</code> handle to the <cod... | java | public static int getBundleHandle(String name, ClassLoader cl) {
Integer bundleHandle;
ResourceBundle bundle;
String bundleName;
String bundleKey;
bundleName = prefix + name;
synchronized (mutex) {
bundleKey = locale.toString() + b... | [
"public",
"static",
"int",
"getBundleHandle",
"(",
"String",
"name",
",",
"ClassLoader",
"cl",
")",
"{",
"Integer",
"bundleHandle",
";",
"ResourceBundle",
"bundle",
";",
"String",
"bundleName",
";",
"String",
"bundleKey",
";",
"bundleName",
"=",
"prefix",
"+",
... | Retrieves an <code>int</code> handle to the <code>ResourceBundle</code>
object corresponding to the specified name and current
<code>Locale</code>, using the specified <code>ClassLoader</code>. <p>
@return <code>int</code> handle to the <code>ResourceBundle</code>
object corresponding to the specified name and
current... | [
"Retrieves",
"an",
"<code",
">",
"int<",
"/",
"code",
">",
"handle",
"to",
"the",
"<code",
">",
"ResourceBundle<",
"/",
"code",
">",
"object",
"corresponding",
"to",
"the",
"specified",
"name",
"and",
"current",
"<code",
">",
"Locale<",
"/",
"code",
">",
... | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/resources/BundleHandler.java#L125-L156 |
xiancloud/xian | xian-dao/xian-mongodbdao/xian-mongodbdao-sync/src/main/java/info/xiancloud/plugin/dao/mongodb/Mongo.java | Mongo.getOrInitDefaultDatabase | public static MongoDatabase getOrInitDefaultDatabase() {
"""
Get default mongodb database reference or initiate it if not initialized.
@return the default mongodb database reference
"""
String connectionString = XianConfig.get("mongodb_connection_string");
String database = XianConfig.get("m... | java | public static MongoDatabase getOrInitDefaultDatabase() {
String connectionString = XianConfig.get("mongodb_connection_string");
String database = XianConfig.get("mongodb_database");
return getOrInitDefaultDatabase(connectionString, database);
} | [
"public",
"static",
"MongoDatabase",
"getOrInitDefaultDatabase",
"(",
")",
"{",
"String",
"connectionString",
"=",
"XianConfig",
".",
"get",
"(",
"\"mongodb_connection_string\"",
")",
";",
"String",
"database",
"=",
"XianConfig",
".",
"get",
"(",
"\"mongodb_database\"... | Get default mongodb database reference or initiate it if not initialized.
@return the default mongodb database reference | [
"Get",
"default",
"mongodb",
"database",
"reference",
"or",
"initiate",
"it",
"if",
"not",
"initialized",
"."
] | train | https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-dao/xian-mongodbdao/xian-mongodbdao-sync/src/main/java/info/xiancloud/plugin/dao/mongodb/Mongo.java#L43-L47 |
UrielCh/ovh-java-sdk | ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java | ApiOvhDomain.serviceName_nameServer_id_DELETE | public net.minidev.ovh.api.domain.OvhTask serviceName_nameServer_id_DELETE(String serviceName, Long id) throws IOException {
"""
Delete a name server
REST: DELETE /domain/{serviceName}/nameServer/{id}
@param serviceName [required] The internal name of your domain
@param id [required] Id of the object
"""
... | java | public net.minidev.ovh.api.domain.OvhTask serviceName_nameServer_id_DELETE(String serviceName, Long id) throws IOException {
String qPath = "/domain/{serviceName}/nameServer/{id}";
StringBuilder sb = path(qPath, serviceName, id);
String resp = exec(qPath, "DELETE", sb.toString(), null);
return convertTo(resp, n... | [
"public",
"net",
".",
"minidev",
".",
"ovh",
".",
"api",
".",
"domain",
".",
"OvhTask",
"serviceName_nameServer_id_DELETE",
"(",
"String",
"serviceName",
",",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/domain/{serviceName}/nameSer... | Delete a name server
REST: DELETE /domain/{serviceName}/nameServer/{id}
@param serviceName [required] The internal name of your domain
@param id [required] Id of the object | [
"Delete",
"a",
"name",
"server"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1060-L1065 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java | CollectionDescriptorConstraints.checkQueryCustomizer | private void checkQueryCustomizer(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException {
"""
Checks the query-customizer setting of the given collection descriptor.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is only checked i... | java | private void checkQueryCustomizer(CollectionDescriptorDef collDef, String checkLevel) throws ConstraintException
{
if (!CHECKLEVEL_STRICT.equals(checkLevel))
{
return;
}
String queryCustomizerName = collDef.getProperty(PropertyHelper.OJB_PROPERTY_QUERY_CU... | [
"private",
"void",
"checkQueryCustomizer",
"(",
"CollectionDescriptorDef",
"collDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"!",
"CHECKLEVEL_STRICT",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
... | Checks the query-customizer setting of the given collection descriptor.
@param collDef The collection descriptor
@param checkLevel The current check level (this constraint is only checked in strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"the",
"query",
"-",
"customizer",
"setting",
"of",
"the",
"given",
"collection",
"descriptor",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/CollectionDescriptorConstraints.java#L284-L311 |
trellis-ldp/trellis | components/file/src/main/java/org/trellisldp/file/FileUtils.java | FileUtils.getBoundedStream | public static InputStream getBoundedStream(final InputStream stream, final int from, final int to)
throws IOException {
"""
Get a bounded inputstream.
@param stream the input stream
@param from the byte from which to start
@param to the byte to which to read
@throws IOException if an error occurs w... | java | public static InputStream getBoundedStream(final InputStream stream, final int from, final int to)
throws IOException {
final long skipped = stream.skip(from);
LOGGER.debug("Skipped {} bytes", skipped);
return new BoundedInputStream(stream, (long) to - from);
} | [
"public",
"static",
"InputStream",
"getBoundedStream",
"(",
"final",
"InputStream",
"stream",
",",
"final",
"int",
"from",
",",
"final",
"int",
"to",
")",
"throws",
"IOException",
"{",
"final",
"long",
"skipped",
"=",
"stream",
".",
"skip",
"(",
"from",
")",... | Get a bounded inputstream.
@param stream the input stream
@param from the byte from which to start
@param to the byte to which to read
@throws IOException if an error occurs when skipping forward
@return the bounded inputstream | [
"Get",
"a",
"bounded",
"inputstream",
"."
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/file/src/main/java/org/trellisldp/file/FileUtils.java#L177-L182 |
TheHortonMachine/hortonmachine | gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/geopap4/DaoGpsLog.java | DaoGpsLog.collectDataForLog | public static void collectDataForLog( IHMConnection connection, GpsLog log ) throws Exception {
"""
Gather gps points data for a supplied log.
@param connection the connection to use.
@param log the log.
@throws Exception
"""
long logId = log.id;
String query = "select "
+... | java | public static void collectDataForLog( IHMConnection connection, GpsLog log ) throws Exception {
long logId = log.id;
String query = "select "
+ //
GpsLogsDataTableFields.COLUMN_DATA_LAT.getFieldName() + ","
+ //
GpsLogsDataTableFields.COLU... | [
"public",
"static",
"void",
"collectDataForLog",
"(",
"IHMConnection",
"connection",
",",
"GpsLog",
"log",
")",
"throws",
"Exception",
"{",
"long",
"logId",
"=",
"log",
".",
"id",
";",
"String",
"query",
"=",
"\"select \"",
"+",
"//",
"GpsLogsDataTableFields",
... | Gather gps points data for a supplied log.
@param connection the connection to use.
@param log the log.
@throws Exception | [
"Gather",
"gps",
"points",
"data",
"for",
"a",
"supplied",
"log",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/geopaparazzi/geopap4/DaoGpsLog.java#L303-L338 |
JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java | ClassUtility.getFieldValue | public static Object getFieldValue(final Field field, final Object instance) throws CoreRuntimeException {
"""
Retrieve an object field even if it has a private or protected visibility.
@param field the field to update
@param instance the object instance that hold this field
@return value the value stored i... | java | public static Object getFieldValue(final Field field, final Object instance) throws CoreRuntimeException {
Object value = null;
try {
// store current visibility
final boolean accessible = field.isAccessible();
// let it accessible anyway
field.setAccessi... | [
"public",
"static",
"Object",
"getFieldValue",
"(",
"final",
"Field",
"field",
",",
"final",
"Object",
"instance",
")",
"throws",
"CoreRuntimeException",
"{",
"Object",
"value",
"=",
"null",
";",
"try",
"{",
"// store current visibility",
"final",
"boolean",
"acce... | Retrieve an object field even if it has a private or protected visibility.
@param field the field to update
@param instance the object instance that hold this field
@return value the value stored into this field
@throws CoreException if the new value cannot be set | [
"Retrieve",
"an",
"object",
"field",
"even",
"if",
"it",
"has",
"a",
"private",
"or",
"protected",
"visibility",
"."
] | train | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L582-L601 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java | FeaturesImpl.deletePhraseList | public OperationStatus deletePhraseList(UUID appId, String versionId, int phraselistId) {
"""
Deletes a phraselist feature.
@param appId The application ID.
@param versionId The version ID.
@param phraselistId The ID of the feature to be deleted.
@throws IllegalArgumentException thrown if parameters fail the... | java | public OperationStatus deletePhraseList(UUID appId, String versionId, int phraselistId) {
return deletePhraseListWithServiceResponseAsync(appId, versionId, phraselistId).toBlocking().single().body();
} | [
"public",
"OperationStatus",
"deletePhraseList",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"int",
"phraselistId",
")",
"{",
"return",
"deletePhraseListWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"phraselistId",
")",
".",
"toBlocking",
... | Deletes a phraselist feature.
@param appId The application ID.
@param versionId The version ID.
@param phraselistId The ID of the feature to be deleted.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@throws RuntimeEx... | [
"Deletes",
"a",
"phraselist",
"feature",
"."
] | 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/FeaturesImpl.java#L826-L828 |
fuinorg/objects4j | src/main/java/org/fuin/objects4j/ui/AnnotationAnalyzer.java | AnnotationAnalyzer.createFieldInfos | public final List<FieldTextInfo> createFieldInfos(@NotNull final Class<?> clasz, @NotNull final Locale locale,
@NotNull final Class<? extends Annotation> annotationClasz) {
"""
Returns text annotation informations for all field of a class that are annotated with <code>annotationClasz</code>. All other... | java | public final List<FieldTextInfo> createFieldInfos(@NotNull final Class<?> clasz, @NotNull final Locale locale,
@NotNull final Class<? extends Annotation> annotationClasz) {
Contract.requireArgNotNull("clasz", clasz);
Contract.requireArgNotNull("locale", locale);
Contract.requir... | [
"public",
"final",
"List",
"<",
"FieldTextInfo",
">",
"createFieldInfos",
"(",
"@",
"NotNull",
"final",
"Class",
"<",
"?",
">",
"clasz",
",",
"@",
"NotNull",
"final",
"Locale",
"locale",
",",
"@",
"NotNull",
"final",
"Class",
"<",
"?",
"extends",
"Annotati... | Returns text annotation informations for all field of a class that are annotated with <code>annotationClasz</code>. All other fields
are ignored.
@param clasz
Class that contains the fields.
@param locale
Locale to use.
@param annotationClasz
Type of annotation to find.
@return List of informations - Never <code>null... | [
"Returns",
"text",
"annotation",
"informations",
"for",
"all",
"field",
"of",
"a",
"class",
"that",
"are",
"annotated",
"with",
"<code",
">",
"annotationClasz<",
"/",
"code",
">",
".",
"All",
"other",
"fields",
"are",
"ignored",
"."
] | train | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/ui/AnnotationAnalyzer.java#L107-L138 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockWithChecksumFileReader.java | BlockWithChecksumFileReader.metaFileExists | static public boolean metaFileExists(FSDatasetInterface dataset, int namespaceId, Block b) throws IOException {
"""
Does the meta file exist for this block?
@param namespaceId - parent namespace id
@param b - the block
@return true of the metafile for specified block exits
@throws IOException
"""
retur... | java | static public boolean metaFileExists(FSDatasetInterface dataset, int namespaceId, Block b) throws IOException {
return getMetaFile(dataset, namespaceId, b).exists();
} | [
"static",
"public",
"boolean",
"metaFileExists",
"(",
"FSDatasetInterface",
"dataset",
",",
"int",
"namespaceId",
",",
"Block",
"b",
")",
"throws",
"IOException",
"{",
"return",
"getMetaFile",
"(",
"dataset",
",",
"namespaceId",
",",
"b",
")",
".",
"exists",
"... | Does the meta file exist for this block?
@param namespaceId - parent namespace id
@param b - the block
@return true of the metafile for specified block exits
@throws IOException | [
"Does",
"the",
"meta",
"file",
"exist",
"for",
"this",
"block?"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockWithChecksumFileReader.java#L468-L470 |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Session.java | Session.getCurrentTime | synchronized TimeData getCurrentTime(boolean withZone) {
"""
Returns the current time, unchanged for the duration of the current
execution unit (statement)
"""
resetCurrentTimestamp();
if (withZone) {
if (currentTime == null) {
int seconds =
(i... | java | synchronized TimeData getCurrentTime(boolean withZone) {
resetCurrentTimestamp();
if (withZone) {
if (currentTime == null) {
int seconds =
(int) (HsqlDateTime.getNormalisedTime(currentMillis))
/ 1000;
int nanos = (int)... | [
"synchronized",
"TimeData",
"getCurrentTime",
"(",
"boolean",
"withZone",
")",
"{",
"resetCurrentTimestamp",
"(",
")",
";",
"if",
"(",
"withZone",
")",
"{",
"if",
"(",
"currentTime",
"==",
"null",
")",
"{",
"int",
"seconds",
"=",
"(",
"int",
")",
"(",
"H... | Returns the current time, unchanged for the duration of the current
execution unit (statement) | [
"Returns",
"the",
"current",
"time",
"unchanged",
"for",
"the",
"duration",
"of",
"the",
"current",
"execution",
"unit",
"(",
"statement",
")"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Session.java#L1487-L1514 |
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/JobStepExecutionsInner.java | JobStepExecutionsInner.listByJobExecutionAsync | public Observable<Page<JobExecutionInner>> listByJobExecutionAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final UUID jobExecutionId) {
"""
Lists the step executions of a job execution.
@param resourceGroupName The name of the resource group that... | java | public Observable<Page<JobExecutionInner>> listByJobExecutionAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final UUID jobExecutionId) {
return listByJobExecutionWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExe... | [
"public",
"Observable",
"<",
"Page",
"<",
"JobExecutionInner",
">",
">",
"listByJobExecutionAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"serverName",
",",
"final",
"String",
"jobAgentName",
",",
"final",
"String",
"jobName",
",",
"... | Lists the step executions of a job execution.
@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 serverName The name of the server.
@param jobAgentName The name of the job agent.
@param jobName The name... | [
"Lists",
"the",
"step",
"executions",
"of",
"a",
"job",
"execution",
"."
] | 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/JobStepExecutionsInner.java#L134-L142 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/CMapAwareDocumentFont.java | CMapAwareDocumentFont.decodeSingleCID | private String decodeSingleCID(byte[] bytes, int offset, int len) {
"""
Decodes a single CID (represented by one or two bytes) to a unicode String.
@param bytes the bytes making up the character code to convert
@param offset an offset
@param len a length
@return a String containing the encoded form of the in... | java | private String decodeSingleCID(byte[] bytes, int offset, int len){
if (toUnicodeCmap != null){
if (offset + len > bytes.length)
throw new ArrayIndexOutOfBoundsException("Invalid index: " + offset + len);
return toUnicodeCmap.lookup(bytes, offset, len);
}
... | [
"private",
"String",
"decodeSingleCID",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
",",
"int",
"len",
")",
"{",
"if",
"(",
"toUnicodeCmap",
"!=",
"null",
")",
"{",
"if",
"(",
"offset",
"+",
"len",
">",
"bytes",
".",
"length",
")",
"throw",... | Decodes a single CID (represented by one or two bytes) to a unicode String.
@param bytes the bytes making up the character code to convert
@param offset an offset
@param len a length
@return a String containing the encoded form of the input bytes using the font's encoding. | [
"Decodes",
"a",
"single",
"CID",
"(",
"represented",
"by",
"one",
"or",
"two",
"bytes",
")",
"to",
"a",
"unicode",
"String",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/CMapAwareDocumentFont.java#L175-L187 |
spring-projects/spring-social | spring-social-web/src/main/java/org/springframework/social/connect/web/ReconnectFilter.java | ReconnectFilter.getRefreshUrl | protected String getRefreshUrl(HttpServletRequest request, ApiException apiException) {
"""
Returns the URL to redirect to if it is determined that a connection needs to be renewed.
By default, the filter will redirect to /connect/{provider ID} with a "reconnect" query parameter.
This filter also handles GET req... | java | protected String getRefreshUrl(HttpServletRequest request, ApiException apiException) {
String scopeNeeded = getRequiredScope(apiException);
StringBuilder sb = new StringBuilder(request.getContextPath() + CONNECT_PATH + apiException.getProviderId())
.append(RECONNECT_PARAMETER_EQUALS_TRUE);
if (scopeNeeded != ... | [
"protected",
"String",
"getRefreshUrl",
"(",
"HttpServletRequest",
"request",
",",
"ApiException",
"apiException",
")",
"{",
"String",
"scopeNeeded",
"=",
"getRequiredScope",
"(",
"apiException",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"re... | Returns the URL to redirect to if it is determined that a connection needs to be renewed.
By default, the filter will redirect to /connect/{provider ID} with a "reconnect" query parameter.
This filter also handles GET requests to that same path before submitting a POST request to {@link ConnectController} for authoriza... | [
"Returns",
"the",
"URL",
"to",
"redirect",
"to",
"if",
"it",
"is",
"determined",
"that",
"a",
"connection",
"needs",
"to",
"be",
"renewed",
".",
"By",
"default",
"the",
"filter",
"will",
"redirect",
"to",
"/",
"connect",
"/",
"{",
"provider",
"ID",
"}",
... | train | https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-web/src/main/java/org/springframework/social/connect/web/ReconnectFilter.java#L121-L129 |
Azure/azure-sdk-for-java | sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java | SyncGroupsInner.beginRefreshHubSchema | public void beginRefreshHubSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName) {
"""
Refreshes a hub database schema.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or th... | java | public void beginRefreshHubSchema(String resourceGroupName, String serverName, String databaseName, String syncGroupName) {
beginRefreshHubSchemaWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName).toBlocking().single().body();
} | [
"public",
"void",
"beginRefreshHubSchema",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"databaseName",
",",
"String",
"syncGroupName",
")",
"{",
"beginRefreshHubSchemaWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverName",... | Refreshes a hub database schema.
@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 serverName The name of the server.
@param databaseName The name of the database on which the sync group is hosted.
@pa... | [
"Refreshes",
"a",
"hub",
"database",
"schema",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L352-L354 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/model/ForeignkeyDef.java | ForeignkeyDef.addColumnPair | public void addColumnPair(String localColumn, String remoteColumn) {
"""
Adds a column pair to this foreignkey.
@param localColumn The column in the local table
@param remoteColumn The column in the remote table
"""
if (!_localColumns.contains(localColumn))
{
_localColum... | java | public void addColumnPair(String localColumn, String remoteColumn)
{
if (!_localColumns.contains(localColumn))
{
_localColumns.add(localColumn);
}
if (!_remoteColumns.contains(remoteColumn))
{
_remoteColumns.add(remoteColumn);
... | [
"public",
"void",
"addColumnPair",
"(",
"String",
"localColumn",
",",
"String",
"remoteColumn",
")",
"{",
"if",
"(",
"!",
"_localColumns",
".",
"contains",
"(",
"localColumn",
")",
")",
"{",
"_localColumns",
".",
"add",
"(",
"localColumn",
")",
";",
"}",
"... | Adds a column pair to this foreignkey.
@param localColumn The column in the local table
@param remoteColumn The column in the remote table | [
"Adds",
"a",
"column",
"pair",
"to",
"this",
"foreignkey",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/ForeignkeyDef.java#L60-L70 |
Impetus/Kundera | src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java | HibernateClient.populateEnhanceEntities | private List<EnhanceEntity> populateEnhanceEntities(EntityMetadata m, List<String> relationNames, List result) {
"""
Populate enhance entities.
@param m
the m
@param relationNames
the relation names
@param result
the result
@return the list
"""
List<EnhanceEntity> ls = null;
if (!resu... | java | private List<EnhanceEntity> populateEnhanceEntities(EntityMetadata m, List<String> relationNames, List result)
{
List<EnhanceEntity> ls = null;
if (!result.isEmpty())
{
ls = new ArrayList<EnhanceEntity>(result.size());
for (Object o : result)
{
... | [
"private",
"List",
"<",
"EnhanceEntity",
">",
"populateEnhanceEntities",
"(",
"EntityMetadata",
"m",
",",
"List",
"<",
"String",
">",
"relationNames",
",",
"List",
"result",
")",
"{",
"List",
"<",
"EnhanceEntity",
">",
"ls",
"=",
"null",
";",
"if",
"(",
"!... | Populate enhance entities.
@param m
the m
@param relationNames
the relation names
@param result
the result
@return the list | [
"Populate",
"enhance",
"entities",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java#L908-L930 |
xetorthio/jedis | src/main/java/redis/clients/jedis/BinaryJedis.java | BinaryJedis.hincrByFloat | @Override
public Double hincrByFloat(final byte[] key, final byte[] field, final double value) {
"""
Increment the number stored at field in the hash at key by a double precision floating point
value. If key does not exist, a new key holding a hash is created. If field does not exist or
holds a string, the val... | java | @Override
public Double hincrByFloat(final byte[] key, final byte[] field, final double value) {
checkIsInMultiOrPipeline();
client.hincrByFloat(key, field, value);
final String dval = client.getBulkReply();
return (dval != null ? new Double(dval) : null);
} | [
"@",
"Override",
"public",
"Double",
"hincrByFloat",
"(",
"final",
"byte",
"[",
"]",
"key",
",",
"final",
"byte",
"[",
"]",
"field",
",",
"final",
"double",
"value",
")",
"{",
"checkIsInMultiOrPipeline",
"(",
")",
";",
"client",
".",
"hincrByFloat",
"(",
... | Increment the number stored at field in the hash at key by a double precision floating point
value. If key does not exist, a new key holding a hash is created. If field does not exist or
holds a string, the value is set to 0 before applying the operation. Since the value argument
is signed you can use this command to p... | [
"Increment",
"the",
"number",
"stored",
"at",
"field",
"in",
"the",
"hash",
"at",
"key",
"by",
"a",
"double",
"precision",
"floating",
"point",
"value",
".",
"If",
"key",
"does",
"not",
"exist",
"a",
"new",
"key",
"holding",
"a",
"hash",
"is",
"created",... | train | https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1013-L1019 |
TakahikoKawasaki/nv-websocket-client | src/main/java/com/neovisionaries/ws/client/WebSocket.java | WebSocket.sendBinary | public WebSocket sendBinary(byte[] payload, boolean fin) {
"""
Send a binary frame to the server.
<p>
This method is an alias of {@link #sendFrame(WebSocketFrame)
sendFrame}{@code (WebSocketFrame.}{@link
WebSocketFrame#createBinaryFrame(byte[])
createBinaryFrame}{@code (payload).}{@link
WebSocketFrame#setF... | java | public WebSocket sendBinary(byte[] payload, boolean fin)
{
return sendFrame(WebSocketFrame.createBinaryFrame(payload).setFin(fin));
} | [
"public",
"WebSocket",
"sendBinary",
"(",
"byte",
"[",
"]",
"payload",
",",
"boolean",
"fin",
")",
"{",
"return",
"sendFrame",
"(",
"WebSocketFrame",
".",
"createBinaryFrame",
"(",
"payload",
")",
".",
"setFin",
"(",
"fin",
")",
")",
";",
"}"
] | Send a binary frame to the server.
<p>
This method is an alias of {@link #sendFrame(WebSocketFrame)
sendFrame}{@code (WebSocketFrame.}{@link
WebSocketFrame#createBinaryFrame(byte[])
createBinaryFrame}{@code (payload).}{@link
WebSocketFrame#setFin(boolean) setFin}{@code (fin))}.
</p>
@param payload
The payload of a bi... | [
"Send",
"a",
"binary",
"frame",
"to",
"the",
"server",
"."
] | train | https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/WebSocket.java#L3022-L3025 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/render/R.java | R.findComponentFormId | public static String findComponentFormId(FacesContext fc, UIComponent c) {
"""
Finds the Form Id of a component inside a form.
@param fc
FacesContext instance
@param c
UIComponent instance
@return
"""
UIComponent parent = c.getParent();
while (parent != null) {
if (parent instanceof UIForm) {
... | java | public static String findComponentFormId(FacesContext fc, UIComponent c) {
UIComponent parent = c.getParent();
while (parent != null) {
if (parent instanceof UIForm) {
return parent.getClientId(fc);
}
parent = parent.getParent();
}
return null;
} | [
"public",
"static",
"String",
"findComponentFormId",
"(",
"FacesContext",
"fc",
",",
"UIComponent",
"c",
")",
"{",
"UIComponent",
"parent",
"=",
"c",
".",
"getParent",
"(",
")",
";",
"while",
"(",
"parent",
"!=",
"null",
")",
"{",
"if",
"(",
"parent",
"i... | Finds the Form Id of a component inside a form.
@param fc
FacesContext instance
@param c
UIComponent instance
@return | [
"Finds",
"the",
"Form",
"Id",
"of",
"a",
"component",
"inside",
"a",
"form",
"."
] | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/render/R.java#L313-L323 |
threerings/narya | tools/src/main/java/com/threerings/presents/tools/GenTask.java | GenTask.wouldProduceSameFile | protected boolean wouldProduceSameFile (String generated, File existing)
throws IOException {
"""
Returns true if the given string has the same content as the file, sans svn prop lines.
"""
Iterator<String> generatedLines = Splitter.on(EOL).split(generated).iterator();
for (String prev ... | java | protected boolean wouldProduceSameFile (String generated, File existing)
throws IOException
{
Iterator<String> generatedLines = Splitter.on(EOL).split(generated).iterator();
for (String prev : Files.readLines(existing, UTF_8)) {
if (!generatedLines.hasNext()) {
re... | [
"protected",
"boolean",
"wouldProduceSameFile",
"(",
"String",
"generated",
",",
"File",
"existing",
")",
"throws",
"IOException",
"{",
"Iterator",
"<",
"String",
">",
"generatedLines",
"=",
"Splitter",
".",
"on",
"(",
"EOL",
")",
".",
"split",
"(",
"generated... | Returns true if the given string has the same content as the file, sans svn prop lines. | [
"Returns",
"true",
"if",
"the",
"given",
"string",
"has",
"the",
"same",
"content",
"as",
"the",
"file",
"sans",
"svn",
"prop",
"lines",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/tools/src/main/java/com/threerings/presents/tools/GenTask.java#L178-L198 |
google/closure-compiler | src/com/google/javascript/jscomp/MethodCompilerPass.java | MethodCompilerPass.addPossibleSignature | private void addPossibleSignature(String name, Node node, NodeTraversal t) {
"""
Adds a node that may represent a function signature (if it's a function
itself or the name of a function).
"""
if (node.isFunction()) {
// The node we're looking at is a function, so we can add it directly
addSign... | java | private void addPossibleSignature(String name, Node node, NodeTraversal t) {
if (node.isFunction()) {
// The node we're looking at is a function, so we can add it directly
addSignature(name, node, t.getSourceName());
} else {
nonMethodProperties.add(name);
}
} | [
"private",
"void",
"addPossibleSignature",
"(",
"String",
"name",
",",
"Node",
"node",
",",
"NodeTraversal",
"t",
")",
"{",
"if",
"(",
"node",
".",
"isFunction",
"(",
")",
")",
"{",
"// The node we're looking at is a function, so we can add it directly",
"addSignature... | Adds a node that may represent a function signature (if it's a function
itself or the name of a function). | [
"Adds",
"a",
"node",
"that",
"may",
"represent",
"a",
"function",
"signature",
"(",
"if",
"it",
"s",
"a",
"function",
"itself",
"or",
"the",
"name",
"of",
"a",
"function",
")",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/MethodCompilerPass.java#L95-L102 |
Waikato/moa | moa/src/main/java/moa/gui/visualization/GraphMultiCurve.java | GraphMultiCurve.paintFullCurve | private void paintFullCurve(Graphics g, int i) {
"""
Draws a single curve on the canvas.
@param g the Graphics context in which to paint
@param i index of the currently selected measure
"""
if (this.measures[i].getNumberOfValues(this.measureSelected) == 0) {
// no values of ... | java | private void paintFullCurve(Graphics g, int i){
if (this.measures[i].getNumberOfValues(this.measureSelected) == 0) {
// no values of this measure available
return;
}
g.setColor(this.colors[i]);
int height = getHeight();
// // compute ... | [
"private",
"void",
"paintFullCurve",
"(",
"Graphics",
"g",
",",
"int",
"i",
")",
"{",
"if",
"(",
"this",
".",
"measures",
"[",
"i",
"]",
".",
"getNumberOfValues",
"(",
"this",
".",
"measureSelected",
")",
"==",
"0",
")",
"{",
"// no values of this measure ... | Draws a single curve on the canvas.
@param g the Graphics context in which to paint
@param i index of the currently selected measure | [
"Draws",
"a",
"single",
"curve",
"on",
"the",
"canvas",
"."
] | train | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/gui/visualization/GraphMultiCurve.java#L85-L114 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.