Exploring Large Language Models for Analyzing and Improving Method Names in Scientific Code

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Larsen, Gunnar, Wong, Carol, Peruma, Anthony
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916856100552704
author Larsen, Gunnar
Wong, Carol
Peruma, Anthony
author_facet Larsen, Gunnar
Wong, Carol
Peruma, Anthony
contents Research scientists increasingly rely on implementing software to support their research. While previous research has examined the impact of identifier names on program comprehension in traditional programming environments, limited work has explored this area in scientific software, especially regarding the quality of method names in the code. The recent advances in Large Language Models (LLMs) present new opportunities for automating code analysis tasks, such as identifier name appraisals and recommendations. Our study evaluates four popular LLMs on their ability to analyze grammatical patterns and suggest improvements for 496 method names extracted from Python-based Jupyter Notebooks. Our findings show that the LLMs are somewhat effective in analyzing these method names and generally follow good naming practices, like starting method names with verbs. However, their inconsistent handling of domain-specific terminology and only moderate agreement with human annotations indicate that automated suggestions require human evaluation. This work provides foundational insights for improving the quality of scientific code through AI automation.
format Preprint
id arxiv_https___arxiv_org_abs_2507_16439
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Exploring Large Language Models for Analyzing and Improving Method Names in Scientific Code
Larsen, Gunnar
Wong, Carol
Peruma, Anthony
Software Engineering
Research scientists increasingly rely on implementing software to support their research. While previous research has examined the impact of identifier names on program comprehension in traditional programming environments, limited work has explored this area in scientific software, especially regarding the quality of method names in the code. The recent advances in Large Language Models (LLMs) present new opportunities for automating code analysis tasks, such as identifier name appraisals and recommendations. Our study evaluates four popular LLMs on their ability to analyze grammatical patterns and suggest improvements for 496 method names extracted from Python-based Jupyter Notebooks. Our findings show that the LLMs are somewhat effective in analyzing these method names and generally follow good naming practices, like starting method names with verbs. However, their inconsistent handling of domain-specific terminology and only moderate agreement with human annotations indicate that automated suggestions require human evaluation. This work provides foundational insights for improving the quality of scientific code through AI automation.
title Exploring Large Language Models for Analyzing and Improving Method Names in Scientific Code
topic Software Engineering
url https://arxiv.org/abs/2507.16439