首页 | 本学科首页   官方微博 | 高级检索  
     


Dynamic profiling-based approach to identifying cost-effective refactorings
Affiliation:1. Otto-von-Guericke University Magdeburg, Germany;2. Harz University of Applied Sciences Wernigerode, Germany;3. Chalmers University of Technology, Sweden;4. Chalmers / University of Gothenburg, Sweden;1. Departamento de Informática, Universidade Federal do Espírito Santo (UFES), Vitória, ES, Brasil;2. Departamento de Ciência da Computação, Universidade Federal do Rio de Janeiro (UFRJ), Rio de Janeiro, RJ, Brasil;3. Centro Universitário Católico de Vitória (UCV), Vitória, ES, Brasil;4. Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio), Rio de Janeiro, RJ, Brasil;1. Department of Computer Science, University of Nebraska, Omaha, NE, USA;2. Amazon.com, Inc., Seattle, WA, USA;1. Centre de Recherche en Informatique Signal et Automatique de Lille Université de Lille 1 59655 Villeneuve d''Ascq Cedex France;2. Department of Computer Science, University College London, Gower Street London, WC1E 6BT, UK;1. Computer Engineering Department, An-Najah National University, Nablus, Palestine;2. Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia;3. Interdisciplinary Research Center for Intelligent Secure Systems, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia;4. Department of Computer Science, Prince Sultan University, Riyadh, Saudi Arabia
Abstract:ContextObject-oriented software undergoes continuous changes—changes often made without consideration of the software’s overall structure and design rationale. Hence, over time, the design quality of the software degrades causing software aging or software decay. Refactoring offers a means of restructuring software design to improve maintainability. In practice, efforts to invest in refactoring are restricted; therefore, the problem calls for a method for identifying cost-effective refactorings that efficiently improve maintainability. Cost-effectiveness of applied refactorings can be explained as maintainability improvement over invested refactoring effort (cost). For the system, the more cost-effective refactorings are applied, the greater maintainability would be improved. There have been several studies of supporting the arguments that changes are more prone to occur in the pieces of codes more frequently utilized by users; hence, applying refactorings in these parts would fast improve maintainability of software. For this reason, dynamic information is needed for identifying the entities involved in given scenarios/functions of a system, and within these entities, refactoring candidates need to be extracted.ObjectiveThis paper provides an automated approach to identifying cost-effective refactorings using dynamic information in object-oriented software.MethodTo perform cost-effective refactoring, refactoring candidates are extracted in a way that reduces dependencies; these are referred to as the dynamic information. The dynamic profiling technique is used to obtain the dependencies of entities based on dynamic method calls. Based on those dynamic dependencies, refactoring-candidate extraction rules are defined, and a maintainability evaluation function is established. Then, refactoring candidates are extracted and assessed using the defined rules and the evaluation function, respectively. The best refactoring (i.e., that which most improves maintainability) is selected from among refactoring candidates, then refactoring candidate extraction and assessment are re-performed to select the next refactoring, and the refactoring identification process is iterated until no more refactoring candidates for improving maintainability are found.ResultsWe evaluate our proposed approach in three open-source projects. The first results show that dynamic information is helpful in identifying cost-effective refactorings that fast improve maintainability; and, considering dynamic information in addition to static information provides even more opportunities to identify cost-effective refactorings. The second results show that dynamic information is helpful in extracting refactoring candidates in the classes where real changes had occurred; in addition, the results also offer the promising support for the contention that using dynamic information helps to extracting refactoring candidates from highly-ranked frequently changed classes.ConclusionOur proposed approach helps to identify cost-effective refactorings and supports an automated refactoring identification process.
Keywords:Cost-effective refactoring  Refactoring identification  Dynamic profiling  Dynamic method call  Maintainability improvement  Refactoring cost
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号