From 1309a04a630f6382d82b4fca7a7bd4e9696726f4 Mon Sep 17 00:00:00 2001 From: Andrei Constantin Date: Sun, 31 Aug 2025 22:19:28 +0100 Subject: [PATCH 1/2] Add SonarQube run instructions to README Added instructions for running SonarQube. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 649b068..2487203 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,12 @@ setx SONARQUBE_TOKEN "paste-your-token" # Restart the terminal afterwards ``` +### Run SonarQube +```bash +python remediate_repos.py + --token SONARQUBE_TOKEN # If you haven't added a token in the environment +``` + ### Run the Remediator ```bash python AntiPattern_Remediator/main.py @@ -122,4 +128,4 @@ Verify JDK 11 and Maven are on `PATH`. - **IBM** - For providing technical expertise and computational resources, and mentorship from Dr Amrin Maria Khan and Prof. John McNamara - **University College London (UCL)** - For research guidance and academic support, under the supervision of Dr Jens Krinke - **LangChain Community** - For the foundational LLM orchestration framework -- **Ollama Project** - For making LLM deployment accessible and efficient \ No newline at end of file +- **Ollama Project** - For making LLM deployment accessible and efficient From 6c613918e4633f63b6e207d4da9cb64d1386d7c3 Mon Sep 17 00:00:00 2001 From: Andrei Constantin Date: Sun, 31 Aug 2025 22:21:52 +0100 Subject: [PATCH 2/2] Update file paths for SonarQube testing --- sonarqube_tool/sonarqube_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sonarqube_tool/sonarqube_api.py b/sonarqube_tool/sonarqube_api.py index 4152b46..ff5771d 100644 --- a/sonarqube_tool/sonarqube_api.py +++ b/sonarqube_tool/sonarqube_api.py @@ -174,9 +174,8 @@ def save_all_issues(self, project_key: str, file_path: str) -> None: if __name__ == "__main__": api = SonarQubeAPI() project_key = "commons-lang" - file_path = "src\main\java\org\apache\commons\lang3\BooleanUtils.java" - test_file_path = "src/main/java/org/apache/commons/lang3/BooleanUtils.java" - issues_file_path = "D:\FILES\IBM-Project-Analysis-Results\common-lang3.9-original\issues.json" + file_path = "path/to/java/file" # Testing if SonarQube is working + issues_file_path = "path/to/issues.json (post-transformation analysis requirement)" rule_key_1 = "java:S2160" rule_key_2 = "java:S1117" rule_key_3 = "java:S5993"