Package org.sonar.duplications.block

Examples of org.sonar.duplications.block.Block


          // groups for all files in a system, clone groups will be reported
          // more than once as well. Both cases can be avoided, by
          // checking whether the first element of a0 (with respect to a
          // fixed order) is equal to f(j) and only report in this case.

          Block first = currentBlocksGroup.first(originResourceId);
          if (first.getIndexInFile() == j - 2) {
            // Godin: We report clones, which start in i-1 and end in j-2, so length is j-2-(i-1)+1=j-i
            reportClones(sameHashBlocksGroups[i], currentBlocksGroup, j - i);
          }
        }
        // 15: a := a0
View Full Code Here


    ClonePart origin = null;
    List<ClonePart> parts = Lists.newArrayList();

    for (int i = 0; i < pairs.size(); i++) {
      Block[] pair = pairs.get(i);
      Block firstBlock = pair[0];
      Block lastBlock = pair[1];
      ClonePart part = new ClonePart(firstBlock.getResourceId(),
          firstBlock.getIndexInFile(),
          firstBlock.getStartLine(),
          lastBlock.getEndLine());

      if (originResourceId.equals(part.getResourceId())) {
        if (origin == null) {
          origin = part;
        } else if (part.getUnitStart() < origin.getUnitStart()) {
View Full Code Here

TOP

Related Classes of org.sonar.duplications.block.Block

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.