{"id":"https://openalex.org/W4408562727","doi":"https://doi.org/10.1145/3724117","title":"Bias Testing and Mitigation in LLM-based Code Generation","display_name":"Bias Testing and Mitigation in LLM-based Code Generation","publication_year":2025,"publication_date":"2025-03-18","ids":{"openalex":"https://openalex.org/W4408562727","doi":"https://doi.org/10.1145/3724117"},"language":"en","primary_location":{"id":"doi:10.1145/3724117","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3724117","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"type":"article","indexed_in":["crossref"],"open_access":{"is_oa":true,"oa_status":"hybrid","oa_url":"https://doi.org/10.1145/3724117","any_repository_has_fulltext":false},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5044590654","display_name":"Dong Huang","orcid":"https://orcid.org/0000-0002-4275-3006"},"institutions":[{"id":"https://openalex.org/I177725633","display_name":"Chinese University of Hong Kong","ror":"https://ror.org/00t33hh48","country_code":"HK","type":"education","lineage":["https://openalex.org/I177725633"]},{"id":"https://openalex.org/I889458895","display_name":"University of Hong Kong","ror":"https://ror.org/02zhqgq86","country_code":"HK","type":"education","lineage":["https://openalex.org/I889458895"]}],"countries":["HK"],"is_corresponding":true,"raw_author_name":"Dong Huang","raw_affiliation_strings":["The University of Hong Kong, Hong Kong, Hong Kong","The University of Hong Kong, China"],"raw_orcid":"https://orcid.org/0000-0002-4275-3006","affiliations":[{"raw_affiliation_string":"The University of Hong Kong, Hong Kong, Hong Kong","institution_ids":["https://openalex.org/I177725633","https://openalex.org/I889458895"]},{"raw_affiliation_string":"The University of Hong Kong, China","institution_ids":["https://openalex.org/I889458895"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5088708850","display_name":"Jie M. Zhang","orcid":"https://orcid.org/0000-0003-0481-7264"},"institutions":[{"id":"https://openalex.org/I183935753","display_name":"King's College London","ror":"https://ror.org/0220mzb33","country_code":"GB","type":"education","lineage":["https://openalex.org/I124357947","https://openalex.org/I183935753"]}],"countries":["GB"],"is_corresponding":false,"raw_author_name":"Jie M. Zhang","raw_affiliation_strings":["King\u2019s College London, London, United Kingdom of Great Britain and Northern Ireland","King\u2019s College London, London, UK"],"raw_orcid":"https://orcid.org/0000-0003-0481-7264","affiliations":[{"raw_affiliation_string":"King\u2019s College London, London, United Kingdom of Great Britain and Northern Ireland","institution_ids":["https://openalex.org/I183935753"]},{"raw_affiliation_string":"King\u2019s College London, London, UK","institution_ids":["https://openalex.org/I183935753"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5042338711","display_name":"Qingwen Bu","orcid":"https://orcid.org/0009-0001-0270-3004"},"institutions":[{"id":"https://openalex.org/I183067930","display_name":"Shanghai Jiao Tong University","ror":"https://ror.org/0220qvk04","country_code":"CN","type":"education","lineage":["https://openalex.org/I183067930"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Qingwen Bu","raw_affiliation_strings":["Shanghai Jiao Tong University, Shanghai, China","Shanghai Jiao Tong University, China"],"raw_orcid":"https://orcid.org/0009-0001-0270-3004","affiliations":[{"raw_affiliation_string":"Shanghai Jiao Tong University, Shanghai, China","institution_ids":["https://openalex.org/I183067930"]},{"raw_affiliation_string":"Shanghai Jiao Tong University, China","institution_ids":["https://openalex.org/I183067930"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5084396416","display_name":"Xiaofei Xie","orcid":"https://orcid.org/0000-0002-1288-6502"},"institutions":[{"id":"https://openalex.org/I79891267","display_name":"Singapore Management University","ror":"https://ror.org/050qmg959","country_code":"SG","type":"education","lineage":["https://openalex.org/I79891267"]}],"countries":["SG"],"is_corresponding":false,"raw_author_name":"Xiaofei Xie","raw_affiliation_strings":["School of Computing and Information Systems, Singapore Management University, Singapore, Singapore","Singapore Management University, Singapore"],"raw_orcid":"https://orcid.org/0000-0002-1288-6502","affiliations":[{"raw_affiliation_string":"School of Computing and Information Systems, Singapore Management University, Singapore, Singapore","institution_ids":["https://openalex.org/I79891267"]},{"raw_affiliation_string":"Singapore Management University, Singapore","institution_ids":["https://openalex.org/I79891267"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100365555","display_name":"Junjie Chen","orcid":"https://orcid.org/0000-0003-3056-9962"},"institutions":[{"id":"https://openalex.org/I162868743","display_name":"Tianjin University","ror":"https://ror.org/012tb2g32","country_code":"CN","type":"education","lineage":["https://openalex.org/I162868743"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Junjie Chen","raw_affiliation_strings":["College of Intelligence and Computing, Tianjin University, Tianjin, China","College of Intelligence and Computing, Tianjin University, China"],"raw_orcid":"https://orcid.org/0000-0003-3056-9962","affiliations":[{"raw_affiliation_string":"College of Intelligence and Computing, Tianjin University, Tianjin, China","institution_ids":["https://openalex.org/I162868743"]},{"raw_affiliation_string":"College of Intelligence and Computing, Tianjin University, China","institution_ids":["https://openalex.org/I162868743"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5015360935","display_name":"Heming Cui","orcid":"https://orcid.org/0000-0001-7746-440X"},"institutions":[{"id":"https://openalex.org/I177725633","display_name":"Chinese University of Hong Kong","ror":"https://ror.org/00t33hh48","country_code":"HK","type":"education","lineage":["https://openalex.org/I177725633"]},{"id":"https://openalex.org/I889458895","display_name":"University of Hong Kong","ror":"https://ror.org/02zhqgq86","country_code":"HK","type":"education","lineage":["https://openalex.org/I889458895"]}],"countries":["HK"],"is_corresponding":false,"raw_author_name":"Heming Cui","raw_affiliation_strings":["The University of Hong Kong, Hong Kong, Hong Kong","The University of Hong Kong, China"],"raw_orcid":"https://orcid.org/0000-0001-7746-440X","affiliations":[{"raw_affiliation_string":"The University of Hong Kong, Hong Kong, Hong Kong","institution_ids":["https://openalex.org/I177725633","https://openalex.org/I889458895"]},{"raw_affiliation_string":"The University of Hong Kong, China","institution_ids":["https://openalex.org/I889458895"]}]}],"institutions":[],"countries_distinct_count":4,"institutions_distinct_count":6,"corresponding_author_ids":["https://openalex.org/A5044590654"],"corresponding_institution_ids":["https://openalex.org/I177725633","https://openalex.org/I889458895"],"apc_list":null,"apc_paid":null,"fwci":31.7962,"has_fulltext":false,"cited_by_count":19,"citation_normalized_percentile":{"value":0.99719495,"is_in_top_1_percent":true,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":94,"max":100},"biblio":{"volume":"35","issue":"1","first_page":"1","last_page":"31"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10743","display_name":"Software Testing and Debugging Techniques","score":0.9998000264167786,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},"topics":[{"id":"https://openalex.org/T10743","display_name":"Software Testing and Debugging Techniques","score":0.9998000264167786,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T11689","display_name":"Adversarial Robustness in Machine Learning","score":0.993399977684021,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T12423","display_name":"Software Reliability and Analysis Research","score":0.9927999973297119,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}}],"keywords":[{"id":"https://openalex.org/keywords/computer-science","display_name":"Computer science","score":0.7847620248794556},{"id":"https://openalex.org/keywords/code","display_name":"Code (set theory)","score":0.43784743547439575},{"id":"https://openalex.org/keywords/reliability-engineering","display_name":"Reliability engineering","score":0.3309127986431122},{"id":"https://openalex.org/keywords/programming-language","display_name":"Programming language","score":0.2385978400707245}],"concepts":[{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.7847620248794556},{"id":"https://openalex.org/C2776760102","wikidata":"https://www.wikidata.org/wiki/Q5139990","display_name":"Code (set theory)","level":3,"score":0.43784743547439575},{"id":"https://openalex.org/C200601418","wikidata":"https://www.wikidata.org/wiki/Q2193887","display_name":"Reliability engineering","level":1,"score":0.3309127986431122},{"id":"https://openalex.org/C199360897","wikidata":"https://www.wikidata.org/wiki/Q9143","display_name":"Programming language","level":1,"score":0.2385978400707245},{"id":"https://openalex.org/C177264268","wikidata":"https://www.wikidata.org/wiki/Q1514741","display_name":"Set (abstract data type)","level":2,"score":0.0},{"id":"https://openalex.org/C127413603","wikidata":"https://www.wikidata.org/wiki/Q11023","display_name":"Engineering","level":0,"score":0.0}],"mesh":[],"locations_count":1,"locations":[{"id":"doi:10.1145/3724117","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3724117","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"}],"best_oa_location":{"id":"doi:10.1145/3724117","is_oa":true,"landing_page_url":"https://doi.org/10.1145/3724117","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"sustainable_development_goals":[],"awards":[{"id":"https://openalex.org/G1914323026","display_name":null,"funder_award_id":"2022ZD0160201","funder_id":"https://openalex.org/F4320335777","funder_display_name":"National Key Research and Development Program of China"}],"funders":[{"id":"https://openalex.org/F4320335777","display_name":"National Key Research and Development Program of China","ror":null}],"has_content":{"grobid_xml":false,"pdf":false},"content_urls":null,"referenced_works_count":134,"referenced_works":["https://openalex.org/W398859631","https://openalex.org/W1900084799","https://openalex.org/W2019382093","https://openalex.org/W2145861233","https://openalex.org/W2766939712","https://openalex.org/W2786122898","https://openalex.org/W2888424849","https://openalex.org/W2896146450","https://openalex.org/W2897978524","https://openalex.org/W2911282308","https://openalex.org/W2930957955","https://openalex.org/W2940954969","https://openalex.org/W2969896603","https://openalex.org/W2981852735","https://openalex.org/W3008088841","https://openalex.org/W3019416653","https://openalex.org/W3030163527","https://openalex.org/W3032152562","https://openalex.org/W3033638351","https://openalex.org/W3034658884","https://openalex.org/W3047533667","https://openalex.org/W3086007799","https://openalex.org/W3089307846","https://openalex.org/W3099401751","https://openalex.org/W3101118213","https://openalex.org/W3119507053","https://openalex.org/W3134616970","https://openalex.org/W3158363482","https://openalex.org/W3159298567","https://openalex.org/W3168901128","https://openalex.org/W3170092793","https://openalex.org/W3177468621","https://openalex.org/W3177813494","https://openalex.org/W3181414820","https://openalex.org/W3182079404","https://openalex.org/W3190248325","https://openalex.org/W3195140297","https://openalex.org/W3202598875","https://openalex.org/W4210673110","https://openalex.org/W4214835294","https://openalex.org/W4220659214","https://openalex.org/W4221143046","https://openalex.org/W4221154841","https://openalex.org/W4221161695","https://openalex.org/W4224060952","https://openalex.org/W4225323055","https://openalex.org/W4225534575","https://openalex.org/W4226059209","https://openalex.org/W4226287673","https://openalex.org/W4226485558","https://openalex.org/W4238623774","https://openalex.org/W4241857777","https://openalex.org/W4253763531","https://openalex.org/W4256361765","https://openalex.org/W4283066505","https://openalex.org/W4283166422","https://openalex.org/W4283702402","https://openalex.org/W4284676027","https://openalex.org/W4284687350","https://openalex.org/W4285600327","https://openalex.org/W4285605356","https://openalex.org/W4287024925","https://openalex.org/W4288058298","https://openalex.org/W4288089799","https://openalex.org/W4288096826","https://openalex.org/W4294335582","https://openalex.org/W4296415404","https://openalex.org/W4296568648","https://openalex.org/W4296959557","https://openalex.org/W4300874258","https://openalex.org/W4307474756","https://openalex.org/W4307479317","https://openalex.org/W4308641598","https://openalex.org/W4308643994","https://openalex.org/W4309804142","https://openalex.org/W4309955163","https://openalex.org/W4311248666","https://openalex.org/W4311638118","https://openalex.org/W4311639009","https://openalex.org/W4312090841","https://openalex.org/W4312091278","https://openalex.org/W4313547549","https://openalex.org/W4315706637","https://openalex.org/W4319453673","https://openalex.org/W4319736227","https://openalex.org/W4322717459","https://openalex.org/W4327989393","https://openalex.org/W4360834937","https://openalex.org/W4361866100","https://openalex.org/W4362656212","https://openalex.org/W4366204357","https://openalex.org/W4367860052","https://openalex.org/W4375859932","https://openalex.org/W4376167329","https://openalex.org/W4376652621","https://openalex.org/W4378465112","https://openalex.org/W4378474282","https://openalex.org/W4378474421","https://openalex.org/W4378770815","https://openalex.org/W4378942084","https://openalex.org/W4379548473","https://openalex.org/W4379958573","https://openalex.org/W4380559199","https://openalex.org/W4380993527","https://openalex.org/W4381946541","https://openalex.org/W4382490931","https://openalex.org/W4382618460","https://openalex.org/W4384304728","https://openalex.org/W4384304865","https://openalex.org/W4384918448","https://openalex.org/W4385570537","https://openalex.org/W4385570581","https://openalex.org/W4385571808","https://openalex.org/W4385573539","https://openalex.org/W4385643874","https://openalex.org/W4385681252","https://openalex.org/W4386044474","https://openalex.org/W4386185625","https://openalex.org/W4387157010","https://openalex.org/W4387561453","https://openalex.org/W4389519352","https://openalex.org/W4390092490","https://openalex.org/W4391590673","https://openalex.org/W4393610034","https://openalex.org/W4394769107","https://openalex.org/W4395474395","https://openalex.org/W4398191980","https://openalex.org/W4400484607","https://openalex.org/W4402671800","https://openalex.org/W4403570469","https://openalex.org/W4403746946","https://openalex.org/W6682631176","https://openalex.org/W6755440189","https://openalex.org/W6869660660"],"related_works":["https://openalex.org/W4391375266","https://openalex.org/W2899084033","https://openalex.org/W2748952813","https://openalex.org/W2390279801","https://openalex.org/W4391913857","https://openalex.org/W2358668433","https://openalex.org/W4396701345","https://openalex.org/W2376932109","https://openalex.org/W2001405890","https://openalex.org/W4396696052"],"abstract_inverted_index":{"As":[0],"the":[1,18,38,50,60,89,119,187],"adoption":[2],"of":[3,44,118,189],"LLMs":[4,98,124],"becomes":[5],"more":[6],"widespread":[7],"in":[8,59,91,142,175],"software":[9,45],"coding":[10],"ecosystems,":[11],"a":[12,65,193],"pressing":[13],"issue":[14,36],"has":[15,172],"emerged:":[16],"does":[17],"generated":[19,52,93,121],"code":[20,51,75,92,144,190],"contain":[21],"social":[22],"bias":[23,67,134],"and":[24,33,41,104,151,157],"unfairness,":[25],"such":[26],"as":[27],"those":[28],"related":[29],"to":[30,116,185,192,199],"age,":[31],"gender,":[32],"race?":[34],"This":[35,62],"concerns":[37],"integrity,":[39],"fairness,":[40],"ethical":[42],"foundation":[43],"applications":[46],"that":[47,70,109,138,166],"depend":[48],"on":[49,79,88],"by":[53,94,122],"these":[54,123],"models":[55],"but":[56,178],"are":[57,111,139],"underexplored":[58],"literature.":[61],"article":[63],"presents":[64],"novel":[66],"testing":[68],"framework":[69],"is":[71],"specifically":[72],"designed":[73],"for":[74,201],"generation":[76,145],"tasks.":[77],"Based":[78],"this":[80],"framework,":[81],"we":[82,131],"conduct":[83],"an":[84],"extensive":[85],"empirical":[86],"study":[87,132],"biases":[90,110,191],"five":[95,133],"widely":[96],"studied":[97],"(i.e.,":[99],"PALM-2-CodeChat-bison,":[100],"Claude-instant-1,":[101],"GPT-3.5-turbo,":[102],"GPT-4-turbo,":[103],"GPT-4).":[105,202],"Our":[106,162],"findings":[107],"reveal":[108],"prevalent.":[112],"For":[113],"example,":[114],"13.47%":[115],"49.10%":[117],"codes":[120],"have":[125],"biased":[126],"behaviors":[127],"towards":[128],"gender.":[129],"Moreover,":[130],"mitigation":[135],"prompt":[136,169],"strategies":[137,171],"commonly":[140],"used":[141],"current":[143],"scenarios,":[146],"i.e.,":[147],"zero-shot,":[148],"one-shot,":[149],"few-shot,":[150],"two":[152],"Chain-of-Thought":[153],"(CoT)":[154],"prompts,":[155],"with":[156],"without":[158],"provided":[159],"feedback-driven":[160],"refinement.":[161],"evaluation":[163],"results":[164],"illustrate":[165],"using":[167],"direct":[168],"engineering":[170],"limited":[173],"effectiveness":[174],"mitigating":[176],"bias,":[177],"our":[179],"test":[180],"execution":[181],"feedback":[182],"can":[183],"help":[184],"reduce":[186],"ratio":[188],"large":[194],"extent":[195],"(e.g.,":[196],"from":[197],"59.88%":[198],"4.79%":[200]},"counts_by_year":[{"year":2026,"cited_by_count":6},{"year":2025,"cited_by_count":11},{"year":2024,"cited_by_count":2}],"updated_date":"2026-05-21T06:26:12.895304","created_date":"2025-10-10T00:00:00"}
