Program: 152573
Project: 152573
Buggy source:
/** 
 * Walks through the history of the currently checked out branch of the Git repository and builds a changelog from the commits contained in that branch.
 * @throws MojoExecutionException if retrieving information from the Gitrepository fails
 */
public void execute() throws MojoExecutionException {
  this.commitPrefix=this.commitPrefix.replaceAll("String_Node_Str","String_Node_Str");
  this.header=this.header.replaceAll("String_Node_Str","String_Node_Str");
  this.tagPrefix=this.tagPrefix.replaceAll("String_Node_Str","String_Node_Str");
  try {
    this.initRepository();
    RevWalk revWalk=new RevWalk(this.repository);
    Map<String,Ref> tagRefs=this.repository.getTags();
    Map<String,RevTag> tags=new HashMap<String,RevTag>();
    for (    Map.Entry<String,Ref> tag : tagRefs.entrySet()) {
      try {
        RevTag revTag=revWalk.parseTag(tag.getValue().getObjectId());
        RevObject object=revWalk.peel(revTag);
        if (!(object instanceof RevCommit)) {
          continue;
        }
        tags.put(object.getName(),revTag);
      }
 catch (      IncorrectObjectTypeException e) {
        continue;
      }
    }
    revWalk.markStart(this.getHead());
    PrintStream outputStream;
    if (this.outputFile == null) {
      outputStream=System.out;
    }
 else {
      outputStream=new PrintStream(this.outputFile);
    }
    outputStream.println(this.header);
    SimpleDateFormat dateFormat=new SimpleDateFormat(this.dateFormat);
    RevCommit commit;
    while ((commit=revWalk.next()) != null) {
      if (tags.containsKey(commit.getName())) {
        RevTag tag=tags.get(commit.getName());
        PersonIdent taggerIdent=tag.getTaggerIdent();
        Calendar calendar=Calendar.getInstance(taggerIdent.getTimeZone());
        calendar.setTimeInMillis(taggerIdent.getWhen().getTime() + taggerIdent.getTimeZone().getRawOffset());
        String dateString=dateFormat.format(calendar.getTime());
        outputStream.println(this.tagPrefix + tag.getTagName() + "String_Node_Str"+ dateString+ "String_Node_Str");
        if (this.skipTagged) {
          continue;
        }
      }
      outputStream.println(this.commitPrefix + commit.getShortMessage());
    }
    outputStream.flush();
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Walks through the history of the currently checked out branch of the Git repository and builds a changelog from the commits contained in that branch.
 * @throws MojoExecutionException if retrieving information from the Gitrepository fails
 */
public void execute() throws MojoExecutionException {
  this.commitPrefix=this.commitPrefix.replaceAll("String_Node_Str","String_Node_Str");
  this.header=this.header.replaceAll("String_Node_Str","String_Node_Str");
  this.tagPrefix=this.tagPrefix.replaceAll("String_Node_Str","String_Node_Str");
  try {
    this.initRepository();
    RevWalk revWalk=new RevWalk(this.repository);
    Map<String,Ref> tagRefs=this.repository.getTags();
    Map<String,RevTag> tags=new HashMap<String,RevTag>();
    for (    Map.Entry<String,Ref> tag : tagRefs.entrySet()) {
      try {
        RevTag revTag=revWalk.parseTag(tag.getValue().getObjectId());
        RevObject object=revWalk.peel(revTag);
        if (!(object instanceof RevCommit)) {
          continue;
        }
        tags.put(object.getName(),revTag);
      }
 catch (      IncorrectObjectTypeException e) {
        continue;
      }
    }
    revWalk.markStart(this.getHead());
    PrintStream outputStream;
    if (this.outputFile == null) {
      outputStream=System.out;
    }
 else {
      outputStream=new PrintStream(this.outputFile);
    }
    outputStream.println(this.header);
    SimpleDateFormat dateFormat=new SimpleDateFormat(this.dateFormat);
    RevCommit commit;
    while ((commit=revWalk.next()) != null) {
      if (tags.containsKey(commit.getName())) {
        RevTag tag=tags.get(commit.getName());
        PersonIdent taggerIdent=tag.getTaggerIdent();
        dateFormat.setTimeZone(taggerIdent.getTimeZone());
        String dateString=dateFormat.format(taggerIdent.getWhen());
        outputStream.println(this.tagPrefix + tag.getTagName() + "String_Node_Str"+ dateString+ "String_Node_Str");
        if (this.skipTagged) {
          continue;
        }
      }
      outputStream.println(this.commitPrefix + commit.getShortMessage());
    }
    outputStream.flush();
  }
 catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}