]> source.dussan.org Git - sonarqube.git/commit
SONAR-3321 Fix bug in file rename algorithm 1100/head
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 13 Jul 2016 08:41:04 +0000 (10:41 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 13 Jul 2016 09:10:45 +0000 (11:10 +0200)
commit120442638b90cbe9ca588df6b7e7f6d23480b158
tree2b6c643cdfa43d643162b1d2c9f110e665e82d23
parent3c59e959b8f2ec1cff74734c9494add02bd49bcb
SONAR-3321 Fix bug in file rename algorithm

* Real technical bug causing the error was that matches
were not properly filtered so that a file that was already
matched could be matched again
* This also allowed to spot a functional bug: matches candidates were
processed in ascending score order. Means that lowest score got highest priority.
23 files changed:
server/sonar-server/src/main/java/org/sonar/server/computation/filemove/FileMoveDetectionStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/filemove/MatchesByScore.java
server/sonar-server/src/main/java/org/sonar/server/computation/filemove/MutableMovedFilesRepositoryImpl.java
server/sonar-server/src/test/java/org/sonar/server/computation/filemove/FileMoveDetectionStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/filemove/MatchesByScoreTest.java
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1235_add_component_uuid_to_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1236_populate_component_uuid_of_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1237_delete_orphan_duplications_index_rows_without_component.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1238_make_component_uuid_not_null_on_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1239_add_analysis_uuid_to_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1240_populate_analysis_uuid_of_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1241_delete_orphan_duplications_index_rows_without_analysis.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/1242_make_analysis_uuid_not_null_on_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/AddAnalysisUuidColumnToDuplicationsIndex.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/AddComponentUuidColumnToDuplicationsIndex.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/DeleteOrphanDuplicationsIndexRowsWithoutComponent.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v1/MakeComponentUuidNotNullOnDuplicationsIndex.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/1235_add_component_uuid_and_analysis_uuid_to_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/1236_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/1237_delete_orphan_duplications_index_rows_without_component_or_analysis.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/1238_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndex.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/computation/filemove/FileMoveDetectionStepTest/v2/MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndex.java [new file with mode: 0644]