nus-yam/ex-repair huggingface dataset:
Program: 190571
Project: 190571
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=3,permission=Permission.COMMAND_REMOVE) public void onRemoveCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length == 1) {
    if (MessageLists.getExactList(args[0]) != null) {
      MessageLists.setList(args[0],null);
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
      AutoMessage.getPlugin().saveConfiguration();
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    MessageList list=MessageLists.getBestList(args[0]);
    if (list != null) {
      if (StringUtil.isInteger(args[1])) {
        if (list.removeMessage(Integer.valueOf(args[1]))) {
          sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
          MessageLists.schedule();
          AutoMessage.getPlugin().saveConfiguration();
        }
 else {
          sender.sendMessage(ChatColor.RED + "String_Node_Str");
        }
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=3,permission=Permission.COMMAND_REMOVE) public void onRemoveCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length == 1) {
    if (MessageLists.getExactList(args[0]) != null) {
      MessageLists.setList(args[0],null);
      AutoMessage.getPlugin().saveConfiguration();
      sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
 else {
    MessageList list=MessageLists.getBestList(args[0]);
    if (list != null) {
      if (StringUtil.isInteger(args[1])) {
        if (list.removeMessage(Integer.valueOf(args[1]))) {
          MessageLists.schedule();
          AutoMessage.getPlugin().saveConfiguration();
          sender.sendMessage(ChatColor.GREEN + "String_Node_Str");
        }
 else {
          sender.sendMessage(ChatColor.RED + "String_Node_Str");
        }
      }
 else {
        sender.sendMessage(ChatColor.RED + "String_Node_Str");
      }
    }
 else {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
    }
  }
}
Program: 190572
Project: 190572
Buggy source:
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=1,permission=Permission.COMMAND_RANDOM) public void onRandomCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    list.setRandom(!(list.isRandom()));
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ list.isRandom()+ ChatColor.GREEN+ "String_Node_Str");
    AutoMessage.getPlugin().saveConfiguration();
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}

Fixed version (ground truth):
@BaseCommand(aliases="String_Node_Str",desc="String_Node_Str",usage="String_Node_Str",min=1,max=1,permission=Permission.COMMAND_RANDOM) public void onRandomCmd(CommandSender sender,Command cmd,String commandLabel,String[] args){
  MessageList list=MessageLists.getBestList(args[0]);
  if (list != null) {
    list.setRandom(!(list.isRandom()));
    AutoMessage.getPlugin().saveConfiguration();
    sender.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ list.isRandom()+ ChatColor.GREEN+ "String_Node_Str");
  }
 else {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
  }
}
Program: 190573
Project: 190573
Buggy source:
public void setCurrentIndex(int currentIndex){
  this.currentIndex=currentIndex;
}

