Home // ADVCOMP 2014, The Eighth International Conference on Advanced Engineering Computing and Applications in Sciences // View article


Searching Source Code Using Code Patterns

Authors:
Ken Nakayama
Eko Sakai

Keywords: source code search; search by example; abstract syntax tree

Abstract:
Understanding source code is crucial for a software engineer. To efficiently grasp the semantics of source code, an experienced engineer recognizes semantic chunks and relations (code patterns) in source code as clues. If a rich repository of searchable code patterns, together with human understandable meanings, is available, comprehension of unfamiliar source code would be easier. However, explicitly defining a source code query even for a simple code pattern can be prohibitively complex for human. In this paper, a tool for search-by-example through abstract syntax tree is presented. A programmer gives sets of desired and undesired nodes, then the system presents some candidate nodes resembling desired ones. This kind of implicit definition by examples is suitable for constructing and revising a repository socially. The method is supervised incremental learning of decision trees. The proposed system uses a set of primitive attributes to reflect domain-specific knowledge safely and easily.

Pages: 97 to 102

Copyright: Copyright (c) IARIA, 2014

Publication date: August 24, 2014

Published in: conference

ISSN: 2308-4499

ISBN: 978-1-61208-354-4

Location: Rome, Italy

Dates: from August 24, 2014 to August 28, 2014