Branch shows Issue introduced Different than Master

  • Sonarqube Server v2025.1.2
  • Deployed via Zip file
  • Reviewing issues on PR

Users have discovered the same issue (java:S3776) on a specific line of code is showing “Introduced: 8 days ago” when analyzed on a branch, but the same issue on the exact same line of code on master is showing “Introduced: 8 years ago”

The info on the commit does indeed show it was committed in 2017 for both instances.

Should this issue, if it’s known on master, also show on the branch analysis? Can anyone explain why it may show different timelines as to when the issue was introduced?

Hi,

When was the first analysis of the branch? Issues should be backdated on the first analysis. Is it possible the file in question wasn’t included in the project’s first analysis?

 
Ann

I believe the first analysis of the branch was in the last 2-3 days, whereas the project shows the same issue on master was introduced 8 years ago. I agree, it should have been backdated based on the previous analysis.
Is there some way to determine why it was not?
I see in the ‘Activity’ log for the issue that it was moved a couple of times, could this have caused the confusion?

Hi,

Do you still have the analysis log from that initial branch analysis? Because backdating is based on SCM metadata. If that was missing, everything would have gotten the date of the analysis.

 
Ann

Hi, I do have the logs saved.
Where would I find the information that might tell me if the SCM details are missing? Everything looks normal and, as I said, the UI is showing the commit date from 2017 even though the issue shows it was Introduced (now) 13 days ago

Hi,

Search for ‘SCM’. You should get a hit early-ish in analysis and again at the end.

 
Ann