nus-yam/ex-repair huggingface dataset:
Program: 171255
Project: 171255
Buggy source:
public Element saveAsXML(Element parentElement,Document doc){
  Element element=doc.createElement("String_Node_Str");
  parentElement.appendChild(element);
  CharacterUtils.addAttribute(doc,element,"String_Node_Str",this.getColour().toString());
  CharacterUtils.addAttribute(doc,element,"String_Node_Str",String.valueOf(this.isGlow()));
  element.appendChild(doc.createCDATASection(this.getText()));
  Element innerElement=doc.createElement("String_Node_Str");
  element.appendChild(innerElement);
  for (  TattooWritingStyle style : this.getStyles()) {
    Element styleElement=doc.createElement("String_Node_Str");
    innerElement.appendChild(styleElement);
    CharacterUtils.addAttribute(doc,styleElement,"String_Node_Str",style.toString());
  }
  return element;
}

Fixed version (ground truth):
public Element saveAsXML(Element parentElement,Document doc){
  Element element=doc.createElement("String_Node_Str");
  parentElement.appendChild(element);
  CharacterUtils.addAttribute(doc,element,"String_Node_Str",this.getColour().toString());
  CharacterUtils.addAttribute(doc,element,"String_Node_Str",String.valueOf(this.isGlow()));
  element.appendChild(doc.createCDATASection(this.getText().trim()));
  Element innerElement=doc.createElement("String_Node_Str");
  element.appendChild(innerElement);
  for (  TattooWritingStyle style : this.getStyles()) {
    Element styleElement=doc.createElement("String_Node_Str");
    innerElement.appendChild(styleElement);
    CharacterUtils.addAttribute(doc,styleElement,"String_Node_Str",style.toString());
  }
  return element;
}
Program: 171260
Project: 171260
Buggy source:
/** 
 * Will return false if it doesn't support patterns. TODO: Add the check.
 * @return
 */
public boolean canHavePatterns(){
  return this.clothingType.isPatternAvailable();
}

Fixed version (ground truth):
/** 
 * Will return false if it doesn't support patterns. 
 * @return
 */
public boolean canHavePatterns(){
  return this.clothingType.isPatternAvailable();
}
Program: 171264
Project: 171264
Buggy source:
public void openPhone(){
  if (!Main.game.isStarted() || !Main.game.isInNewWorld()) {
    return;
  }
  if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.PHONE)   Main.game.restoreSavedContent();
 else   if (!Main.game.getCurrentDialogueNode().isOptionsDisabled()) {
    if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT)     Main.game.saveDialogueNode();
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",PhoneDialogue.MENU));
  }
}

Fixed version (ground truth):
public void openPhone(){
  if (!Main.game.isStarted() || !Main.game.isInNewWorld()) {
    return;
  }
  if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.PHONE)   Main.game.restoreSavedContent();
 else   if (!Main.game.getCurrentDialogueNode().isOptionsDisabled()) {
    if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT)     Main.game.saveDialogueNode();
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",PhoneDialogue.MENU));
  }
}
Program: 171265
Project: 171265
Buggy source:
/** 
 * For cheat codes. debug: toggle debug mode spawn: open enemy spawn menu
 */
private void checkLastKeys(){
  if (lastKeysEqual(KeyCode.B,KeyCode.U,KeyCode.G,KeyCode.G,KeyCode.Y)) {
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",DebugDialogue.DEBUG_MENU));
  }
  if (lastKeysEqual(KeyCode.N,KeyCode.O,KeyCode.X,KeyCode.X,KeyCode.X)) {
    if (Main.game.getPlayer().getLocationPlace().getPlaceType() == PlaceType.SHOPPING_ARCADE_GENERIC_SHOP && !Main.game.getTestNPC().isSlave()) {
      Main.game.setActiveNPC(Main.game.getTestNPC());
      Main.game.setContent(new Response("String_Node_Str","String_Node_Str",TestNPC.TEST_DIALOGUE){
        @Override public void effects(){
          Main.game.getTestNPC().setLocation(WorldType.SHOPPING_ARCADE,Main.game.getPlayer().getLocation(),true);
        }
      }
);
    }
  }
}

Fixed version (ground truth):
/** 
 * For cheat codes. debug: toggle debug mode spawn: open enemy spawn menu
 */
