GitHub user santiago-a-vidal opened a pull request:
https://github.com/apache/roller/pull/9
Refactoring complex methods of class Register
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 Register.save extracting
fragments of its code into the new methods sendActivationMailIfNeeded, and
retryActivationCode. Also, the method Register.myValidate() was refactored
extracting fragments of its code into the new methods checkOpenID,
checkUsername, and preserveUsernameAndPassword.
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/roller BandagoRefactorings
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/roller/pull/9.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 #9
----
commit c01077b1be8559f0200c8275274c8d5acd692051
Author: Santiago Vidal <santiagovidal@...>
Date: 2018-02-06T13:05:30Z
Brain methods of class Register automatically refactored with Bandago
----
---