Improving the Quality of AspectJ Application: Translating Name-Based Pointcuts to Analysis-Based Pointcuts
Lin Wang, Tomoyuki Aotani, Masato Suzuki · 2014
This paper proposes an approach to improve the quality of AspectJ applications which supports translating name-based point cuts to analysis-based point cuts automatically. Traditional name-based point cuts rely on the names of fields, methods, and classes in the program, which are well known to be fragile against software evolution. Analysis-based point cuts rely on the properties of the program via user-defined static program analysis, which therefore are free from such fragility. However, writing such programs manually is difficult because user has to write her analysis suitable for corresponding properties. Our approach solves the problem by translating name-based point cuts into analysis-based ones, this can be achieved by simply calling the method from within the conditional point cuts. We demonstrate the usefulness of analysis-based point cuts in multiple versions of several open-source AspectJ programs. The results show that the analysis-based point cuts generated by our approach are more robust than their original name-based counterparts.