What constitutes "New" duplicates in TeamCity duplicate search?

I am trying to evaluate Teamcity duplicate search for my team. One of the problems I encountered is that it often reports increase in # of duplicates and when I filter the view to see only "New" duplicates it shows me files that were not changed for month even though the build is recent and the previous successful build is 2 days old. What is the definition of "New" duplicates? Teamcity 7.1.4, Maven project.

2 comments
Comment actions Permalink

Sorry for delay.

By "New duplicate" TeamCity means new group of duplicates. Say there are two similar code fragments identified by TeamCity as duplicates, for TeamCity this is the one group and it will be reported as 1 duplicate. For this duplicate in duplicates report you'll see two instances. So in fact when TeamCity says it found 30 duplicates it means it found 30 groups of duplicates, where each group has at least 2 instances.

So if some new duplicate group was introduced, when you open duplicates report you can see old files too if this fragment was found there.

There is feature request to compute instances of duplicates rather than groups: http://youtrack.jetbrains.com/issue/TW-6330. With current approach, if someone introduces new instance of already reported group, TeamCity won't detecte it as new as the group already existed.

0
Comment actions Permalink

Thanks Paul. But in our example the group in question constitutes two files that were not changed for ages - that's the whole point. I can see the group was NOT reported as a duplicate in the previous successful build but WAS reported now, even though these sources were not changed for a long long time. That aside, also, does the "New" duplicate mean "New since last build" or "New since last successful build"?

0

Please sign in to leave a comment.