}
int matchedLines = 0;
Iterator<HistoryEntry> it = in.getHistoryEntries().iterator();
try {
HistoryEntry he;
HistoryEntry nhe=null;
String nrev;
while(( it.hasNext()||(nhe!=null) ) && matchedLines < 10) {
if (nhe==null) { he=it.next(); }
else { he=nhe; } //nhe is the lookahead revision
String line = he.getLine();
String rev = he.getRevision();
if (it.hasNext()) { nhe=it.next(); } //this prefetch mechanism is here because of the diff link generation
// we currently generate the diff to previous revision
else {nhe=null;}
if (nhe==null) { nrev=null; }
else { nrev=nhe.getRevision(); }
tokens.reInit(line);
String token;
int matchState;
int start = -1;
while ((token = tokens.next()) != null) {