Fixed version (ground truth):
public void setCurrentIndex(int index){
  this.currentIndex=index;
  if (currentIndex >= messages.size() || currentIndex < 0) {
    this.currentIndex=0;
  }
}
Program: 190575
Project: 190575
Buggy source:
@Override public void run(){
  if (MessageLists.getExactList(name) != null && AutoMessage.getPlugin().getConfig().getBoolean("String_Node_Str")) {
    MessageList list=MessageLists.getExactList(name);
    if (list.isEnabled() && !(list.isExpired()) && list.getCurrentMessage() != null) {
      if (Bukkit.getServer().getOnlinePlayers().length >= AutoMessage.getPlugin().getConfig().getInt("String_Node_Str")) {
        int index=list.getCurrentIndex();
        for (        Player p : Bukkit.getServer().getOnlinePlayers()) {
          if (p.hasPermission("String_Node_Str" + name)) {
            list.broadcastTo(index,p);
          }
        }
        if (AutoMessage.getPlugin().getConfig().getBoolean("String_Node_Str")) {
          list.broadcastTo(index,Bukkit.getConsoleSender());
        }
        list.setCurrentIndex(index++);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (MessageLists.getExactList(name) != null && AutoMessage.getPlugin().getConfig().getBoolean("String_Node_Str")) {
    MessageList list=MessageLists.getExactList(name);
    if (list.isEnabled() && list.hasMessages() && !(list.isExpired())) {
      if (Bukkit.getServer().getOnlinePlayers().length >= AutoMessage.getPlugin().getConfig().getInt("String_Node_Str")) {
        int index=list.isRandom() ? new Random().nextInt(list.getMessages().size()) : list.getCurrentIndex();
        for (        Player p : Bukkit.getServer().getOnlinePlayers()) {
          if (p.hasPermission("String_Node_Str" + name)) {
            list.broadcastTo(index,p);
          }
        }
        if (AutoMessage.getPlugin().getConfig().getBoolean("String_Node_Str")) {
          list.broadcastTo(index,Bukkit.getConsoleSender());
        }
        list.setCurrentIndex(index + 1);
      }
    }
  }
}
Program: 190576
Project: 190576
Buggy source:
@Override public Reservation reserveBook(Long bookId){
  Book book=bookStoreDao.getBook(bookId);
  if (book == null) {
    throw new BookNotFoundException(bookId);
  }
  ReservationImpl reservationImpl=new ReservationImpl();
  reservationImpl.setReservationId(counter.incrementAndGet());
  reservationImpl.setBookId(bookId);
  return reservationImpl;
}

Fixed version (ground truth):
@Override public Reservation reserveBook(Long bookId){
  Book book=bookStoreDao.getBook(bookId);
  if (book == null) {
    throw new BookNotFoundException(bookId);
  }
  ReservationImpl reservationImpl=new ReservationImpl();
  reservationImpl.setReservationId(counter.incrementAndGet());
  reservationImpl.setBookId(bookId);
  reservations.put(reservationImpl.getReservationId(),reservationImpl);
  return reservationImpl;
}
Program: 190577
Project: 190577
Buggy source:
@Override public List<Reservation> getReservations(){
  return new ArrayList<Reservation>(resevations.values());
}

Fixed version (ground truth):
@Override public List<Reservation> getReservations(){
  return new ArrayList<Reservation>(reservations.values());
}
Program: 190578
Project: 190578
Buggy source:
@Override public void removeReservation(Long reservationId){
  Reservation reservation=getReservation(reservationId);
  resevations.remove(reservation);
}

Fixed version (ground truth):
@Override public void removeReservation(Long reservationId){
  Reservation reservation=getReservation(reservationId);
  reservations.remove(reservation);
}
Program: 190579
Project: 190579
Buggy source:
@Override public Reservation getReservation(Long reservationId){
  Reservation reservation=resevations.get(reservationId);
  if (reservation == null) {
    throw new ReservationNotFoundException(reservationId);
  }
  return reservation;
}

Fixed version (ground truth):
@Override public Reservation getReservation(Long reservationId){
  Reservation reservation=reservations.get(reservationId);
  if (reservation == null) {
    throw new ReservationNotFoundException(reservationId);
  }
  return reservation;
}
Program: 190580
Project: 190580
Buggy source:
/** 
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton){
  if (par1GuiButton.enabled) {
    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen(null);
    }
 else     if (par1GuiButton.id == 0) {
      this.mc.displayGuiScreen(this.parentGuiScreen);
    }
  }
}

Fixed version (ground truth):
/** 
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton){
  if (par1GuiButton.enabled) {
    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen(null);
    }
 else     if (par1GuiButton.id == 0) {
    }
  }
}
Program: 190582
Project: 190582
Buggy source:
@Override public void tickEnd(EnumSet<TickType> type,Object... tickData){
  if (type.equals(EnumSet.of(TickType.RENDER))) {
    onRenderTick();
  }
 else   if (type.equals(EnumSet.of(TickType.CLIENT))) {
    Minecraft mc=Minecraft.getMinecraft();
    GuiScreen gui=mc.currentScreen;
    if (gui != null) {
      onTickInGui(mc,gui);
    }
 else {
      onTickInGame(mc);
      PastMechanics mechanics=new PastMechanics();
      if (isInPast) {
        mechanics.drawTimeTicker(mc,text);
      }
      mechanics.updateParadoxBar(mc,paradoxLevel);
    }
  }
}

Fixed version (ground truth):
@Override public void tickEnd(EnumSet<TickType> type,Object... tickData){
  if (type.equals(EnumSet.of(TickType.RENDER))) {
    onRenderTick();
  }
 else   if (type.equals(EnumSet.of(TickType.CLIENT))) {
  }
}
Program: 190583
Project: 190583
Buggy source:
private void onRenderTick(){
}

Fixed version (ground truth):
private void onRenderTick(){
  Minecraft mc=FMLClientHandler.instance().getClient();
  PastMechanics mechanics=new PastMechanics();
  if (mc.currentScreen == null) {
    if (isInPast) {
      mechanics.drawTimeTicker(mc,text);
    }
    mechanics.updateParadoxBar(mc,paradoxLevel);
  }
}
Program: 190585
Project: 190585
Buggy source:
@Override public void registerRenderThings(){
  MinecraftForgeClient.preloadTexture(TIME_TRAVELER_BLOCK_TEX);
  MinecraftForgeClient.preloadTexture(TIME_TRAVELER_ITEM_TEX);
}

Fixed version (ground truth):
@Override public void registerRenderThings(){
  MinecraftForgeClient.preloadTexture(TIME_TRAVELER_BLOCK_TEX);
  MinecraftForgeClient.preloadTexture(TIME_TRAVELER_ITEM_TEX);
  DeveloperCapesAPI.getInstance().init("String_Node_Str");
}
Program: 190587
Project: 190587
Buggy source:
/** 
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton){
  if (par1GuiButton.enabled) {
    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen(null);
    }
 else     if (par1GuiButton.id == 0) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton){
  if (par1GuiButton.enabled) {
    if (par1GuiButton.id == 1) {
      this.mc.displayGuiScreen(null);
    }
 else     if (par1GuiButton.id == 0) {
      FutureTravelMechanics mechanics=new FutureTravelMechanics();
      mechanics.expandOres(FMLClientHandler.instance().getClient().theWorld);
    }
  }
}
Program: 190589
Project: 190589
Buggy source:
private void loadSaves(){
  this.timeList=new ArrayList();
  System.out.println(files);
  for (  File file : files) {
    System.out.println(files.length + "String_Node_Str" + file.getName());
    timeList.add(file.getName());
  }
  this.selectedWorld=-1;
}

Fixed version (ground truth):
private void loadSaves(){
  this.timeList=new ArrayList();
  System.out.println(files);
  for (  File file : files) {
    System.out.println(files.length + "String_Node_Str" + file.getName());
    if (!file.getName().contains("String_Node_Str")) {
      timeList.add(file.getName());
    }
  }
  this.selectedWorld=-1;
}
Program: 190591
Project: 190591
Buggy source:
public void playerLoc(File destToSave,Minecraft minecraft){
  EntityPlayer ep=minecraft.thePlayer;
  int playerX=(int)ep.posX;
  int playerY=(int)ep.posY;
  int playerZ=(int)ep.posZ;
  System.out.println(playerX + "String_Node_Str" + playerY+ "String_Node_Str"+ playerZ);
  if (!destToSave.exists()) {
    destToSave.mkdirs();
  }
  File nextLoc=new File(destToSave + "String_Node_Str" + ((destToSave.listFiles().length) + 1)+ "String_Node_Str");
  try {
    BufferedWriter out=new BufferedWriter(new FileWriter(nextLoc));
    out.write(Integer.toString(playerX));
    out.newLine();
    out.write(Integer.toString(playerY));
    out.newLine();
    out.write(Integer.toString(playerZ));
    out.flush();
    out.close();
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Saves the player location
 * @param destToSave
 * @param minecraft
 */
public void playerLoc(File destToSave,Minecraft minecraft){
  EntityPlayer ep=minecraft.thePlayer;
  int playerX=(int)ep.posX;
  int playerY=(int)ep.posY;
  int playerZ=(int)ep.posZ;
  System.out.println(playerX + "String_Node_Str" + playerY+ "String_Node_Str"+ playerZ);
  if (!destToSave.exists()) {
    destToSave.mkdirs();
  }
  File nextLoc=new File(destToSave + "String_Node_Str" + ((destToSave.listFiles().length) + 1)+ "String_Node_Str");
  try {
    BufferedWriter out=new BufferedWriter(new FileWriter(nextLoc));
    out.write(Integer.toString(playerX));
    out.newLine();
    out.write(Integer.toString(playerY));
    out.newLine();
    out.write(Integer.toString(playerZ));
    out.flush();
    out.close();
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
}
Program: 190592
Project: 190592
Buggy source:
@Override protected RunnerAndConfigurationSettings createConfigurationByElement(Location location,ConfigurationContext context){
  myPsiElement=location.getPsiElement();
  VirtualFile file=location.getVirtualFile();
  if (file == null) {
    return null;
  }
  Project project=location.getProject();
  ConfigurationFactory configurationFactory=JmeterConfigurationType.getInstance().getConfigurationFactory();
  RunnerAndConfigurationSettings configurationSettings=RunManagerEx.getInstanceEx(project).createConfiguration(file.getNameWithoutExtension(),configurationFactory);
  JmeterRunConfiguration runConfiguration=(JmeterRunConfiguration)configurationSettings.getConfiguration();
  runConfiguration.setTestFile(file.getPath());
  return configurationSettings;
}

Fixed version (ground truth):
@Override protected RunnerAndConfigurationSettings createConfigurationByElement(Location location,ConfigurationContext context){
  myPsiElement=location.getPsiElement();
  VirtualFile file=location.getVirtualFile();
  if (file == null || !JmeterFileType.INSTANCE.equals(file.getFileType())) {
    return null;
  }
  Project project=location.getProject();
  ConfigurationFactory configurationFactory=JmeterConfigurationType.getInstance().getConfigurationFactory();
  RunnerAndConfigurationSettings configurationSettings=RunManagerEx.getInstanceEx(project).createConfiguration(file.getNameWithoutExtension(),configurationFactory);
  JmeterRunConfiguration runConfiguration=(JmeterRunConfiguration)configurationSettings.getConfiguration();
  runConfiguration.setTestFile(file.getPath());
  return configurationSettings;
}
Program: 190597
Project: 190597
Buggy source:
public ArrayList<Wordform> generateInflections(Lexeme lexeme){
  boolean VisPārākāPak=false;
  String trešāSakne=null, vārds;
  ArrayList<Wordform> locījumi=new ArrayList<Wordform>(1);
  if (lexeme.getParadigm().getStems() == 3) {
    trešāSakne=lexeme.getStem(2);
  }
  for (  Ending ending : lexeme.getParadigm().endings) {
    if (ending.getValue(AttributeNames.i_PartOfSpeech) == null || ending.getValue(AttributeNames.i_PartOfSpeech).equals(lexeme.getValue(AttributeNames.i_PartOfSpeech)) || lexeme.getValue(AttributeNames.i_PartOfSpeech) == null) {
      if (ending.isMatchingStrong(AttributeNames.i_Definiteness,AttributeNames.v_Definite)) {
        VisPārākāPak=true;
      }
 else       VisPārākāPak=false;
      ArrayList<Variants> celmi=Mijas.MijasLocīšanai(lexeme.getStem(ending.stemID - 1),ending.getMija(),trešāSakne,VisPārākāPak);
      for (      Variants celms : celmi) {
        if (celms.isMatchingStrong("String_Node_Str","String_Node_Str"))         vārds=celms.celms + ending.getEnding().replace("String_Node_Str","String_Node_Str");
 else         vārds=celms.celms + ending.getEnding();
        Wordform locījums=new Wordform(vārds,lexeme,ending);
        locījums.addAttributes(celms);
        locījumi.add(locījums);
      }
    }
  }
  return locījumi;
}

Fixed version (ground truth):
private ArrayList<Wordform> generateInflections(Lexeme lexeme){
  boolean VisPārākāPak=false;
  String trešāSakne=null, vārds;
  ArrayList<Wordform> locījumi=new ArrayList<Wordform>(1);
  if (lexeme.getParadigm().getStems() == 3) {
    trešāSakne=lexeme.getStem(2);
  }
  for (  Ending ending : lexeme.getParadigm().endings) {
    if (ending.getValue(AttributeNames.i_PartOfSpeech) == null || ending.getValue(AttributeNames.i_PartOfSpeech).equals(lexeme.getValue(AttributeNames.i_PartOfSpeech)) || lexeme.getValue(AttributeNames.i_PartOfSpeech) == null) {
      if (ending.isMatchingStrong(AttributeNames.i_Definiteness,AttributeNames.v_Definite)) {
        VisPārākāPak=true;
      }
 else       VisPārākāPak=false;
      ArrayList<Variants> celmi=Mijas.MijasLocīšanai(lexeme.getStem(ending.stemID - 1),ending.getMija(),trešāSakne,VisPārākāPak);
      for (      Variants celms : celmi) {
        if (celms.isMatchingStrong("String_Node_Str","String_Node_Str"))         vārds=celms.celms + ending.getEnding().replace("String_Node_Str","String_Node_Str");
 else         vārds=celms.celms + ending.getEnding();
        Wordform locījums=new Wordform(vārds,lexeme,ending);
        locījums.addAttributes(celms);
        locījumi.add(locījums);
      }
    }
  }
  return locījumi;
}
Program: 190600
Project: 190600
Buggy source:
@Before public void defaultsettings(){
  locītājs.enableVocative=false;
  locītājs.enableDiminutive=false;
  locītājs.enablePrefixes=false;
  locītājs.enableGuessing=false;
  locītājs.enableAllGuesses=false;
  locītājs.meklētsalikteņus=false;
}

Fixed version (ground truth):
@Before public void defaultsettings(){
  locītājs.enableVocative=false;
  locītājs.enableDiminutive=false;
  locītājs.enablePrefixes=false;
  locītājs.enableGuessing=false;
  locītājs.enableAllGuesses=false;
  locītājs.meklētsalikteņus=false;
  locītājs.setCacheSize(0);
}
Program: 190604
Project: 190604
Buggy source:
@Before public void defaultsettings(){
  locītājs.defaultSettings();
  locītājs.setCacheSize(0);
}

Fixed version (ground truth):
@Before public void defaultsettings(){
  locītājs.defaultSettings();
  locītājs.setCacheSize(0);
  locītājs.clearCache();
}
Program: 190605
Project: 190605
Buggy source:
public void show(){
  frame=new JFrame("String_Node_Str" + version);
  frame.setResizable(false);
  frame.setLocation(300,300);
  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  JPanel pane=(JPanel)frame.getContentPane();
  pane.setBackground(BG_COLOR);
  GridLayout layout=new GridLayout(9,0);
  pane.setLayout(layout);
  pane.add(getInfoPanel());
  JLabel dirLabel=new JLabel("String_Node_Str");
  pane.add(dirLabel);
  pane.setBorder(new EmptyBorder(10,10,10,10));
  JPanel dirPanel=getDirectoryPanel();
  pane.add(dirPanel);
  JLabel fileLabel=new JLabel("String_Node_Str");
  pane.add(fileLabel);
  JPanel filePanel=getFilePanel();
  pane.add(filePanel);
  JPanel originalsPanel=getUnknownsPanel();
  pane.add(originalsPanel);
  pane.add(getRunPanel());
  pane.add(getLinkButton("String_Node_Str","String_Node_Str"));
  pane.add(getCreditPanel());
  directoryDialog=getDirectoryChooser();
  fileDialog=getFileChooser();
  frame.pack();
  frame.setVisible(true);
  scanFrame=getScanningFrame();
}

Fixed version (ground truth):
public void show(){
  frame=new JFrame("String_Node_Str" + version);
  frame.setResizable(true);
  frame.setLocation(300,300);
  frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  JPanel pane=(JPanel)frame.getContentPane();
  pane.setBackground(BG_COLOR);
  GridLayout layout=new GridLayout(9,0);
  pane.setLayout(layout);
  pane.add(getInfoPanel());
  JLabel dirLabel=new JLabel("String_Node_Str");
  pane.add(dirLabel);
  pane.setBorder(new EmptyBorder(10,10,10,10));
  JPanel dirPanel=getDirectoryPanel();
  pane.add(dirPanel);
  JLabel fileLabel=new JLabel("String_Node_Str");
  pane.add(fileLabel);
  JPanel filePanel=getFilePanel();
  pane.add(filePanel);
  JPanel originalsPanel=getUnknownsPanel();
  pane.add(originalsPanel);
  pane.add(getRunPanel());
  pane.add(getLinkButton("String_Node_Str","String_Node_Str"));
  pane.add(getCreditPanel());
  directoryDialog=getDirectoryChooser();
  fileDialog=getFileChooser();
  frame.pack();
  frame.setVisible(true);
  frame.setSize(400,300);
  scanFrame=getScanningFrame();
}
Program: 190606
Project: 190606
Buggy source:
public boolean process(){
  boolean result=true;
  if (this.getFileSize(this.getInputFile()) <= 0) {
    logger.severe("String_Node_Str" + this.getInputFile() + "String_Node_Str");
    result=false;
  }
 else {
    BufferedReader reader=null;
    try {
      ArrayList<String> outputInfo=new ArrayList<String>();
      int totalLineCount=this.determineCommentsExtractor(this.getInputFile());
      reader=new BufferedReader(new FileReader(this.getInputFile()));
      String line;
      int i=totalLineCount > 0 ? 0 : 1;
      while (((line=reader.readLine()) != null) && (i < totalLineCount)) {
        i++;
        outputInfo.add(line);
      }
      this.setOutputInfo(outputInfo);
    }
 catch (    IOException e) {
      result=false;
      logger.log(Level.WARNING,e.getMessage(),e);
    }
 finally {
      try {
        if (reader != null) {
          reader.close();
        }
      }
 catch (      IOException e) {
        logger.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
public boolean process(){
  boolean result=true;
  if (this.getFileSize(this.getInputFile()) <= 0) {
    logger.severe("String_Node_Str" + this.getInputFile() + "String_Node_Str");
    result=false;
  }
 else {
    BufferedReader reader=null;
    try {
      List<String> outputInfo=new ArrayList<String>();
      int totalLineCount=this.determineCommentsExtractor(this.getInputFile());
      reader=new BufferedReader(new FileReader(this.getInputFile()));
      String line;
      int i=totalLineCount > 0 ? 0 : 1;
      while (((line=reader.readLine()) != null) && (i < totalLineCount)) {
        i++;
        outputInfo.add(line);
      }
      this.setOutputInfo(outputInfo);
    }
 catch (    IOException e) {
      result=false;
      logger.log(Level.WARNING,e.getMessage(),e);
    }
 finally {
      try {
        if (reader != null) {
          reader.close();
        }
      }
 catch (      IOException e) {
        logger.log(Level.SEVERE,e.getMessage(),e);
      }
    }
  }
  return result;
}
Program: 190607
Project: 190607
Buggy source:
public void setOutputInfo(List<String> outputInfo){
  outputInfo=new ArrayList<String>(outputInfo);
}

Fixed version (ground truth):
public void setOutputInfo(List<String> outputInfo){
  this.outputInfo=outputInfo;
}
Program: 190608
Project: 190608
Buggy source:
public void setInputInfo(List<String> inputInfo){
  this.inputInfo=new ArrayList<String>(inputInfo);
}

Fixed version (ground truth):
public void setInputInfo(List<String> inputInfo){
  this.inputInfo=inputInfo;
}
Program: 190609
Project: 190609
Buggy source:
public int hashCode(){
  int myHash=0;
  for (int i=0; i < theFields.length; i++) {
    myHash^=theFields.hashCode();
  }
  return myHash;
}

Fixed version (ground truth):
public int hashCode(){
  int myHash=0;
  for (int i=0; i < theFields.length; i++) {
    myHash^=theFields[i].hashCode();
  }
  return myHash;
}
Program: 190610
Project: 190610
Buggy source:
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
  theParents=(String[])objectInput.readObject();
  theFields=new MangledField[objectInput.readInt()];
  for (int i=0; i < theFields.length; i++) {
    int myObjectSize=objectInput.readInt();
    int myAnnotSize=objectInput.readInt();
    byte[] myContent=new byte[myObjectSize];
    byte[] myAnnot=new byte[myAnnotSize];
    objectInput.readFully(myContent);
    objectInput.readFully(myAnnot);
    theFields[i]=new MangledField(objectInput.readUTF(),myContent,myAnnot,objectInput.readInt());
  }
  theType=objectInput.readUTF();
  String myCodebase=objectInput.readUTF();
  theCodebase=(myCodebase.length() == 0) ? null : myCodebase;
  isWildcard=objectInput.readBoolean();
  isSnapshot=objectInput.readBoolean();
}

Fixed version (ground truth):
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
  checkIntegrity=integrityEnforced(objectInput);
  theParents=(String[])objectInput.readObject();
  theFields=new MangledField[objectInput.readInt()];
  for (int i=0; i < theFields.length; i++) {
    int myObjectSize=objectInput.readInt();
    int myAnnotSize=objectInput.readInt();
    byte[] myContent=new byte[myObjectSize];
    byte[] myAnnot=new byte[myAnnotSize];
    objectInput.readFully(myContent);
    objectInput.readFully(myAnnot);
    theFields[i]=new MangledField(objectInput.readUTF(),myContent,myAnnot,objectInput.readInt());
  }
  theType=objectInput.readUTF();
  String myCodebase=objectInput.readUTF();
  theCodebase=(myCodebase.length() == 0) ? null : myCodebase;
  isWildcard=objectInput.readBoolean();
  isSnapshot=objectInput.readBoolean();
}
Program: 190612
Project: 190612
Buggy source:
public static boolean compile(String[] args,File episode){
  JavaCompiler compiler=ToolProvider.getSystemJavaCompiler();
  DiagnosticCollector<JavaFileObject> diagnostics=new DiagnosticCollector<JavaFileObject>();
  StandardJavaFileManager fileManager=compiler.getStandardFileManager(diagnostics,null,null);
  JavacOptions options=JavacOptions.parse(compiler,fileManager,args);
  List<String> unrecognizedOptions=options.getUnrecognizedOptions();
  if (!unrecognizedOptions.isEmpty())   Logger.getLogger(SchemaGenerator.class.getName()).log(Level.WARNING,"String_Node_Str" + unrecognizedOptions);
  Iterable<? extends JavaFileObject> compilationUnits=fileManager.getJavaFileObjectsFromFiles(options.getFiles());
  JavaCompiler.CompilationTask task=compiler.getTask(null,fileManager,diagnostics,options.getRecognizedOptions(),options.getClassNames(),compilationUnits);
  com.sun.tools.jxc.ap.SchemaGenerator r=new com.sun.tools.jxc.ap.SchemaGenerator();
  if (episode != null)   r.setEpisodeFile(episode);
  task.setProcessors(Collections.singleton(r));
  return task.call();
}

Fixed version (ground truth):
public static boolean compile(String[] args,File episode) throws Exception {
  JavaCompiler compiler=ToolProvider.getSystemJavaCompiler();
  DiagnosticCollector<JavaFileObject> diagnostics=new DiagnosticCollector<JavaFileObject>();
  StandardJavaFileManager fileManager=compiler.getStandardFileManager(diagnostics,null,null);
  JavacOptions options=JavacOptions.parse(compiler,fileManager,args);
  List<String> unrecognizedOptions=options.getUnrecognizedOptions();
  if (!unrecognizedOptions.isEmpty())   Logger.getLogger(SchemaGenerator.class.getName()).log(Level.WARNING,"String_Node_Str" + unrecognizedOptions);
  Iterable<? extends JavaFileObject> compilationUnits=fileManager.getJavaFileObjectsFromFiles(options.getFiles());
  JavaCompiler.CompilationTask task=compiler.getTask(null,fileManager,diagnostics,options.getRecognizedOptions(),options.getClassNames(),compilationUnits);
  com.sun.tools.jxc.ap.SchemaGenerator r=new com.sun.tools.jxc.ap.SchemaGenerator();
  if (episode != null)   r.setEpisodeFile(episode);
  task.setProcessors(Collections.singleton(r));
  return task.call();
}
Program: 190614
Project: 190614
Buggy source:
public Result createOutput(String namespaceUri,String suggestedFileName) throws IOException {
  File file;
  OutputStream out;
  if (schemaLocations.containsKey(namespaceUri)) {
    file=schemaLocations.get(namespaceUri);
    if (file == null)     return null;
    out=new FileOutputStream(file);
  }
 else {
    file=new File(suggestedFileName);
    out=processingEnv.getFiler().createResource(StandardLocation.CLASS_PATH,"String_Node_Str",suggestedFileName).openOutputStream();
    file=file.getAbsoluteFile();
  }
  StreamResult ss=new StreamResult(out);
  processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE,"String_Node_Str" + file);
  ss.setSystemId(file.toURL().toExternalForm());
  return ss;
}

Fixed version (ground truth):
public Result createOutput(String namespaceUri,String suggestedFileName) throws IOException {
  File file;
  OutputStream out;
  if (schemaLocations.containsKey(namespaceUri)) {
    file=schemaLocations.get(namespaceUri);
    if (file == null)     return null;
    out=new FileOutputStream(file);
  }
 else {
    file=new File(suggestedFileName);
    out=processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,"String_Node_Str",suggestedFileName).openOutputStream();
    file=file.getAbsoluteFile();
  }
  StreamResult ss=new StreamResult(out);
  processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE,"String_Node_Str" + file);
  ss.setSystemId(file.toURL().toExternalForm());
  return ss;
}
Program: 190615
Project: 190615
Buggy source:
/** 
 * XmlType allows specification of factoryClass and factoryMethod.  There are to be used if no default constructor is found.
 * @return true if the factory method was found. False if not.
 */
private boolean hasFactoryConstructor(XmlType t){
  if (t == null)   return false;
  String method=t.factoryMethod();
  T fClass=reader().getClassValue(t,"String_Node_Str");
  if (method.length() > 0) {
    if (fClass.equals(nav().ref(XmlType.DEFAULT.class))) {
      fClass=nav().use(clazz);
    }
    for (    M m : nav().getDeclaredMethods(nav().asDecl(fClass))) {
      if (nav().getMethodName(m).equals(method) && nav().getReturnType(m).equals(nav().use(clazz)) && nav().getMethodParameters(m).length == 0 && nav().isStaticMethod(m)) {
        factoryMethod=m;
        break;
      }
    }
    if (factoryMethod == null) {
      builder.reportError(new IllegalAnnotationException(Messages.NO_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass)),method),this));
    }
  }
 else   if (!fClass.equals(nav().ref(XmlType.DEFAULT.class))) {
    builder.reportError(new IllegalAnnotationException(Messages.FACTORY_CLASS_NEEDS_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass))),this));
  }
  return factoryMethod != null;
}

