To ensure that Large Language Models (LLMs) effectively support user productivity, they need to be adjusted. Existing Code Readability (CR) models can guide this alignment. However, there are concerns about their relevance in modern software engineering since they often miss the developers' notion of readability and rely on outdated code. This research assesses existing Java CR models for LLM adjustments, measuring the correlation between their and developers' evaluations of AI-generated Java code. Using the Repertory Grid Technique with 15 developers, we identified 12 key code aspects influencing CR that were consequently assessed by 390 programmers when labeling 120 AI-generated snippets. Our findings indicate that when AI generates concise and executable code, it is often considered readable by CR models and developers. However, a limited correlation between these evaluations underscores the importance of future research on learning objectives for adjusting LLMs and on the aspects influencing CR evaluations included in predictive models.
Refactoring for Novices in Java: An Eye Tracking Study on the Extract vs. Inline Methods
State University of Paraíba (UEPB)(帕拉伊巴州立大学);Federal University of Campina Grande (UFCG)(坎皮纳格兰德联邦大学);Federal University of Alagoas (UFAL)(阿拉戈阿斯联邦大学);University of Brasília (UnB)(巴西利亚大学);Pontifical Catholic University of Rio de Janeiro(里约热内卢天主教大学)
On the Diffusion of Test Smells in LLM-Generated Unit Tests
University of Luxembourg(卢森堡大学);Nanjing University of Science and Technology(南京理工大学);Bilkent University(比尔肯特大学);Singapore Management University(新加坡管理大学)