Code Monkey home page Code Monkey logo

daisydiff's People

daisydiff's Issues

DaisyDiff breaks with "There is no Atom with index" when strings have numbers

When I run this piece of code, it breaks with 
"java.lang.IndexOutOfBoundsException: There is no Atom with index 3". I am 
using DaisyDiff 1.0 to compile and run this code.

<code>
        String contentOld = "festive 8";
        String contentNew = "What was your highlight of 8?";

        StringWriter writer = new StringWriter(contentNew.length() + 
contentOld.length());
        SAXTransformerFactory tf = (SAXTransformerFactory) 
TransformerFactory.newInstance();
        TransformerHandler result = tf.newTransformerHandler();
        result.setResult(new StreamResult(writer));
        ContentHandler postProcess = (ContentHandler) result;
        postProcess.startDocument();
        postProcess.startElement("", "diffreport", "diffreport", new 
AttributesImpl());
        postProcess.startElement("", "diff", "diff", new AttributesImpl());

        DaisyDiff.diffTag(contentOld, contentNew, postProcess);

        postProcess.endElement("", "diff", "diff");
        postProcess.endElement("", "diffreport", "diffreport");
        postProcess.endDocument();
        System.out.println(writer.getBuffer().toString());
</code>

Original issue reported on code.google.com by [email protected] on 11 Feb 2009 at 4:26

duplication of the content

What steps will reproduce the problem?
1.Create 2 identic html files
2.Delete some text from the middle of an HTML element, so some text remains
in the element before and after the deleted text 
3.Change some attributes of the HTML element with the deleted text.

What is the expected output? What do you see instead?
Expected: display of all the text with the deleted text highlighted in red 
and crossed out
Instead: some of the remaining text is duplicated.


Please use labels and text to provide additional information.
The problem again lies in the comparison of tags by semantic rather than 
object comparison. 
During the splitting 2 new tags are added to the children collection of 
the parent. Those 2 new tags represent "splitted node" and for that reason 
they have exactly the same name and attributes as the original:

>>>
   TagNode part1 = new TagNode(null, getQName(), getAttributes());
   TagNode part2 = new TagNode(null, getQName(), getAttributes());
<<<

Now we have 3 "equal" HTML tags and the original tag has to be removed. Of 
course first found is the one that is going to be removed. But the tags 
reside in this order: <part before split> <part after split> <original>. 
So instead of the original the <part before split> is removed and now the 
original contains part of the nodes from <part after split>. Those nodes 
are duplicated as the result.

Notice, that the reason for this bug is the same as for the original 
statement in Issue 8.

Original issue reported on code.google.com by [email protected] on 21 Apr 2009 at 8:40

Charset problem in the result page

What steps will reproduce the problem?
1. I compare http://www.baidu.cn/ and itself.(Nothing change)
2. But the result page messed up.(I mean strange characters, it's a charset
problem)

What is the expected output? What do you see instead?
I wana Chinese display well, but it messed up.

What version of the product are you using? On what operating system?
1.0
My OS is Windows xp Chinese language.(So the default charset is gb2312)

Please provide any additional information below.
Thank you for the good tool:)


Original issue reported on code.google.com by [email protected] on 22 Dec 2008 at 2:09

Attachments:

HTML tags with different attributes order - correction for the Karol's fix

What steps will reproduce the problem?
1. Use 2 exactly same HTML files, where one of the elements has "style" 
attribute with values containing multiple rules
(e.g. style="text-decoration: underline; font-variant: italic").
2. Reverse the order of the css rules in the second file
(e.g. style="font-variant: italic; text-decoration: underline")

Same result can be achieved with "class" attribute. E.g.:
<h1 class="pagetitle  holidaystyle"> and
<h1 class="holidaystyle  pagetitle">

In fact, you don't even have to swap places - just add an extra space in 
the middle.

What is the expected output? 
no difference
What do you see instead?
"Moved out of ... moved in..."

What version of the product are you using? 
1.0
On what operating system?
Windows XP

Please provide any additional information below.
Attached are:
 2 files with a sample of the bug
 corrected file org.outerj.daisy.diff.html.dom.helperAttributesMap.java

