CPD Results
The following document contains the results of PMD's CPD 6.55.0.
Duplications
File |
Project |
Line |
org/codehaus/plexus/compiler/ajc/AspectJCompiler.java |
Plexus AspectJ Compiler |
615 |
org/codehaus/plexus/compiler/csharp/CSharpCompiler.java |
Plexus C# Compiler |
536 |
sources.addAll(getSourceFilesForSourceRoot(config, sourceLocation));
}
}
String[] result;
if (sources.isEmpty()) {
result = new String[0];
} else {
result = sources.toArray(new String[sources.size()]);
}
return result;
}
protected static Set<String> getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation) {
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(sourceLocation);
Set<String> includes = config.getIncludes();
if (includes != null && !includes.isEmpty()) {
String[] inclStrs = includes.toArray(new String[includes.size()]);
scanner.setIncludes(inclStrs);
} else {
scanner.setIncludes(new String[] {"**/*.java", "**/*.aj"}); |
File |
Project |
Line |
org/codehaus/plexus/compiler/csharp/DefaultCSharpCompilerParser.java |
Plexus C# Compiler |
60 |
org/codehaus/plexus/compiler/csharp/DefaultCSharpCompilerParser.java |
Plexus C# Compiler |
101 |
private static CompilerMessage parseLineWithNoColumnNumber(String line) {
String file = null;
boolean error = true;
int startline = -1;
int startcolumn = -1;
int endline = -1;
int endcolumn = -1;
String message;
if (line.startsWith(ERROR_PREFIX)) {
message = line.substring(ERROR_PREFIX.length());
} else if (line.startsWith(COMPILATION_PREFIX)) {
// ignore
return null;
} else if (line.contains(MAGIC_LINE_MARKER)) {
int i = line.indexOf(MAGIC_LINE_MARKER);
int j = line.indexOf(' ', i);
file = line.substring(0, i + 3);
String num = line.substring(i + MAGIC_LINE_MARKER.length(), j - 1); |