repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
VoltDB/voltdb | src/frontend/org/voltdb/CatalogContext.java | CatalogContext.classForProcedureOrUDF | public Class<?> classForProcedureOrUDF(String procedureClassName)
throws LinkageError, ExceptionInInitializerError, ClassNotFoundException {
"""
Given a class name in the catalog jar, loads it from the jar, even if the
jar is served from an URL and isn't in the classpath.
@param procedureClassName ... | java | public Class<?> classForProcedureOrUDF(String procedureClassName)
throws LinkageError, ExceptionInInitializerError, ClassNotFoundException {
return classForProcedureOrUDF(procedureClassName, m_catalogInfo.m_jarfile.getLoader());
} | [
"public",
"Class",
"<",
"?",
">",
"classForProcedureOrUDF",
"(",
"String",
"procedureClassName",
")",
"throws",
"LinkageError",
",",
"ExceptionInInitializerError",
",",
"ClassNotFoundException",
"{",
"return",
"classForProcedureOrUDF",
"(",
"procedureClassName",
",",
"m_c... | Given a class name in the catalog jar, loads it from the jar, even if the
jar is served from an URL and isn't in the classpath.
@param procedureClassName The name of the class to load.
@return A java Class variable associated with the class.
@throws ClassNotFoundException if the class is not in the jar file. | [
"Given",
"a",
"class",
"name",
"in",
"the",
"catalog",
"jar",
"loads",
"it",
"from",
"the",
"jar",
"even",
"if",
"the",
"jar",
"is",
"served",
"from",
"an",
"URL",
"and",
"isn",
"t",
"in",
"the",
"classpath",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/CatalogContext.java#L384-L387 |
mlhartme/mork | src/main/java/net/oneandone/mork/reflect/Constant.java | Constant.fillParas | public static Function fillParas(Function func, int ofs, Object[] paras) {
"""
Replaces arguments to Functions by Constant Functions. Results in
Functions with fewer arguments.
@param func Functions whose arguments are filled in
@param ofs first argument to be filled
@param paras Values for Constants use... | java | public static Function fillParas(Function func, int ofs, Object[] paras) {
int i;
if (func == null) {
throw new NullPointerException();
}
for (i = 0; i < paras.length; i++) {
// ofs is not changed!
func = Composition.create(func, ofs,
... | [
"public",
"static",
"Function",
"fillParas",
"(",
"Function",
"func",
",",
"int",
"ofs",
",",
"Object",
"[",
"]",
"paras",
")",
"{",
"int",
"i",
";",
"if",
"(",
"func",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}... | Replaces arguments to Functions by Constant Functions. Results in
Functions with fewer arguments.
@param func Functions whose arguments are filled in
@param ofs first argument to be filled
@param paras Values for Constants used to fill arguments
@return Function with filled arguments. | [
"Replaces",
"arguments",
"to",
"Functions",
"by",
"Constant",
"Functions",
".",
"Results",
"in",
"Functions",
"with",
"fewer",
"arguments",
"."
] | train | https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Constant.java#L66-L84 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java | KunderaQuery.setParameter | public final void setParameter(String name, Object value) {
"""
Sets the parameter.
@param name
the name
@param value
the value
"""
if (isNative()) {
bindParameters.add(new BindParameter(name, value));
} else {
setParameterValue(":" + name, value);
}
... | java | public final void setParameter(String name, Object value) {
if (isNative()) {
bindParameters.add(new BindParameter(name, value));
} else {
setParameterValue(":" + name, value);
}
parametersMap.put(":" + name, value);
} | [
"public",
"final",
"void",
"setParameter",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"isNative",
"(",
")",
")",
"{",
"bindParameters",
".",
"add",
"(",
"new",
"BindParameter",
"(",
"name",
",",
"value",
")",
")",
";",
"}",
"... | Sets the parameter.
@param name
the name
@param value
the value | [
"Sets",
"the",
"parameter",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java#L821-L829 |
Alexey1Gavrilov/ExpectIt | expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java | ExpectBuilder.withInputFilters | public final ExpectBuilder withInputFilters(Filter filter, Filter... moreFilters) {
"""
Sets a filter for the input. Optional, by default no filter is applied.
<p/>
Filters can be used to modify the input before performing expect operations. For example,
to remove
non-printable characters. Filters can be switc... | java | public final ExpectBuilder withInputFilters(Filter filter, Filter... moreFilters) {
if (moreFilters.length == 0) {
this.filter = filter;
} else {
Filter[] filters = new Filter[moreFilters.length + 1];
filters[0] = filter;
System.arraycopy(moreFilters, 0, f... | [
"public",
"final",
"ExpectBuilder",
"withInputFilters",
"(",
"Filter",
"filter",
",",
"Filter",
"...",
"moreFilters",
")",
"{",
"if",
"(",
"moreFilters",
".",
"length",
"==",
"0",
")",
"{",
"this",
".",
"filter",
"=",
"filter",
";",
"}",
"else",
"{",
"Fi... | Sets a filter for the input. Optional, by default no filter is applied.
<p/>
Filters can be used to modify the input before performing expect operations. For example,
to remove
non-printable characters. Filters can be switched on and off while working with the expect
instance.
@param filter the filter
@param more... | [
"Sets",
"a",
"filter",
"for",
"the",
"input",
".",
"Optional",
"by",
"default",
"no",
"filter",
"is",
"applied",
".",
"<p",
"/",
">",
"Filters",
"can",
"be",
"used",
"to",
"modify",
"the",
"input",
"before",
"performing",
"expect",
"operations",
".",
"Fo... | train | https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java#L210-L220 |
alkacon/opencms-core | src/org/opencms/relations/CmsCategoryService.java | CmsCategoryService.repairRelations | public void repairRelations(CmsObject cms, String resourceName) throws CmsException {
"""
Repairs broken category relations.<p>
This could be caused by renaming/moving a category folder,
or changing the category repositories base folder name.<p>
Also repairs problems when creating/deleting conflicting
cate... | java | public void repairRelations(CmsObject cms, String resourceName) throws CmsException {
repairRelations(cms, cms.readResource(resourceName));
} | [
"public",
"void",
"repairRelations",
"(",
"CmsObject",
"cms",
",",
"String",
"resourceName",
")",
"throws",
"CmsException",
"{",
"repairRelations",
"(",
"cms",
",",
"cms",
".",
"readResource",
"(",
"resourceName",
")",
")",
";",
"}"
] | Repairs broken category relations.<p>
This could be caused by renaming/moving a category folder,
or changing the category repositories base folder name.<p>
Also repairs problems when creating/deleting conflicting
category folders across several repositories.<p>
The resource has to be previously locked.<p>
@param cm... | [
"Repairs",
"broken",
"category",
"relations",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L748-L751 |
Netflix/conductor | core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java | WorkflowServiceImpl.terminateWorkflow | @Service
public void terminateWorkflow(String workflowId, String reason) {
"""
Terminate workflow execution.
@param workflowId WorkflowId of the workflow.
@param reason Reason for terminating the workflow.
"""
workflowExecutor.terminateWorkflow(workflowId, reason);
} | java | @Service
public void terminateWorkflow(String workflowId, String reason) {
workflowExecutor.terminateWorkflow(workflowId, reason);
} | [
"@",
"Service",
"public",
"void",
"terminateWorkflow",
"(",
"String",
"workflowId",
",",
"String",
"reason",
")",
"{",
"workflowExecutor",
".",
"terminateWorkflow",
"(",
"workflowId",
",",
"reason",
")",
";",
"}"
] | Terminate workflow execution.
@param workflowId WorkflowId of the workflow.
@param reason Reason for terminating the workflow. | [
"Terminate",
"workflow",
"execution",
"."
] | train | https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/WorkflowServiceImpl.java#L322-L325 |
gnagy/webhejj-commons | src/main/java/hu/webhejj/commons/collections/ArrayUtils.java | ArrayUtils.addToSortedCharArray | public static char[] addToSortedCharArray(char[] a, char value) {
"""
insert value into the sorted array a, at the index returned by java.util.Arrays.binarySearch()
@param a array to add to, may be null
@param value value to add to a
@return new sorted array with value added
"""
if(a == null || a.lengt... | java | public static char[] addToSortedCharArray(char[] a, char value) {
if(a == null || a.length == 0) {
return new char[] {value};
}
int insertionPochar = -java.util.Arrays.binarySearch(a, value) - 1;
if(insertionPochar < 0) {
throw new IllegalArgumentException(String.format("Element %d already exists in... | [
"public",
"static",
"char",
"[",
"]",
"addToSortedCharArray",
"(",
"char",
"[",
"]",
"a",
",",
"char",
"value",
")",
"{",
"if",
"(",
"a",
"==",
"null",
"||",
"a",
".",
"length",
"==",
"0",
")",
"{",
"return",
"new",
"char",
"[",
"]",
"{",
"value"... | insert value into the sorted array a, at the index returned by java.util.Arrays.binarySearch()
@param a array to add to, may be null
@param value value to add to a
@return new sorted array with value added | [
"insert",
"value",
"into",
"the",
"sorted",
"array",
"a",
"at",
"the",
"index",
"returned",
"by",
"java",
".",
"util",
".",
"Arrays",
".",
"binarySearch",
"()"
] | train | https://github.com/gnagy/webhejj-commons/blob/270bc6f111ec5761af31d39bd38c40fd914d2eba/src/main/java/hu/webhejj/commons/collections/ArrayUtils.java#L131-L152 |
FINRAOS/JTAF-ExtWebDriver | src/main/java/org/finra/jtaf/ewd/session/SessionManager.java | SessionManager.getNewSession | public ExtWebDriver getNewSession(Map<String, String> override, boolean setAsCurrent)
throws Exception {
"""
Create and return a new ExtWebDriver instance. The instance is
constructed with default options, with the provided Map of key/value
pairs overriding the corresponding pairs in the options.
... | java | public ExtWebDriver getNewSession(Map<String, String> override, boolean setAsCurrent)
throws Exception {
Map<String, String> options = sessionFactory.get().createDefaultOptions();
for (Entry<String, String> opt : override.entrySet()) {
options.put(opt.getKey(), opt.getValue());... | [
"public",
"ExtWebDriver",
"getNewSession",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"override",
",",
"boolean",
"setAsCurrent",
")",
"throws",
"Exception",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"options",
"=",
"sessionFactory",
".",
"get",
"("... | Create and return a new ExtWebDriver instance. The instance is
constructed with default options, with the provided Map of key/value
pairs overriding the corresponding pairs in the options.
@param override
A Map of options to be overridden
@param setAsCurrent
set to true if the new session should become the current
ses... | [
"Create",
"and",
"return",
"a",
"new",
"ExtWebDriver",
"instance",
".",
"The",
"instance",
"is",
"constructed",
"with",
"default",
"options",
"with",
"the",
"provided",
"Map",
"of",
"key",
"/",
"value",
"pairs",
"overriding",
"the",
"corresponding",
"pairs",
"... | train | https://github.com/FINRAOS/JTAF-ExtWebDriver/blob/78d646def1bf0904f79b19a81df0241e07f2c73a/src/main/java/org/finra/jtaf/ewd/session/SessionManager.java#L336-L346 |
joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setBaselineStart | public void setBaselineStart(int baselineNumber, Date value) {
"""
Set a baseline value.
@param baselineNumber baseline index (1-10)
@param value baseline value
"""
set(selectField(AssignmentFieldLists.BASELINE_STARTS, baselineNumber), value);
} | java | public void setBaselineStart(int baselineNumber, Date value)
{
set(selectField(AssignmentFieldLists.BASELINE_STARTS, baselineNumber), value);
} | [
"public",
"void",
"setBaselineStart",
"(",
"int",
"baselineNumber",
",",
"Date",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"BASELINE_STARTS",
",",
"baselineNumber",
")",
",",
"value",
")",
";",
"}"
] | Set a baseline value.
@param baselineNumber baseline index (1-10)
@param value baseline value | [
"Set",
"a",
"baseline",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1430-L1433 |
syphr42/prom | src/main/java/org/syphr/prom/ManagedProperties.java | ManagedProperties.setProperty | public boolean setProperty(String propertyName, String value) throws NullPointerException {
"""
Set a new value for the given property.
@param propertyName
the property whose value will be set
@param value
the new value to set
@return <code>true</code> if the value of the given property changed as a
result... | java | public boolean setProperty(String propertyName, String value) throws NullPointerException
{
return setValue(propertyName, value, false);
} | [
"public",
"boolean",
"setProperty",
"(",
"String",
"propertyName",
",",
"String",
"value",
")",
"throws",
"NullPointerException",
"{",
"return",
"setValue",
"(",
"propertyName",
",",
"value",
",",
"false",
")",
";",
"}"
] | Set a new value for the given property.
@param propertyName
the property whose value will be set
@param value
the new value to set
@return <code>true</code> if the value of the given property changed as a
result of this call; <code>false</code> otherwise
@throws NullPointerException
if the give value is <code>null</co... | [
"Set",
"a",
"new",
"value",
"for",
"the",
"given",
"property",
"."
] | train | https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/ManagedProperties.java#L345-L348 |
kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java | CompiledFEELSemanticMappings.lte | public static Boolean lte(Object left, Object right) {
"""
FEEL spec Table 42 and derivations
Delegates to {@link EvalHelper} except evaluationcontext
"""
return or(lt(left, right),
eq(left, right)); // do not use Java || to avoid potential NPE due to FEEL 3vl.
} | java | public static Boolean lte(Object left, Object right) {
return or(lt(left, right),
eq(left, right)); // do not use Java || to avoid potential NPE due to FEEL 3vl.
} | [
"public",
"static",
"Boolean",
"lte",
"(",
"Object",
"left",
",",
"Object",
"right",
")",
"{",
"return",
"or",
"(",
"lt",
"(",
"left",
",",
"right",
")",
",",
"eq",
"(",
"left",
",",
"right",
")",
")",
";",
"// do not use Java || to avoid potential NPE due... | FEEL spec Table 42 and derivations
Delegates to {@link EvalHelper} except evaluationcontext | [
"FEEL",
"spec",
"Table",
"42",
"and",
"derivations",
"Delegates",
"to",
"{"
] | train | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java#L339-L342 |
eurekaclinical/eurekaclinical-standard-apis | src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java | EurekaClinicalProperties.getIntValue | protected final int getIntValue(final String propertyName, int defaultValue) {
"""
Utility method to get an int from the properties file.
@param propertyName The name of the property.
@param defaultValue The default value to return, if the property is not
found, or is malformed.
@return The property value, a... | java | protected final int getIntValue(final String propertyName, int defaultValue) {
int result;
String property = this.properties.getProperty(propertyName);
try {
result = Integer.parseInt(property);
} catch (NumberFormatException e) {
LOGGER.warn("Invalid integer prop... | [
"protected",
"final",
"int",
"getIntValue",
"(",
"final",
"String",
"propertyName",
",",
"int",
"defaultValue",
")",
"{",
"int",
"result",
";",
"String",
"property",
"=",
"this",
".",
"properties",
".",
"getProperty",
"(",
"propertyName",
")",
";",
"try",
"{... | Utility method to get an int from the properties file.
@param propertyName The name of the property.
@param defaultValue The default value to return, if the property is not
found, or is malformed.
@return The property value, as an int. | [
"Utility",
"method",
"to",
"get",
"an",
"int",
"from",
"the",
"properties",
"file",
"."
] | train | https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/props/EurekaClinicalProperties.java#L229-L240 |
pmwmedia/tinylog | tinylog-impl/src/main/java/org/tinylog/writers/AbstractFormatPatternWriter.java | AbstractFormatPatternWriter.createByteArrayWriter | protected static ByteArrayWriter createByteArrayWriter(final String fileName, final boolean append, final boolean buffered,
final boolean threadSafe, final boolean shared) throws FileNotFoundException {
"""
Creates a {@link ByteArrayWriter} for a file.
@param fileName
Name of file to open for writing
@param... | java | protected static ByteArrayWriter createByteArrayWriter(final String fileName, final boolean append, final boolean buffered,
final boolean threadSafe, final boolean shared) throws FileNotFoundException {
File file = new File(fileName).getAbsoluteFile();
file.getParentFile().mkdirs();
FileOutputStream stream = n... | [
"protected",
"static",
"ByteArrayWriter",
"createByteArrayWriter",
"(",
"final",
"String",
"fileName",
",",
"final",
"boolean",
"append",
",",
"final",
"boolean",
"buffered",
",",
"final",
"boolean",
"threadSafe",
",",
"final",
"boolean",
"shared",
")",
"throws",
... | Creates a {@link ByteArrayWriter} for a file.
@param fileName
Name of file to open for writing
@param append
An already existing file should be continued
@param buffered
Output should be buffered
@param threadSafe
Created writer must be thread-safe
@param shared
Output file is shared with other processes
@return Write... | [
"Creates",
"a",
"{",
"@link",
"ByteArrayWriter",
"}",
"for",
"a",
"file",
"."
] | train | https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/writers/AbstractFormatPatternWriter.java#L125-L142 |
liferay/com-liferay-commerce | commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java | CommerceOrderNotePersistenceImpl.fetchByC_ERC | @Override
public CommerceOrderNote fetchByC_ERC(long companyId,
String externalReferenceCode) {
"""
Returns the commerce order note where companyId = ? and externalReferenceCode = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param companyId the company ID
@param e... | java | @Override
public CommerceOrderNote fetchByC_ERC(long companyId,
String externalReferenceCode) {
return fetchByC_ERC(companyId, externalReferenceCode, true);
} | [
"@",
"Override",
"public",
"CommerceOrderNote",
"fetchByC_ERC",
"(",
"long",
"companyId",
",",
"String",
"externalReferenceCode",
")",
"{",
"return",
"fetchByC_ERC",
"(",
"companyId",
",",
"externalReferenceCode",
",",
"true",
")",
";",
"}"
] | Returns the commerce order note where companyId = ? and externalReferenceCode = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param companyId the company ID
@param externalReferenceCode the external reference code
@return the matching commerce order note, or <code>null</code>... | [
"Returns",
"the",
"commerce",
"order",
"note",
"where",
"companyId",
"=",
"?",
";",
"and",
"externalReferenceCode",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
"th... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderNotePersistenceImpl.java#L1224-L1228 |
CloudSlang/cs-actions | cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java | CacheUtils.saveSshSessionAndChannel | public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
"""
Save the SSH session and the channel in the cache.
@param session The SSH session.
@param channel The SSH channel.
@param sessionPara... | java | public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
final SSHConnection sshConnection;
if (channel != null) {
sshConnection = new SSHConnection(session, channel);
} else {
... | [
"public",
"static",
"boolean",
"saveSshSessionAndChannel",
"(",
"Session",
"session",
",",
"Channel",
"channel",
",",
"GlobalSessionObject",
"<",
"Map",
"<",
"String",
",",
"SSHConnection",
">",
">",
"sessionParam",
",",
"String",
"sessionId",
")",
"{",
"final",
... | Save the SSH session and the channel in the cache.
@param session The SSH session.
@param channel The SSH channel.
@param sessionParam The cache: GlobalSessionObject or SessionObject. | [
"Save",
"the",
"SSH",
"session",
"and",
"the",
"channel",
"in",
"the",
"cache",
"."
] | train | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java#L79-L96 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java | CoverageDataCore.getValue | public Double getValue(double latitude, double longitude) {
"""
Get the coverage data value at the coordinate
@param latitude
latitude
@param longitude
longitude
@return coverage data value
"""
CoverageDataRequest request = new CoverageDataRequest(latitude,
longitude);
CoverageDataResults values... | java | public Double getValue(double latitude, double longitude) {
CoverageDataRequest request = new CoverageDataRequest(latitude,
longitude);
CoverageDataResults values = getValues(request, 1, 1);
Double value = null;
if (values != null) {
value = values.getValues()[0][0];
}
return value;
} | [
"public",
"Double",
"getValue",
"(",
"double",
"latitude",
",",
"double",
"longitude",
")",
"{",
"CoverageDataRequest",
"request",
"=",
"new",
"CoverageDataRequest",
"(",
"latitude",
",",
"longitude",
")",
";",
"CoverageDataResults",
"values",
"=",
"getValues",
"(... | Get the coverage data value at the coordinate
@param latitude
latitude
@param longitude
longitude
@return coverage data value | [
"Get",
"the",
"coverage",
"data",
"value",
"at",
"the",
"coordinate"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1691-L1700 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java | CodepointHelper.verify | public static void verify (final AbstractCodepointIterator aIter, @Nonnull final ECodepointProfile eProfile) {
"""
Verifies a sequence of codepoints using the specified filter
@param aIter
codepoint iterator
@param eProfile
profile to use
"""
verify (aIter, eProfile.getFilter ());
} | java | public static void verify (final AbstractCodepointIterator aIter, @Nonnull final ECodepointProfile eProfile)
{
verify (aIter, eProfile.getFilter ());
} | [
"public",
"static",
"void",
"verify",
"(",
"final",
"AbstractCodepointIterator",
"aIter",
",",
"@",
"Nonnull",
"final",
"ECodepointProfile",
"eProfile",
")",
"{",
"verify",
"(",
"aIter",
",",
"eProfile",
".",
"getFilter",
"(",
")",
")",
";",
"}"
] | Verifies a sequence of codepoints using the specified filter
@param aIter
codepoint iterator
@param eProfile
profile to use | [
"Verifies",
"a",
"sequence",
"of",
"codepoints",
"using",
"the",
"specified",
"filter"
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java#L762-L765 |
Impetus/Kundera | src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java | MongoDBClient.onPersistGFS | private void onPersistGFS(Object entity, Object entityId, EntityMetadata entityMetadata, boolean isUpdate) {
"""
On persist GFS.
@param entity
the entity
@param entityId
the entityId
@param entityMetadata
the entity metadata
@param isUpdate
the is update
"""
KunderaGridFS gfs = new KunderaGri... | java | private void onPersistGFS(Object entity, Object entityId, EntityMetadata entityMetadata, boolean isUpdate)
{
KunderaGridFS gfs = new KunderaGridFS(mongoDb, entityMetadata.getTableName());
if (!isUpdate)
{
GridFSInputFile gfsInputFile = handler.getGFSInputFileFromEntity(gfs, entit... | [
"private",
"void",
"onPersistGFS",
"(",
"Object",
"entity",
",",
"Object",
"entityId",
",",
"EntityMetadata",
"entityMetadata",
",",
"boolean",
"isUpdate",
")",
"{",
"KunderaGridFS",
"gfs",
"=",
"new",
"KunderaGridFS",
"(",
"mongoDb",
",",
"entityMetadata",
".",
... | On persist GFS.
@param entity
the entity
@param entityId
the entityId
@param entityMetadata
the entity metadata
@param isUpdate
the is update | [
"On",
"persist",
"GFS",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java#L1164-L1214 |
graphhopper/graphhopper | core/src/main/java/com/graphhopper/storage/index/LocationIndexTree.java | LocationIndexTree.calculateRMin | final double calculateRMin(double lat, double lon, int paddingTiles) {
"""
Calculates the distance to the nearest tile border, where the tile border is the rectangular
region with dimension 2*paddingTiles + 1 and where the center tile contains the given lat/lon
coordinate
"""
GHPoint query = new GHPo... | java | final double calculateRMin(double lat, double lon, int paddingTiles) {
GHPoint query = new GHPoint(lat, lon);
long key = keyAlgo.encode(query);
GHPoint center = new GHPoint();
keyAlgo.decode(key, center);
// deltaLat and deltaLon comes from the LocationIndex:
double minL... | [
"final",
"double",
"calculateRMin",
"(",
"double",
"lat",
",",
"double",
"lon",
",",
"int",
"paddingTiles",
")",
"{",
"GHPoint",
"query",
"=",
"new",
"GHPoint",
"(",
"lat",
",",
"lon",
")",
";",
"long",
"key",
"=",
"keyAlgo",
".",
"encode",
"(",
"query... | Calculates the distance to the nearest tile border, where the tile border is the rectangular
region with dimension 2*paddingTiles + 1 and where the center tile contains the given lat/lon
coordinate | [
"Calculates",
"the",
"distance",
"to",
"the",
"nearest",
"tile",
"border",
"where",
"the",
"tile",
"border",
"is",
"the",
"rectangular",
"region",
"with",
"dimension",
"2",
"*",
"paddingTiles",
"+",
"1",
"and",
"where",
"the",
"center",
"tile",
"contains",
"... | train | https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/storage/index/LocationIndexTree.java#L399-L432 |
rundeck/rundeck | core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/NodeStepDataResultImpl.java | NodeStepDataResultImpl.with | public static NodeStepResult with(final NodeStepResult result, final WFSharedContext dataContext) {
"""
Add a data context to a source result
@param result
@param dataContext
@return
"""
return new NodeStepDataResultImpl(
result,
result.getException(),
... | java | public static NodeStepResult with(final NodeStepResult result, final WFSharedContext dataContext) {
return new NodeStepDataResultImpl(
result,
result.getException(),
result.getFailureReason(),
result.getFailureMessage(),
result.getF... | [
"public",
"static",
"NodeStepResult",
"with",
"(",
"final",
"NodeStepResult",
"result",
",",
"final",
"WFSharedContext",
"dataContext",
")",
"{",
"return",
"new",
"NodeStepDataResultImpl",
"(",
"result",
",",
"result",
".",
"getException",
"(",
")",
",",
"result",... | Add a data context to a source result
@param result
@param dataContext
@return | [
"Add",
"a",
"data",
"context",
"to",
"a",
"source",
"result"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/NodeStepDataResultImpl.java#L43-L53 |
haifengl/smile | core/src/main/java/smile/validation/Validation.java | Validation.loocv | public static <T> double loocv(RegressionTrainer<T> trainer, T[] x, double[] y, RegressionMeasure measure) {
"""
Leave-one-out cross validation of a regression model.
@param <T> the data type of input objects.
@param trainer a regression model trainer that is properly parameterized.
@param x the test data set... | java | public static <T> double loocv(RegressionTrainer<T> trainer, T[] x, double[] y, RegressionMeasure measure) {
int n = x.length;
double[] predictions = new double[n];
LOOCV loocv = new LOOCV(n);
for (int i = 0; i < n; i++) {
T[] trainx = Math.slice(x, loocv.train[i]);
... | [
"public",
"static",
"<",
"T",
">",
"double",
"loocv",
"(",
"RegressionTrainer",
"<",
"T",
">",
"trainer",
",",
"T",
"[",
"]",
"x",
",",
"double",
"[",
"]",
"y",
",",
"RegressionMeasure",
"measure",
")",
"{",
"int",
"n",
"=",
"x",
".",
"length",
";"... | Leave-one-out cross validation of a regression model.
@param <T> the data type of input objects.
@param trainer a regression model trainer that is properly parameterized.
@param x the test data set.
@param y the test data response values.
@param measure the performance measure of regression.
@return the test results w... | [
"Leave",
"-",
"one",
"-",
"out",
"cross",
"validation",
"of",
"a",
"regression",
"model",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/validation/Validation.java#L283-L298 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java | InterconnectClient.insertInterconnect | @BetaApi
public final Operation insertInterconnect(String project, Interconnect interconnectResource) {
"""
Creates a Interconnect in the specified project using the data included in the request.
<p>Sample code:
<pre><code>
try (InterconnectClient interconnectClient = InterconnectClient.create()) {
Proje... | java | @BetaApi
public final Operation insertInterconnect(String project, Interconnect interconnectResource) {
InsertInterconnectHttpRequest request =
InsertInterconnectHttpRequest.newBuilder()
.setProject(project)
.setInterconnectResource(interconnectResource)
.build();
... | [
"@",
"BetaApi",
"public",
"final",
"Operation",
"insertInterconnect",
"(",
"String",
"project",
",",
"Interconnect",
"interconnectResource",
")",
"{",
"InsertInterconnectHttpRequest",
"request",
"=",
"InsertInterconnectHttpRequest",
".",
"newBuilder",
"(",
")",
".",
"se... | Creates a Interconnect in the specified project using the data included in the request.
<p>Sample code:
<pre><code>
try (InterconnectClient interconnectClient = InterconnectClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
Interconnect interconnectResource = Interconnect.newBuilder().build();
Oper... | [
"Creates",
"a",
"Interconnect",
"in",
"the",
"specified",
"project",
"using",
"the",
"data",
"included",
"in",
"the",
"request",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InterconnectClient.java#L509-L518 |
dbracewell/mango | src/main/java/com/davidbracewell/config/Config.java | Config.loadDefaultConf | protected static boolean loadDefaultConf(String packageName) throws ParseException {
"""
Load default conf.
@param packageName the package name
@return the boolean
@throws ParseException the parse exception
"""
if (packageName.endsWith(".conf")) {
return false;
}
packageName =... | java | protected static boolean loadDefaultConf(String packageName) throws ParseException {
if (packageName.endsWith(".conf")) {
return false;
}
packageName = packageName.replaceAll("\\$[0-9]+$", "");
Resource defaultConf = new ClasspathResource((packageName.replaceAll("\\.",
... | [
"protected",
"static",
"boolean",
"loadDefaultConf",
"(",
"String",
"packageName",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"packageName",
".",
"endsWith",
"(",
"\".conf\"",
")",
")",
"{",
"return",
"false",
";",
"}",
"packageName",
"=",
"packageName",
... | Load default conf.
@param packageName the package name
@return the boolean
@throws ParseException the parse exception | [
"Load",
"default",
"conf",
"."
] | train | https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/config/Config.java#L584-L622 |
wcm-io/wcm-io-tooling | commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/unpack/ContentUnpacker.java | ContentUnpacker.sortWeakReferenceValues | private String sortWeakReferenceValues(String name, String value) {
"""
Sort weak reference values alphabetically to ensure consistent ordering.
@param name Property name
@param value Property value
@return Property value with sorted references
"""
Set<String> refs = new TreeSet<>();
DocViewProperty... | java | private String sortWeakReferenceValues(String name, String value) {
Set<String> refs = new TreeSet<>();
DocViewProperty prop = DocViewProperty.parse(name, value);
for (int i = 0; i < prop.values.length; i++) {
refs.add(prop.values[i]);
}
List<Value> values = new ArrayList<>();
for (String ... | [
"private",
"String",
"sortWeakReferenceValues",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"Set",
"<",
"String",
">",
"refs",
"=",
"new",
"TreeSet",
"<>",
"(",
")",
";",
"DocViewProperty",
"prop",
"=",
"DocViewProperty",
".",
"parse",
"(",
"n... | Sort weak reference values alphabetically to ensure consistent ordering.
@param name Property name
@param value Property value
@return Property value with sorted references | [
"Sort",
"weak",
"reference",
"values",
"alphabetically",
"to",
"ensure",
"consistent",
"ordering",
"."
] | train | https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/unpack/ContentUnpacker.java#L369-L386 |
czyzby/gdx-lml | kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/scene2d/Actors.java | Actors.centerActor | public static void centerActor(final Actor actor, final Stage stage) {
"""
Null-safe position update.
@param actor will be centered on the given stage according to their sizes. Can be null.
@param stage can be null.
"""
if (actor != null && stage != null) {
actor.setPosition((int) (stag... | java | public static void centerActor(final Actor actor, final Stage stage) {
if (actor != null && stage != null) {
actor.setPosition((int) (stage.getWidth() / 2f - actor.getWidth() / 2f),
(int) (stage.getHeight() / 2f - actor.getHeight() / 2f));
}
} | [
"public",
"static",
"void",
"centerActor",
"(",
"final",
"Actor",
"actor",
",",
"final",
"Stage",
"stage",
")",
"{",
"if",
"(",
"actor",
"!=",
"null",
"&&",
"stage",
"!=",
"null",
")",
"{",
"actor",
".",
"setPosition",
"(",
"(",
"int",
")",
"(",
"sta... | Null-safe position update.
@param actor will be centered on the given stage according to their sizes. Can be null.
@param stage can be null. | [
"Null",
"-",
"safe",
"position",
"update",
"."
] | train | https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/scene2d/Actors.java#L60-L65 |
ist-dresden/composum | sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibLink.java | ClientlibLink.withHash | public ClientlibLink withHash(String newHash) {
"""
Creates a new link with parameters as this except hash.
@param newHash new nullable hash for the resource to be encoded in the URL for clientlibs / - categories.
"""
return new ClientlibLink(type, kind, path, properties, newHash);
} | java | public ClientlibLink withHash(String newHash) {
return new ClientlibLink(type, kind, path, properties, newHash);
} | [
"public",
"ClientlibLink",
"withHash",
"(",
"String",
"newHash",
")",
"{",
"return",
"new",
"ClientlibLink",
"(",
"type",
",",
"kind",
",",
"path",
",",
"properties",
",",
"newHash",
")",
";",
"}"
] | Creates a new link with parameters as this except hash.
@param newHash new nullable hash for the resource to be encoded in the URL for clientlibs / - categories. | [
"Creates",
"a",
"new",
"link",
"with",
"parameters",
"as",
"this",
"except",
"hash",
"."
] | train | https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibLink.java#L103-L105 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java | DevicesInner.beginCreateOrUpdate | public DataBoxEdgeDeviceInner beginCreateOrUpdate(String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) {
"""
Creates or updates a Data Box Edge/Gateway resource.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@param dataBoxEdgeDevice The ... | java | public DataBoxEdgeDeviceInner beginCreateOrUpdate(String deviceName, String resourceGroupName, DataBoxEdgeDeviceInner dataBoxEdgeDevice) {
return beginCreateOrUpdateWithServiceResponseAsync(deviceName, resourceGroupName, dataBoxEdgeDevice).toBlocking().single().body();
} | [
"public",
"DataBoxEdgeDeviceInner",
"beginCreateOrUpdate",
"(",
"String",
"deviceName",
",",
"String",
"resourceGroupName",
",",
"DataBoxEdgeDeviceInner",
"dataBoxEdgeDevice",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
"(",
"deviceName",
",",
"resourceGr... | Creates or updates a Data Box Edge/Gateway resource.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@param dataBoxEdgeDevice The resource object.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by s... | [
"Creates",
"or",
"updates",
"a",
"Data",
"Box",
"Edge",
"/",
"Gateway",
"resource",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L780-L782 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/map/tiled/TileCacheInformation.java | TileCacheInformation.getMinGeoCoordinate | @Nonnull
public Coordinate getMinGeoCoordinate(final ReferencedEnvelope envelope, final Coordinate geoTileSize) {
"""
Calculate the minx and miny coordinate of the tile that is the minx and miny tile. It is the starting
point of counting tiles to render.
<p></p>
This equates to the minX and minY of the Gri... | java | @Nonnull
public Coordinate getMinGeoCoordinate(final ReferencedEnvelope envelope, final Coordinate geoTileSize) {
final ReferencedEnvelope tileCacheBounds = getTileCacheBounds();
final double tileCacheMinX = tileCacheBounds.getMinX();
double minGeoX = envelope.getMinX();
double minGe... | [
"@",
"Nonnull",
"public",
"Coordinate",
"getMinGeoCoordinate",
"(",
"final",
"ReferencedEnvelope",
"envelope",
",",
"final",
"Coordinate",
"geoTileSize",
")",
"{",
"final",
"ReferencedEnvelope",
"tileCacheBounds",
"=",
"getTileCacheBounds",
"(",
")",
";",
"final",
"do... | Calculate the minx and miny coordinate of the tile that is the minx and miny tile. It is the starting
point of counting tiles to render.
<p></p>
This equates to the minX and minY of the GridCoverage as well.
@param envelope the area that will be displayed.
@param geoTileSize the size of each tile in world space. | [
"Calculate",
"the",
"minx",
"and",
"miny",
"coordinate",
"of",
"the",
"tile",
"that",
"is",
"the",
"minx",
"and",
"miny",
"tile",
".",
"It",
"is",
"the",
"starting",
"point",
"of",
"counting",
"tiles",
"to",
"render",
".",
"<p",
">",
"<",
"/",
"p",
"... | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/tiled/TileCacheInformation.java#L113-L126 |
alkacon/opencms-core | src/org/opencms/publish/CmsPublishManager.java | CmsPublishManager.abortPublishJob | public void abortPublishJob(CmsObject cms, CmsPublishJobEnqueued publishJob, boolean removeJob)
throws CmsException, CmsSecurityException, CmsPublishException {
"""
Aborts the given publish job.<p>
@param cms the cms context
@param publishJob the publish job to abort
@param removeJob indicates if the job ... | java | public void abortPublishJob(CmsObject cms, CmsPublishJobEnqueued publishJob, boolean removeJob)
throws CmsException, CmsSecurityException, CmsPublishException {
if (!OpenCms.getRoleManager().hasRole(cms, CmsRole.PROJECT_MANAGER)
&& !cms.getRequestContext().getCurrentUser().getId().equals(publis... | [
"public",
"void",
"abortPublishJob",
"(",
"CmsObject",
"cms",
",",
"CmsPublishJobEnqueued",
"publishJob",
",",
"boolean",
"removeJob",
")",
"throws",
"CmsException",
",",
"CmsSecurityException",
",",
"CmsPublishException",
"{",
"if",
"(",
"!",
"OpenCms",
".",
"getRo... | Aborts the given publish job.<p>
@param cms the cms context
@param publishJob the publish job to abort
@param removeJob indicates if the job will be removed or added to history
@throws CmsException if there is some problem during unlocking the resources
@throws CmsSecurityException if the current user has not enough ... | [
"Aborts",
"the",
"given",
"publish",
"job",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L149-L161 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java | AppServiceEnvironmentsInner.listWorkerPoolsAsync | public Observable<Page<WorkerPoolResourceInner>> listWorkerPoolsAsync(final String resourceGroupName, final String name) {
"""
Get all worker pools of an App Service Environment.
Get all worker pools of an App Service Environment.
@param resourceGroupName Name of the resource group to which the resource belong... | java | public Observable<Page<WorkerPoolResourceInner>> listWorkerPoolsAsync(final String resourceGroupName, final String name) {
return listWorkerPoolsWithServiceResponseAsync(resourceGroupName, name)
.map(new Func1<ServiceResponse<Page<WorkerPoolResourceInner>>, Page<WorkerPoolResourceInner>>() {
... | [
"public",
"Observable",
"<",
"Page",
"<",
"WorkerPoolResourceInner",
">",
">",
"listWorkerPoolsAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"name",
")",
"{",
"return",
"listWorkerPoolsWithServiceResponseAsync",
"(",
"resourceGroupName",
"... | Get all worker pools of an App Service Environment.
Get all worker pools of an App Service Environment.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App Service Environment.
@throws IllegalArgumentException thrown if parameters fail the validation
@return t... | [
"Get",
"all",
"worker",
"pools",
"of",
"an",
"App",
"Service",
"Environment",
".",
"Get",
"all",
"worker",
"pools",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L5004-L5012 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java | AbstractSegment3F.computeLineLineIntersectionFactors | @Pure
public static Pair<Double,Double> computeLineLineIntersectionFactors(
double x1, double y1, double z1, double x2, double y2, double z2,
double x3, double y3, double z3, double x4, double y4, double z4) {
"""
Replies two position factors for the intersection point between two lines.
<p>
Let line equa... | java | @Pure
public static Pair<Double,Double> computeLineLineIntersectionFactors(
double x1, double y1, double z1, double x2, double y2, double z2,
double x3, double y3, double z3, double x4, double y4, double z4) {
//We compute the 4 vectors P1P2, P3P4, P1P3 and P2P4
Vector3f a = new Vector3f(x2 - x1, y2 - y1, z... | [
"@",
"Pure",
"public",
"static",
"Pair",
"<",
"Double",
",",
"Double",
">",
"computeLineLineIntersectionFactors",
"(",
"double",
"x1",
",",
"double",
"y1",
",",
"double",
"z1",
",",
"double",
"x2",
",",
"double",
"y2",
",",
"double",
"z2",
",",
"double",
... | Replies two position factors for the intersection point between two lines.
<p>
Let line equations for L1 and L2:<br>
<code>L1: P1 + factor1 * (P2-P1)</code><br>
<code>L2: P3 + factor2 * (P4-P3)</code><br>
If lines are intersecting, then<br>
<code>P1 + factor1 * (P2-P1) = P3 + factor2 * (P4-P3)</code>
<p>
This function ... | [
"Replies",
"two",
"position",
"factors",
"for",
"the",
"intersection",
"point",
"between",
"two",
"lines",
".",
"<p",
">",
"Let",
"line",
"equations",
"for",
"L1",
"and",
"L2",
":",
"<br",
">",
"<code",
">",
"L1",
":",
"P1",
"+",
"factor1",
"*",
"(",
... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractSegment3F.java#L380-L418 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java | NodeSetDTM.removeElementAt | public void removeElementAt(int i) {
"""
Deletes the component at the specified index. Each component in
this vector with an index greater or equal to the specified
index is shifted downward to have an index one smaller than
the value it had previously.
@param i The index of the node to be removed.
@throws ... | java | public void removeElementAt(int i)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
super.removeElementAt(i);
} | [
"public",
"void",
"removeElementAt",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"!",
"m_mutable",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESETDTM_NOT_MUTABLE",
",",
"null",
")",
"... | Deletes the component at the specified index. Each component in
this vector with an index greater or equal to the specified
index is shifted downward to have an index one smaller than
the value it had previously.
@param i The index of the node to be removed.
@throws RuntimeException thrown if this NodeSetDTM is not of... | [
"Deletes",
"the",
"component",
"at",
"the",
"specified",
"index",
".",
"Each",
"component",
"in",
"this",
"vector",
"with",
"an",
"index",
"greater",
"or",
"equal",
"to",
"the",
"specified",
"index",
"is",
"shifted",
"downward",
"to",
"have",
"an",
"index",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java#L987-L994 |
apereo/cas | support/cas-server-support-spnego/src/main/java/org/apereo/cas/support/spnego/authentication/handler/support/JcifsSpnegoAuthenticationHandler.java | JcifsSpnegoAuthenticationHandler.getPrincipal | protected Principal getPrincipal(final String name, final boolean isNtlm) {
"""
Gets the principal from the given name. The principal
is created by the factory instance.
@param name the name
@param isNtlm the is ntlm
@return the simple principal
"""
if (this.principalWithDomainName) {
... | java | protected Principal getPrincipal(final String name, final boolean isNtlm) {
if (this.principalWithDomainName) {
return this.principalFactory.createPrincipal(name);
}
if (isNtlm) {
if (Pattern.matches("\\S+\\\\\\S+", name)) {
val splitList = Splitter.on(Pat... | [
"protected",
"Principal",
"getPrincipal",
"(",
"final",
"String",
"name",
",",
"final",
"boolean",
"isNtlm",
")",
"{",
"if",
"(",
"this",
".",
"principalWithDomainName",
")",
"{",
"return",
"this",
".",
"principalFactory",
".",
"createPrincipal",
"(",
"name",
... | Gets the principal from the given name. The principal
is created by the factory instance.
@param name the name
@param isNtlm the is ntlm
@return the simple principal | [
"Gets",
"the",
"principal",
"from",
"the",
"given",
"name",
".",
"The",
"principal",
"is",
"created",
"by",
"the",
"factory",
"instance",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-spnego/src/main/java/org/apereo/cas/support/spnego/authentication/handler/support/JcifsSpnegoAuthenticationHandler.java#L121-L136 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.project_serviceName_region_regionName_workflow_backup_backupWorkflowId_DELETE | public void project_serviceName_region_regionName_workflow_backup_backupWorkflowId_DELETE(String serviceName, String regionName, String backupWorkflowId) throws IOException {
"""
Delete a backup workflow process
REST: DELETE /cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkflowId}
@p... | java | public void project_serviceName_region_regionName_workflow_backup_backupWorkflowId_DELETE(String serviceName, String regionName, String backupWorkflowId) throws IOException {
String qPath = "/cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkflowId}";
StringBuilder sb = path(qPath, serviceN... | [
"public",
"void",
"project_serviceName_region_regionName_workflow_backup_backupWorkflowId_DELETE",
"(",
"String",
"serviceName",
",",
"String",
"regionName",
",",
"String",
"backupWorkflowId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cloud/project/{service... | Delete a backup workflow process
REST: DELETE /cloud/project/{serviceName}/region/{regionName}/workflow/backup/{backupWorkflowId}
@param backupWorkflowId [required] ID of your backup workflow
@param regionName [required] Public Cloud region
@param serviceName [required] Public Cloud project
API beta | [
"Delete",
"a",
"backup",
"workflow",
"process"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L215-L219 |
stratosphere/stratosphere | stratosphere-java/src/main/java/eu/stratosphere/api/java/ExecutionEnvironment.java | ExecutionEnvironment.createRemoteEnvironment | public static ExecutionEnvironment createRemoteEnvironment(String host, int port, int degreeOfParallelism, String... jarFiles) {
"""
Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program
to a cluster for execution. Note that all file paths used in the program must be accessible ... | java | public static ExecutionEnvironment createRemoteEnvironment(String host, int port, int degreeOfParallelism, String... jarFiles) {
RemoteEnvironment rec = new RemoteEnvironment(host, port, jarFiles);
rec.setDegreeOfParallelism(degreeOfParallelism);
return rec;
} | [
"public",
"static",
"ExecutionEnvironment",
"createRemoteEnvironment",
"(",
"String",
"host",
",",
"int",
"port",
",",
"int",
"degreeOfParallelism",
",",
"String",
"...",
"jarFiles",
")",
"{",
"RemoteEnvironment",
"rec",
"=",
"new",
"RemoteEnvironment",
"(",
"host",... | Creates a {@link RemoteEnvironment}. The remote environment sends (parts of) the program
to a cluster for execution. Note that all file paths used in the program must be accessible from the
cluster. The execution will use the specified degree of parallelism.
@param host The host name or address of the master (JobManag... | [
"Creates",
"a",
"{",
"@link",
"RemoteEnvironment",
"}",
".",
"The",
"remote",
"environment",
"sends",
"(",
"parts",
"of",
")",
"the",
"program",
"to",
"a",
"cluster",
"for",
"execution",
".",
"Note",
"that",
"all",
"file",
"paths",
"used",
"in",
"the",
"... | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-java/src/main/java/eu/stratosphere/api/java/ExecutionEnvironment.java#L712-L716 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java | X509CertImpl.getSubjectX500Principal | public static X500Principal getSubjectX500Principal(X509Certificate cert) {
"""
Extract the subject X500Principal from an X509Certificate.
Called from java.security.cert.X509Certificate.getSubjectX500Principal().
"""
try {
return getX500Principal(cert, false);
} catch (Exception e)... | java | public static X500Principal getSubjectX500Principal(X509Certificate cert) {
try {
return getX500Principal(cert, false);
} catch (Exception e) {
throw new RuntimeException("Could not parse subject", e);
}
} | [
"public",
"static",
"X500Principal",
"getSubjectX500Principal",
"(",
"X509Certificate",
"cert",
")",
"{",
"try",
"{",
"return",
"getX500Principal",
"(",
"cert",
",",
"false",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"RuntimeExce... | Extract the subject X500Principal from an X509Certificate.
Called from java.security.cert.X509Certificate.getSubjectX500Principal(). | [
"Extract",
"the",
"subject",
"X500Principal",
"from",
"an",
"X509Certificate",
".",
"Called",
"from",
"java",
".",
"security",
".",
"cert",
".",
"X509Certificate",
".",
"getSubjectX500Principal",
"()",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java#L1889-L1895 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java | DateFormat.getDateTimeInstance | public final static DateFormat getDateTimeInstance(
int dateStyle, int timeStyle, ULocale locale) {
"""
Returns the date/time formatter with the given formatting styles
for the given locale.
@param dateStyle the given date formatting style. As currently implemented, relative date
formatting only affects... | java | public final static DateFormat getDateTimeInstance(
int dateStyle, int timeStyle, ULocale locale)
{
return get(dateStyle, timeStyle, locale, null);
} | [
"public",
"final",
"static",
"DateFormat",
"getDateTimeInstance",
"(",
"int",
"dateStyle",
",",
"int",
"timeStyle",
",",
"ULocale",
"locale",
")",
"{",
"return",
"get",
"(",
"dateStyle",
",",
"timeStyle",
",",
"locale",
",",
"null",
")",
";",
"}"
] | Returns the date/time formatter with the given formatting styles
for the given locale.
@param dateStyle the given date formatting style. As currently implemented, relative date
formatting only affects a limited range of calendar days before or after the
current date, based on the CLDR <field type="day">/<relat... | [
"Returns",
"the",
"date",
"/",
"time",
"formatter",
"with",
"the",
"given",
"formatting",
"styles",
"for",
"the",
"given",
"locale",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L1404-L1408 |
javalite/activejdbc | activejdbc/src/main/java/org/javalite/activejdbc/Model.java | Model.convertWith | protected static void convertWith(Converter converter, String... attributeNames) {
"""
Registers a custom converter for the specified attributes.
@param converter custom converter
@param attributeNames attribute names
"""
ModelDelegate.convertWith(modelClass(), converter, attributeNames);
} | java | protected static void convertWith(Converter converter, String... attributeNames) {
ModelDelegate.convertWith(modelClass(), converter, attributeNames);
} | [
"protected",
"static",
"void",
"convertWith",
"(",
"Converter",
"converter",
",",
"String",
"...",
"attributeNames",
")",
"{",
"ModelDelegate",
".",
"convertWith",
"(",
"modelClass",
"(",
")",
",",
"converter",
",",
"attributeNames",
")",
";",
"}"
] | Registers a custom converter for the specified attributes.
@param converter custom converter
@param attributeNames attribute names | [
"Registers",
"a",
"custom",
"converter",
"for",
"the",
"specified",
"attributes",
"."
] | train | https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2067-L2069 |
radkovo/CSSBox | src/main/java/org/fit/cssbox/layout/BrowserCanvas.java | BrowserCanvas.createLayout | public void createLayout(Dimension dim, Rectangle visibleRect) {
"""
Creates the document layout according to the canvas and viewport size and position. If the size
of the resulting page is greater than the specified one (e.g. there is an explicit width or height
specified for the resulting page), the total canv... | java | public void createLayout(Dimension dim, Rectangle visibleRect)
{
if (createImage)
img = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB);
Graphics2D ig = img.createGraphics();
if (autoMediaUpdate)
{
decoder.getMediaSpec().setDimens... | [
"public",
"void",
"createLayout",
"(",
"Dimension",
"dim",
",",
"Rectangle",
"visibleRect",
")",
"{",
"if",
"(",
"createImage",
")",
"img",
"=",
"new",
"BufferedImage",
"(",
"dim",
".",
"width",
",",
"dim",
".",
"height",
",",
"BufferedImage",
".",
"TYPE_I... | Creates the document layout according to the canvas and viewport size and position. If the size
of the resulting page is greater than the specified one (e.g. there is an explicit width or height
specified for the resulting page), the total canvas size is updated automatically.
@param dim the total canvas size
@param vi... | [
"Creates",
"the",
"document",
"layout",
"according",
"to",
"the",
"canvas",
"and",
"viewport",
"size",
"and",
"position",
".",
"If",
"the",
"size",
"of",
"the",
"resulting",
"page",
"is",
"greater",
"than",
"the",
"specified",
"one",
"(",
"e",
".",
"g",
... | train | https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/BrowserCanvas.java#L152-L203 |
alibaba/jstorm | jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobStore.java | BlobStore.createBlob | public void createBlob(String key, InputStream in, SettableBlobMeta meta) throws KeyAlreadyExistsException, IOException {
"""
Wrapper called to create the blob which contains
the byte data
@param key Key for the blob.
@param in InputStream from which the data is read to be
written as a part of the blob.
@para... | java | public void createBlob(String key, InputStream in, SettableBlobMeta meta) throws KeyAlreadyExistsException, IOException {
AtomicOutputStream out = null;
try {
out = createBlob(key, meta);
byte[] buffer = new byte[2048];
int len = 0;
while ((len = in.read(b... | [
"public",
"void",
"createBlob",
"(",
"String",
"key",
",",
"InputStream",
"in",
",",
"SettableBlobMeta",
"meta",
")",
"throws",
"KeyAlreadyExistsException",
",",
"IOException",
"{",
"AtomicOutputStream",
"out",
"=",
"null",
";",
"try",
"{",
"out",
"=",
"createBl... | Wrapper called to create the blob which contains
the byte data
@param key Key for the blob.
@param in InputStream from which the data is read to be
written as a part of the blob.
@param meta Metadata which contains the acls information
@throws KeyAlreadyExistsException
@throws IOException | [
"Wrapper",
"called",
"to",
"create",
"the",
"blob",
"which",
"contains",
"the",
"byte",
"data"
] | train | https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/blobstore/BlobStore.java#L189-L206 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandFaceDescriptor.java | CommandFaceDescriptor.configureIconInfo | public void configureIconInfo(AbstractButton button, boolean useLargeIcons) {
"""
Configures the given button with the icon information contained in this descriptor.
@param button The button to be configured. Must not be null.
@param useLargeIcons Set to true to configure the button with large icons. False wil... | java | public void configureIconInfo(AbstractButton button, boolean useLargeIcons) {
Assert.notNull(button, "button");
if (useLargeIcons) {
largeIconInfo.configure(button);
}
else {
iconInfo.configure(button);
}
} | [
"public",
"void",
"configureIconInfo",
"(",
"AbstractButton",
"button",
",",
"boolean",
"useLargeIcons",
")",
"{",
"Assert",
".",
"notNull",
"(",
"button",
",",
"\"button\"",
")",
";",
"if",
"(",
"useLargeIcons",
")",
"{",
"largeIconInfo",
".",
"configure",
"(... | Configures the given button with the icon information contained in this descriptor.
@param button The button to be configured. Must not be null.
@param useLargeIcons Set to true to configure the button with large icons. False will use
default size icons.
@throws IllegalArgumentException if {@code button} is null. | [
"Configures",
"the",
"given",
"button",
"with",
"the",
"icon",
"information",
"contained",
"in",
"this",
"descriptor",
"."
] | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandFaceDescriptor.java#L418-L428 |
google/closure-templates | java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java | JavaQualifiedNames.getFileClassName | static String getFileClassName(FileDescriptorProto file, ProtoFlavor flavor) {
"""
Derives the outer class name based on the protobuf (.proto) file name.
"""
switch (flavor) {
case PROTO2:
return getFileImmutableClassName(file);
default:
throw new AssertionError();
}
} | java | static String getFileClassName(FileDescriptorProto file, ProtoFlavor flavor) {
switch (flavor) {
case PROTO2:
return getFileImmutableClassName(file);
default:
throw new AssertionError();
}
} | [
"static",
"String",
"getFileClassName",
"(",
"FileDescriptorProto",
"file",
",",
"ProtoFlavor",
"flavor",
")",
"{",
"switch",
"(",
"flavor",
")",
"{",
"case",
"PROTO2",
":",
"return",
"getFileImmutableClassName",
"(",
"file",
")",
";",
"default",
":",
"throw",
... | Derives the outer class name based on the protobuf (.proto) file name. | [
"Derives",
"the",
"outer",
"class",
"name",
"based",
"on",
"the",
"protobuf",
"(",
".",
"proto",
")",
"file",
"name",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java#L251-L258 |
apache/incubator-gobblin | gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/utils/HttpUtils.java | HttpUtils.createR2ClientLimiterKey | public static String createR2ClientLimiterKey(Config config) {
"""
Convert D2 URL template into a string used for throttling limiter
Valid:
d2://host/${resource-id}
Invalid:
d2://host${resource-id}, because we cannot differentiate the host
"""
String urlTemplate = config.getString(HttpConstants.UR... | java | public static String createR2ClientLimiterKey(Config config) {
String urlTemplate = config.getString(HttpConstants.URL_TEMPLATE);
try {
String escaped = URIUtil.encodeQuery(urlTemplate);
URI uri = new URI(escaped);
if (uri.getHost() == null)
throw new RuntimeException("Cannot get host... | [
"public",
"static",
"String",
"createR2ClientLimiterKey",
"(",
"Config",
"config",
")",
"{",
"String",
"urlTemplate",
"=",
"config",
".",
"getString",
"(",
"HttpConstants",
".",
"URL_TEMPLATE",
")",
";",
"try",
"{",
"String",
"escaped",
"=",
"URIUtil",
".",
"e... | Convert D2 URL template into a string used for throttling limiter
Valid:
d2://host/${resource-id}
Invalid:
d2://host${resource-id}, because we cannot differentiate the host | [
"Convert",
"D2",
"URL",
"template",
"into",
"a",
"string",
"used",
"for",
"throttling",
"limiter"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-http/src/main/java/org/apache/gobblin/utils/HttpUtils.java#L204-L222 |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/utility/UI/CurvedArrow.java | CurvedArrow.setEnd | public void setEnd(int x2, int y2) {
"""
Sets the end point.
@param x2
the x coordinate of the end point
@param y2
the y coordinate of the end point
"""
end.x = x2;
end.y = y2;
needsRefresh = true;
} | java | public void setEnd(int x2, int y2) {
end.x = x2;
end.y = y2;
needsRefresh = true;
} | [
"public",
"void",
"setEnd",
"(",
"int",
"x2",
",",
"int",
"y2",
")",
"{",
"end",
".",
"x",
"=",
"x2",
";",
"end",
".",
"y",
"=",
"y2",
";",
"needsRefresh",
"=",
"true",
";",
"}"
] | Sets the end point.
@param x2
the x coordinate of the end point
@param y2
the y coordinate of the end point | [
"Sets",
"the",
"end",
"point",
"."
] | train | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/UI/CurvedArrow.java#L115-L119 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/aggregates/Batch.java | Batch.getBatches | public static <U extends Aggregate> List<Batch<U>> getBatches(List<U> list) {
"""
Helper method to create batch from list of aggregates, for cases when list of aggregates is higher then batchLimit
@param list
@param <U>
@return
"""
return getBatches(list, batchLimit);
} | java | public static <U extends Aggregate> List<Batch<U>> getBatches(List<U> list) {
return getBatches(list, batchLimit);
} | [
"public",
"static",
"<",
"U",
"extends",
"Aggregate",
">",
"List",
"<",
"Batch",
"<",
"U",
">",
">",
"getBatches",
"(",
"List",
"<",
"U",
">",
"list",
")",
"{",
"return",
"getBatches",
"(",
"list",
",",
"batchLimit",
")",
";",
"}"
] | Helper method to create batch from list of aggregates, for cases when list of aggregates is higher then batchLimit
@param list
@param <U>
@return | [
"Helper",
"method",
"to",
"create",
"batch",
"from",
"list",
"of",
"aggregates",
"for",
"cases",
"when",
"list",
"of",
"aggregates",
"is",
"higher",
"then",
"batchLimit"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/aggregates/Batch.java#L115-L117 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java | vpnclientlessaccessprofile.get | public static vpnclientlessaccessprofile get(nitro_service service, String profilename) throws Exception {
"""
Use this API to fetch vpnclientlessaccessprofile resource of given name .
"""
vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile();
obj.set_profilename(profilename);
vpnclientlessac... | java | public static vpnclientlessaccessprofile get(nitro_service service, String profilename) throws Exception{
vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile();
obj.set_profilename(profilename);
vpnclientlessaccessprofile response = (vpnclientlessaccessprofile) obj.get_resource(service);
return resp... | [
"public",
"static",
"vpnclientlessaccessprofile",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"profilename",
")",
"throws",
"Exception",
"{",
"vpnclientlessaccessprofile",
"obj",
"=",
"new",
"vpnclientlessaccessprofile",
"(",
")",
";",
"obj",
".",
"set_prof... | Use this API to fetch vpnclientlessaccessprofile resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"vpnclientlessaccessprofile",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccessprofile.java#L553-L558 |
Waikato/moa | moa/src/main/java/moa/clusterers/outliers/AnyOut/AnyOutCore.java | AnyOutCore.calcC1 | private double calcC1(int objectId) {
"""
Calculates the Confidence on the basis of the standard deviation of previous OScore results
@return confidence
"""
int nrOfPreviousResults = previousOScoreResultList.get(objectId).size();
if (nrOfPreviousResults == 0) {
return 0.0;
}
int count=1;
do... | java | private double calcC1(int objectId) {
int nrOfPreviousResults = previousOScoreResultList.get(objectId).size();
if (nrOfPreviousResults == 0) {
return 0.0;
}
int count=1;
double difSum_k = Math.abs(lastOScoreResult.get(objectId)-previousOScoreResultList.get(objectId).get(nrOfPreviousResults-1));
... | [
"private",
"double",
"calcC1",
"(",
"int",
"objectId",
")",
"{",
"int",
"nrOfPreviousResults",
"=",
"previousOScoreResultList",
".",
"get",
"(",
"objectId",
")",
".",
"size",
"(",
")",
";",
"if",
"(",
"nrOfPreviousResults",
"==",
"0",
")",
"{",
"return",
"... | Calculates the Confidence on the basis of the standard deviation of previous OScore results
@return confidence | [
"Calculates",
"the",
"Confidence",
"on",
"the",
"basis",
"of",
"the",
"standard",
"deviation",
"of",
"previous",
"OScore",
"results"
] | train | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/outliers/AnyOut/AnyOutCore.java#L234-L252 |
opengeospatial/teamengine | teamengine-core/src/main/java/com/occamlab/te/util/SoapUtils.java | SoapUtils.createSoapMessage | public static Document createSoapMessage(String version, List headerBlocks,
Element body) throws Exception {
"""
A method to create a SOAP message. The SOAP message, including the Header
is created and returned as DOM Document.
@param version
the SOAP version to be used (1.1 or 1.2).
@param head... | java | public static Document createSoapMessage(String version, List headerBlocks,
Element body) throws Exception {
Document message = null;
NodeList children = body.getChildNodes();
// Loop in order to remove dummy nodes (spaces, CR)
for (int i = 0; i < children.getLength(); i... | [
"public",
"static",
"Document",
"createSoapMessage",
"(",
"String",
"version",
",",
"List",
"headerBlocks",
",",
"Element",
"body",
")",
"throws",
"Exception",
"{",
"Document",
"message",
"=",
"null",
";",
"NodeList",
"children",
"=",
"body",
".",
"getChildNodes... | A method to create a SOAP message. The SOAP message, including the Header
is created and returned as DOM Document.
@param version
the SOAP version to be used (1.1 or 1.2).
@param headerBlocks
the list of Header Blocks to be included in the SOAP Header .
@param body
the XML message to be included in the SOAP BODY eleme... | [
"A",
"method",
"to",
"create",
"a",
"SOAP",
"message",
".",
"The",
"SOAP",
"message",
"including",
"the",
"Header",
"is",
"created",
"and",
"returned",
"as",
"DOM",
"Document",
"."
] | train | https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/util/SoapUtils.java#L176-L198 |
Azure/azure-sdk-for-java | mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ConfigurationsInner.java | ConfigurationsInner.beginCreateOrUpdateAsync | public Observable<ConfigurationInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
"""
Updates a configuration of a server.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this ... | java | public Observable<ConfigurationInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, configurationName, parameters).map(new Func1<ServiceResponse<Co... | [
"public",
"Observable",
"<",
"ConfigurationInner",
">",
"beginCreateOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"configurationName",
",",
"ConfigurationInner",
"parameters",
")",
"{",
"return",
"beginCreateOrUpdateWithServ... | Updates a configuration of a server.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param configurationName The name of the server configuration.
@param parameter... | [
"Updates",
"a",
"configuration",
"of",
"a",
"server",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ConfigurationsInner.java#L201-L208 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java | ST_Drape.lineMerge | public static Geometry lineMerge(Geometry geom, GeometryFactory factory) {
"""
A method to merge a geometry to a set of linestring
@param geom
@param factory
@return
"""
LineMerger merger = new LineMerger();
merger.add(geom);
Collection lines = merger.getMergedLineStrings();
... | java | public static Geometry lineMerge(Geometry geom, GeometryFactory factory) {
LineMerger merger = new LineMerger();
merger.add(geom);
Collection lines = merger.getMergedLineStrings();
return factory.buildGeometry(lines);
} | [
"public",
"static",
"Geometry",
"lineMerge",
"(",
"Geometry",
"geom",
",",
"GeometryFactory",
"factory",
")",
"{",
"LineMerger",
"merger",
"=",
"new",
"LineMerger",
"(",
")",
";",
"merger",
".",
"add",
"(",
"geom",
")",
";",
"Collection",
"lines",
"=",
"me... | A method to merge a geometry to a set of linestring
@param geom
@param factory
@return | [
"A",
"method",
"to",
"merge",
"a",
"geometry",
"to",
"a",
"set",
"of",
"linestring"
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L201-L206 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBScanExpression.java | DynamoDBScanExpression.withFilterConditionEntry | public DynamoDBScanExpression withFilterConditionEntry(String attributeName, Condition condition) {
"""
Adds a new filter condition to the current scan filter and returns a
pointer to this object for method-chaining.
@param attributeName
The name of the attribute on which the specified condition
operates.
@... | java | public DynamoDBScanExpression withFilterConditionEntry(String attributeName, Condition condition) {
if ( scanFilter == null )
scanFilter = new HashMap<String, Condition>();
scanFilter.put(attributeName, condition);
return this;
} | [
"public",
"DynamoDBScanExpression",
"withFilterConditionEntry",
"(",
"String",
"attributeName",
",",
"Condition",
"condition",
")",
"{",
"if",
"(",
"scanFilter",
"==",
"null",
")",
"scanFilter",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Condition",
">",
"(",
"... | Adds a new filter condition to the current scan filter and returns a
pointer to this object for method-chaining.
@param attributeName
The name of the attribute on which the specified condition
operates.
@param condition
The condition which describes how the specified attribute is
compared and if a row of data is inclu... | [
"Adds",
"a",
"new",
"filter",
"condition",
"to",
"the",
"current",
"scan",
"filter",
"and",
"returns",
"a",
"pointer",
"to",
"this",
"object",
"for",
"method",
"-",
"chaining",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBScanExpression.java#L272-L278 |
eclipse/xtext-extras | org.eclipse.xtext.purexbase/src-gen/org/eclipse/xtext/purexbase/pureXbase/impl/PureXbasePackageImpl.java | PureXbasePackageImpl.initializePackageContents | public void initializePackageContents() {
"""
Complete the initialization of the package and its meta-model. This
method is guarded to have no affect on any invocation but its first.
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated
"""
if (isInitialized) return;
isInitialized = true;
... | java | public void initializePackageContents()
{
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
XtypePackage theXtypePackage = (XtypePackage)EPackage.Registry.INSTANCE.getE... | [
"public",
"void",
"initializePackageContents",
"(",
")",
"{",
"if",
"(",
"isInitialized",
")",
"return",
";",
"isInitialized",
"=",
"true",
";",
"// Initialize package",
"setName",
"(",
"eNAME",
")",
";",
"setNsPrefix",
"(",
"eNS_PREFIX",
")",
";",
"setNsURI",
... | Complete the initialization of the package and its meta-model. This
method is guarded to have no affect on any invocation but its first.
<!-- begin-user-doc -->
<!-- end-user-doc -->
@generated | [
"Complete",
"the",
"initialization",
"of",
"the",
"package",
"and",
"its",
"meta",
"-",
"model",
".",
"This",
"method",
"is",
"guarded",
"to",
"have",
"no",
"affect",
"on",
"any",
"invocation",
"but",
"its",
"first",
".",
"<!",
"--",
"begin",
"-",
"user"... | train | https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.purexbase/src-gen/org/eclipse/xtext/purexbase/pureXbase/impl/PureXbasePackageImpl.java#L181-L208 |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java | RoadNetworkConstants.getPreferredAttributeValueForTrafficDirection | @Pure
public static String getPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index) {
"""
Replies the preferred value of traffic direction
used in the attributes for the traffic direction on the roads.
@param direction a direction.
@param index is the index of the supported string... | java | @Pure
public static String getPreferredAttributeValueForTrafficDirection(TrafficDirection direction, int index) {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
final StringBuilder b = new StringBuilder();
b.append("TRAFFIC_DIRECTION_VALUE_"); //$NO... | [
"@",
"Pure",
"public",
"static",
"String",
"getPreferredAttributeValueForTrafficDirection",
"(",
"TrafficDirection",
"direction",
",",
"int",
"index",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"RoadNetworkConstants",
... | Replies the preferred value of traffic direction
used in the attributes for the traffic direction on the roads.
@param direction a direction.
@param index is the index of the supported string to reply
@return the preferred name for the traffic direction on the roads,
or <code>null</code> if there is no string value fo... | [
"Replies",
"the",
"preferred",
"value",
"of",
"traffic",
"direction",
"used",
"in",
"the",
"attributes",
"for",
"the",
"traffic",
"direction",
"on",
"the",
"roads",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L391-L412 |
Azure/azure-sdk-for-java | sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java | RecommendedElasticPoolsInner.getAsync | public Observable<RecommendedElasticPoolInner> getAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName) {
"""
Gets a recommented elastic pool.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Man... | java | public Observable<RecommendedElasticPoolInner> getAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName) {
return getWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName).map(new Func1<ServiceResponse<RecommendedElasticPoolInner>, RecommendedElasticPo... | [
"public",
"Observable",
"<",
"RecommendedElasticPoolInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"recommendedElasticPoolName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"se... | Gets a recommented elastic pool.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param recommendedElasticPoolName The name of the recommended elastic pool to be re... | [
"Gets",
"a",
"recommented",
"elastic",
"pool",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java#L107-L114 |
albfernandez/itext2 | src/main/java/com/lowagie/text/rtf/parser/RtfParser.java | RtfParser.importRtfFragment | public void importRtfFragment(InputStream readerIn, RtfDocument rtfDoc, RtfImportMappings importMappings) throws IOException {
"""
Imports an RTF fragment.
@param readerIn
The Reader to read the RTF fragment from.
@param rtfDoc
The RTF document to add the RTF fragment to.
@param importMappings
The RtfImpor... | java | public void importRtfFragment(InputStream readerIn, RtfDocument rtfDoc, RtfImportMappings importMappings) throws IOException {
//public void importRtfFragment2(Reader readerIn, RtfDocument rtfDoc, RtfImportMappings importMappings) throws IOException {
if(readerIn == null || rtfDoc == null || importMappings==null) ... | [
"public",
"void",
"importRtfFragment",
"(",
"InputStream",
"readerIn",
",",
"RtfDocument",
"rtfDoc",
",",
"RtfImportMappings",
"importMappings",
")",
"throws",
"IOException",
"{",
"//public void importRtfFragment2(Reader readerIn, RtfDocument rtfDoc, RtfImportMappings importMappings)... | Imports an RTF fragment.
@param readerIn
The Reader to read the RTF fragment from.
@param rtfDoc
The RTF document to add the RTF fragment to.
@param importMappings
The RtfImportMappings defining font and color mappings for the fragment.
@throws IOException
On I/O errors.
@since 2.1.3 | [
"Imports",
"an",
"RTF",
"fragment",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/RtfParser.java#L559-L568 |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusStop | @Pure
public BusStop getBusStop(String name, Comparator<String> nameComparator) {
"""
Replies the bus stop with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return BusStop or <code>null</code>
"""
if (name == null) {
return null;
}
fina... | java | @Pure
public BusStop getBusStop(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusStop busStop : this.validBusStops) {
if (cmp.compare(name, busSt... | [
"@",
"Pure",
"public",
"BusStop",
"getBusStop",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
">",
... | Replies the bus stop with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return BusStop or <code>null</code> | [
"Replies",
"the",
"bus",
"stop",
"with",
"the",
"specified",
"name",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L945-L962 |
threerings/gwt-utils | src/main/java/com/threerings/gwt/ui/WidgetUtil.java | WidgetUtil.makeShim | public static Widget makeShim (int width, int height) {
"""
Makes a widget that takes up horizontal and or vertical space. Shim shimminy shim shim
shiree.
"""
Label shim = new Label("");
shim.setWidth(width + "px");
shim.setHeight(height + "px");
return shim;
} | java | public static Widget makeShim (int width, int height)
{
Label shim = new Label("");
shim.setWidth(width + "px");
shim.setHeight(height + "px");
return shim;
} | [
"public",
"static",
"Widget",
"makeShim",
"(",
"int",
"width",
",",
"int",
"height",
")",
"{",
"Label",
"shim",
"=",
"new",
"Label",
"(",
"\"\"",
")",
";",
"shim",
".",
"setWidth",
"(",
"width",
"+",
"\"px\"",
")",
";",
"shim",
".",
"setHeight",
"(",... | Makes a widget that takes up horizontal and or vertical space. Shim shimminy shim shim
shiree. | [
"Makes",
"a",
"widget",
"that",
"takes",
"up",
"horizontal",
"and",
"or",
"vertical",
"space",
".",
"Shim",
"shimminy",
"shim",
"shim",
"shiree",
"."
] | train | https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/WidgetUtil.java#L254-L260 |
Azure/azure-sdk-for-java | sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java | SyncAgentsInner.createOrUpdateAsync | public Observable<SyncAgentInner> createOrUpdateAsync(String resourceGroupName, String serverName, String syncAgentName, String syncDatabaseId) {
"""
Creates or updates a sync agent.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Reso... | java | public Observable<SyncAgentInner> createOrUpdateAsync(String resourceGroupName, String serverName, String syncAgentName, String syncDatabaseId) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, syncAgentName, syncDatabaseId).map(new Func1<ServiceResponse<SyncAgentInner>, SyncAgentIn... | [
"public",
"Observable",
"<",
"SyncAgentInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"syncAgentName",
",",
"String",
"syncDatabaseId",
")",
"{",
"return",
"createOrUpdateWithServiceResponseAsync",
"(",
... | Creates or updates a sync agent.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server on which the sync agent is hosted.
@param syncAgentName The name of the sync agent.
... | [
"Creates",
"or",
"updates",
"a",
"sync",
"agent",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncAgentsInner.java#L318-L325 |
phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidationResult.java | ClientCertificateValidationResult.createSuccess | @Nonnull
public static ClientCertificateValidationResult createSuccess (@Nonnull @Nonempty final String sClientID) {
"""
Create client certificate validation success
@param sClientID
Client ID to use. May neither be <code>null</code> nor empty.
@return Never <code>null</code>.
"""
ValueEnforcer.notE... | java | @Nonnull
public static ClientCertificateValidationResult createSuccess (@Nonnull @Nonempty final String sClientID)
{
ValueEnforcer.notEmpty (sClientID, "ClientID");
return new ClientCertificateValidationResult (true, sClientID);
} | [
"@",
"Nonnull",
"public",
"static",
"ClientCertificateValidationResult",
"createSuccess",
"(",
"@",
"Nonnull",
"@",
"Nonempty",
"final",
"String",
"sClientID",
")",
"{",
"ValueEnforcer",
".",
"notEmpty",
"(",
"sClientID",
",",
"\"ClientID\"",
")",
";",
"return",
"... | Create client certificate validation success
@param sClientID
Client ID to use. May neither be <code>null</code> nor empty.
@return Never <code>null</code>. | [
"Create",
"client",
"certificate",
"validation",
"success"
] | train | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidationResult.java#L76-L81 |
Jsondb/jsondb-core | src/main/java/io/jsondb/Util.java | Util.stampVersion | public static boolean stampVersion(JsonDBConfig dbConfig, File f, String version) {
"""
Utility to stamp the version into a newly created .json File
This method is expected to be invoked on a newly created .json file before it is usable.
So no locking code required.
@param dbConfig all the settings used by J... | java | public static boolean stampVersion(JsonDBConfig dbConfig, File f, String version) {
FileOutputStream fos = null;
OutputStreamWriter osr = null;
BufferedWriter writer = null;
try {
fos = new FileOutputStream(f);
osr = new OutputStreamWriter(fos, dbConfig.getCharset());
writer = new Buf... | [
"public",
"static",
"boolean",
"stampVersion",
"(",
"JsonDBConfig",
"dbConfig",
",",
"File",
"f",
",",
"String",
"version",
")",
"{",
"FileOutputStream",
"fos",
"=",
"null",
";",
"OutputStreamWriter",
"osr",
"=",
"null",
";",
"BufferedWriter",
"writer",
"=",
"... | Utility to stamp the version into a newly created .json File
This method is expected to be invoked on a newly created .json file before it is usable.
So no locking code required.
@param dbConfig all the settings used by Json DB
@param f the target .json file on which to stamp the version
@param version the actual v... | [
"Utility",
"to",
"stamp",
"the",
"version",
"into",
"a",
"newly",
"created",
".",
"json",
"File",
"This",
"method",
"is",
"expected",
"to",
"be",
"invoked",
"on",
"a",
"newly",
"created",
".",
"json",
"file",
"before",
"it",
"is",
"usable",
".",
"So",
... | train | https://github.com/Jsondb/jsondb-core/blob/c49654d1eee2ace4d5ca5be19730652a966ce7f4/src/main/java/io/jsondb/Util.java#L200-L237 |
infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java | BaseAsyncInterceptor.invokeNext | public final Object invokeNext(InvocationContext ctx, VisitableCommand command) {
"""
Invoke the next interceptor, possibly with a new command.
<p>Use {@link #invokeNextThenApply(InvocationContext, VisitableCommand, InvocationSuccessFunction)}
or {@link #invokeNextThenAccept(InvocationContext, VisitableCommand... | java | public final Object invokeNext(InvocationContext ctx, VisitableCommand command) {
try {
if (nextDDInterceptor != null) {
return command.acceptVisitor(ctx, nextDDInterceptor);
} else {
return nextInterceptor.visitCommand(ctx, command);
}
} catch (Throwable t... | [
"public",
"final",
"Object",
"invokeNext",
"(",
"InvocationContext",
"ctx",
",",
"VisitableCommand",
"command",
")",
"{",
"try",
"{",
"if",
"(",
"nextDDInterceptor",
"!=",
"null",
")",
"{",
"return",
"command",
".",
"acceptVisitor",
"(",
"ctx",
",",
"nextDDInt... | Invoke the next interceptor, possibly with a new command.
<p>Use {@link #invokeNextThenApply(InvocationContext, VisitableCommand, InvocationSuccessFunction)}
or {@link #invokeNextThenAccept(InvocationContext, VisitableCommand, InvocationSuccessAction)} instead
if you need to process the return value of the next interc... | [
"Invoke",
"the",
"next",
"interceptor",
"possibly",
"with",
"a",
"new",
"command",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L53-L63 |
zackpollard/JavaTelegramBot-API | core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java | TelegramBot.answerCallbackQuery | @Deprecated
public boolean answerCallbackQuery(String callbackQueryId, String text, boolean showAlert) {
"""
This allows you to respond to a callback query with some text as a response. This will either show up as an
alert or as a toast on the telegram client
@param callbackQueryId The ID of the callback... | java | @Deprecated
public boolean answerCallbackQuery(String callbackQueryId, String text, boolean showAlert) {
return this.answerCallbackQuery(callbackQueryId, CallbackQueryResponse.builder().text(text).showAlert(showAlert).build());
} | [
"@",
"Deprecated",
"public",
"boolean",
"answerCallbackQuery",
"(",
"String",
"callbackQueryId",
",",
"String",
"text",
",",
"boolean",
"showAlert",
")",
"{",
"return",
"this",
".",
"answerCallbackQuery",
"(",
"callbackQueryId",
",",
"CallbackQueryResponse",
".",
"b... | This allows you to respond to a callback query with some text as a response. This will either show up as an
alert or as a toast on the telegram client
@param callbackQueryId The ID of the callback query you are responding to
@param text The text you would like to respond with
@param showAlert Tr... | [
"This",
"allows",
"you",
"to",
"respond",
"to",
"a",
"callback",
"query",
"with",
"some",
"text",
"as",
"a",
"response",
".",
"This",
"will",
"either",
"show",
"up",
"as",
"an",
"alert",
"or",
"as",
"a",
"toast",
"on",
"the",
"telegram",
"client"
] | train | https://github.com/zackpollard/JavaTelegramBot-API/blob/9d100f351824042ca5fc0ea735d1fa376a13e81d/core/src/main/java/pro/zackpollard/telegrambot/api/TelegramBot.java#L980-L984 |
jenkinsci/github-plugin | src/main/java/org/jenkinsci/plugins/github/status/sources/ManuallyEnteredCommitContextSource.java | ManuallyEnteredCommitContextSource.context | @Override
public String context(@Nonnull Run<?, ?> run, @Nonnull TaskListener listener) {
"""
Just returns what user entered. Expands env vars and token macro
"""
try {
return new ExpandableMessage(context).expandAll(run, listener);
} catch (Exception e) {
LOG.debug(... | java | @Override
public String context(@Nonnull Run<?, ?> run, @Nonnull TaskListener listener) {
try {
return new ExpandableMessage(context).expandAll(run, listener);
} catch (Exception e) {
LOG.debug("Can't expand context, returning as is", e);
return context;
}... | [
"@",
"Override",
"public",
"String",
"context",
"(",
"@",
"Nonnull",
"Run",
"<",
"?",
",",
"?",
">",
"run",
",",
"@",
"Nonnull",
"TaskListener",
"listener",
")",
"{",
"try",
"{",
"return",
"new",
"ExpandableMessage",
"(",
"context",
")",
".",
"expandAll"... | Just returns what user entered. Expands env vars and token macro | [
"Just",
"returns",
"what",
"user",
"entered",
".",
"Expands",
"env",
"vars",
"and",
"token",
"macro"
] | train | https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/org/jenkinsci/plugins/github/status/sources/ManuallyEnteredCommitContextSource.java#L38-L46 |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/MPXReader.java | MPXReader.populateRecurringTask | private void populateRecurringTask(Record record, RecurringTask task) throws MPXJException {
"""
Populates a recurring task.
@param record MPX record
@param task recurring task
@throws MPXJException
"""
//System.out.println(record);
task.setStartDate(record.getDateTime(1));
task.setFinis... | java | private void populateRecurringTask(Record record, RecurringTask task) throws MPXJException
{
//System.out.println(record);
task.setStartDate(record.getDateTime(1));
task.setFinishDate(record.getDateTime(2));
task.setDuration(RecurrenceUtility.getDuration(m_projectFile.getProjectProperties(), ... | [
"private",
"void",
"populateRecurringTask",
"(",
"Record",
"record",
",",
"RecurringTask",
"task",
")",
"throws",
"MPXJException",
"{",
"//System.out.println(record);",
"task",
".",
"setStartDate",
"(",
"record",
".",
"getDateTime",
"(",
"1",
")",
")",
";",
"task"... | Populates a recurring task.
@param record MPX record
@param task recurring task
@throws MPXJException | [
"Populates",
"a",
"recurring",
"task",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1329-L1394 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/index/TreeSphereVisualization.java | TreeSphereVisualization.canVisualize | public static boolean canVisualize(Relation<?> rel, AbstractMTree<?, ?, ?, ?> tree) {
"""
Test for a visualizable index in the context's database.
@param rel Vector relation
@param tree Tree to visualize
@return whether the tree is visualizable
"""
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType... | java | public static boolean canVisualize(Relation<?> rel, AbstractMTree<?, ?, ?, ?> tree) {
if(!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
return false;
}
return getLPNormP(tree) > 0;
} | [
"public",
"static",
"boolean",
"canVisualize",
"(",
"Relation",
"<",
"?",
">",
"rel",
",",
"AbstractMTree",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
"tree",
")",
"{",
"if",
"(",
"!",
"TypeUtil",
".",
"NUMBER_VECTOR_FIELD",
".",
"isAssignableFromType"... | Test for a visualizable index in the context's database.
@param rel Vector relation
@param tree Tree to visualize
@return whether the tree is visualizable | [
"Test",
"for",
"a",
"visualizable",
"index",
"in",
"the",
"context",
"s",
"database",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/index/TreeSphereVisualization.java#L146-L151 |
jpush/jmessage-api-java-client | src/main/java/cn/jmessage/api/sensitiveword/SensitiveWordClient.java | SensitiveWordClient.getSensitiveWordList | public SensitiveWordListResult getSensitiveWordList(int start, int count)
throws APIConnectionException, APIRequestException {
"""
Get sensitive word list
@param start the begin of the list
@param count the count of the list
@return SensitiveWordListResult
@throws APIConnectionException connect exc... | java | public SensitiveWordListResult getSensitiveWordList(int start, int count)
throws APIConnectionException, APIRequestException {
Preconditions.checkArgument(start >= 0, "start should not less than 0");
Preconditions.checkArgument(count <= 2000, "count should not bigger than 2000");
Res... | [
"public",
"SensitiveWordListResult",
"getSensitiveWordList",
"(",
"int",
"start",
",",
"int",
"count",
")",
"throws",
"APIConnectionException",
",",
"APIRequestException",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"start",
">=",
"0",
",",
"\"start should not less... | Get sensitive word list
@param start the begin of the list
@param count the count of the list
@return SensitiveWordListResult
@throws APIConnectionException connect exception
@throws APIRequestException request exception | [
"Get",
"sensitive",
"word",
"list"
] | train | https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/sensitiveword/SensitiveWordClient.java#L109-L115 |
protostuff/protostuff | protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java | XmlIOUtil.mergeFrom | public static <T> void mergeFrom(Reader r, T message, Schema<T> schema)
throws IOException {
"""
Merges the {@code message} from the {@link Reader} using the given {@code schema}.
"""
mergeFrom(r, message, schema, DEFAULT_INPUT_FACTORY);
} | java | public static <T> void mergeFrom(Reader r, T message, Schema<T> schema)
throws IOException
{
mergeFrom(r, message, schema, DEFAULT_INPUT_FACTORY);
} | [
"public",
"static",
"<",
"T",
">",
"void",
"mergeFrom",
"(",
"Reader",
"r",
",",
"T",
"message",
",",
"Schema",
"<",
"T",
">",
"schema",
")",
"throws",
"IOException",
"{",
"mergeFrom",
"(",
"r",
",",
"message",
",",
"schema",
",",
"DEFAULT_INPUT_FACTORY"... | Merges the {@code message} from the {@link Reader} using the given {@code schema}. | [
"Merges",
"the",
"{"
] | train | https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java#L256-L260 |
HiddenStage/divide | Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java | GCMRegistrar.setRegisteredOnServer | public static void setRegisteredOnServer(Context context, boolean flag) {
"""
Sets whether the device was successfully registered in the server side.
"""
final SharedPreferences prefs = getGCMPreferences(context);
Editor editor = prefs.edit();
editor.putBoolean(PROPERTY_ON_SERVER, flag)... | java | public static void setRegisteredOnServer(Context context, boolean flag) {
final SharedPreferences prefs = getGCMPreferences(context);
Editor editor = prefs.edit();
editor.putBoolean(PROPERTY_ON_SERVER, flag);
// set the flag's expiration date
long lifespan = getRegisterOnServerLi... | [
"public",
"static",
"void",
"setRegisteredOnServer",
"(",
"Context",
"context",
",",
"boolean",
"flag",
")",
"{",
"final",
"SharedPreferences",
"prefs",
"=",
"getGCMPreferences",
"(",
"context",
")",
";",
"Editor",
"editor",
"=",
"prefs",
".",
"edit",
"(",
")"... | Sets whether the device was successfully registered in the server side. | [
"Sets",
"whether",
"the",
"device",
"was",
"successfully",
"registered",
"in",
"the",
"server",
"side",
"."
] | train | https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java#L379-L390 |
belaban/JGroups | src/org/jgroups/protocols/tom/DeliveryManagerImpl.java | DeliveryManagerImpl.deliverSingleDestinationMessage | void deliverSingleDestinationMessage(Message msg, MessageID messageID) {
"""
delivers a message that has only as destination member this node
@param msg the message
"""
synchronized (deliverySet) {
long sequenceNumber = sequenceNumberManager.get();
MessageInfo messageInfo = n... | java | void deliverSingleDestinationMessage(Message msg, MessageID messageID) {
synchronized (deliverySet) {
long sequenceNumber = sequenceNumberManager.get();
MessageInfo messageInfo = new MessageInfo(messageID, msg, sequenceNumber);
messageInfo.updateAndMarkReadyToDeliver(sequence... | [
"void",
"deliverSingleDestinationMessage",
"(",
"Message",
"msg",
",",
"MessageID",
"messageID",
")",
"{",
"synchronized",
"(",
"deliverySet",
")",
"{",
"long",
"sequenceNumber",
"=",
"sequenceNumberManager",
".",
"get",
"(",
")",
";",
"MessageInfo",
"messageInfo",
... | delivers a message that has only as destination member this node
@param msg the message | [
"delivers",
"a",
"message",
"that",
"has",
"only",
"as",
"destination",
"member",
"this",
"node"
] | train | https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/protocols/tom/DeliveryManagerImpl.java#L123-L131 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.getExplicitListItem | public ExplicitListItem getExplicitListItem(UUID appId, String versionId, UUID entityId, long itemId) {
"""
Get the explicit list of the pattern.any entity.
@param appId The application ID.
@param versionId The version ID.
@param entityId The Pattern.Any entity Id.
@param itemId The explicit list item Id.
@... | java | public ExplicitListItem getExplicitListItem(UUID appId, String versionId, UUID entityId, long itemId) {
return getExplicitListItemWithServiceResponseAsync(appId, versionId, entityId, itemId).toBlocking().single().body();
} | [
"public",
"ExplicitListItem",
"getExplicitListItem",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"long",
"itemId",
")",
"{",
"return",
"getExplicitListItemWithServiceResponseAsync",
"(",
"appId",
",",
"versionId",
",",
"entityId",
... | Get the explicit list of the pattern.any entity.
@param appId The application ID.
@param versionId The version ID.
@param entityId The Pattern.Any entity Id.
@param itemId The explicit list item Id.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the r... | [
"Get",
"the",
"explicit",
"list",
"of",
"the",
"pattern",
".",
"any",
"entity",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13966-L13968 |
aspectran/aspectran | core/src/main/java/com/aspectran/core/util/StringUtils.java | StringUtils.toDelimitedString | public static String toDelimitedString(Object[] arr, String delim) {
"""
Convert a {@code String} array into a delimited {@code String} (e.g. CSV).
<p>Useful for {@code toString()} implementations.
@param arr the array to display
@param delim the delimiter to use (typically a ",")
@return the delimited {@cod... | java | public static String toDelimitedString(Object[] arr, String delim) {
if (arr == null || arr.length == 0) {
return EMPTY;
}
if (arr.length == 1) {
return (arr[0] == null) ? EMPTY : arr[0].toString();
}
StringBuilder sb = new StringBuilder();
for (in... | [
"public",
"static",
"String",
"toDelimitedString",
"(",
"Object",
"[",
"]",
"arr",
",",
"String",
"delim",
")",
"{",
"if",
"(",
"arr",
"==",
"null",
"||",
"arr",
".",
"length",
"==",
"0",
")",
"{",
"return",
"EMPTY",
";",
"}",
"if",
"(",
"arr",
"."... | Convert a {@code String} array into a delimited {@code String} (e.g. CSV).
<p>Useful for {@code toString()} implementations.
@param arr the array to display
@param delim the delimiter to use (typically a ",")
@return the delimited {@code String} | [
"Convert",
"a",
"{",
"@code",
"String",
"}",
"array",
"into",
"a",
"delimited",
"{",
"@code",
"String",
"}",
"(",
"e",
".",
"g",
".",
"CSV",
")",
".",
"<p",
">",
"Useful",
"for",
"{",
"@code",
"toString",
"()",
"}",
"implementations",
"."
] | train | https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L641-L656 |
camunda/camunda-xml-model | src/main/java/org/camunda/bpm/model/xml/impl/type/reference/ReferenceImpl.java | ReferenceImpl.setReferenceTargetElement | public void setReferenceTargetElement(ModelElementInstance referenceSourceElement, T referenceTargetElement) {
"""
Set the reference target model element instance
@param referenceSourceElement the reference source model element instance
@param referenceTargetElement the reference target model element instance
... | java | public void setReferenceTargetElement(ModelElementInstance referenceSourceElement, T referenceTargetElement) {
ModelInstance modelInstance = referenceSourceElement.getModelInstance();
String referenceTargetIdentifier = referenceTargetAttribute.getValue(referenceTargetElement);
ModelElementInstance existingE... | [
"public",
"void",
"setReferenceTargetElement",
"(",
"ModelElementInstance",
"referenceSourceElement",
",",
"T",
"referenceTargetElement",
")",
"{",
"ModelInstance",
"modelInstance",
"=",
"referenceSourceElement",
".",
"getModelInstance",
"(",
")",
";",
"String",
"referenceT... | Set the reference target model element instance
@param referenceSourceElement the reference source model element instance
@param referenceTargetElement the reference target model element instance
@throws ModelReferenceException if element is not already added to the model | [
"Set",
"the",
"reference",
"target",
"model",
"element",
"instance"
] | train | https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/type/reference/ReferenceImpl.java#L82-L93 |
AgNO3/jcifs-ng | src/main/java/jcifs/ntlmssp/Type2Message.java | Type2Message.getDefaultFlags | public static int getDefaultFlags ( CIFSContext tc, Type1Message type1 ) {
"""
Returns the default flags for a Type-2 message created in response
to the given Type-1 message in the current environment.
@param tc
context to use
@param type1
request message
@return An <code>int</code> containing the defaul... | java | public static int getDefaultFlags ( CIFSContext tc, Type1Message type1 ) {
if ( type1 == null )
return getDefaultFlags(tc);
int flags = NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_VERSION;
int type1Flags = type1.getFlags();
flags |= ( ( type1Flags & NTLMSSP_NEGOTIATE_UNICODE )... | [
"public",
"static",
"int",
"getDefaultFlags",
"(",
"CIFSContext",
"tc",
",",
"Type1Message",
"type1",
")",
"{",
"if",
"(",
"type1",
"==",
"null",
")",
"return",
"getDefaultFlags",
"(",
"tc",
")",
";",
"int",
"flags",
"=",
"NTLMSSP_NEGOTIATE_NTLM",
"|",
"NTLM... | Returns the default flags for a Type-2 message created in response
to the given Type-1 message in the current environment.
@param tc
context to use
@param type1
request message
@return An <code>int</code> containing the default flags. | [
"Returns",
"the",
"default",
"flags",
"for",
"a",
"Type",
"-",
"2",
"message",
"created",
"in",
"response",
"to",
"the",
"given",
"Type",
"-",
"1",
"message",
"in",
"the",
"current",
"environment",
"."
] | train | https://github.com/AgNO3/jcifs-ng/blob/0311107a077ea372527ae74839eec8042197332f/src/main/java/jcifs/ntlmssp/Type2Message.java#L217-L230 |
wcm-io-caravan/caravan-hal | docs-maven-plugin/src/main/java/io/wcm/caravan/maven/plugins/haldocs/GenerateHalDocsJsonMojo.java | GenerateHalDocsJsonMojo.toLinkRelation | private LinkRelation toLinkRelation(JavaClass javaClazz, JavaField javaField, ClassLoader compileClassLoader) {
"""
Builds a {@link LinkRelation} from a field definition with {@link LinkRelationDoc} annotation.
@param javaClazz QDox class
@param javaField QDox field
@param compileClassLoader Classloader for com... | java | private LinkRelation toLinkRelation(JavaClass javaClazz, JavaField javaField, ClassLoader compileClassLoader) {
LinkRelation rel = new LinkRelation();
rel.setShortDescription(buildShortDescription(javaField.getComment()));
rel.setDescriptionMarkup(javaField.getComment());
rel.setRel(getStaticFieldValu... | [
"private",
"LinkRelation",
"toLinkRelation",
"(",
"JavaClass",
"javaClazz",
",",
"JavaField",
"javaField",
",",
"ClassLoader",
"compileClassLoader",
")",
"{",
"LinkRelation",
"rel",
"=",
"new",
"LinkRelation",
"(",
")",
";",
"rel",
".",
"setShortDescription",
"(",
... | Builds a {@link LinkRelation} from a field definition with {@link LinkRelationDoc} annotation.
@param javaClazz QDox class
@param javaField QDox field
@param compileClassLoader Classloader for compile dependencies
@return Link relation | [
"Builds",
"a",
"{"
] | train | https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/docs-maven-plugin/src/main/java/io/wcm/caravan/maven/plugins/haldocs/GenerateHalDocsJsonMojo.java#L196-L213 |
UrielCh/ovh-java-sdk | ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java | ApiOvhIp.ip_phishing_GET | public ArrayList<Long> ip_phishing_GET(String ip, String ipOnAntiphishing, OvhAntiphishingStateEnum state) throws IOException {
"""
Ip under anti-phishing
REST: GET /ip/{ip}/phishing
@param state [required] Filter the value of state property (=)
@param ipOnAntiphishing [required] Filter the value of ipOnAntip... | java | public ArrayList<Long> ip_phishing_GET(String ip, String ipOnAntiphishing, OvhAntiphishingStateEnum state) throws IOException {
String qPath = "/ip/{ip}/phishing";
StringBuilder sb = path(qPath, ip);
query(sb, "ipOnAntiphishing", ipOnAntiphishing);
query(sb, "state", state);
String resp = exec(qPath, "GET", s... | [
"public",
"ArrayList",
"<",
"Long",
">",
"ip_phishing_GET",
"(",
"String",
"ip",
",",
"String",
"ipOnAntiphishing",
",",
"OvhAntiphishingStateEnum",
"state",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/ip/{ip}/phishing\"",
";",
"StringBuilder",
"s... | Ip under anti-phishing
REST: GET /ip/{ip}/phishing
@param state [required] Filter the value of state property (=)
@param ipOnAntiphishing [required] Filter the value of ipOnAntiphishing property (within or equals)
@param ip [required] | [
"Ip",
"under",
"anti",
"-",
"phishing"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L81-L88 |
OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseThreeApplication.java | PhaseThreeApplication.failIndex | private void failIndex(PhaseThreeOptions phasecfg, String errorMessage) {
"""
Logic to recover from a missing resource index.
@param phasecfg
@param errorMessage
"""
stageError(errorMessage);
final StringBuilder bldr = new StringBuilder();
bldr.append("Could not find resource index ... | java | private void failIndex(PhaseThreeOptions phasecfg, String errorMessage) {
stageError(errorMessage);
final StringBuilder bldr = new StringBuilder();
bldr.append("Could not find resource index file.");
bldr.append("Expansion of protein families, named complexes, ");
bldr.append("ge... | [
"private",
"void",
"failIndex",
"(",
"PhaseThreeOptions",
"phasecfg",
",",
"String",
"errorMessage",
")",
"{",
"stageError",
"(",
"errorMessage",
")",
";",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"bldr",
".",
"append",
"("... | Logic to recover from a missing resource index.
@param phasecfg
@param errorMessage | [
"Logic",
"to",
"recover",
"from",
"a",
"missing",
"resource",
"index",
"."
] | train | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseThreeApplication.java#L295-L307 |
navnorth/LRJavaLib | src/com/navnorth/learningregistry/LRImporter.java | LRImporter.getHarvestRequestPath | private String getHarvestRequestPath(String requestID, Boolean byResourceID, Boolean byDocID) {
"""
Obtain the path used for a harvest request
@param requestID the "request_ID" parameter for the request
@param byResourceID the "by_resource_ID" parameter for the request
@param byDocID the "by_doc_ID" parameter... | java | private String getHarvestRequestPath(String requestID, Boolean byResourceID, Boolean byDocID)
{
String path = harvestPath;
if (requestID != null)
{
path += "?" + requestIDParam + "=" + requestID;
}
else
{
// error
return nu... | [
"private",
"String",
"getHarvestRequestPath",
"(",
"String",
"requestID",
",",
"Boolean",
"byResourceID",
",",
"Boolean",
"byDocID",
")",
"{",
"String",
"path",
"=",
"harvestPath",
";",
"if",
"(",
"requestID",
"!=",
"null",
")",
"{",
"path",
"+=",
"\"?\"",
"... | Obtain the path used for a harvest request
@param requestID the "request_ID" parameter for the request
@param byResourceID the "by_resource_ID" parameter for the request
@param byDocID the "by_doc_ID" parameter for the request
@return the string of the path for a harvest request | [
"Obtain",
"the",
"path",
"used",
"for",
"a",
"harvest",
"request"
] | train | https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRImporter.java#L176-L209 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java | ToStringStyle.appendEnd | public void appendEnd(final StringBuffer buffer, final Object object) {
"""
<p>Append to the <code>toString</code> the end of data indicator.</p>
@param buffer the <code>StringBuffer</code> to populate
@param object the <code>Object</code> to build a
<code>toString</code> for.
"""
if (!this.fiel... | java | public void appendEnd(final StringBuffer buffer, final Object object) {
if (!this.fieldSeparatorAtEnd) {
removeLastFieldSeparator(buffer);
}
appendContentEnd(buffer);
unregister(object);
} | [
"public",
"void",
"appendEnd",
"(",
"final",
"StringBuffer",
"buffer",
",",
"final",
"Object",
"object",
")",
"{",
"if",
"(",
"!",
"this",
".",
"fieldSeparatorAtEnd",
")",
"{",
"removeLastFieldSeparator",
"(",
"buffer",
")",
";",
"}",
"appendContentEnd",
"(",
... | <p>Append to the <code>toString</code> the end of data indicator.</p>
@param buffer the <code>StringBuffer</code> to populate
@param object the <code>Object</code> to build a
<code>toString</code> for. | [
"<p",
">",
"Append",
"to",
"the",
"<code",
">",
"toString<",
"/",
"code",
">",
"the",
"end",
"of",
"data",
"indicator",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java#L425-L431 |
datacleaner/AnalyzerBeans | env/cluster/src/main/java/org/eobjects/analyzer/cluster/http/SlaveServletHelper.java | SlaveServletHelper.runJob | public AnalysisResultFuture runJob(AnalysisJob job, String slaveJobId, AnalysisListener... analysisListeners) {
"""
Runs a slave job
@param job
@param slaveJobId
@param analysisListeners
@return
"""
final AnalysisRunner runner = new SlaveAnalysisRunner(_configuration, analysisListeners);
... | java | public AnalysisResultFuture runJob(AnalysisJob job, String slaveJobId, AnalysisListener... analysisListeners) {
final AnalysisRunner runner = new SlaveAnalysisRunner(_configuration, analysisListeners);
final AnalysisResultFuture resultFuture = runner.run(job);
if (slaveJobId != null) {
... | [
"public",
"AnalysisResultFuture",
"runJob",
"(",
"AnalysisJob",
"job",
",",
"String",
"slaveJobId",
",",
"AnalysisListener",
"...",
"analysisListeners",
")",
"{",
"final",
"AnalysisRunner",
"runner",
"=",
"new",
"SlaveAnalysisRunner",
"(",
"_configuration",
",",
"anal... | Runs a slave job
@param job
@param slaveJobId
@param analysisListeners
@return | [
"Runs",
"a",
"slave",
"job"
] | train | https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/cluster/src/main/java/org/eobjects/analyzer/cluster/http/SlaveServletHelper.java#L294-L301 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/StringUtils.java | StringUtils.containsNone | public static boolean containsNone(final CharSequence cs, final String invalidChars) {
"""
<p>Checks that the CharSequence does not contain certain characters.</p>
<p>A {@code null} CharSequence will return {@code true}.
A {@code null} invalid character array will return {@code true}.
An empty String ("") alw... | java | public static boolean containsNone(final CharSequence cs, final String invalidChars) {
if (cs == null || invalidChars == null) {
return true;
}
return containsNone(cs, invalidChars.toCharArray());
} | [
"public",
"static",
"boolean",
"containsNone",
"(",
"final",
"CharSequence",
"cs",
",",
"final",
"String",
"invalidChars",
")",
"{",
"if",
"(",
"cs",
"==",
"null",
"||",
"invalidChars",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"return",
"contain... | <p>Checks that the CharSequence does not contain certain characters.</p>
<p>A {@code null} CharSequence will return {@code true}.
A {@code null} invalid character array will return {@code true}.
An empty String ("") always returns true.</p>
<pre>
StringUtils.containsNone(null, *) = true
StringUtils.containsNone... | [
"<p",
">",
"Checks",
"that",
"the",
"CharSequence",
"does",
"not",
"contain",
"certain",
"characters",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L2505-L2510 |
UrielCh/ovh-java-sdk | ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java | ApiOvhConnectivity.eligibility_search_buildings_POST | public OvhAsyncTaskArray<OvhBuilding> eligibility_search_buildings_POST(String streetCode, String streetNumber) throws IOException {
"""
Get all buildings for a specific address
REST: POST /connectivity/eligibility/search/buildings
@param streetNumber [required] Street number
@param streetCode [required] Uniq... | java | public OvhAsyncTaskArray<OvhBuilding> eligibility_search_buildings_POST(String streetCode, String streetNumber) throws IOException {
String qPath = "/connectivity/eligibility/search/buildings";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "streetCode", str... | [
"public",
"OvhAsyncTaskArray",
"<",
"OvhBuilding",
">",
"eligibility_search_buildings_POST",
"(",
"String",
"streetCode",
",",
"String",
"streetNumber",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/connectivity/eligibility/search/buildings\"",
";",
"String... | Get all buildings for a specific address
REST: POST /connectivity/eligibility/search/buildings
@param streetNumber [required] Street number
@param streetCode [required] Unique identifier of the street (you can get it with POST /connectivity/eligibility/search/streets) | [
"Get",
"all",
"buildings",
"for",
"a",
"specific",
"address"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java#L35-L43 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/render/CoreRenderer.java | CoreRenderer.beginDisabledFieldset | public static boolean beginDisabledFieldset(IContentDisabled component, ResponseWriter rw) throws IOException {
"""
Renders the code disabling every input field and every button within a
container.
@param component
@param rw
@return true if an element has been rendered
@throws IOException
"""
if (com... | java | public static boolean beginDisabledFieldset(IContentDisabled component, ResponseWriter rw) throws IOException {
if (component.isContentDisabled()) {
rw.startElement("fieldset", (UIComponent) component);
rw.writeAttribute("disabled", "disabled", "null");
return true;
}
return false;
} | [
"public",
"static",
"boolean",
"beginDisabledFieldset",
"(",
"IContentDisabled",
"component",
",",
"ResponseWriter",
"rw",
")",
"throws",
"IOException",
"{",
"if",
"(",
"component",
".",
"isContentDisabled",
"(",
")",
")",
"{",
"rw",
".",
"startElement",
"(",
"\... | Renders the code disabling every input field and every button within a
container.
@param component
@param rw
@return true if an element has been rendered
@throws IOException | [
"Renders",
"the",
"code",
"disabling",
"every",
"input",
"field",
"and",
"every",
"button",
"within",
"a",
"container",
"."
] | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/render/CoreRenderer.java#L621-L628 |
TheHortonMachine/hortonmachine | dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java | ASpatialDb.insertGeometry | public void insertGeometry( String tableName, Geometry geometry, String epsg ) throws Exception {
"""
Insert a geometry into a table.
@param tableName
the table to use.
@param geometry
the geometry to insert.
@param epsg
the optional epsg.
@throws Exception
"""
String epsgStr = "4326";
... | java | public void insertGeometry( String tableName, Geometry geometry, String epsg ) throws Exception {
String epsgStr = "4326";
if (epsg == null) {
epsgStr = epsg;
}
GeometryColumn gc = getGeometryColumnsForTable(tableName);
String sql = "INSERT INTO " + tableName + " (" ... | [
"public",
"void",
"insertGeometry",
"(",
"String",
"tableName",
",",
"Geometry",
"geometry",
",",
"String",
"epsg",
")",
"throws",
"Exception",
"{",
"String",
"epsgStr",
"=",
"\"4326\"",
";",
"if",
"(",
"epsg",
"==",
"null",
")",
"{",
"epsgStr",
"=",
"epsg... | Insert a geometry into a table.
@param tableName
the table to use.
@param geometry
the geometry to insert.
@param epsg
the optional epsg.
@throws Exception | [
"Insert",
"a",
"geometry",
"into",
"a",
"table",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/compat/ASpatialDb.java#L193-L210 |
alkacon/opencms-core | src/org/opencms/db/generic/CmsVfsDriver.java | CmsVfsDriver.replaceProject | private String replaceProject(String query, boolean online) {
"""
Replaces the %(PROJECT) macro inside a query with either ONLINE or OFFLINE, depending on the value
of a flag.<p>
We use this instead of the ${PROJECT} replacement mechanism when we need explicit control over the
project, and don't want to impli... | java | private String replaceProject(String query, boolean online) {
return query.replace("%(PROJECT)", online ? ONLINE : OFFLINE);
} | [
"private",
"String",
"replaceProject",
"(",
"String",
"query",
",",
"boolean",
"online",
")",
"{",
"return",
"query",
".",
"replace",
"(",
"\"%(PROJECT)\"",
",",
"online",
"?",
"ONLINE",
":",
"OFFLINE",
")",
";",
"}"
] | Replaces the %(PROJECT) macro inside a query with either ONLINE or OFFLINE, depending on the value
of a flag.<p>
We use this instead of the ${PROJECT} replacement mechanism when we need explicit control over the
project, and don't want to implicitly use the project of the DB context.<p>
@param query the query in whic... | [
"Replaces",
"the",
"%",
"(",
"PROJECT",
")",
"macro",
"inside",
"a",
"query",
"with",
"either",
"ONLINE",
"or",
"OFFLINE",
"depending",
"on",
"the",
"value",
"of",
"a",
"flag",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsVfsDriver.java#L4822-L4825 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java | ApiOvhDbaaslogs.serviceName_input_inputId_allowedNetwork_allowedNetworkId_GET | public OvhAllowedNetwork serviceName_input_inputId_allowedNetwork_allowedNetworkId_GET(String serviceName, String inputId, String allowedNetworkId) throws IOException {
"""
List all network UUID allowed to join input
REST: GET /dbaas/logs/{serviceName}/input/{inputId}/allowedNetwork/{allowedNetworkId}
@param s... | java | public OvhAllowedNetwork serviceName_input_inputId_allowedNetwork_allowedNetworkId_GET(String serviceName, String inputId, String allowedNetworkId) throws IOException {
String qPath = "/dbaas/logs/{serviceName}/input/{inputId}/allowedNetwork/{allowedNetworkId}";
StringBuilder sb = path(qPath, serviceName, inputId, ... | [
"public",
"OvhAllowedNetwork",
"serviceName_input_inputId_allowedNetwork_allowedNetworkId_GET",
"(",
"String",
"serviceName",
",",
"String",
"inputId",
",",
"String",
"allowedNetworkId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dbaas/logs/{serviceName}/inp... | List all network UUID allowed to join input
REST: GET /dbaas/logs/{serviceName}/input/{inputId}/allowedNetwork/{allowedNetworkId}
@param serviceName [required] Service name
@param inputId [required] Input ID
@param allowedNetworkId [required] Allowed network ID | [
"List",
"all",
"network",
"UUID",
"allowed",
"to",
"join",
"input"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L529-L534 |
chrisjenx/Calligraphy | calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java | CalligraphyLayoutInflater.onCreateView | @Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected View onCreateView(View parent, String name, AttributeSet attrs) throws ClassNotFoundException {
"""
The LayoutInflater onCreateView is the fourth port of call for LayoutInflation.
BUT only for none CustomViews.
"""
return mCalligrap... | java | @Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected View onCreateView(View parent, String name, AttributeSet attrs) throws ClassNotFoundException {
return mCalligraphyFactory.onViewCreated(super.onCreateView(parent, name, attrs),
getContext(), attrs);
} | [
"@",
"Override",
"@",
"TargetApi",
"(",
"Build",
".",
"VERSION_CODES",
".",
"HONEYCOMB",
")",
"protected",
"View",
"onCreateView",
"(",
"View",
"parent",
",",
"String",
"name",
",",
"AttributeSet",
"attrs",
")",
"throws",
"ClassNotFoundException",
"{",
"return",... | The LayoutInflater onCreateView is the fourth port of call for LayoutInflation.
BUT only for none CustomViews. | [
"The",
"LayoutInflater",
"onCreateView",
"is",
"the",
"fourth",
"port",
"of",
"call",
"for",
"LayoutInflation",
".",
"BUT",
"only",
"for",
"none",
"CustomViews",
"."
] | train | https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyLayoutInflater.java#L145-L150 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/CoroutineManager.java | CoroutineManager.co_exit_to | public synchronized void co_exit_to(Object arg_object,int thisCoroutine,int toCoroutine) throws java.lang.NoSuchMethodException {
"""
Make the ID available for reuse and terminate this coroutine,
transferring control to the specified coroutine. Note that this
returns immediately rather than waiting for any furth... | java | public synchronized void co_exit_to(Object arg_object,int thisCoroutine,int toCoroutine) throws java.lang.NoSuchMethodException
{
if(!m_activeIDs.get(toCoroutine))
throw new java.lang.NoSuchMethodException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COROUTINE_NOT_AVAIL, new Object[]{Integer.toString(t... | [
"public",
"synchronized",
"void",
"co_exit_to",
"(",
"Object",
"arg_object",
",",
"int",
"thisCoroutine",
",",
"int",
"toCoroutine",
")",
"throws",
"java",
".",
"lang",
".",
"NoSuchMethodException",
"{",
"if",
"(",
"!",
"m_activeIDs",
".",
"get",
"(",
"toCorou... | Make the ID available for reuse and terminate this coroutine,
transferring control to the specified coroutine. Note that this
returns immediately rather than waiting for any further coroutine
traffic, so the thread can proceed with other shutdown activities.
@param arg_object A value to be passed to the other corou... | [
"Make",
"the",
"ID",
"available",
"for",
"reuse",
"and",
"terminate",
"this",
"coroutine",
"transferring",
"control",
"to",
"the",
"specified",
"coroutine",
".",
"Note",
"that",
"this",
"returns",
"immediately",
"rather",
"than",
"waiting",
"for",
"any",
"furthe... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/CoroutineManager.java#L330-L343 |
tvesalainen/util | util/src/main/java/org/vesalainen/util/CollectionHelp.java | CollectionHelp.parallelQuickSort | public static final <T> void parallelQuickSort(List<T> list, Comparator<T> comparator) {
"""
Sort list using quick-sort algorithm using ForkJoinPool.
<p>Note! This is experimental and is slower than other sorting methods!
@param <T>
@param list
@param comparator
"""
ForkJoinPool pool = new ForkJoi... | java | public static final <T> void parallelQuickSort(List<T> list, Comparator<T> comparator)
{
ForkJoinPool pool = new ForkJoinPool();
QuickSorter sorter = new QuickSorter(list, 0, list.size()-1, comparator);
pool.invoke(sorter);
} | [
"public",
"static",
"final",
"<",
"T",
">",
"void",
"parallelQuickSort",
"(",
"List",
"<",
"T",
">",
"list",
",",
"Comparator",
"<",
"T",
">",
"comparator",
")",
"{",
"ForkJoinPool",
"pool",
"=",
"new",
"ForkJoinPool",
"(",
")",
";",
"QuickSorter",
"sort... | Sort list using quick-sort algorithm using ForkJoinPool.
<p>Note! This is experimental and is slower than other sorting methods!
@param <T>
@param list
@param comparator | [
"Sort",
"list",
"using",
"quick",
"-",
"sort",
"algorithm",
"using",
"ForkJoinPool",
".",
"<p",
">",
"Note!",
"This",
"is",
"experimental",
"and",
"is",
"slower",
"than",
"other",
"sorting",
"methods!"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CollectionHelp.java#L367-L372 |
Alexey1Gavrilov/ExpectIt | expectit-core/src/main/java/net/sf/expectit/matcher/Matchers.java | Matchers.anyString | public static Matcher<Result> anyString() {
"""
Creates a matcher that matches when at least one character exists in the input buffer.
<p/>
If the result is successful, the {@link net.sf.expectit.Result#getBefore()} returns an
empty string, the
{@link net.sf.expectit.Result#group()} returns the entire input bu... | java | public static Matcher<Result> anyString() {
return new Matcher<Result>() {
@Override
public Result matches(String input, boolean isEof) {
return input.length() > 0 ? success(input, "", input) : failure(input, false);
}
@Override
public... | [
"public",
"static",
"Matcher",
"<",
"Result",
">",
"anyString",
"(",
")",
"{",
"return",
"new",
"Matcher",
"<",
"Result",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Result",
"matches",
"(",
"String",
"input",
",",
"boolean",
"isEof",
")",
"{",
"re... | Creates a matcher that matches when at least one character exists in the input buffer.
<p/>
If the result is successful, the {@link net.sf.expectit.Result#getBefore()} returns an
empty string, the
{@link net.sf.expectit.Result#group()} returns the entire input buffer.
@return the result | [
"Creates",
"a",
"matcher",
"that",
"matches",
"when",
"at",
"least",
"one",
"character",
"exists",
"in",
"the",
"input",
"buffer",
".",
"<p",
"/",
">",
"If",
"the",
"result",
"is",
"successful",
"the",
"{",
"@link",
"net",
".",
"sf",
".",
"expectit",
"... | train | https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/matcher/Matchers.java#L296-L308 |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/mojo/AbstractWisdomSourceWatcherMojo.java | AbstractWisdomSourceWatcherMojo.execute | @Override
public void execute() throws MojoExecutionException, MojoFailureException {
"""
Create a model for each wisdom controller available in the java source directory and call
{@link #controllerParsed(File, ControllerModel)} for each of them.
@throws MojoExecutionException when an exception occurred wh... | java | @Override
public void execute() throws MojoExecutionException, MojoFailureException {
javaSourceDir = WatcherUtils.getJavaSource(basedir);
try {
for (File file : FileUtils.listFiles(javaSourceDir, new String[]{"java"}, true)) {
if (accept(file)) {
par... | [
"@",
"Override",
"public",
"void",
"execute",
"(",
")",
"throws",
"MojoExecutionException",
",",
"MojoFailureException",
"{",
"javaSourceDir",
"=",
"WatcherUtils",
".",
"getJavaSource",
"(",
"basedir",
")",
";",
"try",
"{",
"for",
"(",
"File",
"file",
":",
"Fi... | Create a model for each wisdom controller available in the java source directory and call
{@link #controllerParsed(File, ControllerModel)} for each of them.
@throws MojoExecutionException when an exception occurred while creating the raml file.
@throws MojoFailureException {@inheritDoc} | [
"Create",
"a",
"model",
"for",
"each",
"wisdom",
"controller",
"available",
"in",
"the",
"java",
"source",
"directory",
"and",
"call",
"{",
"@link",
"#controllerParsed",
"(",
"File",
"ControllerModel",
")",
"}",
"for",
"each",
"of",
"them",
"."
] | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/mojo/AbstractWisdomSourceWatcherMojo.java#L71-L84 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteLinksInner.java | ExpressRouteLinksInner.listAsync | public Observable<Page<ExpressRouteLinkInner>> listAsync(final String resourceGroupName, final String expressRoutePortName) {
"""
Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource.
@param resourceGroupName The name of the resource group.
@param expressRoutePortName The name... | java | public Observable<Page<ExpressRouteLinkInner>> listAsync(final String resourceGroupName, final String expressRoutePortName) {
return listWithServiceResponseAsync(resourceGroupName, expressRoutePortName)
.map(new Func1<ServiceResponse<Page<ExpressRouteLinkInner>>, Page<ExpressRouteLinkInner>>() {
... | [
"public",
"Observable",
"<",
"Page",
"<",
"ExpressRouteLinkInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"expressRoutePortName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"e... | Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource.
@param resourceGroupName The name of the resource group.
@param expressRoutePortName The name of the ExpressRoutePort resource.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the... | [
"Retrieve",
"the",
"ExpressRouteLink",
"sub",
"-",
"resources",
"of",
"the",
"specified",
"ExpressRoutePort",
"resource",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteLinksInner.java#L214-L222 |
aws/aws-sdk-java | aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateRouteResponseRequest.java | CreateRouteResponseRequest.withResponseModels | public CreateRouteResponseRequest withResponseModels(java.util.Map<String, String> responseModels) {
"""
<p>
The response models for the route response.
</p>
@param responseModels
The response models for the route response.
@return Returns a reference to this object so that method calls can be chained toget... | java | public CreateRouteResponseRequest withResponseModels(java.util.Map<String, String> responseModels) {
setResponseModels(responseModels);
return this;
} | [
"public",
"CreateRouteResponseRequest",
"withResponseModels",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"responseModels",
")",
"{",
"setResponseModels",
"(",
"responseModels",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The response models for the route response.
</p>
@param responseModels
The response models for the route response.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"response",
"models",
"for",
"the",
"route",
"response",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateRouteResponseRequest.java#L175-L178 |
joelittlejohn/jsonschema2pojo | jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/DefaultRule.java | DefaultRule.apply | @Override
public JFieldVar apply(String nodeName, JsonNode node, JsonNode parent, JFieldVar field, Schema currentSchema) {
"""
Applies this schema rule to take the required code generation steps.
<p>
Default values are implemented by assigning an expression to the given
field (so when instances of the gener... | java | @Override
public JFieldVar apply(String nodeName, JsonNode node, JsonNode parent, JFieldVar field, Schema currentSchema) {
boolean defaultPresent = node != null && isNotEmpty(node.asText());
String fieldType = field.type().fullName();
if (defaultPresent && !field.type().isPrimitive() && n... | [
"@",
"Override",
"public",
"JFieldVar",
"apply",
"(",
"String",
"nodeName",
",",
"JsonNode",
"node",
",",
"JsonNode",
"parent",
",",
"JFieldVar",
"field",
",",
"Schema",
"currentSchema",
")",
"{",
"boolean",
"defaultPresent",
"=",
"node",
"!=",
"null",
"&&",
... | Applies this schema rule to take the required code generation steps.
<p>
Default values are implemented by assigning an expression to the given
field (so when instances of the generated POJO are created, its fields
will then contain their default values).
<p>
Collections (Lists and Sets) are initialized to an empty col... | [
"Applies",
"this",
"schema",
"rule",
"to",
"take",
"the",
"required",
"code",
"generation",
"steps",
".",
"<p",
">",
"Default",
"values",
"are",
"implemented",
"by",
"assigning",
"an",
"expression",
"to",
"the",
"given",
"field",
"(",
"so",
"when",
"instance... | train | https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/DefaultRule.java#L84-L107 |
thelinmichael/spotify-web-api-java | src/main/java/com/wrapper/spotify/SpotifyApi.java | SpotifyApi.getPlaylist | @Deprecated
public GetPlaylistRequest.Builder getPlaylist(String user_id, String playlist_id) {
"""
Get a playlist.
@deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used.
(https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)
@param user_id ... | java | @Deprecated
public GetPlaylistRequest.Builder getPlaylist(String user_id, String playlist_id) {
return new GetPlaylistRequest.Builder(accessToken)
.setDefaults(httpManager, scheme, host, port)
.user_id(user_id)
.playlist_id(playlist_id);
} | [
"@",
"Deprecated",
"public",
"GetPlaylistRequest",
".",
"Builder",
"getPlaylist",
"(",
"String",
"user_id",
",",
"String",
"playlist_id",
")",
"{",
"return",
"new",
"GetPlaylistRequest",
".",
"Builder",
"(",
"accessToken",
")",
".",
"setDefaults",
"(",
"httpManage... | Get a playlist.
@deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used.
(https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/)
@param user_id The playlists owners username.
@param playlist_id The playlists ID.
@return A {@link GetPlaylistRequest.Build... | [
"Get",
"a",
"playlist",
"."
] | train | https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L1198-L1204 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java | DataXceiver.sendResponse | private void sendResponse(Socket s, short opStatus, long timeout)
throws IOException {
"""
Utility function for sending a response.
@param s socket to write to
@param opStatus status message to write
@param timeout send timeout
"""
DataOutputStream... | java | private void sendResponse(Socket s, short opStatus, long timeout)
throws IOException {
DataOutputStream reply =
new DataOutputStream(NetUtils.getOutputStream(s, timeout));
reply.writeShort(opStatus);
reply.flush();
} | [
"private",
"void",
"sendResponse",
"(",
"Socket",
"s",
",",
"short",
"opStatus",
",",
"long",
"timeout",
")",
"throws",
"IOException",
"{",
"DataOutputStream",
"reply",
"=",
"new",
"DataOutputStream",
"(",
"NetUtils",
".",
"getOutputStream",
"(",
"s",
",",
"ti... | Utility function for sending a response.
@param s socket to write to
@param opStatus status message to write
@param timeout send timeout | [
"Utility",
"function",
"for",
"sending",
"a",
"response",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java#L1298-L1305 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java | FilesImpl.listFromTaskNextAsync | public ServiceFuture<List<NodeFile>> listFromTaskNextAsync(final String nextPageLink, final ServiceFuture<List<NodeFile>> serviceFuture, final ListOperationCallback<NodeFile> serviceCallback) {
"""
Lists the files in a task's directory on its compute node.
@param nextPageLink The NextLink from the previous succ... | java | public ServiceFuture<List<NodeFile>> listFromTaskNextAsync(final String nextPageLink, final ServiceFuture<List<NodeFile>> serviceFuture, final ListOperationCallback<NodeFile> serviceCallback) {
return AzureServiceFuture.fromHeaderPageResponse(
listFromTaskNextSinglePageAsync(nextPageLink),
... | [
"public",
"ServiceFuture",
"<",
"List",
"<",
"NodeFile",
">",
">",
"listFromTaskNextAsync",
"(",
"final",
"String",
"nextPageLink",
",",
"final",
"ServiceFuture",
"<",
"List",
"<",
"NodeFile",
">",
">",
"serviceFuture",
",",
"final",
"ListOperationCallback",
"<",
... | Lists the files in a task's directory on its compute node.
@param nextPageLink The NextLink from the previous successful call to List operation.
@param serviceFuture the ServiceFuture object tracking the Retrofit calls
@param serviceCallback the async ServiceCallback to handle successful and failed responses.
@throws ... | [
"Lists",
"the",
"files",
"in",
"a",
"task",
"s",
"directory",
"on",
"its",
"compute",
"node",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L2249-L2259 |
sdl/odata | odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java | EntityDataModelUtil.setPropertyValue | public static void setPropertyValue(StructuralProperty property, Object object, Object value) {
"""
Sets the value of a property.
@param property The property.
@param object The object to set the value in (typically an OData entity).
@param value The value to set.
"""
Field field = property.g... | java | public static void setPropertyValue(StructuralProperty property, Object object, Object value) {
Field field = property.getJavaField();
field.setAccessible(true);
try {
field.set(object, value);
} catch (IllegalAccessException e) {
throw new ODataSystemException("C... | [
"public",
"static",
"void",
"setPropertyValue",
"(",
"StructuralProperty",
"property",
",",
"Object",
"object",
",",
"Object",
"value",
")",
"{",
"Field",
"field",
"=",
"property",
".",
"getJavaField",
"(",
")",
";",
"field",
".",
"setAccessible",
"(",
"true",... | Sets the value of a property.
@param property The property.
@param object The object to set the value in (typically an OData entity).
@param value The value to set. | [
"Sets",
"the",
"value",
"of",
"a",
"property",
"."
] | train | https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L328-L336 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java | Functions.digestAuthHeader | public static String digestAuthHeader(String username, String password, String realm, String noncekey, String method, String uri, String opaque, String algorithm, TestContext context) {
"""
Runs create digest auth header function with arguments.
@return
"""
return new DigestAuthHeaderFunction().execut... | java | public static String digestAuthHeader(String username, String password, String realm, String noncekey, String method, String uri, String opaque, String algorithm, TestContext context) {
return new DigestAuthHeaderFunction().execute(Arrays.asList(username, password, realm, noncekey, method, uri, opaque, algorith... | [
"public",
"static",
"String",
"digestAuthHeader",
"(",
"String",
"username",
",",
"String",
"password",
",",
"String",
"realm",
",",
"String",
"noncekey",
",",
"String",
"method",
",",
"String",
"uri",
",",
"String",
"opaque",
",",
"String",
"algorithm",
",",
... | Runs create digest auth header function with arguments.
@return | [
"Runs",
"create",
"digest",
"auth",
"header",
"function",
"with",
"arguments",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java#L151-L153 |
apache/incubator-gobblin | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java | FlowCatalog.getSpecURIs | public Iterator<URI> getSpecURIs() throws SpecSerDeException {
"""
************************************************
/* Catalog core functionality *
***********************************************
"""
try {
return specStore.getSpecURIs();
} catch (IOException ioe) {
thr... | java | public Iterator<URI> getSpecURIs() throws SpecSerDeException{
try {
return specStore.getSpecURIs();
} catch (IOException ioe) {
throw new SpecSerDeException("Cannot retrieve Specs' URI from Spec Store", specStore.getSpecStoreURI().get(), ioe);
}
} | [
"public",
"Iterator",
"<",
"URI",
">",
"getSpecURIs",
"(",
")",
"throws",
"SpecSerDeException",
"{",
"try",
"{",
"return",
"specStore",
".",
"getSpecURIs",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ioe",
")",
"{",
"throw",
"new",
"SpecSerDeException"... | ************************************************
/* Catalog core functionality *
*********************************************** | [
"************************************************",
"/",
"*",
"Catalog",
"core",
"functionality",
"*",
"***********************************************"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java#L214-L220 |
XiaoMi/galaxy-fds-sdk-java | src/main/java/com/xiaomi/infra/galaxy/fds/client/model/FDSPutObjectRequest.java | FDSPutObjectRequest.setInputStream | public void setInputStream(InputStream inputStream, long inputStreamLength) {
"""
Auto convert inputStream to FDSProgressInputStream in order to invoke progress listener
@param inputStream
@param inputStreamLength the length of inputStream, set -1 if the length is uncertain
"""
// close last file when set ... | java | public void setInputStream(InputStream inputStream, long inputStreamLength) {
// close last file when set a new inputStream
if (this.isUploadFile){
try{
this.inputStream.close();
}
catch (Exception e){
}
}
if (inputStream instanceof FDSProgressInputStream){
this.inputStream = (FDSProgressInp... | [
"public",
"void",
"setInputStream",
"(",
"InputStream",
"inputStream",
",",
"long",
"inputStreamLength",
")",
"{",
"// close last file when set a new inputStream",
"if",
"(",
"this",
".",
"isUploadFile",
")",
"{",
"try",
"{",
"this",
".",
"inputStream",
".",
"close"... | Auto convert inputStream to FDSProgressInputStream in order to invoke progress listener
@param inputStream
@param inputStreamLength the length of inputStream, set -1 if the length is uncertain | [
"Auto",
"convert",
"inputStream",
"to",
"FDSProgressInputStream",
"in",
"order",
"to",
"invoke",
"progress",
"listener"
] | train | https://github.com/XiaoMi/galaxy-fds-sdk-java/blob/5e93bc2b574dfa51e47451a0efa80c018ff2c48f/src/main/java/com/xiaomi/infra/galaxy/fds/client/model/FDSPutObjectRequest.java#L117-L139 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.