ConcernReCS is an Eclipse plug-in written to find Aspectization Code Smells, i.e., scenarios in source code that can lead to aspectization mistakes. Its main goal is to provide tooling support for programmers beginners in AOP and AspectJ, wich is one of the most used AO languages, in order to avoid mistakes during concern refactoring and aspectization.
Here we present a brief description of some aspectization code smells found in our previous studies




ConcernReCS has been developed for Eclipse Indigo (3.7) and extends ConcernMapper 2.0.3. Therefore, it may not work properly with different versions of Eclipse and ConcerMapper.
Install Eclipse Indigo (3.7) or a newer version, which can be obtained at:
http://www.eclipse.org/downloads/
Open your Eclipse and go to "Help->Install New Software". In the "Work with" text box, put the following URL:
http://www.cs.mcgill.ca/~martin/cm/
Select "ConcernMapper" and press "next"/"finish" until the installation is complete.
Download the following file and extract it in your Eclipse "plugins" directory.
http://sourceforge.net/projects/concernrecs/files/ConcernReCS_binary.zip/download
Since you have followed the steps above, you are able to get started with ConcernReCS.
OBS: The following content is also available in our demo video:
http://www.youtube.com/watch?v=xTpI2XwfSjY&feature=youtu.be
The first step is to get the Java project in which the Code Smells will be sought. You can use your own project, but to make things easier you can download one of the following example projects, which had been used in our experiment to find Aspectization Code Smells:
- ATM: An Java application that simulates the basic activities of a conventional cash machine, such as withdrawing money, making a deposit, and issuing the account balance. (Default user: "12345"/password: "54321")
- Chess: Implements a chess game with graphical user interface.
- Telecom: A connection management system for phone calls, which simulates a call between two customers.
The next step is to map the desired concerns in the ConcernMapper tool.
In Eclipse go to "Window->Show View->Other...", then find and select ConcernMapper as shown bellow.

To map a concern, you should drag and drop the Dedicated implementation elements, i.e., those Java elements, such as classes, methods and attributes, whose the code is completely dedicated to the concern, into the ConcernMapper view. Each of the example projects above comes with their respective concerns already mapped in a ".cm" file in the project fold. To visualize them, drag and drop the ".cm" file into the ConcernMapper view.
For instance, the ErrorMessages concern in the Chess application is mapped as follows.

It is possible to select which Code Smells should be sought by the ConcernReCS tool and in which concerns.
To enable/disable a Code Smell or a concern, in the Eclipse IDE go to "Window->Preferences" (for Windows/Linux users) or "Eclipse->Preferences" (for MacOS users), then choose "ConcernReCS".
As an example, the preferences for the Chess application are the following.

To open the ConcernReCS view, go to "Window->Show View->Other...", then find and select ConcernReCS like in the following picture.

The view presenting the Code Smells found in the Chess application is depicted and described below.

- Refresh Action: Refresh the results by looking for Aspectization Code Smells in the concerns.
- Search Box: Simple text pattern search in the Code Smells being presented in the view.
- Save Action: Save the found Code Smells in a XML file.
For each Code Smell found in the concerns is presented the following information:
- Name: The simple name of the Code Smell.
- Mistake: The aspectization mistake that this Code Smell can lead to.
- Concern: The concern in which the Code Smell appears.
- Error-proneness: A number ranging from zero to one, indicating how prone a developer is to make a mistake when this Code Smell appears in the application code.
- Source: Source file in which the Code Smell is.
- Where: Which code element is related to this Code Smell.