CEMENT: On the Use of Evolutionary Coupling Between Tests and Code Units. A Case Study on Fault Localization

Jeongju Sohn, Mike Papadakis · 2022

Many software engineering techniques, such as fault localization, operate based on relevance relationships between tests and code. These relationships are often inferred using dynamic test execution information that approximates the link between relevant code units and asserted, by the tests, program behaviour. Unfortunately, in practice, dynamic information is not always available due to the instrumentation overheads or the nature of the production environments. This paper proposes CEMENT, a static technique that automatically infers such test and code relationships given the projects' evolution. The key idea is that developers make relevant changes to tests and code units around the same period, and thus their co-evolution reflects probable links between them. We evaluate CEMENT on 15 open-source projects, showing that it captures relevant links. We further conduct a fault localization case study and demonstrate that CEMENT can perform comparably to a current Information Retrieval-based Fault Localization (IRFL) approach. Additional analysis reveals that CEMENT and the IRFL localize different faults, suggesting complementarity. We leverage this complementarity by combining these two through voting, identifying 82% (32) of the faults located by at least one of them. These results suggest that test and code evolutionary coupling can effectively support test and debugging activities.

Read the paper · More papers on PaperTik