Program: 28802
Project: 28802
Buggy source:
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  MavenProject rootMavenProject=mavenProject;
  while (rootMavenProject.getParent().getBasedir() != null) {
    rootMavenProject=rootMavenProject.getParent();
  }
  String moduleTargetPath;
  if (moduleTargetDirectory != null) {
    moduleTargetPath=moduleTargetDirectory.getAbsolutePath();
  }
 else {
    moduleTargetPath=mavenProject.getBuild().getDirectory();
  }
  String docGenBasePath;
  if (docGenBaseDirectory != null) {
    docGenBasePath=docGenBaseDirectory.getAbsolutePath();
  }
 else {
    docGenBasePath=rootMavenProject.getBasedir() + File.separator + Constants.DOCS_DIRECTORY;
  }
  if (homePageTemplateFile == null) {
    homePageTemplateFile=new File(rootMavenProject.getBasedir() + File.separator + Constants.README_FILE_NAME+ Constants.MARKDOWN_FILE_EXTENSION);
  }
  if (mkdocsConfigFile == null) {
    mkdocsConfigFile=new File(rootMavenProject.getBasedir() + File.separator + Constants.MKDOCS_CONFIG_FILE_NAME+ Constants.YAML_FILE_EXTENSION);
  }
  if (homePageFileName == null) {
    homePageFileName=Constants.MARKDOWN_HOME_PAGE_TEMPLATE;
  }
  List<NamespaceMetaData> namespaceMetaDataList;
  try {
    namespaceMetaDataList=DocumentationUtils.getExtensionMetaData(moduleTargetPath,mavenProject.getRuntimeClasspathElements(),getLog());
  }
 catch (  DependencyResolutionRequiredException e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
  if (namespaceMetaDataList.size() > 0) {
    DocumentationUtils.generateDocumentation(namespaceMetaDataList,docGenBasePath,mavenProject.getVersion());
    DocumentationUtils.updateHomePage(homePageTemplateFile,docGenBasePath,homePageFileName,mkdocsConfigFile,mavenProject.getVersion(),namespaceMetaDataList,getLog());
  }
}

Fixed version (ground truth):
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  MavenProject rootMavenProject=mavenProject;
  while (rootMavenProject.getParent().getBasedir() != null) {
    rootMavenProject=rootMavenProject.getParent();
  }
  String moduleTargetPath;
  if (moduleTargetDirectory != null) {
    moduleTargetPath=moduleTargetDirectory.getAbsolutePath();
  }
 else {
    moduleTargetPath=mavenProject.getBuild().getDirectory();
  }
  String docGenBasePath;
  if (docGenBaseDirectory != null) {
    docGenBasePath=docGenBaseDirectory.getAbsolutePath();
  }
 else {
    docGenBasePath=rootMavenProject.getBasedir() + File.separator + Constants.DOCS_DIRECTORY;
  }
  if (homePageTemplateFile == null) {
    homePageTemplateFile=new File(rootMavenProject.getBasedir() + File.separator + Constants.README_FILE_NAME+ Constants.MARKDOWN_FILE_EXTENSION);
  }
  if (mkdocsConfigFile == null) {
    mkdocsConfigFile=new File(rootMavenProject.getBasedir() + File.separator + Constants.MKDOCS_CONFIG_FILE_NAME+ Constants.YAML_FILE_EXTENSION);
  }
  File homePageFile;
  if (homePageFileName == null) {
    homePageFile=new File(docGenBasePath + File.separator + Constants.HOMEPAGE_FILE_NAME+ Constants.MARKDOWN_FILE_EXTENSION);
  }
 else {
    homePageFile=new File(docGenBasePath + File.separator + homePageFileName);
  }
  if (readmeFile == null) {
    readmeFile=new File(rootMavenProject.getBasedir() + File.separator + Constants.README_FILE_NAME+ Constants.MARKDOWN_FILE_EXTENSION);
  }
  List<NamespaceMetaData> namespaceMetaDataList;
  try {
    namespaceMetaDataList=DocumentationUtils.getExtensionMetaData(moduleTargetPath,mavenProject.getRuntimeClasspathElements(),getLog());
  }
 catch (  DependencyResolutionRequiredException e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
  if (namespaceMetaDataList.size() > 0) {
    DocumentationUtils.generateDocumentation(namespaceMetaDataList,docGenBasePath,mavenProject.getVersion());
    DocumentationUtils.updateHeadingsInMarkdownFile(homePageTemplateFile,homePageFile,rootMavenProject.getArtifactId(),mavenProject.getVersion(),namespaceMetaDataList);
    DocumentationUtils.updateHeadingsInMarkdownFile(readmeFile,readmeFile,rootMavenProject.getArtifactId(),mavenProject.getVersion(),namespaceMetaDataList);
    try {
      DocumentationUtils.updateAPIPagesInMkdocsConfig(mkdocsConfigFile,docGenBasePath);
    }
 catch (    FileNotFoundException e) {
      getLog().warn("String_Node_Str" + mkdocsConfigFile.getAbsolutePath() + "String_Node_Str");
    }
  }
}