Identifying Variability in Object-Oriented Code Using Model-Based Code Mining

  • David WilleEmail author
  • Michael Tiede
  • Sandro Schulze
  • Christoph Seidl
  • Ina Schaefer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9953)


A large set of object-oriented programming (OOP) languages exists to realize software for different purposes. Companies often create variants of their existing software by copying and modifying them to changed requirements. While these so-called clone-and-own approaches allow to save money in short-term, they expose the company to severe risks regarding long-term evolution and product quality. The main reason is the high manual maintenance effort which is needed due to the unknown relations between variants. In this paper, we introduce a model-based approach to identify variability information for OOP code, allowing companies to better understand and manage variability between their variants. This information allows to improve maintenance of the variants and to transition from single variant development to more elaborate reuse strategies such as software product lines. We demonstrate the applicability of our approach by means of a case study analyzing variants generated from an existing software product line and comparing our findings to the managed reuse strategy.


Source Code Software Product Line Code Variant Concrete Syntax Clone Detection 
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.


  1. 1.
    Antkiewicz, M., Ji, W., Berger, T., Czarnecki, K., Schmorleiz, T., Lammel, R., Stănciulescu, S., Wąsowski, A., Schaefer, I.: Flexible product line engineering with a virtual platform. In: Proceedings of the International Conference on Software Engineering (ICSE), ICSE 2014, pp. 532–535. ACM (2014)Google Scholar
  2. 2.
    Duszynski, S., Knodel, J., Becker, M.: Analyzing the source code of multiple software variants for reuse potential. In: Proceedings of the Working Conference on Reverse Engineering (WCRE), WCRE 2011. IEEE, pp. 303–307 (2011)Google Scholar
  3. 3.
    Frenzel, P., Koschke, R., Breu, A.P.J., Angstmann, K.: Method for consolidating software variants into product lines. Softw. Qual. J. 17(4), 331–366 (2009)CrossRefGoogle Scholar
  4. 4.
    Hemel, A., Koschke, R.: Reverse engineering variability in source code using clone detection: a case study for linux variants of consumer electronic devices. In: Proceedings of the Working Conference on Reverse Engineering (WCRE), WCRE 2012, pp. 357–366. IEEE (2012)Google Scholar
  5. 5.
    Kapser, C., Godfrey, M.W.: “Cloning Considered Harmful” considered harmful. In: Proceedings of the Working Conference on Reverse Engineering (WCRE), WCRE 2006, pp. 19–28. IEEE (2006)Google Scholar
  6. 6.
    Klatt, B., Krogmann, K., Seidl, C.: Program dependency analysis for consolidating customized product copies. In: Proceedings of the International Conference on Software Maintenance and Evolution (ICSME), ICSME 2014, pp. 496–500. IEEE (2014)Google Scholar
  7. 7.
    Koschke, R.: Survey of research on software clones. In: Duplication, Redundancy, and Similarity in Software. Dagstuhl Seminar Proceedings 06301. Internationales Begegnungs- und Forschungszentrum fur Informatik (IBFI), Schloss Dagstuhl, Germany, Dagstuhl, Germany (2007)Google Scholar
  8. 8.
    Krieter, S., Schroter, R., Fenske, W., Saake, G.: Use-case-specific source- code documentation for feature-oriented programming. In: Proceedings of the International Workshop on Variability Modeling in Software-intensive Systems (VaMoS), VaMoS 2015, pp. 27:27–27:34. ACM (2015)Google Scholar
  9. 9.
    Levenshtein, V.I.: Binary codes capable of correcting deletions, insertions, reversals. Soviet Phys. Doklady 10(8) (1966)Google Scholar
  10. 10.
    Linsbauer, L., Lopez-Herrejon, R.E., Egyed, A.: Variability extraction, modeling for product variants. Softw. Syst. Model., 1–21 (2016)Google Scholar
  11. 11.
    Martinez, J., Ziadi, T., Bissyande, T.F., Klein, J., Le Traon, Y.: Bottomup adoption of software product lines: a generic and extensible approach. In: Proceedings of the International Software Product Line Conference (SPLC), SPLC 2015, pp. 101–110. ACM (2015)Google Scholar
  12. 12.
    Monden, A., Nakae, D., Kamiya, T., Sato, S., Matsumoto, K.: Software quality analysis by code clones in industrial legacy software. In: Proceedings of the International Symposium on Software Metrics (METRICS), METRICS 2002, pp. 87–94. IEEE (2002)Google Scholar
  13. 13.
    Pohl, K., Bockle, G., van der Linden, F.J.: Software Product Line Engineering: Foundations, Principles and Techniques. Springer, Heidelberg (2005)CrossRefzbMATHGoogle Scholar
  14. 14.
    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)MathSciNetCrossRefzbMATHGoogle Scholar
  15. 15.
    Rubin, J., Chechik, M.: Combining related products into product lines. In: Lara, J., Zisman, A. (eds.) FASE 2012. LNCS, vol. 7212, pp. 285–300. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-28872-2_20 CrossRefGoogle Scholar
  16. 16.
    Rubin, J., Chechik, M.: N-way model merging. In: Proceedings of the European Software Engineering Conference/Foundations of Software Engineering (ESEC/FSE), ESEC/FSE 2013, pp. 301–311. ACM (2013)Google Scholar
  17. 17.
    Thum, T., Kastner, C., Benduhn, F., Meinicke, J., Saake, G., Leich, T.: FeatureIDE: an extensible framework for feature-oriented software development. Sci. Comput. Program. 79, 70–85 (2014)CrossRefGoogle Scholar
  18. 18.
    Wille, D.: Managing lots of models: the FaMine approach. In: Proceedings of the International Symposium on Foundations of Software Engineering (FSE), FSE 2014, pp. 817–819. ACM (2014)Google Scholar
  19. 19.
    Wille, D., Schulze, S., Seidl, C., Schaefer, I.: Custom-tailored variability mining for block-based languages. In: Proceedings of the International Conference on Software Analysis, Evolution, and Reengineering (SANER), SANER 2016. IEEE (2016)Google Scholar
  20. 20.
    Wille, D., Holthusen, S., Schulze, S., Schaefer, I.: Interface variability in family model mining. In: Proceedings of the International Workshop on Model-Driven Approaches in Software Product Line Engineering (MAPLE), SPLC 2013, pp. 44–51. ACM (2013)Google Scholar
  21. 21.
    Yoshimura, K., Ganesan, D., Muthig, D.: Assessing merge potential of existing engine control systems into a product line. In: Proceedings of the International Workshop on Software Engineering for Automotive Systems (SEAS), SEAS 2006, pp. 61–67. ACM (2006)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • David Wille
    • 1
    Email author
  • Michael Tiede
    • 1
  • Sandro Schulze
    • 2
  • Christoph Seidl
    • 1
  • Ina Schaefer
    • 1
  1. 1.TU BraunschweigBraunschweigGermany
  2. 2.TU Hamburg-HarburgHamburgGermany

Personalised recommendations