Abstract

Design pattern detection can provide useful insights to support software comprehension. Accurate and complete detection of pattern instances are extremely important to enable software usability improvements. However, existing design pattern detection approaches and tools suffer from the following problems: incomplete description of design pattern instances, inaccurate behavioral constraint checking, and inability to support novel design patterns. This paper presents a general framework to detect design patterns while solving these issues by combining static and dynamic analysis techniques. The framework has been instantiated for typical behavioral and creational patterns, such as the observer pattern, state pattern, strategy pattern, and singleton pattern to demonstrate the applicability. Based on the open-source process mining toolkit ProM, we have developed an integrated tool that supports the whole detection process for these patterns. We applied and evaluated the framework using software execution data containing around 1,000,000 method calls generated from eight synthetic software systems and three open-source software systems. The evaluation results show that our approach can guarantee a higher precision and recall than existing approaches and can distinguish state and strategy patterns that are indistinguishable by the state-of-the-art.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call