id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
105,800
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
105,801
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
105,802
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
105,803
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
105,804
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
105,805
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
105,806
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
105,807
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
105,808
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
105,809
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
105,810
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
105,811
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
105,812
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
105,813
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
105,814
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
105,815
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
105,816
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
105,817
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
105,818
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
105,819
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
105,820
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
105,821
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
105,822
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
105,823
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
105,824
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
105,825
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
105,826
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
105,827
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
105,828
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
105,829
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
105,830
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
105,831
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
105,832
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
105,833
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
105,834
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
105,835
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
105,836
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
105,837
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
105,838
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
105,839
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
105,840
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
105,841
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
105,842
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
105,843
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
105,844
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
105,845
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
105,846
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
105,847
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
105,848
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
105,849
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
105,850
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
105,851
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
105,852
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
105,853
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
105,854
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
105,855
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
105,856
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
105,857
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
105,858
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
105,859
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
105,860
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
105,861
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
105,862
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
105,863
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
105,864
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
105,865
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
105,866
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/AbstractIndex.java
AbstractIndex.storeBuffer
protected void storeBuffer() { if (buffer != null && buffer.length() > insertStatement.length()) { if(!insertStatement.isEmpty()) { //only do this in SQL/DATABASE MODE this.buffer.append(";"); } bufferList.add(buffer); } this.buffer = new StringBuilder(); this.buffer.append(insertStatement);...
java
protected void storeBuffer() { if (buffer != null && buffer.length() > insertStatement.length()) { if(!insertStatement.isEmpty()) { //only do this in SQL/DATABASE MODE this.buffer.append(";"); } bufferList.add(buffer); } this.buffer = new StringBuilder(); this.buffer.append(insertStatement);...
[ "protected", "void", "storeBuffer", "(", ")", "{", "if", "(", "buffer", "!=", "null", "&&", "buffer", ".", "length", "(", ")", ">", "insertStatement", ".", "length", "(", ")", ")", "{", "if", "(", "!", "insertStatement", ".", "isEmpty", "(", ")", ")"...
Finalizes the query in the currently used buffer and creates a new one. The finalized query will be added to the list of queries.
[ "Finalizes", "the", "query", "in", "the", "currently", "used", "buffer", "and", "creates", "a", "new", "one", ".", "The", "finalized", "query", "will", "be", "added", "to", "the", "list", "of", "queries", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/AbstractIndex.java#L126-L139
105,867
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/SpanManager.java
SpanManager.enableSrcPosCalculation
public void enableSrcPosCalculation(){ calculateSrcPositions = true; final int len = sb.length(); ib = new ArrayList<Integer>(len); for( int i=0; i<len; i++) ib.add( i ); }
java
public void enableSrcPosCalculation(){ calculateSrcPositions = true; final int len = sb.length(); ib = new ArrayList<Integer>(len); for( int i=0; i<len; i++) ib.add( i ); }
[ "public", "void", "enableSrcPosCalculation", "(", ")", "{", "calculateSrcPositions", "=", "true", ";", "final", "int", "len", "=", "sb", ".", "length", "(", ")", ";", "ib", "=", "new", "ArrayList", "<", "Integer", ">", "(", "len", ")", ";", "for", "(",...
Enables the Calculation of Src Position. The base for these position will be the aktual, not the initial, String wich is uses as Base for the SpanManager.
[ "Enables", "the", "Calculation", "of", "Src", "Position", ".", "The", "base", "for", "these", "position", "will", "be", "the", "aktual", "not", "the", "initial", "String", "wich", "is", "uses", "as", "Base", "for", "the", "SpanManager", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/SpanManager.java#L55-L60
105,868
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Category.java
Category.getSiblings
public Set<Category> getSiblings() { Set<Category> siblings = new HashSet<Category>(); // add siblings for (Category parent : this.getParents()) { siblings.addAll(parent.getChildren()); } // remove this category from list siblings.remove(this); retu...
java
public Set<Category> getSiblings() { Set<Category> siblings = new HashSet<Category>(); // add siblings for (Category parent : this.getParents()) { siblings.addAll(parent.getChildren()); } // remove this category from list siblings.remove(this); retu...
[ "public", "Set", "<", "Category", ">", "getSiblings", "(", ")", "{", "Set", "<", "Category", ">", "siblings", "=", "new", "HashSet", "<", "Category", ">", "(", ")", ";", "// add siblings", "for", "(", "Category", "parent", ":", "this", ".", "getParents",...
Returns the siblings of this category. @return Returns the siblings of this category or null, if there are none.
[ "Returns", "the", "siblings", "of", "this", "category", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Category.java#L356-L368
105,869
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/WikipediaXMLWriter.java
WikipediaXMLWriter.writeDiff
public void writeDiff(final Task<Diff> diff, final int start) throws IOException { int size = diff.size(); Diff d; String previousRevision = null, currentRevision = null; this.writer .write(WikipediaXMLKeys.KEY_START_PAGE.getKeyword() + "\r\n"); ArticleInformation header = diff.getHeader(); this....
java
public void writeDiff(final Task<Diff> diff, final int start) throws IOException { int size = diff.size(); Diff d; String previousRevision = null, currentRevision = null; this.writer .write(WikipediaXMLKeys.KEY_START_PAGE.getKeyword() + "\r\n"); ArticleInformation header = diff.getHeader(); this....
[ "public", "void", "writeDiff", "(", "final", "Task", "<", "Diff", ">", "diff", ",", "final", "int", "start", ")", "throws", "IOException", "{", "int", "size", "=", "diff", ".", "size", "(", ")", ";", "Diff", "d", ";", "String", "previousRevision", "=",...
Writes a part of the diff task, starting with the given element, to the output using wikipedia xml notation. @param diff Reference to a diff task @param start Position of the start element @throws IOException if an error occurs while writing the output
[ "Writes", "a", "part", "of", "the", "diff", "task", "starting", "with", "the", "given", "element", "to", "the", "output", "using", "wikipedia", "xml", "notation", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/WikipediaXMLWriter.java#L89-L155
105,870
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Surrogates.java
Surrogates.scan
public static boolean scan(final char[] input) { int surLow = 0xD800; int surHgh = 0xDFFF; int end = input.length; for (int i = 0; i < end; i++) { if ((int) input[i] >= surLow && input[i] <= surHgh) { return true; } } return false; }
java
public static boolean scan(final char[] input) { int surLow = 0xD800; int surHgh = 0xDFFF; int end = input.length; for (int i = 0; i < end; i++) { if ((int) input[i] >= surLow && input[i] <= surHgh) { return true; } } return false; }
[ "public", "static", "boolean", "scan", "(", "final", "char", "[", "]", "input", ")", "{", "int", "surLow", "=", "0xD800", ";", "int", "surHgh", "=", "0xDFFF", ";", "int", "end", "=", "input", ".", "length", ";", "for", "(", "int", "i", "=", "0", ...
Returns whether a surrogate character was contained in the specified input. @param input input @return if a surrogate character was contained or not
[ "Returns", "whether", "a", "surrogate", "character", "was", "contained", "in", "the", "specified", "input", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Surrogates.java#L42-L56
105,871
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Surrogates.java
Surrogates.replace
public static char[] replace(final char[] input) { int surLow = 0xD800; int surHgh = 0xDFFF; int end = input.length; char[] output = new char[end]; for (int i = 0; i < end; i++) { if ((int) input[i] >= surLow && input[i] <= surHgh) { output[i] = '?'; } else { output[i] = input[i]; } ...
java
public static char[] replace(final char[] input) { int surLow = 0xD800; int surHgh = 0xDFFF; int end = input.length; char[] output = new char[end]; for (int i = 0; i < end; i++) { if ((int) input[i] >= surLow && input[i] <= surHgh) { output[i] = '?'; } else { output[i] = input[i]; } ...
[ "public", "static", "char", "[", "]", "replace", "(", "final", "char", "[", "]", "input", ")", "{", "int", "surLow", "=", "0xD800", ";", "int", "surHgh", "=", "0xDFFF", ";", "int", "end", "=", "input", ".", "length", ";", "char", "[", "]", "output"...
Replaces all surrogates characters with '?'. @param input input @return input with '?' instead of surrogates characters
[ "Replaces", "all", "surrogates", "characters", "with", "?", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/Surrogates.java#L65-L84
105,872
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logArticleRead
public static void logArticleRead(final Logger logger, final Task<Revision> article, final long time, final long position) { logger.logMessage(Level.INFO, "Read article\t" + Time.toClock(time) + "\t" + article.toString() + "\t" + position); }
java
public static void logArticleRead(final Logger logger, final Task<Revision> article, final long time, final long position) { logger.logMessage(Level.INFO, "Read article\t" + Time.toClock(time) + "\t" + article.toString() + "\t" + position); }
[ "public", "static", "void", "logArticleRead", "(", "final", "Logger", "logger", ",", "final", "Task", "<", "Revision", ">", "article", ",", "final", "long", "time", ",", "final", "long", "position", ")", "{", "logger", ".", "logMessage", "(", "Level", ".",...
Logs the reading of an revision task. @param logger reference to the logger @param article reference to the revision task @param time time needed for the operation @param position input file position
[ "Logs", "the", "reading", "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/ArticleConsumerLogMessages.java#L88-L94
105,873
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logErrorRetrieveArchive
public static void logErrorRetrieveArchive(final Logger logger, final ArchiveDescription archive, final Error e) { logger.logError(Level.ERROR, "Error while accessing archive " + archive.toString(), e); }
java
public static void logErrorRetrieveArchive(final Logger logger, final ArchiveDescription archive, final Error e) { logger.logError(Level.ERROR, "Error while accessing archive " + archive.toString(), e); }
[ "public", "static", "void", "logErrorRetrieveArchive", "(", "final", "Logger", "logger", ",", "final", "ArchiveDescription", "archive", ",", "final", "Error", "e", ")", "{", "logger", ".", "logError", "(", "Level", ".", "ERROR", ",", "\"Error while accessing archi...
Logs the occurance of an error while retrieving the input file. @param logger reference to the logger @param archive reference to the archive @param e reference to the error
[ "Logs", "the", "occurance", "of", "an", "error", "while", "retrieving", "the", "input", "file", "." ]
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/ArticleConsumerLogMessages.java#L106-L112
105,874
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logExceptionRetrieveArchive
public static void logExceptionRetrieveArchive(final Logger logger, final ArchiveDescription archive, final Exception e) { logger.logException(Level.ERROR, "Exception while accessing archive " + archive.toString(), e); }
java
public static void logExceptionRetrieveArchive(final Logger logger, final ArchiveDescription archive, final Exception e) { logger.logException(Level.ERROR, "Exception while accessing archive " + archive.toString(), e); }
[ "public", "static", "void", "logExceptionRetrieveArchive", "(", "final", "Logger", "logger", ",", "final", "ArchiveDescription", "archive", ",", "final", "Exception", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "ERROR", ",", "\"Exception while...
Logs the occurance of an exception while retrieving the input file. @param logger reference to the logger @param archive reference to the archive @param e reference to the exception
[ "Logs", "the", "occurance", "of", "an", "exception", "while", "retrieving", "the", "input", "file", "." ]
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/ArticleConsumerLogMessages.java#L124-L130
105,875
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logNoMoreArticles
public static void logNoMoreArticles(final Logger logger, final ArchiveDescription archive) { logger.logMessage(Level.INFO, "Archive " + archive.toString() + " contains no more articles"); }
java
public static void logNoMoreArticles(final Logger logger, final ArchiveDescription archive) { logger.logMessage(Level.INFO, "Archive " + archive.toString() + " contains no more articles"); }
[ "public", "static", "void", "logNoMoreArticles", "(", "final", "Logger", "logger", ",", "final", "ArchiveDescription", "archive", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "INFO", ",", "\"Archive \"", "+", "archive", ".", "toString", "(", ")", ...
Logs that no more articles are available. @param logger reference to the logger @param archive reference to the archive descriptor
[ "Logs", "that", "no", "more", "articles", "are", "available", "." ]
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/ArticleConsumerLogMessages.java#L168-L174
105,876
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logReadTaskException
public static void logReadTaskException(final Logger logger, final Task<Revision> task, final Exception e) { if (task != null) { logger.logException(Level.ERROR, "Error while reading a task: " + task.toString(), e); } else { logger.logException(Level.ERROR, "Error while reading an unknown tas...
java
public static void logReadTaskException(final Logger logger, final Task<Revision> task, final Exception e) { if (task != null) { logger.logException(Level.ERROR, "Error while reading a task: " + task.toString(), e); } else { logger.logException(Level.ERROR, "Error while reading an unknown tas...
[ "public", "static", "void", "logReadTaskException", "(", "final", "Logger", "logger", ",", "final", "Task", "<", "Revision", ">", "task", ",", "final", "Exception", "e", ")", "{", "if", "(", "task", "!=", "null", ")", "{", "logger", ".", "logException", ...
Logs an occurance of an exception while reading a task. @param logger reference to the logger @param task reference to the task @param e reference to the exception
[ "Logs", "an", "occurance", "of", "an", "exception", "while", "reading", "a", "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/ArticleConsumerLogMessages.java#L186-L198
105,877
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logStatus
public static void logStatus(final Logger logger, final ArticleReaderInterface articleReader, final long startTime, final long sleepingTime, final long workingTime) { String message = "Consumer-Status-Report [" + Time.toClock(System.currentTimeMillis() - startTime) + "]"; if (articleReader != null) { ...
java
public static void logStatus(final Logger logger, final ArticleReaderInterface articleReader, final long startTime, final long sleepingTime, final long workingTime) { String message = "Consumer-Status-Report [" + Time.toClock(System.currentTimeMillis() - startTime) + "]"; if (articleReader != null) { ...
[ "public", "static", "void", "logStatus", "(", "final", "Logger", "logger", ",", "final", "ArticleReaderInterface", "articleReader", ",", "final", "long", "startTime", ",", "final", "long", "sleepingTime", ",", "final", "long", "workingTime", ")", "{", "String", ...
Logs the status of the article consumer. @param logger reference to the logger @param articleReader reference to the ArticleReader @param startTime start time @param sleepingTime time the consumer has slept @param workingTime time the consumer was working
[ "Logs", "the", "status", "of", "the", "article", "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/ArticleConsumerLogMessages.java#L250-L268
105,878
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/ArticleConsumerLogMessages.java
ArticleConsumerLogMessages.logTaskReaderException
public static void logTaskReaderException(final Logger logger, final ArticleReaderException e) { logger.logException(Level.ERROR, "TaskReaderException", e); }
java
public static void logTaskReaderException(final Logger logger, final ArticleReaderException e) { logger.logException(Level.ERROR, "TaskReaderException", e); }
[ "public", "static", "void", "logTaskReaderException", "(", "final", "Logger", "logger", ",", "final", "ArticleReaderException", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "ERROR", ",", "\"TaskReaderException\"", ",", "e", ")", ";", "}" ]
Logs the occurance of an ArticleReaderException. @param logger reference to the logger @param e reference to the exception
[ "Logs", "the", "occurance", "of", "an", "ArticleReaderException", "." ]
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/ArticleConsumerLogMessages.java#L278-L283
105,879
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/SQLConsumerLogMessages.java
SQLConsumerLogMessages.logDiffProcessed
public static void logDiffProcessed(final Logger logger, final Task<Diff> diff, final long time) { logger.logMessage( Level.INFO, "Generated Entry\t" + Time.toClock(time) + "\t" + diff.toString()); }
java
public static void logDiffProcessed(final Logger logger, final Task<Diff> diff, final long time) { logger.logMessage( Level.INFO, "Generated Entry\t" + Time.toClock(time) + "\t" + diff.toString()); }
[ "public", "static", "void", "logDiffProcessed", "(", "final", "Logger", "logger", ",", "final", "Task", "<", "Diff", ">", "diff", ",", "final", "long", "time", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "INFO", ",", "\"Generated Entry\\t\"", ...
Logs the processing of a diff task. @param logger reference to the logger @param diff reference to the task @param time time
[ "Logs", "the", "processing", "of", "a", "diff", "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/SQLConsumerLogMessages.java#L46-L54
105,880
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/SQLConsumerLogMessages.java
SQLConsumerLogMessages.logFileCreation
public static void logFileCreation(final Logger logger, final String path) { logger.logMessage(Level.INFO, "New File created:\t" + path); }
java
public static void logFileCreation(final Logger logger, final String path) { logger.logMessage(Level.INFO, "New File created:\t" + path); }
[ "public", "static", "void", "logFileCreation", "(", "final", "Logger", "logger", ",", "final", "String", "path", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "INFO", ",", "\"New File created:\\t\"", "+", "path", ")", ";", "}" ]
Logs the creation of an output file. @param logger reference to the logger @param path path of the output file
[ "Logs", "the", "creation", "of", "an", "output", "file", "." ]
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/SQLConsumerLogMessages.java#L64-L68
105,881
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/SQLConsumerLogMessages.java
SQLConsumerLogMessages.logReadTaskOutOfMemoryError
public static void logReadTaskOutOfMemoryError(final Logger logger, final Task<Diff> task, final OutOfMemoryError e) { if (task != null) { logger.logError(Level.WARN, "Error while reading a task: " + task.toString(), e); } else { logger.logError(Level.WARN, "Error while reading an unknown tas...
java
public static void logReadTaskOutOfMemoryError(final Logger logger, final Task<Diff> task, final OutOfMemoryError e) { if (task != null) { logger.logError(Level.WARN, "Error while reading a task: " + task.toString(), e); } else { logger.logError(Level.WARN, "Error while reading an unknown tas...
[ "public", "static", "void", "logReadTaskOutOfMemoryError", "(", "final", "Logger", "logger", ",", "final", "Task", "<", "Diff", ">", "task", ",", "final", "OutOfMemoryError", "e", ")", "{", "if", "(", "task", "!=", "null", ")", "{", "logger", ".", "logErro...
Logs the occurrence of an OutOfMemoryError while reading a task. @param logger reference to the logger @param task reference to the revision task @param e reference to the error
[ "Logs", "the", "occurrence", "of", "an", "OutOfMemoryError", "while", "reading", "a", "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/SQLConsumerLogMessages.java#L80-L92
105,882
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/consumer/SQLConsumerLogMessages.java
SQLConsumerLogMessages.logSQLConsumerException
public static void logSQLConsumerException(final Logger logger, final SQLConsumerException e) { logger.logException(Level.ERROR, "SQLConsumerException", e); }
java
public static void logSQLConsumerException(final Logger logger, final SQLConsumerException e) { logger.logException(Level.ERROR, "SQLConsumerException", e); }
[ "public", "static", "void", "logSQLConsumerException", "(", "final", "Logger", "logger", ",", "final", "SQLConsumerException", "e", ")", "{", "logger", ".", "logException", "(", "Level", ".", "ERROR", ",", "\"SQLConsumerException\"", ",", "e", ")", ";", "}" ]
Logs the occurrence of an SqlConsumerException. @param logger reference to the logger @param e reference to the exception
[ "Logs", "the", "occurrence", "of", "an", "SqlConsumerException", "." ]
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/SQLConsumerLogMessages.java#L102-L107
105,883
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/DiffToolLogMessages.java
DiffToolLogMessages.logStatus
public static void logStatus(final Logger logger, final long time, final int articleConsumer, final int diffConsumer, final int sqlConsumer, final boolean archiveState, final boolean articleState, final boolean diffState) { logger.logMessage(Level.INFO, "\r\nDiffTool-Status-Report [" + Time.toClock(tim...
java
public static void logStatus(final Logger logger, final long time, final int articleConsumer, final int diffConsumer, final int sqlConsumer, final boolean archiveState, final boolean articleState, final boolean diffState) { logger.logMessage(Level.INFO, "\r\nDiffTool-Status-Report [" + Time.toClock(tim...
[ "public", "static", "void", "logStatus", "(", "final", "Logger", "logger", ",", "final", "long", "time", ",", "final", "int", "articleConsumer", ",", "final", "int", "diffConsumer", ",", "final", "int", "sqlConsumer", ",", "final", "boolean", "archiveState", "...
Logs the status of the diff tool. @param logger reference to the logger @param time time since start @param articleConsumer number of active article consumers @param diffConsumer number of active diff consumers @param sqlConsumer number of active sql consumers @param archiveState state of the arcive producer @param ar...
[ "Logs", "the", "status", "of", "the", "diff", "tool", "." ]
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/DiffToolLogMessages.java#L69-L82
105,884
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/logging/messages/DiffToolLogMessages.java
DiffToolLogMessages.logShutdown
public static void logShutdown(final Logger logger, final long endTime) { logger.logMessage(Level.INFO, "DiffTool initiates SHUTDOWN\t" + Time.toClock(endTime)); }
java
public static void logShutdown(final Logger logger, final long endTime) { logger.logMessage(Level.INFO, "DiffTool initiates SHUTDOWN\t" + Time.toClock(endTime)); }
[ "public", "static", "void", "logShutdown", "(", "final", "Logger", "logger", ",", "final", "long", "endTime", ")", "{", "logger", ".", "logMessage", "(", "Level", ".", "INFO", ",", "\"DiffTool initiates SHUTDOWN\\t\"", "+", "Time", ".", "toClock", "(", "endTim...
Logs the shutdown of the logger. @param logger reference to the logger @param endTime time since start
[ "Logs", "the", "shutdown", "of", "the", "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/messages/DiffToolLogMessages.java#L118-L122
105,885
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/SphinxWriter.java
SphinxWriter.writeEndPage
public void writeEndPage() throws IOException { writer.openElement("document"); writer.textElement("id", Integer.toString(_page.Id)); writer.textElement("group", "0"); writer.textElement("timestamp", formatTimestamp(_rev.Timestamp)); writer.textElement("title", _page.Title.toString()); writer.textElement("b...
java
public void writeEndPage() throws IOException { writer.openElement("document"); writer.textElement("id", Integer.toString(_page.Id)); writer.textElement("group", "0"); writer.textElement("timestamp", formatTimestamp(_rev.Timestamp)); writer.textElement("title", _page.Title.toString()); writer.textElement("b...
[ "public", "void", "writeEndPage", "(", ")", "throws", "IOException", "{", "writer", ".", "openElement", "(", "\"document\"", ")", ";", "writer", ".", "textElement", "(", "\"id\"", ",", "Integer", ".", "toString", "(", "_page", ".", "Id", ")", ")", ";", "...
FIXME What's the "group" number here do? FIXME preprocess the text to strip some formatting?
[ "FIXME", "What", "s", "the", "group", "number", "here", "do?", "FIXME", "preprocess", "the", "text", "to", "strip", "some", "formatting?" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.mwdumper/src/main/java/de/tudarmstadt/ukp/wikipedia/mwdumper/importer/SphinxWriter.java#L72-L82
105,886
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/domain/JWPLTimeMachine.java
JWPLTimeMachine.checkArgs
private static boolean checkArgs(String[] args) { boolean result = (args.length > 0); if (!result) { System.out .println("Usage: java -jar JWPLTimeMachine.jar <config-file>"); } return result; }
java
private static boolean checkArgs(String[] args) { boolean result = (args.length > 0); if (!result) { System.out .println("Usage: java -jar JWPLTimeMachine.jar <config-file>"); } return result; }
[ "private", "static", "boolean", "checkArgs", "(", "String", "[", "]", "args", ")", "{", "boolean", "result", "=", "(", "args", ".", "length", ">", "0", ")", ";", "if", "(", "!", "result", ")", "{", "System", ".", "out", ".", "println", "(", "\"Usag...
Checks given arguments @param args <br> args[0] the settings file like described in {@link SettingsXML}<br> @return true if all necessary arguments are given and false otherwise @see SettingsXML
[ "Checks", "given", "arguments" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/domain/JWPLTimeMachine.java#L57-L64
105,887
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getTitle
public Title getTitle(int pageId) throws WikiApiException { Session session = this.__getHibernateSession(); session.beginTransaction(); Object returnValue = session.createNativeQuery( "select p.name from PageMapLine as p where p.pageId= :pId").setParameter("pId", pageId, IntegerType.INS...
java
public Title getTitle(int pageId) throws WikiApiException { Session session = this.__getHibernateSession(); session.beginTransaction(); Object returnValue = session.createNativeQuery( "select p.name from PageMapLine as p where p.pageId= :pId").setParameter("pId", pageId, IntegerType.INS...
[ "public", "Title", "getTitle", "(", "int", "pageId", ")", "throws", "WikiApiException", "{", "Session", "session", "=", "this", ".", "__getHibernateSession", "(", ")", ";", "session", ".", "beginTransaction", "(", ")", ";", "Object", "returnValue", "=", "sessi...
Gets the title for a given pageId. @param pageId The id of the page. @return The title for the given pageId. @throws WikiApiException Thrown if errors occurred.
[ "Gets", "the", "title", "for", "a", "given", "pageId", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L174-L186
105,888
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getArticleForDiscussionPage
public Page getArticleForDiscussionPage(Page discussionPage) throws WikiApiException { if(discussionPage.isDiscussion()){ String title = discussionPage.getTitle().getPlainTitle().replaceAll(WikiConstants.DISCUSSION_PREFIX, ""); if(title.contains("/")){ //If we have a discussion archive ...
java
public Page getArticleForDiscussionPage(Page discussionPage) throws WikiApiException { if(discussionPage.isDiscussion()){ String title = discussionPage.getTitle().getPlainTitle().replaceAll(WikiConstants.DISCUSSION_PREFIX, ""); if(title.contains("/")){ //If we have a discussion archive ...
[ "public", "Page", "getArticleForDiscussionPage", "(", "Page", "discussionPage", ")", "throws", "WikiApiException", "{", "if", "(", "discussionPage", ".", "isDiscussion", "(", ")", ")", "{", "String", "title", "=", "discussionPage", ".", "getTitle", "(", ")", "."...
Returns the article page for a given discussion page. @param discussionPage the discussion page object @return The page object of the article associated with the discussion. If the parameter already was an article, it is returned directly. @throws WikiApiException Thrown if errors occurred.
[ "Returns", "the", "article", "page", "for", "a", "given", "discussion", "page", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L252-L267
105,889
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getDiscussionPage
public Page getDiscussionPage(Page articlePage) throws WikiApiException{ String articleTitle = articlePage.getTitle().toString(); if(articleTitle.startsWith(WikiConstants.DISCUSSION_PREFIX)){ return articlePage; }else{ return new Page(this, WikiConstants.DISCUSSION_PREFIX+articleTitle); ...
java
public Page getDiscussionPage(Page articlePage) throws WikiApiException{ String articleTitle = articlePage.getTitle().toString(); if(articleTitle.startsWith(WikiConstants.DISCUSSION_PREFIX)){ return articlePage; }else{ return new Page(this, WikiConstants.DISCUSSION_PREFIX+articleTitle); ...
[ "public", "Page", "getDiscussionPage", "(", "Page", "articlePage", ")", "throws", "WikiApiException", "{", "String", "articleTitle", "=", "articlePage", ".", "getTitle", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "articleTitle", ".", "startsWith", "(...
Gets the discussion page for the given article page The provided page must not be a discussion page @param articlePage the article page for which a discussion page should be retrieved @return The discussion page object for the given article page object @throws WikiApiException If no page or redirect with this title ex...
[ "Gets", "the", "discussion", "page", "for", "the", "given", "article", "page", "The", "provided", "page", "must", "not", "be", "a", "discussion", "page" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L303-L310
105,890
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getSimilarPages
protected Map<Page, Double> getSimilarPages(String pPattern, int pSize) throws WikiApiException { Title title = new Title(pPattern); String pattern = title.getWikiStyleTitle(); // a mapping of the most similar pages and their similarity values // It is returned by this method. M...
java
protected Map<Page, Double> getSimilarPages(String pPattern, int pSize) throws WikiApiException { Title title = new Title(pPattern); String pattern = title.getWikiStyleTitle(); // a mapping of the most similar pages and their similarity values // It is returned by this method. M...
[ "protected", "Map", "<", "Page", ",", "Double", ">", "getSimilarPages", "(", "String", "pPattern", ",", "int", "pSize", ")", "throws", "WikiApiException", "{", "Title", "title", "=", "new", "Title", "(", "pPattern", ")", ";", "String", "pattern", "=", "tit...
Gets the pages or redirects with a name similar to the pattern. Calling this method is quite costly, as similarity is computed for all names. @param pPattern The pattern. @param pSize The maximum size of the result list. Only the most similar results will be included. @return A map of pages with names similar to the pa...
[ "Gets", "the", "pages", "or", "redirects", "with", "a", "name", "similar", "to", "the", "pattern", ".", "Calling", "this", "method", "is", "quite", "costly", "as", "similarity", "is", "computed", "for", "all", "names", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L392-L447
105,891
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getCategory
public Category getCategory(int pageId) { long hibernateId = __getCategoryHibernateId(pageId); if (hibernateId == -1) { return null; } try { Category cat = new Category(this, hibernateId); return cat; } catch (WikiPageNotFoundException e) { ...
java
public Category getCategory(int pageId) { long hibernateId = __getCategoryHibernateId(pageId); if (hibernateId == -1) { return null; } try { Category cat = new Category(this, hibernateId); return cat; } catch (WikiPageNotFoundException e) { ...
[ "public", "Category", "getCategory", "(", "int", "pageId", ")", "{", "long", "hibernateId", "=", "__getCategoryHibernateId", "(", "pageId", ")", ";", "if", "(", "hibernateId", "==", "-", "1", ")", "{", "return", "null", ";", "}", "try", "{", "Category", ...
Gets the category for a given pageId. @param pageId The id of the {@link Category}. @return The category object or null if no category with this pageId exists.
[ "Gets", "the", "category", "for", "a", "given", "pageId", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L473-L485
105,892
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.__getCategories
protected Set<Integer> __getCategories() { // TODO this should be replaced with the buffered category iterator, as it might produce an HeapSpace Overflow, if there are too many categories. Session session = this.__getHibernateSession(); session.beginTransaction(); List<Integer> idList =...
java
protected Set<Integer> __getCategories() { // TODO this should be replaced with the buffered category iterator, as it might produce an HeapSpace Overflow, if there are too many categories. Session session = this.__getHibernateSession(); session.beginTransaction(); List<Integer> idList =...
[ "protected", "Set", "<", "Integer", ">", "__getCategories", "(", ")", "{", "// TODO this should be replaced with the buffered category iterator, as it might produce an HeapSpace Overflow, if there are too many categories.", "Session", "session", "=", "this", ".", "__getHibernateSession...
Protected method that is much faster than the public version, but exposes too much implementation details. Get a set with all category pageIDs. Returning all category objects is much too expensive. @return A set with all category pageIDs
[ "Protected", "method", "that", "is", "much", "faster", "than", "the", "public", "version", "but", "exposes", "too", "much", "implementation", "details", ".", "Get", "a", "set", "with", "all", "category", "pageIDs", ".", "Returning", "all", "category", "objects...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L542-L553
105,893
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.existsPage
public boolean existsPage(String title) { if (title == null || title.length() == 0) { return false; } Title t; try { t = new Title(title); } catch (WikiTitleParsingException e) { return false; } String encodedTitle = t.getWikiStyleTitle(); Session session ...
java
public boolean existsPage(String title) { if (title == null || title.length() == 0) { return false; } Title t; try { t = new Title(title); } catch (WikiTitleParsingException e) { return false; } String encodedTitle = t.getWikiStyleTitle(); Session session ...
[ "public", "boolean", "existsPage", "(", "String", "title", ")", "{", "if", "(", "title", "==", "null", "||", "title", ".", "length", "(", ")", "==", "0", ")", "{", "return", "false", ";", "}", "Title", "t", ";", "try", "{", "t", "=", "new", "Titl...
Tests, whether a page or redirect with the given title exists. Trying to retrieve a page that does not exist in Wikipedia throws an exception. You may catch the exception or use this test, depending on your task. @param title The title of the page. @return {@code True}, if a page or redirect with that title exits, {@co...
[ "Tests", "whether", "a", "page", "or", "redirect", "with", "the", "given", "title", "exists", ".", "Trying", "to", "retrieve", "a", "page", "that", "does", "not", "exist", "in", "Wikipedia", "throws", "an", "exception", ".", "You", "may", "catch", "the", ...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L650-L676
105,894
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.existsPage
public boolean existsPage(int pageID) { // This is a hack to provide a much quicker way to test whether a page exists. // Encoding the title in this way surpasses the normal way of creating a title first. // Anyway, I do not like this hack :-| if (pageID < 0) { return false...
java
public boolean existsPage(int pageID) { // This is a hack to provide a much quicker way to test whether a page exists. // Encoding the title in this way surpasses the normal way of creating a title first. // Anyway, I do not like this hack :-| if (pageID < 0) { return false...
[ "public", "boolean", "existsPage", "(", "int", "pageID", ")", "{", "// This is a hack to provide a much quicker way to test whether a page exists.", "// Encoding the title in this way surpasses the normal way of creating a title first.", "// Anyway, I do not like this hack :-|", "if", "(", ...
Tests, whether a page with the given pageID exists. Trying to retrieve a pageID that does not exist in Wikipedia throws an exception. @param pageID A pageID. @return {@code True}, if a page with that pageID exits, {@code false} otherwise.
[ "Tests", "whether", "a", "page", "with", "the", "given", "pageID", "exists", ".", "Trying", "to", "retrieve", "a", "pageID", "that", "does", "not", "exist", "in", "Wikipedia", "throws", "an", "exception", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L685-L704
105,895
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.__getPageHibernateId
protected long __getPageHibernateId(int pageID) { long hibernateID = -1; // first look in the id mapping cache if (idMapPages.containsKey(pageID)) { return idMapPages.get(pageID); } // The id was not found in the id mapping cache. // It may not be in the cah...
java
protected long __getPageHibernateId(int pageID) { long hibernateID = -1; // first look in the id mapping cache if (idMapPages.containsKey(pageID)) { return idMapPages.get(pageID); } // The id was not found in the id mapping cache. // It may not be in the cah...
[ "protected", "long", "__getPageHibernateId", "(", "int", "pageID", ")", "{", "long", "hibernateID", "=", "-", "1", ";", "// first look in the id mapping cache", "if", "(", "idMapPages", ".", "containsKey", "(", "pageID", ")", ")", "{", "return", "idMapPages", "....
Get the hibernate ID to a given pageID of a page. We need different methods for pages and categories here, as a page and a category can have the same ID. @param pageID A pageID that should be mapped to the corresponding hibernate ID. @return The hibernateID of the page with pageID or -1, if the pageID is not valid
[ "Get", "the", "hibernate", "ID", "to", "a", "given", "pageID", "of", "a", "page", ".", "We", "need", "different", "methods", "for", "pages", "and", "categories", "here", "as", "a", "page", "and", "a", "category", "can", "have", "the", "same", "ID", "."...
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L713-L738
105,896
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java
Wikipedia.getWikipediaId
public String getWikipediaId() { StringBuilder sb = new StringBuilder(); sb.append(this.getDatabaseConfiguration().getHost()); sb.append("_"); sb.append(this.getDatabaseConfiguration().getDatabase()); sb.append("_"); sb.append(this.getDatabaseConfiguration().getLanguage()...
java
public String getWikipediaId() { StringBuilder sb = new StringBuilder(); sb.append(this.getDatabaseConfiguration().getHost()); sb.append("_"); sb.append(this.getDatabaseConfiguration().getDatabase()); sb.append("_"); sb.append(this.getDatabaseConfiguration().getLanguage()...
[ "public", "String", "getWikipediaId", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "this", ".", "getDatabaseConfiguration", "(", ")", ".", "getHost", "(", ")", ")", ";", "sb", ".", "append", ...
The ID consists of the host, the database, and the language. This should be unique in most cases. @return Returns a unique ID for this Wikipedia object.
[ "The", "ID", "consists", "of", "the", "host", "the", "database", "and", "the", "language", ".", "This", "should", "be", "unique", "in", "most", "cases", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L799-L807
105,897
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encode
private byte[] encode(final RevisionCodecData codecData, final Diff diff) throws UnsupportedEncodingException, EncodingException { this.data = new BitWriter(codecData.totalSizeInBits()); encodeCodecData(codecData); DiffPart part; Iterator<DiffPart> partIt = diff.iterator(); while (partIt.hasNext()) { ...
java
private byte[] encode(final RevisionCodecData codecData, final Diff diff) throws UnsupportedEncodingException, EncodingException { this.data = new BitWriter(codecData.totalSizeInBits()); encodeCodecData(codecData); DiffPart part; Iterator<DiffPart> partIt = diff.iterator(); while (partIt.hasNext()) { ...
[ "private", "byte", "[", "]", "encode", "(", "final", "RevisionCodecData", "codecData", ",", "final", "Diff", "diff", ")", "throws", "UnsupportedEncodingException", ",", "EncodingException", "{", "this", ".", "data", "=", "new", "BitWriter", "(", "codecData", "."...
Creates the binary encoding of the diff while using the codec information. @param codecData codec @param diff diff @return binary data @throws UnsupportedEncodingException if the character encoding is unsupported @throws EncodingException if the encoding failed
[ "Creates", "the", "binary", "encoding", "of", "the", "diff", "while", "using", "the", "codec", "information", "." ]
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/RevisionEncoder.java#L138-L180
105,898
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encodeCodecData
private void encodeCodecData(final RevisionCodecData codecData) throws EncodingException { this.codecData = codecData; // C data.writeBit(0); data.writeBit(0); data.writeBit(0); // BLOCK SIZES - S E B L this.data.writeValue(5, codecData.getBlocksizeS()); this.data.writeValue(5, codecData.getBlocks...
java
private void encodeCodecData(final RevisionCodecData codecData) throws EncodingException { this.codecData = codecData; // C data.writeBit(0); data.writeBit(0); data.writeBit(0); // BLOCK SIZES - S E B L this.data.writeValue(5, codecData.getBlocksizeS()); this.data.writeValue(5, codecData.getBlocks...
[ "private", "void", "encodeCodecData", "(", "final", "RevisionCodecData", "codecData", ")", "throws", "EncodingException", "{", "this", ".", "codecData", "=", "codecData", ";", "// C", "data", ".", "writeBit", "(", "0", ")", ";", "data", ".", "writeBit", "(", ...
Encodes the codecData. @param codecData Reference to the codec @throws EncodingException if the encoding failed
[ "Encodes", "the", "codecData", "." ]
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/RevisionEncoder.java#L191-L210
105,899
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/RevisionEncoder.java
RevisionEncoder.encodeCut
private void encodeCut(final DiffPart part) throws EncodingException { // C data.writeBit(1); data.writeBit(0); data.writeBit(1); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // E data.writeValue(codecData.getBlocksizeE(), part.getLength()); // B data.writeValue(codecData...
java
private void encodeCut(final DiffPart part) throws EncodingException { // C data.writeBit(1); data.writeBit(0); data.writeBit(1); // S data.writeValue(codecData.getBlocksizeS(), part.getStart()); // E data.writeValue(codecData.getBlocksizeE(), part.getLength()); // B data.writeValue(codecData...
[ "private", "void", "encodeCut", "(", "final", "DiffPart", "part", ")", "throws", "EncodingException", "{", "// C", "data", ".", "writeBit", "(", "1", ")", ";", "data", ".", "writeBit", "(", "0", ")", ";", "data", ".", "writeBit", "(", "1", ")", ";", ...
Encodes a Cut operation. @param part Reference to the Cut operation @throws EncodingException if the encoding failed
[ "Encodes", "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/RevisionEncoder.java#L221-L242