Abstract
Public Code Review (PCR) can be implemented through a Software Question Answering (SQA) community, which facilitates high knowledge dissemination. Current methods mainly focus on the reviewer’s perspective, including finding a capable reviewer, predicting comment quality, and recommending/generating review comments. Our intuition is that satisfying review necessity requests can increase their visibility, which in turn is a prerequisite for better review responses. To this end, we propose a unified framework called UniPCR to complete developer-based request quality assurance (i.e., predicting request necessity and recommending tags subtask) under a Masked Language Model (MLM). Specifically, we reformulate both subtasks via 1) text prompt tuning, which converts two subtasks into MLM by constructing prompt templates using hard prompt; 2) code prefix tuning, which optimizes a small segment of generated continuous vectors as the prefix of the code representation using soft prompt. Experimental results on the Public Code Review dataset for the time span 2011-2023 demonstrate that our UniPCR framework adapts to the two subtasks and outperforms comparable accuracy-based results with state-of-the-art methods for request quality assurance. These conclusions highlight the effectiveness of our unified framework from the developer’s perspective in public code review.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Bacchelli, A., Bird, C.: Expectations, outcomes, and challenges of modern code review. In: ICSE. pp. 712–721 (2013)
Baum, T., Schneider, K., Bacchelli, A.: On the optimal order of reading source code changes for review. In: ICSME. pp. 329–340 (2017)
Bosu, A., Carver, J.C.: Impact of peer code review on peer impression formation: A survey. In: ESEM. pp. 133–142 (2013)
Bowen Xu, Thong Hoang, A.S., et al.: Post2vec: Learning distributed representations of stack overflow posts. IEEE Trans. Softw. Eng. 48(9), 3423–3441 (2022)
Can Li, Ling Xu, M.Y., et al.: Tagdc: A tag recommendation method for software information sites with a combination of deep learning and collaborative filtering. Journal of Systems and Software 170, 110783 (2020)
Chen, X., Li, L., Zhang, R., Liang, P.: Dataset of the paper: On unified prompt tuning for request quality assurance in public code review (2024), https://archive.org/download/stackexchange/codereview.stackexchange.com.7z
Colin Raffel, Noam Shazeer, A.R., et al.: Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 21(140), 1–67 (2020)
Daya Guo, Shuo Ren, S.L., et al.: Graphcodebert: Pre-training code representations with data flow. In: ICLR. pp. 1–18 (2021)
Jacob Devlin, Ming-Wei Chang, K.L., et al.: BERT: pre-training of deep bidirectional transformers for language understanding. In: NAACL-HLT. pp. 4171–4186 (2019)
Joe Davison, Joshua Feldman, A.M.R.: Commonsense knowledge mining from pretrained models. In: EMNLP-IJCNLP. pp. 1173–1178 (2019)
Junda He, Bowen Xu, Z.Y., et al.: Ptm4tag: sharpening tag recommendation of stack overflow posts with pre-trained models. In: ICPC. pp. 1–11 (2022)
Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. In: ICLR. pp. 1–15 (2015)
Laura MacLeod, Michaela Greiler, M.D.S., et al.: Code reviewing in the trenches: Challenges and best practices. IEEE Softw. 35(4), 34–42 (2018)
Lawrence Chen, Rui Abreu, T.A., et al.: Leveraging test plan quality to improve code review efficacy. In: ESEC/FSE. pp. 1320–1330 (2022)
Li, R., Liang, P., Avgeriou, P.: Code reviewer recommendation for architecture violations: An exploratory study. In: EASE. pp. 42–51 (2023)
Lin Li, Peipei Wang, X.Z., et al.: Dual-interactive fusion for code-mixed deep representation learning in tag recommendation. Inf. Fusion 99, 101862 (2023)
Liqiang Nie, Yongqi Li, F.F., et al.: Large-scale question tagging via joint question-topic embedding learning. ACM Trans. Inf. Syst. 38(2), 20:1–20:23 (2020)
Liu, D., Li, L., Tao, X., et al.: Descriptive prompt paraphrasing for target-oriented multimodal sentiment classification. In: EMNLP. pp. 4174–4186 (2023)
Lu, J., Yu, L., Li, X., Yang, L., Zuo, C.: Llama-reviewer: Advancing code review automation with large language models through parameter-efficient fine-tuning. In: ISSRE. pp. 647–658 (2023)
Lüddecke, T., Ecker, A.S.: Image segmentation using text and image prompts. In: CVPR. pp. 7076–7086 (2022)
Maria Tsimpoukelli, Jacob Menick, S.C., et al.: Multimodal few-shot learning with frozen language models. In: NeurIPS. pp. 200–212 (2021)
Miltiadis Allamanis, Marc Brockschmidt, M.K.: Learning to represent programs with graphs. In: ICLR. pp. 1–17 (2018)
Miroslaw Ochodek, Miroslaw Staron, W.M., et al.: Automated code review comment classification to improve modern code reviews. In: SWQD. pp. 23–40 (2022)
Nasir U. Eisty, J.C.C.: Developers perception of peer code review in research software development. Empir. Softw. Eng. 27(1), Article No. 13 (2022)
Pengfei Liu, Weizhe Yuan, J.F., et al.: Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv. 55(9), 195:1–195:35 (2023)
Pingyi Zhou, Jin Liu, Z.Y., et al.: Scalable tag recommendation for software information sites. In: SANER. pp. 272–282 (2017)
Prahar Pandya, S.T.: CORMS: a github and gerrit based hybrid code reviewer recommendation approach for modern code review. In: ESEC/FSE. pp. 546–557 (2022)
Qiuyuan Chen, Dezhen Kong, L.B., et al.: Code reviewer recommendation in tencent: Practice, challenge, and direction. In: ICSE (SEIP). pp. 115–124 (2022)
Rahman, M.M., Roy, C.K., Kula, R.G.: Predicting usefulness of code review comments using textual features and developer experience. In: MSR. pp. 215–226 (2017)
Shan, Q., Sukhdeo, D., Huang, Q., Rogers, S., Chen, L., Paradis, E., Rigby, P.C., Nagappan, N.: Using nudges to accelerate code reviews at scale. In: ESEC/FSE. pp. 472–482 (2022)
Tianyi Zhang, Tao Yu, T.H., et al.: Coder reviewer reranking for code generation. In: ICML. pp. 41832–41846 (2023)
Tianyu Gao, Adam Fisch, D.C.: Making pre-trained language models better few-shot learners. In: ACL/IJCNLP. pp. 3816–3830 (2021)
Timo Schick, H.S.: It’s not just size that matters: Small language models are also few-shot learners. In: NAACL-HLT. pp. 2339–2352 (2021)
Tom B. Brown, Benjamin Mann, N.R., et al.: Language models are few-shot learners. In: NeurIPS. pp. 1–25 (2020)
Vincent J. Hellendoorn, Charles Sutton, R.S., et al.: Global relational models of source code. In: ICLR. pp. 1–12 (2020)
Wei Fu, T.M.: Easy over hard: a case study on deep learning. In: ESEC/FSE. pp. 49–60 (2017)
Xiang Lisa Li, P.L.: Prefix-tuning: Optimizing continuous prompts for generation. In: ACL/IJCNLP. pp. 4582–4597 (2021)
Xiao Liu, Kaixuan Ji, Y.F., et al.: P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. CoRR abs/2110.07602 (2022)
Xu Han, Weilin Zhao, N.D., et al.: PTR: prompt tuning with rules for text classification. AI Open 3, 182–192 (2022)
Xu Han, Tianyu Gao, Y.Y., et al.: Opennre: An open and extensible toolkit for neural relation extraction. In: EMNLP-IJCNLP. pp. 169–174 (2019)
Yang Hong, Chakkrit Tantithamthavorn, P.T., et al.: Commentfinder: a simpler, faster, more accurate code review comments recommendation. In: ESEC/FSE. pp. 507–519 (2022)
Yi Sun, Yu Zheng, C.H., et al.: NSP-BERT: A prompt-based few-shot learner through an original pre-training task - - next sentence prediction. In: COLING. pp. 3233–3250 (2022)
Yinhan Liu, Myle Ott, N.G., et al.: Roberta: A robustly optimized BERT pretraining approach. CoRR abs/1907.11692 (2019)
Zhenzhong Lan, Mingda Chen, S.G., et al.: ALBERT: A lite BERT for self-supervised learning of language representations. In: ICLR. pp. 1–17 (2020)
Acknowledgements
The research is supported by National Natural Science Foundation of China: No. 62276196, 52031009 and 62172311, and the Guangxi Science and Technology Major Program (Guangxi New Energy Vehicle Laboratory Special Project: AA23062066).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Chen, X., Li, L., Zhang, R., Liang, P. (2024). On Unified Prompt Tuning for Request Quality Assurance in Public Code Review. In: Onizuka, M., et al. Database Systems for Advanced Applications. DASFAA 2024. Lecture Notes in Computer Science, vol 14854. Springer, Singapore. https://doi.org/10.1007/978-981-97-5569-1_12
Download citation
DOI: https://doi.org/10.1007/978-981-97-5569-1_12
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-5568-4
Online ISBN: 978-981-97-5569-1
eBook Packages: Computer ScienceComputer Science (R0)