Effectiveness of encapsulation and object-oriented metrics to refactor code and identify error prone classes using bad smells

  • Authors:
  • Satwinder Singh;K. S. Kahlon

  • Affiliations:
  • B.B.S.B. Engg. College, Fatehgarh Sahib;Guru Nanak Dev University, AMRITSAR

  • Venue:
  • ACM SIGSOFT Software Engineering Notes
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

To assist maintenance and evolution teams, work needs to be done at the onset of software development. One such facilitation is refactoring the code, making it easier to read, understand and maintain. Refactoring is done by identifying bad smell areas in the code. In this paper, based on empirical analysis, we develop a metrics model to identify smelly classes. The role of two new metrics (encapsulation and information hiding) is also investigated for identifying smelly and faulty classes in software code. This paper first presents a binary statistical analysis of thev relationship between metrics and bad smells, the results of which show a significant relationship. Then, the metrics model (with significant metrics shortlisted from the binary analysis) for bad smell categorization (divided into five categories) is developed. To verify our model, we examine the open source Firefox system, which has a strong industrial usage. The results show that proposed metrics model for bad smell can predict faulty classes with high accuracy, but in the case of the categorized model not all categories of bad smells can adequately identified the faulty and smelly classes. Due to certain limitations of our study more experiments are required to generalize the results of bad smell and faulty class identification in software code.