• DocumentCode
    176200
  • Title

    Using Structured Queries for Source Code Search

  • Author

    Eddy, B.P. ; Kraft, N.A.

  • Author_Institution
    Univ. of Alabama, Tuscaloosa, AL, USA
  • fYear
    2014
  • fDate
    Sept. 29 2014-Oct. 3 2014
  • Firstpage
    431
  • Lastpage
    435
  • Abstract
    Software maintenance tasks such as feature location and traceability link recovery are search-oriented. Most of the recently proposed approaches for automation of search-oriented tasks are based on a traditional text retrieval (TR) model in which documents are unstructured representations of text and queries consist only of keywords. Because source code has structure, approaches based on a structured retrieval model may yield improved performance. Indeed, Saha et al. Recently proposed a feature location technique based on structured retrieval that offers improved performance relative to a technique based on traditional TR. Although they use abstract syntax tree (AST) information to structure documents, they nonetheless use content-only (keyword) queries to retrieve documents. In this paper we propose an approach to source code search using AST information to structure queries in addition to documents. Such queries, known as content and structure (CAS) queries, allow developers to search for source code entities based not only on content relevance, but also on structural similarity. After introducing the structured retrieval model, we provide examples that illustrate the trade-off between the simplicity of content-only queries and the power of CAS queries.
  • Keywords
    computational linguistics; query processing; software maintenance; source code (software); text analysis; AST information; CAS queries; TR model; abstract syntax tree; automation; feature location technique; search-oriented tasks; software maintenance tasks; source code entities; source code search; structural similarity; structured queries; structured retrieval model; text retrieval; traceability link recovery; unstructured representations; Accuracy; Computer bugs; Context; Database languages; Search engines; Software; Software maintenance; program comprehension; static analysis; structured document retrieval; text retrieval;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Maintenance and Evolution (ICSME), 2014 IEEE International Conference on
  • Conference_Location
    Victoria, BC
  • ISSN
    1063-6773
  • Type

    conf

  • DOI
    10.1109/ICSME.2014.68
  • Filename
    6976112