NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

APPS · Code Refactoring

64 papers · 172 extracted observations · code

Showing 1 of 1 matching observations.

YearMethodMetricScoreProtocol / FacetsPaper & EvidenceReading list
2026Six evaluated LLMs (combined) baselineNon-equivalent refactorings under Eq@DFuzz32.09%Code Refactoring · exclusions=timeouts and compilation errors · aggregation=six LLMs; both refactoring typesA Differential Fuzzing-Based Evaluation of Functional Equivalence in LLM-Generated Code Refactorings
Source quote
L140: As shown in Table \ref{tab:rq1_results}, all six LLMs struggle to preserve program semantics during refactoring, even though they were explicitly instructed to avoid unsafe rewriting. Codestral shows the highest percentage of non-equivalent refactorings (\approx 35%), followed closely by StarChat2 and CodeLlama. More concerning is that even Qwen-2.5, Olmo-3, and GPT-4o, often regarded as state-of-the-art codeLLMs, produce a non-negligible fraction of non-equivalent refactorings (19–22%), limiting their reliability for use in automated code refactoring. We further analyze the percentage of non-equivalent refactorings across datasets and refactoring types. Among datasets, APPS has the highest percentage (32.09%) of non-equivalent refactorings, compared to MBPP (25.33%) and HumanEval (22.10%). This is expected, since APPS has program-level codes, which are inherently more complex than the function-level codes in MBPP and HumanEval, making it more challenging for the LLMs to preserve program semantics while rewriting the code. Interestingly, although code simplification is considered a relatively easier refactoring that does not require as extensive structural transformations as performance optimization, the LLMs studied produce nearly the same fraction (\approx 26%) of non-equivalent refactorings for both refactoring types. This raises broader concerns about the reliability of LLM-generated refactorings, given that even seemingly less complex refactorings can introduce substantial risk of semantic deviation.