private void checkLastKeys(){
  if (lastKeysEqual(KeyCode.B,KeyCode.U,KeyCode.G,KeyCode.G,KeyCode.Y)) {
    if (Main.game.isInNewWorld() && Main.game.isPrologueFinished()) {
      Main.game.setContent(new Response("String_Node_Str","String_Node_Str",DebugDialogue.DEBUG_MENU));
    }
 else {
      Main.game.flashMessage(Colour.GENERIC_BAD,"String_Node_Str");
    }
  }
  if (lastKeysEqual(KeyCode.N,KeyCode.O,KeyCode.X,KeyCode.X,KeyCode.X)) {
    if (Main.game.getPlayer().getLocationPlace().getPlaceType() == PlaceType.SHOPPING_ARCADE_GENERIC_SHOP && !Main.game.getTestNPC().isSlave()) {
      Main.game.setActiveNPC(Main.game.getTestNPC());
      Main.game.setContent(new Response("String_Node_Str","String_Node_Str",TestNPC.TEST_DIALOGUE){
        @Override public void effects(){
          Main.game.getTestNPC().setLocation(WorldType.SHOPPING_ARCADE,Main.game.getPlayer().getLocation(),true);
        }
      }
);
    }
  }
}
Program: 171266
Project: 171266
Buggy source:
public void openCharactersPresent(GameCharacter characterViewed){
  if (!Main.game.isStarted()) {
    return;
  }
  if (characterViewed != null && characterViewed != CharactersPresentDialogue.characterViewed) {
    if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
      Main.game.saveDialogueNode();
    }
    CharactersPresentDialogue.resetContent(characterViewed);
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
  }
 else {
    if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.CHARACTERS_PRESENT) {
      Main.game.restoreSavedContent();
    }
 else     if (!Main.game.getCharactersPresent().isEmpty()) {
      if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
        Main.game.saveDialogueNode();
      }
      CharactersPresentDialogue.resetContent(characterViewed);
      Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
    }
  }
}

Fixed version (ground truth):
public void openCharactersPresent(GameCharacter characterViewed){
  if (!Main.game.isStarted()) {
    return;
  }
  if (characterViewed != null && characterViewed != CharactersPresentDialogue.characterViewed) {
    if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
      Main.game.saveDialogueNode();
    }
    CharactersPresentDialogue.resetContent(characterViewed);
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
  }
 else {
    if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.CHARACTERS_PRESENT) {
      Main.game.restoreSavedContent();
    }
 else     if (!Main.game.getCharactersPresent().isEmpty()) {
      if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
        Main.game.saveDialogueNode();
      }
      CharactersPresentDialogue.resetContent(characterViewed);
      Main.game.setContent(new Response("String_Node_Str","String_Node_Str",CharactersPresentDialogue.MENU));
    }
  }
}
Program: 171267
Project: 171267
Buggy source:
public void openOptions(){
  if (!Main.game.isStarted()) {
    return;
  }
  if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.OPTIONS) {
    Main.game.restoreSavedContent();
  }
 else   if (!Main.game.getCurrentDialogueNode().isOptionsDisabled()) {
    if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT || !Main.game.isInNewWorld()) {
      Main.game.saveDialogueNode();
    }
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",OptionsDialogue.MENU));
  }
}

Fixed version (ground truth):
public void openOptions(){
  if (!Main.game.isStarted()) {
    return;
  }
  if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.OPTIONS) {
    Main.game.restoreSavedContent();
  }
 else   if (!Main.game.getCurrentDialogueNode().isOptionsDisabled()) {
    if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT || !Main.game.isInNewWorld()) {
      Main.game.saveDialogueNode();
    }
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",OptionsDialogue.MENU));
  }
}
Program: 171268
Project: 171268
Buggy source:
public boolean isInventoryDisabled(){
  if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.INVENTORY || Main.game.isInCombat() || Main.game.isInSex()) {
    return false;
  }
 else   if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.OPTIONS || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.PHONE) {
    return Main.game.getSavedDialogueNode().isInventoryDisabled();
  }
 else {
    return Main.game.getCurrentDialogueNode().isInventoryDisabled();
  }
}

Fixed version (ground truth):
public boolean isInventoryDisabled(){
  if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.INVENTORY || Main.game.isInCombat() || Main.game.isInSex()) {
    return false;
  }
 else   if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.OPTIONS || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.PHONE) {
    return Main.game.getSavedDialogueNode().isInventoryDisabled();
  }
 else {
    return Main.game.getCurrentDialogueNode().isInventoryDisabled();
  }
}
Program: 171269
Project: 171269
Buggy source:
public void openInventory(NPC npc,InventoryInteraction interaction){
  if (!Main.game.isStarted()) {
    return;
  }
  RenderingEngine.setPageLeft(0);
  RenderingEngine.setPageRight(0);
  InventoryDialogue.setBuyback(false);
  InventoryDialogue.setInventoryNPC(npc);
  InventoryDialogue.setNPCInventoryInteraction(interaction);
  if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.INVENTORY) {
    Main.game.restoreSavedContent();
  }
 else   if (!isInventoryDisabled() || npc != null) {
    if (Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialgoueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
      Main.game.saveDialogueNode();
    }
    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;
  }
  RenderingEngine.setPageLeft(0);
  RenderingEngine.setPageRight(0);
  InventoryDialogue.setBuyback(false);
  InventoryDialogue.setInventoryNPC(npc);
  InventoryDialogue.setNPCInventoryInteraction(interaction);
  if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.INVENTORY) {
    Main.game.restoreSavedContent();
  }
 else   if (!isInventoryDisabled() || npc != null) {
    if (Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.NORMAL || Main.game.getCurrentDialogueNode().getDialogueNodeType() == DialogueNodeType.SLAVERY_MANAGEMENT) {
      Main.game.saveDialogueNode();
    }
    Main.game.setContent(new Response("String_Node_Str","String_Node_Str",InventoryDialogue.INVENTORY_MENU));
  }
}
Program: 171275
Project: 171275
Buggy source:
public boolean addFetish(Fetish fetish){
  if (fetishes.contains(fetish)) {
    return false;
  }
  fetishes.add(fetish);
  if (fetish.getAttributeModifiers() != null) {
    for (    Entry<Attribute,Integer> e : fetish.getAttributeModifiers().entrySet()) {
      incrementBonusAttribute(e.getKey(),e.getValue());
    }
  }
  calculateSpecialAttacks();
  updateAttributeListeners();
  calculateSpecialFetishes();
  return true;
}

