Username   Password       Forgot your password?  Forgot your username? 


Context-Aware Automatic Code Segment Extraction and Refactoring in Object-Oriented Systems

Volume 14, Number 7, July 2018, pp. 1493-1502
DOI: 10.23940/ijpe.18.07.p13.14931502

Wei Liua, Xindi Huanga, Zhigang Hub, and Hong Phong Nguyenc

aSchool of Informatics, Hunan University of Chinese Medicine, Hunan, 410208, China
bSchool of Software, Central South University, Hunan, 410075, China
cFaculty of Civil Engineering, University of Transport and Communications, Hanoi, 100000, Vietnam

(Submitted on March 29, 2018; Revised on April 27, 2018; Accepted on May 23, 2018)


Refactoring is a very important technology to improve the reusability and maintainability of existing code, and it is widely used in software development. In order to extract the code segment into a new method easily and cover the shortage of Eclipse in refactoring, the method of Context-Aware Automatic Code Segment Extraction and Refactoring (CAACSER) is proposed. By analyzing the context of the code, the input parameter class, and the output parameter class are introduced to handle complex code segments. The experimental results show that the CAACSER effectively solves some problems and drawbacks of many existing tools in code segment extraction, which acts as a basic step for realizing automatic and semi-automatic refactoring methods. The visualization tool of CAACSER can also carry out reasonable optimizations of the code without changing the systems’ behaviors.


References: 16

          1. F. Martin , K. Beck, “Refactoring: improving the design of existing code”, Addison-Wesley, 1999.
          2. S. H. Kannangara, W. M. J. I. Wijayanayake, “An empirical evaluation of impact of refactoring on internal and external measures of code quality ”, International Journal of Software Engineering & Applications, vol. 6, no.1, pp. 51–67, 2015
          3. N. Kumari, A. Saha, “Effect of refactoring on software quality”. International Journal of Computer Science & Information Technology, vol. 4, no. 5, pp. 37-46, 2014.
          4. D. Cedrim, L. Sousa, A. Garcia, R. Gheyi, “Does refactoring improve software structural quality? A longitudinal study of 25 projects”, in Proc. 30th Brazilian Symposium on Software Engineering (SBES '16), Maringa, Brazil, 2016, pp. 73-82.
          5. M. Kaya, J.W. Fawcett, “Identification of extract method refactoring opportunities through analysis of variable declarations and uses”, International Journal of Software Engineering & Knowledge Engineering, vol. 27, no. 1, pp. 49-69, 2017.
          6. S. Charalampidou, A. Ampatzoglou, A. Chatzigeorgiou, A. Gkortzis, P. Avgeriou, “Identifying extract method refactoring opportunities based on functional relevance”, IEEE Transactions on Software Engineering, vol. 43, no. 10, pp. 954-974, 2017
          7. J.A. Dallal, “Predicting move method refactoring opportunities in Object-Oriented code”, Information & Software Technology, vol. 92, pp. 105-120, 2017.
          8. R. Terra, M. T. Valente, S. Miranda, V. Sales, “JMove: A novel heuristic and tool to detect move method refactoring opportunities”, Journal of Systems & Software, vol. 138, pp. 19-36, 2018.
          9. M. Weiser, “Program slicing”, in Proc. 5th International Conf. on Software Engineering (ICSE '81), San Diego, USA, pp. 439-449, 1981.
          10. M. Weiser, “Program slicing”, IEEE Transactions on Software Engineering, vol. 10, no. 4, pp. 352-357, 1984.
          11. N. Tsantalis, A. Chatzigeorgiou, “Identification of extract method refactoring opportunities for the decomposition of methods”, Journal of Systems and Software, vol. 84, no. 10, pp. 1757-1782, 2011.
          12. T. Sharma, “Identifying extract-method refactoring candidates automatically”, in Proc. 5th Workshop on Refactoring Tools (WRT '12), Rapperswil, Switzerland, 2012, pp. 50-53.
          13. K. Maruyama, “Automated method-extraction refactoring by using block-based slicing”, in ACM Symposium on Software Reusability: putting software reuse in context (SSR '01), Toronto, Canada, 2001, pp. 31-40.
          14. A. Chandra, A. Singhal, A. Bansal, “A study of program slicing techniques for software development approaches”, in IEEE 2015 1st International Conference on Next Generation Computing Technologies (NGCT), Dehradun, India, 2016, pp. 622-627.
          15. I. Mastroeni, D. Zanardini, “Abstract program slicing: an abstract interpretation-based approach to program slicing”, ACM Transactions on Computational Logic, vol. 18, no. 1, pp. 1-54, 2017.
          16. T. Kuhn, Eye Media GmbH, O. Thomann, IBM Ottawa Lab, “Abstract Syntax Tree”, 2006-11-20, JavaCodeManipulation_AST/index.html.


                  Please note : You will need Adobe Acrobat viewer to view the full articles.Get Free Adobe Reader

                  Download this file (13-IJPE-2018-07-13.pdf)IJPE-2018-07-13[Context-Aware Automatic Code Segment Extraction and Refactoring in Object-Oriented Systems]805 Kb
                  This site uses encryption for transmitting your passwords.