I also added some comments (hope it's ok).

Of course, to be absolutely correct the style rule should resolve the 
styles and compare the rules too (to see that 2 style don't use the same 
name for different set of rules). However, I think that in most cases this 
won't happen.

This situation (with the mixed styles order and mixed class names order) 
often occurs when the HTML is generated by some program as a result of 
writing out some Document model after the changes were done in some 
WYSIWYG HTML editor (like using javax.swing.text.html package).

Original issue reported on code.google.com by [email protected] on 14 Apr 2009 at 5:17

Attachments:

Alternative jQuery UI for Diff results

(from the mailing list by Gregor Petrin )

So I rewrote the Javascript part using jQuery and jQuery UI while making the 
code cleaner and probably more robust. The code should require no modification 
in other parts of Daisydiff and right now has feature parity with the original 
version. The only difference is that a change summary dialog is displayed when 
moving the mouse over a changed part, but that can be reverted by deleting a 
single keyword in the code.

If anyone is interested, I put my code on GitHub: 
https://github.com/gregopet/daisydiff-jquery-ui

Original issue reported on code.google.com by [email protected] on 22 Aug 2012 at 2:49

Indentation goes crazy when you compare two html pages having lot of numbered lists

What steps will reproduce the problem?
1.I have one html(see one.html) page having lots of numbered list.
2.Then I edit that html page(adding some content to the end of page) and save 
as two.html(see two.html).
3.When I compare one.html with two.html, result page(see result.jpg) have 
improper indentation(numbered lists).

What is the expected output? What do you see instead?

Indentation should same as it was in both pages that I'm comparing.

What version of the product are you using? On what operating system?

DaisyDiff 1.2. 
WindowXP SP3

Please provide any additional information below.

I'm attaching both html file which I'm comparing as well as screenshot of 
result page.

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 2:51

Attachments:

Stack overflow when passing a URL with spaces

So reproduce, pass the following text into ChangeText.addText(String S)


http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development 
Environment 
(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

It will infinite loop. 

When I change the URL to:

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development+Environm
ent+(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

or:

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Development%20Enviro
nment%20(Windows)#section-Development+Environment+_28Windows_29-EXTEnvironment

it seems to be fine. The issue is, this is part of a very very large text file, 
so it's very hard to sanitize it before it gets broken down by your function.

Original issue reported on code.google.com by [email protected] on 12 May 2011 at 11:58

The registered trademark sign is rendered as two unknown characters.

What steps will reproduce the problem?
1. Compare two html files that contains registered trademark sign ®
2. Html files are UTF-8 encoded that is specified in the html head metadata.
3. I am using jar file to produce diff content

What is the expected output? What do you see instead?
In html diff mode, the registered trademark sign is rendered as ® symbol
while in html tag diff mode, it is rendered as two unknown characters. 

I read the issue 3 (Charset problem in the result page) where a solution
was provided to set charset of InputSource. But it was not mentioned how
specify charset in arguments when a jar file is used.



What version of the product are you using? On what operating system?
1.0

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 21 Jan 2010 at 8:38

HTML Diff produces an OOM Exception

What steps will reproduce the problem?
1. Run a diff using HTMLDiffer on the attached files.
2. HTML diff will produce an OOM Exception
3. Runtime Exception is thrown

What is the expected output? What do you see instead?
An accurate diff report is expected, or at least something to preempt the
OOM Exception.

What version of the product are you using? On what operating system?
Version 1.1, Linux Redhat 5 64 bit, JDK 6, 2GB heap size.

Please provide any additional information below.
We've got a rich text editor that allows users to paste html directory into
an html tab.  The user in this case pasted html into the rich text tab as
opposed to the html tab which allows for direct html input.  The result is
the html is escaped in one version (file2.txt), and not escaped in the
next(file1.txt).  The text is the same in both versions, but the diff
contains too many elements that are different, and receives the following
exception:

Caused by: java.lang.OutOfMemoryError: Java heap space at
org.eclipse.compare.rangedifferencer.OldDifferencer.findDifferences(Unknown
Source)
at
org.eclipse.compare.rangedifferencer.RangeDifferencer.findDifferences(Unknown
Source)
at
org.eclipse.compare.rangedifferencer.RangeDifferencer.findDifferences(Unknown
Source)
at org.outerj.daisy.diff.html.HTMLDiffer.diff(Unknown Source)

Original issue reported on code.google.com by mccullough.todd on 17 Mar 2010 at 4:14

Attachments:

Indentation goes crazy when you compare two html pages having lot of numbered lists

What steps will reproduce the problem?
1.I have one html page having lots of numbered list.
2.Then I edit that html page.Adding some content to the end of page.
3.When I compare both, result page have improper indentation(numbered lists).

What is the expected output? What do you see instead?

Indentation should same as it was in both pages that I'm comparing.

What version of the product are you using? On what operating system?

DaisyDiff 1.2. 
WindowXP SP3

Please provide any additional information below.

I'm attaching both html file which I'm comparing as well as screenshot of 
result page.

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 2:09

  • Merged into: #44

Attachments:

Confusion over PHP diff location

http://code.google.com/p/daisydiff/ says The PHP implementation is
available in the MediaWiki repository." However,
http://code.google.com/p/daisydiff/source/browse/trunk/daisydiff-php/ is
current as of Dec. 2008.

Which is the correct place to find this diff engine?

Thanks for doing a PHP version, by the way!

Original issue reported on code.google.com by [email protected] on 14 Jul 2009 at 3:42

No Diff performed on embedded tags

What steps will reproduce the problem?
1. Do a html diff on a file that contains an embed tag (eg: youtube video)
2. If the new source doesn't have this tag the embed link doesn't show at all
3.

What is the expected output? What do you see instead?

I would expect the embedded tag to render as red as crossed our similar to img 
tag.

What version of the product are you using? On what operating system?
Latest version, OSX

Please provide any additional information below.
This is probably more of an enhancement than a defect

Original issue reported on code.google.com by [email protected] on 8 Jul 2011 at 12:07

New Testing framework should run each directory as a separate test

Regarding Kostis's test data that Carsten added a test to run, committed at 
http://code.google.com/p/daisydiff/source/detail?r=157
It would be better to run this as multiple tests instead of 1.  I'm new to 
JUnit 4 but standard practice seems to be that you use Parameterized for this.  
And that the standard problem with that is that the test names are all test[0], 
test[1] etc.  That's not great, but it's an improvement.

http://stackoverflow.com/questions/358802/junit-test-with-dynamic-number-of 
discusses using Parameterized
http://stackoverflow.com/questions/650894/change-test-name-of-parameterize 
discusses why this isn't great, and possible solutions (which mostly involve 
adding dependencies on extra projects).

Original issue reported on code.google.com by [email protected] on 24 Jun 2011 at 7:41

Attachments:

when we comparing the two files have no change, daisy diff throwing Uncaught unknown destination..

What steps will reproduce the problem?
1. Take two html files with same html tags & same data.
2. Compare those files and put the result data in to iframe 
3. click on Last button then You can oberserve the error in firebug "Uncaught 
unknown destination".

What is the expected output? What do you see instead?
Disable the last button, when there are no changes between the files

What version of the product are you using? On what operating system?
daisy diff version 1.1 & Windows 7 Operating System

Please provide any additional information below.
supplying source information like this 

HtmlCleaner cleaner = new HtmlCleaner();

InputSource oldSource = new InputSource(oldVersion);

InputSource newSource = new InputSource(newVersion);

DomTreeBuilder oldHandler = new DomTreeBuilder();

cleaner.cleanAndParse(oldSource, oldHandler);

TextNodeComparator leftComparator = new TextNodeComparator(oldHandler,locale);

DomTreeBuilder newHandler = new DomTreeBuilder();

cleaner.cleanAndParse(newSource, newHandler);

TextNodeComparator rightComparator = new TextNodeComparator(newHandler,locale);

String[] css = { "css/diff.css" };

doCSS(css, postProcess);

HtmlSaxDiffOutput output = new HtmlSaxDiffOutput(postProcess, "diffTag");

HTMLDiffer differ = new HTMLDiffer(output);

differ.diff(leftComparator, rightComparator);

postProcess.endElement("", "diff", "diff");

postProcess.endElement("", "diffReport", "diffReport");

postProcess.endDocument();

htmlStr = st.getBuffer().toString();

htmlStr = htmlStr.substring(38,htmlStr.length());

Response is sending to iframe tag

Original issue reported on code.google.com by [email protected] on 2 Apr 2013 at 5:47

Attachments:

If an HTML table has an attribute than the difference text is shown outside

What steps will reproduce the problem?
1. Create a file a.html as attached (Contains a simple table)
2. Create a file b.html (same table with a word and attribute removed)
3. Run java -jar daisydiff.jar a.html b.html

What is the expected output? What do you see instead?
I expected the same table with the removed word inside a cell. Instead
the word is outside of the table (There are actually two tables now)

What version of the product are you using? On what operating system?
daisydiff 1.0, Windows XP on Java 5

Please provide any additional information below.
My example is really trivial. So unless I am missing something, this 
must be a bug.

Original issue reported on code.google.com by [email protected] on 21 Aug 2009 at 2:57

Attachments:

Showing the blue color difference for missing of border="0" attribute.

What steps will reproduce the problem?
1. Compare the attached two HTMLs (test1.html,test2.htm)
2. In the output showing the differenc in blue color which is the 
border="0" attribute missing in the one of the input file
3. But border="0" will not cause any difference in the actual html output.

What is the expected output? What do you see instead?
Expected output in diff report
Showing the change in blue color which is not required.
There won't be any difference in the HTML output when we add border="0" or 
not to add border="0"

What version of the product are you using? On what operating system?
its latest build taken on 12-April-09, windows vista

Please provide any additional information below.
 Here with attached the test htmls & daisy diff report.


Original issue reported on code.google.com by [email protected] on 12 Apr 2009 at 11:49

Attachments:

Need for return code to indicate pass/fail

What steps will reproduce the problem?
1. diff 2 identical files
2. diff 2 different files

What is the expected output? What do you see instead?
There is nothing to indicate when a diff has no differences. I would expect
some kind of return code to indicate this.

What version of the product are you using? On what operating system?
v1.0, Ubuntu 9.04

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 5 May 2009 at 1:23

Changes in HTML-Structure aren't diffed correctly

What steps will reproduce the problem?
1. I compare 1.TXT with 2.TXT

What is the expected output? What do you see instead?
L2 is not marked as changed at all. 
I expect L2 to be marked as added in the second list and/or L2 to be marked 
as deleted in the first list.
The same with the table:
I expect T2 to be removed in the first table, and the second table should 
be marked as added.


What version of the product are you using? On what operating system?
i'm using Rev #112 from SVN.

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 4 Feb 2009 at 5:18

Attachments:

Banner reports wrong version

What steps will reproduce the problem?
1. Run a daisydiff from the commandline such as the one offered in your BBC 
news example.


What is the expected output? What do you see instead?

I would expect to see a banner saying "Daisy Diff 1.1". Instead the banner says 
"Daisy Diff 1.0"


What version of the product are you using? On what operating system?
1.1
WinXP

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 13 Jan 2011 at 2:50

.java.lang.NullPointerException

Perhaps a dup of the other "large file" diff problems... trying to diff the
following two files (each > 440k):

http://sec.gov/Archives/edgar/data/1096241/000119312510045141/ds1.htm
and
http://sec.gov/Archives/edgar/data/1096241/000119312510113201/ds1a.htm

Error:

.java.lang.NullPointerException
   at gnu.xml.transform.SAXSerializer.isDefined(libgcj.so.10)
   at gnu.xml.transform.SAXSerializer.serialize(libgcj.so.10)
   at gnu.xml.transform.SAXSerializer.serialize(libgcj.so.10)
   at gnu.xml.transform.SAXSerializer.serialize(libgcj.so.10)
   at gnu.xml.transform.SAXSerializer.serialize(libgcj.so.10)
   at gnu.xml.transform.TransformerImpl.transform(libgcj.so.10)
   at gnu.xml.transform.SAXTransformerHandler.endDocument(libgcj.so.10)
   at
org.outerj.daisy.diff.helper.MergeCharacterEventsHandler.endDocument(Unknown 
Source)
   at
org.outerj.daisy.diff.helper.NekoHtmlParser$RemoveNamespacesHandler.endDocument(
Unknown
Source)
   at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
   at
org.cyberneko.html.filters.DefaultFilter.endDocument(DefaultFilter.java:217)
   at org.cyberneko.html.HTMLTagBalancer.endDocument(HTMLTagBalancer.java:446)
   at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2060)
   at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:910)
   at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
   at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.outerj.daisy.diff.helper.NekoHtmlParser.parse(Unknown Source)
   at org.outerj.daisy.diff.HtmlCleaner.cleanAndParse(Unknown Source)
   at org.outerj.daisy.diff.Main.main(Unknown Source)

