repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.chooseAlternations | private String chooseAlternations(final String expression) {
StrBuilder sb = new StrBuilder(expression);
int i = 0;
// Loop until an unescaped pipe symbol appears.
while (UNESCAPED_PIPE_PATTERN.matcher(sb.toString()).find()) {
for (; i < sb.length(); ++i) {
if (sb.charAt(i) == '|') {
if (sb... | java | private String chooseAlternations(final String expression) {
StrBuilder sb = new StrBuilder(expression);
int i = 0;
// Loop until an unescaped pipe symbol appears.
while (UNESCAPED_PIPE_PATTERN.matcher(sb.toString()).find()) {
for (; i < sb.length(); ++i) {
if (sb.charAt(i) == '|') {
if (sb... | [
"private",
"String",
"chooseAlternations",
"(",
"final",
"String",
"expression",
")",
"{",
"StrBuilder",
"sb",
"=",
"new",
"StrBuilder",
"(",
"expression",
")",
";",
"int",
"i",
"=",
"0",
";",
"// Loop until an unescaped pipe symbol appears.\r",
"while",
"(",
"UNE... | Resolves alternations by randomly choosing one at a time and adapting the pattern accordingly
@param expression
the pattern
@return the reduced pattern | [
"Resolves",
"alternations",
"by",
"randomly",
"choosing",
"one",
"at",
"a",
"time",
"and",
"adapting",
"the",
"pattern",
"accordingly"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L85-L140 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.negateString | public String negateString(final String input, int bad) {
int length = input.length();
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
// arrange lengths
for (int i = 0; i < lengths.length; i++) {
Range r = ranges[i];
lengths[i] = r.getMin();
length -= r.getMin();
}
... | java | public String negateString(final String input, int bad) {
int length = input.length();
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
// arrange lengths
for (int i = 0; i < lengths.length; i++) {
Range r = ranges[i];
lengths[i] = r.getMin();
length -= r.getMin();
}
... | [
"public",
"String",
"negateString",
"(",
"final",
"String",
"input",
",",
"int",
"bad",
")",
"{",
"int",
"length",
"=",
"input",
".",
"length",
"(",
")",
";",
"Range",
"[",
"]",
"ranges",
"=",
"getRanges",
"(",
")",
";",
"int",
"[",
"]",
"lengths",
... | Replaces randomly selected characters in the given string with forbidden characters according
to the given expression.
@param bad
if bad = -2 all characters are replaced, if bad = -1 1 - (all - 1) are replaced,
if bad > 0 the exact number of characters is replaced
@param input
the input string
@return input with <code... | [
"Replaces",
"randomly",
"selected",
"characters",
"in",
"the",
"given",
"string",
"with",
"forbidden",
"characters",
"according",
"to",
"the",
"given",
"expression",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L153-L214 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.getRanges | public Range[] getRanges() {
Range[] ranges = new Range[nodes.size()];
for (int i = 0; i < ranges.length; i++) {
ranges[i] = nodes.get(i).getRange();
}
return ranges;
} | java | public Range[] getRanges() {
Range[] ranges = new Range[nodes.size()];
for (int i = 0; i < ranges.length; i++) {
ranges[i] = nodes.get(i).getRange();
}
return ranges;
} | [
"public",
"Range",
"[",
"]",
"getRanges",
"(",
")",
"{",
"Range",
"[",
"]",
"ranges",
"=",
"new",
"Range",
"[",
"nodes",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ranges",
".",
"length",
";",
"i",
"++"... | As the regular expression was distributed in separate node, every node has its own range.
This method returns an array containing all range objects.
@return the separate range objects for all sub-nodes of this expression | [
"As",
"the",
"regular",
"expression",
"was",
"distributed",
"in",
"separate",
"node",
"every",
"node",
"has",
"its",
"own",
"range",
".",
"This",
"method",
"returns",
"an",
"array",
"containing",
"all",
"range",
"objects",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L232-L238 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.generate | public String generate(final int[] nodeSizes, final int bad) {
buf.setLength(0);
for (int i = 0; i < nodes.size() && i < nodeSizes.length; i++) {
buf.append(nodes.get(i).getCharacters(nodeSizes[i], bad));
}
String value = buf.toString();
buf.setLength(0);
return value;
} | java | public String generate(final int[] nodeSizes, final int bad) {
buf.setLength(0);
for (int i = 0; i < nodes.size() && i < nodeSizes.length; i++) {
buf.append(nodes.get(i).getCharacters(nodeSizes[i], bad));
}
String value = buf.toString();
buf.setLength(0);
return value;
} | [
"public",
"String",
"generate",
"(",
"final",
"int",
"[",
"]",
"nodeSizes",
",",
"final",
"int",
"bad",
")",
"{",
"buf",
".",
"setLength",
"(",
"0",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nodes",
".",
"size",
"(",
")",
"&&"... | Generates a string containing subject to the parameter value only allowed or one half of
forbidden characters.
@param nodeSizes
Array with the desire string lengths. For every node there must be only one length
@param bad
if 0, only good characters are generated, if 1, 1 - (all - 1) characters are
generated false, if ... | [
"Generates",
"a",
"string",
"containing",
"subject",
"to",
"the",
"parameter",
"value",
"only",
"allowed",
"or",
"one",
"half",
"of",
"forbidden",
"characters",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L251-L259 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.generate | public String generate(final int bad) {
int[] sizes = new int[nodes.size()];
for (int i = 0; i < sizes.length; i++) {
Range r = nodes.get(i).getRange();
sizes[i] = r.getMin() + r.getRange() / 2;
}
return generate(sizes, bad);
} | java | public String generate(final int bad) {
int[] sizes = new int[nodes.size()];
for (int i = 0; i < sizes.length; i++) {
Range r = nodes.get(i).getRange();
sizes[i] = r.getMin() + r.getRange() / 2;
}
return generate(sizes, bad);
} | [
"public",
"String",
"generate",
"(",
"final",
"int",
"bad",
")",
"{",
"int",
"[",
"]",
"sizes",
"=",
"new",
"int",
"[",
"nodes",
".",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sizes",
".",
"length",
";",
"i... | Returns a string whose length is always exactly in the middle of the allowed range
@param bad
if 0, only allowed characters are generated, if 1, 1 - (all - 1) characters are
generated false, if 2 all characters are generated false.
@return a string | [
"Returns",
"a",
"string",
"whose",
"length",
"is",
"always",
"exactly",
"in",
"the",
"middle",
"of",
"the",
"allowed",
"range"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L269-L276 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java | GeneratingExpression.generate | public String generate(int total, final int bad) {
if (total < 0) {
if (log.isDebugEnabled()) {
log.debug("Character string cannot have a negative length!");
}
total = 0;
}
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
int length = 0;
// first make sure every s... | java | public String generate(int total, final int bad) {
if (total < 0) {
if (log.isDebugEnabled()) {
log.debug("Character string cannot have a negative length!");
}
total = 0;
}
Range[] ranges = getRanges();
int[] lengths = new int[ranges.length];
int length = 0;
// first make sure every s... | [
"public",
"String",
"generate",
"(",
"int",
"total",
",",
"final",
"int",
"bad",
")",
"{",
"if",
"(",
"total",
"<",
"0",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Character string cannot have a ... | Generates a string with the given length. Thereby the mandatory length will be reached first
and then the separate areas are filled with the remaining characters randlomly. | [
"Generates",
"a",
"string",
"with",
"the",
"given",
"length",
".",
"Thereby",
"the",
"mandatory",
"length",
"will",
"be",
"reached",
"first",
"and",
"then",
"the",
"separate",
"areas",
"are",
"filled",
"with",
"the",
"remaining",
"characters",
"randlomly",
"."... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/util/GeneratingExpression.java#L282-L326 | train |
spotify/ssh-agent-proxy | src/main/java/com/spotify/sshagentproxy/AgentReplyHeaders.java | AgentReplyHeaders.intFromSubArray | private static int intFromSubArray(final byte[] bytes, final int from, final int to) {
final byte[] subBytes = Arrays.copyOfRange(bytes, from, to);
final ByteBuffer wrap = ByteBuffer.wrap(subBytes);
return wrap.getInt();
} | java | private static int intFromSubArray(final byte[] bytes, final int from, final int to) {
final byte[] subBytes = Arrays.copyOfRange(bytes, from, to);
final ByteBuffer wrap = ByteBuffer.wrap(subBytes);
return wrap.getInt();
} | [
"private",
"static",
"int",
"intFromSubArray",
"(",
"final",
"byte",
"[",
"]",
"bytes",
",",
"final",
"int",
"from",
",",
"final",
"int",
"to",
")",
"{",
"final",
"byte",
"[",
"]",
"subBytes",
"=",
"Arrays",
".",
"copyOfRange",
"(",
"bytes",
",",
"from... | Take a slice of an array of bytes and interpret it as an int.
@param bytes Array of bytes
@param from Start index in the array
@param to End index in the array
@return int | [
"Take",
"a",
"slice",
"of",
"an",
"array",
"of",
"bytes",
"and",
"interpret",
"it",
"as",
"an",
"int",
"."
] | b678792750c0157bd5ed3fb6a18895ff95effbc4 | https://github.com/spotify/ssh-agent-proxy/blob/b678792750c0157bd5ed3fb6a18895ff95effbc4/src/main/java/com/spotify/sshagentproxy/AgentReplyHeaders.java#L83-L87 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ModuleArchiver.java | ModuleArchiver.startArchiving | void startArchiving() {
if (isArchivingDisabled()) {
return;
}
String archiveName = configuration.get(JFunkConstants.ARCHIVE_FILE);
if (StringUtils.isBlank(archiveName)) {
archiveName = String.format(DIR_PATTERN, moduleMetaData.getModuleName(), Thread.currentThread().getName(),
FORMAT.format(moduleM... | java | void startArchiving() {
if (isArchivingDisabled()) {
return;
}
String archiveName = configuration.get(JFunkConstants.ARCHIVE_FILE);
if (StringUtils.isBlank(archiveName)) {
archiveName = String.format(DIR_PATTERN, moduleMetaData.getModuleName(), Thread.currentThread().getName(),
FORMAT.format(moduleM... | [
"void",
"startArchiving",
"(",
")",
"{",
"if",
"(",
"isArchivingDisabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"String",
"archiveName",
"=",
"configuration",
".",
"get",
"(",
"JFunkConstants",
".",
"ARCHIVE_FILE",
")",
";",
"if",
"(",
"StringUtils",
".... | Starts archiving of the specified module, if archiving is enabled. | [
"Starts",
"archiving",
"of",
"the",
"specified",
"module",
"if",
"archiving",
"is",
"enabled",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ModuleArchiver.java#L122-L142 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Optional.java | Optional.initValuesImpl | @Override
public String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
// If there still is an mandatory case, a value will be generated anyway
if (ca != null || last && constraint.hasNextCase() || generator.isIgnoreOptionalConstraints()) {
... | java | @Override
public String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
// If there still is an mandatory case, a value will be generated anyway
if (ca != null || last && constraint.hasNextCase() || generator.isIgnoreOptionalConstraints()) {
... | [
"@",
"Override",
"public",
"String",
"initValuesImpl",
"(",
"final",
"FieldCase",
"ca",
")",
"{",
"if",
"(",
"ca",
"==",
"FieldCase",
".",
"NULL",
"||",
"ca",
"==",
"FieldCase",
".",
"BLANK",
")",
"{",
"return",
"null",
";",
"}",
"// If there still is an m... | Returns either null or a value. If null is returned the embedded constraint is initialized
with FieldCase.NULL. If a value is returned the embedded constraint is initialized with the
FieldCase whose value is returned. If the latest value was not not null the next value will
be generated if in the case that the embedded... | [
"Returns",
"either",
"null",
"or",
"a",
"value",
".",
"If",
"null",
"is",
"returned",
"the",
"embedded",
"constraint",
"is",
"initialized",
"with",
"FieldCase",
".",
"NULL",
".",
"If",
"a",
"value",
"is",
"returned",
"the",
"embedded",
"constraint",
"is",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/Optional.java#L100-L117 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/RegExUtil.java | RegExUtil.spacesOptional | public static String spacesOptional(final String input) {
String output;
output = input.replaceAll("\\s", "\\\\s?");
return output;
} | java | public static String spacesOptional(final String input) {
String output;
output = input.replaceAll("\\s", "\\\\s?");
return output;
} | [
"public",
"static",
"String",
"spacesOptional",
"(",
"final",
"String",
"input",
")",
"{",
"String",
"output",
";",
"output",
"=",
"input",
".",
"replaceAll",
"(",
"\"\\\\s\"",
",",
"\"\\\\\\\\s?\"",
")",
";",
"return",
"output",
";",
"}"
] | Replaces a space with the regular expression \\s?
@param input
the string to modify
@return the input string with all spaces replaced by \\s? | [
"Replaces",
"a",
"space",
"with",
"the",
"regular",
"expression",
"\\\\",
"s?"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/RegExUtil.java#L85-L89 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountSettingsUrl.java | DiscountSettingsUrl.getDiscountSettingsUrl | public static MozuUrl getDiscountSettingsUrl(Integer catalogId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discountsettings/{catalogId}?responseFields={responseFields}");
formatter.formatUrl("catalogId", catalogId);
formatter.formatUrl("responseFields", respon... | java | public static MozuUrl getDiscountSettingsUrl(Integer catalogId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discountsettings/{catalogId}?responseFields={responseFields}");
formatter.formatUrl("catalogId", catalogId);
formatter.formatUrl("responseFields", respon... | [
"public",
"static",
"MozuUrl",
"getDiscountSettingsUrl",
"(",
"Integer",
"catalogId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/admin/discountsettings/{catalogId}?responseFields={responseField... | Get Resource Url for GetDiscountSettings
@param catalogId Unique identifier for a catalog.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this pa... | [
"Get",
"Resource",
"Url",
"for",
"GetDiscountSettings"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountSettingsUrl.java#L22-L28 | train |
nmdp-bioinformatics/ngs | hml/src/main/java/org/nmdp/ngs/hml/HmlReader.java | HmlReader.read | public static Hml read(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return read(reader);
}
} | java | public static Hml read(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return read(reader);
}
} | [
"public",
"static",
"Hml",
"read",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"file",
")",
")"... | Read HML from the specified file.
@param file file to read from, must not be null
@return the HML read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"HML",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/hml/src/main/java/org/nmdp/ngs/hml/HmlReader.java#L97-L102 | train |
spotify/ssh-agent-proxy | src/main/java/com/spotify/sshagentproxy/AgentInput.java | AgentInput.readSignResponse | byte[] readSignResponse() throws IOException {
// Read the first 9 bytes from the InputStream which are the SSH2_AGENT_SIGN_RESPONSE headers.
final byte[] headerBytes = readBytes(9, "SSH2_AGENT_SIGN_RESPONSE");
log.debug("Received SSH2_AGENT_SIGN_RESPONSE message from ssh-agent.");
final SignResponseHea... | java | byte[] readSignResponse() throws IOException {
// Read the first 9 bytes from the InputStream which are the SSH2_AGENT_SIGN_RESPONSE headers.
final byte[] headerBytes = readBytes(9, "SSH2_AGENT_SIGN_RESPONSE");
log.debug("Received SSH2_AGENT_SIGN_RESPONSE message from ssh-agent.");
final SignResponseHea... | [
"byte",
"[",
"]",
"readSignResponse",
"(",
")",
"throws",
"IOException",
"{",
"// Read the first 9 bytes from the InputStream which are the SSH2_AGENT_SIGN_RESPONSE headers.",
"final",
"byte",
"[",
"]",
"headerBytes",
"=",
"readBytes",
"(",
"9",
",",
"\"SSH2_AGENT_SIGN_RESPON... | Return an array of bytes from the ssh-agent representing data signed by a private SSH key.
@return An array of signed bytes. | [
"Return",
"an",
"array",
"of",
"bytes",
"from",
"the",
"ssh",
"-",
"agent",
"representing",
"data",
"signed",
"by",
"a",
"private",
"SSH",
"key",
"."
] | b678792750c0157bd5ed3fb6a18895ff95effbc4 | https://github.com/spotify/ssh-agent-proxy/blob/b678792750c0157bd5ed3fb6a18895ff95effbc4/src/main/java/com/spotify/sshagentproxy/AgentInput.java#L105-L124 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/settings/general/TaxableTerritoryUrl.java | TaxableTerritoryUrl.getTaxableTerritoriesUrl | public static MozuUrl getTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getTaxableTerritoriesUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/settings/general/taxableterritories\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
... | Get Resource Url for GetTaxableTerritories
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetTaxableTerritories"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/settings/general/TaxableTerritoryUrl.java#L20-L24 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/settings/general/TaxableTerritoryUrl.java | TaxableTerritoryUrl.updateTaxableTerritoriesUrl | public static MozuUrl updateTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl updateTaxableTerritoriesUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/settings/general/taxableterritories");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"updateTaxableTerritoriesUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/settings/general/taxableterritories\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl... | Get Resource Url for UpdateTaxableTerritories
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"UpdateTaxableTerritories"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/settings/general/TaxableTerritoryUrl.java#L42-L46 | train |
nmdp-bioinformatics/ngs | variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfRecordParser.java | VcfRecordParser.records | public static Iterable<VcfRecord> records(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getRecords();
} | java | public static Iterable<VcfRecord> records(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getRecords();
} | [
"public",
"static",
"Iterable",
"<",
"VcfRecord",
">",
"records",
"(",
"final",
"Readable",
"readable",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"readable",
")",
";",
"ParseListener",
"parseListener",
"=",
"new",
"ParseListener",
"(",
")",
";",
... | Read zero or more VCF records from the specified readable.
@param readable readable to read from, must not be null
@return zero or more VCF records read from the specified readable
@throws IOException if an I/O error occurs | [
"Read",
"zero",
"or",
"more",
"VCF",
"records",
"from",
"the",
"specified",
"readable",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfRecordParser.java#L55-L60 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.createModel | public Constraint createModel(final MathRandom random, final Element element) {
if (element == null) {
return null;
}
Class<? extends Constraint> classObject = null;
Constraint object = null;
try {
classObject = getClassObject(element);
Constructor<? extends Constraint> constructor = getConst... | java | public Constraint createModel(final MathRandom random, final Element element) {
if (element == null) {
return null;
}
Class<? extends Constraint> classObject = null;
Constraint object = null;
try {
classObject = getClassObject(element);
Constructor<? extends Constraint> constructor = getConst... | [
"public",
"Constraint",
"createModel",
"(",
"final",
"MathRandom",
"random",
",",
"final",
"Element",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Class",
"<",
"?",
"extends",
"Constraint",
">",
"classObje... | Generates an instance based on the data in the given object. The object's class will be
determined by the class attribute of the element. IF the element contains an id attribute the
generated instance is stored in a map using this id as key. | [
"Generates",
"an",
"instance",
"based",
"on",
"the",
"data",
"in",
"the",
"given",
"object",
".",
"The",
"object",
"s",
"class",
"will",
"be",
"determined",
"by",
"the",
"class",
"attribute",
"of",
"the",
"element",
".",
"IF",
"the",
"element",
"contains",... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L62-L79 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.getModel | public Constraint getModel(final Element element) throws IdNotFoundException {
Attribute attr = element.getAttribute(XMLTags.ID);
if (attr == null) {
throw new IdNotFoundException(null);
}
Constraint c = null;
final String id = attr.getValue();
try {
c = getModel(id);
} catch (IdNotFoundExc... | java | public Constraint getModel(final Element element) throws IdNotFoundException {
Attribute attr = element.getAttribute(XMLTags.ID);
if (attr == null) {
throw new IdNotFoundException(null);
}
Constraint c = null;
final String id = attr.getValue();
try {
c = getModel(id);
} catch (IdNotFoundExc... | [
"public",
"Constraint",
"getModel",
"(",
"final",
"Element",
"element",
")",
"throws",
"IdNotFoundException",
"{",
"Attribute",
"attr",
"=",
"element",
".",
"getAttribute",
"(",
"XMLTags",
".",
"ID",
")",
";",
"if",
"(",
"attr",
"==",
"null",
")",
"{",
"th... | Returns the constraint to the associated id attribute value of the passed element. To achieve
this the id attribute of the passed element is searched first. If there is none an
IdNotFoundException will be thrown. Then the constraint stored under the respective key is
returned from the internal table. If this constraint... | [
"Returns",
"the",
"constraint",
"to",
"the",
"associated",
"id",
"attribute",
"value",
"of",
"the",
"passed",
"element",
".",
"To",
"achieve",
"this",
"the",
"id",
"attribute",
"of",
"the",
"passed",
"element",
"is",
"searched",
"first",
".",
"If",
"there",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L91-L108 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.getModel | public Constraint getModel(final String id) throws IdNotFoundException {
Constraint e = map.get(id);
if (e == null) {
throw new IdNotFoundException(id);
}
return e;
} | java | public Constraint getModel(final String id) throws IdNotFoundException {
Constraint e = map.get(id);
if (e == null) {
throw new IdNotFoundException(id);
}
return e;
} | [
"public",
"Constraint",
"getModel",
"(",
"final",
"String",
"id",
")",
"throws",
"IdNotFoundException",
"{",
"Constraint",
"e",
"=",
"map",
".",
"get",
"(",
"id",
")",
";",
"if",
"(",
"e",
"==",
"null",
")",
"{",
"throw",
"new",
"IdNotFoundException",
"(... | Returns the object in the map with the key id | [
"Returns",
"the",
"object",
"in",
"the",
"map",
"with",
"the",
"key",
"id"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L113-L119 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.getClassObject | private Class<? extends Constraint> getClassObject(final Element element) throws ClassNotFoundException {
String className = element.getAttributeValue(XMLTags.CLASS);
className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className;
return Class.forName(className).asSubc... | java | private Class<? extends Constraint> getClassObject(final Element element) throws ClassNotFoundException {
String className = element.getAttributeValue(XMLTags.CLASS);
className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className;
return Class.forName(className).asSubc... | [
"private",
"Class",
"<",
"?",
"extends",
"Constraint",
">",
"getClassObject",
"(",
"final",
"Element",
"element",
")",
"throws",
"ClassNotFoundException",
"{",
"String",
"className",
"=",
"element",
".",
"getAttributeValue",
"(",
"XMLTags",
".",
"CLASS",
")",
";... | This method returns the class object of which a new instance shall be generated. To achieve
this the class attribute of the passed element will be used to determine the class name | [
"This",
"method",
"returns",
"the",
"class",
"object",
"of",
"which",
"a",
"new",
"instance",
"shall",
"be",
"generated",
".",
"To",
"achieve",
"this",
"the",
"class",
"attribute",
"of",
"the",
"passed",
"element",
"will",
"be",
"used",
"to",
"determine",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L132-L137 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.getConstructor | private Constructor<? extends Constraint> getConstructor(final Class<? extends Constraint> classObject) throws NoSuchMethodException {
return classObject.getConstructor(new Class[] { MathRandom.class, Element.class, Generator.class });
} | java | private Constructor<? extends Constraint> getConstructor(final Class<? extends Constraint> classObject) throws NoSuchMethodException {
return classObject.getConstructor(new Class[] { MathRandom.class, Element.class, Generator.class });
} | [
"private",
"Constructor",
"<",
"?",
"extends",
"Constraint",
">",
"getConstructor",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Constraint",
">",
"classObject",
")",
"throws",
"NoSuchMethodException",
"{",
"return",
"classObject",
".",
"getConstructor",
"(",
"new... | Searches for the matching constraint constructor with the parameter types MathRandom, Element
and Generator. | [
"Searches",
"for",
"the",
"matching",
"constraint",
"constructor",
"with",
"the",
"parameter",
"types",
"MathRandom",
"Element",
"and",
"Generator",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L143-L145 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.getObject | private Constraint getObject(final MathRandom random, final Element element, final Constructor<? extends Constraint> constructor)
throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
LOG.debug("Creating constraint: " + element.getAttributes());
Constrain... | java | private Constraint getObject(final MathRandom random, final Element element, final Constructor<? extends Constraint> constructor)
throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
LOG.debug("Creating constraint: " + element.getAttributes());
Constrain... | [
"private",
"Constraint",
"getObject",
"(",
"final",
"MathRandom",
"random",
",",
"final",
"Element",
"element",
",",
"final",
"Constructor",
"<",
"?",
"extends",
"Constraint",
">",
"constructor",
")",
"throws",
"IllegalArgumentException",
",",
"InstantiationException"... | Generates a new constraint instance using the given constructor, the element and the
generateor callback as parameters. | [
"Generates",
"a",
"new",
"constraint",
"instance",
"using",
"the",
"given",
"constructor",
"the",
"element",
"and",
"the",
"generateor",
"callback",
"as",
"parameters",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L151-L157 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.putToCache | private void putToCache(final Element element, final Constraint object) {
String id = element.getAttributeValue(XMLTags.ID);
if (id != null && id.length() > 0) {
Constraint old = putToCache(id, object);
if (old != null) {
LOG.warn("The id=" + id + " for object of type=" + old.getClass().getName()
... | java | private void putToCache(final Element element, final Constraint object) {
String id = element.getAttributeValue(XMLTags.ID);
if (id != null && id.length() > 0) {
Constraint old = putToCache(id, object);
if (old != null) {
LOG.warn("The id=" + id + " for object of type=" + old.getClass().getName()
... | [
"private",
"void",
"putToCache",
"(",
"final",
"Element",
"element",
",",
"final",
"Constraint",
"object",
")",
"{",
"String",
"id",
"=",
"element",
".",
"getAttributeValue",
"(",
"XMLTags",
".",
"ID",
")",
";",
"if",
"(",
"id",
"!=",
"null",
"&&",
"id",... | If the element has an attribute with name id this attribute's value will be used as key to
store the just generated object in a map. The object can in this case also be retrieved using
this id.
@see #getModel(String) | [
"If",
"the",
"element",
"has",
"an",
"attribute",
"with",
"name",
"id",
"this",
"attribute",
"s",
"value",
"will",
"be",
"used",
"as",
"key",
"to",
"store",
"the",
"just",
"generated",
"object",
"in",
"a",
"map",
".",
"The",
"object",
"can",
"in",
"thi... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L166-L175 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java | ConstraintFactory.putToCache | private Constraint putToCache(final String id, final Constraint object) {
Constraint c = this.map.put(id, object);
if (c instanceof DummyConstraint) {
((DummyConstraint) c).constraint = object;
return null;
}
return c;
} | java | private Constraint putToCache(final String id, final Constraint object) {
Constraint c = this.map.put(id, object);
if (c instanceof DummyConstraint) {
((DummyConstraint) c).constraint = object;
return null;
}
return c;
} | [
"private",
"Constraint",
"putToCache",
"(",
"final",
"String",
"id",
",",
"final",
"Constraint",
"object",
")",
"{",
"Constraint",
"c",
"=",
"this",
".",
"map",
".",
"put",
"(",
"id",
",",
"object",
")",
";",
"if",
"(",
"c",
"instanceof",
"DummyConstrain... | Puts the given constraint object into the cache using the key id. If an existing
DummyConstraint object is found in the table, the reference will be set to the constraint and
the constraint will not be put into the table. | [
"Puts",
"the",
"given",
"constraint",
"object",
"into",
"the",
"cache",
"using",
"the",
"key",
"id",
".",
"If",
"an",
"existing",
"DummyConstraint",
"object",
"is",
"found",
"in",
"the",
"table",
"the",
"reference",
"will",
"be",
"set",
"to",
"the",
"const... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L182-L189 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readAnalysis | public static Analysis readAnalysis(final Reader reader) throws IOException {
checkNotNull(reader);
try {
JAXBContext context = JAXBContext.newInstance(Analysis.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
SchemaFactory schemaFactory = SchemaFacto... | java | public static Analysis readAnalysis(final Reader reader) throws IOException {
checkNotNull(reader);
try {
JAXBContext context = JAXBContext.newInstance(Analysis.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
SchemaFactory schemaFactory = SchemaFacto... | [
"public",
"static",
"Analysis",
"readAnalysis",
"(",
"final",
"Reader",
"reader",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"reader",
")",
";",
"try",
"{",
"JAXBContext",
"context",
"=",
"JAXBContext",
".",
"newInstance",
"(",
"Analysis",
".",
"c... | Read an analysis from the specified reader.
@param reader reader, must not be null
@return an analysis read from the specified reader
@throws IOException if an I/O error occurs | [
"Read",
"an",
"analysis",
"from",
"the",
"specified",
"reader",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L73-L88 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readAnalysis | public static Analysis readAnalysis(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readAnalysis(reader);
}
} | java | public static Analysis readAnalysis(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readAnalysis(reader);
}
} | [
"public",
"static",
"Analysis",
"readAnalysis",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"file",... | Read an analysis from the specified file.
@param file file, must not be null
@return an analysis read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"an",
"analysis",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L97-L102 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readAnalysis | public static Analysis readAnalysis(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readAnalysis(reader);
}
} | java | public static Analysis readAnalysis(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readAnalysis(reader);
}
} | [
"public",
"static",
"Analysis",
"readAnalysis",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",
"... | Read an analysis from the specified URL.
@param url URL, must not be null
@return an analysis read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"an",
"analysis",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L111-L116 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readAnalysis | public static Analysis readAnalysis(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readAnalysis(reader);
}
} | java | public static Analysis readAnalysis(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readAnalysis(reader);
}
} | [
"public",
"static",
"Analysis",
"readAnalysis",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStr... | Read an analysis from the specified input stream.
@param inputStream input stream, must not be null
@return an analysis read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"an",
"analysis",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L125-L130 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readExperiment | public static Experiment readExperiment(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readExperiment(reader);
}
} | java | public static Experiment readExperiment(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readExperiment(reader);
}
} | [
"public",
"static",
"Experiment",
"readExperiment",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"fi... | Read an experiment from the specified file.
@param file file, must not be null
@return an experiment read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"an",
"experiment",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L164-L169 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readExperiment | public static Experiment readExperiment(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readExperiment(reader);
}
} | java | public static Experiment readExperiment(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readExperiment(reader);
}
} | [
"public",
"static",
"Experiment",
"readExperiment",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",... | Read an experiment from the specified URL.
@param url URL, must not be null
@return an experiment read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"an",
"experiment",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L178-L183 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readExperiment | public static Experiment readExperiment(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readExperiment(reader);
}
} | java | public static Experiment readExperiment(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readExperiment(reader);
}
} | [
"public",
"static",
"Experiment",
"readExperiment",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"Inpu... | Read an experiment from the specified input stream.
@param inputStream input stream, must not be null
@return an experiment read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"an",
"experiment",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L192-L197 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readRunSet | public static RunSet readRunSet(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readRunSet(reader);
}
} | java | public static RunSet readRunSet(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readRunSet(reader);
}
} | [
"public",
"static",
"RunSet",
"readRunSet",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"file",
"... | Read a run set from the specified file.
@param file file, must not be null
@return a run set read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"a",
"run",
"set",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L231-L236 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readRunSet | public static RunSet readRunSet(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readRunSet(reader);
}
} | java | public static RunSet readRunSet(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readRunSet(reader);
}
} | [
"public",
"static",
"RunSet",
"readRunSet",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",
".",
... | Read a run set from the specified URL.
@param url URL, must not be null
@return a run set read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"a",
"run",
"set",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L245-L250 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readRunSet | public static RunSet readRunSet(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readRunSet(reader);
}
} | java | public static RunSet readRunSet(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readRunSet(reader);
}
} | [
"public",
"static",
"RunSet",
"readRunSet",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamR... | Read a run set from the specified input stream.
@param inputStream input stream, must not be null
@return a run set read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"a",
"run",
"set",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L259-L264 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSample | public static Sample readSample(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSample(reader);
}
} | java | public static Sample readSample(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSample(reader);
}
} | [
"public",
"static",
"Sample",
"readSample",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"file",
"... | Read a sample from the specified file.
@param file file, must not be null
@return a sample read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"a",
"sample",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L298-L303 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSample | public static Sample readSample(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSample(reader);
}
} | java | public static Sample readSample(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSample(reader);
}
} | [
"public",
"static",
"Sample",
"readSample",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",
".",
... | Read a sample from the specified URL.
@param url URL, must not be null
@return a sample read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"a",
"sample",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L312-L317 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSample | public static Sample readSample(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSample(reader);
}
} | java | public static Sample readSample(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSample(reader);
}
} | [
"public",
"static",
"Sample",
"readSample",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamR... | Read a sample from the specified input stream.
@param inputStream input stream, must not be null
@return a sample read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"a",
"sample",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L326-L331 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readStudy | public static Study readStudy(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readStudy(reader);
}
} | java | public static Study readStudy(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readStudy(reader);
}
} | [
"public",
"static",
"Study",
"readStudy",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"file",
")"... | Read a study from the specified file.
@param file file, must not be null
@return a study read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"a",
"study",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L365-L370 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readStudy | public static Study readStudy(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readStudy(reader);
}
} | java | public static Study readStudy(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readStudy(reader);
}
} | [
"public",
"static",
"Study",
"readStudy",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",
".",
... | Read a study from the specified URL.
@param url URL, must not be null
@return a study read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"a",
"study",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L379-L384 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readStudy | public static Study readStudy(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readStudy(reader);
}
} | java | public static Study readStudy(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readStudy(reader);
}
} | [
"public",
"static",
"Study",
"readStudy",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamRea... | Read a study from the specified input stream.
@param inputStream input stream, must not be null
@return a study read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"a",
"study",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L393-L398 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSubmission | public static Submission readSubmission(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSubmission(reader);
}
} | java | public static Submission readSubmission(final File file) throws IOException {
checkNotNull(file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
return readSubmission(reader);
}
} | [
"public",
"static",
"Submission",
"readSubmission",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"file",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"FileReader",
"(",
"fi... | Read a submission from the specified file.
@param file file, must not be null
@return a submission read from the specified file
@throws IOException if an I/O error occurs | [
"Read",
"a",
"submission",
"from",
"the",
"specified",
"file",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L432-L437 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSubmission | public static Submission readSubmission(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSubmission(reader);
}
} | java | public static Submission readSubmission(final URL url) throws IOException {
checkNotNull(url);
try (BufferedReader reader = Resources.asCharSource(url, Charsets.UTF_8).openBufferedStream()) {
return readSubmission(reader);
}
} | [
"public",
"static",
"Submission",
"readSubmission",
"(",
"final",
"URL",
"url",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"url",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"Resources",
".",
"asCharSource",
"(",
"url",
",",
"Charsets",... | Read a submission from the specified URL.
@param url URL, must not be null
@return a submission read from the specified URL
@throws IOException if an I/O error occurs | [
"Read",
"a",
"submission",
"from",
"the",
"specified",
"URL",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L446-L451 | train |
nmdp-bioinformatics/ngs | sra/src/main/java/org/nmdp/ngs/sra/SraReader.java | SraReader.readSubmission | public static Submission readSubmission(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSubmission(reader);
}
} | java | public static Submission readSubmission(final InputStream inputStream) throws IOException {
checkNotNull(inputStream);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
return readSubmission(reader);
}
} | [
"public",
"static",
"Submission",
"readSubmission",
"(",
"final",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"inputStream",
")",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"Inpu... | Read a submission from the specified input stream.
@param inputStream input stream, must not be null
@return a submission read from the specified input stream
@throws IOException if an I/O error occurs | [
"Read",
"a",
"submission",
"from",
"the",
"specified",
"input",
"stream",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/sra/src/main/java/org/nmdp/ngs/sra/SraReader.java#L460-L465 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/BaseScope.java | BaseScope.getScopedObject | protected <T> T getScopedObject(final Key<T> key, final Provider<T> unscoped, final Map<Key<?>, Object> scopeMap) {
// ok, because we know what we'd put in before
@SuppressWarnings("unchecked")
T value = (T) scopeMap.get(key);
if (value == null) {
/*
* no cache instance present, so we use the one we get ... | java | protected <T> T getScopedObject(final Key<T> key, final Provider<T> unscoped, final Map<Key<?>, Object> scopeMap) {
// ok, because we know what we'd put in before
@SuppressWarnings("unchecked")
T value = (T) scopeMap.get(key);
if (value == null) {
/*
* no cache instance present, so we use the one we get ... | [
"protected",
"<",
"T",
">",
"T",
"getScopedObject",
"(",
"final",
"Key",
"<",
"T",
">",
"key",
",",
"final",
"Provider",
"<",
"T",
">",
"unscoped",
",",
"final",
"Map",
"<",
"Key",
"<",
"?",
">",
",",
"Object",
">",
"scopeMap",
")",
"{",
"// ok, be... | If already present, gets the object for the specified key from the scope map. Otherwise it is
retrieved from the unscoped provider and stored in the scope map.
@param key
the key
@param unscoped
the unscoped provider for creating the object
@param scopeMap
the scope map
@return the correctly scoped object | [
"If",
"already",
"present",
"gets",
"the",
"object",
"for",
"the",
"specified",
"key",
"from",
"the",
"scope",
"map",
".",
"Otherwise",
"it",
"is",
"retrieved",
"from",
"the",
"unscoped",
"provider",
"and",
"stored",
"in",
"the",
"scope",
"map",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/BaseScope.java#L67-L80 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAuthTicketUrl.java | CustomerAuthTicketUrl.refreshUserAuthTicketUrl | public static MozuUrl refreshUserAuthTicketUrl(String refreshToken, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/authtickets/refresh?refreshToken={refreshToken}&responseFields={responseFields}");
formatter.formatUrl("refreshToken", refreshToken);
formatter.format... | java | public static MozuUrl refreshUserAuthTicketUrl(String refreshToken, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/authtickets/refresh?refreshToken={refreshToken}&responseFields={responseFields}");
formatter.formatUrl("refreshToken", refreshToken);
formatter.format... | [
"public",
"static",
"MozuUrl",
"refreshUserAuthTicketUrl",
"(",
"String",
"refreshToken",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/authtickets/refresh?refreshToken={refreshToken}&responseFie... | Get Resource Url for RefreshUserAuthTicket
@param refreshToken Alphanumeric string used for access tokens. This token refreshes access for accounts by generating a new developer or application account authentication ticket after an access token expires.
@param responseFields Filtering syntax appended to an API call to ... | [
"Get",
"Resource",
"Url",
"for",
"RefreshUserAuthTicket"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAuthTicketUrl.java#L46-L52 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/adminuser/TenantAdminUserAuthTicketUrl.java | TenantAdminUserAuthTicketUrl.createUserAuthTicketUrl | public static MozuUrl createUserAuthTicketUrl(String responseFields, Integer tenantId)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/tenants?tenantId={tenantId}&responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("te... | java | public static MozuUrl createUserAuthTicketUrl(String responseFields, Integer tenantId)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/tenants?tenantId={tenantId}&responseFields={responseFields}");
formatter.formatUrl("responseFields", responseFields);
formatter.formatUrl("te... | [
"public",
"static",
"MozuUrl",
"createUserAuthTicketUrl",
"(",
"String",
"responseFields",
",",
"Integer",
"tenantId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/adminuser/authtickets/tenants?tenantId={tenantId}&responseFields={respon... | Get Resource Url for CreateUserAuthTicket
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
@param tenantId Uniq... | [
"Get",
"Resource",
"Url",
"for",
"CreateUserAuthTicket"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/adminuser/TenantAdminUserAuthTicketUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/adminuser/TenantAdminUserAuthTicketUrl.java | TenantAdminUserAuthTicketUrl.deleteUserAuthTicketUrl | public static MozuUrl deleteUserAuthTicketUrl(String refreshToken)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/?refreshToken={refreshToken}");
formatter.formatUrl("refreshToken", refreshToken);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;... | java | public static MozuUrl deleteUserAuthTicketUrl(String refreshToken)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/adminuser/authtickets/?refreshToken={refreshToken}");
formatter.formatUrl("refreshToken", refreshToken);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.HOME_POD) ;... | [
"public",
"static",
"MozuUrl",
"deleteUserAuthTicketUrl",
"(",
"String",
"refreshToken",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/adminuser/authtickets/?refreshToken={refreshToken}\"",
")",
";",
"formatter",
".",
"formatUrl",
... | Get Resource Url for DeleteUserAuthTicket
@param refreshToken Alphanumeric string used for access tokens. This token refreshes access for accounts by generating a new developer or application account authentication ticket after an access token expires.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteUserAuthTicket"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/adminuser/TenantAdminUserAuthTicketUrl.java#L49-L54 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/BedReader.java | BedReader.read | public static Iterable<BedRecord> read(final Readable readable) throws IOException {
checkNotNull(readable);
Collect collect = new Collect();
stream(readable, collect);
return collect.records();
} | java | public static Iterable<BedRecord> read(final Readable readable) throws IOException {
checkNotNull(readable);
Collect collect = new Collect();
stream(readable, collect);
return collect.records();
} | [
"public",
"static",
"Iterable",
"<",
"BedRecord",
">",
"read",
"(",
"final",
"Readable",
"readable",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"readable",
")",
";",
"Collect",
"collect",
"=",
"new",
"Collect",
"(",
")",
";",
"stream",
"(",
"r... | Read zero or more BED records from the specified readable.
@param readable to read from, must not be null
@return zero or more BED records read from the specified readable
@throws IOException if an I/O error occurs | [
"Read",
"zero",
"or",
"more",
"BED",
"records",
"from",
"the",
"specified",
"readable",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/BedReader.java#L55-L60 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/BedReader.java | BedReader.stream | public static void stream(final Readable readable, final BedListener listener) throws IOException {
checkNotNull(readable);
checkNotNull(listener);
BedLineProcessor lineProcessor = new BedLineProcessor(listener);
CharStreams.readLines(readable, lineProcessor);
} | java | public static void stream(final Readable readable, final BedListener listener) throws IOException {
checkNotNull(readable);
checkNotNull(listener);
BedLineProcessor lineProcessor = new BedLineProcessor(listener);
CharStreams.readLines(readable, lineProcessor);
} | [
"public",
"static",
"void",
"stream",
"(",
"final",
"Readable",
"readable",
",",
"final",
"BedListener",
"listener",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"readable",
")",
";",
"checkNotNull",
"(",
"listener",
")",
";",
"BedLineProcessor",
"lin... | Stream zero or more BED records from the specified readable.
@param readable readable to stream from, must not be null
@param listener event based listener callback, must not be null
@throws IOException if an I/O error occurs | [
"Stream",
"zero",
"or",
"more",
"BED",
"records",
"from",
"the",
"specified",
"readable",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/BedReader.java#L69-L75 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java | ExtendedFile.copy | public void copy(final File source) throws IOException {
if (!source.exists()) {
LOG.warn("File " + source + " cannot be copied as it does not exist");
return;
}
if (equals(source)) {
LOG.info("Skipping copying of " + source + " as it matches the target");
return;
}
File target = isDirect... | java | public void copy(final File source) throws IOException {
if (!source.exists()) {
LOG.warn("File " + source + " cannot be copied as it does not exist");
return;
}
if (equals(source)) {
LOG.info("Skipping copying of " + source + " as it matches the target");
return;
}
File target = isDirect... | [
"public",
"void",
"copy",
"(",
"final",
"File",
"source",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"source",
".",
"exists",
"(",
")",
")",
"{",
"LOG",
".",
"warn",
"(",
"\"File \"",
"+",
"source",
"+",
"\" cannot be copied as it does not exist\"",
... | Copies the specified file. If this object is a directory the file will be copied to this
directory. If this object represents a file it will be overwritten with the specified file. | [
"Copies",
"the",
"specified",
"file",
".",
"If",
"this",
"object",
"is",
"a",
"directory",
"the",
"file",
"will",
"be",
"copied",
"to",
"this",
"directory",
".",
"If",
"this",
"object",
"represents",
"a",
"file",
"it",
"will",
"be",
"overwritten",
"with",
... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java#L101-L112 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java | ExtendedFile.zip | public void zip(final File zipFile) throws IOException {
File[] files = listFiles();
if (files.length == 0) {
return;
}
LOG.info("Creating zip file " + zipFile + " from directory " + this);
ZipOutputStream zipOut = null;
try {
zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
fo... | java | public void zip(final File zipFile) throws IOException {
File[] files = listFiles();
if (files.length == 0) {
return;
}
LOG.info("Creating zip file " + zipFile + " from directory " + this);
ZipOutputStream zipOut = null;
try {
zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
fo... | [
"public",
"void",
"zip",
"(",
"final",
"File",
"zipFile",
")",
"throws",
"IOException",
"{",
"File",
"[",
"]",
"files",
"=",
"listFiles",
"(",
")",
";",
"if",
"(",
"files",
".",
"length",
"==",
"0",
")",
"{",
"return",
";",
"}",
"LOG",
".",
"info",... | Zips all included objects into the specified file.
@param zipFile
the zip file to be created | [
"Zips",
"all",
"included",
"objects",
"into",
"the",
"specified",
"file",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedFile.java#L135-L150 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/config/ModulesLoader.java | ModulesLoader.loadModulesFromProperties | public static Module loadModulesFromProperties(final Module jFunkModule, final String propertiesFile)
throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {
final List<Module> modules = Lists.newArrayList();
LOG.debug("Using jfunk.props.file=" + propertiesFile);
Propertie... | java | public static Module loadModulesFromProperties(final Module jFunkModule, final String propertiesFile)
throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {
final List<Module> modules = Lists.newArrayList();
LOG.debug("Using jfunk.props.file=" + propertiesFile);
Propertie... | [
"public",
"static",
"Module",
"loadModulesFromProperties",
"(",
"final",
"Module",
"jFunkModule",
",",
"final",
"String",
"propertiesFile",
")",
"throws",
"ClassNotFoundException",
",",
"InstantiationException",
",",
"IllegalAccessException",
",",
"IOException",
"{",
"fin... | Loads Guice modules whose class names are specified as properties. All properties starting
with "module." are considered to have a fully qualified class name representing a Guice
module. The modules are combined and override thespecified jFunkModule.
@param propertiesFile
The properties file
@return the combined modul... | [
"Loads",
"Guice",
"modules",
"whose",
"class",
"names",
"are",
"specified",
"as",
"properties",
".",
"All",
"properties",
"starting",
"with",
"module",
".",
"are",
"considered",
"to",
"have",
"a",
"fully",
"qualified",
"class",
"name",
"representing",
"a",
"Gu... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/config/ModulesLoader.java#L60-L78 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java | Range.merge | public Range merge(final Range otherRange) {
int newMin = Math.min(otherRange.min, min);
int newMax = Math.max(otherRange.max, max);
return new Range(newMin, newMax);
} | java | public Range merge(final Range otherRange) {
int newMin = Math.min(otherRange.min, min);
int newMax = Math.max(otherRange.max, max);
return new Range(newMin, newMax);
} | [
"public",
"Range",
"merge",
"(",
"final",
"Range",
"otherRange",
")",
"{",
"int",
"newMin",
"=",
"Math",
".",
"min",
"(",
"otherRange",
".",
"min",
",",
"min",
")",
";",
"int",
"newMax",
"=",
"Math",
".",
"max",
"(",
"otherRange",
".",
"max",
",",
... | Merges this range with the passed range. Returns a range object whose min and max values
match the minimum or maximum of the two values, respectively. So the range returned contains
this and the passed range in any case.
@return a range object with [min(this.min,other.min), max(this.max, other.max)] | [
"Merges",
"this",
"range",
"with",
"the",
"passed",
"range",
".",
"Returns",
"a",
"range",
"object",
"whose",
"min",
"and",
"max",
"values",
"match",
"the",
"minimum",
"or",
"maximum",
"of",
"the",
"two",
"values",
"respectively",
".",
"So",
"the",
"range"... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java#L57-L61 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java | Range.sumBoundaries | public Range sumBoundaries(final Range plus) {
int newMin = min + plus.min;
int newMax = max == RANGE_MAX || plus.max == RANGE_MAX ? RANGE_MAX : max + plus.max;
return new Range(newMin, newMax);
} | java | public Range sumBoundaries(final Range plus) {
int newMin = min + plus.min;
int newMax = max == RANGE_MAX || plus.max == RANGE_MAX ? RANGE_MAX : max + plus.max;
return new Range(newMin, newMax);
} | [
"public",
"Range",
"sumBoundaries",
"(",
"final",
"Range",
"plus",
")",
"{",
"int",
"newMin",
"=",
"min",
"+",
"plus",
".",
"min",
";",
"int",
"newMax",
"=",
"max",
"==",
"RANGE_MAX",
"||",
"plus",
".",
"max",
"==",
"RANGE_MAX",
"?",
"RANGE_MAX",
":",
... | Sums the boundaries of this range with the ones of the passed. So the returned range has
this.min + plus.min as minimum and this.max + plus.max as maximum respectively.
@return a range object whose boundaries are summed | [
"Sums",
"the",
"boundaries",
"of",
"this",
"range",
"with",
"the",
"ones",
"of",
"the",
"passed",
".",
"So",
"the",
"returned",
"range",
"has",
"this",
".",
"min",
"+",
"plus",
".",
"min",
"as",
"minimum",
"and",
"this",
".",
"max",
"+",
"plus",
".",... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java#L69-L73 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java | Range.intersect | public Range intersect(final Range outerRange) throws RangeException {
if (min > outerRange.max) {
throw new IllegalArgumentException("range maximum must be greater or equal than " + min);
}
if (max < outerRange.min) {
throw new IllegalArgumentException("range minimum must be less or equal than " + max... | java | public Range intersect(final Range outerRange) throws RangeException {
if (min > outerRange.max) {
throw new IllegalArgumentException("range maximum must be greater or equal than " + min);
}
if (max < outerRange.min) {
throw new IllegalArgumentException("range minimum must be less or equal than " + max... | [
"public",
"Range",
"intersect",
"(",
"final",
"Range",
"outerRange",
")",
"throws",
"RangeException",
"{",
"if",
"(",
"min",
">",
"outerRange",
".",
"max",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"range maximum must be greater or equal than \"",
... | Intersects this range with the one passed. This means that the returned rand contains the
maximum of both minima as minimum and the minimum of the two maxima as maximum.
@throws RangeException
if the given range has not intersection with this range | [
"Intersects",
"this",
"range",
"with",
"the",
"one",
"passed",
".",
"This",
"means",
"that",
"the",
"returned",
"rand",
"contains",
"the",
"maximum",
"of",
"both",
"minima",
"as",
"minimum",
"and",
"the",
"minimum",
"of",
"the",
"two",
"maxima",
"as",
"max... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java#L82-L92 | train |
mgm-tp/jfunk | jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java | Range.listValues | public List<Integer> listValues() {
ArrayList<Integer> list = new ArrayList<Integer>(getRange());
for (int i = getMin(); i <= getMax(); i++) {
list.add(i);
}
return list;
} | java | public List<Integer> listValues() {
ArrayList<Integer> list = new ArrayList<Integer>(getRange());
for (int i = getMin(); i <= getMax(); i++) {
list.add(i);
}
return list;
} | [
"public",
"List",
"<",
"Integer",
">",
"listValues",
"(",
")",
"{",
"ArrayList",
"<",
"Integer",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
"getRange",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"getMin",
"(",
")",
";",
... | Returns a list of all allowed values within the range
@return a list of all allowed values within the range | [
"Returns",
"a",
"list",
"of",
"all",
"allowed",
"values",
"within",
"the",
"range"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/Range.java#L141-L147 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java | CartItemUrl.getCartItemUrl | public static MozuUrl getCartItemUrl(String cartItemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.formatUrl("responseFields", responseFields);
... | java | public static MozuUrl getCartItemUrl(String cartItemId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.formatUrl("responseFields", responseFields);
... | [
"public",
"static",
"MozuUrl",
"getCartItemUrl",
"(",
"String",
"cartItemId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/carts/current/items/{cartItemId}?responseFields={responseFields}\"",
")",
";... | Get Resource Url for GetCartItem
@param cartItemId Identifier of the cart item to delete.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this par... | [
"Get",
"Resource",
"Url",
"for",
"GetCartItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java | CartItemUrl.addItemsToCartUrl | public static MozuUrl addItemsToCartUrl(Boolean throwErrorOnInvalidItems)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/bulkitems?throwErrorOnInvalidItems={throwErrorOnInvalidItems}");
formatter.formatUrl("throwErrorOnInvalidItems", throwErrorOnInvalidItems);
return new MozuUrl(for... | java | public static MozuUrl addItemsToCartUrl(Boolean throwErrorOnInvalidItems)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/bulkitems?throwErrorOnInvalidItems={throwErrorOnInvalidItems}");
formatter.formatUrl("throwErrorOnInvalidItems", throwErrorOnInvalidItems);
return new MozuUrl(for... | [
"public",
"static",
"MozuUrl",
"addItemsToCartUrl",
"(",
"Boolean",
"throwErrorOnInvalidItems",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/carts/current/bulkitems?throwErrorOnInvalidItems={throwErrorOnInvalidItems}\"",
")",
";",
"form... | Get Resource Url for AddItemsToCart
@param throwErrorOnInvalidItems
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"AddItemsToCart"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L47-L52 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java | CartItemUrl.updateCartItemQuantityUrl | public static MozuUrl updateCartItemQuantityUrl(String cartItemId, Integer quantity, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}/{quantity}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.format... | java | public static MozuUrl updateCartItemQuantityUrl(String cartItemId, Integer quantity, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}/{quantity}?responseFields={responseFields}");
formatter.formatUrl("cartItemId", cartItemId);
formatter.format... | [
"public",
"static",
"MozuUrl",
"updateCartItemQuantityUrl",
"(",
"String",
"cartItemId",
",",
"Integer",
"quantity",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/carts/current/items/{cartItemId}/{q... | Get Resource Url for UpdateCartItemQuantity
@param cartItemId Identifier of the cart item to delete.
@param quantity The number of cart items in the shopper's active cart.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parame... | [
"Get",
"Resource",
"Url",
"for",
"UpdateCartItemQuantity"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L73-L80 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java | CartItemUrl.removeAllCartItemsUrl | public static MozuUrl removeAllCartItemsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl removeAllCartItemsUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"removeAllCartItemsUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/carts/current/items\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")",
","... | Get Resource Url for RemoveAllCartItems
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveAllCartItems"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L100-L104 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java | CartItemUrl.deleteCartItemUrl | public static MozuUrl deleteCartItemUrl(String cartItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}");
formatter.formatUrl("cartItemId", cartItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteCartItemUrl(String cartItemId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/items/{cartItemId}");
formatter.formatUrl("cartItemId", cartItemId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteCartItemUrl",
"(",
"String",
"cartItemId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/carts/current/items/{cartItemId}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"cartItemId\"",
... | Get Resource Url for DeleteCartItem
@param cartItemId Identifier of the cart item to delete.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteCartItem"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/carts/CartItemUrl.java#L111-L116 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/CheckoutUrl.java | CheckoutUrl.processDigitalWalletUrl | public static MozuUrl processDigitalWalletUrl(String checkoutId, String digitalWalletType, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/digitalWallet/{digitalWalletType}?responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
... | java | public static MozuUrl processDigitalWalletUrl(String checkoutId, String digitalWalletType, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/digitalWallet/{digitalWalletType}?responseFields={responseFields}");
formatter.formatUrl("checkoutId", checkoutId);
... | [
"public",
"static",
"MozuUrl",
"processDigitalWalletUrl",
"(",
"String",
"checkoutId",
",",
"String",
"digitalWalletType",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/checkouts/{checkoutId}/digita... | Get Resource Url for ProcessDigitalWallet
@param checkoutId The unique identifier of the checkout.
@param digitalWalletType The type of digital wallet.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be u... | [
"Get",
"Resource",
"Url",
"for",
"ProcessDigitalWallet"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/CheckoutUrl.java#L153-L160 | train |
nmdp-bioinformatics/ngs | variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfHeaderParser.java | VcfHeaderParser.header | public static VcfHeader header(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getHeader();
} | java | public static VcfHeader header(final Readable readable) throws IOException {
checkNotNull(readable);
ParseListener parseListener = new ParseListener();
VcfParser.parse(readable, parseListener);
return parseListener.getHeader();
} | [
"public",
"static",
"VcfHeader",
"header",
"(",
"final",
"Readable",
"readable",
")",
"throws",
"IOException",
"{",
"checkNotNull",
"(",
"readable",
")",
";",
"ParseListener",
"parseListener",
"=",
"new",
"ParseListener",
"(",
")",
";",
"VcfParser",
".",
"parse"... | Read the VCF header from the specified readable.
@param readable readable to read from, must not be null
@return the VCF header read from the specified readable
@throws IOException if an I/O error occurs | [
"Read",
"the",
"VCF",
"header",
"from",
"the",
"specified",
"readable",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/variant/src/main/java/org/nmdp/ngs/variant/vcf/VcfHeaderParser.java#L52-L57 | train |
mgm-tp/jfunk | jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/FieldContainer.java | FieldContainer.initValuesImpl | @Override
protected String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
return field.getString(control.getNext(ca));
} | java | @Override
protected String initValuesImpl(final FieldCase ca) {
if (ca == FieldCase.NULL || ca == FieldCase.BLANK) {
return null;
}
return field.getString(control.getNext(ca));
} | [
"@",
"Override",
"protected",
"String",
"initValuesImpl",
"(",
"final",
"FieldCase",
"ca",
")",
"{",
"if",
"(",
"ca",
"==",
"FieldCase",
".",
"NULL",
"||",
"ca",
"==",
"FieldCase",
".",
"BLANK",
")",
"{",
"return",
"null",
";",
"}",
"return",
"field",
... | Returns a string whose length and character type reflect the passed FieldCase using the
embedded field object. If FieldCase.NULL or FieldCase.BLANK is passed, the method returns
null.
@return the value just generated | [
"Returns",
"a",
"string",
"whose",
"length",
"and",
"character",
"type",
"reflect",
"the",
"passed",
"FieldCase",
"using",
"the",
"embedded",
"field",
"object",
".",
"If",
"FieldCase",
".",
"NULL",
"or",
"FieldCase",
".",
"BLANK",
"is",
"passed",
"the",
"met... | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/FieldContainer.java#L54-L60 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/TargetRuleUrl.java | TargetRuleUrl.validateTargetRuleUrl | public static MozuUrl validateTargetRuleUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/targetrules/validate");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl validateTargetRuleUrl()
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/targetrules/validate");
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"validateTargetRuleUrl",
"(",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/targetrules/validate\"",
")",
";",
"return",
"new",
"MozuUrl",
"(",
"formatter",
".",
"getResourceUrl",
"(",
")",
",... | Get Resource Url for ValidateTargetRule
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"ValidateTargetRule"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/TargetRuleUrl.java#L66-L70 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java | PointLocationFormatter.formatLatitude | public static String formatLatitude(final Latitude latitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (latitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
t... | java | public static String formatLatitude(final Latitude latitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (latitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
t... | [
"public",
"static",
"String",
"formatLatitude",
"(",
"final",
"Latitude",
"latitude",
",",
"final",
"PointLocationFormatType",
"formatType",
")",
"throws",
"FormatterException",
"{",
"if",
"(",
"latitude",
"==",
"null",
")",
"{",
"throw",
"new",
"FormatterException"... | Formats a latitude as an ISO 6709 string.
@param latitude
Latitude to format
@param formatType
Format type
@return Formatted string
@throws FormatterException
On an exception | [
"Formats",
"a",
"latitude",
"as",
"an",
"ISO",
"6709",
"string",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java#L52-L91 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java | PointLocationFormatter.formatLongitude | public static String formatLongitude(final Longitude longitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (longitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
... | java | public static String formatLongitude(final Longitude longitude,
final PointLocationFormatType formatType)
throws FormatterException
{
if (longitude == null)
{
throw new FormatterException("No point location provided");
}
if (formatType == null)
{
... | [
"public",
"static",
"String",
"formatLongitude",
"(",
"final",
"Longitude",
"longitude",
",",
"final",
"PointLocationFormatType",
"formatType",
")",
"throws",
"FormatterException",
"{",
"if",
"(",
"longitude",
"==",
"null",
")",
"{",
"throw",
"new",
"FormatterExcept... | Formats a longitude as an ISO 6709 string.
@param longitude
Longitude to format
@param formatType
Format type
@return Formatted string
@throws FormatterException
On an exception | [
"Formats",
"a",
"longitude",
"as",
"an",
"ISO",
"6709",
"string",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java#L104-L143 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java | PointLocationFormatter.formatPointLocation | public static String formatPointLocation(final PointLocation pointLocation,
final PointLocationFormatType formatType)
throws FormatterException
{
if (pointLocation == null)
{
throw new FormatterException("No point location provided");
}
if (formatTy... | java | public static String formatPointLocation(final PointLocation pointLocation,
final PointLocationFormatType formatType)
throws FormatterException
{
if (pointLocation == null)
{
throw new FormatterException("No point location provided");
}
if (formatTy... | [
"public",
"static",
"String",
"formatPointLocation",
"(",
"final",
"PointLocation",
"pointLocation",
",",
"final",
"PointLocationFormatType",
"formatType",
")",
"throws",
"FormatterException",
"{",
"if",
"(",
"pointLocation",
"==",
"null",
")",
"{",
"throw",
"new",
... | Formats a point location as an ISO 6709 or human readable string.
@param pointLocation
Point location to format
@param formatType
Format type
@return Formatted string
@throws FormatterException
On an exception | [
"Formats",
"a",
"point",
"location",
"as",
"an",
"ISO",
"6709",
"or",
"human",
"readable",
"string",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java#L156-L199 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java | PointLocationFormatter.formatISO6709WithDecimals | private static String formatISO6709WithDecimals(final PointLocation pointLocation)
{
final Latitude latitude = pointLocation.getLatitude();
final Longitude longitude = pointLocation.getLongitude();
String string = formatLatitudeWithDecimals(latitude) +
formatLongitudeWithDecimals(longi... | java | private static String formatISO6709WithDecimals(final PointLocation pointLocation)
{
final Latitude latitude = pointLocation.getLatitude();
final Longitude longitude = pointLocation.getLongitude();
String string = formatLatitudeWithDecimals(latitude) +
formatLongitudeWithDecimals(longi... | [
"private",
"static",
"String",
"formatISO6709WithDecimals",
"(",
"final",
"PointLocation",
"pointLocation",
")",
"{",
"final",
"Latitude",
"latitude",
"=",
"pointLocation",
".",
"getLatitude",
"(",
")",
";",
"final",
"Longitude",
"longitude",
"=",
"pointLocation",
"... | Formats a point location as an ISO 6709 string, using decimals.
@param pointLocation
Point location to format
@return Formatted string | [
"Formats",
"a",
"point",
"location",
"as",
"an",
"ISO",
"6709",
"string",
"using",
"decimals",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/format/PointLocationFormatter.java#L372-L383 | train |
sualeh/pointlocation6709 | src/main/java/us/fatehi/pointlocation6709/Angle.java | Angle.sexagesimalSplit | private int[] sexagesimalSplit(final double value)
{
final double absValue = Math.abs(value);
int units;
int minutes;
int seconds;
final int sign = value < 0? -1: 1;
// Calculate absolute integer units
units = (int) Math.floor(absValue);
seconds = (int) Math.round((absValue - units) ... | java | private int[] sexagesimalSplit(final double value)
{
final double absValue = Math.abs(value);
int units;
int minutes;
int seconds;
final int sign = value < 0? -1: 1;
// Calculate absolute integer units
units = (int) Math.floor(absValue);
seconds = (int) Math.round((absValue - units) ... | [
"private",
"int",
"[",
"]",
"sexagesimalSplit",
"(",
"final",
"double",
"value",
")",
"{",
"final",
"double",
"absValue",
"=",
"Math",
".",
"abs",
"(",
"value",
")",
";",
"int",
"units",
";",
"int",
"minutes",
";",
"int",
"seconds",
";",
"final",
"int"... | Splits a double value into it's sexagesimal parts. Each part has
the same sign as the provided value.
@param value
Value to split
@return Split parts | [
"Splits",
"a",
"double",
"value",
"into",
"it",
"s",
"sexagesimal",
"parts",
".",
"Each",
"part",
"has",
"the",
"same",
"sign",
"as",
"the",
"provided",
"value",
"."
] | c0c186c2518f41e3fe174920cacd5c0d082d01a0 | https://github.com/sualeh/pointlocation6709/blob/c0c186c2518f41e3fe174920cacd5c0d082d01a0/src/main/java/us/fatehi/pointlocation6709/Angle.java#L393-L425 | train |
nmdp-bioinformatics/ngs | range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java | RangeGeometries.singleton | public static <N extends Number & Comparable<? super N>> Point singleton(final N value) {
checkNotNull(value);
return Geometries.point(value.doubleValue(), 0.5d);
} | java | public static <N extends Number & Comparable<? super N>> Point singleton(final N value) {
checkNotNull(value);
return Geometries.point(value.doubleValue(), 0.5d);
} | [
"public",
"static",
"<",
"N",
"extends",
"Number",
"&",
"Comparable",
"<",
"?",
"super",
"N",
">",
">",
"Point",
"singleton",
"(",
"final",
"N",
"value",
")",
"{",
"checkNotNull",
"(",
"value",
")",
";",
"return",
"Geometries",
".",
"point",
"(",
"valu... | Create and return a new point geometry from the specified singleton value.
@param value singleton value, must not be null
@return a new point geometry from the specified singleton value | [
"Create",
"and",
"return",
"a",
"new",
"point",
"geometry",
"from",
"the",
"specified",
"singleton",
"value",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java#L66-L69 | train |
nmdp-bioinformatics/ngs | range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java | RangeGeometries.range | public static <N extends Number & Comparable<? super N>> Rectangle range(final Range<N> range) {
checkNotNull(range);
if (range.isEmpty()) {
throw new IllegalArgumentException("range must not be empty");
}
if (!range.hasLowerBound() || !range.hasUpperBound()) {
th... | java | public static <N extends Number & Comparable<? super N>> Rectangle range(final Range<N> range) {
checkNotNull(range);
if (range.isEmpty()) {
throw new IllegalArgumentException("range must not be empty");
}
if (!range.hasLowerBound() || !range.hasUpperBound()) {
th... | [
"public",
"static",
"<",
"N",
"extends",
"Number",
"&",
"Comparable",
"<",
"?",
"super",
"N",
">",
">",
"Rectangle",
"range",
"(",
"final",
"Range",
"<",
"N",
">",
"range",
")",
"{",
"checkNotNull",
"(",
"range",
")",
";",
"if",
"(",
"range",
".",
... | Create and return a new rectangle geometry from the specified range.
@param range range, must not be null, must not be empty, and must have lower and upper bounds
@return a new rectangle geometry from the specified range | [
"Create",
"and",
"return",
"a",
"new",
"rectangle",
"geometry",
"from",
"the",
"specified",
"range",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java#L129-L171 | train |
nmdp-bioinformatics/ngs | reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java | PairedEndFastqReader.isLeft | static boolean isLeft(final Fastq fastq) {
checkNotNull(fastq);
return LEFT.matcher(fastq.getDescription()).matches();
} | java | static boolean isLeft(final Fastq fastq) {
checkNotNull(fastq);
return LEFT.matcher(fastq.getDescription()).matches();
} | [
"static",
"boolean",
"isLeft",
"(",
"final",
"Fastq",
"fastq",
")",
"{",
"checkNotNull",
"(",
"fastq",
")",
";",
"return",
"LEFT",
".",
"matcher",
"(",
"fastq",
".",
"getDescription",
"(",
")",
")",
".",
"matches",
"(",
")",
";",
"}"
] | Return true if the specified fastq is the left or first read of a paired end read.
@param fastq fastq, must not be null
@return true if the specified fastq is the left or first read of a paired end read | [
"Return",
"true",
"if",
"the",
"specified",
"fastq",
"is",
"the",
"left",
"or",
"first",
"read",
"of",
"a",
"paired",
"end",
"read",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java#L302-L305 | train |
nmdp-bioinformatics/ngs | reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java | PairedEndFastqReader.isRight | static boolean isRight(final Fastq fastq) {
checkNotNull(fastq);
return RIGHT.matcher(fastq.getDescription()).matches();
} | java | static boolean isRight(final Fastq fastq) {
checkNotNull(fastq);
return RIGHT.matcher(fastq.getDescription()).matches();
} | [
"static",
"boolean",
"isRight",
"(",
"final",
"Fastq",
"fastq",
")",
"{",
"checkNotNull",
"(",
"fastq",
")",
";",
"return",
"RIGHT",
".",
"matcher",
"(",
"fastq",
".",
"getDescription",
"(",
")",
")",
".",
"matches",
"(",
")",
";",
"}"
] | Return true if the specified fastq is the right or second read of a paired end read.
@param fastq fastq, must not be null
@return true if the specified fastq is the right or second read of a paired end read | [
"Return",
"true",
"if",
"the",
"specified",
"fastq",
"is",
"the",
"right",
"or",
"second",
"read",
"of",
"a",
"paired",
"end",
"read",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java#L313-L316 | train |
nmdp-bioinformatics/ngs | reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java | PairedEndFastqReader.prefix | static String prefix(final Fastq fastq) {
checkNotNull(fastq);
Matcher m = PREFIX.matcher(fastq.getDescription());
if (!m.matches()) {
throw new PairedEndFastqReaderException("could not parse prefix from description " + fastq.getDescription());
}
return m.group(1);
... | java | static String prefix(final Fastq fastq) {
checkNotNull(fastq);
Matcher m = PREFIX.matcher(fastq.getDescription());
if (!m.matches()) {
throw new PairedEndFastqReaderException("could not parse prefix from description " + fastq.getDescription());
}
return m.group(1);
... | [
"static",
"String",
"prefix",
"(",
"final",
"Fastq",
"fastq",
")",
"{",
"checkNotNull",
"(",
"fastq",
")",
";",
"Matcher",
"m",
"=",
"PREFIX",
".",
"matcher",
"(",
"fastq",
".",
"getDescription",
"(",
")",
")",
";",
"if",
"(",
"!",
"m",
".",
"matches... | Return the prefix of the paired end read name of the specified fastq.
@param fastq fastq, must not be null
@return the prefix of the paired end read name of the specified fastq | [
"Return",
"the",
"prefix",
"of",
"the",
"paired",
"end",
"read",
"name",
"of",
"the",
"specified",
"fastq",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/reads/src/main/java/org/nmdp/ngs/reads/paired/PairedEndFastqReader.java#L324-L331 | train |
nmdp-bioinformatics/ngs | align/src/main/java/org/nmdp/ngs/align/GapPenalties.java | GapPenalties.create | public static GapPenalties create(final int match,
final int replace,
final int insert,
final int delete,
final int extend) {
return new GapPenalties((short) ma... | java | public static GapPenalties create(final int match,
final int replace,
final int insert,
final int delete,
final int extend) {
return new GapPenalties((short) ma... | [
"public",
"static",
"GapPenalties",
"create",
"(",
"final",
"int",
"match",
",",
"final",
"int",
"replace",
",",
"final",
"int",
"insert",
",",
"final",
"int",
"delete",
",",
"final",
"int",
"extend",
")",
"{",
"return",
"new",
"GapPenalties",
"(",
"(",
... | Create and return a new gap penalties with the specified penalties.
@param match match penalty
@param replace replace penalty
@param insert insert penalty
@param delete delete penalty
@param extend extend penalty
@return a new gap penalties with the specified penalties | [
"Create",
"and",
"return",
"a",
"new",
"gap",
"penalties",
"with",
"the",
"specified",
"penalties",
"."
] | 277627e4311313a80f5dc110b3185b0d7af32bd0 | https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/align/src/main/java/org/nmdp/ngs/align/GapPenalties.java#L116-L122 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PickupUrl.java | PickupUrl.getAvailablePickupFulfillmentActionsUrl | public static MozuUrl getAvailablePickupFulfillmentActionsUrl(String orderId, String pickupId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}/actions");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
return new MozuUrl(fo... | java | public static MozuUrl getAvailablePickupFulfillmentActionsUrl(String orderId, String pickupId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}/actions");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
return new MozuUrl(fo... | [
"public",
"static",
"MozuUrl",
"getAvailablePickupFulfillmentActionsUrl",
"(",
"String",
"orderId",
",",
"String",
"pickupId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/pickups/{pickupId}/actions\"",
")",
";",
... | Get Resource Url for GetAvailablePickupFulfillmentActions
@param orderId Unique identifier of the order.
@param pickupId Unique identifier of the pickup to remove.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetAvailablePickupFulfillmentActions"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PickupUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PickupUrl.java | PickupUrl.getPickupUrl | public static MozuUrl getPickupUrl(String orderId, String pickupId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
f... | java | public static MozuUrl getPickupUrl(String orderId, String pickupId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/pickups/{pickupId}?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("pickupId", pickupId);
f... | [
"public",
"static",
"MozuUrl",
"getPickupUrl",
"(",
"String",
"orderId",
",",
"String",
"pickupId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/orders/{orderId}/pickups/{pickupId}?responseFields={... | Get Resource Url for GetPickup
@param orderId Unique identifier of the order.
@param pickupId Unique identifier of the pickup to remove.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve... | [
"Get",
"Resource",
"Url",
"for",
"GetPickup"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PickupUrl.java#L37-L44 | train |
mgm-tp/jfunk | jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/MultipartPostRequest.java | MultipartPostRequest.setParameter | public void setParameter(final String name, final String filename, final InputStream is) throws IOException {
boundary();
writeName(name);
write("; filename=\"");
write(filename);
write('"');
newline();
write("Content-Type: ");
String type = URLConnection.guessContentTypeFromName(filename);
if (type =... | java | public void setParameter(final String name, final String filename, final InputStream is) throws IOException {
boundary();
writeName(name);
write("; filename=\"");
write(filename);
write('"');
newline();
write("Content-Type: ");
String type = URLConnection.guessContentTypeFromName(filename);
if (type =... | [
"public",
"void",
"setParameter",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"filename",
",",
"final",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"boundary",
"(",
")",
";",
"writeName",
"(",
"name",
")",
";",
"write",
"(",
"\"; fi... | Adds a file parameter to the request
@param name
parameter name
@param filename
the name of the file
@param is
input stream to read the contents of the file from | [
"Adds",
"a",
"file",
"parameter",
"to",
"the",
"request"
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/MultipartPostRequest.java#L115-L131 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java | TransactionUrl.getTransactionsUrl | public static MozuUrl getTransactionsUrl(Integer accountId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions");
formatter.formatUrl("accountId", accountId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl getTransactionsUrl(Integer accountId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions");
formatter.formatUrl("accountId", accountId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"getTransactionsUrl",
"(",
"Integer",
"accountId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/transactions\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"accou... | Get Resource Url for GetTransactions
@param accountId Unique identifier of the customer account.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"GetTransactions"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java#L21-L26 | train |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java | TransactionUrl.removeTransactionUrl | public static MozuUrl removeTransactionUrl(Integer accountId, String transactionId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("transactionId", transactionId);
ret... | java | public static MozuUrl removeTransactionUrl(Integer accountId, String transactionId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}");
formatter.formatUrl("accountId", accountId);
formatter.formatUrl("transactionId", transactionId);
ret... | [
"public",
"static",
"MozuUrl",
"removeTransactionUrl",
"(",
"Integer",
"accountId",
",",
"String",
"transactionId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/customer/accounts/{accountId}/transactions/{transactionId}\"",
")",
";"... | Get Resource Url for RemoveTransaction
@param accountId Unique identifier of the customer account.
@param transactionId Unique identifier of the transaction to delete.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"RemoveTransaction"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java#L48-L54 | train |
mgm-tp/jfunk | jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/SmtpClient.java | SmtpClient.send | public void send(final Message msg) throws MailException {
Transport transport = null;
try {
if (log.isDebugEnabled()) {
log.debug("Sending mail message [subject={}, recipients={}]", msg.getSubject(),
on(", ").join(msg.getAllRecipients()));
}
transport = sessionProvider.get().getTransport(... | java | public void send(final Message msg) throws MailException {
Transport transport = null;
try {
if (log.isDebugEnabled()) {
log.debug("Sending mail message [subject={}, recipients={}]", msg.getSubject(),
on(", ").join(msg.getAllRecipients()));
}
transport = sessionProvider.get().getTransport(... | [
"public",
"void",
"send",
"(",
"final",
"Message",
"msg",
")",
"throws",
"MailException",
"{",
"Transport",
"transport",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Sending mail ... | Sends the specified message.
@param msg
the message to send
@throws MailException
if an error occurred sending the message | [
"Sends",
"the",
"specified",
"message",
"."
] | 5b9fecac5778b988bb458085ded39ea9a4c7c2ae | https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/SmtpClient.java#L62-L81 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/QuoteUrl.java | QuoteUrl.getQuoteByNameUrl | public static MozuUrl getQuoteByNameUrl(Integer customerAccountId, String quoteName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/customers/{customerAccountId}/{quoteName}?responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
f... | java | public static MozuUrl getQuoteByNameUrl(Integer customerAccountId, String quoteName, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/customers/{customerAccountId}/{quoteName}?responseFields={responseFields}");
formatter.formatUrl("customerAccountId", customerAccountId);
f... | [
"public",
"static",
"MozuUrl",
"getQuoteByNameUrl",
"(",
"Integer",
"customerAccountId",
",",
"String",
"quoteName",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/quotes/customers/{customerAccountId... | Get Resource Url for GetQuoteByName
@param customerAccountId The unique identifier of the customer account for which to retrieve wish lists.
@param quoteName
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should onl... | [
"Get",
"Resource",
"Url",
"for",
"GetQuoteByName"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/QuoteUrl.java#L61-L68 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/QuoteUrl.java | QuoteUrl.deleteQuoteUrl | public static MozuUrl deleteQuoteUrl(String quoteId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}");
formatter.formatUrl("quoteId", quoteId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl deleteQuoteUrl(String quoteId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/quotes/{quoteId}");
formatter.formatUrl("quoteId", quoteId);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"deleteQuoteUrl",
"(",
"String",
"quoteId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/quotes/{quoteId}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"quoteId\"",
",",
"quoteId",
")",... | Get Resource Url for DeleteQuote
@param quoteId
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"DeleteQuote"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/QuoteUrl.java#L101-L106 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/TenantDataUrl.java | TenantDataUrl.getDBValueUrl | public static MozuUrl getDBValueUrl(String dbEntryQuery, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}?responseFields={responseFields}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
formatter.formatUrl("responseFields", responseFields);
... | java | public static MozuUrl getDBValueUrl(String dbEntryQuery, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}?responseFields={responseFields}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
formatter.formatUrl("responseFields", responseFields);
... | [
"public",
"static",
"MozuUrl",
"getDBValueUrl",
"(",
"String",
"dbEntryQuery",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/tenantdata/{dbEntryQuery}?responseFields={responseFields}\"",
")",
";",
"... | Get Resource Url for GetDBValue
@param dbEntryQuery The database entry string to create.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this para... | [
"Get",
"Resource",
"Url",
"for",
"GetDBValue"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/TenantDataUrl.java#L22-L28 | train |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/platform/TenantDataUrl.java | TenantDataUrl.createDBValueUrl | public static MozuUrl createDBValueUrl(String dbEntryQuery)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | java | public static MozuUrl createDBValueUrl(String dbEntryQuery)
{
UrlFormatter formatter = new UrlFormatter("/api/platform/tenantdata/{dbEntryQuery}");
formatter.formatUrl("dbEntryQuery", dbEntryQuery);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
} | [
"public",
"static",
"MozuUrl",
"createDBValueUrl",
"(",
"String",
"dbEntryQuery",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/platform/tenantdata/{dbEntryQuery}\"",
")",
";",
"formatter",
".",
"formatUrl",
"(",
"\"dbEntryQuery\"",
","... | Get Resource Url for CreateDBValue
@param dbEntryQuery The database entry string to create.
@return String Resource Url | [
"Get",
"Resource",
"Url",
"for",
"CreateDBValue"
] | 5beadde73601a859f845e3e2fc1077b39c8bea83 | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/TenantDataUrl.java#L35-L40 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.normalizeTagsForUpload | public static List<String> normalizeTagsForUpload(List<String> list) {
if (isNullOrEmpty(list)) {
return null;
}
List<String> tmp = new ArrayList<String>();
for (String s : list) {
if (s.contains(" ")) {
tmp.add("\"" + s + "\"");
} else... | java | public static List<String> normalizeTagsForUpload(List<String> list) {
if (isNullOrEmpty(list)) {
return null;
}
List<String> tmp = new ArrayList<String>();
for (String s : list) {
if (s.contains(" ")) {
tmp.add("\"" + s + "\"");
} else... | [
"public",
"static",
"List",
"<",
"String",
">",
"normalizeTagsForUpload",
"(",
"List",
"<",
"String",
">",
"list",
")",
"{",
"if",
"(",
"isNullOrEmpty",
"(",
"list",
")",
")",
"{",
"return",
"null",
";",
"}",
"List",
"<",
"String",
">",
"tmp",
"=",
"... | Normalize tags for uploads.
This will put quotation marks around tags that contain spaces.
@param list list of tags.
@return new list containing normalized tags. | [
"Normalize",
"tags",
"for",
"uploads",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L382-L395 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.memberTypeToMemberTypeId | public static Integer memberTypeToMemberTypeId(JinxConstants.MemberType memberType) {
if (memberType == null) {
return null;
}
Integer type;
switch (memberType) {
case narwhal:
type = 1;
break;
case member:
... | java | public static Integer memberTypeToMemberTypeId(JinxConstants.MemberType memberType) {
if (memberType == null) {
return null;
}
Integer type;
switch (memberType) {
case narwhal:
type = 1;
break;
case member:
... | [
"public",
"static",
"Integer",
"memberTypeToMemberTypeId",
"(",
"JinxConstants",
".",
"MemberType",
"memberType",
")",
"{",
"if",
"(",
"memberType",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Integer",
"type",
";",
"switch",
"(",
"memberType",
")",
... | Convert a MemberType enum to the numeric Flickr member type id.
@param memberType the enum type to convert to a numeric id.
@return numeric id corresponding to the enum value, or null if the member type parameter is invalid. | [
"Convert",
"a",
"MemberType",
"enum",
"to",
"the",
"numeric",
"Flickr",
"member",
"type",
"id",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L746-L769 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.typeIdToMemberType | public static JinxConstants.MemberType typeIdToMemberType(Integer typeId) {
if (typeId == null) {
return null;
}
JinxConstants.MemberType memberType;
switch (typeId) {
case 1:
memberType = JinxConstants.MemberType.narwhal;
break;
... | java | public static JinxConstants.MemberType typeIdToMemberType(Integer typeId) {
if (typeId == null) {
return null;
}
JinxConstants.MemberType memberType;
switch (typeId) {
case 1:
memberType = JinxConstants.MemberType.narwhal;
break;
... | [
"public",
"static",
"JinxConstants",
".",
"MemberType",
"typeIdToMemberType",
"(",
"Integer",
"typeId",
")",
"{",
"if",
"(",
"typeId",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"JinxConstants",
".",
"MemberType",
"memberType",
";",
"switch",
"(",
"... | Convert a numeric Flickr member type id to a MemberType enum value.
@param typeId the numeric member type id to convert.
@return MemberType enum value corresponding to the id, or null if the typeId is not a valid Flickr member type. | [
"Convert",
"a",
"numeric",
"Flickr",
"member",
"type",
"id",
"to",
"a",
"MemberType",
"enum",
"value",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L777-L800 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.groupPrivacyEnumToPrivacyId | public static Integer groupPrivacyEnumToPrivacyId(JinxConstants.GroupPrivacy privacy) {
if (privacy == null) {
return null;
}
Integer id;
switch (privacy) {
case group_private:
id = 1;
break;
case group_invite_only_publi... | java | public static Integer groupPrivacyEnumToPrivacyId(JinxConstants.GroupPrivacy privacy) {
if (privacy == null) {
return null;
}
Integer id;
switch (privacy) {
case group_private:
id = 1;
break;
case group_invite_only_publi... | [
"public",
"static",
"Integer",
"groupPrivacyEnumToPrivacyId",
"(",
"JinxConstants",
".",
"GroupPrivacy",
"privacy",
")",
"{",
"if",
"(",
"privacy",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Integer",
"id",
";",
"switch",
"(",
"privacy",
")",
"{",
... | Convert a GroupPrivacy enum value to the corresponding Flickr numeric identifier.
@param privacy group privacy enum to convert.
@return corresponding Flickr number id for the group privacy, or null if the parameter is invalid. | [
"Convert",
"a",
"GroupPrivacy",
"enum",
"value",
"to",
"the",
"corresponding",
"Flickr",
"numeric",
"identifier",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L808-L828 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.privacyIdToGroupPrivacyEnum | public static JinxConstants.GroupPrivacy privacyIdToGroupPrivacyEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.GroupPrivacy privacy;
switch (id) {
case 1:
privacy = JinxConstants.GroupPrivacy.group_private;
break;... | java | public static JinxConstants.GroupPrivacy privacyIdToGroupPrivacyEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.GroupPrivacy privacy;
switch (id) {
case 1:
privacy = JinxConstants.GroupPrivacy.group_private;
break;... | [
"public",
"static",
"JinxConstants",
".",
"GroupPrivacy",
"privacyIdToGroupPrivacyEnum",
"(",
"Integer",
"id",
")",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"JinxConstants",
".",
"GroupPrivacy",
"privacy",
";",
"switch",
"(",
... | Convert a Flickr group privacy numeric identifier to the corresponding GroupPrivacy enum value.
@param id Flickr group privacy id.
@return corresponding GroupPrivacy enum value, or null if the parameter is invalid. | [
"Convert",
"a",
"Flickr",
"group",
"privacy",
"numeric",
"identifier",
"to",
"the",
"corresponding",
"GroupPrivacy",
"enum",
"value",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L836-L856 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.suggestionStatusToFlickrSuggestionStatusId | public static Integer suggestionStatusToFlickrSuggestionStatusId(JinxConstants.SuggestionStatus status) {
if (status == null) {
return null;
}
Integer id;
switch (status) {
case pending:
id = 0;
break;
case approved:
... | java | public static Integer suggestionStatusToFlickrSuggestionStatusId(JinxConstants.SuggestionStatus status) {
if (status == null) {
return null;
}
Integer id;
switch (status) {
case pending:
id = 0;
break;
case approved:
... | [
"public",
"static",
"Integer",
"suggestionStatusToFlickrSuggestionStatusId",
"(",
"JinxConstants",
".",
"SuggestionStatus",
"status",
")",
"{",
"if",
"(",
"status",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Integer",
"id",
";",
"switch",
"(",
"status"... | Convert a suggestion status to the corresponding Flickr suggestion status id.
@param status the suggestion status.
@return corresponding Flickr id. | [
"Convert",
"a",
"suggestion",
"status",
"to",
"the",
"corresponding",
"Flickr",
"suggestion",
"status",
"id",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L864-L884 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/JinxUtils.java | JinxUtils.suggestionStatusIdToSuggestionStatusEnum | public static JinxConstants.SuggestionStatus suggestionStatusIdToSuggestionStatusEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.SuggestionStatus status;
switch (id) {
case 0:
status = JinxConstants.SuggestionStatus.pending;
... | java | public static JinxConstants.SuggestionStatus suggestionStatusIdToSuggestionStatusEnum(Integer id) {
if (id == null) {
return null;
}
JinxConstants.SuggestionStatus status;
switch (id) {
case 0:
status = JinxConstants.SuggestionStatus.pending;
... | [
"public",
"static",
"JinxConstants",
".",
"SuggestionStatus",
"suggestionStatusIdToSuggestionStatusEnum",
"(",
"Integer",
"id",
")",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"JinxConstants",
".",
"SuggestionStatus",
"status",
";",
... | Convert a Flickr suggestion status id to the corresponding SuggestionStatus value.
@param id the Flickr suggestion status id.
@return corresponding SuggestionStatus value. | [
"Convert",
"a",
"Flickr",
"suggestion",
"status",
"id",
"to",
"the",
"corresponding",
"SuggestionStatus",
"value",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/JinxUtils.java#L892-L912 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/PhotosetsApi.java | PhotosetsApi.getInfo | public PhotosetInfo getInfo(String photosetId) throws JinxException {
JinxUtils.validateParams(photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.photosets.getInfo");
params.put("photoset_id", photosetId);
return jinx.flickrGet(params, PhotosetInfo.class);
} | java | public PhotosetInfo getInfo(String photosetId) throws JinxException {
JinxUtils.validateParams(photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.photosets.getInfo");
params.put("photoset_id", photosetId);
return jinx.flickrGet(params, PhotosetInfo.class);
} | [
"public",
"PhotosetInfo",
"getInfo",
"(",
"String",
"photosetId",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"photosetId",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"TreeMap",
"<>",
"(",
")",... | Gets information about a photoset.
This method does not require authentication.
@param photosetId the id of the photoset to fetch information for.
@return instance of {@link net.jeremybrooks.jinx.response.photosets.PhotosetInfo} with data returned by
the getInfo method. The url is not returned, and some of the counts ... | [
"Gets",
"information",
"about",
"a",
"photoset",
".",
"This",
"method",
"does",
"not",
"require",
"authentication",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosetsApi.java#L215-L221 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/StatsApi.java | StatsApi.getCollectionDomains | public Domains getCollectionDomains(Date date, String collectionId, Integer perPage, Integer page) throws JinxException {
JinxUtils.validateParams(date);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getCollectionDomains");
params.put("date", JinxUtils.formatDateAsYMD(... | java | public Domains getCollectionDomains(Date date, String collectionId, Integer perPage, Integer page) throws JinxException {
JinxUtils.validateParams(date);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getCollectionDomains");
params.put("date", JinxUtils.formatDateAsYMD(... | [
"public",
"Domains",
"getCollectionDomains",
"(",
"Date",
"date",
",",
"String",
"collectionId",
",",
"Integer",
"perPage",
",",
"Integer",
"page",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"date",
")",
";",
"Map",
"<",
"Str... | Get a list of referring domains for a collection
Authentication
This method requires authentication with 'read' permission.
@param date stats will be returned for this date. Required.
@param collectionId id of the collection to get stats for. If not provided,
stats for all collections will be returned. Optio... | [
"Get",
"a",
"list",
"of",
"referring",
"domains",
"for",
"a",
"collection"
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/StatsApi.java#L68-L83 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/StatsApi.java | StatsApi.getPhotosetStats | public Stats getPhotosetStats(Date date, String photosetId) throws JinxException {
JinxUtils.validateParams(date, photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPhotosetStats");
params.put("date", JinxUtils.formatDateAsYMD(date));
params.put("photose... | java | public Stats getPhotosetStats(Date date, String photosetId) throws JinxException {
JinxUtils.validateParams(date, photosetId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPhotosetStats");
params.put("date", JinxUtils.formatDateAsYMD(date));
params.put("photose... | [
"public",
"Stats",
"getPhotosetStats",
"(",
"Date",
"date",
",",
"String",
"photosetId",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"date",
",",
"photosetId",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=... | Get the number of views on a photoset for a given date.
This method requires authentication with 'read' permission.
@param date stats will be returned for this date. Required.
@param photosetId id of the photoset to get stats for. Required.
@return number of views on a photoset for a given date.
@throws JinxExc... | [
"Get",
"the",
"number",
"of",
"views",
"on",
"a",
"photoset",
"for",
"a",
"given",
"date",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/StatsApi.java#L310-L317 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/StatsApi.java | StatsApi.getPopularPhotos | public Photos getPopularPhotos(Date date, JinxConstants.PopularPhotoSort sort, Integer perPage, Integer page) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPopularPhotos");
if (date != null) {
params.put("date", JinxUtils.formatDateAsYMD(dat... | java | public Photos getPopularPhotos(Date date, JinxConstants.PopularPhotoSort sort, Integer perPage, Integer page) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.stats.getPopularPhotos");
if (date != null) {
params.put("date", JinxUtils.formatDateAsYMD(dat... | [
"public",
"Photos",
"getPopularPhotos",
"(",
"Date",
"date",
",",
"JinxConstants",
".",
"PopularPhotoSort",
"sort",
",",
"Integer",
"perPage",
",",
"Integer",
"page",
")",
"throws",
"JinxException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",... | List the photos with the most views, comments or favorites
This method requires authentication with 'read' permission.
@param date stats will be returned for this date. Optional.
@param sort order in which to sort returned photos. Defaults to views. Optional.
@param perPage number of referrers to return per pag... | [
"List",
"the",
"photos",
"with",
"the",
"most",
"views",
"comments",
"or",
"favorites"
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/StatsApi.java#L427-L443 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java | UrlsApi.getGroup | public GroupUrls getGroup(String groupId) throws JinxException {
JinxUtils.validateParams(groupId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getGroup");
params.put("group_id", groupId);
return jinx.flickrGet(params, GroupUrls.class, false);
} | java | public GroupUrls getGroup(String groupId) throws JinxException {
JinxUtils.validateParams(groupId);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getGroup");
params.put("group_id", groupId);
return jinx.flickrGet(params, GroupUrls.class, false);
} | [
"public",
"GroupUrls",
"getGroup",
"(",
"String",
"groupId",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"groupId",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
... | Returns the url to a group's page.
This method does not require authentication.
@param groupId NSID of the group to fetch the url for. Required.
@return group NSID and URL.
@throws JinxException if groupId parameter is missing, or if there are any errors.
@see <a href="https://www.flickr.com/services/api/flickr.urls.... | [
"Returns",
"the",
"url",
"to",
"a",
"group",
"s",
"page",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java#L56-L62 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java | UrlsApi.getUserPhotos | public UserUrls getUserPhotos(String userId) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getUserPhotos");
if (!JinxUtils.isNullOrEmpty(userId)) {
params.put("user_id", userId);
}
return jinx.flickrGet(params, UserUrls.class);
} | java | public UserUrls getUserPhotos(String userId) throws JinxException {
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.getUserPhotos");
if (!JinxUtils.isNullOrEmpty(userId)) {
params.put("user_id", userId);
}
return jinx.flickrGet(params, UserUrls.class);
} | [
"public",
"UserUrls",
"getUserPhotos",
"(",
"String",
"userId",
")",
"throws",
"JinxException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"params",
".",
"put",
"(",
"\"method\"",
",",
"\"flickr.url... | Returns the url to a user's photos.
This method does not require authentication.
@param userId user id (NSID) of the user to fetch the url for. If omitted, the calling user is assumed. Optional.
@return user id and rl to the users photos.
@throws JinxException if there are any errors.
@see <a href="https://www.flickr... | [
"Returns",
"the",
"url",
"to",
"a",
"user",
"s",
"photos",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java#L75-L82 | train |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java | UrlsApi.lookupGallery | public GalleryInfo lookupGallery(String url) throws JinxException {
JinxUtils.validateParams(url);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.lookupGallery");
params.put("url", url);
return jinx.flickrGet(params, GalleryInfo.class);
} | java | public GalleryInfo lookupGallery(String url) throws JinxException {
JinxUtils.validateParams(url);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.urls.lookupGallery");
params.put("url", url);
return jinx.flickrGet(params, GalleryInfo.class);
} | [
"public",
"GalleryInfo",
"lookupGallery",
"(",
"String",
"url",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"url",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
... | Returns gallery info, by url.
This method does not require authentication.
@param url gallery URL to look up. Required.
@return information about the gallery.
@throws JinxException if required parameters are missing, or if there are any errors.
@see <a href="https://www.flickr.com/services/api/flickr.urls.lookupGalle... | [
"Returns",
"gallery",
"info",
"by",
"url",
"."
] | ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6 | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/UrlsApi.java#L113-L119 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.