Papers
Topics
Authors
Recent
Search
2000 character limit reached

CommitBench: A Benchmark for Commit Message Generation

Published 8 Mar 2024 in cs.CL and cs.SE | (2403.05188v1)

Abstract: Writing commit messages is a tedious daily task for many software developers, and often remains neglected. Automating this task has the potential to save time while ensuring that messages are informative. A high-quality dataset and an objective benchmark are vital preconditions for solid research and evaluation towards this goal. We show that existing datasets exhibit various problems, such as the quality of the commit selection, small sample sizes, duplicates, privacy issues, and missing licenses for redistribution. This can lead to unusable models and skewed evaluations, where inferior models achieve higher evaluation scores due to biases in the data. We compile a new large-scale dataset, CommitBench, adopting best practices for dataset creation. We sample commits from diverse projects with licenses that permit redistribution and apply our filtering and dataset enhancements to improve the quality of generated commit messages. We use CommitBench to compare existing models and show that other approaches are outperformed by a Transformer model pretrained on source code. We hope to accelerate future research by publishing the source code( https://github.com/Maxscha/commitbench ).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (49)
  1. W. Maalej and H.-J. Happel, “Can development work describe itself?” in 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010), May 2010, pp. 191–200.
  2. R. Dyer, H. A. Nguyen, H. Rajan, and T. N. Nguyen, “Boa: A language and infrastructure for analyzing ultra-large-scale software repositories,” in 2013 35th International Conference on Software Engineering (ICSE), May 2013, pp. 422–431.
  3. D. Gros, H. Sezhiyan, P. Devanbu, and Z. Yu, “Code to Comment Translation: Data, Metrics, Baselining & Evaluation,” arXiv:2010.01410 [cs], Oct. 2020.
  4. X. Hu, G. Li, X. Xia, D. Lo, and Z. Jin, “Deep code comment generation,” in Proceedings of the 26th Conference on Program Comprehension.   Gothenburg Sweden: ACM, May 2018, pp. 200–210.
  5. ——, “Deep code comment generation with hybrid lexical and syntactical information,” Empirical Software Engineering, vol. 25, no. 3, pp. 2179–2217, May 2020.
  6. S. Iyer, I. Konstas, A. Cheung, and L. Zettlemoyer, “Mapping Language to Code in Programmatic Context,” arXiv:1808.09588 [cs], Aug. 2018.
  7. L. Phan, H. Tran, D. Le, H. Nguyen, J. Anibal, A. Peltekian, and Y. Ye, “CoTexT: Multi-task Learning with Code-Text Transformer,” arXiv:2105.08645 [cs], Jun. 2021.
  8. S. Lu, D. Guo, S. Ren, J. Huang, A. Svyatkovskiy, A. Blanco, C. Clement, D. Drain, D. Jiang, D. Tang, G. Li, L. Zhou, L. Shou, L. Zhou, M. Tufano, M. Gong, M. Zhou, N. Duan, N. Sundaresan, S. K. Deng, S. Fu, and S. Liu, “CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation,” arXiv:2102.04664 [cs], Mar. 2021.
  9. Z. Liu, X. Xia, A. E. Hassan, D. Lo, Z. Xing, and X. Wang, “Neural-machine-translation-based commit message generation: How far are we?” in Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering.   Montpellier France: ACM, Sep. 2018, pp. 373–384.
  10. K. Etemadi and M. Monperrus, “On the Relevance of Cross-project Learning with Nearest Neighbours for Commit Message Generation,” Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops, pp. 470–475, Jun. 2020.
  11. Q. Liu, Z. Liu, H. Zhu, H. Fan, B. Du, and Y. Qian, “Generating Commit Messages from Diffs using Pointer-Generator Network,” in 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR).   Montreal, QC, Canada: IEEE, May 2019, pp. 299–309.
  12. S. Xu, Y. Yao, F. Xu, T. Gu, H. Tong, and J. Lu, “Commit Message Generation for Source Code Changes,” in Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence.   Macao, China: International Joint Conferences on Artificial Intelligence Organization, Aug. 2019, pp. 3975–3981.
  13. L. Y. Nie, C. Gao, Z. Zhong, W. Lam, Y. Liu, and Z. Xu, “CoreGen: Contextualized Code Representation Learning for Commit Message Generation,” arXiv:2007.06934 [cs], Feb. 2021.
  14. S. Liu, C. Gao, S. Chen, L. Y. Nie, and Y. Liu, “ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Ranking,” arXiv:1912.02972 [cs], Nov. 2020.
  15. Y. Tian, Y. Zhang, K.-J. Stol, L. Jiang, and H. Liu, “What makes a good commit message?” in Proceedings of the 44th International Conference on Software Engineering.   Pittsburgh Pennsylvania: ACM, May 2022, pp. 2389–2401.
  16. S. Jiang, A. Armaly, and C. McMillan, “Automatically Generating Commit Messages from Diffs using Neural Machine Translation,” arXiv:1708.09492 [cs], Aug. 2017.
  17. S. Jiang and C. McMillan, “Towards Automatic Generation of Short Summaries of Commits,” arXiv:1703.09603 [cs], Mar. 2017.
  18. M. Pravilov, E. Bogomolov, Y. Golubev, and T. Bryksin, “Unsupervised learning of general-purpose embeddings for code changes,” in Proceedings of the 5th International Workshop on Machine Learning Techniques for Software Quality Evolution, ser. MaLTESQuE 2021.   New York, NY, USA: Association for Computing Machinery, Aug. 2021, pp. 7–12.
  19. A. Elnaggar, W. Ding, L. Jones, T. Gibbs, T. Feher, C. Angerer, S. Severini, F. Matthes, and B. Rost, “CodeTrans: Towards Cracking the Language of Silicone’s Code Through Self-Supervised Deep Learning and High Performance Computing,” arXiv:2104.02443 [cs], Apr. 2021.
  20. C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena, Y. Zhou, W. Li, and P. J. Liu, “Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer,” arXiv:1910.10683 [cs, stat], Jul. 2020.
  21. T.-H. Jung, “CommitBERT: Commit Message Generation Using Pre-Trained Programming Language Model,” arXiv:2105.14242 [cs], May 2021.
  22. Z. Feng, D. Guo, D. Tang, N. Duan, X. Feng, M. Gong, L. Shou, B. Qin, T. Liu, D. Jiang, and M. Zhou, “CodeBERT: A Pre-Trained Model for Programming and Natural Languages,” arXiv:2002.08155 [cs], Sep. 2020.
  23. H. Husain, H.-H. Wu, T. Gazit, M. Allamanis, and M. Brockschmidt, “CodeSearchNet Challenge: Evaluating the State of Semantic Code Search,” arXiv:1909.09436 [cs, stat], Jun. 2020.
  24. J. Dong, Y. Lou, Q. Zhu, Z. Sun, Z. Li, W. Zhang, and D. Hao, “FIRA: Fine-grained graph-based code change representation for automated commit message generation,” in Proceedings of the 44th International Conference on Software Engineering, ser. ICSE ’22.   New York, NY, USA: Association for Computing Machinery, May 2022, pp. 970–981.
  25. P. Loyola, E. Marrese-Taylor, and Y. Matsuo, “A Neural Architecture for Generating Natural Language Descriptions from Source Code Changes,” Apr. 2017.
  26. W. Tao, Y. Wang, E. Shi, L. Du, S. Han, H. Zhang, D. Zhang, and W. Zhang, “On the Evaluation of Commit Message Generation Models: An Experimental Study,” arXiv:2107.05373 [cs], Jul. 2021.
  27. A. Eliseeva, Y. Sokolov, E. Bogomolov, Y. Golubev, D. Dig, and T. Bryksin, “From Commit Message Generation to History-Aware Commit Message Completion,” in 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE).   Luxembourg, Luxembourg: IEEE, Sep. 2023, pp. 723–735.
  28. N. Muennighoff, Q. Liu, A. Zebaze, Q. Zheng, B. Hui, T. Y. Zhuo, S. Singh, X. Tang, L. von Werra, and S. Longpre, “OctoPack: Instruction Tuning Code Large Language Models,” Aug. 2023.
  29. F. Mireshghallah, F. Tramèr, H. Brown, K. Lee, and R. Shokri, “What does it mean for a language model to preserve privacy?” in FaCCT, 2022.
  30. Getty Images, “Getty Images statement,” https://newsroom.gettyimages.com/en/getty-images/getty-images-statement, Jan. 2023, accessed: 2023-05-22.
  31. M. Butterick, “Github copilot litigation,” https://githubcopilotlitigation.com/, Nov. 2022, accessed: 2023-05-22.
  32. J. A. Rothchild and D. Rothchild, “Copyright implications of the use of code repos- itories to train a machine learning model,” Call for white papers on philosophical and legal questions around Copilot, Feb. 2022. [Online]. Available: https://www.fsf.org/licensing/copilot/copyright-implications-of-the-use-of-code-repositories-to-train-a-machine-learning-model
  33. A. Hern and D. Milmo, ““I didn’t give permission”: Do AI’s backers care about data law breaches?” https://www.theguardian.com/technology/2023/apr/10/i-didnt-give-permission-do-ais-backers-care-about-data-law-breaches, Apr. 2023, accessed: 2023-05-22.
  34. S. Mukherjee, Y. C. Foo, and M. Coulter, “Eu proposes new copyright rules for generative ai,” https://www.reuters.com/technology/eu-lawmakers-committee-reaches-deal-artificial-intelligence-act-2023-04-27/, Apr. 2023, accessed: 2023-05-22.
  35. The Italian Data Protection Authority, “Artificial Intelligence: stop to ChatGPT by the Italian SA. Personal data is collected unlawfully, no age verification system is in place for children,” https://www.garanteprivacy.it/home/docweb/-/docweb-display/docweb/9870847, Mar. 2023, accessed: 2023-05-22.
  36. T. Gebru, J. Morgenstern, B. Vecchione, J. W. Vaughan, H. M. Wallach, H. D. III, and K. Crawford, “Datasheets for datasets,” CoRR, vol. abs/1803.09010, 2018. [Online]. Available: http://arxiv.org/abs/1803.09010
  37. E. M. Bender and B. Friedman, “Data statements for natural language processing: Toward mitigating system bias and enabling better science,” Transactions of the Association for Computational Linguistics, vol. 6, pp. 587–604, 2018. [Online]. Available: https://aclanthology.org/Q18-1041
  38. J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” arXiv:1810.04805 [cs], May 2019.
  39. A. Joulin, E. Grave, P. Bojanowski, and T. Mikolov, “Bag of tricks for efficient text classification,” arXiv preprint arXiv:1607.01759, 2016.
  40. A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, and T. Mikolov, “FastText.zip: Compressing text classification models,” arXiv preprint arXiv:1612.03651, 2016.
  41. M. Allamanis, “The adverse effects of code duplication in machine learning models of code,” in Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software.   Athens Greece: ACM, Oct. 2019, pp. 143–153.
  42. A. Akbik, T. Bergmann, D. Blythe, K. Rasul, S. Schweter, and R. Vollgraf, “FLAIR: An easy-to-use framework for state-of-the-art NLP,” in NAACL 2019, 2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), 2019, pp. 54–59.
  43. K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, “BLEU: A method for automatic evaluation of machine translation,” in Proceedings of the 40th Annual Meeting on Association for Computational Linguistics - ACL ’02.   Philadelphia, Pennsylvania: Association for Computational Linguistics, 2001, p. 311.
  44. C.-Y. Lin, “Rouge: A package for automatic evaluation of summaries,” in Text Summarization Branches Out, 2004, pp. 74–81.
  45. M. Denkowski and A. Lavie, “Meteor Universal: Language Specific Translation Evaluation for Any Target Language,” in Proceedings of the Ninth Workshop on Statistical Machine Translation.   Baltimore, Maryland, USA: Association for Computational Linguistics, 2014, pp. 376–380.
  46. B. Wang, M. Yan, Z. Liu, L. Xu, X. Xia, X. Zhang, and D. Yang, “Quality Assurance for Automated Commit Message Generation,” in 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), Mar. 2021, pp. 260–271.
  47. M. Post, “A Call for Clarity in Reporting BLEU Scores,” in Proceedings of the Third Conference on Machine Translation: Research Papers.   Belgium, Brussels: Association for Computational Linguistics, Oct. 2018, pp. 186–191.
  48. S. Banerjee and A. Lavie, “METEOR: An automatic metric for MT evaluation with improved correlation with human judgments,” in Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization.   Ann Arbor, Michigan: Association for Computational Linguistics, Jun. 2005, pp. 65–72.
  49. Y. Zhu, S. Lu, L. Zheng, J. Guo, W. Zhang, J. Wang, and Y. Yu, “Texygen: A benchmarking platform for text generation models,” in The 41st International ACM SIGIR Conference on Research; Development in Information Retrieval, ser. SIGIR ’18.   New York, NY, USA: Association for Computing Machinery, 2018, p. 1097–1100. [Online]. Available: https://doi.org/10.1145/3209978.3210080
Citations (2)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.