Original issue reported on code.google.com by [email protected] on 11 May 2010 at 6:30

I want to compare only two html Strings rather than entire file and get the output as an html String

I want to compare only two html Strings rather than entire file and get the 
output as an html String.

This is required because we need to compare different html strings in a Loop.

HTMLs are retrieved from the database.

My need is: 

String 1 = html1
String 2 = html2

After comparing String 1 and 2, I should get third String with the differences 
highlighted

Original issue reported on code.google.com by [email protected] on 19 Jul 2010 at 6:19

IndexOutOfBoundsException in Tag mode

What steps will reproduce the problem?
Run java -jar daisydiff.jar a.html b.html --type=tag

What is the expected output? What do you see instead?
The expected output is any result.

Instead there is an exception

..java.lang.IndexOutOfBoundsException: There is no Atom with index 3
        at org.outerj.daisy.diff.tag.TagComparator.getAtom(Unknown Source)
        at org.outerj.daisy.diff.tag.TagDiffer.preProcess(Unknown Source)
        at org.outerj.daisy.diff.tag.TagDiffer.diff(Unknown Source)
        at org.outerj.daisy.diff.DaisyDiff.diffTag(Unknown Source)
        at org.outerj.daisy.diff.Main.main(Unknown Source)


Applies in DaisyDiff 1.0 and 1.1. Also notice that if the order of the 
input files is reversed, there is NO exception. The files themselves are 
really simple.

