@Test public void changeExample() throws IOException { print(collate( comparand("that quick red fox died"), comparand("the quick ripe box lied"))); }
public void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness) throws IOException { Comparison comparison = new Comparison(base, witness); final Set<Set<Annotation>> transpositions = config.getTranspositionSource().transpositionsIn(comparison); for (Comparison filtered : comparison.filter(transpositions)) { LOG.info("Collating " + filtered); this.transpositionCollation = false; collate(config, filtered); } for (Set<Annotation> transposition : transpositions) { LOG.info("Collating transposition " + Iterables.toString(transposition)); this.transpositionCollation = true; collate(config, new Comparison(base, witness, transposition)); } Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); }
DiffCollator { public void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness) throws IOException { Comparison comparison = new Comparison(base, witness); final Set<Set<Annotation>> transpositions = config.getTranspositionSource().transpositionsIn(comparison); for (Comparison filtered : comparison.filter(transpositions)) { LOG.info("Collating " + filtered); this.transpositionCollation = false; collate(config, filtered); } for (Set<Annotation> transposition : transpositions) { LOG.info("Collating transposition " + Iterables.toString(transposition)); this.transpositionCollation = true; collate(config, new Comparison(base, witness, transposition)); } Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); } }
DiffCollator { public void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness) throws IOException { Comparison comparison = new Comparison(base, witness); final Set<Set<Annotation>> transpositions = config.getTranspositionSource().transpositionsIn(comparison); for (Comparison filtered : comparison.filter(transpositions)) { LOG.info("Collating " + filtered); this.transpositionCollation = false; collate(config, filtered); } for (Set<Annotation> transposition : transpositions) { LOG.info("Collating transposition " + Iterables.toString(transposition)); this.transpositionCollation = true; collate(config, new Comparison(base, witness, transposition)); } Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); }  }
DiffCollator { public void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness) throws IOException { Comparison comparison = new Comparison(base, witness); final Set<Set<Annotation>> transpositions = config.getTranspositionSource().transpositionsIn(comparison); for (Comparison filtered : comparison.filter(transpositions)) { LOG.info("Collating " + filtered); this.transpositionCollation = false; collate(config, filtered); } for (Set<Annotation> transposition : transpositions) { LOG.info("Collating transposition " + Iterables.toString(transposition)); this.transpositionCollation = true; collate(config, new Comparison(base, witness, transposition)); } Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); }  void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness); }
DiffCollator { public void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness) throws IOException { Comparison comparison = new Comparison(base, witness); final Set<Set<Annotation>> transpositions = config.getTranspositionSource().transpositionsIn(comparison); for (Comparison filtered : comparison.filter(transpositions)) { LOG.info("Collating " + filtered); this.transpositionCollation = false; collate(config, filtered); } for (Set<Annotation> transposition : transpositions) { LOG.info("Collating transposition " + Iterables.toString(transposition)); this.transpositionCollation = true; collate(config, new Comparison(base, witness, transposition)); } Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); }  void collate(DiffCollatorConfiguration config, Comparand base, Comparand witness);  }