Improving design-pattern identification: a new approach and an exploratory study
- 314 Downloads
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.
KeywordsProgram understanding Design patterns Explanation-based constraint programming Metrics Exploratory study
We thank James Bieman, Greg Straw, Huxia Wang, P. Willard, and Roger T. Alexander (2003) for kindly sharing their data. We are grateful to our students, Saliha Bouden, Janice Ka-Yee Ng, Nawfal Chraibi, Duc-Loc Huynh, and Taleb Ikbal, who helped in the creation of the repository. We are indebt with Neil Stewart for his kind helpful comments.
- 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.Google Scholar
- 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.Google Scholar
- Bansiya, J. (1998). Automating design-pattern identification. Dr. Dobb’s Journal. http://www.ddj.com/184410578.
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- Chidamber, S. R., & Kemerer, C. F. (1993). A metrics suite for object-oriented design. Technical Report E53-315, MIT Sloan School of Management.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- Gamma, E., & Eggenschwiler, T. (1998). JHotDraw. members.pingnet.ch/gamma/JHD-5.1.zip.
- Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1994). Design patterns—elements of reusable object-oriented software (1st ed.). Addison-Wesley.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- Junker, U. (2001). QUICKXPLAIN: Conflict detection for arbitrary constraint propagation algorithms. Technical report, Ilog SA.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- Koskinen, J. (2004). Software maintenance costs. http://users.jyu.fi/~koskinen/smcosts.htm.
- 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.Google Scholar
- 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.Google Scholar
- Lorenz, M., & Kidd, J. (1994). Object-oriented software metrics: A practical approach (1st ed.). Prentice-Hall.Google Scholar
- 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.Google Scholar
- Scheglov, K., & Shackelford, J.-M. P. (2004). Eclipse profiler. http://eclipsecolorer.sourceforge.net/index_profiler.html.
- Spinellis, D. (2003). Code reading: The open source perspective (1st ed.). Addison Wesley.Google Scholar
- Stone, M. (1974). Cross-validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society Series B: Statistical Methodology, 36, 111–147.Google Scholar
- Straw, G. B. (2004). Detecting design pattern use in software designs. Master’s thesis, Colorado State University.Google Scholar
- Wilde, N. (1994). Faster reuse and maintenance using software reconnaissance. Technical Report CSE-301, Software Engineering Research Center.Google Scholar
- Witten, I. H., & Frank, E. (1999). Data mining: Practical machine learning tools and techniques with Java implementations (1st ed.). Morgan Kaufmann.Google Scholar
- 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.Google Scholar