A plugin for IntelliJ IDEA that detects outdated comments in Java code.
There are two ways to use CommentUpdater:
- As a plugin for IntelliJ IDEA that highlights your attention to outdated code comments;
- As a CLI tool to generate dataset of code-comment inconsistencies from existing Java projects.
- Clone project
git clone https://github.com/JetBrains-Research/CommentUpdater.git
- Download an archive with model and code embeddings;
- Open CommentUpdater project, go to
comment-updater-plugin/src/main/kotlin/...models/config/
and modify fileModelFilesConfig.kt
by replacingdatadDir
value with the path to the directory containing files from Step 2; - Run
gradle/comment-updater-plugin/intellij/runIde
task.
The main purpose of CLI is collecting dataset of consistent and inconsistent samples in Java projects.
Run a script commentupdater.sh
with three arguments:
- Path to the file containing absolute paths to the projects, which you want to process, separated with
\n
. Example:dir1/project1/ dir2/project2/ dir3/project3/
- Path to the directory where resulting files with code-comment samples would be written;
- Path to the directory containing files (model and code embeddings) from the archive.
Launch example:
./commentupdater.sh input.txt dataset/ modelConfig/