class DuplicateMerger extends MavenModelMerger {

        public Plugin mergePlugin(Plugin target, Plugin source) {
            return super.mergePlugin(target, source, false, Collections.emptyMap());
        }
    }

    @Override
    public Model injectDefaultValues(Model model, ModelBuilderRequest request, ModelProblemCollector problems) {
        Model.Builder builder = Model.newBuilder(model);

        builder.dependencies(injectList(model.getDependencies(), this::injectDependency));
        Build build = model.getBuild();
        if (build != null) {
            Build newBuild = Build.newBuilder(build)
                    .plugins(injectList(build.getPlugins(), this::injectPlugin))
                    .build();
            builder.build(newBuild != build ? newBuild : null);
        }

        return builder.build();
    }

    private Plugin injectPlugin(Plugin p) {
        return Plugin.newBuilder(p)
                .dependencies(injectList(p.getDependencies(), this::injectDependency))
                .build();
    }

    private Dependency injectDependency(Dependency d) {
        // we cannot set this directly in the MDO due to the interactions with dependency management
        return (d.getScope() == null || d.getScope().isEmpty()) ? d.withScope("compile") : d;
    }

    /**
     * Returns a list suited for the builders, i.e. null if not modified
     */
    private <T> List<T> injectList(List<T> list, Function<T, T> modifer) {<FILL_FUNCTION_BODY>

        List<T> newList = null;
        for (int i = 0; i < list.size(); i++) {
            T oldT = list.get(i);
            T newT = modifer.apply(oldT);
            if (newT != oldT) {
                if (newList == null) {
                    newList = new ArrayList<>(list);
                }
                newList.set(i, newT);
            }
        }
        return newList;
    
<no_super_class>