Original issue reported on code.google.com by [email protected] on 26 Mar 2010 at 2:56

Attachments:

IndexOutOfBoundsException if the only element was deleted

What steps will reproduce the problem?
1. java -jar daisydiff.jar file:///c:/1.txt file:///c:/2.txt

What is the expected output? What do you see instead?
An IndexOutOfBoundsException was thrown.

What version of the product are you using? On what operating system?
latest version from repository (rev 107.


Stacktrace:
...java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
        at java.util.ArrayList.add(ArrayList.java:367)
        at org.outerj.daisy.diff.html.dom.TagNode.addChild(TagNode.java:60)
        at org.outerj.daisy.diff.html.TextNodeComparator.markAsDeleted
(TextNodeComparator.java:304)
        at org.outerj.daisy.diff.html.HTMLDiffer.diff(HTMLDiffer.java:61)
        at org.outerj.daisy.diff.Main.main(Main.java:127)

Original issue reported on code.google.com by [email protected] on 24 Oct 2008 at 9:19

Attachments:

DOM structure is modified in the daisydiff output

What steps will reproduce the problem?

Create 2 very simple files and diff them (files attached, but also given here 
due to their simplicity; each line is its own file):
<p>foo</p><p>bar</p>
<p>foo</p><p>baz</p>

What is the expected output? What do you see instead?

The expected output would be to find the first P tag copied verbatim (as there 
have been no changes in it) and some diff markup in the second P tag. Instead, 
both P tags contain diff markup tags - daisydiff claims that the string bar was 
removed from the FIRST p and inserted into the second one (when it was in fact 
removed from the SECOND one).


What version of the product are you using? On what operating system?
Tried both daisydiff 1.2 as well as latest SVN trunk version. OpenJDK 1.6.0_24 
on OpenSUSE.

Please provide any additional information below.
I'm trying to instruct daisydiff to ignore certain trivial changes via 
appropriate XSL templates and this bug is getting in my way.

Original issue reported on code.google.com by [email protected] on 27 Aug 2012 at 10:50

Attachments:

Daisydiff fails to process certain invalid HTML files

What steps will reproduce the problem?

I have a non-valid HTML document that crashes the diff (but NekoHTML can 
process it). Here is a very simplified version of it:

<html>
  <body>
    <a href="http://example.org"123></a>
  </body>
</html>

Those 123 at the end make DaisyDiff crash. If the extra text does not start 
with a number (e.g. the HTML5 standalon attribute 'required') then everything 
is OK.


What is the expected output? What do you see instead?

The expected output would probably be to ignore that invalid attribute.


What version of the product are you using? On what operating system?

daisydiff 1.2, OpenJDK 1.6.0_24 on OpenSuse, invoked from Groovy 1.8.6


Please provide any additional information below.

Here is the stack trace after the error (some lines are cut off by Groovy - I 
can provide those as well if required):

ERROR:  'An attribute whose value must be a QName had the value '123''
Caught: javax.xml.transform.TransformerException: java.lang.RuntimeException: 
An attribute whose value must be a QName had the value '123'
javax.xml.transform.TransformerException: java.lang.RuntimeException: An 
attribute whose value must be a QName had the value '123'
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:241)
        at org.outerj.daisy.diff.helper.MergeCharacterEventsHandler.endDocument(Unknown Source)
        at org.outerj.daisy.diff.helper.NekoHtmlParser$RemoveNamespacesHandler.endDocument(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
        at org.cyberneko.html.filters.DefaultFilter.endDocument(DefaultFilter.java:217)
        at org.cyberneko.html.HTMLTagBalancer.endDocument(HTMLTagBalancer.java:446)
        at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2060)
        at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:910)
        at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
        at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.outerj.daisy.diff.helper.NekoHtmlParser.parse(Unknown Source)
        at org.outerj.daisy.diff.helper.NekoHtmlParser$parse.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at BooleanDiffer.cleanAndParse(quietDiff.groovy:35)
        at BooleanDiffer.this$2$cleanAndParse(quietDiff.groovy)
        at BooleanDiffer$this$2$cleanAndParse.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
        at BooleanDiffer.quietDiff(quietDiff.groovy:70)
        at BooleanDiffer$quietDiff.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at quietDiff.run(quietDiff.groovy:115)
        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)
        at groovy.lang.GroovyShell.run(GroovyShell.java:229)
        at groovy.lang.GroovyShell.run(GroovyShell.java:159)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:550)
        at groovy.ui.GroovyMain.run(GroovyMain.java:337)
        at groovy.ui.GroovyMain.process(GroovyMain.java:323)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:120)
        at groovy.ui.GroovyMain.main(GroovyMain.java:100)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
