nus-yam/ex-repair huggingface dataset:
Program: 32895
Project: 32895
Buggy source:
public SkinManager(TextureManager textureManagerInstance,File skinCacheDirectory,MinecraftSessionService sessionService){
  this.textureManager=textureManagerInstance;
  this.skinCacheDir=skinCacheDirectory;
  this.sessionService=sessionService;
  this.skinCacheLoader=CacheBuilder.newBuilder().expireAfterAccess(15L,TimeUnit.SECONDS).<GameProfile,Map<Type,MinecraftProfileTexture>>build(new CacheLoader<GameProfile,Map<Type,MinecraftProfileTexture>>(){
    public Map<Type,MinecraftProfileTexture> load(    GameProfile p_load_1_) throws Exception {
      return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_,false);
    }
  }
);
  customskinloader.loader.MojangAPILoader.defaultSessionService=sessionService;
  customskinloader.utils.HttpTextureUtil.defaultCacheDir=skinCacheDirectory;
  customskinloader.utils.HttpTextureUtil.initDefaultCacheDir();
}

Fixed version (ground truth):
public SkinManager(TextureManager textureManagerInstance,File skinCacheDirectory,MinecraftSessionService sessionService){
  this.textureManager=textureManagerInstance;
  this.skinCacheDir=skinCacheDirectory;
  this.sessionService=sessionService;
  this.skinCacheLoader=CacheBuilder.newBuilder().expireAfterAccess(15L,TimeUnit.SECONDS).<GameProfile,Map<Type,MinecraftProfileTexture>>build(new CacheLoader<GameProfile,Map<Type,MinecraftProfileTexture>>(){
    public Map<Type,MinecraftProfileTexture> load(    GameProfile p_load_1_) throws Exception {
      return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_,false);
    }
  }
);
  customskinloader.loader.MojangAPILoader.defaultSessionService=sessionService;
  customskinloader.utils.HttpTextureUtil.defaultCacheDir=skinCacheDirectory;
}
Program: 32896
Project: 32896
Buggy source:
public SkinManager(TextureManager textureManagerInstance,File skinCacheDirectory,MinecraftSessionService sessionService){
  this.textureManager=textureManagerInstance;
  this.skinCacheDir=skinCacheDirectory;
  this.sessionService=sessionService;
  this.skinCacheLoader=CacheBuilder.newBuilder().expireAfterAccess(15L,TimeUnit.SECONDS).<GameProfile,Map<Type,MinecraftProfileTexture>>build(new CacheLoader<GameProfile,Map<Type,MinecraftProfileTexture>>(){
    public Map<Type,MinecraftProfileTexture> load(    GameProfile p_load_1_) throws Exception {
      return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_,false);
    }
  }
);
  customskinloader.loader.MojangAPILoader.defaultSessionService=sessionService;
  customskinloader.utils.HttpTextureUtil.defaultCacheDir=skinCacheDirectory;
  customskinloader.utils.HttpTextureUtil.initDefaultCacheDir();
}

Fixed version (ground truth):
public SkinManager(TextureManager textureManagerInstance,File skinCacheDirectory,MinecraftSessionService sessionService){
  this.textureManager=textureManagerInstance;
  this.skinCacheDir=skinCacheDirectory;
  this.sessionService=sessionService;
  this.skinCacheLoader=CacheBuilder.newBuilder().expireAfterAccess(15L,TimeUnit.SECONDS).<GameProfile,Map<Type,MinecraftProfileTexture>>build(new CacheLoader<GameProfile,Map<Type,MinecraftProfileTexture>>(){
    public Map<Type,MinecraftProfileTexture> load(    GameProfile p_load_1_) throws Exception {
      return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_,false);
    }
  }
);
  customskinloader.loader.MojangAPILoader.defaultSessionService=sessionService;
  customskinloader.utils.HttpTextureUtil.defaultCacheDir=skinCacheDirectory;
}
Program: 32899
Project: 32899
Buggy source:
private static Config loadConfig(){
  CustomSkinLoader.logger.info("String_Node_Str" + CustomSkinLoader.CONFIG_FILE.getAbsolutePath());
  if (!CustomSkinLoader.CONFIG_FILE.exists()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return initConfig();
  }
  try {
    CustomSkinLoader.logger.info("String_Node_Str");
    String json=IOUtils.toString(new FileInputStream(CustomSkinLoader.CONFIG_FILE),Charsets.UTF_8);
    Config config=CustomSkinLoader.GSON.fromJson(json,Config.class);
    CustomSkinLoader.logger.info("String_Node_Str");
    return config;
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.info("String_Node_Str" + e.toString() + "String_Node_Str");
    File brokenFile=new File(CustomSkinLoader.DATA_DIR,"String_Node_Str");
    if (brokenFile.exists())     brokenFile.delete();
    CustomSkinLoader.CONFIG_FILE.renameTo(brokenFile);
    return initConfig();
  }
}

Fixed version (ground truth):
private static Config loadConfig(){
  CustomSkinLoader.logger.info("String_Node_Str" + CustomSkinLoader.CONFIG_FILE.getAbsolutePath());
  if (!CustomSkinLoader.CONFIG_FILE.exists()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return initConfig();
  }
  try {
    CustomSkinLoader.logger.info("String_Node_Str");
    String json=FileUtils.readFileToString(CustomSkinLoader.CONFIG_FILE,Charsets.UTF_8);
    Config config=CustomSkinLoader.GSON.fromJson(json,Config.class);
    CustomSkinLoader.logger.info("String_Node_Str");
    return config;
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.info("String_Node_Str" + e.toString() + "String_Node_Str");
    File brokenFile=new File(CustomSkinLoader.DATA_DIR,"String_Node_Str");
    if (brokenFile.exists())     brokenFile.delete();
    CustomSkinLoader.CONFIG_FILE.renameTo(brokenFile);
    return initConfig();
  }
}
Program: 32900
Project: 32900
Buggy source:
public Config(SkinSiteProfile[] loadlist){
  this.version=CustomSkinLoader.CustomSkinLoader_VERSION;
  this.loadlist=loadlist;
}

