Towards Better Answers: Automated Stack Overflow Post Updating

Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy c...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings / International Conference on Software Engineering pp. 591 - 603
Main Authors: Mai, Yubo, Gao, Zhipeng, Wang, Haoye, Bi, Tingting, Hu, Xing, Xia, Xin, Sun, Jianling
Format: Conference Proceeding
Language:English
Published: IEEE 26.04.2025
Subjects:
ISSN:1558-1225
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy code into software projects. SO comments often point out weaknesses of a post and provide valuable insights to improve the quality of answers, while SO comments are usually missed and/or ignored, leaving these problematic code snippets untouched. In this work, we first investigate the task of automatic SO posts updating based on their associated comments. We introduce a novel framework, named SOUP (Stack Overflow Updator for Post) for this task. SOUP addresses two key tasks: Valid Comment-Edit Prediction (VCP) and Automatic Post Updating (APU). We fine-tuned a large language model, CodeLlama, using low-rank adaptation techniques to complete the VCP task, and constructed a dataset containing 78k valid comment-edit pairs for the APU task. Subsequently, we tested the performance of multiple large language models on the APU task. Extensive experimental results show the promising performance of our model over a set of benchmarks. Moreover, we also perform an in-the-wild evaluation on Stack Overflow, we submitted 50 edits generated by our approach to Stack Overflow posts and 21 of them have been verified and accepted by SO maintainers, further proving the practical value of SOUP.
AbstractList Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy code into software projects. SO comments often point out weaknesses of a post and provide valuable insights to improve the quality of answers, while SO comments are usually missed and/or ignored, leaving these problematic code snippets untouched. In this work, we first investigate the task of automatic SO posts updating based on their associated comments. We introduce a novel framework, named SOUP (Stack Overflow Updator for Post) for this task. SOUP addresses two key tasks: Valid Comment-Edit Prediction (VCP) and Automatic Post Updating (APU). We fine-tuned a large language model, CodeLlama, using low-rank adaptation techniques to complete the VCP task, and constructed a dataset containing 78k valid comment-edit pairs for the APU task. Subsequently, we tested the performance of multiple large language models on the APU task. Extensive experimental results show the promising performance of our model over a set of benchmarks. Moreover, we also perform an in-the-wild evaluation on Stack Overflow, we submitted 50 edits generated by our approach to Stack Overflow posts and 21 of them have been verified and accepted by SO maintainers, further proving the practical value of SOUP.
Author Gao, Zhipeng
Wang, Haoye
Hu, Xing
Bi, Tingting
Mai, Yubo
Sun, Jianling
Xia, Xin
Author_xml – sequence: 1
  givenname: Yubo
  surname: Mai
  fullname: Mai, Yubo
  email: 12021077@zju.edu.cn
  organization: Zhejiang University,Hangzhou,China
– sequence: 2
  givenname: Zhipeng
  surname: Gao
  fullname: Gao, Zhipeng
  email: zhipeng.gao@zju.edu.cn
  organization: Shanghai Institute for Advanced Study of Zhejiang University,Shanghai,China
– sequence: 3
  givenname: Haoye
  surname: Wang
  fullname: Wang, Haoye
  email: wanghaoye@hzcu.edu.cn
  organization: Hangzhou City University,Hangzhou,China
– sequence: 4
  givenname: Tingting
  surname: Bi
  fullname: Bi, Tingting
  email: tingting.bi@uwa.edu.au
  organization: The University of Western Australia,Perth,Australia
– sequence: 5
  givenname: Xing
  surname: Hu
  fullname: Hu, Xing
  email: xinghu@zju.edu.cn
  organization: Zhejiang University,Hangzhou,China
– sequence: 6
  givenname: Xin
  surname: Xia
  fullname: Xia, Xin
  email: xin.xia@acm.org
  organization: Zhejiang University,Hangzhou,China
– sequence: 7
  givenname: Jianling
  surname: Sun
  fullname: Sun, Jianling
  email: sunjl@zju.edu.cn
  organization: Zhejiang University,Hangzhou,China
BookMark eNotkM1Kw0AURkdRsK19gy7mBRLnN8m4EGKoWihUaLsuN5k7Em2TMjMa-vYGdPVtDofDNyU3Xd8hIQvOUs6ZeVhV26XWUuWpYEKnjDGhrsjc5KaQkmumM8OvyYRrXSRcCH1HpiF8jlimjJmQp10_gLeBPmOM6GnZhQF9eKTld-xPENHSbYTmi25-0LtjP9D3PkS6P1uIbfdxT24dHAPO_3dG9i_LXfWWrDevq6pcJyAyFhPdAIDlTjWisdI5xmpmsxwNGsFrJVSOY3wDHDVoheAyVSMKB1IyxRWXM7L487aIeDj79gT-chgPEKbIhfwFFUdLxA
CODEN IEEPAD
ContentType Conference Proceeding
DBID 6IE
6IH
CBEJK
RIE
RIO
DOI 10.1109/ICSE55347.2025.00024
DatabaseName IEEE Electronic Library (IEL) Conference Proceedings
IEEE Proceedings Order Plan (POP) 1998-present by volume
IEEE Xplore All Conference Proceedings
IEEE Electronic Library (IEL)
IEEE Proceedings Order Plans (POP) 1998-present
DatabaseTitleList
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE Electronic Library (IEL)
  url: https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISBN 9798331505691
