RefGen Eclipse plug-in
(c) Copyright 2017 Rodrigo Morales Alvarado
- Ecole Polytechinique Montreal.
- Use and copying of this software and preparation of derivative works
- based upon this software are permitted. Any copy of this software or
- of any derivative work must include the above copyright notice of
- Rodrigo Morales Alvarado, this paragraph and the one after it.
- This software is made available AS IS, and THE AUTHOR DISCLAIMS
- ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE, AND NOT WITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY
- LIABILITY FOR DAMAGES RESULTING FROM THE SOFTWARE OR ITS USE IS
- EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING
- NEGLIGENCE) OR STRICT LIABILITY, EVEN IF Rodrigo Morales Alvarado IS ADVISED
- OF THE POSSIBILITY OF SUCH DAMAGES.
- All Rights Reserved.
RefGen plug-in is an Eclipse plug-in developed at Polytechinique de Montreal for performing automatic refactoring of software anti-patterns by Christian Kabulo and Rodrigo Morales. The Eclipse plug-in It is based on the MS dissertation titled "RefACO DEVELOPMENT OF A TOOL FOR AUTOMATIC CODE REFACTORING" by Juan María Frías Hidalgo (University of Malaga), which uses an early version of Ant Colony Optimization developed by Rodrigo Morales.
RefGen implements "RePOR", which is an automatic refactoring approach generated at Polytechnique de Montreal by Rodrigo Morales as part of its Ph.D. Thesis.
RePOR leverage Partial Order reduction to automatically detect, generate and schedule refactoring operations, reducing the search effort (measured in time and number of evaluations) required, compared to state-of the art metaheuristics like Genetic Algorithm and Ant Colony. A research paper on RePOR was submitted to Journal of Systems and Software.
The detection of anti-patterns is based on DECOR, and implemented using the set of tools provided by Ptidej tool suite.
So far, RefGen supports the refactoring of five anti-patterns, namely Blob, Lazy Class, Long-parameter list, spaghetti code, and Speculative Generality.
By continuously improving the design of code, we make it easier and easier to work with. This is in sharp contrast to what typically happens: little refactoring and a great deal of attention paid to expediently adding new features. If you get into the hygienic habit of refactoring continuously, you'll find that it is easier to extend and maintain code. — Joshua Kerievsky, Refactoring to Patterns
Manual refactoring is hard due to:
- Many options to choose
- Refactoring solutions can be conflicted, making difficult to decide which refactorings apply and in which order
For all reasons above we developed an automated approach to refactor a system, requiring a minimal interaction from developer.
Please visit the wiki in this repository for further details. In addition, you can run RefGen in simulation mode (applying refactoring to an abstract model, without modifying your code) to test our tool. wiki.
Do not forget to fork our repository to have the latest updates
If you want to use RefGen in your research, please cite at least the following reference:
- Morales, R.; Chicano, F.; Khomh, F.; and Antoniol, G. Efficient Refactoring Scheduling based on Partial order Reduction. Journal of Systems and Software. 2018 DOI
Here is the list of related research work about automatic refactoring of anti-patterns that I have done in Polytechnique de Montreal in collaboration with other well known researchers. For a complete list of works please visit my [personal web site] (http://www.swat.polymtl.ca/rmorales/#portfolio)
-
Morales, R. (2015, 2-6 March 2015). Towards a Framework for Automatic Correction of Anti-Patterns. Paper presented at the 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER). DOI
-
Morales, R., Sabane, A., Musavi, P., Khomh, F., Chicano, F., & Antoniol, G. (2016, 14-18 March 2016). Finding the Best Compromise Between Design Quality and Testing Effort During Refactoring. Paper presented at the 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER). DOI
-
Morales, R., Soh, Z., Khomh, F., Antoniol, G., & Chicano, F. On the use of developers’ context for automatic refactoring of software anti-patterns. Volume 128, 2017, Pages 236-251, ISSN 0164-1212, Journal of Systems and Software. DOI
-
Morales, R., Chicano, F., Khomh, F. et al. Exact search-space size for the refactoring scheduling problem. Autom Softw Eng (2017). DOI
-
Morales, R., Saborido, R., Khomh, F., F., Chicano, F., & Antoniol, G, "EARMO: An Energy-Aware Refactoring Approach for Mobile Apps," in IEEE Transactions on Software Engineering, vol. PP, no. 99, pp. 1-1. doi