Machine Learning for Code Smell Detection and Resolution
Code smells are indicative of poor software design, maintainability issues, or potential defects, and their early detection is critical for high-quality software development. Traditional detection methods rely heavily on manual inspection or rule-based static analysis, which are often time-consuming, error-prone, and limited in adaptability. This paper explores the use of machine learning techniques for automated code smell detection and resolution. By leveraging code metrics, syntactic and semantic features, and historical refactoring data, ML models can identify patterns associated with common code smells and recommend targeted resolution strategies. The proposed approach is evaluated on open-source and industrial software projects, demonstrating improvements in detection accuracy, maintainability, and developer productivity. The study highlights the potential of intelligent, data-driven approaches to enhance software quality and support continuous code improvement.