Fixed version (ground truth):
public boolean addFetish(Fetish fetish){
  if (fetishes.contains(fetish)) {
    return false;
  }
  fetishes.add(fetish);
  applyFetishGainEffects(fetish);
  return true;
}
Program: 171276
Project: 171276
Buggy source:
private void applyUnequipClothingEffects(AbstractClothing clothing){
  incrementBonusAttribute(Attribute.RESISTANCE_PHYSICAL,-clothing.getClothingType().getPhysicalResistance());
  for (  Entry<Attribute,Integer> e : clothing.getAttributeModifiers().entrySet()) {
    incrementBonusAttribute(e.getKey(),-e.getValue());
  }
  for (  ItemEffect ie : clothing.getEffects()) {
    if (ie.getSecondaryModifier() != null && ie.getSecondaryModifier().getFetish() != null) {
      Fetish associatedFetish=ie.getSecondaryModifier().getFetish();
switch (ie.getPotency()) {
case MINOR_BOOST:
        clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) - 1);
      break;
case BOOST:
    clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) - 2);
  break;
case MAJOR_BOOST:
fetishesFromClothing.remove(associatedFetish);
break;
case MINOR_DRAIN:
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 1);
break;
case DRAIN:
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 2);
break;
case MAJOR_DRAIN:
clothingFetishDesireModifiersMap.putIfAbsent(associatedFetish,0);
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 999);
break;
}
}
}
}

Fixed version (ground truth):
private void applyUnequipClothingEffects(AbstractClothing clothing){
  incrementBonusAttribute(Attribute.RESISTANCE_PHYSICAL,-clothing.getClothingType().getPhysicalResistance());
  for (  Entry<Attribute,Integer> e : clothing.getAttributeModifiers().entrySet()) {
    incrementBonusAttribute(e.getKey(),-e.getValue());
  }
  for (  ItemEffect ie : clothing.getEffects()) {
    if (ie.getSecondaryModifier() != null && ie.getSecondaryModifier().getFetish() != null) {
      Fetish associatedFetish=ie.getSecondaryModifier().getFetish();
switch (ie.getPotency()) {
case MINOR_BOOST:
        clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) - 1);
      break;
case BOOST:
    clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) - 2);
  break;
case MAJOR_BOOST:
fetishesFromClothing.remove(associatedFetish);
applyFetishLossEffects(associatedFetish);
break;
case MINOR_DRAIN:
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 1);
break;
case DRAIN:
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 2);
break;
case MAJOR_DRAIN:
clothingFetishDesireModifiersMap.putIfAbsent(associatedFetish,0);
clothingFetishDesireModifiersMap.put(associatedFetish,clothingFetishDesireModifiersMap.get(associatedFetish) + 999);
break;
}
}
}
}
Program: 171277
Project: 171277
Buggy source:
public boolean removeFetish(Fetish fetish){
  if (!fetishes.contains(fetish)) {
    return false;
  }
  fetishes.remove(fetish);
  if (fetish.getAttributeModifiers() != null) {
    for (    Entry<Attribute,Integer> e : fetish.getAttributeModifiers().entrySet()) {
      incrementBonusAttribute(e.getKey(),-e.getValue());
    }
  }
  calculateSpecialAttacks();
  updateAttributeListeners();
  calculateSpecialFetishes();
  return true;
}

Fixed version (ground truth):
public boolean removeFetish(Fetish fetish){
  if (!fetishes.contains(fetish)) {
    return false;
  }
  fetishes.remove(fetish);
  applyFetishLossEffects(fetish);
  return true;
}
Program: 171288
Project: 171288
Buggy source:
public Covering(Covering coveringToClone){
  this.type=coveringToClone.getType();
  this.pattern=coveringToClone.getPattern();
  this.primaryColour=coveringToClone.getPrimaryColour();
  this.primaryGlowing=coveringToClone.isPrimaryGlowing();
  this.secondaryColour=coveringToClone.getSecondaryColour();
  this.secondaryGlowing=coveringToClone.isSecondaryGlowing();
}

