Skip to main content

TroBo: A Novel Deep Transfer Model for Enhancing Cross-Project Bug Localization

  • Conference paper
  • First Online:
Knowledge Science, Engineering and Management (KSEM 2021)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 12815))

Abstract

Bug localization, which aims to locate buggy files in the software project by leveraging bug reports, plays an important role in software quality control. Recently, many automatic bug localization methods based on historical bug-fix data (i.e., bug reports labeled with corresponding buggy code files) have been proposed. However, the lack of bug-fix data for software projects in the early stages of development limits the performance of most existing supervised learning methods. To address this issue, we propose a deep transfer bug localization model called TroBo, which can transfer shared knowledge from label-rich source project to the target project. Specifically, we accomplish the knowledge transfer on both the bug report and code file. For processing bug reports, which belong to informal text data, we design a soft attention-based module to alleviate the noise problem. For processing code files, we apply an adversarial strategy to learn the project-shared features, and additionally extract project-exclusive features for each project. Furthermore, a project-aware classifier is introduced in TroBo to avoid redundancy between shared and exclusive features. Extensive experiments on four large-scale real-world projects demonstrate that our model significantly outperforms the state-of-the-art techniques.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.eclipse.org/aspectj/.

  2. 2.

    https://www.eclipse.org/jdt/.

  3. 3.

    https://www.eclipse.org/swt/.

  4. 4.

    https://www.eclipse.org/eclipse/platform-ui/.

References

  1. Bahdanau, D., Cho, K., Bengio, Y.: Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 (2014)

  2. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: pre-training of deep bidirectional transformers for language understanding. In: NAACL HLT, pp. 4171–4186 (2019)

    Google Scholar 

  3. Edelman, A., Arias, T.A., Smith, S.T.: The geometry of algorithms with orthogonality constraints. SIAM J. Matrix Anal. Appl. 20(2), 303–353 (1998)

    Article  MathSciNet  Google Scholar 

  4. Feng, Z., et al.: Codebert: a pre-trained model for programming and natural languages. arXiv preprint arXiv:2002.08155 (2020)

  5. Ganin, Y., et al.: Domain-adversarial training of neural networks. J. Mach. Learn. Res. 17(1), 2030–2096 (2016)

    Google Scholar 

  6. Huo, X., Li, M.: Enhancing the unified features to locate buggy files by exploiting the sequential nature of source code. In: Proceedings of the 26th International Joint Conference on Artificial Intelligence (IJCAI), pp. 1909–1915 (2017)

    Google Scholar 

  7. Huo, X., Li, M., Zhou, Z.H.: Learning unified features from natural and programming languages for locating buggy source code. In: Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI), pp. 1606–1612 (2016)

    Google Scholar 

  8. Huo, X., Li, M., Zhou, Z.H.: Control flow graph embedding based on multi-instance decomposition for bug localization. In: AAAI, pp. 4223–4230 (2020)

    Google Scholar 

  9. Huo, X., Thung, F., Li, M., Lo, D., Shi, S.T.: Deep transfer bug localization. IEEE Trans. Softw. Eng. (2019)

    Google Scholar 

  10. Jia, Y., Salzmann, M., Darrell, T., et al.: Factorized latent spaces with structured sparsity. NIPS 10, 982–990 (2010)

    Google Scholar 

  11. Kim, Y.: Convolutional neural networks for sentence classification. In: Proceedings of Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1746–1751 (2014)

    Google Scholar 

  12. Kingma, D.P., Ba, J.: Adam: a method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014)

  13. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907 (2016)

  14. Lam, A.N., Nguyen, A.T., Nguyen, H.A., Nguyen, T.N.: Bug localization with combination of deep learning and information retrieval. In: Proceedings of the 25th International Conference on Program Comprehension (ICPC), pp. 218–229 (2017)

    Google Scholar 

  15. Pan, S.J., Tsang, I.W., Kwok, J.T., Yang, Q.: Domain adaptation via transfer component analysis. IEEE Trans. Neural Networks 22(2), 199–210 (2010)

    Article  Google Scholar 

  16. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014)

    MathSciNet  MATH  Google Scholar 

  17. Turhan, B., Menzies, T., Bener, A.B., Di Stefano, J.: On the relative value of cross-company and within-company data for defect prediction. Empirical Softw. Eng. 14(5), 540–578 (2009)

    Article  Google Scholar 

  18. Xiao, Y., Keung, J., Mi, Q., Bennin, K.E.: Improving bug localization with an enhanced convolutional neural network. In: 2017 24th Asia-Pacific Software Engineering Conference (APSEC), pp. 338–347. IEEE (2017)

    Google Scholar 

  19. Xiao, Y., Keung, J., Mi, Q., Bennin, K.E.: Bug localization with semantic and structural features using convolutional neural network and cascade forest. In: Proceedings of the 22nd International Conference on Evaluation and Assessment in Software Engineering 2018, pp. 101–111 (2018)

    Google Scholar 

  20. Zhang, J., Xie, R., Ye, W., Zhang, Y., Zhang, S.: Exploiting code knowledge graph for bug localization via bi-directional attention. In: Proceedings of the 28th International Conference on Program Comprehension, pp. 219–229 (2020)

    Google Scholar 

  21. Zhou, J., Zhang, H., Lo, D.: Where should the bugs be fixed?-more accurate information retrieval-based bug localization based on bug reports. In: Proceedings of the 34th International Conference on Software Engineering (ICSE), pp. 14–24 (2012)

    Google Scholar 

  22. Zhu, Z., Li, Y., Tong, H., Wang, Y.: Cooba: Cross-project bug localization via adversarial transfer learning. In: Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI, pp. 3565–3571 (2020)

    Google Scholar 

  23. Zhu, Z., Li, Y., Wang, Yu., Wang, Y., Tong, H.: A deep multimodal model for bug localization. Data Mining Knowl. Discov., 1–24 (2021). https://doi.org/10.1007/s10618-021-00755-7

Download references

Acknowledgements

This research was supported by State Key Lab. for Novel Software Technology (KFKT2020B21), and Postgraduate Research and Practice Innovation Program of Jiangsu Province (SJKY19_0763).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yun Li .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zhu, Z., Wang, Y., Li, Y. (2021). TroBo: A Novel Deep Transfer Model for Enhancing Cross-Project Bug Localization. In: Qiu, H., Zhang, C., Fei, Z., Qiu, M., Kung, SY. (eds) Knowledge Science, Engineering and Management. KSEM 2021. Lecture Notes in Computer Science(), vol 12815. Springer, Cham. https://doi.org/10.1007/978-3-030-82136-4_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-82136-4_43

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-82135-7

  • Online ISBN: 978-3-030-82136-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics