期刊文献+
共找到1篇文章
< 1 >
每页显示 20 50 100
Automated pattern-directed refactoring for complex conditional statements
1
作者 刘伟 胡志刚 +1 位作者 刘宏韬 杨柳 《Journal of Central South University》 SCIE EI CAS 2014年第5期1935-1945,共11页
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 s... 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. 展开更多
关键词 REFACTORING abstract syntax tree complex conditional statements design patterns factory method pattem strategypattem
下载PDF
上一页 1 下一页 到第
使用帮助 返回顶部