Test-Driven Reuse

Component-based software reuse is certainly not a new idea. Its origins date back more than four decades to the famous NATO conference in Garmisch in 1968 that also coined the term "software engineering". It was Douglas McIlroy who proposed the idea of composing applications from predefined components there1.

However, as researchers traditionally struggled to get their hands on significant amounts of reusable material their prototypes long remained in a rather primitive state and practically no viable component markets became available in practice until the end of the 20th century. Only the turn of the millennium and the rising open source movement have changed the premises considerably2. Suddenly, millions of reusable artefacts became available and it turned out that existing retrieval techniques developed so far (such as Keyword or Signature Matching3) were far too imprecise to deal with this amount4.

Inspired by the test-driven development movement in the agile community5 and the seminal work of Podgurski and Pierce on Behaviour Sampling6 we proposed to utilize the advantages of test-driven development to build a highly precise component retrieval solution benefiting from the (partial) description of component semantics contained in ordinary (JUnit) test cases in 20047. We have developed technology for extracting the required interface of a component under test from a JUnit file, sophisticated component search algorithms using the API information of components (incorporated in the component search engine merobase) and a secure environment that allows to compile and directly test retrieved reuse candidates with the specified test cases. This basic test-driven reuse cycle is shown in the figure below. Inspired by the research results of Ye and his CodeBroker tool,8 this functionality is accessible from our proactive Eclipse plugin CodeConjurer9, which is available as open source. Furthermore, we are currently working on automated adaptation of reuse results based on test cases.


Although test-driven reuse has already come a long way10 and matured quite a lot (as underlined by the works of other research groups11) there a still a number of exiting research challenges that need to be tackled in the future. For example, we believe it is important to develop a common reference collection against which component retrieval system can be evaluated12. Another important goal of the reuse community is rising the granularity of components and while the state of the art technology basically allows to retrieve methods and classes our goal is to solve the challenges that are imposed by the reuse of class assemblies (i.e. components).

Contact: Oliver Hummel


  1. D. McIlroy: “Mass-Produced Software Components”, Software Engineering: Report of a conference sponsored by the NATO Science Committee, Garmisch, Germany, 1969.
  2. O. Hummel and C. Atkinson: “Using the Web as a Reuse Repository”, Proceedings of the International Conference on Software Reuse, 2006.
  3. A.M. Zaremski, J.M.  Wing: “Signature Matching: A Tool for Using Software Libraries”, ACM Transactions on Software Engineering and Methodology, Vol. 4, No. 2, 1995.
  4. O. Hummel, W. Janjic and C. Atkinson: "Evaluating the Efficiency of Retrieval Methods for Component Repositories", in Proceedings of the International Conference on Software Engineering and Knowledge Engineering (SEKE), Boston, 2007.
  5. K. Beck: Test-Driven Development by Example, Addison-Wesley, 2003.
  6. A. Podgurski and  L.  Pierce:   “Retrieving   Reusable  Software by   Sampling  Behavior”, ACM Transactions on Software Engineering and Methodology, Vol. 2, Iss. 3, 1993.
  7. O. Hummel and C. Atkinson: “Extreme Harvesting: Test Driven Discovery and Reuse of Software   Components”,   Proceedings   of   the   International   Conference   on   Information Reuse and Integration (IEEE-IRI), Las Vegas, USA, 2004.
  8. Y. Ye: “Supporting  Component-Based Software Development  with  Active Component Repository Systems”, Ph.D. Dissertation, University of Colorado, 2001.
  9. O. Hummel, W. Janjic and C. Atkinson: "Code Conjurer: Pulling Reusable Software out of Thin Air", IEEE Software (Vol. 25, Iss. 5), 2008.
  10. O. Hummel: Semantic Component Retrival in Software Engineering", PhD Thesis, Fakultät für Mathematik und Informatik, Universität Mannheim, 2008.
  11. S.P. Reiss: "Semantics-Based Code Search", in Proceedings of the International Conference on Software Engineering (ICSE), Vancouver, 2009.
  12. O. Hummel: "Facilitating the Comparison of Software Retrieval Systems through a Reuse Reference Collection", submitted to the International Workshop on Search-Driven Development, Users, Infrastructure, Tools and Evaluation, (SUITE) Cape Town, 2010.

Other research groups working in this area