Supporting Framework Use via Automatically Extracted Concept-Implementation Templates

  • Abbas Heydarnoori
  • Krzysztof Czarnecki
  • Thiago Tonelli Bartolomei
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5653)


Application frameworks provide reusable concepts that are instantiated in application code through potentially complex implementation steps such as subclassing, implementing callbacks, and making calls. Existing applications contain valuable examples of such steps, except that locating them in the application code is often challenging. We propose the notion of concept implementation templates, which summarize the necessary implementation steps, and an approach to automatic extraction of such templates from traces of sample applications. We demonstrate the feasibility of the template extraction with high precision and recall through an empirical study with twelve realistic concepts from four widely-used frameworks. Finally, we report on a user experiment with twelve subjects in which the choice of templates vs. documentation had much less impact on development time than the concept complexity.


Sample Application Application Code Implementation Step Reference Template Template Extraction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Gamma, E., Beck, K.: Contributing to Eclipse: Principles, Patterns, and Plugins. Addison-Wesley, Reading (2003)Google Scholar
  2. 2.
    Holmes, R., Murphy, G.C.: Using structural context to recommend source code examples. In: ICSE (2005)Google Scholar
  3. 3.
    Bruch, M., Schafer, T., Mezini, M.: FrUiT: IDE support for framework understanding. In: ETX (2006)Google Scholar
  4. 4.
    Zhao, W., Zhang, L., Liu, Y., Sun, J., Yang, F.: SNIAFL: Towards a static noninteractive approach to feature location. TOSEM 15(2) (2006)Google Scholar
  5. 5.
    Liu, D., Marcus, A., Poshyvanyk, D., Rajlich, V.: Feature location via information retrieval based filtering of a single scenario execution trace. In: ASE (2007)Google Scholar
  6. 6.
    Heydarnoori, A.: Supporting Framework Use via Automatically Extracted Concept-Implementation Templates. PhD thesis, University of Waterloo, Canada (February 2009)Google Scholar
  7. 7.
    Heydarnoori, A., Bartolomei, T.T., Czarnecki, K.: Comprehending object-oriented software frameworks API through dynamic analysis. Technical Report CS-2007-18, School of Computer Science, University of Waterloo (2007)Google Scholar
  8. 8.
    Montgomery, D.C.: Design and analysis of experiments, 6th edn. Wiley, Chichester (2004)Google Scholar
  9. 9.
    Hedges, L.V.: Distribution theory for Glass’s estimator of effect size and related estimators. Journal of Educational Statistics 6(2) (1981)Google Scholar
  10. 10.
    Generative Software Development Lab: FUDA supporting material (2008),
  11. 11.
    Antkiewicz, M., Bartolomei, T.T., Czarnecki, K.: Automatic extraction of framework-specific models from framework-based application code. In: ASE (2007)Google Scholar
  12. 12.
    Steyaert, P., Lucas, C., Mens, K., D’Hondt, T.: Reuse contracts: managing the evolution of reusable assets. In: OOPSLA (1996)Google Scholar
  13. 13.
    Hondt, K.D.: A Novel Approach to Architectural Recovery in Evolving Object-Oriented Systems. PhD thesis, Vrije Universiteit Brussel, Belgium (1998)Google Scholar
  14. 14.
    Sahavechaphan, N., Claypool, K.: XSnippet: Mining for sample code. In: OOPSLA (2006)Google Scholar
  15. 15.
    Mandelin, D., Xu, L., Bodík, R., Kimelman, D.: Jungloid mining: Helping to navigate the API jungle. In: PLDI (2005)Google Scholar
  16. 16.
    Thummalapenta, S., Xie, T.: PARSEWeb: A programmer assistant for reusing open source code on the web. In: ASE (2007)Google Scholar
  17. 17.
    Wasylkowski, A., Zeller, A., Lindig, C.: Detecting object usage anomalies. In: FSE (2007)Google Scholar
  18. 18.
    Ramanathan, M.K., Grama, A., Jagannathan, S.: Path-sensitive inference of function precedence protocols. In: ICSE (2007)Google Scholar
  19. 19.
    Yang, J., Evans, D., Bhardwaj, D., Bhat, T., Das, M.: Perracotta: Mining temporal API rules from imperfect traces. In: ICSE (2006)Google Scholar
  20. 20.
    Lo, D., Khoo, S.C., Liu, C.: Efficient mining of iterative patterns for software specification discovery. In: KDD (2007)Google Scholar
  21. 21.
    Sankaranarayanan, S., Ivanči, F., Gupta, A.: Mining library specifications using inductive logic programming. In: ICSE (2008)Google Scholar
  22. 22.
    Wilde, N., Scully, M.C.: Software reconnaissance: Mapping program features to code. JSM 7(1) (1995)Google Scholar
  23. 23.
    Eisenbarth, T., Koschke, R., Simon, D.: Locating features in source code. TSE 29(3) (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Abbas Heydarnoori
    • 1
  • Krzysztof Czarnecki
    • 1
  • Thiago Tonelli Bartolomei
    • 1
  1. 1.Generative Software Development LabUniversity of WaterlooCanada

Personalised recommendations