Fixed version (ground truth):
public Covering(Covering coveringToClone){
  this.type=coveringToClone.getType();
  this.pattern=coveringToClone.getPattern();
  this.modifier=coveringToClone.getModifier();
  this.primaryColour=coveringToClone.getPrimaryColour();
  this.primaryGlowing=coveringToClone.isPrimaryGlowing();
  this.secondaryColour=coveringToClone.getSecondaryColour();
  this.secondaryGlowing=coveringToClone.isSecondaryGlowing();
}
Program: 171295
Project: 171295
Buggy source:
public static GameCharacter importCharacterAsSlave(String name){
  File file=new File("String_Node_Str" + name + "String_Node_Str");
  if (file.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(file);
      doc.getDocumentElement().normalize();
      Element characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      if (characterElement == null) {
        characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      }
      SlaveImport importedSlave=new SlaveImport();
      importedSlave=importedSlave.loadFromXML(characterElement,doc);
      importedSlave.applyNewlyImportedSlaveVariables();
      Main.game.addNPC(importedSlave,false);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return null;
}

Fixed version (ground truth):
public static GameCharacter importCharacterAsSlave(String name){
  File file=new File("String_Node_Str" + name + "String_Node_Str");
  if (file.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(file);
      doc.getDocumentElement().normalize();
      Element characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      if (characterElement == null) {
        characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      }
      SlaveImport importedSlave=new SlaveImport();
      importedSlave.loadFromXML(characterElement,doc);
      importedSlave.applyNewlyImportedSlaveVariables();
      Main.game.addNPC(importedSlave,false);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return null;
}
Program: 171299
Project: 171299
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;
  }
  if (variation != 0) {
    int difference=variation - baseSize;
    return (int)(baseSize + difference * Math.random());
  }
 else {
    return baseSize;
  }
}

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;
  }
  if (variation != 0) {
    int difference=variation - baseSize;
    return (int)Math.round(baseSize + difference * Math.random());
  }
 else {
    return baseSize;
  }
}
Program: 171300
Project: 171300
Buggy source:
public GameCharacter getNPCById(String id){
  if (id == null || id.isEmpty()) {
    return null;
  }
  if (id.equals(Main.game.getPlayer().getId())) {
    return Main.game.getPlayer();
  }
  if (!NPCMap.containsKey(id)) {
    System.err.println("String_Node_Str" + id + "String_Node_Str");
    throw new NullPointerException();
  }
  return NPCMap.get(id);
}

Fixed version (ground truth):
public GameCharacter getNPCById(String id){
  if (id == null || id.isEmpty()) {
    return null;
  }
  if (id.equals(Main.game.getPlayer().getId())) {
    return Main.game.getPlayer();
  }
  if (!NPCMap.containsKey(id)) {
    System.err.println("String_Node_Str" + id + "String_Node_Str");
    return null;
  }
  return NPCMap.get(id);
}
Program: 171301
Project: 171301
Buggy source:
public static PlayerCharacter loadCharacterFromXML(File xmlFile,PlayerCharacter importedCharacter){
  characterImportLog=new StringBuilder();
  if (xmlFile.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(xmlFile);
      doc.getDocumentElement().normalize();
      if (doc.getElementsByTagName("String_Node_Str").item(0) == null) {
        importedCharacter=PlayerCharacter.loadFromXML(characterImportLog,((Element)doc.getElementsByTagName("String_Node_Str").item(0)),doc);
      }
 else {
        importedCharacter=PlayerCharacter.loadFromXML(characterImportLog,(Element)((Element)doc.getElementsByTagName("String_Node_Str").item(0)).getElementsByTagName("String_Node_Str").item(0),doc);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return importedCharacter;
}

Fixed version (ground truth):
public static PlayerCharacter loadCharacterFromXML(File xmlFile,PlayerCharacter importedCharacter,CharacterImportSetting... settings){
  characterImportLog=new StringBuilder();
  if (xmlFile.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(xmlFile);
      doc.getDocumentElement().normalize();
      if (doc.getElementsByTagName("String_Node_Str").item(0) == null) {
        importedCharacter=PlayerCharacter.loadFromXML(characterImportLog,((Element)doc.getElementsByTagName("String_Node_Str").item(0)),doc,settings);
      }
 else {
        importedCharacter=PlayerCharacter.loadFromXML(characterImportLog,(Element)((Element)doc.getElementsByTagName("String_Node_Str").item(0)).getElementsByTagName("String_Node_Str").item(0),doc,settings);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return importedCharacter;
}
Program: 171304
Project: 171304
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
}
Program: 171305
Project: 171305
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
  this.setName(new NameTriplet("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
  this.setName(new NameTriplet("String_Node_Str"));
}
Program: 171306
Project: 171306
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
  this.setName(new NameTriplet("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
  this.setName(new NameTriplet("String_Node_Str"));
}
Program: 171308
Project: 171308
Buggy source:
public abstract void loadFromXML(Element parentElement,Document doc);

Fixed version (ground truth):
public abstract void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings);
Program: 171309
Project: 171309
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
}
Program: 171310
Project: 171310
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
}
Program: 171311
Project: 171311
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
}
Program: 171312
Project: 171312
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
  if (!this.getId().endsWith("String_Node_Str")) {
    this.setId(Main.game.getNextNPCId(SlaveImport.class));
  }
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,CharacterImportSetting.NO_PREGNANCY);
  if (!this.getId().endsWith("String_Node_Str")) {
    this.setId(Main.game.getNextNPCId(SlaveImport.class));
  }
}
Program: 171313
Project: 171313
Buggy source:
@Override public void loadFromXML(Element parentElement,Document doc){
  loadNPCVariablesFromXML(this,null,parentElement,doc);
}

