Skip to main content

Competitive Coevolutionary Code-Smells Detection

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,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.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Rosin, C.R., Belew, R.K.: New Methods for Competitive Coevolution. Evolutionary Computation 5(1), 1–29 (1997)

    Article  Google Scholar 

  2. Stanley, K.O., Miikkulainen, R.: Competitive Coevolution through Evolutionary Complexification. Journal of Artificial Intelligence Research 21(1), 63–100 (2004)

    Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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. 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. 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)

    Chapter  Google Scholar 

  8. Meyer, B.: Object Oriented Software Construction, 2nd edn. Prentice Hall, New Jersey (1997)

    MATH  Google Scholar 

  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. Marinescu, R.: Detection strategies: metrics-based rules for detecting design flaws. In: Proceedings of the ICSM 2004, pp. 350–359 (2004)

    Google Scholar 

  11. Fenton, N., Pfleeger, S.L.: Software Metrics: A Rigorous and Practical Approach, 2nd edn. International Thomson Computer Press, London (1997)

    Google Scholar 

  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. 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. http://ant.apache.org/

  15. http://xerces.apache.org/xerces-j/

  16. http://argouml.tigris.org/

  17. http://sourceforge.net/projects/azureus/

  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. 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. 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. Chidamber, S.R., Kemerer, C.F.: A metrics suite for object-oriented design. IEEE Trans. Softw. Eng. 20(6), 293–318 (1994)

    Article  Google Scholar 

  22. http://www.jhotdraw.org/

  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. 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. Harman, M., Afshin Mansouri, S., Zhang, Y.: Search-based software engineering: Trends, techniques and applications. ACM Comput. Surv. 45, 61 pages (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Boussaa, M., Kessentini, W., Kessentini, M., Bechikh, S., Ben Chikha, S. (2013). Competitive Coevolutionary Code-Smells Detection. In: Ruhe, G., Zhang, Y. (eds) Search Based Software Engineering. SSBSE 2013. Lecture Notes in Computer Science, vol 8084. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39742-4_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-39742-4_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39741-7

  • Online ISBN: 978-3-642-39742-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics