Feature Branch Showing Bugs, Vulnerability and code smells in my PR that I haven’t touched

Before Asking the same kind of question i have referred few other similar topics and not able to find the working solution for my Issue. Eg. Referred topic 1, Topic 2

  • which versions are you using SonarQube - SonarQube(Developer Edition Version 8.9.8 (build 54436)
  • SonarScanner - 4.7.0.2747 and Java 11.0.14.1
  • We have enabled PR decoration at Azure dev ops

Azure dev ops setup screen shot

** Project setting**

For each PR we set Integration as a base branch.

I have created a feature branch from this Integration and Added only 2 lines of code change and in my PR gating I could see lot of existing issues which I haven’t touched popping out and blocking the build from getting merged.

More screen shots for the reference.

Sonar scanner log from Jenkins

BUILD SUCCESSFUL in 23m 25s
109 actionable tasks: 104 executed, 5 up-to-date
PR_NUMBER: 11888
PR_SRC_BRANCH: refs/heads/PI24/Sprint-2/MET-BugFix
PR_BASE_BRANCH: refs/heads/Integration
PR_DETAILS: -Dsonar.pullrequest.branch=PI24/Sprint-2/MET-BugFix -Dsonar.pullrequest.key=11888  -Dsonar.pullrequest.base=Integration -Dsonar.pullrequest.provider=vsts -Dsonar.pullrequest.vsts.instanceUrl=https://tfsemea1.ta.com/tfs/_git/AndroidProduction -Dsonar.host.url=http://1.1.1.1:9000
INFO: Scanner configuration file: /Applications/SonarScanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/sonar-project.properties
INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Mac OS X 10.15.7 x86_64
INFO: User cache: /Users/.sonar/cache
INFO: Scanner configuration file: /Applications/SonarScanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/sonar-project.properties
INFO: Analyzing on SonarQube server 8.9.8
INFO: Default locale: "en_IN", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=180ms
INFO: Server id: 289432BC-ASWLE12323
INFO: User cache: /Users/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=53ms
INFO: Load/download plugins (done) | time=190ms
INFO: Loaded core extensions: developer-scanner
INFO: JavaScript/TypeScript frontend is enabled
INFO: Process project properties
INFO: Process project properties (done) | time=10ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: AndroidProduction
INFO: Base dir: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop
INFO: Working dir: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork
INFO: Load project settings for component key: 'AndroidProduction'
INFO: Load project settings for component key: 'AndroidProduction' (done) | time=50ms
INFO: Load project branches
INFO: Load project branches (done) | time=161ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=44ms
INFO: Load branch configuration
INFO: Found manual configuration of branch/PR analysis. Skipping automatic configuration.
INFO: Load branch configuration (done) | time=2ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=46ms
INFO: Auto-configuring with CI 'Jenkins'
INFO: Load active rules
INFO: Load active rules (done) | time=2064ms
INFO: Pull request 11888 for merge into Integration from PI24/Sprint-2/MET-BugFix
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=549ms

INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: **src/main/**/*.*,

 INFO: Indexing files of module 'app'
INFO:   Base dir: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/app
INFO:   Source paths: src/main/java
INFO:   Test paths: src/test/java
INFO:   Excluded sources: **src/main/**/*.*

INFO: Indexing files of module 'blescanner'
INFO:   Base dir: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/blescanner
INFO:   Source paths: src/main/java
INFO:   Test paths: src/test/java
INFO:   Excluded sources: **src/main/**/*.*,

INFO: 2165 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for java: Sonar way
INFO: Quality profile for kotlin: Sonar way
INFO: ------------- Run sensors on module utility
INFO: JavaScript/TypeScript frontend is enabled
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=12ms
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=1ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan

INFO: 129 source files to be analyzed
INFO: 129/129 source files have been analyzed
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Dependencies/libraries were not provided for analysis of TEST files. The 'sonar.java.test.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Main Files AST scan (done) | time=5857ms
INFO: Java Test Files AST scan
INFO: 7 source files to be analyzed
INFO: 7/7 source files have been analyzed
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Test Files AST scan (done) | time=35ms
INFO: Java Generated Files AST scan
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Java Generated Files AST scan (done) | time=1ms
INFO: Sensor JavaSquidSensor [java] (done) | time=6174ms
INFO: Sensor CSS Rules [cssfamily]

INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=1ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=1ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/utility/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=3ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=103ms
INFO: Sensor Kotlin Sensor [kotlin]
INFO: 72 source files to be analyzed
INFO: 72/72 source files have been analyzed
INFO: Sensor Kotlin Sensor [kotlin] (done) | time=1248ms
INFO: Sensor KotlinSurefireSensor [kotlin]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/utility/target/surefire-reports]
INFO: Sensor KotlinSurefireSensor [kotlin] (done) | time=1ms
INFO: Sensor Import of Android Lint issues [kotlin]
WARN: Unable to import Android Lint report file(s):
- /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/utility/build/reports/lint-results-bebug.xml

