Research Article
An Approach to Analyzing Execution Preservation in Java Program Refactoring
@INPROCEEDINGS{10.1007/978-3-319-56357-2_11, author={Thi-Huong Dao and Hong Le and Ninh Truong}, title={An Approach to Analyzing Execution Preservation in Java Program Refactoring}, proceedings={Context-Aware Systems and Applications. 5th International Conference, ICCASA 2016, Thu Dau Mot, Vietnam, November 24-25, 2016, Proceedings}, proceedings_a={ICCASA}, year={2017}, month={6}, keywords={Refactoring Design patterns Consistency ARTC}, doi={10.1007/978-3-319-56357-2_11} }
- Thi-Huong Dao
Hong Le
Ninh Truong
Year: 2017
An Approach to Analyzing Execution Preservation in Java Program Refactoring
ICCASA
Springer
DOI: 10.1007/978-3-319-56357-2_11
Abstract
Code refactoring is a technique that improves the existing code in order to make software easier to understand and more extensible without changing the external behavior. Software design patterns, programming language independent reusable solutions to comment problems, are well-known in Java communities. On one hand, the refactoring using design patterns brings many benefits such as cost saving, flexibilities, and maintainability. On the other hand, it potentially causes bugs or changes execution behavior of Java programs. This paper proposes a new approach to checking behavior preservation properties of Java programs after applying design patterns. We present new definitions to compute pre/post conditions of program behavior. In the next step, the paper makes use of Java Modeling Language (JML) to represent and check if the refactored program neglects to preserve the external behavior. A motivating example of Adaptive Road Traffic Control (ARTC) is given to illustrate the approach in detail.