Program: 7626
Project: 7626
Buggy source:
public static void main(String[] args){
  boolean isError=false;
  boolean showHelp=false;
  String user=null;
  String saveDir=null;
  String expecting=null;
  String site=null;
  for (  String arg : args) {
    if (expecting != null) {
      if (expecting.equals("String_Node_Str")) {
        user=arg;
      }
 else       if (expecting.equals("String_Node_Str")) {
        saveDir=arg;
      }
 else       if (expecting.equals("String_Node_Str")) {
        site=arg;
      }
 else {
        System.err.println("String_Node_Str" + arg);
        isError=true;
        break;
      }
      expecting=null;
      continue;
    }
    if (arg.equals("String_Node_Str")) {
      showHelp=true;
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        user=arg.substring(2);
      }
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        saveDir=arg.substring(2);
      }
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        site=arg.substring(2);
      }
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else {
      System.err.println("String_Node_Str" + arg);
      isError=true;
      break;
    }
  }
  if (isError || showHelp) {
    showHelp(isError ? System.err : System.out);
    System.exit(0);
  }
  InputStreamReader inreader=new InputStreamReader(System.in);
  BufferedReader reader=new BufferedReader(inreader);
  if (site == null) {
    try {
      site=getLineFromConsole(reader,"String_Node_Str");
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  if (user == null) {
    try {
      user=getLineFromConsole(reader,"String_Node_Str");
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  boolean success=false;
  if (saveDir != null) {
    saveDir=BackupTubeCommon.fixDir(saveDir);
    success=BackupTubeCommon.isGoodSaveDir(saveDir);
    sendMessageIfBadSaveDir(success);
  }
  while (!success) {
    try {
      saveDir=getLineFromConsole(reader,"String_Node_Str");
      saveDir=BackupTubeCommon.fixDir(saveDir);
      success=BackupTubeCommon.isGoodSaveDir(saveDir);
      sendMessageIfBadSaveDir(success);
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  File dataFeedFile=new File(saveDir + BackupTubeCommon.LOCATION_DATAFILE);
  try {
    BackupTubeDataFile prevDataFile=getDataFile(dataFeedFile);
    for (    StoredVideo video : prevDataFile.getVideos()) {
      if (video.hasBeenDeleted()) {
        System.out.println("String_Node_Str" + video.getFolderName());
      }
    }
  }
 catch (  FileNotFoundException ex) {
  }
  BackupHelper helper=new BackupHelper(site);
  helper.setUser(user);
  LinkedList<DownloadableVideo> videos=null;
  try {
    videos=helper.getVideos();
  }
 catch (  FatalBackupException ex) {
    System.err.println("String_Node_Str" + ex.getMessage());
    ex.printStackTrace();
    System.exit(0);
  }
catch (  UnableToOpenURLConnectionException ex) {
    System.err.println("String_Node_Str");
    ex.printStackTrace();
    System.exit(0);
  }
  try {
    int videoCount=0;
    int totalVideoCount=videos.size();
    for (    DownloadableVideo video : videos) {
      for (int downloadTry=0; downloadTry < 3; downloadTry++) {
        try {
          video.init();
          String downloadURL=video.getDownloadURL();
          FileDownloader d=null;
          String safeVideoTitle=BackupTubeCommon.escapeFileName(video.getTitle());
          SimpleDateFormat published=new SimpleDateFormat("String_Node_Str");
          Date date=new Date(video.getPublished());
          String videoFolder=published.format(date) + "String_Node_Str" + safeVideoTitle;
          try {
            d=new FileDownloader(new URL(downloadURL),saveDir + videoFolder + "String_Node_Str"+ safeVideoTitle+ "String_Node_Str"+ video.getExtension());
          }
 catch (          FileAlreadyExistsException ex) {
            System.err.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
            break;
          }
          d.startDownload();
          boolean hasError=false;
          while (!d.isFinished()) {
            if (d.hasError()) {
              hasError=true;
              break;
            }
            double progress=d.getProgress();
            progress*=10000;
            progress=Math.round(progress);
            progress/=100;
            String progressMessage="String_Node_Str" + videoCount + "String_Node_Str"+ totalVideoCount+ "String_Node_Str"+ video.getTitle()+ "String_Node_Str"+ progress+ "String_Node_Str";
            System.out.print(progressMessage);
            try {
              Thread.sleep(1000);
            }
 catch (            InterruptedException ex) {
            }
          }
          if (hasError) {
            if (downloadTry == 2) {
              System.err.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
            }
 else {
              System.err.println("String_Node_Str");
            }
            continue;
          }
          System.out.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
          StoredYouTubeVideo storedVideo=new StoredYouTubeVideo();
          storedVideo.setTitle(video.getTitle());
          storedVideo.setDownloadedTime(BackupTubeCommon.getCurrentTime());
          storedVideo.setFolderName(videoFolder);
          storedVideo.setSiteID(video.getSiteID());
          storedVideo.setVideoID(video.getVideoID());
          BackupTubeDataFile dataFile;
          try {
            dataFile=getDataFile(dataFeedFile);
          }
 catch (          FileNotFoundException ex) {
            dataFile=new BackupTubeDataFile();
          }
          LinkedList<StoredVideo> storedVideos=null;
          if (storedVideos == null) {
            storedVideos=new LinkedList();
          }
          storedVideos.add(storedVideo);
          dataFile.setLastUpdated(BackupTubeCommon.getCurrentTime());
          dataFile.setVideos(storedVideos);
          saveDataFile(dataFeedFile,dataFile);
          break;
        }
 catch (        BadVideoException ex) {
          ex.printStackTrace();
        }
catch (        MalformedURLException ex) {
          ex.printStackTrace();
        }
      }
      videoCount++;
    }
  }
 catch (  FatalBackupException ex) {
    System.err.println("String_Node_Str" + ex.getMessage());
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  boolean isError=false;
  boolean showHelp=false;
  String user=null;
  String saveDir=null;
  String expecting=null;
  String site=null;
  for (  String arg : args) {
    if (expecting != null) {
      if (expecting.equals("String_Node_Str")) {
        user=arg;
      }
 else       if (expecting.equals("String_Node_Str")) {
        saveDir=arg;
      }
 else       if (expecting.equals("String_Node_Str")) {
        site=arg;
      }
 else {
        System.err.println("String_Node_Str" + arg);
        isError=true;
        break;
      }
      expecting=null;
      continue;
    }
    if (arg.equals("String_Node_Str")) {
      showHelp=true;
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        user=arg.substring(2);
      }
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        saveDir=arg.substring(2);
      }
    }
 else     if (arg.startsWith("String_Node_Str")) {
      if (arg.equals("String_Node_Str")) {
        expecting="String_Node_Str";
      }
 else {
        site=arg.substring(2);
      }
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else     if (arg.equals("String_Node_Str")) {
      expecting="String_Node_Str";
    }
 else {
      System.err.println("String_Node_Str" + arg);
      isError=true;
      break;
    }
  }
  if (isError || showHelp) {
    showHelp(isError ? System.err : System.out);
    System.exit(0);
  }
  InputStreamReader inreader=new InputStreamReader(System.in);
  BufferedReader reader=new BufferedReader(inreader);
  if (site == null) {
    try {
      site=getLineFromConsole(reader,"String_Node_Str");
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  if (user == null) {
    try {
      user=getLineFromConsole(reader,"String_Node_Str");
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  boolean success=false;
  if (saveDir != null) {
    saveDir=BackupTubeCommon.fixDir(saveDir);
    success=BackupTubeCommon.isGoodSaveDir(saveDir);
    sendMessageIfBadSaveDir(success);
  }
  while (!success) {
    try {
      saveDir=getLineFromConsole(reader,"String_Node_Str");
      saveDir=BackupTubeCommon.fixDir(saveDir);
      success=BackupTubeCommon.isGoodSaveDir(saveDir);
      sendMessageIfBadSaveDir(success);
    }
 catch (    UnableToReadFromConsoleException ex) {
      ex.printStackTrace();
      System.exit(0);
    }
  }
  File dataFeedFile=new File(saveDir + BackupTubeCommon.LOCATION_DATAFILE);
  try {
    BackupTubeDataFile prevDataFile=getDataFile(dataFeedFile);
    for (    StoredVideo video : prevDataFile.getVideos()) {
      if (video.hasBeenDeleted()) {
        System.out.println("String_Node_Str" + video.getFolderName());
      }
    }
  }
 catch (  FileNotFoundException ex) {
  }
  BackupHelper helper=new BackupHelper(site);
  helper.setUser(user);
  LinkedList<DownloadableVideo> videos=null;
  try {
    videos=helper.getVideos();
  }
 catch (  FatalBackupException ex) {
    System.err.println("String_Node_Str" + ex.getMessage());
    ex.printStackTrace();
    System.exit(0);
  }
catch (  UnableToOpenURLConnectionException ex) {
    System.err.println("String_Node_Str");
    ex.printStackTrace();
    System.exit(0);
  }
  try {
    int videoCount=0;
    int totalVideoCount=videos.size();
    for (    DownloadableVideo video : videos) {
      for (int downloadTry=0; downloadTry < 3; downloadTry++) {
        try {
          video.init();
          String downloadURL=video.getDownloadURL();
          FileDownloader d=null;
          String safeVideoTitle=BackupTubeCommon.escapeFileName(video.getTitle());
          SimpleDateFormat published=new SimpleDateFormat("String_Node_Str");
          Date date=new Date(video.getPublished());
          String videoFolder=published.format(date) + "String_Node_Str" + safeVideoTitle;
          try {
            d=new FileDownloader(new URL(downloadURL),saveDir + videoFolder + "String_Node_Str"+ safeVideoTitle+ "String_Node_Str"+ video.getExtension());
          }
 catch (          FileAlreadyExistsException ex) {
            System.err.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
            break;
          }
          d.startDownload();
          boolean hasError=false;
          while (!d.isFinished()) {
            if (d.hasError()) {
              hasError=true;
              break;
            }
            double progress=d.getProgress();
            progress*=10000;
            progress=Math.round(progress);
            progress/=100;
            String progressMessage="String_Node_Str" + videoCount + "String_Node_Str"+ totalVideoCount+ "String_Node_Str"+ video.getTitle()+ "String_Node_Str"+ progress+ "String_Node_Str";
            System.out.print(progressMessage);
            try {
              Thread.sleep(1000);
            }
 catch (            InterruptedException ex) {
            }
          }
          if (hasError) {
            if (downloadTry == 2) {
              System.err.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
            }
 else {
              System.err.println("String_Node_Str");
            }
            continue;
          }
          System.out.println("String_Node_Str" + video.getTitle() + "String_Node_Str");
          StoredYouTubeVideo storedVideo=new StoredYouTubeVideo();
          storedVideo.setTitle(video.getTitle());
          storedVideo.setDownloadedTime(BackupTubeCommon.getCurrentTime());
          storedVideo.setFolderName(videoFolder);
          storedVideo.setSiteID(video.getSiteID());
          storedVideo.setVideoID(video.getVideoID());
          BackupTubeDataFile dataFile;
          try {
            dataFile=getDataFile(dataFeedFile);
          }
 catch (          FileNotFoundException ex) {
            dataFile=new BackupTubeDataFile();
          }
          LinkedList<StoredVideo> storedVideos=dataFile.getVideos();
          if (storedVideos == null) {
            storedVideos=new LinkedList();
          }
          storedVideos.add(storedVideo);
          dataFile.setLastUpdated(BackupTubeCommon.getCurrentTime());
          dataFile.setVideos(storedVideos);
          saveDataFile(dataFeedFile,dataFile);
          break;
        }
 catch (        BadVideoException ex) {
          ex.printStackTrace();
        }
catch (        MalformedURLException ex) {
          ex.printStackTrace();
        }
      }
      videoCount++;
    }
  }
 catch (  FatalBackupException ex) {
    System.err.println("String_Node_Str" + ex.getMessage());
    ex.printStackTrace();
  }
}