Caused by: javax.xml.transform.TransformerException: 
java.lang.RuntimeException: An attribute whose value must be a QName had the 
value '123'
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:716)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:238)
        ... 42 more
Caused by: java.lang.RuntimeException: An attribute whose value must be a QName 
had the value '123'
        at com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1523)
        at com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary.runTimeError(BasisLibrary.java:1527)
        at com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary.checkAttribQName(BasisLibrary.java:1361)
        at GregorSamsa.template$dot$2()
        at GregorSamsa.applyTemplates()
        at GregorSamsa.template$dot$1()
        at GregorSamsa.applyTemplates()
        at GregorSamsa.template$dot$0()
        at GregorSamsa.applyTemplates()
        at GregorSamsa.transform()
        at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:603)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
        ... 44 more

Original issue reported on code.google.com by [email protected] on 24 Aug 2012 at 10:23

How to make DaisyDiff Namespace aware

What steps will reproduce the problem?
1. I use the java implementation of daisydiff (see DiffALaDaisy.java) which 
works fine.
2. If you compare the file1.xml to another file with the same content, in the 
result namespaces are gone (redsys:fn got fn ...)


What is the expected output? What do you see instead?
An html output whick includes namespaces. 
Namespaces (redsys) are removed. I dont know if its an issue of the htmlcleaner 
or daisydiff. 

What version of the product are you using? On what operating system?
DaisyDiff 1.1, on Windows7, jdk 1.5

Please provide any additional information below.
The question is: how to tell daisydiff to accept namespaces and do not remove 
it.
Thanks for any hint.

Original issue reported on code.google.com by [email protected] on 17 Feb 2011 at 2:07

Attachments:

Bugfix for /trunk/daisydiff-php/src/HTMLDiff.php

The object $img doesn't exist inside scope of 
HTMLDiffer::endElement()@line:138, resulting in an PHP-E_STRICT-error (Creating 
default object from empty value) if you pass an empty HTML-tag.
I think the property should be set to the $tag-object instead, which then works 
fine. 

Original issue reported on code.google.com by [email protected] on 10 Feb 2011 at 2:57

Attachments:

Suggested performance enhancements

I've been performance testing DaisyDiff on some large diffs and have made a few 
speedups.  I'm working on a local fork, but would obviously like to keep it as 
close to the official version as possible.

I've attached a patch of what I've done and I'll describe it too:
1)  getParentTree was very inefficient.  For a node of depth D it would create 
D - 1 lists of ancestors of lengths D-1 -> 0, and add each list's contents to 
the one bigger than it.  I've rewritten it to create a single list and then 
reverse it.  There are numerous other ways to rewrite it but this one's fairly 
simple.

2)  The dominating performance problem is that the AncestorComparator does lots 
of work.  I'm afraid I don't understand how the differ works well enough to 
stop it doing so many comparisons, but I've done some work to make the 
comparisons faster.
* I've made the Node store a reference to root, so that getting the root node 
doesn't require traversing through all the ancestors.  It means that whenever a 
Node has its parent changed, the root needs to be updated on that node and all 
its children.  I've added that to setParent and from my limited testing this 
seems to be a significant net-win.  
* I've written a method to compare an AttributeMap's content with an Attributes 
object, which cuts down on the amount of calls to constructing an AttributeMap. 
 I can see the advantage of having one AttributeMap to look up attributes by 
name rather than index, but one or other set of Attributes still needs to be 
iterated over, so there's no need to have two of them.
* I've added an IdentityMap of Attributes -> Boolean in TagNode.  This prevents 
the need to retest whether the TagNode's Attributes are equal to another 
TagNode's Attributes.  This happens a *lot* apparently, and I suspect there's a 
better fix to be made to prevent the checks being performed at all.

3) the DomTreeBuilder was calling inPre a lot, which was a fairly 
time-consuming thing to do since each inPre requires a traversal through to the 
pre tag or the root node.  I've made the DomTreeBuilder simply track whether or 
not it is within a pre-tag rather than delegating that work to the current node 
and its tree.

I'm wondering whether one of the committers has an existing set of test data to 
use for performance testing, as I'd love to make sure I haven't made any known 
pathalogical cases worse instead of better.  On the comparison one of our users 
encountered these changes reduce the time spent diffing by about 25%.

I tried setting up an IdentityHashMap to track equality tests of the whole 
TagNode instead of the AttributeMaps, and this was slightly more effective but 
since TagNodes can theoretically change their parents and thus the outcome of 
equals, this seemed unsafe.

Original issue reported on code.google.com by [email protected] on 5 May 2011 at 6:49

Attachments:

LongHtmlTest fails with java.lang.AssertionError

What steps will reproduce the problem?
1. run the LongHtmlTest with Java assertions enabled. (eg using the -ea JVM 
flag)

