DOI QR코드

DOI QR Code

Which Code Changes Should You Review First?: A Code Review Tool to Summarize and Prioritize Important Software Changes

  • Song, Myoungkyu (Dept. of Computer Science, University of Nebraska at Omaha) ;
  • Kwon, Young-Woo (School of Computer Science and Engineering, Kyungpook National University)
  • Received : 2017.12.20
  • Accepted : 2017.12.22
  • Published : 2017.12.31

Abstract

In recent software development, repetitive code fragments (i.e., clones) are common due to the copy-and-paste programming practice, the framework-based development, or the reuse of same design patterns. Such similar code fragments are likely to introduce more bugs but are easily disregarded by a code reviewer or a programmer. In this paper, we present a code review tool to help code reviewers identify important code changes written by other programmers and recommend which changes need to be reviewed first. Specifically, to identify important code changes, our approach detects code clones across revisions and investigates them. Then, to help a code reviewer, our approach ranks the identified changes in accordance with several software quality metrics and statistics on those clones and changes. Furthermore, our approach allows the code reviewer to express their preferences during code review time. As a result, the code reviewer who has little knowledge of a code base can reduce his or her effort by reviewing the most significant changes that require an instant attention. To evaluate our approach, we integrated our approach with a modern IDE (e.g., Eclipse) as a plugin and then analyzed two third-party open source projects. The experimental results indicate that our approach can improve code reviewer's productivity.

Keywords

References

  1. Code collaborator: https://smartbear.com/product/collaborator/, 2017.
  2. Gerrit, http://code.google.com/p/gerrit/, 2017
  3. Phabricator, http://phabricator.org, 2017
  4. L. Aversano, L. Cerulo, and M. D. Penta, "How clones are maintained: An empirical study," In CSMR '07: Proceedings of the 11th European Conference on Software Maintenance and Reengineering, 2007.
  5. M. Balazinska, E. Merlo, M. Dagenais, B. Lague, and K. Kontogiannis, "Measuring clone based reengineering opportunities," In Proceedings of Software Metrics Symposium. Sixth International, pp. 292-303, 1999.
  6. M. Balazinska, E. Merlo, M. Dagenais, B. Lague, and K. Kontogiannis, "Partial redesign of Java software systems based on clone analysis," In 6th Working Conference on Reverse Engineering, 1999
  7. M. Fowler, Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 2000.
  8. N. Gode and R. Koschke, "Studying clone evolution using incremental clone detection," Journal of Software: Evolution and Process, vol. 25, no. 2, pp. 165-192, 2013. https://doi.org/10.1002/smr.520
  9. L. Jiang, G. Misherghi, Z. Su, and S. Glondu. Deckard, "Scalable and accurate tree-based detection of code clones," In Proceedings of the 29th International Conference on Software Engineering, 2007.
  10. M. Kim, V. Sazawal, D. Notkin, and G. Murphy, "An empirical study of code clone genealogies," In Proceedings of the 13th International Symposium on Foundations of Software Engineering, 2005
  11. J. Krinke, "Is cloned code more stable than non-cloned code?," In Eighth IEEE International Working Conference on Source Code Analysis and Manipulation, 2008.
  12. R. Moser, A. Sillitti, P. Abrahamsson, and G. Succi, "Does refactoring improve reusability?," In International Conference on Software Reuse, 2006
  13. H. A. Nguyen, A. T. Nguyen, T. T. Nguyen, T. N. Nguyen, and H. Rajan, "A study of repetitiveness of code changes in software evolution," In Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on, 2013.
  14. T. T. Nguyen, H. A. Nguyen, J. M. Al-Kofahi, N. H. Pham, and T. N. Nguyen, "Scalable and incremental clone detection for evolving software," In IEEE International Conference on Software Maintenance, 2009.
  15. R. K. Saha, C. K. Roy, K. A. Schneider, and D. E. Perry, "Understanding the evolution of type-3 clones: an exploratory study," In Mining Software Repositories (MSR), 2013 10th IEEE Working Conference on, 2013.
  16. Y. Tao, Y. Dang, T. Xie, D. Zhang, and S. Kim, "How do software engineers understand code changes?: An exploratory study in industry," In Proc. of FSE, 2012