期刊文献+

Automated pattern-directed refactoring for complex conditional statements

Automated pattern-directed refactoring for complex conditional statements
下载PDF
导出
摘要 Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes. Complex conditional statement is one of the bad code smells,which affects the quality of the code and design of software.In the proposed approach,two commonly-used design patterns for handling complex conditional statements are selected,and they are the factory method pattern and the strategy pattern.Two pattern-directed refactoring approaches based on the two design patterns are proposed.Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm.After parsing the abstract syntax tree generated from source code,the refactoring opportunities are identified effectively and automatically.Then,for candidate code,refactoring algorithms are executed automatically,which are used to simplify or remove complex conditional statements.By empirical analysis and quality assessment,the code after refactoring has better maintainability and extensibility,and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.
出处 《Journal of Central South University》 SCIE EI CAS 2014年第5期1935-1945,共11页 中南大学学报(英文版)
关键词 REFACTORING abstract syntax tree complex conditional statements design patterns factory method pattem strategypattem 重构算法 条件语句 自动模式 导向 错误代码 设计模式 抽象语法树 模式控制
  • 相关文献

参考文献21

  • 1FOWLER M, BECK K. Refactoring-Improving the design of existing code [M]. Massachusetts: Addison-Wesley, 1999:63-71. 被引量:1
  • 2VAKILIAN M, CHEN N, NEGARA S, RAJKUMAR A B, BAILEY P B, JOHNSON E R. Use, disuse, and misuse of automated refactorings [C]// Proceedings of the 34th International Conference on Software Engineering (ICSE). Zurich, 2012: 233-243. 被引量:1
  • 3MURPHY-HILL E, PARNIN C, BLACK A E How we refactor, and how we know It [J]. IEEE Transaction on Software Engineering, 2012, 38(1): 5-18. 被引量:1
  • 4DALLAL J A. Constructing models for predicting extract subclass refactoring opportxmities using object-oriented quality metrics [J]. Information and Software Technology, 2012, 54(10): 1125 -1141. 被引量:1
  • 5TSANTALIS N, CHATZIGEORGIOU A. Identification of move method refactoring opportunities [J]. IEEE Transaction on Software Engineering, 2009, 35(3): 347-367. 被引量:1
  • 6TSANTALIS N, CHATZIGEORGIOU A. Identification of extract method refactoring opportunities [C]// Proceedings of the 13th European Conference on Software Maintenance and Reengineering (CSMR'09). Kaiserslautern, 2009: 119-128. 被引量:1
  • 7TSANTALIS N, CHATZIGEORGIOU A. Identification of extract method refactoring opportunities for the decomposition of methods [J]. Journal of Systems and Software, 2011, 84(10): 1757-1782. 被引量:1
  • 8TSANTALIS N, CHATZlGEORGIOU A. Identification of refactoring opportunities introducing polymorphism [J]. Journal of Systems and Software, 2010, 83(3): 391-404. 被引量:1
  • 9FOKAEFS M, TSANTALIS N, STROULIA E, CHATZ1GEORGIOU A. Identification and application of extract class refactorings in object-oriented systems [J]. Joumal of Systems and Software, 2012, 85(10): 2241-2260. 被引量:1
  • 10BAVOTA G, De LUCIA A, OLIVETO R. Identifying extract class refactoring oppommities using structural and semantic cohesion measures [J]. Journal of Systems and Software, 2011, 84(3): 397-414. 被引量:1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部