What is the expected output? What do you see instead?
The test should pass. (I haven't altered the test or the code).
But instead I get the following stack trace
longHtml1(org.outerj.daisy.diff.html.LongHtmlTest)  Time elapsed: 0.116 sec  
<<< FAILURE!
java.lang.AssertionError
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addTextBrokenAcrossLines(ChangeText.java:86)
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addTextCarefully(ChangeText.java:71)
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addTextCarefully(ChangeText.java:81)
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addTextCarefully(ChangeText.java:81)
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addTextCarefully(ChangeText.java:81)
        at org.outerj.daisy.diff.html.ancestor.ChangeText.addText(ChangeText.java:36)
        at org.outerj.daisy.diff.html.ancestor.tagtostring.AnchorToString.addAttributes(AnchorToString.java:39)
        at org.outerj.daisy.diff.html.ancestor.tagtostring.TagToString.getRemovedDescription(TagToString.java:74)
        at org.outerj.daisy.diff.html.ancestor.ChangeTextGenerator.addTagOld(ChangeTextGenerator.java:122)
        at org.outerj.daisy.diff.html.ancestor.ChangeTextGenerator.getChanged(ChangeTextGenerator.java:83)
        at org.outerj.daisy.diff.html.ancestor.AncestorComparator.getResult(AncestorComparator.java:81)
        at org.outerj.daisy.diff.html.TextNodeComparator.handlePossibleChangedPart(TextNodeComparator.java:136)
        at org.outerj.daisy.diff.html.HTMLDiffer.diff(HTMLDiffer.java:75)
        at org.outerj.daisy.diff.html.HtmlTestFixture.diff(HtmlTestFixture.java:104)
        at org.outerj.daisy.diff.html.LongHtmlTest.longHtml1(LongHtmlTest.java:42)


What version of the product are you using? On what operating system?
v 1.1
MacOSX 10.6.6
Java 1.6.0_24

Please provide any additional information below.
The failing assertion is:
 assert (s.indexOf(' ') < 0 && s.length() > maxNbCharsPerLine);
Only the first part fails.  That is, if I comment out the 
s.indexOf(' ') &&
the assertion succeeds and the test passes.

I'm yet to look into whether the assertion is actually unreasonable or whether 
something needs to be fixed to prevent it happening.

Original issue reported on code.google.com by [email protected] on 5 May 2011 at 4:44

Daisy Diff Report output is different in table tags

What steps will reproduce the problem?
1. Compare the attached two HTMLs (test1.html,test2.htm)
2. Its having a table with 3 rows. there is only one difference in the 3rd 
row.
3. But the diff report shows that there is a deletion at the second row.

What is the expected output? What do you see instead?
Expected output in diff report
"hai1" should be in 1st row is fine
"hai2" should be in 2nd row but it has show in the 3rd row
"hai3" should be in 3rd row with strikeout but it had been shown in 2nd row
"hai4" is the new addition that is fine.


What version of the product are you using? On what operating system?
its latest build taken on 12-April-09, windows vista

Please provide any additional information below.
Here with attached the test htmls & daisy diff report.


Original issue reported on code.google.com by [email protected] on 12 Apr 2009 at 11:44

Attachments:

Invalid HTML output

What steps will reproduce the problem?
1. Create 2 identic HTML file that contain either of:
-- a list (ordered or unordered)
-- a table
2. delete a word from that element and change the style of the word's 
immediate parent in the "new" file
3. watch the result

E.g.:
<ul>
  <li>Some check</li>
</ul>
transformed into
<ul>
  <li style="text-decoration:underline">check</li>
</ul>
will result in the html where "Some" is placed between <ul> and <li>

What is the expected output? 
valid HTML
What do you see instead?
immediate text content in tags that do not permit it 
(<tr>, <table>, <ul>, <ol>, <dl>)
causes the deleted text to be displayed outside of the parent (and common 
parent) HTML element.

What version of the product are you using? 
1.0
On what operating system?
Window XP


Please provide any additional information below.

I have a question - what was the idea with the splitting? 
Was it meant as followed?
>>>
Because the parent of the deleted text node doesn't exist anymore (though 
it might not be true), but the surrounding text nodes did have common 
ancestor, we should add the "missing" child that contained the deleted 
node previously
<<<

I will try to fix this, but I would like to know the answer to the 
question above, so I won't break anything accidentally.

The place where the bug is happening:
org.outerj.daisy.diff.html.TextNodeComparator.markAsDeleted(...)
the code goes like the following:
...
           if (prevResult.getLastCommonParentDepth() > 
               nextResult.getLastCommonParentDepth()) {

                // Inserting at the front
                if (prevResult.isSplittingNeeded()) {
                    prevLeaf.getParent().splitUntill(
                            prevResult.getLastCommonParent(), 
                            prevLeaf,
                            true);
                }
                prevLeaf = deletedNodes.remove(0).copyTree();
                //this is the bug, as not all common parents allowed
                //to have text content. This causes the deleted text to 
                //be displayed outside of the structure. 
                //The splitting is never used here.
                prevLeaf.setParent(prevResult.getLastCommonParent());
                prevResult.getLastCommonParent().addChild(
                        prevResult.getIndexInLastCommonParent() + 1,
                        prevLeaf);

            } else if (prevResult.getLastCommonParentDepth() < 
                       nextResult.getLastCommonParentDepth()) {
 ...
-------------------------
attached are the samples of the bug (notice samples validate as strict 
html: http://validator.w3.org/)

Original issue reported on code.google.com by [email protected] on 14 Apr 2009 at 6:21

Attachments:

Handling username/password in the url .

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
daisydiff-1.2

Please provide any additional information below.
To open a URL with this format
http://username:[email protected]

Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 6:05

Empty IMG tag throws NullPointerException

What steps will reproduce the problem?
    Initiate a parse with a source containing an empty img tag ("<img>")

    Example code:
        String html = "<img>";
        NekoHtmlParser cleaner = new NekoHtmlParser();
        InputSource inputSource = new InputSource(new StringReader(html));
        DomTreeBuilder handler = new DomTreeBuilder();
        cleaner.parse(inputSource, handler);

What is the expected output? What do you see instead?
    Expected output is that the parse completes successfully and populates the DomTreeBuilder.
    Actual output is a NullPointerException in org.outerj.daisy.diff.html.dom.ImageNode.<init>

What version of the product are you using? On what operating system?
    Daisy Diff 1.2 with Java 6 and Java 7 on Linux and Window.


Please provide any additional information below.
    Adding a source attribute to the img tag causes it to parse correctly.

    We are parsing user-supplied data, sometimes pasted from other applications, which is how we wound up with an img tag with no attributes.

    Stack Trace:
java.lang.NullPointerException
    at org.outerj.daisy.diff.html.dom.ImageNode.<init>(Unknown Source)
    at org.outerj.daisy.diff.html.dom.DomTreeBuilder.endElement(Unknown Source)
    at org.outerj.daisy.diff.helper.MergeCharacterEventsHandler.endElement(Unknown Source)
    at org.outerj.daisy.diff.helper.NekoHtmlParser$RemoveNamespacesHandler.endElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at org.cyberneko.html.filters.DefaultFilter.emptyElement(DefaultFilter.java:148)
    at org.cyberneko.html.filters.NamespaceBinder.emptyElement(NamespaceBinder.java:302)
    at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:617)
    at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2637)
    at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2012)
    at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:910)
    at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
    at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.outerj.daisy.diff.helper.NekoHtmlParser.parse(Unknown Source)



