Package org.sonar.duplications.block

Examples of org.sonar.duplications.block.FileBlocks.blocks()


    for (InputFile inputFile : sourceFiles) {
      LOG.debug("Populating index from {}", inputFile);
      String resourceEffectiveKey = ((DeprecatedDefaultInputFile) inputFile).key();
      FileBlocks fileBlocks = duplicationCache.byComponent(resourceEffectiveKey);
      if (fileBlocks != null) {
        index.insert(inputFile, fileBlocks.blocks());
      } else if (bridge != null) {
        List<Block> blocks2 = bridge.chunk(resourceEffectiveKey, inputFile.file());
        index.insert(inputFile, blocks2);
      }
    }
View Full Code Here


  @Override
  public void put(Value value, Object object, CoderContext context) {
    FileBlocks blocks = (FileBlocks) object;
    value.putUTF(blocks.resourceId());
    value.put(blocks.blocks().size());
    for (Block b : blocks.blocks()) {
      value.putByteArray(b.getBlockHash().getBytes());
      value.put(b.getIndexInFile());
      value.put(b.getStartLine());
      value.put(b.getEndLine());
View Full Code Here

  @Override
  public void put(Value value, Object object, CoderContext context) {
    FileBlocks blocks = (FileBlocks) object;
    value.putUTF(blocks.resourceId());
    value.put(blocks.blocks().size());
    for (Block b : blocks.blocks()) {
      value.putByteArray(b.getBlockHash().getBytes());
      value.put(b.getIndexInFile());
      value.put(b.getStartLine());
      value.put(b.getEndLine());
      value.put(b.getStartUnit());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.