Package org.sonar.api.batch.sensor.duplication

Examples of org.sonar.api.batch.sensor.duplication.DuplicationBuilder


      .onFile(inputFile)
      .withValue(duplicatedBlocks))
      .setFromCore()
      .save();

    DuplicationBuilder builder = context.duplicationBuilder(inputFile);
    for (CloneGroup duplication : duplications) {
      builder.originBlock(duplication.getOriginPart().getStartLine(), duplication.getOriginPart().getEndLine());
      for (ClonePart part : duplication.getCloneParts()) {
        if (!part.equals(duplication.getOriginPart())) {
          ((DefaultDuplicationBuilder) builder).isDuplicatedBy(part.getResourceId(), part.getStartLine(), part.getEndLine());
        }
      }
    }
    context.saveDuplications(inputFile, builder.build());
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.sensor.duplication.DuplicationBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.