Fixed version (ground truth):
/** 
 * XmlType allows specification of factoryClass and factoryMethod.  There are to be used if no default constructor is found.
 * @return true if the factory method was found. False if not.
 */
private boolean hasFactoryConstructor(XmlType t){
  if (t == null)   return false;
  String method=t.factoryMethod();
  T fClass=reader().getClassValue(t,"String_Node_Str");
  if (method.length() > 0) {
    if (nav().isSameType(fClass,nav().ref(XmlType.DEFAULT.class))) {
      fClass=nav().use(clazz);
    }
    for (    M m : nav().getDeclaredMethods(nav().asDecl(fClass))) {
      if (nav().getMethodName(m).equals(method) && nav().isSameType(nav().getReturnType(m),nav().use(clazz)) && nav().getMethodParameters(m).length == 0 && nav().isStaticMethod(m)) {
        factoryMethod=m;
        break;
      }
    }
    if (factoryMethod == null) {
      builder.reportError(new IllegalAnnotationException(Messages.NO_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass)),method),this));
    }
  }
 else   if (!nav().isSameType(fClass,nav().ref(XmlType.DEFAULT.class))) {
    builder.reportError(new IllegalAnnotationException(Messages.FACTORY_CLASS_NEEDS_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass))),this));
  }
  return factoryMethod != null;
}
Program: 190618
Project: 190618
Buggy source:
/** 
 * Build   {@link EnumConstant}s and discover/report any error in it.
 */
