Advertisement

Competitive Coevolutionary Code-Smells Detection

  • Mohamed Boussaa
  • Wael Kessentini
  • Marouane Kessentini
  • Slim Bechikh
  • Soukeina Ben Chikha
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8084)

Abstract

Software bad-smells, also called design anomalies, refer to design situations that may adversely affect the maintenance of software. Bad-smells are unlikely to cause failures directly, but may do it indirectly. In general, they make a system difficult to change, which may in turn introduce bugs. Although these bad practices are sometimes unavoidable, they should be in general fixed by the development teams and removed from their code base as early as possible. In this paper, we propose, for the first time, the use of competitive coevolutionary search to the code-smells detection problem. We believe that such approach to code-smells detection is attractive because it allows combining the generation of code-smell examples with the production of detection rules based on quality metrics. The main idea is to evolve two populations simutaneously where the first one generates a set of detection rules (combination of quality metrics) that maximizes the coverage of a base of code-smell examples and the second one maximizes the number of generated “artificial” code-smells that are not covered by solutions (detection rules) of the first population. The statistical analysis of the obtained results shows that our proposed approach is promising when compared to two single population-based metaheuristics on a variety of benchmarks.

Keywords

Quality Metrics Recall Score Code Fragment Open Source System Detection Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Rosin, C.R., Belew, R.K.: New Methods for Competitive Coevolution. Evolutionary Computation 5(1), 1–29 (1997)CrossRefGoogle Scholar
  2. 2.
    Stanley, K.O., Miikkulainen, R.: Competitive Coevolution through Evolutionary Complexification. Journal of Artificial Intelligence Research 21(1), 63–100 (2004)Google Scholar
  3. 3.
    Hillis, W.D.: Co-Evolving Parasites Improve Simulated Evolution as an Optimization Procedure. In: Langton, et al. (eds.) Articial Life II, pp. 313–324. Addison Wesley (1992)Google Scholar
  4. 4.
    Husbands, P.: Distributed Coevolutionary Genetic Algorithms for Multi-Criteria and Multi-Constraint Optimisation. In: Fogarty, T.C. (ed.) AISB-WS 1994. LNCS, vol. 865, pp. 150–165. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  5. 5.
    Wilkerson, J.L., Tauritz, D.R., Bridges, J.M.: Multi-objective Coevolutionary Automated Software Correction. In: GECCO 2012, pp. 1229–1236 (2012)Google Scholar
  6. 6.
    Arcuri, A., Yao, X.: Novel Co-evolutionary Approach to Automatic Software Bug Fixing. In: IEEE Congress on Evolutionary Computation, pp. 162–168 (2008)Google Scholar
  7. 7.
    Adamopoulos, K., Harman, M., Hierons, R.M.: How to Overcome the Equivalent Mutant Problem and Achieve Tailored Selective Mutation Using Co-Evolution. In: Deb, K., Tari, Z. (eds.) GECCO 2004. LNCS, vol. 3103, pp. 1338–1349. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 8.
    Meyer, B.: Object Oriented Software Construction, 2nd edn. Prentice Hall, New Jersey (1997)zbMATHGoogle Scholar
  9. 9.
    Brown, W.J., Malveau, R.C., Brown, W.H., Mowbray, T.J.: Anti Patterns: Refactoring Software,Architectures, and Projects in Crisis, 1st edn. John Wiley and Sons (March 1998)Google Scholar
  10. 10.
    Marinescu, R.: Detection strategies: metrics-based rules for detecting design flaws. In: Proceedings of the ICSM 2004, pp. 350–359 (2004)Google Scholar
  11. 11.
    Fenton, N., Pfleeger, S.L.: Software Metrics: A Rigorous and Practical Approach, 2nd edn. International Thomson Computer Press, London (1997)Google Scholar
  12. 12.
    Kessentini, M., Kessentini, W., Sahraoui, H., Boukadoum, M., Ouni, A.: Design Defects Detection and Correction by Example. In: 19th ICPC 2011, Canada, pp. 81–90 (2011)Google Scholar
  13. 13.
    Ouni, A., Kessentini, M., Sahraoui, H., Boukadoum, M.: Maintainability Defects Detection and Correction: A Multi-Objective Approach. In: Journal of Automated Software Engineering (JASE). Springer (2012)Google Scholar
  14. 14.
  15. 15.
  16. 16.
  17. 17.
  18. 18.
    Kessentini, M., Vaucher, S., Sahraoui, H.: Deviance from Perfection is a Better Criterion than Closeness to Evil when Identifying Risky Code. In: 25th IEEE/ACM ASE 2010 (2010)Google Scholar
  19. 19.
    Moha, N., Guéhéneuc, Y.-G., Duchien, L., Le Meur, A.-F.: DECOR: A Method for the Specification and Detection of Code and Design Smells. TSE 36, 20–36 (2010)Google Scholar
  20. 20.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring – Improving the Design of Existing Code, 1st edn. Addison-Wesley (1999)Google Scholar
  21. 21.
    Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Trans. Softw. Eng. 20(6), 293–318 (1994)CrossRefGoogle Scholar
  22. 22.
  23. 23.
    Wilcoxon, F., Katti, S.K., Roberta, A.: Critical Values and Probability Levels for the Wilcoxon Rank Sum Test and the Wilcoxon Signed-rank Test. In: Selected Tables in Mathematical Statistics, vol. I, pp. 171–259. American Mathematical Society (1973)Google Scholar
  24. 24.
    Munro, M.J.: Product Metrics for Automatic Identification of “Bad Smell” Design Problems in Java Source-Code. In: 11th METRICS Symp. (2005)Google Scholar
  25. 25.
    Harman, M., Afshin Mansouri, S., Zhang, Y.: Search-based software engineering: Trends, techniques and applications. ACM Comput. Surv. 45, 61 pages (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Mohamed Boussaa
    • 1
  • Wael Kessentini
    • 1
  • Marouane Kessentini
    • 1
  • Slim Bechikh
    • 1
    • 2
  • Soukeina Ben Chikha
    • 2
  1. 1.CSMissouri University of Science and TechnologyMissouriUSA
  2. 2.University of TunisTunisTunisia

Personalised recommendations