An empirical study of BM25 and BM25F based feature location techniques.
Abstract
Feature location is a software comprehension activity which aims at identifying source code entities that implement functionalities. Manual feature location is a labor-insensitive task, and developers need to find the target entities from thousands of software artifacts. Recent research has developed automatic and semiautomatic methods mainly based on Information Retrieval (IR) techniques to help developers locate the entities which are textually similar to the feature. In this paper, we focus on individual IR-based methods and try to find a suitable IR technique for feature location, which could be chosen as a part of hybrid methods to achieve good performance. We present two feature location approaches based on BM25 and its variant BM25F algorithm. We compared the two algorithms to the Vector Space Model (VSM), Unigram Model (UM), and Latent Dirichlet Allocation (LDA) on four open source projects. The result shows that BM25 and BM25F are consistently better than other IR methods such as VSM, UM and LDA on the four selected software systems in their best configurations respectively. The functionalities in feature location include implementing new features, improving existing functions, and removing bugs which are similar to removing unwanted functionalities [9]. No matter what kinds of data are used (i.e., bug reports, patch descriptions, enhancement notes, or other feature descriptions), they are all treated as queries in the IR techniques based location task. In the case study of this paper, most of features in the dataset are bug reports, and the others are patch and enhancement descriptions. There are mainly three types of analysis used in feature location: dynamic, static and textual methods. Some studies have combined two or the whole of those three techniques to get a better result than using the individual technique [9]. Dynamic methods gather information during the execution of programs for analysis. Static methods extract the structure like control or dependence graph from the source code to help developers analyze where the feature is located. Textual methods, i.e. IR techniques, analyze the code text including identifiers and comments. Rubin and Ch