CPD Results

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

Duplications

File Line
org/apache/maven/model/inheritance/DefaultInheritanceAssembler.java 257
org/apache/maven/model/profile/DefaultProfileInjector.java 148
master.put(key, element);

                        if (!pending.isEmpty()) {
                            predecessors.put(key, pending);
                            pending = new ArrayList<>();
                        }
                    } else {
                        pending.add(element);
                    }
                }

                List<Plugin> result = new ArrayList<>(src.size() + tgt.size());
                for (Map.Entry<Object, Plugin> entry : master.entrySet()) {
                    List<Plugin> pre = predecessors.get(entry.getKey());
                    if (pre != null) {
                        result.addAll(pre);
                    }
                    result.add(entry.getValue());
                }
                result.addAll(pending);

                builder.plugins(result);
            }
        }

        @Override
        protected Plugin mergePlugin(
File Line
org/apache/maven/model/io/DefaultModelReader.java 116
org/apache/maven/model/io/DefaultModelReader.java 140
XMLStreamReader parser = factory.createXMLStreamReader(input);

            InputSource source = getSource(options);
            boolean strict = isStrict(options);
            MavenStaxReader mr = new MavenStaxReader();
            mr.setAddLocationInformation(source != null);
            Model model = new Model(mr.read(parser, strict, source != null ? source.toApiSource() : null));
            return model;
        } catch (XMLStreamException e) {
            Location location = e.getLocation();
            throw new ModelParseException(
                    e.getMessage(),
                    location != null ? location.getLineNumber() : -1,
                    location != null ? location.getColumnNumber() : -1,
                    e);
        } catch (Exception e) {
            throw new IOException("Unable to transform pom", e);
        }
    }