Enhancing Code Readability through Automated Consistent Formatting

Author:

Kanoutas Thomas1,Karanikiotis Thomas1ORCID,Symeonidis Andreas L.1ORCID

Affiliation:

1. Department of Electrical and Computer Engineering, Aristotle University of Thessaloniki, 541 24 Thessaloniki, Greece

Abstract

Code readability is critical to software development and has a significant impact on maintenance and collaboration in evolving technology landscapes. With the increasing complexity of projects and the diversity of developers’ coding styles, the need for automated tools to improve code readability has become more apparent. This paper presents an innovative automated system designed to improve code readability by modeling and enforcing consistent formatting standards. The approach uses techniques such as Long Short-Term Memory (LSTM) networks and N-gram models, allowing the system to adapt to different coding styles and preferences. The system works autonomously by analyzing code styling within a project, identifying deviations from established standards and providing actionable recommendations for consistent styling. To validate our approach, several evaluations were performed on a large dataset of Java files. The results demonstrate the system’s effectiveness in detecting and correcting formatting errors, identifying a formatting error within the first five predictions more than 90% of the time, while providing the correct fix nearly 96% of the time, regardless of formatting convention or programming language. By offering a solution tailored to the specific needs of different teams, our system represents a significant advance in automated code formatting and readability improvement.

Publisher

MDPI AG

Reference32 articles.

1. Pressman, R.S., and Maxim, B.R. (2019). Software Engineering: A Practitioner’s Approach, McGraw Hill. [9th ed.].

2. Sommerville, I. (2016). Software Engineering, Pearson.

3. (2023, September 15). ISO/IEC 25010. Available online: https://iso25000.com/index.php/en/iso-25000-standards/iso-25010.

4. Martin, R.C. (2009). Clean Code: A Handbook of Agile Software Craftsmanship, Pearson.

5. van Sinderen, M., Maciaszek, L.A., and Fill, H.G. (2021). Proceedings of the Software Technologies, Springer International Publishing.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3