Original issue reported on code.google.com by mejari on 31 Jan 2013 at 6:37

Table Column Change issue, gives two columns in o/p

 Hi, 
 i am facing one issue while comparing HTML using daisydiff.
Seems to me that when i give simple two tables for comparison where difference 
in data is in table columns then it throws additional column in o/p.Following 
are steps to reproduce & attached screenshots of problem.

1: Give left side for comparison as 

<table border=2><tr border=2><td border=2>column1</td><td 
border=2>column2</td><td border=2>column3</td></tr><tr border=2><td 
border=2>1</td><td border=2>2</td><td border=2>3</td></tr></table>

2: Give right side for comparison as

<table border=2><tr border=2><td border=2>column1</td><td 
border=2>column2</td><td border=2>column3</td></tr><tr border=2><td 
border=2>1</td><td border=2>22</td><td border=2>3</td></tr></table>

observe difference is in 2nd column's data for left side its 2 & for right its 
22

What is the expected output? What do you see instead?

This results in addition of column (td) for final data which disturbs whole UI. 
Expected output is such that either this should add additional column in header 
columns or it should put difference data in single column

What version of the product are you using? On what operating system?
daisydiff 1.1 & Windows XP

Please provide any additional information below.
Attaching Screenshots for reference, this shift in column cuases large 
usability issue

Original issue reported on code.google.com by [email protected] on 9 Aug 2010 at 11:44

Attachments:

Patch for alternative output formats

Attached you will find a patch for current SVN (12 November 2009) that does 
the following.

1. Conversion of some classes to interfaces (e.g HTMLDiffer and 
HTMLOutput) so that developers can plugin alternative output formats 
(e.g. PDF) 

2. Some unit tests (and addition of Junit 4 instead of Junit 3). Coverage
is now almost 45%

3. An extra field in the internal structures of daisyDiff so that in 
the case of layout removals (e.g. removal 
of an italics tag around a sentence) the output can also "remember" 
what was the old layout. Currently only a textual representation is 
kept (the one shown on the tooltips) but this is not enough for 
further processing. 

All changes are essentially refactorings so that diff functionality 
has not changed at all. 

Please review and apply if you are happy with it.

I would be glad to change it further if there are any problems (coding 
style, comments, naming e.t.c.)

The patch was created with Eclipse. I tested it by checking out from SVN 
the daisy-diff source and applied it again via Eclipse.

Thank you

Original issue reported on code.google.com by [email protected] on 12 Nov 2009 at 9:27

Attachments:

Can the daisydiff keep the style tag?

I am a new user to use the jar file for comparing two pages.
However, after the comparison, the css include tags are deleted. 
Resulting in messy for the result page.

Thank you for your hard working in this project. And I am looking forward 
to hearing from you.

Original issue reported on code.google.com by [email protected] on 13 Jan 2009 at 5:17

Support for 3-way comparison (Submitted by Carsten Pfeiffer)

(From the mailing list)

Hi,

currently, daisydiff only supports comparing one revision of a file with another
revision. One revision will be regarded as the "old" version, the other as the
"new" version. Content overwritten by the new version will be displayed in
red, strike-through, the new content is displayed in green.

This works well if the history of a file is linear and the file cannot be edited
concurrently by multiple persons. With revision control systems, you typically
have three versions to compare:
- the revision that was checked out (ancestor)
- the revision with the local changes
- the current remote revision in the revision control system

In this case, the changes to be displayed are always against the ancestor, so
there may be "old" and "new" changes created by the local revision, as well as
"old" and "new" changes created by the current remote revision. These together
can lead to "conflicting" changes.

Attached is an initial (working) patch for daisydiff to support this scenario.
3-way comparison is already supported by org.eclipse.compare, only daisdiff
needed some additional things. I implemented this against daisydiff 1.1, but
ported it to trunk.

Some constraints with the current version:
- 3-way comparison is currently only available by API (i.e. HTMLDiffer.diff() --
should probably also be added to the Differ interface at least)
- conflicting changes are reported as new and old changes, although most of the
code for conflict detection and formatting is already there

I'd appreciate any feedback.

Cheers,
Carsten

Original issue reported on code.google.com by [email protected] on 16 Aug 2010 at 1:15

Attachments:

Allow html diffs to be interrupted / cancelled

DaisyDiff's html diff can be extremely resource hungry.  Eg our wiki recently 
encountered a page diff (admittedly a very large one) that caused the system to 
run out of memory.  Unit testing the difference at fault I gave it 900MB and it 
still OOMEd.  