protected void calcConstants(){
  EnumConstantImpl<T,C,F,M> last=null;
  Collection<? extends F> fields=nav().getDeclaredFields(clazz);
  for (  F f : fields) {
    if (nav().getFieldType(f).equals(String.class)) {
      XmlSchemaType schemaTypeAnnotation=builder.reader.getFieldAnnotation(XmlSchemaType.class,f,this);
      if (schemaTypeAnnotation != null) {
        if ("String_Node_Str".equals(schemaTypeAnnotation.name())) {
          tokenStringType=true;
          break;
        }
      }
      ;
    }
  }
  F[] constants=nav().getEnumConstants(clazz);
  for (int i=constants.length - 1; i >= 0; i--) {
    F constant=constants[i];
    String name=nav().getFieldName(constant);
    XmlEnumValue xev=builder.reader.getFieldAnnotation(XmlEnumValue.class,constant,this);
    String literal;
    if (xev == null)     literal=name;
 else     literal=xev.value();
    last=createEnumConstant(name,literal,constant,last);
  }
  this.firstConstant=last;
}

Fixed version (ground truth):
/** 
 * Build   {@link EnumConstant}s and discover/report any error in it.
 */
protected void calcConstants(){
  EnumConstantImpl<T,C,F,M> last=null;
  Collection<? extends F> fields=nav().getDeclaredFields(clazz);
  for (  F f : fields) {
    if (nav().isSameType(nav().getFieldType(f),nav().ref(String.class))) {
      XmlSchemaType schemaTypeAnnotation=builder.reader.getFieldAnnotation(XmlSchemaType.class,f,this);
      if (schemaTypeAnnotation != null) {
        if ("String_Node_Str".equals(schemaTypeAnnotation.name())) {
          tokenStringType=true;
          break;
        }
      }
      ;
    }
  }
  F[] constants=nav().getEnumConstants(clazz);
  for (int i=constants.length - 1; i >= 0; i--) {
    F constant=constants[i];
    String name=nav().getFieldName(constant);
    XmlEnumValue xev=builder.reader.getFieldAnnotation(XmlEnumValue.class,constant,this);
    String literal;
    if (xev == null)     literal=name;
 else     literal=xev.value();
    last=createEnumConstant(name,literal,constant,last);
  }
  this.firstConstant=last;
}
Program: 190619
Project: 190619
Buggy source:
/** 
 * Checks if the given adapter is applicable to the declared property type.
 */
