Examples of diff_2()


Examples of bmsi.util.Diff.diff_2()

            Object[] oldContent = readLinesAndEscapeNewlines(oldStream);
            Object[] newContent = readLinesAndEscapeNewlines(newStream);

            // Calculate diff of the two files
            Diff diff = new Diff(oldContent, newContent);
            Diff.Change script = diff.diff_2(false);

            // log diff
            DiffPrint.UnifiedPrint print = new DiffPrint.UnifiedPrint(
                oldContent, newContent);
            Writer writer = new StringWriter();
View Full Code Here

Examples of bmsi.util.Diff.diff_2()

                LOG.trace("Modified:");
                debugNodes(nodesB);
            }

            Diff diff = new Diff(nodesA, nodesB);
            Diff.change script = diff.diff_2(false);
            changes = getChanges(script, docA, docB, nodesA, nodesB);
        } catch (XMLStreamException e) {
            throw new DiffException(e.getMessage(), e);
        } catch (IOException e) {
            throw new DiffException(e.getMessage(), e);
View Full Code Here

Examples of bmsi.util.Diff.diff_2()

    }
  }
      }
    }
    boolean reverse = style == 'e';
    Diff.change script = d.diff_2(reverse);
    if (script == null)
      System.err.println("No differences");
    else {
      Base p;
      switch (style) {
View Full Code Here

Examples of net.sourceforge.processdash.util.Diff.diff_2()

    protected void performCount() {

        // Compute the differences between the two files.
        setIgnoreComments(true);
        Diff diff = new Diff(linesA, linesB);
        Diff.change change = diff.diff_2(false);

        // Begin by counting Base LOC and Total LOC
        int signifDeleted, signifAdded;
        base  = countSignificantLines(filter, linesA, 0, linesA.length);
        total = countSignificantLines(filter, linesB, 0, linesB.length);
View Full Code Here

Examples of net.sourceforge.processdash.util.Diff.diff_2()

    public void displayHTMLRedlines(PrintWriter out) {
        // Compute the differences between the two files.
        setIgnoreComments(false);
        Diff diff = new Diff(linesA, linesB);
        Diff.change c = diff.diff_2(false);

        // print a table header
        out.println("<table class='locDiff' cellpadding=0 cellspacing=0 border=0>");

        int bLineNumber = 0;
View Full Code Here

Examples of net.sourceforge.processdash.util.Diff.diff_2()

    private void applyDiffs(RedlinedDocument<WhitespaceCompareString> redlines,
            WhitespaceCompareString[] a, WhitespaceCompareString[] b,
            boolean trackChange) {
        Diff diff = new Diff(a, b);
        Diff.change change = diff.diff_2(true);
        while (change != null) {
            redlines.applyChange(change.line0, change.deleted, b, change.line1,
                change.inserted, trackChange);
            change = change.link;
        }
View Full Code Here

Examples of net.sourceforge.processdash.util.Diff.diff_2()

            // added/deleted/modified LOC.  To detect this scenario, we will
            // perform a second-pass comparison that ignores comments.  Then,
            // we will use the diff blocks in that comparison to compute the
            // added, deleted, and modified LOC counts.
            Diff d = new Diff(deleted, added);
            Diff.change chg = d.diff_2(false);
            while (chg != null) {
                int del = countLines(deleted, chg.line0, chg.deleted, filter);
                int add = countLines(added, chg.line1, chg.inserted, filter);
                int mod = Math.min(del, add);
                add -= mod;
View Full Code Here

Examples of org.openstreetmap.josm.tools.Diff.diff_2()

        diff();
    }
   
    private void diff() {
        Diff diff = new Diff(reference, current);
        Diff.Change script = diff.diff_2(false);
        twoColumnDiffFromScript(script, reference, current);
    }

    /**
     * The result from the diff algorithm is a "script" (a compressed description of the changes)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.