{"id":"https://openalex.org/W4399453957","doi":"https://doi.org/10.1145/3643776","title":"Refactoring to Pythonic Idioms: A Hybrid Knowledge-Driven Approach Leveraging Large Language Models","display_name":"Refactoring to Pythonic Idioms: A Hybrid Knowledge-Driven Approach Leveraging Large Language Models","publication_year":2024,"publication_date":"2024-07-12","ids":{"openalex":"https://openalex.org/W4399453957","doi":"https://doi.org/10.1145/3643776"},"language":"en","primary_location":{"id":"doi:10.1145/3643776","is_oa":false,"landing_page_url":"https://doi.org/10.1145/3643776","pdf_url":null,"source":{"id":"https://openalex.org/S4404663975","display_name":"Proceedings of the ACM on software engineering.","issn_l":"2994-970X","issn":["2994-970X"],"is_oa":false,"is_in_doaj":false,"is_core":false,"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":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"Proceedings of the ACM on Software Engineering","raw_type":"journal-article"},"type":"article","indexed_in":["arxiv","crossref"],"open_access":{"is_oa":true,"oa_status":"green","oa_url":"https://arxiv.org/pdf/2406.03660","any_repository_has_fulltext":true},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5010196976","display_name":"Zejun Zhang","orcid":"https://orcid.org/0000-0002-1904-165X"},"institutions":[{"id":"https://openalex.org/I118347636","display_name":"Australian National University","ror":"https://ror.org/019wvm592","country_code":"AU","type":"education","lineage":["https://openalex.org/I118347636"]},{"id":"https://openalex.org/I1292875679","display_name":"Commonwealth Scientific and Industrial Research Organisation","ror":"https://ror.org/03qn8fb07","country_code":"AU","type":"government","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I4387156119"]},{"id":"https://openalex.org/I42894916","display_name":"Data61","ror":"https://ror.org/03q397159","country_code":"AU","type":"other","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I42894916","https://openalex.org/I4387156119"]}],"countries":["AU"],"is_corresponding":true,"raw_author_name":"Zejun Zhang","raw_affiliation_strings":["Australian National University, Canberra, Australia","CSIRO's Data61, Canberra, Australia","Australian National University, Canberra, Australia / CSIRO's Data61, Canberra, Australia"],"affiliations":[{"raw_affiliation_string":"Australian National University, Canberra, Australia","institution_ids":["https://openalex.org/I118347636"]},{"raw_affiliation_string":"CSIRO's Data61, Canberra, Australia","institution_ids":["https://openalex.org/I42894916","https://openalex.org/I1292875679"]},{"raw_affiliation_string":"Australian National University, Canberra, Australia / CSIRO's Data61, Canberra, Australia","institution_ids":["https://openalex.org/I118347636","https://openalex.org/I42894916"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5028641941","display_name":"Zhenchang Xing","orcid":"https://orcid.org/0000-0001-7663-1421"},"institutions":[{"id":"https://openalex.org/I118347636","display_name":"Australian National University","ror":"https://ror.org/019wvm592","country_code":"AU","type":"education","lineage":["https://openalex.org/I118347636"]},{"id":"https://openalex.org/I1292875679","display_name":"Commonwealth Scientific and Industrial Research Organisation","ror":"https://ror.org/03qn8fb07","country_code":"AU","type":"government","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I4387156119"]},{"id":"https://openalex.org/I42894916","display_name":"Data61","ror":"https://ror.org/03q397159","country_code":"AU","type":"other","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I42894916","https://openalex.org/I4387156119"]}],"countries":["AU"],"is_corresponding":false,"raw_author_name":"Zhenchang Xing","raw_affiliation_strings":["Australian National University, Canberra, Australia","CSIRO's Data61, Canberra, Australia","CSIRO's Data61, Canberra, Australia / Australian National University, Canberra, Australia"],"affiliations":[{"raw_affiliation_string":"Australian National University, Canberra, Australia","institution_ids":["https://openalex.org/I118347636"]},{"raw_affiliation_string":"CSIRO's Data61, Canberra, Australia","institution_ids":["https://openalex.org/I42894916","https://openalex.org/I1292875679"]},{"raw_affiliation_string":"CSIRO's Data61, Canberra, Australia / Australian National University, Canberra, Australia","institution_ids":["https://openalex.org/I42894916","https://openalex.org/I118347636"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5043600295","display_name":"Xiaoxue Ren","orcid":"https://orcid.org/0000-0002-5526-1617"},"institutions":[{"id":"https://openalex.org/I76130692","display_name":"Zhejiang University","ror":"https://ror.org/00a2xv884","country_code":"CN","type":"education","lineage":["https://openalex.org/I76130692"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Xiaoxue Ren","raw_affiliation_strings":["Zhejiang University, Hangzhou, China"],"affiliations":[{"raw_affiliation_string":"Zhejiang University, Hangzhou, China","institution_ids":["https://openalex.org/I76130692"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5100652461","display_name":"Qinghua Lu","orcid":"https://orcid.org/0000-0002-9466-1672"},"institutions":[{"id":"https://openalex.org/I1292875679","display_name":"Commonwealth Scientific and Industrial Research Organisation","ror":"https://ror.org/03qn8fb07","country_code":"AU","type":"government","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I4387156119"]},{"id":"https://openalex.org/I42894916","display_name":"Data61","ror":"https://ror.org/03q397159","country_code":"AU","type":"other","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I42894916","https://openalex.org/I4387156119"]}],"countries":["AU"],"is_corresponding":false,"raw_author_name":"Qinghua Lu","raw_affiliation_strings":["CSIRO's Data61, Sydney, Australia"],"affiliations":[{"raw_affiliation_string":"CSIRO's Data61, Sydney, Australia","institution_ids":["https://openalex.org/I42894916","https://openalex.org/I1292875679"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5006841485","display_name":"Xiwei Xu","orcid":"https://orcid.org/0000-0002-2273-1862"},"institutions":[{"id":"https://openalex.org/I1292875679","display_name":"Commonwealth Scientific and Industrial Research Organisation","ror":"https://ror.org/03qn8fb07","country_code":"AU","type":"government","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I4387156119"]},{"id":"https://openalex.org/I42894916","display_name":"Data61","ror":"https://ror.org/03q397159","country_code":"AU","type":"other","lineage":["https://openalex.org/I1292875679","https://openalex.org/I2801453606","https://openalex.org/I42894916","https://openalex.org/I4387156119"]}],"countries":["AU"],"is_corresponding":false,"raw_author_name":"Xiwei Xu","raw_affiliation_strings":["CSIRO's Data61, Sydney, Australia"],"affiliations":[{"raw_affiliation_string":"CSIRO's Data61, Sydney, Australia","institution_ids":["https://openalex.org/I42894916","https://openalex.org/I1292875679"]}]}],"institutions":[],"countries_distinct_count":2,"institutions_distinct_count":5,"corresponding_author_ids":["https://openalex.org/A5010196976"],"corresponding_institution_ids":["https://openalex.org/I118347636","https://openalex.org/I1292875679","https://openalex.org/I42894916"],"apc_list":null,"apc_paid":null,"fwci":3.5439,"has_fulltext":true,"cited_by_count":10,"citation_normalized_percentile":{"value":0.93432851,"is_in_top_1_percent":false,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":97,"max":99},"biblio":{"volume":"1","issue":"FSE","first_page":"1107","last_page":"1128"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10181","display_name":"Natural Language Processing Techniques","score":0.9997000098228455,"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"}},"topics":[{"id":"https://openalex.org/T10181","display_name":"Natural Language Processing Techniques","score":0.9997000098228455,"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/T10028","display_name":"Topic Modeling","score":0.9990000128746033,"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/T10260","display_name":"Software Engineering Research","score":0.9908999800682068,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"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/code-refactoring","display_name":"Code refactoring","score":0.8354290127754211},{"id":"https://openalex.org/keywords/computer-science","display_name":"Computer science","score":0.7131122946739197},{"id":"https://openalex.org/keywords/natural-language-processing","display_name":"Natural language processing","score":0.5176925659179688},{"id":"https://openalex.org/keywords/artificial-intelligence","display_name":"Artificial intelligence","score":0.4210207760334015},{"id":"https://openalex.org/keywords/programming-language","display_name":"Programming language","score":0.38187938928604126},{"id":"https://openalex.org/keywords/linguistics","display_name":"Linguistics","score":0.32153820991516113},{"id":"https://openalex.org/keywords/software","display_name":"Software","score":0.1309225857257843}],"concepts":[{"id":"https://openalex.org/C152752567","wikidata":"https://www.wikidata.org/wiki/Q116877","display_name":"Code refactoring","level":3,"score":0.8354290127754211},{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.7131122946739197},{"id":"https://openalex.org/C204321447","wikidata":"https://www.wikidata.org/wiki/Q30642","display_name":"Natural language processing","level":1,"score":0.5176925659179688},{"id":"https://openalex.org/C154945302","wikidata":"https://www.wikidata.org/wiki/Q11660","display_name":"Artificial intelligence","level":1,"score":0.4210207760334015},{"id":"https://openalex.org/C199360897","wikidata":"https://www.wikidata.org/wiki/Q9143","display_name":"Programming language","level":1,"score":0.38187938928604126},{"id":"https://openalex.org/C41895202","wikidata":"https://www.wikidata.org/wiki/Q8162","display_name":"Linguistics","level":1,"score":0.32153820991516113},{"id":"https://openalex.org/C2777904410","wikidata":"https://www.wikidata.org/wiki/Q7397","display_name":"Software","level":2,"score":0.1309225857257843},{"id":"https://openalex.org/C138885662","wikidata":"https://www.wikidata.org/wiki/Q5891","display_name":"Philosophy","level":0,"score":0.0}],"mesh":[],"locations_count":2,"locations":[{"id":"doi:10.1145/3643776","is_oa":false,"landing_page_url":"https://doi.org/10.1145/3643776","pdf_url":null,"source":{"id":"https://openalex.org/S4404663975","display_name":"Proceedings of the ACM on software engineering.","issn_l":"2994-970X","issn":["2994-970X"],"is_oa":false,"is_in_doaj":false,"is_core":false,"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":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"Proceedings of the ACM on Software Engineering","raw_type":"journal-article"},{"id":"pmh:oai:arXiv.org:2406.03660","is_oa":true,"landing_page_url":"http://arxiv.org/abs/2406.03660","pdf_url":"https://arxiv.org/pdf/2406.03660","source":{"id":"https://openalex.org/S4306400194","display_name":"arXiv (Cornell University)","issn_l":null,"issn":null,"is_oa":true,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/I205783295","host_organization_name":"Cornell University","host_organization_lineage":["https://openalex.org/I205783295"],"host_organization_lineage_names":[],"type":"repository"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"submittedVersion","is_accepted":false,"is_published":false,"raw_source_name":null,"raw_type":"text"}],"best_oa_location":{"id":"pmh:oai:arXiv.org:2406.03660","is_oa":true,"landing_page_url":"http://arxiv.org/abs/2406.03660","pdf_url":"https://arxiv.org/pdf/2406.03660","source":{"id":"https://openalex.org/S4306400194","display_name":"arXiv (Cornell University)","issn_l":null,"issn":null,"is_oa":true,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/I205783295","host_organization_name":"Cornell University","host_organization_lineage":["https://openalex.org/I205783295"],"host_organization_lineage_names":[],"type":"repository"},"license":"cc-by","license_id":"https://openalex.org/licenses/cc-by","version":"submittedVersion","is_accepted":false,"is_published":false,"raw_source_name":null,"raw_type":"text"},"sustainable_development_goals":[{"score":0.44999998807907104,"id":"https://metadata.un.org/sdg/16","display_name":"Peace, Justice and strong institutions"}],"awards":[],"funders":[],"has_content":{"pdf":true,"grobid_xml":false},"content_urls":{"pdf":"https://content.openalex.org/works/W4399453957.pdf"},"referenced_works_count":24,"referenced_works":["https://openalex.org/W2605547445","https://openalex.org/W2795027827","https://openalex.org/W2898514735","https://openalex.org/W2994647549","https://openalex.org/W3203321135","https://openalex.org/W3217531701","https://openalex.org/W4225108562","https://openalex.org/W4252386722","https://openalex.org/W4281250694","https://openalex.org/W4284676027","https://openalex.org/W4308641593","https://openalex.org/W4308641648","https://openalex.org/W4311887664","https://openalex.org/W4312927344","https://openalex.org/W4313563756","https://openalex.org/W4384009715","https://openalex.org/W4384304865","https://openalex.org/W4384345655","https://openalex.org/W4384345667","https://openalex.org/W4386005320","https://openalex.org/W4388483649","https://openalex.org/W4391558516","https://openalex.org/W4394769416","https://openalex.org/W4399557965"],"related_works":["https://openalex.org/W4313549863","https://openalex.org/W2395465245","https://openalex.org/W2072205733","https://openalex.org/W2101762871","https://openalex.org/W3176957927","https://openalex.org/W4296534969","https://openalex.org/W4312761314","https://openalex.org/W2476494490","https://openalex.org/W2096877983","https://openalex.org/W3204019825"],"abstract_inverted_index":{"Pythonic":[0,22,206,250],"idioms":[1,207],"are":[2,92],"highly":[3],"valued":[4],"and":[5,46,55,114,116,152,172,175,201,216,268],"widely":[6],"used":[7],"in":[8,208],"the":[9,51,143,150,161,180,188],"Python":[10,15,93,121,137],"programming":[11],"community.":[12],"However,":[13],"many":[14],"users":[16],"find":[17],"it":[18],"challenging":[19],"to":[20,33,73,76,87,99,119,146,167,170,183,223,233,246],"use":[21],"idioms.":[23,251],"Adopting":[24],"rule-based":[25],"approach":[26,29,63,211,253],"or":[27,230],"LLM-only":[28],"is":[30],"not":[31,69,159],"sufficient":[32],"overcome":[34],"three":[35,66,109],"persistent":[36],"challenges":[37],"of":[38,53,57,65,197,226,238],"code":[39,42,94,122,186],"idiomatization":[40],"including":[41,111],"miss,":[43],"wrong":[44,47],"detection":[45],"refactoring.":[48],"Motivated":[49],"by":[50,96],"determinism":[52],"rules":[54],"adaptability":[56],"LLMs,":[58],"we":[59,80,139,164,192,242],"propose":[60],"a":[61,105,194],"hybrid":[62],"consisting":[64],"modules.":[67],"We":[68,102],"only":[70],"write":[71],"prompts":[72,166],"instruct":[74,168],"LLMs":[75,98,118,169],"complete":[77],"tasks,":[78],"but":[79],"also":[81],"invoke":[82,140,177],"Analytic":[83],"Rule":[84],"Interfaces":[85],"(ARIs)":[86],"accomplish":[88],"tasks.":[89],"The":[90],"ARIs":[91,141,178],"generated":[95],"prompting":[97],"generate":[100,120],"code.":[101,190],"first":[103],"construct":[104],"knowledge":[106],"module":[107],"with":[108,259],"elements":[110],"ASTscenario,":[112,151],"ASTcomponent":[113,148,156],"Condition,":[115],"prompt":[117],"for":[123,129,134,235,264],"incorporation":[124],"into":[125,187],"an":[126],"ARI":[127,144,181],"library":[128,145,182],"subsequent":[130],"use.":[131],"After":[132],"that,":[133],"any":[135],"syntax-error-free":[136],"code,":[138,174],"from":[142,149,179],"extract":[147],"then":[153,176],"filter":[154],"out":[155],"that":[157],"does":[158],"meet":[160],"condition.":[162],"Finally,":[163],"design":[165],"abstract":[171],"idiomatize":[173],"rewrite":[184],"non-idiomatic":[185],"idiomatic":[189],"Next,":[191],"conduct":[193],"comprehensive":[195],"evaluation":[196,245],"our":[198,244],"approach,":[199],"RIdiom,":[200,224],"Prompt-LLM":[202],"on":[203],"nine":[204],"established":[205],"RIdiom.":[209],"Our":[210,252],"exhibits":[212],"superior":[213],"accuracy,":[214,265],"F1-score,":[215,266],"recall,":[217],"while":[218],"maintaining":[219],"precision":[220],"levels":[221],"comparable":[222],"all":[225],"which":[227],"consistently":[228,254,261],"exceed":[229],"come":[231],"close":[232],"90%":[234,263],"each":[236,239],"metric":[237],"idiom.":[240],"Lastly,":[241],"extend":[243],"encompass":[247],"four":[248],"new":[249],"outperforms":[255],"Prompt-LLM,":[256],"achieving":[257],"metrics":[258],"values":[260],"exceeding":[262],"precision,":[267],"recall.":[269]},"counts_by_year":[{"year":2026,"cited_by_count":1},{"year":2025,"cited_by_count":9}],"updated_date":"2026-03-20T23:20:44.827607","created_date":"2025-10-10T00:00:00"}