Fixed version (ground truth):
@Override public void loadFromXML(Element parentElement,Document doc,CharacterImportSetting... settings){
  loadNPCVariablesFromXML(this,null,parentElement,doc,settings);
}
Program: 171314
Project: 171314
Buggy source:
@Override public List<OrificeType> getPlayerAreasCummedIn(){
  if (Sex.getPenetrationTypeInOrifice(Sex.getActivePartner(),OrificeType.VAGINA_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.VAGINA_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Sex.getActivePartner(),OrificeType.ANUS_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.ANUS_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Sex.getActivePartner(),OrificeType.MOUTH_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.MOUTH_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Sex.getActivePartner(),OrificeType.NIPPLE_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.NIPPLE_PLAYER));
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@Override public List<OrificeType> getPlayerAreasCummedIn(){
  if (Sex.getPenetrationTypeInOrifice(Main.game.getPlayer(),OrificeType.VAGINA_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.VAGINA_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Main.game.getPlayer(),OrificeType.ANUS_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.ANUS_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Main.game.getPlayer(),OrificeType.MOUTH_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.MOUTH_PLAYER));
  }
 else   if (Sex.getPenetrationTypeInOrifice(Main.game.getPlayer(),OrificeType.NIPPLE_PLAYER) == PenetrationType.PENIS_PARTNER) {
    return Util.newArrayListOfValues(new ListValue<>(OrificeType.NIPPLE_PLAYER));
  }
 else {
    return null;
  }
}
Program: 171315
Project: 171315
Buggy source:
@Override public void applyEffects(){
  Sex.setSexManager(new SMChairLilaya(Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_TOP_LILAYA)),Util.newHashMapOfValues(new Value<>(Main.game.getLilaya(),SexPositionSlot.CHAIR_BOTTOM_LILAYA))));
}

Fixed version (ground truth):
@Override public void applyEffects(){
  if (Sex.isDom(Main.game.getPlayer())) {
    Sex.setSexManager(new SMChairLilaya(Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_TOP_LILAYA)),Util.newHashMapOfValues(new Value<>(Main.game.getLilaya(),SexPositionSlot.CHAIR_BOTTOM_LILAYA))));
  }
 else {
    Sex.setSexManager(new SMChairLilaya(Util.newHashMapOfValues(new Value<>(Main.game.getLilaya(),SexPositionSlot.CHAIR_BOTTOM_LILAYA)),Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_TOP_LILAYA))));
  }
}
Program: 171316
Project: 171316
Buggy source:
@Override public void applyEffects(){
  Sex.setSexManager(new SMChair(Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_BOTTOM)),Util.newHashMapOfValues(new Value<>(Sex.getActivePartner(),SexPositionSlot.CHAIR_TOP))));
}

Fixed version (ground truth):
@Override public void applyEffects(){
  if (Sex.isDom(Main.game.getPlayer())) {
    Sex.setSexManager(new SMChair(Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_BOTTOM)),Util.newHashMapOfValues(new Value<>(Sex.getActivePartner(),SexPositionSlot.CHAIR_TOP))));
  }
 else {
    Sex.setSexManager(new SMChair(Util.newHashMapOfValues(new Value<>(Sex.getActivePartner(),SexPositionSlot.CHAIR_TOP)),Util.newHashMapOfValues(new Value<>(Main.game.getPlayer(),SexPositionSlot.CHAIR_BOTTOM))));
  }
}
Program: 171318
Project: 171318
Buggy source:
public String getWeatherImage(){
  if (isDayTime()) {
switch (currentWeather) {
case CLEAR:
      return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayClear();
case CLOUD:
    return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayCloud();
case RAIN:
  return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayRain();
case MAGIC_STORM_GATHERING:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayStormIncoming();
case MAGIC_STORM:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayStorm();
}
}
 else {
switch (currentWeather) {
case CLEAR:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightClear();
case CLOUD:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightCloud();
case RAIN:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightRain();
case MAGIC_STORM_GATHERING:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightStormIncoming();
case MAGIC_STORM:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightStorm();
}
}
return "String_Node_Str";
}

