repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/parser/ParseUtils.java
ParseUtils.getTemplateMarker
private static String getTemplateMarker(String str) throws IllegalStateException{ Pattern p = Pattern.compile("\\{\\{(.*?)\\}\\}", Pattern.DOTALL); Matcher matcher = p.matcher(str); String tpl = null; while(matcher.find()) { if(tpl!=null){ throw new IllegalStateException("More than one template i...
java
private static String getTemplateMarker(String str) throws IllegalStateException{ Pattern p = Pattern.compile("\\{\\{(.*?)\\}\\}", Pattern.DOTALL); Matcher matcher = p.matcher(str); String tpl = null; while(matcher.find()) { if(tpl!=null){ throw new IllegalStateException("More than one template i...
[ "private", "static", "String", "getTemplateMarker", "(", "String", "str", ")", "throws", "IllegalStateException", "{", "Pattern", "p", "=", "Pattern", ".", "compile", "(", "\"\\\\{\\\\{(.*?)\\\\}\\\\}\"", ",", "Pattern", ".", "DOTALL", ")", ";", "Matcher", "matche...
Returns the template marker of the sentence. Assumes hat a sentence has only ONE marker. If the sentence contains more than one template, an IllegalStateException is thrown. If the String does not contain a marker, null is returned @param str A string with template markers @return the template marker
[ "Returns", "the", "template", "marker", "of", "the", "sentence", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/parser/ParseUtils.java#L143-L156
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/writer/TimedSQLFileWriter.java
TimedSQLFileWriter.process
@Override public void process(final Task<Diff> task) throws ConfigurationException, IOException, SQLConsumerException { long startTime = System.currentTimeMillis(); TaskTypes type = task.getTaskType(); if (type == TaskTypes.TASK_FULL || type == TaskTypes.TASK_PARTIAL_FIRST) { this.sqlEncoder.init(); ...
java
@Override public void process(final Task<Diff> task) throws ConfigurationException, IOException, SQLConsumerException { long startTime = System.currentTimeMillis(); TaskTypes type = task.getTaskType(); if (type == TaskTypes.TASK_FULL || type == TaskTypes.TASK_PARTIAL_FIRST) { this.sqlEncoder.init(); ...
[ "@", "Override", "public", "void", "process", "(", "final", "Task", "<", "Diff", ">", "task", ")", "throws", "ConfigurationException", ",", "IOException", ",", "SQLConsumerException", "{", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ...
This method will process the given DiffTask and send him to the specified output. @param task DiffTask @throws ConfigurationException if problems occurred while initializing the components @throws IOException if problems occurred while writing the output (to file or archive) @throws SQLConsumerException if problems...
[ "This", "method", "will", "process", "the", "given", "DiffTask", "and", "send", "him", "to", "the", "specified", "output", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/writer/TimedSQLFileWriter.java#L114-L145
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/Task.java
Task.add
public void add(final D data) { this.container.add(data); // if the size of data is known add the value to the task size if (data instanceof ISizeable) { this.byteSize += ((ISizeable) data).byteSize(); } }
java
public void add(final D data) { this.container.add(data); // if the size of data is known add the value to the task size if (data instanceof ISizeable) { this.byteSize += ((ISizeable) data).byteSize(); } }
[ "public", "void", "add", "(", "final", "D", "data", ")", "{", "this", ".", "container", ".", "add", "(", "data", ")", ";", "// if the size of data is known add the value to the task size", "if", "(", "data", "instanceof", "ISizeable", ")", "{", "this", ".", "b...
Adds data to this task. @param data Reference to the data object.
[ "Adds", "data", "to", "this", "task", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/Task.java#L155-L163
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexGenerator.java
IndexGenerator.generate
public void generate() throws WikiApiException { Indexer data = null; try { data = new Indexer(config); System.out.println("GENERATING INDEX STARTED"); long bufferSize = config.getBufferSize(); Revision rev; long count = 0; long last = 0, now, start = System.currentTimeMillis(); Iterator<...
java
public void generate() throws WikiApiException { Indexer data = null; try { data = new Indexer(config); System.out.println("GENERATING INDEX STARTED"); long bufferSize = config.getBufferSize(); Revision rev; long count = 0; long last = 0, now, start = System.currentTimeMillis(); Iterator<...
[ "public", "void", "generate", "(", ")", "throws", "WikiApiException", "{", "Indexer", "data", "=", "null", ";", "try", "{", "data", "=", "new", "Indexer", "(", "config", ")", ";", "System", ".", "out", ".", "println", "(", "\"GENERATING INDEX STARTED\"", "...
Starts the generation of the indices. @throws WikiApiException if an error occurs
[ "Starts", "the", "generation", "of", "the", "indices", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexGenerator.java#L62-L104
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexGenerator.java
IndexGenerator.load
private static Properties load(String configFilePath) { Properties props = new Properties(); BufferedInputStream fis = null; try { File configFile = new File(configFilePath); fis = new BufferedInputStream(new FileInputStream(configFile)); props.load(fis); } catch(IOException ...
java
private static Properties load(String configFilePath) { Properties props = new Properties(); BufferedInputStream fis = null; try { File configFile = new File(configFilePath); fis = new BufferedInputStream(new FileInputStream(configFile)); props.load(fis); } catch(IOException ...
[ "private", "static", "Properties", "load", "(", "String", "configFilePath", ")", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "BufferedInputStream", "fis", "=", "null", ";", "try", "{", "File", "configFile", "=", "new", "File", "(", ...
Load a properties file from the classpath @param propsName path to the configuration file @return Properties the properties object containing the configuration data @throws IOException if an error occurs while accessing the configuration file
[ "Load", "a", "properties", "file", "from", "the", "classpath" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexGenerator.java#L213-L236
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/RevisionPair.java
RevisionPair.getInlineTextPairs
public List<TextPair> getInlineTextPairs(boolean markTemplates) { List<TextPair> pairList = new ArrayList<TextPair>(); try { //extract sections List<ExtractedSection> beforeSections=null; List<ExtractedSection> afterSections=null; if(markTemplates){ //add inline marker for the template ...
java
public List<TextPair> getInlineTextPairs(boolean markTemplates) { List<TextPair> pairList = new ArrayList<TextPair>(); try { //extract sections List<ExtractedSection> beforeSections=null; List<ExtractedSection> afterSections=null; if(markTemplates){ //add inline marker for the template ...
[ "public", "List", "<", "TextPair", ">", "getInlineTextPairs", "(", "boolean", "markTemplates", ")", "{", "List", "<", "TextPair", ">", "pairList", "=", "new", "ArrayList", "<", "TextPair", ">", "(", ")", ";", "try", "{", "//extract sections\r", "List", "<", ...
Returns the text "around the given template" and returns the corresponding text in the other pair part of the RevisionPair. Currently, this is done section-based. On TextPairPart contains a section with a template and the other contains the corresponding section after the template has been deleted (in deleteTemplate m...
[ "Returns", "the", "text", "around", "the", "given", "template", "and", "returns", "the", "corresponding", "text", "in", "the", "other", "pair", "part", "of", "the", "RevisionPair", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/RevisionPair.java#L99-L145
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/RevisionPair.java
RevisionPair.containsIgnoreCase
private boolean containsIgnoreCase(List<String> stringlist, String match) { for (String s : stringlist) { if (s.equalsIgnoreCase(match)) { return true; } } return false; }
java
private boolean containsIgnoreCase(List<String> stringlist, String match) { for (String s : stringlist) { if (s.equalsIgnoreCase(match)) { return true; } } return false; }
[ "private", "boolean", "containsIgnoreCase", "(", "List", "<", "String", ">", "stringlist", ",", "String", "match", ")", "{", "for", "(", "String", "s", ":", "stringlist", ")", "{", "if", "(", "s", ".", "equalsIgnoreCase", "(", "match", ")", ")", "{", "...
Checks if a list of string contains a String while ignoring case @param stringlist a list of string @param match the string to look for @return true, if the list contains the string, false else
[ "Checks", "if", "a", "list", "of", "string", "contains", "a", "String", "while", "ignoring", "case" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/RevisionPair.java#L154-L161
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.listToLowerCase
private List<String> listToLowerCase(List<String> l) { List<String> result = new ArrayList<String>(); for (String s : l) { result.add(s.toLowerCase()); } return result; }
java
private List<String> listToLowerCase(List<String> l) { List<String> result = new ArrayList<String>(); for (String s : l) { result.add(s.toLowerCase()); } return result; }
[ "private", "List", "<", "String", ">", "listToLowerCase", "(", "List", "<", "String", ">", "l", ")", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "s", ":", "l", ")", ...
Converts a List of Strings to lower case Strings.
[ "Converts", "a", "List", "of", "Strings", "to", "lower", "case", "Strings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L247-L255
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.configurationInfo
@Override public String configurationInfo() { StringBuilder result = new StringBuilder(); result.append("MediaWikiParser configuration:\n"); result.append("ParserClass: " + this.getClass() + "\n"); result.append("ShowImageText: " + showImageText + "\n"); result.append("DeleteTags: " + deleteTags + "\n"); ...
java
@Override public String configurationInfo() { StringBuilder result = new StringBuilder(); result.append("MediaWikiParser configuration:\n"); result.append("ParserClass: " + this.getClass() + "\n"); result.append("ShowImageText: " + showImageText + "\n"); result.append("DeleteTags: " + deleteTags + "\n"); ...
[ "@", "Override", "public", "String", "configurationInfo", "(", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "result", ".", "append", "(", "\"MediaWikiParser configuration:\\n\"", ")", ";", "result", ".", "append", "(", "\"Pars...
Look at the MediaWikiParser interface for a description...
[ "Look", "at", "the", "MediaWikiParser", "interface", "for", "a", "description", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L260-L297
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.runConfig
private boolean runConfig() { if (lineSeparator == null) { logger.debug("Set lineSeparator"); return false; } if (categoryIdentifers == null) { logger.warn("Set categoryIdentifers"); return false; } if (languageIdentifers == null) { logger.warn("Set languageIdentifers"); return false;...
java
private boolean runConfig() { if (lineSeparator == null) { logger.debug("Set lineSeparator"); return false; } if (categoryIdentifers == null) { logger.warn("Set categoryIdentifers"); return false; } if (languageIdentifers == null) { logger.warn("Set languageIdentifers"); return false;...
[ "private", "boolean", "runConfig", "(", ")", "{", "if", "(", "lineSeparator", "==", "null", ")", "{", "logger", ".", "debug", "(", "\"Set lineSeparator\"", ")", ";", "return", "false", ";", "}", "if", "(", "categoryIdentifers", "==", "null", ")", "{", "l...
Checks if the configuration is runnable.
[ "Checks", "if", "the", "configuration", "is", "runnable", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L302-L330
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.deleteTOCTag
private void deleteTOCTag(SpanManager sm) { // delete all __TOC__ from SRC int temp = 0; while ((temp = sm.indexOf("__TOC__", temp)) != -1) { sm.delete(temp, temp + 2 + 3 + 2); } // delete all __NOTOC__ from SRC temp = 0; while ((temp = sm.indexOf("__NOTOC__", temp)) != -1) { sm.delete(temp, t...
java
private void deleteTOCTag(SpanManager sm) { // delete all __TOC__ from SRC int temp = 0; while ((temp = sm.indexOf("__TOC__", temp)) != -1) { sm.delete(temp, temp + 2 + 3 + 2); } // delete all __NOTOC__ from SRC temp = 0; while ((temp = sm.indexOf("__NOTOC__", temp)) != -1) { sm.delete(temp, t...
[ "private", "void", "deleteTOCTag", "(", "SpanManager", "sm", ")", "{", "// delete all __TOC__ from SRC", "int", "temp", "=", "0", ";", "while", "(", "(", "temp", "=", "sm", ".", "indexOf", "(", "\"__TOC__\"", ",", "temp", ")", ")", "!=", "-", "1", ")", ...
Deleteing ALL TOC Tags
[ "Deleteing", "ALL", "TOC", "Tags" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L475-L490
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.getLineType
private lineType getLineType(SpanManager sm, Span lineSpan) { switch (lineSpan.charAt(0, sm)) { case '{': if (lineSpan.charAt(1, sm) == '|') { return lineType.TABLE; } else { return lineType.PARAGRAPH; } case '=': if (lineSpan.length() > 2 && sm.charAt(lineSpan.getEnd() - 1...
java
private lineType getLineType(SpanManager sm, Span lineSpan) { switch (lineSpan.charAt(0, sm)) { case '{': if (lineSpan.charAt(1, sm) == '|') { return lineType.TABLE; } else { return lineType.PARAGRAPH; } case '=': if (lineSpan.length() > 2 && sm.charAt(lineSpan.getEnd() - 1...
[ "private", "lineType", "getLineType", "(", "SpanManager", "sm", ",", "Span", "lineSpan", ")", "{", "switch", "(", "lineSpan", ".", "charAt", "(", "0", ",", "sm", ")", ")", "{", "case", "'", "'", ":", "if", "(", "lineSpan", ".", "charAt", "(", "1", ...
Retunrns the Type of a line, this is mainly done by the First Char of the Line...
[ "Retunrns", "the", "Type", "of", "a", "line", "this", "is", "mainly", "done", "by", "the", "First", "Char", "of", "the", "Line", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L662-L748
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.getSectionLevel
private int getSectionLevel(SpanManager sm, Span sectionNameSpan) { int begin = sectionNameSpan.getStart(); int end = sectionNameSpan.getEnd(); int level = 0; try { while ((sm.charAt(begin + level) == '=') && (sm.charAt(end - 1 - level) == '=')) { level++; } } catch (StringIndexOutOfBo...
java
private int getSectionLevel(SpanManager sm, Span sectionNameSpan) { int begin = sectionNameSpan.getStart(); int end = sectionNameSpan.getEnd(); int level = 0; try { while ((sm.charAt(begin + level) == '=') && (sm.charAt(end - 1 - level) == '=')) { level++; } } catch (StringIndexOutOfBo...
[ "private", "int", "getSectionLevel", "(", "SpanManager", "sm", ",", "Span", "sectionNameSpan", ")", "{", "int", "begin", "=", "sectionNameSpan", ".", "getStart", "(", ")", ";", "int", "end", "=", "sectionNameSpan", ".", "getEnd", "(", ")", ";", "int", "lev...
Returns the number of Equality Chars which are used to specify the level of the Section.
[ "Returns", "the", "number", "of", "Equality", "Chars", "which", "are", "used", "to", "specify", "the", "level", "of", "the", "Section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L754-L780
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.buildSectionStructure
private SectionContainer buildSectionStructure(List<SectionContent> scl) { SectionContainer result = new SectionContainer(0); for (SectionContent sContent : scl) { int contentLevel = sContent.getLevel(); SectionContainer sContainer = result; // get the right SectionContainer or create it for (int c...
java
private SectionContainer buildSectionStructure(List<SectionContent> scl) { SectionContainer result = new SectionContainer(0); for (SectionContent sContent : scl) { int contentLevel = sContent.getLevel(); SectionContainer sContainer = result; // get the right SectionContainer or create it for (int c...
[ "private", "SectionContainer", "buildSectionStructure", "(", "List", "<", "SectionContent", ">", "scl", ")", "{", "SectionContainer", "result", "=", "new", "SectionContainer", "(", "0", ")", ";", "for", "(", "SectionContent", "sContent", ":", "scl", ")", "{", ...
Takes a list of SectionContent and returns a SectionContainer with the given SectionContent s in the right structure.
[ "Takes", "a", "list", "of", "SectionContent", "and", "returns", "a", "SectionContainer", "with", "the", "given", "SectionContent", "s", "in", "the", "right", "structure", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L786-L838
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.getLinkNameSpace
private static String getLinkNameSpace(String target) { int pos = target.indexOf(':'); if (pos == -1) { return null; } else { return target.substring(0, pos).replace('_', ' ').trim() .toLowerCase(); } }
java
private static String getLinkNameSpace(String target) { int pos = target.indexOf(':'); if (pos == -1) { return null; } else { return target.substring(0, pos).replace('_', ' ').trim() .toLowerCase(); } }
[ "private", "static", "String", "getLinkNameSpace", "(", "String", "target", ")", "{", "int", "pos", "=", "target", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "pos", "==", "-", "1", ")", "{", "return", "null", ";", "}", "else", "{", "return...
Returns the LOWERCASE NameSpace of the link target
[ "Returns", "the", "LOWERCASE", "NameSpace", "of", "the", "link", "target" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L1506-L1518
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.parseQuotedSpans
private void parseQuotedSpans(SpanManager sm, Span s, List<Span> quotedSpans, String quotation) { final int qlen = quotation.length(); // get the start position int start = sm.indexOf(quotation, s.getStart(), s.getEnd()); while (start != -1) { // get the end position int end = sm.indexOf(quotati...
java
private void parseQuotedSpans(SpanManager sm, Span s, List<Span> quotedSpans, String quotation) { final int qlen = quotation.length(); // get the start position int start = sm.indexOf(quotation, s.getStart(), s.getEnd()); while (start != -1) { // get the end position int end = sm.indexOf(quotati...
[ "private", "void", "parseQuotedSpans", "(", "SpanManager", "sm", ",", "Span", "s", ",", "List", "<", "Span", ">", "quotedSpans", ",", "String", "quotation", ")", "{", "final", "int", "qlen", "=", "quotation", ".", "length", "(", ")", ";", "// get the start...
Searches the Range given by the Span s for the double occurence of "quotation" and puts the results in the List quotedSpans. The Quotation tags will be deleted. @param sm , the Source in which will be searched @param s , the range in which will be searched @param quotedSpans , the List where the Spans will be placed, ...
[ "Searches", "the", "Range", "given", "by", "the", "Span", "s", "for", "the", "double", "occurence", "of", "quotation", "and", "puts", "the", "results", "in", "the", "List", "quotedSpans", ".", "The", "Quotation", "tags", "will", "be", "deleted", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L1669-L1706
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.parseBoldAndItalicSpans
private void parseBoldAndItalicSpans(SpanManager sm, Span line, List<Span> boldSpans, List<Span> italicSpans) { // Das suchen nach BOLD und ITALIC muss in den Jeweiligen // Zeilen geschenhen, da ein LineSeparator immer BOLD und // Italic Tags schliesst. // Bold Spans parseQuotedSpans(sm, line, boldSpans,...
java
private void parseBoldAndItalicSpans(SpanManager sm, Span line, List<Span> boldSpans, List<Span> italicSpans) { // Das suchen nach BOLD und ITALIC muss in den Jeweiligen // Zeilen geschenhen, da ein LineSeparator immer BOLD und // Italic Tags schliesst. // Bold Spans parseQuotedSpans(sm, line, boldSpans,...
[ "private", "void", "parseBoldAndItalicSpans", "(", "SpanManager", "sm", ",", "Span", "line", ",", "List", "<", "Span", ">", "boldSpans", ",", "List", "<", "Span", ">", "italicSpans", ")", "{", "// Das suchen nach BOLD und ITALIC muss in den Jeweiligen", "// Zeilen ges...
Searches a line for Bold and Italic quotations, this has to be done linewhise.
[ "Searches", "a", "line", "for", "Bold", "and", "Italic", "quotations", "this", "has", "to", "be", "done", "linewhise", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L1712-L1753
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.parseContentElement
@Override public ContentElement parseContentElement(String src) { SpanManager sm = new SpanManager(src); ContentElementParsingParameters cepp = new ContentElementParsingParameters(); parseImagesAndInternalLinks(sm, cepp.linkSpans, cepp.links); LinkedList<Span> lineSpans = new LinkedList<Span>(); getLineSp...
java
@Override public ContentElement parseContentElement(String src) { SpanManager sm = new SpanManager(src); ContentElementParsingParameters cepp = new ContentElementParsingParameters(); parseImagesAndInternalLinks(sm, cepp.linkSpans, cepp.links); LinkedList<Span> lineSpans = new LinkedList<Span>(); getLineSp...
[ "@", "Override", "public", "ContentElement", "parseContentElement", "(", "String", "src", ")", "{", "SpanManager", "sm", "=", "new", "SpanManager", "(", "src", ")", ";", "ContentElementParsingParameters", "cepp", "=", "new", "ContentElementParsingParameters", "(", "...
Building a ContentElement from a String
[ "Building", "a", "ContentElement", "from", "a", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L1763-L1775
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.parseContentElement
private ContentElement parseContentElement(SpanManager sm, ContentElementParsingParameters cepp, Span lineSpan) { LinkedList<Span> lineSpans = new LinkedList<Span>(); lineSpans.add(lineSpan); return parseContentElement(sm, cepp, lineSpans, new ContentElement()); }
java
private ContentElement parseContentElement(SpanManager sm, ContentElementParsingParameters cepp, Span lineSpan) { LinkedList<Span> lineSpans = new LinkedList<Span>(); lineSpans.add(lineSpan); return parseContentElement(sm, cepp, lineSpans, new ContentElement()); }
[ "private", "ContentElement", "parseContentElement", "(", "SpanManager", "sm", ",", "ContentElementParsingParameters", "cepp", ",", "Span", "lineSpan", ")", "{", "LinkedList", "<", "Span", ">", "lineSpans", "=", "new", "LinkedList", "<", "Span", ">", "(", ")", ";...
Building a ContentElement from a single line.
[ "Building", "a", "ContentElement", "from", "a", "single", "line", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L1780-L1786
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.sortLinks
private static List<Link> sortLinks(List<Link> links) { List<Link> result = new ArrayList<Link>(); for (Link l : links) { int pos = 0; while (pos < result.size() && l.getPos().getStart() > result.get(pos).getPos() .getStart()) { pos++; } result.add(pos, l); } return result; }
java
private static List<Link> sortLinks(List<Link> links) { List<Link> result = new ArrayList<Link>(); for (Link l : links) { int pos = 0; while (pos < result.size() && l.getPos().getStart() > result.get(pos).getPos() .getStart()) { pos++; } result.add(pos, l); } return result; }
[ "private", "static", "List", "<", "Link", ">", "sortLinks", "(", "List", "<", "Link", ">", "links", ")", "{", "List", "<", "Link", ">", "result", "=", "new", "ArrayList", "<", "Link", ">", "(", ")", ";", "for", "(", "Link", "l", ":", "links", ")"...
Sorts the Links...
[ "Sorts", "the", "Links", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L2028-L2043
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.sortTemplates
private static List<Template> sortTemplates(List<Template> templates) { List<Template> result = new ArrayList<Template>(); for (Template t : templates) { int pos = 0; while (pos < result.size() && t.getPos().getStart() > result.get(pos).getPos() .getStart()) { pos++; } result.add(p...
java
private static List<Template> sortTemplates(List<Template> templates) { List<Template> result = new ArrayList<Template>(); for (Template t : templates) { int pos = 0; while (pos < result.size() && t.getPos().getStart() > result.get(pos).getPos() .getStart()) { pos++; } result.add(p...
[ "private", "static", "List", "<", "Template", ">", "sortTemplates", "(", "List", "<", "Template", ">", "templates", ")", "{", "List", "<", "Template", ">", "result", "=", "new", "ArrayList", "<", "Template", ">", "(", ")", ";", "for", "(", "Template", ...
Sorts the Templates...
[ "Sorts", "the", "Templates", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L2048-L2063
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java
ModularParser.setFirstParagraph
private void setFirstParagraph(ParsedPage pp) { int nr = pp.nrOfParagraphs(); // the paragraph with the lowest number, must not be the first, maybe it // is only an Image... for (int i = 0; i < nr; i++) { Paragraph p = pp.getParagraph(i); // get the Text from the paragraph SpanManager ptext = new ...
java
private void setFirstParagraph(ParsedPage pp) { int nr = pp.nrOfParagraphs(); // the paragraph with the lowest number, must not be the first, maybe it // is only an Image... for (int i = 0; i < nr; i++) { Paragraph p = pp.getParagraph(i); // get the Text from the paragraph SpanManager ptext = new ...
[ "private", "void", "setFirstParagraph", "(", "ParsedPage", "pp", ")", "{", "int", "nr", "=", "pp", ".", "nrOfParagraphs", "(", ")", ";", "// the paragraph with the lowest number, must not be the first, maybe it", "// is only an Image...", "for", "(", "int", "i", "=", ...
Algorithm to identify the first paragraph of a ParsedPage
[ "Algorithm", "to", "identify", "the", "first", "paragraph", "of", "a", "ParsedPage" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/ModularParser.java#L2068-L2131
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/ApiUtilities.java
ApiUtilities.printProgressInfo
public static void printProgressInfo(int counter, int size, int step, ProgressInfoMode mode, String text) { if (size < step) { return; } if (counter % (size / step) == 0) { double progressPercent = counter * 100 / size; progressPercent = 1 + Math.round(progre...
java
public static void printProgressInfo(int counter, int size, int step, ProgressInfoMode mode, String text) { if (size < step) { return; } if (counter % (size / step) == 0) { double progressPercent = counter * 100 / size; progressPercent = 1 + Math.round(progre...
[ "public", "static", "void", "printProgressInfo", "(", "int", "counter", ",", "int", "size", ",", "int", "step", ",", "ProgressInfoMode", "mode", ",", "String", "text", ")", "{", "if", "(", "size", "<", "step", ")", "{", "return", ";", "}", "if", "(", ...
Prints a progress counter. @param counter Indicates the position in the task. @param size Size of the overall task. @param step How many parts should the progress counter have? @param mode Sets the output mode. @param text The text that should be print along with the progress indicator.
[ "Prints", "a", "progress", "counter", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/ApiUtilities.java#L44-L62
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/SqlWriter.java
SqlWriter.bufferInsertRow
protected void bufferInsertRow(String table, Object[][] row) throws IOException { StringBuffer sql = (StringBuffer)insertBuffers.get(table); if (sql != null) { if (traits.supportsMultiRowInsert() && (sql.length() < blockSize)) { sql.append(','); appendInsertValues(sql, row); return; } else { f...
java
protected void bufferInsertRow(String table, Object[][] row) throws IOException { StringBuffer sql = (StringBuffer)insertBuffers.get(table); if (sql != null) { if (traits.supportsMultiRowInsert() && (sql.length() < blockSize)) { sql.append(','); appendInsertValues(sql, row); return; } else { f...
[ "protected", "void", "bufferInsertRow", "(", "String", "table", ",", "Object", "[", "]", "[", "]", "row", ")", "throws", "IOException", "{", "StringBuffer", "sql", "=", "(", "StringBuffer", ")", "insertBuffers", ".", "get", "(", "table", ")", ";", "if", ...
default 512k inserts
[ "default", "512k", "inserts" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/SqlWriter.java#L176-L192
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java
ChronoStorage.add
public void add(final Revision rev) { int revIndex = rev.getRevisionCounter(); if (this.mapping.containsKey(revIndex)) { revIndex = this.mapping.get(revIndex); } // System.out.println("Store " + rev.getRevisionCounter() + " with " + // revIndex); ChronoFullRevision cfr = this.fullRevStorage.get(rev ...
java
public void add(final Revision rev) { int revIndex = rev.getRevisionCounter(); if (this.mapping.containsKey(revIndex)) { revIndex = this.mapping.get(revIndex); } // System.out.println("Store " + rev.getRevisionCounter() + " with " + // revIndex); ChronoFullRevision cfr = this.fullRevStorage.get(rev ...
[ "public", "void", "add", "(", "final", "Revision", "rev", ")", "{", "int", "revIndex", "=", "rev", ".", "getRevisionCounter", "(", ")", ";", "if", "(", "this", ".", "mapping", ".", "containsKey", "(", "revIndex", ")", ")", "{", "revIndex", "=", "this",...
Adds a revision to the chrono storage. @param rev reference to the revision
[ "Adds", "a", "revision", "to", "the", "chrono", "storage", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java#L102-L173
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java
ChronoStorage.remove
public Revision remove() { ChronoStorageBlock block = first; this.revisionIndex = block.getRevisionIndex(); ChronoStorageBlock next = block.getIndexNext(); this.first = next; if (next != null) { this.first.setIndexPrev(null); } else { this.last = null; } /* * System.out.println("Deliver ...
java
public Revision remove() { ChronoStorageBlock block = first; this.revisionIndex = block.getRevisionIndex(); ChronoStorageBlock next = block.getIndexNext(); this.first = next; if (next != null) { this.first.setIndexPrev(null); } else { this.last = null; } /* * System.out.println("Deliver ...
[ "public", "Revision", "remove", "(", ")", "{", "ChronoStorageBlock", "block", "=", "first", ";", "this", ".", "revisionIndex", "=", "block", ".", "getRevisionIndex", "(", ")", ";", "ChronoStorageBlock", "next", "=", "block", ".", "getIndexNext", "(", ")", ";...
Removes a revision from the chrono storage. @return
[ "Removes", "a", "revision", "from", "the", "chrono", "storage", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java#L190-L225
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java
ChronoStorage.get
public Revision get(final int revisionIndex) { if (this.storage.containsKey(revisionIndex)) { ChronoStorageBlock block = this.storage.get(revisionIndex); return block.getRev(); } return null; }
java
public Revision get(final int revisionIndex) { if (this.storage.containsKey(revisionIndex)) { ChronoStorageBlock block = this.storage.get(revisionIndex); return block.getRev(); } return null; }
[ "public", "Revision", "get", "(", "final", "int", "revisionIndex", ")", "{", "if", "(", "this", ".", "storage", ".", "containsKey", "(", "revisionIndex", ")", ")", "{", "ChronoStorageBlock", "block", "=", "this", ".", "storage", ".", "get", "(", "revisionI...
Returns the revision of the specified chrono storage block. @param revisionIndex chronological order index @return
[ "Returns", "the", "revision", "of", "the", "specified", "chrono", "storage", "block", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java#L262-L270
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java
ChronoStorage.clean
public void clean() { ChronoFullRevision cfr = firstCFR; totalSize = size; while (cfr != null) { totalSize += cfr.size(); cfr = cfr.getNext(); } if (totalSize < MAX_STORAGE_SIZE) { return; } cfr = firstCFR; while (cfr != null) { totalSize += cfr.clean(revisionIndex, 0); cfr = cfr.getN...
java
public void clean() { ChronoFullRevision cfr = firstCFR; totalSize = size; while (cfr != null) { totalSize += cfr.size(); cfr = cfr.getNext(); } if (totalSize < MAX_STORAGE_SIZE) { return; } cfr = firstCFR; while (cfr != null) { totalSize += cfr.clean(revisionIndex, 0); cfr = cfr.getN...
[ "public", "void", "clean", "(", ")", "{", "ChronoFullRevision", "cfr", "=", "firstCFR", ";", "totalSize", "=", "size", ";", "while", "(", "cfr", "!=", "null", ")", "{", "totalSize", "+=", "cfr", ".", "size", "(", ")", ";", "cfr", "=", "cfr", ".", "...
Reduces the amount of used storage by discarding chrono storage blocks.
[ "Reduces", "the", "amount", "of", "used", "storage", "by", "discarding", "chrono", "storage", "blocks", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/chrono/ChronoStorage.java#L278-L332
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.write
private void write(final int val) throws EncodingException { if (val < 0 || val > 255) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "byte value out of range: " + val); } this.stream.write(val); }
java
private void write(final int val) throws EncodingException { if (val < 0 || val > 255) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "byte value out of range: " + val); } this.stream.write(val); }
[ "private", "void", "write", "(", "final", "int", "val", ")", "throws", "EncodingException", "{", "if", "(", "val", "<", "0", "||", "val", ">", "255", ")", "{", "throw", "ErrorFactory", ".", "createEncodingException", "(", "ErrorKeys", ".", "DIFFTOOL_ENCODING...
Writes a byte to the buffer. @param val an integer representing a full byte @throws EncodingException if the value is out range
[ "Writes", "a", "byte", "to", "the", "buffer", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java#L73-L84
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.writeBit
public void writeBit(final int bit) throws EncodingException { if (bit != 0 && bit != 1) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "bit value out of range: " + bit); } this.buffer |= bit << (7 - this.bufferLength); this.bufferLength++; if ...
java
public void writeBit(final int bit) throws EncodingException { if (bit != 0 && bit != 1) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "bit value out of range: " + bit); } this.buffer |= bit << (7 - this.bufferLength); this.bufferLength++; if ...
[ "public", "void", "writeBit", "(", "final", "int", "bit", ")", "throws", "EncodingException", "{", "if", "(", "bit", "!=", "0", "&&", "bit", "!=", "1", ")", "{", "throw", "ErrorFactory", ".", "createEncodingException", "(", "ErrorKeys", ".", "DIFFTOOL_ENCODI...
Writes a single bit to the buffer. @param bit 0 or 1 @throws EncodingException if the input is neither 0 nor 1.
[ "Writes", "a", "single", "bit", "to", "the", "buffer", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java#L94-L114
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.writeValue
public void writeValue(final int length, final int value) throws EncodingException { if (length > 31) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + value); } for (int i = length - 1; i >= 0; i--) { writeBit((value >...
java
public void writeValue(final int length, final int value) throws EncodingException { if (length > 31) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + value); } for (int i = length - 1; i >= 0; i--) { writeBit((value >...
[ "public", "void", "writeValue", "(", "final", "int", "length", ",", "final", "int", "value", ")", "throws", "EncodingException", "{", "if", "(", "length", ">", "31", ")", "{", "throw", "ErrorFactory", ".", "createEncodingException", "(", "ErrorKeys", ".", "D...
Writes a positive integer to the buffer. @param length the number of bits to write @param value an integer value @throws EncodingException if the length of the input is more than 31 bits.
[ "Writes", "a", "positive", "integer", "to", "the", "buffer", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java#L127-L139
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.write
public void write(final byte[] bText) throws EncodingException { writeFillBits(); int l = bText.length; for (int i = 0; i < l; i++) { write(0xFF & bText[i]); } }
java
public void write(final byte[] bText) throws EncodingException { writeFillBits(); int l = bText.length; for (int i = 0; i < l; i++) { write(0xFF & bText[i]); } }
[ "public", "void", "write", "(", "final", "byte", "[", "]", "bText", ")", "throws", "EncodingException", "{", "writeFillBits", "(", ")", ";", "int", "l", "=", "bText", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "l", ";", ...
Writes the byte array to the buffer. The currently used buffer will be filled with zero bits before is is written in front of the byte-array. @param bText byte array @throws EncodingException if the writing fails
[ "Writes", "the", "byte", "array", "to", "the", "buffer", ".", "The", "currently", "used", "buffer", "will", "be", "filled", "with", "zero", "bits", "before", "is", "is", "written", "in", "front", "of", "the", "byte", "-", "array", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java#L151-L161
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/OS.java
OS.getOsType
public static String getOsType() { String osType = "unknown"; String osName = System.getProperty("os.name"); if (osName.contains("Windows")) { osType = "Windows"; } else if (osName.contains("Linux")) { osType = "Linux"; } return osType; ...
java
public static String getOsType() { String osType = "unknown"; String osName = System.getProperty("os.name"); if (osName.contains("Windows")) { osType = "Windows"; } else if (osName.contains("Linux")) { osType = "Linux"; } return osType; ...
[ "public", "static", "String", "getOsType", "(", ")", "{", "String", "osType", "=", "\"unknown\"", ";", "String", "osName", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ";", "if", "(", "osName", ".", "contains", "(", "\"Windows\"", ")", ")", ...
Tries to determine the tpye of OS the application is running on. At the moment only Windows and Linux are supported. @return The type of OS the application is running on. Or "unknown" if the system is unknown.
[ "Tries", "to", "determine", "the", "tpye", "of", "OS", "the", "application", "is", "running", "on", ".", "At", "the", "moment", "only", "Windows", "and", "Linux", "are", "supported", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/OS.java#L26-L36
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/OS.java
OS.getUsedMemory
public static double getUsedMemory() { Runtime rt = Runtime.getRuntime(); long memLong = rt.totalMemory() - rt.freeMemory(); double memDouble = memLong / (1024.0 * 1024.0); memDouble = Math.round(memDouble * 100) / 100.0; return memDouble; }
java
public static double getUsedMemory() { Runtime rt = Runtime.getRuntime(); long memLong = rt.totalMemory() - rt.freeMemory(); double memDouble = memLong / (1024.0 * 1024.0); memDouble = Math.round(memDouble * 100) / 100.0; return memDouble; }
[ "public", "static", "double", "getUsedMemory", "(", ")", "{", "Runtime", "rt", "=", "Runtime", ".", "getRuntime", "(", ")", ";", "long", "memLong", "=", "rt", ".", "totalMemory", "(", ")", "-", "rt", ".", "freeMemory", "(", ")", ";", "double", "memDoub...
Gets the memory used by the JVM in MB. @return Returns how much memory (in MB) is used by the JVM at the moment.
[ "Gets", "the", "memory", "used", "by", "the", "JVM", "in", "MB", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/OS.java#L41-L48
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Page.java
Page.getOutlinkIDs
public Set<Integer> getOutlinkIDs() { Set<Integer> tmpSet = new HashSet<Integer>(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); session.buildLockRequest(LockOptions.NONE).lock(hibernatePage); tmpSet.addAll(hibernatePage.getOutLinks()); session.getTransaction().commit(); ...
java
public Set<Integer> getOutlinkIDs() { Set<Integer> tmpSet = new HashSet<Integer>(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); session.buildLockRequest(LockOptions.NONE).lock(hibernatePage); tmpSet.addAll(hibernatePage.getOutLinks()); session.getTransaction().commit(); ...
[ "public", "Set", "<", "Integer", ">", "getOutlinkIDs", "(", ")", "{", "Set", "<", "Integer", ">", "tmpSet", "=", "new", "HashSet", "<", "Integer", ">", "(", ")", ";", "Session", "session", "=", "wiki", ".", "__getHibernateSession", "(", ")", ";", "sess...
The result set may also contain links from non-existing pages. It is in the responsibility of the user to check whether the page exists. @return Returns the IDs of the outLinks of this page.
[ "The", "result", "set", "may", "also", "contain", "links", "from", "non", "-", "existing", "pages", ".", "It", "is", "in", "the", "responsibility", "of", "the", "user", "to", "check", "whether", "the", "page", "exists", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Page.java#L444-L456
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffToolThread.java
DiffToolThread.run
@Override public void run() { try { ArchiveManager archives = new ArchiveManager(); ArticleReaderInterface articleReader = null; ArchiveDescription description = null; Task<Revision> task = null; DiffCalculatorInterface diffCalc; if (MODE_STATISTICAL_OUTPUT) { diffCalc = new TimedDiffCalcula...
java
@Override public void run() { try { ArchiveManager archives = new ArchiveManager(); ArticleReaderInterface articleReader = null; ArchiveDescription description = null; Task<Revision> task = null; DiffCalculatorInterface diffCalc; if (MODE_STATISTICAL_OUTPUT) { diffCalc = new TimedDiffCalcula...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "try", "{", "ArchiveManager", "archives", "=", "new", "ArchiveManager", "(", ")", ";", "ArticleReaderInterface", "articleReader", "=", "null", ";", "ArchiveDescription", "description", "=", "null", ";", ...
Runs the diff creation process
[ "Runs", "the", "diff", "creation", "process" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffToolThread.java#L266-L388
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/Revision.java
Revision.setTimeStamp
public void setTimeStamp(final String timeStamp) { String time = timeStamp.replace('T', ' '); time = time.replace('Z', ' '); this.timeStamp = Timestamp.valueOf(time); }
java
public void setTimeStamp(final String timeStamp) { String time = timeStamp.replace('T', ' '); time = time.replace('Z', ' '); this.timeStamp = Timestamp.valueOf(time); }
[ "public", "void", "setTimeStamp", "(", "final", "String", "timeStamp", ")", "{", "String", "time", "=", "timeStamp", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "time", "=", "time", ".", "replace", "(", "'", "'", ",", "'", "'", ")", "...
Sets the timestamp information. The input is expected to be the wikipedia version of the timestamp as String (YYYY-MM-DDThh-mm-ssZ). T and Z will be replaced with spaces. @param timeStamp timestamp (wikipedia version)
[ "Sets", "the", "timestamp", "information", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/Revision.java#L323-L330
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataInputStream.java
UTFDataInputStream.readFragmentedUTF
public String readFragmentedUTF() throws IOException { //String result = super.readUTF(); StringBuffer result = new StringBuffer(super.readUTF()); boolean fragmentFlag = super.readBoolean(); while (fragmentFlag != END_REACHED) { //result = result.concat(super.readUTF()); result.append(super.readUTF()); ...
java
public String readFragmentedUTF() throws IOException { //String result = super.readUTF(); StringBuffer result = new StringBuffer(super.readUTF()); boolean fragmentFlag = super.readBoolean(); while (fragmentFlag != END_REACHED) { //result = result.concat(super.readUTF()); result.append(super.readUTF()); ...
[ "public", "String", "readFragmentedUTF", "(", ")", "throws", "IOException", "{", "//String result = super.readUTF();", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "super", ".", "readUTF", "(", ")", ")", ";", "boolean", "fragmentFlag", "=", "super", ...
Read a fragmented UTF-8 String @return a String written with {@link UTFDataOutputStream#writeFragmentedUTF(String)} @throws IOException @see UTFDataOutputStream#writeFragmentedUTF(String)
[ "Read", "a", "fragmented", "UTF", "-", "8", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataInputStream.java#L49-L61
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataInputStream.java
UTFDataInputStream.readUTFAsArray
public String readUTFAsArray() throws IOException { byte[] buffer = new byte[super.readInt()]; super.read(buffer, 0, buffer.length); return new String(buffer, "UTF-8"); }
java
public String readUTFAsArray() throws IOException { byte[] buffer = new byte[super.readInt()]; super.read(buffer, 0, buffer.length); return new String(buffer, "UTF-8"); }
[ "public", "String", "readUTFAsArray", "(", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "super", ".", "readInt", "(", ")", "]", ";", "super", ".", "read", "(", "buffer", ",", "0", ",", "buffer", ".", "length...
Read a byte array formed UTF-8 String @return a String written with {@link UTFDataOutputStream#writeUTFAsArray(String)} @throws IOException @see UTFDataOutputStream#writeUTFAsArray(String)
[ "Read", "a", "byte", "array", "formed", "UTF", "-", "8", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataInputStream.java#L72-L76
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.datamachine/src/main/java/de/tudarmstadt/ukp/wikipedia/datamachine/domain/DataMachineGenerator.java
DataMachineGenerator.getPagesArticlesFile
private String getPagesArticlesFile() { String pagesArticlesFile = null; String parseMessage = null; //Use of minimal dump only with articles if (files.getInputPagesArticles() != null) { pagesArticlesFile = files.getInputPagesArticles(); parseMessage = "Discussions are unavailable"; } //Use of dump ...
java
private String getPagesArticlesFile() { String pagesArticlesFile = null; String parseMessage = null; //Use of minimal dump only with articles if (files.getInputPagesArticles() != null) { pagesArticlesFile = files.getInputPagesArticles(); parseMessage = "Discussions are unavailable"; } //Use of dump ...
[ "private", "String", "getPagesArticlesFile", "(", ")", "{", "String", "pagesArticlesFile", "=", "null", ";", "String", "parseMessage", "=", "null", ";", "//Use of minimal dump only with articles", "if", "(", "files", ".", "getInputPagesArticles", "(", ")", "!=", "nu...
Parse either "pages-articles.xml" or "pages-meta-current.xml". If both files exist in the input directory "pages-meta-current.xml" will be favored. @return the input articles dump
[ "Parse", "either", "pages", "-", "articles", ".", "xml", "or", "pages", "-", "meta", "-", "current", ".", "xml", ".", "If", "both", "files", "exist", "in", "the", "input", "directory", "pages", "-", "meta", "-", "current", ".", "xml", "will", "be", "...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.datamachine/src/main/java/de/tudarmstadt/ukp/wikipedia/datamachine/domain/DataMachineGenerator.java#L104-L122
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java
Span.adjust
public Span adjust(int offset, int n){ if( offset < 0 )return this; //null if( offset < end ){ end += n; if( end<offset )end = offset; } else return this; //null if( offset < start ){ start += n; if( start<offset )start = offset; } return this; }
java
public Span adjust(int offset, int n){ if( offset < 0 )return this; //null if( offset < end ){ end += n; if( end<offset )end = offset; } else return this; //null if( offset < start ){ start += n; if( start<offset )start = offset; } return this; }
[ "public", "Span", "adjust", "(", "int", "offset", ",", "int", "n", ")", "{", "if", "(", "offset", "<", "0", ")", "return", "this", ";", "//null", "if", "(", "offset", "<", "end", ")", "{", "end", "+=", "n", ";", "if", "(", "end", "<", "offset",...
Adjusts the start and end Position of the Span, if they are larger than the offset.
[ "Adjusts", "the", "start", "and", "end", "Position", "of", "the", "Span", "if", "they", "are", "larger", "than", "the", "offset", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java#L67-L81
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java
Span.trimTrail
public Span trimTrail(CharSequence src){ if( start<end ){ while(src.charAt( end-1 ) == 32){ end--; if( start==end )break; } } return this; }
java
public Span trimTrail(CharSequence src){ if( start<end ){ while(src.charAt( end-1 ) == 32){ end--; if( start==end )break; } } return this; }
[ "public", "Span", "trimTrail", "(", "CharSequence", "src", ")", "{", "if", "(", "start", "<", "end", ")", "{", "while", "(", "src", ".", "charAt", "(", "end", "-", "1", ")", "==", "32", ")", "{", "end", "--", ";", "if", "(", "start", "==", "end...
Returns the Span, with trailing whitespaces omitted.
[ "Returns", "the", "Span", "with", "trailing", "whitespaces", "omitted", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java#L132-L140
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java
Span.trim
public Span trim( CharSequence src ){ if( start<end ) while(src.charAt( end-1 ) == 32){ end--; if( start==end )break; } if( start<end ) while( src.charAt( start ) == 32){ start++; if( start==end)break; } return this; }
java
public Span trim( CharSequence src ){ if( start<end ) while(src.charAt( end-1 ) == 32){ end--; if( start==end )break; } if( start<end ) while( src.charAt( start ) == 32){ start++; if( start==end)break; } return this; }
[ "public", "Span", "trim", "(", "CharSequence", "src", ")", "{", "if", "(", "start", "<", "end", ")", "while", "(", "src", ".", "charAt", "(", "end", "-", "1", ")", "==", "32", ")", "{", "end", "--", ";", "if", "(", "start", "==", "end", ")", ...
Returns the Span, with leading and trailing whitespaces omitted.
[ "Returns", "the", "Span", "with", "leading", "and", "trailing", "whitespaces", "omitted", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Span.java#L145-L159
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/content/Diff.java
Diff.byteSize
public long byteSize() { long byteSize = 3; int size = parts.size(); for (int i = 0; i < size; i++) { byteSize += this.parts.get(i).byteSize(); } return byteSize; }
java
public long byteSize() { long byteSize = 3; int size = parts.size(); for (int i = 0; i < size; i++) { byteSize += this.parts.get(i).byteSize(); } return byteSize; }
[ "public", "long", "byteSize", "(", ")", "{", "long", "byteSize", "=", "3", ";", "int", "size", "=", "parts", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "byteSize", "+=", "thi...
Returns an estimation of the size used to stored the data. @return estimated size
[ "Returns", "an", "estimation", "of", "the", "size", "used", "to", "stored", "the", "data", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/content/Diff.java#L167-L179
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/content/Diff.java
Diff.isFullRevision
public boolean isFullRevision() { if (this.parts.size() == 1) { DiffPart p = this.parts.get(0); if (p.getAction() == DiffAction.FULL_REVISION_UNCOMPRESSED) { return true; } } return false; }
java
public boolean isFullRevision() { if (this.parts.size() == 1) { DiffPart p = this.parts.get(0); if (p.getAction() == DiffAction.FULL_REVISION_UNCOMPRESSED) { return true; } } return false; }
[ "public", "boolean", "isFullRevision", "(", ")", "{", "if", "(", "this", ".", "parts", ".", "size", "(", ")", "==", "1", ")", "{", "DiffPart", "p", "=", "this", ".", "parts", ".", "get", "(", "0", ")", ";", "if", "(", "p", ".", "getAction", "("...
Returns whether the revision described by this diff is a full revision or not. @return TRUE | FALSE
[ "Returns", "whether", "the", "revision", "described", "by", "this", "diff", "is", "a", "full", "revision", "or", "not", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/tasks/content/Diff.java#L239-L249
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.computeAverageFanOut
private double computeAverageFanOut(Iterable<Page> pages) { Set<Integer> pageIDs = new HashSet<Integer>(); while (pages.iterator().hasNext()) { pageIDs.add(pages.iterator().next().getPageId()); } if (pageIDs.isEmpty()) { logger.warn("Cannot compute average fan-o...
java
private double computeAverageFanOut(Iterable<Page> pages) { Set<Integer> pageIDs = new HashSet<Integer>(); while (pages.iterator().hasNext()) { pageIDs.add(pages.iterator().next().getPageId()); } if (pageIDs.isEmpty()) { logger.warn("Cannot compute average fan-o...
[ "private", "double", "computeAverageFanOut", "(", "Iterable", "<", "Page", ">", "pages", ")", "{", "Set", "<", "Integer", ">", "pageIDs", "=", "new", "HashSet", "<", "Integer", ">", "(", ")", ";", "while", "(", "pages", ".", "iterator", "(", ")", ".", ...
Computes the average fan out of the page set. Fan out is the number of outgoing links per page. @param pages The pages in an iterable form. @return The average fan out.
[ "Computes", "the", "average", "fan", "out", "of", "the", "page", "set", ".", "Fan", "out", "is", "the", "number", "of", "outgoing", "links", "per", "page", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L97-L128
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getCategoryArticleMap
private Map<Integer,Set<Integer>> getCategoryArticleMap(Wikipedia pWiki, Set<Integer> pNodes) throws WikiPageNotFoundException { Map<Integer,Set<Integer>> categoryArticleMap = new HashMap<Integer,Set<Integer>>(); int progress = 0; for (int node : pNodes) { progress++; Ap...
java
private Map<Integer,Set<Integer>> getCategoryArticleMap(Wikipedia pWiki, Set<Integer> pNodes) throws WikiPageNotFoundException { Map<Integer,Set<Integer>> categoryArticleMap = new HashMap<Integer,Set<Integer>>(); int progress = 0; for (int node : pNodes) { progress++; Ap...
[ "private", "Map", "<", "Integer", ",", "Set", "<", "Integer", ">", ">", "getCategoryArticleMap", "(", "Wikipedia", "pWiki", ",", "Set", "<", "Integer", ">", "pNodes", ")", "throws", "WikiPageNotFoundException", "{", "Map", "<", "Integer", ",", "Set", "<", ...
Building a mapping from categories to article sets. @param pWiki The wikipedia object. @param pNodes The category nodes that should be used to build the map. @return A mapping from categories to article sets. @throws WikiPageNotFoundException
[ "Building", "a", "mapping", "from", "categories", "to", "article", "sets", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L155-L174
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getGraphParameters
public void getGraphParameters(CategoryGraph catGraph) { double startTime = System.currentTimeMillis(); logger.error(catGraph.getGraphInfo()); double endTime = (System.currentTimeMillis() - startTime) / 1000.0; logger.error(endTime + "s"); }
java
public void getGraphParameters(CategoryGraph catGraph) { double startTime = System.currentTimeMillis(); logger.error(catGraph.getGraphInfo()); double endTime = (System.currentTimeMillis() - startTime) / 1000.0; logger.error(endTime + "s"); }
[ "public", "void", "getGraphParameters", "(", "CategoryGraph", "catGraph", ")", "{", "double", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "logger", ".", "error", "(", "catGraph", ".", "getGraphInfo", "(", ")", ")", ";", "double", "en...
Get various graph parameters like diameter, average out-degree etc of the categroy graph. @param catGraph The category graph.
[ "Get", "various", "graph", "parameters", "like", "diameter", "average", "out", "-", "degree", "etc", "of", "the", "categroy", "graph", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L180-L185
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getNumberOfCategorizedArticles
public int getNumberOfCategorizedArticles(Wikipedia pWiki, CategoryGraph catGraph) throws WikiApiException{ if (categorizedArticleSet == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return categorizedArticleSet.size(); }
java
public int getNumberOfCategorizedArticles(Wikipedia pWiki, CategoryGraph catGraph) throws WikiApiException{ if (categorizedArticleSet == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return categorizedArticleSet.size(); }
[ "public", "int", "getNumberOfCategorizedArticles", "(", "Wikipedia", "pWiki", ",", "CategoryGraph", "catGraph", ")", "throws", "WikiApiException", "{", "if", "(", "categorizedArticleSet", "==", "null", ")", "{", "// has not been initialized yet", "iterateCategoriesGetArticl...
If the return value has been already computed, it is returned, else it is computed at retrieval time. @param pWiki The wikipedia object. @param catGraph The category graph. @return The number of categorized articles, i.e. articles that have at least one category.
[ "If", "the", "return", "value", "has", "been", "already", "computed", "it", "is", "returned", "else", "it", "is", "computed", "at", "retrieval", "time", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L287-L292
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getDistributionOfArticlesByCategory
public Map<Integer,Integer> getDistributionOfArticlesByCategory(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { if (degreeDistribution == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return degreeDistribution; ...
java
public Map<Integer,Integer> getDistributionOfArticlesByCategory(Wikipedia pWiki, CategoryGraph catGraph) throws WikiPageNotFoundException { if (degreeDistribution == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return degreeDistribution; ...
[ "public", "Map", "<", "Integer", ",", "Integer", ">", "getDistributionOfArticlesByCategory", "(", "Wikipedia", "pWiki", ",", "CategoryGraph", "catGraph", ")", "throws", "WikiPageNotFoundException", "{", "if", "(", "degreeDistribution", "==", "null", ")", "{", "// ha...
Computes the distribution of the number of articles per category. If the return value has been already computed, it is returned, else it is computed at retrieval time. @param pWiki The wikipedia object. @param catGraph The category graph. @return A map containing the distribution mapping from a degree to the number of ...
[ "Computes", "the", "distribution", "of", "the", "number", "of", "articles", "per", "category", ".", "If", "the", "return", "value", "has", "been", "already", "computed", "it", "is", "returned", "else", "it", "is", "computed", "at", "retrieval", "time", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L302-L307
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/codec/SQLEncoder.java
SQLEncoder.verify
private void verify(final Task<Diff> task, final Diff decodedDiff, final Diff originalDiff) throws SQLConsumerException { String orig = originalDiff.toString(); String deco = decodedDiff.toString(); boolean notEqual = !orig.equals(deco); if (notEqual && MODE_SURROGATES == SurrogateModes.REPLACE) { ...
java
private void verify(final Task<Diff> task, final Diff decodedDiff, final Diff originalDiff) throws SQLConsumerException { String orig = originalDiff.toString(); String deco = decodedDiff.toString(); boolean notEqual = !orig.equals(deco); if (notEqual && MODE_SURROGATES == SurrogateModes.REPLACE) { ...
[ "private", "void", "verify", "(", "final", "Task", "<", "Diff", ">", "task", ",", "final", "Diff", "decodedDiff", ",", "final", "Diff", "originalDiff", ")", "throws", "SQLConsumerException", "{", "String", "orig", "=", "originalDiff", ".", "toString", "(", "...
Verifies that the decoded diff is identical to the original diff. @param task DiffTask @param decodedDiff diff created from encoding the decoded diff information @param originalDiff original diff @throws SQLConsumerException if an error occurs
[ "Verifies", "that", "the", "decoded", "diff", "is", "identical", "to", "the", "original", "diff", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/codec/SQLEncoder.java#L437-L521
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataOutputStream.java
UTFDataOutputStream.writeFragmentedUTF
public void writeFragmentedUTF(String str) throws IOException { if (str.length() <= MAX_LENGTH) { writeLastUTFFragment(str); } else { writeUTFFragment(str.substring(0, MAX_LENGTH)); writeFragmentedUTF(str.substring(MAX_LENGTH)); } }
java
public void writeFragmentedUTF(String str) throws IOException { if (str.length() <= MAX_LENGTH) { writeLastUTFFragment(str); } else { writeUTFFragment(str.substring(0, MAX_LENGTH)); writeFragmentedUTF(str.substring(MAX_LENGTH)); } }
[ "public", "void", "writeFragmentedUTF", "(", "String", "str", ")", "throws", "IOException", "{", "if", "(", "str", ".", "length", "(", ")", "<=", "MAX_LENGTH", ")", "{", "writeLastUTFFragment", "(", "str", ")", ";", "}", "else", "{", "writeUTFFragment", "(...
The UTF-8 encoding uses sequences of 1, 2, or 3 bytes per character. With he maximal length of the fragment we want to ensure, that there are no overflow of 65536 byte sized buffer @param str String to be written in the output stream @throws IOException
[ "The", "UTF", "-", "8", "encoding", "uses", "sequences", "of", "1", "2", "or", "3", "bytes", "per", "character", ".", "With", "he", "maximal", "length", "of", "the", "fragment", "we", "want", "to", "ensure", "that", "there", "are", "no", "overflow", "o...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/UTFDataOutputStream.java#L66-L73
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/ExternalProgramsPanel.java
ExternalProgramsPanel.validate7ZipSettings
private void validate7ZipSettings() { boolean flag = controller.is7ZipEnabled(); sevenZipEnableBox.setSelected(flag); sevenZipLabel.setEnabled(flag); sevenZipPathField.setEnabled(flag); sevenZipSearchButton.setEnabled(flag); }
java
private void validate7ZipSettings() { boolean flag = controller.is7ZipEnabled(); sevenZipEnableBox.setSelected(flag); sevenZipLabel.setEnabled(flag); sevenZipPathField.setEnabled(flag); sevenZipSearchButton.setEnabled(flag); }
[ "private", "void", "validate7ZipSettings", "(", ")", "{", "boolean", "flag", "=", "controller", ".", "is7ZipEnabled", "(", ")", ";", "sevenZipEnableBox", ".", "setSelected", "(", "flag", ")", ";", "sevenZipLabel", ".", "setEnabled", "(", "flag", ")", ";", "s...
Validates the 7Zip settings
[ "Validates", "the", "7Zip", "settings" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/ExternalProgramsPanel.java#L156-L164
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/MediaWikiParserFactory.java
MediaWikiParserFactory.createParser
public MediaWikiParser createParser(){ logger.debug( "Selected Parser: {}", parserClass ); if( parserClass == ModularParser.class ){ ModularParser mwgp = new ModularParser( // resolveLineSeparator(), "\n", languageIdentifers, categoryIdentifers, imageIdentifers, showImageText, ...
java
public MediaWikiParser createParser(){ logger.debug( "Selected Parser: {}", parserClass ); if( parserClass == ModularParser.class ){ ModularParser mwgp = new ModularParser( // resolveLineSeparator(), "\n", languageIdentifers, categoryIdentifers, imageIdentifers, showImageText, ...
[ "public", "MediaWikiParser", "createParser", "(", ")", "{", "logger", ".", "debug", "(", "\"Selected Parser: {}\"", ",", "parserClass", ")", ";", "if", "(", "parserClass", "==", "ModularParser", ".", "class", ")", "{", "ModularParser", "mwgp", "=", "new", "Mod...
Creates a MediaWikiParser with the configurations which has been set.
[ "Creates", "a", "MediaWikiParser", "with", "the", "configurations", "which", "has", "been", "set", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/MediaWikiParserFactory.java#L249-L310
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/CommonUtilities.java
CommonUtilities.getSetContents
public static String getSetContents(Set s) { StringBuffer sb = new StringBuffer(1000); Object[] sortedArray = s.toArray(); Arrays.sort(sortedArray); int counter = 0; int elementsPerRow = 10; for (Object element : sortedArray) { sb.append(element.toString() +...
java
public static String getSetContents(Set s) { StringBuffer sb = new StringBuffer(1000); Object[] sortedArray = s.toArray(); Arrays.sort(sortedArray); int counter = 0; int elementsPerRow = 10; for (Object element : sortedArray) { sb.append(element.toString() +...
[ "public", "static", "String", "getSetContents", "(", "Set", "s", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "1000", ")", ";", "Object", "[", "]", "sortedArray", "=", "s", ".", "toArray", "(", ")", ";", "Arrays", ".", "sort", "(", ...
Debug output an internal set structure. @param s Must not be {@code null}. @return The resulting String of the contents of {@code s}.
[ "Debug", "output", "an", "internal", "set", "structure", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/CommonUtilities.java#L31-L48
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/CommonUtilities.java
CommonUtilities.getMapContents
public static String getMapContents(Map m) { StringBuffer sb = new StringBuffer(1000); Object[] sortedArray = m.keySet().toArray(); Arrays.sort(sortedArray); for (Object element : sortedArray) { sb.append(element.toString() + " - " + m.get(element) + System.getProperty("line...
java
public static String getMapContents(Map m) { StringBuffer sb = new StringBuffer(1000); Object[] sortedArray = m.keySet().toArray(); Arrays.sort(sortedArray); for (Object element : sortedArray) { sb.append(element.toString() + " - " + m.get(element) + System.getProperty("line...
[ "public", "static", "String", "getMapContents", "(", "Map", "m", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "1000", ")", ";", "Object", "[", "]", "sortedArray", "=", "m", ".", "keySet", "(", ")", ".", "toArray", "(", ")", ";", "...
Debug output an internal map structure as key-value pairs. @param m Must not be {@code null}. @return The resulting String of the contents of {@code m}.
[ "Debug", "output", "an", "internal", "map", "structure", "as", "key", "-", "value", "pairs", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/util/CommonUtilities.java#L55-L64
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java
DiffConsumerLogMessages.logDiffException
public static void logDiffException(final Logger logger, final DiffException e) { logger.logException(Level.ERROR, "DiffException", e); }
java
public static void logDiffException(final Logger logger, final DiffException e) { logger.logException(Level.ERROR, "DiffException", e); }
[ "public", "static", "void", "logDiffException", "(", "final", "Logger", "logger", ",", "final", "DiffException", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "ERROR", ",", "\"DiffException\"", ",", "e", ")", ";", "}" ]
Logs the occurance of a DiffException. @param logger reference to the logger @param e reference to the exception
[ "Logs", "the", "occurance", "of", "a", "DiffException", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java#L86-L91
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java
DiffConsumerLogMessages.logInvalidTaskType
public static void logInvalidTaskType(final Logger logger, final TaskTypes type) { logger.logMessage(Level.INFO, "Invalid TaskType: " + type); }
java
public static void logInvalidTaskType(final Logger logger, final TaskTypes type) { logger.logMessage(Level.INFO, "Invalid TaskType: " + type); }
[ "public", "static", "void", "logInvalidTaskType", "(", "final", "Logger", "logger", ",", "final", "TaskTypes", "type", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "INFO", ",", "\"Invalid TaskType: \"", "+", "type", ")", ";", "}" ]
Logs the occurance of an invalid task type. @param logger reference to the logger @param type type of task
[ "Logs", "the", "occurance", "of", "an", "invalid", "task", "type", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java#L114-L119
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java
DiffConsumerLogMessages.logStartArticleProcessing
public static void logStartArticleProcessing(final Logger logger, final Task<Revision> article, long time, long transmittingTime) { logger.logMessage(Level.TRACE, "Start Procssing Task\t" + article.toString()); }
java
public static void logStartArticleProcessing(final Logger logger, final Task<Revision> article, long time, long transmittingTime) { logger.logMessage(Level.TRACE, "Start Procssing Task\t" + article.toString()); }
[ "public", "static", "void", "logStartArticleProcessing", "(", "final", "Logger", "logger", ",", "final", "Task", "<", "Revision", ">", "article", ",", "long", "time", ",", "long", "transmittingTime", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", ...
Logs the start of the processing of an revision task. @param logger reference to the logger @param article reference to the revision task @param time time @param transmittingTime time that the transfer of data to the producer needed
[ "Logs", "the", "start", "of", "the", "processing", "of", "an", "revision", "task", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/DiffConsumerLogMessages.java#L158-L164
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/ArticleFilter.java
ArticleFilter.initializePrefixes
private void initializePrefixes() { if (namespaceMap == null) { // TODO use logger System.err .println("Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia language version. DISABLING FILTER."); } else { prefixesToAllow = new HashSet<String>(); pr...
java
private void initializePrefixes() { if (namespaceMap == null) { // TODO use logger System.err .println("Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia language version. DISABLING FILTER."); } else { prefixesToAllow = new HashSet<String>(); pr...
[ "private", "void", "initializePrefixes", "(", ")", "{", "if", "(", "namespaceMap", "==", "null", ")", "{", "// TODO use logger", "System", ".", "err", ".", "println", "(", "\"Cannot use whitespace filter without initializing the namespace-prefix map for the current Wikipedia ...
Initialize allowed and restricted prefixes
[ "Initialize", "allowed", "and", "restricted", "prefixes" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/ArticleFilter.java#L114-L134
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/ArticleFilter.java
ArticleFilter.checkArticle
public boolean checkArticle(String title) { // if filter isn't initialized, do not filter at all if (namespaceMap == null || namespaceMap.size() == 0 || allowedNamespaces == null || allowedNamespaces.size() == 0) { return true; } // else, do filter else { // perform filtering // reject restric...
java
public boolean checkArticle(String title) { // if filter isn't initialized, do not filter at all if (namespaceMap == null || namespaceMap.size() == 0 || allowedNamespaces == null || allowedNamespaces.size() == 0) { return true; } // else, do filter else { // perform filtering // reject restric...
[ "public", "boolean", "checkArticle", "(", "String", "title", ")", "{", "// if filter isn't initialized, do not filter at all", "if", "(", "namespaceMap", "==", "null", "||", "namespaceMap", ".", "size", "(", ")", "==", "0", "||", "allowedNamespaces", "==", "null", ...
Filter any pages by title prefixes @param title the page title @return true, if the page should be used. false, else
[ "Filter", "any", "pages", "by", "title", "prefixes" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/ArticleFilter.java#L143-L177
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.setSectionHandling
public void setSectionHandling( Map<String, EnumMap<SIT, EnumMap<CIT, Boolean>>> sectionHandling ) { this.sectionHandling = sectionHandling; }
java
public void setSectionHandling( Map<String, EnumMap<SIT, EnumMap<CIT, Boolean>>> sectionHandling ) { this.sectionHandling = sectionHandling; }
[ "public", "void", "setSectionHandling", "(", "Map", "<", "String", ",", "EnumMap", "<", "SIT", ",", "EnumMap", "<", "CIT", ",", "Boolean", ">", ">", ">", "sectionHandling", ")", "{", "this", ".", "sectionHandling", "=", "sectionHandling", ";", "}" ]
Be sure to set the Default Section Handling to avoid errors...
[ "Be", "sure", "to", "set", "the", "Default", "Section", "Handling", "to", "avoid", "errors", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L120-L122
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.addSectionHandling
public void addSectionHandling( int level, EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.SECTION_LEVEL.toString()+level, sh ); }
java
public void addSectionHandling( int level, EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.SECTION_LEVEL.toString()+level, sh ); }
[ "public", "void", "addSectionHandling", "(", "int", "level", ",", "EnumMap", "<", "SIT", ",", "EnumMap", "<", "CIT", ",", "Boolean", ">", ">", "sh", ")", "{", "sectionHandling", ".", "put", "(", "SectionType", ".", "SECTION_LEVEL", ".", "toString", "(", ...
adds section handling for a specified relative level...
[ "adds", "section", "handling", "for", "a", "specified", "relative", "level", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L127-L129
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.addSectionHandling
public void addSectionHandling( String name, EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.USER_SECTION.toString() + name.toUpperCase(), sh); }
java
public void addSectionHandling( String name, EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.USER_SECTION.toString() + name.toUpperCase(), sh); }
[ "public", "void", "addSectionHandling", "(", "String", "name", ",", "EnumMap", "<", "SIT", ",", "EnumMap", "<", "CIT", ",", "Boolean", ">", ">", "sh", ")", "{", "sectionHandling", ".", "put", "(", "SectionType", ".", "USER_SECTION", ".", "toString", "(", ...
adds section handling for a specila section name...
[ "adds", "section", "handling", "for", "a", "specila", "section", "name", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L134-L136
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.setDefaultSectionHandling
public void setDefaultSectionHandling( EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.DEFAULT_SECTION.toString(), sh ); }
java
public void setDefaultSectionHandling( EnumMap<SIT, EnumMap<CIT, Boolean>> sh ){ sectionHandling.put( SectionType.DEFAULT_SECTION.toString(), sh ); }
[ "public", "void", "setDefaultSectionHandling", "(", "EnumMap", "<", "SIT", ",", "EnumMap", "<", "CIT", ",", "Boolean", ">", ">", "sh", ")", "{", "sectionHandling", ".", "put", "(", "SectionType", ".", "DEFAULT_SECTION", ".", "toString", "(", ")", ",", "sh"...
sets the section handling for all sections which are not set by level or name...
[ "sets", "the", "section", "handling", "for", "all", "sections", "which", "are", "not", "set", "by", "level", "or", "name", "..." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L141-L143
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.getSelectionInfo
public String getSelectionInfo(){ StringBuilder result = new StringBuilder(); result.append( "SelectionInfo: "+this.getClass().toString() +"\n" ); result.append( "Page:"+ CITInfo( pageHandling )+"\n" ); result.append( "FirstParagraph:" +CITInfo( firstParagraphHandling )+"\n"); for( String key: sectionHandl...
java
public String getSelectionInfo(){ StringBuilder result = new StringBuilder(); result.append( "SelectionInfo: "+this.getClass().toString() +"\n" ); result.append( "Page:"+ CITInfo( pageHandling )+"\n" ); result.append( "FirstParagraph:" +CITInfo( firstParagraphHandling )+"\n"); for( String key: sectionHandl...
[ "public", "String", "getSelectionInfo", "(", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "result", ".", "append", "(", "\"SelectionInfo: \"", "+", "this", ".", "getClass", "(", ")", ".", "toString", "(", ")", "+", "\"\\...
Returns information which infomations are selected by the actual configuration
[ "Returns", "information", "which", "infomations", "are", "selected", "by", "the", "actual", "configuration" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L148-L165
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.CITInfo
public static String CITInfo( EnumMap<CIT, Boolean> hp ){ StringBuilder result = new StringBuilder(); result.append( "["); if( hp!= null ){ for( CIT key: hp.keySet()) result.append( key.toString()+":"+hp.get(key)+", "); result.delete( result.length()-2, result.length() ); } result.append( "]" ); r...
java
public static String CITInfo( EnumMap<CIT, Boolean> hp ){ StringBuilder result = new StringBuilder(); result.append( "["); if( hp!= null ){ for( CIT key: hp.keySet()) result.append( key.toString()+":"+hp.get(key)+", "); result.delete( result.length()-2, result.length() ); } result.append( "]" ); r...
[ "public", "static", "String", "CITInfo", "(", "EnumMap", "<", "CIT", ",", "Boolean", ">", "hp", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "result", ".", "append", "(", "\"[\"", ")", ";", "if", "(", "hp", "!=", "...
Converts a CITMap into a human readable String
[ "Converts", "a", "CITMap", "into", "a", "human", "readable", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L170-L180
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.SITInfo
public static String SITInfo( EnumMap<SIT, EnumMap<CIT, Boolean>> shp ){ StringBuilder result = new StringBuilder(); for( SIT key: shp.keySet() ){ result.append("\t"+key.toString()+":"+CITInfo( shp.get(key))+"\n"); } return result.toString(); }
java
public static String SITInfo( EnumMap<SIT, EnumMap<CIT, Boolean>> shp ){ StringBuilder result = new StringBuilder(); for( SIT key: shp.keySet() ){ result.append("\t"+key.toString()+":"+CITInfo( shp.get(key))+"\n"); } return result.toString(); }
[ "public", "static", "String", "SITInfo", "(", "EnumMap", "<", "SIT", ",", "EnumMap", "<", "CIT", ",", "Boolean", ">", ">", "shp", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "SIT", "key", ":", "shp", "...
Converts a SITMap into a human readable String
[ "Converts", "a", "SITMap", "into", "a", "human", "readable", "String" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L185-L191
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java
SelectiveAccessHandler.getSelectedText
public String getSelectedText( ParsedPage pp ){ if( pp == null ) return null; StringBuilder sb = new StringBuilder(); levelModifier = pp.getSection(0).getLevel()-1; if( pageHandling == null ){ if( firstParagraphHandling != null ){ handleContent( pp.getFirstParagraph(), firstParagraphHandling...
java
public String getSelectedText( ParsedPage pp ){ if( pp == null ) return null; StringBuilder sb = new StringBuilder(); levelModifier = pp.getSection(0).getLevel()-1; if( pageHandling == null ){ if( firstParagraphHandling != null ){ handleContent( pp.getFirstParagraph(), firstParagraphHandling...
[ "public", "String", "getSelectedText", "(", "ParsedPage", "pp", ")", "{", "if", "(", "pp", "==", "null", ")", "return", "null", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "levelModifier", "=", "pp", ".", "getSection", "(", "0...
Returns the Information of a ParsedPage which are selected by the actual configuration
[ "Returns", "the", "Information", "of", "a", "ParsedPage", "which", "are", "selected", "by", "the", "actual", "configuration" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/selectiveaccess/SelectiveAccessHandler.java#L216-L249
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Time.java
Time.toClock
public String toClock() { StringBuilder s = new StringBuilder(); s.append(((this.weeks * 7 + this.days) * 24 + this.hours) + ":"); if (this.minutes < 10) { s.append('0'); } s.append(this.minutes + ":"); if (this.seconds < 10) { s.append('0'); } s.append(this.seconds + "."); if (this.millisecon...
java
public String toClock() { StringBuilder s = new StringBuilder(); s.append(((this.weeks * 7 + this.days) * 24 + this.hours) + ":"); if (this.minutes < 10) { s.append('0'); } s.append(this.minutes + ":"); if (this.seconds < 10) { s.append('0'); } s.append(this.seconds + "."); if (this.millisecon...
[ "public", "String", "toClock", "(", ")", "{", "StringBuilder", "s", "=", "new", "StringBuilder", "(", ")", ";", "s", ".", "append", "(", "(", "(", "this", ".", "weeks", "*", "7", "+", "this", ".", "days", ")", "*", "24", "+", "this", ".", "hours"...
Returns the clock description of the time value.
[ "Returns", "the", "clock", "description", "of", "the", "time", "value", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Time.java#L117-L139
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Time.java
Time.toClock
public static String toClock(long time) { long ttime = time; short miliseconds = (short) (ttime % 1000); ttime = ttime / 1000; short seconds = (short) (ttime % 60); ttime = ttime / 60; short minutes = (short) (ttime % 60); ttime = ttime / 60; short hours = (short) (ttime % 24); ttime = ttime / 2...
java
public static String toClock(long time) { long ttime = time; short miliseconds = (short) (ttime % 1000); ttime = ttime / 1000; short seconds = (short) (ttime % 60); ttime = ttime / 60; short minutes = (short) (ttime % 60); ttime = ttime / 60; short hours = (short) (ttime % 24); ttime = ttime / 2...
[ "public", "static", "String", "toClock", "(", "long", "time", ")", "{", "long", "ttime", "=", "time", ";", "short", "miliseconds", "=", "(", "short", ")", "(", "ttime", "%", "1000", ")", ";", "ttime", "=", "ttime", "/", "1000", ";", "short", "seconds...
Transforms a millisecond value to the clock representation. @param time milliseconds @return clock representation
[ "Transforms", "a", "millisecond", "value", "to", "the", "clock", "representation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Time.java#L148-L191
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java
ArchiveRegistry.getValueAt
@Override public Object getValueAt(final int row, final int col) { switch (col) { case 0: return archives.get(row).getType(); case 1: return archives.get(row).getStartPosition(); case 2: return archives.get(row).getPath(); } return "---"; }
java
@Override public Object getValueAt(final int row, final int col) { switch (col) { case 0: return archives.get(row).getType(); case 1: return archives.get(row).getStartPosition(); case 2: return archives.get(row).getPath(); } return "---"; }
[ "@", "Override", "public", "Object", "getValueAt", "(", "final", "int", "row", ",", "final", "int", "col", ")", "{", "switch", "(", "col", ")", "{", "case", "0", ":", "return", "archives", ".", "get", "(", "row", ")", ".", "getType", "(", ")", ";",...
Returns the value at the specified position. @param row index of the row @param col index of the column @return string representation of the specified field
[ "Returns", "the", "value", "at", "the", "specified", "position", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java#L100-L114
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java
ArchiveRegistry.applyConfiguration
public void applyConfiguration(final ConfigSettings config) { clear(); Iterator<ArchiveDescription> aIt = config.archiveIterator(); while (aIt.hasNext()) { addArchive(aIt.next()); } }
java
public void applyConfiguration(final ConfigSettings config) { clear(); Iterator<ArchiveDescription> aIt = config.archiveIterator(); while (aIt.hasNext()) { addArchive(aIt.next()); } }
[ "public", "void", "applyConfiguration", "(", "final", "ConfigSettings", "config", ")", "{", "clear", "(", ")", ";", "Iterator", "<", "ArchiveDescription", ">", "aIt", "=", "config", ".", "archiveIterator", "(", ")", ";", "while", "(", "aIt", ".", "hasNext", ...
Adds the ArchiveDescriptions contained in the configuration. @param config Reference to the configuration
[ "Adds", "the", "ArchiveDescriptions", "contained", "in", "the", "configuration", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java#L164-L173
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/ChronoRevisionIterator.java
ChronoRevisionIterator.queryArticle
private boolean queryArticle() throws SQLException { Statement statement = this.connection.createStatement(); String query = "SELECT ArticleID, FullRevisionPKs, RevisionCounter " + "FROM index_articleID_rc_ts " + "WHERE articleID > " + this.currentArticleID + " LIMIT " + MAX_NUMBER_RESULTS; resultAr...
java
private boolean queryArticle() throws SQLException { Statement statement = this.connection.createStatement(); String query = "SELECT ArticleID, FullRevisionPKs, RevisionCounter " + "FROM index_articleID_rc_ts " + "WHERE articleID > " + this.currentArticleID + " LIMIT " + MAX_NUMBER_RESULTS; resultAr...
[ "private", "boolean", "queryArticle", "(", ")", "throws", "SQLException", "{", "Statement", "statement", "=", "this", ".", "connection", ".", "createStatement", "(", ")", ";", "String", "query", "=", "\"SELECT ArticleID, FullRevisionPKs, RevisionCounter \"", "+", "\"F...
Retrieves the next articles from the article index. @return whether the query contains results or not @throws SQLException if an error occurs while executing the query
[ "Retrieves", "the", "next", "articles", "from", "the", "article", "index", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/ChronoRevisionIterator.java#L143-L163
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/ChronoRevisionIterator.java
ChronoRevisionIterator.init
private Revision init() throws WikiApiException { try { currentArticleID = resultArticles.getInt(1); String fullRevisionPKs = resultArticles.getString(2); String revisionCounters = resultArticles.getString(3); int index = revisionCounters.lastIndexOf(' '); if (index == -1) { throw new RuntimeE...
java
private Revision init() throws WikiApiException { try { currentArticleID = resultArticles.getInt(1); String fullRevisionPKs = resultArticles.getString(2); String revisionCounters = resultArticles.getString(3); int index = revisionCounters.lastIndexOf(' '); if (index == -1) { throw new RuntimeE...
[ "private", "Revision", "init", "(", ")", "throws", "WikiApiException", "{", "try", "{", "currentArticleID", "=", "resultArticles", ".", "getInt", "(", "1", ")", ";", "String", "fullRevisionPKs", "=", "resultArticles", ".", "getString", "(", "2", ")", ";", "S...
Initiates the iteration over of a new article. @return First Revision @throws WikiApiException if an error occurs
[ "Initiates", "the", "iteration", "over", "of", "a", "new", "article", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/api/ChronoRevisionIterator.java#L180-L274
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/FilterPanel.java
FilterPanel.initTable
private void initTable() { namespaces = new JTable(new FilterTableModel()); namespaces.removeColumn(namespaces.getColumn("#")); namespaces.setFillsViewportHeight(true); namespaces.setPreferredScrollableViewportSize(new Dimension(500, 70)); // Create the scroll pane and add the table to it. JScrollPane s...
java
private void initTable() { namespaces = new JTable(new FilterTableModel()); namespaces.removeColumn(namespaces.getColumn("#")); namespaces.setFillsViewportHeight(true); namespaces.setPreferredScrollableViewportSize(new Dimension(500, 70)); // Create the scroll pane and add the table to it. JScrollPane s...
[ "private", "void", "initTable", "(", ")", "{", "namespaces", "=", "new", "JTable", "(", "new", "FilterTableModel", "(", ")", ")", ";", "namespaces", ".", "removeColumn", "(", "namespaces", ".", "getColumn", "(", "\"#\"", ")", ")", ";", "namespaces", ".", ...
Initialize JTable that contains namespaces
[ "Initialize", "JTable", "that", "contains", "namespaces" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/FilterPanel.java#L76-L90
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java
ConsumerLogMessages.logError
public static void logError(final Logger logger, final Error e) { logger.logError(Level.ERROR, "Unexpected Error", e); }
java
public static void logError(final Logger logger, final Error e) { logger.logError(Level.ERROR, "Unexpected Error", e); }
[ "public", "static", "void", "logError", "(", "final", "Logger", "logger", ",", "final", "Error", "e", ")", "{", "logger", ".", "logError", "(", "Level", ".", "ERROR", ",", "\"Unexpected Error\"", ",", "e", ")", ";", "}" ]
Logs an error. @param logger reference to the logger @param e reference to the error
[ "Logs", "an", "error", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java#L54-L57
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java
ConsumerLogMessages.logException
public static void logException(final Logger logger, final Exception e) { logger.logException(Level.ERROR, "Unexpected Exception", e); }
java
public static void logException(final Logger logger, final Exception e) { logger.logException(Level.ERROR, "Unexpected Exception", e); }
[ "public", "static", "void", "logException", "(", "final", "Logger", "logger", ",", "final", "Exception", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "ERROR", ",", "\"Unexpected Exception\"", ",", "e", ")", ";", "}" ]
Logs an exception. @param logger reference to the logger @param e reference to the exception
[ "Logs", "an", "exception", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java#L67-L70
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java
ConsumerLogMessages.logStatus
public static void logStatus(final Logger logger, final long startTime, final long sleepingTime, final long workingTime) { logger.logMessage( Level.DEBUG, "Consumer-Status-Report [" + Time.toClock(System.currentTimeMillis() - startTime) + "]" + "\tEFFICIENCY\t " + MathUtilities.percentP...
java
public static void logStatus(final Logger logger, final long startTime, final long sleepingTime, final long workingTime) { logger.logMessage( Level.DEBUG, "Consumer-Status-Report [" + Time.toClock(System.currentTimeMillis() - startTime) + "]" + "\tEFFICIENCY\t " + MathUtilities.percentP...
[ "public", "static", "void", "logStatus", "(", "final", "Logger", "logger", ",", "final", "long", "startTime", ",", "final", "long", "sleepingTime", ",", "final", "long", "workingTime", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "DEBUG", ",", ...
Logs the status of the consumer. @param logger reference to the logger @param startTime start time @param sleepingTime time the consumer has slept @param workingTime time the consumer was working
[ "Logs", "the", "status", "of", "the", "consumer", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java#L154-L166
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java
ConsumerLogMessages.logTimeoutException
public static void logTimeoutException(final Logger logger, final TimeoutException e) { logger.logException(Level.WARN, "TimeoutException", e); }
java
public static void logTimeoutException(final Logger logger, final TimeoutException e) { logger.logException(Level.WARN, "TimeoutException", e); }
[ "public", "static", "void", "logTimeoutException", "(", "final", "Logger", "logger", ",", "final", "TimeoutException", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "WARN", ",", "\"TimeoutException\"", ",", "e", ")", ";", "}" ]
Logs the occurrence of a TimeoutException. @param logger reference to the logger @param e reference to the exception
[ "Logs", "the", "occurrence", "of", "a", "TimeoutException", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ConsumerLogMessages.java#L187-L192
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/LoggingFactory.java
LoggingFactory.createLogger
public static Logger createLogger(final LoggerType type, final String consumerName) throws LoggingException { Logger log = new Logger(type, consumerName); if (consumerLoggingIndex.put(consumerName, log) != null) { throw ErrorFactory .createLoggingException(ErrorKeys.LOGGING_LOGGINGFACTORY_LOGGER_ALRE...
java
public static Logger createLogger(final LoggerType type, final String consumerName) throws LoggingException { Logger log = new Logger(type, consumerName); if (consumerLoggingIndex.put(consumerName, log) != null) { throw ErrorFactory .createLoggingException(ErrorKeys.LOGGING_LOGGINGFACTORY_LOGGER_ALRE...
[ "public", "static", "Logger", "createLogger", "(", "final", "LoggerType", "type", ",", "final", "String", "consumerName", ")", "throws", "LoggingException", "{", "Logger", "log", "=", "new", "Logger", "(", "type", ",", "consumerName", ")", ";", "if", "(", "c...
Creates a new Logger. @param consumerName Consumer Name @return The referenced Logger @throws LoggingException
[ "Creates", "a", "new", "Logger", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/LoggingFactory.java#L70-L82
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/LoggingFactory.java
LoggingFactory.getLogger
public static Logger getLogger(final String consumerName) throws LoggingException { Logger log = consumerLoggingIndex.get(consumerName); if (log == null) { throw ErrorFactory .createLoggingException(ErrorKeys.LOGGING_LOGGINGFACTORY_NO_SUCH_LOGGER); } return log; }
java
public static Logger getLogger(final String consumerName) throws LoggingException { Logger log = consumerLoggingIndex.get(consumerName); if (log == null) { throw ErrorFactory .createLoggingException(ErrorKeys.LOGGING_LOGGINGFACTORY_NO_SUCH_LOGGER); } return log; }
[ "public", "static", "Logger", "getLogger", "(", "final", "String", "consumerName", ")", "throws", "LoggingException", "{", "Logger", "log", "=", "consumerLoggingIndex", ".", "get", "(", "consumerName", ")", ";", "if", "(", "log", "==", "null", ")", "{", "thr...
Returns an already created Logger. @param consumerName Consumer Name @return The referenced Logger @throws LoggingException
[ "Returns", "an", "already", "created", "Logger", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/LoggingFactory.java#L93-L104
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decode
public Diff decode() throws UnsupportedEncodingException, DecodingException { int header = r.read(3); if (DiffAction.parse(header) != DiffAction.DECODER_DATA) { throw new DecodingException("Invalid codecData code: " + header); } int blockSize_C = 3; int blockSize_S = r.read(5); int blockSize_E = r....
java
public Diff decode() throws UnsupportedEncodingException, DecodingException { int header = r.read(3); if (DiffAction.parse(header) != DiffAction.DECODER_DATA) { throw new DecodingException("Invalid codecData code: " + header); } int blockSize_C = 3; int blockSize_S = r.read(5); int blockSize_E = r....
[ "public", "Diff", "decode", "(", ")", "throws", "UnsupportedEncodingException", ",", "DecodingException", "{", "int", "header", "=", "r", ".", "read", "(", "3", ")", ";", "if", "(", "DiffAction", ".", "parse", "(", "header", ")", "!=", "DiffAction", ".", ...
Decodes the information and returns the Diff. @return Diff @throws UnsupportedEncodingException if the character encoding is unsupported @throws DecodingException if the decoding failed
[ "Decodes", "the", "information", "and", "returns", "the", "Diff", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L116-L152
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decode
private Diff decode(final int blockSize_C, final int blockSize_S, final int blockSize_E, final int blockSize_B, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { int code = r.read(blockSize_C); Diff diff = new Diff(); while (code != -1) { // System.out.print(code + "\t"); ...
java
private Diff decode(final int blockSize_C, final int blockSize_S, final int blockSize_E, final int blockSize_B, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { int code = r.read(blockSize_C); Diff diff = new Diff(); while (code != -1) { // System.out.print(code + "\t"); ...
[ "private", "Diff", "decode", "(", "final", "int", "blockSize_C", ",", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_E", ",", "final", "int", "blockSize_B", ",", "final", "int", "blockSize_L", ")", "throws", "UnsupportedEncodingException", ",", "...
Decodes the information, after the codec was successfully decoded, and returns the Diff. @param blockSize_C length of a C block @param blockSize_S length of a S block @param blockSize_E length of a E block @param blockSize_B length of a B block @param blockSize_L length of a L block @return Diff @throws UnsupportedEn...
[ "Decodes", "the", "information", "after", "the", "codec", "was", "successfully", "decoded", "and", "returns", "the", "Diff", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L175-L214
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeAdd
private DiffPart decodeAdd(final int blockSize_S, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_S < 1 || blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_L: " + blockSize_L); } int s = r.rea...
java
private DiffPart decodeAdd(final int blockSize_S, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_S < 1 || blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_L: " + blockSize_L); } int s = r.rea...
[ "private", "DiffPart", "decodeAdd", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_L", ")", "throws", "UnsupportedEncodingException", ",", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_L", "<", "1", ")", "{",...
Decodes an Add operation. @param blockSize_S length of a S block @param blockSize_L length of a L block @return DiffPart, Add operation @throws UnsupportedEncodingException if the character encoding is unsupported @throws DecodingException if the decoding failed
[ "Decodes", "an", "Add", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L230-L252
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeCut
private DiffPart decodeCut(final int blockSize_S, final int blockSize_E, final int blockSize_B) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1 || blockSize_B < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + ", blockSize_E: " + blockSize_E + " ...
java
private DiffPart decodeCut(final int blockSize_S, final int blockSize_E, final int blockSize_B) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1 || blockSize_B < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + ", blockSize_E: " + blockSize_E + " ...
[ "private", "DiffPart", "decodeCut", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_E", ",", "final", "int", "blockSize_B", ")", "throws", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_E", "<", "1", "||", ...
Decodes a Cut operation. @param blockSize_S length of a S block @param blockSize_E length of a E block @param blockSize_B length of a B block @return DiffPart, Cut operation @throws DecodingException if the decoding failed
[ "Decodes", "a", "Cut", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L268-L291
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeDelete
private DiffPart decodeDelete(final int blockSize_S, final int blockSize_E) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_E: " + blockSize_E); } int s = r.read(blockSize_S); int e = r...
java
private DiffPart decodeDelete(final int blockSize_S, final int blockSize_E) throws DecodingException { if (blockSize_S < 1 || blockSize_E < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_E: " + blockSize_E); } int s = r.read(blockSize_S); int e = r...
[ "private", "DiffPart", "decodeDelete", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_E", ")", "throws", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_E", "<", "1", ")", "{", "throw", "new", "DecodingExcept...
Decodes a Delete operation. @param blockSize_S length of a S block @param blockSize_E length of a E block @return DiffPart, Delete operation @throws DecodingException if the decoding failed
[ "Decodes", "a", "Delete", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L305-L324
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeFullRevision
private DiffPart decodeFullRevision(final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_L: " + blockSize_L); } int l = r.read(blockSize_L); ByteArrayOutputStream output = new ByteArrayOutput...
java
private DiffPart decodeFullRevision(final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_L: " + blockSize_L); } int l = r.read(blockSize_L); ByteArrayOutputStream output = new ByteArrayOutput...
[ "private", "DiffPart", "decodeFullRevision", "(", "final", "int", "blockSize_L", ")", "throws", "UnsupportedEncodingException", ",", "DecodingException", "{", "if", "(", "blockSize_L", "<", "1", ")", "{", "throw", "new", "DecodingException", "(", "\"Invalid value for ...
Decodes a FullRevision operation. @param blockSize_L length of a L block @return DiffPart, FullRevision @throws UnsupportedEncodingException if the character encoding is unsupported @throws DecodingException if the decoding failed
[ "Decodes", "a", "FullRevision", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L338-L357
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodePaste
private DiffPart decodePaste(final int blockSize_S, final int blockSize_B, final BitReader r) throws DecodingException { if (blockSize_S < 1 || blockSize_B < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_B: " + blockSize_B); } int s = r.read(bloc...
java
private DiffPart decodePaste(final int blockSize_S, final int blockSize_B, final BitReader r) throws DecodingException { if (blockSize_S < 1 || blockSize_B < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + " or blockSize_B: " + blockSize_B); } int s = r.read(bloc...
[ "private", "DiffPart", "decodePaste", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_B", ",", "final", "BitReader", "r", ")", "throws", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "||", "blockSize_B", "<", "1", ")", "{"...
Decodes a Paste operation. @param blockSize_S length of a S block @param blockSize_B length of a B block @return DiffPart, Paste operation @throws DecodingException if the decoding failed
[ "Decodes", "a", "Paste", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L371-L391
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.decodeReplace
private DiffPart decodeReplace(final int blockSize_S, final int blockSize_E, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_S < 1 || blockSize_E < 1 || blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + ", bloc...
java
private DiffPart decodeReplace(final int blockSize_S, final int blockSize_E, final int blockSize_L) throws UnsupportedEncodingException, DecodingException { if (blockSize_S < 1 || blockSize_E < 1 || blockSize_L < 1) { throw new DecodingException("Invalid value for blockSize_S: " + blockSize_S + ", bloc...
[ "private", "DiffPart", "decodeReplace", "(", "final", "int", "blockSize_S", ",", "final", "int", "blockSize_E", ",", "final", "int", "blockSize_L", ")", "throws", "UnsupportedEncodingException", ",", "DecodingException", "{", "if", "(", "blockSize_S", "<", "1", "|...
Decodes a Replace operation. @param blockSize_S length of a S block @param blockSize_E length of a E block @param blockSize_L length of a L block @return DiffPart, Replace operation @throws UnsupportedEncodingException if the character encoding is unsupported @throws DecodingException if the decoding failed
[ "Decodes", "a", "Replace", "operation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L409-L435
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.inflateInput
private byte[] inflateInput(final byte[] zipinput, final int start) { ByteArrayOutputStream stream; try { byte[] compressedInput = zipinput; Inflater decompresser = new Inflater(); decompresser.setInput(compressedInput, start, compressedInput.length - start); byte[] output = new byte[1000]; st...
java
private byte[] inflateInput(final byte[] zipinput, final int start) { ByteArrayOutputStream stream; try { byte[] compressedInput = zipinput; Inflater decompresser = new Inflater(); decompresser.setInput(compressedInput, start, compressedInput.length - start); byte[] output = new byte[1000]; st...
[ "private", "byte", "[", "]", "inflateInput", "(", "final", "byte", "[", "]", "zipinput", ",", "final", "int", "start", ")", "{", "ByteArrayOutputStream", "stream", ";", "try", "{", "byte", "[", "]", "compressedInput", "=", "zipinput", ";", "Inflater", "dec...
Inflates the zipped input. @param zipinput zipped input @param start start position @return inflated input
[ "Inflates", "the", "zipped", "input", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L446-L471
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.setInput
public void setInput(final byte[] input) { if (input[0] == -128) { r = new BitReader(inflateInput(input, 1)); } else { r = new BitReader(input); } }
java
public void setInput(final byte[] input) { if (input[0] == -128) { r = new BitReader(inflateInput(input, 1)); } else { r = new BitReader(input); } }
[ "public", "void", "setInput", "(", "final", "byte", "[", "]", "input", ")", "{", "if", "(", "input", "[", "0", "]", "==", "-", "128", ")", "{", "r", "=", "new", "BitReader", "(", "inflateInput", "(", "input", ",", "1", ")", ")", ";", "}", "else...
Assigns the binary input. @param input binary encoded diff
[ "Assigns", "the", "binary", "input", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L479-L488
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.setInput
public void setInput(final InputStream input, final boolean binary) throws IOException { if (!binary) { int v = input.read(); StringBuilder buffer = new StringBuilder(); // Check for the no-zip flag boolean zipFlag = (char) v == '_'; if (zipFlag) { v = input.read(); } while (v != -1) {...
java
public void setInput(final InputStream input, final boolean binary) throws IOException { if (!binary) { int v = input.read(); StringBuilder buffer = new StringBuilder(); // Check for the no-zip flag boolean zipFlag = (char) v == '_'; if (zipFlag) { v = input.read(); } while (v != -1) {...
[ "public", "void", "setInput", "(", "final", "InputStream", "input", ",", "final", "boolean", "binary", ")", "throws", "IOException", "{", "if", "(", "!", "binary", ")", "{", "int", "v", "=", "input", ".", "read", "(", ")", ";", "StringBuilder", "buffer",...
Assigns an input stream. @param input Reference to an input stream @param binary flag, whether the data is binary or not @throws IOException if an error occurs while reading the stream
[ "Assigns", "an", "input", "stream", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L501-L562
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java
RevisionDecoder.setInput
public void setInput(final String input) throws DecodingException { boolean zipFlag = input.charAt(0) == '_'; if (zipFlag) { r = new BitReader(inflateInput( Base64.decodeBase64(input.substring(1)), 0)); } else { byte[] data = Base64.decodeBase64(input); if (data == null) { for (int i = 0;...
java
public void setInput(final String input) throws DecodingException { boolean zipFlag = input.charAt(0) == '_'; if (zipFlag) { r = new BitReader(inflateInput( Base64.decodeBase64(input.substring(1)), 0)); } else { byte[] data = Base64.decodeBase64(input); if (data == null) { for (int i = 0;...
[ "public", "void", "setInput", "(", "final", "String", "input", ")", "throws", "DecodingException", "{", "boolean", "zipFlag", "=", "input", ".", "charAt", "(", "0", ")", "==", "'", "'", ";", "if", "(", "zipFlag", ")", "{", "r", "=", "new", "BitReader",...
Assigns base 64 encoded input. @param input base 64 encoded diff @throws DecodingException if the decoding fails
[ "Assigns", "base", "64", "encoded", "input", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionDecoder.java#L573-L595
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionCodecData.java
RevisionCodecData.totalSizeInBits
public int totalSizeInBits() { if (converted) { return 24 + this.countC * 3 + this.countS * blocksize_S + this.countE * blocksize_E + this.countB * blocksize_B + this.countL * blocksize_L + this.countT * 8; } converted = true; // System.out.println(this.toString()); if (this.blocksize_B > 0)...
java
public int totalSizeInBits() { if (converted) { return 24 + this.countC * 3 + this.countS * blocksize_S + this.countE * blocksize_E + this.countB * blocksize_B + this.countL * blocksize_L + this.countT * 8; } converted = true; // System.out.println(this.toString()); if (this.blocksize_B > 0)...
[ "public", "int", "totalSizeInBits", "(", ")", "{", "if", "(", "converted", ")", "{", "return", "24", "+", "this", ".", "countC", "*", "3", "+", "this", ".", "countS", "*", "blocksize_S", "+", "this", ".", "countE", "*", "blocksize_E", "+", "this", "....
Converts the input information into their log2 values. If an operation is contained in the diff, the minimum number of bits used to encode this block is 1 byte. @return number of bytes needed to encode the associated diff
[ "Converts", "the", "input", "information", "into", "their", "log2", "values", ".", "If", "an", "operation", "is", "contained", "in", "the", "diff", "the", "minimum", "number", "of", "bits", "used", "to", "encode", "this", "block", "is", "1", "byte", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionCodecData.java#L144-L192
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/DebugPanel.java
DebugPanel.validateDebugSettings
private void validateDebugSettings() { verifyDiffCheckBox.setSelected(controller.isDiffVerificationEnabled()); verifyEncodingCheckBox.setSelected(controller .isEncodingVerificationEnabled()); statsOutputCheckBox.setSelected(controller.isStatsOutputEnabled()); boolean flagA = controller.isDiffVerification...
java
private void validateDebugSettings() { verifyDiffCheckBox.setSelected(controller.isDiffVerificationEnabled()); verifyEncodingCheckBox.setSelected(controller .isEncodingVerificationEnabled()); statsOutputCheckBox.setSelected(controller.isStatsOutputEnabled()); boolean flagA = controller.isDiffVerification...
[ "private", "void", "validateDebugSettings", "(", ")", "{", "verifyDiffCheckBox", ".", "setSelected", "(", "controller", ".", "isDiffVerificationEnabled", "(", ")", ")", ";", "verifyEncodingCheckBox", ".", "setSelected", "(", "controller", ".", "isEncodingVerificationEna...
Validates the debug settings.
[ "Validates", "the", "debug", "settings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/DebugPanel.java#L185-L203
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitReader.java
BitReader.read
public int read(final int length) throws DecodingException { if (length > 31) { throw ErrorFactory.createDecodingException( ErrorKeys.DIFFTOOL_DECODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + length); } int v, b = 0; for (int i = length - 1; i >= 0; i--) { v = readBit(); if (v...
java
public int read(final int length) throws DecodingException { if (length > 31) { throw ErrorFactory.createDecodingException( ErrorKeys.DIFFTOOL_DECODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + length); } int v, b = 0; for (int i = length - 1; i >= 0; i--) { v = readBit(); if (v...
[ "public", "int", "read", "(", "final", "int", "length", ")", "throws", "DecodingException", "{", "if", "(", "length", ">", "31", ")", "{", "throw", "ErrorFactory", ".", "createDecodingException", "(", "ErrorKeys", ".", "DIFFTOOL_DECODING_VALUE_OUT_OF_RANGE", ",", ...
Reads the next length-bits from the input. The maximum value of bits that could be read is 31. (Maximum value of a positive number that could be stored in an integer without any conversion.) @param length number of bits to read @return content as integer value or -1 if the end of the stream has been reached @throws ...
[ "Reads", "the", "next", "length", "-", "bits", "from", "the", "input", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitReader.java#L99-L124
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexIterator.java
IndexIterator.query
private boolean query() throws SQLException { statement = this.connection.createStatement(); String query = "SELECT PrimaryKey, RevisionCounter," + " RevisionID, ArticleID, Timestamp, FullRevisionID " + "FROM revisions"; if (primaryKey > 0) { query += " WHERE PrimaryKey > " + primaryKey; } if...
java
private boolean query() throws SQLException { statement = this.connection.createStatement(); String query = "SELECT PrimaryKey, RevisionCounter," + " RevisionID, ArticleID, Timestamp, FullRevisionID " + "FROM revisions"; if (primaryKey > 0) { query += " WHERE PrimaryKey > " + primaryKey; } if...
[ "private", "boolean", "query", "(", ")", "throws", "SQLException", "{", "statement", "=", "this", ".", "connection", ".", "createStatement", "(", ")", ";", "String", "query", "=", "\"SELECT PrimaryKey, RevisionCounter,\"", "+", "\" RevisionID, ArticleID, Timestamp, Full...
Queries the database for more revision information. @return TRUE if the resultset contains elements FALSE otherwise @throws SQLException if an error occurs while accessing the database
[ "Queries", "the", "database", "for", "more", "revision", "information", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexIterator.java#L103-L122
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexIterator.java
IndexIterator.hasNext
public boolean hasNext() { try { if (result != null && result.next()) { return true; } if (this.statement != null) { this.statement.close(); } if (this.result != null) { this.result.close(); } return query(); } catch (SQLException e) { throw new RuntimeException(e); } }
java
public boolean hasNext() { try { if (result != null && result.next()) { return true; } if (this.statement != null) { this.statement.close(); } if (this.result != null) { this.result.close(); } return query(); } catch (SQLException e) { throw new RuntimeException(e); } }
[ "public", "boolean", "hasNext", "(", ")", "{", "try", "{", "if", "(", "result", "!=", "null", "&&", "result", ".", "next", "(", ")", ")", "{", "return", "true", ";", "}", "if", "(", "this", ".", "statement", "!=", "null", ")", "{", "this", ".", ...
Returns TRUE if another revision information is available. @return TRUE | FALSE
[ "Returns", "TRUE", "if", "another", "revision", "information", "is", "available", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/IndexIterator.java#L159-L179
train
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Link.java
Link.getContext
public String getContext(int wordsLeft, int wordsRight){ final String text = home_cc.getText(); int temp; // get the left start position int posLeft = pos.getStart(); temp = posLeft-1; while( posLeft != 0 && wordsLeft > 0 ){ while( temp > 0 && text.charAt( temp ) < 48 ) { temp--; } while( tem...
java
public String getContext(int wordsLeft, int wordsRight){ final String text = home_cc.getText(); int temp; // get the left start position int posLeft = pos.getStart(); temp = posLeft-1; while( posLeft != 0 && wordsLeft > 0 ){ while( temp > 0 && text.charAt( temp ) < 48 ) { temp--; } while( tem...
[ "public", "String", "getContext", "(", "int", "wordsLeft", ",", "int", "wordsRight", ")", "{", "final", "String", "text", "=", "home_cc", ".", "getText", "(", ")", ";", "int", "temp", ";", "// get the left start position", "int", "posLeft", "=", "pos", ".", ...
Returns the Number of Words left and right of the Link, in the Bounds of the HomeElement of this Link.
[ "Returns", "the", "Number", "of", "Words", "left", "and", "right", "of", "the", "Link", "in", "the", "Bounds", "of", "the", "HomeElement", "of", "this", "Link", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/Link.java#L81-L117
train