CPD Results

The following document contains the results of PMD's CPD 6.55.0.

Duplications

File Line
org/apache/maven/model/InputLocation.java 228
org/apache/maven/model/InputLocation.java 263
  1. public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant) {
  2. if (source == null) {
  3. return target;
  4. } else if (target == null) {
  5. return source;
  6. }
  7.  
  8. InputLocation result = new InputLocation(target.getLineNumber(), target.getColumnNumber(), target.getSource());
  9.  
  10. java.util.Map<Object, InputLocation> locations;
  11. java.util.Map<Object, InputLocation> sourceLocations = source.getLocations();
  12. java.util.Map<Object, InputLocation> targetLocations = target.getLocations();
  13. if (sourceLocations == null) {
  14. locations = targetLocations;
  15. } else if (targetLocations == null) {
  16. locations = sourceLocations;
  17. } else {
  18. locations = new java.util.LinkedHashMap();