[Biopython-dev] results of applying Clone Digger to the sources of BioPython project

Peter Bulychev peter.bulychev at gmail.com
Sat Mar 22 21:31:30 UTC 2008


Hello.

No, unfortunately Clone Digger can not ignore deprecated modules.
In order to obtain betters results automatically generated code and tests
should be removed from the searched source tree by hands.

Other things like providing dictionary like objects seem to be reusing
> a lot of "boiler plate" code, and could probably be rationalised into
> a base class and subclasses.  e.g. in Bio/SwissProt/SProt.py and
> Bio/PubMed.py and Bio/GenBank/__init__.py and Bio/Prosite/__init__.py
>
> Other things like the Blunt(AbstractCut) and Ov3(AbstractCut) both
> sharing apparently identical catalyse() methods may fall into the same
> class.
>
> I think this is the main purpose of Clone Digger: to find clone candidates
and to help to create recommendations for refactoring.



2008/3/22, Peter <biopython at maubp.freeserve.co.uk>:
>
> > Hello.
> >
> >  Clone Digger project is aimed to find software clones (duplicate code)
> in
> >  Python and Java programs.
> >
> >  I have applied it to the source of BioPython and discovered several
> clone
> >  candidates.
> >
> >  There are a lot of false positives caused by similar code in
> >  nlmmedline_*_format.py files, but maybe other clone candidates will be
> >  interesting for you.
> >
> >  The results can be seen here:
> >  http://clonedigger.sourceforge.net/examples.html
>
>
> Interesting.  Does your tool know to ignore deprecated modules?  e.g.
> when we have essentially copied a file from one location to another, a
> deprecated the original.
>
> Some of these are from scanner/consumer parsers where there are two
> alternative consumers turning the data into different object
> representations.
>
> Other things like providing dictionary like objects seem to be reusing
> a lot of "boiler plate" code, and could probably be rationalised into
> a base class and subclasses.  e.g. in Bio/SwissProt/SProt.py and
> Bio/PubMed.py and Bio/GenBank/__init__.py and Bio/Prosite/__init__.py
>
> Other things like the Blunt(AbstractCut) and Ov3(AbstractCut) both
> sharing apparently identical catalyse() methods may fall into the same
> class.
>
>
> Peter
>



-- 
Best regards,
   Peter Bulychev.



More information about the Biopython-dev mailing list