The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.
INFO: Sensor Import of Android Lint issues [kotlin] (done) | time=2ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=1ms
INFO: ------------- Run sensors on module rulesengine
INFO: JavaScript/TypeScript frontend is enabled
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=0ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 11 source files to be analyzed
INFO: 11/11 source files have been analyzed
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Dependencies/libraries were not provided for analysis of TEST files. The 'sonar.java.test.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Main Files AST scan (done) | time=617ms
INFO: Java Test Files AST scan
INFO: 6 source files to be analyzed
INFO: 6/6 source files have been analyzed
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Test Files AST scan (done) | time=51ms
INFO: Java Generated Files AST scan
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Java Generated Files AST scan (done) | time=0ms
INFO: Sensor JavaSquidSensor [java] (done) | time=671ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/rulesengine/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=0ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
INFO: Sensor Import of Android Lint issues [kotlin]
WARN: Unable to import Android Lint report file(s):
- /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/rulesengine/build/reports/lint-results-debug.xml

The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.
INFO: Sensor Import of Android Lint issues [kotlin] (done) | time=1ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: ------------- Run sensors on module blescanner
INFO: JavaScript/TypeScript frontend is enabled
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=1ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 6 source files to be analyzed
INFO: 6/6 source files have been analyzed
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Dependencies/libraries were not provided for analysis of TEST files. The 'sonar.java.test.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Main Files AST scan (done) | time=123ms
INFO: Java Test Files AST scan
INFO: 1 source file to be analyzed
INFO: 1/1 source file has been analyzed
INFO: Java Test Files AST scan (done) | time=6ms
INFO: Java Generated Files AST scan
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Java Generated Files AST scan (done) | time=0ms
INFO: Sensor JavaSquidSensor [java] (done) | time=132ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/blescanner/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=0ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
INFO: Sensor Kotlin Sensor [kotlin]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor Kotlin Sensor [kotlin] (done) | time=0ms
INFO: Sensor KotlinSurefireSensor [kotlin]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/blescanner/target/surefire-reports]