Fixed version (ground truth):
public String getWeatherImage(){
  if (isDayTime()) {
switch (currentWeather) {
case CLEAR:
      return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayClear();
case CLOUD:
    return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayCloud();
case RAIN:
  return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayRain();
case SNOW:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDaySnow();
case MAGIC_STORM_GATHERING:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayStormIncoming();
case MAGIC_STORM:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherDayStorm();
}
}
 else {
switch (currentWeather) {
case CLEAR:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightClear();
case CLOUD:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightCloud();
case RAIN:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightRain();
case SNOW:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightSnow();
case MAGIC_STORM_GATHERING:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightStormIncoming();
case MAGIC_STORM:
return SVGImages.SVG_IMAGE_PROVIDER.getWeatherNightStorm();
}
}
return "String_Node_Str";
}
Program: 171323
Project: 171323
Buggy source:
public static GameCharacter importCharacterAsSlave(String name){
  File file=new File("String_Node_Str" + name + "String_Node_Str");
  if (file.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(file);
      doc.getDocumentElement().normalize();
      Element characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      if (characterElement == null) {
        characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      }
      SlaveImport importedSlave=new SlaveImport();
      importedSlave=importedSlave.loadFromXML(characterElement,doc);
      importedSlave.applyNewlyImportedSlaveVariables();
      Main.game.addNPC(importedSlave,false);
      System.out.println("String_Node_Str");
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return null;
}

Fixed version (ground truth):
public static GameCharacter importCharacterAsSlave(String name){
  File file=new File("String_Node_Str" + name + "String_Node_Str");
  if (file.exists()) {
    try {
      DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
      DocumentBuilder dBuilder=dbFactory.newDocumentBuilder();
      Document doc=dBuilder.parse(file);
      doc.getDocumentElement().normalize();
      Element characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      if (characterElement == null) {
        characterElement=(Element)doc.getElementsByTagName("String_Node_Str").item(0);
      }
      SlaveImport importedSlave=new SlaveImport();
      importedSlave=importedSlave.loadFromXML(characterElement,doc);
      importedSlave.applyNewlyImportedSlaveVariables();
      Main.game.addNPC(importedSlave,false);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return null;
}
Program: 171329
Project: 171329
Buggy source:
public String getPlayerPetName(){
  if (playerPetName.isEmpty()) {
    return Main.game.getPlayer().getName();
  }
 else {
    return playerPetName;
  }
}

Fixed version (ground truth):
public String getPlayerPetName(){
  if (playerPetName.isEmpty()) {
    if (Main.game.getPlayer() == null) {
      return "String_Node_Str";
    }
    return Main.game.getPlayer().getName();
  }
 else {
    return playerPetName;
  }
}
Program: 171331
Project: 171331
Buggy source:
public static String intToString(int integer){
  if (integer >= 0 && integer < 1000) {
    String intToString="String_Node_Str";
    if (integer >= 100) {
      intToString=numbersLessThanTwenty[(integer % 1000) / 100] + "String_Node_Str";
      if (integer % 100 != 0) {
        if (integer % 100 < 20) {
          intToString+="String_Node_Str" + numbersLessThanTwenty[integer % 100];
        }
 else {
          intToString+="String_Node_Str" + tensGreaterThanNineteen[(integer % 100) / 10] + ((integer % 10 != 0) ? "String_Node_Str" + numbersLessThanTwenty[integer % 10] : "String_Node_Str");
        }
      }
    }
 else {
      if (integer % 100 != 0) {
        if (integer % 100 < 20) {
          intToString+=numbersLessThanTwenty[integer % 100];
        }
 else {
          intToString+=tensGreaterThanNineteen[(integer % 100) / 10] + ((integer % 10 != 0) ? "String_Node_Str" + numbersLessThanTwenty[integer % 10] : "String_Node_Str");
        }
      }
    }
    return intToString;
  }
  return String.valueOf(integer);
}

Fixed version (ground truth):
public static String intToString(int integer){
  if (integer >= 0 && integer < 1000) {
    String intToString="String_Node_Str";
    if (integer >= 100) {
      intToString=numbersLessThanTwenty[(integer % 1000) / 100] + "String_Node_Str";
      if (integer % 100 != 0) {
        if (integer % 100 < 20) {
          intToString+="String_Node_Str" + numbersLessThanTwenty[integer % 100];
        }
 else {
          intToString+="String_Node_Str" + tensGreaterThanNineteen[(integer % 100) / 10] + ((integer % 10 != 0) ? "String_Node_Str" + numbersLessThanTwenty[integer % 10] : "String_Node_Str");
        }
      }
    }
 else {
      if (integer % 100 < 20) {
        intToString+=numbersLessThanTwenty[integer % 100];
      }
 else {
        intToString+=tensGreaterThanNineteen[(integer % 100) / 10] + ((integer % 10 != 0) ? "String_Node_Str" + numbersLessThanTwenty[integer % 10] : "String_Node_Str");
      }
    }
    return intToString;
  }
  return String.valueOf(integer);
}
Program: 171335
Project: 171335
Buggy source:
public BodyHair getFacialHair(){
  if (isFeminine()) {
    setFacialHair(BodyHair.ZERO_NONE);
  }
  return body.getFace().getFacialHair();
}

Fixed version (ground truth):
public BodyHair getFacialHair(){
  if (this.getFemininityValue() >= Femininity.ANDROGYNOUS.getMinimumFemininity()) {
    setFacialHair(BodyHair.ZERO_NONE);
  }
  return body.getFace().getFacialHair();
}
Program: 171351
Project: 171351
Buggy source:
public String incrementPubicHair(int increment){
  int value=getPubicHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > 3) {
    value=3;
  }
  return setPubicHair(BodyHair.getBodyHairFromValue(value));
}

Fixed version (ground truth):
public String incrementPubicHair(int increment){
  int value=getPubicHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > BodyHair.SEVEN_WILD.getValue()) {
    value=BodyHair.SEVEN_WILD.getValue();
  }
  return setPubicHair(BodyHair.getBodyHairFromValue(value));
}
Program: 171352
Project: 171352
Buggy source:
public String incrementFacialHair(int increment){
  int value=getFacialHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > 3) {
    value=3;
  }
  return body.getFace().setFacialHair(this,BodyHair.getBodyHairFromValue(value));
}

