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 |
|---|---|---|---|---|---|---|---|---|---|---|
ops4j/org.ops4j.pax.web | pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/util/DOMJettyWebXmlParser.java | DOMJettyWebXmlParser.propertyObj | private Object propertyObj(Object obj, Element node) throws Exception {
"""
/*
Create a new value object.
@param obj @param node @return @exception Exception
"""
String id = getAttribute(node, "id");
String name = getAttribute(node, "name");
String defval = getAttribute(node, "default");
Object pro... | java | private Object propertyObj(Object obj, Element node) throws Exception {
String id = getAttribute(node, "id");
String name = getAttribute(node, "name");
String defval = getAttribute(node, "default");
Object prop = null;
if (_propertyMap != null && _propertyMap.containsKey(name)) {
prop = _propertyMap.get(na... | [
"private",
"Object",
"propertyObj",
"(",
"Object",
"obj",
",",
"Element",
"node",
")",
"throws",
"Exception",
"{",
"String",
"id",
"=",
"getAttribute",
"(",
"node",
",",
"\"id\"",
")",
";",
"String",
"name",
"=",
"getAttribute",
"(",
"node",
",",
"\"name\"... | /*
Create a new value object.
@param obj @param node @return @exception Exception | [
"/",
"*",
"Create",
"a",
"new",
"value",
"object",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/util/DOMJettyWebXmlParser.java#L699-L716 |
timols/java-gitlab-api | src/main/java/org/gitlab/api/GitlabAPI.java | GitlabAPI.getProjectBadge | public GitlabBadge getProjectBadge(Serializable projectId, Integer badgeId) throws IOException {
"""
Get project badge
@param projectId The id of the project for which the badge should be retrieved
@param badgeId The id of the badge that should be retrieved
@return The badge with a given id
@throws IOExc... | java | public GitlabBadge getProjectBadge(Serializable projectId, Integer badgeId) throws IOException {
String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBadge.URL
+ "/" + badgeId;
return retrieve().to(tailUrl, GitlabBadge.class);
} | [
"public",
"GitlabBadge",
"getProjectBadge",
"(",
"Serializable",
"projectId",
",",
"Integer",
"badgeId",
")",
"throws",
"IOException",
"{",
"String",
"tailUrl",
"=",
"GitlabProject",
".",
"URL",
"+",
"\"/\"",
"+",
"sanitizeProjectId",
"(",
"projectId",
")",
"+",
... | Get project badge
@param projectId The id of the project for which the badge should be retrieved
@param badgeId The id of the badge that should be retrieved
@return The badge with a given id
@throws IOException on GitLab API call error | [
"Get",
"project",
"badge"
] | train | https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2617-L2621 |
alibaba/canal | dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/RowsLogBuffer.java | RowsLogBuffer.nextValue | public final Serializable nextValue(final String columName, final int columnIndex, final int type, final int meta,
boolean isBinary) {
"""
Extracting next field value from packed buffer.
@see mysql-5.1.60/sql/log_event.cc -
Rows_log_event::print_verbose_one_row
"""
... | java | public final Serializable nextValue(final String columName, final int columnIndex, final int type, final int meta,
boolean isBinary) {
fNull = nullBits.get(nullBitIndex++);
if (fNull) {
value = null;
javaType = mysqlToJavaType(type, ... | [
"public",
"final",
"Serializable",
"nextValue",
"(",
"final",
"String",
"columName",
",",
"final",
"int",
"columnIndex",
",",
"final",
"int",
"type",
",",
"final",
"int",
"meta",
",",
"boolean",
"isBinary",
")",
"{",
"fNull",
"=",
"nullBits",
".",
"get",
"... | Extracting next field value from packed buffer.
@see mysql-5.1.60/sql/log_event.cc -
Rows_log_event::print_verbose_one_row | [
"Extracting",
"next",
"field",
"value",
"from",
"packed",
"buffer",
"."
] | train | https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/RowsLogBuffer.java#L114-L127 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java | Types.isSubtypeUnchecked | public boolean isSubtypeUnchecked(Type t, List<Type> ts, Warner warn) {
"""
Is t a subtype of every type in given list `ts'?<br>
(not defined for Method and ForAll types)<br>
Allows unchecked conversions.
"""
for (List<Type> l = ts; l.nonEmpty(); l = l.tail)
if (!isSubtypeUnchecked(t, l.h... | java | public boolean isSubtypeUnchecked(Type t, List<Type> ts, Warner warn) {
for (List<Type> l = ts; l.nonEmpty(); l = l.tail)
if (!isSubtypeUnchecked(t, l.head, warn))
return false;
return true;
} | [
"public",
"boolean",
"isSubtypeUnchecked",
"(",
"Type",
"t",
",",
"List",
"<",
"Type",
">",
"ts",
",",
"Warner",
"warn",
")",
"{",
"for",
"(",
"List",
"<",
"Type",
">",
"l",
"=",
"ts",
";",
"l",
".",
"nonEmpty",
"(",
")",
";",
"l",
"=",
"l",
".... | Is t a subtype of every type in given list `ts'?<br>
(not defined for Method and ForAll types)<br>
Allows unchecked conversions. | [
"Is",
"t",
"a",
"subtype",
"of",
"every",
"type",
"in",
"given",
"list",
"ts",
"?<br",
">",
"(",
"not",
"defined",
"for",
"Method",
"and",
"ForAll",
"types",
")",
"<br",
">",
"Allows",
"unchecked",
"conversions",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L915-L920 |
michael-rapp/AndroidMaterialPreferences | library/src/main/java/de/mrapp/android/preference/view/SeekBar.java | SeekBar.setSeekBarColor | public final void setSeekBarColor(@ColorInt final int color) {
"""
Sets the color of the seek bar.
@param color
The color, which should be set as an {@link Integer} value
"""
this.seekBarColor = color;
ColorFilter colorFilter = new PorterDuffColorFilter(color, Mode.SRC_IN);
getProgr... | java | public final void setSeekBarColor(@ColorInt final int color) {
this.seekBarColor = color;
ColorFilter colorFilter = new PorterDuffColorFilter(color, Mode.SRC_IN);
getProgressDrawable().setColorFilter(colorFilter);
getThumbDrawable().setColorFilter(colorFilter);
} | [
"public",
"final",
"void",
"setSeekBarColor",
"(",
"@",
"ColorInt",
"final",
"int",
"color",
")",
"{",
"this",
".",
"seekBarColor",
"=",
"color",
";",
"ColorFilter",
"colorFilter",
"=",
"new",
"PorterDuffColorFilter",
"(",
"color",
",",
"Mode",
".",
"SRC_IN",
... | Sets the color of the seek bar.
@param color
The color, which should be set as an {@link Integer} value | [
"Sets",
"the",
"color",
"of",
"the",
"seek",
"bar",
"."
] | train | https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/library/src/main/java/de/mrapp/android/preference/view/SeekBar.java#L123-L128 |
policeman-tools/forbidden-apis | src/main/java/de/thetaphi/forbiddenapis/Checker.java | Checker.addClassToCheck | public void addClassToCheck(final InputStream in, String name) throws IOException {
"""
Parses and adds a class from the given stream to the list of classes to check. Closes the stream when parsed (on Exception, too)! Does not log anything.
"""
final ClassReader reader;
try {
reader = AsmUtils.re... | java | public void addClassToCheck(final InputStream in, String name) throws IOException {
final ClassReader reader;
try {
reader = AsmUtils.readAndPatchClass(in);
} catch (IllegalArgumentException iae) {
// unfortunately the ASM IAE has no message, so add good info!
throw new IllegalArgumentExce... | [
"public",
"void",
"addClassToCheck",
"(",
"final",
"InputStream",
"in",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"final",
"ClassReader",
"reader",
";",
"try",
"{",
"reader",
"=",
"AsmUtils",
".",
"readAndPatchClass",
"(",
"in",
")",
";",
"}"... | Parses and adds a class from the given stream to the list of classes to check. Closes the stream when parsed (on Exception, too)! Does not log anything. | [
"Parses",
"and",
"adds",
"a",
"class",
"from",
"the",
"given",
"stream",
"to",
"the",
"list",
"of",
"classes",
"to",
"check",
".",
"Closes",
"the",
"stream",
"when",
"parsed",
"(",
"on",
"Exception",
"too",
")",
"!",
"Does",
"not",
"log",
"anything",
"... | train | https://github.com/policeman-tools/forbidden-apis/blob/df5f00c6bb779875ec6bae967f7cec96670b27d9/src/main/java/de/thetaphi/forbiddenapis/Checker.java#L349-L362 |
samskivert/samskivert | src/main/java/com/samskivert/velocity/FormTool.java | FormTool.textarea | public String textarea (String name, String extra, Object defaultValue) {
"""
Constructs a text area with the specified name, optional extra
parameters, and default text.
"""
return fixedTextarea(name, extra, getValue(name, defaultValue));
} | java | public String textarea (String name, String extra, Object defaultValue)
{
return fixedTextarea(name, extra, getValue(name, defaultValue));
} | [
"public",
"String",
"textarea",
"(",
"String",
"name",
",",
"String",
"extra",
",",
"Object",
"defaultValue",
")",
"{",
"return",
"fixedTextarea",
"(",
"name",
",",
"extra",
",",
"getValue",
"(",
"name",
",",
"defaultValue",
")",
")",
";",
"}"
] | Constructs a text area with the specified name, optional extra
parameters, and default text. | [
"Constructs",
"a",
"text",
"area",
"with",
"the",
"specified",
"name",
"optional",
"extra",
"parameters",
"and",
"default",
"text",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/velocity/FormTool.java#L343-L346 |
Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java | ProcessEngines.retry | public static ProcessEngineInfo retry(String resourceUrl) {
"""
retries to initialize a process engine that previously failed.
"""
log.debug("retying initializing of resource {}", resourceUrl);
try {
return initProcessEngineFromResource(new URL(resourceUrl));
} catch (MalformedURLException e)... | java | public static ProcessEngineInfo retry(String resourceUrl) {
log.debug("retying initializing of resource {}", resourceUrl);
try {
return initProcessEngineFromResource(new URL(resourceUrl));
} catch (MalformedURLException e) {
throw new ActivitiIllegalArgumentException("invalid url: " + resourceUr... | [
"public",
"static",
"ProcessEngineInfo",
"retry",
"(",
"String",
"resourceUrl",
")",
"{",
"log",
".",
"debug",
"(",
"\"retying initializing of resource {}\"",
",",
"resourceUrl",
")",
";",
"try",
"{",
"return",
"initProcessEngineFromResource",
"(",
"new",
"URL",
"("... | retries to initialize a process engine that previously failed. | [
"retries",
"to",
"initialize",
"a",
"process",
"engine",
"that",
"previously",
"failed",
"."
] | train | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/ProcessEngines.java#L231-L238 |
MindscapeHQ/raygun4java | core/src/main/java/com/mindscapehq/raygun4java/core/RaygunClient.java | RaygunClient.withData | public RaygunClient withData(Object key, Object value) {
"""
This data will be added to all errors sent from this instance of the client
@param key
@param value
@return
"""
clientData.put(key, value);
return this;
} | java | public RaygunClient withData(Object key, Object value) {
clientData.put(key, value);
return this;
} | [
"public",
"RaygunClient",
"withData",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"clientData",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | This data will be added to all errors sent from this instance of the client
@param key
@param value
@return | [
"This",
"data",
"will",
"be",
"added",
"to",
"all",
"errors",
"sent",
"from",
"this",
"instance",
"of",
"the",
"client"
] | train | https://github.com/MindscapeHQ/raygun4java/blob/284a818446cfc6f0c2f83b5365514bc1bfc129b0/core/src/main/java/com/mindscapehq/raygun4java/core/RaygunClient.java#L310-L313 |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/model/perceptron/model/LinearModel.java | LinearModel.save | public void save(String modelFile, final double ratio) throws IOException {
"""
压缩并保存
@param modelFile 路径
@param ratio 压缩比c(压缩掉的体积,压缩后体积变为1-c)
@throws IOException
"""
save(modelFile, featureMap.entrySet(), ratio);
} | java | public void save(String modelFile, final double ratio) throws IOException
{
save(modelFile, featureMap.entrySet(), ratio);
} | [
"public",
"void",
"save",
"(",
"String",
"modelFile",
",",
"final",
"double",
"ratio",
")",
"throws",
"IOException",
"{",
"save",
"(",
"modelFile",
",",
"featureMap",
".",
"entrySet",
"(",
")",
",",
"ratio",
")",
";",
"}"
] | 压缩并保存
@param modelFile 路径
@param ratio 压缩比c(压缩掉的体积,压缩后体积变为1-c)
@throws IOException | [
"压缩并保存"
] | train | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/model/perceptron/model/LinearModel.java#L174-L177 |
pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java | BaseFilterQueryBuilder.addLikeCondition | protected void addLikeCondition(final String propertyName, final String value) {
"""
Add a Field Search Condition that will search a field for a specified value using the following SQL logic:
{@code field LIKE '%value%'}
@param propertyName The name of the field as defined in the Entity mapping class.
@param ... | java | protected void addLikeCondition(final String propertyName, final String value) {
final Expression<String> propertyNameField = getRootPath().get(propertyName).as(String.class);
fieldConditions.add(getCriteriaBuilder().like(propertyNameField, "%" + cleanLikeCondition(value) + "%"));
} | [
"protected",
"void",
"addLikeCondition",
"(",
"final",
"String",
"propertyName",
",",
"final",
"String",
"value",
")",
"{",
"final",
"Expression",
"<",
"String",
">",
"propertyNameField",
"=",
"getRootPath",
"(",
")",
".",
"get",
"(",
"propertyName",
")",
".",... | Add a Field Search Condition that will search a field for a specified value using the following SQL logic:
{@code field LIKE '%value%'}
@param propertyName The name of the field as defined in the Entity mapping class.
@param value The value to search against. | [
"Add",
"a",
"Field",
"Search",
"Condition",
"that",
"will",
"search",
"a",
"field",
"for",
"a",
"specified",
"value",
"using",
"the",
"following",
"SQL",
"logic",
":",
"{",
"@code",
"field",
"LIKE",
"%value%",
"}"
] | train | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L199-L202 |
awslabs/amazon-sqs-java-messaging-lib | src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java | AmazonSQSMessagingClientWrapper.receiveMessage | public ReceiveMessageResult receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws JMSException {
"""
Calls <code>receiveMessage</code> and wraps <code>AmazonClientException</code>. Used by
{@link SQSMessageConsumerPrefetch} to receive up to minimum of
(<code>numberOfMessagesToPrefetch</code>,10) mes... | java | public ReceiveMessageResult receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws JMSException {
try {
prepareRequest(receiveMessageRequest);
return amazonSQSClient.receiveMessage(receiveMessageRequest);
} catch (AmazonClientException e) {
throw handleExc... | [
"public",
"ReceiveMessageResult",
"receiveMessage",
"(",
"ReceiveMessageRequest",
"receiveMessageRequest",
")",
"throws",
"JMSException",
"{",
"try",
"{",
"prepareRequest",
"(",
"receiveMessageRequest",
")",
";",
"return",
"amazonSQSClient",
".",
"receiveMessage",
"(",
"r... | Calls <code>receiveMessage</code> and wraps <code>AmazonClientException</code>. Used by
{@link SQSMessageConsumerPrefetch} to receive up to minimum of
(<code>numberOfMessagesToPrefetch</code>,10) messages from SQS queue into consumer
prefetch buffers.
@param receiveMessageRequest
Container for the necessary parameters... | [
"Calls",
"<code",
">",
"receiveMessage<",
"/",
"code",
">",
"and",
"wraps",
"<code",
">",
"AmazonClientException<",
"/",
"code",
">",
".",
"Used",
"by",
"{",
"@link",
"SQSMessageConsumerPrefetch",
"}",
"to",
"receive",
"up",
"to",
"minimum",
"of",
"(",
"<cod... | train | https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L348-L355 |
dyu/protostuff-1.0.x | protostuff-me/src/main/java/com/dyuproject/protostuff/me/ProtobufIOUtil.java | ProtobufIOUtil.writeDelimitedTo | public static int writeDelimitedTo(DataOutput out, Object message, Schema schema)
throws IOException {
"""
Used by the code generated messages that implement {@link java.io.Externalizable}.
Writes to the {@link DataOutput}.
@return the size of the message.
"""
final LinkedBuffer buffer = new... | java | public static int writeDelimitedTo(DataOutput out, Object message, Schema schema)
throws IOException
{
final LinkedBuffer buffer = new LinkedBuffer(LinkedBuffer.MIN_BUFFER_SIZE);
final ProtobufOutput output = new ProtobufOutput(buffer);
schema.writeTo(output, message);
fin... | [
"public",
"static",
"int",
"writeDelimitedTo",
"(",
"DataOutput",
"out",
",",
"Object",
"message",
",",
"Schema",
"schema",
")",
"throws",
"IOException",
"{",
"final",
"LinkedBuffer",
"buffer",
"=",
"new",
"LinkedBuffer",
"(",
"LinkedBuffer",
".",
"MIN_BUFFER_SIZE... | Used by the code generated messages that implement {@link java.io.Externalizable}.
Writes to the {@link DataOutput}.
@return the size of the message. | [
"Used",
"by",
"the",
"code",
"generated",
"messages",
"that",
"implement",
"{",
"@link",
"java",
".",
"io",
".",
"Externalizable",
"}",
".",
"Writes",
"to",
"the",
"{",
"@link",
"DataOutput",
"}",
"."
] | train | https://github.com/dyu/protostuff-1.0.x/blob/d7c964ec20da3fe44699d86ee95c2677ddffde96/protostuff-me/src/main/java/com/dyuproject/protostuff/me/ProtobufIOUtil.java#L261-L275 |
rhiot/rhiot | lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java | DefaultInstaller.confirmInstalled | public boolean confirmInstalled(String packageName, List<String> output) {
"""
Checks the output to confirm the package is installed.
@param packageName package name, eg gpsd
@param output result of the installation process
@return returns true if the package is installed, false otherwise.
"""
if ... | java | public boolean confirmInstalled(String packageName, List<String> output){
if (output != null) {
return output.stream().anyMatch(s -> s != null && s.contains(getInstallSuccess()));
} else {
return true; //may be successful
}
} | [
"public",
"boolean",
"confirmInstalled",
"(",
"String",
"packageName",
",",
"List",
"<",
"String",
">",
"output",
")",
"{",
"if",
"(",
"output",
"!=",
"null",
")",
"{",
"return",
"output",
".",
"stream",
"(",
")",
".",
"anyMatch",
"(",
"s",
"->",
"s",
... | Checks the output to confirm the package is installed.
@param packageName package name, eg gpsd
@param output result of the installation process
@return returns true if the package is installed, false otherwise. | [
"Checks",
"the",
"output",
"to",
"confirm",
"the",
"package",
"is",
"installed",
"."
] | train | https://github.com/rhiot/rhiot/blob/82eac10e365f72bab9248b8c3bd0ec9a2fc0a721/lib/utils/src/main/java/io/rhiot/utils/install/DefaultInstaller.java#L125-L131 |
atomix/catalyst | common/src/main/java/io/atomix/catalyst/util/PropertiesReader.java | PropertiesReader.loadProperties | private static Properties loadProperties(String propertiesFile) {
"""
Loads properties from a properties file on the local filesystem.
"""
Properties properties = new Properties();
try (InputStream is = new FileInputStream(propertiesFile)) {
properties.load(is);
} catch (IOException e) {
... | java | private static Properties loadProperties(String propertiesFile) {
Properties properties = new Properties();
try (InputStream is = new FileInputStream(propertiesFile)) {
properties.load(is);
} catch (IOException e) {
throw new RuntimeException("failed to load properties", e);
}
return pro... | [
"private",
"static",
"Properties",
"loadProperties",
"(",
"String",
"propertiesFile",
")",
"{",
"Properties",
"properties",
"=",
"new",
"Properties",
"(",
")",
";",
"try",
"(",
"InputStream",
"is",
"=",
"new",
"FileInputStream",
"(",
"propertiesFile",
")",
")",
... | Loads properties from a properties file on the local filesystem. | [
"Loads",
"properties",
"from",
"a",
"properties",
"file",
"on",
"the",
"local",
"filesystem",
"."
] | train | https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/common/src/main/java/io/atomix/catalyst/util/PropertiesReader.java#L60-L68 |
box/box-java-sdk | src/main/java/com/box/sdk/MetadataTemplate.java | MetadataTemplate.getMetadataTemplateByID | public static MetadataTemplate getMetadataTemplateByID(BoxAPIConnection api, String templateID) {
"""
Geta the specified metadata template by its ID.
@param api the API connection to be used.
@param templateID the ID of the template to get.
@return the metadata template object.
"""
URL url = METADA... | java | public static MetadataTemplate getMetadataTemplateByID(BoxAPIConnection api, String templateID) {
URL url = METADATA_TEMPLATE_BY_ID_URL_TEMPLATE.build(api.getBaseURL(), templateID);
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.... | [
"public",
"static",
"MetadataTemplate",
"getMetadataTemplateByID",
"(",
"BoxAPIConnection",
"api",
",",
"String",
"templateID",
")",
"{",
"URL",
"url",
"=",
"METADATA_TEMPLATE_BY_ID_URL_TEMPLATE",
".",
"build",
"(",
"api",
".",
"getBaseURL",
"(",
")",
",",
"template... | Geta the specified metadata template by its ID.
@param api the API connection to be used.
@param templateID the ID of the template to get.
@return the metadata template object. | [
"Geta",
"the",
"specified",
"metadata",
"template",
"by",
"its",
"ID",
"."
] | train | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/MetadataTemplate.java#L460-L466 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java | CloudTasksClient.createQueue | public final Queue createQueue(String parent, Queue queue) {
"""
Creates a queue.
<p>Queues created with this method allow tasks to live for a maximum of 31 days. After a task
is 31 days old, the task will be deleted regardless of whether it was dispatched or not.
<p>WARNING: Using this method may have unin... | java | public final Queue createQueue(String parent, Queue queue) {
CreateQueueRequest request =
CreateQueueRequest.newBuilder().setParent(parent).setQueue(queue).build();
return createQueue(request);
} | [
"public",
"final",
"Queue",
"createQueue",
"(",
"String",
"parent",
",",
"Queue",
"queue",
")",
"{",
"CreateQueueRequest",
"request",
"=",
"CreateQueueRequest",
".",
"newBuilder",
"(",
")",
".",
"setParent",
"(",
"parent",
")",
".",
"setQueue",
"(",
"queue",
... | Creates a queue.
<p>Queues created with this method allow tasks to live for a maximum of 31 days. After a task
is 31 days old, the task will be deleted regardless of whether it was dispatched or not.
<p>WARNING: Using this method may have unintended side effects if you are using an App Engine
`queue.yaml` or `queue.x... | [
"Creates",
"a",
"queue",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java#L469-L474 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java | RuleBasedCollator.getRawCollationKey | @Override
public RawCollationKey getRawCollationKey(String source, RawCollationKey key) {
"""
Gets the simpler form of a CollationKey for the String source following the rules of this Collator and stores the
result into the user provided argument key. If key has a internal byte array of length that's too smal... | java | @Override
public RawCollationKey getRawCollationKey(String source, RawCollationKey key) {
if (source == null) {
return null;
}
CollationBuffer buffer = null;
try {
buffer = getCollationBuffer();
return getRawCollationKey(source, key, buffer);
... | [
"@",
"Override",
"public",
"RawCollationKey",
"getRawCollationKey",
"(",
"String",
"source",
",",
"RawCollationKey",
"key",
")",
"{",
"if",
"(",
"source",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"CollationBuffer",
"buffer",
"=",
"null",
";",
"try... | Gets the simpler form of a CollationKey for the String source following the rules of this Collator and stores the
result into the user provided argument key. If key has a internal byte array of length that's too small for the
result, the internal byte array will be grown to the exact required size.
@param source the t... | [
"Gets",
"the",
"simpler",
"form",
"of",
"a",
"CollationKey",
"for",
"the",
"String",
"source",
"following",
"the",
"rules",
"of",
"this",
"Collator",
"and",
"stores",
"the",
"result",
"into",
"the",
"user",
"provided",
"argument",
"key",
".",
"If",
"key",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java#L1063-L1075 |
UrielCh/ovh-java-sdk | ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java | ApiOvhPackxdsl.packName_resiliate_POST | public OvhResiliationFollowUpDetail packName_resiliate_POST(String packName, Date resiliationDate, OvhResiliationSurvey resiliationSurvey, Double[] servicesToKeep) throws IOException {
"""
Resiliate the pack
REST: POST /pack/xdsl/{packName}/resiliate
@param resiliationSurvey [required] Comment about resiliatio... | java | public OvhResiliationFollowUpDetail packName_resiliate_POST(String packName, Date resiliationDate, OvhResiliationSurvey resiliationSurvey, Double[] servicesToKeep) throws IOException {
String qPath = "/pack/xdsl/{packName}/resiliate";
StringBuilder sb = path(qPath, packName);
HashMap<String, Object>o = new HashMa... | [
"public",
"OvhResiliationFollowUpDetail",
"packName_resiliate_POST",
"(",
"String",
"packName",
",",
"Date",
"resiliationDate",
",",
"OvhResiliationSurvey",
"resiliationSurvey",
",",
"Double",
"[",
"]",
"servicesToKeep",
")",
"throws",
"IOException",
"{",
"String",
"qPath... | Resiliate the pack
REST: POST /pack/xdsl/{packName}/resiliate
@param resiliationSurvey [required] Comment about resiliation reasons
@param servicesToKeep [required] Ids of service you will keep on resiliation. (you can get it with /pack/xdsl/{packName}/subServices)
@param resiliationDate [required] Effective date of t... | [
"Resiliate",
"the",
"pack"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L573-L582 |
jlinn/quartz-redis-jobstore | src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java | RedisJobStore.storeCalendar | @Override
public void storeCalendar(final String name, final Calendar calendar, final boolean replaceExisting, final boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException {
"""
Store the given <code>{@link org.quartz.Calendar}</code>.
@param name The name of the calendar
@par... | java | @Override
public void storeCalendar(final String name, final Calendar calendar, final boolean replaceExisting, final boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException {
doWithLock(new LockCallbackWithoutResult() {
@Override
public Void doWithLock(Je... | [
"@",
"Override",
"public",
"void",
"storeCalendar",
"(",
"final",
"String",
"name",
",",
"final",
"Calendar",
"calendar",
",",
"final",
"boolean",
"replaceExisting",
",",
"final",
"boolean",
"updateTriggers",
")",
"throws",
"ObjectAlreadyExistsException",
",",
"JobP... | Store the given <code>{@link org.quartz.Calendar}</code>.
@param name The name of the calendar
@param calendar The <code>Calendar</code> to be stored.
@param replaceExisting If <code>true</code>, any <code>Calendar</code> existing
in the <code>JobStore</code> with the same name & group
should be over-written.
@... | [
"Store",
"the",
"given",
"<code",
">",
"{",
"@link",
"org",
".",
"quartz",
".",
"Calendar",
"}",
"<",
"/",
"code",
">",
"."
] | train | https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java#L569-L578 |
astrapi69/mystic-crypt | crypt-data/src/main/java/de/alpharogroup/crypto/key/writer/PublicKeyWriter.java | PublicKeyWriter.writeInPemFormat | public static void writeInPemFormat(final PublicKey publicKey, final @NonNull File file)
throws IOException {
"""
Write the given {@link PublicKey} into the given {@link File}.
@param publicKey
the public key
@param file
the file to write in
@throws IOException
Signals that an I/O exception has occurred.... | java | public static void writeInPemFormat(final PublicKey publicKey, final @NonNull File file)
throws IOException
{
KeyWriter.writeInPemFormat(publicKey, file);
} | [
"public",
"static",
"void",
"writeInPemFormat",
"(",
"final",
"PublicKey",
"publicKey",
",",
"final",
"@",
"NonNull",
"File",
"file",
")",
"throws",
"IOException",
"{",
"KeyWriter",
".",
"writeInPemFormat",
"(",
"publicKey",
",",
"file",
")",
";",
"}"
] | Write the given {@link PublicKey} into the given {@link File}.
@param publicKey
the public key
@param file
the file to write in
@throws IOException
Signals that an I/O exception has occurred. | [
"Write",
"the",
"given",
"{",
"@link",
"PublicKey",
"}",
"into",
"the",
"given",
"{",
"@link",
"File",
"}",
"."
] | train | https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/writer/PublicKeyWriter.java#L88-L92 |
liferay/com-liferay-commerce | commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentEntryPersistenceImpl.java | CommerceUserSegmentEntryPersistenceImpl.filterFindByG_A | @Override
public List<CommerceUserSegmentEntry> filterFindByG_A(long groupId,
boolean active, int start, int end) {
"""
Returns a range of all the commerce user segment entries that the user has permission to view where groupId = ? and active = ?.
<p>
Useful when paginating results. Returns a maximu... | java | @Override
public List<CommerceUserSegmentEntry> filterFindByG_A(long groupId,
boolean active, int start, int end) {
return filterFindByG_A(groupId, active, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceUserSegmentEntry",
">",
"filterFindByG_A",
"(",
"long",
"groupId",
",",
"boolean",
"active",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"filterFindByG_A",
"(",
"groupId",
",",
"active",
",",
"... | Returns a range of all the commerce user segment entries that the user has permission to view where groupId = ? and active = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the resu... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"user",
"segment",
"entries",
"that",
"the",
"user",
"has",
"permission",
"to",
"view",
"where",
"groupId",
"=",
"?",
";",
"and",
"active",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-user-segment-service/src/main/java/com/liferay/commerce/user/segment/service/persistence/impl/CommerceUserSegmentEntryPersistenceImpl.java#L1732-L1736 |
sonyxperiadev/gerrit-events | src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritJsonEventFactory.java | GerritJsonEventFactory.getDate | public static Date getDate(JSONObject json, String key, Date defaultValue) {
"""
Returns the value of a JSON property as a Date if it exists otherwise returns the defaultValue.
@param json the JSONObject to check.
@param key the key.
@param defaultValue the value to return if the key is missing.
@return the va... | java | public static Date getDate(JSONObject json, String key, Date defaultValue) {
Date result = defaultValue;
if (json.containsKey(key)) {
try {
String secondsString = json.getString(key);
//In gerrit, time is written in seconds, not milliseconds.
L... | [
"public",
"static",
"Date",
"getDate",
"(",
"JSONObject",
"json",
",",
"String",
"key",
",",
"Date",
"defaultValue",
")",
"{",
"Date",
"result",
"=",
"defaultValue",
";",
"if",
"(",
"json",
".",
"containsKey",
"(",
"key",
")",
")",
"{",
"try",
"{",
"St... | Returns the value of a JSON property as a Date if it exists otherwise returns the defaultValue.
@param json the JSONObject to check.
@param key the key.
@param defaultValue the value to return if the key is missing.
@return the value for the key as a Date. | [
"Returns",
"the",
"value",
"of",
"a",
"JSON",
"property",
"as",
"a",
"Date",
"if",
"it",
"exists",
"otherwise",
"returns",
"the",
"defaultValue",
"."
] | train | https://github.com/sonyxperiadev/gerrit-events/blob/9a443d13dded85cc4709136ac33989f2bbb34fe2/src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritJsonEventFactory.java#L274-L288 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java | VirtualNetworkGatewaysInner.beginGetVpnclientIpsecParametersAsync | public Observable<VpnClientIPsecParametersInner> beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) {
"""
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resou... | java | public Observable<VpnClientIPsecParametersInner> beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) {
return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<VpnClientIPsecParameter... | [
"public",
"Observable",
"<",
"VpnClientIPsecParametersInner",
">",
"beginGetVpnclientIpsecParametersAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkGatewayName",
")",
"{",
"return",
"beginGetVpnclientIpsecParametersWithServiceResponseAsync",
"(",
"resource... | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayName The virtual network ga... | [
"The",
"Get",
"VpnclientIpsecParameters",
"operation",
"retrieves",
"information",
"about",
"the",
"vpnclient",
"ipsec",
"policy",
"for",
"P2S",
"client",
"of",
"virtual",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"through",
"Network",
"re... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2918-L2925 |
ocelotds/ocelot | ocelot-processor/src/main/java/org/ocelotds/processors/OcelotProcessor.java | OcelotProcessor.writeCoreInDirectory | void writeCoreInDirectory(String dir, String fwk) {
"""
Write core in user directory (use jsdir option) select the core for framework define by the user by jsfwk option
"""
if (dir != null) { // if developper specify a directory for get js we write them too inside jsdir
fws.copyResourceToDir(ProcessorC... | java | void writeCoreInDirectory(String dir, String fwk) {
if (dir != null) { // if developper specify a directory for get js we write them too inside jsdir
fws.copyResourceToDir(ProcessorConstants.SEPARATORCHAR + "js", getFilename("core", fwk), dir);
}
} | [
"void",
"writeCoreInDirectory",
"(",
"String",
"dir",
",",
"String",
"fwk",
")",
"{",
"if",
"(",
"dir",
"!=",
"null",
")",
"{",
"// if developper specify a directory for get js we write them too inside jsdir \r",
"fws",
".",
"copyResourceToDir",
"(",
"ProcessorConstants",... | Write core in user directory (use jsdir option) select the core for framework define by the user by jsfwk option | [
"Write",
"core",
"in",
"user",
"directory",
"(",
"use",
"jsdir",
"option",
")",
"select",
"the",
"core",
"for",
"framework",
"define",
"by",
"the",
"user",
"by",
"jsfwk",
"option"
] | train | https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-processor/src/main/java/org/ocelotds/processors/OcelotProcessor.java#L275-L279 |
treelogic-swe/aws-mock | src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java | PersistenceUtils.saveAll | public static void saveAll(final Object obj, final PersistenceStoreType storeType) {
"""
Save object to the binary file defined as filename in property "persistence.store.file".
@param obj the object to save, which should be serializable
@param storeType the store type
"""
try {
... | java | public static void saveAll(final Object obj, final PersistenceStoreType storeType) {
try {
File file = new File(persistenceStorePath + File.separator + storeType);
// create necessary parent directories on file system
File directory = file.getParentFile();
if (... | [
"public",
"static",
"void",
"saveAll",
"(",
"final",
"Object",
"obj",
",",
"final",
"PersistenceStoreType",
"storeType",
")",
"{",
"try",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"persistenceStorePath",
"+",
"File",
".",
"separator",
"+",
"storeType",
"... | Save object to the binary file defined as filename in property "persistence.store.file".
@param obj the object to save, which should be serializable
@param storeType the store type | [
"Save",
"object",
"to",
"the",
"binary",
"file",
"defined",
"as",
"filename",
"in",
"property",
"persistence",
".",
"store",
".",
"file",
"."
] | train | https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java#L132-L156 |
twitter/cloudhopper-commons | ch-commons-util/src/main/java/com/cloudhopper/commons/util/windowing/Window.java | Window.failAll | public List<WindowFuture<K,R,P>> failAll(Throwable t) throws InterruptedException {
"""
Fails (completes) all requests by setting the same cause of the failure
on all associated futures. Any callers/threads waiting for completion
will be signaled. Also, since this frees up all slots in the window, all
callers/t... | java | public List<WindowFuture<K,R,P>> failAll(Throwable t) throws InterruptedException {
if (this.futures.size() <= 0) {
return null;
}
List<WindowFuture<K,R,P>> failed = new ArrayList<WindowFuture<K,R,P>>();
long now = System.currentTimeMillis();
this.lock.lock()... | [
"public",
"List",
"<",
"WindowFuture",
"<",
"K",
",",
"R",
",",
"P",
">",
">",
"failAll",
"(",
"Throwable",
"t",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"this",
".",
"futures",
".",
"size",
"(",
")",
"<=",
"0",
")",
"{",
"return",
"n... | Fails (completes) all requests by setting the same cause of the failure
on all associated futures. Any callers/threads waiting for completion
will be signaled. Also, since this frees up all slots in the window, all
callers/threads blocked with pending offers will be signaled to continue.
@param t The throwable to set a... | [
"Fails",
"(",
"completes",
")",
"all",
"requests",
"by",
"setting",
"the",
"same",
"cause",
"of",
"the",
"failure",
"on",
"all",
"associated",
"futures",
".",
"Any",
"callers",
"/",
"threads",
"waiting",
"for",
"completion",
"will",
"be",
"signaled",
".",
... | train | https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/windowing/Window.java#L565-L589 |
maven-nar/nar-maven-plugin | src/main/java/com/github/maven_nar/AbstractDependencyMojo.java | AbstractDependencyMojo.getNarArtifacts | public final List<NarArtifact> getNarArtifacts() throws MojoExecutionException {
"""
Returns dependencies which are dependent on NAR files (i.e. contain
NarInfo)
"""
final List<NarArtifact> narDependencies = new LinkedList<>();
FilterArtifacts filter = new FilterArtifacts();
filter.addFilter(new... | java | public final List<NarArtifact> getNarArtifacts() throws MojoExecutionException {
final List<NarArtifact> narDependencies = new LinkedList<>();
FilterArtifacts filter = new FilterArtifacts();
filter.addFilter(new GroupIdFilter(cleanToBeTokenizedString(this.includeGroupIds),
cleanToBeTokenizedString... | [
"public",
"final",
"List",
"<",
"NarArtifact",
">",
"getNarArtifacts",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"final",
"List",
"<",
"NarArtifact",
">",
"narDependencies",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"FilterArtifacts",
"filter",
"="... | Returns dependencies which are dependent on NAR files (i.e. contain
NarInfo) | [
"Returns",
"dependencies",
"which",
"are",
"dependent",
"on",
"NAR",
"files",
"(",
"i",
".",
"e",
".",
"contain",
"NarInfo",
")"
] | train | https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/AbstractDependencyMojo.java#L697-L735 |
google/error-prone | check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java | SuggestedFixes.qualifyType | public static String qualifyType(VisitorState state, SuggestedFix.Builder fix, TypeMirror type) {
"""
Returns a human-friendly name of the given type for use in fixes.
"""
return type.accept(
new SimpleTypeVisitor8<String, SuggestedFix.Builder>() {
@Override
protected String def... | java | public static String qualifyType(VisitorState state, SuggestedFix.Builder fix, TypeMirror type) {
return type.accept(
new SimpleTypeVisitor8<String, SuggestedFix.Builder>() {
@Override
protected String defaultAction(TypeMirror e, Builder builder) {
return e.toString();
... | [
"public",
"static",
"String",
"qualifyType",
"(",
"VisitorState",
"state",
",",
"SuggestedFix",
".",
"Builder",
"fix",
",",
"TypeMirror",
"type",
")",
"{",
"return",
"type",
".",
"accept",
"(",
"new",
"SimpleTypeVisitor8",
"<",
"String",
",",
"SuggestedFix",
"... | Returns a human-friendly name of the given type for use in fixes. | [
"Returns",
"a",
"human",
"-",
"friendly",
"name",
"of",
"the",
"given",
"type",
"for",
"use",
"in",
"fixes",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java#L295-L329 |
jmxtrans/jmxtrans | jmxtrans-output/jmxtrans-output-jrobin/src/main/java/com/googlecode/jmxtrans/model/output/RRDToolWriter.java | RRDToolWriter.getDataSourceName | public String getDataSourceName(String typeName, String attributeName, List<String> valuePath) {
"""
rrd datasources must be less than 21 characters in length, so work to
make it shorter. Not ideal at all, but works fairly well it seems.
"""
String result;
String entry = StringUtils.join(valuePath, '.');
... | java | public String getDataSourceName(String typeName, String attributeName, List<String> valuePath) {
String result;
String entry = StringUtils.join(valuePath, '.');
if (typeName != null) {
result = typeName + attributeName + entry;
} else {
result = attributeName + entry;
}
if (attributeName.length() > 1... | [
"public",
"String",
"getDataSourceName",
"(",
"String",
"typeName",
",",
"String",
"attributeName",
",",
"List",
"<",
"String",
">",
"valuePath",
")",
"{",
"String",
"result",
";",
"String",
"entry",
"=",
"StringUtils",
".",
"join",
"(",
"valuePath",
",",
"'... | rrd datasources must be less than 21 characters in length, so work to
make it shorter. Not ideal at all, but works fairly well it seems. | [
"rrd",
"datasources",
"must",
"be",
"less",
"than",
"21",
"characters",
"in",
"length",
"so",
"work",
"to",
"make",
"it",
"shorter",
".",
"Not",
"ideal",
"at",
"all",
"but",
"works",
"fairly",
"well",
"it",
"seems",
"."
] | train | https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-output/jmxtrans-output-jrobin/src/main/java/com/googlecode/jmxtrans/model/output/RRDToolWriter.java#L108-L127 |
apache/incubator-gobblin | gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java | HiveRegistrationUnit.setStorageProp | public void setStorageProp(String key, Object value) {
"""
Set a storage parameter for a table/partition.
<p>
When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use
{@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.... | java | public void setStorageProp(String key, Object value) {
this.storageProps.setProp(key, value);
updateStorageFields(this.storageProps, key, value);
} | [
"public",
"void",
"setStorageProp",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"this",
".",
"storageProps",
".",
"setProp",
"(",
"key",
",",
"value",
")",
";",
"updateStorageFields",
"(",
"this",
".",
"storageProps",
",",
"key",
",",
"value",
... | Set a storage parameter for a table/partition.
<p>
When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use
{@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.api.Partition}
which distinguishes between table/partition parameter... | [
"Set",
"a",
"storage",
"parameter",
"for",
"a",
"table",
"/",
"partition",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java#L191-L194 |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java | DeployerResolverOverriderConverter.overrideResolverDetails | private void overrideResolverDetails(T overrider, Class overriderClass) {
"""
Convert the (ServerDetails)details to (ServerDetails)resolverDetails if it doesn't exists already
This conversion comes after a separation to two ServerDetails (resolver and deployer).
Incase the configuration has only one ServerDetail... | java | private void overrideResolverDetails(T overrider, Class overriderClass) {
if (overrider instanceof ResolverOverrider) {
try {
Field resolverDetailsField = overriderClass.getDeclaredField("resolverDetails");
resolverDetailsField.setAccessible(true);
Obj... | [
"private",
"void",
"overrideResolverDetails",
"(",
"T",
"overrider",
",",
"Class",
"overriderClass",
")",
"{",
"if",
"(",
"overrider",
"instanceof",
"ResolverOverrider",
")",
"{",
"try",
"{",
"Field",
"resolverDetailsField",
"=",
"overriderClass",
".",
"getDeclaredF... | Convert the (ServerDetails)details to (ServerDetails)resolverDetails if it doesn't exists already
This conversion comes after a separation to two ServerDetails (resolver and deployer).
Incase the configuration has only one ServerDetails instance called "details", create a new one for resolver.
In ArtifactoryMaven3Nativ... | [
"Convert",
"the",
"(",
"ServerDetails",
")",
"details",
"to",
"(",
"ServerDetails",
")",
"resolverDetails",
"if",
"it",
"doesn",
"t",
"exists",
"already",
"This",
"conversion",
"comes",
"after",
"a",
"separation",
"to",
"two",
"ServerDetails",
"(",
"resolver",
... | train | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java#L130-L150 |
lucee/Lucee | core/src/main/java/lucee/transformer/interpreter/op/OpDouble.java | OpDouble.toExprDouble | public static ExprDouble toExprDouble(Expression left, Expression right, int operation) {
"""
Create a String expression from a Expression
@param left
@param right
@param operation
@return String expression
@throws TemplateException
"""
return new OpDouble(left, right, operation);
} | java | public static ExprDouble toExprDouble(Expression left, Expression right, int operation) {
return new OpDouble(left, right, operation);
} | [
"public",
"static",
"ExprDouble",
"toExprDouble",
"(",
"Expression",
"left",
",",
"Expression",
"right",
",",
"int",
"operation",
")",
"{",
"return",
"new",
"OpDouble",
"(",
"left",
",",
"right",
",",
"operation",
")",
";",
"}"
] | Create a String expression from a Expression
@param left
@param right
@param operation
@return String expression
@throws TemplateException | [
"Create",
"a",
"String",
"expression",
"from",
"a",
"Expression"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/interpreter/op/OpDouble.java#L48-L50 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java | GISCoordinates.L2_L3 | @Pure
public static Point2d L2_L3(double x, double y) {
"""
This function convert France Lambert II coordinate to
France Lambert III coordinate.
@param x is the coordinate in France Lambert II
@param y is the coordinate in France Lambert II
@return the France Lambert III coordinate.
"""
final Point2d ... | java | @Pure
public static Point2d L2_L3(double x, double y) {
final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
LAMBERT_2_N,
LAMBERT_2_C,
LAMBERT_2_XS,
LAMBERT_2_YS);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_3_N,
LAMBERT_3_C,
LAMBERT_3_XS,... | [
"@",
"Pure",
"public",
"static",
"Point2d",
"L2_L3",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"final",
"Point2d",
"ntfLambdaPhi",
"=",
"NTFLambert_NTFLambdaPhi",
"(",
"x",
",",
"y",
",",
"LAMBERT_2_N",
",",
"LAMBERT_2_C",
",",
"LAMBERT_2_XS",
",",
... | This function convert France Lambert II coordinate to
France Lambert III coordinate.
@param x is the coordinate in France Lambert II
@param y is the coordinate in France Lambert II
@return the France Lambert III coordinate. | [
"This",
"function",
"convert",
"France",
"Lambert",
"II",
"coordinate",
"to",
"France",
"Lambert",
"III",
"coordinate",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L473-L486 |
elki-project/elki | elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/minkowski/LPIntegerNormDistanceFunction.java | LPIntegerNormDistanceFunction.preDistanceMBR | private double preDistanceMBR(SpatialComparable mbr1, SpatialComparable mbr2, final int start, final int end) {
"""
Compute unscaled distance in a range of dimensions.
@param mbr1 First MBR
@param mbr2 Second MBR
@param start First dimension
@param end Exclusive last dimension
@return Aggregated values.
... | java | private double preDistanceMBR(SpatialComparable mbr1, SpatialComparable mbr2, final int start, final int end) {
double agg = 0.;
for(int d = start; d < end; d++) {
double delta = mbr2.getMin(d) - mbr1.getMax(d);
delta = delta >= 0 ? delta : mbr1.getMin(d) - mbr2.getMax(d);
if(delta > 0.) {
... | [
"private",
"double",
"preDistanceMBR",
"(",
"SpatialComparable",
"mbr1",
",",
"SpatialComparable",
"mbr2",
",",
"final",
"int",
"start",
",",
"final",
"int",
"end",
")",
"{",
"double",
"agg",
"=",
"0.",
";",
"for",
"(",
"int",
"d",
"=",
"start",
";",
"d"... | Compute unscaled distance in a range of dimensions.
@param mbr1 First MBR
@param mbr2 Second MBR
@param start First dimension
@param end Exclusive last dimension
@return Aggregated values. | [
"Compute",
"unscaled",
"distance",
"in",
"a",
"range",
"of",
"dimensions",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-distance/src/main/java/de/lmu/ifi/dbs/elki/distance/distancefunction/minkowski/LPIntegerNormDistanceFunction.java#L115-L125 |
Alluxio/alluxio | core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java | DefaultBlockMaster.generateBlockInfo | @GuardedBy("masterBlockInfo")
private Optional<BlockInfo> generateBlockInfo(long blockId) throws UnavailableException {
"""
Generates block info, including worker locations, for a block id.
@param blockId a block id
@return optional block info, empty if the block does not exist
"""
if (mSafeModeManag... | java | @GuardedBy("masterBlockInfo")
private Optional<BlockInfo> generateBlockInfo(long blockId) throws UnavailableException {
if (mSafeModeManager.isInSafeMode()) {
throw new UnavailableException(ExceptionMessage.MASTER_IN_SAFEMODE.getMessage());
}
BlockMeta block;
List<BlockLocation> blockLocations;... | [
"@",
"GuardedBy",
"(",
"\"masterBlockInfo\"",
")",
"private",
"Optional",
"<",
"BlockInfo",
">",
"generateBlockInfo",
"(",
"long",
"blockId",
")",
"throws",
"UnavailableException",
"{",
"if",
"(",
"mSafeModeManager",
".",
"isInSafeMode",
"(",
")",
")",
"{",
"thr... | Generates block info, including worker locations, for a block id.
@param blockId a block id
@return optional block info, empty if the block does not exist | [
"Generates",
"block",
"info",
"including",
"worker",
"locations",
"for",
"a",
"block",
"id",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java#L971-L1007 |
landawn/AbacusUtil | src/com/landawn/abacus/util/StringUtil.java | StringUtil.commonPrefix | public static String commonPrefix(final String a, final String b) {
"""
Note: copy rights: Google Guava.
Returns the longest string {@code prefix} such that
{@code a.toString().startsWith(prefix) && b.toString().startsWith(prefix)}
, taking care not to split surrogate pairs. If {@code a} and {@code b}
have n... | java | public static String commonPrefix(final String a, final String b) {
if (N.isNullOrEmpty(a) || N.isNullOrEmpty(b)) {
return N.EMPTY_STRING;
}
int maxPrefixLength = Math.min(a.length(), b.length());
int p = 0;
while (p < maxPrefixLength && a.charAt(p) == b.cha... | [
"public",
"static",
"String",
"commonPrefix",
"(",
"final",
"String",
"a",
",",
"final",
"String",
"b",
")",
"{",
"if",
"(",
"N",
".",
"isNullOrEmpty",
"(",
"a",
")",
"||",
"N",
".",
"isNullOrEmpty",
"(",
"b",
")",
")",
"{",
"return",
"N",
".",
"EM... | Note: copy rights: Google Guava.
Returns the longest string {@code prefix} such that
{@code a.toString().startsWith(prefix) && b.toString().startsWith(prefix)}
, taking care not to split surrogate pairs. If {@code a} and {@code b}
have no common prefix, returns the empty string. | [
"Note",
":",
"copy",
"rights",
":",
"Google",
"Guava",
"."
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/StringUtil.java#L4192-L4215 |
aws/aws-sdk-java | aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/BaseConfigurationItem.java | BaseConfigurationItem.withSupplementaryConfiguration | public BaseConfigurationItem withSupplementaryConfiguration(java.util.Map<String, String> supplementaryConfiguration) {
"""
<p>
Configuration attributes that AWS Config returns for certain resource types to supplement the information
returned for the configuration parameter.
</p>
@param supplementaryConfigur... | java | public BaseConfigurationItem withSupplementaryConfiguration(java.util.Map<String, String> supplementaryConfiguration) {
setSupplementaryConfiguration(supplementaryConfiguration);
return this;
} | [
"public",
"BaseConfigurationItem",
"withSupplementaryConfiguration",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"supplementaryConfiguration",
")",
"{",
"setSupplementaryConfiguration",
"(",
"supplementaryConfiguration",
")",
";",
"return",
... | <p>
Configuration attributes that AWS Config returns for certain resource types to supplement the information
returned for the configuration parameter.
</p>
@param supplementaryConfiguration
Configuration attributes that AWS Config returns for certain resource types to supplement the information
returned for the confi... | [
"<p",
">",
"Configuration",
"attributes",
"that",
"AWS",
"Config",
"returns",
"for",
"certain",
"resource",
"types",
"to",
"supplement",
"the",
"information",
"returned",
"for",
"the",
"configuration",
"parameter",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-config/src/main/java/com/amazonaws/services/config/model/BaseConfigurationItem.java#L716-L719 |
jboss/jboss-jstl-api_spec | src/main/java/javax/servlet/jsp/jstl/fmt/LocaleSupport.java | LocaleSupport.getLocalizedMessage | public static String getLocalizedMessage(PageContext pageContext,
String key,
Object[] args) {
"""
Retrieves the localized message corresponding to the given key, and
performs parametric replacement using the arguments speci... | java | public static String getLocalizedMessage(PageContext pageContext,
String key,
Object[] args) {
return getLocalizedMessage(pageContext, key, args, null);
} | [
"public",
"static",
"String",
"getLocalizedMessage",
"(",
"PageContext",
"pageContext",
",",
"String",
"key",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"return",
"getLocalizedMessage",
"(",
"pageContext",
",",
"key",
",",
"args",
",",
"null",
")",
";",
"}"
... | Retrieves the localized message corresponding to the given key, and
performs parametric replacement using the arguments specified via
<tt>args</tt>.
<p> See the specification of the <fmt:message> action for a description
of how parametric replacement is implemented.
<p> The localized message is retrieved as in
{@... | [
"Retrieves",
"the",
"localized",
"message",
"corresponding",
"to",
"the",
"given",
"key",
"and",
"performs",
"parametric",
"replacement",
"using",
"the",
"arguments",
"specified",
"via",
"<tt",
">",
"args<",
"/",
"tt",
">",
".",
"<p",
">",
"See",
"the",
"spe... | train | https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/fmt/LocaleSupport.java#L95-L99 |
RKumsher/utils | src/main/java/com/github/rkumsher/collection/IterableUtils.java | IterableUtils.containsAll | @SafeVarargs
public static <T> boolean containsAll(Iterable<T> iterableToCheck, T... elementsToCheckFor) {
"""
Returns whether or not the given {@link Iterable} contains all the given elements to check for.
<pre>
IterableUtils.containsAll(Collections.emptyList()) = true;
IterableUtils.containsAll(Lists.newA... | java | @SafeVarargs
public static <T> boolean containsAll(Iterable<T> iterableToCheck, T... elementsToCheckFor) {
return containsAll(iterableToCheck, Arrays.asList(elementsToCheckFor));
} | [
"@",
"SafeVarargs",
"public",
"static",
"<",
"T",
">",
"boolean",
"containsAll",
"(",
"Iterable",
"<",
"T",
">",
"iterableToCheck",
",",
"T",
"...",
"elementsToCheckFor",
")",
"{",
"return",
"containsAll",
"(",
"iterableToCheck",
",",
"Arrays",
".",
"asList",
... | Returns whether or not the given {@link Iterable} contains all the given elements to check for.
<pre>
IterableUtils.containsAll(Collections.emptyList()) = true;
IterableUtils.containsAll(Lists.newArrayList("a"), "a") = true;
IterableUtils.containsAll(Lists.newArrayList("a"), "b") = false;
IterableUtils.containsAll(Lis... | [
"Returns",
"whether",
"or",
"not",
"the",
"given",
"{",
"@link",
"Iterable",
"}",
"contains",
"all",
"the",
"given",
"elements",
"to",
"check",
"for",
"."
] | train | https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/collection/IterableUtils.java#L80-L83 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobExecutionsInner.java | JobExecutionsInner.cancelAsync | public Observable<Void> cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) {
"""
Requests cancellation of a job execution.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure ... | java | public Observable<Void> cancelAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId) {
return cancelWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId).map(new Func1<ServiceResponse<Void>, Void>() {
@Ove... | [
"public",
"Observable",
"<",
"Void",
">",
"cancelAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"jobAgentName",
",",
"String",
"jobName",
",",
"UUID",
"jobExecutionId",
")",
"{",
"return",
"cancelWithServiceResponseAsync",
"(... | Requests cancellation of a job execution.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param jobAgentName The name of the job agent.
@param jobName The name of ... | [
"Requests",
"cancellation",
"of",
"a",
"job",
"execution",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobExecutionsInner.java#L446-L453 |
biezhi/anima | src/main/java/io/github/biezhi/anima/Anima.java | Anima.open | public static Anima open(String url, String user, String pass, Quirks quirks) {
"""
Create anima with url and db info
@param url jdbc url
@param user database username
@param pass database password
@param quirks DBQuirks
@return Anima
"""
return open(new Sql2o(url, user, pass, quirks));
... | java | public static Anima open(String url, String user, String pass, Quirks quirks) {
return open(new Sql2o(url, user, pass, quirks));
} | [
"public",
"static",
"Anima",
"open",
"(",
"String",
"url",
",",
"String",
"user",
",",
"String",
"pass",
",",
"Quirks",
"quirks",
")",
"{",
"return",
"open",
"(",
"new",
"Sql2o",
"(",
"url",
",",
"user",
",",
"pass",
",",
"quirks",
")",
")",
";",
"... | Create anima with url and db info
@param url jdbc url
@param user database username
@param pass database password
@param quirks DBQuirks
@return Anima | [
"Create",
"anima",
"with",
"url",
"and",
"db",
"info"
] | train | https://github.com/biezhi/anima/blob/d6655e47ac4c08d9d7f961ac0569062bead8b1ed/src/main/java/io/github/biezhi/anima/Anima.java#L212-L214 |
kejunxia/AndroidMvc | library/poke/src/main/java/com/shipdream/lib/poke/util/ReflectUtils.java | ReflectUtils.setField | public static void setField(Object obj, Field field, Object value) {
"""
Sets value to the field of the given object.
@param obj The object
@param field The field
@param value The value
"""
boolean accessible = field.isAccessible();
//hack accessibility
if (!accessible) {
... | java | public static void setField(Object obj, Field field, Object value) {
boolean accessible = field.isAccessible();
//hack accessibility
if (!accessible) {
field.setAccessible(true);
}
try {
field.set(obj, value);
} catch (IllegalAccessException e) {
... | [
"public",
"static",
"void",
"setField",
"(",
"Object",
"obj",
",",
"Field",
"field",
",",
"Object",
"value",
")",
"{",
"boolean",
"accessible",
"=",
"field",
".",
"isAccessible",
"(",
")",
";",
"//hack accessibility",
"if",
"(",
"!",
"accessible",
")",
"{"... | Sets value to the field of the given object.
@param obj The object
@param field The field
@param value The value | [
"Sets",
"value",
"to",
"the",
"field",
"of",
"the",
"given",
"object",
"."
] | train | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/util/ReflectUtils.java#L91-L105 |
steveash/jopenfst | src/main/java/com/github/steveash/jopenfst/FstInputOutput.java | FstInputOutput.writeStringMap | private static void writeStringMap(SymbolTable map, ObjectOutput out)
throws IOException {
"""
Serializes a symbol map to an ObjectOutput
@param map the symbol map to serialize
@param out the ObjectOutput. It should be already be initialized by the caller.
"""
out.writeInt(map.size());
for (O... | java | private static void writeStringMap(SymbolTable map, ObjectOutput out)
throws IOException {
out.writeInt(map.size());
for (ObjectIntCursor<String> cursor : map) {
out.writeUTF(cursor.key);
out.writeInt(cursor.value);
}
} | [
"private",
"static",
"void",
"writeStringMap",
"(",
"SymbolTable",
"map",
",",
"ObjectOutput",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"writeInt",
"(",
"map",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"ObjectIntCursor",
"<",
"String",
">",... | Serializes a symbol map to an ObjectOutput
@param map the symbol map to serialize
@param out the ObjectOutput. It should be already be initialized by the caller. | [
"Serializes",
"a",
"symbol",
"map",
"to",
"an",
"ObjectOutput"
] | train | https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/FstInputOutput.java#L172-L179 |
jamesagnew/hapi-fhir | hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java | Meta.getTag | public Coding getTag(String theSystem, String theCode) {
"""
Returns the first tag (if any) that has the given system and code, or returns
<code>null</code> if none
"""
for (Coding next : getTag()) {
if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.Ob... | java | public Coding getTag(String theSystem, String theCode) {
for (Coding next : getTag()) {
if (ca.uhn.fhir.util.ObjectUtil.equals(next.getSystem(), theSystem) && ca.uhn.fhir.util.ObjectUtil.equals(next.getCode(), theCode)) {
return next;
}
}
return null;
... | [
"public",
"Coding",
"getTag",
"(",
"String",
"theSystem",
",",
"String",
"theCode",
")",
"{",
"for",
"(",
"Coding",
"next",
":",
"getTag",
"(",
")",
")",
"{",
"if",
"(",
"ca",
".",
"uhn",
".",
"fhir",
".",
"util",
".",
"ObjectUtil",
".",
"equals",
... | Returns the first tag (if any) that has the given system and code, or returns
<code>null</code> if none | [
"Returns",
"the",
"first",
"tag",
"(",
"if",
"any",
")",
"that",
"has",
"the",
"given",
"system",
"and",
"code",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"none"
] | train | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Meta.java#L433-L440 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java | VirtualNetworkGatewaysInner.beginGetVpnclientIpsecParameters | public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) {
"""
The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through... | java | public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) {
return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body();
} | [
"public",
"VpnClientIPsecParametersInner",
"beginGetVpnclientIpsecParameters",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkGatewayName",
")",
"{",
"return",
"beginGetVpnclientIpsecParametersWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"virtualNetwor... | The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.
@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayName The virtual network ga... | [
"The",
"Get",
"VpnclientIpsecParameters",
"operation",
"retrieves",
"information",
"about",
"the",
"vpnclient",
"ipsec",
"policy",
"for",
"P2S",
"client",
"of",
"virtual",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"through",
"Network",
"re... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2893-L2895 |
dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/CalendarHeaderView.java | CalendarHeaderView.setCellFactory | public final void setCellFactory(Callback<Calendar, Node> factory) {
"""
Sets the value of {@link #cellFactoryProperty()}.
@param factory
the factory
"""
requireNonNull(factory);
cellFactoryProperty().set(factory);
} | java | public final void setCellFactory(Callback<Calendar, Node> factory) {
requireNonNull(factory);
cellFactoryProperty().set(factory);
} | [
"public",
"final",
"void",
"setCellFactory",
"(",
"Callback",
"<",
"Calendar",
",",
"Node",
">",
"factory",
")",
"{",
"requireNonNull",
"(",
"factory",
")",
";",
"cellFactoryProperty",
"(",
")",
".",
"set",
"(",
"factory",
")",
";",
"}"
] | Sets the value of {@link #cellFactoryProperty()}.
@param factory
the factory | [
"Sets",
"the",
"value",
"of",
"{",
"@link",
"#cellFactoryProperty",
"()",
"}",
"."
] | train | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/CalendarHeaderView.java#L119-L122 |
amzn/ion-java | src/com/amazon/ion/impl/SharedSymbolTable.java | SharedSymbolTable.newSharedSymbolTable | static SymbolTable newSharedSymbolTable(IonStruct ionRep) {
"""
Constructs a new shared symbol table represented by the passed in
{@link IonStruct}.
@param ionRep
the {@link IonStruct} representing the new shared symbol table
@return
"""
IonReader reader = new IonReaderTreeSystem(ionRep);
... | java | static SymbolTable newSharedSymbolTable(IonStruct ionRep)
{
IonReader reader = new IonReaderTreeSystem(ionRep);
return newSharedSymbolTable(reader, false);
} | [
"static",
"SymbolTable",
"newSharedSymbolTable",
"(",
"IonStruct",
"ionRep",
")",
"{",
"IonReader",
"reader",
"=",
"new",
"IonReaderTreeSystem",
"(",
"ionRep",
")",
";",
"return",
"newSharedSymbolTable",
"(",
"reader",
",",
"false",
")",
";",
"}"
] | Constructs a new shared symbol table represented by the passed in
{@link IonStruct}.
@param ionRep
the {@link IonStruct} representing the new shared symbol table
@return | [
"Constructs",
"a",
"new",
"shared",
"symbol",
"table",
"represented",
"by",
"the",
"passed",
"in",
"{",
"@link",
"IonStruct",
"}",
"."
] | train | https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/SharedSymbolTable.java#L188-L192 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.overTheBox_new_duration_GET | public OvhOrder overTheBox_new_duration_GET(String duration, String deviceId, String offer, String voucher) throws IOException {
"""
Get prices and contracts information
REST: GET /order/overTheBox/new/{duration}
@param offer [required] Offer name
@param deviceId [required] The id of the device
@param vouche... | java | public OvhOrder overTheBox_new_duration_GET(String duration, String deviceId, String offer, String voucher) throws IOException {
String qPath = "/order/overTheBox/new/{duration}";
StringBuilder sb = path(qPath, duration);
query(sb, "deviceId", deviceId);
query(sb, "offer", offer);
query(sb, "voucher", voucher... | [
"public",
"OvhOrder",
"overTheBox_new_duration_GET",
"(",
"String",
"duration",
",",
"String",
"deviceId",
",",
"String",
"offer",
",",
"String",
"voucher",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/overTheBox/new/{duration}\"",
";",
"String... | Get prices and contracts information
REST: GET /order/overTheBox/new/{duration}
@param offer [required] Offer name
@param deviceId [required] The id of the device
@param voucher [required] An optional voucher
@param duration [required] Duration | [
"Get",
"prices",
"and",
"contracts",
"information"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3084-L3092 |
OpenLiberty/open-liberty | dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java | Director.resolveServerPackage | public ServerPackageAsset resolveServerPackage(File archiveFile) throws InstallException {
"""
Creates a new server package asset from the inputed archive file
@param archiveFile the archive file containing the asset
@return a new ServerPackageAsset from the archive file
@throws InstallException
"""
... | java | public ServerPackageAsset resolveServerPackage(File archiveFile) throws InstallException {
ServerPackageAsset spa = (ServerPackageJarAsset.validType(archiveFile.getAbsolutePath().toLowerCase())) ? new ServerPackageJarAsset(archiveFile, false) : new ServerPackageZipAsset(archiveFile, false);
this.instal... | [
"public",
"ServerPackageAsset",
"resolveServerPackage",
"(",
"File",
"archiveFile",
")",
"throws",
"InstallException",
"{",
"ServerPackageAsset",
"spa",
"=",
"(",
"ServerPackageJarAsset",
".",
"validType",
"(",
"archiveFile",
".",
"getAbsolutePath",
"(",
")",
".",
"to... | Creates a new server package asset from the inputed archive file
@param archiveFile the archive file containing the asset
@return a new ServerPackageAsset from the archive file
@throws InstallException | [
"Creates",
"a",
"new",
"server",
"package",
"asset",
"from",
"the",
"inputed",
"archive",
"file"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L448-L455 |
i-net-software/jlessc | src/com/inet/lib/less/ColorUtils.java | ColorUtils.hslaHue | private static double hslaHue(double h, double m1, double m2) {
"""
Calculate a single color channel of the HSLA function
@param h hue value
@param m1 value 1 in range of 0.0 to 1.0
@param m2 value 2 in range of 0.0 to 1.0
@return channel value in range of 0.0 to 1.0
"""
h = h < 0 ? h + 1 : (h > 1 ... | java | private static double hslaHue(double h, double m1, double m2) {
h = h < 0 ? h + 1 : (h > 1 ? h - 1 : h);
if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; }
else if (h * 2 < 1) { return m2; }
else if (h * 3 < 2) { return m1 + (m2 - m1) * (2F/3 - h) * 6; }
else {... | [
"private",
"static",
"double",
"hslaHue",
"(",
"double",
"h",
",",
"double",
"m1",
",",
"double",
"m2",
")",
"{",
"h",
"=",
"h",
"<",
"0",
"?",
"h",
"+",
"1",
":",
"(",
"h",
">",
"1",
"?",
"h",
"-",
"1",
":",
"h",
")",
";",
"if",
"(",
"h"... | Calculate a single color channel of the HSLA function
@param h hue value
@param m1 value 1 in range of 0.0 to 1.0
@param m2 value 2 in range of 0.0 to 1.0
@return channel value in range of 0.0 to 1.0 | [
"Calculate",
"a",
"single",
"color",
"channel",
"of",
"the",
"HSLA",
"function"
] | train | https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/ColorUtils.java#L202-L208 |
lucee/Lucee | core/src/main/java/lucee/runtime/PageContextImpl.java | PageContextImpl.getCollection | @Override
public Object getCollection(Object coll, String key) throws PageException {
"""
/*
private Object _touch(Scope scope, String key) throws PageException { Object
o=scope.get(key,null); if(o!=null) return o; return scope.set(key, new StructImpl()); }
"""
return variableUtil.getCollection(this, co... | java | @Override
public Object getCollection(Object coll, String key) throws PageException {
return variableUtil.getCollection(this, coll, key);
} | [
"@",
"Override",
"public",
"Object",
"getCollection",
"(",
"Object",
"coll",
",",
"String",
"key",
")",
"throws",
"PageException",
"{",
"return",
"variableUtil",
".",
"getCollection",
"(",
"this",
",",
"coll",
",",
"key",
")",
";",
"}"
] | /*
private Object _touch(Scope scope, String key) throws PageException { Object
o=scope.get(key,null); if(o!=null) return o; return scope.set(key, new StructImpl()); } | [
"/",
"*",
"private",
"Object",
"_touch",
"(",
"Scope",
"scope",
"String",
"key",
")",
"throws",
"PageException",
"{",
"Object",
"o",
"=",
"scope",
".",
"get",
"(",
"key",
"null",
")",
";",
"if",
"(",
"o!",
"=",
"null",
")",
"return",
"o",
";",
"ret... | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageContextImpl.java#L1433-L1436 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/code/CciConnFactoryCodeGen.java | CciConnFactoryCodeGen.writeImport | @Override
public void writeImport(Definition def, Writer out) throws IOException {
"""
Output class import
@param def definition
@param out Writer
@throws IOException ioException
"""
out.write("package " + def.getRaPackage() + ";\n\n");
out.write("import javax.naming.NamingException;\n");
... | java | @Override
public void writeImport(Definition def, Writer out) throws IOException
{
out.write("package " + def.getRaPackage() + ";\n\n");
out.write("import javax.naming.NamingException;\n");
out.write("import javax.naming.Reference;\n\n");
out.write("import javax.resource.ResourceException;... | [
"@",
"Override",
"public",
"void",
"writeImport",
"(",
"Definition",
"def",
",",
"Writer",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"write",
"(",
"\"package \"",
"+",
"def",
".",
"getRaPackage",
"(",
")",
"+",
"\";\\n\\n\"",
")",
";",
"out",
... | Output class import
@param def definition
@param out Writer
@throws IOException ioException | [
"Output",
"class",
"import"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/CciConnFactoryCodeGen.java#L80-L95 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/BaseListener.java | BaseListener.removeListener | public void removeListener(BaseListener listener, boolean bFreeFlag) {
"""
Remove a specific listener from the chain.
@param listener The listener to remove.
@param bDeleteFlag If true, free the listener.
"""
if (m_nextListener != null)
{
if (m_nextListener == listener)
... | java | public void removeListener(BaseListener listener, boolean bFreeFlag)
{
if (m_nextListener != null)
{
if (m_nextListener == listener)
{
m_nextListener = listener.getNextListener();
listener.unlink(bFreeFlag); // remove theBehavior from the lin... | [
"public",
"void",
"removeListener",
"(",
"BaseListener",
"listener",
",",
"boolean",
"bFreeFlag",
")",
"{",
"if",
"(",
"m_nextListener",
"!=",
"null",
")",
"{",
"if",
"(",
"m_nextListener",
"==",
"listener",
")",
"{",
"m_nextListener",
"=",
"listener",
".",
... | Remove a specific listener from the chain.
@param listener The listener to remove.
@param bDeleteFlag If true, free the listener. | [
"Remove",
"a",
"specific",
"listener",
"from",
"the",
"chain",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseListener.java#L166-L178 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/validate/Schema.java | Schema.validateAndThrowException | public void validateAndThrowException(String correlationId, Object value, boolean strict)
throws ValidationException {
"""
Validates the given value and returns a ValidationException if errors were
found.
@param correlationId (optional) transaction id to trace execution through
call chain.
@param value ... | java | public void validateAndThrowException(String correlationId, Object value, boolean strict)
throws ValidationException {
List<ValidationResult> results = validate(value);
ValidationException.throwExceptionIfNeeded(correlationId, results, strict);
} | [
"public",
"void",
"validateAndThrowException",
"(",
"String",
"correlationId",
",",
"Object",
"value",
",",
"boolean",
"strict",
")",
"throws",
"ValidationException",
"{",
"List",
"<",
"ValidationResult",
">",
"results",
"=",
"validate",
"(",
"value",
")",
";",
... | Validates the given value and returns a ValidationException if errors were
found.
@param correlationId (optional) transaction id to trace execution through
call chain.
@param value a value to be validated.
@param strict true to treat warnings as errors.
@throws ValidationException when errors occured in... | [
"Validates",
"the",
"given",
"value",
"and",
"returns",
"a",
"ValidationException",
"if",
"errors",
"were",
"found",
"."
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/validate/Schema.java#L215-L219 |
datacleaner/DataCleaner | desktop/ui/src/main/java/org/datacleaner/windows/AnalysisJobBuilderWindowImpl.java | AnalysisJobBuilderWindowImpl.setDatastore | @Override
public void setDatastore(final Datastore datastore, final boolean expandTree) {
"""
Initializes the window to use a particular datastore in the schema tree.
@param datastore
@param expandTree
true if the datastore tree should be initially expanded.
"""
final DatastoreConnection con;
... | java | @Override
public void setDatastore(final Datastore datastore, final boolean expandTree) {
final DatastoreConnection con;
if (datastore == null) {
con = null;
} else {
con = datastore.openConnection();
}
_datastore = datastore;
if (_datastoreCo... | [
"@",
"Override",
"public",
"void",
"setDatastore",
"(",
"final",
"Datastore",
"datastore",
",",
"final",
"boolean",
"expandTree",
")",
"{",
"final",
"DatastoreConnection",
"con",
";",
"if",
"(",
"datastore",
"==",
"null",
")",
"{",
"con",
"=",
"null",
";",
... | Initializes the window to use a particular datastore in the schema tree.
@param datastore
@param expandTree
true if the datastore tree should be initially expanded. | [
"Initializes",
"the",
"window",
"to",
"use",
"a",
"particular",
"datastore",
"in",
"the",
"schema",
"tree",
"."
] | train | https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/windows/AnalysisJobBuilderWindowImpl.java#L443-L470 |
OpenLiberty/open-liberty | dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java | Director.installFeature | public void installFeature(String esaLocation, String toExtension, boolean acceptLicense) throws InstallException {
"""
Installs the feature found in the given esa location
@param esaLocation location of esa
@param toExtension location of a product extension
@param acceptLicense if license is accepted
@throw... | java | public void installFeature(String esaLocation, String toExtension, boolean acceptLicense) throws InstallException {
fireProgressEvent(InstallProgressEvent.CHECK, 1, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_CHECKING"));
ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>();
... | [
"public",
"void",
"installFeature",
"(",
"String",
"esaLocation",
",",
"String",
"toExtension",
",",
"boolean",
"acceptLicense",
")",
"throws",
"InstallException",
"{",
"fireProgressEvent",
"(",
"InstallProgressEvent",
".",
"CHECK",
",",
"1",
",",
"Messages",
".",
... | Installs the feature found in the given esa location
@param esaLocation location of esa
@param toExtension location of a product extension
@param acceptLicense if license is accepted
@throws InstallException | [
"Installs",
"the",
"feature",
"found",
"in",
"the",
"given",
"esa",
"location"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java#L374-L383 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/Image.java | Image.drawSheared | public void drawSheared(float x,float y, float hshear, float vshear) {
"""
Draw this image at a specified location and size
@param x The x location to draw the image at
@param y The y location to draw the image at
@param hshear The amount to shear the bottom points by horizontally
@param vshear The amount to... | java | public void drawSheared(float x,float y, float hshear, float vshear) {
this.drawSheared(x, y, hshear, vshear, Color.white);
} | [
"public",
"void",
"drawSheared",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"hshear",
",",
"float",
"vshear",
")",
"{",
"this",
".",
"drawSheared",
"(",
"x",
",",
"y",
",",
"hshear",
",",
"vshear",
",",
"Color",
".",
"white",
")",
";",
"}"... | Draw this image at a specified location and size
@param x The x location to draw the image at
@param y The y location to draw the image at
@param hshear The amount to shear the bottom points by horizontally
@param vshear The amount to shear the right points by vertically | [
"Draw",
"this",
"image",
"at",
"a",
"specified",
"location",
"and",
"size"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Image.java#L697-L699 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/XMLPropertiesField.java | XMLPropertiesField.propertiesToXML | public static String propertiesToXML(Map<String,Object> map) {
"""
Convert these java properties to a string.
@param properties The java properties.
@return The properties string.
"""
String strProperties = null;
ByteArrayOutputStream baOut = new ByteArrayOutputStream();
try {
... | java | public static String propertiesToXML(Map<String,Object> map)
{
String strProperties = null;
ByteArrayOutputStream baOut = new ByteArrayOutputStream();
try {
Properties properties = new Properties();
properties.putAll(map);
properties.storeToXML(baOut, PR... | [
"public",
"static",
"String",
"propertiesToXML",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"String",
"strProperties",
"=",
"null",
";",
"ByteArrayOutputStream",
"baOut",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"try",
"{",
"P... | Convert these java properties to a string.
@param properties The java properties.
@return The properties string. | [
"Convert",
"these",
"java",
"properties",
"to",
"a",
"string",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/XMLPropertiesField.java#L129-L154 |
tvesalainen/bcc | src/main/java/org/vesalainen/bcc/MethodCompiler.java | MethodCompiler.addNewArray | public void addNewArray(String name, Class<?> aClass, int size) throws IOException {
"""
Create new array
<p>Stack: ..., count => ..., arrayref
@param name
@param aClass
@param size
@throws IOException
"""
addNewArray(name, Typ.getTypeFor(aClass), size);
} | java | public void addNewArray(String name, Class<?> aClass, int size) throws IOException
{
addNewArray(name, Typ.getTypeFor(aClass), size);
} | [
"public",
"void",
"addNewArray",
"(",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"aClass",
",",
"int",
"size",
")",
"throws",
"IOException",
"{",
"addNewArray",
"(",
"name",
",",
"Typ",
".",
"getTypeFor",
"(",
"aClass",
")",
",",
"size",
")",
";",
... | Create new array
<p>Stack: ..., count => ..., arrayref
@param name
@param aClass
@param size
@throws IOException | [
"Create",
"new",
"array",
"<p",
">",
"Stack",
":",
"...",
"count",
"=",
">",
";",
"...",
"arrayref"
] | train | https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/MethodCompiler.java#L1418-L1421 |
cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/AtomMassGenerator.java | AtomMassGenerator.showCarbon | @Override
public boolean showCarbon(IAtom atom, IAtomContainer container, RendererModel model) {
"""
Returns true if the mass number of this element is set and not
equal the mass number of the most abundant isotope of this element.
@param atom {@link IAtom} which is being examined
@param container ... | java | @Override
public boolean showCarbon(IAtom atom, IAtomContainer container, RendererModel model) {
Integer massNumber = atom.getMassNumber();
if (massNumber != null) {
try {
Integer expectedMassNumber = Isotopes.getInstance().getMajorIsotope(atom.getSymbol()).getMassNumber... | [
"@",
"Override",
"public",
"boolean",
"showCarbon",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
",",
"RendererModel",
"model",
")",
"{",
"Integer",
"massNumber",
"=",
"atom",
".",
"getMassNumber",
"(",
")",
";",
"if",
"(",
"massNumber",
"!=",
"... | Returns true if the mass number of this element is set and not
equal the mass number of the most abundant isotope of this element.
@param atom {@link IAtom} which is being examined
@param container {@link IAtomContainer} of which the atom is part
@param model the {@link RendererModel}
@return true, when ma... | [
"Returns",
"true",
"if",
"the",
"mass",
"number",
"of",
"this",
"element",
"is",
"set",
"and",
"not",
"equal",
"the",
"mass",
"number",
"of",
"the",
"most",
"abundant",
"isotope",
"of",
"this",
"element",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/AtomMassGenerator.java#L49-L62 |
apache/incubator-druid | server/src/main/java/org/apache/druid/segment/realtime/appenderator/AppenderatorImpl.java | AppenderatorImpl.persistHydrant | private int persistHydrant(FireHydrant indexToPersist, SegmentIdWithShardSpec identifier) {
"""
Persists the given hydrant and returns the number of rows persisted. Must only be called in the single-threaded
persistExecutor.
@param indexToPersist hydrant to persist
@param identifier the segment this hydra... | java | private int persistHydrant(FireHydrant indexToPersist, SegmentIdWithShardSpec identifier)
{
synchronized (indexToPersist) {
if (indexToPersist.hasSwapped()) {
log.info(
"Segment[%s], Hydrant[%s] already swapped. Ignoring request to persist.",
identifier, indexToPersist
... | [
"private",
"int",
"persistHydrant",
"(",
"FireHydrant",
"indexToPersist",
",",
"SegmentIdWithShardSpec",
"identifier",
")",
"{",
"synchronized",
"(",
"indexToPersist",
")",
"{",
"if",
"(",
"indexToPersist",
".",
"hasSwapped",
"(",
")",
")",
"{",
"log",
".",
"inf... | Persists the given hydrant and returns the number of rows persisted. Must only be called in the single-threaded
persistExecutor.
@param indexToPersist hydrant to persist
@param identifier the segment this hydrant is going to be part of
@return the number of rows persisted | [
"Persists",
"the",
"given",
"hydrant",
"and",
"returns",
"the",
"number",
"of",
"rows",
"persisted",
".",
"Must",
"only",
"be",
"called",
"in",
"the",
"single",
"-",
"threaded",
"persistExecutor",
"."
] | train | https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/realtime/appenderator/AppenderatorImpl.java#L1245-L1286 |
facebookarchive/hadoop-20 | src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/OfferService.java | OfferService.notifyNamenodeReceivedBlock | void notifyNamenodeReceivedBlock(Block block, String delHint) {
"""
Add a block to the pending received/deleted ACKs.
to inform the namenode that we have received a block.
"""
if (block==null) {
throw new IllegalArgumentException("Block is null");
}
if (delHint != null && !delHint.isEmpty())... | java | void notifyNamenodeReceivedBlock(Block block, String delHint) {
if (block==null) {
throw new IllegalArgumentException("Block is null");
}
if (delHint != null && !delHint.isEmpty()) {
block = new ReceivedBlockInfo(block, delHint);
}
synchronized (receivedAndDeletedBlockList) {
recei... | [
"void",
"notifyNamenodeReceivedBlock",
"(",
"Block",
"block",
",",
"String",
"delHint",
")",
"{",
"if",
"(",
"block",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Block is null\"",
")",
";",
"}",
"if",
"(",
"delHint",
"!=",
"nu... | Add a block to the pending received/deleted ACKs.
to inform the namenode that we have received a block. | [
"Add",
"a",
"block",
"to",
"the",
"pending",
"received",
"/",
"deleted",
"ACKs",
".",
"to",
"inform",
"the",
"namenode",
"that",
"we",
"have",
"received",
"a",
"block",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/datanode/OfferService.java#L821-L835 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionScreenList_POST | public OvhOvhPabxDialplanExtensionConditionScreenList billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionScreenList_POST(String billingAccount, String serviceName, Long dialplanId, Long extensionId, String callerIdNumber, String destinationNumber, OvhOvhPabxDialplanExtensionConditionS... | java | public OvhOvhPabxDialplanExtensionConditionScreenList billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionScreenList_POST(String billingAccount, String serviceName, Long dialplanId, Long extensionId, String callerIdNumber, String destinationNumber, OvhOvhPabxDialplanExtensionConditionS... | [
"public",
"OvhOvhPabxDialplanExtensionConditionScreenList",
"billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionScreenList_POST",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"dialplanId",
",",
"Long",
"extensionId",
","... | Create a new screenlist condition for an extension
REST: POST /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionScreenList
@param screenListType [required] Type of screenlist
@param destinationNumber [required] Add a screenlist based on the destination number
@par... | [
"Create",
"a",
"new",
"screenlist",
"condition",
"for",
"an",
"extension"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7222-L7231 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java | ServerParams.getModuleParamBoolean | public boolean getModuleParamBoolean(String moduleName, String paramName) {
"""
Get the boolean value of the given parameter name belonging to the given module
name. If no such module/parameter name is known, false is returned. If the given
value is not a String, a RuntimeException is thrown. Boolean.parseBoolea... | java | public boolean getModuleParamBoolean(String moduleName, String paramName) {
Map<String, Object> moduleParams = getModuleParams(moduleName);
if (moduleParams == null || !moduleParams.containsKey(paramName)) {
return false;
}
Object value = moduleParams.get(paramName);
... | [
"public",
"boolean",
"getModuleParamBoolean",
"(",
"String",
"moduleName",
",",
"String",
"paramName",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"moduleParams",
"=",
"getModuleParams",
"(",
"moduleName",
")",
";",
"if",
"(",
"moduleParams",
"==",
"nu... | Get the boolean value of the given parameter name belonging to the given module
name. If no such module/parameter name is known, false is returned. If the given
value is not a String, a RuntimeException is thrown. Boolean.parseBoolean() is
used to parse the value, which will return false if the String value is anything... | [
"Get",
"the",
"boolean",
"value",
"of",
"the",
"given",
"parameter",
"name",
"belonging",
"to",
"the",
"given",
"module",
"name",
".",
"If",
"no",
"such",
"module",
"/",
"parameter",
"name",
"is",
"known",
"false",
"is",
"returned",
".",
"If",
"the",
"gi... | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java#L359-L371 |
dadoonet/elasticsearch-beyonder | src/main/java/fr/pilato/elasticsearch/tools/alias/AliasElasticsearchUpdater.java | AliasElasticsearchUpdater.createAlias | @Deprecated
public static void createAlias(Client client, String alias, String index) throws Exception {
"""
Create an alias if needed
@param client Client to use
@param alias Alias name
@param index Index name
@throws Exception When alias can not be set
"""
logger.trace("createAlias({},{})", a... | java | @Deprecated
public static void createAlias(Client client, String alias, String index) throws Exception {
logger.trace("createAlias({},{})", alias, index);
AcknowledgedResponse response = client.admin().indices().prepareAliases().addAlias(index, alias).get();
if (!response.isAcknowledged()) t... | [
"@",
"Deprecated",
"public",
"static",
"void",
"createAlias",
"(",
"Client",
"client",
",",
"String",
"alias",
",",
"String",
"index",
")",
"throws",
"Exception",
"{",
"logger",
".",
"trace",
"(",
"\"createAlias({},{})\"",
",",
"alias",
",",
"index",
")",
";... | Create an alias if needed
@param client Client to use
@param alias Alias name
@param index Index name
@throws Exception When alias can not be set | [
"Create",
"an",
"alias",
"if",
"needed"
] | train | https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/alias/AliasElasticsearchUpdater.java#L41-L47 |
JOML-CI/JOML | src/org/joml/Matrix3x2f.java | Matrix3x2f.scaleAroundLocal | public Matrix3x2f scaleAroundLocal(float sx, float sy, float sz, float ox, float oy, float oz) {
"""
Pre-multiply scaling to this matrix by scaling the base axes by the given sx and
sy factors while using <code>(ox, oy)</code> as the scaling origin.
<p>
If <code>M</code> is <code>this</code> matrix and <code>S<... | java | public Matrix3x2f scaleAroundLocal(float sx, float sy, float sz, float ox, float oy, float oz) {
return scaleAroundLocal(sx, sy, ox, oy, this);
} | [
"public",
"Matrix3x2f",
"scaleAroundLocal",
"(",
"float",
"sx",
",",
"float",
"sy",
",",
"float",
"sz",
",",
"float",
"ox",
",",
"float",
"oy",
",",
"float",
"oz",
")",
"{",
"return",
"scaleAroundLocal",
"(",
"sx",
",",
"sy",
",",
"ox",
",",
"oy",
",... | Pre-multiply scaling to this matrix by scaling the base axes by the given sx and
sy factors while using <code>(ox, oy)</code> as the scaling origin.
<p>
If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix,
then the new matrix will be <code>S * M</code>. So when transforming a
vector <cod... | [
"Pre",
"-",
"multiply",
"scaling",
"to",
"this",
"matrix",
"by",
"scaling",
"the",
"base",
"axes",
"by",
"the",
"given",
"sx",
"and",
"sy",
"factors",
"while",
"using",
"<code",
">",
"(",
"ox",
"oy",
")",
"<",
"/",
"code",
">",
"as",
"the",
"scaling"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L1529-L1531 |
alkacon/opencms-core | src-modules/org/opencms/workplace/commons/CmsPreferences.java | CmsPreferences.buildSelectView | public String buildSelectView(String htmlAttributes) {
"""
Returns a html select box filled with the views accessible by the current user.<p>
@param htmlAttributes attributes that will be inserted into the generated html
@return a html select box filled with the views accessible by the current user
"""
... | java | public String buildSelectView(String htmlAttributes) {
SelectOptions optionBean = CmsStartViewPreference.getViewSelectOptions(getCms(), getParamTabWpView());
return buildSelect(htmlAttributes, optionBean);
} | [
"public",
"String",
"buildSelectView",
"(",
"String",
"htmlAttributes",
")",
"{",
"SelectOptions",
"optionBean",
"=",
"CmsStartViewPreference",
".",
"getViewSelectOptions",
"(",
"getCms",
"(",
")",
",",
"getParamTabWpView",
"(",
")",
")",
";",
"return",
"buildSelect... | Returns a html select box filled with the views accessible by the current user.<p>
@param htmlAttributes attributes that will be inserted into the generated html
@return a html select box filled with the views accessible by the current user | [
"Returns",
"a",
"html",
"select",
"box",
"filled",
"with",
"the",
"views",
"accessible",
"by",
"the",
"current",
"user",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L989-L993 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollidableUpdater.java | CollidableUpdater.getOffsetX | private static int getOffsetX(Collision collision, Mirror mirror) {
"""
Get the horizontal offset.
@param collision The collision reference.
@param mirror The mirror used.
@return The offset value depending of mirror.
"""
if (mirror == Mirror.HORIZONTAL)
{
return -collision.... | java | private static int getOffsetX(Collision collision, Mirror mirror)
{
if (mirror == Mirror.HORIZONTAL)
{
return -collision.getOffsetX();
}
return collision.getOffsetX();
} | [
"private",
"static",
"int",
"getOffsetX",
"(",
"Collision",
"collision",
",",
"Mirror",
"mirror",
")",
"{",
"if",
"(",
"mirror",
"==",
"Mirror",
".",
"HORIZONTAL",
")",
"{",
"return",
"-",
"collision",
".",
"getOffsetX",
"(",
")",
";",
"}",
"return",
"co... | Get the horizontal offset.
@param collision The collision reference.
@param mirror The mirror used.
@return The offset value depending of mirror. | [
"Get",
"the",
"horizontal",
"offset",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollidableUpdater.java#L140-L147 |
ModeShape/modeshape | modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java | ConnectionInfo.getCredentials | public Credentials getCredentials() {
"""
Return the credentials based on the user name and password.
@return Credentials
"""
String username = getUsername();
char[] password = getPassword();
if (username != null) {
return new SimpleCredentials(username, password);
... | java | public Credentials getCredentials() {
String username = getUsername();
char[] password = getPassword();
if (username != null) {
return new SimpleCredentials(username, password);
}
return null;
} | [
"public",
"Credentials",
"getCredentials",
"(",
")",
"{",
"String",
"username",
"=",
"getUsername",
"(",
")",
";",
"char",
"[",
"]",
"password",
"=",
"getPassword",
"(",
")",
";",
"if",
"(",
"username",
"!=",
"null",
")",
"{",
"return",
"new",
"SimpleCre... | Return the credentials based on the user name and password.
@return Credentials | [
"Return",
"the",
"credentials",
"based",
"on",
"the",
"user",
"name",
"and",
"password",
"."
] | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java#L310-L317 |
lucee/Lucee | core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java | TagLibFactory.loadFromFile | public static TagLib loadFromFile(Resource res, Identification id) throws TagLibException {
"""
Laedt eine einzelne TagLib.
@param file TLD die geladen werden soll.
@param saxParser Definition des Sax Parser mit dem die TagLib eingelsesen werden soll.
@return TagLib
@throws TagLibException
"""
// Read ... | java | public static TagLib loadFromFile(Resource res, Identification id) throws TagLibException {
// Read in XML
TagLib lib = TagLibFactory.getHashLib(FunctionLibFactory.id(res));
if (lib == null) {
lib = new TagLibFactory(null, res, id).getLib();
TagLibFactory.hashLib.put(FunctionLibFactory.id(res), lib);
}
... | [
"public",
"static",
"TagLib",
"loadFromFile",
"(",
"Resource",
"res",
",",
"Identification",
"id",
")",
"throws",
"TagLibException",
"{",
"// Read in XML",
"TagLib",
"lib",
"=",
"TagLibFactory",
".",
"getHashLib",
"(",
"FunctionLibFactory",
".",
"id",
"(",
"res",
... | Laedt eine einzelne TagLib.
@param file TLD die geladen werden soll.
@param saxParser Definition des Sax Parser mit dem die TagLib eingelsesen werden soll.
@return TagLib
@throws TagLibException | [
"Laedt",
"eine",
"einzelne",
"TagLib",
"."
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java#L489-L499 |
parship/roperty | src/main/java/com/parship/roperty/Ensure.java | Ensure.notEmpty | public static void notEmpty(final CharSequence str, final String parameterName) {
"""
Check that the provided string is not empty (not null, not "").
@param str string to check
@param parameterName name of the parameter to display in the error message
"""
if (str == null || str.length() == 0) {
throw ... | java | public static void notEmpty(final CharSequence str, final String parameterName) {
if (str == null || str.length() == 0) {
throw new IllegalArgumentException('"' + parameterName + "\" must not be null or empty, but was: " + str);
}
} | [
"public",
"static",
"void",
"notEmpty",
"(",
"final",
"CharSequence",
"str",
",",
"final",
"String",
"parameterName",
")",
"{",
"if",
"(",
"str",
"==",
"null",
"||",
"str",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentExc... | Check that the provided string is not empty (not null, not "").
@param str string to check
@param parameterName name of the parameter to display in the error message | [
"Check",
"that",
"the",
"provided",
"string",
"is",
"not",
"empty",
"(",
"not",
"null",
"not",
")",
"."
] | train | https://github.com/parship/roperty/blob/d25fb0ff9707d944aa1900180861b43c8f77ea33/src/main/java/com/parship/roperty/Ensure.java#L34-L38 |
sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java | Utils.getSuperTypeParameterMap | public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) {
"""
Extract the mapping between the type parameters declared within the super types and the
type parameters arguments that are declared within the given type.
<p>For example, consider the following code:
... | java | public static void getSuperTypeParameterMap(JvmDeclaredType type, Map<String, JvmTypeReference> mapping) {
for (final JvmTypeReference superTypeReference : type.getSuperTypes()) {
if (superTypeReference instanceof JvmParameterizedTypeReference) {
final JvmParameterizedTypeReference parameterizedTypeReference =... | [
"public",
"static",
"void",
"getSuperTypeParameterMap",
"(",
"JvmDeclaredType",
"type",
",",
"Map",
"<",
"String",
",",
"JvmTypeReference",
">",
"mapping",
")",
"{",
"for",
"(",
"final",
"JvmTypeReference",
"superTypeReference",
":",
"type",
".",
"getSuperTypes",
... | Extract the mapping between the type parameters declared within the super types and the
type parameters arguments that are declared within the given type.
<p>For example, consider the following code:
<pre><code>
interface X<T> {
def a(p1 : T, p2 : U) with U
}
interface Y<T> {
}
class Z<TT> implements... | [
"Extract",
"the",
"mapping",
"between",
"the",
"type",
"parameters",
"declared",
"within",
"the",
"super",
"types",
"and",
"the",
"type",
"parameters",
"arguments",
"that",
"are",
"declared",
"within",
"the",
"given",
"type",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1590-L1605 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java | MetaClassHelper.doSetMetaClass | public static void doSetMetaClass(Object self, MetaClass mc) {
"""
Sets the meta class for an object, by delegating to the appropriate
{@link DefaultGroovyMethods} helper method. This method was introduced as
a breaking change in 2.0 to solve rare cases of stack overflow. See GROOVY-5285.
The method is named ... | java | public static void doSetMetaClass(Object self, MetaClass mc) {
if (self instanceof GroovyObject) {
DefaultGroovyMethods.setMetaClass((GroovyObject)self, mc);
} else {
DefaultGroovyMethods.setMetaClass(self, mc);
}
} | [
"public",
"static",
"void",
"doSetMetaClass",
"(",
"Object",
"self",
",",
"MetaClass",
"mc",
")",
"{",
"if",
"(",
"self",
"instanceof",
"GroovyObject",
")",
"{",
"DefaultGroovyMethods",
".",
"setMetaClass",
"(",
"(",
"GroovyObject",
")",
"self",
",",
"mc",
"... | Sets the meta class for an object, by delegating to the appropriate
{@link DefaultGroovyMethods} helper method. This method was introduced as
a breaking change in 2.0 to solve rare cases of stack overflow. See GROOVY-5285.
The method is named doSetMetaClass in order to prevent misusages. Do not use
this method directl... | [
"Sets",
"the",
"meta",
"class",
"for",
"an",
"object",
"by",
"delegating",
"to",
"the",
"appropriate",
"{",
"@link",
"DefaultGroovyMethods",
"}",
"helper",
"method",
".",
"This",
"method",
"was",
"introduced",
"as",
"a",
"breaking",
"change",
"in",
"2",
".",... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/MetaClassHelper.java#L999-L1005 |
alipay/sofa-rpc | extension-impl/fault-tolerance/src/main/java/com/alipay/sofa/rpc/client/aft/ProviderInfoWeightManager.java | ProviderInfoWeightManager.recoverWeight | public static boolean recoverWeight(ProviderInfo providerInfo, int weight) {
"""
Recover weight of provider info
@param providerInfo ProviderInfo
@param weight recovered weight
@return is recover success
"""
providerInfo.setStatus(ProviderStatus.RECOVERING);
providerInfo.setWeight(we... | java | public static boolean recoverWeight(ProviderInfo providerInfo, int weight) {
providerInfo.setStatus(ProviderStatus.RECOVERING);
providerInfo.setWeight(weight);
return true;
} | [
"public",
"static",
"boolean",
"recoverWeight",
"(",
"ProviderInfo",
"providerInfo",
",",
"int",
"weight",
")",
"{",
"providerInfo",
".",
"setStatus",
"(",
"ProviderStatus",
".",
"RECOVERING",
")",
";",
"providerInfo",
".",
"setWeight",
"(",
"weight",
")",
";",
... | Recover weight of provider info
@param providerInfo ProviderInfo
@param weight recovered weight
@return is recover success | [
"Recover",
"weight",
"of",
"provider",
"info"
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/fault-tolerance/src/main/java/com/alipay/sofa/rpc/client/aft/ProviderInfoWeightManager.java#L36-L40 |
lucee/Lucee | core/src/main/java/lucee/runtime/op/Caster.java | Caster.toShort | public static Short toShort(Object o, Short defaultValue) {
"""
cast a Object to a Byte Object(reference type)
@param o Object to cast
@param defaultValue
@return casted Byte Object
"""
if (o instanceof Short) return (Short) o;
if (defaultValue != null) return Short.valueOf(toShortValue(o, defaultValue.... | java | public static Short toShort(Object o, Short defaultValue) {
if (o instanceof Short) return (Short) o;
if (defaultValue != null) return Short.valueOf(toShortValue(o, defaultValue.shortValue()));
short res = toShortValue(o, Short.MIN_VALUE);
if (res == Short.MIN_VALUE) return defaultValue;
return Short.valueOf(res);... | [
"public",
"static",
"Short",
"toShort",
"(",
"Object",
"o",
",",
"Short",
"defaultValue",
")",
"{",
"if",
"(",
"o",
"instanceof",
"Short",
")",
"return",
"(",
"Short",
")",
"o",
";",
"if",
"(",
"defaultValue",
"!=",
"null",
")",
"return",
"Short",
".",... | cast a Object to a Byte Object(reference type)
@param o Object to cast
@param defaultValue
@return casted Byte Object | [
"cast",
"a",
"Object",
"to",
"a",
"Byte",
"Object",
"(",
"reference",
"type",
")"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L1849-L1855 |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.openapi_fat/fat/src/com/ibm/ws/microprofile/openapi/fat/utils/OpenAPIConnection.java | OpenAPIConnection.openAPIUIConnection | public static OpenAPIConnection openAPIUIConnection(LibertyServer server, boolean secure) {
"""
creates default connection for OpenAPI UI endpoint
@param server - server to connect to
@param secure - if true connection uses HTTPS
@return
"""
return new OpenAPIConnection(server, OPEN_API_UI).secure... | java | public static OpenAPIConnection openAPIUIConnection(LibertyServer server, boolean secure) {
return new OpenAPIConnection(server, OPEN_API_UI).secure(secure);
} | [
"public",
"static",
"OpenAPIConnection",
"openAPIUIConnection",
"(",
"LibertyServer",
"server",
",",
"boolean",
"secure",
")",
"{",
"return",
"new",
"OpenAPIConnection",
"(",
"server",
",",
"OPEN_API_UI",
")",
".",
"secure",
"(",
"secure",
")",
";",
"}"
] | creates default connection for OpenAPI UI endpoint
@param server - server to connect to
@param secure - if true connection uses HTTPS
@return | [
"creates",
"default",
"connection",
"for",
"OpenAPI",
"UI",
"endpoint"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi_fat/fat/src/com/ibm/ws/microprofile/openapi/fat/utils/OpenAPIConnection.java#L281-L283 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/util/CollectionUtils.java | CollectionUtils.isSubList | public static <T> boolean isSubList(List<T> l1, List<? super T> l) {
"""
Returns true iff l1 is a sublist of l (i.e., every member of l1 is in l,
and for every e1 < e2 in l1, there is an e1 < e2 occurrence in l).
"""
Iterator<? super T> it = l.iterator();
Iterator<T> it1 = l1.iterator();
while ... | java | public static <T> boolean isSubList(List<T> l1, List<? super T> l) {
Iterator<? super T> it = l.iterator();
Iterator<T> it1 = l1.iterator();
while (it1.hasNext()) {
Object o1 = it1.next();
if (!it.hasNext())
return false;
Object o = it.next();
while ((o == null && !(o... | [
"public",
"static",
"<",
"T",
">",
"boolean",
"isSubList",
"(",
"List",
"<",
"T",
">",
"l1",
",",
"List",
"<",
"?",
"super",
"T",
">",
"l",
")",
"{",
"Iterator",
"<",
"?",
"super",
"T",
">",
"it",
"=",
"l",
".",
"iterator",
"(",
")",
";",
"It... | Returns true iff l1 is a sublist of l (i.e., every member of l1 is in l,
and for every e1 < e2 in l1, there is an e1 < e2 occurrence in l). | [
"Returns",
"true",
"iff",
"l1",
"is",
"a",
"sublist",
"of",
"l",
"(",
"i",
".",
"e",
".",
"every",
"member",
"of",
"l1",
"is",
"in",
"l",
"and",
"for",
"every",
"e1",
"<",
"e2",
"in",
"l1",
"there",
"is",
"an",
"e1",
"<",
"e2",
"occurrence",
"i... | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionUtils.java#L411-L426 |
keenon/loglinear | src/main/java/com/github/keenon/loglinear/inference/CliqueTree.java | CliqueTree.marginalizeMessage | private TableFactor marginalizeMessage(TableFactor message, int[] relevant, MarginalizationMethod marginalize) {
"""
This is a key step in message passing. When we are calculating a message, we want to marginalize out all variables
not relevant to the recipient of the message. This function does that.
@param m... | java | private TableFactor marginalizeMessage(TableFactor message, int[] relevant, MarginalizationMethod marginalize) {
TableFactor result = message;
for (int i : message.neighborIndices) {
boolean contains = false;
for (int j : relevant) {
if (i == j) {
contains = true;
break;... | [
"private",
"TableFactor",
"marginalizeMessage",
"(",
"TableFactor",
"message",
",",
"int",
"[",
"]",
"relevant",
",",
"MarginalizationMethod",
"marginalize",
")",
"{",
"TableFactor",
"result",
"=",
"message",
";",
"for",
"(",
"int",
"i",
":",
"message",
".",
"... | This is a key step in message passing. When we are calculating a message, we want to marginalize out all variables
not relevant to the recipient of the message. This function does that.
@param message the message to marginalize
@param relevant the variables that are relevant
@return the marginalized message | [
"This",
"is",
"a",
"key",
"step",
"in",
"message",
"passing",
".",
"When",
"we",
"are",
"calculating",
"a",
"message",
"we",
"want",
"to",
"marginalize",
"out",
"all",
"variables",
"not",
"relevant",
"to",
"the",
"recipient",
"of",
"the",
"message",
".",
... | train | https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/inference/CliqueTree.java#L885-L909 |
sporniket/core | sporniket-core-io/src/main/java/com/sporniket/libre/io/FileTools.java | FileTools.readPropertiesToListeners | public static void readPropertiesToListeners(InputStream source, Encoding encoding, PropertiesParsingListener... listeners)
throws IOException, SyntaxErrorException {
"""
Read a file of properties and notifies all the listeners for each property.
@param source
the source input stream.
@param encoding
the ... | java | public static void readPropertiesToListeners(InputStream source, Encoding encoding, PropertiesParsingListener... listeners)
throws IOException, SyntaxErrorException
{
BufferedReader _reader = new BufferedReader(createReaderForInputStream(source, encoding));
LineByLinePropertyParser _parser = new LineByLinePrope... | [
"public",
"static",
"void",
"readPropertiesToListeners",
"(",
"InputStream",
"source",
",",
"Encoding",
"encoding",
",",
"PropertiesParsingListener",
"...",
"listeners",
")",
"throws",
"IOException",
",",
"SyntaxErrorException",
"{",
"BufferedReader",
"_reader",
"=",
"n... | Read a file of properties and notifies all the listeners for each property.
@param source
the source input stream.
@param encoding
the encoding of the file.
@param listeners
a list of any {@link PropertiesParsingListener}
@throws IOException
@throws SyntaxErrorException
@throws IOException
if there is a problem to dea... | [
"Read",
"a",
"file",
"of",
"properties",
"and",
"notifies",
"all",
"the",
"listeners",
"for",
"each",
"property",
"."
] | train | https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-io/src/main/java/com/sporniket/libre/io/FileTools.java#L368-L384 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java | DBEntitySequenceFactory.initializeLinks | void initializeLinks(DBEntity caller, String link, List<String> fields, String category, DBEntitySequenceOptions options) {
"""
Fetches first N links of the specified link type. Fetches the links of the specified entity.
Also fetches first N links of other entities to be returned by the iterators of the same cate... | java | void initializeLinks(DBEntity caller, String link, List<String> fields, String category, DBEntitySequenceOptions options) {
TableDefinition tableDef = caller.getTableDef();
LRUCache<ObjectID, LinkList> cache = getLinkCache(toIteratorCategory(tableDef.getTableName(),link, fields));
Set<ObjectID> idSet = new H... | [
"void",
"initializeLinks",
"(",
"DBEntity",
"caller",
",",
"String",
"link",
",",
"List",
"<",
"String",
">",
"fields",
",",
"String",
"category",
",",
"DBEntitySequenceOptions",
"options",
")",
"{",
"TableDefinition",
"tableDef",
"=",
"caller",
".",
"getTableDe... | Fetches first N links of the specified link type. Fetches the links of the specified entity.
Also fetches first N links of other entities to be returned by the iterators of the same category
Uses {@link #multiget_slice(List, ColumnParent, SlicePredicate)} method method with the 'slice range' parameter to perform bulk f... | [
"Fetches",
"first",
"N",
"links",
"of",
"the",
"specified",
"link",
"type",
".",
"Fetches",
"the",
"links",
"of",
"the",
"specified",
"entity",
".",
"Also",
"fetches",
"first",
"N",
"links",
"of",
"other",
"entities",
"to",
"be",
"returned",
"by",
"the",
... | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L226-L264 |
Jasig/uPortal | uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonQueryValidator.java | PersonQueryValidator.validatePersonLookup | public void validatePersonLookup(PersonQuery personQuery, MessageContext context) {
"""
Ensures all passed attributes are part of the valid query attribute set.
"""
final RequestContext requestContext = RequestContextHolder.getRequestContext();
final ExternalContext externalContext = requestCon... | java | public void validatePersonLookup(PersonQuery personQuery, MessageContext context) {
final RequestContext requestContext = RequestContextHolder.getRequestContext();
final ExternalContext externalContext = requestContext.getExternalContext();
final Set<String> queryAttributes = personLookupHelper.... | [
"public",
"void",
"validatePersonLookup",
"(",
"PersonQuery",
"personQuery",
",",
"MessageContext",
"context",
")",
"{",
"final",
"RequestContext",
"requestContext",
"=",
"RequestContextHolder",
".",
"getRequestContext",
"(",
")",
";",
"final",
"ExternalContext",
"exter... | Ensures all passed attributes are part of the valid query attribute set. | [
"Ensures",
"all",
"passed",
"attributes",
"are",
"part",
"of",
"the",
"valid",
"query",
"attribute",
"set",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/lookup/PersonQueryValidator.java#L45-L63 |
GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java | OWLValueObject.buildFromClasAndObject | private static OWLValueObject buildFromClasAndObject(OWLModel model, OWLURIClass uriClass, Object object) throws NotYetImplementedException, OWLTranslationException {
"""
Builds an instance
@param model
@param uriClass
@param object
@return
@throws NotYetImplementedException
@throws OWLTranslationException
... | java | private static OWLValueObject buildFromClasAndObject(OWLModel model, OWLURIClass uriClass, Object object) throws NotYetImplementedException, OWLTranslationException {
// if object is a primitive data type:
if (object.getClass().isPrimitive() || object instanceof String) {
return new OWLValue... | [
"private",
"static",
"OWLValueObject",
"buildFromClasAndObject",
"(",
"OWLModel",
"model",
",",
"OWLURIClass",
"uriClass",
",",
"Object",
"object",
")",
"throws",
"NotYetImplementedException",
",",
"OWLTranslationException",
"{",
"// if object is a primitive data type:",
"if"... | Builds an instance
@param model
@param uriClass
@param object
@return
@throws NotYetImplementedException
@throws OWLTranslationException | [
"Builds",
"an",
"instance"
] | train | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java#L248-L265 |
apache/predictionio-sdk-java | client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java | EventClient.userActionItemAsFuture | public FutureAPIResponse userActionItemAsFuture(String action, String uid, String iid,
Map<String, Object> properties) throws IOException {
"""
Sends a user-action-on-item request. Similar to {@link #userActionItemAsFuture(String, String,
String, Map, DateTime) #userActionItemAsFuture(String, String, String... | java | public FutureAPIResponse userActionItemAsFuture(String action, String uid, String iid,
Map<String, Object> properties) throws IOException {
return userActionItemAsFuture(action, uid, iid, properties, new DateTime());
} | [
"public",
"FutureAPIResponse",
"userActionItemAsFuture",
"(",
"String",
"action",
",",
"String",
"uid",
",",
"String",
"iid",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"throws",
"IOException",
"{",
"return",
"userActionItemAsFuture",
"(",
... | Sends a user-action-on-item request. Similar to {@link #userActionItemAsFuture(String, String,
String, Map, DateTime) #userActionItemAsFuture(String, String, String, Map<String,
Object\gt;, DateTime)} except event time is not specified and recorded as the time when the
function is called. | [
"Sends",
"a",
"user",
"-",
"action",
"-",
"on",
"-",
"item",
"request",
".",
"Similar",
"to",
"{"
] | train | https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L631-L634 |
headius/invokebinder | src/main/java/com/headius/invokebinder/Binder.java | Binder.getStatic | public MethodHandle getStatic(MethodHandles.Lookup lookup, Class<?> target, String name) throws NoSuchFieldException, IllegalAccessException {
"""
Apply the chain of transforms and bind them to a static field retrieval specified
using the end signature plus the given class and name. The field must
match the end ... | java | public MethodHandle getStatic(MethodHandles.Lookup lookup, Class<?> target, String name) throws NoSuchFieldException, IllegalAccessException {
return invoke(lookup.findStaticGetter(target, name, type().returnType()));
} | [
"public",
"MethodHandle",
"getStatic",
"(",
"MethodHandles",
".",
"Lookup",
"lookup",
",",
"Class",
"<",
"?",
">",
"target",
",",
"String",
"name",
")",
"throws",
"NoSuchFieldException",
",",
"IllegalAccessException",
"{",
"return",
"invoke",
"(",
"lookup",
".",... | Apply the chain of transforms and bind them to a static field retrieval specified
using the end signature plus the given class and name. The field must
match the end signature's return value and the end signature must take
no arguments.
If the final handle's type does not exactly match the initial type for
this Binder... | [
"Apply",
"the",
"chain",
"of",
"transforms",
"and",
"bind",
"them",
"to",
"a",
"static",
"field",
"retrieval",
"specified",
"using",
"the",
"end",
"signature",
"plus",
"the",
"given",
"class",
"and",
"name",
".",
"The",
"field",
"must",
"match",
"the",
"en... | train | https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1431-L1433 |
moleculer-java/moleculer-java | src/main/java/services/moleculer/ServiceBroker.java | ServiceBroker.getAction | public Action getAction(String actionName, String nodeID) {
"""
Returns an action by name and nodeID.
@param actionName
name of the action (in "service.action" syntax, eg.
"math.add")
@param nodeID
node identifier where the service is located
@return local or remote action container
"""
return serv... | java | public Action getAction(String actionName, String nodeID) {
return serviceRegistry.getAction(actionName, nodeID);
} | [
"public",
"Action",
"getAction",
"(",
"String",
"actionName",
",",
"String",
"nodeID",
")",
"{",
"return",
"serviceRegistry",
".",
"getAction",
"(",
"actionName",
",",
"nodeID",
")",
";",
"}"
] | Returns an action by name and nodeID.
@param actionName
name of the action (in "service.action" syntax, eg.
"math.add")
@param nodeID
node identifier where the service is located
@return local or remote action container | [
"Returns",
"an",
"action",
"by",
"name",
"and",
"nodeID",
"."
] | train | https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/ServiceBroker.java#L702-L704 |
netty/netty | codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java | Http2Exception.streamError | public static Http2Exception streamError(int id, Http2Error error, Throwable cause,
String fmt, Object... args) {
"""
Use if an error which can be isolated to a single stream has occurred. If the {@code id} is not
{@link Http2CodecUtil#CONNECTION_STREAM_ID} then a {@link Http2Exception.StreamExceptio... | java | public static Http2Exception streamError(int id, Http2Error error, Throwable cause,
String fmt, Object... args) {
return CONNECTION_STREAM_ID == id ?
Http2Exception.connectionError(error, cause, fmt, args) :
new StreamException(id, error, String.format(fmt, args),... | [
"public",
"static",
"Http2Exception",
"streamError",
"(",
"int",
"id",
",",
"Http2Error",
"error",
",",
"Throwable",
"cause",
",",
"String",
"fmt",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"CONNECTION_STREAM_ID",
"==",
"id",
"?",
"Http2Exception",
"."... | Use if an error which can be isolated to a single stream has occurred. If the {@code id} is not
{@link Http2CodecUtil#CONNECTION_STREAM_ID} then a {@link Http2Exception.StreamException} will be returned.
Otherwise the error is considered a connection error and a {@link Http2Exception} is returned.
@param id The stream... | [
"Use",
"if",
"an",
"error",
"which",
"can",
"be",
"isolated",
"to",
"a",
"single",
"stream",
"has",
"occurred",
".",
"If",
"the",
"{"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java#L145-L150 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/ForkOperatorUtils.java | ForkOperatorUtils.getPathForBranch | public static String getPathForBranch(State state, String path, int numBranches, int branchId) {
"""
Get a new path with the given branch name as a sub directory.
@param numBranches number of branches (non-negative)
@param branchId branch id (non-negative)
@return a new path
"""
Preconditions.check... | java | public static String getPathForBranch(State state, String path, int numBranches, int branchId) {
Preconditions.checkNotNull(state);
Preconditions.checkNotNull(path);
Preconditions.checkArgument(numBranches >= 0, "The number of branches is expected to be non-negative");
Preconditions.checkArgument(branch... | [
"public",
"static",
"String",
"getPathForBranch",
"(",
"State",
"state",
",",
"String",
"path",
",",
"int",
"numBranches",
",",
"int",
"branchId",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"state",
")",
";",
"Preconditions",
".",
"checkNotNull",
"("... | Get a new path with the given branch name as a sub directory.
@param numBranches number of branches (non-negative)
@param branchId branch id (non-negative)
@return a new path | [
"Get",
"a",
"new",
"path",
"with",
"the",
"given",
"branch",
"name",
"as",
"a",
"sub",
"directory",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ForkOperatorUtils.java#L92-L102 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java | OrientedBox3f.setCenter | @Override
public void setCenter(double cx, double cy, double cz) {
"""
Set the center.
@param cx the center x.
@param cy the center y.
@param cz the center z.
"""
this.center.set(cx, cy, cz);
} | java | @Override
public void setCenter(double cx, double cy, double cz) {
this.center.set(cx, cy, cz);
} | [
"@",
"Override",
"public",
"void",
"setCenter",
"(",
"double",
"cx",
",",
"double",
"cy",
",",
"double",
"cz",
")",
"{",
"this",
".",
"center",
".",
"set",
"(",
"cx",
",",
"cy",
",",
"cz",
")",
";",
"}"
] | Set the center.
@param cx the center x.
@param cy the center y.
@param cz the center z. | [
"Set",
"the",
"center",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java#L207-L210 |
super-csv/super-csv | super-csv/src/main/java/org/supercsv/cellprocessor/ParseBool.java | ParseBool.checkPreconditions | private static void checkPreconditions(final String trueValue, final String falseValue) {
"""
Checks the preconditions for constructing a new ParseBool processor.
@param trueValue
the String which represents true
@param falseValue
the String which represents false
@throws NullPointerException
if trueValue ... | java | private static void checkPreconditions(final String trueValue, final String falseValue) {
if( trueValue == null ) {
throw new NullPointerException("trueValue should not be null");
}
if( falseValue == null ) {
throw new NullPointerException("falseValue should not be null");
}
} | [
"private",
"static",
"void",
"checkPreconditions",
"(",
"final",
"String",
"trueValue",
",",
"final",
"String",
"falseValue",
")",
"{",
"if",
"(",
"trueValue",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"trueValue should not be null\"",
... | Checks the preconditions for constructing a new ParseBool processor.
@param trueValue
the String which represents true
@param falseValue
the String which represents false
@throws NullPointerException
if trueValue or falseValue is null | [
"Checks",
"the",
"preconditions",
"for",
"constructing",
"a",
"new",
"ParseBool",
"processor",
"."
] | train | https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/ParseBool.java#L283-L290 |
dkpro/dkpro-argumentation | dkpro-argumentation-misc/src/main/java/org/dkpro/argumentation/misc/uima/JCasUtil2.java | JCasUtil2.isFirstCoveredToken | public static boolean isFirstCoveredToken(final Token token, final Annotation annotation) {
"""
Returns whether the given token is the first token covered by the given annotation.
@param token the token
@param annotation the annotation
@return whether the token is the first covered token
"""
... | java | public static boolean isFirstCoveredToken(final Token token, final Annotation annotation)
{
final JCas jCas = getJCas(annotation);
final List<Token> coveredTokens = JCasUtil.selectCovered(jCas, Token.class, annotation);
if (coveredTokens.isEmpty()) {
return false;
}
... | [
"public",
"static",
"boolean",
"isFirstCoveredToken",
"(",
"final",
"Token",
"token",
",",
"final",
"Annotation",
"annotation",
")",
"{",
"final",
"JCas",
"jCas",
"=",
"getJCas",
"(",
"annotation",
")",
";",
"final",
"List",
"<",
"Token",
">",
"coveredTokens",... | Returns whether the given token is the first token covered by the given annotation.
@param token the token
@param annotation the annotation
@return whether the token is the first covered token | [
"Returns",
"whether",
"the",
"given",
"token",
"is",
"the",
"first",
"token",
"covered",
"by",
"the",
"given",
"annotation",
"."
] | train | https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-misc/src/main/java/org/dkpro/argumentation/misc/uima/JCasUtil2.java#L236-L248 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.getCertificate | public CertificateBundle getCertificate(String vaultBaseUrl, String certificateName, String certificateVersion) {
"""
Gets information about a certificate.
Gets information about a specific certificate. This operation requires the certificates/get permission.
@param vaultBaseUrl The vault name, for example htt... | java | public CertificateBundle getCertificate(String vaultBaseUrl, String certificateName, String certificateVersion) {
return getCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certificateVersion).toBlocking().single().body();
} | [
"public",
"CertificateBundle",
"getCertificate",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"String",
"certificateVersion",
")",
"{",
"return",
"getCertificateWithServiceResponseAsync",
"(",
"vaultBaseUrl",
",",
"certificateName",
",",
"certificat... | Gets information about a certificate.
Gets information about a specific certificate. This operation requires the certificates/get permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param certificateName The name of the certificate in the given vault.
@param certificateVersion... | [
"Gets",
"information",
"about",
"a",
"certificate",
".",
"Gets",
"information",
"about",
"a",
"specific",
"certificate",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",
"get",
"permission",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7546-L7548 |
hsiafan/apk-parser | src/main/java/net/dongliu/apk/parser/AbstractApkFile.java | AbstractApkFile.getIconFile | @Deprecated
public Icon getIconFile() throws IOException {
"""
Get the default apk icon file.
@deprecated use {@link #getAllIcons()}
"""
ApkMeta apkMeta = getApkMeta();
String iconPath = apkMeta.getIcon();
if (iconPath == null) {
return null;
}
return ... | java | @Deprecated
public Icon getIconFile() throws IOException {
ApkMeta apkMeta = getApkMeta();
String iconPath = apkMeta.getIcon();
if (iconPath == null) {
return null;
}
return new Icon(iconPath, Densities.DEFAULT, getFileData(iconPath));
} | [
"@",
"Deprecated",
"public",
"Icon",
"getIconFile",
"(",
")",
"throws",
"IOException",
"{",
"ApkMeta",
"apkMeta",
"=",
"getApkMeta",
"(",
")",
";",
"String",
"iconPath",
"=",
"apkMeta",
".",
"getIcon",
"(",
")",
";",
"if",
"(",
"iconPath",
"==",
"null",
... | Get the default apk icon file.
@deprecated use {@link #getAllIcons()} | [
"Get",
"the",
"default",
"apk",
"icon",
"file",
"."
] | train | https://github.com/hsiafan/apk-parser/blob/8993ddd52017b37b8f2e784ae0a15417d9ede932/src/main/java/net/dongliu/apk/parser/AbstractApkFile.java#L295-L303 |
kiswanij/jk-util | src/main/java/com/jk/util/thread/JKThreadLocal.java | JKThreadLocal.setValue | public static void setValue(final String name, final Object attribute) {
"""
Sets the value.
@param name the name
@param attribute the attribute
"""
JKThreadLocal.get().put(name, attribute);
} | java | public static void setValue(final String name, final Object attribute) {
JKThreadLocal.get().put(name, attribute);
} | [
"public",
"static",
"void",
"setValue",
"(",
"final",
"String",
"name",
",",
"final",
"Object",
"attribute",
")",
"{",
"JKThreadLocal",
".",
"get",
"(",
")",
".",
"put",
"(",
"name",
",",
"attribute",
")",
";",
"}"
] | Sets the value.
@param name the name
@param attribute the attribute | [
"Sets",
"the",
"value",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/thread/JKThreadLocal.java#L106-L108 |
looly/hutool | hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelReader.java | ExcelReader.read | public <T> List<T> read(int headerRowIndex, int startRowIndex, Class<T> beanType) {
"""
读取Excel为Bean的列表
@param <T> Bean类型
@param headerRowIndex 标题所在行,如果标题行在读取的内容行中间,这行做为数据将忽略,,从0开始计数
@param startRowIndex 起始行(包含,从0开始计数)
@param beanType 每行对应Bean的类型
@return Map的列表
@since 4.0.1
"""
return read(headerRow... | java | public <T> List<T> read(int headerRowIndex, int startRowIndex, Class<T> beanType) {
return read(headerRowIndex, startRowIndex, Integer.MAX_VALUE, beanType);
} | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"read",
"(",
"int",
"headerRowIndex",
",",
"int",
"startRowIndex",
",",
"Class",
"<",
"T",
">",
"beanType",
")",
"{",
"return",
"read",
"(",
"headerRowIndex",
",",
"startRowIndex",
",",
"Integer",
".",
"M... | 读取Excel为Bean的列表
@param <T> Bean类型
@param headerRowIndex 标题所在行,如果标题行在读取的内容行中间,这行做为数据将忽略,,从0开始计数
@param startRowIndex 起始行(包含,从0开始计数)
@param beanType 每行对应Bean的类型
@return Map的列表
@since 4.0.1 | [
"读取Excel为Bean的列表"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelReader.java#L334-L336 |
finmath/finmath-lib | src/main/java6/net/finmath/marketdata/model/curves/ForwardCurve.java | ForwardCurve.createForwardCurveFromForwards | public static ForwardCurve createForwardCurveFromForwards(String name, double[] times, double[] givenForwards, double paymentOffset) {
"""
Create a forward curve from given times and given forwards.
@param name The name of this curve.
@param times A vector of given time points.
@param givenForwards A vector o... | java | public static ForwardCurve createForwardCurveFromForwards(String name, double[] times, double[] givenForwards, double paymentOffset) {
ForwardCurve forwardCurve = new ForwardCurve(name, paymentOffset, InterpolationEntityForward.FORWARD, null);
for(int timeIndex=0; timeIndex<times.length;timeIndex++) {
double fi... | [
"public",
"static",
"ForwardCurve",
"createForwardCurveFromForwards",
"(",
"String",
"name",
",",
"double",
"[",
"]",
"times",
",",
"double",
"[",
"]",
"givenForwards",
",",
"double",
"paymentOffset",
")",
"{",
"ForwardCurve",
"forwardCurve",
"=",
"new",
"ForwardC... | Create a forward curve from given times and given forwards.
@param name The name of this curve.
@param times A vector of given time points.
@param givenForwards A vector of given forwards (corresponding to the given time points).
@param paymentOffset The maturity of the underlying index modeled by this curve.
@return ... | [
"Create",
"a",
"forward",
"curve",
"from",
"given",
"times",
"and",
"given",
"forwards",
"."
] | train | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/ForwardCurve.java#L227-L237 |
before/uadetector | modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/UpdateOperationWithCacheFileTask.java | UpdateOperationWithCacheFileTask.isNewerData | protected static boolean isNewerData(@Nonnull final Data older, @Nonnull final Data newer) {
"""
Checks that {@code older} {@link Data} has a lower version number than the {@code newer} one.
@param older
possibly older {@code Data}
@param newer
possibly newer {@code Data}
@return {@code true} if the {@code ... | java | protected static boolean isNewerData(@Nonnull final Data older, @Nonnull final Data newer) {
return newer.getVersion().compareTo(older.getVersion()) > 0;
} | [
"protected",
"static",
"boolean",
"isNewerData",
"(",
"@",
"Nonnull",
"final",
"Data",
"older",
",",
"@",
"Nonnull",
"final",
"Data",
"newer",
")",
"{",
"return",
"newer",
".",
"getVersion",
"(",
")",
".",
"compareTo",
"(",
"older",
".",
"getVersion",
"(",... | Checks that {@code older} {@link Data} has a lower version number than the {@code newer} one.
@param older
possibly older {@code Data}
@param newer
possibly newer {@code Data}
@return {@code true} if the {@code newer} Data is really newer, otherwise {@code false} | [
"Checks",
"that",
"{",
"@code",
"older",
"}",
"{",
"@link",
"Data",
"}",
"has",
"a",
"lower",
"version",
"number",
"than",
"the",
"{",
"@code",
"newer",
"}",
"one",
"."
] | train | https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/UpdateOperationWithCacheFileTask.java#L115-L117 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/geom/MorphShape.java | MorphShape.setFrame | private void setFrame(int a, int b, float offset) {
"""
Set the frame to be represented
@param a The index of the first shape
@param b The index of the second shape
@param offset The offset between the two shapes to represent
"""
current = (Shape) shapes.get(a);
next = (Shape) shapes.get(b);
this... | java | private void setFrame(int a, int b, float offset) {
current = (Shape) shapes.get(a);
next = (Shape) shapes.get(b);
this.offset = offset;
pointsDirty = true;
} | [
"private",
"void",
"setFrame",
"(",
"int",
"a",
",",
"int",
"b",
",",
"float",
"offset",
")",
"{",
"current",
"=",
"(",
"Shape",
")",
"shapes",
".",
"get",
"(",
"a",
")",
";",
"next",
"=",
"(",
"Shape",
")",
"shapes",
".",
"get",
"(",
"b",
")",... | Set the frame to be represented
@param a The index of the first shape
@param b The index of the second shape
@param offset The offset between the two shapes to represent | [
"Set",
"the",
"frame",
"to",
"be",
"represented"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/geom/MorphShape.java#L159-L164 |
apache/flink | flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java | Configuration.getInt | public int getInt(String name, int defaultValue) {
"""
Get the value of the <code>name</code> property as an <code>int</code>.
If no such property exists, the provided default value is returned,
or if the specified value is not a valid <code>int</code>,
then an error is thrown.
@param name property name.
... | java | public int getInt(String name, int defaultValue) {
String valueString = getTrimmed(name);
if (valueString == null)
return defaultValue;
String hexString = getHexDigits(valueString);
if (hexString != null) {
return Integer.parseInt(hexString, 16);
}
return Integer.parseInt(valueString);
} | [
"public",
"int",
"getInt",
"(",
"String",
"name",
",",
"int",
"defaultValue",
")",
"{",
"String",
"valueString",
"=",
"getTrimmed",
"(",
"name",
")",
";",
"if",
"(",
"valueString",
"==",
"null",
")",
"return",
"defaultValue",
";",
"String",
"hexString",
"=... | Get the value of the <code>name</code> property as an <code>int</code>.
If no such property exists, the provided default value is returned,
or if the specified value is not a valid <code>int</code>,
then an error is thrown.
@param name property name.
@param defaultValue default value.
@throws NumberFormatException wh... | [
"Get",
"the",
"value",
"of",
"the",
"<code",
">",
"name<",
"/",
"code",
">",
"property",
"as",
"an",
"<code",
">",
"int<",
"/",
"code",
">",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1353-L1362 |
line/armeria | core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java | InetAddressPredicates.ofExact | public static Predicate<InetAddress> ofExact(String address) {
"""
Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} equals to
the specified {@code address}.
@param address the expected IP address string, e.g. {@code 10.0.0.1}
"""
requireNonNull(address, "addre... | java | public static Predicate<InetAddress> ofExact(String address) {
requireNonNull(address, "address");
try {
final InetAddress inetAddress = InetAddress.getByName(address);
return ofExact(inetAddress);
} catch (UnknownHostException e) {
throw new IllegalArgumentEx... | [
"public",
"static",
"Predicate",
"<",
"InetAddress",
">",
"ofExact",
"(",
"String",
"address",
")",
"{",
"requireNonNull",
"(",
"address",
",",
"\"address\"",
")",
";",
"try",
"{",
"final",
"InetAddress",
"inetAddress",
"=",
"InetAddress",
".",
"getByName",
"(... | Returns a {@link Predicate} which returns {@code true} if the given {@link InetAddress} equals to
the specified {@code address}.
@param address the expected IP address string, e.g. {@code 10.0.0.1} | [
"Returns",
"a",
"{",
"@link",
"Predicate",
"}",
"which",
"returns",
"{",
"@code",
"true",
"}",
"if",
"the",
"given",
"{",
"@link",
"InetAddress",
"}",
"equals",
"to",
"the",
"specified",
"{",
"@code",
"address",
"}",
"."
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/InetAddressPredicates.java#L84-L92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.