INFO: Sensor KotlinSurefireSensor [kotlin] (done) | time=1ms
INFO: Sensor Import of Android Lint issues [kotlin]
WARN: Unable to import Android Lint report file(s):
- /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/blescanner/build/reports/lint-results-debug.xml
The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.
INFO: Sensor Import of Android Lint issues [kotlin] (done) | time=0ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: ------------- Run sensors on module app
INFO: JavaScript/TypeScript frontend is enabled
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=0ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 465 source files to be analyzed
INFO: 274/465 files analyzed, current file: app/src/main/java/com/cdp/sessionmanager/DeviceUiListener.java
INFO: 465/465 source files have been analyzed
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Dependencies/libraries were not provided for analysis of TEST files. The 'sonar.java.test.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Main Files AST scan (done) | time=14606ms
INFO: Java Test Files AST scan
INFO: 28 source files to be analyzed
INFO: 28/28 source files have been analyzed
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
INFO: Java Test Files AST scan (done) | time=144ms
INFO: Java Generated Files AST scan
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Java Generated Files AST scan (done) | time=1ms
INFO: Sensor JavaSquidSensor [java] (done) | time=14754ms
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/app/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=5ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=2ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=259ms
INFO: Sensor Kotlin Sensor [kotlin]
INFO: 885 source files to be analyzed
INFO: 885/885 source files have been analyzed
INFO: Sensor Kotlin Sensor [kotlin] (done) | time=4640ms
INFO: Sensor KotlinSurefireSensor [kotlin]
INFO: parsing [/Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/app/target/surefire-reports]
INFO: Sensor KotlinSurefireSensor [kotlin] (done) | time=0ms
INFO: Sensor Import of Android Lint issues [kotlin]
WARN: Unable to import Android Lint report file(s):
- /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/app/build/reports/lint-results-debug.xml
The report file(s) can not be found. Check that the property 'sonar.androidLint.reportPaths' is correctly configured.
INFO: Sensor Import of Android Lint issues [kotlin] (done) | time=1ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=2ms
INFO: ------------- Run sensors on module AndroidProduction
INFO: JavaScript/TypeScript frontend is enabled
INFO: Sensor CSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [cssfamily] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/java
INFO: Read 1229 type definitions
INFO: Reading UCFGs from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/java
INFO: 11:53:29.463695 Building Runtime Type propagation graph
INFO: 11:53:29.498646 Running Tarjan on 6684 nodes
INFO: 11:53:29.507456 Tarjan found 6664 components
INFO: 11:53:29.518946 Variable type analysis: done
INFO: 11:53:29.521027 Building Runtime Type propagation graph
INFO: 11:53:29.548472 Running Tarjan on 6666 nodes
INFO: 11:53:29.553338 Tarjan found 6647 components
INFO: 11:53:29.560732 Variable type analysis: done
INFO: Analyzing 3014 ucfgs to detect vulnerabilities.
INFO: All rules entrypoints : 0 Retained UCFGs : 0
INFO: rule: S5131, entrypoints: 0
INFO: rule: S5131 done
INFO: rule: S3649, entrypoints: 0
INFO: rule: S3649 done
INFO: rule: S2076, entrypoints: 0
INFO: rule: S2076 done
INFO: rule: S2091, entrypoints: 0
INFO: rule: S2091 done
INFO: rule: S2078, entrypoints: 0
INFO: rule: S2078 done
INFO: rule: S2631, entrypoints: 0
INFO: rule: S2631 done
INFO: rule: S5135, entrypoints: 0
INFO: rule: S5135 done
INFO: rule: S2083, entrypoints: 0
INFO: rule: S2083 done
INFO: rule: S5167, entrypoints: 0
INFO: rule: S5167 done
INFO: rule: S5144, entrypoints: 0
INFO: rule: S5144 done
INFO: rule: S5145, entrypoints: 0
INFO: rule: S5145 done
INFO: rule: S5146, entrypoints: 0
INFO: rule: S5146 done
INFO: rule: S5334, entrypoints: 0
INFO: rule: S5334 done
INFO: rule: S6096, entrypoints: 0
INFO: rule: S6096 done
INFO: Sensor JavaSecuritySensor [security] (done) | time=7054ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/python
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /Users/jenkins-workspace/workspace/_Android_Pull_Request_Develop/.scannerwork/ucfg2/python
INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: Sensor JsSecuritySensor [security]
INFO: Reading type hierarchy from: /Users/jenkins-workspace/workspace/_Pull_Request_Develop/.scannerwork/ucfg2/js
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /Users/jenkins-workspace/workspace/Android_Pull_Request_Develop/.scannerwork/ucfg2/js
INFO: No UCFGs have been included for analysis.
INFO: Sensor JsSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=20ms
INFO: Sensor Java CPD Block Indexer
INFO: Sensor Java CPD Block Indexer (done) | time=398ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 2132 source files to be analyzed
INFO: 354/2132 source files have been analyzed
INFO: 821/2132 source files have been analyzed
INFO: 1360/2132 source files have been analyzed
INFO: 1921/2132 source files have been analyzed
INFO: SCM Publisher 2132/2132 source files have been analyzed (done) | time=43997ms
INFO: CPD Executor 417 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 1151 files
INFO: CPD Executor CPD calculation finished (done) | time=206ms
INFO: SCM writing changed lines
INFO: SCM writing changed lines (done) | time=11534ms
INFO: Analysis report generated in 12212ms, dir size=13 MB
INFO: Analysis report compressed in 22666ms, zip size=6 MB
INFO: Analysis report uploaded in 1066ms

