Program: 159850
Project: 159850
Buggy source:
public static void loadImages(){
  String[] symbols=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String symbol : symbols) {
    File file=new File(Constants.RESOURCE_PATH_MANA_MEDIUM + "String_Node_Str" + symbol+ "String_Node_Str");
    Rectangle r=new Rectangle(11,11);
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
      manaImages.put(symbol,resized);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + symbol);
    }
    file=new File(Constants.RESOURCE_PATH_MANA_MEDIUM + "String_Node_Str" + symbol+ "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      manaImagesOriginal.put(symbol,image);
    }
 catch (    Exception e) {
    }
  }
  List<String> setCodes=CardRepository.instance.getSetCodes();
  for (  String set : setCodes) {
    File file=new File(Constants.RESOURCE_PATH_SET + set + "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      int width=image.getWidth(null);
      if (width > 21) {
        int h=image.getHeight(null);
        if (h > 0) {
          Rectangle r=new Rectangle(21,(int)(h * 21.0f / width));
          BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
          setImages.put(set,resized);
        }
      }
 else {
        setImages.put(set,image);
      }
    }
 catch (    Exception e) {
    }
    String[] codes=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    try {
      file=new File(Constants.RESOURCE_PATH_SET_SMALL);
      if (!file.exists()) {
        file.mkdirs();
      }
      for (      String code : codes) {
        file=new File(Constants.RESOURCE_PATH_SET_SMALL + set + "String_Node_Str"+ code+ "String_Node_Str");
        if (file.exists()) {
          continue;
        }
        file=new File(Constants.RESOURCE_PATH_SET + set + "String_Node_Str"+ code+ "String_Node_Str");
        Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
        try {
          int width=image.getWidth(null);
          int height=image.getHeight(null);
          if (height > 0) {
            int dx=0;
            if (set.equals("String_Node_Str") || set.equals("String_Node_Str") || set.equals("String_Node_Str")) {
              dx=6;
            }
            Rectangle r=new Rectangle(15 + dx,(int)(height * (15.0f + dx) / width));
            BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
            File newFile=new File(Constants.RESOURCE_PATH_SET_SMALL + File.separator + set+ "String_Node_Str"+ code+ "String_Node_Str");
            ImageIO.write(resized,"String_Node_Str",newFile);
          }
        }
 catch (        Exception e) {
          if (file != null && file.exists()) {
            file.delete();
          }
        }
      }
    }
 catch (    Exception e) {
    }
  }
  File file;
  for (  String set : CardRepository.instance.getSetCodes()) {
    file=new File(Constants.RESOURCE_PATH_SET_SMALL);
    if (!file.exists()) {
      break;
    }
    file=new File(Constants.RESOURCE_PATH_SET_SMALL + set + "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      int width=image.getWidth(null);
      int height=image.getHeight(null);
      setImagesExist.put(set,new Dimension(width,height));
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
public static void loadImages(){
  String[] symbols=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String symbol : symbols) {
    File file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_MANA_MEDIUM + "String_Node_Str"+ symbol+ "String_Node_Str");
    Rectangle r=new Rectangle(11,11);
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
      manaImages.put(symbol,resized);
    }
 catch (    Exception e) {
      log.error("String_Node_Str" + symbol);
    }
    file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_MANA_MEDIUM + "String_Node_Str"+ symbol+ "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      manaImagesOriginal.put(symbol,image);
    }
 catch (    Exception e) {
    }
  }
  List<String> setCodes=CardRepository.instance.getSetCodes();
  for (  String set : setCodes) {
    File file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET + set+ "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      int width=image.getWidth(null);
      if (width > 21) {
        int h=image.getHeight(null);
        if (h > 0) {
          Rectangle r=new Rectangle(21,(int)(h * 21.0f / width));
          BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
          setImages.put(set,resized);
        }
      }
 else {
        setImages.put(set,image);
      }
    }
 catch (    Exception e) {
    }
    String[] codes=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
    try {
      file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET_SMALL);
      if (!file.exists()) {
        file.mkdirs();
      }
      for (      String code : codes) {
        file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET_SMALL + set+ "String_Node_Str"+ code+ "String_Node_Str");
        if (file.exists()) {
          continue;
        }
        file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET + set+ "String_Node_Str"+ code+ "String_Node_Str");
        Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
        try {
          int width=image.getWidth(null);
          int height=image.getHeight(null);
          if (height > 0) {
            int dx=0;
            if (set.equals("String_Node_Str") || set.equals("String_Node_Str") || set.equals("String_Node_Str")) {
              dx=6;
            }
            Rectangle r=new Rectangle(15 + dx,(int)(height * (15.0f + dx) / width));
            BufferedImage resized=ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image,BufferedImage.TYPE_INT_ARGB),r);
            File newFile=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET_SMALL + File.separator+ set+ "String_Node_Str"+ code+ "String_Node_Str");
            ImageIO.write(resized,"String_Node_Str",newFile);
          }
        }
 catch (        Exception e) {
          if (file != null && file.exists()) {
            file.delete();
          }
        }
      }
    }
 catch (    Exception e) {
    }
  }
  File file;
  for (  String set : CardRepository.instance.getSetCodes()) {
    file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET_SMALL);
    if (!file.exists()) {
      break;
    }
    file=new File(getSymbolsPath() + Constants.RESOURCE_PATH_SET_SMALL + set+ "String_Node_Str");
    try {
      Image image=UI.getImageIcon(file.getAbsolutePath()).getImage();
      int width=image.getWidth(null);
      int height=image.getHeight(null);
      setImagesExist.put(set,new Dimension(width,height));
    }
 catch (    Exception e) {
    }
  }
}