Source code lexicon plays a paramount role in
software quality poor lexicon can lead to poor comprehensibility and even
increase software fault-proneness. For this reason, renaming a program entity,
i.e., altering the entity identifier, is an important activity during software
evolution. Developers rename when they feel that the name of an entity is not
(anymore) consistent with its functionality, or when such a name may be
misleading. A survey that we performed with 71 developers suggests that 39%
perform renaming from a few times per week to almost every day and that 92% of
the participants consider that renaming is not straightforward. However,
despite the cost that is associated with renaming, renaming are seldom if ever
documented—for example, less than 1% of the renaming in the five programs that
we studied. This explains why participants largely agree on the usefulness of
automatically documenting renaming. In this paper we propose REPENT (REANAMING
PROGRAM ENTITIES), an approach to automatically document—detect and
classify—identifier renaming in source code. REPENT detects renaming based on a
combination of source code differencing and data flow analyses. Using a set of
natural language tools, REPENT classifies renaming into the different
dimensions of a taxonomy that we defined. Using the documented renaming,
developers will be able to, for example, look up methods that are part of the
public API (as they impact client applications), or look for inconsistencies
between the name and the implementation of an entity that underwent a high risk
renaming (e.g., towards the opposite meaning). We evaluate the accuracy and
completeness of REPENT on the evolution history of five open-source Java
programs. The study indicates a precision of 88% and a recall of 92%. In
addition, we report an exploratory study investigating and discussing how
identifiers are renamed in the five programs, according to our taxonomy
No comments:
Post a Comment