Fixed version (ground truth):
public String incrementFacialHair(int increment){
  int value=getFacialHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > BodyHair.SEVEN_WILD.getValue()) {
    value=BodyHair.SEVEN_WILD.getValue();
  }
  return body.getFace().setFacialHair(this,BodyHair.getBodyHairFromValue(value));
}
Program: 171353
Project: 171353
Buggy source:
public boolean isWearingCondom(){
  return this.getClothingInSlot(ClothingType.PENIS_CONDOM.getSlot()) != null && this.getClothingInSlot(ClothingType.PENIS_CONDOM.getSlot()).getClothingType() == ClothingType.PENIS_CONDOM;
}

Fixed version (ground truth):
public boolean isWearingCondom(){
  return this.getClothingInSlot(ClothingType.PENIS_CONDOM.getSlot()) != null && this.getClothingInSlot(ClothingType.PENIS_CONDOM.getSlot()).getClothingType().equals(ClothingType.PENIS_CONDOM);
}
Program: 171354
Project: 171354
Buggy source:
public String incrementUnderarmHair(int increment){
  int value=getUnderarmHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > 3) {
    value=3;
  }
  return body.getArm().setUnderarmHair(this,BodyHair.getBodyHairFromValue(value));
}

Fixed version (ground truth):
public String incrementUnderarmHair(int increment){
  int value=getUnderarmHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > BodyHair.SEVEN_WILD.getValue()) {
    value=BodyHair.SEVEN_WILD.getValue();
  }
  return body.getArm().setUnderarmHair(this,BodyHair.getBodyHairFromValue(value));
}
Program: 171355
Project: 171355
Buggy source:
public String incrementAssHair(int increment){
  int value=getAssHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > 3) {
    value=3;
  }
  return body.getAss().getAnus().setAssHair(this,BodyHair.getBodyHairFromValue(value));
}

Fixed version (ground truth):
public String incrementAssHair(int increment){
  int value=getAssHair().getValue() + increment;
  if (value < 0) {
    value=0;
  }
 else   if (value > BodyHair.SEVEN_WILD.getValue()) {
    value=BodyHair.SEVEN_WILD.getValue();
  }
  return body.getAss().getAnus().setAssHair(this,BodyHair.getBodyHairFromValue(value));
}
Program: 171357
Project: 171357
Buggy source:
/** 
 * Uses the specified item on the specified target. If the item returns true on isConsumedOnUse() call, this item is removed from the character's inventory.
 * @param removingFromFloor true if an instance of this item should be consumed from the floor of the area the character is currently in. If item isConsumedOnUse() returns false, an item will not be removed from the floor.
 * @return Description of what happened.
 */
public String useItem(AbstractItem item,GameCharacter target,boolean removingFromFloor,boolean onlyReturnEffects){
  if (ItemType.allItems.contains(item.getItemType()) && isPlayer()) {
    if (Main.getProperties().addItemDiscovered(item.getItemType())) {
      Main.game.getTextEndStringBuilder().append("String_Node_Str" + "String_Node_Str" + Colour.GENERIC_EXCELLENT.toWebHexString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ item.getRarity().getColour().toWebHexString()+ "String_Node_Str"+ Util.capitaliseSentence(item.getName())+ "String_Node_Str"+ "String_Node_Str");
    }
  }
  if (item.getItemType().isConsumedOnUse()) {
    if (removingFromFloor)     Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getInventory().removeItem(item);
 else     removeItem(item);
  }
  if (onlyReturnEffects) {
    return item.applyEffect(this,target);
  }
 else {
    return item.getUseDescription(this,target) + item.applyEffect(this,target);
  }
}

Fixed version (ground truth):
/** 
 * Uses the specified item on the specified target. If the item returns true on isConsumedOnUse() call, this item is removed from the character's inventory.
 * @param removingFromFloor true if an instance of this item should be consumed from the floor of the area the character is currently in. If item isConsumedOnUse() returns false, an item will not be removed from the floor.
 * @return Description of what happened.
 */
