skip to main content
10.1145/2372251.2372285acmconferencesArticle/Chapter ViewAbstractPublication PagesesemConference Proceedingsconference-collections
research-article

Method-level bug prediction

Published:19 September 2012Publication History

ABSTRACT

Researchers proposed a wide range of approaches to build effective bug prediction models that take into account multiple aspects of the software development process. Such models achieved good prediction performance, guiding developers towards those parts of their system where a large share of bugs can be expected. However, most of those approaches predict bugs on file-level. This often leaves developers with a considerable amount of effort to examine all methods of a file until a bug is located. This particular problem is reinforced by the fact that large files are typically predicted as the most bug-prone. In this paper, we present bug prediction models at the level of individual methods rather than at file-level. This increases the granularity of the prediction and thus reduces manual inspection efforts for developers. The models are based on change metrics and source code metrics that are typically used in bug prediction. Our experiments---performed on 21 Java open-source (sub-)systems---show that our prediction models reach a precision and recall of 84% and 88%, respectively. Furthermore, the results indicate that change metrics significantly outperform source code metrics.

References

  1. G. Antoniol, K. Ayari, M. D. Penta, F. Khomh, and Y.-G. Gueheneuc. Is it a bug or an enhancement? a text-based approach to classify change requests. In Proc. Conf. of the center for advanced studies on collaborative research: meeting of minds, pages 304--318, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. E. Arisholm and L. Briand. Predicting fault-prone components in a java legacy system. In Proc. Int'l Symp. on Empir. Softw. Eng., pages 8--17, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. V. Basili, L. Briand, and W. Melo. A validation of object-oriented design metrics as quality indicators. IEEE Trans. Softw. Eng., 22:751--761, October 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Bernstein, J. Ekanayake, and M. Pinzger. Improving defect prediction using temporal features and non linear models. In Proc. Int'l Workshop on Principles of Softw. Evolution, pages 11--18, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Bird, A. Bachmann, E. Aune, J. Duffy, A. Bernstein, V. Filkov, and P. Devanbu. Fair and balanced?: bias in bug-fix datasets. In Proc. Joint Eur. Softw. Eng. Conf. and Symp. on the Found. of Softw. Eng., pages 121--130, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Bird, N. Nagappan, P. Devanbu, H. Gall, and B. Murphy. Does distributed development affect software quality? an empirical case study of windows vista. In Proc. Int'l Conf. on Softw. Eng., pages 518--528, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Bird, N. Nagappan, B. Murphy, H. Gall, and P. Devanbu. Don't Touch My Code! Examining the Effects of Ownership on Software Quality. In Proc. Joint Eur Softw. Eng. Conf. and Symp. on the Found. of Softw. Eng., pages 4--14, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. R. Chidamber and C. F. Kemerer. A metrics suite for object oriented design. IEEE Trans. Softw. Eng., 20(6):476--493, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. D'Ambros, M. Lanza, and R. Robbes. Evaluating defect prediction approaches: a benchmark and an extensive comparison. Empir. Softw. Eng., pages 1--47, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. G. Denaro and M. Pezze. An empirical evaluation of fault-proneness models. In Proc. Int'l Conf. on Softw. Eng., pages 241--251, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. E. Emam, S. Benlarbi, N. Goel, and S. Rai. The confounding effect of class size on the validity of object-oriented metrics. IEEE Trans. on Softw. Eng., 27(7):630--650, July 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. B. Fluri, M. Wursch, M. Pinzger, and H. C. Gall. Change Distilling: Tree Differencing for Fine-Grained Source Code Change Extraction. IEEE Trans. on Softw. Eng., 33(11):725--743, November 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. B. Fluri, J. Zuberbuehler, and H. C. Gall. Recommending method invocation context changes. In Proc. Int'l Workshop on Recomm. Syst. for Softw. Eng., pages 1--5, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. H. C. Gall, B. Fluri, and M. Pinzger. Change analysis with evolizer and changedistiller. IEEE Software, 26(1):26--33, January/February 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Ghezzi and H. Gall. Sofas: A lightweight architecture for software analysis as a service. In Proc. Working Conf. on Softw. Architecture, pages 93--102, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. E. Giger, M. Pinzger, and H. C. Gall. Comparing fine-grained source code changes and code churn for bug prediction. In Proc. Int'l Workshop on Mining Softw. Repos., pages 83--92, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Graves, A. Karr, J. Marron, and H. Siy. Predicting fault incidence using software change history. IEEE Trans. Softw. Eng., 26:653--661, July 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Gyimothy, R. Ferenc, and I. Siket. Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Trans. Softw. Eng., 31:897--910, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Hassan. Predicting faults using the complexity of code changes. In Proc. Int'l Conf. on Softw. Eng., pages 78--88, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Y. Kamei, S. Matsumoto, A. Monden, K. Matsumoto, B. Adams, and A. Hassan. Revisiting common bug prediction findings using effort-aware models. In Proc. Int'l Conf. on Softw. Maint., pages 1--10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Kawrykow and M. P. Robillard. Non-essential changes in version histories. In Proc. Int'l Conf. on Softw. Eng., pages 351--360, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Kim, H. Zhang, R. Wu, and L. Gong. Dealing with noise in defect prediction. In Proc. Int'l Conf. on Softw. Eng., pages 481--490, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. Kim, T. Zimmermann, J. Whitehead, and A. Zeller. Predicting faults from cached history. In Proc. Int'l Conf. on Softw. Eng., pages 489--498, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Knab, M. Pinzger, and A. Bernstein. Predicting defect densities in source code files with decision tree learners. In Proc. Int'l Workshop on Mining Softw. Repos., pages 119--125, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. T. Lee, J. Nam, D. Han, S. Kim, and H. P. In. Micro interaction metrics for defect prediction. In Proc. Joint Eur. Softw. Eng. Conf. and Symp. on the Found. of Softw. Eng., pages 311--321, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Lessmann, B. Baesens, C. M. Swantje, and Pietsch. Benchmarking classification models for software defect prediction: A proposed framework and novel findings. IEEE Trans. on Softw. Eng., 34:485--496, July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Menzies, J. Greenwald, and A. Frank. Data mining static code attributes to learn defect predictors. IEEE Trans. on Softw. Eng., 33:2--13, January 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Menzies, Z. Milton, B. Turhan, B. Cukic, Y. Jiang, and A. Bener. Defect prediction from static code features: current results, limitations, new approaches. Automated Softw. Eng., 17(4):375--407, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. I. Mierswa, M. Wurst, R. Klinkenberg, M. Scholz, and T. Euler. Yale: Rapid prototyping for complex data mining tasks. In Proc. Int'l Conf. on Knowl. Discovery and Data Mining, pages 935--940, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. R. Moser, W. Pedrycz, and G. Succi. A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction. In Proc. Int'l Conf. on Softw. Eng., pages 181--190, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. N. Nagappan and T. Ball. Use of relative code churn measures to predict system defect density. In Proc. Int'l Conf. on Softw. Eng., pages 284--292, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. N. Nagappan, T. Ball, and A. Zeller. Mining metrics to predict component failures. In Proc. Int'l Conf. on Softw. Eng., pages 452--461, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. N. Nagappan, B. Murphy, and V. Basili. The influence of organizational structure on software quality: an empirical case study. In Proc. Int'l Conf. on Softw. Eng., pages 521--530, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. N. Nagappan, A. Zeller, T. Zimmermann, K. Herzig, and B. Murphy. Change bursts as defect predictors. In Proc. Int'l Symp. on Softw. Reliability Eng., 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. T. Nguyen, B. Adams, and A. Hassan. Studying the impact of dependency network measures on software quality. In Int'l Conf. on Softw. Maint., pages 1--10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. T. Ostrand, E. Weyuker, and R. Bell. Predicting the location and number of faults in large software systems. IEEE Trans. Softw. Eng., 31(4):340--355, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Pinzger, N. Nagappan, and B. Murphy. Can developer-module networks predict failures? In Proc. Symp. on the Found. of Softw. Eng., pages 2--12, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. D. Posnett, V. Filkov, and P. Devanbu. Ecological inference in empirical software engineering. In Proc. Int'l Conf. on Automated Softw. Eng., pages 362--371, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. Purushothaman and D. Perry. Toward understanding the rhetoric of small source code changes. IEEE Trans. Softw. Eng., 31(6):511--526, June 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. F. Rahman and P. Devanbu. Ownership, experience and defects: a fine-grained study of authorship. In Proc. Int'l Conf. on Softw. Eng., pages 491--500, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. E. Shihab, M. Jiang, W. Ibrahim, B. Adams, and A. Hassan. Understanding the impact of code and process metrics on post-release defects: a case study on the eclipse project. In Proc. Int'l Symp. on Empir. Softw. Eng. and Meas., pages 1--10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. E. Shihab, A. Mockus, Y. Kamei, B. Adams, and A. Hassan. High-impact defects: a study of breakage and surprise defects. In Proc. Joint Eur. Softw. Eng. Conf. and Symp. on the Found. of Softw. Eng., pages 300--310, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. J. Sliwerski, T. Zimmermann, and A. Zeller. When do changes induce fixes? In Proc. Int'l Workshop on Mining Softw. Repos., pages 1--5, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. R. Subramanyam and M. Krishnan. Empirical analysis of ck metrics for object-oriented design complexity: Implications for software defects. IEEE Trans. Softw. Eng., 29(4):297--310, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. R. Wu, H. Zhang, S. Kim, and S.-C. Cheung. Relink: Recovering links between bugs and changes. In Proc. Joint Eur. Softw. Eng. Conf. and Symp. on the Found. of Softw. Eng., pages 15--25, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. H. Zhang. An investigation of the relationships between lines of code and defects. In Proc. Int'l Conf. on Softw. Maint., pages 274--283, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  47. T. Zimmermann and N. Nagappan. Predicting defects using network analysis on dependency graphs. In Proc. Int'l Conf. on Softw. Eng., pages 531--540, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. T. Zimmermann, R. Premraj, and A. Zeller. Predicting defects for eclipse. In Proc. Int'l Workshop on Predictor Models in Softw. Eng., pages 9--15, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Method-level bug prediction

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            ESEM '12: Proceedings of the ACM-IEEE international symposium on Empirical software engineering and measurement
            September 2012
            338 pages
            ISBN:9781450310567
            DOI:10.1145/2372251

            Copyright © 2012 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 19 September 2012

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate130of594submissions,22%

            Upcoming Conference

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader