[Cuis-dev] Extract Method - Find Repeated Code based on Node Equivalence

Hernán Wilkinson hernan.wilkinson at 10pines.com
Tue Nov 5 04:42:51 PST 2024


Hi all,
 attached is a .cs and its related tests that improves how the Extract
Method finds repeated code. Up to now it was base on string equality and
therefore the following code was not found as repeated when 10 factorial
was extracted:
10 factorial.
10      factorial.

 With this improvement, code repetition finding is based on the AST nodes
equivalence and therefore the previous code is found as repeated.

 This work was done by Marcelo (copied) as part of his masters thesis and
reviewed by me. Thanks Marcelo!!

 Cheers!
 Hernan.

-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241105/a0b0bdad/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-BaseImageTests-HAW.004.cs.st
Type: application/octet-stream
Size: 35530 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241105/a0b0bdad/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6354-ExtractMethodNodeEquivalence-HernanWilkinson-2024Oct28-12h12m-HAW.001.cs.st
Type: application/octet-stream
Size: 53859 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241105/a0b0bdad/attachment-0003.obj>


More information about the Cuis-dev mailing list