nus-yam/ex-repair huggingface dataset:
Program: 171362
Project: 171362
Buggy source:
/** 
 * @param area Area you want to get to.
 * @param byRemovingClothing Allow consideration of clothing removal or not.
 * @return True if can access slot. (if byRemovingClothing is true, then ittells you if you are able to get to the slot by removing clothing, not that it is available right now).
 */
public boolean isAbleToAccessCoverableArea(CoverableArea area,boolean byRemovingClothing){
  for (  AbstractClothing clothing : clothingCurrentlyEquipped) {
    for (    BlockedParts bp : clothing.getClothingType().getBlockedPartsList()) {
      if (bp.blockedBodyParts.contains(area)) {
        if (!clothing.getDisplacedList().contains(bp.displacementType)) {
          if (byRemovingClothing) {
            if (bp.displacementType == DisplacementType.REMOVE_OR_EQUIP) {
              if (!isAbleToUnequip(clothing,false,byRemovingClothing,null,null))               return false;
            }
 else {
              if (!isAbleToBeDisplaced(clothing,bp.displacementType,false,byRemovingClothing,null,null))               return false;
            }
          }
 else {
            return false;
          }
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param area Area you want to get to.
 * @param byRemovingClothing Allow consideration of clothing removal or not.
 * @return True if can access slot. (if byRemovingClothing is true, then it tells you if you are able to get to the slot by removing clothing, not that it is available right now).
 */
public boolean isAbleToAccessCoverableArea(CoverableArea area,boolean byRemovingClothing){
  for (  AbstractClothing clothing : clothingCurrentlyEquipped) {
    for (    BlockedParts bp : clothing.getClothingType().getBlockedPartsList()) {
      if (bp.blockedBodyParts.contains(area)) {
        if (!clothing.getDisplacedList().contains(bp.displacementType)) {
          if (byRemovingClothing) {
            if (bp.displacementType == DisplacementType.REMOVE_OR_EQUIP) {
              if (!isAbleToUnequip(clothing,false,byRemovingClothing,null,null))               return false;
            }
 else {
              if (!isAbleToBeDisplaced(clothing,bp.displacementType,false,byRemovingClothing,null,null))               return false;
            }
          }
 else {
            return false;
          }
        }
      }
    }
  }
  return true;
}
Program: 171365
Project: 171365
Buggy source:
public void openInventory(NPC npc,InventoryInteraction interaction){
  if (!Main.game.isStarted()) {
    return;
  }
  InventoryDialogue.setBuyback(false);
  InventoryDialogue.setInventoryNPC(npc);
  InventoryDialogue.setNPCInventoryInteraction(interaction);
  if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.INVENTORY) {
    Main.game.restoreSavedContent();
  }
 else   if (!isInventoryDisabled() || npc != null) {
    if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.NORMAL) {
      Main.game.saveDialogueNode();
    }
    InventoryDialogue.populateJinxedClothingList();
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",InventoryDialogue.INVENTORY_MENU));
  }
}

Fixed version (ground truth):
public void openInventory(NPC npc,InventoryInteraction interaction){
  if (!Main.game.isStarted()) {
    return;
  }
  InventoryDialogue.setBuyback(false);
  InventoryDialogue.setInventoryNPC(npc);
  InventoryDialogue.setNPCInventoryInteraction(interaction);
  if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.INVENTORY) {
    Main.game.restoreSavedContent();
  }
 else   if (!isInventoryDisabled() || npc != null) {
    if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.NORMAL) {
      Main.game.saveDialogueNode();
    }
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",InventoryDialogue.INVENTORY_MENU));
  }
}
Program: 171366
Project: 171366
Buggy source:
@Override public void effects(){
  if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY) && Main.game.getPlayer().hasNonArcaneEssences()) {
    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().incrementQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY));
  }
  if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_JINXED_CLOTHING) && Main.game.getPlayer().hasStatusEffect(StatusEffect.CLOTHING_JINXED)) {
    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().incrementQuest(QuestLine.SIDE_JINXED_CLOTHING));
  }
  if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY) && Main.game.getPlayer().isVisiblyPregnant()) {
    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().incrementQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY));
  }
}

Fixed version (ground truth):
@Override public void effects(){
  if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY) && Main.game.getPlayer().hasNonArcaneEssences()) {
    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().incrementQuest(QuestLine.SIDE_ENCHANTMENT_DISCOVERY));
  }
  if (!Main.game.getPlayer().hasQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY) && Main.game.getPlayer().isVisiblyPregnant()) {
    Main.game.getTextEndStringBuilder().append(Main.game.getPlayer().incrementQuest(QuestLine.SIDE_FIRST_TIME_PREGNANCY));
  }
}
Program: 171368
Project: 171368
Buggy source:
public void removeNPC(NPC npc){
  if (npc.isPregnant()) {
    npc.endPregnancy(false);
  }
  if (isInNPCUpdateLoop) {
    npcsToRemove.add(npc);
  }
 else {
    NPCMap.remove(npc.getId());
  }
}

