id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
145,700 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java | PcsUtils.downloadDataToSink | public static void downloadDataToSink( CResponse response, ByteSink byteSink )
{
InputStream is = null;
ByteSinkStream bss = null;
boolean success = false;
try {
long contentLength = response.getContentLength();
if ( contentLength >= 0 ) {
// ... | java | public static void downloadDataToSink( CResponse response, ByteSink byteSink )
{
InputStream is = null;
ByteSinkStream bss = null;
boolean success = false;
try {
long contentLength = response.getContentLength();
if ( contentLength >= 0 ) {
// ... | [
"public",
"static",
"void",
"downloadDataToSink",
"(",
"CResponse",
"response",
",",
"ByteSink",
"byteSink",
")",
"{",
"InputStream",
"is",
"=",
"null",
";",
"ByteSinkStream",
"bss",
"=",
"null",
";",
"boolean",
"success",
"=",
"false",
";",
"try",
"{",
"lon... | Server has answered OK with a file to download as stream.
Open byte sink stream, and copy data from server stream to sink stream
@param response server response to read from
@param byteSink destination | [
"Server",
"has",
"answered",
"OK",
"with",
"a",
"file",
"to",
"download",
"as",
"stream",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java#L167-L212 |
145,701 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java | PcsUtils.randomString | public static String randomString( char[] values, int len )
{
Random rnd = new SecureRandom();
StringBuilder sb = new StringBuilder( len );
for ( int i = 0; i < len; i++ ) {
sb.append( values[ rnd.nextInt( values.length )] );
}
return sb.toString();
} | java | public static String randomString( char[] values, int len )
{
Random rnd = new SecureRandom();
StringBuilder sb = new StringBuilder( len );
for ( int i = 0; i < len; i++ ) {
sb.append( values[ rnd.nextInt( values.length )] );
}
return sb.toString();
} | [
"public",
"static",
"String",
"randomString",
"(",
"char",
"[",
"]",
"values",
",",
"int",
"len",
")",
"{",
"Random",
"rnd",
"=",
"new",
"SecureRandom",
"(",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"len",
")",
";",
"for",
"("... | Generate a random String
@param values The characters list to use in the randomization
@param len The number of characters in the output String
@return The randomized String | [
"Generate",
"a",
"random",
"String"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java#L242-L250 |
145,702 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/StatisticalSequenceLabeler.java | StatisticalSequenceLabeler.seqToSpans | public final Span[] seqToSpans(final String[] tokens) {
final Span[] annotatedText = this.sequenceLabeler.tag(tokens);
final List<Span> probSpans = new ArrayList<Span>(
Arrays.asList(annotatedText));
return probSpans.toArray(new Span[probSpans.size()]);
} | java | public final Span[] seqToSpans(final String[] tokens) {
final Span[] annotatedText = this.sequenceLabeler.tag(tokens);
final List<Span> probSpans = new ArrayList<Span>(
Arrays.asList(annotatedText));
return probSpans.toArray(new Span[probSpans.size()]);
} | [
"public",
"final",
"Span",
"[",
"]",
"seqToSpans",
"(",
"final",
"String",
"[",
"]",
"tokens",
")",
"{",
"final",
"Span",
"[",
"]",
"annotatedText",
"=",
"this",
".",
"sequenceLabeler",
".",
"tag",
"(",
"tokens",
")",
";",
"final",
"List",
"<",
"Span",... | Get array of Spans from a list of tokens.
@param tokens
the sentence tokens
@return the array of Sequence Spans | [
"Get",
"array",
"of",
"Spans",
"from",
"a",
"list",
"of",
"tokens",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/StatisticalSequenceLabeler.java#L98-L103 |
145,703 | OpenBEL/openbel-framework | org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java | PhaseThreeImpl.search | private Set<TableEntry> search(final ProtoNetwork pn, String... literals) {
Set<TableEntry> ret;
if (noItems(literals)) {
return emptySet();
}
// An initial capacity would be ideal for this set, but we don't
// have any reasonable estimations.
ret = new HashS... | java | private Set<TableEntry> search(final ProtoNetwork pn, String... literals) {
Set<TableEntry> ret;
if (noItems(literals)) {
return emptySet();
}
// An initial capacity would be ideal for this set, but we don't
// have any reasonable estimations.
ret = new HashS... | [
"private",
"Set",
"<",
"TableEntry",
">",
"search",
"(",
"final",
"ProtoNetwork",
"pn",
",",
"String",
"...",
"literals",
")",
"{",
"Set",
"<",
"TableEntry",
">",
"ret",
";",
"if",
"(",
"noItems",
"(",
"literals",
")",
")",
"{",
"return",
"emptySet",
"... | Aggregate the set of all table entries for a proto-network that match at
least one of the provided term literals.
@param literals Literals, e.g., {@code proteinAbundance(#)}
@return Table entry set | [
"Aggregate",
"the",
"set",
"of",
"all",
"table",
"entries",
"for",
"a",
"proto",
"-",
"network",
"that",
"match",
"at",
"least",
"one",
"of",
"the",
"provided",
"term",
"literals",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java#L826-L872 |
145,704 | OpenBEL/openbel-framework | org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java | PhaseThreeImpl.validParameter | private static boolean validParameter(final Parameter p) {
if (p.getNamespace() == null) {
return false;
}
if (p.getValue() == null) {
return false;
}
return true;
} | java | private static boolean validParameter(final Parameter p) {
if (p.getNamespace() == null) {
return false;
}
if (p.getValue() == null) {
return false;
}
return true;
} | [
"private",
"static",
"boolean",
"validParameter",
"(",
"final",
"Parameter",
"p",
")",
"{",
"if",
"(",
"p",
".",
"getNamespace",
"(",
")",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"p",
".",
"getValue",
"(",
")",
"==",
"null",
... | Returns true if the parameter has a namespace and value, false if not.
@param p Parameter | [
"Returns",
"true",
"if",
"the",
"parameter",
"has",
"a",
"namespace",
"and",
"value",
"false",
"if",
"not",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java#L1166-L1174 |
145,705 | OpenBEL/openbel-framework | org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java | PhaseThreeImpl.validParameter | private static boolean validParameter(final TableParameter tp) {
if (tp.getNamespace() == null) {
return false;
}
if (tp.getValue() == null) {
return false;
}
return true;
} | java | private static boolean validParameter(final TableParameter tp) {
if (tp.getNamespace() == null) {
return false;
}
if (tp.getValue() == null) {
return false;
}
return true;
} | [
"private",
"static",
"boolean",
"validParameter",
"(",
"final",
"TableParameter",
"tp",
")",
"{",
"if",
"(",
"tp",
".",
"getNamespace",
"(",
")",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"tp",
".",
"getValue",
"(",
")",
"==",
"... | Returns true if the table parameter has a namespace and value, false if
not.
@param tp Table parameter | [
"Returns",
"true",
"if",
"the",
"table",
"parameter",
"has",
"a",
"namespace",
"and",
"value",
"false",
"if",
"not",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.compiler/src/main/java/org/openbel/framework/compiler/PhaseThreeImpl.java#L1182-L1190 |
145,706 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java | CommandLineApplication.getExtraneousArguments | protected final List<String> getExtraneousArguments() {
if (commandLine == null) {
return emptyList();
}
String[] args = commandLine.getArgs();
if (noItems(args)) {
return emptyList();
}
return asList(args);
} | java | protected final List<String> getExtraneousArguments() {
if (commandLine == null) {
return emptyList();
}
String[] args = commandLine.getArgs();
if (noItems(args)) {
return emptyList();
}
return asList(args);
} | [
"protected",
"final",
"List",
"<",
"String",
">",
"getExtraneousArguments",
"(",
")",
"{",
"if",
"(",
"commandLine",
"==",
"null",
")",
"{",
"return",
"emptyList",
"(",
")",
";",
"}",
"String",
"[",
"]",
"args",
"=",
"commandLine",
".",
"getArgs",
"(",
... | Returns the extraneous command-line arguments.
@return Non-null list of strings, may be empty | [
"Returns",
"the",
"extraneous",
"command",
"-",
"line",
"arguments",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java#L295-L304 |
145,707 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java | CommandLineApplication.printApplicationInfo | protected final void printApplicationInfo(final String applicationName) {
final StringBuilder bldr = new StringBuilder();
bldr.append("\n");
bldr.append(BELFrameworkVersion.VERSION_LABEL).append(": ")
.append(applicationName).append("\n");
bldr.append("Copyright (c) 2011-... | java | protected final void printApplicationInfo(final String applicationName) {
final StringBuilder bldr = new StringBuilder();
bldr.append("\n");
bldr.append(BELFrameworkVersion.VERSION_LABEL).append(": ")
.append(applicationName).append("\n");
bldr.append("Copyright (c) 2011-... | [
"protected",
"final",
"void",
"printApplicationInfo",
"(",
"final",
"String",
"applicationName",
")",
"{",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"bldr",
".",
"append",
"(",
"\"\\n\"",
")",
";",
"bldr",
".",
"append",
"... | Prints out application information. | [
"Prints",
"out",
"application",
"information",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java#L463-L471 |
145,708 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java | CommandLineApplication.printUsage | public void printUsage(final OutputStream os) {
final StringBuilder bldr = new StringBuilder();
bldr.append("Usage: ");
bldr.append(getUsage());
bldr.append("\n");
bldr.append("Try '--help' for more information.\n");
PrintWriter pw = new PrintWriter(os);
pw.write(... | java | public void printUsage(final OutputStream os) {
final StringBuilder bldr = new StringBuilder();
bldr.append("Usage: ");
bldr.append(getUsage());
bldr.append("\n");
bldr.append("Try '--help' for more information.\n");
PrintWriter pw = new PrintWriter(os);
pw.write(... | [
"public",
"void",
"printUsage",
"(",
"final",
"OutputStream",
"os",
")",
"{",
"final",
"StringBuilder",
"bldr",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"bldr",
".",
"append",
"(",
"\"Usage: \"",
")",
";",
"bldr",
".",
"append",
"(",
"getUsage",
"(",
... | Prints usage information to the provided output stream.
@param os Non-null output stream | [
"Prints",
"usage",
"information",
"to",
"the",
"provided",
"output",
"stream",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java#L495-L504 |
145,709 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/features/WordShapeSuperSenseFeatureGenerator.java | WordShapeSuperSenseFeatureGenerator.normalize | public static String normalize(final String token) {
String normalizedToken = "";
char currentCharacter;
int prevCharType = -1;
char charType = '~';
boolean addedStar = false;
for (int i = 0; i < token.length(); i++) {
currentCharacter = token.charAt(i);
if (currentCharacter >= 'A'... | java | public static String normalize(final String token) {
String normalizedToken = "";
char currentCharacter;
int prevCharType = -1;
char charType = '~';
boolean addedStar = false;
for (int i = 0; i < token.length(); i++) {
currentCharacter = token.charAt(i);
if (currentCharacter >= 'A'... | [
"public",
"static",
"String",
"normalize",
"(",
"final",
"String",
"token",
")",
"{",
"String",
"normalizedToken",
"=",
"\"\"",
";",
"char",
"currentCharacter",
";",
"int",
"prevCharType",
"=",
"-",
"1",
";",
"char",
"charType",
"=",
"'",
"'",
";",
"boolea... | Normalize upper case, lower case, digits and duplicate characters.
@param token
the token to be normalized
@return the normalized token | [
"Normalize",
"upper",
"case",
"lower",
"case",
"digits",
"and",
"duplicate",
"characters",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/features/WordShapeSuperSenseFeatureGenerator.java#L55-L87 |
145,710 | geomajas/geomajas-project-client-gwt2 | common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/impl/DomImpl.java | DomImpl.cloneSvgElement | public Element cloneSvgElement(Element source) {
if (source == null || source.getNodeName() == null) {
return null;
}
if ("#text".equals(source.getNodeName())) {
return Document.get().createTextNode(source.getNodeValue()).cast();
}
Element clone = createElementNS(Dom.NS_SVG, source.getNodeName(), Dom.cr... | java | public Element cloneSvgElement(Element source) {
if (source == null || source.getNodeName() == null) {
return null;
}
if ("#text".equals(source.getNodeName())) {
return Document.get().createTextNode(source.getNodeValue()).cast();
}
Element clone = createElementNS(Dom.NS_SVG, source.getNodeName(), Dom.cr... | [
"public",
"Element",
"cloneSvgElement",
"(",
"Element",
"source",
")",
"{",
"if",
"(",
"source",
"==",
"null",
"||",
"source",
".",
"getNodeName",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"\"#text\"",
".",
"equals",
"(",... | Clone a single SVG element.
@param source
The source SVG element.
@return Returns the clone. | [
"Clone",
"a",
"single",
"SVG",
"element",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/impl/DomImpl.java#L270-L285 |
145,711 | ardoq/ardoq-java-client | src/main/java/com/ardoq/util/SyncUtil.java | SyncUtil.getTagByName | public Tag getTagByName(String name) {
Tag t = this.tags.get(name);
if (null == t) {
t = new Tag(name, this.workspace.getId(), "");
this.tags.put(name, t);
}
return t;
} | java | public Tag getTagByName(String name) {
Tag t = this.tags.get(name);
if (null == t) {
t = new Tag(name, this.workspace.getId(), "");
this.tags.put(name, t);
}
return t;
} | [
"public",
"Tag",
"getTagByName",
"(",
"String",
"name",
")",
"{",
"Tag",
"t",
"=",
"this",
".",
"tags",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"null",
"==",
"t",
")",
"{",
"t",
"=",
"new",
"Tag",
"(",
"name",
",",
"this",
".",
"workspace... | Gets an existing tag by name
@param name Name of the tag
@return Returns the tag | [
"Gets",
"an",
"existing",
"tag",
"by",
"name"
] | 03731c3df864d850ef41b252364a104376dde983 | https://github.com/ardoq/ardoq-java-client/blob/03731c3df864d850ef41b252364a104376dde983/src/main/java/com/ardoq/util/SyncUtil.java#L145-L152 |
145,712 | ardoq/ardoq-java-client | src/main/java/com/ardoq/util/SyncUtil.java | SyncUtil.getReport | public String getReport() {
return "Report\n - Created " + newComponents.size() + " components\n - Updated " + this.updatedComponentCount + " components\n - Created " + newRefs.size() + " references\n - Updated " + this.updatedRefCount + " references\n - Deleted " + this.deletedComponents + " components\n - Del... | java | public String getReport() {
return "Report\n - Created " + newComponents.size() + " components\n - Updated " + this.updatedComponentCount + " components\n - Created " + newRefs.size() + " references\n - Updated " + this.updatedRefCount + " references\n - Deleted " + this.deletedComponents + " components\n - Del... | [
"public",
"String",
"getReport",
"(",
")",
"{",
"return",
"\"Report\\n - Created \"",
"+",
"newComponents",
".",
"size",
"(",
")",
"+",
"\" components\\n - Updated \"",
"+",
"this",
".",
"updatedComponentCount",
"+",
"\" components\\n - Created \"",
"+",
"newRefs",
".... | Returns an update report with statistics of created, updated and deleted references and components.
@return a String with the report. | [
"Returns",
"an",
"update",
"report",
"with",
"statistics",
"of",
"created",
"updated",
"and",
"deleted",
"references",
"and",
"components",
"."
] | 03731c3df864d850ef41b252364a104376dde983 | https://github.com/ardoq/ardoq-java-client/blob/03731c3df864d850ef41b252364a104376dde983/src/main/java/com/ardoq/util/SyncUtil.java#L247-L249 |
145,713 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java | Signature.function | private static FunctionEnum function(final String s) {
String[] args = ARGS_REGEX.split(s);
return getFunctionEnum(args[0]);
} | java | private static FunctionEnum function(final String s) {
String[] args = ARGS_REGEX.split(s);
return getFunctionEnum(args[0]);
} | [
"private",
"static",
"FunctionEnum",
"function",
"(",
"final",
"String",
"s",
")",
"{",
"String",
"[",
"]",
"args",
"=",
"ARGS_REGEX",
".",
"split",
"(",
"s",
")",
";",
"return",
"getFunctionEnum",
"(",
"args",
"[",
"0",
"]",
")",
";",
"}"
] | Returns the function enum for the provided string.
@param s String
@return {@link FunctionEnum} | [
"Returns",
"the",
"function",
"enum",
"for",
"the",
"provided",
"string",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java#L493-L496 |
145,714 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java | Signature.returnType | private static ReturnType returnType(final String s) {
String[] args = ARGS_REGEX.split(s);
return ReturnType.getReturnType(args[args.length - 1]);
} | java | private static ReturnType returnType(final String s) {
String[] args = ARGS_REGEX.split(s);
return ReturnType.getReturnType(args[args.length - 1]);
} | [
"private",
"static",
"ReturnType",
"returnType",
"(",
"final",
"String",
"s",
")",
"{",
"String",
"[",
"]",
"args",
"=",
"ARGS_REGEX",
".",
"split",
"(",
"s",
")",
";",
"return",
"ReturnType",
".",
"getReturnType",
"(",
"args",
"[",
"args",
".",
"length"... | Returns the return type for the provided string.
@param s String
@return {@link ReturnType} | [
"Returns",
"the",
"return",
"type",
"for",
"the",
"provided",
"string",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java#L504-L507 |
145,715 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java | Signature.countArgs | private static String countArgs(final String s) {
String[] args = ARGS_REGEX.split(s);
if ("".equals(args[1])) return "0";
String[] argarray = args[1].split(",");
for (final String arg : argarray)
if (arg.contains(VARARGS_SUFFIX)) return "1 or more";
return valueOf(a... | java | private static String countArgs(final String s) {
String[] args = ARGS_REGEX.split(s);
if ("".equals(args[1])) return "0";
String[] argarray = args[1].split(",");
for (final String arg : argarray)
if (arg.contains(VARARGS_SUFFIX)) return "1 or more";
return valueOf(a... | [
"private",
"static",
"String",
"countArgs",
"(",
"final",
"String",
"s",
")",
"{",
"String",
"[",
"]",
"args",
"=",
"ARGS_REGEX",
".",
"split",
"(",
"s",
")",
";",
"if",
"(",
"\"\"",
".",
"equals",
"(",
"args",
"[",
"1",
"]",
")",
")",
"return",
... | Returns the number of arguments for the provided string.
@param s {@link String}
@return {@link String} | [
"Returns",
"the",
"number",
"of",
"arguments",
"for",
"the",
"provided",
"string",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/lang/Signature.java#L529-L537 |
145,716 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java | AnnotateProperties.setTokenizeProperties | public static Properties setTokenizeProperties(final String lang,
final String normalize, final String untokenizable,
final String hardParagraph) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("language", lang);
annotateProperties.setProperty("normalize"... | java | public static Properties setTokenizeProperties(final String lang,
final String normalize, final String untokenizable,
final String hardParagraph) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("language", lang);
annotateProperties.setProperty("normalize"... | [
"public",
"static",
"Properties",
"setTokenizeProperties",
"(",
"final",
"String",
"lang",
",",
"final",
"String",
"normalize",
",",
"final",
"String",
"untokenizable",
",",
"final",
"String",
"hardParagraph",
")",
"{",
"final",
"Properties",
"annotateProperties",
"... | Creates the Properties object required to construct a Sentence Segmenter
and a Tokenizer.
@param lang
it is required to provide a language code
@param normalize
the normalization option
@param untokenizable
print untokenizable tokens
@param hardParagraph
do not segment paragraph marks
@return the properties object | [
"Creates",
"the",
"Properties",
"object",
"required",
"to",
"construct",
"a",
"Sentence",
"Segmenter",
"and",
"a",
"Tokenizer",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java#L80-L89 |
145,717 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java | AnnotateProperties.setPOSLemmaProperties | public static Properties setPOSLemmaProperties(final String model,
final String lemmatizerModel, final String language,
final String multiwords, final String dictag,
final String allMorphology) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("model", mo... | java | public static Properties setPOSLemmaProperties(final String model,
final String lemmatizerModel, final String language,
final String multiwords, final String dictag,
final String allMorphology) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("model", mo... | [
"public",
"static",
"Properties",
"setPOSLemmaProperties",
"(",
"final",
"String",
"model",
",",
"final",
"String",
"lemmatizerModel",
",",
"final",
"String",
"language",
",",
"final",
"String",
"multiwords",
",",
"final",
"String",
"dictag",
",",
"final",
"String... | Generate Properties object for POS tagging and Lemmatizing. Language, model
and lemmatizerModel are compulsory.
@param model
the pos tagger model
@param lemmatizerModel
the lemmatizer model
@param language
the language
@param multiwords
whether multiwords are to be detected
@param dictag
whether tagging from a diction... | [
"Generate",
"Properties",
"object",
"for",
"POS",
"tagging",
"and",
"Lemmatizing",
".",
"Language",
"model",
"and",
"lemmatizerModel",
"are",
"compulsory",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java#L109-L121 |
145,718 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java | AnnotateProperties.setChunkingProperties | public Properties setChunkingProperties(final String model,
final String language) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("model", model);
annotateProperties.setProperty("language", language);
return annotateProperties;
} | java | public Properties setChunkingProperties(final String model,
final String language) {
final Properties annotateProperties = new Properties();
annotateProperties.setProperty("model", model);
annotateProperties.setProperty("language", language);
return annotateProperties;
} | [
"public",
"Properties",
"setChunkingProperties",
"(",
"final",
"String",
"model",
",",
"final",
"String",
"language",
")",
"{",
"final",
"Properties",
"annotateProperties",
"=",
"new",
"Properties",
"(",
")",
";",
"annotateProperties",
".",
"setProperty",
"(",
"\"... | Generate Properties object for chunking. Both parameters are compulsory.
@param model
the model to perform the annotation
@param language
the language
@return a properties object | [
"Generate",
"Properties",
"object",
"for",
"chunking",
".",
"Both",
"parameters",
"are",
"compulsory",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/AnnotateProperties.java#L132-L138 |
145,719 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java | ShiftReduceParserTrainer.train | public final ParserModel train(final TrainingParameters params,
final TrainingParameters taggerParams,
final TrainingParameters chunkerParams) {
if (getParserFactory() == null) {
throw new IllegalStateException(
"The ParserFactory must be instantiated!!");
}
if (getTaggerFactory(... | java | public final ParserModel train(final TrainingParameters params,
final TrainingParameters taggerParams,
final TrainingParameters chunkerParams) {
if (getParserFactory() == null) {
throw new IllegalStateException(
"The ParserFactory must be instantiated!!");
}
if (getTaggerFactory(... | [
"public",
"final",
"ParserModel",
"train",
"(",
"final",
"TrainingParameters",
"params",
",",
"final",
"TrainingParameters",
"taggerParams",
",",
"final",
"TrainingParameters",
"chunkerParams",
")",
"{",
"if",
"(",
"getParserFactory",
"(",
")",
"==",
"null",
")",
... | Train a parser model from the Treebank data.
@param params
the parser parameters
@param taggerParams
the pos tagger parameters
@param chunkerParams
the chunker parameters
@return a parser model | [
"Train",
"a",
"parser",
"model",
"from",
"the",
"Treebank",
"data",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java#L182-L209 |
145,720 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java | ShiftReduceParserTrainer.train | public final ParserModel train(final TrainingParameters params,
final InputStream taggerModel, final TrainingParameters chunkerParams) {
if (getParserFactory() == null) {
throw new IllegalStateException(
"The ParserFactory must be instantiated!!");
}
SequenceLabelerModel posModel = nul... | java | public final ParserModel train(final TrainingParameters params,
final InputStream taggerModel, final TrainingParameters chunkerParams) {
if (getParserFactory() == null) {
throw new IllegalStateException(
"The ParserFactory must be instantiated!!");
}
SequenceLabelerModel posModel = nul... | [
"public",
"final",
"ParserModel",
"train",
"(",
"final",
"TrainingParameters",
"params",
",",
"final",
"InputStream",
"taggerModel",
",",
"final",
"TrainingParameters",
"chunkerParams",
")",
"{",
"if",
"(",
"getParserFactory",
"(",
")",
"==",
"null",
")",
"{",
"... | Train a parser model providing an already trained POS tagger.
@param params
the parser parameters
@param taggerModel
the POS tagger model
@param chunkerParams
the chunker parameters
@return the parser model | [
"Train",
"a",
"parser",
"model",
"providing",
"an",
"already",
"trained",
"POS",
"tagger",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java#L222-L250 |
145,721 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java | ShiftReduceParserTrainer.getSequenceCodec | public final String getSequenceCodec() {
String seqCodec = null;
if ("BIO".equals(this.sequenceCodec)) {
seqCodec = BioCodec.class.getName();
} else if ("BILOU".equals(this.sequenceCodec)) {
seqCodec = BilouCodec.class.getName();
}
return seqCodec;
} | java | public final String getSequenceCodec() {
String seqCodec = null;
if ("BIO".equals(this.sequenceCodec)) {
seqCodec = BioCodec.class.getName();
} else if ("BILOU".equals(this.sequenceCodec)) {
seqCodec = BilouCodec.class.getName();
}
return seqCodec;
} | [
"public",
"final",
"String",
"getSequenceCodec",
"(",
")",
"{",
"String",
"seqCodec",
"=",
"null",
";",
"if",
"(",
"\"BIO\"",
".",
"equals",
"(",
"this",
".",
"sequenceCodec",
")",
")",
"{",
"seqCodec",
"=",
"BioCodec",
".",
"class",
".",
"getName",
"(",... | Get the Sequence codec.
@return the sequence codec | [
"Get",
"the",
"Sequence",
"codec",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/ShiftReduceParserTrainer.java#L345-L353 |
145,722 | alb-i986/selenium-tinafw | src/main/java/me/alb_i986/selenium/tinafw/ui/TinafwExpectedConditions.java | TinafwExpectedConditions.visibilityOfOneOfElementsLocatedBy | public static ExpectedCondition<WebElement> visibilityOfOneOfElementsLocatedBy(final By locator) {
return new ExpectedCondition<WebElement>() {
@Override
public WebElement apply(WebDriver driver) {
for (WebElement element : driver.findElements(locator)) {
if (element.isDisplayed()) {
return eleme... | java | public static ExpectedCondition<WebElement> visibilityOfOneOfElementsLocatedBy(final By locator) {
return new ExpectedCondition<WebElement>() {
@Override
public WebElement apply(WebDriver driver) {
for (WebElement element : driver.findElements(locator)) {
if (element.isDisplayed()) {
return eleme... | [
"public",
"static",
"ExpectedCondition",
"<",
"WebElement",
">",
"visibilityOfOneOfElementsLocatedBy",
"(",
"final",
"By",
"locator",
")",
"{",
"return",
"new",
"ExpectedCondition",
"<",
"WebElement",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"WebElement",
"a... | An expectation for checking that at least one of the elements matching the locator
is visible.
@param locator used to find the elements
@return the first visible WebElement that is found | [
"An",
"expectation",
"for",
"checking",
"that",
"at",
"least",
"one",
"of",
"the",
"elements",
"matching",
"the",
"locator",
"is",
"visible",
"."
] | 91c66720cda9f69751f96c58c0a0624b2222186e | https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/TinafwExpectedConditions.java#L20-L37 |
145,723 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/external/CacheableAnnotationDefinitionServiceImpl.java | CacheableAnnotationDefinitionServiceImpl.parseRegularExpression | private String parseRegularExpression(File annotationCacheCopy,
long characterOffset) throws IOException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(annotationCacheCopy));
reader.skip(characterOffset);
return reader.rea... | java | private String parseRegularExpression(File annotationCacheCopy,
long characterOffset) throws IOException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(annotationCacheCopy));
reader.skip(characterOffset);
return reader.rea... | [
"private",
"String",
"parseRegularExpression",
"(",
"File",
"annotationCacheCopy",
",",
"long",
"characterOffset",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"reader",
"=",
"null",
";",
"try",
"{",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"Fil... | Reads the first line after the annotation header as a regular expression
for the annotation definition.
@param annotationCacheCopy
{@link File}, the annotation cache copy to parse
@param characterOffset
<tt>long</tt>, the character offset to start reading from
@return {@link String} the parsed regular expression
@thro... | [
"Reads",
"the",
"first",
"line",
"after",
"the",
"annotation",
"header",
"as",
"a",
"regular",
"expression",
"for",
"the",
"annotation",
"definition",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/external/CacheableAnnotationDefinitionServiceImpl.java#L221-L235 |
145,724 | nohana/Amalgam | amalgam/src/main/java/com/amalgam/security/MessageDigestUtils.java | MessageDigestUtils.computeSha256 | public static byte[] computeSha256(final byte[] data) {
try {
return MessageDigest.getInstance(ALGORITHM_SHA_256).digest(data);
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("unsupported algorithm for message digest: ", e);
}
} | java | public static byte[] computeSha256(final byte[] data) {
try {
return MessageDigest.getInstance(ALGORITHM_SHA_256).digest(data);
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("unsupported algorithm for message digest: ", e);
}
} | [
"public",
"static",
"byte",
"[",
"]",
"computeSha256",
"(",
"final",
"byte",
"[",
"]",
"data",
")",
"{",
"try",
"{",
"return",
"MessageDigest",
".",
"getInstance",
"(",
"ALGORITHM_SHA_256",
")",
".",
"digest",
"(",
"data",
")",
";",
"}",
"catch",
"(",
... | Calculate the message digest value with SHA 256 algorithm.
@param data to calculate.
@return message digest value. | [
"Calculate",
"the",
"message",
"digest",
"value",
"with",
"SHA",
"256",
"algorithm",
"."
] | 57809ddbfe7897e979cf507982ce0b3aa5e0ed8a | https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/security/MessageDigestUtils.java#L38-L44 |
145,725 | geomajas/geomajas-project-client-gwt2 | plugin/wfs/server-extension/src/main/java/org/geomajas/gwt2/plugin/wfs/server/command/factory/impl/DefaultCriterionFilterConverter.java | DefaultCriterionFilterConverter.convert | public Filter convert(Criterion criterionDto, List<AttributeDescriptor> schema) {
FilterContext fc = new FilterContext();
fc.setSchema(schema);
criterionDto.accept(this, fc);
try {
log.debug("Filter converted : " + ECQL.toCQL(fc.getFilter()));
} catch (Exception e) {
// ignore
}
return fc.getFilter(... | java | public Filter convert(Criterion criterionDto, List<AttributeDescriptor> schema) {
FilterContext fc = new FilterContext();
fc.setSchema(schema);
criterionDto.accept(this, fc);
try {
log.debug("Filter converted : " + ECQL.toCQL(fc.getFilter()));
} catch (Exception e) {
// ignore
}
return fc.getFilter(... | [
"public",
"Filter",
"convert",
"(",
"Criterion",
"criterionDto",
",",
"List",
"<",
"AttributeDescriptor",
">",
"schema",
")",
"{",
"FilterContext",
"fc",
"=",
"new",
"FilterContext",
"(",
")",
";",
"fc",
".",
"setSchema",
"(",
"schema",
")",
";",
"criterionD... | Convert a criterion to a filter.
@param criterionDto
@param schema
@return | [
"Convert",
"a",
"criterion",
"to",
"a",
"filter",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wfs/server-extension/src/main/java/org/geomajas/gwt2/plugin/wfs/server/command/factory/impl/DefaultCriterionFilterConverter.java#L92-L102 |
145,726 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Statement.java | Statement.getAllParameters | public List<Parameter> getAllParameters() {
List<Parameter> ret = new ArrayList<Parameter>();
ret.addAll(subject.getAllParameters());
if (object != null) {
if (object.getStatement() != null)
ret.addAll(object.getStatement()
.getAllParameters(... | java | public List<Parameter> getAllParameters() {
List<Parameter> ret = new ArrayList<Parameter>();
ret.addAll(subject.getAllParameters());
if (object != null) {
if (object.getStatement() != null)
ret.addAll(object.getStatement()
.getAllParameters(... | [
"public",
"List",
"<",
"Parameter",
">",
"getAllParameters",
"(",
")",
"{",
"List",
"<",
"Parameter",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"Parameter",
">",
"(",
")",
";",
"ret",
".",
"addAll",
"(",
"subject",
".",
"getAllParameters",
"(",
")",
")... | Returns a list of all parameters contained by this statement and object.
@return List of parameters | [
"Returns",
"a",
"list",
"of",
"all",
"parameters",
"contained",
"by",
"this",
"statement",
"and",
"object",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Statement.java#L189-L203 |
145,727 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Statement.java | Statement.getAllTerms | public List<Term> getAllTerms() {
List<Term> ret = new ArrayList<Term>();
ret.add(subject);
List<Term> subjectTerms = subject.getTerms();
if (subjectTerms != null) {
ret.addAll(subjectTerms);
for (final Term term : subjectTerms) {
ret.addAll(term.... | java | public List<Term> getAllTerms() {
List<Term> ret = new ArrayList<Term>();
ret.add(subject);
List<Term> subjectTerms = subject.getTerms();
if (subjectTerms != null) {
ret.addAll(subjectTerms);
for (final Term term : subjectTerms) {
ret.addAll(term.... | [
"public",
"List",
"<",
"Term",
">",
"getAllTerms",
"(",
")",
"{",
"List",
"<",
"Term",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"Term",
">",
"(",
")",
";",
"ret",
".",
"add",
"(",
"subject",
")",
";",
"List",
"<",
"Term",
">",
"subjectTerms",
"=... | Returns a list of all terms contained by this statement's subject and
object.
@return List of terms | [
"Returns",
"a",
"list",
"of",
"all",
"terms",
"contained",
"by",
"this",
"statement",
"s",
"subject",
"and",
"object",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Statement.java#L211-L227 |
145,728 | geomajas/geomajas-project-client-gwt2 | plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java | FeatureClickedListener.calculateBufferFromPixelTolerance | private double calculateBufferFromPixelTolerance() {
Coordinate c1 = mapPresenter.getViewPort().getTransformationService()
.transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
Coordinate c2 = mapPresenter.getViewPort().getTransformationService()
.transform(new Coordinate(pixelBuffer, 0)... | java | private double calculateBufferFromPixelTolerance() {
Coordinate c1 = mapPresenter.getViewPort().getTransformationService()
.transform(new Coordinate(0, 0), RenderSpace.SCREEN, RenderSpace.WORLD);
Coordinate c2 = mapPresenter.getViewPort().getTransformationService()
.transform(new Coordinate(pixelBuffer, 0)... | [
"private",
"double",
"calculateBufferFromPixelTolerance",
"(",
")",
"{",
"Coordinate",
"c1",
"=",
"mapPresenter",
".",
"getViewPort",
"(",
")",
".",
"getTransformationService",
"(",
")",
".",
"transform",
"(",
"new",
"Coordinate",
"(",
"0",
",",
"0",
")",
",",... | Calculate a buffer in which the listener may include the features from the map.
@return double buffer | [
"Calculate",
"a",
"buffer",
"in",
"which",
"the",
"listener",
"may",
"include",
"the",
"features",
"from",
"the",
"map",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java#L149-L157 |
145,729 | geomajas/geomajas-project-client-gwt2 | plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java | FeatureClickedListener.isDownPosition | private boolean isDownPosition(HumanInputEvent<?> event) {
if (clickedPosition != null) {
Coordinate location = getLocation(event, RenderSpace.SCREEN);
if (MathService.distance(clickedPosition, location) < clickDelta) {
return true;
}
}
return false;
} | java | private boolean isDownPosition(HumanInputEvent<?> event) {
if (clickedPosition != null) {
Coordinate location = getLocation(event, RenderSpace.SCREEN);
if (MathService.distance(clickedPosition, location) < clickDelta) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"isDownPosition",
"(",
"HumanInputEvent",
"<",
"?",
">",
"event",
")",
"{",
"if",
"(",
"clickedPosition",
"!=",
"null",
")",
"{",
"Coordinate",
"location",
"=",
"getLocation",
"(",
"event",
",",
"RenderSpace",
".",
"SCREEN",
")",
";",
... | Is the event at the same location as the "down" event?
@param event The event to check.
@return true or false. | [
"Is",
"the",
"event",
"at",
"the",
"same",
"location",
"as",
"the",
"down",
"event?"
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/example-jar/src/main/java/org/geomajas/gwt2/plugin/corewidget/example/client/sample/feature/controller/FeatureClickedListener.java#L165-L173 |
145,730 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.read | public byte[] read(long record) throws IOException {
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
if (pos >= size) {
final String fmt = "bad seek to position: %d (size is %d)";
final String msg = format(fmt, pos, size);
... | java | public byte[] read(long record) throws IOException {
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
if (pos >= size) {
final String fmt = "bad seek to position: %d (size is %d)";
final String msg = format(fmt, pos, size);
... | [
"public",
"byte",
"[",
"]",
"read",
"(",
"long",
"record",
")",
"throws",
"IOException",
"{",
"// (+ recordSize) allows skipping metadata record",
"long",
"pos",
"=",
"record",
"*",
"recordSize",
"+",
"recordSize",
";",
"if",
"(",
"pos",
">=",
"size",
")",
"{"... | Reads a record from this record file.
@param record The record to read
@return {@code byte[]}
@throws IOException Throw if an I/O error occurs during I/O seeks or
reads | [
"Reads",
"a",
"record",
"from",
"this",
"record",
"file",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L240-L259 |
145,731 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.read | public void read(long record, byte[] bytes) throws IOException {
if (bytes.length != recordSize) {
final String fmt = "invalid buffer length of %d bytes, expected %d";
final String msg = format(fmt, bytes.length, recordSize);
throw new InvalidArgument(msg);
}
... | java | public void read(long record, byte[] bytes) throws IOException {
if (bytes.length != recordSize) {
final String fmt = "invalid buffer length of %d bytes, expected %d";
final String msg = format(fmt, bytes.length, recordSize);
throw new InvalidArgument(msg);
}
... | [
"public",
"void",
"read",
"(",
"long",
"record",
",",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"bytes",
".",
"length",
"!=",
"recordSize",
")",
"{",
"final",
"String",
"fmt",
"=",
"\"invalid buffer length of %d bytes, expected %... | Reads a record from this record file into the provided byte buffer.
@param record The record to read
@param bytes Byte buffer to read into
@throws IOException Throw if an I/O error occurs during I/O seeks or
reads | [
"Reads",
"a",
"record",
"from",
"this",
"record",
"file",
"into",
"the",
"provided",
"byte",
"buffer",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L269-L293 |
145,732 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.read | public byte[] read(long record, int column) throws IOException {
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
int i = 0;
for (; i < column; i++) {
pos += columns[i].size;
}
if (pos >= size) {
final... | java | public byte[] read(long record, int column) throws IOException {
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
int i = 0;
for (; i < column; i++) {
pos += columns[i].size;
}
if (pos >= size) {
final... | [
"public",
"byte",
"[",
"]",
"read",
"(",
"long",
"record",
",",
"int",
"column",
")",
"throws",
"IOException",
"{",
"// (+ recordSize) allows skipping metadata record",
"long",
"pos",
"=",
"record",
"*",
"recordSize",
"+",
"recordSize",
";",
"int",
"i",
"=",
"... | Reads a record for a specific columns from this record file.
@param record The record to read
@param column The column to read from
@return {@code byte[]}
@throws IOException Thrown if an I/O error occurs during I/O seeks or
read or an invalid number of bytes were read | [
"Reads",
"a",
"record",
"for",
"a",
"specific",
"columns",
"from",
"this",
"record",
"file",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L304-L329 |
145,733 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.write | public void write(long record, byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
if (bytes.length != recordSize) {
final String fmt = "invalid write of %d bytes, expected %d";
final String msg = format(fmt, b... | java | public void write(long record, byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
if (bytes.length != recordSize) {
final String fmt = "invalid write of %d bytes, expected %d";
final String msg = format(fmt, b... | [
"public",
"void",
"write",
"(",
"long",
"record",
",",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"readonly",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"RO_MSG",
")",
";",
"}",
"if",
"(",
"bytes",
".",
... | Writes a record to this record file, overwriting the previous contents.
@param record The record being written
@param bytes The bytes to write
@throws IOException Thrown if an I/O error occurs during I/O seeks or
writes
@throws UnsupportedOperationException Thrown if the mode is set to
read-only
@throws InvalidArgumen... | [
"Writes",
"a",
"record",
"to",
"this",
"record",
"file",
"overwriting",
"the",
"previous",
"contents",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L383-L401 |
145,734 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.write | public void write(long record, int column, byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
int i = 0;
for (; ... | java | public void write(long record, int column, byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
// (+ recordSize) allows skipping metadata record
long pos = record * recordSize + recordSize;
int i = 0;
for (; ... | [
"public",
"void",
"write",
"(",
"long",
"record",
",",
"int",
"column",
",",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"readonly",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"RO_MSG",
")",
";",
"}",
"//... | Writes a record for a specific column to this record file, overwriting
the previous contents.
@param record The record being written
@param column The column to write
@param bytes The bytes to write
@throws IOException Thrown if an I/O error occurs during I/O seeks or
writes
@throws InvalidArgument Thrown if a write o... | [
"Writes",
"a",
"record",
"for",
"a",
"specific",
"column",
"to",
"this",
"record",
"file",
"overwriting",
"the",
"previous",
"contents",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L417-L443 |
145,735 | OpenBEL/openbel-framework | org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java | RecordFile.writeMetadata | @Deprecated
public void writeMetadata(byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
if (bytes.length != recordSize) {
final String fmt = "invalid write of %d bytes, expected %d";
final String msg = f... | java | @Deprecated
public void writeMetadata(byte[] bytes) throws IOException {
if (readonly) {
throw new UnsupportedOperationException(RO_MSG);
}
if (bytes.length != recordSize) {
final String fmt = "invalid write of %d bytes, expected %d";
final String msg = f... | [
"@",
"Deprecated",
"public",
"void",
"writeMetadata",
"(",
"byte",
"[",
"]",
"bytes",
")",
"throws",
"IOException",
"{",
"if",
"(",
"readonly",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"RO_MSG",
")",
";",
"}",
"if",
"(",
"bytes",
"."... | Writes metadata to this record file overwriting existing metadata.
@param bytes The metadata bytes to write
@throws IOException Thrown if an I/O error occurs during I/O seeks or
writes
@throws InvalidArgument Thrown if a write of anything other than the size
of the record is requested
@throws UnsupportedOperationExcep... | [
"Writes",
"metadata",
"to",
"this",
"record",
"file",
"overwriting",
"existing",
"metadata",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/record/RecordFile.java#L512-L525 |
145,736 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/xgmml/XGMMLExporter.java | XGMMLExporter.exportKam | public static void exportKam(final Kam kam, final KAMStore kAMStore,
String outputPath) throws KAMStoreException, FileNotFoundException {
if (nulls(kam, kAMStore, outputPath)) {
throw new InvalidArgument("argument(s) were null");
}
// Set up a writer to write the XGMML
... | java | public static void exportKam(final Kam kam, final KAMStore kAMStore,
String outputPath) throws KAMStoreException, FileNotFoundException {
if (nulls(kam, kAMStore, outputPath)) {
throw new InvalidArgument("argument(s) were null");
}
// Set up a writer to write the XGMML
... | [
"public",
"static",
"void",
"exportKam",
"(",
"final",
"Kam",
"kam",
",",
"final",
"KAMStore",
"kAMStore",
",",
"String",
"outputPath",
")",
"throws",
"KAMStoreException",
",",
"FileNotFoundException",
"{",
"if",
"(",
"nulls",
"(",
"kam",
",",
"kAMStore",
",",... | Export KAM to XGMML format using the KAM API.
@param kam {@link Kam} the kam to export to XGMML
@param kAMStore {@link KAMStore} the kam store to read kam details from
@param outputPath {@link String} the output path to write XGMML file to,
which can be null, in which case the kam's name will be used and it will
be wr... | [
"Export",
"KAM",
"to",
"XGMML",
"format",
"using",
"the",
"KAM",
"API",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/xgmml/XGMMLExporter.java#L83-L133 |
145,737 | ops4j/org.ops4j.pax.exam1 | pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java | ArgumentsBuilder.add | private void add( final List<String> arguments,
final Collection<String> argumentsToAdd )
{
if( argumentsToAdd != null && argumentsToAdd.size() > 0 )
{
arguments.addAll( argumentsToAdd );
}
} | java | private void add( final List<String> arguments,
final Collection<String> argumentsToAdd )
{
if( argumentsToAdd != null && argumentsToAdd.size() > 0 )
{
arguments.addAll( argumentsToAdd );
}
} | [
"private",
"void",
"add",
"(",
"final",
"List",
"<",
"String",
">",
"arguments",
",",
"final",
"Collection",
"<",
"String",
">",
"argumentsToAdd",
")",
"{",
"if",
"(",
"argumentsToAdd",
"!=",
"null",
"&&",
"argumentsToAdd",
".",
"size",
"(",
")",
">",
"0... | Adds a collection of arguments to a list of arguments by skipping null arguments.
@param arguments list to which the arguments should be added
@param argumentsToAdd arguments to be added (can be null or empty) | [
"Adds",
"a",
"collection",
"of",
"arguments",
"to",
"a",
"list",
"of",
"arguments",
"by",
"skipping",
"null",
"arguments",
"."
] | 7c8742208117ff91bd24bcd3a185d2d019f7000f | https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java#L139-L146 |
145,738 | ops4j/org.ops4j.pax.exam1 | pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java | ArgumentsBuilder.add | private void add( final List<String> arguments,
final String argument )
{
if( argument != null && argument.trim().length() > 0 )
{
arguments.add( argument );
}
} | java | private void add( final List<String> arguments,
final String argument )
{
if( argument != null && argument.trim().length() > 0 )
{
arguments.add( argument );
}
} | [
"private",
"void",
"add",
"(",
"final",
"List",
"<",
"String",
">",
"arguments",
",",
"final",
"String",
"argument",
")",
"{",
"if",
"(",
"argument",
"!=",
"null",
"&&",
"argument",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
">",
"0",
")",
"{"... | Adds an argumentto a list of arguments by skipping null or empty arguments.
@param arguments list to which the arguments should be added
@param argument argument to be added (can be null or empty) | [
"Adds",
"an",
"argumentto",
"a",
"list",
"of",
"arguments",
"by",
"skipping",
"null",
"or",
"empty",
"arguments",
"."
] | 7c8742208117ff91bd24bcd3a185d2d019f7000f | https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java#L154-L161 |
145,739 | ops4j/org.ops4j.pax.exam1 | pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java | ArgumentsBuilder.defaultArguments | private Collection<String> defaultArguments()
{
final List<String> arguments = new ArrayList<String>();
arguments.add( "--noConsole" );
arguments.add( "--noDownloadFeedback" );
if( !argsSetManually )
{
arguments.add( "--noArgs" );
}
String folder =... | java | private Collection<String> defaultArguments()
{
final List<String> arguments = new ArrayList<String>();
arguments.add( "--noConsole" );
arguments.add( "--noDownloadFeedback" );
if( !argsSetManually )
{
arguments.add( "--noArgs" );
}
String folder =... | [
"private",
"Collection",
"<",
"String",
">",
"defaultArguments",
"(",
")",
"{",
"final",
"List",
"<",
"String",
">",
"arguments",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"arguments",
".",
"add",
"(",
"\"--noConsole\"",
")",
";",
"argu... | Returns a collection of default Pax Runner arguments.
@return collection of default arguments | [
"Returns",
"a",
"collection",
"of",
"default",
"Pax",
"Runner",
"arguments",
"."
] | 7c8742208117ff91bd24bcd3a185d2d019f7000f | https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java#L168-L183 |
145,740 | geomajas/geomajas-project-client-gwt2 | plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java | WmsServerExtension.supportsFeatures | public void supportsFeatures(String baseUrl, WmsService.WmsVersion version, final String typeName,
final Callback<WfsFeatureTypeDescriptionInfo, String> callback) {
wmsService.describeLayer(baseUrl, typeName, version, new Callback<WmsDescribeLayerInfo, String>() {
@Override
public void onSuccess(WmsDescribe... | java | public void supportsFeatures(String baseUrl, WmsService.WmsVersion version, final String typeName,
final Callback<WfsFeatureTypeDescriptionInfo, String> callback) {
wmsService.describeLayer(baseUrl, typeName, version, new Callback<WmsDescribeLayerInfo, String>() {
@Override
public void onSuccess(WmsDescribe... | [
"public",
"void",
"supportsFeatures",
"(",
"String",
"baseUrl",
",",
"WmsService",
".",
"WmsVersion",
"version",
",",
"final",
"String",
"typeName",
",",
"final",
"Callback",
"<",
"WfsFeatureTypeDescriptionInfo",
",",
"String",
">",
"callback",
")",
"{",
"wmsServi... | Find out if a certain WMS layer has support for features through WFS. If successful the WFS configuration will be
returned.
@param baseUrl The base URL to the WMS service.
@param layerId The name of the layer.
@param callback Callback that will be given the answer through the associated layer configuration. | [
"Find",
"out",
"if",
"a",
"certain",
"WMS",
"layer",
"has",
"support",
"for",
"features",
"through",
"WFS",
".",
"If",
"successful",
"the",
"WFS",
"configuration",
"will",
"be",
"returned",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java#L87-L117 |
145,741 | geomajas/geomajas-project-client-gwt2 | plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java | WmsServerExtension.setHintValue | public <T> void setHintValue(Hint<T> hint, T value) {
if (value == null) {
throw new IllegalArgumentException("Null value passed.");
}
hintValues.put(hint, value);
} | java | public <T> void setHintValue(Hint<T> hint, T value) {
if (value == null) {
throw new IllegalArgumentException("Null value passed.");
}
hintValues.put(hint, value);
} | [
"public",
"<",
"T",
">",
"void",
"setHintValue",
"(",
"Hint",
"<",
"T",
">",
"hint",
",",
"T",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null value passed.\"",
")",
";",
"}",
"hin... | Apply a new value for a specific WMS hint.
@param hint The hint to change the value for.
@param value The new actual value. If the value is null, an IllegalArgumentException is thrown. | [
"Apply",
"a",
"new",
"value",
"for",
"a",
"specific",
"WMS",
"hint",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/wms/server-extension/src/main/java/org/geomajas/gwt2/plugin/wms/client/WmsServerExtension.java#L193-L198 |
145,742 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/providers/hubic/Hubic.java | Hubic.getSwiftClient | private synchronized Swift getSwiftClient()
throws CStorageException
{
if ( swiftClient != null ) {
return swiftClient;
}
// Only a single thread should create this client
String url = ENDPOINT + "/account/credentials";
RequestInvoker<CResponse> ri = ... | java | private synchronized Swift getSwiftClient()
throws CStorageException
{
if ( swiftClient != null ) {
return swiftClient;
}
// Only a single thread should create this client
String url = ENDPOINT + "/account/credentials";
RequestInvoker<CResponse> ri = ... | [
"private",
"synchronized",
"Swift",
"getSwiftClient",
"(",
")",
"throws",
"CStorageException",
"{",
"if",
"(",
"swiftClient",
"!=",
"null",
")",
"{",
"return",
"swiftClient",
";",
"}",
"// Only a single thread should create this client",
"String",
"url",
"=",
"ENDPOIN... | Return current swift client, or create one if none exists yet. The internal swift client does NOT retry its
requests. Retries are performed by this class.
@return The swift client | [
"Return",
"current",
"swift",
"client",
"or",
"create",
"one",
"if",
"none",
"exists",
"yet",
".",
"The",
"internal",
"swift",
"client",
"does",
"NOT",
"retry",
"its",
"requests",
".",
"Retries",
"are",
"performed",
"by",
"this",
"class",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/providers/hubic/Hubic.java#L94-L112 |
145,743 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/map/ViewPortImpl.java | ViewPortImpl.getBounds | public Bbox getBounds() {
double w = mapWidth * getResolution();
double h = mapHeight * getResolution();
double x = getPosition().getX() - w / 2;
double y = getPosition().getY() - h / 2;
return new Bbox(x, y, w, h);
} | java | public Bbox getBounds() {
double w = mapWidth * getResolution();
double h = mapHeight * getResolution();
double x = getPosition().getX() - w / 2;
double y = getPosition().getY() - h / 2;
return new Bbox(x, y, w, h);
} | [
"public",
"Bbox",
"getBounds",
"(",
")",
"{",
"double",
"w",
"=",
"mapWidth",
"*",
"getResolution",
"(",
")",
";",
"double",
"h",
"=",
"mapHeight",
"*",
"getResolution",
"(",
")",
";",
"double",
"x",
"=",
"getPosition",
"(",
")",
".",
"getX",
"(",
")... | Given the information in this ViewPort object, what is the currently visible area? This value is expressed in
world coordinates.
@return Returns the bounding box that covers the currently visible area on the map. | [
"Given",
"the",
"information",
"in",
"this",
"ViewPort",
"object",
"what",
"is",
"the",
"currently",
"visible",
"area?",
"This",
"value",
"is",
"expressed",
"in",
"world",
"coordinates",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/ViewPortImpl.java#L252-L258 |
145,744 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.cloneRoot | public Parse cloneRoot(final Parse node, final int parseIndex) {
final Parse c = (Parse) this.clone();
final Parse fc = c.parts.get(parseIndex);
c.parts.set(parseIndex, fc.clone(node));
return c;
} | java | public Parse cloneRoot(final Parse node, final int parseIndex) {
final Parse c = (Parse) this.clone();
final Parse fc = c.parts.get(parseIndex);
c.parts.set(parseIndex, fc.clone(node));
return c;
} | [
"public",
"Parse",
"cloneRoot",
"(",
"final",
"Parse",
"node",
",",
"final",
"int",
"parseIndex",
")",
"{",
"final",
"Parse",
"c",
"=",
"(",
"Parse",
")",
"this",
".",
"clone",
"(",
")",
";",
"final",
"Parse",
"fc",
"=",
"c",
".",
"parts",
".",
"ge... | Clones the right frontier of this root parse up to and including the
specified node.
@param node
The last node in the right frontier of the parse tree which should
be cloned.
@param parseIndex
The child index of the parse for this root node.
@return A clone of this root parse and its right frontier up to and
including... | [
"Clones",
"the",
"right",
"frontier",
"of",
"this",
"root",
"parse",
"up",
"to",
"and",
"including",
"the",
"specified",
"node",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L236-L241 |
145,745 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.addPreviousPunctuation | public void addPreviousPunctuation(final Parse punct) {
if (this.prevPunctSet == null) {
this.prevPunctSet = new TreeSet<Parse>();
}
this.prevPunctSet.add(punct);
} | java | public void addPreviousPunctuation(final Parse punct) {
if (this.prevPunctSet == null) {
this.prevPunctSet = new TreeSet<Parse>();
}
this.prevPunctSet.add(punct);
} | [
"public",
"void",
"addPreviousPunctuation",
"(",
"final",
"Parse",
"punct",
")",
"{",
"if",
"(",
"this",
".",
"prevPunctSet",
"==",
"null",
")",
"{",
"this",
".",
"prevPunctSet",
"=",
"new",
"TreeSet",
"<",
"Parse",
">",
"(",
")",
";",
"}",
"this",
"."... | Designates that the specified punctuation should is prior to this parse.
@param punct
The punctuation. | [
"Designates",
"that",
"the",
"specified",
"punctuation",
"should",
"is",
"prior",
"to",
"this",
"parse",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L290-L295 |
145,746 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.addNextPunctuation | public void addNextPunctuation(final Parse punct) {
if (this.nextPunctSet == null) {
this.nextPunctSet = new TreeSet<Parse>();
}
this.nextPunctSet.add(punct);
} | java | public void addNextPunctuation(final Parse punct) {
if (this.nextPunctSet == null) {
this.nextPunctSet = new TreeSet<Parse>();
}
this.nextPunctSet.add(punct);
} | [
"public",
"void",
"addNextPunctuation",
"(",
"final",
"Parse",
"punct",
")",
"{",
"if",
"(",
"this",
".",
"nextPunctSet",
"==",
"null",
")",
"{",
"this",
".",
"nextPunctSet",
"=",
"new",
"TreeSet",
"<",
"Parse",
">",
"(",
")",
";",
"}",
"this",
".",
... | Designates that the specified punctuation follows this parse.
@param punct
The punctuation set. | [
"Designates",
"that",
"the",
"specified",
"punctuation",
"follows",
"this",
"parse",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L314-L319 |
145,747 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.show | public void show() {
final StringBuffer sb = new StringBuffer(this.text.length() * 4);
show(sb);
System.out.println(sb);
} | java | public void show() {
final StringBuffer sb = new StringBuffer(this.text.length() * 4);
show(sb);
System.out.println(sb);
} | [
"public",
"void",
"show",
"(",
")",
"{",
"final",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
"this",
".",
"text",
".",
"length",
"(",
")",
"*",
"4",
")",
";",
"show",
"(",
"sb",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"sb... | Displays this parse using Penn Treebank-style formatting. | [
"Displays",
"this",
"parse",
"using",
"Penn",
"Treebank",
"-",
"style",
"formatting",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L427-L431 |
145,748 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.getTagSequenceProb | public double getTagSequenceProb() {
// System.err.println("Parse.getTagSequenceProb: "+type+" "+this);
if (this.parts.size() == 1
&& this.parts.get(0).type.equals(ShiftReduceParser.TOK_NODE)) {
// System.err.println(this+" "+prob);
return Math.log(this.prob);
} else if (this.parts.size(... | java | public double getTagSequenceProb() {
// System.err.println("Parse.getTagSequenceProb: "+type+" "+this);
if (this.parts.size() == 1
&& this.parts.get(0).type.equals(ShiftReduceParser.TOK_NODE)) {
// System.err.println(this+" "+prob);
return Math.log(this.prob);
} else if (this.parts.size(... | [
"public",
"double",
"getTagSequenceProb",
"(",
")",
"{",
"// System.err.println(\"Parse.getTagSequenceProb: \"+type+\" \"+this);",
"if",
"(",
"this",
".",
"parts",
".",
"size",
"(",
")",
"==",
"1",
"&&",
"this",
".",
"parts",
".",
"get",
"(",
"0",
")",
".",
"t... | Returns the probability associated with the pos-tag sequence assigned to
this parse.
@return The probability associated with the pos-tag sequence assigned to
this parse. | [
"Returns",
"the",
"probability",
"associated",
"with",
"the",
"pos",
"-",
"tag",
"sequence",
"assigned",
"to",
"this",
"parse",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L440-L456 |
145,749 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.setChild | public void setChild(final int index, final String label) {
final Parse newChild = (Parse) this.parts.get(index).clone();
newChild.setLabel(label);
this.parts.set(index, newChild);
} | java | public void setChild(final int index, final String label) {
final Parse newChild = (Parse) this.parts.get(index).clone();
newChild.setLabel(label);
this.parts.set(index, newChild);
} | [
"public",
"void",
"setChild",
"(",
"final",
"int",
"index",
",",
"final",
"String",
"label",
")",
"{",
"final",
"Parse",
"newChild",
"=",
"(",
"Parse",
")",
"this",
".",
"parts",
".",
"get",
"(",
"index",
")",
".",
"clone",
"(",
")",
";",
"newChild",... | Replaces the child at the specified index with a new child with the
specified label.
@param index
The index of the child to be replaced.
@param label
The label to be assigned to the new child. | [
"Replaces",
"the",
"child",
"at",
"the",
"specified",
"index",
"with",
"a",
"new",
"child",
"with",
"the",
"specified",
"label",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L542-L546 |
145,750 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.adjoin | public Parse adjoin(final Parse sister, final HeadRules rules) {
final Parse lastChild = this.parts.get(this.parts.size() - 1);
final Parse adjNode = new Parse(this.text,
new Span(lastChild.getSpan().getStart(), sister.getSpan().getEnd()),
lastChild.getType(), 1,
rules.getHead(new Parse[... | java | public Parse adjoin(final Parse sister, final HeadRules rules) {
final Parse lastChild = this.parts.get(this.parts.size() - 1);
final Parse adjNode = new Parse(this.text,
new Span(lastChild.getSpan().getStart(), sister.getSpan().getEnd()),
lastChild.getType(), 1,
rules.getHead(new Parse[... | [
"public",
"Parse",
"adjoin",
"(",
"final",
"Parse",
"sister",
",",
"final",
"HeadRules",
"rules",
")",
"{",
"final",
"Parse",
"lastChild",
"=",
"this",
".",
"parts",
".",
"get",
"(",
"this",
".",
"parts",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
... | Sister adjoins this node's last child and the specified sister node and
returns their new parent node. The new parent node replace this nodes last
child.
@param sister
The node to be adjoined.
@param rules
The head rules for the parser.
@return The new parent node of this node and the specified sister node. | [
"Sister",
"adjoins",
"this",
"node",
"s",
"last",
"child",
"and",
"the",
"specified",
"sister",
"node",
"and",
"returns",
"their",
"new",
"parent",
"node",
".",
"The",
"new",
"parent",
"node",
"replace",
"this",
"nodes",
"last",
"child",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L599-L615 |
145,751 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.pruneParse | public static void pruneParse(final Parse parse) {
final List<Parse> nodes = new LinkedList<Parse>();
nodes.add(parse);
while (nodes.size() != 0) {
final Parse node = nodes.remove(0);
final Parse[] children = node.getChildren();
if (children.length == 1
&& node.getType().equals(c... | java | public static void pruneParse(final Parse parse) {
final List<Parse> nodes = new LinkedList<Parse>();
nodes.add(parse);
while (nodes.size() != 0) {
final Parse node = nodes.remove(0);
final Parse[] children = node.getChildren();
if (children.length == 1
&& node.getType().equals(c... | [
"public",
"static",
"void",
"pruneParse",
"(",
"final",
"Parse",
"parse",
")",
"{",
"final",
"List",
"<",
"Parse",
">",
"nodes",
"=",
"new",
"LinkedList",
"<",
"Parse",
">",
"(",
")",
";",
"nodes",
".",
"add",
"(",
"parse",
")",
";",
"while",
"(",
... | Prune the specified sentence parse of vacuous productions.
@param parse
the parse tree | [
"Prune",
"the",
"specified",
"sentence",
"parse",
"of",
"vacuous",
"productions",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L826-L842 |
145,752 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.isFlat | public boolean isFlat() {
boolean flat = true;
for (int ci = 0; ci < this.parts.size(); ci++) {
flat &= this.parts.get(ci).isPosTag();
}
return flat;
} | java | public boolean isFlat() {
boolean flat = true;
for (int ci = 0; ci < this.parts.size(); ci++) {
flat &= this.parts.get(ci).isPosTag();
}
return flat;
} | [
"public",
"boolean",
"isFlat",
"(",
")",
"{",
"boolean",
"flat",
"=",
"true",
";",
"for",
"(",
"int",
"ci",
"=",
"0",
";",
"ci",
"<",
"this",
".",
"parts",
".",
"size",
"(",
")",
";",
"ci",
"++",
")",
"{",
"flat",
"&=",
"this",
".",
"parts",
... | Returns true if this constituent contains no sub-constituents.
@return true if this constituent contains no sub-constituents; false
otherwise. | [
"Returns",
"true",
"if",
"this",
"constituent",
"contains",
"no",
"sub",
"-",
"constituents",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L982-L988 |
145,753 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.getTagNodes | public Parse[] getTagNodes() {
final List<Parse> tags = new LinkedList<Parse>();
final List<Parse> nodes = new LinkedList<Parse>();
nodes.addAll(this.parts);
while (nodes.size() != 0) {
final Parse p = nodes.remove(0);
if (p.isPosTag()) {
tags.add(p);
} else {
nodes.add... | java | public Parse[] getTagNodes() {
final List<Parse> tags = new LinkedList<Parse>();
final List<Parse> nodes = new LinkedList<Parse>();
nodes.addAll(this.parts);
while (nodes.size() != 0) {
final Parse p = nodes.remove(0);
if (p.isPosTag()) {
tags.add(p);
} else {
nodes.add... | [
"public",
"Parse",
"[",
"]",
"getTagNodes",
"(",
")",
"{",
"final",
"List",
"<",
"Parse",
">",
"tags",
"=",
"new",
"LinkedList",
"<",
"Parse",
">",
"(",
")",
";",
"final",
"List",
"<",
"Parse",
">",
"nodes",
"=",
"new",
"LinkedList",
"<",
"Parse",
... | Returns the parse nodes which are children of this node and which are pos
tags.
@return the parse nodes which are children of this node and which are pos
tags. | [
"Returns",
"the",
"parse",
"nodes",
"which",
"are",
"children",
"of",
"this",
"node",
"and",
"which",
"are",
"pos",
"tags",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L1005-L1018 |
145,754 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java | Parse.addNames | public static void addNames(final String tag, final Span[] names,
final Parse[] tokens) {
for (final Span nameTokenSpan : names) {
final Parse startToken = tokens[nameTokenSpan.getStart()];
final Parse endToken = tokens[nameTokenSpan.getEnd() - 1];
final Parse commonParent = startToken.getCo... | java | public static void addNames(final String tag, final Span[] names,
final Parse[] tokens) {
for (final Span nameTokenSpan : names) {
final Parse startToken = tokens[nameTokenSpan.getStart()];
final Parse endToken = tokens[nameTokenSpan.getEnd() - 1];
final Parse commonParent = startToken.getCo... | [
"public",
"static",
"void",
"addNames",
"(",
"final",
"String",
"tag",
",",
"final",
"Span",
"[",
"]",
"names",
",",
"final",
"Parse",
"[",
"]",
"tokens",
")",
"{",
"for",
"(",
"final",
"Span",
"nameTokenSpan",
":",
"names",
")",
"{",
"final",
"Parse",... | Utility method to inserts named entities.
@param tag
the tags
@param names
the spans
@param tokens
the tokens | [
"Utility",
"method",
"to",
"inserts",
"named",
"entities",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/Parse.java#L1158-L1197 |
145,755 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/models/CMetadata.java | CMetadata.put | public void put( String key, String value )
throws IllegalArgumentException
{
if ( !key.matches( "[a-z-]*" ) ) {
throw new IllegalArgumentException( "The key must contains letters and dash" );
}
// Check value is ASCII
for ( char c : value.toCharArray() ) {
... | java | public void put( String key, String value )
throws IllegalArgumentException
{
if ( !key.matches( "[a-z-]*" ) ) {
throw new IllegalArgumentException( "The key must contains letters and dash" );
}
// Check value is ASCII
for ( char c : value.toCharArray() ) {
... | [
"public",
"void",
"put",
"(",
"String",
"key",
",",
"String",
"value",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"!",
"key",
".",
"matches",
"(",
"\"[a-z-]*\"",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The key must co... | Add a value in metadata
@param key The unique key linked to the value (must be lower case)
@param value The metadata value (must contains only ASCII characters)
@throws IllegalArgumentException If the key or value is badly formatted | [
"Add",
"a",
"value",
"in",
"metadata"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/models/CMetadata.java#L47-L60 |
145,756 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/document/features/DocumentModelResources.java | DocumentModelResources.loadResource | public static void loadResource(final String serializerId,
@SuppressWarnings("rawtypes") final Map<String, ArtifactSerializer> artifactSerializers,
final String resourcePath, final Map<String, Object> resources) {
final File resourceFile = new File(resourcePath);
if (resourceFile != null) {
f... | java | public static void loadResource(final String serializerId,
@SuppressWarnings("rawtypes") final Map<String, ArtifactSerializer> artifactSerializers,
final String resourcePath, final Map<String, Object> resources) {
final File resourceFile = new File(resourcePath);
if (resourceFile != null) {
f... | [
"public",
"static",
"void",
"loadResource",
"(",
"final",
"String",
"serializerId",
",",
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"final",
"Map",
"<",
"String",
",",
"ArtifactSerializer",
">",
"artifactSerializers",
",",
"final",
"String",
"resourcePath",
... | Load a resource by resourceId.
@param serializerId
the serializer id
@param artifactSerializers
the serializers in which to put the resource
@param resourcePath
the canonical path of the resource
@param resources
the map in which to put the resource | [
"Load",
"a",
"resource",
"by",
"resourceId",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/document/features/DocumentModelResources.java#L288-L312 |
145,757 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java | Dictionary.getBioDictionaryMatch | public List<String> getBioDictionaryMatch(final String[] tokens) {
final List<String> entitiesList = new ArrayList<String>();
String prefix = "-" + BioCodec.START;
String gazEntry = null;
String searchSpan = null;
// iterative over tokens from the beginning
for (int i = 0; i < tokens.length; i... | java | public List<String> getBioDictionaryMatch(final String[] tokens) {
final List<String> entitiesList = new ArrayList<String>();
String prefix = "-" + BioCodec.START;
String gazEntry = null;
String searchSpan = null;
// iterative over tokens from the beginning
for (int i = 0; i < tokens.length; i... | [
"public",
"List",
"<",
"String",
">",
"getBioDictionaryMatch",
"(",
"final",
"String",
"[",
"]",
"tokens",
")",
"{",
"final",
"List",
"<",
"String",
">",
"entitiesList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"String",
"prefix",
"=",... | Performs gazetteer match in a bio encoding.
@param tokens
the sentence
@return the list of named entities in the current sentence | [
"Performs",
"gazetteer",
"match",
"in",
"a",
"bio",
"encoding",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java#L120-L159 |
145,758 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java | Dictionary.getBilouDictionaryMatch | public List<String> getBilouDictionaryMatch(final String[] tokens) {
final List<String> entitiesList = new ArrayList<String>();
String prefix = "-" + BilouCodec.START;
String gazClass = null;
String searchSpan = null;
// iterative over tokens from the beginning
for (int i = 0; i < tokens.lengt... | java | public List<String> getBilouDictionaryMatch(final String[] tokens) {
final List<String> entitiesList = new ArrayList<String>();
String prefix = "-" + BilouCodec.START;
String gazClass = null;
String searchSpan = null;
// iterative over tokens from the beginning
for (int i = 0; i < tokens.lengt... | [
"public",
"List",
"<",
"String",
">",
"getBilouDictionaryMatch",
"(",
"final",
"String",
"[",
"]",
"tokens",
")",
"{",
"final",
"List",
"<",
"String",
">",
"entitiesList",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"String",
"prefix",
"=... | Performs gazetteer match in a bilou encoding.
@param tokens
the sentence
@return the list of named entities in the current sentence | [
"Performs",
"gazetteer",
"match",
"in",
"a",
"bilou",
"encoding",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java#L168-L211 |
145,759 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java | Dictionary.createSpan | private String createSpan(final String[] tokens, final int from,
final int to) {
String tokenSpan = "";
for (int i = from; i < to; i++) {
tokenSpan += tokens[i] + " ";
}
tokenSpan += tokens[to];
return tokenSpan;
} | java | private String createSpan(final String[] tokens, final int from,
final int to) {
String tokenSpan = "";
for (int i = from; i < to; i++) {
tokenSpan += tokens[i] + " ";
}
tokenSpan += tokens[to];
return tokenSpan;
} | [
"private",
"String",
"createSpan",
"(",
"final",
"String",
"[",
"]",
"tokens",
",",
"final",
"int",
"from",
",",
"final",
"int",
"to",
")",
"{",
"String",
"tokenSpan",
"=",
"\"\"",
";",
"for",
"(",
"int",
"i",
"=",
"from",
";",
"i",
"<",
"to",
";",... | Create a multi token entry search in the dictionary Map.
@param tokens
the sentence
@param from
the start index
@param to
the end index
@return the string representing the possibly multi token entity | [
"Create",
"a",
"multi",
"token",
"entry",
"search",
"in",
"the",
"dictionary",
"Map",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/resources/Dictionary.java#L224-L232 |
145,760 | geomajas/geomajas-project-client-gwt2 | plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/snap/SnapService.java | SnapService.update | public void update(Bbox mapBounds) {
for (final SnappingRule condition : snappingRules) {
condition.getSourceProvider().update(mapBounds);
condition.getSourceProvider().getSnappingSources(new GeometryArrayFunction() {
public void execute(Geometry[] geometries) {
condition.getAlgorithm().setGeometries(... | java | public void update(Bbox mapBounds) {
for (final SnappingRule condition : snappingRules) {
condition.getSourceProvider().update(mapBounds);
condition.getSourceProvider().getSnappingSources(new GeometryArrayFunction() {
public void execute(Geometry[] geometries) {
condition.getAlgorithm().setGeometries(... | [
"public",
"void",
"update",
"(",
"Bbox",
"mapBounds",
")",
"{",
"for",
"(",
"final",
"SnappingRule",
"condition",
":",
"snappingRules",
")",
"{",
"condition",
".",
"getSourceProvider",
"(",
")",
".",
"update",
"(",
"mapBounds",
")",
";",
"condition",
".",
... | Update the playing field for snapping, by providing a bounding box wherein the source providers should present
their geometries.
@param mapBounds The bounding box wherein we expect snapping to occur. Is usually the current view on the map. | [
"Update",
"the",
"playing",
"field",
"for",
"snapping",
"by",
"providing",
"a",
"bounding",
"box",
"wherein",
"the",
"source",
"providers",
"should",
"present",
"their",
"geometries",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/snap/SnapService.java#L126-L136 |
145,761 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/editable/checkbox/EditableCheckbox.java | EditableCheckbox.swap | public void swap()
{
if (modeContext.equals(ModeContext.VIEW_MODE))
{
modeContext = ModeContext.EDIT_MODE;
}
else
{
modeContext = ModeContext.VIEW_MODE;
}
} | java | public void swap()
{
if (modeContext.equals(ModeContext.VIEW_MODE))
{
modeContext = ModeContext.EDIT_MODE;
}
else
{
modeContext = ModeContext.VIEW_MODE;
}
} | [
"public",
"void",
"swap",
"(",
")",
"{",
"if",
"(",
"modeContext",
".",
"equals",
"(",
"ModeContext",
".",
"VIEW_MODE",
")",
")",
"{",
"modeContext",
"=",
"ModeContext",
".",
"EDIT_MODE",
";",
"}",
"else",
"{",
"modeContext",
"=",
"ModeContext",
".",
"VI... | Swap the ModeContext. | [
"Swap",
"the",
"ModeContext",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/editable/checkbox/EditableCheckbox.java#L151-L161 |
145,762 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/sign/in/SigninPanel.java | SigninPanel.newPasswordTextField | protected LabeledPasswordTextFieldPanel<String, T> newPasswordTextField(final String id,
final IModel<T> model)
{
final IModel<String> labelModel = ResourceModelFactory
.newResourceModel("global.password.label", this);
final IModel<String> placeholderModel = ResourceModelFactory
.newResourceModel("global.e... | java | protected LabeledPasswordTextFieldPanel<String, T> newPasswordTextField(final String id,
final IModel<T> model)
{
final IModel<String> labelModel = ResourceModelFactory
.newResourceModel("global.password.label", this);
final IModel<String> placeholderModel = ResourceModelFactory
.newResourceModel("global.e... | [
"protected",
"LabeledPasswordTextFieldPanel",
"<",
"String",
",",
"T",
">",
"newPasswordTextField",
"(",
"final",
"String",
"id",
",",
"final",
"IModel",
"<",
"T",
">",
"model",
")",
"{",
"final",
"IModel",
"<",
"String",
">",
"labelModel",
"=",
"ResourceModel... | Factory method for creating the EmailTextField for the password. This method is invoked in
the constructor from the derived classes and can be overridden so users can provide their own
version of a EmailTextField for the password.
@param id
the id
@param model
the model
@return the text field LabeledPasswordTextFieldP... | [
"Factory",
"method",
"for",
"creating",
"the",
"EmailTextField",
"for",
"the",
"password",
".",
"This",
"method",
"is",
"invoked",
"in",
"the",
"constructor",
"from",
"the",
"derived",
"classes",
"and",
"can",
"be",
"overridden",
"so",
"users",
"can",
"provide... | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/sign/in/SigninPanel.java#L121-L152 |
145,763 | netheosgithub/pcs_api | android/pcs-api-android/src/main/java/net/netheos/pcsapi/OAuth2AuthorizationActivity.java | OAuth2AuthorizationActivity.prepareWebView | private void prepareWebView() {
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setVisibility(View.VISIBLE);
mWebView.setWebViewClient(new WebViewClient() {
private boolean done = false;
@Override
public void onPageFinished(WebView view, String u... | java | private void prepareWebView() {
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setVisibility(View.VISIBLE);
mWebView.setWebViewClient(new WebViewClient() {
private boolean done = false;
@Override
public void onPageFinished(WebView view, String u... | [
"private",
"void",
"prepareWebView",
"(",
")",
"{",
"mWebView",
".",
"getSettings",
"(",
")",
".",
"setJavaScriptEnabled",
"(",
"true",
")",
";",
"mWebView",
".",
"setVisibility",
"(",
"View",
".",
"VISIBLE",
")",
";",
"mWebView",
".",
"setWebViewClient",
"(... | Adds a callback on the web view to catch the redirect URL | [
"Adds",
"a",
"callback",
"on",
"the",
"web",
"view",
"to",
"catch",
"the",
"redirect",
"URL"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/android/pcs-api-android/src/main/java/net/netheos/pcsapi/OAuth2AuthorizationActivity.java#L106-L123 |
145,764 | netheosgithub/pcs_api | android/pcs-api-android/src/main/java/net/netheos/pcsapi/OAuth2AuthorizationActivity.java | OAuth2AuthorizationActivity.getCredentials | private void getCredentials(final String code) {
new AsyncTask<Void, Void, Boolean>() {
@Override
protected Boolean doInBackground(Void... params) {
try {
mBootstrapper.getUserCredentials(code);
return true;
} catch... | java | private void getCredentials(final String code) {
new AsyncTask<Void, Void, Boolean>() {
@Override
protected Boolean doInBackground(Void... params) {
try {
mBootstrapper.getUserCredentials(code);
return true;
} catch... | [
"private",
"void",
"getCredentials",
"(",
"final",
"String",
"code",
")",
"{",
"new",
"AsyncTask",
"<",
"Void",
",",
"Void",
",",
"Boolean",
">",
"(",
")",
"{",
"@",
"Override",
"protected",
"Boolean",
"doInBackground",
"(",
"Void",
"...",
"params",
")",
... | Gets user credentials and save them
If OK, set result OK and come back to calling activity
@param code The code used to retrieve the OAuth access token | [
"Gets",
"user",
"credentials",
"and",
"save",
"them",
"If",
"OK",
"set",
"result",
"OK",
"and",
"come",
"back",
"to",
"calling",
"activity"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/android/pcs-api-android/src/main/java/net/netheos/pcsapi/OAuth2AuthorizationActivity.java#L132-L164 |
145,765 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Decoder.java | MG2Decoder.restoreAttribs | private float[] restoreAttribs(float precision, int[] intAttribs) {
int ae = CTM_ATTR_ELEMENT_COUNT;
int vc = intAttribs.length / ae;
float[] values = new float[intAttribs.length];
int[] prev = new int[ae];
for (int i = 0; i < vc; ++i) {
// Calculate inverse delta, an... | java | private float[] restoreAttribs(float precision, int[] intAttribs) {
int ae = CTM_ATTR_ELEMENT_COUNT;
int vc = intAttribs.length / ae;
float[] values = new float[intAttribs.length];
int[] prev = new int[ae];
for (int i = 0; i < vc; ++i) {
// Calculate inverse delta, an... | [
"private",
"float",
"[",
"]",
"restoreAttribs",
"(",
"float",
"precision",
",",
"int",
"[",
"]",
"intAttribs",
")",
"{",
"int",
"ae",
"=",
"CTM_ATTR_ELEMENT_COUNT",
";",
"int",
"vc",
"=",
"intAttribs",
".",
"length",
"/",
"ae",
";",
"float",
"[",
"]",
... | Calculate inverse derivatives of the vertex attributes. | [
"Calculate",
"inverse",
"derivatives",
"of",
"the",
"vertex",
"attributes",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Decoder.java#L143-L157 |
145,766 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Decoder.java | MG2Decoder.restoreUVCoords | private float[] restoreUVCoords(float precision, int[] intUVCoords) {
int vc = intUVCoords.length / CTM_UV_ELEMENT_COUNT;
float[] values = new float[intUVCoords.length];
int prevU = 0, prevV = 0;
for (int i = 0; i < vc; ++i) {
// Calculate inverse delta
int u = in... | java | private float[] restoreUVCoords(float precision, int[] intUVCoords) {
int vc = intUVCoords.length / CTM_UV_ELEMENT_COUNT;
float[] values = new float[intUVCoords.length];
int prevU = 0, prevV = 0;
for (int i = 0; i < vc; ++i) {
// Calculate inverse delta
int u = in... | [
"private",
"float",
"[",
"]",
"restoreUVCoords",
"(",
"float",
"precision",
",",
"int",
"[",
"]",
"intUVCoords",
")",
"{",
"int",
"vc",
"=",
"intUVCoords",
".",
"length",
"/",
"CTM_UV_ELEMENT_COUNT",
";",
"float",
"[",
"]",
"values",
"=",
"new",
"float",
... | Calculate inverse derivatives of the UV coordinates. | [
"Calculate",
"inverse",
"derivatives",
"of",
"the",
"UV",
"coordinates",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Decoder.java#L162-L179 |
145,767 | Danny02/JOpenCTM | src/main/java/darwin/jopenctm/compression/MG2Decoder.java | MG2Decoder.restoreNormals | private float[] restoreNormals(int[] intNormals, float[] vertices, int[] indices, float normalPrecision) {
// Calculate smooth normals (nominal normals)
float[] smoothNormals = calcSmoothNormals(vertices, indices);
float[] normals = new float[vertices.length];
int vc = vertices.length ... | java | private float[] restoreNormals(int[] intNormals, float[] vertices, int[] indices, float normalPrecision) {
// Calculate smooth normals (nominal normals)
float[] smoothNormals = calcSmoothNormals(vertices, indices);
float[] normals = new float[vertices.length];
int vc = vertices.length ... | [
"private",
"float",
"[",
"]",
"restoreNormals",
"(",
"int",
"[",
"]",
"intNormals",
",",
"float",
"[",
"]",
"vertices",
",",
"int",
"[",
"]",
"indices",
",",
"float",
"normalPrecision",
")",
"{",
"// Calculate smooth normals (nominal normals)",
"float",
"[",
"... | Convert the normals back to cartesian coordinates. | [
"Convert",
"the",
"normals",
"back",
"to",
"cartesian",
"coordinates",
"."
] | c55a2a2d166a55979190f1bb08214fc84c93008f | https://github.com/Danny02/JOpenCTM/blob/c55a2a2d166a55979190f1bb08214fc84c93008f/src/main/java/darwin/jopenctm/compression/MG2Decoder.java#L184-L231 |
145,768 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java | PhaseApplication.getCommandLineOptions | @Override
public List<Option> getCommandLineOptions() {
final List<Option> ret = new LinkedList<Option>();
String help;
help = TIME_HELP;
ret.add(new Option(SHORT_OPT_TIME, LONG_OPT_TIME, false, help));
help = WARNINGS_AS_ERRORS;
ret.add(new Option(null, LONG_OPT_P... | java | @Override
public List<Option> getCommandLineOptions() {
final List<Option> ret = new LinkedList<Option>();
String help;
help = TIME_HELP;
ret.add(new Option(SHORT_OPT_TIME, LONG_OPT_TIME, false, help));
help = WARNINGS_AS_ERRORS;
ret.add(new Option(null, LONG_OPT_P... | [
"@",
"Override",
"public",
"List",
"<",
"Option",
">",
"getCommandLineOptions",
"(",
")",
"{",
"final",
"List",
"<",
"Option",
">",
"ret",
"=",
"new",
"LinkedList",
"<",
"Option",
">",
"(",
")",
";",
"String",
"help",
";",
"help",
"=",
"TIME_HELP",
";"... | Returns a list of phase-agnostic command-line options.
@return List of options | [
"Returns",
"a",
"list",
"of",
"phase",
"-",
"agnostic",
"command",
"-",
"line",
"options",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L162-L180 |
145,769 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java | PhaseApplication.setOptions | private void setOptions(RuntimeConfiguration rc) {
if (hasOption(SHORT_OPT_TIME)) {
rc.setTime(true);
}
if (hasOption(LONG_OPT_DEBUG)) {
rc.setDebug(true);
}
if (hasOption(LONG_OPT_VERBOSE)) {
rc.setVerbose(true);
}
if (hasOptio... | java | private void setOptions(RuntimeConfiguration rc) {
if (hasOption(SHORT_OPT_TIME)) {
rc.setTime(true);
}
if (hasOption(LONG_OPT_DEBUG)) {
rc.setDebug(true);
}
if (hasOption(LONG_OPT_VERBOSE)) {
rc.setVerbose(true);
}
if (hasOptio... | [
"private",
"void",
"setOptions",
"(",
"RuntimeConfiguration",
"rc",
")",
"{",
"if",
"(",
"hasOption",
"(",
"SHORT_OPT_TIME",
")",
")",
"{",
"rc",
".",
"setTime",
"(",
"true",
")",
";",
"}",
"if",
"(",
"hasOption",
"(",
"LONG_OPT_DEBUG",
")",
")",
"{",
... | Sets the phase-agnostic runtime configuration. | [
"Sets",
"the",
"phase",
"-",
"agnostic",
"runtime",
"configuration",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L244-L257 |
145,770 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java | PhaseApplication.stageOutput | protected void stageOutput(final String output) {
boolean print = getPhaseConfiguration().isVerbose();
if (print) {
output(INDENT + INDENT + output);
}
} | java | protected void stageOutput(final String output) {
boolean print = getPhaseConfiguration().isVerbose();
if (print) {
output(INDENT + INDENT + output);
}
} | [
"protected",
"void",
"stageOutput",
"(",
"final",
"String",
"output",
")",
"{",
"boolean",
"print",
"=",
"getPhaseConfiguration",
"(",
")",
".",
"isVerbose",
"(",
")",
";",
"if",
"(",
"print",
")",
"{",
"output",
"(",
"INDENT",
"+",
"INDENT",
"+",
"outpu... | Prints stage output with two levels of indentation.
@param output Output | [
"Prints",
"stage",
"output",
"with",
"two",
"levels",
"of",
"indentation",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L297-L302 |
145,771 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java | PhaseApplication.createDirectoryArtifact | protected final File createDirectoryArtifact(final File outputDirectory,
final String artifact) {
// Construct artifact path based on output directory
String path = asPath(outputDirectory.getAbsolutePath(), artifact);
final File ret = new File(path);
if (!ret.isDirectory()) {... | java | protected final File createDirectoryArtifact(final File outputDirectory,
final String artifact) {
// Construct artifact path based on output directory
String path = asPath(outputDirectory.getAbsolutePath(), artifact);
final File ret = new File(path);
if (!ret.isDirectory()) {... | [
"protected",
"final",
"File",
"createDirectoryArtifact",
"(",
"final",
"File",
"outputDirectory",
",",
"final",
"String",
"artifact",
")",
"{",
"// Construct artifact path based on output directory",
"String",
"path",
"=",
"asPath",
"(",
"outputDirectory",
".",
"getAbsolu... | Creates the directory artifact, failing if the directory couldn't be
created.
@param outputDirectory Phase output directory
@param artifact Directory artifact to be created | [
"Creates",
"the",
"directory",
"artifact",
"failing",
"if",
"the",
"directory",
"couldn",
"t",
"be",
"created",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L331-L344 |
145,772 | OpenBEL/openbel-framework | org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java | PhaseApplication.harness | protected static void harness(PhaseApplication phase) {
try {
phase.start();
phase.stop();
phase.end();
} catch (BELRuntimeException bre) {
err.println(bre.getUserFacingMessage());
systemExit(bre.getExitCode());
} catch (OutOfMemoryErro... | java | protected static void harness(PhaseApplication phase) {
try {
phase.start();
phase.stop();
phase.end();
} catch (BELRuntimeException bre) {
err.println(bre.getUserFacingMessage());
systemExit(bre.getExitCode());
} catch (OutOfMemoryErro... | [
"protected",
"static",
"void",
"harness",
"(",
"PhaseApplication",
"phase",
")",
"{",
"try",
"{",
"phase",
".",
"start",
"(",
")",
";",
"phase",
".",
"stop",
"(",
")",
";",
"phase",
".",
"end",
"(",
")",
";",
"}",
"catch",
"(",
"BELRuntimeException",
... | Directs phase application lifecycle.
@param phase Phase application | [
"Directs",
"phase",
"application",
"lifecycle",
"."
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseApplication.java#L420-L438 |
145,773 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java | URIBuilder.queryParameters | public URIBuilder queryParameters( Map<String, String> queryParams )
{
this.queryParams.clear();
this.queryParams.putAll( queryParams );
return this;
} | java | public URIBuilder queryParameters( Map<String, String> queryParams )
{
this.queryParams.clear();
this.queryParams.putAll( queryParams );
return this;
} | [
"public",
"URIBuilder",
"queryParameters",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"queryParams",
")",
"{",
"this",
".",
"queryParams",
".",
"clear",
"(",
")",
";",
"this",
".",
"queryParams",
".",
"putAll",
"(",
"queryParams",
")",
";",
"return",
... | Set the query parameters
@param queryParams The parameters to use in the URI (not url encoded)
@return The builder | [
"Set",
"the",
"query",
"parameters"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java#L86-L91 |
145,774 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java | URIBuilder.addParameter | public URIBuilder addParameter( String key, String value )
{
if ( key != null && value != null ) {
queryParams.put( key, value );
}
return this;
} | java | public URIBuilder addParameter( String key, String value )
{
if ( key != null && value != null ) {
queryParams.put( key, value );
}
return this;
} | [
"public",
"URIBuilder",
"addParameter",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"if",
"(",
"key",
"!=",
"null",
"&&",
"value",
"!=",
"null",
")",
"{",
"queryParams",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}",
"return",
"this... | Add a single query parameter. Parameter is ignored if it has null value.
@param key The parameter key (not url encoded)
@param value The parameter value (not url encoded)
@return The builder | [
"Add",
"a",
"single",
"query",
"parameter",
".",
"Parameter",
"is",
"ignored",
"if",
"it",
"has",
"null",
"value",
"."
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java#L115-L122 |
145,775 | netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java | URIBuilder.build | public URI build()
{
StringBuilder builder = new StringBuilder( baseURI.toString() );
builder.append( path.toString() );
if ( queryParams != null && !queryParams.isEmpty() ) {
builder.append( queryParameters() );
}
return URI.create( builder.toString() );
} | java | public URI build()
{
StringBuilder builder = new StringBuilder( baseURI.toString() );
builder.append( path.toString() );
if ( queryParams != null && !queryParams.isEmpty() ) {
builder.append( queryParameters() );
}
return URI.create( builder.toString() );
} | [
"public",
"URI",
"build",
"(",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
"baseURI",
".",
"toString",
"(",
")",
")",
";",
"builder",
".",
"append",
"(",
"path",
".",
"toString",
"(",
")",
")",
";",
"if",
"(",
"queryParams",... | Build the URI with the given informations
@return The URI | [
"Build",
"the",
"URI",
"with",
"the",
"given",
"informations"
] | 20691e52e144014f99ca75cb7dedc7ba0c18586c | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java#L135-L143 |
145,776 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java | Normalizer.convertNonCanonicalStrings | public static void convertNonCanonicalStrings(final List<Token> sentence,
final String lang) {
// System.err.println((int)'’');
for (final Token token : sentence) {
token.setTokenValue(
apostrophe.matcher(token.getTokenValue()).replaceAll("'"));
token.setTokenValue(
ellipsi... | java | public static void convertNonCanonicalStrings(final List<Token> sentence,
final String lang) {
// System.err.println((int)'’');
for (final Token token : sentence) {
token.setTokenValue(
apostrophe.matcher(token.getTokenValue()).replaceAll("'"));
token.setTokenValue(
ellipsi... | [
"public",
"static",
"void",
"convertNonCanonicalStrings",
"(",
"final",
"List",
"<",
"Token",
">",
"sentence",
",",
"final",
"String",
"lang",
")",
"{",
"// System.err.println((int)'’');",
"for",
"(",
"final",
"Token",
"token",
":",
"sentence",
")",
"{",
"token"... | Converts non-unicode and other strings into their unicode counterparts.
@param sentence
the list of tokens
@param lang
the language | [
"Converts",
"non",
"-",
"unicode",
"and",
"other",
"strings",
"into",
"their",
"unicode",
"counterparts",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java#L82-L117 |
145,777 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java | Normalizer.normalizeQuotes | public static void normalizeQuotes(final List<Token> sentence,
final String lang) {
for (final Token token : sentence) {
if (lang.equalsIgnoreCase("en")) {
token.setTokenValue(
leftSingleQuote.matcher(token.getTokenValue()).replaceAll("`"));
token.setTokenValue(
... | java | public static void normalizeQuotes(final List<Token> sentence,
final String lang) {
for (final Token token : sentence) {
if (lang.equalsIgnoreCase("en")) {
token.setTokenValue(
leftSingleQuote.matcher(token.getTokenValue()).replaceAll("`"));
token.setTokenValue(
... | [
"public",
"static",
"void",
"normalizeQuotes",
"(",
"final",
"List",
"<",
"Token",
">",
"sentence",
",",
"final",
"String",
"lang",
")",
"{",
"for",
"(",
"final",
"Token",
"token",
":",
"sentence",
")",
"{",
"if",
"(",
"lang",
".",
"equalsIgnoreCase",
"(... | Normalizes non-ambiguous quotes according to language and corpus.
@param sentence
the list of tokens
@param lang
the language | [
"Normalizes",
"non",
"-",
"ambiguous",
"quotes",
"according",
"to",
"language",
"and",
"corpus",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java#L127-L151 |
145,778 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java | Normalizer.normalizeDoubleQuotes | public static void normalizeDoubleQuotes(final List<Token> sentence,
final String lang) {
boolean isLeft = true;
for (int i = 0; i < sentence.size(); i++) {
if (lang.equalsIgnoreCase("en")) {
final Matcher doubleAsciiQuoteMatcher = doubleAsciiQuote
.matcher(sentence.get(i).getTo... | java | public static void normalizeDoubleQuotes(final List<Token> sentence,
final String lang) {
boolean isLeft = true;
for (int i = 0; i < sentence.size(); i++) {
if (lang.equalsIgnoreCase("en")) {
final Matcher doubleAsciiQuoteMatcher = doubleAsciiQuote
.matcher(sentence.get(i).getTo... | [
"public",
"static",
"void",
"normalizeDoubleQuotes",
"(",
"final",
"List",
"<",
"Token",
">",
"sentence",
",",
"final",
"String",
"lang",
")",
"{",
"boolean",
"isLeft",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sentence",
".",... | Normalizes double and ambiguous quotes according to language and corpus.
@param sentence
the list of tokens
@param lang
the language | [
"Normalizes",
"double",
"and",
"ambiguous",
"quotes",
"according",
"to",
"language",
"and",
"corpus",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/Normalizer.java#L161-L191 |
145,779 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java | NonPeriodBreaker.segmenterExceptions | public String[] segmenterExceptions(final String[] lines) {
final List<String> sentences = new ArrayList<>();
for (final String line : lines) {
final String segmentedLine = segmenterNonBreaker(line);
final String[] lineSentences = segmentedLine.split("\n");
for (final String lineSentence : lin... | java | public String[] segmenterExceptions(final String[] lines) {
final List<String> sentences = new ArrayList<>();
for (final String line : lines) {
final String segmentedLine = segmenterNonBreaker(line);
final String[] lineSentences = segmentedLine.split("\n");
for (final String lineSentence : lin... | [
"public",
"String",
"[",
"]",
"segmenterExceptions",
"(",
"final",
"String",
"[",
"]",
"lines",
")",
"{",
"final",
"List",
"<",
"String",
">",
"sentences",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"String",
"line",
":",
"lines... | Segment the rest of the text taking into account some exceptions for
periods as sentence breakers. It decides when a period marks an end of
sentence.
@param lines
the segmented sentences so far
@return all the segmented sentences | [
"Segment",
"the",
"rest",
"of",
"the",
"text",
"taking",
"into",
"account",
"some",
"exceptions",
"for",
"periods",
"as",
"sentence",
"breakers",
".",
"It",
"decides",
"when",
"a",
"period",
"marks",
"an",
"end",
"of",
"sentence",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java#L188-L198 |
145,780 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java | NonPeriodBreaker.segmenterNonBreaker | private String segmenterNonBreaker(String line) {
// these are fine because they do not affect offsets
line = line.trim();
line = RuleBasedTokenizer.doubleSpaces.matcher(line).replaceAll(" ");
final StringBuilder sb = new StringBuilder();
String segmentedText = "";
int i;
final String[] wor... | java | private String segmenterNonBreaker(String line) {
// these are fine because they do not affect offsets
line = line.trim();
line = RuleBasedTokenizer.doubleSpaces.matcher(line).replaceAll(" ");
final StringBuilder sb = new StringBuilder();
String segmentedText = "";
int i;
final String[] wor... | [
"private",
"String",
"segmenterNonBreaker",
"(",
"String",
"line",
")",
"{",
"// these are fine because they do not affect offsets",
"line",
"=",
"line",
".",
"trim",
"(",
")",
";",
"line",
"=",
"RuleBasedTokenizer",
".",
"doubleSpaces",
".",
"matcher",
"(",
"line",... | This function implements exceptions for periods as sentence breakers. It
decides when a period induces a new sentence or not.
@param line
the text to be processed
@return segmented text (with newlines included) | [
"This",
"function",
"implements",
"exceptions",
"for",
"periods",
"as",
"sentence",
"breakers",
".",
"It",
"decides",
"when",
"a",
"period",
"induces",
"a",
"new",
"sentence",
"or",
"not",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java#L208-L249 |
145,781 | ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java | NonPeriodBreaker.TokenizerNonBreaker | public String TokenizerNonBreaker(String line) {
// these are fine because they do not affect offsets
line = line.trim();
line = RuleBasedTokenizer.doubleSpaces.matcher(line).replaceAll(" ");
final StringBuilder sb = new StringBuilder();
String tokenizedText = "";
int i;
final String[] word... | java | public String TokenizerNonBreaker(String line) {
// these are fine because they do not affect offsets
line = line.trim();
line = RuleBasedTokenizer.doubleSpaces.matcher(line).replaceAll(" ");
final StringBuilder sb = new StringBuilder();
String tokenizedText = "";
int i;
final String[] word... | [
"public",
"String",
"TokenizerNonBreaker",
"(",
"String",
"line",
")",
"{",
"// these are fine because they do not affect offsets",
"line",
"=",
"line",
".",
"trim",
"(",
")",
";",
"line",
"=",
"RuleBasedTokenizer",
".",
"doubleSpaces",
".",
"matcher",
"(",
"line",
... | It decides when periods do not need to be tokenized.
@param line
the sentence to be tokenized
@return line | [
"It",
"decides",
"when",
"periods",
"do",
"not",
"need",
"to",
"be",
"tokenized",
"."
] | c817fa1e40e96ed15fc79d22c3a7c25f1a40d172 | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/tok/NonPeriodBreaker.java#L258-L295 |
145,782 | OpenBEL/openbel-framework | org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/expansion/ExpansionRule.java | ExpansionRule.attachExpansionRuleCitation | protected void attachExpansionRuleCitation(Statement statement) {
AnnotationGroup ag = new AnnotationGroup();
Citation citation = getInstance().createCitation(getName());
citation.setType(CitationType.OTHER);
citation.setReference(getName());
ag.setCitation(citation);
sta... | java | protected void attachExpansionRuleCitation(Statement statement) {
AnnotationGroup ag = new AnnotationGroup();
Citation citation = getInstance().createCitation(getName());
citation.setType(CitationType.OTHER);
citation.setReference(getName());
ag.setCitation(citation);
sta... | [
"protected",
"void",
"attachExpansionRuleCitation",
"(",
"Statement",
"statement",
")",
"{",
"AnnotationGroup",
"ag",
"=",
"new",
"AnnotationGroup",
"(",
")",
";",
"Citation",
"citation",
"=",
"getInstance",
"(",
")",
".",
"createCitation",
"(",
"getName",
"(",
... | Attach citation for expansion rule
@param statement {@link Statement} | [
"Attach",
"citation",
"for",
"expansion",
"rule"
] | 149f80b1d6eabb15ab15815b6f745b0afa9fd2d3 | https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/expansion/ExpansionRule.java#L84-L91 |
145,783 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java | SwapFragmentPanel.onSwapToEdit | public void onSwapToEdit(final AjaxRequestTarget target, final Form<?> form)
{
swapFragments();
if (target != null)
{
Animate.slideUpAndDown(view, target);
}
else
{
LOGGER.error(
"AjaxRequestTarget is null on method SwapFragmentPanel#onSwapToEdit(AjaxRequestTarget, Form)");
}
modeContext = Mo... | java | public void onSwapToEdit(final AjaxRequestTarget target, final Form<?> form)
{
swapFragments();
if (target != null)
{
Animate.slideUpAndDown(view, target);
}
else
{
LOGGER.error(
"AjaxRequestTarget is null on method SwapFragmentPanel#onSwapToEdit(AjaxRequestTarget, Form)");
}
modeContext = Mo... | [
"public",
"void",
"onSwapToEdit",
"(",
"final",
"AjaxRequestTarget",
"target",
",",
"final",
"Form",
"<",
"?",
">",
"form",
")",
"{",
"swapFragments",
"(",
")",
";",
"if",
"(",
"target",
"!=",
"null",
")",
"{",
"Animate",
".",
"slideUpAndDown",
"(",
"vie... | Swaps from the view fragment to the edit fragment.
@param target
the target
@param form
the form | [
"Swaps",
"from",
"the",
"view",
"fragment",
"to",
"the",
"edit",
"fragment",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java#L125-L138 |
145,784 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java | SwapFragmentPanel.onSwapToView | public void onSwapToView(final AjaxRequestTarget target, final Form<?> form)
{
if (target != null)
{
Animate.slideUpAndDown(edit, target);
}
else
{
LOGGER.error(
"AjaxRequestTarget is null on method SwapFragmentPanel#onSwapToView(AjaxRequestTarget, Form)");
}
swapFragments();
modeContext = Mo... | java | public void onSwapToView(final AjaxRequestTarget target, final Form<?> form)
{
if (target != null)
{
Animate.slideUpAndDown(edit, target);
}
else
{
LOGGER.error(
"AjaxRequestTarget is null on method SwapFragmentPanel#onSwapToView(AjaxRequestTarget, Form)");
}
swapFragments();
modeContext = Mo... | [
"public",
"void",
"onSwapToView",
"(",
"final",
"AjaxRequestTarget",
"target",
",",
"final",
"Form",
"<",
"?",
">",
"form",
")",
"{",
"if",
"(",
"target",
"!=",
"null",
")",
"{",
"Animate",
".",
"slideUpAndDown",
"(",
"edit",
",",
"target",
")",
";",
"... | Swaps from the edit fragment to the view fragment.
@param target
the target
@param form
the form | [
"Swaps",
"from",
"the",
"edit",
"fragment",
"to",
"the",
"view",
"fragment",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java#L148-L161 |
145,785 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java | SwapFragmentPanel.swapFragments | private void swapFragments()
{
final Fragment fragment = view;
view.replaceWith(edit);
view = edit;
edit = fragment;
} | java | private void swapFragments()
{
final Fragment fragment = view;
view.replaceWith(edit);
view = edit;
edit = fragment;
} | [
"private",
"void",
"swapFragments",
"(",
")",
"{",
"final",
"Fragment",
"fragment",
"=",
"view",
";",
"view",
".",
"replaceWith",
"(",
"edit",
")",
";",
"view",
"=",
"edit",
";",
"edit",
"=",
"fragment",
";",
"}"
] | Swap the fragments. | [
"Swap",
"the",
"fragments",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java#L166-L172 |
145,786 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java | SwapFragmentPanel.swapFragments | protected void swapFragments(final AjaxRequestTarget target, final Form<?> form)
{
if (modeContext.equals(ModeContext.VIEW_MODE))
{
onSwapToEdit(target, form);
}
else
{
onSwapToView(target, form);
}
} | java | protected void swapFragments(final AjaxRequestTarget target, final Form<?> form)
{
if (modeContext.equals(ModeContext.VIEW_MODE))
{
onSwapToEdit(target, form);
}
else
{
onSwapToView(target, form);
}
} | [
"protected",
"void",
"swapFragments",
"(",
"final",
"AjaxRequestTarget",
"target",
",",
"final",
"Form",
"<",
"?",
">",
"form",
")",
"{",
"if",
"(",
"modeContext",
".",
"equals",
"(",
"ModeContext",
".",
"VIEW_MODE",
")",
")",
"{",
"onSwapToEdit",
"(",
"ta... | Swaps the fragments.
@param target
the target
@param form
the form | [
"Swaps",
"the",
"fragments",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/swap/SwapFragmentPanel.java#L182-L192 |
145,787 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java | HtmlGroup.add | public void add(HtmlObject child) {
asDivPanel().add(child);
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(this);
}
child.setLeft(child.getLeft());
child.setTop(child.getTop());
} | java | public void add(HtmlObject child) {
asDivPanel().add(child);
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(this);
}
child.setLeft(child.getLeft());
child.setTop(child.getTop());
} | [
"public",
"void",
"add",
"(",
"HtmlObject",
"child",
")",
"{",
"asDivPanel",
"(",
")",
".",
"add",
"(",
"child",
")",
";",
"if",
"(",
"child",
"instanceof",
"AbstractHtmlObject",
")",
"{",
"(",
"(",
"AbstractHtmlObject",
")",
"child",
")",
".",
"setParen... | Add a new child HtmlObject to the list. Note that using this method children are added to the back of the list,
which means that they are added on top of the visibility stack and thus may obscure other children. Take this
order into account when adding children.
@param child
The actual child to add. | [
"Add",
"a",
"new",
"child",
"HtmlObject",
"to",
"the",
"list",
".",
"Note",
"that",
"using",
"this",
"method",
"children",
"are",
"added",
"to",
"the",
"back",
"of",
"the",
"list",
"which",
"means",
"that",
"they",
"are",
"added",
"on",
"top",
"of",
"t... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java#L102-L109 |
145,788 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java | HtmlGroup.insert | public void insert(HtmlObject child, int beforeIndex) {
asDivPanel().insertBefore(child, beforeIndex);
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(this);
}
child.setLeft(child.getLeft());
child.setTop(child.getTop());
} | java | public void insert(HtmlObject child, int beforeIndex) {
asDivPanel().insertBefore(child, beforeIndex);
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(this);
}
child.setLeft(child.getLeft());
child.setTop(child.getTop());
} | [
"public",
"void",
"insert",
"(",
"HtmlObject",
"child",
",",
"int",
"beforeIndex",
")",
"{",
"asDivPanel",
"(",
")",
".",
"insertBefore",
"(",
"child",
",",
"beforeIndex",
")",
";",
"if",
"(",
"child",
"instanceof",
"AbstractHtmlObject",
")",
"{",
"(",
"("... | Insert a new child HtmlObject in the list at a certain index. The position will determine it's place in the
visibility stack, where the first element lies at the bottom and the last element on top.
@param child
The actual child to add.
@param beforeIndex
The position in the list where this child should end up. | [
"Insert",
"a",
"new",
"child",
"HtmlObject",
"in",
"the",
"list",
"at",
"a",
"certain",
"index",
".",
"The",
"position",
"will",
"determine",
"it",
"s",
"place",
"in",
"the",
"visibility",
"stack",
"where",
"the",
"first",
"element",
"lies",
"at",
"the",
... | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java#L120-L127 |
145,789 | geomajas/geomajas-project-client-gwt2 | impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java | HtmlGroup.remove | public boolean remove(HtmlObject child) {
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(null);
}
return asDivPanel().remove(child);
} | java | public boolean remove(HtmlObject child) {
if (child instanceof AbstractHtmlObject) {
((AbstractHtmlObject) child).setParent(null);
}
return asDivPanel().remove(child);
} | [
"public",
"boolean",
"remove",
"(",
"HtmlObject",
"child",
")",
"{",
"if",
"(",
"child",
"instanceof",
"AbstractHtmlObject",
")",
"{",
"(",
"(",
"AbstractHtmlObject",
")",
"child",
")",
".",
"setParent",
"(",
"null",
")",
";",
"}",
"return",
"asDivPanel",
... | Remove a child element from the list.
@param child
The actual child to remove.
@return Returns true or false indicating whether or not removal was successful. | [
"Remove",
"a",
"child",
"element",
"from",
"the",
"list",
"."
] | bd8d7904e861fa80522eed7b83c4ea99844180c7 | https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/render/dom/container/HtmlGroup.java#L136-L141 |
145,790 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java | PageParametersExtensions.getPageParametersMap | public static Map<String, List<StringValue>> getPageParametersMap(final Request request)
{
final Map<String, List<StringValue>> map = new HashMap<>();
addToParameters(request.getRequestParameters(), map);
addToParameters(request.getQueryParameters(), map);
addToParameters(request.getPostParameters(), map);
r... | java | public static Map<String, List<StringValue>> getPageParametersMap(final Request request)
{
final Map<String, List<StringValue>> map = new HashMap<>();
addToParameters(request.getRequestParameters(), map);
addToParameters(request.getQueryParameters(), map);
addToParameters(request.getPostParameters(), map);
r... | [
"public",
"static",
"Map",
"<",
"String",
",",
"List",
"<",
"StringValue",
">",
">",
"getPageParametersMap",
"(",
"final",
"Request",
"request",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"StringValue",
">",
">",
"map",
"=",
"new",
"HashM... | Gets a map with all parameters. Looks in the query, request and post parameters.
@param request
the request
@return a map with all parameters. | [
"Gets",
"a",
"map",
"with",
"all",
"parameters",
".",
"Looks",
"in",
"the",
"query",
"request",
"and",
"post",
"parameters",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java#L159-L166 |
145,791 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java | PageParametersExtensions.getParameter | public static String getParameter(final PageParameters parameters, final String name)
{
return getString(parameters.get(name));
} | java | public static String getParameter(final PageParameters parameters, final String name)
{
return getString(parameters.get(name));
} | [
"public",
"static",
"String",
"getParameter",
"(",
"final",
"PageParameters",
"parameters",
",",
"final",
"String",
"name",
")",
"{",
"return",
"getString",
"(",
"parameters",
".",
"get",
"(",
"name",
")",
")",
";",
"}"
] | Gets the parameter or returns null if it does not exists or is empty.
@param parameters
the parameters
@param name
the name
@return the parameter or returns null if it does not exists or is empty. | [
"Gets",
"the",
"parameter",
"or",
"returns",
"null",
"if",
"it",
"does",
"not",
"exists",
"or",
"is",
"empty",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java#L177-L180 |
145,792 | astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java | PageParametersExtensions.toInteger | public static Integer toInteger(final StringValue stringValue)
{
Integer value = null;
if (isNotNullOrEmpty(stringValue))
{
try
{
value = stringValue.toInteger();
}
catch (final StringValueConversionException e)
{
LOGGER.error("Error by converting the given StringValue.", e);
}
}
re... | java | public static Integer toInteger(final StringValue stringValue)
{
Integer value = null;
if (isNotNullOrEmpty(stringValue))
{
try
{
value = stringValue.toInteger();
}
catch (final StringValueConversionException e)
{
LOGGER.error("Error by converting the given StringValue.", e);
}
}
re... | [
"public",
"static",
"Integer",
"toInteger",
"(",
"final",
"StringValue",
"stringValue",
")",
"{",
"Integer",
"value",
"=",
"null",
";",
"if",
"(",
"isNotNullOrEmpty",
"(",
"stringValue",
")",
")",
"{",
"try",
"{",
"value",
"=",
"stringValue",
".",
"toInteger... | Gets the Integer object or returns null if the given StringValue is null or empty.
@param stringValue
the user id as StringValue object
@return the Integer object or null if the given StringValue is null or empty. | [
"Gets",
"the",
"Integer",
"object",
"or",
"returns",
"null",
"if",
"the",
"given",
"StringValue",
"is",
"null",
"or",
"empty",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java#L311-L326 |
145,793 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.newAddTabButtonLabel | protected Label newAddTabButtonLabel(final String id, final IModel<String> model)
{
return ComponentFactory.newLabel(id, model);
} | java | protected Label newAddTabButtonLabel(final String id, final IModel<String> model)
{
return ComponentFactory.newLabel(id, model);
} | [
"protected",
"Label",
"newAddTabButtonLabel",
"(",
"final",
"String",
"id",
",",
"final",
"IModel",
"<",
"String",
">",
"model",
")",
"{",
"return",
"ComponentFactory",
".",
"newLabel",
"(",
"id",
",",
"model",
")",
";",
"}"
] | Factory method for creating the new label of the button.
@param id
the id
@param model
the model
@return the new label of the button. | [
"Factory",
"method",
"for",
"creating",
"the",
"new",
"label",
"of",
"the",
"button",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L315-L318 |
145,794 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.newCloseLink | protected WebMarkupContainer newCloseLink(final String linkId, final int index)
{
return new AjaxFallbackLink<Void>(linkId)
{
private static final long serialVersionUID = 1L;
@Override
public void onClick(final AjaxRequestTarget target)
{
if (target != null)
{
onRemoveTab(target, index);... | java | protected WebMarkupContainer newCloseLink(final String linkId, final int index)
{
return new AjaxFallbackLink<Void>(linkId)
{
private static final long serialVersionUID = 1L;
@Override
public void onClick(final AjaxRequestTarget target)
{
if (target != null)
{
onRemoveTab(target, index);... | [
"protected",
"WebMarkupContainer",
"newCloseLink",
"(",
"final",
"String",
"linkId",
",",
"final",
"int",
"index",
")",
"{",
"return",
"new",
"AjaxFallbackLink",
"<",
"Void",
">",
"(",
"linkId",
")",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",... | Factory method for links used to close the selected tab.
The created component is attached to the following markup. Label component with id: title
will be added for you by the tabbed panel.
<pre>
<a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span>&... | [
"Factory",
"method",
"for",
"links",
"used",
"to",
"close",
"the",
"selected",
"tab",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L392-L409 |
145,795 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.newLink | protected WebMarkupContainer newLink(final String linkId, final int index)
{
return new AjaxFallbackLink<Void>(linkId)
{
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public void onClick(final AjaxRequestTarget targe... | java | protected WebMarkupContainer newLink(final String linkId, final int index)
{
return new AjaxFallbackLink<Void>(linkId)
{
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public void onClick(final AjaxRequestTarget targe... | [
"protected",
"WebMarkupContainer",
"newLink",
"(",
"final",
"String",
"linkId",
",",
"final",
"int",
"index",
")",
"{",
"return",
"new",
"AjaxFallbackLink",
"<",
"Void",
">",
"(",
"linkId",
")",
"{",
"/** The Constant serialVersionUID. */",
"private",
"static",
"f... | Factory method for links used to switch between tabs.
The created component is attached to the following markup. Label component with id: title
will be added for you by the tabbed panel.
<pre>
<a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span><... | [
"Factory",
"method",
"for",
"links",
"used",
"to",
"switch",
"between",
"tabs",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L463-L486 |
145,796 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.onRemoveTab | public void onRemoveTab(final AjaxRequestTarget target, final int index)
{
final int tabSize = getTabs().size();
// there have to be at least one tab on the ajaxTabbedPanel...
if ((2 <= tabSize) && (index < tabSize))
{
setSelectedTab(index);
getTabs().remove(index);
target.add(this);
}
} | java | public void onRemoveTab(final AjaxRequestTarget target, final int index)
{
final int tabSize = getTabs().size();
// there have to be at least one tab on the ajaxTabbedPanel...
if ((2 <= tabSize) && (index < tabSize))
{
setSelectedTab(index);
getTabs().remove(index);
target.add(this);
}
} | [
"public",
"void",
"onRemoveTab",
"(",
"final",
"AjaxRequestTarget",
"target",
",",
"final",
"int",
"index",
")",
"{",
"final",
"int",
"tabSize",
"=",
"getTabs",
"(",
")",
".",
"size",
"(",
")",
";",
"// there have to be at least one tab on the ajaxTabbedPanel...",
... | On remove tab removes the tab of the given index.
@param target
the target
@param index
the index | [
"On",
"remove",
"tab",
"removes",
"the",
"tab",
"of",
"the",
"given",
"index",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L752-L762 |
145,797 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.onRemoveTab | public void onRemoveTab(final AjaxRequestTarget target, final T tab)
{
final int index = getTabs().indexOf(tab);
if (0 <= index)
{
onRemoveTab(target, index);
}
} | java | public void onRemoveTab(final AjaxRequestTarget target, final T tab)
{
final int index = getTabs().indexOf(tab);
if (0 <= index)
{
onRemoveTab(target, index);
}
} | [
"public",
"void",
"onRemoveTab",
"(",
"final",
"AjaxRequestTarget",
"target",
",",
"final",
"T",
"tab",
")",
"{",
"final",
"int",
"index",
"=",
"getTabs",
"(",
")",
".",
"indexOf",
"(",
"tab",
")",
";",
"if",
"(",
"0",
"<=",
"index",
")",
"{",
"onRem... | On remove tab removes the given tab if it does exists.
@param target
the target
@param tab
the tab | [
"On",
"remove",
"tab",
"removes",
"the",
"given",
"tab",
"if",
"it",
"does",
"exists",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L772-L779 |
145,798 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java | AjaxAddableTabbedPanel.setCurrentTab | private void setCurrentTab(final int index)
{
if (this.currentTab == index)
{
// already current
return;
}
this.currentTab = index;
final Component component;
if ((currentTab == -1) || tabs.isEmpty() || !getVisiblityCache().isVisible(currentTab))
{
// no tabs or the current tab is not visible
... | java | private void setCurrentTab(final int index)
{
if (this.currentTab == index)
{
// already current
return;
}
this.currentTab = index;
final Component component;
if ((currentTab == -1) || tabs.isEmpty() || !getVisiblityCache().isVisible(currentTab))
{
// no tabs or the current tab is not visible
... | [
"private",
"void",
"setCurrentTab",
"(",
"final",
"int",
"index",
")",
"{",
"if",
"(",
"this",
".",
"currentTab",
"==",
"index",
")",
"{",
"// already current",
"return",
";",
"}",
"this",
".",
"currentTab",
"=",
"index",
";",
"final",
"Component",
"compon... | Sets the current tab.
@param index
the new current tab | [
"Sets",
"the",
"current",
"tab",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L787-L824 |
145,799 | astrapi69/jaulp-wicket | jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/dropdown/OptGroupDropDownChoice.java | OptGroupDropDownChoice.isNewGroup | private boolean isNewGroup(final OptGroup currentOptGroup)
{
return (last == null) || !currentOptGroup.getLabel().equals(last.getLabel());
} | java | private boolean isNewGroup(final OptGroup currentOptGroup)
{
return (last == null) || !currentOptGroup.getLabel().equals(last.getLabel());
} | [
"private",
"boolean",
"isNewGroup",
"(",
"final",
"OptGroup",
"currentOptGroup",
")",
"{",
"return",
"(",
"last",
"==",
"null",
")",
"||",
"!",
"currentOptGroup",
".",
"getLabel",
"(",
")",
".",
"equals",
"(",
"last",
".",
"getLabel",
"(",
")",
")",
";",... | Checks if it is new group.
@param currentOptGroup
the current opt group
@return true, if is new group | [
"Checks",
"if",
"it",
"is",
"new",
"group",
"."
] | 85d74368d00abd9bb97659b5794e38c0f8a013d4 | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/form/dropdown/OptGroupDropDownChoice.java#L267-L270 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.