[Insight-developers] running CPD on Insight/Code

Arnaud GELAS arnaud_gelas at hms.harvard.edu
Tue Jul 27 14:43:11 EDT 2010


  Hi Kent,

I have just started editing a wiki page:

http://www.itk.org/Wiki/ITKv4_CPDProposal

Best,
Arnaud

On 07/27/2010 02:18 PM, kent williams wrote:
> It would be good if you posted this scritp somewhere on a website, or
> included it in an e-mail instead of adding it as an attachment. The
> brilliantly awful e-mail client we're forced to use here blocked that script
> as 'potentially harmful'
>
>
> On 7/23/10 12:51 PM, "Arnaud GELAS"<arnaud_gelas at hms.harvard.edu>  wrote:
>
>>    Hans,
>>
>> I slightly modified the script bin/cpd.sh (attached).
>> Here are the supported extensions for c++ files: ".h", ".c", ".cpp",
>> ".cxx", ".cc", ".C" (this will have to be modified at some point). Then
>> you just need to change the extension of your files to follow the patterns.
>>
>> Then, I ran
>> ./cpd.sh /path/to/Insight/Code 500
>>
>> Note that with this current version it will include recursively all
>> subdirectories of Code, and it will detect even more duplications if you
>> let the review directory (especially with the statistics).
>>
>> There are additional options to play with like ignoreLiterals and
>> ignoreIdentifiers... And it is not clear to me what means the
>> minimumtokencount parameters (it might be in terms of number of
>> characters?).
>>
>> I am trying to change some files to be able to directly handle txx
>> files, but I am not a java expert. So I would appreciate some help on
>> that one...
>>
>> Best,
>> Arnaud
>>
>> On 07/23/2010 01:01 PM, Hans Johnson wrote:
>>> Arnaud,
>>>
>>> Would you mind posting the command line that was used to create these
>>> results?
>>>
>>> Thanks,
>>> Hans
>>>
>>>
>>>
>>> On 7/23/10 11:46 AM, "Arnaud GELAS"<arnaud_gelas at hms.harvard.edu>   wrote:
>>>
>>>>     Hi all,
>>>>
>>>> As discussed during the last TConf, I ran CPD on ITK the code directory
>>>> (except on the Review subdirectory).
>>>>
>>>> I have uploaded these files on the wiki (in the code duplication section)
>>>>
>>>> http://www.itk.org/Wiki/Agenda%26Status_072010
>>>>
>>>> For the time being, cpd can not process txx files as c++ files, so I
>>>> manually change the extension of each txx file to cc, and ran CPD with
>>>> different token values (100, 200 and 500).
>>>> Note that in resulting files, I replace each cc by txx (to facilitate
>>>> the comprehension of the results).
>>>>
>>>> This process is really fast: ~4s!!!
>>>>
>>>> Have a nice day,
>>>> Arnaud
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://kitware.com/products/protraining.html
>>>>
>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.itk.org/mailman/listinfo/insight-developers
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list