nus-yam/ex-repair huggingface dataset:
Program: 170275
Project: 170275
Buggy source:
public Skin get(SkinRequestMessage requestMessage,boolean softLoad){
  int skinId=requestMessage.getSkinIdentifier().getSkinLocalId();
synchronized (cacheMapDatabase) {
    if (!cacheMapDatabase.containsKey(skinId)) {
      if (softLoad) {
synchronized (skinLoadQueue) {
          skinLoadQueue.add(requestMessage);
        }
        return null;
      }
 else {
        load(skinId);
      }
    }
    if (cacheMapDatabase.containsKey(skinId)) {
      return cacheMapDatabase.get(skinId);
    }
 else {
      if (requestMessage.getPlayer() != null) {
        ModLogger.log(Level.ERROR,"String_Node_Str" + String.valueOf(skinId) + "String_Node_Str"+ requestMessage.getPlayer().getCommandSenderName()+ "String_Node_Str");
      }
 else {
        ModLogger.log(Level.ERROR,"String_Node_Str" + String.valueOf(skinId) + "String_Node_Str");
      }
      return null;
    }
  }
}

Fixed version (ground truth):
public Skin get(SkinRequestMessage requestMessage,boolean softLoad){
  int skinId=requestMessage.getSkinIdentifier().getSkinLocalId();
synchronized (cacheMapLock) {
    if (!cacheMapDatabase.containsKey(skinId)) {
      if (softLoad) {
synchronized (skinLoadQueueLock) {
          skinLoadQueue.add(requestMessage);
        }
        return null;
      }
 else {
        load(skinId);
      }
    }
    if (cacheMapDatabase.containsKey(skinId)) {
      return cacheMapDatabase.get(skinId);
    }
 else {
      if (requestMessage.getPlayer() != null) {
        ModLogger.log(Level.ERROR,"String_Node_Str" + String.valueOf(skinId) + "String_Node_Str"+ requestMessage.getPlayer().getCommandSenderName()+ "String_Node_Str");
      }
 else {
        ModLogger.log(Level.ERROR,"String_Node_Str" + String.valueOf(skinId) + "String_Node_Str");
      }
      return null;
    }
  }
}
Program: 170276
Project: 170276
Buggy source:
public void doSkinLoading(){
synchronized (cacheMapDatabase) {
synchronized (skinLoadQueue) {
      if (skinLoadQueue.size() > 0) {
        SkinRequestMessage requestMessage=skinLoadQueue.get(0);
        Skin skin=load(requestMessage.getSkinIdentifier().getSkinLocalId());
        if (skin != null) {
          CommonSkinCache.INSTANCE.onLocalDatabaseSkinLoaded(skin,requestMessage);
        }
        skinLoadQueue.remove(0);
      }
    }
  }
}

