Score
Maintaining code quality involves enforcing coding standards and style guides, running automated linters and static analysis (ESLint, clang-tidy, SonarQube), conducting structured code reviews, measuring test coverage, and integrating checks into CI to prevent regressions and improve maintainability.
This work addresses the critical limitation of existing code generation systems—neglect of maintainability and poor adaptability to dynamic requirement changes—by pioneering maintainability as the primary optimization objective. We propose a novel code generation framework designed for continuous evolution, emphasizing high cohesion, low coupling, and easy adaptability. Methodologically, we (1) introduce MaintainBench, the first dynamic maintainability evaluation benchmark; (2) integrate waterfall-style phased governance, design-pattern-driven architectural generation, and multi-agent collaborative reasoning; and (3) incorporate a quantitative dynamic maintenance cost assessment model. Experimental results demonstrate a 14–30% improvement in maintainability metrics on MaintainBench, while simultaneously achieving superior pass@k functional correctness over baseline methods. All code and the MaintainBench benchmark are publicly released.
Traditional static analysis tools (e.g., Checkstyle) struggle to detect code style issues requiring deep semantic understanding. This paper proposes the first hybrid code style detection framework that integrates large language models (LLMs) into the Checkstyle pipeline, overcoming inherent limitations of rule-based engines in expressive power and contextual modeling. The method leverages Checkstyle for syntactic and structural validation while employing LLMs—guided by prompt engineering—to perform context-aware, semantic-level identification of style violations (e.g., naming intent consistency, logical block readability). Evaluated on 380 real-world Java source files, our framework achieves a 27.3% improvement in detection accuracy and a 41.6% increase in coverage over standard Checkstyle for complex semantic style rules. These gains significantly enhance code readability and maintainability, demonstrating the efficacy of combining lightweight static analysis with LLM-driven semantic reasoning in practical code quality assurance.
To address the challenge of code quality assurance in large-scale collaborative development, this paper proposes a two-stage code review method based on Llama3. In Stage I, the model is jointly optimized via supervised fine-tuning (SFT) and offline reinforcement learning to accurately identify potential defects in code changes. In Stage II, an interpretable, rule-based filtering mechanism is introduced to mitigate hallucinations inherent in large language models, thereby ensuring the accuracy and actionability of review feedback. The method enables end-to-end automated code review on industrial-scale repositories, achieving an offline F1 score of 92.3%. After deployment, weekly retained user satisfaction consistently exceeds 60%, significantly improving developer experience and code maintainability. The core contribution lies in a lightweight, controllable review paradigm that synergistically integrates data-driven modeling with human-crafted, interpretable constraints.
This study investigates the adoption and customization practices of SonarQube Cloud Quality Gates in open-source projects. Using software repository mining, we identified and analyzed 1,247 active GitHub projects integrated with SonarQube Cloud, leveraging GitHub Actions configuration metadata to systematically characterize their Quality Gate configurations. Results show that 81% of projects successfully integrated SonarQube Cloud; 75% adopted the organization’s default Quality Gate without modification; only 45% customized Quality Gate conditions—primarily optimizing for security, maintainability, and test coverage; and 55% relied solely on built-in rules, with few enabling advanced rule sets. Notably, we uncover a weak empirical correlation between Quality Gate configurations and actual code quality metrics—a novel finding. This motivates the proposed research direction of “configuration–quality” mapping modeling, offering new empirical evidence and methodological foundations for evidence-based configuration science of static analysis tools.
This study addresses the lack of systematic evaluation of non-functional quality—specifically security, maintainability, and performance efficiency—in code generated by large language models (LLMs). Grounded in the ISO/IEC 25010 standard, it integrates a systematic literature review, dual-industry workshops, and multi-model empirical experiments (GPT-4, Claude, CodeLlama) to conduct multidimensional quality analysis on real-world software defect-fix patches. It introduces the first non-functional quality assessment framework reconciling academic rigor with industrial relevance, uncovering significant trade-offs among the three quality attributes and exposing gaps between LLM outputs and actual engineering requirements—including technical debt accumulation. Results demonstrate that functional correctness does not imply high non-functional quality, and that model architecture and optimization strategies yield markedly divergent outcomes across non-functional dimensions. The work provides both theoretical foundations and actionable guidelines for designing robust quality assurance mechanisms for LLM-generated code.
This study investigates the long-term maintainability of large language model–generated code in real-world software projects, focusing on maintenance frequency, human involvement, and types of modifications. Leveraging the AIDev dataset and GitHub repositories, the authors conduct a large-scale empirical analysis of over 1,000 AI-generated and human-written code files across 100 popular repositories, integrating commit histories, change pattern classification, and statistical comparisons. The work presents the first systematic quantification of maintenance characteristics of AI-generated code, revealing that such code undergoes less frequent maintenance and smaller-magnitude changes compared to human-written code. Notably, developers primarily employ AI-generated code for feature extensions rather than bug fixes, challenging the prevailing assumption that AI-generated code requires frequent correction and highlighting its stability and practical utility.
This study addresses growing industry concerns about the practicality and naturalness of code generated by large language models (LLMs) by systematically examining the usage patterns and defect associations of LLM-generated code and comments in active enterprise and community repositories from 2021 to 2025. For the first time, it contrasts the distribution of LLM-generated content between these two repository types through an empirical analysis integrating multiple detection tools, code clone detection, syntactic quality assessment, and manually labeled defect data. The findings reveal that the proportion of LLM-generated code has steadily declined over time and is predominantly confined to test cases, while comment generation remains stable yet exhibits low syntactic correctness. Enterprise repositories incorporate more LLM-generated content overall, which shows virtually no direct association with known defects, suggesting that such content is characterized by low risk but high functional limitations in real-world practice.
This study investigates whether code generated by AI coding agents is more difficult to maintain than human-written code, with a particular focus on compounding challenges that arise when agents develop upon code previously generated by themselves or others. To address this, we introduce the CodeThread framework and conduct controlled experiments with four state-of-the-art coding agents across four repository-scale benchmarks, systematically evaluating their task-completion performance through regression analysis and behavioral code comparison. Our work reveals, for the first time, that agents experience up to a 13.1% drop in task success rate when building upon their own prior outputs—a significant degradation in downstream development efficiency. This phenomenon cannot be explained by conventional maintainability metrics but stems instead from subtle behavioral discrepancies in aspects such as input validation and error handling, underscoring the critical role of code behavior characteristics in software maintainability.
Software source code often harbours"hotspots": small portions of the code that change far more often than the rest of the project and thus concentrate maintenance activity. We mine the complete version histories of 91 evolving, actively developed GitHub repositories and identify 15 recurring line-level hotspot patterns that explain why these hotspots emerge. The three most prevalent patterns are Pinned Version Bump (26%), revealing brittle release practices; Long Line Change (17%), signalling deficient layout; and Formatting Ping-Pong (9%), indicating missing or inconsistent style automation. Surprisingly, automated accounts generate 74% of all hotspot edits, suggesting that bot activity is a dominant but largely avoidable source of noise in change histories. By mapping each pattern to concrete refactoring guidelines and continuous integration checks, our taxonomy equips practitioners with actionable steps to curb hotspots and systematically improve software quality in terms of configurability, stability, and changeability.
This study investigates whether code cleanliness—encompassing structural and stylistic quality—affects the comprehension and modification capabilities of autonomous programming agents. To this end, the authors introduce a novel bidirectional minimal-pair methodology that generates functionally equivalent code pairs differing only in cleanliness, using static analysis rules and cognitive complexity metrics to control for confounding variables. Agent behavior is evaluated at the real API interface level via hidden tests. Across 660 experiments, while task success rates remain unaffected, cleaner code consistently reduces token consumption by 7–8% and decreases repeated file accesses by 34%, demonstrating that code cleanliness significantly lowers computational overhead and enhances navigation efficiency for autonomous agents.