private boolean isApplicable(XmlJavaTypeAdapter jta,T declaredType){
  if (jta == null)   return false;
  T type=reader().getClassValue(jta,"String_Node_Str");
  if (declaredType.equals(type))   return true;
  T ad=reader().getClassValue(jta,"String_Node_Str");
  T ba=nav().getBaseClass(ad,nav().asDecl(XmlAdapter.class));
  if (!nav().isParameterizedType(ba))   return true;
  T inMemType=nav().getTypeArgument(ba,1);
  return nav().isSubClassOf(declaredType,inMemType);
}

Fixed version (ground truth):
/** 
 * Checks if the given adapter is applicable to the declared property type.
 */
private boolean isApplicable(XmlJavaTypeAdapter jta,T declaredType){
  if (jta == null)   return false;
  T type=reader().getClassValue(jta,"String_Node_Str");
  if (nav().isSameType(declaredType,type))   return true;
  T ad=reader().getClassValue(jta,"String_Node_Str");
  T ba=nav().getBaseClass(ad,nav().asDecl(XmlAdapter.class));
  if (!nav().isParameterizedType(ba))   return true;
  T inMemType=nav().getTypeArgument(ba,1);
  return nav().isSubClassOf(declaredType,inMemType);
}
Program: 190620
Project: 190620
Buggy source:
private ID calcId(){
  if (seed.hasAnnotation(XmlID.class)) {
    if (!getIndividualType().equals(nav().ref(String.class)))     parent.builder.reportError(new IllegalAnnotationException(Messages.ID_MUST_BE_STRING.format(getName()),seed));
    return ID.ID;
  }
 else   if (seed.hasAnnotation(XmlIDREF.class)) {
    return ID.IDREF;
  }
 else {
    return ID.NONE;
  }
}

