Skip to main content
Log in

Predicting the complexity of code changes using entropy based measures

  • Original Article
  • Published:
International Journal of System Assurance Engineering and Management Aims and scope Submit manuscript

Abstract

Changes in software source codes are inevitable. The source codes of software are frequently changed to meet the user’s enormous requirements. These changes are occurring due to bug repairs (BR), enhancement/modification (EM) and the addition of new features (NF). The maintenance task becomes quite difficult if these changes are not properly recorded. The versions of these frequent changes are being maintained using the software configuration management repository. These continuous changes in the software source code make the code complex and negatively affect the quality of the product. In the literature, the complexity of the code changes has been quantified using entropy based measures (Hassan, in: Proceedings of the 31st international conference on software engineering, pp. 78–88, 2009). In this paper, we have proposed a model to predict the potential complexity of code changes using entropy based measures. The predicted potential complexity of code changes helps in determining the remaining code changes yet to be diffused in the software. The proposed model has been validated using seven components of web browser Mozilla. The model has been evaluated using goodness of fit criteria namely R squared, bias, mean squared error, variation, and root mean squared prediction error (RMSPE).The statistical significance of the proposed model has been tested using χ2 and Kolmogorov–Smirnov (K–S) test. The proposed model is found statistically significant based on the associated p value of the K–S test. Further, we conclude that the rate of complexity diffusion due to BR is found higher in four cases namely Bonsai, Mozbot, tables and XUL. The other components of Mozilla namely AUS, MXR and Tinderbox show increase in complexity due to EM and NF.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  • Albrecht AJ, Gaffney JR (1983) Software function, source lines of code and development effort prediction: a software science validation. IEEE Trans Soft Eng 9(6):639–648

    Article  Google Scholar 

  • Baisli VR (1980) Qualitative software complexity models: a summary. In: Tutorial on models and methods for software management and engineering. IEEE Computer Society Press, Los Alamitos

  • Bass F (1969) A new product growth model for consumer durables. Manag Sci 15(5):215–227

    Article  MATH  Google Scholar 

  • Canfora G, Cerulo L, Di Penta M, Pacilio F (2010) An exploratory study of factors influencing change entropy. In: The 18th IEEE international conference on program comprehension, ICPC 2010, Braga, Minho, Portugal, 30 June–2 July 2010. IEEE Computer Society, Washington, DC, pp. 134–143

  • Chidamber AJ, Kemerer CF (1994) A metric suite for object oriented design. IEEE Trans Soft Eng 20(6):476–493

    Article  Google Scholar 

  • D’Ambros M, Lanza M, Robbes R (2010). An extensive comparison of bug prediction approaches. In: Proceedings of the seventh IEEE working conference on mining software repositories (MSR07). IEEE CS Press, pp. 31–41

  • D’Ambros M, Lanza M, Robbes R (2012) Evaluating defect prediction approaches: a benchmark and an extensive comparison. Empir Softw Eng 17(4–5):531–577

    Article  Google Scholar 

  • Erlikh L (2000) Leveraging legacy system dollars for E-business. (IEEE) IT Pro, May/June 2000, pp 17–23

  • Halstead MH (1977) Elements of software science. Elsevier North Holland, New York

    MATH  Google Scholar 

  • Hassan AE (2009) Predicting faults based on complexity of code change. In: proceedings of the 31st international conference on software engineering, pp 78–88

  • Jacobson I, Christerson M, Jonsson P, Overgaard G (1992) Object oriented software engineering: a use case driven approach. ACM Press, Addison Wesley, New York, Reading, pp 69–70

    MATH  Google Scholar 

  • Kagdi H (2007) Improving change prediction with fine-grained source code mining. In: Proceedings of the twenty-second IEEE/ACM international conference on automated software engineering, Atlanta, Georgia, USA, 05–09 November 2007

  • Kagdi H, Maletic JI (2006) Software-change prediction: estimated+actual. In: SOFTWARE-EVOLVABILITY ‘06 proceedings of the second international IEEE workshop on software evolvability. IEEE Computer Society, Washington, DC, pp 38–43

  • Kagdi H, Maletic JI (2007) Combining single-version and evolutionary dependencies for software-change prediction. In: Proceedings of the fourth international workshop on mining software repositories held during 20–26 May 2007

  • McCabe TH (1976) A complexity measure. IEEE Trans Soft Eng 2(6):308–320

    Article  MATH  MathSciNet  Google Scholar 

  • Mockus A, Eick SG, Graves TL, Karr AF (1999) On measurement and analysis of software changes. Technical report, National Institute of Statistical Sciences

  • Rochkind MJ (1975) The source code control system. IEEE Trans Soft Eng 1(4):364–370

    Article  Google Scholar 

  • Shannon CE (1948) A mathematical theory of communication. Bell Syst Tech J 27(379–423):623–656

    Article  MathSciNet  Google Scholar 

  • The bugZilla project (2012). http://www.bugzilla.org. Accessed 30 Nov 2012

  • The Mozilla project (2012). http://www.mozilla.org. Accessed 30 Nov 2012

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to V. B. Singh.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Chaturvedi, K.K., Kapur, P.K., Anand, S. et al. Predicting the complexity of code changes using entropy based measures. Int J Syst Assur Eng Manag 5, 155–164 (2014). https://doi.org/10.1007/s13198-014-0226-5

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13198-014-0226-5

Keywords

Navigation