Program: 33971
Project: 33971
Buggy source:
public void getResourceResponse(JSONObject response){
  try {
    final String username=response.getString("String_Node_Str");
    final String projectName=response.getString("String_Node_Str");
    final String resourcePath=response.getString("String_Node_Str");
    final long updateTimestamp=response.getLong("String_Node_Str");
    final String updateHash=response.getString("String_Node_Str");
    ConnectedProject connectedProject=this.syncedProjects.get(projectName);
    if (this.username.equals(username) && connectedProject != null) {
      boolean stored=false;
      IProject project=connectedProject.getProject();
      IResource resource=project.findMember(resourcePath);
      if (resource != null) {
        if (resource instanceof IFile) {
          String localHash=connectedProject.getHash(resourcePath);
          long localTimestamp=connectedProject.getTimestamp(resourcePath);
          if (localHash != null && !localHash.equals(updateHash) && localTimestamp < updateTimestamp) {
            IFile file=(IFile)resource;
            String newResourceContent=response.getString("String_Node_Str");
            connectedProject.setTimestamp(resourcePath,updateTimestamp);
            connectedProject.setHash(resourcePath,updateHash);
            file.setContents(new ByteArrayInputStream(newResourceContent.getBytes()),true,true,null);
            file.setLocalTimeStamp(updateTimestamp);
            stored=true;
          }
        }
      }
 else {
        IFile newFile=project.getFile(resourcePath);
        String newResourceContent=response.getString("String_Node_Str");
        connectedProject.setHash(resourcePath,updateHash);
        connectedProject.setTimestamp(resourcePath,updateTimestamp);
        newFile.create(new ByteArrayInputStream(newResourceContent.getBytes()),true,null);
        newFile.setLocalTimeStamp(updateTimestamp);
        stored=true;
      }
      if (stored) {
        JSONObject message=new JSONObject();
        message.put("String_Node_Str",this.username);
        message.put("String_Node_Str",connectedProject.getName());
        message.put("String_Node_Str",resourcePath);
        message.put("String_Node_Str",updateTimestamp);
        message.put("String_Node_Str",updateHash);
        message.put("String_Node_Str","String_Node_Str");
        messagingConnector.send("String_Node_Str",message);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void getResourceResponse(JSONObject response){
  try {
    final String username=response.getString("String_Node_Str");
    final String projectName=response.getString("String_Node_Str");
    final String resourcePath=response.getString("String_Node_Str");
    final long updateTimestamp=response.getLong("String_Node_Str");
    final String updateHash=response.getString("String_Node_Str");
    ConnectedProject connectedProject=this.syncedProjects.get(projectName);
    if (this.username.equals(username) && connectedProject != null) {
      boolean stored=false;
      IProject project=connectedProject.getProject();
      IResource resource=project.findMember(resourcePath);
      if (resource != null) {
        if (resource instanceof IFile) {
          String localHash=connectedProject.getHash(resourcePath);
          long localTimestamp=connectedProject.getTimestamp(resourcePath);
          if (localHash != null && !localHash.equals(updateHash) && localTimestamp < updateTimestamp) {
            IFile file=(IFile)resource;
            String newResourceContent=response.getString("String_Node_Str");
            connectedProject.setTimestamp(resourcePath,updateTimestamp);
            connectedProject.setHash(resourcePath,updateHash);
            file.setContents(new ByteArrayInputStream(newResourceContent.getBytes()),true,true,null);
            file.setLocalTimeStamp(updateTimestamp);
            stored=true;
          }
        }
      }
 else {
        IFile newFile=project.getFile(resourcePath);
        String newResourceContent=response.getString("String_Node_Str");
        connectedProject.setHash(resourcePath,updateHash);
        connectedProject.setTimestamp(resourcePath,updateTimestamp);
        newFile.create(new ByteArrayInputStream(newResourceContent.getBytes()),true,null);
        newFile.setLocalTimeStamp(updateTimestamp);
        stored=true;
      }
      if (stored) {
        JSONObject message=new JSONObject();
        message.put("String_Node_Str",this.username);
        message.put("String_Node_Str",connectedProject.getName());
        message.put("String_Node_Str",resourcePath);
        message.put("String_Node_Str",updateTimestamp);
        message.put("String_Node_Str",updateHash);
        message.put("String_Node_Str","String_Node_Str");
        messagingConnector.send("String_Node_Str",message);
        notifyResourceChanged(resource);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}