repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 194 | func_name stringlengths 6 111 | whole_func_string stringlengths 80 3.8k | language stringclasses 1
value | func_code_string stringlengths 80 3.8k | func_code_tokens listlengths 20 697 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 434 | split_name stringclasses 1
value | func_code_url stringlengths 111 308 |
|---|---|---|---|---|---|---|---|---|---|---|
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java | AssertMessages.tooSmallArrayParameter | @Pure
public static String tooSmallArrayParameter(int parameterIndex, int currentSize, int expectedSize) {
return msg("A5", parameterIndex, currentSize, expectedSize); //$NON-NLS-1$
} | java | @Pure
public static String tooSmallArrayParameter(int parameterIndex, int currentSize, int expectedSize) {
return msg("A5", parameterIndex, currentSize, expectedSize); //$NON-NLS-1$
} | [
"@",
"Pure",
"public",
"static",
"String",
"tooSmallArrayParameter",
"(",
"int",
"parameterIndex",
",",
"int",
"currentSize",
",",
"int",
"expectedSize",
")",
"{",
"return",
"msg",
"(",
"\"A5\"",
",",
"parameterIndex",
",",
"currentSize",
",",
"expectedSize",
")... | Size of the array parameter is too small.
@param parameterIndex the index of the formal parameter.
@param currentSize current size of the array.
@param expectedSize expected size.
@return the error message. | [
"Size",
"of",
"the",
"array",
"parameter",
"is",
"too",
"small",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L316-L319 |
RestComm/sipunit | src/main/java/org/cafesip/sipunit/SipStack.java | SipStack.createSipPhone | public SipPhone createSipPhone(String host, String me) throws InvalidArgumentException,
ParseException {
return createSipPhone(host, PROTOCOL_UDP, DEFAULT_PORT, me);
} | java | public SipPhone createSipPhone(String host, String me) throws InvalidArgumentException,
ParseException {
return createSipPhone(host, PROTOCOL_UDP, DEFAULT_PORT, me);
} | [
"public",
"SipPhone",
"createSipPhone",
"(",
"String",
"host",
",",
"String",
"me",
")",
"throws",
"InvalidArgumentException",
",",
"ParseException",
"{",
"return",
"createSipPhone",
"(",
"host",
",",
"PROTOCOL_UDP",
",",
"DEFAULT_PORT",
",",
"me",
")",
";",
"}"... | This method is the equivalent to the other createSipPhone() method, but using the default
transport (UDP/IP) and the default SIP port number (5060).
@param host host name or address of the SIP proxy to use. The proxy is used for registering and
outbound calling on a per-call basis. If this parameter is a null value, a... | [
"This",
"method",
"is",
"the",
"equivalent",
"to",
"the",
"other",
"createSipPhone",
"()",
"method",
"but",
"using",
"the",
"default",
"transport",
"(",
"UDP",
"/",
"IP",
")",
"and",
"the",
"default",
"SIP",
"port",
"number",
"(",
"5060",
")",
"."
] | train | https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipStack.java#L303-L306 |
wcm-io/wcm-io-wcm | commons/src/main/java/io/wcm/wcm/commons/caching/ModificationDate.java | ModificationDate.get | @SuppressWarnings("null")
public static @Nullable Date get(@Nullable Resource resource) {
if (resource == null) {
return null;
}
ValueMap resourceProperties = resource.getValueMap();
// get the cq:lastModified property from the resource (used in jcr:content nodes of cq pages)
Date cqModifie... | java | @SuppressWarnings("null")
public static @Nullable Date get(@Nullable Resource resource) {
if (resource == null) {
return null;
}
ValueMap resourceProperties = resource.getValueMap();
// get the cq:lastModified property from the resource (used in jcr:content nodes of cq pages)
Date cqModifie... | [
"@",
"SuppressWarnings",
"(",
"\"null\"",
")",
"public",
"static",
"@",
"Nullable",
"Date",
"get",
"(",
"@",
"Nullable",
"Resource",
"resource",
")",
"{",
"if",
"(",
"resource",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"ValueMap",
"resourcePrope... | Looks for either jcr:lastModified or cq:lastModified property in the given resource, which can be either the jcr:content-ode of a cq-page, or a rendition
node
@param resource a resource with a cq:lastModified property *and/or* a file/jcr:content subnode with a jcr:lastModified property
@return the date or null if last ... | [
"Looks",
"for",
"either",
"jcr",
":",
"lastModified",
"or",
"cq",
":",
"lastModified",
"property",
"in",
"the",
"given",
"resource",
"which",
"can",
"be",
"either",
"the",
"jcr",
":",
"content",
"-",
"ode",
"of",
"a",
"cq",
"-",
"page",
"or",
"a",
"ren... | train | https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/caching/ModificationDate.java#L69-L84 |
aws/aws-sdk-java | aws-java-sdk-sqs/src/main/java/com/amazonaws/services/sqs/model/Message.java | Message.getMessageAttributes | public java.util.Map<String, MessageAttributeValue> getMessageAttributes() {
if (messageAttributes == null) {
messageAttributes = new com.amazonaws.internal.SdkInternalMap<String, MessageAttributeValue>();
}
return messageAttributes;
} | java | public java.util.Map<String, MessageAttributeValue> getMessageAttributes() {
if (messageAttributes == null) {
messageAttributes = new com.amazonaws.internal.SdkInternalMap<String, MessageAttributeValue>();
}
return messageAttributes;
} | [
"public",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"MessageAttributeValue",
">",
"getMessageAttributes",
"(",
")",
"{",
"if",
"(",
"messageAttributes",
"==",
"null",
")",
"{",
"messageAttributes",
"=",
"new",
"com",
".",
"amazonaws",
".",
"intern... | <p>
Each message attribute consists of a <code>Name</code>, <code>Type</code>, and <code>Value</code>. For more
information, see <a
href="http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html"
>Amazon SQS Message Attributes</a> in the <i>Amazon Simple Queue Service Develo... | [
"<p",
">",
"Each",
"message",
"attribute",
"consists",
"of",
"a",
"<code",
">",
"Name<",
"/",
"code",
">",
"<code",
">",
"Type<",
"/",
"code",
">",
"and",
"<code",
">",
"Value<",
"/",
"code",
">",
".",
"For",
"more",
"information",
"see",
"<a",
"href... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sqs/src/main/java/com/amazonaws/services/sqs/model/Message.java#L674-L679 |
kuali/kc-s2sgen | coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRBudget10V1_3Generator.java | RRBudget10V1_3Generator.setBudgetYearDataType | private void setBudgetYearDataType(RRBudget1013 rrBudget,BudgetPeriodDto periodInfo) {
BudgetYearDataType budgetYear = rrBudget.addNewBudgetYear();
if (periodInfo != null) {
budgetYear.setBudgetPeriodStartDate(s2SDateTimeService.convertDateToCalendar(periodInfo.getStartDate()));
... | java | private void setBudgetYearDataType(RRBudget1013 rrBudget,BudgetPeriodDto periodInfo) {
BudgetYearDataType budgetYear = rrBudget.addNewBudgetYear();
if (periodInfo != null) {
budgetYear.setBudgetPeriodStartDate(s2SDateTimeService.convertDateToCalendar(periodInfo.getStartDate()));
... | [
"private",
"void",
"setBudgetYearDataType",
"(",
"RRBudget1013",
"rrBudget",
",",
"BudgetPeriodDto",
"periodInfo",
")",
"{",
"BudgetYearDataType",
"budgetYear",
"=",
"rrBudget",
".",
"addNewBudgetYear",
"(",
")",
";",
"if",
"(",
"periodInfo",
"!=",
"null",
")",
"{... | This method gets BudgetYearDataType details like
BudgetPeriodStartDate,BudgetPeriodEndDate,BudgetPeriod
KeyPersons,OtherPersonnel,TotalCompensation,Equipment,ParticipantTraineeSupportCosts,Travel,OtherDirectCosts
DirectCosts,IndirectCosts,CognizantFederalAgency,TotalCosts based on
BudgetPeriodInfo for the RRBudget1013.... | [
"This",
"method",
"gets",
"BudgetYearDataType",
"details",
"like",
"BudgetPeriodStartDate",
"BudgetPeriodEndDate",
"BudgetPeriod",
"KeyPersons",
"OtherPersonnel",
"TotalCompensation",
"Equipment",
"ParticipantTraineeSupportCosts",
"Travel",
"OtherDirectCosts",
"DirectCosts",
"Indir... | train | https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRBudget10V1_3Generator.java#L149-L179 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/spider/ShardCache.java | ShardCache.addShardStart | private void addShardStart(TableDefinition tableDef, int shardNumber, Date shardDate) {
SpiderTransaction spiderTran = new SpiderTransaction();
spiderTran.addShardStart(tableDef, shardNumber, shardDate);
Tenant tenant = Tenant.getTenant(tableDef);
DBTransaction dbTran = DBService.ins... | java | private void addShardStart(TableDefinition tableDef, int shardNumber, Date shardDate) {
SpiderTransaction spiderTran = new SpiderTransaction();
spiderTran.addShardStart(tableDef, shardNumber, shardDate);
Tenant tenant = Tenant.getTenant(tableDef);
DBTransaction dbTran = DBService.ins... | [
"private",
"void",
"addShardStart",
"(",
"TableDefinition",
"tableDef",
",",
"int",
"shardNumber",
",",
"Date",
"shardDate",
")",
"{",
"SpiderTransaction",
"spiderTran",
"=",
"new",
"SpiderTransaction",
"(",
")",
";",
"spiderTran",
".",
"addShardStart",
"(",
"tabl... | Create a local transaction to add the register the given shard, then cache it. | [
"Create",
"a",
"local",
"transaction",
"to",
"add",
"the",
"register",
"the",
"given",
"shard",
"then",
"cache",
"it",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ShardCache.java#L142-L152 |
hibernate/hibernate-ogm | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/configuration/impl/InfinispanConfiguration.java | InfinispanConfiguration.initConfiguration | public void initConfiguration(Map<?, ?> configurationMap) {
ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationMap );
this.configUrl = propertyReader
.property( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, URL.class )
.withDefault( InfinispanConfiguration.class.... | java | public void initConfiguration(Map<?, ?> configurationMap) {
ConfigurationPropertyReader propertyReader = new ConfigurationPropertyReader( configurationMap );
this.configUrl = propertyReader
.property( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, URL.class )
.withDefault( InfinispanConfiguration.class.... | [
"public",
"void",
"initConfiguration",
"(",
"Map",
"<",
"?",
",",
"?",
">",
"configurationMap",
")",
"{",
"ConfigurationPropertyReader",
"propertyReader",
"=",
"new",
"ConfigurationPropertyReader",
"(",
"configurationMap",
")",
";",
"this",
".",
"configUrl",
"=",
... | Initialize the internal values form the given {@link Map}.
@param configurationMap
The values to use as configuration | [
"Initialize",
"the",
"internal",
"values",
"form",
"the",
"given",
"{",
"@link",
"Map",
"}",
"."
] | train | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/configuration/impl/InfinispanConfiguration.java#L59-L72 |
JodaOrg/joda-money | src/main/java/org/joda/money/BigMoney.java | BigMoney.ofMinor | public static BigMoney ofMinor(CurrencyUnit currency, long amountMinor) {
MoneyUtils.checkNotNull(currency, "CurrencyUnit must not be null");
return BigMoney.of(currency, BigDecimal.valueOf(amountMinor, currency.getDecimalPlaces()));
} | java | public static BigMoney ofMinor(CurrencyUnit currency, long amountMinor) {
MoneyUtils.checkNotNull(currency, "CurrencyUnit must not be null");
return BigMoney.of(currency, BigDecimal.valueOf(amountMinor, currency.getDecimalPlaces()));
} | [
"public",
"static",
"BigMoney",
"ofMinor",
"(",
"CurrencyUnit",
"currency",
",",
"long",
"amountMinor",
")",
"{",
"MoneyUtils",
".",
"checkNotNull",
"(",
"currency",
",",
"\"CurrencyUnit must not be null\"",
")",
";",
"return",
"BigMoney",
".",
"of",
"(",
"currenc... | Obtains an instance of {@code BigMoney} from an amount in minor units.
<p>
This allows you to create an instance with a specific currency and amount
expressed in terms of the minor unit.
The scale of the money will be that of the currency, such as 2 for USD or 0 for JPY.
<p>
For example, if constructing US Dollars, the... | [
"Obtains",
"an",
"instance",
"of",
"{",
"@code",
"BigMoney",
"}",
"from",
"an",
"amount",
"in",
"minor",
"units",
".",
"<p",
">",
"This",
"allows",
"you",
"to",
"create",
"an",
"instance",
"with",
"a",
"specific",
"currency",
"and",
"amount",
"expressed",
... | train | https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L213-L216 |
Red5/red5-io | src/main/java/org/red5/io/object/Serializer.java | Serializer.writeIterator | protected static void writeIterator(Output out, Iterator<Object> it) {
log.trace("writeIterator");
// Create LinkedList of collection we iterate thru and write it out later
LinkedList<Object> list = new LinkedList<Object>();
while (it.hasNext()) {
list.addLast(it.next());
... | java | protected static void writeIterator(Output out, Iterator<Object> it) {
log.trace("writeIterator");
// Create LinkedList of collection we iterate thru and write it out later
LinkedList<Object> list = new LinkedList<Object>();
while (it.hasNext()) {
list.addLast(it.next());
... | [
"protected",
"static",
"void",
"writeIterator",
"(",
"Output",
"out",
",",
"Iterator",
"<",
"Object",
">",
"it",
")",
"{",
"log",
".",
"trace",
"(",
"\"writeIterator\"",
")",
";",
"// Create LinkedList of collection we iterate thru and write it out later",
"LinkedList",... | Writes an iterator out to the output
@param out
Output writer
@param it
Iterator to write | [
"Writes",
"an",
"iterator",
"out",
"to",
"the",
"output"
] | train | https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/object/Serializer.java#L278-L287 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLSchemaManager.java | CQLSchemaManager.createCQLTable | public void createCQLTable(String storeName, boolean bBinaryValues) {
String tableName = CQLService.storeToCQLName(storeName);
m_logger.info("Creating CQL table {}", tableName);
StringBuffer cql = new StringBuffer();
cql.append("CREATE TABLE ");
cql.append(qualifiedTable... | java | public void createCQLTable(String storeName, boolean bBinaryValues) {
String tableName = CQLService.storeToCQLName(storeName);
m_logger.info("Creating CQL table {}", tableName);
StringBuffer cql = new StringBuffer();
cql.append("CREATE TABLE ");
cql.append(qualifiedTable... | [
"public",
"void",
"createCQLTable",
"(",
"String",
"storeName",
",",
"boolean",
"bBinaryValues",
")",
"{",
"String",
"tableName",
"=",
"CQLService",
".",
"storeToCQLName",
"(",
"storeName",
")",
";",
"m_logger",
".",
"info",
"(",
"\"Creating CQL table {}\"",
",",
... | Create a CQL table with the given name. For backward compatibility with the
Thrift API, all tables look like this:
<pre>
CREATE TABLE "<i>keyspace</i>"."<i>name</i>" (
key text,
column1 text,
value text, // or blob based on bBinaryValues
PRIMARY KEY(key, column1)
) WITH COMPACT STORAGE [WITH <i>prop</i> AND <i>... | [
"Create",
"a",
"CQL",
"table",
"with",
"the",
"given",
"name",
".",
"For",
"backward",
"compatibility",
"with",
"the",
"Thrift",
"API",
"all",
"tables",
"look",
"like",
"this",
":",
"<pre",
">",
"CREATE",
"TABLE",
"<i",
">",
"keyspace<",
"/",
"i",
">",
... | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLSchemaManager.java#L127-L144 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java | CommonOps_DDF6.addEquals | public static void addEquals( DMatrix6x6 a , DMatrix6x6 b ) {
a.a11 += b.a11;
a.a12 += b.a12;
a.a13 += b.a13;
a.a14 += b.a14;
a.a15 += b.a15;
a.a16 += b.a16;
a.a21 += b.a21;
a.a22 += b.a22;
a.a23 += b.a23;
a.a24 += b.a24;
a.a25 += b... | java | public static void addEquals( DMatrix6x6 a , DMatrix6x6 b ) {
a.a11 += b.a11;
a.a12 += b.a12;
a.a13 += b.a13;
a.a14 += b.a14;
a.a15 += b.a15;
a.a16 += b.a16;
a.a21 += b.a21;
a.a22 += b.a22;
a.a23 += b.a23;
a.a24 += b.a24;
a.a25 += b... | [
"public",
"static",
"void",
"addEquals",
"(",
"DMatrix6x6",
"a",
",",
"DMatrix6x6",
"b",
")",
"{",
"a",
".",
"a11",
"+=",
"b",
".",
"a11",
";",
"a",
".",
"a12",
"+=",
"b",
".",
"a12",
";",
"a",
".",
"a13",
"+=",
"b",
".",
"a13",
";",
"a",
"."... | <p>Performs the following operation:<br>
<br>
a = a + b <br>
a<sub>ij</sub> = a<sub>ij</sub> + b<sub>ij</sub> <br>
</p>
@param a A Matrix. Modified.
@param b A Matrix. Not modified. | [
"<p",
">",
"Performs",
"the",
"following",
"operation",
":",
"<br",
">",
"<br",
">",
"a",
"=",
"a",
"+",
"b",
"<br",
">",
"a<sub",
">",
"ij<",
"/",
"sub",
">",
"=",
"a<sub",
">",
"ij<",
"/",
"sub",
">",
"+",
"b<sub",
">",
"ij<",
"/",
"sub",
"... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF6.java#L120-L157 |
CleverTap/clevertap-android-sdk | clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java | CleverTapAPI.changeCredentials | @SuppressWarnings("unused")
public static void changeCredentials(String accountID, String token) {
changeCredentials(accountID, token, null);
} | java | @SuppressWarnings("unused")
public static void changeCredentials(String accountID, String token) {
changeCredentials(accountID, token, null);
} | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"public",
"static",
"void",
"changeCredentials",
"(",
"String",
"accountID",
",",
"String",
"token",
")",
"{",
"changeCredentials",
"(",
"accountID",
",",
"token",
",",
"null",
")",
";",
"}"
] | This method is used to change the credentials of CleverTap account Id and token programmatically
@param accountID CleverTap Account Id
@param token CleverTap Account Token | [
"This",
"method",
"is",
"used",
"to",
"change",
"the",
"credentials",
"of",
"CleverTap",
"account",
"Id",
"and",
"token",
"programmatically"
] | train | https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L5972-L5975 |
alkacon/opencms-core | src/org/opencms/ade/containerpage/CmsElementUtil.java | CmsElementUtil.hasSettings | private boolean hasSettings(CmsObject cms, CmsResource resource) throws CmsException {
if (!CmsResourceTypeXmlContent.isXmlContent(resource)) {
return false;
}
CmsFormatterConfiguration formatters = getConfigData().getFormatters(m_cms, resource);
boolean result = (formatter... | java | private boolean hasSettings(CmsObject cms, CmsResource resource) throws CmsException {
if (!CmsResourceTypeXmlContent.isXmlContent(resource)) {
return false;
}
CmsFormatterConfiguration formatters = getConfigData().getFormatters(m_cms, resource);
boolean result = (formatter... | [
"private",
"boolean",
"hasSettings",
"(",
"CmsObject",
"cms",
",",
"CmsResource",
"resource",
")",
"throws",
"CmsException",
"{",
"if",
"(",
"!",
"CmsResourceTypeXmlContent",
".",
"isXmlContent",
"(",
"resource",
")",
")",
"{",
"return",
"false",
";",
"}",
"Cm... | Helper method for checking whether there are properties defined for a given content element.<p>
@param cms the CmsObject to use for VFS operations
@param resource the resource for which it should be checked whether it has properties
@return true if the resource has properties defined
@throws CmsException if somethin... | [
"Helper",
"method",
"for",
"checking",
"whether",
"there",
"are",
"properties",
"defined",
"for",
"a",
"given",
"content",
"element",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsElementUtil.java#L1092-L1106 |
Cornutum/tcases | tcases-lib/src/main/java/org/cornutum/tcases/generator/GeneratorSet.java | GeneratorSet.addGenerator | public void addGenerator( String functionName, ITestCaseGenerator generator)
{
String functionKey = getFunctionKey( functionName);
if( generators_.containsKey( functionKey))
{
throw new IllegalArgumentException( "Generator already defined for function=" + functionName);
}
if( generato... | java | public void addGenerator( String functionName, ITestCaseGenerator generator)
{
String functionKey = getFunctionKey( functionName);
if( generators_.containsKey( functionKey))
{
throw new IllegalArgumentException( "Generator already defined for function=" + functionName);
}
if( generato... | [
"public",
"void",
"addGenerator",
"(",
"String",
"functionName",
",",
"ITestCaseGenerator",
"generator",
")",
"{",
"String",
"functionKey",
"=",
"getFunctionKey",
"(",
"functionName",
")",
";",
"if",
"(",
"generators_",
".",
"containsKey",
"(",
"functionKey",
")",... | Adds a new test case generator for the given system function. | [
"Adds",
"a",
"new",
"test",
"case",
"generator",
"for",
"the",
"given",
"system",
"function",
"."
] | train | https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/GeneratorSet.java#L57-L69 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java | XMLUtil.toColor | @Pure
public static String toColor(int red, int green, int blue, int alpha) {
return toColor(encodeRgbaColor(red, green, blue, alpha));
} | java | @Pure
public static String toColor(int red, int green, int blue, int alpha) {
return toColor(encodeRgbaColor(red, green, blue, alpha));
} | [
"@",
"Pure",
"public",
"static",
"String",
"toColor",
"(",
"int",
"red",
",",
"int",
"green",
",",
"int",
"blue",
",",
"int",
"alpha",
")",
"{",
"return",
"toColor",
"(",
"encodeRgbaColor",
"(",
"red",
",",
"green",
",",
"blue",
",",
"alpha",
")",
")... | Replies an XML/HTML color.
@param red the red component.
@param green the green component.
@param blue the blue component.
@param alpha the alpha component.
@return the XML color encoding.
@see #parseColor(String) | [
"Replies",
"an",
"XML",
"/",
"HTML",
"color",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2239-L2242 |
Azure/azure-sdk-for-java | streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java | StreamingJobsInner.beginCreateOrReplace | public StreamingJobInner beginCreateOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) {
return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().single().body();
} | java | public StreamingJobInner beginCreateOrReplace(String resourceGroupName, String jobName, StreamingJobInner streamingJob) {
return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob).toBlocking().single().body();
} | [
"public",
"StreamingJobInner",
"beginCreateOrReplace",
"(",
"String",
"resourceGroupName",
",",
"String",
"jobName",
",",
"StreamingJobInner",
"streamingJob",
")",
"{",
"return",
"beginCreateOrReplaceWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"jobName",
",",
... | Creates a streaming job or replaces an already existing streaming job.
@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 jobName The name of the streaming job.
@param streamingJob The definition of the... | [
"Creates",
"a",
"streaming",
"job",
"or",
"replaces",
"an",
"already",
"existing",
"streaming",
"job",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java#L306-L308 |
korpling/ANNIS | annis-visualizers/src/main/java/annis/visualizers/component/rst/RSTImpl.java | RSTImpl.setSentenceSpan | private void setSentenceSpan(JSONObject cNode, JSONObject parent) {
try {
JSONObject data = cNode.getJSONObject("data");
int leftPosC = data.getInt(SENTENCE_LEFT);
int rightPosC = data.getInt(SENTENCE_RIGHT);
data = parent.getJSONObject("data");
if (data.has(SENTENCE_LEFT)) {
... | java | private void setSentenceSpan(JSONObject cNode, JSONObject parent) {
try {
JSONObject data = cNode.getJSONObject("data");
int leftPosC = data.getInt(SENTENCE_LEFT);
int rightPosC = data.getInt(SENTENCE_RIGHT);
data = parent.getJSONObject("data");
if (data.has(SENTENCE_LEFT)) {
... | [
"private",
"void",
"setSentenceSpan",
"(",
"JSONObject",
"cNode",
",",
"JSONObject",
"parent",
")",
"{",
"try",
"{",
"JSONObject",
"data",
"=",
"cNode",
".",
"getJSONObject",
"(",
"\"data\"",
")",
";",
"int",
"leftPosC",
"=",
"data",
".",
"getInt",
"(",
"S... | Sets the sentence_left and sentence_right properties of the data object of
parent to the min/max of the currNode. | [
"Sets",
"the",
"sentence_left",
"and",
"sentence_right",
"properties",
"of",
"the",
"data",
"object",
"of",
"parent",
"to",
"the",
"min",
"/",
"max",
"of",
"the",
"currNode",
"."
] | train | https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-visualizers/src/main/java/annis/visualizers/component/rst/RSTImpl.java#L642-L666 |
alkacon/opencms-core | src/org/opencms/main/OpenCmsCore.java | OpenCmsCore.initCmsContextForUI | protected void initCmsContextForUI(HttpServletRequest req, HttpServletResponse res, CmsUIServlet servlet)
throws IOException, CmsException {
// instantiate CMS context
String originalEncoding = req.getCharacterEncoding();
String referrer = req.getHeader("referer");
boolean allowPriv... | java | protected void initCmsContextForUI(HttpServletRequest req, HttpServletResponse res, CmsUIServlet servlet)
throws IOException, CmsException {
// instantiate CMS context
String originalEncoding = req.getCharacterEncoding();
String referrer = req.getHeader("referer");
boolean allowPriv... | [
"protected",
"void",
"initCmsContextForUI",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"res",
",",
"CmsUIServlet",
"servlet",
")",
"throws",
"IOException",
",",
"CmsException",
"{",
"// instantiate CMS context",
"String",
"originalEncoding",
"=",
"req",... | Initializes the OpenCms context for Vaadin UI servlet.<p>
@param req the request
@param res the response
@param servlet the UI servlet
@throws IOException if user authentication fails
@throws CmsException if something goes wrong | [
"Initializes",
"the",
"OpenCms",
"context",
"for",
"Vaadin",
"UI",
"servlet",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCmsCore.java#L981-L995 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java | ClassDescriptor.getFieldDescriptorForPath | public FieldDescriptor getFieldDescriptorForPath(String aPath, Map pathHints)
{
ArrayList desc = getAttributeDescriptorsForPath(aPath, pathHints);
FieldDescriptor fld = null;
Object temp;
if (!desc.isEmpty())
{
temp = desc.get(desc.size() - 1);
... | java | public FieldDescriptor getFieldDescriptorForPath(String aPath, Map pathHints)
{
ArrayList desc = getAttributeDescriptorsForPath(aPath, pathHints);
FieldDescriptor fld = null;
Object temp;
if (!desc.isEmpty())
{
temp = desc.get(desc.size() - 1);
... | [
"public",
"FieldDescriptor",
"getFieldDescriptorForPath",
"(",
"String",
"aPath",
",",
"Map",
"pathHints",
")",
"{",
"ArrayList",
"desc",
"=",
"getAttributeDescriptorsForPath",
"(",
"aPath",
",",
"pathHints",
")",
";",
"FieldDescriptor",
"fld",
"=",
"null",
";",
"... | return the FieldDescriptor for the Attribute referenced in the path<br>
the path may contain simple attribut names, functions and path expressions
using relationships <br>
ie: name, avg(price), adress.street
@param aPath the path to the attribute
@param pathHints a Map containing the class to be used for a segment or <... | [
"return",
"the",
"FieldDescriptor",
"for",
"the",
"Attribute",
"referenced",
"in",
"the",
"path<br",
">",
"the",
"path",
"may",
"contain",
"simple",
"attribut",
"names",
"functions",
"and",
"path",
"expressions",
"using",
"relationships",
"<br",
">",
"ie",
":",
... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java#L839-L854 |
Bedework/bw-util | bw-util-xml/src/main/java/org/bedework/util/xml/XmlEmit.java | XmlEmit.property | public void property(final QName tag, final Reader val) throws IOException {
blanks();
openTagSameLine(tag);
writeContent(val, wtr);
closeTagSameLine(tag);
newline();
} | java | public void property(final QName tag, final Reader val) throws IOException {
blanks();
openTagSameLine(tag);
writeContent(val, wtr);
closeTagSameLine(tag);
newline();
} | [
"public",
"void",
"property",
"(",
"final",
"QName",
"tag",
",",
"final",
"Reader",
"val",
")",
"throws",
"IOException",
"{",
"blanks",
"(",
")",
";",
"openTagSameLine",
"(",
"tag",
")",
";",
"writeContent",
"(",
"val",
",",
"wtr",
")",
";",
"closeTagSam... | Create the sequence<br>
<tag>val</tag> where val is represented by a Reader
@param tag
@param val
@throws IOException | [
"Create",
"the",
"sequence<br",
">",
"<tag",
">",
"val<",
"/",
"tag",
">",
"where",
"val",
"is",
"represented",
"by",
"a",
"Reader"
] | train | https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-xml/src/main/java/org/bedework/util/xml/XmlEmit.java#L467-L473 |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/style/stylers/AbstractFieldStyler.java | AbstractFieldStyler.makeField | @Override
public PdfFormField makeField() throws IOException, DocumentException, VectorPrintException {
switch (getFieldtype()) {
case TEXT:
return ((TextField) bf).getTextField();
case COMBO:
return ((TextField) bf).getComboField();
case LIST:
re... | java | @Override
public PdfFormField makeField() throws IOException, DocumentException, VectorPrintException {
switch (getFieldtype()) {
case TEXT:
return ((TextField) bf).getTextField();
case COMBO:
return ((TextField) bf).getComboField();
case LIST:
re... | [
"@",
"Override",
"public",
"PdfFormField",
"makeField",
"(",
")",
"throws",
"IOException",
",",
"DocumentException",
",",
"VectorPrintException",
"{",
"switch",
"(",
"getFieldtype",
"(",
")",
")",
"{",
"case",
"TEXT",
":",
"return",
"(",
"(",
"TextField",
")",... | Create the PdfFormField that will be used to add a form field to the pdf.
@return
@throws IOException
@throws DocumentException
@throws VectorPrintException | [
"Create",
"the",
"PdfFormField",
"that",
"will",
"be",
"used",
"to",
"add",
"a",
"form",
"field",
"to",
"the",
"pdf",
"."
] | train | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/stylers/AbstractFieldStyler.java#L222-L240 |
openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java | FXMLProcessor.loadFxmlPaneAndControllerPair | public static <CONTROLLER extends AbstractFXController> Pair<Pane, CONTROLLER> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class<CONTROLLER> controllerClass, final Class clazz) throws CouldNotPerformException {
return loadFxmlPaneAndControllerPair(fxmlFileUri, controllerClass, clazz, null);
... | java | public static <CONTROLLER extends AbstractFXController> Pair<Pane, CONTROLLER> loadFxmlPaneAndControllerPair(final String fxmlFileUri, final Class<CONTROLLER> controllerClass, final Class clazz) throws CouldNotPerformException {
return loadFxmlPaneAndControllerPair(fxmlFileUri, controllerClass, clazz, null);
... | [
"public",
"static",
"<",
"CONTROLLER",
"extends",
"AbstractFXController",
">",
"Pair",
"<",
"Pane",
",",
"CONTROLLER",
">",
"loadFxmlPaneAndControllerPair",
"(",
"final",
"String",
"fxmlFileUri",
",",
"final",
"Class",
"<",
"CONTROLLER",
">",
"controllerClass",
",",... | Method load the pane and controller of the given fxml file.
@param fxmlFileUri the uri pointing to the fxml file within the classpath.
@param controllerClass the class of the controller.
@param clazz the responsible class which is used for class path resolution.
@param <CONTROLLER> the type of control... | [
"Method",
"load",
"the",
"pane",
"and",
"controller",
"of",
"the",
"given",
"fxml",
"file",
"."
] | train | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/fxml/FXMLProcessor.java#L152-L154 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.updateCertificateOperation | public CertificateOperation updateCertificateOperation(String vaultBaseUrl, String certificateName, boolean cancellationRequested) {
return updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl, certificateName, cancellationRequested).toBlocking().single().body();
} | java | public CertificateOperation updateCertificateOperation(String vaultBaseUrl, String certificateName, boolean cancellationRequested) {
return updateCertificateOperationWithServiceResponseAsync(vaultBaseUrl, certificateName, cancellationRequested).toBlocking().single().body();
} | [
"public",
"CertificateOperation",
"updateCertificateOperation",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"boolean",
"cancellationRequested",
")",
"{",
"return",
"updateCertificateOperationWithServiceResponseAsync",
"(",
"vaultBaseUrl",
",",
"certifi... | Updates a certificate operation.
Updates a certificate creation operation that is already in progress. This operation requires the certificates/update permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param certificateName The name of the certificate.
@param cancellationRequ... | [
"Updates",
"a",
"certificate",
"operation",
".",
"Updates",
"a",
"certificate",
"creation",
"operation",
"that",
"is",
"already",
"in",
"progress",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",
"update",
"permission",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7641-L7643 |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/parsing/CommonXml.java | CommonXml.writeInterfaces | protected void writeInterfaces(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
interfacesXml.writeInterfaces(writer, modelNode);
} | java | protected void writeInterfaces(final XMLExtendedStreamWriter writer, final ModelNode modelNode) throws XMLStreamException {
interfacesXml.writeInterfaces(writer, modelNode);
} | [
"protected",
"void",
"writeInterfaces",
"(",
"final",
"XMLExtendedStreamWriter",
"writer",
",",
"final",
"ModelNode",
"modelNode",
")",
"throws",
"XMLStreamException",
"{",
"interfacesXml",
".",
"writeInterfaces",
"(",
"writer",
",",
"modelNode",
")",
";",
"}"
] | Write the interfaces including the criteria elements.
@param writer the xml stream writer
@param modelNode the model
@throws XMLStreamException | [
"Write",
"the",
"interfaces",
"including",
"the",
"criteria",
"elements",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/parsing/CommonXml.java#L245-L247 |
Azure/azure-sdk-for-java | recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/SecurityPINsInner.java | SecurityPINsInner.getAsync | public Observable<TokenInformationInner> getAsync(String vaultName, String resourceGroupName) {
return getWithServiceResponseAsync(vaultName, resourceGroupName).map(new Func1<ServiceResponse<TokenInformationInner>, TokenInformationInner>() {
@Override
public TokenInformationInner call(Se... | java | public Observable<TokenInformationInner> getAsync(String vaultName, String resourceGroupName) {
return getWithServiceResponseAsync(vaultName, resourceGroupName).map(new Func1<ServiceResponse<TokenInformationInner>, TokenInformationInner>() {
@Override
public TokenInformationInner call(Se... | [
"public",
"Observable",
"<",
"TokenInformationInner",
">",
"getAsync",
"(",
"String",
"vaultName",
",",
"String",
"resourceGroupName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"vaultName",
",",
"resourceGroupName",
")",
".",
"map",
"(",
"new",
"Func1"... | Get the security PIN.
@param vaultName The name of the recovery services vault.
@param resourceGroupName The name of the resource group where the recovery services vault is present.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the TokenInformationInner object | [
"Get",
"the",
"security",
"PIN",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/SecurityPINsInner.java#L95-L102 |
dropwizard/dropwizard | dropwizard-auth/src/main/java/io/dropwizard/auth/basic/BasicCredentialAuthFilter.java | BasicCredentialAuthFilter.getCredentials | @Nullable
private BasicCredentials getCredentials(String header) {
if (header == null) {
return null;
}
final int space = header.indexOf(' ');
if (space <= 0) {
return null;
}
final String method = header.substring(0, space);
if (!pre... | java | @Nullable
private BasicCredentials getCredentials(String header) {
if (header == null) {
return null;
}
final int space = header.indexOf(' ');
if (space <= 0) {
return null;
}
final String method = header.substring(0, space);
if (!pre... | [
"@",
"Nullable",
"private",
"BasicCredentials",
"getCredentials",
"(",
"String",
"header",
")",
"{",
"if",
"(",
"header",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"space",
"=",
"header",
".",
"indexOf",
"(",
"'",
"'",
")",
";... | Parses a Base64-encoded value of the `Authorization` header
in the form of `Basic dXNlcm5hbWU6cGFzc3dvcmQ=`.
@param header the value of the `Authorization` header
@return a username and a password as {@link BasicCredentials} | [
"Parses",
"a",
"Base64",
"-",
"encoded",
"value",
"of",
"the",
"Authorization",
"header",
"in",
"the",
"form",
"of",
"Basic",
"dXNlcm5hbWU6cGFzc3dvcmQ",
"=",
"."
] | train | https://github.com/dropwizard/dropwizard/blob/7ee09a410476b9681e8072ab684788bb440877bd/dropwizard-auth/src/main/java/io/dropwizard/auth/basic/BasicCredentialAuthFilter.java#L40-L73 |
rhuss/jolokia | agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaServer.java | JolokiaServer.createHttpServer | private HttpServer createHttpServer(JolokiaServerConfig pConfig) throws IOException {
int port = pConfig.getPort();
InetAddress address = pConfig.getAddress();
InetSocketAddress socketAddress = new InetSocketAddress(address,port);
HttpServer server = pConfig.useHttps() ?
... | java | private HttpServer createHttpServer(JolokiaServerConfig pConfig) throws IOException {
int port = pConfig.getPort();
InetAddress address = pConfig.getAddress();
InetSocketAddress socketAddress = new InetSocketAddress(address,port);
HttpServer server = pConfig.useHttps() ?
... | [
"private",
"HttpServer",
"createHttpServer",
"(",
"JolokiaServerConfig",
"pConfig",
")",
"throws",
"IOException",
"{",
"int",
"port",
"=",
"pConfig",
".",
"getPort",
"(",
")",
";",
"InetAddress",
"address",
"=",
"pConfig",
".",
"getAddress",
"(",
")",
";",
"In... | Create the HttpServer to use. Can be overridden if a custom or already existing HttpServer should be
used
@return HttpServer to use
@throws IOException if something fails during the initialisation | [
"Create",
"the",
"HttpServer",
"to",
"use",
".",
"Can",
"be",
"overridden",
"if",
"a",
"custom",
"or",
"already",
"existing",
"HttpServer",
"should",
"be",
"used"
] | train | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaServer.java#L231-L255 |
milaboratory/milib | src/main/java/com/milaboratory/core/motif/BitapPattern.java | BitapPattern.substitutionOnlyMatcherFirst | public BitapMatcher substitutionOnlyMatcherFirst(int substitutions, final Sequence sequence) {
return substitutionOnlyMatcherFirst(substitutions, sequence, 0, sequence.size());
} | java | public BitapMatcher substitutionOnlyMatcherFirst(int substitutions, final Sequence sequence) {
return substitutionOnlyMatcherFirst(substitutions, sequence, 0, sequence.size());
} | [
"public",
"BitapMatcher",
"substitutionOnlyMatcherFirst",
"(",
"int",
"substitutions",
",",
"final",
"Sequence",
"sequence",
")",
"{",
"return",
"substitutionOnlyMatcherFirst",
"(",
"substitutions",
",",
"sequence",
",",
"0",
",",
"sequence",
".",
"size",
"(",
")",
... | Returns a BitapMatcher preforming a fuzzy search in a whole {@code sequence}. Search allows no more than {@code
substitutions} number of substitutions. Matcher will return positions of first matched letter in the motif in
ascending order.
@param substitutions maximal number of allowed substitutions
@param sequence ... | [
"Returns",
"a",
"BitapMatcher",
"preforming",
"a",
"fuzzy",
"search",
"in",
"a",
"whole",
"{",
"@code",
"sequence",
"}",
".",
"Search",
"allows",
"no",
"more",
"than",
"{",
"@code",
"substitutions",
"}",
"number",
"of",
"substitutions",
".",
"Matcher",
"will... | train | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/motif/BitapPattern.java#L100-L102 |
Azure/azure-sdk-for-java | labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java | EnvironmentSettingsInner.listAsync | public Observable<Page<EnvironmentSettingInner>> listAsync(final String resourceGroupName, final String labAccountName, final String labName) {
return listWithServiceResponseAsync(resourceGroupName, labAccountName, labName)
.map(new Func1<ServiceResponse<Page<EnvironmentSettingInner>>, Page<Environm... | java | public Observable<Page<EnvironmentSettingInner>> listAsync(final String resourceGroupName, final String labAccountName, final String labName) {
return listWithServiceResponseAsync(resourceGroupName, labAccountName, labName)
.map(new Func1<ServiceResponse<Page<EnvironmentSettingInner>>, Page<Environm... | [
"public",
"Observable",
"<",
"Page",
"<",
"EnvironmentSettingInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"labAccountName",
",",
"final",
"String",
"labName",
")",
"{",
"return",
"listWithServiceResponseAsync",
... | List environment setting in a given lab.
@param resourceGroupName The name of the resource group.
@param labAccountName The name of the lab Account.
@param labName The name of the lab.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<EnvironmentSettin... | [
"List",
"environment",
"setting",
"in",
"a",
"given",
"lab",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java#L178-L186 |
PistoiaHELM/HELM2NotationToolkit | src/main/java/org/helm/notation2/tools/RNAUtils.java | RNAUtils.getMaxMatchFragment | public static String getMaxMatchFragment(String seq1, String seq2) throws NotationException {
return getMaxMatchFragment(seq1, seq2, MINUMUM_MATCH_FRAGMENT_LENGTH);
} | java | public static String getMaxMatchFragment(String seq1, String seq2) throws NotationException {
return getMaxMatchFragment(seq1, seq2, MINUMUM_MATCH_FRAGMENT_LENGTH);
} | [
"public",
"static",
"String",
"getMaxMatchFragment",
"(",
"String",
"seq1",
",",
"String",
"seq2",
")",
"throws",
"NotationException",
"{",
"return",
"getMaxMatchFragment",
"(",
"seq1",
",",
"seq2",
",",
"MINUMUM_MATCH_FRAGMENT_LENGTH",
")",
";",
"}"
] | method to get the largest matched fragment between two sequences, replace
T with U before Match
@param seq1
single letter, all upper case nucleotide sequence
@param seq2
single letter, all upper case nucleotide sequence
@return maximal match fragment of seq1 and seq2
@throws NotationException
if the notation is not va... | [
"method",
"to",
"get",
"the",
"largest",
"matched",
"fragment",
"between",
"two",
"sequences",
"replace",
"T",
"with",
"U",
"before",
"Match"
] | train | https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/RNAUtils.java#L171-L173 |
elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java | DiSH.logClusterSizes | private void logClusterSizes(String m, int dimensionality, Object2ObjectOpenCustomHashMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
if(LOG.isVerbose()) {
final StringBuilder msg = new StringBuilder(1000).append(m).append('\n');
for(ObjectIterator<Object2ObjectMap.Entry<long[], List<ArrayModifia... | java | private void logClusterSizes(String m, int dimensionality, Object2ObjectOpenCustomHashMap<long[], List<ArrayModifiableDBIDs>> clustersMap) {
if(LOG.isVerbose()) {
final StringBuilder msg = new StringBuilder(1000).append(m).append('\n');
for(ObjectIterator<Object2ObjectMap.Entry<long[], List<ArrayModifia... | [
"private",
"void",
"logClusterSizes",
"(",
"String",
"m",
",",
"int",
"dimensionality",
",",
"Object2ObjectOpenCustomHashMap",
"<",
"long",
"[",
"]",
",",
"List",
"<",
"ArrayModifiableDBIDs",
">",
">",
"clustersMap",
")",
"{",
"if",
"(",
"LOG",
".",
"isVerbose... | Log cluster sizes in verbose mode.
@param m Log message
@param dimensionality Dimensionality
@param clustersMap Cluster map | [
"Log",
"cluster",
"sizes",
"in",
"verbose",
"mode",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L220-L233 |
jenkinsci/ghprb-plugin | src/main/java/org/jenkinsci/plugins/ghprb/upstream/GhprbUpstreamStatusListener.java | GhprbUpstreamStatusListener.onCompleted | @Override
public void onCompleted(AbstractBuild<?, ?> build, TaskListener listener) {
Map<String, String> envVars = returnEnvironmentVars(build, listener);
if (envVars == null) {
return;
}
try {
returnGhprbSimpleStatus(envVars).onBuildComplete(build, listener... | java | @Override
public void onCompleted(AbstractBuild<?, ?> build, TaskListener listener) {
Map<String, String> envVars = returnEnvironmentVars(build, listener);
if (envVars == null) {
return;
}
try {
returnGhprbSimpleStatus(envVars).onBuildComplete(build, listener... | [
"@",
"Override",
"public",
"void",
"onCompleted",
"(",
"AbstractBuild",
"<",
"?",
",",
"?",
">",
"build",
",",
"TaskListener",
"listener",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"envVars",
"=",
"returnEnvironmentVars",
"(",
"build",
",",
"list... | Sets the status to the build result when the job is done, and then calls the createCommitStatus method to send it to GitHub | [
"Sets",
"the",
"status",
"to",
"the",
"build",
"result",
"when",
"the",
"job",
"is",
"done",
"and",
"then",
"calls",
"the",
"createCommitStatus",
"method",
"to",
"send",
"it",
"to",
"GitHub"
] | train | https://github.com/jenkinsci/ghprb-plugin/blob/b972d3b94ebbe6d40542c2771407e297bff8430b/src/main/java/org/jenkinsci/plugins/ghprb/upstream/GhprbUpstreamStatusListener.java#L115-L127 |
sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java | SARLEclipsePlugin.createStatus | public IStatus createStatus(int severity, int code, String message) {
return createStatus(severity, code, message, null);
} | java | public IStatus createStatus(int severity, int code, String message) {
return createStatus(severity, code, message, null);
} | [
"public",
"IStatus",
"createStatus",
"(",
"int",
"severity",
",",
"int",
"code",
",",
"String",
"message",
")",
"{",
"return",
"createStatus",
"(",
"severity",
",",
"code",
",",
"message",
",",
"null",
")",
";",
"}"
] | Create a status.
@param severity the severity level, see {@link IStatus}.
@param code the code of the error.
@param message the message associated to the status.
@return the status. | [
"Create",
"a",
"status",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java#L229-L231 |
ops4j/org.ops4j.base | ops4j-base-io/src/main/java/org/ops4j/io/ZipExploder.java | ZipExploder.copyFileEntry | public void copyFileEntry(File destDir, ZipFile zf, ZipEntry ze) throws IOException {
BufferedInputStream dis = new BufferedInputStream(zf.getInputStream(ze));
try {
copyFileEntry(destDir, ze.isDirectory(), ze.getName(), dis);
} finally {
try {
dis.close()... | java | public void copyFileEntry(File destDir, ZipFile zf, ZipEntry ze) throws IOException {
BufferedInputStream dis = new BufferedInputStream(zf.getInputStream(ze));
try {
copyFileEntry(destDir, ze.isDirectory(), ze.getName(), dis);
} finally {
try {
dis.close()... | [
"public",
"void",
"copyFileEntry",
"(",
"File",
"destDir",
",",
"ZipFile",
"zf",
",",
"ZipEntry",
"ze",
")",
"throws",
"IOException",
"{",
"BufferedInputStream",
"dis",
"=",
"new",
"BufferedInputStream",
"(",
"zf",
".",
"getInputStream",
"(",
"ze",
")",
")",
... | copy a single entry from the archive
@param destDir
@param zf
@param ze
@throws IOException | [
"copy",
"a",
"single",
"entry",
"from",
"the",
"archive"
] | train | https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-io/src/main/java/org/ops4j/io/ZipExploder.java#L304-L314 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUData.java | ICUData.getRequiredStream | public static InputStream getRequiredStream(Class<?> root, String resourceName) {
return getStream(root, resourceName, true);
} | java | public static InputStream getRequiredStream(Class<?> root, String resourceName) {
return getStream(root, resourceName, true);
} | [
"public",
"static",
"InputStream",
"getRequiredStream",
"(",
"Class",
"<",
"?",
">",
"root",
",",
"String",
"resourceName",
")",
"{",
"return",
"getStream",
"(",
"root",
",",
"resourceName",
",",
"true",
")",
";",
"}"
] | Convenience method that calls getStream(root, resourceName, true).
@throws MissingResourceException if the resource could not be found | [
"Convenience",
"method",
"that",
"calls",
"getStream",
"(",
"root",
"resourceName",
"true",
")",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUData.java#L221-L223 |
undertow-io/undertow | core/src/main/java/io/undertow/websockets/core/protocol/version07/UTF8Checker.java | UTF8Checker.checkUTF8 | private void checkUTF8(ByteBuffer buf, int position, int length) throws UnsupportedEncodingException {
int limit = position + length;
for (int i = position; i < limit; i++) {
checkUTF8(buf.get(i));
}
} | java | private void checkUTF8(ByteBuffer buf, int position, int length) throws UnsupportedEncodingException {
int limit = position + length;
for (int i = position; i < limit; i++) {
checkUTF8(buf.get(i));
}
} | [
"private",
"void",
"checkUTF8",
"(",
"ByteBuffer",
"buf",
",",
"int",
"position",
",",
"int",
"length",
")",
"throws",
"UnsupportedEncodingException",
"{",
"int",
"limit",
"=",
"position",
"+",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"position",
";",
"... | Check if the given ByteBuffer contains non UTF-8 data.
@param buf the ByteBuffer to check
@param position the index in the {@link ByteBuffer} to start from
@param length the number of bytes to operate on
@throws UnsupportedEncodingException is thrown if non UTF-8 data is found | [
"Check",
"if",
"the",
"given",
"ByteBuffer",
"contains",
"non",
"UTF",
"-",
"8",
"data",
"."
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/protocol/version07/UTF8Checker.java#L78-L83 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java | AbstractJsonDeserializer.getIntParam | protected Integer getIntParam(String paramName, String errorMessage) throws IOException {
return getIntParam(paramName, errorMessage, (Map<String, Object>) inputParams.get());
} | java | protected Integer getIntParam(String paramName, String errorMessage) throws IOException {
return getIntParam(paramName, errorMessage, (Map<String, Object>) inputParams.get());
} | [
"protected",
"Integer",
"getIntParam",
"(",
"String",
"paramName",
",",
"String",
"errorMessage",
")",
"throws",
"IOException",
"{",
"return",
"getIntParam",
"(",
"paramName",
",",
"errorMessage",
",",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"input... | Convenience method for subclasses.
@param paramName the name of the parameter
@param errorMessage the errormessage to add to the exception if the param does not exist.
@return a stringparameter with given name. If it does not exist and the errormessage is provided,
an IOException is thrown with that message. if the... | [
"Convenience",
"method",
"for",
"subclasses",
"."
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java#L224-L226 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/qjournal/server/Journal.java | Journal.syncLog | File syncLog(RequestInfo reqInfo, final SegmentStateProto segment,
final URL url) throws IOException {
long startTxId = segment.getStartTxId();
long epoch = reqInfo.getEpoch();
return syncLog(epoch, segment.getStartTxId(), url, segment.toString(),
journalStorage.getSyncLogTemporaryFile(startTx... | java | File syncLog(RequestInfo reqInfo, final SegmentStateProto segment,
final URL url) throws IOException {
long startTxId = segment.getStartTxId();
long epoch = reqInfo.getEpoch();
return syncLog(epoch, segment.getStartTxId(), url, segment.toString(),
journalStorage.getSyncLogTemporaryFile(startTx... | [
"File",
"syncLog",
"(",
"RequestInfo",
"reqInfo",
",",
"final",
"SegmentStateProto",
"segment",
",",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"long",
"startTxId",
"=",
"segment",
".",
"getStartTxId",
"(",
")",
";",
"long",
"epoch",
"=",
"req... | Synchronize a log segment from another JournalNode. The log is
downloaded from the provided URL into a temporary location on disk,
which is named based on the current request's epoch.
@return the temporary location of the downloaded file | [
"Synchronize",
"a",
"log",
"segment",
"from",
"another",
"JournalNode",
".",
"The",
"log",
"is",
"downloaded",
"from",
"the",
"provided",
"URL",
"into",
"a",
"temporary",
"location",
"on",
"disk",
"which",
"is",
"named",
"based",
"on",
"the",
"current",
"req... | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/server/Journal.java#L1166-L1172 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/Solo.java | Solo.startScreenshotSequence | public void startScreenshotSequence(String name, int quality, int frameDelay, int maxFrames) {
if(config.commandLogging){
Log.d(config.commandLoggingTag, "startScreenshotSequence(\""+name+"\", "+quality+", "+frameDelay+", "+maxFrames+")");
}
screenshotTaker.startScreenshotSequence(name, quality, frameDelay,... | java | public void startScreenshotSequence(String name, int quality, int frameDelay, int maxFrames) {
if(config.commandLogging){
Log.d(config.commandLoggingTag, "startScreenshotSequence(\""+name+"\", "+quality+", "+frameDelay+", "+maxFrames+")");
}
screenshotTaker.startScreenshotSequence(name, quality, frameDelay,... | [
"public",
"void",
"startScreenshotSequence",
"(",
"String",
"name",
",",
"int",
"quality",
",",
"int",
"frameDelay",
",",
"int",
"maxFrames",
")",
"{",
"if",
"(",
"config",
".",
"commandLogging",
")",
"{",
"Log",
".",
"d",
"(",
"config",
".",
"commandLoggi... | Takes a screenshot sequence and saves the images with the specified name prefix in the {@link Config} objects save path (default set to: /sdcard/Robotium-Screenshots/).
The name prefix is appended with "_" + sequence_number for each image in the sequence,
where numbering starts at 0.
Requires write permission (androi... | [
"Takes",
"a",
"screenshot",
"sequence",
"and",
"saves",
"the",
"images",
"with",
"the",
"specified",
"name",
"prefix",
"in",
"the",
"{",
"@link",
"Config",
"}",
"objects",
"save",
"path",
"(",
"default",
"set",
"to",
":",
"/",
"sdcard",
"/",
"Robotium",
... | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L3934-L3940 |
jirkapinkas/jsitemapgenerator | src/main/java/cz/jiripinkas/jsitemapgenerator/AbstractSitemapGenerator.java | AbstractSitemapGenerator.saveSitemap | @Deprecated
public void saveSitemap(File file, String[] sitemap) throws IOException {
try(BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
for (String string : sitemap) {
writer.write(string);
}
}
} | java | @Deprecated
public void saveSitemap(File file, String[] sitemap) throws IOException {
try(BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
for (String string : sitemap) {
writer.write(string);
}
}
} | [
"@",
"Deprecated",
"public",
"void",
"saveSitemap",
"(",
"File",
"file",
",",
"String",
"[",
"]",
"sitemap",
")",
"throws",
"IOException",
"{",
"try",
"(",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",
"(",
"new",
"FileWriter",
"(",
"file",
")",
... | Save sitemap to output file
@param file
Output file
@param sitemap
Sitemap as array of Strings (created by constructSitemap()
method)
@throws IOException
when error
@deprecated Use {@link #toFile(Path)} instead | [
"Save",
"sitemap",
"to",
"output",
"file"
] | train | https://github.com/jirkapinkas/jsitemapgenerator/blob/42e1f57bd936e21fe9df642e722726e71f667442/src/main/java/cz/jiripinkas/jsitemapgenerator/AbstractSitemapGenerator.java#L115-L122 |
Bandwidth/java-bandwidth | src/main/java/com/bandwidth/sdk/model/AvailableNumber.java | AvailableNumber.searchLocal | public static List<AvailableNumber> searchLocal(final BandwidthClient client, final Map<String, Object>params)
throws Exception {
final String tollFreeUri = BandwidthConstants.AVAILABLE_NUMBERS_LOCAL_URI_PATH;
final JSONArray array = toJSONArray(client.get(tollFreeUri, ... | java | public static List<AvailableNumber> searchLocal(final BandwidthClient client, final Map<String, Object>params)
throws Exception {
final String tollFreeUri = BandwidthConstants.AVAILABLE_NUMBERS_LOCAL_URI_PATH;
final JSONArray array = toJSONArray(client.get(tollFreeUri, ... | [
"public",
"static",
"List",
"<",
"AvailableNumber",
">",
"searchLocal",
"(",
"final",
"BandwidthClient",
"client",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
")",
"throws",
"Exception",
"{",
"final",
"String",
"tollFreeUri",
"=",
"Bandwi... | Convenience factory method to return local numbers based on a given search criteria for a given client
@param client the client
@param params the params
@return the list
@throws IOException unexpected error. | [
"Convenience",
"factory",
"method",
"to",
"return",
"local",
"numbers",
"based",
"on",
"a",
"given",
"search",
"criteria",
"for",
"a",
"given",
"client"
] | train | https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/AvailableNumber.java#L114-L125 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/fs/FileSystem.java | FileSystem.create | public FSDataOutputStream create(Path f) throws IOException {
return create(f, CreateOptions.writeOptions(true, null));
} | java | public FSDataOutputStream create(Path f) throws IOException {
return create(f, CreateOptions.writeOptions(true, null));
} | [
"public",
"FSDataOutputStream",
"create",
"(",
"Path",
"f",
")",
"throws",
"IOException",
"{",
"return",
"create",
"(",
"f",
",",
"CreateOptions",
".",
"writeOptions",
"(",
"true",
",",
"null",
")",
")",
";",
"}"
] | Opens an FSDataOutputStream at the indicated Path.
Files are overwritten by default. | [
"Opens",
"an",
"FSDataOutputStream",
"at",
"the",
"indicated",
"Path",
".",
"Files",
"are",
"overwritten",
"by",
"default",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileSystem.java#L465-L467 |
Azure/azure-sdk-for-java | datamigration/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_03_31_preview/implementation/TasksInner.java | TasksInner.createOrUpdateAsync | public Observable<ProjectTaskInner> createOrUpdateAsync(String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) {
return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1<ServiceResponse<ProjectTaskInne... | java | public Observable<ProjectTaskInner> createOrUpdateAsync(String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters) {
return createOrUpdateWithServiceResponseAsync(groupName, serviceName, projectName, taskName, parameters).map(new Func1<ServiceResponse<ProjectTaskInne... | [
"public",
"Observable",
"<",
"ProjectTaskInner",
">",
"createOrUpdateAsync",
"(",
"String",
"groupName",
",",
"String",
"serviceName",
",",
"String",
"projectName",
",",
"String",
"taskName",
",",
"ProjectTaskInner",
"parameters",
")",
"{",
"return",
"createOrUpdateWi... | Create or update task.
The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an existing one.
@param groupName Name of the ... | [
"Create",
"or",
"update",
"task",
".",
"The",
"tasks",
"resource",
"is",
"a",
"nested",
"proxy",
"-",
"only",
"resource",
"representing",
"work",
"performed",
"by",
"a",
"DMS",
"instance",
".",
"The",
"PUT",
"method",
"creates",
"a",
"new",
"task",
"or",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2018_03_31_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_03_31_preview/implementation/TasksInner.java#L414-L421 |
alkacon/opencms-core | src/org/opencms/ui/login/CmsInactiveUserMessages.java | CmsInactiveUserMessages.getMessage | public static String getMessage(String key, Locale locale) {
ResourceBundle bundle = null;
try {
bundle = CmsResourceBundleLoader.getBundle("org.opencms.inactiveusers.custom", locale);
return bundle.getString(key);
} catch (MissingResourceException e) {
LOG.i... | java | public static String getMessage(String key, Locale locale) {
ResourceBundle bundle = null;
try {
bundle = CmsResourceBundleLoader.getBundle("org.opencms.inactiveusers.custom", locale);
return bundle.getString(key);
} catch (MissingResourceException e) {
LOG.i... | [
"public",
"static",
"String",
"getMessage",
"(",
"String",
"key",
",",
"Locale",
"locale",
")",
"{",
"ResourceBundle",
"bundle",
"=",
"null",
";",
"try",
"{",
"bundle",
"=",
"CmsResourceBundleLoader",
".",
"getBundle",
"(",
"\"org.opencms.inactiveusers.custom\"",
... | Gets the message for the given key and locale.<p>
@param key the key
@param locale the locale
@return the localized text | [
"Gets",
"the",
"message",
"for",
"the",
"given",
"key",
"and",
"locale",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsInactiveUserMessages.java#L69-L80 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java | QueryReferenceBroker.getCollectionByQuery | public Collection getCollectionByQuery(Query query, boolean lazy) throws PersistenceBrokerException
{
// thma: the following cast is safe because:
// 1. ManageableVector implements Collection (will be returned if lazy == false)
// 2. CollectionProxy implements Collection (will be returne... | java | public Collection getCollectionByQuery(Query query, boolean lazy) throws PersistenceBrokerException
{
// thma: the following cast is safe because:
// 1. ManageableVector implements Collection (will be returned if lazy == false)
// 2. CollectionProxy implements Collection (will be returne... | [
"public",
"Collection",
"getCollectionByQuery",
"(",
"Query",
"query",
",",
"boolean",
"lazy",
")",
"throws",
"PersistenceBrokerException",
"{",
"// thma: the following cast is safe because:\r",
"// 1. ManageableVector implements Collection (will be returned if lazy == false)\r",
"// 2... | retrieve a collection of itemClass Objects matching the Query query | [
"retrieve",
"a",
"collection",
"of",
"itemClass",
"Objects",
"matching",
"the",
"Query",
"query"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java#L284-L290 |
SQLDroid/SQLDroid | src/main/java/org/sqldroid/SQLiteDatabase.java | SQLiteDatabase.changedRowCount | public int changedRowCount () {
if ( getChangedRowCount == null ) {
try { // JNA/J2SE compatibility method.
getChangedRowCount = sqliteDatabase.getClass().getMethod("changedRowCount", (Class<?>[])null);
} catch ( Exception any ) {
try {
// Android
getChangedRowCount ... | java | public int changedRowCount () {
if ( getChangedRowCount == null ) {
try { // JNA/J2SE compatibility method.
getChangedRowCount = sqliteDatabase.getClass().getMethod("changedRowCount", (Class<?>[])null);
} catch ( Exception any ) {
try {
// Android
getChangedRowCount ... | [
"public",
"int",
"changedRowCount",
"(",
")",
"{",
"if",
"(",
"getChangedRowCount",
"==",
"null",
")",
"{",
"try",
"{",
"// JNA/J2SE compatibility method.",
"getChangedRowCount",
"=",
"sqliteDatabase",
".",
"getClass",
"(",
")",
".",
"getMethod",
"(",
"\"changedRo... | The count of changed rows. On JNA platforms, this is a call to sqlite3_changes
On Android, it's a convoluted call to a package-private method (or, if that fails, the
response is '1'. | [
"The",
"count",
"of",
"changed",
"rows",
".",
"On",
"JNA",
"platforms",
"this",
"is",
"a",
"call",
"to",
"sqlite3_changes",
"On",
"Android",
"it",
"s",
"a",
"convoluted",
"call",
"to",
"a",
"package",
"-",
"private",
"method",
"(",
"or",
"if",
"that",
... | train | https://github.com/SQLDroid/SQLDroid/blob/4fb38ee40338673cb0205044571e4379573762c4/src/main/java/org/sqldroid/SQLiteDatabase.java#L254-L276 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java | SeaGlassLookAndFeel.getPaintingInsets | public static Insets getPaintingInsets(SynthContext state, Insets insets) {
if (state.getRegion().isSubregion()) {
insets = state.getStyle().getInsets(state, insets);
} else {
insets = state.getComponent().getInsets(insets);
}
return insets;
} | java | public static Insets getPaintingInsets(SynthContext state, Insets insets) {
if (state.getRegion().isSubregion()) {
insets = state.getStyle().getInsets(state, insets);
} else {
insets = state.getComponent().getInsets(insets);
}
return insets;
} | [
"public",
"static",
"Insets",
"getPaintingInsets",
"(",
"SynthContext",
"state",
",",
"Insets",
"insets",
")",
"{",
"if",
"(",
"state",
".",
"getRegion",
"(",
")",
".",
"isSubregion",
"(",
")",
")",
"{",
"insets",
"=",
"state",
".",
"getStyle",
"(",
")",... | A convenience method to return where the foreground should be painted for
the Component identified by the passed in AbstractSynthContext.
@param state the SynthContext representing the current state.
@param insets an Insets object to be filled with the painting insets.
@return the insets object passed in and fille... | [
"A",
"convenience",
"method",
"to",
"return",
"where",
"the",
"foreground",
"should",
"be",
"painted",
"for",
"the",
"Component",
"identified",
"by",
"the",
"passed",
"in",
"AbstractSynthContext",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2522-L2530 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/script/Script.java | Script.getNumberOfBytesRequiredToSpend | public int getNumberOfBytesRequiredToSpend(@Nullable ECKey pubKey, @Nullable Script redeemScript) {
if (ScriptPattern.isP2SH(this)) {
// scriptSig: <sig> [sig] [sig...] <redeemscript>
checkArgument(redeemScript != null, "P2SH script requires redeemScript to be spent");
return... | java | public int getNumberOfBytesRequiredToSpend(@Nullable ECKey pubKey, @Nullable Script redeemScript) {
if (ScriptPattern.isP2SH(this)) {
// scriptSig: <sig> [sig] [sig...] <redeemscript>
checkArgument(redeemScript != null, "P2SH script requires redeemScript to be spent");
return... | [
"public",
"int",
"getNumberOfBytesRequiredToSpend",
"(",
"@",
"Nullable",
"ECKey",
"pubKey",
",",
"@",
"Nullable",
"Script",
"redeemScript",
")",
"{",
"if",
"(",
"ScriptPattern",
".",
"isP2SH",
"(",
"this",
")",
")",
"{",
"// scriptSig: <sig> [sig] [sig...] <redeems... | Returns number of bytes required to spend this script. It accepts optional ECKey and redeemScript that may
be required for certain types of script to estimate target size. | [
"Returns",
"number",
"of",
"bytes",
"required",
"to",
"spend",
"this",
"script",
".",
"It",
"accepts",
"optional",
"ECKey",
"and",
"redeemScript",
"that",
"may",
"be",
"required",
"for",
"certain",
"types",
"of",
"script",
"to",
"estimate",
"target",
"size",
... | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L611-L634 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java | JDBCStorableGenerator.getConnection | private LocalVariable getConnection(CodeBuilder b, LocalVariable capVar) {
b.loadLocal(capVar);
b.invokeInterface(TypeDesc.forClass(JDBCConnectionCapability.class),
"getConnection", TypeDesc.forClass(Connection.class), null);
LocalVariable conVar = b.createLocalVari... | java | private LocalVariable getConnection(CodeBuilder b, LocalVariable capVar) {
b.loadLocal(capVar);
b.invokeInterface(TypeDesc.forClass(JDBCConnectionCapability.class),
"getConnection", TypeDesc.forClass(Connection.class), null);
LocalVariable conVar = b.createLocalVari... | [
"private",
"LocalVariable",
"getConnection",
"(",
"CodeBuilder",
"b",
",",
"LocalVariable",
"capVar",
")",
"{",
"b",
".",
"loadLocal",
"(",
"capVar",
")",
";",
"b",
".",
"invokeInterface",
"(",
"TypeDesc",
".",
"forClass",
"(",
"JDBCConnectionCapability",
".",
... | Generates code to get connection from JDBCConnectionCapability and store
it in a local variable.
@param capVar reference to JDBCConnectionCapability | [
"Generates",
"code",
"to",
"get",
"connection",
"from",
"JDBCConnectionCapability",
"and",
"store",
"it",
"in",
"a",
"local",
"variable",
"."
] | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1363-L1370 |
before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.lesserThan | @ArgumentsChecked
@Throws(IllegalNotLesserThanException.class)
public static byte lesserThan(final byte expected, final byte check) {
if (expected <= check) {
throw new IllegalNotLesserThanException(check);
}
return check;
} | java | @ArgumentsChecked
@Throws(IllegalNotLesserThanException.class)
public static byte lesserThan(final byte expected, final byte check) {
if (expected <= check) {
throw new IllegalNotLesserThanException(check);
}
return check;
} | [
"@",
"ArgumentsChecked",
"@",
"Throws",
"(",
"IllegalNotLesserThanException",
".",
"class",
")",
"public",
"static",
"byte",
"lesserThan",
"(",
"final",
"byte",
"expected",
",",
"final",
"byte",
"check",
")",
"{",
"if",
"(",
"expected",
"<=",
"check",
")",
"... | Ensures that a passed {@code byte} is less than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@return the passed {@code byte} argument {@code check}
@throws IllegalNotLesserThanException
if the argument value {@code check} is not lesser than value {@code expected} | [
"Ensures",
"that",
"a",
"passed",
"{",
"@code",
"byte",
"}",
"is",
"less",
"than",
"another",
"{",
"@code",
"byte",
"}",
"."
] | train | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1370-L1378 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractPathElement3D.java | AbstractPathElement3D.newInstance | @Pure
public static AbstractPathElement3D newInstance(PathElementType type, Point3d last, Point3d[] coords) {
switch(type) {
case MOVE_TO:
return new MovePathElement3d(coords[0]);
case LINE_TO:
return new LinePathElement3d(last, coords[0]);
case QUAD_TO:
return new QuadPathElement3d(last, coords[0], c... | java | @Pure
public static AbstractPathElement3D newInstance(PathElementType type, Point3d last, Point3d[] coords) {
switch(type) {
case MOVE_TO:
return new MovePathElement3d(coords[0]);
case LINE_TO:
return new LinePathElement3d(last, coords[0]);
case QUAD_TO:
return new QuadPathElement3d(last, coords[0], c... | [
"@",
"Pure",
"public",
"static",
"AbstractPathElement3D",
"newInstance",
"(",
"PathElementType",
"type",
",",
"Point3d",
"last",
",",
"Point3d",
"[",
"]",
"coords",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"MOVE_TO",
":",
"return",
"new",
"MovePath... | Create an instance of path element, associating properties of points to the PathElement.
When the point in parameter are changed, the PathElement will change also.
@param type is the type of the new element.
@param last is the last point.
@param coords are the eventual other points.
@return the instance of path eleme... | [
"Create",
"an",
"instance",
"of",
"path",
"element",
"associating",
"properties",
"of",
"points",
"to",
"the",
"PathElement",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractPathElement3D.java#L76-L92 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/hll/BaseHllSketch.java | BaseHllSketch.update | public void update(final double datum) {
final double d = (datum == 0.0) ? 0.0 : datum; // canonicalize -0.0, 0.0
final long[] data = { Double.doubleToLongBits(d) };// canonicalize all NaN forms
couponUpdate(coupon(hash(data, DEFAULT_UPDATE_SEED)));
} | java | public void update(final double datum) {
final double d = (datum == 0.0) ? 0.0 : datum; // canonicalize -0.0, 0.0
final long[] data = { Double.doubleToLongBits(d) };// canonicalize all NaN forms
couponUpdate(coupon(hash(data, DEFAULT_UPDATE_SEED)));
} | [
"public",
"void",
"update",
"(",
"final",
"double",
"datum",
")",
"{",
"final",
"double",
"d",
"=",
"(",
"datum",
"==",
"0.0",
")",
"?",
"0.0",
":",
"datum",
";",
"// canonicalize -0.0, 0.0",
"final",
"long",
"[",
"]",
"data",
"=",
"{",
"Double",
".",
... | Present the given double (or float) datum as a potential unique item.
The double will be converted to a long using Double.doubleToLongBits(datum),
which normalizes all NaN values to a single NaN representation.
Plus and minus zero will be normalized to plus zero.
The special floating-point values NaN and +/- Infinity a... | [
"Present",
"the",
"given",
"double",
"(",
"or",
"float",
")",
"datum",
"as",
"a",
"potential",
"unique",
"item",
".",
"The",
"double",
"will",
"be",
"converted",
"to",
"a",
"long",
"using",
"Double",
".",
"doubleToLongBits",
"(",
"datum",
")",
"which",
"... | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/hll/BaseHllSketch.java#L255-L259 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java | ImageModerationsImpl.findFacesUrlInput | public FoundFaces findFacesUrlInput(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) {
return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter).toBlocking().single().body();
} | java | public FoundFaces findFacesUrlInput(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) {
return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter).toBlocking().single().body();
} | [
"public",
"FoundFaces",
"findFacesUrlInput",
"(",
"String",
"contentType",
",",
"BodyModelModel",
"imageUrl",
",",
"FindFacesUrlInputOptionalParameter",
"findFacesUrlInputOptionalParameter",
")",
"{",
"return",
"findFacesUrlInputWithServiceResponseAsync",
"(",
"contentType",
",",... | Returns the list of faces found.
@param contentType The content type.
@param imageUrl The image url.
@param findFacesUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the validation
@throws APIErrorExce... | [
"Returns",
"the",
"list",
"of",
"faces",
"found",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L875-L877 |
gallandarakhneorg/afc | core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java | MeasureUnitUtil.toSeconds | @Pure
public static double toSeconds(double value, TimeUnit inputUnit) {
switch (inputUnit) {
case DAYS:
return value * 86400.;
case HOURS:
return value * 3600.;
case MINUTES:
return value * 60.;
case SECONDS:
break;
case MILLISECONDS:
return milli2unit(value);
case MICROSECONDS:
return... | java | @Pure
public static double toSeconds(double value, TimeUnit inputUnit) {
switch (inputUnit) {
case DAYS:
return value * 86400.;
case HOURS:
return value * 3600.;
case MINUTES:
return value * 60.;
case SECONDS:
break;
case MILLISECONDS:
return milli2unit(value);
case MICROSECONDS:
return... | [
"@",
"Pure",
"public",
"static",
"double",
"toSeconds",
"(",
"double",
"value",
",",
"TimeUnit",
"inputUnit",
")",
"{",
"switch",
"(",
"inputUnit",
")",
"{",
"case",
"DAYS",
":",
"return",
"value",
"*",
"86400.",
";",
"case",
"HOURS",
":",
"return",
"val... | Convert the given value expressed in the given unit to seconds.
@param value is the value to convert
@param inputUnit is the unit of the {@code value}
@return the result of the convertion. | [
"Convert",
"the",
"given",
"value",
"expressed",
"in",
"the",
"given",
"unit",
"to",
"seconds",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java#L393-L414 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java | Utils.copyDirectory | public void copyDirectory(ModuleElement mdle, DocPath dir) throws DocFileIOException {
copyDirectory(getLocationForModule(mdle), dir);
} | java | public void copyDirectory(ModuleElement mdle, DocPath dir) throws DocFileIOException {
copyDirectory(getLocationForModule(mdle), dir);
} | [
"public",
"void",
"copyDirectory",
"(",
"ModuleElement",
"mdle",
",",
"DocPath",
"dir",
")",
"throws",
"DocFileIOException",
"{",
"copyDirectory",
"(",
"getLocationForModule",
"(",
"mdle",
")",
",",
"dir",
")",
";",
"}"
] | Copy the given directory and its contents from the source
module directory to the generated documentation directory.
For example, given a package java.lang, this method will
copy the entire directory, to the generated documentation
hierarchy.
@param mdle the module containing the directory to be copied
@param dir the ... | [
"Copy",
"the",
"given",
"directory",
"and",
"its",
"contents",
"from",
"the",
"source",
"module",
"directory",
"to",
"the",
"generated",
"documentation",
"directory",
".",
"For",
"example",
"given",
"a",
"package",
"java",
".",
"lang",
"this",
"method",
"will"... | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java#L308-L310 |
apache/incubator-gobblin | gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java | FlowConfigResourceLocalHandler.updateFlowConfig | public UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig flowConfig, boolean triggerListener) {
log.info("[GAAS-REST] Update called with flowGroup {} flowName {}", flowId.getFlowGroup(), flowId.getFlowName());
if (!flowId.getFlowGroup().equals(flowConfig.getId().getFlowGroup()) || !flowId.getFlowName()... | java | public UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig flowConfig, boolean triggerListener) {
log.info("[GAAS-REST] Update called with flowGroup {} flowName {}", flowId.getFlowGroup(), flowId.getFlowName());
if (!flowId.getFlowGroup().equals(flowConfig.getId().getFlowGroup()) || !flowId.getFlowName()... | [
"public",
"UpdateResponse",
"updateFlowConfig",
"(",
"FlowId",
"flowId",
",",
"FlowConfig",
"flowConfig",
",",
"boolean",
"triggerListener",
")",
"{",
"log",
".",
"info",
"(",
"\"[GAAS-REST] Update called with flowGroup {} flowName {}\"",
",",
"flowId",
".",
"getFlowGroup... | Update flowConfig locally and trigger all listeners iff @param triggerListener is set to true | [
"Update",
"flowConfig",
"locally",
"and",
"trigger",
"all",
"listeners",
"iff"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigResourceLocalHandler.java#L139-L155 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/WCApplicationHelper.java | WCApplicationHelper.packageWarsToEar | public static void packageWarsToEar(LibertyServer server, String dir, String earName, boolean addEarResources, String... warFiles) throws Exception {
String baseDir = DIR_PUBLISH + server.getServerName() + "/" + dir + "/";
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, earName);
... | java | public static void packageWarsToEar(LibertyServer server, String dir, String earName, boolean addEarResources, String... warFiles) throws Exception {
String baseDir = DIR_PUBLISH + server.getServerName() + "/" + dir + "/";
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, earName);
... | [
"public",
"static",
"void",
"packageWarsToEar",
"(",
"LibertyServer",
"server",
",",
"String",
"dir",
",",
"String",
"earName",
",",
"boolean",
"addEarResources",
",",
"String",
"...",
"warFiles",
")",
"throws",
"Exception",
"{",
"String",
"baseDir",
"=",
"DIR_P... | /*
Helper method to create a ear and placed it to the specified directory which is relative from /publish/servers/ directory. | [
"/",
"*",
"Helper",
"method",
"to",
"create",
"a",
"ear",
"and",
"placed",
"it",
"to",
"the",
"specified",
"directory",
"which",
"is",
"relative",
"from",
"/",
"publish",
"/",
"servers",
"/",
"directory",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/WCApplicationHelper.java#L133-L146 |
kite-sdk/kite | kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java | HBaseUtils.addColumnsToGet | public static void addColumnsToGet(Collection<String> columns, final Get get) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
get.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) {
... | java | public static void addColumnsToGet(Collection<String> columns, final Get get) {
addColumnsToOperation(columns, new Operation() {
@Override
public void addColumn(byte[] family, byte[] column) {
get.addColumn(family, column);
}
@Override
public void addFamily(byte[] family) {
... | [
"public",
"static",
"void",
"addColumnsToGet",
"(",
"Collection",
"<",
"String",
">",
"columns",
",",
"final",
"Get",
"get",
")",
"{",
"addColumnsToOperation",
"(",
"columns",
",",
"new",
"Operation",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"addCol... | Add a Collection of Columns to a Get, Only Add Single Columns
If Their Family Isn't Already Being Added.
@param columns
Collection of columns to add to the Get
@param get
The Get object to add the columns to | [
"Add",
"a",
"Collection",
"of",
"Columns",
"to",
"a",
"Get",
"Only",
"Add",
"Single",
"Columns",
"If",
"Their",
"Family",
"Isn",
"t",
"Already",
"Being",
"Added",
"."
] | train | https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/HBaseUtils.java#L170-L182 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java | VirtualMachineExtensionImagesInner.listTypes | public List<VirtualMachineExtensionImageInner> listTypes(String location, String publisherName) {
return listTypesWithServiceResponseAsync(location, publisherName).toBlocking().single().body();
} | java | public List<VirtualMachineExtensionImageInner> listTypes(String location, String publisherName) {
return listTypesWithServiceResponseAsync(location, publisherName).toBlocking().single().body();
} | [
"public",
"List",
"<",
"VirtualMachineExtensionImageInner",
">",
"listTypes",
"(",
"String",
"location",
",",
"String",
"publisherName",
")",
"{",
"return",
"listTypesWithServiceResponseAsync",
"(",
"location",
",",
"publisherName",
")",
".",
"toBlocking",
"(",
")",
... | Gets a list of virtual machine extension image types.
@param location The name of a supported Azure region.
@param publisherName the String value
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all oth... | [
"Gets",
"a",
"list",
"of",
"virtual",
"machine",
"extension",
"image",
"types",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java#L179-L181 |
BradleyWood/Software-Quality-Test-Framework | sqtf-core/src/main/java/org/sqtf/assertions/Assert.java | Assert.assertNotEqual | public static void assertNotEqual(Object a, Object b, String message) {
if (Objects.equals(a, b)) {
fail(message);
}
} | java | public static void assertNotEqual(Object a, Object b, String message) {
if (Objects.equals(a, b)) {
fail(message);
}
} | [
"public",
"static",
"void",
"assertNotEqual",
"(",
"Object",
"a",
",",
"Object",
"b",
",",
"String",
"message",
")",
"{",
"if",
"(",
"Objects",
".",
"equals",
"(",
"a",
",",
"b",
")",
")",
"{",
"fail",
"(",
"message",
")",
";",
"}",
"}"
] | Asserts that the two objects are equal. If they are not
the test will fail
@param a The first object
@param b The second object
@param message The message to report on failure | [
"Asserts",
"that",
"the",
"two",
"objects",
"are",
"equal",
".",
"If",
"they",
"are",
"not",
"the",
"test",
"will",
"fail"
] | train | https://github.com/BradleyWood/Software-Quality-Test-Framework/blob/010dea3bfc8e025a4304ab9ef4a213c1adcb1aa0/sqtf-core/src/main/java/org/sqtf/assertions/Assert.java#L190-L194 |
icode/ameba | src/main/java/ameba/core/ws/rs/ParamConverters.java | ParamConverters.parseDate | public static Date parseDate(String value, ParsePosition pos) {
Long timestamp = parseTimestamp(value);
if (timestamp != null) {
return new Date(timestamp);
}
if (value.contains(" ")) {
value = value.replace(" ", "+");
}
if (!(value.contains("-") |... | java | public static Date parseDate(String value, ParsePosition pos) {
Long timestamp = parseTimestamp(value);
if (timestamp != null) {
return new Date(timestamp);
}
if (value.contains(" ")) {
value = value.replace(" ", "+");
}
if (!(value.contains("-") |... | [
"public",
"static",
"Date",
"parseDate",
"(",
"String",
"value",
",",
"ParsePosition",
"pos",
")",
"{",
"Long",
"timestamp",
"=",
"parseTimestamp",
"(",
"value",
")",
";",
"if",
"(",
"timestamp",
"!=",
"null",
")",
"{",
"return",
"new",
"Date",
"(",
"tim... | <p>parseDate.</p>
@param value a {@link java.lang.String} object.
@param pos a {@link java.text.ParsePosition} object.
@return a {@link java.util.Date} object. | [
"<p",
">",
"parseDate",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/core/ws/rs/ParamConverters.java#L76-L92 |
JOML-CI/JOML | src/org/joml/Matrix4d.java | Matrix4d.rotateAffine | public Matrix4d rotateAffine(Quaternionfc quat, Matrix4d dest) {
double w2 = quat.w() * quat.w();
double x2 = quat.x() * quat.x();
double y2 = quat.y() * quat.y();
double z2 = quat.z() * quat.z();
double zw = quat.z() * quat.w();
double xy = quat.x() * quat.y();
d... | java | public Matrix4d rotateAffine(Quaternionfc quat, Matrix4d dest) {
double w2 = quat.w() * quat.w();
double x2 = quat.x() * quat.x();
double y2 = quat.y() * quat.y();
double z2 = quat.z() * quat.z();
double zw = quat.z() * quat.w();
double xy = quat.x() * quat.y();
d... | [
"public",
"Matrix4d",
"rotateAffine",
"(",
"Quaternionfc",
"quat",
",",
"Matrix4d",
"dest",
")",
"{",
"double",
"w2",
"=",
"quat",
".",
"w",
"(",
")",
"*",
"quat",
".",
"w",
"(",
")",
";",
"double",
"x2",
"=",
"quat",
".",
"x",
"(",
")",
"*",
"qu... | Apply the rotation - and possibly scaling - transformation of the given {@link Quaternionfc} to this {@link #isAffine() affine} matrix and store
the result in <code>dest</code>.
<p>
This method assumes <code>this</code> to be {@link #isAffine() affine}.
<p>
When used with a right-handed coordinate system, the produced ... | [
"Apply",
"the",
"rotation",
"-",
"and",
"possibly",
"scaling",
"-",
"transformation",
"of",
"the",
"given",
"{",
"@link",
"Quaternionfc",
"}",
"to",
"this",
"{",
"@link",
"#isAffine",
"()",
"affine",
"}",
"matrix",
"and",
"store",
"the",
"result",
"in",
"<... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L8133-L8177 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java | FlowControllerFactory.getPageFlowForRequest | public static PageFlowController getPageFlowForRequest( HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext )
{
return getPageFlowForRelativeURI( reques... | java | public static PageFlowController getPageFlowForRequest( HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext )
{
return getPageFlowForRelativeURI( reques... | [
"public",
"static",
"PageFlowController",
"getPageFlowForRequest",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"ServletContext",
"servletContext",
")",
"{",
"return",
"getPageFlowForRelativeURI",
"(",
"request",
",",
"response",
",",
... | Get the page flow instance that should be associated with the given request. If it doesn't exist, create it.
If one is created, the page flow stack (for nesting) will be cleared or pushed, and the new instance will be
stored as the current page flow.
@deprecated Use {@link #getPageFlowForRequest(RequestContext)} inste... | [
"Get",
"the",
"page",
"flow",
"instance",
"that",
"should",
"be",
"associated",
"with",
"the",
"given",
"request",
".",
"If",
"it",
"doesn",
"t",
"exist",
"create",
"it",
".",
"If",
"one",
"is",
"created",
"the",
"page",
"flow",
"stack",
"(",
"for",
"n... | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowControllerFactory.java#L567-L572 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/GridBy.java | GridBy.getXPathForColumnInRowByValueInOtherColumn | public static String getXPathForColumnInRowByValueInOtherColumn(String value, String columnName, String... extraColumnNames) {
String selectIndex = getXPathForColumnIndex(columnName);
String rowXPath = getXPathForRowByValueInOtherColumn(selectIndex, value);
String headerXPath = getXPathForHeader... | java | public static String getXPathForColumnInRowByValueInOtherColumn(String value, String columnName, String... extraColumnNames) {
String selectIndex = getXPathForColumnIndex(columnName);
String rowXPath = getXPathForRowByValueInOtherColumn(selectIndex, value);
String headerXPath = getXPathForHeader... | [
"public",
"static",
"String",
"getXPathForColumnInRowByValueInOtherColumn",
"(",
"String",
"value",
",",
"String",
"columnName",
",",
"String",
"...",
"extraColumnNames",
")",
"{",
"String",
"selectIndex",
"=",
"getXPathForColumnIndex",
"(",
"columnName",
")",
";",
"S... | Creates an XPath expression that will find a cell in a row, selecting the row based on the
text in a specific column (identified by its header text).
@param value text to find in column with the supplied header.
@param columnName header text of the column to find value in.
@param extraColumnNames name of other header t... | [
"Creates",
"an",
"XPath",
"expression",
"that",
"will",
"find",
"a",
"cell",
"in",
"a",
"row",
"selecting",
"the",
"row",
"based",
"on",
"the",
"text",
"in",
"a",
"specific",
"column",
"(",
"identified",
"by",
"its",
"header",
"text",
")",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/GridBy.java#L50-L56 |
jboss/jboss-jstl-api_spec | src/main/java/javax/servlet/jsp/jstl/core/Config.java | Config.get | public static Object get(ServletRequest request, String name) {
return request.getAttribute(name + REQUEST_SCOPE_SUFFIX);
} | java | public static Object get(ServletRequest request, String name) {
return request.getAttribute(name + REQUEST_SCOPE_SUFFIX);
} | [
"public",
"static",
"Object",
"get",
"(",
"ServletRequest",
"request",
",",
"String",
"name",
")",
"{",
"return",
"request",
".",
"getAttribute",
"(",
"name",
"+",
"REQUEST_SCOPE_SUFFIX",
")",
";",
"}"
] | Looks up a configuration variable in the "request" scope.
<p> The lookup of configuration variables is performed as if each scope
had its own name space, that is, the same configuration variable name
in one scope does not replace one stored in a different scope.
@param request Request object in which the configuration... | [
"Looks",
"up",
"a",
"configuration",
"variable",
"in",
"the",
"request",
"scope",
".",
"<p",
">",
"The",
"lookup",
"of",
"configuration",
"variables",
"is",
"performed",
"as",
"if",
"each",
"scope",
"had",
"its",
"own",
"name",
"space",
"that",
"is",
"the"... | train | https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/core/Config.java#L125-L127 |
thymeleaf/thymeleaf | src/main/java/org/thymeleaf/context/AbstractContext.java | AbstractContext.setVariables | public void setVariables(final Map<String,Object> variables) {
if (variables == null) {
return;
}
this.variables.putAll(variables);
} | java | public void setVariables(final Map<String,Object> variables) {
if (variables == null) {
return;
}
this.variables.putAll(variables);
} | [
"public",
"void",
"setVariables",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
")",
"{",
"if",
"(",
"variables",
"==",
"null",
")",
"{",
"return",
";",
"}",
"this",
".",
"variables",
".",
"putAll",
"(",
"variables",
")",
";",
... | <p>
Sets several variables at a time into the context.
</p>
@param variables the variables to be set. | [
"<p",
">",
"Sets",
"several",
"variables",
"at",
"a",
"time",
"into",
"the",
"context",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/context/AbstractContext.java#L122-L127 |
audit4j/audit4j-core | src/main/java/org/audit4j/core/schedule/TaskUtils.java | TaskUtils.decorateTaskWithErrorHandler | public static DelegatingErrorHandlingRunnable decorateTaskWithErrorHandler(Runnable task,
ErrorHandler errorHandler, boolean isRepeatingTask) {
if (task instanceof DelegatingErrorHandlingRunnable) {
return (DelegatingErrorHandlingRunnable) task;
}
ErrorHandler eh = errorH... | java | public static DelegatingErrorHandlingRunnable decorateTaskWithErrorHandler(Runnable task,
ErrorHandler errorHandler, boolean isRepeatingTask) {
if (task instanceof DelegatingErrorHandlingRunnable) {
return (DelegatingErrorHandlingRunnable) task;
}
ErrorHandler eh = errorH... | [
"public",
"static",
"DelegatingErrorHandlingRunnable",
"decorateTaskWithErrorHandler",
"(",
"Runnable",
"task",
",",
"ErrorHandler",
"errorHandler",
",",
"boolean",
"isRepeatingTask",
")",
"{",
"if",
"(",
"task",
"instanceof",
"DelegatingErrorHandlingRunnable",
")",
"{",
... | Decorate the task for error handling. If the provided
@param task the task
@param errorHandler the error handler
@param isRepeatingTask the is repeating task
@return the delegating error handling runnable
{@link ErrorHandler} is not {@code null}, it will be used. Otherwise,
repeating tasks will have errors suppressed ... | [
"Decorate",
"the",
"task",
"for",
"error",
"handling",
".",
"If",
"the",
"provided"
] | train | https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/schedule/TaskUtils.java#L53-L60 |
alibaba/Tangram-Android | tangram/src/main/java/com/tmall/wireless/tangram/core/adapter/GroupBasicAdapter.java | GroupBasicAdapter.insertGroup | public void insertGroup(int inserted, @Nullable List<L> groups) {
if (inserted < 0 || inserted >= mCards.size() || groups == null || groups.size() == 0)
return;
List<L> cards = getGroups();
boolean changed = cards.addAll(inserted, groups);
if (changed)
setData(... | java | public void insertGroup(int inserted, @Nullable List<L> groups) {
if (inserted < 0 || inserted >= mCards.size() || groups == null || groups.size() == 0)
return;
List<L> cards = getGroups();
boolean changed = cards.addAll(inserted, groups);
if (changed)
setData(... | [
"public",
"void",
"insertGroup",
"(",
"int",
"inserted",
",",
"@",
"Nullable",
"List",
"<",
"L",
">",
"groups",
")",
"{",
"if",
"(",
"inserted",
"<",
"0",
"||",
"inserted",
">=",
"mCards",
".",
"size",
"(",
")",
"||",
"groups",
"==",
"null",
"||",
... | insert groups after position inserted
@param inserted index that will inserted after
@param groups new groups | [
"insert",
"groups",
"after",
"position",
"inserted"
] | train | https://github.com/alibaba/Tangram-Android/blob/caa57f54e009c8dacd34a2322d5761956ebed321/tangram/src/main/java/com/tmall/wireless/tangram/core/adapter/GroupBasicAdapter.java#L543-L553 |
alipay/sofa-rpc | core/common/src/main/java/com/alipay/sofa/rpc/common/utils/FileUtils.java | FileUtils.string2File | public static boolean string2File(File file, String data) throws IOException {
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
FileWriter writer = null;
try {
writer = new FileWriter(file, false);
writer.write(data);
} fi... | java | public static boolean string2File(File file, String data) throws IOException {
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
FileWriter writer = null;
try {
writer = new FileWriter(file, false);
writer.write(data);
} fi... | [
"public",
"static",
"boolean",
"string2File",
"(",
"File",
"file",
",",
"String",
"data",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"file",
".",
"getParentFile",
"(",
")",
".",
"exists",
"(",
")",
")",
"{",
"file",
".",
"getParentFile",
"(",
"... | 字符流写文件 较快
@param file 文件
@param data 数据
@return 操作是否成功
@throws IOException 发送IO异常 | [
"字符流写文件",
"较快"
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/FileUtils.java#L205-L219 |
apache/groovy | src/main/groovy/groovy/transform/stc/ClosureSignatureHint.java | ClosureSignatureHint.pickGenericType | public static ClassNode pickGenericType(MethodNode node, int parameterIndex, int gtIndex) {
final Parameter[] parameters = node.getParameters();
final ClassNode type = parameters[parameterIndex].getOriginType();
return pickGenericType(type, gtIndex);
} | java | public static ClassNode pickGenericType(MethodNode node, int parameterIndex, int gtIndex) {
final Parameter[] parameters = node.getParameters();
final ClassNode type = parameters[parameterIndex].getOriginType();
return pickGenericType(type, gtIndex);
} | [
"public",
"static",
"ClassNode",
"pickGenericType",
"(",
"MethodNode",
"node",
",",
"int",
"parameterIndex",
",",
"int",
"gtIndex",
")",
"{",
"final",
"Parameter",
"[",
"]",
"parameters",
"=",
"node",
".",
"getParameters",
"(",
")",
";",
"final",
"ClassNode",
... | A helper method which will extract the n-th generic type from the n-th parameter of a method node.
@param node the method node from which the generic type should be picked
@param parameterIndex the index of the parameter in the method parameter list
@param gtIndex the index of the generic type to extract
@return the ge... | [
"A",
"helper",
"method",
"which",
"will",
"extract",
"the",
"n",
"-",
"th",
"generic",
"type",
"from",
"the",
"n",
"-",
"th",
"parameter",
"of",
"a",
"method",
"node",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/transform/stc/ClosureSignatureHint.java#L76-L80 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/TokenizerBase.java | TokenizerBase.debugLattice | public void debugLattice(OutputStream outputStream, String text) throws IOException {
ViterbiLattice lattice = viterbiBuilder.build(text);
outputStream.write(viterbiFormatter.format(lattice).getBytes(StandardCharsets.UTF_8));
outputStream.flush();
} | java | public void debugLattice(OutputStream outputStream, String text) throws IOException {
ViterbiLattice lattice = viterbiBuilder.build(text);
outputStream.write(viterbiFormatter.format(lattice).getBytes(StandardCharsets.UTF_8));
outputStream.flush();
} | [
"public",
"void",
"debugLattice",
"(",
"OutputStream",
"outputStream",
",",
"String",
"text",
")",
"throws",
"IOException",
"{",
"ViterbiLattice",
"lattice",
"=",
"viterbiBuilder",
".",
"build",
"(",
"text",
")",
";",
"outputStream",
".",
"write",
"(",
"viterbiF... | Writes the Viterbi lattice for the provided text to an output stream
<p>
The output is written in <a href="https://en.wikipedia.org/wiki/DOT_(graph_description_language)">DOT</a> format.
<p>
This method is not thread safe
@param outputStream output stream to write to
@param text text to create lattice for
@throws IO... | [
"Writes",
"the",
"Viterbi",
"lattice",
"for",
"the",
"provided",
"text",
"to",
"an",
"output",
"stream",
"<p",
">",
"The",
"output",
"is",
"written",
"in",
"<a",
"href",
"=",
"https",
":",
"//",
"en",
".",
"wikipedia",
".",
"org",
"/",
"wiki",
"/",
"... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/TokenizerBase.java#L162-L167 |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java | MailService.findMessages | public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition,
final long timeoutSeconds, final long sleepMillis) {
return findMessages(mailAccount, condition, timeoutSeconds, sleepMillis, true, -1);
} | java | public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition,
final long timeoutSeconds, final long sleepMillis) {
return findMessages(mailAccount, condition, timeoutSeconds, sleepMillis, true, -1);
} | [
"public",
"List",
"<",
"MailMessage",
">",
"findMessages",
"(",
"final",
"MailAccount",
"mailAccount",
",",
"final",
"Predicate",
"<",
"MailMessage",
">",
"condition",
",",
"final",
"long",
"timeoutSeconds",
",",
"final",
"long",
"sleepMillis",
")",
"{",
"return... | <p>
Tries to find messages for the specified mail account applying the specified
{@code condition} until it times out using the specified {@code timeout} and and
{@code sleepMillis}.
</p>
<p>
<b>Note:</b><br />
This method uses the specified mail account independently without reservation. If, however,
the specified mai... | [
"<p",
">",
"Tries",
"to",
"find",
"messages",
"for",
"the",
"specified",
"mail",
"account",
"applying",
"the",
"specified",
"{",
"@code",
"condition",
"}",
"until",
"it",
"times",
"out",
"using",
"the",
"specified",
"{",
"@code",
"timeout",
"}",
"and",
"an... | train | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java#L446-L449 |
baratine/baratine | framework/src/main/java/com/caucho/v5/config/types/Period.java | Period.periodEnd | private static long periodEnd(long now, long period, QDate cal)
{
if (period < 0)
return Long.MAX_VALUE;
else if (period == 0)
return now;
if (period < 30 * DAY) {
cal.setGMTTime(now);
long localTime = cal.getLocalTime();
localTime = localTime + (period - (localTime + 4 * ... | java | private static long periodEnd(long now, long period, QDate cal)
{
if (period < 0)
return Long.MAX_VALUE;
else if (period == 0)
return now;
if (period < 30 * DAY) {
cal.setGMTTime(now);
long localTime = cal.getLocalTime();
localTime = localTime + (period - (localTime + 4 * ... | [
"private",
"static",
"long",
"periodEnd",
"(",
"long",
"now",
",",
"long",
"period",
",",
"QDate",
"cal",
")",
"{",
"if",
"(",
"period",
"<",
"0",
")",
"return",
"Long",
".",
"MAX_VALUE",
";",
"else",
"if",
"(",
"period",
"==",
"0",
")",
"return",
... | Calculates the next period end. The calculation is in local time.
@param now the current time in GMT ms since the epoch
@return the time of the next period in GMT ms since the epoch | [
"Calculates",
"the",
"next",
"period",
"end",
".",
"The",
"calculation",
"is",
"in",
"local",
"time",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/Period.java#L235-L292 |
foundation-runtime/service-directory | 1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java | DirectoryServiceClient.updateInstanceUri | public void updateInstanceUri(String serviceName, String instanceId, String uri, boolean isOwned){
String serviceUri = toInstanceUri(serviceName, instanceId) + "/uri" ;
String body = null;
try {
body = "uri=" + URLEncoder.encode(uri, "UTF-8") + "&isOwned=" + isOwned;
} catch ... | java | public void updateInstanceUri(String serviceName, String instanceId, String uri, boolean isOwned){
String serviceUri = toInstanceUri(serviceName, instanceId) + "/uri" ;
String body = null;
try {
body = "uri=" + URLEncoder.encode(uri, "UTF-8") + "&isOwned=" + isOwned;
} catch ... | [
"public",
"void",
"updateInstanceUri",
"(",
"String",
"serviceName",
",",
"String",
"instanceId",
",",
"String",
"uri",
",",
"boolean",
"isOwned",
")",
"{",
"String",
"serviceUri",
"=",
"toInstanceUri",
"(",
"serviceName",
",",
"instanceId",
")",
"+",
"\"/uri\""... | Update the ServiceInstance attribute "uri".
@param serviceName
the service name.
@param instanceId
the instance id.
@param uri
the ServiceInstance URI.
@param isOwned
whether the DirectoryAPI owns this ServiceProvider. | [
"Update",
"the",
"ServiceInstance",
"attribute",
"uri",
"."
] | train | https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L196-L214 |
Alluxio/alluxio | core/common/src/main/java/alluxio/underfs/UnderFileSystemConfiguration.java | UnderFileSystemConfiguration.createMountSpecificConf | public UnderFileSystemConfiguration createMountSpecificConf(Map<String, String> mountConf) {
UnderFileSystemConfiguration ufsConf = new UnderFileSystemConfiguration(mProperties.copy());
ufsConf.mProperties.merge(mountConf, Source.MOUNT_OPTION);
ufsConf.mReadOnly = mReadOnly;
ufsConf.mShared = mShared;
... | java | public UnderFileSystemConfiguration createMountSpecificConf(Map<String, String> mountConf) {
UnderFileSystemConfiguration ufsConf = new UnderFileSystemConfiguration(mProperties.copy());
ufsConf.mProperties.merge(mountConf, Source.MOUNT_OPTION);
ufsConf.mReadOnly = mReadOnly;
ufsConf.mShared = mShared;
... | [
"public",
"UnderFileSystemConfiguration",
"createMountSpecificConf",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"mountConf",
")",
"{",
"UnderFileSystemConfiguration",
"ufsConf",
"=",
"new",
"UnderFileSystemConfiguration",
"(",
"mProperties",
".",
"copy",
"(",
")",
... | Creates a new instance from the current configuration and adds in new properties.
@param mountConf the mount specific configuration map
@return the updated configuration object | [
"Creates",
"a",
"new",
"instance",
"from",
"the",
"current",
"configuration",
"and",
"adds",
"in",
"new",
"properties",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/underfs/UnderFileSystemConfiguration.java#L121-L127 |
centic9/commons-dost | src/main/java/org/dstadler/commons/net/UrlUtils.java | UrlUtils.retrieveData | public static String retrieveData(String sUrl, int timeout) throws IOException {
return retrieveData(sUrl, null, timeout);
} | java | public static String retrieveData(String sUrl, int timeout) throws IOException {
return retrieveData(sUrl, null, timeout);
} | [
"public",
"static",
"String",
"retrieveData",
"(",
"String",
"sUrl",
",",
"int",
"timeout",
")",
"throws",
"IOException",
"{",
"return",
"retrieveData",
"(",
"sUrl",
",",
"null",
",",
"timeout",
")",
";",
"}"
] | Download data from an URL.
@param sUrl The full URL used to download the content.
@param timeout The timeout in milliseconds that is used for both
connection timeout and read timeout.
@return The resulting data, e.g. a HTML string.
@throws IOException If accessing the resource fails. | [
"Download",
"data",
"from",
"an",
"URL",
"."
] | train | https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L48-L50 |
wiibaker/robotframework-rest-java | src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java | JsonPathLibrary.jsonShouldBeEqual | @RobotKeyword
public boolean jsonShouldBeEqual(String from, String to) throws Exception {
return jsonShouldBeEqual(from, to, false);
} | java | @RobotKeyword
public boolean jsonShouldBeEqual(String from, String to) throws Exception {
return jsonShouldBeEqual(from, to, false);
} | [
"@",
"RobotKeyword",
"public",
"boolean",
"jsonShouldBeEqual",
"(",
"String",
"from",
",",
"String",
"to",
")",
"throws",
"Exception",
"{",
"return",
"jsonShouldBeEqual",
"(",
"from",
",",
"to",
",",
"false",
")",
";",
"}"
] | Checks if the given JSON contents are equal. See `Json Should Be Equal`
for more details
`from` and `to` can be either URI or the actual JSON content.
You can add optional method (ie GET, POST, PUT), data or content type as parameters.
Method defaults to GET.
Example:
| Json Should Be Equal | http://example.com/test... | [
"Checks",
"if",
"the",
"given",
"JSON",
"contents",
"are",
"equal",
".",
"See",
"Json",
"Should",
"Be",
"Equal",
"for",
"more",
"details"
] | train | https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L145-L148 |
dadoonet/elasticsearch-beyonder | src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java | IndexElasticsearchUpdater.removeIndexInElasticsearch | @Deprecated
private static void removeIndexInElasticsearch(Client client, String index) throws Exception {
logger.trace("removeIndex([{}])", index);
assert client != null;
assert index != null;
AcknowledgedResponse response = client.admin().indices().prepareDelete(index).get();
if (!response.isAcknow... | java | @Deprecated
private static void removeIndexInElasticsearch(Client client, String index) throws Exception {
logger.trace("removeIndex([{}])", index);
assert client != null;
assert index != null;
AcknowledgedResponse response = client.admin().indices().prepareDelete(index).get();
if (!response.isAcknow... | [
"@",
"Deprecated",
"private",
"static",
"void",
"removeIndexInElasticsearch",
"(",
"Client",
"client",
",",
"String",
"index",
")",
"throws",
"Exception",
"{",
"logger",
".",
"trace",
"(",
"\"removeIndex([{}])\"",
",",
"index",
")",
";",
"assert",
"client",
"!="... | Remove a new index in Elasticsearch
@param client Elasticsearch client
@param index Index name
@throws Exception if the elasticsearch API call is failing | [
"Remove",
"a",
"new",
"index",
"in",
"Elasticsearch"
] | train | https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java#L96-L110 |
stratosphere/stratosphere | stratosphere-core/src/main/java/eu/stratosphere/types/parser/FloatParser.java | FloatParser.parseField | public static final float parseField(byte[] bytes, int startPos, int length, char delimiter) {
if (length <= 0) {
throw new NumberFormatException("Invalid input: Empty string");
}
int i = 0;
final byte delByte = (byte) delimiter;
while (i < length && bytes[i] != delByte) {
i++;
}
String str = ... | java | public static final float parseField(byte[] bytes, int startPos, int length, char delimiter) {
if (length <= 0) {
throw new NumberFormatException("Invalid input: Empty string");
}
int i = 0;
final byte delByte = (byte) delimiter;
while (i < length && bytes[i] != delByte) {
i++;
}
String str = ... | [
"public",
"static",
"final",
"float",
"parseField",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"startPos",
",",
"int",
"length",
",",
"char",
"delimiter",
")",
"{",
"if",
"(",
"length",
"<=",
"0",
")",
"{",
"throw",
"new",
"NumberFormatException",
"(",
... | Static utility to parse a field of type float from a byte sequence that represents text characters
(such as when read from a file stream).
@param bytes The bytes containing the text data that should be parsed.
@param startPos The offset to start the parsing.
@param length The length of the byte sequence (counting from... | [
"Static",
"utility",
"to",
"parse",
"a",
"field",
"of",
"type",
"float",
"from",
"a",
"byte",
"sequence",
"that",
"represents",
"text",
"characters",
"(",
"such",
"as",
"when",
"read",
"from",
"a",
"file",
"stream",
")",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/types/parser/FloatParser.java#L83-L96 |
aws/aws-sdk-java | aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java | AmazonS3Client.setObjectAcl | public void setObjectAcl(String bucketName, String key, String versionId,
AccessControlList acl, RequestMetricCollector requestMetricCollector)
throws SdkClientException, AmazonServiceException {
setObjectAcl(new SetObjectAclRequest(bucketName, key, versionId, acl)
.<SetO... | java | public void setObjectAcl(String bucketName, String key, String versionId,
AccessControlList acl, RequestMetricCollector requestMetricCollector)
throws SdkClientException, AmazonServiceException {
setObjectAcl(new SetObjectAclRequest(bucketName, key, versionId, acl)
.<SetO... | [
"public",
"void",
"setObjectAcl",
"(",
"String",
"bucketName",
",",
"String",
"key",
",",
"String",
"versionId",
",",
"AccessControlList",
"acl",
",",
"RequestMetricCollector",
"requestMetricCollector",
")",
"throws",
"SdkClientException",
",",
"AmazonServiceException",
... | Same as {@link #setObjectAcl(String, String, String, AccessControlList)}
but allows specifying a request metric collector. | [
"Same",
"as",
"{"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L1147-L1152 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/ObjectUtils.java | ObjectUtils.compare | public static <T extends Comparable<? super T>> int compare(final T c1, final T c2) {
return compare(c1, c2, false);
} | java | public static <T extends Comparable<? super T>> int compare(final T c1, final T c2) {
return compare(c1, c2, false);
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"int",
"compare",
"(",
"final",
"T",
"c1",
",",
"final",
"T",
"c2",
")",
"{",
"return",
"compare",
"(",
"c1",
",",
"c2",
",",
"false",
")",
";",
"}"
] | <p>Null safe comparison of Comparables.
{@code null} is assumed to be less than a non-{@code null} value.</p>
@param <T> type of the values processed by this method
@param c1 the first comparable, may be null
@param c2 the second comparable, may be null
@return a negative value if c1 < c2, zero if c1 = c2
and a p... | [
"<p",
">",
"Null",
"safe",
"comparison",
"of",
"Comparables",
".",
"{",
"@code",
"null",
"}",
"is",
"assumed",
"to",
"be",
"less",
"than",
"a",
"non",
"-",
"{",
"@code",
"null",
"}",
"value",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/ObjectUtils.java#L550-L552 |
google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java | ParserAdapter.setFeature | public void setFeature (String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
if (name.equals(NAMESPACES)) {
checkNotParsing("feature", name);
namespaces = value;
if (!namespaces && !prefixes) {
prefixes = true;
}
} else if (name... | java | public void setFeature (String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
if (name.equals(NAMESPACES)) {
checkNotParsing("feature", name);
namespaces = value;
if (!namespaces && !prefixes) {
prefixes = true;
}
} else if (name... | [
"public",
"void",
"setFeature",
"(",
"String",
"name",
",",
"boolean",
"value",
")",
"throws",
"SAXNotRecognizedException",
",",
"SAXNotSupportedException",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"NAMESPACES",
")",
")",
"{",
"checkNotParsing",
"(",
"\"featu... | Set a feature flag for the parser.
<p>The only features recognized are namespaces and
namespace-prefixes.</p>
@param name The feature name, as a complete URI.
@param value The requested feature value.
@exception SAXNotRecognizedException If the feature
can't be assigned or retrieved.
@exception SAXNotSupportedExcepti... | [
"Set",
"a",
"feature",
"flag",
"for",
"the",
"parser",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java#L175-L196 |
landawn/AbacusUtil | src/com/landawn/abacus/util/N.java | N.binarySearch | public static <T> int binarySearch(final T[] a, final int fromIndex, final int toIndex, final T key, final Comparator<? super T> cmp) {
return Array.binarySearch(a, fromIndex, toIndex, key, cmp);
} | java | public static <T> int binarySearch(final T[] a, final int fromIndex, final int toIndex, final T key, final Comparator<? super T> cmp) {
return Array.binarySearch(a, fromIndex, toIndex, key, cmp);
} | [
"public",
"static",
"<",
"T",
">",
"int",
"binarySearch",
"(",
"final",
"T",
"[",
"]",
"a",
",",
"final",
"int",
"fromIndex",
",",
"final",
"int",
"toIndex",
",",
"final",
"T",
"key",
",",
"final",
"Comparator",
"<",
"?",
"super",
"T",
">",
"cmp",
... | {@link Arrays#binarySearch(Object[], int, int, Object, Comparator)}
@param a
@param fromIndex
@param toIndex
@param key
@param c
@return | [
"{",
"@link",
"Arrays#binarySearch",
"(",
"Object",
"[]",
"int",
"int",
"Object",
"Comparator",
")",
"}"
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L12295-L12297 |
samskivert/pythagoras | src/main/java/pythagoras/f/Crossing.java | Crossing.fixRoots | protected static int fixRoots (float[] res, int rc) {
int tc = 0;
for (int i = 0; i < rc; i++) {
out: {
for (int j = i + 1; j < rc; j++) {
if (isZero(res[i] - res[j])) {
break out;
}
}
... | java | protected static int fixRoots (float[] res, int rc) {
int tc = 0;
for (int i = 0; i < rc; i++) {
out: {
for (int j = i + 1; j < rc; j++) {
if (isZero(res[i] - res[j])) {
break out;
}
}
... | [
"protected",
"static",
"int",
"fixRoots",
"(",
"float",
"[",
"]",
"res",
",",
"int",
"rc",
")",
"{",
"int",
"tc",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rc",
";",
"i",
"++",
")",
"{",
"out",
":",
"{",
"for",
"(",
... | Excludes double roots. Roots are double if they lies enough close with each other.
@param res the roots
@param rc the roots count
@return new roots count | [
"Excludes",
"double",
"roots",
".",
"Roots",
"are",
"double",
"if",
"they",
"lies",
"enough",
"close",
"with",
"each",
"other",
"."
] | train | https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Crossing.java#L111-L124 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java | BigtableDataClient.readRowsCallable | public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<RowT> rowAdapter) {
return stub.createReadRowsCallable(rowAdapter);
} | java | public <RowT> ServerStreamingCallable<Query, RowT> readRowsCallable(RowAdapter<RowT> rowAdapter) {
return stub.createReadRowsCallable(rowAdapter);
} | [
"public",
"<",
"RowT",
">",
"ServerStreamingCallable",
"<",
"Query",
",",
"RowT",
">",
"readRowsCallable",
"(",
"RowAdapter",
"<",
"RowT",
">",
"rowAdapter",
")",
"{",
"return",
"stub",
".",
"createReadRowsCallable",
"(",
"rowAdapter",
")",
";",
"}"
] | Streams back the results of the query. This callable allows for customization of the logical
representation of a row. It's meant for advanced use cases.
<p>Sample code:
<pre>{@code
try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
String tableId = "[TABLE]";
Query q... | [
"Streams",
"back",
"the",
"results",
"of",
"the",
"query",
".",
"This",
"callable",
"allows",
"for",
"customization",
"of",
"the",
"logical",
"representation",
"of",
"a",
"row",
".",
"It",
"s",
"meant",
"for",
"advanced",
"use",
"cases",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java#L666-L668 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java | SeaGlassSynthPainterImpl.paintTabbedPaneTabBackground | public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex) {
paintBackground(context, g, x, y, w, h, null);
} | java | public void paintTabbedPaneTabBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int tabIndex) {
paintBackground(context, g, x, y, w, h, null);
} | [
"public",
"void",
"paintTabbedPaneTabBackground",
"(",
"SynthContext",
"context",
",",
"Graphics",
"g",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"w",
",",
"int",
"h",
",",
"int",
"tabIndex",
")",
"{",
"paintBackground",
"(",
"context",
",",
"g",
","... | Paints the background of a tab of a tabbed pane.
@param context SynthContext identifying the <code>JComponent</code> and
<code>Region</code> to paint to
@param g <code>Graphics</code> to paint to
@param x X coordinate of the area to paint to
@param y Y coordinate of the area to paint to
@param w ... | [
"Paints",
"the",
"background",
"of",
"a",
"tab",
"of",
"a",
"tabbed",
"pane",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java#L2048-L2050 |
ops4j/org.ops4j.pax.swissbox | pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/BundleUtils.java | BundleUtils.getBundle | public static Bundle getBundle( BundleContext bc, String symbolicName, String version )
{
for( Bundle bundle : bc.getBundles() )
{
if( bundle.getSymbolicName().equals( symbolicName ) )
{
if( version == null || version.equals( bundle.getVersion() ) )
... | java | public static Bundle getBundle( BundleContext bc, String symbolicName, String version )
{
for( Bundle bundle : bc.getBundles() )
{
if( bundle.getSymbolicName().equals( symbolicName ) )
{
if( version == null || version.equals( bundle.getVersion() ) )
... | [
"public",
"static",
"Bundle",
"getBundle",
"(",
"BundleContext",
"bc",
",",
"String",
"symbolicName",
",",
"String",
"version",
")",
"{",
"for",
"(",
"Bundle",
"bundle",
":",
"bc",
".",
"getBundles",
"(",
")",
")",
"{",
"if",
"(",
"bundle",
".",
"getSymb... | Returns the bundle with the given symbolic name and the given version, or null if no such
bundle exists
@param bc bundle context
@param symbolicName bundle symbolic name
@param version bundle version
@return matching bundle, or null | [
"Returns",
"the",
"bundle",
"with",
"the",
"given",
"symbolic",
"name",
"and",
"the",
"given",
"version",
"or",
"null",
"if",
"no",
"such",
"bundle",
"exists"
] | train | https://github.com/ops4j/org.ops4j.pax.swissbox/blob/00b0ee16cdbe8017984a4d7ba808b10d985c5b5c/pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/BundleUtils.java#L128-L141 |
Multifarious/MacroManager | src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java | MeteredBalancingPolicy.drainToLoad | protected void drainToLoad(long targetLoad, int time, boolean useHandoff)
{
final double startingLoad = myLoad();
double currentLoad = startingLoad;
List<String> drainList = new LinkedList<String>();
Set<String> eligibleToDrop = new LinkedHashSet<String>(cluster.myWorkUnits);
... | java | protected void drainToLoad(long targetLoad, int time, boolean useHandoff)
{
final double startingLoad = myLoad();
double currentLoad = startingLoad;
List<String> drainList = new LinkedList<String>();
Set<String> eligibleToDrop = new LinkedHashSet<String>(cluster.myWorkUnits);
... | [
"protected",
"void",
"drainToLoad",
"(",
"long",
"targetLoad",
",",
"int",
"time",
",",
"boolean",
"useHandoff",
")",
"{",
"final",
"double",
"startingLoad",
"=",
"myLoad",
"(",
")",
";",
"double",
"currentLoad",
"=",
"startingLoad",
";",
"List",
"<",
"Strin... | Drains excess load on this node down to a fraction distributed across the cluster.
The target load is set to (clusterLoad / # nodes). | [
"Drains",
"excess",
"load",
"on",
"this",
"node",
"down",
"to",
"a",
"fraction",
"distributed",
"across",
"the",
"cluster",
".",
"The",
"target",
"load",
"is",
"set",
"to",
"(",
"clusterLoad",
"/",
"#",
"nodes",
")",
"."
] | train | https://github.com/Multifarious/MacroManager/blob/559785839981f460aaeba3c3fddff7fb667d9581/src/main/java/com/fasterxml/mama/balancing/MeteredBalancingPolicy.java#L200-L228 |
networknt/light-4j | dump/src/main/java/com/networknt/dump/StatusCodeDumper.java | StatusCodeDumper.putDumpInfoTo | @Override
protected void putDumpInfoTo(Map<String, Object> result) {
if(StringUtils.isNotBlank(this.statusCodeResult)) {
result.put(DumpConstants.STATUS_CODE, this.statusCodeResult);
}
} | java | @Override
protected void putDumpInfoTo(Map<String, Object> result) {
if(StringUtils.isNotBlank(this.statusCodeResult)) {
result.put(DumpConstants.STATUS_CODE, this.statusCodeResult);
}
} | [
"@",
"Override",
"protected",
"void",
"putDumpInfoTo",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"this",
".",
"statusCodeResult",
")",
")",
"{",
"result",
".",
"put",
"(",
"DumpCo... | put this.statusCodeResult to result
@param result a Map you want to put dumping info to. | [
"put",
"this",
".",
"statusCodeResult",
"to",
"result"
] | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/dump/src/main/java/com/networknt/dump/StatusCodeDumper.java#L48-L53 |
Azure/azure-sdk-for-java | iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java | CertificatesInner.createOrUpdateAsync | public Observable<CertificateDescriptionInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String certificateName) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).map(new Func1<ServiceResponse<CertificateDescriptionInner>, CertificateDescr... | java | public Observable<CertificateDescriptionInner> createOrUpdateAsync(String resourceGroupName, String resourceName, String certificateName) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).map(new Func1<ServiceResponse<CertificateDescriptionInner>, CertificateDescr... | [
"public",
"Observable",
"<",
"CertificateDescriptionInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
",",
"String",
"certificateName",
")",
"{",
"return",
"createOrUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",... | Upload the certificate to the IoT hub.
Adds new or replaces existing certificate.
@param resourceGroupName The name of the resource group that contains the IoT hub.
@param resourceName The name of the IoT hub.
@param certificateName The name of the certificate
@throws IllegalArgumentException thrown if parameters fail... | [
"Upload",
"the",
"certificate",
"to",
"the",
"IoT",
"hub",
".",
"Adds",
"new",
"or",
"replaces",
"existing",
"certificate",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java#L314-L321 |
apache/spark | core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java | UnsafeInMemorySorter.getSortedIterator | public UnsafeSorterIterator getSortedIterator() {
int offset = 0;
long start = System.nanoTime();
if (sortComparator != null) {
if (this.radixSortSupport != null) {
offset = RadixSort.sortKeyPrefixArray(
array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7,
radixSortS... | java | public UnsafeSorterIterator getSortedIterator() {
int offset = 0;
long start = System.nanoTime();
if (sortComparator != null) {
if (this.radixSortSupport != null) {
offset = RadixSort.sortKeyPrefixArray(
array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7,
radixSortS... | [
"public",
"UnsafeSorterIterator",
"getSortedIterator",
"(",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"long",
"start",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"if",
"(",
"sortComparator",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"radixSortS... | Return an iterator over record pointers in sorted order. For efficiency, all calls to
{@code next()} will return the same mutable object. | [
"Return",
"an",
"iterator",
"over",
"record",
"pointers",
"in",
"sorted",
"order",
".",
"For",
"efficiency",
"all",
"calls",
"to",
"{"
] | train | https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java#L344-L380 |
baratine/baratine | framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java | XmlWriter.writeAttribute | public void writeAttribute(String name, Object value)
{
if (!_isElementOpen)
throw new IllegalStateException("no open element");
if (value == null)
return;
_isElementOpen = false;
try {
_strategy.writeAttribute(this, name, value);
}
finally {
_isElementOpen = true;
... | java | public void writeAttribute(String name, Object value)
{
if (!_isElementOpen)
throw new IllegalStateException("no open element");
if (value == null)
return;
_isElementOpen = false;
try {
_strategy.writeAttribute(this, name, value);
}
finally {
_isElementOpen = true;
... | [
"public",
"void",
"writeAttribute",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"!",
"_isElementOpen",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"no open element\"",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"return"... | Write an attribute with a value, if value is null nothing is written.
@throws IllegalStateException if the is no element is open | [
"Write",
"an",
"attribute",
"with",
"a",
"value",
"if",
"value",
"is",
"null",
"nothing",
"is",
"written",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/XmlWriter.java#L291-L307 |
radkovo/SwingBox | src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java | DelegateView.viewToModel | @Override
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias)
{
if (view != null)
{
int retValue = view.viewToModel(x, y, a, bias);
return retValue;
}
return -1;
} | java | @Override
public int viewToModel(float x, float y, Shape a, Position.Bias[] bias)
{
if (view != null)
{
int retValue = view.viewToModel(x, y, a, bias);
return retValue;
}
return -1;
} | [
"@",
"Override",
"public",
"int",
"viewToModel",
"(",
"float",
"x",
",",
"float",
"y",
",",
"Shape",
"a",
",",
"Position",
".",
"Bias",
"[",
"]",
"bias",
")",
"{",
"if",
"(",
"view",
"!=",
"null",
")",
"{",
"int",
"retValue",
"=",
"view",
".",
"v... | Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
@param x
x coordinate of the view location to convert
@param y
y coordinate of the view location to convert
@param a
the allocated region to render into
@return the location within the model that best represents the given
p... | [
"Provides",
"a",
"mapping",
"from",
"the",
"view",
"coordinate",
"space",
"to",
"the",
"logical",
"coordinate",
"space",
"of",
"the",
"model",
"."
] | train | https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/view/DelegateView.java#L413-L422 |
stratosphere/stratosphere | stratosphere-core/src/main/java/eu/stratosphere/configuration/Configuration.java | Configuration.getDouble | public double getDouble(String key, double defaultValue) {
String val = getStringInternal(key);
if (val == null) {
return defaultValue;
} else {
return Double.parseDouble(val);
}
} | java | public double getDouble(String key, double defaultValue) {
String val = getStringInternal(key);
if (val == null) {
return defaultValue;
} else {
return Double.parseDouble(val);
}
} | [
"public",
"double",
"getDouble",
"(",
"String",
"key",
",",
"double",
"defaultValue",
")",
"{",
"String",
"val",
"=",
"getStringInternal",
"(",
"key",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return",
"defaultValue",
";",
"}",
"else",
"{",
... | Returns the value associated with the given key as a double.
@param key
the key pointing to the associated value
@param defaultValue
the default value which is returned in case there is no value associated with the given key
@return the (default) value associated with the given key | [
"Returns",
"the",
"value",
"associated",
"with",
"the",
"given",
"key",
"as",
"a",
"double",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/Configuration.java#L302-L309 |
VoltDB/voltdb | src/frontend/org/voltdb/ExportStatsBase.java | ExportStatsBase.populateColumnSchema | @Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
super.populateColumnSchema(columns);
columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
columns.add(new ColumnInfo(Columns.PARTITION_ID, VoltType.BIGINT));
column... | java | @Override
protected void populateColumnSchema(ArrayList<ColumnInfo> columns) {
super.populateColumnSchema(columns);
columns.add(new ColumnInfo(VoltSystemProcedure.CNAME_SITE_ID, VoltSystemProcedure.CTYPE_ID));
columns.add(new ColumnInfo(Columns.PARTITION_ID, VoltType.BIGINT));
column... | [
"@",
"Override",
"protected",
"void",
"populateColumnSchema",
"(",
"ArrayList",
"<",
"ColumnInfo",
">",
"columns",
")",
"{",
"super",
".",
"populateColumnSchema",
"(",
"columns",
")",
";",
"columns",
".",
"add",
"(",
"new",
"ColumnInfo",
"(",
"VoltSystemProcedur... | Check cluster.py and checkstats.py if order of the columns is changed, | [
"Check",
"cluster",
".",
"py",
"and",
"checkstats",
".",
"py",
"if",
"order",
"of",
"the",
"columns",
"is",
"changed"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ExportStatsBase.java#L90-L106 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/MapPolylineTreeSet.java | MapPolylineTreeSet.getNearestEnd | @Override
@Pure
public P getNearestEnd(double x, double y) {
return NearNodeSelector.getNearest(getTree(), x, y);
} | java | @Override
@Pure
public P getNearestEnd(double x, double y) {
return NearNodeSelector.getNearest(getTree(), x, y);
} | [
"@",
"Override",
"@",
"Pure",
"public",
"P",
"getNearestEnd",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"return",
"NearNodeSelector",
".",
"getNearest",
"(",
"getTree",
"(",
")",
",",
"x",
",",
"y",
")",
";",
"}"
] | {@inheritDoc}
The nearest neighbor (NN) algorithm, to find the NN to a given target
point not in the tree, relies on the ability to discard large portions
of the tree by performing a simple test. To perform the NN calculation,
the tree is searched in a depth-first fashion, refining the nearest
distance. First the root ... | [
"{"
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/MapPolylineTreeSet.java#L152-L156 |
wcm-io-caravan/caravan-commons | performance/src/main/java/io/wcm/caravan/common/performance/PerformanceMetrics.java | PerformanceMetrics.createNext | public PerformanceMetrics createNext(String nextAction, String nextDescriptor, Class nextActionClass) {
PerformanceMetrics next = new PerformanceMetrics(key, level + 1, nextAction, nextActionClass, nextDescriptor, correlationId);
next.previous = this;
return next;
} | java | public PerformanceMetrics createNext(String nextAction, String nextDescriptor, Class nextActionClass) {
PerformanceMetrics next = new PerformanceMetrics(key, level + 1, nextAction, nextActionClass, nextDescriptor, correlationId);
next.previous = this;
return next;
} | [
"public",
"PerformanceMetrics",
"createNext",
"(",
"String",
"nextAction",
",",
"String",
"nextDescriptor",
",",
"Class",
"nextActionClass",
")",
"{",
"PerformanceMetrics",
"next",
"=",
"new",
"PerformanceMetrics",
"(",
"key",
",",
"level",
"+",
"1",
",",
"nextAct... | Creates new instance of performance metrics. Stores the key and correlation id of the parent metrics instance.
Assigns next level.
@param nextAction a short name of measured operation, typically a first prefix of descriptor
@param nextActionClass a class which implements the action
@param nextDescriptor a full descript... | [
"Creates",
"new",
"instance",
"of",
"performance",
"metrics",
".",
"Stores",
"the",
"key",
"and",
"correlation",
"id",
"of",
"the",
"parent",
"metrics",
"instance",
".",
"Assigns",
"next",
"level",
"."
] | train | https://github.com/wcm-io-caravan/caravan-commons/blob/12e605bdfeb5a1ce7404e30d9f32274552cb8ce8/performance/src/main/java/io/wcm/caravan/common/performance/PerformanceMetrics.java#L96-L100 |
xcesco/kripton | kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java | AbstractDataSource.onUpgrade | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (AbstractDataSource.this.options.databaseLifecycleHandler != null) {
AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, true);
versionChanged = true;
}
} | java | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (AbstractDataSource.this.options.databaseLifecycleHandler != null) {
AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, true);
versionChanged = true;
}
} | [
"public",
"void",
"onUpgrade",
"(",
"SQLiteDatabase",
"db",
",",
"int",
"oldVersion",
",",
"int",
"newVersion",
")",
"{",
"if",
"(",
"AbstractDataSource",
".",
"this",
".",
"options",
".",
"databaseLifecycleHandler",
"!=",
"null",
")",
"{",
"AbstractDataSource",... | On upgrade.
@param db
the db
@param oldVersion
the old version
@param newVersion
the new version | [
"On",
"upgrade",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/AbstractDataSource.java#L554-L559 |
alkacon/opencms-core | src/org/opencms/workflow/CmsDefaultWorkflowManager.java | CmsDefaultWorkflowManager.createProjectBeanFromProject | public static CmsProjectBean createProjectBeanFromProject(CmsObject cms, CmsProject project) {
CmsProjectBean manProj = new CmsProjectBean(
project.getUuid(),
project.getType().getMode(),
org.opencms.ade.publish.Messages.get().getBundle(OpenCms.getWorkplaceManager().get... | java | public static CmsProjectBean createProjectBeanFromProject(CmsObject cms, CmsProject project) {
CmsProjectBean manProj = new CmsProjectBean(
project.getUuid(),
project.getType().getMode(),
org.opencms.ade.publish.Messages.get().getBundle(OpenCms.getWorkplaceManager().get... | [
"public",
"static",
"CmsProjectBean",
"createProjectBeanFromProject",
"(",
"CmsObject",
"cms",
",",
"CmsProject",
"project",
")",
"{",
"CmsProjectBean",
"manProj",
"=",
"new",
"CmsProjectBean",
"(",
"project",
".",
"getUuid",
"(",
")",
",",
"project",
".",
"getTyp... | Creates a project bean from a real project.<p>
@param cms the CMS context
@param project the project
@return the bean containing the project information | [
"Creates",
"a",
"project",
"bean",
"from",
"a",
"real",
"project",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/CmsDefaultWorkflowManager.java#L125-L135 |
liferay/com-liferay-commerce | commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPSpecificationOptionWrapper.java | CPSpecificationOptionWrapper.setDescriptionMap | @Override
public void setDescriptionMap(Map<java.util.Locale, String> descriptionMap) {
_cpSpecificationOption.setDescriptionMap(descriptionMap);
} | java | @Override
public void setDescriptionMap(Map<java.util.Locale, String> descriptionMap) {
_cpSpecificationOption.setDescriptionMap(descriptionMap);
} | [
"@",
"Override",
"public",
"void",
"setDescriptionMap",
"(",
"Map",
"<",
"java",
".",
"util",
".",
"Locale",
",",
"String",
">",
"descriptionMap",
")",
"{",
"_cpSpecificationOption",
".",
"setDescriptionMap",
"(",
"descriptionMap",
")",
";",
"}"
] | Sets the localized descriptions of this cp specification option from the map of locales and localized descriptions.
@param descriptionMap the locales and localized descriptions of this cp specification option | [
"Sets",
"the",
"localized",
"descriptions",
"of",
"this",
"cp",
"specification",
"option",
"from",
"the",
"map",
"of",
"locales",
"and",
"localized",
"descriptions",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPSpecificationOptionWrapper.java#L635-L638 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.