Fixed version (ground truth):
public Config(SkinSiteProfile[] loadlist){
  this.version=CustomSkinLoader.CustomSkinLoader_VERSION;
  this.loadlist=Arrays.asList(loadlist);
}
Program: 32901
Project: 32901
Buggy source:
private static void writeConfig(Config config,boolean update){
  String json=CustomSkinLoader.GSON.toJson(config);
  if (CustomSkinLoader.CONFIG_FILE.exists())   CustomSkinLoader.CONFIG_FILE.delete();
  try {
    CustomSkinLoader.CONFIG_FILE.createNewFile();
    IOUtils.write(json,new FileOutputStream(CustomSkinLoader.CONFIG_FILE),Charsets.UTF_8);
    CustomSkinLoader.logger.info("String_Node_Str" + (update ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.info("String_Node_Str" + (update ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ e.toString()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
private static void writeConfig(Config config,boolean update){
  String json=CustomSkinLoader.GSON.toJson(config);
  if (CustomSkinLoader.CONFIG_FILE.exists())   CustomSkinLoader.CONFIG_FILE.delete();
  try {
    CustomSkinLoader.CONFIG_FILE.createNewFile();
    FileUtils.write(CustomSkinLoader.CONFIG_FILE,json,Charsets.UTF_8);
    CustomSkinLoader.logger.info("String_Node_Str" + (update ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str");
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.info("String_Node_Str" + (update ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ e.toString()+ "String_Node_Str");
  }
}
Program: 32902
Project: 32902
Buggy source:
public static Config loadConfig0(){
  Config config=loadConfig();
  config.loadExtraList();
  config.initLocalFolder();
  if (config.ignoreHttpsCertificate)   HttpUtil0.ignoreHttpsCertificate();
  if (config.enableCacheAutoClean)   HttpRequestUtil.CACHE_DIR.delete();
  CustomSkinLoader.logger.info("String_Node_Str" + config.enable + "String_Node_Str"+ config.enableSkull+ "String_Node_Str"+ config.enableDynamicSkull+ "String_Node_Str"+ config.enableTransparentSkin+ "String_Node_Str"+ config.ignoreHttpsCertificate+ "String_Node_Str"+ config.cacheExpiry+ "String_Node_Str"+ config.enableUpdateSkull+ "String_Node_Str"+ config.enableLocalProfileCache+ "String_Node_Str"+ config.enableCacheAutoClean+ "String_Node_Str"+ (config.loadlist == null ? 0 : config.loadlist.length));
  float floatVersion=0f;
  float configVersion=0f;
  try {
    floatVersion=Float.parseFloat(CustomSkinLoader.CustomSkinLoader_VERSION);
    configVersion=Float.parseFloat(config.version);
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.warning("String_Node_Str" + e.toString());
  }
  if (config.version == null || configVersion == 0f || floatVersion > configVersion) {
    CustomSkinLoader.logger.info("String_Node_Str" + config.version);
    config.version=CustomSkinLoader.CustomSkinLoader_VERSION;
    writeConfig(config,true);
  }
  return config;
}

Fixed version (ground truth):
public static Config loadConfig0(){
  Config config=loadConfig();
  if (config.loadlist == null) {
    config.loadlist=new ArrayList<SkinSiteProfile>();
  }
 else {
    for (int i=0; i < config.loadlist.size(); i++) {
      if (config.loadlist.get(i) == null)       config.loadlist.remove(i--);
    }
  }
  config.loadExtraList();
  config.initLocalFolder();
  if (config.ignoreHttpsCertificate)   HttpUtil0.ignoreHttpsCertificate();
  if (config.enableCacheAutoClean && !config.enableLocalProfileCache) {
    HttpRequestUtil.CACHE_DIR.delete();
    HttpTextureUtil.cleanCacheDir();
  }
  CustomSkinLoader.logger.info("String_Node_Str" + config.enable + "String_Node_Str"+ config.enableSkull+ "String_Node_Str"+ config.enableDynamicSkull+ "String_Node_Str"+ config.enableTransparentSkin+ "String_Node_Str"+ config.ignoreHttpsCertificate+ "String_Node_Str"+ config.cacheExpiry+ "String_Node_Str"+ config.enableUpdateSkull+ "String_Node_Str"+ config.enableLocalProfileCache+ "String_Node_Str"+ config.enableCacheAutoClean+ "String_Node_Str"+ (config.loadlist == null ? 0 : config.loadlist.size()));
  float floatVersion=0f;
  float configVersion=0f;
  try {
    floatVersion=Float.parseFloat(CustomSkinLoader.CustomSkinLoader_VERSION);
    configVersion=Float.parseFloat(config.version);
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.warning("String_Node_Str" + e.toString());
  }
  if (config.version == null || configVersion == 0f || floatVersion > configVersion) {
    CustomSkinLoader.logger.info("String_Node_Str" + config.version);
    config.version=CustomSkinLoader.CustomSkinLoader_VERSION;
    writeConfig(config,true);
  }
  return config;
}
Program: 32904
Project: 32904
Buggy source:
public static Config loadConfig0(){
  Config config=loadConfig();
  config.loadExtraList();
  config.initLocalFolder();
  CustomSkinLoader.logger.info("String_Node_Str" + config.enable + "String_Node_Str"+ config.enableSkull+ "String_Node_Str"+ config.enableTransparentSkin+ "String_Node_Str"+ config.cacheExpiry+ "String_Node_Str"+ config.enableUpdateSkull+ "String_Node_Str"+ config.enableLocalProfileCache+ "String_Node_Str"+ (config.loadlist == null ? 0 : config.loadlist.length));
  float floatVersion=0f;
  float configVersion=0f;
  try {
    floatVersion=Float.parseFloat(CustomSkinLoader.CustomSkinLoader_VERSION);
    configVersion=Float.parseFloat(config.version);
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.warning("String_Node_Str" + e.toString());
  }
  if (config.version == null || configVersion == 0f || floatVersion > configVersion) {
    CustomSkinLoader.logger.info("String_Node_Str" + config.version);
    config.version=CustomSkinLoader.CustomSkinLoader_VERSION;
    writeConfig(config,true);
  }
  return config;
}

Fixed version (ground truth):
public static Config loadConfig0(){
  Config config=loadConfig();
  config.loadExtraList();
  config.initLocalFolder();
  CustomSkinLoader.logger.info("String_Node_Str" + config.enable + "String_Node_Str"+ config.enableSkull+ "String_Node_Str"+ config.enableDynamicSkull+ "String_Node_Str"+ config.enableTransparentSkin+ "String_Node_Str"+ config.cacheExpiry+ "String_Node_Str"+ config.enableUpdateSkull+ "String_Node_Str"+ config.enableLocalProfileCache+ "String_Node_Str"+ (config.loadlist == null ? 0 : config.loadlist.length));
  float floatVersion=0f;
  float configVersion=0f;
  try {
    floatVersion=Float.parseFloat(CustomSkinLoader.CustomSkinLoader_VERSION);
    configVersion=Float.parseFloat(config.version);
  }
 catch (  Exception e) {
    CustomSkinLoader.logger.warning("String_Node_Str" + e.toString());
  }
  if (config.version == null || configVersion == 0f || floatVersion > configVersion) {
    CustomSkinLoader.logger.info("String_Node_Str" + config.version);
    config.version=CustomSkinLoader.CustomSkinLoader_VERSION;
    writeConfig(config,true);
  }
  return config;
}
Program: 32905
Project: 32905
Buggy source:
public Map<Type,MinecraftProfileTexture> getTexture(final GameProfile profile){
  if (staticTextures.get(profile) != null)   return staticTextures.get(profile);
  if (loadingList.contains(profile))   return new HashMap();
  if (dynamicTextures.containsKey(profile)) {
    SkullTexture texture=dynamicTextures.get(profile);
    long time=System.currentTimeMillis() - texture.startTime;
    int index=(int)Math.floor((time % texture.period) / texture.skins.size());
    Map<Type,MinecraftProfileTexture> map=Maps.newHashMap();
    map.put(Type.SKIN,ModelManager0.getProfileTexture(texture.skins.get(index),null));
    return map;
  }
  loadingList.add(profile);
  Thread loadThread=new Thread(){
    public void run(){
      parseGameProfile(profile);
      loadingList.remove(profile);
    }
  }
;
  loadThread.setName(profile.toString() + "String_Node_Str");
  loadThread.start();
  return new HashMap();
}

Fixed version (ground truth):
public Map<Type,MinecraftProfileTexture> getTexture(final GameProfile profile){
  if (staticTextures.get(profile) != null)   return staticTextures.get(profile);
  if (loadingList.contains(profile))   return new HashMap();
  if (dynamicTextures.containsKey(profile)) {
    SkullTexture texture=dynamicTextures.get(profile);
    long time=System.currentTimeMillis() - texture.startTime;
    int index=(int)Math.floor((time % texture.period) / texture.interval);
    Map<Type,MinecraftProfileTexture> map=Maps.newHashMap();
    map.put(Type.SKIN,ModelManager0.getProfileTexture(texture.skins.get(index),null));
    return map;
  }
  loadingList.add(profile);
  Thread loadThread=new Thread(){
    public void run(){
      parseGameProfile(profile);
      loadingList.remove(profile);
    }
  }
;
  loadThread.setName("String_Node_Str" + profile.toString());
  loadThread.start();
  return new HashMap();
}
Program: 32906
Project: 32906
Buggy source:
public void acceptOptions(List args,File gameDir,File assetsDir,String profile){
  MinecraftUtil.minecraftDataFolder=gameDir;
  File tweakerLogFile=new File(MinecraftUtil.getMinecraftDataDir(),"String_Node_Str");
  logger=new Logger(tweakerLogFile);
  logger.info("String_Node_Str");
  logger.info("String_Node_Str");
  String[] temp={"String_Node_Str",gameDir.getAbsolutePath(),"String_Node_Str",assetsDir.getAbsolutePath(),"String_Node_Str",profile};
  this.args=ArrayUtils.addAll((String[])args.toArray(),temp);
}

Fixed version (ground truth):
public void acceptOptions(List<String> args,File gameDir,File assetsDir,String profile){
  MinecraftUtil.minecraftDataFolder=gameDir;
  File tweakerLogFile=new File(MinecraftUtil.getMinecraftDataDir(),"String_Node_Str");
  logger=new Logger(tweakerLogFile);
  logger.info("String_Node_Str");
  logger.info("String_Node_Str");
  String[] temp={"String_Node_Str",gameDir.getAbsolutePath(),"String_Node_Str",assetsDir.getAbsolutePath(),"String_Node_Str",profile};
  this.args=ArrayUtils.addAll(args.toArray(new String[args.size()]),temp);
}
Program: 32908
Project: 32908
Buggy source:
public void warning(Exception e){
  log(Level.WARNING,"String_Node_Str" + e.getMessage());
  StackTraceElement[] stes=e.getStackTrace();
  for (  StackTraceElement ste : stes) {
    log(Level.WARNING,ste.toString());
  }
  log(Level.WARNING,"String_Node_Str");
}

Fixed version (ground truth):
public void warning(Exception e){
  log(Level.WARNING,"String_Node_Str" + e.toString());
  StackTraceElement[] stes=e.getStackTrace();
  for (  StackTraceElement ste : stes) {
    log(Level.WARNING,ste.toString());
  }
  log(Level.WARNING,"String_Node_Str");
}
Program: 32909
Project: 32909
Buggy source:
private static ZipFile getZipFile(URL url){
  if (MinecraftUtil.isCoreFile(url))   return null;
  ZipFile zipFile0;
  try {
    File file=new File(url.toURI());
    zipFile0=new ZipFile(file);
    return zipFile0;
  }
 catch (  Exception e) {
    ModSystemTweaker.logger.warning(e);
  }
  return null;
}

Fixed version (ground truth):
private static ZipFile getZipFile(URL url){
  if (MinecraftUtil.isCoreFile(url))   return null;
  ZipFile zipFile0=null;
  try {
    File file=new File(url.toURI());
    if (!file.exists() || !file.isFile())     return null;
    zipFile0=new ZipFile(file);
    return zipFile0;
  }
 catch (  Exception e) {
    ModSystemTweaker.logger.warning(e);
  }
  return null;
}
Program: 32911
Project: 32911
Buggy source:
/** 
 * May download the skin if its not in the cache, can be passed a SkinManager#SkinAvailableCallback for handling
 */
public ResourceLocation loadSkin(MinecraftProfileTexture p_152789_1_,final Type p_152789_2_,final SkinManager.SkinAvailableCallback p_152789_3_){
  customskinloader.utils.HttpTextureUtil.HttpTextureInfo info=customskinloader.utils.HttpTextureUtil.toHttpTextureInfo(this.skinCacheDir,p_152789_1_.getUrl());
  final ResourceLocation var4=new ResourceLocation("String_Node_Str" + info.hash);
  ITextureObject var5=this.textureManager.getTexture(var4);
  if (var5 != null) {
    if (p_152789_3_ != null) {
      p_152789_3_.onSkinAvailable(p_152789_2_,var4);
    }
  }
 else {
    final ImageBufferDownload var8=p_152789_2_ == Type.SKIN ? new ImageBufferDownload() : null;
    ThreadDownloadImageData var9=new ThreadDownloadImageData(info.cacheFile,info.url,DEFAULT_SKIN,new IImageBuffer(){
      private static final String __OBFID="String_Node_Str";
      public BufferedImage parseUserSkin(      BufferedImage p_78432_1_){
        if (var8 != null) {
          p_78432_1_=var8.parseUserSkin(p_78432_1_);
        }
        return p_78432_1_;
      }
      public void func_152634_a(){
        if (var8 != null) {
          var8.func_152634_a();
        }
        if (p_152789_3_ != null) {
          p_152789_3_.onSkinAvailable(p_152789_2_,var4);
        }
      }
    }
);
    this.textureManager.loadTexture(var4,var9);
  }
  return var4;
}

Fixed version (ground truth):
/** 
 * May download the skin if its not in the cache, can be passed a SkinManager#SkinAvailableCallback for handling
 */
public ResourceLocation loadSkin(MinecraftProfileTexture p_152789_1_,final Type p_152789_2_,final SkinManager.SkinAvailableCallback p_152789_3_){
  customskinloader.utils.HttpTextureUtil.HttpTextureInfo info=customskinloader.utils.HttpTextureUtil.toHttpTextureInfo(this.skinCacheDir,p_152789_1_.getUrl());
  final ResourceLocation var4=new ResourceLocation("String_Node_Str" + info.hash);
  ITextureObject var5=this.textureManager.getTexture(var4);
  if (var5 != null) {
    if (p_152789_3_ != null) {
      p_152789_3_.onSkinAvailable(p_152789_2_,var4);
    }
  }
 else {
    final ImageBufferDownload var8=p_152789_2_ == Type.SKIN ? new customskinloader.renderer.SkinBuffer() : null;
    ThreadDownloadImageData var9=new ThreadDownloadImageData(info.cacheFile,info.url,DEFAULT_SKIN,new IImageBuffer(){
      private static final String __OBFID="String_Node_Str";
      public BufferedImage parseUserSkin(      BufferedImage p_78432_1_){
        if (var8 != null) {
          p_78432_1_=var8.parseUserSkin(p_78432_1_);
        }
        return p_78432_1_;
      }
      public void func_152634_a(){
        if (var8 != null) {
          var8.func_152634_a();
        }
        if (p_152789_3_ != null) {
          p_152789_3_.onSkinAvailable(p_152789_2_,var4);
        }
      }
    }
);
    this.textureManager.loadTexture(var4,var9);
  }
  return var4;
}
Program: 32913
Project: 32913
Buggy source:
private static Logger initLogger(){
  Logger logger=new Logger(LOG_FILE);
  logger.info("String_Node_Str" + CustomSkinLoader_VERSION);
  logger.info("String_Node_Str" + LOG_FILE.getAbsolutePath());
  return logger;
}

Fixed version (ground truth):
private static Logger initLogger(){
  Logger logger=new Logger(LOG_FILE);
  logger.info("String_Node_Str" + CustomSkinLoader_VERSION);
  logger.info("String_Node_Str" + DATA_DIR.getAbsolutePath());
  logger.info("String_Node_Str" + MinecraftUtil.getMinecraftVersion());
  return logger;
}
Program: 32914
Project: 32914
Buggy source:
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil0.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  CustomSkinAPI profile=new Gson().fromJson(json,CustomSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    Set<String> keys=profile.skins.keySet();
    for (    String s : keys) {
      if (ModelManager.checkModel(s)) {
        p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
        p.model=s;
        break;
      }
    }
    if (p.skinUrl == null) {
      p.skinUrl=ssp.root + TEXTURES + profile.skins.get(keys.toArray()[0]);
      p.model="String_Node_Str";
    }
  }
 else   if (profile.skin != null && !profile.skin.equals("String_Node_Str")) {
    p.skinUrl=ssp.root + TEXTURES + profile.skin;
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}

Fixed version (ground truth):
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil0.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  CustomSkinAPI profile=new Gson().fromJson(json,CustomSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    Set<String> keys=profile.skins.keySet();
    for (    String s : keys) {
      System.out.println(s + "String_Node_Str" + ModelManager.checkModel(s));
      if (ModelManager.checkModel(s)) {
        p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
        p.model=s;
        break;
      }
    }
    if (p.skinUrl == null) {
      p.skinUrl=ssp.root + TEXTURES + profile.skins.get(keys.toArray()[0]);
      p.model="String_Node_Str";
    }
  }
 else   if (profile.skin != null && !profile.skin.equals("String_Node_Str")) {
    p.skinUrl=ssp.root + TEXTURES + profile.skin;
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}
Program: 32915
Project: 32915
Buggy source:
/** 
 * Parse UserProfile to hashMapProfile
 * @param profile - UserProfile instance
 * @return profile - hashMapProfile (HashMap<String,MinecraftProfileTexture>)
 * @since 13.1
 */
public static Map fromUserProfile(UserProfile profile){
  Map map=Maps.newHashMap();
  if (profile.skinUrl != null)   map.put(Type.SKIN,new MinecraftProfileTexture(profile.skinUrl));
  if (profile.capeUrl != null)   map.put(Type.CAPE,new MinecraftProfileTexture(profile.capeUrl));
  return map;
}

Fixed version (ground truth):
/** 
 * Parse UserProfile to hashMapProfile
 * @param profile - UserProfile instance
 * @return profile - hashMapProfile (HashMap<String,MinecraftProfileTexture>)
 * @since 13.1
 */
public static Map fromUserProfile(UserProfile profile){
  Map map=Maps.newHashMap();
  if (profile.skinUrl != null)   map.put(Type.SKIN,getProfileTexture(profile.skinUrl));
  if (profile.capeUrl != null)   map.put(Type.CAPE,getProfileTexture(profile.capeUrl));
  return map;
}
Program: 32916
Project: 32916
Buggy source:
public void func_152790_a(final GameProfile p_152790_1_,final SkinManager.SkinAvailableCallback p_152790_2_,final boolean p_152790_3_){
  field_152794_b.submit(new Runnable(){
    private static final String __OBFID="String_Node_Str";
    public void run(){
      final HashMap var1=Maps.newHashMap();
      try {
        var1.putAll(SkinManager.this.field_152797_e.getTextures(p_152790_1_,p_152790_3_));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      var1.clear();
      var1.putAll(customskinloader.CustomSkinLoader.loadProfile(p_152790_1_.getName(),var1));
      Minecraft.getMinecraft().func_152344_a(new Runnable(){
        private static final String __OBFID="String_Node_Str";
        public void run(){
          if (var1.containsKey(Type.SKIN)) {
            SkinManager.this.func_152789_a((MinecraftProfileTexture)var1.get(Type.SKIN),Type.SKIN,p_152790_2_);
          }
          if (var1.containsKey(Type.CAPE)) {
            SkinManager.this.func_152789_a((MinecraftProfileTexture)var1.get(Type.CAPE),Type.CAPE,p_152790_2_);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void func_152790_a(final GameProfile p_152790_1_,final SkinManager.SkinAvailableCallback p_152790_2_,final boolean p_152790_3_){
  field_152794_b.submit(new Runnable(){
    private static final String __OBFID="String_Node_Str";
    public void run(){
      final HashMap var1=Maps.newHashMap();
      try {
        var1.putAll(SkinManager.this.field_152797_e.getTextures(p_152790_1_,p_152790_3_));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      if (customskinloader.CustomSkinLoader.config.enable) {
        Map newMap=customskinloader.CustomSkinLoader.loadProfile(profile.getName(),var1);
        if (!newMap.isEmpty()) {
          var1.clear();
          var1.putAll(newMap);
        }
      }
      Minecraft.getMinecraft().func_152344_a(new Runnable(){
        private static final String __OBFID="String_Node_Str";
        public void run(){
          if (var1.containsKey(Type.SKIN)) {
            SkinManager.this.func_152789_a((MinecraftProfileTexture)var1.get(Type.SKIN),Type.SKIN,p_152790_2_);
          }
          if (var1.containsKey(Type.CAPE)) {
            SkinManager.this.func_152789_a((MinecraftProfileTexture)var1.get(Type.CAPE),Type.CAPE,p_152790_2_);
          }
        }
      }
);
    }
  }
);
}
Program: 32917
Project: 32917
Buggy source:
public void func_152790_a(final GameProfile p_152790_1_,final SkinManager.SkinAvailableCallback p_152790_2_,final boolean p_152790_3_){
  THREAD_POOL.submit(new Runnable(){
    private static final String __OBFID="String_Node_Str";
    public void run(){
      final HashMap var1=Maps.newHashMap();
      try {
        var1.putAll(SkinManager.this.sessionService.getTextures(p_152790_1_,p_152790_3_));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      var1.clear();
      var1.putAll(customskinloader.CustomSkinLoader.loadProfile(p_152790_1_.getName(),var1));
      Minecraft.getMinecraft().addScheduledTask(new Runnable(){
        private static final String __OBFID="String_Node_Str";
        public void run(){
          if (var1.containsKey(Type.SKIN)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)var1.get(Type.SKIN),Type.SKIN,p_152790_2_);
          }
          if (var1.containsKey(Type.CAPE)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)var1.get(Type.CAPE),Type.CAPE,p_152790_2_);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void func_152790_a(final GameProfile p_152790_1_,final SkinManager.SkinAvailableCallback p_152790_2_,final boolean p_152790_3_){
  THREAD_POOL.submit(new Runnable(){
    private static final String __OBFID="String_Node_Str";
    public void run(){
      final HashMap var1=Maps.newHashMap();
      try {
        var1.putAll(SkinManager.this.sessionService.getTextures(p_152790_1_,p_152790_3_));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      if (customskinloader.CustomSkinLoader.config.enable) {
        Map newMap=customskinloader.CustomSkinLoader.loadProfile(profile.getName(),var1);
        if (!newMap.isEmpty()) {
          var1.clear();
          var1.putAll(newMap);
        }
      }
      Minecraft.getMinecraft().addScheduledTask(new Runnable(){
        private static final String __OBFID="String_Node_Str";
        public void run(){
          if (var1.containsKey(Type.SKIN)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)var1.get(Type.SKIN),Type.SKIN,p_152790_2_);
          }
          if (var1.containsKey(Type.CAPE)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)var1.get(Type.CAPE),Type.CAPE,p_152790_2_);
          }
        }
      }
);
    }
  }
);
}
Program: 32918
Project: 32918
Buggy source:
public void loadProfileTextures(final GameProfile profile,final SkinManager.SkinAvailableCallback skinAvailableCallback,final boolean requireSecure){
  THREAD_POOL.submit(new Runnable(){
    public void run(){
      final Map<Type,MinecraftProfileTexture> map=Maps.<Type,MinecraftProfileTexture>newHashMap();
      try {
        map.putAll(SkinManager.this.sessionService.getTextures(profile,requireSecure));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      if (CustomSkinLoader.config.enable) {
        Map newMap=customskinloader.CustomSkinLoader.loadProfile(profile.getName(),map);
        if (!newMap.isEmpty()) {
          map.clear();
          map.putAll(newMap);
        }
      }
      Minecraft.getMinecraft().addScheduledTask(new Runnable(){
        public void run(){
          if (map.containsKey(Type.SKIN)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)map.get(Type.SKIN),Type.SKIN,skinAvailableCallback);
          }
          if (map.containsKey(Type.CAPE)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)map.get(Type.CAPE),Type.CAPE,skinAvailableCallback);
          }
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void loadProfileTextures(final GameProfile profile,final SkinManager.SkinAvailableCallback skinAvailableCallback,final boolean requireSecure){
  THREAD_POOL.submit(new Runnable(){
    public void run(){
      final Map<Type,MinecraftProfileTexture> map=Maps.<Type,MinecraftProfileTexture>newHashMap();
      try {
        map.putAll(SkinManager.this.sessionService.getTextures(profile,requireSecure));
      }
 catch (      InsecureTextureException var3) {
        ;
      }
      if (customskinloader.CustomSkinLoader.config.enable) {
        Map newMap=customskinloader.CustomSkinLoader.loadProfile(profile.getName(),map);
        if (!newMap.isEmpty()) {
          map.clear();
          map.putAll(newMap);
        }
      }
      Minecraft.getMinecraft().addScheduledTask(new Runnable(){
        public void run(){
          if (map.containsKey(Type.SKIN)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)map.get(Type.SKIN),Type.SKIN,skinAvailableCallback);
          }
          if (map.containsKey(Type.CAPE)) {
            SkinManager.this.loadSkin((MinecraftProfileTexture)map.get(Type.CAPE),Type.CAPE,skinAvailableCallback);
          }
        }
      }
);
    }
  }
);
}
Program: 32919
Project: 32919
Buggy source:
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  CustomSkinAPI profile=new Gson().fromJson(json,CustomSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    Set<String> keys=profile.skins.keySet();
    for (    String s : keys) {
      if (ModelManager.checkModel(s)) {
        p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
        p.model=s;
        break;
      }
    }
    if (p.skinUrl == null) {
      p.skinUrl=ssp.root + TEXTURES + profile.skins.get(keys.toArray()[0]);
      p.model="String_Node_Str";
    }
  }
 else   if (profile.skin != null && !profile.skin.equals("String_Node_Str")) {
    p.skinUrl=ssp.root + TEXTURES + profile.skin;
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}

Fixed version (ground truth):
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil0.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  CustomSkinAPI profile=new Gson().fromJson(json,CustomSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    Set<String> keys=profile.skins.keySet();
    for (    String s : keys) {
      if (ModelManager.checkModel(s)) {
        p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
        p.model=s;
        break;
      }
    }
    if (p.skinUrl == null) {
      p.skinUrl=ssp.root + TEXTURES + profile.skins.get(keys.toArray()[0]);
      p.model="String_Node_Str";
    }
  }
 else   if (profile.skin != null && !profile.skin.equals("String_Node_Str")) {
    p.skinUrl=ssp.root + TEXTURES + profile.skin;
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}
Program: 32920
Project: 32920
Buggy source:
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  UserProfile profile=new UserProfile();
  if (ssp.skin != null && !ssp.skin.equals("String_Node_Str")) {
    String skin=HttpUtil.getRealUrl(ssp.skin.replaceAll(USERNAME_REGEX,username));
    if (skin != null && !skin.equals("String_Node_Str")) {
      profile.skinUrl=skin;
      profile.model="String_Node_Str";
    }
  }
  if (ssp.cape != null && !ssp.cape.equals("String_Node_Str")) {
    String cape=HttpUtil.getRealUrl(ssp.cape.replaceAll(USERNAME_REGEX,username));
    if (cape != null && !cape.equals("String_Node_Str")) {
      profile.capeUrl=cape;
    }
  }
  if (profile.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return profile;
  }
}

Fixed version (ground truth):
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  UserProfile profile=new UserProfile();
  if (ssp.skin != null && !ssp.skin.equals("String_Node_Str")) {
    String skin=HttpUtil0.getRealUrl(ssp.skin.replaceAll(USERNAME_REGEX,username));
    if (skin != null && !skin.equals("String_Node_Str")) {
      profile.skinUrl=skin;
      profile.model="String_Node_Str";
    }
  }
  if (ssp.cape != null && !ssp.cape.equals("String_Node_Str")) {
    String cape=HttpUtil0.getRealUrl(ssp.cape.replaceAll(USERNAME_REGEX,username));
    if (cape != null && !cape.equals("String_Node_Str")) {
      profile.capeUrl=cape;
    }
  }
  if (profile.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return profile;
  }
}
Program: 32922
Project: 32922
Buggy source:
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  UniSkinAPI profile=new Gson().fromJson(json,UniSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    if (profile.model_preference != null && !profile.model_preference.isEmpty()) {
      for (      String s : profile.model_preference) {
        if (ModelManager.checkModel(s)) {
          p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
          p.model=s;
          break;
        }
      }
    }
    if (p.skinUrl == null) {
      String s=profile.skins.get("String_Node_Str");
      if (s != null) {
        p.skinUrl=ssp.root + TEXTURES + s;
        p.model="String_Node_Str";
      }
    }
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}

Fixed version (ground truth):
@Override public UserProfile loadProfile(SkinSiteProfile ssp,String username) throws Exception {
  if (ssp.root == null || ssp.root.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  String json=HttpUtil0.readHttp(ssp.root + username + "String_Node_Str");
  if (json == null || json.equals("String_Node_Str")) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
  UniSkinAPI profile=new Gson().fromJson(json,UniSkinAPI.class);
  UserProfile p=new UserProfile();
  if (profile.skins != null && !profile.skins.isEmpty()) {
    if (profile.model_preference != null && !profile.model_preference.isEmpty()) {
      for (      String s : profile.model_preference) {
        if (ModelManager.checkModel(s)) {
          p.skinUrl=ssp.root + TEXTURES + profile.skins.get(s);
          p.model=s;
          break;
        }
      }
    }
    if (p.skinUrl == null) {
      String s=profile.skins.get("String_Node_Str");
      if (s != null) {
        p.skinUrl=ssp.root + TEXTURES + s;
        p.model="String_Node_Str";
      }
    }
  }
  if (profile.cape != null && !profile.cape.equals("String_Node_Str")) {
    p.capeUrl=ssp.root + TEXTURES + profile.cape;
  }
  if (p.isEmpty()) {
    CustomSkinLoader.logger.info("String_Node_Str");
    return null;
  }
 else {
    return p;
  }
}
Program: 32923
Project: 32923
Buggy source:
public ClassTransformer(){
  ForgeTweaker.logger.info("String_Node_Str");
  try {
    URLClassLoader ucl=(URLClassLoader)idv.jlchntoz.tweaker.ClassTransformer.class.getClassLoader();
    URL urls[]=ucl.getURLs();
    for (int i=0; i < urls.length; i++) {
      URL url=urls[i];
      ZipFile tempZipFile=getZipFile(url);
      if (tempZipFile == null)       continue;
      zipFile=tempZipFile;
      ForgeTweaker.logger.info("String_Node_Str" + url);
      break;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (zipFile == null) {
    ForgeTweaker.logger.info("String_Node_Str");
  }
}

Fixed version (ground truth):
public ClassTransformer(){
  ForgeTweaker.logger.info("String_Node_Str");
  try {
    URLClassLoader ucl=(URLClassLoader)this.getClass().getClassLoader();
    URL urls[]=ucl.getURLs();
    for (int i=0; i < urls.length; i++) {
      URL url=urls[i];
      ZipFile tempZipFile=getZipFile(url);
      if (tempZipFile == null)       continue;
      zipFile=tempZipFile;
      ForgeTweaker.logger.info("String_Node_Str" + url);
      break;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (zipFile == null) {
    ForgeTweaker.logger.info("String_Node_Str");
  }
}
Program: 32924
Project: 32924
Buggy source:
private void saveToCache(InputStream is,File to){
  logger.info("String_Node_Str" + to.getAbsolutePath());
  FileOutputStream fs=null;
  int times=0;
  try {
    if (to.exists()) {
      to.delete();
    }
    fs=new FileOutputStream(to);
    int byteRead=0;
    byte[] buffer=new byte[1024];
    while ((byteRead=is.read(buffer)) != -1) {
      times+=byteRead;
      fs.write(buffer,0,byteRead);
      if (times >= C.getContentLength()) {
        break;
      }
    }
    if (to.length() > 1) {
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
 else {
      to.delete();
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
  }
 catch (  Exception e) {
    logger.warning(e.getMessage());
  }
 finally {
    try {
      if (fs != null)       fs.close();
      is.reset();
      logger.info("String_Node_Str" + is.available());
    }
 catch (    IOException e) {
      logger.warning(e.getMessage());
    }
    if (to.exists()) {
      to.setLastModified(C.getLastModified());
    }
  }
}

Fixed version (ground truth):
private void saveToCache(InputStream is,File to){
  logger.info("String_Node_Str" + to.getAbsolutePath());
  FileOutputStream fs=null;
  int times=0;
  try {
    if (to.exists()) {
      to.delete();
    }
    fs=new FileOutputStream(to);
    int byteRead=0;
    byte[] buffer=new byte[1024];
    while ((byteRead=is.read(buffer)) != -1) {
      times+=byteRead;
      fs.write(buffer,0,byteRead);
      if (times >= C.getContentLength()) {
        break;
      }
    }
    if (to.length() > 1) {
      to.setLastModified(C.getLastModified());
      logger.info("String_Node_Str" + to.getAbsolutePath() + "String_Node_Str"+ to.lastModified()+ "String_Node_Str"+ to.length()+ "String_Node_Str");
    }
 else {
      to.delete();
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
  }
 catch (  Exception e) {
    logger.warning(e.getMessage());
  }
 finally {
    try {
      if (fs != null)       fs.close();
      is.reset();
    }
 catch (    IOException e) {
      logger.warning(e.getMessage());
    }
  }
}
Program: 32925
Project: 32925
Buggy source:
public InputStream getPlayerSkinStream(Boolean isCloak,String playerName){
  if (skinURLs == null || cloakURLs == null || skinURLs.length <= 0 || cloakURLs.length <= 0)   refreshSkinURL();
  InputStream S=null;
  for (  String l : isCloak ? cloakURLs : skinURLs) {
    if (l == null || l.equalsIgnoreCase("String_Node_Str"))     continue;
    String loc=str_replace("String_Node_Str",playerName,l);
    logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    S=getStream(loc,true);
    if (S == null) {
      logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    }
 else {
      logger.info("String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
      return S;
    }
  }
  logger.log(Level.INFO,"String_Node_Str");
  return getStream(str_replace("String_Node_Str",playerName,isCloak ? DefaultCloakURL : DefaultSkinURL),true);
}

Fixed version (ground truth):
public InputStream getPlayerSkinStream(Boolean isCloak,String playerName){
  if ((skinURLs == null || skinURLs.length <= 0) && (cloakURLs == null || cloakURLs.length <= 0))   refreshSkinURL();
  InputStream S=null;
  for (  String l : isCloak ? cloakURLs : skinURLs) {
    if (l == null || l.equalsIgnoreCase("String_Node_Str"))     continue;
    String loc=str_replace("String_Node_Str",playerName,l);
    logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    S=getStream(loc,true);
    if (S == null) {
      logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    }
 else {
      logger.info("String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
      return S;
    }
  }
  logger.log(Level.INFO,"String_Node_Str");
  return getStream(str_replace("String_Node_Str",playerName,isCloak ? DefaultCloakURL : DefaultSkinURL),true);
}
Program: 32927
Project: 32927
Buggy source:
private void saveToCache(InputStream is,File to){
  logger.info("String_Node_Str" + to.getAbsolutePath());
  FileOutputStream fs=null;
  int times=0;
  try {
    if (to.exists()) {
      to.delete();
    }
    fs=new FileOutputStream(to);
    int byteRead=0;
    byte[] buffer=new byte[1024];
    while ((byteRead=is.read(buffer)) != -1) {
      times+=byteRead;
      fs.write(buffer,0,byteRead);
      if (times >= C.getContentLength()) {
        break;
      }
    }
    if (to.length() > 1) {
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
 else {
      to.delete();
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
  }
 catch (  Exception e) {
    logger.warning(e.getMessage());
  }
 finally {
    try {
      if (fs != null)       fs.close();
      is.reset();
      logger.info("String_Node_Str" + is.available());
    }
 catch (    IOException e) {
      logger.warning(e.getMessage());
    }
    if (to.exists()) {
      to.setLastModified(C.getLastModified());
    }
  }
}

Fixed version (ground truth):
private void saveToCache(InputStream is,File to){
  logger.info("String_Node_Str" + to.getAbsolutePath());
  FileOutputStream fs=null;
  int times=0;
  try {
    if (to.exists()) {
      to.delete();
    }
    fs=new FileOutputStream(to);
    int byteRead=0;
    byte[] buffer=new byte[1024];
    while ((byteRead=is.read(buffer)) != -1) {
      times+=byteRead;
      fs.write(buffer,0,byteRead);
      if (times >= C.getContentLength()) {
        break;
      }
    }
    if (to.length() > 1) {
      to.setLastModified(C.getLastModified());
      logger.info("String_Node_Str" + to.getAbsolutePath() + "String_Node_Str"+ to.lastModified()+ "String_Node_Str"+ to.length()+ "String_Node_Str");
    }
 else {
      to.delete();
      logger.info("String_Node_Str" + to.getAbsolutePath());
    }
  }
 catch (  Exception e) {
    logger.warning(e.getMessage());
  }
 finally {
    try {
      if (fs != null)       fs.close();
      is.reset();
    }
 catch (    IOException e) {
      logger.warning(e.getMessage());
    }
  }
}
Program: 32928
Project: 32928
Buggy source:
public InputStream getPlayerSkinStream(Boolean isCloak,String playerName){
  if (skinURLs == null || cloakURLs == null || skinURLs.length <= 0 || cloakURLs.length <= 0)   refreshSkinURL();
  InputStream S=null;
  for (  String l : isCloak ? cloakURLs : skinURLs) {
    if (l == null || l.equalsIgnoreCase("String_Node_Str"))     continue;
    String loc=str_replace("String_Node_Str",playerName,l);
    logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    S=getStream(loc,true);
    if (S == null) {
      logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    }
 else {
      logger.info("String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
      return S;
    }
  }
  logger.log(Level.INFO,"String_Node_Str");
  return getStream(str_replace("String_Node_Str",playerName,isCloak ? DefaultCloakURL : DefaultSkinURL),true);
}

Fixed version (ground truth):
public InputStream getPlayerSkinStream(Boolean isCloak,String playerName){
  if ((skinURLs == null || skinURLs.length <= 0) && (cloakURLs == null || cloakURLs.length <= 0))   refreshSkinURL();
  InputStream S=null;
  for (  String l : isCloak ? cloakURLs : skinURLs) {
    if (l == null || l.equalsIgnoreCase("String_Node_Str"))     continue;
    String loc=str_replace("String_Node_Str",playerName,l);
    logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    S=getStream(loc,true);
    if (S == null) {
      logger.log(Level.INFO,"String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
    }
 else {
      logger.info("String_Node_Str" + (isCloak ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ loc);
      return S;
    }
  }
  logger.log(Level.INFO,"String_Node_Str");
  return getStream(str_replace("String_Node_Str",playerName,isCloak ? DefaultCloakURL : DefaultSkinURL),true);
}