Traceback when running on leo core

18 views
Skip to first unread message

Jesse Aldridge

unread,
May 20, 2009, 9:55:47 AM5/20/09
to Clone Digger general
Hey, man. Cool tool! I recently tried to run it on the core of the
leo editor (http://webpages.charter.net/edreamleo/front.html) and got
a traceback. It seemed to work (I got some html output), but I
thought I'd post the error message anyway.

You can reproduce by doing:
bzr branch lp:leo-editor
clonedigger leo-editor/leo/core

-------

Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 175, in writeReport
rec_correct_as_string(s1, s2, u.getSubstitutions()[0].getMap
().values(), u.getSubstitutions()[1].getMap().values() )
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 165, in
rec_correct_as_string
set_as_string_node_parent(t)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 160, in
set_as_string_node_parent
n = NewAsString(t.ast_node.as_string())
AttributeError: AbstractSyntaxTree instance has no attribute
'ast_node'
using diff highlight
The following error occured during highlighting of differences on the
AST level:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 175, in writeReport
rec_correct_as_string(s1, s2, u.getSubstitutions()[0].getMap
().values(), u.getSubstitutions()[1].getMap().values() )
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 171, in
rec_correct_as_string
rec_correct_as_string(c1, c2, s1, s2)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 165, in
rec_correct_as_string
set_as_string_node_parent(t)
File "/usr/local/lib/python2.6/dist-packages/clonedigger-1.0.9_beta-
py2.6.egg/clonedigger/html_report.py", line 160, in
set_as_string_node_parent
n = NewAsString(t.ast_node.as_string())
AttributeError: AbstractSyntaxTree instance has no attribute
'ast_node'
using diff highlight

zpcspm

unread,
May 20, 2009, 1:37:12 PM5/20/09
to Clone Digger general
I've been complaining some time ago about Clone Digger taking much
time when processing big amounts of source code (you can see an older
thread in this group). I didn't mention it there, but I was trying to
run it against leo as well :-) My problem was different: I have a
relatively old computer and the process takes lots of time. This is
why I can't run Clone Digger against whole leo.

Jesse, I'd suggest you to try running Clone Digger against particular
*.py files from leo, hopefully you'll get this traceback again. This
would isolate the issue and will make it easier to be reproduced by
other people, since processing a single python source file should take
much less time than processing the whole leo source code.

Jesse Aldridge

unread,
May 21, 2009, 12:59:53 AM5/21/09
to clonedigg...@googlegroups.com
Jesse, I'd suggest you to try running Clone Digger against particular
*.py files from leo, hopefully you'll get this traceback again. This
would isolate the issue and will make it easier to be reproduced by
other people, since processing a single python source file should take
much less time than processing the whole leo source code.

I don't have time for this right now, but I'll put it on my to-do list.  Which means, hopefully I'll get around to it someday... or hopefully someone else will do it first :)

zpcspm

unread,
May 21, 2009, 11:26:11 AM5/21/09
to Clone Digger general
I have managed to reproduce the traceback by running Clone Digger
against a single file, that is not a part of leo itself (it's from leo/
extensins/Gato):

- download the latest stable release of Gato (http://
gato.sourceforge.net/)
- extract the files from the tarball
- run Clone Digger against the file DataStructures.py

Jesse Aldridge

unread,
May 21, 2009, 11:34:26 AM5/21/09
to clonedigg...@googlegroups.com
Actually, I got the traceback when running Clone Digger against leo/core.
The problem file seems to be leoEditCommands.py, I posted the file here:
http://dl.getdropbox.com/u/135901/leoEditCommands.py

Peter Bulychev

unread,
May 21, 2009, 2:45:18 PM5/21/09
to clonedigg...@googlegroups.com
Hello.

Thanks for isolating this file.

I'll take a look on it later.

This error occurred while CD was highlighting differences between clones, so you are not missing any detected clones (but the differences are highlighted on the textual level rather than on abstract syntax tree level).

2009/5/21 Jesse Aldridge <jessea...@gmail.com>



--
Best regards,
  Peter Bulychev.
Reply all
Reply to author
Forward
0 new messages