Program: 32236
Project: 32236
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  validateConfiguration(preHotfixGoals,postHotfixGoals);
  try {
    checkUncommittedChanges();
    String hotfixBranchName=null;
    if (settings.isInteractiveMode()) {
      hotfixBranchName=promptBranchName();
    }
 else     if (StringUtils.isNotBlank(hotfixVersion)) {
      final String branch=gitFlowConfig.getHotfixBranchPrefix() + hotfixVersion;
      if (!gitCheckBranchExists(branch)) {
        throw new MojoFailureException("String_Node_Str" + branch + "String_Node_Str");
      }
      hotfixBranchName=branch;
    }
    if (StringUtils.isBlank(hotfixBranchName)) {
      throw new MojoFailureException("String_Node_Str");
    }
    String supportBranchName=null;
    boolean supportHotfix=hotfixBranchName.startsWith(gitFlowConfig.getHotfixBranchPrefix() + gitFlowConfig.getSupportBranchPrefix());
    if (supportHotfix) {
      supportBranchName=hotfixBranchName.substring(gitFlowConfig.getHotfixBranchPrefix().length());
      supportBranchName=supportBranchName.substring(0,supportBranchName.lastIndexOf('/'));
    }
    if (fetchRemote) {
      gitFetchRemoteAndCompare(hotfixBranchName);
      if (supportBranchName != null) {
        gitFetchRemoteAndCompare(supportBranchName);
      }
 else {
        if (notSameProdDevName()) {
          gitFetchRemoteAndCompare(gitFlowConfig.getDevelopmentBranch());
        }
        gitFetchRemoteAndCompare(gitFlowConfig.getProductionBranch());
      }
    }
    if (!skipTestProject) {
      gitCheckout(hotfixBranchName);
      mvnCleanTest();
    }
    if (StringUtils.isNotBlank(preHotfixGoals)) {
      gitCheckout(hotfixBranchName);
      mvnRun(preHotfixGoals);
    }
    if (supportBranchName != null) {
      gitCheckout(supportBranchName);
    }
 else {
      gitCheckout(gitFlowConfig.getProductionBranch());
    }
    gitMergeNoff(hotfixBranchName);
    final String currentVersion=getCurrentProjectVersion();
    if (!skipTag) {
      String tagVersion=currentVersion;
      if (tychoBuild && ArtifactUtils.isSnapshot(tagVersion)) {
        tagVersion=tagVersion.replace("String_Node_Str" + Artifact.SNAPSHOT_VERSION,"String_Node_Str");
      }
      gitTag(gitFlowConfig.getVersionTagPrefix() + tagVersion,commitMessages.getTagHotfixMessage());
    }
    if (StringUtils.isNotBlank(postHotfixGoals)) {
      mvnRun(postHotfixGoals);
    }
    final String releaseBranch=gitFindBranches(gitFlowConfig.getReleaseBranchPrefix(),true);
    if (supportBranchName == null) {
      if (StringUtils.isNotBlank(releaseBranch)) {
        gitCheckout(releaseBranch);
        gitMergeNoff(hotfixBranchName);
      }
 else {
        GitFlowVersionInfo developVersionInfo=new GitFlowVersionInfo(currentVersion);
        if (notSameProdDevName()) {
          gitCheckout(gitFlowConfig.getDevelopmentBranch());
          developVersionInfo=new GitFlowVersionInfo(getCurrentProjectVersion());
          mvnSetVersions(currentVersion);
          gitCommit("String_Node_Str");
          gitMergeNoff(hotfixBranchName);
          GitFlowVersionInfo hotfixVersionInfo=new GitFlowVersionInfo(currentVersion);
          if (developVersionInfo.compareTo(hotfixVersionInfo) < 0) {
            developVersionInfo=hotfixVersionInfo;
          }
        }
        final String nextSnapshotVersion=developVersionInfo.nextSnapshotVersion();
        if (StringUtils.isBlank(nextSnapshotVersion)) {
          throw new MojoFailureException("String_Node_Str");
        }
        mvnSetVersions(nextSnapshotVersion);
        Map<String,String> properties=new HashMap<String,String>();
        properties.put("String_Node_Str",nextSnapshotVersion);
        gitCommit(commitMessages.getHotfixFinishMessage(),properties);
      }
    }
    if (installProject) {
      mvnCleanInstall();
    }
    if (!keepBranch) {
      gitBranchDelete(hotfixBranchName);
    }
    if (pushRemote) {
      if (supportBranchName != null) {
        gitPush(supportBranchName,!skipTag);
      }
 else {
        gitPush(gitFlowConfig.getProductionBranch(),!skipTag);
        if (StringUtils.isBlank(releaseBranch) && notSameProdDevName()) {
          gitPush(gitFlowConfig.getDevelopmentBranch(),!skipTag);
        }
      }
      if (!keepBranch) {
        gitPushDelete(hotfixBranchName);
      }
    }
  }
 catch (  Exception e) {
    getLog().error(e);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void execute() throws MojoExecutionException, MojoFailureException {
  validateConfiguration(preHotfixGoals,postHotfixGoals);
  try {
    checkUncommittedChanges();
    String hotfixBranchName=null;
    if (settings.isInteractiveMode()) {
      hotfixBranchName=promptBranchName();
    }
 else     if (StringUtils.isNotBlank(hotfixVersion)) {
      final String branch=gitFlowConfig.getHotfixBranchPrefix() + hotfixVersion;
      if (!gitCheckBranchExists(branch)) {
        throw new MojoFailureException("String_Node_Str" + branch + "String_Node_Str");
      }
      hotfixBranchName=branch;
    }
    if (StringUtils.isBlank(hotfixBranchName)) {
      throw new MojoFailureException("String_Node_Str");
    }
    String supportBranchName=null;
    boolean supportHotfix=hotfixBranchName.startsWith(gitFlowConfig.getHotfixBranchPrefix() + gitFlowConfig.getSupportBranchPrefix());
    if (supportHotfix) {
      supportBranchName=hotfixBranchName.substring(gitFlowConfig.getHotfixBranchPrefix().length());
      supportBranchName=supportBranchName.substring(0,supportBranchName.lastIndexOf('/'));
    }
    if (fetchRemote) {
      gitFetchRemoteAndCompare(hotfixBranchName);
      if (supportBranchName != null) {
        gitFetchRemoteAndCompare(supportBranchName);
      }
 else {
        if (notSameProdDevName()) {
          gitFetchRemoteAndCompare(gitFlowConfig.getDevelopmentBranch());
        }
        gitFetchRemoteAndCompare(gitFlowConfig.getProductionBranch());
      }
    }
    if (!skipTestProject) {
      gitCheckout(hotfixBranchName);
      mvnCleanTest();
    }
    if (StringUtils.isNotBlank(preHotfixGoals)) {
      gitCheckout(hotfixBranchName);
      mvnRun(preHotfixGoals);
    }
    if (supportBranchName != null) {
      gitCheckout(supportBranchName);
    }
 else {
      gitCheckout(gitFlowConfig.getProductionBranch());
    }
    gitMergeNoff(hotfixBranchName);
    final String currentVersion=getCurrentProjectVersion();
    if (!skipTag) {
      String tagVersion=currentVersion;
      if (tychoBuild && ArtifactUtils.isSnapshot(tagVersion)) {
        tagVersion=tagVersion.replace("String_Node_Str" + Artifact.SNAPSHOT_VERSION,"String_Node_Str");
      }
      gitTag(gitFlowConfig.getVersionTagPrefix() + tagVersion,commitMessages.getTagHotfixMessage());
    }
    if (StringUtils.isNotBlank(postHotfixGoals)) {
      mvnRun(postHotfixGoals);
    }
    final String releaseBranch=gitFindBranches(gitFlowConfig.getReleaseBranchPrefix(),true);
    if (supportBranchName == null) {
      if (StringUtils.isNotBlank(releaseBranch)) {
        gitCheckout(releaseBranch);
        gitMergeNoff(hotfixBranchName);
      }
 else {
        GitFlowVersionInfo developVersionInfo=new GitFlowVersionInfo(currentVersion);
        if (notSameProdDevName()) {
          gitCheckout(gitFlowConfig.getDevelopmentBranch());
          developVersionInfo=new GitFlowVersionInfo(getCurrentProjectVersion());
          mvnSetVersions(currentVersion);
          gitCommit("String_Node_Str");
          gitMergeNoff(hotfixBranchName);
          GitFlowVersionInfo hotfixVersionInfo=new GitFlowVersionInfo(currentVersion);
          if (developVersionInfo.compareTo(hotfixVersionInfo) < 0) {
            developVersionInfo=hotfixVersionInfo;
          }
        }
        final String nextSnapshotVersion=developVersionInfo.nextSnapshotVersion();
        if (StringUtils.isBlank(nextSnapshotVersion)) {
          throw new MojoFailureException("String_Node_Str");
        }
        mvnSetVersions(nextSnapshotVersion);
        Map<String,String> properties=new HashMap<String,String>();
        properties.put("String_Node_Str",nextSnapshotVersion);
        gitCommit(commitMessages.getHotfixFinishMessage(),properties);
      }
    }
    if (installProject) {
      mvnCleanInstall();
    }
    if (!keepBranch) {
      gitBranchDelete(hotfixBranchName);
    }
    if (pushRemote) {
      if (supportBranchName != null) {
        gitPush(supportBranchName,!skipTag);
      }
 else {
        gitPush(gitFlowConfig.getProductionBranch(),!skipTag);
        if (StringUtils.isBlank(releaseBranch) && notSameProdDevName()) {
          gitPush(gitFlowConfig.getDevelopmentBranch(),!skipTag);
        }
      }
      if (!keepBranch) {
        gitPushDelete(hotfixBranchName);
      }
    }
  }
 catch (  Exception e) {
    throw new MojoFailureException("String_Node_Str",e);
  }
}