Clone Detection for Graph-Based Model Transformation Languages

  • Daniel Strüber
  • Jennifer Plöger
  • Vlad Acreţoaie
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9765)

Abstract

Cloning is a convenient mechanism to enable reuse across and within software artifacts. On the downside, it is also a practice related to significant long-term maintainability impediments, thus generating a need to identify clones in affected artifacts. A large variety of clone detection techniques has been proposed for programming and modeling languages; yet no specific ones have emerged for model transformation languages. In this paper, we explore clone detection for graph-based model transformation languages. We introduce potential use cases for such techniques in the context of constructive and analytical quality assurance. From these use cases, we derive a set of key requirements. We describe our customization of existing model clone detection techniques allowing us to address these requirements. Finally, we provide an experimental evaluation, indicating that our customization of ConQAT, one of the existing techniques, is well-suited to satisfy all identified requirements.

References

  1. 1.
    Glass, R.L.: Frequently forgotten fundamental facts about software engineering. IEEE Softw. 3, 110–112 (2001)Google Scholar
  2. 2.
    Koschke, R.: Survey of research on software clones. In: Dagstuhl Seminar 06301: Duplication, Redundancy, and Similarity in Software. LZI (2007)Google Scholar
  3. 3.
    Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (2002)CrossRefMATHGoogle Scholar
  4. 4.
    Kim, M., Sazawal, V., Notkin, D., Murphy, G.: An empirical study of code clone genealogies. In: ACM SIGSOFT Software Engineering Notes, vol. 30, no. 5, pp. 187–196. ACM (2005)Google Scholar
  5. 5.
    Roy, C.K., Cordy, J.R., Koschke, R.: Comparison and evaluation of code clone detection techniques and tools: a qualitative approach. Sci. Comput. Program. 74(7), 470–495 (2009)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Rattan, D., Bhatia, R., Singh, M.: Software clone detection: a systematic review. Inf. Softw. Technol. 55(7), 1165–1199 (2013)CrossRefGoogle Scholar
  7. 7.
    Kusel, A., Schönböck, J., Wimmer, M., Kappel, G., Retschitzegger, W., Schwinger, W.: Reuse in model-to-model transformation languages: are we there yet? Softw. Syst. Model. 14(2), 537–572 (2013)CrossRefGoogle Scholar
  8. 8.
    Czarnecki, K., Helsen, S.: Classification of model transformation approaches. In: Workshop on Generative Techniques in the Context of the Model Driven Architecture, vol. 45, no. 3, pp. 1–17 USA (2003)Google Scholar
  9. 9.
    Strüber, D., Rubin, J., Arendt, T., Chechik, M., Taentzer, G., Plöger, J.: RuleMerger: automatic construction of variability-based model transformation rules. In: Stevens, P., Wasowski, A. (eds.) FASE 2016. LNCS, vol. 9633, pp. 122–140. Springer, Heidelberg (2016)CrossRefGoogle Scholar
  10. 10.
    Strüber, D.: Model-driven engineering in the large: refactoring techniques for models and model transformation systems, Ph.D. dissertation. Philipps-Universität Marburg (2016)Google Scholar
  11. 11.
    Wimmer, M., Kappel, G., Kusel, A., Retschitzegger, W., Schönböck, J., Schwinger, W., Kolovos, D.S., Paige, R.F., Lauder, M., Schürr, A., et al.: Surveying rule inheritance in model-to-model transformation languages. J. Object Technol. 11(2), 1–46 (2012)Google Scholar
  12. 12.
    Anjorin, A., Saller, K., Lochau, M., Schürr, A.: Modularizing triple graph grammars using rule refinement. In: Gnesi, S., Rensink, A. (eds.) FASE 2014 (ETAPS). LNCS, vol. 8411, pp. 340–354. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  13. 13.
    Strüber, D., Rubin, J., Chechik, M., Taentzer, G.: A variability-based approach to reusable and efficient model transformations. In: Egyed, A., Schaefer, I. (eds.) FASE 2015. LNCS, vol. 9033, pp. 283–298. Springer, Heidelberg (2015)Google Scholar
  14. 14.
    Nguyen, H.A., Nguyen, T.T., Pham, N.H., Al-Kofahi, J., Nguyen, T.N.: Clone management for evolving software. IEEE Trans. Softw. Eng. 38(5), 1008–1026 (2012)CrossRefGoogle Scholar
  15. 15.
    Narasimhan, K., Reichenbach, C.: Copy and paste redeemed. In: International Conference on Automated Software Engineering, pp. 630–640. IEEE (2015)Google Scholar
  16. 16.
    Lano, K., Kolahdouz-Rahimi, S.: Model-transformation design patterns. IEEE Trans. Softw. Eng. 40(12), 1224–1259 (2014)CrossRefGoogle Scholar
  17. 17.
    Blouin, D., Plantec, A., Dissaux, P., Singhoff, F., Diguet, J.-P.: Synchronization of models of rich languages with triple graph grammars: an experience report. In: Di Ruscio, D., Varró, D. (eds.) ICMT 2014. LNCS, vol. 8568, pp. 106–121. Springer, Heidelberg (2014)Google Scholar
  18. 18.
    Heckel, R., Küster, J.M., Taentzer, G.: Confluence of typed attributed graph transformation systems. In: Corradini, A., Ehrig, H., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2002. LNCS, vol. 2505, pp. 161–176. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  19. 19.
    Beller, M., Zaidman, A., Karpov, A.: The last line effect. In: International Conference on Program Comprehension, pp. 240–243. IEEE Press (2015)Google Scholar
  20. 20.
    Bauer, J., Boneva, I., Kurbán, M.E., Rensink, A.: A modal-logic based graph abstraction. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214, pp. 321–335. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  21. 21.
    Cuadrado, J.S., Guerra, E., De Lara, J.: Generic model transformations: write once, reuse everywhere. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 62–77. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  22. 22.
    Störrle, H.: Towards clone detection in UML domain models. J. Softw. Syst. Model. 12(2), 307–329 (2013)CrossRefGoogle Scholar
  23. 23.
    Tichy, M., Krause, C., Liebel, G.: Detecting performance bad smells for Henshin model transformations. In: AMT Workshop 1077 (2013)Google Scholar
  24. 24.
    Störrle, H.: On the impact of layout quality to understanding UML diagrams: size matters. In: Dingel, J., Schulte, W., Ramos, I., Abrehäo, S., Insfran, E. (eds.) MODELS 2014. LNCS, vol. 8767, pp. 518–534. Springer, Heidelberg (2014)Google Scholar
  25. 25.
    Yan, X., Han, J.: gspan: graph-based substructure pattern mining. In: ICDM 2003, pp. 721–724. IEEE (2002)Google Scholar
  26. 26.
    Pham, N.H., Nguyen, H.A., Nguyen, T.T., Al-Kofahi, J.M., Nguyen, T.N.: Complete and accurate clone detection in graph-based models. In: International Conference on Software Engineering, pp. 276–286. IEEE (2009)Google Scholar
  27. 27.
    Deissenboeck, F., Hummel, B., Juergens, E., Pfaehler, M., Schaetz, B.: Model clone detection in practice. In: Workshops on Software Clones, pp. 57–64. ACM (2010)Google Scholar
  28. 28.
    Arendt, T., Biermann, E., Jurack, S., Krause, C., Taentzer, G.: Henshin: advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010. LNCS, vol. 6394. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  29. 29.
    Arendt, T., Habel, A., Radke, H., Taentzer, G.: From core OCL invariants to nested graph constraints. In: Giese, H., König, B. (eds.) ICGT 2014. LNCS, vol. 8571, pp. 97–112. Springer, Heidelberg (2014)Google Scholar
  30. 30.
    Bürdek, J., Kehrer, T., Lochau, M., Reuling, D., Kelter, U., Schürr, A.: Reasoning about product-line evolution using complex feature model differences. J. Autom. Softw. Eng. 1–47 (2015). doi:10.1007/s10515-015-0185-3
  31. 31.
    Strüber, D., Schulz, S.: A tool environment for managing families of model transformation rules. In: International Conference on Graph Transformation. Springer (2016)Google Scholar
  32. 32.
    Störrle, H.: Effective and efficient model clone detection. In: De Nicola, R., Hennicker, R. (eds.) Wirsing Festschrift. LNCS, vol. 8950, pp. 440–457. Springer, Heidelberg (2015)Google Scholar
  33. 33.
    Ekanayake, C.C., Dumas, M., García-Bañuelos, L., La Rosa, M., ter Hofstede, A.H.M.: Approximate clone detection in repositories of business process models. In: Barros, A., Gal, A., Kindler, E. (eds.) BPM 2012. LNCS, vol. 7481, pp. 302–318. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  34. 34.
    Liang, Z., Cheng, Y., Chen, J.: A novel optimized path-based algorithm for model clone detection. J. Softw. 9(7), 1810–1817 (2014)Google Scholar
  35. 35.
    Alalfi, M.H., Cordy, J.R., Dean, T.R., Stephan, M., Stevenson, A.: Models are code too: near-miss clone detection for simulink models. In: International Conference on Software Maintenance, pp. 295–304. IEEE (2012)Google Scholar
  36. 36.
    Van Amstel, M.F., Van Den Brand, M.G.: Model transformation analysis: staying ahead of the maintenance nightmare. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 108–122. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  37. 37.
    Kapová, L., Goldschmidt, T., Becker, S., Henss, J.: Evaluating maintainability with code metrics for model-to-model transformations. In: Heineman, G.T., Kofron, J., Plasil, F. (eds.) QoSA 2010. LNCS, vol. 6093, pp. 151–166. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  38. 38.
    Wimmer, M., Perez, S.M., Jouault, F., Cabot, J.: A catalogue of refactorings for model-to-model transformations. J. Object Technol. 11(2), 1–40 (2012)Google Scholar
  39. 39.
    Gerpheide, C.M., Schiffelers, R.R., Serebrenik, A.: Assessing and improving quality of QVTo model transformations. Softw. Qual. J. 1–38 (2015). doi:10.1007/s11219-015-9280-8

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Daniel Strüber
    • 1
  • Jennifer Plöger
    • 1
  • Vlad Acreţoaie
    • 2
  1. 1.Philipps-University MarburgMarburgGermany
  2. 2.Technical University of DenmarkKgs. LyngbyDenmark

Personalised recommendations