private final String color(int anz) { int farbe = 255*anz / biggestMatch(); String help = (farbe<16 ? "0":"")+Integer.toHexString(farbe); return "#"+help+"0000"; }
public boolean equals(Object obj) { if(!(obj instanceof AllMatches)) return false; return (compare(this, (AllMatches) obj) == 0); }
Token[] A = subA.struct.tokens; Token[] B = subB.struct.tokens; sort(); f.println("<TR><TH><TH>"+subA.name+" ("+percentA()+"%)<TH>"+ subB.name+" ("+percentB()+"%)<TH>" + msg.getString("AllMatches.Tokens")); for (int i=0; i<size(); i++) { match = matches[i]; f.print("("+startB.getLine()+"-"+endeB.getLine()); f.println(")</A><TD ALIGN=center>"+"<FONT COLOR=\""+ color(match.length)+"\">"+match.length+"</FONT>"); + roundedPercentBasecodeA() + "%"); f.println("<TD>" + msg.getString("AllMatches.Basecode") + " " + roundedPercentBasecodeB() + "%<TD> ");
private int writeIndexedSubmission(int i, AllMatches match, int j) throws jplag.ExitException { Submission sub = (j == 0 ? match.subA : match.subB); String files[] = match.files(j); char[][] text = sub.readFilesChar(files); Token[] tokens = (j == 0 ? match.subA : match.subB).struct.tokens; int[] perm = match.sort_permutation(j); if (index < match.size()) { onematch = match.matches[perm[index]]; start = tokens[(j == 0 ? onematch.startA : onematch.startB)];
private int writeImprovedSubmission(int i, AllMatches match, int j) throws jplag.ExitException { Submission sub = (j == 0 ? match.subA : match.subB); String files[] = match.files(j); String[][] text = sub.readFiles(files); Token[] tokens = (j == 0 ? match.subA : match.subB).struct.tokens; TreeMap<MarkupText, Object> markupList = new TreeMap<MarkupText, Object>(comp); for (int x = 0; x < match.size(); x++) { Match onematch = match.matches[x];
private int writeSubmissionDiff(int i, AllMatches match, int j) throws jplag.ExitException { Submission sub = (j == 0 ? match.subA : match.subB); String files[] = match.allFiles(j); switch (match.diffType(files[x], line + 1, j)) { case 0: text[x][line] = "<FONT COLOR=\"#000000\">" + text[x][line] + "</FONT>";
int lengthA = structA.size()-1; // minus pivots! int lengthB = structB.size()-1; // minus pivots! AllMatches allMatches = new AllMatches(subA,subB); int x = matches.matches[i].startA; // begining of sequence A int y = matches.matches[i].startB; // begining of sequence B allMatches.addMatch(x, y, matches.matches[i].length);
private int writeDist(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-dist.html"); writeHTMLHeader(f, msg.getString("Report.Token_Distribution")); f.println("<BODY>"); match.distributionReport(f, msg); f.println("</BODY>\n</HTML>"); f.close(); return f.bytesWritten(); }
private int writeTop(int i, AllMatches match) throws jplag.ExitException { HTMLFile f = openHTMLFile(root, "match" + i + "-top.html"); writeHTMLHeaderWithScript(f, "Top"); f.println("<BODY BGCOLOR=\"#ffffff\">"); if (this.program.use_externalSearch()) { f.println("<A HREF=\"match" + i + "-dist.html\" TARGET=\"_top\">" + msg.getString("Report.Distribution") + "</A><P>"); } match.HTMLreport(f, i, this.program); f.println("</BODY>\n</HTML>\n"); f.close(); return f.bytesWritten(); }