CodeTaste: LLM이 인간 수준의 코드 리팩토링을 생성할 수 있는가?
CodeTaste: Can LLMs Generate Human-Level Code Refactorings?
대규모 언어 모델(LLM) 기반 코딩 에이전트는 실행 가능한 코드를 생성할 수 있지만, 생성된 솔루션은 종종 복잡성, 중복, 그리고 아키텍처 결함을 포함하게 됩니다. 인간 개발자는 이러한 문제를 리팩토링을 통해 해결하는데, 이는 프로그램의 구조와 유지보수성을 개선하는 동작을 보존하는 프로그램 변환입니다. 본 논문에서는 LLM 에이전트가 (i) 안정적으로 리팩토링을 수행할 수 있는지, 그리고 (ii) 실제 코드베이스에서 인간 개발자가 실제로 선택한 리팩토링을 식별할 수 있는지 조사합니다. 우리는 CodeTaste라는 벤치마크를 제시합니다. 이 벤치마크는 오픈 소스 저장소의 대규모 멀티 파일 변경 사항에서 추출한 리팩토링 작업들로 구성되어 있습니다. 솔루션을 평가하기 위해, 저장소 테스트 스위트에 데이터 흐름 추론을 사용하여 원치 않는 패턴의 제거와 원하는 패턴의 도입을 확인하는 사용자 정의 정적 검사를 결합했습니다. 실험 결과, 최첨단 모델 간에 명확한 격차가 있음을 나타냅니다. 에이전트는 리팩토링이 자세히 명시된 경우 잘 수행되지만, 개선 영역만 제시될 경우 인간의 리팩토링 선택을 발견하는 데 어려움을 겪는 경우가 많습니다. 제안-구현 분해 방식을 사용하면 정렬이 향상되며, 구현 전에 가장 잘 정렬된 제안을 선택하면 추가적인 이점을 얻을 수 있습니다. CodeTaste는 실제 코드베이스에서 코딩 에이전트를 인간의 리팩토링 결정과 일치시키는 데 필요한 평가 대상과 잠재적인 선호도 신호를 제공합니다.
Large language model (LLM) coding agents can generate working code, but their solutions often accumulate complexity, duplication, and architectural debt. Human developers address such issues through refactoring: behavior-preserving program transformations that improve structure and maintainability. In this paper, we investigate if LLM agents (i) can execute refactorings reliably and (ii) identify the refactorings that human developers actually chose in real codebases. We present CodeTaste, a benchmark of refactoring tasks mined from large-scale multi-file changes in open-source repositories. To score solutions, we combine repository test suites with custom static checks that verify removal of undesired patterns and introduction of desired patterns using dataflow reasoning. Our experimental results indicate a clear gap across frontier models: agents perform well when refactorings are specified in detail, but often fail to discover the human refactoring choices when only presented with a focus area for improvement. A propose-then-implement decomposition improves alignment, and selecting the best-aligned proposal before implementation can yield further gains. CodeTaste provides an evaluation target and a potential preference signal for aligning coding agents with human refactoring decisions in realistic codebases.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.