How do Developers Improve Code Readability? An Empirical Study of Pull
Requests
- URL: http://arxiv.org/abs/2309.02594v1
- Date: Tue, 5 Sep 2023 21:31:21 GMT
- Title: How do Developers Improve Code Readability? An Empirical Study of Pull
Requests
- Authors: Carlos Eduardo C. Dantas and Adriano M. Rocha and Marcelo A. Maia
- Abstract summary: We collect 370 code readability improvements from 284 Merged Pull Requests (PRs) under 109 GitHub repositories.
We produce a catalog with 26 different types of code readability improvements.
Surprisingly, SonarQube only detected 26 out of the 370 code readability improvements.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Readability models and tools have been proposed to measure the effort to read
code. However, these models are not completely able to capture the quality
improvements in code as perceived by developers. To investigate possible
features for new readability models and production-ready tools, we aim to
better understand the types of readability improvements performed by developers
when actually improving code readability, and identify discrepancies between
suggestions of automatic static tools and the actual improvements performed by
developers. We collected 370 code readability improvements from 284 Merged Pull
Requests (PRs) under 109 GitHub repositories and produce a catalog with 26
different types of code readability improvements, where in most of the
scenarios, the developers improved the code readability to be more intuitive,
modular, and less verbose. Surprisingly, SonarQube only detected 26 out of the
370 code readability improvements. This suggests that some of the catalog
produced has not yet been addressed by SonarQube rules, highlighting the
potential for improvement in Automatic static analysis tools (ASAT) code
readability rules as they are perceived by developers.
Related papers
- Understanding Code Understandability Improvements in Code Reviews [79.16476505761582]
We analyzed 2,401 code review comments from Java open-source projects on GitHub.
83.9% of suggestions for improvement were accepted and integrated, with fewer than 1% later reverted.
arXiv Detail & Related papers (2024-10-29T12:21:23Z) - Learning Code Preference via Synthetic Evolution [20.897742297490275]
We propose CodeFavor, a framework for training pairwise code preference models from synthetic evolution data.
Our evaluation shows that CodeFavor holistically improves the accuracy of model-based code preferences by up to 28.8%.
CodeFavor models can match the performance of models with 6-9x more parameters while being 34x more cost-effective.
arXiv Detail & Related papers (2024-10-04T18:05:22Z) - Codev-Bench: How Do LLMs Understand Developer-Centric Code Completion? [60.84912551069379]
We present the Code-Development Benchmark (Codev-Bench), a fine-grained, real-world, repository-level, and developer-centric evaluation framework.
Codev-Agent is an agent-based system that automates repository crawling, constructs execution environments, extracts dynamic calling chains from existing unit tests, and generates new test samples to avoid data leakage.
arXiv Detail & Related papers (2024-10-02T09:11:10Z) - Assessing Consensus of Developers' Views on Code Readability [3.798885293742468]
Developers now spend more time reviewing code than writing it, highlighting the importance of Code Readability for code comprehension.
Previous research found that existing Code Readability models were inaccurate in representing developers' notions.
We surveyed 10 Java developers with similar coding experience to evaluate their consensus on Code Readability assessments and related aspects.
arXiv Detail & Related papers (2024-07-04T09:54:42Z) - VersiCode: Towards Version-controllable Code Generation [58.82709231906735]
Large Language Models (LLMs) have made tremendous strides in code generation, but existing research fails to account for the dynamic nature of software development.
We propose two novel tasks aimed at bridging this gap: version-specific code completion (VSCC) and version-aware code migration (VACM)
We conduct an extensive evaluation on VersiCode, which reveals that version-controllable code generation is indeed a significant challenge.
arXiv Detail & Related papers (2024-06-11T16:15:06Z) - Code Prompting Elicits Conditional Reasoning Abilities in Text+Code LLMs [65.2379940117181]
We introduce code prompting, a chain of prompts that transforms a natural language problem into code.
We find that code prompting exhibits a high-performance boost for multiple LLMs.
Our analysis of GPT 3.5 reveals that the code formatting of the input problem is essential for performance improvement.
arXiv Detail & Related papers (2024-01-18T15:32:24Z) - Frustrated with Code Quality Issues? LLMs can Help! [7.67768651817923]
static analysis tools are used in developer to flag code quality issues.
Developers need to spend extra efforts to revise their code to improve code quality based on the tool findings.
We present a tool, CORE (short for COde REvisions) to assist developers in revising code to resolve code quality issues.
arXiv Detail & Related papers (2023-09-22T15:37:07Z) - Coeditor: Leveraging Contextual Changes for Multi-round Code Auto-editing [57.776971051512234]
In this work, we explore a multi-round code auto-editing setting, aiming to predict edits to a code region based on recent changes within the same.
Our model, Coeditor, is a fine-tuned language model specifically designed for code editing tasks.
In a simplified single-round, single-edit task, Coeditor significantly outperforms GPT-3.5 and SOTA open-source code completion models.
arXiv Detail & Related papers (2023-05-29T19:57:36Z) - Enriching Source Code with Contextual Data for Code Completion Models:
An Empirical Study [4.438873396405334]
We aim to answer whether making code easier to understand through using contextual data improves the performance of pre-trained code language models for the task of code completion.
For comments, we find that the models perform better in the presence of multi-line comments.
arXiv Detail & Related papers (2023-04-24T17:09:14Z) - Generation Probabilities Are Not Enough: Uncertainty Highlighting in AI Code Completions [54.55334589363247]
We study whether conveying information about uncertainty enables programmers to more quickly and accurately produce code.
We find that highlighting tokens with the highest predicted likelihood of being edited leads to faster task completion and more targeted edits.
arXiv Detail & Related papers (2023-02-14T18:43:34Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.