[Cuis-dev] More powerful duplicate method finder

Hernán Wilkinson hernan.wilkinson at 10pines.com
Tue Sep 22 11:49:28 PDT 2026


Hi,
 the current impl of ExtractMethod does not find this two pieces of code as
duplicates:
------
salesToAdaLovelace := salesSystem salesMadeTo: adaLovelace.
self assert: 1 equals: salesToAdaLovelace size.
self assert: 1 equals: (salesToAdaLovelace count: [ :aProduct | aProduct =
self combo1 ]).
--------
salesToAlanKay := salesSystem salesMadeTo: alanKay.
self assert: 1 equals: salesToAlanKay size.
self assert: 1 equals: (salesToAlanKay  count: [ :aProduct | aProduct =
self combo2 ])
----
 The attached cs makes the ExtractMethod to find them so it can be
extracted this way:
self salesMadeBy: adaLovelace are: [ :aProduct | aProduct = self combo1 ].
self salesMadeBy: alanKay are: [ :aProduct | aProduct = self combo2 ]

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/20260922/a11e4458/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8192-ExtractMethodDuplicateFinding-HernanWilkinson-2026Sep22-09h26m-HAW.001.cs.st
Type: application/octet-stream
Size: 22530 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/a11e4458/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-RefactoringTests-HAW.022.cs.st
Type: application/octet-stream
Size: 2387 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260922/a11e4458/attachment-0003.obj>


More information about the Cuis-dev mailing list