Refactoring complex methods of class Register #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!