Skip to main content
Erschienen in: Software Quality Journal 1/2010

01.03.2010

Improving design-pattern identification: a new approach and an exploratory study

verfasst von: Yann-Gaël Guéhéneuc, Jean-Yves Guyomarc’h, Houari Sahraoui

Erschienen in: Software Quality Journal | Ausgabe 1/2010

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

The identification of occurrences of design patterns in programs can help maintainers to understand the program design and implementation. It can also help them to make informed changes. Current identification approaches are limited to complete occurrences, are time- and resource-consuming, and lead to many false positives. We propose to combine a structural and a numerical approach to improve the identification of complete and incomplete occurrences of design patterns. We develop a structural approach using explanation-based constraint programming and we enhance this approach using experimentally built numerical signatures. We show that the use of numerical signatures improves the identification of complete and incomplete occurrences in terms of performance and precision.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Fußnoten
1
We consider the concept of class extensively, including abstract classes, and interfaces.
 
3
We excluded local classes, i.e. classes defined in methods, because of their rarity.
 
4
The ratio of misclassified false positives is (number of counter-examples in σ classified as playing a role)/(number of counter-examples in σ).
 
5
The error is computed as (number of examples in σ classified as playing a role)/(size of σ).
 
Literatur
Zurück zum Zitat Albin-Amiot, H., Cointe, P., Guéhéneuc, Y.-G., & Jussien, N. (2001). Instantiating and detecting design patterns: Putting bits and pieces together. In D. Richardson, M. Feather, & M. Goedicke (Eds.), Proceedings of the 16th conference on automated software engineering (ASE), November 2001 (pp. 166–173). IEEE Computer Society Press. Albin-Amiot, H., Cointe, P., Guéhéneuc, Y.-G., & Jussien, N. (2001). Instantiating and detecting design patterns: Putting bits and pieces together. In D. Richardson, M. Feather, & M. Goedicke (Eds.), Proceedings of the 16th conference on automated software engineering (ASE), November 2001 (pp. 166–173). IEEE Computer Society Press.
Zurück zum Zitat Antoniol, G., Fiutem, R., & Cristoforetti, L. (1998). Design pattern recovery in object-oriented software. In S. Tilley & G. Visaggio (Eds.), Proceedings of the 6th international workshop on program comprehension (pp. 153–160). IEEE Computer Society Press. Antoniol, G., Fiutem, R., & Cristoforetti, L. (1998). Design pattern recovery in object-oriented software. In S. Tilley & G. Visaggio (Eds.), Proceedings of the 6th international workshop on program comprehension (pp. 153–160). IEEE Computer Society Press.
Zurück zum Zitat Bayardo, R. J. Jr., & Miranker, D. P. (1996). A complexity analysis of space-bounded learning algorithms for the constraint satisfaction problem. In D. Weld & B. Clancey (Eds.), Proceedings of the 13th national conference on artificial intelligence (pp. 298–304). AAAI Press, The MIT Press. Bayardo, R. J. Jr., & Miranker, D. P. (1996). A complexity analysis of space-bounded learning algorithms for the constraint satisfaction problem. In D. Weld & B. Clancey (Eds.), Proceedings of the 13th national conference on artificial intelligence (pp. 298–304). AAAI Press, The MIT Press.
Zurück zum Zitat Beyer, D., Noack, A., & Lewerentz, C. (2005). Efficient relational calculation for software analysis. Transactions on Software Engineering, 31(2), 137–149.CrossRef Beyer, D., Noack, A., & Lewerentz, C. (2005). Efficient relational calculation for software analysis. Transactions on Software Engineering, 31(2), 137–149.CrossRef
Zurück zum Zitat Bieman, J., Straw, G., Wang, H., Munger, P. W., & Alexander, R. T. (2003). Design patterns and change proneness: An examination of five evolving systems. In M. Berry & W. Harrison (Eds.), Proceedings of the 9th international software metrics symposium (pp. 40–49). IEEE Computer Society Press. Bieman, J., Straw, G., Wang, H., Munger, P. W., & Alexander, R. T. (2003). Design patterns and change proneness: An examination of five evolving systems. In M. Berry & W. Harrison (Eds.), Proceedings of the 9th international software metrics symposium (pp. 40–49). IEEE Computer Society Press.
Zurück zum Zitat Boehm, B. (1976). Software engineering. IEEE Transactions on Computers, 25(12), 1226–1241.MATHCrossRef Boehm, B. (1976). Software engineering. IEEE Transactions on Computers, 25(12), 1226–1241.MATHCrossRef
Zurück zum Zitat Briand, L., Devanbu, P., & Melo, W. (1997a). An investigation into coupling measures for C++. In Adrion W. R. (Ed.), Proceedings of the 19th international conference on software engineering (pp. 412–421). ACM Press. Briand, L., Devanbu, P., & Melo, W. (1997a). An investigation into coupling measures for C++. In Adrion W. R. (Ed.), Proceedings of the 19th international conference on software engineering (pp. 412–421). ACM Press.
Zurück zum Zitat Briand, L. C., Daly, J. W., & Wüst, J. K. (1997b). A unified framework for cohesion measurement. In S. L. Pfleeger & L. Ott (Eds.), Proceedings of the 4th international software metrics symposium (pp. 43–53). IEEE Computer Society Press. Briand, L. C., Daly, J. W., & Wüst, J. K. (1997b). A unified framework for cohesion measurement. In S. L. Pfleeger & L. Ott (Eds.), Proceedings of the 4th international software metrics symposium (pp. 43–53). IEEE Computer Society Press.
Zurück zum Zitat Brown, K. (1996). Design reverse-engineering and automated design pattern detection in Smalltalk. Technical Report TR-96-07, Department of Computer Science, University of Illinois at Urbana-Champaign. Brown, K. (1996). Design reverse-engineering and automated design pattern detection in Smalltalk. Technical Report TR-96-07, Department of Computer Science, University of Illinois at Urbana-Champaign.
Zurück zum Zitat Chidamber, S. R., & Kemerer, C. F. (1993). A metrics suite for object-oriented design. Technical Report E53-315, MIT Sloan School of Management. Chidamber, S. R., & Kemerer, C. F. (1993). A metrics suite for object-oriented design. Technical Report E53-315, MIT Sloan School of Management.
Zurück zum Zitat Ciupke, O. (1999). Automatic detection of design problems in object-oriented reengineering. In D. Firesmith (Ed.), Proceeding of 30th conference on technology of object-oriented languages and systems (pp.18–32). IEEE Computer Society Press. Ciupke, O. (1999). Automatic detection of design problems in object-oriented reengineering. In D. Firesmith (Ed.), Proceeding of 30th conference on technology of object-oriented languages and systems (pp.18–32). IEEE Computer Society Press.
Zurück zum Zitat Corbi, T. A. (1989). Program understanding: Challenge for the 1990’s. IBM Systems Journal, 28(2), 294–306.CrossRef Corbi, T. A. (1989). Program understanding: Challenge for the 1990’s. IBM Systems Journal, 28(2), 294–306.CrossRef
Zurück zum Zitat Eppstein, D. (1995). Subgraph isomorphism in planar graphs and related problems. In K. Clarkson (Ed.), Proceedings of the 6th annual symposium on discrete algorithms (pp. 632–640). ACM Press. Eppstein, D. (1995). Subgraph isomorphism in planar graphs and related problems. In K. Clarkson (Ed.), Proceedings of the 6th annual symposium on discrete algorithms (pp. 632–640). ACM Press.
Zurück zum Zitat Fabry, J., & Mens, T. (2004). Language-independent detection of object-oriented design patterns. Computer Languages, Systems, and Structures, 30(1–2), 21–33.CrossRef Fabry, J., & Mens, T. (2004). Language-independent detection of object-oriented design patterns. Computer Languages, Systems, and Structures, 30(1–2), 21–33.CrossRef
Zurück zum Zitat Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design patterns—elements of reusable object-oriented software (1st ed.). Addison-Wesley. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design patterns—elements of reusable object-oriented software (1st ed.). Addison-Wesley.
Zurück zum Zitat Guéhéneuc, Y.-G., & Albin-Amiot, H. (2001). Using design patterns and constraints to automate the detection and correction of inter-class design defects. In Q. Li, R. Riehle, G. Pour, & B. Meyer (Eds.), Proceedings of the 39th conference on the technology of object-oriented languages and systems (TOOLS USA) (pp. 296–305). IEEE Computer Society Press. Guéhéneuc, Y.-G., & Albin-Amiot, H. (2001). Using design patterns and constraints to automate the detection and correction of inter-class design defects. In Q. Li, R. Riehle, G. Pour, & B. Meyer (Eds.), Proceedings of the 39th conference on the technology of object-oriented languages and systems (TOOLS USA) (pp. 296–305). IEEE Computer Society Press.
Zurück zum Zitat Guéhéneuc, Y.-G., & Albin-Amiot, H. (2004). Recovering binary class relationships: Putting icing on the UML cake. In D. C. Schmidt (Ed.), Proceedings of the 19th conference on object-oriented programming, systems, languages, and applications (OOPSLA) (pp. 301–314). ACM Press. Guéhéneuc, Y.-G., & Albin-Amiot, H. (2004). Recovering binary class relationships: Putting icing on the UML cake. In D. C. Schmidt (Ed.), Proceedings of the 19th conference on object-oriented programming, systems, languages, and applications (OOPSLA) (pp. 301–314). ACM Press.
Zurück zum Zitat Guéhéneuc, Y.-G., & Antoniol, G. (2008). DeMIMA: A multi-layered framework for design pattern identification. Transactions on Software Engineering (TSE), 34(5), 667–684. Guéhéneuc, Y.-G., & Antoniol, G. (2008). DeMIMA: A multi-layered framework for design pattern identification. Transactions on Software Engineering (TSE), 34(5), 667–684.
Zurück zum Zitat Guéhéneuc, Y.-G., & Jussien, N. (2001). Using explanations for design-patterns identification. In C. Bessière (Ed.), Proceedings of the 1st IJCAI workshop on modeling and solving problems with constraints (pp 57–64). AAAI Press. Guéhéneuc, Y.-G., & Jussien, N. (2001). Using explanations for design-patterns identification. In C. Bessière (Ed.), Proceedings of the 1st IJCAI workshop on modeling and solving problems with constraints (pp 57–64). AAAI Press.
Zurück zum Zitat Guéhéneuc, Y.-G., Sahraoui, H., & Zaidi, F. (2004). Fingerprinting design patterns. In E. Stroulia & A. de Lucia, (Eds.), Proceedings of the 11th working conference on reverse engineering (WCRE) (pp.172–181). IEEE Computer Society Press. Guéhéneuc, Y.-G., Sahraoui, H., & Zaidi, F. (2004). Fingerprinting design patterns. In E. Stroulia & A. de Lucia, (Eds.), Proceedings of the 11th working conference on reverse engineering (WCRE) (pp.172–181). IEEE Computer Society Press.
Zurück zum Zitat Heuzeroth, D., Holl, T., & Löwe, W. (2002). Combining static and dynamic analyses to detect interaction patterns. In H. Ehrig, B. J. Krämer, & A. Ertas (Eds.), Proceedings the 6th world conference on integrated design and process technology. Society for Design and Process Science. Heuzeroth, D., Holl, T., & Löwe, W. (2002). Combining static and dynamic analyses to detect interaction patterns. In H. Ehrig, B. J. Krämer, & A. Ertas (Eds.), Proceedings the 6th world conference on integrated design and process technology. Society for Design and Process Science.
Zurück zum Zitat Hitz, M., & Montazeri, B. (1995). Measuring coupling and cohesion in object-oriented systems. In Proceedings of the 3rd intermational symposium on applied corporate computing (pp. 25–27). Texas A&M University. Hitz, M., & Montazeri, B. (1995). Measuring coupling and cohesion in object-oriented systems. In Proceedings of the 3rd intermational symposium on applied corporate computing (pp. 25–27). Texas A&M University.
Zurück zum Zitat Jahnke, J. H., & Zündorf, A. (1997). Rewriting poor design patterns by good design patterns. In S. Demeyer & H. C. Gall (Eds.), Proceedings the 1st ESEC/FSE workshop on object-oriented reengineering. Distributed Systems Group, Technical University of Vienna. TUV-1841-97-10. Jahnke, J. H., & Zündorf, A. (1997). Rewriting poor design patterns by good design patterns. In S. Demeyer & H. C. Gall (Eds.), Proceedings the 1st ESEC/FSE workshop on object-oriented reengineering. Distributed Systems Group, Technical University of Vienna. TUV-1841-97-10.
Zurück zum Zitat Junker, U. (2001). QUICKXPLAIN: Conflict detection for arbitrary constraint propagation algorithms. Technical report, Ilog SA. Junker, U. (2001). QUICKXPLAIN: Conflict detection for arbitrary constraint propagation algorithms. Technical report, Ilog SA.
Zurück zum Zitat Jussien, N., & Barichard, V. (2000). The PaLM system: Explanation-based constraint programming. In N. Beldiceanu, W. Harvey, M. Henz, F. Laburthe, E. Monfroy, T. Müller, L. Perron, & C. Schulte (Eds.), Proceedings of TRICS: Techniques for implementing constraint programming systems (pp. 118–133). School of Computing, National University of Singapore, Singapore. TRA9/00. Jussien, N., & Barichard, V. (2000). The PaLM system: Explanation-based constraint programming. In N. Beldiceanu, W. Harvey, M. Henz, F. Laburthe, E. Monfroy, T. Müller, L. Perron, & C. Schulte (Eds.), Proceedings of TRICS: Techniques for implementing constraint programming systems (pp. 118–133). School of Computing, National University of Singapore, Singapore. TRA9/00.
Zurück zum Zitat Keller, R. K., Schauer, R., Robitaille, S., & Pagé, P. (1999). Pattern-based reverse-engineering of design components. In D. Garlan & J. Kramer (Eds.), Proceedings of the 21st international conference on software engineering (pp. 226–235). ACM Press. Keller, R. K., Schauer, R., Robitaille, S., & Pagé, P. (1999). Pattern-based reverse-engineering of design components. In D. Garlan & J. Kramer (Eds.), Proceedings of the 21st international conference on software engineering (pp. 226–235). ACM Press.
Zurück zum Zitat Kohavi, R. (1995). A study of cross-validation and bootstrap for accuracy estimation and model selection. In Proceedings of the 14th international joint conference on artificial intelligence (pp. 1137–1145). Morgan Kaufmann. Kohavi, R. (1995). A study of cross-validation and bootstrap for accuracy estimation and model selection. In Proceedings of the 14th international joint conference on artificial intelligence (pp. 1137–1145). Morgan Kaufmann.
Zurück zum Zitat Krämer, C., & Prechelt, L. (1996). Design recovery by automated search for structural design patterns in object-oriented software. In L. M. Wills & I. Baxter (Eds.), Proceedings of the 3rd working conference on reverse engineering (pp. 208–215). IEEE Computer Society Press. Krämer, C., & Prechelt, L. (1996). Design recovery by automated search for structural design patterns in object-oriented software. In L. M. Wills & I. Baxter (Eds.), Proceedings of the 3rd working conference on reverse engineering (pp. 208–215). IEEE Computer Society Press.
Zurück zum Zitat Labuthe, F. (2000). Choco: Implementing a CP kernel. In N. Beldiceanu (Ed.), Proceedings of the 1st workshop on techniques for implementing constraint programming systems, CP’00 at Singapore. Labuthe, F. (2000). Choco: Implementing a CP kernel. In N. Beldiceanu (Ed.), Proceedings of the 1st workshop on techniques for implementing constraint programming systems, CP’00 at Singapore.
Zurück zum Zitat Lorenz, M., & Kidd, J. (1994). Object-oriented software metrics: A practical approach (1st ed.). Prentice-Hall. Lorenz, M., & Kidd, J. (1994). Object-oriented software metrics: A practical approach (1st ed.). Prentice-Hall.
Zurück zum Zitat Ng, K.-Y., & Guéhéneuc, Y.-G. (2007). Identification of behavioral and creational design patterns through dynamic analysis. In A. Zaidman, A. Hamou-Lhadj, & O. Greevy (Eds.), Proceedings of the 3rd international workshop on program comprehension through dynamic analysis (PCODA) (pp. 34–42). Delft University of Technology. TUD-SERG-2007-022. Ng, K.-Y., & Guéhéneuc, Y.-G. (2007). Identification of behavioral and creational design patterns through dynamic analysis. In A. Zaidman, A. Hamou-Lhadj, & O. Greevy (Eds.), Proceedings of the 3rd international workshop on program comprehension through dynamic analysis (PCODA) (pp. 34–42). Delft University of Technology. TUD-SERG-2007-022.
Zurück zum Zitat Quilici, A., Yang, Q., & Woods, S. (1997). Applying plan recognition algorithms to program understanding. Journal of Automated Software Engineering, 5(3), 347–372.CrossRef Quilici, A., Yang, Q., & Woods, S. (1997). Applying plan recognition algorithms to program understanding. Journal of Automated Software Engineering, 5(3), 347–372.CrossRef
Zurück zum Zitat Schiex, T., & Verfaillie, G. (1994). Nogood recording for static and dynamic constraint satisfaction problems. International Journal of Artificial Intelligence Tools, 3(2), 187–207.CrossRef Schiex, T., & Verfaillie, G. (1994). Nogood recording for static and dynamic constraint satisfaction problems. International Journal of Artificial Intelligence Tools, 3(2), 187–207.CrossRef
Zurück zum Zitat Spinellis, D. (2003). Code reading: The open source perspective (1st ed.). Addison Wesley. Spinellis, D. (2003). Code reading: The open source perspective (1st ed.). Addison Wesley.
Zurück zum Zitat Stone, M. (1974). Cross-validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society Series B: Statistical Methodology, 36, 111–147. Stone, M. (1974). Cross-validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society Series B: Statistical Methodology, 36, 111–147.
Zurück zum Zitat Straw, G. B. (2004). Detecting design pattern use in software designs. Master’s thesis, Colorado State University. Straw, G. B. (2004). Detecting design pattern use in software designs. Master’s thesis, Colorado State University.
Zurück zum Zitat Tegarden, D. P., Sheetz, S. D., & Monarchi, D. E. (1995). A software complexity model of object-oriented systems. Decision Support Systems, 13(3–4), 241–262.CrossRef Tegarden, D. P., Sheetz, S. D., & Monarchi, D. E. (1995). A software complexity model of object-oriented systems. Decision Support Systems, 13(3–4), 241–262.CrossRef
Zurück zum Zitat Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., & Halkidis, S. (2006). Design pattern detection using similarity scoring. Transactions on Software Engineering, 32(11), 896–909.CrossRef Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., & Halkidis, S. (2006). Design pattern detection using similarity scoring. Transactions on Software Engineering, 32(11), 896–909.CrossRef
Zurück zum Zitat Wilde, N. (1994). Faster reuse and maintenance using software reconnaissance. Technical Report CSE-301, Software Engineering Research Center. Wilde, N. (1994). Faster reuse and maintenance using software reconnaissance. Technical Report CSE-301, Software Engineering Research Center.
Zurück zum Zitat Witten, I. H., & Frank, E. (1999). Data mining: Practical machine learning tools and techniques with Java implementations (1st ed.). Morgan Kaufmann. Witten, I. H., & Frank, E. (1999). Data mining: Practical machine learning tools and techniques with Java implementations (1st ed.). Morgan Kaufmann.
Zurück zum Zitat Wuyts, R. (1998). Declarative reasoning about the structure of object-oriented systems. In J. Gil (Ed.), Proceedings of the 26th conference on the technology of object-oriented languages and systems (pp. 112–124). IEEE Computer Society Press. Wuyts, R. (1998). Declarative reasoning about the structure of object-oriented systems. In J. Gil (Ed.), Proceedings of the 26th conference on the technology of object-oriented languages and systems (pp. 112–124). IEEE Computer Society Press.
Metadaten
Titel
Improving design-pattern identification: a new approach and an exploratory study
verfasst von
Yann-Gaël Guéhéneuc
Jean-Yves Guyomarc’h
Houari Sahraoui
Publikationsdatum
01.03.2010
Verlag
Springer US
Erschienen in
Software Quality Journal / Ausgabe 1/2010
Print ISSN: 0963-9314
Elektronische ISSN: 1573-1367
DOI
https://doi.org/10.1007/s11219-009-9082-y

Weitere Artikel der Ausgabe 1/2010

Software Quality Journal 1/2010 Zur Ausgabe

EditorialNotes

In this issue

Premium Partner