• DocumentCode
    12460
  • Title

    Conflict-aware optimal scheduling of prioritised code clone refactoring

  • Author

    Zibran, Minhaz F. ; Roy, Chanchal K.

  • Author_Institution
    Department of Computer Science, University of Saskatchewan
  • Volume
    7
  • Issue
    3
  • fYear
    2013
  • fDate
    Jun-13
  • Firstpage
    167
  • Lastpage
    186
  • Abstract
    Duplicated or similar source code, also known as code clones, are possible malicious ´code smells´ that may need to be removed through refactoring to enhance maintainability. Among many potential refactoring opportunities, the choice and order of a set of refactoring activities may have distinguishable effect on the design/code quality measured in terms of software metrics. Moreover, there may be dependencies and conflicts among those refactorings of different priorities. Addressing all the conflicts, priorities and dependencies, a manual formulation of an optimal refactoring schedule is very expensive, if not impossible. Therefore an automated refactoring scheduler is necessary to ´maximise benefit and minimise refactoring effort´. However, the estimation of the efforts required to perform code clone refactoring is a challenging task. This study makes two contributions. First, the authors propose an effort model for the estimation of code clone refactoring efforts. Second, the authors propose a constraint programming (CP) approach for conflict-aware optimal scheduling of code clone refactoring. A qualitative evaluation of the effort model from the developers´ perspective suggests that the model is complete and useful for code clone refactoring effort estimation. The authors also quantitatively compared their refactoring scheduler with other wellknown scheduling techniques such as the genetic algorithm, greedy approaches and linear programming. The authors´ empirical study suggests that the proposed CP-based approach outperforms other approaches they considered.
  • fLanguage
    English
  • Journal_Title
    Software, IET
  • Publisher
    iet
  • ISSN
    1751-8806
  • Type

    jour

  • DOI
    10.1049/iet-sen.2012.0058
  • Filename
    6547868