public String useItem(AbstractItem item,GameCharacter target,boolean removingFromFloor,boolean onlyReturnEffects){
  if (ItemType.allItems.contains(item.getItemType()) && isPlayer()) {
    if (Main.getProperties().addItemDiscovered(item.getItemType())) {
      Main.game.getTextEndStringBuilder().append("String_Node_Str" + "String_Node_Str" + Colour.GENERIC_EXCELLENT.toWebHexString() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ item.getRarity().getColour().toWebHexString()+ "String_Node_Str"+ Util.capitaliseSentence(item.getItemType().getName(false))+ "String_Node_Str"+ "String_Node_Str");
    }
  }
  if (item.getItemType().isConsumedOnUse()) {
    if (removingFromFloor)     Main.game.getActiveWorld().getCell(Main.game.getPlayer().getLocation()).getInventory().removeItem(item);
 else     removeItem(item);
  }
  if (onlyReturnEffects) {
    return item.applyEffect(this,target);
  }
 else {
    return item.getUseDescription(this,target) + item.applyEffect(this,target);
  }
}
Program: 171360
Project: 171360
Buggy source:
public Ralph(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str",10,Gender.MALE,RacialBody.HORSE_MORPH,RaceStage.LESSER,new CharacterInventory(10),WorldType.SHOPPING_ARCADE,ShoppingArcade.RALPHS_SHOP_ITEMS,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_HORSE_MORPH,Colour.EYE_BROWN));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_HORSE_HAIR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HORSE_HAIR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HUMAN,Colour.SKIN_EBONY),true);
  this.equipClothingFromNowhere(underwear,true,this);
  this.equipClothingFromNowhere(legs,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(socks,true,this);
  this.equipClothingFromNowhere(shoes,true,this);
  this.addFetish(Fetish.FETISH_IMPREGNATION);
  for (int i=0; i < 5; i++)   this.addItem(AbstractItemType.generateItem(ItemType.DYE_BRUSH),false);
  for (  AbstractItemType item : itemsForSale) {
    for (int i=0; i < (Util.random.nextInt(5) + 1); i++) {
      this.addItem(AbstractItemType.generateItem(item),false);
    }
  }
}

Fixed version (ground truth):
public Ralph(){
  super(new NameTriplet("String_Node_Str"),"String_Node_Str",10,Gender.MALE,RacialBody.HORSE_MORPH,RaceStage.LESSER,new CharacterInventory(10),WorldType.SHOPPING_ARCADE,ShoppingArcade.RALPHS_SHOP_ITEMS,true);
  this.setSexualOrientation(SexualOrientation.AMBIPHILIC);
  this.setEyeCovering(new Covering(BodyCoveringType.EYE_HORSE_MORPH,Colour.EYE_BROWN));
  this.setHairCovering(new Covering(BodyCoveringType.HAIR_HORSE_HAIR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HORSE_HAIR,Colour.COVERING_BLACK),true);
  this.setSkinCovering(new Covering(BodyCoveringType.HUMAN,Colour.SKIN_EBONY),true);
  this.equipClothingFromNowhere(underwear,true,this);
  this.equipClothingFromNowhere(legs,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(shoes,true,this);
  this.addFetish(Fetish.FETISH_IMPREGNATION);
  for (int i=0; i < 5; i++)   this.addItem(AbstractItemType.generateItem(ItemType.DYE_BRUSH),false);
  for (  AbstractItemType item : itemsForSale) {
    for (int i=0; i < (Util.random.nextInt(5) + 1); i++) {
      this.addItem(AbstractItemType.generateItem(item),false);
    }
  }
}
Program: 171361
Project: 171361
Buggy source:
@Override public void applyReset(){
  resetInventory();
  this.setMoney(10);
  this.equipClothingFromNowhere(underwear,true,this);
  this.equipClothingFromNowhere(legs,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(socks,true,this);
  this.equipClothingFromNowhere(shoes,true,this);
  for (int i=0; i < 5; i++)   this.addItem(AbstractItemType.generateItem(ItemType.DYE_BRUSH),false);
  for (  AbstractItemType item : itemsForSale) {
    for (int i=0; i < (Util.random.nextInt(5) + 1); i++)     this.addItem(AbstractItemType.generateItem(item),false);
  }
}

Fixed version (ground truth):
@Override public void applyReset(){
  resetInventory();
  this.setMoney(10);
  this.equipClothingFromNowhere(underwear,true,this);
  this.equipClothingFromNowhere(legs,true,this);
  this.equipClothingFromNowhere(torso,true,this);
  this.equipClothingFromNowhere(shoes,true,this);
  for (int i=0; i < 5; i++)   this.addItem(AbstractItemType.generateItem(ItemType.DYE_BRUSH),false);
  for (  AbstractItemType item : itemsForSale) {
    for (int i=0; i < (Util.random.nextInt(5) + 1); i++)     this.addItem(AbstractItemType.generateItem(item),false);
  }
}