🤖 AI Summary
This study addresses the widespread violations of coding styles and best practices in open-source Java projects, which adversely affect code quality and maintainability. It presents the first large-scale longitudinal analysis of 1,036 popular GitHub Java repositories, systematically examining the evolution and compliance of their code style through static code analysis, temporal tracking, and adherence to established guidelines such as the Google Java Style Guide. The findings reveal that missing Javadoc documentation and inconsistent naming conventions are the most prevalent issues, with numerous projects violating style rules that fall outside the scope of conventional static analysis tools. Although some projects explicitly claim conformance to style guides, their overall compliance remains only marginally better. This work highlights critical blind spots in current automated detection approaches and provides empirical evidence to inform strategies for improving code quality in open-source ecosystems.
📝 Abstract
Following code style conventions in software projects is essential for maintaining overall code quality. Adhering to these conventions improves maintainability, understandability, and extensibility. Additionally, following best practices during software development enhances performance and reduces the likelihood of errors. This paper analyzes 1, 036 popular open-source JAVA projects on GitHub to study how code style and programming practices are adopted and evolve over time, examining their prevalence and the most common violations. Additionally, we study a subset of active repositories on a monthly basis to track changes in adherence to coding standards over time. We found widespread violations across repositories, with Javadoc and Naming violations being the most common. We also found a significant number of violations of the Google Java Style Guide in categories often missed by modern static analysis tools. Furthermore, repositories claiming to follow code-style practices exhibited slightly higher overall adherence to code-style and best-practices. The results provide valuable insights into the adoption of code style and programming practices, highlighting key areas for improvement in the open-source development community. Furthermore, the paper identifies important lessons learned and suggests future directions for improving code quality in JAVA projects.