public interface CPDListener {
- public static final int INIT = 0;
- public static final int HASH = 1;
- public static final int MATCH = 2;
- public static final int GROUPING = 3;
- public static final int DONE = 4;
+ int INIT = 0;
+ int HASH = 1;
+ int MATCH = 2;
+ int GROUPING = 3;
+ int DONE = 4;
void addedFile(int fileCount, File file);
}
return lines;
} catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage());
+ throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage(), e);
} finally {
try {
- if (lnr != null)
+ if (lnr != null) {
lnr.close();
+ }
} catch (Exception e) {
- throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage());
+ throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage(), e);
}
}
}
import com.google.common.collect.Lists;
import org.sonar.duplications.block.Block;
-import org.sonar.duplications.block.BlockChunker;
import org.sonar.duplications.block.ByteArray;
import java.util.Collections;
import java.util.List;
/**
- * Differences with {@link BlockChunker}:
+ * Differences with {@link org.sonar.duplications.block.BlockChunker}:
* works with {@link TokensLine},
* sets {@link Block#setStartUnit(int)} and {@link Block#setEndUnit(int)} - indexes of first and last token for this block.
*/