CPD Results
The following document contains the results of PMD's CPD 7.0.0.
Duplications
File |
Line |
org/apache/maven/repository/internal/scopes/Maven3ScopeManagerConfiguration.java |
120 |
org/apache/maven/repository/internal/scopes/Maven4ScopeManagerConfiguration.java |
148 |
ArrayList<ResolutionScope> result = new ArrayList<>();
result.add(internalScopeManager.createResolutionScope(
RS_NONE,
InternalScopeManager.Mode.REMOVE,
Collections.emptySet(),
Collections.emptySet(),
allDependencyScopes));
result.add(internalScopeManager.createResolutionScope(
RS_MAIN_COMPILE,
InternalScopeManager.Mode.ELIMINATE,
singleton(CommonBuilds.PROJECT_PATH_MAIN, CommonBuilds.BUILD_PATH_COMPILE),
Collections.singletonList(system),
nonTransitiveDependencyScopes));
result.add(internalScopeManager.createResolutionScope(
RS_MAIN_COMPILE_PLUS_RUNTIME,
InternalScopeManager.Mode.ELIMINATE,
byProjectPath(CommonBuilds.PROJECT_PATH_MAIN),
Collections.singletonList(system),
nonTransitiveDependencyScopes));
result.add(internalScopeManager.createResolutionScope(
RS_MAIN_RUNTIME,
InternalScopeManager.Mode.ELIMINATE, |
File |
Line |
org/apache/maven/repository/internal/LocalSnapshotMetadata.java |
108 |
org/apache/maven/repository/internal/RemoteSnapshotMetadata.java |
123 |
Versioning versioning = recessive.getVersioning();
if (versioning != null) {
for (SnapshotVersion sv : versioning.getSnapshotVersions()) {
String key = getKey(sv.getClassifier(), sv.getExtension());
if (!versions.containsKey(key)) {
versions.put(key, sv);
}
}
}
metadata.getVersioning().setSnapshotVersions(new ArrayList<>(versions.values()));
// just carry-on as-is
if (!recessive.getPlugins().isEmpty()) {
metadata.setPlugins(new ArrayList<>(recessive.getPlugins()));
} |
File |
Line |
org/apache/maven/repository/internal/scopes/Maven3ScopeManagerConfiguration.java |
147 |
org/apache/maven/repository/internal/scopes/Maven4ScopeManagerConfiguration.java |
175 |
InternalScopeManager.Mode.ELIMINATE,
singleton(CommonBuilds.PROJECT_PATH_MAIN, CommonBuilds.BUILD_PATH_RUNTIME),
Collections.singletonList(system),
nonTransitiveDependencyScopes));
result.add(internalScopeManager.createResolutionScope(
RS_TEST_COMPILE,
InternalScopeManager.Mode.ELIMINATE,
select(CommonBuilds.PROJECT_PATH_TEST, CommonBuilds.BUILD_PATH_COMPILE),
Collections.singletonList(system),
nonTransitiveDependencyScopes));
result.add(internalScopeManager.createResolutionScope(
RS_TEST_RUNTIME,
InternalScopeManager.Mode.ELIMINATE,
select(CommonBuilds.PROJECT_PATH_TEST, CommonBuilds.BUILD_PATH_RUNTIME),
Collections.singletonList(system),
nonTransitiveDependencyScopes));
return result;
}
// ===
public static void main(String... args) {
ScopeManagerDump.dump(Maven3ScopeManagerConfiguration.INSTANCE); |
File |
Line |
org/apache/maven/repository/internal/DefaultVersionRangeResolver.java |
198 |
org/apache/maven/repository/internal/DefaultVersionResolver.java |
241 |
VersionRangeResult result) {
Versioning versioning = null;
try {
if (metadata != null) {
try (SyncContext syncContext = syncContextFactory.newInstance(session, true)) {
syncContext.acquire(null, Collections.singleton(metadata));
if (metadata.getPath() != null && Files.exists(metadata.getPath())) {
try (InputStream in = Files.newInputStream(metadata.getPath())) {
versioning = new Versioning(
new MetadataStaxReader().read(in, false).getVersioning()); |