INFO: ANALYSIS SUCCESSFUL, you can browse http://1.1.1.1:9000/dashboard?id=AndroidProduction&pullRequest=11888
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://1.1.1.1:9000/api/ce/task?id=AYEEMHGYF-74Y14P3R_S
INFO: Analysis total time: 2:04.093 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:05.365s
INFO: Final Memory: 67M/237M
INFO: ------------------------------------------------------------------------

**ANY OTHER INFORMATION I AM READY TO SHARE **

Hi,

Welcome to the community!

We’ve done some work on detection of New Code since 8.9. Did you at some point rebase your branch on integration?

 
Ann

Hi Ann

Thank you for the reply.

To check the PR gating I have newly branched out from Integration and made 3 line change and raised a PR. After scan I got the above attached output failed output.

Hi,

Your screenshot is a bit constrained. How many “new” lines does analysis see? Also, do you see any pattern in the underlying rules for all those new/old issues?

 
Ann

Hi Ann,

Sorry for the late reply. I was on weekend.

Almost all the new branches created from the Integration branch(Base branch) shows the same failures.

Attaching comparison of two different PR branched out from the same Integration branch.

Integration branch Screen shot

Gating screen shot - Conditions on New Code

Gating screen shot - Conditions on Overall Code

Hi,

Can you check some of the files that are showing up as ‘new’ and see what SonarQube is marking as changed? I’m wondering if an automated process didn’t change white space or something like that. BTW, you can get to those “new” files by clicking on “Coverage on 26k Lines to cover” or by navigating through the Measures tab.

 
Ann

Hi Ann,

Thanks for checking again.

I have followed your steps and taken few screen shots for the reference. On taping of the Coverage on 26k Lines to cover I could see the below results.


Please check and give your input.

Thanks,
Ramesh

Hi,

I was hoping you’d dig into the “On new code” values. I see from your screenshot that there are 2 new lines to cover. Since you’re already on the measures page, it would probably be even better to look under the Size category to see how many overall New Lines are showing up. E.G.:

And then check some of the files with “New Lines” to see what’s marked new in the file.

 
Ann

Hi Ann,

I have looked into the New lines of code changes. Like you said its considering New Empty line changes as well as newly added codes under this category.

Attached one class which shows changed was not the actual change. Meaning it was not part of the PR and an old change

Please support on this.

Hi,

Is it possible there’s an automated process somewhere that’s changing your line endings or other whitespace? We’ve seen that happen before.

Also, can you click in the margin to verify the change dates SonarQube has for some of those lines? E.G.:

Selection_198

 
Ann

No. There is no automated process. Its all developer do the reformatting in IDE itself.

Will give you this details in sometime soon. Because there is a new analysis going on.

Hi Ann

See the attachment for your reference .

Hi,

Is that commit date inside your New Code Period?

 
Ann

Yes both are same.

Okay, then that’s expected to be marked new. Now can you check on a file/line you didn’t expect to be marked new?

 
Ann

Hi Ann
If you see the below screen shot has taken few min back after the completion of new PR run.

It has changed long back and still comes under new lines

After deletion of existing project, I have created a new project and compared with new main branch(Integration) and still seeing the same old issues popped up.

Thank you,
Ramesh

Hi Ramesh,

We’ve done some work on New Code detection since 8.9. Is it possible you could try this with the latest version?

 
Ann

Hi Ann

I will check with my team about this version.

Ramesh

Hi Ann,
I have discussed with my team members and we are using the following version

  • Developer Edition
  • Version 8.9.8 (build 54436)

Hi Ann,

To find the root cause I have tried comparing my feature branch with the same branch previous version and I could see the newly introduced issues.

The same feature branch compared with integration I got the below output. Here is my doubt. In the new code Tab section it shows that Compared to Integration started 2 months ago. Will you give me little insight about this comparison about how it works.

Ramesh