Fixed version (ground truth):
public void removeNPC(NPC npc){
  if (npc.isPregnant()) {
    npc.endPregnancy(false);
  }
 else   if (npc.hasStatusEffect(StatusEffect.PREGNANT_0)) {
    npc.removeStatusEffect(StatusEffect.PREGNANT_0);
  }
  if (isInNPCUpdateLoop) {
    npcsToRemove.add(npc);
  }
 else {
    NPCMap.remove(npc.getId());
  }
}
Program: 171370
Project: 171370
Buggy source:
private static int getSizeFromGenetics(int baseSize,boolean inheritsFromMother,int motherSize,boolean inheritsFromFather,int fatherSize){
  int variation=0;
  if (inheritsFromMother && inheritsFromFather) {
    variation=(motherSize + fatherSize) / 2;
  }
 else   if (inheritsFromMother) {
    variation=motherSize;
  }
 else   if (inheritsFromFather) {
    variation=fatherSize;
  }
  int difference=variation - baseSize;
  return (int)((baseSize + (Math.signum(difference) * Util.random.nextInt(Math.abs(difference) + 1))) * (0.9f + (Math.random() * 0.2f)));
}

Fixed version (ground truth):
private static int getSizeFromGenetics(int baseSize,boolean inheritsFromMother,int motherSize,boolean inheritsFromFather,int fatherSize){
  int variation=0;
  if (inheritsFromMother && inheritsFromFather) {
    variation=(motherSize + fatherSize) / 2;
  }
 else   if (inheritsFromMother) {
    variation=motherSize;
  }
 else   if (inheritsFromFather) {
    variation=fatherSize;
  }
  int difference=variation - baseSize;
  return (int)(baseSize + difference * Math.random());
}
Program: 171371
Project: 171371
Buggy source:
private static void addAttribute(Document doc,Element parentElement,String attributeName,String value){
  Attr attr=doc.createAttribute(attributeName);
  attr.setValue(value);
  parentElement.setAttributeNode(attr);
}

Fixed version (ground truth):
public static void addAttribute(Document doc,Element parentElement,String attributeName,String value){
  Attr attr=doc.createAttribute(attributeName);
  attr.setValue(value);
  parentElement.setAttributeNode(attr);
}
Program: 171377
Project: 171377
Buggy source:
@Override public String setCapacity(GameCharacter owner,float capacity){
  float oldCapacity=this.capacity;
  this.capacity=Math.max(0,Math.min(capacity,Capacity.SEVEN_GAPING.getMaximumValue()));
  float capacityChange=this.capacity - oldCapacity;
  if (capacityChange == 0) {
    if (owner.isPlayer()) {
      return "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str");
    }
  }
  String capacityDescriptor=getCapacity().getDescriptor();
  if (capacityChange > 0) {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str");
    }
  }
 else {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public String setCapacity(GameCharacter owner,float capacity){
  float oldCapacity=this.capacity;
  this.capacity=Math.max(0,Math.min(capacity,Capacity.SEVEN_GAPING.getMaximumValue()));
  this.stretchedCapacity=this.capacity;
  float capacityChange=this.capacity - oldCapacity;
  if (capacityChange == 0) {
    if (owner.isPlayer()) {
      return "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str");
    }
  }
  String capacityDescriptor=getCapacity().getDescriptor();
  if (capacityChange > 0) {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str");
    }
  }
 else {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str" + UtilText.generateSingularDeterminer(capacityDescriptor) + "String_Node_Str"+ capacityDescriptor+ "String_Node_Str"+ "String_Node_Str");
    }
  }
}
Program: 171381
Project: 171381
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171383
Project: 171383
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171384
Project: 171384
Buggy source:
public Finch(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str",10,Gender.MALE,RacialBody.CAT_MORPH,RaceStage.PARTIAL_FULL,new CharacterInventory(10),WorldType.SLAVER_ALLEY,SlaverAlley.SLAVERY_ADMINISTRATION,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_FELINE,Colour.EYE_GREEN));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_FELINE_FUR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.FELINE_FUR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HUMAN,Colour.SKIN_LIGHT),true);
  this.setPenisSize(PenisSize.ONE_TINY.getMedianValue());
  this.setTesticleSize(TesticleSize.ONE_TINY.getValue());
  this.setFemininity(25);
  this.addFetish(Fetish.FETISH_EXHIBITIONIST);
  this.addFetish(Fetish.FETISH_SADIST);
  this.addFetish(Fetish.FETISH_DEFLOWERING);
  applyReset();
}

