aDoctor is an Android Studio plugin for code smell detection and refactoring. It is able to fix 6 Android-specific design flaws related to energy consumption:
- Durable Wakelock
- Early Resource Binding
- Inefficient Data Structure
- Internal Setter
- Leaking Thread
- Member Ignoring Method
aDoctor is the outcome of the research conducted in the Software Engineering Lab @ University of Salerno, Italy.
Follow these steps to install the plugin in Android Studio for production use:
- Open Android Studio
- Go into File>Settings...>Plugins>Marketplace
- Type "aDoctor"
- Install it
- Restart Android Studio
- Open the Android project you wish to analyze
- Go to Refactor>ADoctor to launch the plugin
Follow these steps to install the plugin in Android Studio for production use:
- Clone the repository
- Open the project with IntelliJ IDEA
- Build the project just to be sure everything is alright. Ensure you have IntelliJ Platform SDK installed
- Go to Build>Prepare Plugin Module 'aDoctor\ for deployment'. This will generate a zip file in the project root
- Copy the zip file whenever you want
- Open Android Studio
- Go into File>Settings...>Plugins
- Click the gear icon and Install Plugin from Disk...
- Select the zip file
- Restart Android Studio
- Open the Android project you wish to analyze
- Go to Refactor>ADoctor to launch the plugin
Follow these steps to build the source code and run the plugin in a sandbox:
- Clone the repository
- Open the project with IntelliJ IDEA
- Build the project (with the IDE) just to be sure everything is alright. Ensure you have IntelliJ Platform SDK installed
- Run the project (with the IDE) though the run configuration Run aDoctor: this will run IntelliJ IDEA sandbox
- Open the project you wish to analyze
- Go to Refactor>ADoctor to launch the plugin