Automated Single Responsibility Principle Enforcement: A Step Toward Reusable and Maintainable Code
- Title
- Automated Single Responsibility Principle Enforcement: A Step Toward Reusable and Maintainable Code
- Creator
- Jacob B.A.; Manohar M.; Roy G.
- Description
- In this study, we delve into the sphere of automated code scrutiny, specifically concentrating on compliance with the single responsibility principle (SRP), a key principle in software architecture. The SRP proposes that a class should have a singular reason for modification, thereby enhancing code cohesion and facilitating its maintenance and reusability. The study presents a pioneering system that utilizes a holistic strategy to ascertain SRP compliance within code. This system rigorously inspects code interfaces, the interaction points among various software components. Through this process, we extract critical insights into the codes maintainability and reusability. An optimally designed interface can significantly improve code management and foster its reuse, leading to superior software design efficiency. Beyond interface inspection, our system also explores complexity metrics such as cyclomatic complexity and hassel volume. Cyclomatic complexity offers a numerical indicator of the count of linearly independent paths traversing a programs source code, serving as a measure of code complexity. Hassel volume is an additional metric that can quantify code complexity. Moreover, our system employs code smell detection methodologies to identify instances of high interdependence between classes, often a sign of SRP breaches. High interdependence, or tight coupling, complicates code modification and maintenance. The system integrates the conclusions from these varied analyses to determine SRP compliance. The outcomes of this investigation highlight a hopeful trajectory toward automated SRP detection. This could provide developers with tools that proactively foster the development of well-organized and maintainable code, thereby enhancing software design quality. The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2024.
- Source
- Lecture Notes in Networks and Systems, Vol-1112 LNNS, pp. 343-353.
- Date
- 2024-01-01
- Publisher
- Springer Science and Business Media Deutschland GmbH
- Subject
- Code smells; Cyclometric complexity; Halstead volume; Interface analysis; Single responsibility principle
- Coverage
- Jacob B.A., Department of Computer Science and Engineering, School of Engineering and Technology, CHRIST (Deemed to Be University), Karnataka, Bangalore, 560074, India; Manohar M., Department of Computer Science and Engineering, School of Engineering and Technology, CHRIST (Deemed to Be University), Karnataka, Bangalore, 560074, India; Roy G., Department of Computer Science and Engineering, School of Engineering and Technology, CHRIST (Deemed to Be University), Karnataka, Bangalore, 560074, India
- Rights
- Restricted Access
- Relation
- ISSN: 23673370; ISBN: 978-981976683-3
- Format
- Online
- Language
- English
- Type
- Conference paper
Collection
Citation
Jacob B.A.; Manohar M.; Roy G., “Automated Single Responsibility Principle Enforcement: A Step Toward Reusable and Maintainable Code,” CHRIST (Deemed To Be University) Institutional Repository, accessed February 27, 2025, https://archives.christuniversity.in/items/show/18990.