Search-Based Generalization and Refinement of Code Templates. Molderez, T. & De Roover, C. In Sarro, F. & Deb, K., editors, Proceedings of the 8th International Symposium on Search-Based Software Engineering (SSBSE 2016), volume 9962, pages 192–208, 2016. Springer International Publishing.
doi  abstract   bibtex   
Several tools support code templates as a means to specify searches within a program’s source code. Despite their ubiquity, code templates can often prove difficult to specify, and may produce too many or too few match results. In this paper, we present a search-based approach to support developers in specifying templates. This approach uses a suite of mutation operators to recommend changes to a given template, such that it matches with a desired set of code snippets. We evaluate our approach on the problem of inferring a code template that matches all instances of a design pattern, given one instance as a starting template.
@inproceedings{492edad935d044ddaa220ab06d3cd784,
  title     = "Search-Based Generalization and Refinement of Code Templates",
  abstract  = "Several tools support code templates as a means to specify searches within a program’s source code. Despite their ubiquity, code templates can often prove difficult to specify, and may produce too many or too few match results. In this paper, we present a search-based approach to support developers in specifying templates. This approach uses a suite of mutation operators to recommend changes to a given template, such that it matches with a desired set of code snippets. We evaluate our approach on the problem of inferring a code template that matches all instances of a design pattern, given one instance as a starting template.",
  keywords  = "Source Code Templates, Evolutionary Algorithms, Recommender Systems",
  author    = "Tim Molderez and {De Roover}, Coen",
  year      = "2016",
  doi       = "10.1007/978-3-319-47106-8_13",
  language  = "English",
  isbn      = "978-3-319-47105-1",
  volume    = "9962",
  pages     = "192--208",
  editor    = "Federica Sarro and Kalyanmoy Deb",
  booktitle = "Proceedings of the 8th International Symposium on Search-Based Software Engineering (SSBSE 2016)",
  publisher = "Springer International Publishing",
}

Downloads: 0