Automatic detection of system-specific conventions unknown to developers

作者:Hora Andre*; Anquetil Nicolas; Etien Anne; Ducasse Stephane; Valente Marco Tulio
来源:Journal of Systems and Software, 2015, 109: 192-204.
DOI:10.1016/j.jss.2015.08.007

摘要

In Apache Ant, a convention to improve maintenance was introduced in 2004 stating a new way to close files instead of the Java generic InputStream.close(). Yet, six years after its introduction, this convention was still not generally known to the developers. Two existing solutions could help in these cases. First, one can deprecate entities, but, in our example, one can hardly deprecate Java's method. Second, one can create a system-specific rule to be automatically enforced. In a preceding publication, we showed that system-specific rules are more likely to be noticed by developers than generic ones. However, in practice, developers rarely create specific rules. We therefore propose to free the developers from the need to create rules by automatically detecting such conventions from source code repositories. This is done by mining the change history of the system to discover similar changes being applied over several revisions. The proposed approach is applied to a real-world system, and the extracted rules are validated with the help of experts. The results show that many rules are in fact relevant for the experts.

  • 出版日期2015-11
  • 单位INRIA