code: protected void updateModelBase(ModelBase value, String xmlTag, Counter counter, Element element)
     {
        boolean shouldExist = value != null;
        Element root = updateElement(counter, element, xmlTag, shouldExist);
        if (shouldExist)
        {
           Counter innerCount = new Counter(counter.getDepth() + 1);
           findAndReplaceSimpleLists(innerCount, root, value.getModules(), "modules", "module");
           iterateRepository(innerCount, root, value.getRepositories(), "repositories", "repository");
           iterateRepository(innerCount, root, value.getPluginRepositories(), "pluginRepositories",
                    "pluginRepository");
           iterateDependency(innerCount, root, value.getDependencies(), "dependencies", "dependency");
           findAndReplaceXpp3DOM(innerCount, root, "reports", (Xpp3Dom) value.getReports());
           updateReporting(value.getReporting(), "reporting", innerCount, root);
           updateDependencyManagement(value.getDependencyManagement(), "dependencyManagement", innerCount, root);
           updateDistributionManagement(value.getDistributionManagement(), "distributionManagement", innerCount, root);
           findAndReplaceProperties(innerCount, root, "properties", value.getProperties());
        }
     }
docs: Method updateModelBase.
  
  @param value
  @param element
  @param counter
  @param xmlTag