Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

From a domain analysis to the specification and detection of code and design smells

Published: 01 May 2010 Publication History
  • Get Citation Alerts
  • Abstract

    Code and design smells are recurring design problems in software systems that must be identified to avoid their possible negative consequences on development and maintenance. Consequently, several smell detection approaches and tools have been proposed in the literature. However, so far, they allow the detection of predefined smells but the detection of new smells or smells adapted to the context of the analysed systems is possible only by implementing new detection algorithms manually. Moreover, previous approaches do not explain the transition from specifications of smells to their detection. Finally, the validation of the existing approaches and tools has been limited on few proprietary systems and on a reduced number of smells. In this paper, we introduce an approach to automate the generation of detection algorithms from specifications written using a domain-specific language. This language is defined from a thorough domain analysis. It allows the specification of smells using high-level domain-related abstractions. It allows the adaptation of the specifications of smells to the context of the analysed systems. We specify 10 smells, generate automatically their detection algorithms using templates, and validate the algorithms in terms of precision and recall on Xerces v2.7.0 and GanttProject v1.10.2, two open-source object-oriented systems. We also compare the detection results with those of a previous approach, iPlasma.

    References

    References

    [1]
    Alikacem El H, Sahraoui H (2006) Détection d’anomalies utilisant un langage de description de règle de qualité. In: actes du 12e colloque LMO, pp 185–200
    [2]
    Brown WJ, Malveau RC, Brown WH, McCormick HW III, and Mowbray TJ Anti patterns: refactoring software, architectures, and projects in crisis 1998 1 New York Wiley
    [3]
    Beyer D, Noack A, and Lewerentz C Efficient relational calculation for software analysis Trans Softw Eng 2005 31 2 137-149
    [4]
    Chambers JM, Clevelmd WS, Kleiner B, Tukey PA (1983) Graphical methods for data analysis. Wadsworth International
    [6]
    Chidamber SR and Kemerer CF A metrics suite for object oriented design IEEE Trans Softw Eng 1994 20 6 476-493
    [7]
    Consel C, Marlet R (1998) Architecturing software using: A methodology for language development. Lecture Notes in Computer Science, vol 1490, pp 170–194
    [8]
    Frakes WB and Baeza-Yates R Information retrieval: data structures and algorithms 1992 Englewood Cliffs Prentice-Hall
    [9]
    Florijn G (2002) Revjava—design critiques and architectural conformance checking for java software. White Paper. SERC, the Netherlands
    [10]
    Fowler M Refactoring—improving the design of existing code 1999 1 Reading Addison-Wesley
    [12]
    Guéhéneuc Y-G, Albin-Amiot H (2004) Recovering binary class relationships: Putting icing on the UML cake. In: Proceedings of the 19th OOSPLA conference, pp 301–314
    [13]
    Geraci A (1991) IEEE standard computer dictionary: compilation of IEEE standard computer glossaries. Institute of Electrical and Electronics Engineers, Inc.
    [14]
    Gamma E, Helm R, Johnson R, and Vlissides J Design patterns—elements of reusable object-oriented software 1994 1 Reading Addison-Wesley
    [15]
    Guéhéneuc Y-G, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns. In: Proceedings of the 11th WCRE conference, pp 172–181
    [16]
    [17]
    Hovemeyer D and Pugh W Finding bugs is easy SIGPLAN Not. 2004 39 12 92-106
    [18]
    Lincke R, Lundberg J, Löwe W (2008) Comparing software metrics tools. In: Proceedings of the ISSTA Symposium, NY, USA, 2008. ACM, New York, pp 131–142
    [19]
    Marinescu R (2004) Detection strategies: metrics-based rules for detecting design flaws. In: Proceedings of the 20th ICSM conference, pp 350–359
    [20]
    Moha N, Guéhéneuc Y-G, Leduc P (2006) Automatic generation of detection algorithms for design defects. In: Proceedings of the 21st ASE conference
    [21]
    Moha N, Guéhéneuc Y-G, Le Meur A-F, Duchien L (2008) A domain analysis to specify design defects and generate detection algorithms. In: Proceedings of the 11th FASE conference. Springer, Heidelberg, pp 276–291
    [22]
    Moha N, Huynh D-L, Guéhéneuc Y-G (2006) Une taxonomie et un métamodèle pour la détection des défauts de conception. In: actes du 12e colloque LMO, pp 201–216
    [23]
    Mernik M, Heering J, and Sloane AM When and how to develop domain-specific languages ACM Comput Surv 2005 37 4 316-344
    [24]
    Munro MJ (2005) Product metrics for automatic identification of “bad smell” design problems in java source-code. In: Proceedings of the 11th metrics symposium
    [25]
    Prieto-Díaz R Domain analysis: an introduction Softw Eng Notes 1990 15 2 47-54
    [27]
    Pressman RS (2001) Software engineering—a practitioner’s approach. McGraw-Hill Higher Education, 5th edn. November 2001
    [28]
    Riel AJ Object-oriented design heuristics 1996 Reading Addison Wesley
    [29]
    SemmleCode, October 2007. http://semmle.com/
    [30]
    Swint GS, Pu C, Jung G, Yan W, Koh Y, Wu Q, Consel C, Sahai A, Moriyama K (2005) Clearwater: extensible, flexible, modular code generation. In: Proceedings of the 20th IEEE/ACM ASE conference, pp 144–153
    [31]
    Travassos G, Shull F, Fredericks M, Basili VR (1999) Detecting defects in object-oriented designs: using reading techniques to increase software quality. In: Proceedings of the 14th OOSPLA conference, pp 47–56
    [32]
    Wirfs-Brock R and McKean A Object design: roles, responsibilities and collaborations 2002 Reading Addison-Wesley
    [33]
    Webster BF Pitfalls of object oriented development 1995 New York M&T Books

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Formal Aspects of Computing
    Formal Aspects of Computing  Volume 22, Issue 3
    May 2010
    267 pages
    ISSN:0934-5043
    EISSN:1433-299X
    Issue’s Table of Contents

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 01 May 2010
    Accepted: 21 April 2009
    Received: 10 October 2008
    Published in FAC Volume 22, Issue 3

    Author Tags

    1. Design smells
    2. Antipatterns
    3. Code smells
    4. Domain-specific language
    5. Algorithm generation
    6. Detection
    7. Java

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)25
    • Downloads (Last 6 weeks)4
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Toward a novel taxonomy to capture code smells caused by refactoringScience of Computer Programming10.1016/j.scico.2024.103120236:COnline publication date: 1-Sep-2024
    • (2022)Developers’ perception matters: machine learning to detect developer-sensitive smellsEmpirical Software Engineering10.1007/s10664-022-10234-227:7Online publication date: 12-Oct-2022
    • (2021)Software smell detection techniquesJournal of Software: Evolution and Process10.1002/smr.232033:3Online publication date: 3-Mar-2021
    • (2020)On the Prevalence, Impact, and Evolution of SQL Code Smells in Data-Intensive SystemsProceedings of the 17th International Conference on Mining Software Repositories10.1145/3379597.3387467(327-338)Online publication date: 29-Jun-2020
    • (2020)Bad smell detection using quality metrics and refactoring opportunitiesJournal of Software: Evolution and Process10.1002/smr.225532:8Online publication date: 3-Aug-2020
    • (2014)Optimized Unit Testing for Antipattern DetectionProceedings of the 2014 International Conference on Information and Communication Technology for Competitive Strategies10.1145/2677855.2677909(1-8)Online publication date: 14-Nov-2014
    • (2013)Exploring the impact of inter-smell relations on software maintainability: an empirical studyProceedings of the 2013 International Conference on Software Engineering10.5555/2486788.2486878(682-691)Online publication date: 18-May-2013
    • (2012)FPGA based IR code recognizerProceedings of the 6th WSEAS international conference on Computer Engineering and Applications, and Proceedings of the 2012 American conference on Applied Mathematics10.5555/2209654.2209711(286-291)Online publication date: 25-Jan-2012
    • (2012)Detecting anti-patterns in Java EE runtime system modelProceedings of the Fourth Asia-Pacific Symposium on Internetware10.1145/2430475.2430496(1-8)Online publication date: 30-Oct-2012

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Full Access

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media