Fixed version (ground truth):
public Finch(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str",10,Gender.MALE,RacialBody.CAT_MORPH,RaceStage.PARTIAL_FULL,new CharacterInventory(10),WorldType.SLAVER_ALLEY,SlaverAlley.SLAVERY_ADMINISTRATION,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_FELINE,Colour.EYE_GREEN));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_FELINE_FUR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.FELINE_FUR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HUMAN,Colour.SKIN_LIGHT),true);
  this.setPenisSize(PenisSize.ONE_TINY.getMedianValue());
  this.setTesticleSize(TesticleSize.ONE_TINY.getValue());
  this.setFemininity(25);
  this.addFetish(Fetish.FETISH_EXHIBITIONIST);
  this.addFetish(Fetish.FETISH_SADIST);
  this.addFetish(Fetish.FETISH_DEFLOWERING);
  this.setMoney(10);
  this.equipClothingFromNowhere(groin,true,this);
  this.equipClothingFromNowhere(legs,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(socks,true,this);
  this.equipClothingFromNowhere(shoes,true,this);
  dailyReset();
}
Program: 171385
Project: 171385
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171386
Project: 171386
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171387
Project: 171387
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171388
Project: 171388
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171389
Project: 171389
Buggy source:
@Override public void endSex(boolean applyEffects){
  if (applyEffects)   applyReset();
}

Fixed version (ground truth):
@Override public void endSex(boolean applyEffects){
}
Program: 171395
Project: 171395
Buggy source:
@Override public String getContent(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getContent(){
  return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
}
Program: 171399
Project: 171399
Buggy source:
public String unequipClothingIntoInventory(AbstractClothing clothing,boolean automaticClothingManagement,GameCharacter characterClothingUnequipper){
  boolean wasAbleToUnequip=inventory.isAbleToUnequip(clothing,true,automaticClothingManagement,this,characterClothingUnequipper);
  if (wasAbleToUnequip) {
    incrementBonusAttribute(Attribute.RESISTANCE_PHYSICAL,-clothing.getClothingType().getPhysicalResistance());
    for (    Entry<Attribute,Integer> e : clothing.getAttributeModifiers().entrySet()) {
      incrementBonusAttribute(e.getKey(),-e.getValue());
    }
    if (!isInventoryFull())     addClothing(clothing,false);
 else     Main.game.getActiveWorld().getCell(location).getInventory().addClothing(clothing);
    updateInventoryListeners();
    return "String_Node_Str" + inventory.getEquipDescription() + "String_Node_Str"+ (isInventoryFull() ? droppedItemText(clothing) : addedItemToInventoryText(clothing))+ "String_Node_Str";
  }
  return "String_Node_Str" + inventory.getEquipDescription() + "String_Node_Str";
}

Fixed version (ground truth):
public String unequipClothingIntoInventory(AbstractClothing clothing,boolean automaticClothingManagement,GameCharacter characterClothingUnequipper){
  boolean wasAbleToUnequip=inventory.isAbleToUnequip(clothing,true,automaticClothingManagement,this,characterClothingUnequipper);
  if (wasAbleToUnequip) {
    incrementBonusAttribute(Attribute.RESISTANCE_PHYSICAL,-clothing.getClothingType().getPhysicalResistance());
    for (    Entry<Attribute,Integer> e : clothing.getAttributeModifiers().entrySet()) {
      incrementBonusAttribute(e.getKey(),-e.getValue());
    }
    boolean fitsIntoInventory=!isInventoryFull() || hasClothing(clothing);
    if (fitsIntoInventory)     addClothing(clothing,false);
 else     Main.game.getActiveWorld().getCell(location).getInventory().addClothing(clothing);
    updateInventoryListeners();
    return "String_Node_Str" + inventory.getEquipDescription() + "String_Node_Str"+ (!fitsIntoInventory ? droppedItemText(clothing) : addedItemToInventoryText(clothing))+ "String_Node_Str";
  }
  return "String_Node_Str" + inventory.getEquipDescription() + "String_Node_Str";
}
Program: 171400
Project: 171400
Buggy source:
public String unequipMainWeapon(boolean dropToFloor){
  if (getMainWeapon() != null) {
    if (getMainWeapon().getAttributeModifiers() != null)     for (    Entry<Attribute,Integer> e : getMainWeapon().getAttributeModifiers().entrySet())     incrementBonusAttribute(e.getKey(),-e.getValue());
    String s;
    if (isInventoryFull() || dropToFloor) {
      Main.game.getActiveWorld().getCell(location).getInventory().addWeapon(getMainWeapon());
      s=getMainWeapon().getWeaponType().unequipText(this) + (isInventoryFull() && !dropToFloor ? inventoryFullText() : "String_Node_Str") + droppedItemText(getMainWeapon());
    }
 else {
      addWeapon(getMainWeapon(),false);
      s=getMainWeapon().getWeaponType().unequipText(this) + "String_Node_Str" + addedItemToInventoryText(getMainWeapon())+ "String_Node_Str";
    }
    inventory.unequipMainWEapon();
    updateInventoryListeners();
    return s;
  }
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String unequipMainWeapon(boolean dropToFloor){
  if (getMainWeapon() != null) {
    if (getMainWeapon().getAttributeModifiers() != null)     for (    Entry<Attribute,Integer> e : getMainWeapon().getAttributeModifiers().entrySet())     incrementBonusAttribute(e.getKey(),-e.getValue());
    boolean mustDropToFloor=isInventoryFull() && !hasWeapon(getMainWeapon());
    String s;
    if (mustDropToFloor || dropToFloor) {
      Main.game.getActiveWorld().getCell(location).getInventory().addWeapon(getMainWeapon());
      s=getMainWeapon().getWeaponType().unequipText(this) + (mustDropToFloor && !dropToFloor ? inventoryFullText() : "String_Node_Str") + droppedItemText(getMainWeapon());
    }
 else {
      addWeapon(getMainWeapon(),false);
      s=getMainWeapon().getWeaponType().unequipText(this) + "String_Node_Str" + addedItemToInventoryText(getMainWeapon())+ "String_Node_Str";
    }
    inventory.unequipMainWeapon();
    updateInventoryListeners();
    return s;
  }
 else   return "String_Node_Str";
}
Program: 171401
Project: 171401
Buggy source:
public String unequipOffhandWeapon(boolean dropToFloor){
  if (getOffhandWeapon() != null) {
    if (getOffhandWeapon().getAttributeModifiers() != null)     for (    Entry<Attribute,Integer> e : getOffhandWeapon().getAttributeModifiers().entrySet())     incrementBonusAttribute(e.getKey(),-e.getValue());
    String s;
    if (isInventoryFull() || dropToFloor) {
      Main.game.getActiveWorld().getCell(location).getInventory().addWeapon(getOffhandWeapon());
      s=getOffhandWeapon().getWeaponType().unequipText(this) + (isInventoryFull() && !dropToFloor ? inventoryFullText() : "String_Node_Str") + droppedItemText(getOffhandWeapon());
    }
 else {
      addWeapon(getOffhandWeapon(),false);
      s=getOffhandWeapon().getWeaponType().unequipText(this) + "String_Node_Str" + addedItemToInventoryText(getOffhandWeapon())+ "String_Node_Str";
    }
    inventory.unequipOffhandWeapon();
    updateInventoryListeners();
    return s;
  }
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public String unequipOffhandWeapon(boolean dropToFloor){
  if (getOffhandWeapon() != null) {
    if (getOffhandWeapon().getAttributeModifiers() != null)     for (    Entry<Attribute,Integer> e : getOffhandWeapon().getAttributeModifiers().entrySet())     incrementBonusAttribute(e.getKey(),-e.getValue());
    boolean mustDropToFloor=isInventoryFull() && !hasWeapon(getOffhandWeapon());
    String s;
    if (mustDropToFloor || dropToFloor) {
      Main.game.getActiveWorld().getCell(location).getInventory().addWeapon(getOffhandWeapon());
      s=getOffhandWeapon().getWeaponType().unequipText(this) + (mustDropToFloor && !dropToFloor ? inventoryFullText() : "String_Node_Str") + droppedItemText(getOffhandWeapon());
    }
 else {
      addWeapon(getOffhandWeapon(),false);
      s=getOffhandWeapon().getWeaponType().unequipText(this) + "String_Node_Str" + addedItemToInventoryText(getOffhandWeapon())+ "String_Node_Str";
    }
    inventory.unequipOffhandWeapon();
    updateInventoryListeners();
    return s;
  }
 else   return "String_Node_Str";
}
Program: 171402
Project: 171402
Buggy source:
public String setEyePairs(GameCharacter owner,int eyePairs){
  if (eyePairs <= 0) {
    eyePairs=1;
  }
 else   if (eyePairs > 4) {
    eyePairs=4;
  }
  if (owner.getEyePairs() == eyePairs) {
    return "String_Node_Str";
  }
  boolean removingExtraEyes=owner.getEyePairs() > eyePairs;
  this.eyePairs=eyePairs;
  if (removingExtraEyes) {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
  }
 else {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public String setEyePairs(GameCharacter owner,int eyePairs){
  eyePairs=Math.max(1,Math.min(eyePairs,4));
  if (owner.getEyePairs() == eyePairs) {
    return "String_Node_Str";
  }
  boolean removingExtraEyes=owner.getEyePairs() > eyePairs;
  this.eyePairs=eyePairs;
  if (removingExtraEyes) {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
  }
 else {
    if (owner.isPlayer()) {
      return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
    }
 else {
      return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    }
  }
}
Program: 171403
Project: 171403
Buggy source:
public String setIrisShape(GameCharacter owner,EyeShape irisShape){
  if (owner.getIrisShape() == irisShape) {
    return "String_Node_Str";
  }
  this.irisShape=irisShape;
  if (owner.isPlayer()) {
    return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  }
 else {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public String setIrisShape(GameCharacter owner,EyeShape irisShape){
  if (owner.getIrisShape() == irisShape) {
    return "String_Node_Str";
  }
  this.irisShape=irisShape;
  if (owner.isPlayer()) {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
 else {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
}
Program: 171404
Project: 171404
Buggy source:
public String setPupilShape(GameCharacter owner,EyeShape pupilShape){
  if (owner.getPupilShape() == pupilShape) {
    return "String_Node_Str";
  }
  this.pupilShape=pupilShape;
  if (owner.isPlayer()) {
    return "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  }
 else {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public String setPupilShape(GameCharacter owner,EyeShape pupilShape){
  if (owner.getPupilShape() == pupilShape) {
    return "String_Node_Str";
  }
  this.pupilShape=pupilShape;
  if (owner.isPlayer()) {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
 else {
    return UtilText.parse(owner,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  }
}
Program: 171405
Project: 171405
Buggy source:
public default boolean isPhysicallyPossible(){
  if (getAssociatedPenetrationType() != null) {
switch (getAssociatedPenetrationType()) {
case FINGER_PARTNER:
      break;
case FINGER_PLAYER:
    break;
case PENIS_PARTNER:
  if (!Sex.getPartner().hasPenis())   return false;
break;
case PENIS_PLAYER:
if (!Main.game.getPlayer().hasPenis()) return false;
break;
case TAIL_PARTNER:
if (!Sex.getPartner().getTailType().isPrehensile()) {
if (!Main.getProperties().furryTailPenetrationContent) {
return Sex.getPartner().getTailType().isSuitableForPenetration();
}
 else {
return true;
}
}
break;
case TAIL_PLAYER:
if (!Main.game.getPlayer().getTailType().isPrehensile()) {
if (!Main.getProperties().furryTailPenetrationContent) {
return Main.game.getPlayer().getTailType().isSuitableForPenetration();
}
 else {
return true;
}
}
break;
case TENTACLE_PARTNER:
break;
case TENTACLE_PLAYER:
break;
case TONGUE_PARTNER:
break;
case TONGUE_PLAYER:
break;
}
}
if (getAssociatedOrificeType() != null) {
switch (getAssociatedOrificeType()) {
case ANUS_PARTNER:
break;
case ANUS_PLAYER:
break;
case MOUTH_PARTNER:
break;
case MOUTH_PLAYER:
break;
case NIPPLE_PARTNER:
break;
case NIPPLE_PLAYER:
break;
case URETHRA_PARTNER:
if (!Sex.getPartner().hasPenis()) return false;
break;
case URETHRA_PLAYER:
if (!Main.game.getPlayer().hasPenis()) return false;
break;
case VAGINA_PARTNER:
if (!Sex.getPartner().hasVagina()) return false;
break;
case VAGINA_PLAYER:
if (!Main.game.getPlayer().hasVagina()) return false;
break;
}
}
return true;
}

Fixed version (ground truth):
public default boolean isPhysicallyPossible(){
  if (getAssociatedPenetrationType() != null) {
switch (getAssociatedPenetrationType()) {
case FINGER_PARTNER:
      break;
case FINGER_PLAYER:
    break;
case PENIS_PARTNER:
  if (!Sex.getPartner().hasPenis())   return false;
break;
case PENIS_PLAYER:
if (!Main.game.getPlayer().hasPenis()) return false;
break;
case TAIL_PARTNER:
if (!Sex.getPartner().getTailType().isPrehensile()) {
return false;
}
 else if (!Sex.getPartner().getTailType().isSuitableForPenetration() && !Main.getProperties().furryTailPenetrationContent) {
return false;
}
case TAIL_PLAYER:
if (!Main.game.getPlayer().getTailType().isPrehensile()) {
return false;
}
 else if (!Main.game.getPlayer().getTailType().isSuitableForPenetration() && !Main.getProperties().furryTailPenetrationContent) {
return false;
}
case TENTACLE_PARTNER:
break;
case TENTACLE_PLAYER:
break;
case TONGUE_PARTNER:
break;
case TONGUE_PLAYER:
break;
}
}
if (getAssociatedOrificeType() != null) {
switch (getAssociatedOrificeType()) {
case ANUS_PARTNER:
break;
case ANUS_PLAYER:
break;
case MOUTH_PARTNER:
break;
case MOUTH_PLAYER:
break;
case NIPPLE_PARTNER:
break;
case NIPPLE_PLAYER:
break;
case URETHRA_PARTNER:
if (!Sex.getPartner().hasPenis()) return false;
break;
case URETHRA_PLAYER:
if (!Main.game.getPlayer().hasPenis()) return false;
break;
case VAGINA_PARTNER:
if (!Sex.getPartner().hasVagina()) return false;
break;
case VAGINA_PLAYER:
if (!Main.game.getPlayer().hasVagina()) return false;
break;
}
}
return true;
}
Program: 171410
Project: 171410
Buggy source:
public Horn(HornType type){
  this.type=type;
}

Fixed version (ground truth):
public Horn(HornType type){
  this.type=type;
  rows=1;
}
Program: 171411
Project: 171411
Buggy source:
public Lilaya(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",10,Gender.FEMALE,RacialBody.DEMON,RaceStage.PARTIAL_FULL,new CharacterInventory(10),WorldType.LILAYAS_HOUSE_GROUND_FLOOR,LilayasHome.LILAYA_HOME_LAB,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_DEMON_COMMON,Colour.EYE_YELLOW));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_DEMON,Colour.COVERING_BLACK));
  this.setHairCovering(new Covering(BodyCoveringType.BODY_HAIR_DEMON,Colour.COVERING_BLACK));
  this.setCovering(new Covering(BodyCoveringType.DEMON_COMMON,Colour.SKIN_RED));
  this.setCovering(new Covering(BodyCoveringType.HUMAN,Main.game.getPlayer().getCovering(BodyCoveringType.HUMAN).getPrimaryColour()));
  this.setVaginaVirgin(false);
  this.setAssVirgin(false);
  this.setFaceVirgin(false);
  this.setNippleVirgin(false);
  this.setBreastSize(CupSize.E.getMeasurement());
  this.equipClothingFromNowhere(panties,true,this);
  this.equipClothingFromNowhere(bra,true,this);
  this.equipClothingFromNowhere(skirt,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(heels,true,this);
  this.equipClothingFromNowhere(glasses,true,this);
}

Fixed version (ground truth):
public Lilaya(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str",10,Gender.FEMALE,RacialBody.DEMON,RaceStage.PARTIAL_FULL,new CharacterInventory(10),WorldType.LILAYAS_HOUSE_GROUND_FLOOR,LilayasHome.LILAYA_HOME_LAB,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_DEMON_COMMON,Colour.EYE_YELLOW));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_DEMON,Colour.COVERING_BLACK));
  this.setHairCovering(new Covering(BodyCoveringType.BODY_HAIR_DEMON,Colour.COVERING_BLACK));
  this.setCovering(new Covering(BodyCoveringType.BODY_HAIR_DEMON,Colour.COVERING_BLACK));
  this.setCovering(new Covering(BodyCoveringType.DEMON_COMMON,Colour.SKIN_RED));
  this.setCovering(new Covering(BodyCoveringType.HUMAN,Main.game.getPlayer().getCovering(BodyCoveringType.HUMAN).getPrimaryColour()));
  this.setVaginaVirgin(false);
  this.setAssVirgin(false);
  this.setFaceVirgin(false);
  this.setNippleVirgin(false);
  this.setBreastSize(CupSize.E.getMeasurement());
  this.equipClothingFromNowhere(panties,true,this);
  this.equipClothingFromNowhere(bra,true,this);
  this.equipClothingFromNowhere(skirt,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(heels,true,this);
  this.equipClothingFromNowhere(glasses,true,this);
}
Program: 171412
Project: 171412
Buggy source:
public Tail(TailType type){
  this.type=type;
}

Fixed version (ground truth):
public Tail(TailType type){
  this.type=type;
  tailCount=1;
}
Program: 171413
Project: 171413
Buggy source:
public void openCharactersPresent(){
  if (!Main.game.isStarted())   return;
  if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.CHARACTERS_PRESENT) {
    RenderingEngine.ENGINE.setCharactersInventoryToRender(Main.game.getPlayer());
    Main.game.restoreSavedContent();
  }
 else   if (!Main.game.getCharactersPresent().isEmpty()) {
    if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.NORMAL || Main.game.isInCombat())     Main.game.saveDialogueNode();
    CharactersPresentDialogue.resetContent();
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
  }
  RenderingEngine.ENGINE.renderInventory();
}

Fixed version (ground truth):
public void openCharactersPresent(){
  if (!Main.game.isStarted())   return;
  if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.CHARACTERS_PRESENT) {
    RenderingEngine.ENGINE.setCharactersInventoryToRender(Main.game.getPlayer());
    Main.game.restoreSavedContent();
  }
 else   if (!Main.game.getCharactersPresent().isEmpty()) {
    if (Main.game.getCurrentDialogueNode().getMapDisplay() == MapDisplay.NORMAL)     Main.game.saveDialogueNode();
    CharactersPresentDialogue.resetContent();
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
  }
  RenderingEngine.ENGINE.renderInventory();
}
Program: 171417
Project: 171417
Buggy source:
public boolean hasGameEnded(){
  if (hasThreeSameHorizontalCells() || hasThreeSameVerticalCells() || hasThreeSameDiagonalCells()) {
    winner.setValue(currentPlayer);
    return true;
  }
  if (isBoardFull()) {
    winner=null;
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean hasGameEnded(){
  if (hasThreeSameHorizontalCells() || hasThreeSameVerticalCells() || hasThreeSameDiagonalCells()) {
    winner.setValue(currentPlayer);
    return true;
  }
  if (isBoardFull()) {
    winner.setValue(null);
    return true;
  }
  return false;
}
Program: 171418
Project: 171418
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  if (requestCode == 200 && resultCode == PickerConfig.RESULT_CODE) {
    select=data.getParcelableArrayListExtra(PickerConfig.EXTRA_RESULT);
    for (    Media media : select) {
      Log.i("String_Node_Str",media.path);
    }
  }
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  if (requestCode == 200 && resultCode == PickerConfig.RESULT_CODE) {
    select=data.getParcelableArrayListExtra(PickerConfig.EXTRA_RESULT);
    for (    Media media : select) {
      Log.i("String_Node_Str",media.path);
      Log.e("String_Node_Str","String_Node_Str" + media.size);
    }
  }
}
Program: 171419
Project: 171419
Buggy source:
@Override protected void parse(CommandLine commandLine){
  super.parse(commandLine);
  this.scriptName=commandLine.getOptionValue("String_Node_Str");
  this.scriptId=commandLine.getOptionValue("String_Node_Str");
  this.inputProperties=commandLine.getOptionProperties("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void parse(CommandLine commandLine){
  super.parse(commandLine);
  this.scriptName=commandLine.getOptionValue("String_Node_Str");
  this.scriptId=commandLine.getOptionValue("String_Node_Str");
  this.input=commandLine.getOptionProperties("String_Node_Str");
  if (this.input.isEmpty()) {
    this.input=null;
  }
}
Program: 171420
Project: 171420
Buggy source:
@Override public void execute() throws Exception {
  if (scriptName == null && scriptId == null) {
    log("String_Node_Str");
    return;
  }
  if (scriptName != null && scriptId != null) {
    log("String_Node_Str" + scriptId + "String_Node_Str");
    scriptName=null;
  }
  HttpRequest request=createHttp().newPost(server + "String_Node_Str").headerContentTypeApplicationJson().bodyObject(new StartScriptExecutionCommand().scriptName(scriptName).scriptId(scriptId).input(inputProperties));
  if (!quiet)   log(request.toString("String_Node_Str"));
  HttpResponse response=request.execute();
  if (!quiet)   log(response.toString("String_Node_Str"));
  StartScriptExecutionResponse startResponse=response.getBodyAs(StartScriptExecutionResponse.class);
  if (response.getStatus() == 200) {
    log("String_Node_Str" + startResponse.getScriptExecutionId());
  }
 else {
    log("String_Node_Str" + startResponse.getError());
  }
}

Fixed version (ground truth):
@Override public void execute() throws Exception {
  if (scriptName == null && scriptId == null) {
    log("String_Node_Str");
    return;
  }
  if (scriptName != null && scriptId != null) {
    log("String_Node_Str" + scriptId + "String_Node_Str");
    scriptName=null;
  }
  HttpRequest request=createHttp().newPost(server + "String_Node_Str").headerContentTypeApplicationJson().bodyObject(new StartScriptExecutionCommand().scriptName(scriptName).scriptId(scriptId).input(input));
  if (!quiet)   log(request.toString("String_Node_Str"));
  HttpResponse response=request.execute();
  if (!quiet)   log(response.toString("String_Node_Str"));
  StartScriptExecutionResponse startResponse=response.getBodyAs(StartScriptExecutionResponse.class);
  if (response.getStatus() == 200) {
    log("String_Node_Str" + startResponse.getScriptExecutionId());
  }
 else {
    log("String_Node_Str" + startResponse.getError());
  }
}
Program: 171421
Project: 171421
Buggy source:
@Test public void testDeployOk(){
  EngineDeployScriptResponse deployScriptResponse=newPost("String_Node_Str").bodyObject(new DeployScriptCommand().scriptText("String_Node_Str").scriptName("String_Node_Str")).execute().assertStatusOk().getBodyAs(EngineDeployScriptResponse.class);
  assertNotNull(deployScriptResponse.getId());
  assertEquals((Integer)0,deployScriptResponse.getVersion());
  assertEquals("String_Node_Str",deployScriptResponse.getName());
  assertNull(deployScriptResponse.getErrors());
}

Fixed version (ground truth):
@Test public void testDeployOk(){
  EngineDeployScriptResponse deployScriptResponse=newPost("String_Node_Str").bodyObject(new DeployScriptCommand().scriptText("String_Node_Str").scriptName("String_Node_Str")).execute().assertStatusOk().getBodyAs(EngineDeployScriptResponse.class);
  assertNotNull(deployScriptResponse.getId());
  assertEquals((Integer)1,deployScriptResponse.getVersion());
  assertEquals("String_Node_Str",deployScriptResponse.getName());
  assertNull(deployScriptResponse.getErrors());
}
Program: 171422
Project: 171422
Buggy source:
@Test public void testGetRequest() throws InterruptedException, IOException {
  String scriptId=engine.deployScript("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  String scriptExecutionId=engine.startScriptExecution(scriptId);
  List<EventJson> events=eventStore.findEventsByScriptExecutionId(scriptExecutionId);
  assertNotNull(events);
  assertFalse(events.isEmpty());
  Response httpResponse=events.stream().filter(event -> event instanceof ActionEndedEventJson).map(ActionEndedEventJson.class::cast).map(actionEndedEvent -> actionEndedEvent.result).map(Response.class::cast).findFirst().get();
  assertNotNull(httpResponse);
  assertEquals(HttpURLConnection.HTTP_OK,httpResponse.status);
  assertEquals(MediaType.HTML_UTF_8.toString(),httpResponse.contentType());
  assertTrue(httpResponse.textBody.contains("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testGetRequest() throws InterruptedException, IOException {
  String scriptId=engine.deployScript("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  String scriptExecutionId=engine.startScriptExecution(scriptId);
  List<ExecutionEventJson> events=eventStore.findEventsByScriptExecutionId(scriptExecutionId);
  assertNotNull(events);
  assertFalse(events.isEmpty());
  Response httpResponse=events.stream().filter(event -> event instanceof ActionEndedEventJson).map(ActionEndedEventJson.class::cast).map(actionEndedEvent -> actionEndedEvent.result).map(Response.class::cast).findFirst().get();
  assertNotNull(httpResponse);
  assertEquals(HttpURLConnection.HTTP_OK,httpResponse.status);
  assertEquals(MediaType.HTML_UTF_8.toString(),httpResponse.contentType());
  assertTrue(httpResponse.textBody.contains("String_Node_Str"));
}
Program: 171423
Project: 171423
Buggy source:
@Override public ActionResponse invoke(ArgumentsExpressionExecution argumentsExpressionExecution,List<Object> args){
  String url=null;
  Method method=Method.GET;
  String contentType=null;
  TextRequestBody body=new TextRequestBody(contentType,"String_Node_Str");
  request=new Request(url,method,Collections.emptySet(),body);
  return ActionResponse.endFunction(new Response());
}

Fixed version (ground truth):
@Override public ActionResponse invoke(ArgumentsExpressionExecution argumentsExpressionExecution,List<Object> args){
  URL url=null;
  Method method=Method.GET;
  String contentType=null;
  TextRequestBody body=new TextRequestBody(contentType,"String_Node_Str");
  request=new Request(url,method,Collections.emptySet(),body);
  try {
    HttpURLConnection connection=(HttpURLConnection)url.openConnection();
    return ActionResponse.endFunction(new Response());
  }
 catch (  IOException e) {
    return ActionResponse.endFunction();
  }
}
Program: 171424
Project: 171424
Buggy source:
Request(String url,Method method,Collection<Header> headers,TextRequestBody body){
  this.url=url;
  this.method=method;
  this.headers=headers;
  this.body=body;
}

Fixed version (ground truth):
Request(URL url,Method method,Collection<Header> headers,TextRequestBody body){
  this.url=url;
  this.method=method;
  this.headers=headers;
  this.body=body;
}
Program: 171425
Project: 171425
Buggy source:
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * h + 2,i * w + 2,w - 4,h - 4);
    }
  }
}

Fixed version (ground truth):
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * w + 2,i * h + 2,w - 4,h - 4);
    }
  }
}
Program: 171426
Project: 171426
Buggy source:
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * h + 2,i * w + 2,w - 4,h - 4);
    }
  }
}

Fixed version (ground truth):
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * w + 2,i * h + 2,w - 4,h - 4);
    }
  }
}
Program: 171427
Project: 171427
Buggy source:
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * h + 2,i * w + 2,w - 4,h - 4);
    }
  }
}

Fixed version (ground truth):
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * w + 2,i * h + 2,w - 4,h - 4);
    }
  }
}
Program: 171428
Project: 171428
Buggy source:
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * h + 2,i * w + 2,w - 4,h - 4);
    }
  }
}

Fixed version (ground truth):
@Override public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d=(Graphics2D)g;
  RenderingHints hints=new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
  g2d.addRenderingHints(hints);
  int w=canvasWidth / data.M();
  int h=canvasHeight / data.N();
  Board showBoard=data.getShowBoard();
  for (int i=0; i < showBoard.N(); i++)   for (int j=0; j < showBoard.M(); j++) {
    char c=showBoard.getData(i,j);
    if (c != Board.EMPTY) {
      if (!colorMap.containsKey(c)) {
        int sz=colorMap.size();
        colorMap.put(c,colorList.get(sz));
      }
      Color color=colorMap.get(c);
      AlgoVisHelper.setColor(g2d,color);
      AlgoVisHelper.fillRectangle(g2d,j * w + 2,i * h + 2,w - 4,h - 4);
    }
  }
}