Fixed version (ground truth):
public void doSkinLoading(){
synchronized (cacheMapLock) {
synchronized (skinLoadQueueLock) {
      if (skinLoadQueue.size() > 0) {
        SkinRequestMessage requestMessage=skinLoadQueue.get(0);
        Skin skin=load(requestMessage.getSkinIdentifier().getSkinLocalId());
        if (skin != null) {
          CommonSkinCache.INSTANCE.onSkinLoaded(skin,requestMessage);
        }
        skinLoadQueue.remove(0);
      }
    }
  }
}
Program: 170277
Project: 170277
Buggy source:
private boolean isEnabled(){
  try {
    Class<?> c=Class.forName("String_Node_Str");
    Object object=c.getMethod("String_Node_Str").invoke(null);
    if (object != null && object instanceof Boolean) {
      return (boolean)object;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}

Fixed version (ground truth):
private boolean isEnabled(){
  try {
    Class<?> c=Class.forName("String_Node_Str");
    Object object=c.getMethod("String_Node_Str").invoke(null);
    if (object != null && object instanceof Boolean) {
      return (Boolean)object;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return false;
}
Program: 170278
Project: 170278
Buggy source:
public boolean isVisible(){
  if (isModLoaded()) {
    if (!isEnabled()) {
      return false;
    }
    try {
      Class<?> c=Class.forName("String_Node_Str");
      Object object=c.getMethod("String_Node_Str").invoke(null);
      if (object != null && object instanceof Boolean) {
        return !(boolean)object;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isVisible(){
  if (isModLoaded()) {
    if (!isEnabled()) {
      return false;
    }
    try {
      Class<?> c=Class.forName("String_Node_Str");
      Object object=c.getMethod("String_Node_Str").invoke(null);
      if (object != null && object instanceof Boolean) {
        return !(Boolean)object;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return false;
}
Program: 170280
Project: 170280
Buggy source:
@Override public void initGui(int xPos,int yPos,int width,int height){
  super.initGui(xPos,yPos,width,height);
  guiLoaded=false;
  resetOffsetButton=new GuiButtonExt(0,this.width / 2 + 27,25,50,18,GuiHelper.getLocalizedControlName(inventoryName,"String_Node_Str"));
  bipedOffsetXslider=new GuiCustomSlider(0,(int)((width / 2F) - (176 / 2F)) + 10,25,100,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  bipedOffsetYslider=new GuiCustomSlider(0,(int)((width / 2F) - (176 / 2F)) + 10,25 + 10,100,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  bipedOffsetZslider=new GuiCustomSlider(0,(int)((width / 2F) - (176 / 2F)) + 10,25 + 20,100,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  setSliderValue(bipedOffsetXslider,tileEntity.getOffsetX());
  setSliderValue(bipedOffsetYslider,tileEntity.getOffsetY());
  setSliderValue(bipedOffsetZslider,tileEntity.getOffsetZ());
  buttonList.add(resetOffsetButton);
  buttonList.add(bipedOffsetXslider);
  buttonList.add(bipedOffsetYslider);
  buttonList.add(bipedOffsetZslider);
  guiLoaded=true;
}

Fixed version (ground truth):
@Override public void initGui(int xPos,int yPos,int width,int height){
  super.initGui(xPos,yPos,width,height);
  guiLoaded=false;
  resetOffsetButton=new GuiButtonExt(0,0,TAB_HEIGHT - 18 - 8,50,18,GuiHelper.getLocalizedControlName(inventoryName,"String_Node_Str"));
  resetOffsetButton.width=fontRenderer.getStringWidth(resetOffsetButton.displayString) + fontRenderer.getStringWidth("String_Node_Str") * 4;
  resetOffsetButton.xPosition=this.width / 2 - TAB_WIDTH / 2 + TAB_WIDTH - 10 - resetOffsetButton.width;
  bipedOffsetXslider=new GuiCustomSlider(0,(int)((width / 2F) - (TAB_WIDTH / 2F)) + 10,25,TAB_WIDTH - 20,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  bipedOffsetYslider=new GuiCustomSlider(0,(int)((width / 2F) - (TAB_WIDTH / 2F)) + 10,25 + 12,TAB_WIDTH - 20,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  bipedOffsetZslider=new GuiCustomSlider(0,(int)((width / 2F) - (TAB_WIDTH / 2F)) + 10,25 + 24,TAB_WIDTH - 20,10,"String_Node_Str","String_Node_Str",-1D,1D,0D,true,true,this);
  setSliderValue(bipedOffsetXslider,tileEntity.getOffsetX());
  setSliderValue(bipedOffsetYslider,tileEntity.getOffsetY());
  setSliderValue(bipedOffsetZslider,tileEntity.getOffsetZ());
  buttonList.add(resetOffsetButton);
  buttonList.add(bipedOffsetXslider);
  buttonList.add(bipedOffsetYslider);
  buttonList.add(bipedOffsetZslider);
  guiLoaded=true;
}
Program: 170281
Project: 170281
Buggy source:
@Override public void drawBackgroundLayer(float partialTickTime,int mouseX,int mouseY){
  Rectangle_I_2D rec=new Rectangle_I_2D(0,0,176,62);
  rec.x=width / 2 - rec.width / 2;
  GuiUtils.drawContinuousTexturedBox(rec.x,rec.y,0,200,rec.width,rec.height,38,38,4,zLevel);
}

Fixed version (ground truth):
@Override public void drawBackgroundLayer(float partialTickTime,int mouseX,int mouseY){
  Rectangle_I_2D rec=new Rectangle_I_2D(0,0,TAB_WIDTH,TAB_HEIGHT);
  rec.x=width / 2 - rec.width / 2;
  GuiUtils.drawContinuousTexturedBox(rec.x,rec.y,0,200,rec.width,rec.height,38,38,4,zLevel);
}
Program: 170282
Project: 170282
Buggy source:
@Override public void initGui(int xPos,int yPos,int width,int height){
  super.initGui(xPos,yPos,width,height);
  textureTypeList=new GuiDropDownList(0,width / 2 - 110,25,50,"String_Node_Str",this);
  textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"),TextureType.USER.toString(),true);
  textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"),TextureType.URL.toString(),true);
  textureTypeList.setListSelectedIndex(tileEntity.getTextureType().ordinal());
  nameTextbox=new GuiTextField(fontRenderer,width / 2 - 110 + 55,25,165,14);
  nameTextbox.setMaxStringLength(200);
  if (tileEntity.getTextureType() == TextureType.USER) {
    if (tileEntity.getGameProfile() != null) {
      nameTextbox.setText(tileEntity.getGameProfile().getName());
    }
  }
 else {
    if (tileEntity.getImageUrl() != null) {
      nameTextbox.setText(tileEntity.getImageUrl());
    }
  }
  setNameButton=new GuiButtonExt(0,width / 2 + 60,45,50,14,GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"));
  buttonList.add(textureTypeList);
  buttonList.add(setNameButton);
}

Fixed version (ground truth):
@Override public void initGui(int xPos,int yPos,int width,int height){
  super.initGui(xPos,yPos,width,height);
  textureTypeList=new GuiDropDownList(0,width / 2 - 110,25,50,"String_Node_Str",this);
  textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"),TextureType.USER.toString(),true);
  textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"),TextureType.URL.toString(),true);
  textureTypeList.setListSelectedIndex(tileEntity.getTextureType().ordinal());
  nameTextbox=new GuiTextField(fontRenderer,width / 2 - 110 + 55,25,165,14);
  nameTextbox.setMaxStringLength(300);
  if (tileEntity.getTextureType() == TextureType.USER) {
    if (tileEntity.getGameProfile() != null) {
      nameTextbox.setText(tileEntity.getGameProfile().getName());
    }
  }
 else {
    if (tileEntity.getImageUrl() != null) {
      nameTextbox.setText(tileEntity.getImageUrl());
    }
  }
  setNameButton=new GuiButtonExt(0,width / 2 + 60,45,50,14,GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(),"String_Node_Str"));
  setNameButton.width=fontRenderer.getStringWidth(setNameButton.displayString + "String_Node_Str");
  setNameButton.xPosition=width / 2 + TAB_WIDTH / 2 - setNameButton.width - 10;
  buttonList.add(textureTypeList);
  buttonList.add(setNameButton);
}
Program: 170283
Project: 170283
Buggy source:
@Override public void drawBackgroundLayer(float partialTickTime,int mouseX,int mouseY){
  Rectangle_I_2D rec=new Rectangle_I_2D(0,0,240,68);
  rec.x=width / 2 - rec.width / 2;
  GuiUtils.drawContinuousTexturedBox(rec.x,rec.y,0,200,rec.width,rec.height,38,38,4,zLevel);
}

Fixed version (ground truth):
@Override public void drawBackgroundLayer(float partialTickTime,int mouseX,int mouseY){
  Rectangle_I_2D rec=new Rectangle_I_2D(0,0,TAB_WIDTH,TAB_HEIGHT);
  rec.x=width / 2 - rec.width / 2;
  GuiUtils.drawContinuousTexturedBox(rec.x,rec.y,0,200,rec.width,rec.height,38,38,4,zLevel);
}
Program: 170284
Project: 170284
Buggy source:
public void skinAdded(ItemStack stack){
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  skinRemoved();
  updateLockedSlots(stack);
  putStackInSlot(45,stack.copy());
}

Fixed version (ground truth):
public void skinAdded(ItemStack stack){
  updateLockedSlots(stack);
  if (tileEntity.getWorldObj().isRemote) {
    return;
  }
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  skinRemoved();
  updateLockedSlots(stack);
  putStackInSlot(45,stack.copy());
  putDyesInSlots();
  detectAndSendChanges();
}
Program: 170285
Project: 170285
Buggy source:
private void updateLockedSlots(ItemStack stack){
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  for (int i=0; i < 8; i++) {
    if (dye.haveDyeInSlot(i)) {
      byte[] rgbt=dye.getDyeColour(i);
      ItemStack bottle=new ItemStack(ModItems.dyeBottle,1,1);
      PaintingHelper.setToolPaintColour(bottle,rgbt);
      PaintingHelper.setToolPaint(bottle,PaintType.getPaintTypeFormSKey(rgbt[3]));
      putStackInSlot(37 + i,bottle);
      ((SlotDyeBottle)getSlot(37 + i)).setLocked(true);
    }
 else {
      ((SlotDyeBottle)getSlot(37 + i)).setLocked(false);
    }
  }
}

Fixed version (ground truth):
/** 
 * Reads the input slot and locks dye slots that are in use.
 * @param stack
 */
private void updateLockedSlots(ItemStack stack){
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  for (int i=0; i < 8; i++) {
    if (dye.haveDyeInSlot(i)) {
      ModLogger.log("String_Node_Str" + i);
      ((SlotDyeBottle)getSlot(37 + i)).setLocked(true);
    }
 else {
      ModLogger.log("String_Node_Str" + i);
      ((SlotDyeBottle)getSlot(37 + i)).setLocked(false);
    }
  }
}
Program: 170286
Project: 170286
Buggy source:
public void dyeRemoved(int slotId){
  ItemStack skinStack=tileEntity.getStackInSlot(9);
  if (skinStack == null) {
    return;
  }
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(skinStack);
  ISkinDye skinDye=skinPointer.getSkinDye();
  skinDye.removeDye(slotId);
  SkinNBTHelper.addSkinDataToStack(skinStack,skinPointer);
}

Fixed version (ground truth):
public void dyeRemoved(int slotId){
  ItemStack skinStack=getSlot(45).getStack();
  if (skinStack == null) {
    return;
  }
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(skinStack);
  ISkinDye skinDye=skinPointer.getSkinDye();
  skinDye.removeDye(slotId);
  SkinNBTHelper.addSkinDataToStack(skinStack,skinPointer);
}
Program: 170287
Project: 170287
Buggy source:
public void skinRemoved(){
  for (int i=0; i < 8; i++) {
    SlotDyeBottle slot=(SlotDyeBottle)getSlot(37 + i);
    if (!slot.isLocked()) {
      UtilPlayer.giveItem(invPlayer.player,getSlot(37 + i).getStack());
    }
 else {
      slot.setLocked(false);
    }
    putStackInSlot(37 + i,null);
  }
  putStackInSlot(45,null);
}

Fixed version (ground truth):
public void skinRemoved(){
  if (!tileEntity.getWorldObj().isRemote) {
    for (int i=0; i < 8; i++) {
      SlotDyeBottle slot=(SlotDyeBottle)getSlot(37 + i);
      if (!slot.isLocked()) {
        UtilPlayer.giveItem(invPlayer.player,getSlot(37 + i).getStack());
      }
 else {
        slot.setLocked(false);
      }
      putStackInSlot(37 + i,null);
    }
    putStackInSlot(45,null);
    detectAndSendChanges();
  }
  unlockedSlots();
}
Program: 170288
Project: 170288
Buggy source:
@Override public boolean canTakeStack(EntityPlayer player){
  if (!ConfigHandler.lockDyesOnSkins) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean canTakeStack(EntityPlayer player){
  return false;
}
Program: 170290
Project: 170290
Buggy source:
public void removeFileFromList(LibraryFile file){
synchronized (this.fileList) {
    for (int i=0; i < this.fileList.size(); i++) {
      if (this.fileList.get(i).fileName.equals(file.fileName)) {
        this.fileList.remove(i);
        markDirty();
        break;
      }
    }
  }
}

Fixed version (ground truth):
public void removeFileFromList(LibraryFile file){
synchronized (this.fileList) {
    for (int i=0; i < this.fileList.size(); i++) {
      if (this.fileList.get(i).getFullName().equals(file.getFullName())) {
        this.fileList.remove(i);
        markDirty();
        break;
      }
    }
  }
}
Program: 170292
Project: 170292
Buggy source:
public static boolean saveSkinToFile(File file,Skin skin){
  File dir=file.getParentFile();
  if (!dir.exists()) {
    dir.mkdirs();
  }
  ModLogger.log("String_Node_Str" + file.getAbsolutePath());
  DataOutputStream stream=null;
  try {
    stream=new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
    SkinSerializer.writeToStream(skin,stream);
    stream.flush();
  }
 catch (  FileNotFoundException e) {
    ModLogger.log(Level.WARN,"String_Node_Str");
    e.printStackTrace();
    return false;
  }
catch (  IOException e) {
    ModLogger.log(Level.ERROR,"String_Node_Str");
    e.printStackTrace();
    return false;
  }
 finally {
    IOUtils.closeQuietly(stream);
  }
  return true;
}

Fixed version (ground truth):
public static boolean saveSkinToFile(File file,Skin skin){
  File dir=file.getParentFile();
  if (!dir.exists()) {
    dir.mkdirs();
  }
  DataOutputStream stream=null;
  try {
    stream=new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
    SkinSerializer.writeToStream(skin,stream);
    stream.flush();
  }
 catch (  FileNotFoundException e) {
    ModLogger.log(Level.WARN,"String_Node_Str");
    e.printStackTrace();
    return false;
  }
catch (  IOException e) {
    ModLogger.log(Level.ERROR,"String_Node_Str");
    e.printStackTrace();
    return false;
  }
 finally {
    IOUtils.closeQuietly(stream);
  }
  return true;
}
Program: 170294
Project: 170294
Buggy source:
@Override public void reloadLibrary(){
  if (!loadingLibaray) {
    loadingLibaray=true;
    (new Thread(new LibraryLoader(this),LibModInfo.NAME + "String_Node_Str")).start();
  }
 else {
    ModLogger.log("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void reloadLibrary(ILibraryCallback callback){
  if (!loadingLibaray) {
    loadingLibaray=true;
    (new Thread(new LibraryLoader(this,callback),LibModInfo.NAME + "String_Node_Str")).start();
  }
 else {
    ModLogger.log("String_Node_Str");
  }
}
Program: 170295
Project: 170295
Buggy source:
@Override public void run(){
  long startTime=System.currentTimeMillis();
  ModLogger.log("String_Node_Str");
  File directory=SkinIOUtils.getSkinLibraryDirectory();
  ArrayList<LibraryFile> fileList=LibraryHelper.getSkinFilesInDirectory(directory,true);
  libraryManager.setFileList(fileList,LibraryFileType.LOCAL);
  ModLogger.log(String.format("String_Node_Str",libraryManager.clientFiles.getFileCount(),System.currentTimeMillis() - startTime));
  libraryManager.finishedLoading();
}

Fixed version (ground truth):
@Override public void run(){
  long startTime=System.currentTimeMillis();
  ModLogger.log("String_Node_Str");
  File directory=SkinIOUtils.getSkinLibraryDirectory();
  ArrayList<LibraryFile> fileList=LibraryHelper.getSkinFilesInDirectory(directory,true);
  libraryManager.setFileList(fileList,LibraryFileType.LOCAL);
  ModLogger.log(String.format("String_Node_Str",libraryManager.clientFiles.getFileCount(),System.currentTimeMillis() - startTime));
  libraryManager.finishedLoading();
  if (callback != null) {
    callback.libraryReloaded(libraryManager);
  }
}
Program: 170296
Project: 170296
Buggy source:
public LibraryLoader(ClientLibraryManager libraryManager){
  this.libraryManager=libraryManager;
}

Fixed version (ground truth):
public LibraryLoader(ClientLibraryManager libraryManager,ILibraryCallback callback){
  this.libraryManager=libraryManager;
  this.callback=callback;
}
Program: 170297
Project: 170297
Buggy source:
public void clearIdForFileName(String fileName){
synchronized (skinNameMap) {
    if (skinNameMap.containsKey(fileName)) {
      ModLogger.log("String_Node_Str" + fileName);
    }
 else {
      ModLogger.log("String_Node_Str" + fileName + "String_Node_Str");
    }
    skinNameMap.remove(fileName);
  }
}

Fixed version (ground truth):
public void clearIdForFileName(String fileName){
synchronized (skinNameMap) {
    if (skinNameMap.containsKey(fileName)) {
      ModLogger.log("String_Node_Str" + fileName);
    }
    skinNameMap.remove(fileName);
  }
}
Program: 170298
Project: 170298
Buggy source:
@Override public void reloadLibrary(){
  if (!loadingLibaray) {
    loadingLibaray=true;
    (new Thread(new LibraryLoader(this),LibModInfo.NAME + "String_Node_Str")).start();
  }
 else {
    ModLogger.log("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void reloadLibrary(ILibraryCallback callback){
  if (!loadingLibaray) {
    loadingLibaray=true;
    (new Thread(new LibraryLoader(this,callback),LibModInfo.NAME + "String_Node_Str")).start();
  }
 else {
    ModLogger.log("String_Node_Str");
  }
}
Program: 170299
Project: 170299
Buggy source:
@Override public void run(){
  long startTime=System.currentTimeMillis();
  ModLogger.log("String_Node_Str");
  int publicFileCount=libraryManager.loadPublicFiles();
  int endTime=(int)(System.currentTimeMillis() - startTime);
  ModLogger.log(String.format("String_Node_Str",publicFileCount,endTime));
  ModLogger.log("String_Node_Str");
  startTime=System.currentTimeMillis();
  int privateFileCount=libraryManager.loadPrivateFiles();
  endTime=(int)(System.currentTimeMillis() - startTime);
  ModLogger.log(String.format("String_Node_Str",privateFileCount,endTime));
  libraryManager.finishedLoading();
}

Fixed version (ground truth):
@Override public void run(){
  long startTime=System.currentTimeMillis();
  ModLogger.log("String_Node_Str");
  int publicFileCount=libraryManager.loadPublicFiles();
  int endTime=(int)(System.currentTimeMillis() - startTime);
  ModLogger.log(String.format("String_Node_Str",publicFileCount,endTime));
  ModLogger.log("String_Node_Str");
  startTime=System.currentTimeMillis();
  int privateFileCount=libraryManager.loadPrivateFiles();
  endTime=(int)(System.currentTimeMillis() - startTime);
  ModLogger.log(String.format("String_Node_Str",privateFileCount,endTime));
  libraryManager.finishedLoading();
  if (callback != null) {
    callback.libraryReloaded(libraryManager);
  }
}
Program: 170300
Project: 170300
Buggy source:
public LibraryLoader(CommonLibraryManager libraryManager){
  this.libraryManager=libraryManager;
}

Fixed version (ground truth):
public LibraryLoader(CommonLibraryManager libraryManager,ILibraryCallback callback){
  this.libraryManager=libraryManager;
  this.callback=callback;
}
Program: 170301
Project: 170301
Buggy source:
public void reloadLibrary();

Fixed version (ground truth):
public void reloadLibrary(ILibraryCallback callback);
Program: 170302
Project: 170302
Buggy source:
public void writeToByteBuf(ByteBuf buf){
  ByteBufUtils.writeUTF8String(buf,fileName);
  ByteBufUtils.writeUTF8String(buf,filePath);
  buf.writeBoolean(directory);
  if (!directory) {
    ByteBufUtils.writeUTF8String(buf,skinType.getRegistryName());
  }
}

Fixed version (ground truth):
public void writeToByteBuf(ByteBuf buf){
  ByteBufUtils.writeUTF8String(buf,fileName);
  ByteBufUtils.writeUTF8String(buf,filePath);
  buf.writeBoolean(directory);
  buf.writeBoolean(skinType != null);
  if (skinType != null) {
    ByteBufUtils.writeUTF8String(buf,skinType.getRegistryName());
  }
}
Program: 170303
Project: 170303
Buggy source:
public static LibraryFile readFromByteBuf(ByteBuf buf){
  String fileName=ByteBufUtils.readUTF8String(buf);
  String filePath=ByteBufUtils.readUTF8String(buf);
  boolean directory=buf.readBoolean();
  ISkinType skinType=null;
  if (!directory) {
    String regName=ByteBufUtils.readUTF8String(buf);
    skinType=SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(regName);
  }
  return new LibraryFile(fileName,filePath,skinType,directory);
}

Fixed version (ground truth):
public static LibraryFile readFromByteBuf(ByteBuf buf){
  String fileName=ByteBufUtils.readUTF8String(buf);
  String filePath=ByteBufUtils.readUTF8String(buf);
  boolean directory=buf.readBoolean();
  ISkinType skinType=null;
  if (buf.readBoolean()) {
    String regName=ByteBufUtils.readUTF8String(buf);
    skinType=SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(regName);
  }
  return new LibraryFile(fileName,filePath,skinType,directory);
}
Program: 170304
Project: 170304
Buggy source:
@Override public IMessage onMessage(MessageServerLibraryFileList message,MessageContext ctx){
  EntityClientPlayerMP player=Minecraft.getMinecraft().thePlayer;
  Container container=player.openContainer;
  ArmourersWorkshop.proxy.libraryManager.setFileList(message.fileList,message.listType);
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(MessageServerLibraryFileList message,MessageContext ctx){
  EntityClientPlayerMP player=Minecraft.getMinecraft().thePlayer;
  Container container=player.openContainer;
  ModLogger.log("String_Node_Str" + message.listType);
  ArmourersWorkshop.proxy.libraryManager.setFileList(message.fileList,message.listType);
  return null;
}
Program: 170305
Project: 170305
Buggy source:
public MessageServerSkinIdSend(String fileName,int skinId){
  this.fileName=fileName;
  this.skinId=skinId;
}

Fixed version (ground truth):
public MessageServerSkinIdSend(String fileName,int skinId,boolean clearId){
  this.fileName=fileName;
  this.skinId=skinId;
  this.clearId=clearId;
}
Program: 170306
Project: 170306
Buggy source:
@Override public void toBytes(ByteBuf buf){
  buf.writeInt(skinId);
  ByteBufUtils.writeUTF8String(buf,fileName);
}

Fixed version (ground truth):
@Override public void toBytes(ByteBuf buf){
  buf.writeInt(skinId);
  ByteBufUtils.writeUTF8String(buf,fileName);
  buf.writeBoolean(clearId);
}
Program: 170307
Project: 170307
Buggy source:
@Override public void fromBytes(ByteBuf buf){
  skinId=buf.readInt();
  fileName=ByteBufUtils.readUTF8String(buf);
}

Fixed version (ground truth):
@Override public void fromBytes(ByteBuf buf){
  skinId=buf.readInt();
  fileName=ByteBufUtils.readUTF8String(buf);
  clearId=buf.readBoolean();
}
Program: 170308
Project: 170308
Buggy source:
@Override public IMessage onMessage(MessageServerSkinIdSend message,MessageContext ctx){
  setIdForFileName(message.fileName,message.skinId);
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(MessageServerSkinIdSend message,MessageContext ctx){
  if (!message.clearId) {
    setIdForFileName(message.fileName,message.skinId);
  }
 else {
    clearIdForFileName(message.fileName);
  }
  return null;
}
Program: 170309
Project: 170309
Buggy source:
@Deprecated public void clearFileNameIdLink(String fileName){
  fileNameIdLinkMap.remove(fileName);
}

Fixed version (ground truth):
@Deprecated public void clearFileNameIdLink(String fileName){
  fileNameIdLinkMap.remove(fileName);
  MessageServerSkinIdSend message=new MessageServerSkinIdSend(fileName,0,true);
  PacketHandler.networkWrapper.sendToAll(message);
}
Program: 170310
Project: 170310
Buggy source:
@Deprecated private void sendSkinIdToClient(String fileName,EntityPlayerMP player){
  if (!fileNameIdLinkMap.containsKey(fileName)) {
    String basicFileName=fileName;
    Skin skin=SkinIOUtils.loadSkinFromFileName(basicFileName + "String_Node_Str");
    if (skin != null) {
      addEquipmentDataToCache(skin,basicFileName);
    }
 else {
      ModLogger.log(Level.ERROR,String.format("String_Node_Str",player.getCommandSenderName(),fileName));
    }
  }
  if (fileNameIdLinkMap.containsKey(fileName)) {
    MessageServerSkinIdSend message=new MessageServerSkinIdSend(fileName,fileNameIdLinkMap.get(fileName));
    PacketHandler.networkWrapper.sendTo(message,player);
  }
}

Fixed version (ground truth):
@Deprecated private void sendSkinIdToClient(String fileName,EntityPlayerMP player){
  if (!fileNameIdLinkMap.containsKey(fileName)) {
    String basicFileName=fileName;
    Skin skin=SkinIOUtils.loadSkinFromFileName(basicFileName + "String_Node_Str");
    if (skin != null) {
      addEquipmentDataToCache(skin,basicFileName);
    }
 else {
      ModLogger.log(Level.ERROR,String.format("String_Node_Str",player.getCommandSenderName(),fileName));
    }
  }
  if (fileNameIdLinkMap.containsKey(fileName)) {
    MessageServerSkinIdSend message=new MessageServerSkinIdSend(fileName,fileNameIdLinkMap.get(fileName),false);
    PacketHandler.networkWrapper.sendTo(message,player);
  }
}
Program: 170311
Project: 170311
Buggy source:
public void sendArmourToClient(String filename,String filePath,EntityPlayerMP player){
  if (!ConfigHandler.allowClientsToDownloadSkins) {
    return;
  }
  ItemStack stackInput=getStackInSlot(0);
  ItemStack stackOutput=getStackInSlot(1);
  if (stackInput == null) {
    return;
  }
  if (stackOutput != null) {
    return;
  }
  if (!(stackInput.getItem() instanceof ItemSkin)) {
    return;
  }
  if (!SkinNBTHelper.stackHasSkinData(stackInput)) {
    return;
  }
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stackInput);
  Skin skin=CommonSkinCache.INSTANCE.getEquipmentData(skinPointer.skinId);
  if (skin == null) {
    return;
  }
  MessageServerLibrarySendSkin message=new MessageServerLibrarySendSkin(filename,filePath,skin);
  PacketHandler.networkWrapper.sendTo(message,player);
  this.decrStackSize(0,1);
  this.setInventorySlotContents(1,stackInput);
}

Fixed version (ground truth):
public void sendArmourToClient(String filename,String filePath,EntityPlayerMP player){
  if (!ConfigHandler.allowClientsToDownloadSkins) {
    return;
  }
  ItemStack stackInput=getStackInSlot(0);
  ItemStack stackOutput=getStackInSlot(1);
  if (stackInput == null) {
    return;
  }
  if (stackOutput != null) {
    return;
  }
  if (!(stackInput.getItem() instanceof ItemSkin)) {
    return;
  }
  if (!SkinNBTHelper.stackHasSkinData(stackInput)) {
    return;
  }
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stackInput);
  Skin skin=CommonSkinCache.INSTANCE.getEquipmentData(skinPointer.skinId);
  if (skin == null) {
    return;
  }
  LibraryFile file=new LibraryFile(filename,filePath,skin.getSkinType());
  CommonSkinCache.INSTANCE.clearFileNameIdLink(file);
  MessageServerLibrarySendSkin message=new MessageServerLibrarySendSkin(filename,filePath,skin);
  PacketHandler.networkWrapper.sendTo(message,player);
  this.decrStackSize(0,1);
  this.setInventorySlotContents(1,stackInput);
}
Program: 170314
Project: 170314
Buggy source:
@Override public void setInventorySlotContents(IInventory inventory,int slotId,ItemStack stack){
  if (entity.worldObj.isRemote) {
    return;
  }
  if (stack == null) {
    ISkinType skinType=SkinTypeHelper.getSkinTypeForSlot(slotId);
    equipmentData.removeEquipment(skinType,0);
  }
 else {
    SkinPointer skinData=SkinNBTHelper.getSkinPointerFromStack(stack);
    equipmentData.addEquipment(skinData.skinType,0,skinData);
  }
  sendEquipmentDataToPlayerToAllPlayersAround();
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(IInventory inventory,int slotId,ItemStack stack){
  if (entity.worldObj.isRemote) {
    return;
  }
  if (stack == null) {
    ISkinType skinType=getSkinTypeForSlot(slotId);
    equipmentData.removeEquipment(skinType,0);
  }
 else {
    SkinPointer skinData=SkinNBTHelper.getSkinPointerFromStack(stack);
    equipmentData.addEquipment(skinData.skinType,0,skinData);
  }
  sendEquipmentDataToPlayerToAllPlayersAround();
}
Program: 170315
Project: 170315
Buggy source:
public void skinAdded(ItemStack stack){
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  updateLockedSlots(stack);
  putStackInSlot(45,stack.copy());
}

Fixed version (ground truth):
public void skinAdded(ItemStack stack){
  SkinPointer skinPointer=SkinNBTHelper.getSkinPointerFromStack(stack);
  ISkinDye dye=skinPointer.getSkinDye();
  skinRemoved();
  updateLockedSlots(stack);
  putStackInSlot(45,stack.copy());
}
Program: 170316
Project: 170316
Buggy source:
public void writeToByteBuf(ByteBuf buf){
  ByteBufUtils.writeUTF8String(buf,fileName);
  ByteBufUtils.writeUTF8String(buf,filePath);
  ByteBufUtils.writeUTF8String(buf,skinType.getRegistryName());
  buf.writeBoolean(directory);
}

Fixed version (ground truth):
public void writeToByteBuf(ByteBuf buf){
  ByteBufUtils.writeUTF8String(buf,fileName);
  ByteBufUtils.writeUTF8String(buf,filePath);
  buf.writeBoolean(directory);
  if (!directory) {
    ByteBufUtils.writeUTF8String(buf,skinType.getRegistryName());
  }
}
Program: 170317
Project: 170317
Buggy source:
public LibraryFile(String fileName,String filePath,ISkinType skinType,boolean directory){
  this.fileName=fileName;
  this.filePath=filePath;
  this.skinType=skinType;
  this.directory=directory;
}

Fixed version (ground truth):
public LibraryFile(String fileName,String filePath,ISkinType skinType,boolean directory){
  this.fileName=fileName.replace("String_Node_Str","String_Node_Str");
  this.filePath=filePath.replace("String_Node_Str","String_Node_Str");
  this.skinType=skinType;
  this.directory=directory;
}
Program: 170318
Project: 170318
Buggy source:
public static LibraryFile readFromByteBuf(ByteBuf buf){
  String fileName=ByteBufUtils.readUTF8String(buf);
  String filePath=ByteBufUtils.readUTF8String(buf);
  String regName=ByteBufUtils.readUTF8String(buf);
  ISkinType skinType=SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(regName);
  boolean directory=buf.readBoolean();
  return new LibraryFile(fileName,filePath,skinType,directory);
}

Fixed version (ground truth):
public static LibraryFile readFromByteBuf(ByteBuf buf){
  String fileName=ByteBufUtils.readUTF8String(buf);
  String filePath=ByteBufUtils.readUTF8String(buf);
  boolean directory=buf.readBoolean();
  ISkinType skinType=null;
  if (!directory) {
    String regName=ByteBufUtils.readUTF8String(buf);
    skinType=SkinTypeRegistry.INSTANCE.getSkinTypeFromRegistryName(regName);
  }
  return new LibraryFile(fileName,filePath,skinType,directory);
}
Program: 170319
Project: 170319
Buggy source:
@Override public void update(){
  if (downloadListTask != null && downloadListTask.isDone()) {
    try {
      json=downloadListTask.get();
      SkinDownloader.downloadSkins(skinCompletion,json);
      downloadListTask=null;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  Future<Skin> futureSkin=skinCompletion.poll();
  if (futureSkin != null) {
    try {
      Skin skin=futureSkin.get();
      if (skin != null) {
        SkinPointer skinPointer=new SkinPointer(skin);
        if (skin != null && !ClientSkinCache.INSTANCE.isSkinInCache(skinPointer)) {
          ModelBakery.INSTANCE.receivedUnbakedModel(skin);
        }
 else {
          if (skin != null) {
            ClientSkinCache.INSTANCE.addServerIdMap(skin);
          }
        }
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void update(){
  if (downloadListTask != null && downloadListTask.isDone()) {
    try {
      json=downloadListTask.get();
      if (json != null) {
        SkinDownloader.downloadSkins(skinCompletion,json);
      }
      downloadListTask=null;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  Future<Skin> futureSkin=skinCompletion.poll();
  if (futureSkin != null) {
    try {
      Skin skin=futureSkin.get();
      if (skin != null) {
        SkinPointer skinPointer=new SkinPointer(skin);
        if (skin != null && !ClientSkinCache.INSTANCE.isSkinInCache(skinPointer)) {
          ModelBakery.INSTANCE.receivedUnbakedModel(skin);
        }
 else {
          if (skin != null) {
            ClientSkinCache.INSTANCE.addServerIdMap(skin);
          }
        }
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 170320
Project: 170320
Buggy source:
@Override public void update(){
  if (downloadSearchResultsTask != null && downloadSearchResultsTask.isDone()) {
    try {
      json=null;
      page=0;
      json=downloadSearchResultsTask.get();
      SkinDownloader.downloadSkins(skinCompletion,json);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
catch (    ExecutionException e) {
      e.printStackTrace();
    }
    downloadSearchResultsTask=null;
  }
  Future<Skin> futureSkin=skinCompletion.poll();
  if (futureSkin != null) {
    try {
      Skin skin=futureSkin.get();
      if (skin != null) {
        SkinPointer skinPointer=new SkinPointer(skin);
        if (skin != null && !ClientSkinCache.INSTANCE.isSkinInCache(skinPointer)) {
          ModelBakery.INSTANCE.receivedUnbakedModel(skin);
        }
 else {
          if (skin != null) {
            ClientSkinCache.INSTANCE.addServerIdMap(skin);
          }
        }
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void update(){
  if (downloadSearchResultsTask != null && downloadSearchResultsTask.isDone()) {
    try {
      json=null;
      page=0;
      json=downloadSearchResultsTask.get();
      if (json != null) {
        SkinDownloader.downloadSkins(skinCompletion,json);
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
catch (    ExecutionException e) {
      e.printStackTrace();
    }
    downloadSearchResultsTask=null;
  }
  Future<Skin> futureSkin=skinCompletion.poll();
  if (futureSkin != null) {
    try {
      Skin skin=futureSkin.get();
      if (skin != null) {
        SkinPointer skinPointer=new SkinPointer(skin);
        if (skin != null && !ClientSkinCache.INSTANCE.isSkinInCache(skinPointer)) {
          ModelBakery.INSTANCE.receivedUnbakedModel(skin);
        }
 else {
          if (skin != null) {
            ClientSkinCache.INSTANCE.addServerIdMap(skin);
          }
        }
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 170321
Project: 170321
Buggy source:
@Override public void initGui(){
  guiLeft=width / 2 - guiWidth / 2;
  guiTop=height / 2 - guiHeight / 2;
  buttonList.clear();
  checkWireframe=new GuiCheckBox(-1,guiLeft + 5,guiTop + 5,"String_Node_Str",ConfigHandlerClient.wireframeRender);
  buttonList.add(checkWireframe);
}

Fixed version (ground truth):
@Override public void initGui(){
  guiLeft=width / 2 - guiWidth / 2;
  guiTop=height / 2 - guiHeight / 2;
  buttonList.clear();
  checkWireframe=new GuiCheckBox(-1,guiLeft + 5,guiTop + 5,"String_Node_Str",ConfigHandlerClient.wireframeRender);
  checkWireframe.setTextColour(0xFFEEEEEE);
  buttonList.add(checkWireframe);
}
Program: 170322
Project: 170322
Buggy source:
public GuiCheckBox(int id,int x,int y,String text,boolean checked){
  super(id,x,y,text,checked);
  this.boxWidth=9;
  this.height=9;
}

Fixed version (ground truth):
public GuiCheckBox(int id,int x,int y,String text,boolean checked){
  super(id,x,y,text,checked);
  this.boxWidth=9;
  this.height=9;
  this.textColour=14737632;
}
Program: 170323
Project: 170323
Buggy source:
@Override public void drawButton(Minecraft mc,int mouseX,int mouseY){
  if (this.visible) {
    this.field_146123_n=mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.boxWidth && mouseY < this.yPosition + this.height;
    GuiUtils.drawContinuousTexturedBox(buttonTextures,this.xPosition,this.yPosition,0,46,this.boxWidth,this.height,200,20,2,3,2,2,this.zLevel);
    this.mouseDragged(mc,mouseX,mouseY);
    int color=4210752;
    if (packedFGColour != 0) {
      color=packedFGColour;
    }
 else     if (!this.enabled) {
      color=10526880;
    }
    if (this.isChecked()) {
      this.drawCenteredString(mc.fontRenderer,"String_Node_Str",this.xPosition + this.boxWidth / 2 + 1,this.yPosition,14737632);
    }
    mc.fontRenderer.drawString(displayString,xPosition + this.boxWidth + 2,yPosition + 1,color,false);
  }
}

Fixed version (ground truth):
@Override public void drawButton(Minecraft mc,int mouseX,int mouseY){
  if (this.visible) {
    this.field_146123_n=mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.boxWidth && mouseY < this.yPosition + this.height;
    GuiUtils.drawContinuousTexturedBox(buttonTextures,this.xPosition,this.yPosition,0,46,this.boxWidth,this.height,200,20,2,3,2,2,this.zLevel);
    this.mouseDragged(mc,mouseX,mouseY);
    int color=this.textColour;
    if (packedFGColour != 0) {
      color=packedFGColour;
    }
 else     if (!this.enabled) {
      color=10526880;
    }
    if (this.isChecked()) {
      this.drawCenteredString(mc.fontRenderer,"String_Node_Str",this.xPosition + this.boxWidth / 2 + 1,this.yPosition,0xFFCCCCCC);
    }
    mc.fontRenderer.drawString(displayString,xPosition + this.boxWidth + 2,yPosition + 1,color,false);
  }
}
Program: 170324
Project: 170324
Buggy source:
@Mod.EventHandler public void perInit(FMLPreInitializationEvent event){
  ModLogger.log("String_Node_Str" + LibModInfo.NAME + "String_Node_Str"+ LibModInfo.VERSION);
  creativeTabArmorersWorkshop.setMinecraftCreativeTab(tabArmorersWorkshop);
  ConfigHandler.init(event.getSuggestedConfigurationFile());
  Addons.preInit();
  proxy.preInit();
  SkinIOUtils.makeLibraryDirectory();
  UpdateCheck.checkForUpdates();
  SkinExtractor.extractSkins();
  modItems=new ModItems();
  modBlocks=new ModBlocks();
  SkinTypeRegistry.init();
  CubeRegistry.init();
  proxy.initLibraryManager();
}

Fixed version (ground truth):
@Mod.EventHandler public void perInit(FMLPreInitializationEvent event){
  ModLogger.log("String_Node_Str" + LibModInfo.NAME + "String_Node_Str"+ LibModInfo.VERSION);
  creativeTabArmorersWorkshop.setMinecraftCreativeTab(tabArmorersWorkshop);
  ConfigHandler.init(event.getSuggestedConfigurationFile());
  CapabilityManager.INSTANCE.register(IWardrobeCapability.class,new WardrobeStorage(),DefaultWardrobeCapability.class);
  Addons.preInit();
  proxy.preInit();
  SkinIOUtils.makeLibraryDirectory();
  UpdateCheck.checkForUpdates();
  SkinExtractor.extractSkins();
  modItems=new ModItems();
  modBlocks=new ModBlocks();
  SkinTypeRegistry.init();
  CubeRegistry.init();
  proxy.initLibraryManager();
}
Program: 170325
Project: 170325
Buggy source:
public ModelHead(){
  main=new ModelRenderer(this,0,0);
  main.addBox(-4F,-8F,-4F,8,8,8);
  main.setRotationPoint(0,0,0);
  overlay=new ModelRenderer(this,32,0);
  overlay.addBox(-4F,-8F,-4F,8,8,8,0.5F);
  overlay.setRotationPoint(0F,0F,0F);
  overlay.setTextureSize(64,32);
}

Fixed version (ground truth):
public ModelHead(){
  main=new ModelRenderer(this,0,0);
  main.addBox(-4F,-8F,-4F,8,8,8);
  main.setRotationPoint(0,0,0);
  main.setTextureSize(64,64);
  overlay=new ModelRenderer(this,32,0);
  overlay.addBox(-4F,-8F,-4F,8,8,8,0.5F);
  overlay.setRotationPoint(0F,0F,0F);
  overlay.setTextureSize(64,64);
}
Program: 170326
Project: 170326
Buggy source:
private static void renderGuideFace(EnumFacing dir,double x,double y,double z,double sizeX,double sizeY,float scale){
  Tessellator tessellator=Tessellator.getInstance();
  GL11.glPushMatrix();
  GL11.glDisable(GL11.GL_CULL_FACE);
  ModRenderHelper.enableAlphaBlend();
  float scale1=0.999F;
  GL11.glTranslated(x * scale,y * scale,z * scale);
switch (dir) {
case EAST:
    GL11.glRotated(-90,0,1,0);
  break;
case WEST:
GL11.glRotated(-90,0,1,0);
break;
case UP:
GL11.glRotated(90,1,0,0);
break;
case DOWN:
GL11.glRotated(90,1,0,0);
break;
default :
break;
}
ModRenderHelper.disableAlphaBlend();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}

Fixed version (ground truth):
private static void renderGuideFace(EnumFacing dir,double x,double y,double z,double sizeX,double sizeY,float scale){
  Tessellator tessellator=Tessellator.getInstance();
  GL11.glPushMatrix();
  GL11.glDisable(GL11.GL_CULL_FACE);
  ModRenderHelper.enableAlphaBlend();
  float scale1=0.999F;
  GL11.glTranslated(x * scale,y * scale,z * scale);
switch (dir) {
case EAST:
    GL11.glRotated(-90,0,1,0);
  break;
case WEST:
GL11.glRotated(-90,0,1,0);
break;
case UP:
GL11.glRotated(90,1,0,0);
break;
case DOWN:
GL11.glRotated(90,1,0,0);
break;
default :
break;
}
IRenderBuffer buff=RenderBridge.INSTANCE;
buff.startDrawing(GL11.GL_QUADS,DefaultVertexFormats.POSITION_TEX);
buff.addVertexWithUV(0,0,0,0,0);
buff.endVertex();
buff.addVertexWithUV(0,sizeY * scale,0,sizeY,0);
buff.endVertex();
buff.addVertexWithUV(sizeX * scale,sizeY * scale,0,sizeY,sizeX);
buff.endVertex();
buff.addVertexWithUV(sizeX * scale,0,0,0,sizeX);
buff.endVertex();
buff.draw();
ModRenderHelper.disableAlphaBlend();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
Program: 170328
Project: 170328
Buggy source:
/** 
 * Reads the NBT data from an item and places blocks in the world.
 * @param player The player that pressed the load button.
 */
public void loadArmourItem(EntityPlayerMP player){
  if (this.worldObj.isRemote) {
    return;
  }
  ItemStack stackInput=this.getStackInSlot(0);
  ItemStack stackOuput=this.getStackInSlot(1);
  if (stackInput == null) {
    return;
  }
  if (stackOuput != null) {
    return;
  }
  if (!(stackInput.getItem() instanceof ItemSkin)) {
    return;
  }
  if (!SkinNBTHelper.stackHasSkinData(stackInput)) {
    return;
  }
  SkinPointer skinData=SkinNBTHelper.getSkinPointerFromStack(stackInput);
  if (skinType == null) {
    return;
  }
  if (skinType != skinData.skinType) {
    if (!(skinType == SkinTypeRegistry.skinLegs && skinData.skinType == SkinTypeRegistry.skinSkirt)) {
      return;
    }
  }
  int equipmentId=SkinNBTHelper.getSkinIdFromStack(stackInput);
  Skin equipmentData=SkinDataCache.INSTANCE.getEquipmentData(equipmentId);
  setCustomName(equipmentData.getCustomName());
  ArmourerWorldHelper.loadSkinIntoWorld(worldObj,xCoord,yCoord + HEIGHT_OFFSET,zCoord,equipmentData,direction);
  if (equipmentData.hasPaintData()) {
    this.paintData=equipmentData.getPaintData();
  }
 else {
    clearPaintData(true);
  }
  this.markDirty();
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  this.setInventorySlotContents(0,null);
  this.setInventorySlotContents(1,stackInput);
}

Fixed version (ground truth):
/** 
 * Reads the NBT data from an item and places blocks in the world.
 * @param player The player that pressed the load button.
 */
public void loadArmourItem(EntityPlayerMP player){
  if (this.worldObj.isRemote) {
    return;
  }
  ItemStack stackInput=this.getStackInSlot(0);
  ItemStack stackOuput=this.getStackInSlot(1);
  if (stackInput == null) {
    return;
  }
  if (stackOuput != null) {
    return;
  }
  if (!(stackInput.getItem() instanceof ItemSkin)) {
    return;
  }
  if (!SkinNBTHelper.stackHasSkinData(stackInput)) {
    return;
  }
  SkinPointer skinData=SkinNBTHelper.getSkinPointerFromStack(stackInput);
  if (skinType == null) {
    return;
  }
  if (skinType != skinData.skinType) {
    if (!(skinType == SkinTypeRegistry.skinLegs && skinData.skinType == SkinTypeRegistry.skinSkirt)) {
      return;
    }
  }
  int equipmentId=SkinNBTHelper.getSkinIdFromStack(stackInput);
  Skin equipmentData=SkinDataCache.INSTANCE.getEquipmentData(equipmentId);
  setCustomName(equipmentData.getCustomName());
  ArmourerWorldHelper.loadSkinIntoWorld(worldObj,xCoord,yCoord + HEIGHT_OFFSET,zCoord,equipmentData,direction);
  if (equipmentData.hasPaintData()) {
    this.paintData=equipmentData.getPaintData().clone();
  }
 else {
    clearPaintData(true);
  }
  this.markDirty();
  worldObj.markBlockForUpdate(xCoord,yCoord,zCoord);
  this.setInventorySlotContents(0,null);
  this.setInventorySlotContents(1,stackInput);
}
Program: 170329
Project: 170329
Buggy source:
public ModelMannequin(){
  super();
  this.isChild=false;
}

Fixed version (ground truth):
public ModelMannequin(){
  super();
  this.isChild=false;
  this.compiled=false;
}