kirancodes.me
To Proof Maintenance & Beyond!

CodeGenie: using test-cases to search and reuse source code

Otávio Augusto Lazzarini Lemos, Sushil Krishna Bajracharya, Joel Ossher, Ricardo Santos Morla, Paulo César Masiero, Pierre Baldi, Cristina Videira Lopes

Abstract

We present CodeGenie, a tool that implements a test-driven approachto search and reuse of code available on large-scale coderepositories. While using CodeGenie developers design test cases fora desired feature first, similar to Test-driven Development (TDD).However, instead of implementing the feature as in TDD, CodeGenieautomatically searches for it based on information available in thetests. To check the suitability of the candidate results in thelocal context, each result is automatically woven into thedeveloper's project and tested using the original tests. Thedeveloper can then reuse the most suitable result. Later, reusedcode can also be unwoven from the project as wished. For the codesearching and wrapping facilities, CodeGenie relies on Sourcerer, anInternet-scale source code infrastructure that we have developed

BibTeX
@inproceedings{Lemos-al:ASE07,
  author    = {Ot{\'{a}}vio Augusto Lazzarini Lemos and
               Sushil Krishna Bajracharya and
               Joel Ossher and
               Ricardo Santos Morla and
               Paulo C{\'{e}}sar Masiero and
               Pierre Baldi and
               Cristina Videira Lopes},
  title     = {{CodeGenie:} using test-cases to search and reuse source code},
  booktitle = {ASE},
  pages     = {525--526},
  publisher = {{ACM}},
  year      = {2007},
}

Related papers