cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From santiago-a-vidal <...@git.apache.org>
Subject [GitHub] cayenne pull request #266: Refactoring complex methods of classes BaseGraphB...
Date Mon, 05 Feb 2018 13:40:06 GMT
GitHub user santiago-a-vidal opened a pull request:

    https://github.com/apache/cayenne/pull/266

    Refactoring complex methods of classes BaseGraphBuilder and ProjectTreeView

    Related to no particular issue. This is a behavior-preserving refactoring.
    
    Summary of this pull request:
    
    •	We are evaluating a research prototype called Bandago that assists in the refactoring
of complex methods. Bandago is an Eclipse plugin that automatically identifies and refactors
a type of code smell called Brain Method. A Brain Method centralizes the intelligence of a
class and manifests itself as a long and complex method that is difficult to understand
and maintain We have applied Bandago to 2 complex methods of your project, and we would like
to receive feedback.
    •	Bandago is very conservative and you should not observe many source code changes (only
in the affected class).
    •	The source code (after the refactoring) should behave equivalently to the original
one.
    •	As a sanity check, we have run tests before and after Bandago performed the refactoring(s)
on the project. All tests passed.
    •	The goal of the refactorings applied is to improve the legibility of the refactored
method.
    •	In this case, Bandago refactored the method BaseGraphBuilder.buildGraph  extracting
fragments of its code into the new methods addIsolatedObjetcs, addMouseListeners, and setLayout.
Also, the method ProjectTreeView.initController() was refactored extracting fragments of its
code into the new methods setupMediator and initTreeSelectionListener.
    
    Thanks in advance for your help in this evaluation!


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/santiago-a-vidal/cayenne BandagoRefactorings

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/266.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #266
    
----
commit 221bed687134243da14e220daa8df3686bdb183d
Author: Santiago Vidal <santiagovidal@...>
Date:   2018-02-05T13:33:49Z

    Brain methods of classes BaseGraphBuilder and ProjectTreeView
    automatically refactored with Bandago

----


---

Mime
View raw message