There are numerous ways that the resource use could be limited.  Eg modifying 
the LCSSettings' limits, or implementing skipRangeComparison.  But I'd like to 
just make it cancellable externally (because it's easier).

The Eclipse RangeDifferencer at the heart of the HTMLDiffer can be passed an 
IProgressMonitor, whose isCancelled method is often checked.  When the 
IProgressMonitor is cancelled, that diffing operation terminates.

I'm working on a simple change to DaisyDiff to include a diff(IProgressMonitor 
progressMonitor, TextNodeComparator leftComparator, TextNodeComparator 
rightComparator) method that passes that progressMonitor through to the various 
calls to RangeDifference.

That's the most straightforward way to implement the functionality I need, but 
it's not necessarily the best.  Eg people might think we shouldn't leak the 
reliance on Eclipse classes to client code, which would be pretty reasonable.  
Also I haven't done anything about the rest of the IProgressMonitor interface 
at the moment, so it's a bit misleading to take one.

Original issue reported on code.google.com by [email protected] on 17 May 2011 at 12:04

style changes on Diff report when no styles changed

What steps will reproduce the problem?

1. view the two attached files - note that div tags without content are 
not explicitly closed but are closed with />
2. note that only difference between files is that new.html has some text 
added in a div, which is now closed with </div> - see div for 
class="bwStorySubheadline"
3. run Diff report

What is the expected output? What do you see instead?

Expected output is to only see added text as a difference between the two 
files.
Instead, I see changed style on everything following the end div for the 
added text.
Changes indicate that text was "moved out of a division with class (name 
of class with added text) ..."
But nothing was moved out of a division; it seems that /> is not being 
recognized as an end tag.

What version of the product are you using? On what operating system?

ver 1.1.2 (attached on issue 15), Windows XP
this problem also exists on revision 122

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 4 Dec 2009 at 11:26

Attachments:

Add location of css and js directories as a commandline option

I am using daisydiff to view HTML file differences on a local filesystem. The 
output is generated in the source directory, so that existing links to images 
etc are still viewable.

The generated html however contains links like this:
<link href="css/diff.css" type="text/css" rel="stylesheet">
<script src="js/tooltip/wz_tooltip.js" type="text/javascript"></script>

In my situation, the css and js directories are not under the current directory.
So it would be useful to specify the location as a commandline parameter, eg a 
single parameter that is used as a prefix to both the examples above.

Original issue reported on code.google.com by [email protected] on 17 Jun 2012 at 9:58

Improved treatment of the visual document structure (Submitted by Carsten Pfeiffer)

(From the mailing list)

Hi,

when comparing text, daisydiff currently disregards the text's structure.
Whether some text is inside a single paragraph or in different tables, a
headline and a block -- daisydiff doesn't care.

This leads to changes being flagged out of their original context, i.e. a
change done to a table cell will displayed in the headline above the table.

The reasons for that is, that DomTreeBuilder flattens all text nodes into a
simple list. RangeDifferencer (with the help of TextNodeComparator) then finds
the longest possible continuous list of changes, even though they should not
be continuous, because they are in a different parent block-element. When
visualizing the differences, all of them would then be inserted into the first
"common-parent", even though they all come from different parent blocks
elements.

I've solved this by letting DomTreeBuilder insert a dummy "separating" node
whenever a block starts or ends. This causes multiple RangeDifferences to be
created (i.e. one for all changes inside one block element) instead of one big
RangeDifference for all of them.

Additionally I improved the detection of "same" nodes in different DOM trees.
I also consider the node's position in the parent node, so that e.g. the
correct table cell (td) is found instead of the very first with the same
attributes.

Cheers,
Carsten

Original issue reported on code.google.com by [email protected] on 16 Aug 2010 at 1:16

Attachments:

daisydiff.jar will not process local files

Hi,

I'm interested in using daisydiff for a non-java project, the easiest way
would be to shell out and feed daisydiff.jar two local files, and read the
results file.  Unfortunately, it seems to accept only remote addresses...

What steps will reproduce the problem?
1.
$ cat > t1
<h1>test</h1>
^C

2. cat > t2
<h1>test two</h1>
^C

3. java -jar daisydiff.jar t1 t2


     ______________
    /Daisy Diff 0.1\
   /________________\


Comparing documents:
  t1
and
  t2

Diff type: html
Writing html output to daisydiff.htm

.java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1080)
    at org.outerj.daisy.diff.Main.main(Main.java:87)



What is the expected output? What do you see instead?

HTML diff

What version of the product are you using? On what operating system?

0.1


Original issue reported on code.google.com by [email protected] on 18 Feb 2008 at 8:14

Array Index Out Of Bound Exception

What steps will reproduce the problem?

We are using version of daisy diff to show comparison as an html report. We 
encounter an array index out of bound exception in a case where the string 
being compared are different.

What is the expected output? What do you see instead?
There should be no exception. Our HTML comparison report should be loaded 
completely. But our comparison report does not load. Instead we see array index 
out of bound exceptions in the logs.

What version of the product are you using? On what operating system?
0.1 version of daisy diff
windows/linux

Please provide any additional information below.
Exception trace below:

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.outerj.daisy.diff.html.dom.Node.getLastCommonParent(Node.java:88)
at 
org.outerj.daisy.diff.html.TextNodeComparator.markAsDeleted(TextNodeComparator.j
ava:254)
<application_specific_exception_trace_below>
...
...

Original issue reported on code.google.com by [email protected] on 9 Feb 2012 at 7:41

The HtmlDiffer comparison does not work well with &nbsp;

What steps will reproduce the problem?
1. Use programmatic comparison using the HtmlDiffer API.
2. The Strings in comparison have spacing characters i.e. &nbsp;
3. The output result replaces &nbsp with a special character - > á

What is the expected output? What do you see instead?

The output result replaces &nbsp with a special character - > á
It should consider &nbsp; as just a space and display it properly (&nbsp;)
I basically used the Unit test code for comparison HtmlTestFixture.java

What version of the product are you using? On what operating system?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 2 Aug 2010 at 4:32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.