M. Akhin, N. Tillmann, M. Fahndrich, J. de Halleux, M. Moskal
{"title":"Search by example in TouchDevelop: Code search made easy","authors":"M. Akhin, N. Tillmann, M. Fahndrich, J. de Halleux, M. Moskal","doi":"10.1109/SUITE.2012.6225478","DOIUrl":null,"url":null,"abstract":"Code search has always been essential to software development; it is the cornerstone of activities such as program comprehension and maintenance. Traditionally, code search required learning of complex query languages with very steep learning curves. In contrast, programming environments for mobile devices targeting novice programmers are becoming popular and code search is becoming increasingly important. Yet, dedicated code query languages present a learning barrier for novice programmers. In this paper we consider “search-by-example” as a way of dealing with this problem. Given a query code snippet, we find all similar snippets in the codebase and present them to the user. This problem is a special instance of the clone detection problem, and, by using relevant techniques, we can perform precise code search with little to no configuration and completely agnostic of code formatting, variable renamings, etc. These properties make “search-by-example” very easy to use by inexperienced programmers. We built a prototype of our approach in TouchDevelop, a novel mobile app development environment for Windows Phone. We will use it as a testing ground for future evaluation.","PeriodicalId":197992,"journal":{"name":"2012 4th International Workshop on Search-Driven Development: Users, Infrastructure, Tools, and Evaluation (SUITE)","volume":"202 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-06-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2012 4th International Workshop on Search-Driven Development: Users, Infrastructure, Tools, and Evaluation (SUITE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SUITE.2012.6225478","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
Abstract
Code search has always been essential to software development; it is the cornerstone of activities such as program comprehension and maintenance. Traditionally, code search required learning of complex query languages with very steep learning curves. In contrast, programming environments for mobile devices targeting novice programmers are becoming popular and code search is becoming increasingly important. Yet, dedicated code query languages present a learning barrier for novice programmers. In this paper we consider “search-by-example” as a way of dealing with this problem. Given a query code snippet, we find all similar snippets in the codebase and present them to the user. This problem is a special instance of the clone detection problem, and, by using relevant techniques, we can perform precise code search with little to no configuration and completely agnostic of code formatting, variable renamings, etc. These properties make “search-by-example” very easy to use by inexperienced programmers. We built a prototype of our approach in TouchDevelop, a novel mobile app development environment for Windows Phone. We will use it as a testing ground for future evaluation.