use of org.sonar.duplications.index.PackedMemoryCloneIndex in project sonarqube by SonarSource.
the class IntegrateCrossProjectDuplications method computeCpd.
public void computeCpd(Component component, Collection<Block> originBlocks, Collection<Block> duplicationBlocks) {
CloneIndex duplicationIndex = new PackedMemoryCloneIndex();
populateIndex(duplicationIndex, originBlocks);
populateIndex(duplicationIndex, duplicationBlocks);
List<CloneGroup> duplications = SuffixTreeCloneDetectionAlgorithm.detect(duplicationIndex, originBlocks);
Iterable<CloneGroup> filtered = from(duplications).filter(getNumberOfUnitsNotLessThan(component.getFileAttributes().getLanguageKey()));
addDuplications(component, filtered);
}
use of org.sonar.duplications.index.PackedMemoryCloneIndex in project sonarqube by SonarSource.
the class PmdBridgeTest method setUp.
@Before
public void setUp() {
index = new PackedMemoryCloneIndex();
bridge = new TokenizerBridge(new JavaTokenizer(), "UTF-8", 10);
}
Aggregations