See the paper at http://www.cs.arizona.edu/people/gene/PAPERS/diff.ps @version $Revision: 1.7 $ $Date: 2003/10/13 08:00:24 $ @author Juanco Anez @see Delta @see Revision @see Diff
899900901902903904905906907908909
{ String oldText = engine.getPureText(page.getName(), WikiProvider.LATEST_VERSION); String[] first = Diff.stringToArray(oldText); String[] second = Diff.stringToArray(newText); Revision rev = Diff.diff(first, second, new MyersDiff()); if( rev == null || rev.size() == 0 ) { return ch; }
99100101102103104105106107108109
try { String[] first = Diff.stringToArray(TextUtil.replaceEntities(p1)); String[] second = Diff.stringToArray(TextUtil.replaceEntities(p2)); Revision rev = Diff.diff(first, second, new MyersDiff()); if( rev == null || rev.size() == 0 ) { // No difference
147148149150151152153154155156157
String[] beta = sequence( TextUtil.replaceEntities( wikiNew ) ); Revision rev = null; try { rev = Diff.diff( alpha, beta, new MyersDiff() ); } catch( DifferentiationFailedException dfe ) { log.error( "Diff generation failed", dfe ); return "Error while creating version diff.";
142143144145146147148
this.algorithm = defaultAlgorithm(); } protected DiffAlgorithm defaultAlgorithm() { return new MyersDiff(); }
3456789
import org.apache.commons.jrcs.diff.myers.MyersDiff; public class MyersDiffTests extends DiffTest { public MyersDiffTests(String name) { super(name, new MyersDiff()); }