Developers often make similar edits at multiple places, while adding features or fixing bugs. These systematic edits are quite common. For example, when an API changes in an Android platform, all locations invoking this API must be updated to use the updated API correctly. Such change may require systematic changes in all call sites of the API, such as constructing new objects, passing new arguments, or replacing API calls.
During peer code reviews, it is time-consuming to locate and inspect such similar modifications manually. The goal of our eclipse plug-in, Critics, is to help developers summarize systematic edits and detect inconsistent or missed changes to prevent bugs early in the development cycle. In Critics, a developer first selects a region in Eclipse Compare editor; Critics automatically identifies code context relevant to user’s selection; the developer then interatively configures the diff template, including user selection as well as code context. Finally, Critics searches for changes that match this template and summarizes them; it also identifies an inconsistent change where the same changes are violated.
The demo video for Critics is available at youtube.