ERD-CQC: Enhanced Rule and Dependency Code Quality Check for Java

  • Yi Hou
  • , Wuxia Jin
  • , Zhijun Wang
  • , Liuming Wang
  • , Shuguang Chen
  • , Yihan Wang
  • , Lei Sang
  • , Haijun Wang
  • , Ting Liu

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In the field of software development, the application of code quality check tools has become a key factor in improving product quality and development efficiency. While many existing tools are effective at detecting common problems in code, there are still some limitations. Firstly, these tools rely on predefined rules that may not fully encompass real-world coding challenges. Secondly, a lack of consideration of dependencies leads to failure to report violations occurring across files or modules. Third, the metrics used by these tools primarily focus on object-oriented programming, limiting their ability to assess software quality from the perspective of nationalized standards. To address these issues, this work proposes a dependency-enhanced method namely ERD-CQC for code quality detection and measurement. ERD-CQC provides 88 detection rules and 45 metrics, supplementing checking rules in categories such as Circuit Breaking, Serializable, and Security. ERD-CQC constructs an infused graph by integrating abstract syntax trees (ASTs), entities, and dependencies for violation detection. Based on the detection results, ERD-CQC provides a code quality measurement system with 4 nationalized standard dimensions for the purpose of measuring code quality from multiple perspectives. To validate the effectiveness of ERD-CQC, we manually examined 647 compliant and 528 non-compliant code snippets. ERD-CQC achieves the recall and F1 score exceeding 98%. We also collected open-source projects and closed-source projects in the real world, containing a total of 4,319 non-compliant code snippets. On this real-world benchmark, the average F1 score of ERD-CQC is 11.44% higher than the advanced tool SonarQube. Finally, we visualized the quality measurement results based on metrics and found that open-source and closed-source projects have certain patterns in metric performance. Our work will benefit developers in checking, evaluating, and monitoring their software quality comprehensively.

Original languageEnglish
Title of host publication15th Asia-Pacific Symposium on Internetware, Internetware 2024 - Proceedings
PublisherAssociation for Computing Machinery
Pages377-386
Number of pages10
ISBN (Electronic)9798400707056
DOIs
StatePublished - 24 Jul 2024
Event15th Asia-Pacific Symposium on Internetware, Internetware 2024 - Macao, China
Duration: 24 Jul 202426 Jul 2024

Publication series

NameACM International Conference Proceeding Series

Conference

Conference15th Asia-Pacific Symposium on Internetware, Internetware 2024
Country/TerritoryChina
CityMacao
Period24/07/2426/07/24

Keywords

  • Code Quality check tools
  • Metrics
  • Scanning rules
  • Software quality

Fingerprint

Dive into the research topics of 'ERD-CQC: Enhanced Rule and Dependency Code Quality Check for Java'. Together they form a unique fingerprint.

Cite this