Context-based code smells prioritization for prefactoring

To find opportunities for applying prefactoring, several techniques for detecting bad smells in source code have been proposed. Existing smell detectors are often unsuitable for developers who have a specific context because these detectors do not consider their current context and output the results that are mixed with both smells that are and are not related to such context. Consequently, the developers must spend a considerable amount of time identifying relevant smells. As described in this paper, we propose a technique to prioritize bad code smells using developers' context. The explicit data of the context are obtained using a list of issues extracted from an issue tracking system. We applied impact analysis to the list of issues and used the results to specify which smells are associated with the context. Consequently, our approach can provide developers with a list of prioritized bad code smells related to their current context. Several evaluations using open source projects demonstrate the effectiveness of our technique.

[1]  Aiko Fallas Yamashita,et al.  Do developers care about code smells? An exploratory survey , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[2]  Stéphane Ducasse,et al.  Object-Oriented Metrics in Practice , 2005 .

[3]  Jaana Kekäläinen,et al.  Cumulated gain-based evaluation of IR techniques , 2002, TOIS.

[4]  Weizhong Shao,et al.  Monitor-Based Instant Software Refactoring , 2013, IEEE Transactions on Software Engineering.

[5]  Robert S. Arnold,et al.  Software Change Impact Analysis , 1996 .

[6]  Francesca Arcelli Fontana,et al.  Towards a prioritization of code debt: A code smell Intensity Index , 2015, 2015 IEEE 7th International Workshop on Managing Technical Debt (MTD).

[7]  Bogdan Dit,et al.  A TraceLab-based solution for creating, conducting, and sharing feature location experiments , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[8]  Tracy Hall,et al.  Code Bad Smells: a review of current knowledge , 2011, J. Softw. Maintenance Res. Pract..

[9]  Yuanfang Cai,et al.  Prioritization of Code Anomalies Based on Architecture Sensitiveness , 2013, 2013 27th Brazilian Symposium on Software Engineering.

[10]  William C. Wake,et al.  Refactoring Workbook , 2003 .

[11]  Miryung Kim,et al.  Does Automated Refactoring Obviate Systematic Editing? , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[12]  Claudia A. Marcos,et al.  An approach to prioritize code smells for refactoring , 2014, Automated Software Engineering.

[13]  Radu Marinescu,et al.  Assessing technical debt by identifying design flaws in software systems , 2012, IBM J. Res. Dev..

[14]  Francesca Arcelli Fontana,et al.  Filtering code smells detection results , 2015, ICSE 2015.

[15]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[16]  Shinpei Hayashi,et al.  Supporting Refactoring Activities Using Histories of Program Modification , 2006, IEICE Trans. Inf. Syst..

[17]  T. Landauer,et al.  Indexing by Latent Semantic Analysis , 1990 .

[18]  Michael McGill,et al.  Introduction to Modern Information Retrieval , 1983 .

[19]  Aiko Fallas Yamashita,et al.  Do code smells reflect important maintainability aspects? , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[20]  Mik Kersten,et al.  Mylar: a degree-of-interest model for IDEs , 2005, AOSD '05.

[21]  Bogdan Dit,et al.  A dataset from change history to support evaluation of software maintenance tasks , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

[22]  Bogdan Dit,et al.  Integrated impact analysis for managing software changes , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[23]  Stéphane Ducasse,et al.  Using history information to improve design flaws detection , 2004, Eighth European Conference on Software Maintenance and Reengineering, 2004. CSMR 2004. Proceedings..

[24]  Robert W. Bowdidge,et al.  Why don't software developers use static analysis tools to find bugs? , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[25]  Evan Moritz,et al.  TraceLab: An experimental workbench for equipping researchers to innovate, synthesize, and comparatively evaluate traceability solutions , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[26]  Vaclav Rajlich Software Engineering: The Current Practice , 2011 .

[27]  Stas Negara,et al.  Is It Dangerous to Use Version Control Histories to Study Source Code Evolution? , 2012, ECOOP.

[28]  Bogdan Dit,et al.  Feature location in source code: a taxonomy and survey , 2013, J. Softw. Evol. Process..

[29]  Gabriele Bavota,et al.  An experimental investigation on the innate relationship between quality and refactoring , 2015, J. Syst. Softw..