Program: 99004
Project: 99004
Buggy source:
/** 
 * Called if we have decided to go ahead with posting onto this wall. We'll do the posting such that it is guaranteed to eventually succeed as long as this method is called until completion.
 * @throws IOException 
 */
public void commitWallPost(UUID txnId,String args) throws IOException {
  Object[] objArgs=parseArgs(args);
  @SuppressWarnings("String_Node_Str") List<String> nameList=(List<String>)objArgs[0];
  String message=(String)objArgs[1];
  List<File> oldTemps=Utility.getMatchingFiles(addr,WALL_POST_TEMP_PREFIX);
  for (  File f : oldTemps) {
    String txnIdString=txnId.toString();
    String fileTxnString=f.getName().substring(f.getName().indexOf("String_Node_Str"));
    printOutput("String_Node_Str" + fileTxnString + "String_Node_Str"+ txnIdString);
    if (!fileTxnString.equals(txnIdString)) {
      printOutput("String_Node_Str" + f.getName());
      this.getWriter(f.getName(),false).delete();
    }
  }
  for (  String name : nameList) {
    if (Utility.fileExists(this,MESSAGES_PREFIX + name)) {
      String tempFileName=getWallTempName(txnId,name);
      PersistentStorageReader tempReader=null;
      if (Utility.fileExists(this,tempFileName)) {
        tempReader=this.getReader(tempFileName);
      }
      if (tempReader != null && tempReader.ready()) {
        char[] buf=new char[MAX_FILE_SIZE];
        tempReader.read(buf,0,MAX_FILE_SIZE);
        PersistentStorageWriter postsFileWriter=this.getWriter(MESSAGES_PREFIX + name,false);
        postsFileWriter.write(buf);
      }
 else {
        assert(Utility.fileExists(this,MESSAGES_PREFIX + name));
        PersistentStorageReader masterFileReader=this.getReader(MESSAGES_PREFIX + name);
        char[] buf=new char[MAX_FILE_SIZE];
        int length=masterFileReader.read(buf,0,MAX_FILE_SIZE);
        String contents;
        if (length == -1) {
          contents="String_Node_Str";
        }
 else {
          contents=new String(buf,0,length);
        }
        contents+=message + '\n';
        PersistentStorageWriter tempWriter=this.getWriter(tempFileName,false);
        tempWriter.write(contents);
        PersistentStorageWriter masterWriter=this.getWriter(MESSAGES_PREFIX + name,false);
        masterWriter.write(contents);
      }
    }
  }
  if (addr == CLIENT_ID) {
    printOutput("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Called if we have decided to go ahead with posting onto this wall. We'll do the posting such that it is guaranteed to eventually succeed as long as this method is called until completion.
 * @throws IOException 
 */
public void commitWallPost(UUID txnId,String args) throws IOException {
  Object[] objArgs=parseArgs(args);
  @SuppressWarnings("String_Node_Str") List<String> nameList=(List<String>)objArgs[0];
  String message=(String)objArgs[1];
  List<File> oldTemps=Utility.getMatchingFiles(addr,WALL_POST_TEMP_PREFIX);
  for (  File f : oldTemps) {
    String txnIdString=txnId.toString();
    String fileTxnString=f.getName().substring(f.getName().indexOf("String_Node_Str") + 2);
    printOutput("String_Node_Str" + fileTxnString + "String_Node_Str"+ txnIdString);
    if (!fileTxnString.equals(txnIdString)) {
      printOutput("String_Node_Str" + f.getName());
      this.getWriter(f.getName(),false).delete();
    }
  }
  for (  String name : nameList) {
    if (Utility.fileExists(this,MESSAGES_PREFIX + name)) {
      String tempFileName=getWallTempName(txnId,name);
      PersistentStorageReader tempReader=null;
      if (Utility.fileExists(this,tempFileName)) {
        tempReader=this.getReader(tempFileName);
      }
      if (tempReader != null && tempReader.ready()) {
        char[] buf=new char[MAX_FILE_SIZE];
        tempReader.read(buf,0,MAX_FILE_SIZE);
        PersistentStorageWriter postsFileWriter=this.getWriter(MESSAGES_PREFIX + name,false);
        postsFileWriter.write(buf);
      }
 else {
        assert(Utility.fileExists(this,MESSAGES_PREFIX + name));
        PersistentStorageReader masterFileReader=this.getReader(MESSAGES_PREFIX + name);
        char[] buf=new char[MAX_FILE_SIZE];
        int length=masterFileReader.read(buf,0,MAX_FILE_SIZE);
        String contents;
        if (length == -1) {
          contents="String_Node_Str";
        }
 else {
          contents=new String(buf,0,length);
        }
        contents+=message + '\n';
        PersistentStorageWriter tempWriter=this.getWriter(tempFileName,false);
        tempWriter.write(contents);
        PersistentStorageWriter masterWriter=this.getWriter(MESSAGES_PREFIX + name,false);
        masterWriter.write(contents);
      }
    }
  }
  if (addr == CLIENT_ID) {
    printOutput("String_Node_Str");
  }
}