EISSN 1558-1225
EndPage 603
ExternalDocumentID 11029872
Genre orig-research
GroupedDBID -~X
.4S
.DC
29O
5VS
6IE
6IF
6IH
6IK
6IL
6IM
6IN
8US
AAJGR
AAWTH
ABLEC
ADZIZ
ALMA_UNASSIGNED_HOLDINGS
ARCSS
AVWKF
BEFXN
BFFAM
BGNUA
BKEBE
BPEOZ
CBEJK
CHZPO
EDO
FEDTE
I-F
IEGSK
IJVOP
IPLJI
M43
OCL
RIE
RIL
RIO
ID FETCH-LOGICAL-a260t-5caaad1f4c2cd3ff00b0d67e9e921b4247e025ca1e5a54eaf64bee2fa33041413
IEDL.DBID RIE
ISICitedReferencesCount 0
ISICitedReferencesURI http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001538318100046&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
IngestDate Wed Aug 27 01:40:27 EDT 2025
IsPeerReviewed false
IsScholarly true
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a260t-5caaad1f4c2cd3ff00b0d67e9e921b4247e025ca1e5a54eaf64bee2fa33041413
PageCount 13
ParticipantIDs ieee_primary_11029872
PublicationCentury 2000
PublicationDate 2025-April-26
PublicationDateYYYYMMDD 2025-04-26
PublicationDate_xml – month: 04
  year: 2025
  text: 2025-April-26
  day: 26
PublicationDecade 2020
PublicationTitle Proceedings / International Conference on Software Engineering
PublicationTitleAbbrev ICSE
PublicationYear 2025
Publisher IEEE
Publisher_xml – name: IEEE
SSID ssj0006499
Score 2.2899
Snippet Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable...
SourceID ieee
SourceType Publisher
StartPage 591
SubjectTerms Benchmark testing
Codes
Data integrity
Data Quality
Knowledge engineering
Large language models
Post Updating
Problem-solving
Reliability engineering
Software
Software engineering
Software reliability
Stack Overflow
Title Towards Better Answers: Automated Stack Overflow Post Updating
URI https://ieeexplore.ieee.org/document/11029872
WOSCitedRecordID wos001538318100046&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV29TwMhFCfaODjVjxq_w-B69g44OBxMatNGl9rENunWcPAwRnPX9K767wv0Wl0c3AgL4T3gff74IXRjtHG6tcJpwN0mRjMbyYzyKLfCcG5TEisVyCbEaJTNZnLcgNUDFgYAQvMZ3PphqOWbUq98qqzrTBVxMbJ7cXeF4Guw1vbZ5c53b7BxSSy7T_2XQZpSJlwMSHzeJPag9l8MKsGADNv_XPoAdX6geHi8NTKHaAeKI9TecDHg5moeo_tJ6H-t8EPA5-BeUXn6szvcW9Wl80rBYOdX6nf87M6u_Si_sKfpxdOFhzcUrx00HQ4m_ceo4UaIlItA6ijVSimTWKaJNtTaOM5jwwVIkCTJGWEC3La1SiBVKQNlOcsBiFU-f5E4y3WCWkVZwCnCOWE0p4aSzAITOZWMCOAm1VLHhho4Qx0vj_li_f3FfCOK8z_mL9C-F7kvuRB-iVr1cgVXaE9_1m_V8joo7RucIJjQ
linkProvider IEEE
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV3NT8IwFG8MmugJPzB-24PXydZ27ebBBAkGIiKJkHAjXftqjGYjMPTft60DvXjw1vTS9L227_PXH0JXWmmrWyOsBuxtYjQxQZpQHmRGaM5NTEIpPdmEGAySySQdVmB1j4UBAN98Btdu6Gv5ulBLlyprWlNFbIxsX9xNR51VwbXWDy-33nuFjovCtNlrP3fimDJho0DiMiehg7X_4lDxJuS-_s_Fd1HjB4yHh2szs4c2IN9H9RUbA64u5wG6HfkO2AW-8wgd3MoXjgDtBreWZWH9UtDYepbqDT_Z02vei0_siHrxeOYADvlLA43vO6N2N6jYEQJpY5AyiJWUUkeGKaI0NSYMs1BzASmkJMoYYQLstpWMIJYxA2k4ywCIkS6DEVnpHaJaXuRwhHBGGM2opiQxwERGU0YEcB2rVIWaajhGDSeP6ez7A4zpShQnf8xfou3u6LE_7fcGD6dox4nfFWAIP0O1cr6Ec7SlPsrXxfzCK_ALwpKcGQ
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=proceeding&rft.title=Proceedings+%2F+International+Conference+on+Software+Engineering&rft.atitle=Towards+Better+Answers%3A+Automated+Stack+Overflow+Post+Updating&rft.au=Mai%2C+Yubo&rft.au=Gao%2C+Zhipeng&rft.au=Wang%2C+Haoye&rft.au=Bi%2C+Tingting&rft.date=2025-04-26&rft.pub=IEEE&rft.eissn=1558-1225&rft.spage=591&rft.epage=603&rft_id=info:doi/10.1109%2FICSE55347.2025.00024&rft.externalDocID=11029872