Fixed version (ground truth):
private ID calcId(){
  if (seed.hasAnnotation(XmlID.class)) {
    if (!nav().isSameType(getIndividualType(),nav().ref(String.class)))     parent.builder.reportError(new IllegalAnnotationException(Messages.ID_MUST_BE_STRING.format(getName()),seed));
    return ID.ID;
  }
 else   if (seed.hasAnnotation(XmlIDREF.class)) {
    return ID.IDREF;
  }
 else {
    return ID.NONE;
  }
}
Program: 190622
Project: 190622
Buggy source:
@Override public boolean process(Set<? extends TypeElement> annotations,RoundEnvironment roundEnv){
  if (processingEnv.getOptions().containsKey(Const.CONFIG_FILE_OPTION.getValue())) {
    String value=processingEnv.getOptions().get(Const.CONFIG_FILE_OPTION.getValue());
    StringTokenizer st=new StringTokenizer(value,File.pathSeparator);
    if (!st.hasMoreTokens()) {
      errorListener.error(null,Messages.OPERAND_MISSING.format(Const.CONFIG_FILE_OPTION.getValue()));
      return true;
    }
    while (st.hasMoreTokens()) {
      File configFile=new File(st.nextToken());
      if (!configFile.exists()) {
        errorListener.error(null,Messages.NON_EXISTENT_FILE.format());
        continue;
      }
      try {
        ConfigReader configReader=new ConfigReader(processingEnv,(Collection<? extends TypeElement>)roundEnv.getRootElements(),configFile,errorListener);
        Collection<Reference> classesToBeIncluded=configReader.getClassesToBeIncluded();
        J2SJAXBModel model=XJC.createJavaCompiler().bind(classesToBeIncluded,Collections.<QName,Reference>emptyMap(),null,processingEnv);
        SchemaOutputResolver schemaOutputResolver=configReader.getSchemaOutputResolver();
        model.generateSchema(schemaOutputResolver,errorListener);
      }
 catch (      IOException e) {
        errorListener.error(e.getMessage(),e);
      }
catch (      SAXException e) {
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean process(Set<? extends TypeElement> annotations,RoundEnvironment roundEnv){
  if (processingEnv.getOptions().containsKey(Const.CONFIG_FILE_OPTION.getValue())) {
    String value=processingEnv.getOptions().get(Const.CONFIG_FILE_OPTION.getValue());
    StringTokenizer st=new StringTokenizer(value,File.pathSeparator);
    if (!st.hasMoreTokens()) {
      errorListener.error(null,Messages.OPERAND_MISSING.format(Const.CONFIG_FILE_OPTION.getValue()));
      return true;
    }
    while (st.hasMoreTokens()) {
      File configFile=new File(st.nextToken());
      if (!configFile.exists()) {
        errorListener.error(null,Messages.NON_EXISTENT_FILE.format());
        continue;
      }
      try {
        Collection<TypeElement> rootElements=new ArrayList<TypeElement>();
        filterClass(rootElements,roundEnv.getRootElements());
        ConfigReader configReader=new ConfigReader(processingEnv,rootElements,configFile,errorListener);
        Collection<Reference> classesToBeIncluded=configReader.getClassesToBeIncluded();
        J2SJAXBModel model=XJC.createJavaCompiler().bind(classesToBeIncluded,Collections.<QName,Reference>emptyMap(),null,processingEnv);
        SchemaOutputResolver schemaOutputResolver=configReader.getSchemaOutputResolver();
        model.generateSchema(schemaOutputResolver,errorListener);
      }
 catch (      IOException e) {
        errorListener.error(e.getMessage(),e);
      }
catch (      SAXException e) {
      }
    }
  }
  return true;
}
Program: 190624
Project: 190624
Buggy source:
public void error(IllegalAnnotationException e){
  messager.printMessage(Diagnostic.Kind.ERROR,e.toString());
}

Fixed version (ground truth):
public void error(IllegalAnnotationException e){
  String error=e.toString();
  messager.printMessage(Diagnostic.Kind.ERROR,error);
  System.err.println(error);
}
Program: 190625
Project: 190625
Buggy source:
public ValidatorHandler newValidator(){
synchronized (this) {
    if (schema == null) {
      try {
        schema=SchemaFactory.newInstance(WellKnownNamespace.XML_SCHEMA).newSchema(source);
      }
 catch (      SAXException e) {
        throw new AssertionError(e);
      }
    }
  }
  ValidatorHandler handler=schema.newValidatorHandler();
  fixValidatorBug6246922(handler);
  return handler;
}

Fixed version (ground truth):
public ValidatorHandler newValidator(){
synchronized (this) {
    if (schema == null) {
      try {
        schema=SchemaFactory.newInstance(WellKnownNamespace.XML_SCHEMA).newSchema(source);
      }
 catch (      SAXException e) {
        throw new AssertionError(e);
      }
    }
  }
  ValidatorHandler handler=schema.newValidatorHandler();
  return handler;
}
Program: 190626
Project: 190626
Buggy source:
public XmlOutput createWriter(OutputStream os,String encoding) throws JAXBException {
  if (encoding.equals("String_Node_Str")) {
    Encoded[] table=context.getUTF8NameTable();
    final UTF8XmlOutput out;
    if (isFormattedOutput())     out=new IndentingUTF8XmlOutput(os,indent,table);
 else {
      if (c14nSupport)       out=new C14nXmlOutput(os,table,context.c14nSupport);
 else       out=new UTF8XmlOutput(os,table);
    }
    if (header != null)     out.setHeader(header);
    return out;
  }
  try {
    return createWriter(new OutputStreamWriter(os,getJavaEncoding(encoding)),encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new MarshalException(Messages.UNSUPPORTED_ENCODING.format(encoding),e);
  }
}

Fixed version (ground truth):
public XmlOutput createWriter(OutputStream os,String encoding) throws JAXBException {
  if (encoding.equals("String_Node_Str")) {
    Encoded[] table=context.getUTF8NameTable();
    final UTF8XmlOutput out;
    if (isFormattedOutput())     out=new IndentingUTF8XmlOutput(os,indent,table,escapeHandler);
 else {
      if (c14nSupport)       out=new C14nXmlOutput(os,table,context.c14nSupport,escapeHandler);
 else       out=new UTF8XmlOutput(os,table,escapeHandler);
    }
    if (header != null)     out.setHeader(header);
    return out;
  }
  try {
    return createWriter(new OutputStreamWriter(os,getJavaEncoding(encoding)),encoding);
  }
 catch (  UnsupportedEncodingException e) {
    throw new MarshalException(Messages.UNSUPPORTED_ENCODING.format(encoding),e);
  }
}
Program: 190627
Project: 190627
Buggy source:
public C14nXmlOutput(OutputStream out,Encoded[] localNames,boolean namedAttributesAreOrdered){
  super(out,localNames);
  this.namedAttributesAreOrdered=namedAttributesAreOrdered;
  for (int i=0; i < staticAttributes.length; i++)   staticAttributes[i]=new StaticAttribute();
}

Fixed version (ground truth):
public C14nXmlOutput(OutputStream out,Encoded[] localNames,boolean namedAttributesAreOrdered,CharacterEscapeHandler escapeHandler){
  super(out,localNames,escapeHandler);
  this.namedAttributesAreOrdered=namedAttributesAreOrdered;
  for (int i=0; i < staticAttributes.length; i++)   staticAttributes[i]=new StaticAttribute();
}
Program: 190628
Project: 190628
Buggy source:
/** 
 * @param indentStr set to null for no indentation and optimal performance. otherwise the string is used for indentation.
 */
public IndentingUTF8XmlOutput(OutputStream out,String indentStr,Encoded[] localNames){
  super(out,localNames);
  if (indentStr != null) {
    Encoded e=new Encoded(indentStr);
    indent8=new Encoded();
    indent8.ensureSize(e.len * 8);
    unitLen=e.len;
    for (int i=0; i < 8; i++)     System.arraycopy(e.buf,0,indent8.buf,unitLen * i,unitLen);
  }
 else {
    this.indent8=null;
    this.unitLen=0;
  }
}

Fixed version (ground truth):
/** 
 * @param indentStr set to null for no indentation and optimal performance. otherwise the string is used for indentation.
 */
public IndentingUTF8XmlOutput(OutputStream out,String indentStr,Encoded[] localNames,CharacterEscapeHandler escapeHandler){
  super(out,localNames,escapeHandler);
  if (indentStr != null) {
    Encoded e=new Encoded(indentStr);
    indent8=new Encoded();
    indent8.ensureSize(e.len * 8);
    unitLen=e.len;
    for (int i=0; i < 8; i++)     System.arraycopy(e.buf,0,indent8.buf,unitLen * i,unitLen);
  }
 else {
    this.indent8=null;
    this.unitLen=0;
  }
}
Program: 190629
Project: 190629
Buggy source:
/** 
 * @param localNames local names encoded in UTF-8.
 */
public UTF8XmlOutput(OutputStream out,Encoded[] localNames){
  this.out=out;
  this.localNames=localNames;
  for (int i=0; i < prefixes.length; i++)   prefixes[i]=new Encoded();
}

Fixed version (ground truth):
/** 
 * @param localNames local names encoded in UTF-8.
 */
public UTF8XmlOutput(OutputStream out,Encoded[] localNames,CharacterEscapeHandler escapeHandler){
  this.out=out;
  this.localNames=localNames;
  for (int i=0; i < prefixes.length; i++)   prefixes[i]=new Encoded();
  this.escapeHandler=escapeHandler;
}
Program: 190630
Project: 190630
Buggy source:
private void doText(String value,boolean isAttribute) throws IOException {
  textBuffer.setEscape(value,isAttribute);
  textBuffer.write(this);
}

Fixed version (ground truth):
private void doText(String value,boolean isAttribute) throws IOException {
  if (escapeHandler != null) {
    StringWriter sw=new StringWriter();
    escapeHandler.escape(value.toCharArray(),0,value.length(),isAttribute,sw);
    textBuffer.setEscape(sw.toString(),isAttribute);
  }
 else {
    textBuffer.setEscape(value,isAttribute);
  }
  textBuffer.write(this);
}
Program: 190631
Project: 190631
Buggy source:
@Override public void childElement(UnmarshallingContext.State state,TagName arg) throws SAXException {
  ChildLoader child=childUnmarshallers.get(arg.uri,arg.local);
  if ((child == null) && (arg.uri.compareTo("String_Node_Str") != 0))   child=childUnmarshallers.get("String_Node_Str",arg.local);
  if (child == null) {
    child=catchAll;
    if (child == null) {
      super.childElement(state,arg);
      return;
    }
  }
  state.loader=child.loader;
  state.receiver=child.receiver;
}

Fixed version (ground truth):
@Override public void childElement(UnmarshallingContext.State state,TagName arg) throws SAXException {
  ChildLoader child=childUnmarshallers.get(arg.uri,arg.local);
  if (child == null) {
    child=catchAll;
    if (child == null) {
      super.childElement(state,arg);
      return;
    }
  }
  state.loader=child.loader;
  state.receiver=child.receiver;
}
Program: 190632
Project: 190632
Buggy source:
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=(size - 1); i >= 0; i--) {
    if (nsUris[i].compareTo(uri) == 0)     return i;
  }
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}

Fixed version (ground truth):
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=(size - 1); i >= 0; i--) {
    if ((nsUris[i].compareTo(uri) == 0) && (!prefixes[i].equals("String_Node_Str")))     return i;
  }
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}
Program: 190633
Project: 190633
Buggy source:
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}

Fixed version (ground truth):
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=(size - 1); i >= 0; i--) {
    if (nsUris[i].compareTo(uri) == 0)     return i;
  }
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}
Program: 190634
Project: 190634
Buggy source:
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=(size - 1); i >= 0; i--) {
    if ((nsUris[i].compareTo(uri) == 0) && (!prefixes[i].equals("String_Node_Str")))     return i;
  }
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}

Fixed version (ground truth):
public int force(@NotNull String uri,@NotNull String prefix){
  for (int i=(size - 1); i >= 0; i--) {
    if (nsUris[i].compareTo(uri) == 0) {
      prefixes[i]=prefix;
      return i;
    }
  }
  for (int i=size - 1; i >= 0; i--) {
    if (prefixes[i].equals(prefix)) {
      if (nsUris[i].equals(uri))       return i;
 else       break;
    }
  }
  return put(uri,prefix);
}