Your browser does not support JavaScript!
http://iet.metastore.ingenta.com
1887

access icon free Conflict-aware optimal scheduling of prioritised code clone refactoring

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 well-known 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.

References

    1. 1)
      • 23. Schulze, S., Kuhlemann, M.: ‘Advanced analysis for code clone removal’. Proc. GI-Workshop on Software Reengineering (WSR), Bad-Honnef, Germany, May 2009, pp. 1012.
    2. 2)
      • 12. Barták, R.: ‘Constraint programming: in pursuit of the holy grail’. Proc. Week of Doctoral Students (WDS), Part IV (invited lecture), Prague, Czech Republic, June 1999, pp. 555564.
    3. 3)
      • 33. Saha, R., Asaduzzaman, M., Zibran, M., Roy, C., Schneider, K.: ‘Evaluating code clone genealogies at release level: an empirical study’. Proc. 10th IEEE Int. Working Conf. Source Code Analysis and Manipulation (SCAM), Timisoara, Romania, September 2010, pp. 8796.
    4. 4)
      • 16. Roy, C., Cordy, J.: ‘A mutation/injection-based automatic framework for evaluating clone detection tools’. Proc. IEEE Int. Conf. Software Testing, Verification, and Validation Workshops (ICSTW), Denver, Colorado, USA, April 2009, pp. 157166.
    5. 5)
      • 43. O'Keeffe, M., Ó Cinnéide, M.: ‘Search-based refactoring: an empirical study’, J. Softw. Maint. Evol. Res. Pract., 2008, 20, (1), pp. 345364.
    6. 6)
      • 45. Schulze, S., Kuhlemann, M., Rosenmüller, M.: ‘Towards a refactoring guideline using code clone classification’. Proc. Second Workshop on Refactoring Tools (WRT), Nashville, Tennessee, USA, October 2008, pp. 6:16:4.
    7. 7)
      • 20. Advani, D., Hassoun, Y., Counsell, S.: ‘Understanding the complexity of refactoring in software systems: a tool-based approach’, Int. J. Gen. Syst., 2006, 35, (3), pp. 329346 (doi: 10.1080/03081070600661051).
    8. 8)
      • 19. Zibran, M., Roy, C.: ‘IDE-based real-time focused search for near-miss clones’. Proc. 27th ACM Symp. Applied Computing (SAC), Riva del Garda, Trento, Italy, March 2012, pp. 12351242.
    9. 9)
      • 44. Ducasse, S., Rieger, M., Golomingi, G.: ‘Tool support for refactoring duplicated OO code’. Proc. Object-Oriented Technology (ECOOP'99 Workshop Reader), number 1743 in LNCS, Springer-Verlag Press, 1999, pp. 26.
    10. 10)
      • 25. DeLine, R., Venolia, G., Rowan, K.: ‘Software development with code maps’, ACM Commun., 2010, 53, (8), pp. 4854 (doi: 10.1145/1787234.1787250).
    11. 11)
      • 40. Robillard, M., Coelho, W., Murphy, G.: ‘How effective developers investigate source code: an exploratory study’, IEEE Trans. Softw. Eng., 2004, 30, (12), pp. 889903 (doi: 10.1109/TSE.2004.101).
    12. 12)
      • 27. Sillito, J., Murphy, G., Volder, K.: ‘Asking and answering questions during a programming change task’, IEEE Trans. Softw. Eng., 2008, 34, (4), pp. 434451 (doi: 10.1109/TSE.2008.26).
    13. 13)
      • 47. Hou, D., Jablonski, P., Jacob, F.: ‘CnP: towards an environment for the proactive management of copy-and-paste programming’. Proc. 17th IEEE Int. Conf. Program Comprehension (ICPC), Vancouver, BC, Canada, May 2009, pp. 238242.
    14. 14)
      • 42. Orso, A., Shi, N., Harrold, M.: ‘Scaling regression testing to large software systems’, SIGSOFT Softw. Eng. Notes, 2004, 29, (6), pp. 241251 (doi: 10.1145/1041685.1029928).
    15. 15)
      • 4. Zibran, M., Saha, R., Asaduzzaman, M., Roy, C.: ‘Analyzing and forecasting near-miss clones in evolving software: an empirical study’. Proc. 16th IEEE Int. Conf. Engineering of Complex Computer Systems (ICECCS), Las Vegas, Nevada, USA, April 2011, pp. 295304.
    16. 16)
      • 11. Lee, S., Bae, G., Chae, H.S., Bae, D., Kwon, Y.R.: ‘Automated scheduling for clone-based refactoring using a competent GA’, Softw. Pract. Exper., 2010, 41, (5), pp. 521550 (doi: 10.1002/spe.1031).
    17. 17)
      • 5. Rieger, M., Ducasse, S., Lanza, M.: ‘Insights into system-wide code duplication’. Proc. 11th IEEE Working Conf. Reverse Engineering (WCRE), Delft, The Netherlands, November 2004, pp. 100109.
    18. 18)
      • 26. Mens, T., Taentzer, G., Runge, O.: ‘Analysing refactoring dependencies using graph transformation’, J. Softw. Syst. Model., 2007, 6, (3), pp. 269285 (doi: 10.1007/s10270-006-0044-6).
    19. 19)
      • 32. Tahvildari, L., Kontogiannis, K.: ‘A metric-based approach to enhance design quality through meta-pattern transformations’. Proc. Seventh European Conf. Software Maintenance and Reengineering (CSMR), Benevento, Italy, March 2003, pp. 183192.
    20. 20)
      • 21. Higo, Y., Kamiya, T., Kusumoto, S., Inoue, K.: ‘ARIES: refactoring support tool code clone’. Proc. Third Workshop on Software Quality (3-WoSQ), St. Louis, Missouri, USA, July 2005, pp. 14.
    21. 21)
      • 14. Zibran, M., Roy, C.: ‘A constraint programming approach to conflict-aware optimal scheduling of prioritized code clone refactoring’. Proc. 11th IEEE Int. Working Conf. Source Code Analysis and Manipulation (SCAM), Williamsburg, Virginia, USA, September 2011, pp. 105114.
    22. 22)
      • 31. Simon, F., Steinbrucker, F., Lewerentz, C.: ‘Metrics based refactoring’. Proc. Fifth European Conf. Software Maintenance and Reengineering (CSMR), Lisbon, Portugal, March 2001, pp. 3038.
    23. 23)
      • 34. Asaduzzaman, M., Roy, C., Schneider, K.: ‘VisCad: flexible code clone analysis support for NiCad’. Proc. Fifth Int. Workshop of Software Clones (IWSC), Waikiki, Honolulu, Hawaii, USA, May 2011, pp. 7778.
    24. 24)
      • 29. Chidamber, S., Kemerer, C.: ‘A metric suite for object-oriented design’, IEEE Trans. Softw. Eng., 1994, 25, (5), pp. 476493 (doi: 10.1109/32.295895).
    25. 25)
      • 46. Higo, Y., Ueda, Y., Kusumoto, S., Inoue, K.: ‘Simultaneous modification support based on code clone analysis’. Proc. 14th Asia Pacific Software Engineering Conf. (APSEC), Nagoya, Aichi, Japan, December 2007, pp. 262269.
    26. 26)
      • 30. Sahraoui, H., Godin, R., Miceli, T.: ‘Can metrics help to bridge the gap between the improvement of OO design quality and its automation?Proc. 16th IEEE Int. Conf. Software Maintenance (ICSM), San Jose, California, USA, October 2000, pp. 154162.
    27. 27)
      • 7. Zibran, M., Roy, C.: ‘Towards flexible code clone detection, management, and refactoring in IDE’. Proc. Fifth Int. Workshop of Software Clones (IWSC), Honolulu, Hawaii, USA, May 2011, pp. 7576.
    28. 28)
      • 9. Liu, H., Li, G., Ma, Z., Shao, W.: ‘Conflict-aware schedule of software refactorings’, IET Softw., 2008, 2, (5), pp. 446460 (doi: 10.1049/iet-sen:20070033).
    29. 29)
      • 28. Bansiya, J., Davis, C.: ‘A hierarchical model for object-oriented design quality assessment’, IEEE Trans. Softw. Eng., 2002, 28, (1), pp. 417 (doi: 10.1109/32.979986).
    30. 30)
      • 3. Kapser, C., Godfrey, M.W.: ‘Cloning considered harmful’ considered harmful: patterns of cloning in software’, Empir. Softw. Eng., 2008, 13, (6), pp. 645692 (doi: 10.1007/s10664-008-9076-6).
    31. 31)
      • 13. Zibran, M.: ‘A multi-phase approach to university course timetabling’. MSc thesis, Department of Mathematics and Computer Science, University of Lethbridge, Canada, September 2007, pp. 1125.
    32. 32)
      • 38. Davidor, Y.: ‘Epistasis variance: a viewpoint on GA-hardness’. Proc. First Workshop on the Foundations of Genetic Algorithms (FOGA), Bloomington, Indiana, USA, July 1990, pp. 2335.
    33. 33)
      • 39. Eiben, A., Raue, P., Ruttkay, Z.: ‘Solving constraint satisfaction problems using genetic algorithms’. Proc. First IEEE Conf. Evolutionary Computation, Orlando, Florida, USA, June 1994, pp. 542547.
    34. 34)
      • 37. Obitko, M.: ‘Introduction to genetic algorithms’, A tutorial on genetic algorithm, http://www.obitko.com/tutorials/genetic-algorithms/recommendations.php, accessed March 2012.
    35. 35)
      • 41. Zibran, M., Roy, C.: ‘Conflict-aware optimal scheduling of code clone refactoring: a constraint programming approach’. Proc. (Student Symp. of the 19th IEEE Int. Conf. Program Comprehension (ICPC), Kingston, Ontario, Canada, June 2011, pp. 266269.
    36. 36)
      • 35. Cordy, J., Roy, C.: ‘The NiCad clone detector’. Proc. 19th IEEE Int. Conf. Program Comprehension (ICPC), tool demo, Kingston, Ontario, Canada, June 2011, pp. 219220.
    37. 37)
      • 24. Yoshida, N., Higo, Y., Kamiya, T., Kusumoto, S., Inoue, K.: ‘On refactoring support based on code clone dependency relation’. Proc. 11th IEEE Int. Software Metrics Symp. (METRICS), Como, Italy, September 2005, pp. 1625.
    38. 38)
      • 22. Higo, Y., Kamiya, T., Kusumoto, S., Inoue, K.: ‘Refactoring support based on code clone analysis’. Product Focused Software Process Improvement (PROFES), Springer, Berlin, Heidelberg Press, 2004, LNCS, 3009, pp. 220233.
    39. 39)
      • 36. Winston, W.: ‘Operations research applications and algorithms’ (Duxbury Press, Belmont, CA, USA, 1994, 3rd edn.).
    40. 40)
      • 18. Uddin, S., Roy, C., Schneider, K., Hindle, A.: ‘On the effectiveness of Simhash for detecting near-miss clones in large scale software systems’. Proc. 18th IEEE Working Conf. Reverse Engineering (WCRE), Lero, Limerick, Ireland, October 2011, pp. 1322.
    41. 41)
      • 2. Juergens, E., Deissenboeck, F., Hummel, B., Wagner, S.: ‘Do code clones matter?’. Proc. 31st Int. Conf. Software Engineering (ICSE), Vancouver, BC, Canada, May 2009, pp. 485495.
    42. 42)
      • 10. Bouktif, S., Antoniol, G., Neteler, M., Merlo, E.: ‘A novel approach to optimize clone refactoring activity’. Proc. Eighth Annual Conf. Genetic and Evolutionary Computation (GECCO), Seattle, Washington, USA, July 2006, pp. 18851892.
    43. 43)
      • 15. Kodhai, E., Vijayakumar, V., Balabaskaran, G., Stalin, T., Kanagaraj, B.: ‘Method level detection and removal of code clones in C and Java programs using refactoring’, Int. J. Comput. Commun. Inf. Syst. (IJCCIS), 2010, 2, (1), pp. 9395.
    44. 44)
      • 6. Fowler, M.: ‘Refactoring catalog’, http://refactoring.com/catalog/, accessed March 2012.
    45. 45)
      • 8. Pérez, J., Crespo, Y., Hoffmann, B., Mens, T.: ‘A case study to evaluate the suitability of graph transformation tools for program refactoring’, Int. J. Softw. Tools Technol. Transf., 2010, 12, pp. 183199 (doi: 10.1007/s10009-010-0153-y).
    46. 46)
      • 1. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: ‘Refactoring: improving the design of existing code’ (Addison Wesley Professional, 1999).
    47. 47)
      • 17. Saha, R., Roy, C., Schneider, K.: ‘An automatic framework for extracting and classifying near-miss clone genealogies’. Proc. 27th IEEE Int. Conf. Software Maintenance (ICSM), Williamsburg, Virginia, USA, September 2011, pp. 293302.
http://iet.metastore.ingenta.com/content/journals/10.1049/iet-sen.2012.0058
Loading

Related content

content/journals/10.1049/iet-sen.2012.0058
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading
This is a required field
Please enter a valid email address