Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring complex methods of class Register #9

Merged
merged 1 commit into from
Dec 16, 2018

Conversation

santiago-a-vidal
Copy link

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!

@snoopdave snoopdave merged commit 9e4c56e into apache:master Dec 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants