Debian Codegraph @

current/jgi/Difference.java

raw symbols SCIP
1 package jgi;
2
3 import fileIO.TextFile;
4
5 /**
6 * @author Brian Bushnell
7 * @date Oct 9, 2013
8 *
9 */
10 public class Difference {
11
12 public static void main(String[] args){
13
14 TextFile tf1=new TextFile(args[0], false);
15 TextFile tf2=new TextFile(args[1], false);
16
17 String s1=tf1.readLine(false);
18 String s2=tf2.readLine(false);
19
20 int difs=0;
21 int i=1;
22 while(s1!=null && s2!=null){
23 if(!s1.equals(s2)){
24 difs++;
25 System.err.println("Line "+i+":\n"+s1+"\n"+s2+"\n");
26 assert(difs<5);
27 }
28 i++;
29 s1=tf1.readLine(false);
30 s2=tf2.readLine(false);
31 }
32
33 assert(s1==null && s2==null) : "Line "+i+":\n"+s1+"\n"+s2+"\n";
34
35 tf1.close();
36 tf2.close();
37 }
38
39 }