nus-yam/ex-repair huggingface dataset:
Program: 19809
Project: 19809
Buggy source:
@Override protected Map<String,Double> updateTrustAfterHunt(double foodHunted,double foodReceived){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected Map<String,Double> updateTrustAfterHunt(double foodHunted,double foodReceived){
  return null;
}
Program: 19810
Project: 19810
Buggy source:
@Override protected Food giveAdvice(String agent,HuntingTeam agentsTeam){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected Food giveAdvice(String agent,HuntingTeam agentsTeam){
  return null;
}
Program: 19811
Project: 19811
Buggy source:
@Override protected ProposalType makeProposal(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected ProposalType makeProposal(){
  return ProposalType.staySame;
}
Program: 19812
Project: 19812
Buggy source:
@Override protected double updateHappinessAfterHunt(double foodHunted,double foodReceived){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected double updateHappinessAfterHunt(double foodHunted,double foodReceived){
  return 0;
}
Program: 19813
Project: 19813
Buggy source:
@Override protected VoteType castVote(Proposition p){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected VoteType castVote(Proposition p){
  return VoteType.For;
}
Program: 19814
Project: 19814
Buggy source:
@Override protected double updateHappinessAfterVotes(Proposition proposition,int votes,double overallMovement){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected double updateHappinessAfterVotes(Proposition proposition,int votes,double overallMovement){
  return 0;
}
Program: 19815
Project: 19815
Buggy source:
@Override protected Map<String,Double> updateTrustAfterVotes(Proposition proposition,int votes,double overallMovement){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected Map<String,Double> updateTrustAfterVotes(Proposition proposition,int votes,double overallMovement){
  return null;
}
Program: 19817
Project: 19817
Buggy source:
/** 
 * Implemented in Presage and (currently) serves no purpose
 * @return : a null string, at the moment
 */
@Override public String getPlayerClass(){
  return source.getPlayerClass();
}

Fixed version (ground truth):
/** 
 * Implemented in Presage and (currently) serves no purpose
 * @return a null string, at the moment
 */
@Override public String getPlayerClass(){
  return source.getPlayerClass();
}
Program: 19818
Project: 19818
Buggy source:
/** 
 * Sets all of the agents roles
 * @param roles: the list of roles to assign to the agent
 */
@Override public void setRoles(ArrayList<String> roles){
  source.setRoles(roles);
}

Fixed version (ground truth):
/** 
 * Sets all of the agents roles
 * @param roles the list of roles to assign to the agent
 */
@Override public void setRoles(ArrayList<String> roles){
  source.setRoles(roles);
}
Program: 19819
Project: 19819
Buggy source:
/** 
 * Returns the group ID of the agent
 * @return 
 */
public String getGroupId(){
  return source.getGroupId();
}

Fixed version (ground truth):
/** 
 * Gets the group ID of the agent
 * @return the group ID of the agent
 */
public String getGroupId(){
  return source.getGroupId();
}
Program: 19820
Project: 19820
Buggy source:
/** 
 * Uses the user's magically specified heuristics to determine which food type the player wishes to hunt for. 
 * @return 
 */
@Override protected Food chooseFood(){
  Food bestSoFar=null;
  for (  Food noms : conn.availableFoods()) {
    if (noms.getHuntersRequired() <= 1) {
      if (bestSoFar == null) {
        bestSoFar=noms;
      }
    }
    if (noms.getNutrition() > bestSoFar.getNutrition()) {
      bestSoFar=noms;
    }
  }
  return bestSoFar;
}

Fixed version (ground truth):
/** 
 * Uses the user's magically specified heuristics to determine which food type the player wishes to hunt for. 
 * @return 
 */
@Override protected Food chooseFood(){
  Food bestSoFar=null;
  for (  Food noms : conn.availableFoods()) {
    if (noms.getHuntersRequired() <= 1) {
      if (bestSoFar == null) {
        bestSoFar=noms;
      }
 else       if (noms.getNutrition() > bestSoFar.getNutrition()) {
        bestSoFar=noms;
      }
    }
  }
  return bestSoFar;
}
Program: 19821
Project: 19821
Buggy source:
/** 
 * Deals with plugin upon simulation completion
 */
@Override public void onSimulationComplete(){
}

Fixed version (ground truth):
/** 
 * Deals with plugin upon simulation completion
 */
@Override public void onSimulationComplete(){
  data.add("String_Node_Str");
}
Program: 19822
Project: 19822
Buggy source:
/** 
 * Creates a new instance of ErrorLog - called during simulation
 * @param sim
 */
@Override public void initialise(Simulation sim){
  this.sim=sim;
  JListModel el=new JListModel();
  this.add(new JList(el));
  ((Environment)sim.environment).setErrorLog(el);
  setBackground(Color.LIGHT_GRAY);
}

Fixed version (ground truth):
/** 
 * Creates a new instance of ErrorLog - called during simulation
 * @param sim
 */
@Override public void initialise(Simulation sim){
  this.sim=sim;
  this.add(new JList(data));
  ((Environment)sim.environment).setErrorLog(data);
  setBackground(Color.LIGHT_GRAY);
}
Program: 19823
Project: 19823
Buggy source:
/** 
 * Default constructor - does nothing.
 */
public ErrorLog(){
}

Fixed version (ground truth):
/** 
 * Default constructor - does nothing.
 */
public ErrorLog(){
  super(new BorderLayout());
}
Program: 19824
Project: 19824
Buggy source:
/** 
 * TODO: Documentation
 */
@Override public void execute(){
}

Fixed version (ground truth):
/** 
 * TODO: Documentation
 */
@Override public void execute(){
  data.add("String_Node_Str" + sim.getTime() + "String_Node_Str");
}
Program: 19825
Project: 19825
Buggy source:
@Override public Object getElementAt(int index){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public Object getElementAt(int index){
  return data.get(index);
}
Program: 19826
Project: 19826
Buggy source:
@Override public int getSize(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public int getSize(){
  return data.size();
}
Program: 19827
Project: 19827
Buggy source:
@Override public void onSimulationComplete(){
  this.removeAll();
synchronized (this) {
    chartPanel=newChart(data);
  }
  this.setLayout(new BorderLayout());
  add(chartPanel,(new BorderLayout()).CENTER);
  chartPanel.updateUI();
  File file;
  try {
    file=new File(outputpath);
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + label + "String_Node_Str"+ e);
    return;
  }
  try {
    int width=1920;
    int height=1200;
    ChartUtilities.saveChartAsPNG(file,chartPanel.getChart(),width,height);
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + label);
  }
}

Fixed version (ground truth):
@Override public void onSimulationComplete(){
  this.removeAll();
synchronized (this) {
    chartPanel=newChart(data);
  }
  this.setLayout(new BorderLayout());
  add(chartPanel,(new BorderLayout()).CENTER);
  chartPanel.updateUI();
  File file;
  try {
    file=new File(outputpath);
  }
 catch (  Exception e) {
    System.err.println("String_Node_Str" + label + "String_Node_Str"+ e);
    return;
  }
  try {
    ChartUtilities.saveChartAsPNG(file,chartPanel.getChart(),this.outputwidth,this.outputheight);
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + label);
  }
}
Program: 19828
Project: 19828
Buggy source:
@PluginConstructor({"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public LineChartPlugin(String outputpath,int outputwidth,int outputheight,int updaterate){
  super();
  this.outputpath=outputpath;
  this.outputwidth=outputwidth;
  this.outputheight=outputheight;
  this.updaterate=updaterate;
}

Fixed version (ground truth):
@PluginConstructor({"String_Node_Str","String_Node_Str","String_Node_Str"}) public LineChartPlugin(String outputpath,int outputwidth,int outputheight){
  super();
  this.outputpath=outputpath;
  this.outputwidth=outputwidth;
  this.outputheight=outputheight;
}
Program: 19831
Project: 19831
Buggy source:
@Override public final void execute(){
  while (!msgQ.isEmpty()) {
    handleInput(msgQ.dequeue());
  }
  if (this.dm.getFoodInPossesion() < 0)   return;
  System.out.println("String_Node_Str" + this.getId() + "String_Node_Str"+ this.dm.getFoodInPossesion()+ "String_Node_Str");
  Food toHunt=chooseFood();
  System.out.println("String_Node_Str" + this.getId() + "String_Node_Str"+ toHunt.getName()+ '('+ toHunt.getId().toString()+ ')');
  lastHunted=toHunt;
  if (toHunt == null)   return;
  ec.act(new Hunt(toHunt),this.getId(),authCode);
}

Fixed version (ground truth):
@Override public final void execute(){
  while (!msgQ.isEmpty()) {
    handleInput(msgQ.dequeue());
  }
  if (this.dm.getFoodInPossesion() < 0)   return;
  System.out.println("String_Node_Str" + this.getId() + "String_Node_Str"+ this.dm.getFoodInPossesion()+ "String_Node_Str");
  Food toHunt=chooseFood();
  System.out.println("String_Node_Str" + this.getId() + "String_Node_Str"+ toHunt.getName()+ "String_Node_Str"+ toHunt.getId().toString()+ ')');
  lastHunted=toHunt;
  if (toHunt == null)   return;
  ec.act(new Hunt(toHunt),this.getId(),authCode);
}
Program: 19832
Project: 19832
Buggy source:
public SprayMultiPageEditor(){
}

Fixed version (ground truth):
public SprayMultiPageEditor(){
  ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
}
Program: 19833
Project: 19833
Buggy source:
@Override public void resourceChanged(final IResourceChangeEvent event){
  if (event.getType() == IResourceChangeEvent.PRE_CLOSE) {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        IWorkbenchPage[] pages=getSite().getWorkbenchWindow().getPages();
        for (int i=0; i < pages.length; i++) {
          if (((FileEditorInput)xtextEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
            IEditorPart editorPart=pages[i].findEditor(xtextEditor.getEditorInput());
            pages[i].closeEditor(editorPart,true);
          }
        }
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void resourceChanged(final IResourceChangeEvent event){
  if ((event.getType() == IResourceChangeEvent.PRE_CLOSE || event.getType() == IResourceChangeEvent.PRE_DELETE) && event.getResource() instanceof IProject) {
    Display.getDefault().asyncExec(new Runnable(){
      public void run(){
        IWorkbenchPage[] pages=getSite().getWorkbenchWindow().getPages();
        for (int i=0; i < pages.length; i++) {
          if (((FileEditorInput)xtextEditor.getEditorInput()).getFile().getProject().equals(event.getResource())) {
            IEditorPart editorPart=pages[i].findEditor(xtextEditor.getEditorInput());
            pages[i].closeEditor(editorPart,true);
          }
        }
      }
    }
);
  }
}
Program: 19834
Project: 19834
Buggy source:
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  ResourcesPlugin.getWorkspace().addResourceChangeListener(new SprayResourceChangeBuildInvoker());
}

Fixed version (ground truth):
@Override public void start(BundleContext context) throws Exception {
  super.start(context);
  sprayResourceChangeBuildInvoker=new SprayResourceChangeBuildInvoker(this);
  ResourcesPlugin.getWorkspace().addResourceChangeListener(sprayResourceChangeBuildInvoker);
  ResourcesPlugin.getWorkspace().addResourceChangeListener(registerPlatformGenmodelListener);
  registerPlatformGenmodelListener.initWorkspace();
  getInjector(LANGUAGE_ID).injectMembers(this);
}
Program: 19835
Project: 19835
Buggy source:
@Override public boolean extensionFileExists(){
  return GeneratorUtil.fileExist("String_Node_Str" + getPathName());
}

Fixed version (ground truth):
@Override public boolean extensionFileExists(){
  return GeneratorUtil.fileExist(manOutputPath + "String_Node_Str" + getPathName());
}
Program: 19836
Project: 19836
Buggy source:
/** 
 * Checks whether user credentials are valid in the provided remote XWiki
 * @param username username of the XWiki user account
 * @param password password of the XWiki user account
 * @param Url URL of the XWiki instance
 * @return HTTP response code of the connectionor  21408(RESP_CODE_CLIENT_CON_TIMEOUT) when client connection timed out, 
 */
public int checkLogin(String username,String password,String Url){
  initialize();
  HttpGet request=new HttpGet();
  String Uri;
  int responseCode=0;
  Uri="String_Node_Str" + Url + "String_Node_Str";
  try {
    requestUri=new URI(Uri);
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  setCredentials();
  request.setURI(requestUri);
  Log.d("String_Node_Str",Uri);
  try {
    response=client.execute(request);
    Log.d("String_Node_Str",response.getStatusLine().toString());
    String[] responseParts=response.getStatusLine().toString().split("String_Node_Str");
    responseCode=Integer.parseInt(responseParts[1]);
  }
 catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  SocketTimeoutException e) {
    Log.d(this.getClass().getSimpleName(),"String_Node_Str",e);
    responseCode=RESP_CODE_CLIENT_CON_TIMEOUT;
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  Log.d("String_Node_Str",String.valueOf(responseCode));
  return responseCode;
}

Fixed version (ground truth):
/** 
 * Checks whether user credentials are valid in the provided remote XWiki
 * @param username username of the XWiki user account
 * @param password password of the XWiki user account
 * @param Url URL of the XWiki instance
 * @return HTTP response code of the connectionor  21408(RESP_CODE_CLIENT_CON_TIMEOUT) when client connection timed out, 
 */
public int checkLogin(String username,String password,String Url){
  initialize();
  HttpGet request=new HttpGet();
  String Uri;
  int responseCode=0;
  Uri="String_Node_Str" + Url + "String_Node_Str";
  try {
    requestUri=new URI(Uri);
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  if (username != "String_Node_Str" && username != null && password != "String_Node_Str" && password != null) {
    setAuthenticaion(username,password);
  }
  setCredentials();
  request.setURI(requestUri);
  Log.d("String_Node_Str",Uri);
  try {
    response=client.execute(request);
    Log.d("String_Node_Str",response.getStatusLine().toString());
    String[] responseParts=response.getStatusLine().toString().split("String_Node_Str");
    responseCode=Integer.parseInt(responseParts[1]);
  }
 catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  SocketTimeoutException e) {
    Log.d(this.getClass().getSimpleName(),"String_Node_Str",e);
    responseCode=RESP_CODE_CLIENT_CON_TIMEOUT;
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  Log.d("String_Node_Str",String.valueOf(responseCode));
  return responseCode;
}
Program: 19838
Project: 19838
Buggy source:
@Override public boolean onCommand(CommandSender sender,Command cmd,String cmdlbl,String[] args){
  if (sender instanceof Player == false) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  Player player=(Player)sender;
  if (args.length > 0) {
    if (args[0].equals("String_Node_Str") && args.length == 2) {
      HorseSession horseSession=getSession(player.getName());
      horseSession.state=HorseState.TRANSFER;
      Player p=Bukkit.getPlayerExact(args[1]);
      if (p == null) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        return true;
      }
      horseSession.toOwner=args[1];
      return true;
    }
    if (args[0].equals("String_Node_Str")) {
      HorseSession pses=getSession(player.getName());
      pses.state=HorseState.INFO;
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onCommand(CommandSender sender,Command cmd,String cmdlbl,String[] args){
  if (sender instanceof Player == false) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  Player player=(Player)sender;
  if (args.length > 0) {
    if (args[0].equals("String_Node_Str") && args.length == 2) {
      HorseSession horseSession=getSession(player.getName());
      Player p=Bukkit.getPlayerExact(args[1]);
      if (p == null) {
        player.sendMessage(ChatColor.RED + "String_Node_Str");
        return true;
      }
      horseSession.state=HorseState.TRANSFER;
      horseSession.toOwner=args[1];
      return true;
    }
    if (args[0].equals("String_Node_Str")) {
      HorseSession pses=getSession(player.getName());
      pses.state=HorseState.INFO;
      return true;
    }
  }
  return false;
}
Program: 19839
Project: 19839
Buggy source:
public boolean onCommand(CommandSender sender,Command cmd,String lbl,String[] args){
  if (sender instanceof Player == false) {
    return true;
  }
  if (args.length != 1) {
    return false;
  }
  Player p=(Player)sender;
  String cm=args[0];
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    p.sendMessage("String_Node_Str");
    tourists.add(p.getName());
  }
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    p.sendMessage("String_Node_Str");
    tourists.remove(p.getName());
  }
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    if (p.hasPermission("String_Node_Str")) {
      for (      String t : tourists) {
        Player pp=Bukkit.getPlayer(t);
        if (p == null) {
          continue;
        }
        pp.teleport(p);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean onCommand(CommandSender sender,Command cmd,String lbl,String[] args){
  if (sender instanceof Player == false) {
    return true;
  }
  if (args.length != 1) {
    return false;
  }
  Player p=(Player)sender;
  String cm=args[0];
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    p.sendMessage("String_Node_Str");
    tourists.add(p.getName());
  }
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    p.sendMessage("String_Node_Str");
    tourists.remove(p.getName());
  }
  if (cm.equalsIgnoreCase("String_Node_Str")) {
    if (p.hasPermission("String_Node_Str")) {
      for (      String t : tourists) {
        Player pp=Bukkit.getPlayer(t);
        if (pp == null) {
          continue;
        }
        if (!pp.isOnline()) {
          continue;
        }
        pp.teleport(p);
      }
    }
  }
  return true;
}
Program: 19840
Project: 19840
Buggy source:
@EventHandler(priority=EventPriority.MONITOR) public void playerQuit(PlayerQuitEvent event){
  if (afkBooter.getMovementTrackerFlag()) {
    afkBooter.stopTrackingPlayer(event.getPlayer().getName());
  }
  movementTracker.removePlayer(event.getPlayer().getName());
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.MONITOR) public void playerQuit(PlayerQuitEvent event){
  afkBooter.stopTrackingPlayer(event.getPlayer().getName());
  if (afkBooter.getMovementTrackerFlag()) {
    movementTracker.removePlayer(event.getPlayer().getName());
  }
}
Program: 19841
Project: 19841
Buggy source:
/** 
 * Add player to the exempt list.
 * @param player Name of the player to add.
 * @param name Name of the command sender.
 */
public synchronized void addExemptPlayer(String player,String name){
  exemptPlayers.add(player);
  log.info("String_Node_Str" + player + "String_Node_Str"+ name);
  plugin.getConfig().set("String_Node_Str",exemptPlayers.toString());
  plugin.saveConfig();
}

Fixed version (ground truth):
/** 
 * Add player to the exempt list.
 * @param player Name of the player to add.
 * @param name Name of the command sender.
 */
public synchronized void addExemptPlayer(String player,String name){
  exemptPlayers.add(player);
  log.info("String_Node_Str" + name + "String_Node_Str"+ player+ "String_Node_Str");
  plugin.getConfig().set("String_Node_Str",exemptPlayers.toString());
  plugin.saveConfig();
}
Program: 19842
Project: 19842
Buggy source:
/** 
 * Kick an idle player.
 */
private synchronized void kickIdlePlayer(Player player){
  if (player.isOnline()) {
    log.info("String_Node_Str" + player.getName());
    player.kickPlayer(playerKickMessage);
    if ((broadcastKickMessage != null) && (!broadcastKickMessage.isEmpty())) {
      plugin.getServer().broadcastMessage(ChatColor.YELLOW + player.getName() + "String_Node_Str"+ broadcastKickMessage);
    }
  }
}

Fixed version (ground truth):
/** 
 * Kick an idle player.
 */
private synchronized void kickIdlePlayer(Player player){
  if (player.isOnline()) {
    log.info("String_Node_Str" + player.getName() + "String_Node_Str");
    player.kickPlayer(playerKickMessage);
    if ((broadcastKickMessage != null) && (!broadcastKickMessage.isEmpty())) {
      plugin.getServer().broadcastMessage(ChatColor.YELLOW + player.getName() + "String_Node_Str"+ broadcastKickMessage);
    }
  }
}
Program: 19844
Project: 19844
Buggy source:
/** 
 * Called during onDisable()
 */
public void tidyUp(){
}

Fixed version (ground truth):
/** 
 * Called during onDisable()
 */
public void tidyUp(){
  if (threadedTimer != null) {
    threadedTimer.setAborted(true);
    threadedTimer=null;
  }
  plugin.getServer().getScheduler().cancelTask(taskId);
}
Program: 19846
Project: 19846
Buggy source:
/** 
 * Remove player from the exempt list.
 * @param player Name of the player to remove.
 * @param name Name of the command sender.
 */
public synchronized void removeExemptPlayer(String player,String name){
  exemptPlayers.remove(player);
  log.info("String_Node_Str" + player + "String_Node_Str"+ name);
  plugin.getConfig().set("String_Node_Str",exemptPlayers.toString());
  plugin.saveConfig();
}

Fixed version (ground truth):
/** 
 * Remove player from the exempt list.
 * @param player Name of the player to remove.
 * @param name Name of the command sender.
 */
public synchronized void removeExemptPlayer(String player,String name){
  exemptPlayers.remove(player);
  log.info("String_Node_Str" + name + "String_Node_Str"+ player+ "String_Node_Str");
  plugin.getConfig().set("String_Node_Str",exemptPlayers.toString());
  plugin.saveConfig();
}
Program: 19847
Project: 19847
Buggy source:
/** 
 * Kick AFK players.
 */
public void kickAfkPlayers(){
  if (lastPlayerActivity.size() < 1) {
    return;
  }
  if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {
    return;
  }
  long activityWindow=System.currentTimeMillis() - kickTimeout;
  for (  String name : lastPlayerActivity.keySet()) {
    Player player=plugin.getServer().getPlayer(name);
    if (player == null) {
      continue;
    }
    if (player.hasPermission(PERMISSION_EXEMPT) || (exemptPlayers.contains(name))) {
      continue;
    }
    long lastActivity=lastPlayerActivity.get(name);
    if (lastActivity == 0) {
      continue;
    }
    if (lastActivity < activityWindow) {
      kickIdlePlayer(player);
    }
  }
}

Fixed version (ground truth):
/** 
 * Kick AFK players.
 */
public void kickAfkPlayers(){
  if (lastPlayerActivity.size() < 1) {
    return;
  }
  if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {
    return;
  }
  long activityWindow=System.currentTimeMillis() - kickTimeout;
  for (  String name : lastPlayerActivity.keySet()) {
    Player player=plugin.getServer().getPlayer(name);
    if (player == null) {
      continue;
    }
    if (player.hasPermission(PERMISSION_EXEMPT) || (exemptPlayers.contains(name.toLowerCase()))) {
      continue;
    }
    long lastActivity=lastPlayerActivity.get(name);
    if (lastActivity == 0) {
      continue;
    }
    if (lastActivity < activityWindow) {
      kickIdlePlayer(player);
    }
  }
}
Program: 19848
Project: 19848
Buggy source:
public boolean onCommand(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length < 1) {
    return false;
  }
  if (!sender.hasPermission(PERMISSION_CONFIG)) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  String subCommand=args[0].toLowerCase();
  ArrayList<String> subCommandArgs=null;
  if (args.length > 1) {
    subCommandArgs=new ArrayList<String>();
    subCommandArgs.addAll(Arrays.asList(args).subList(1,args.length));
  }
  if (subCommand.equals("String_Node_Str"))   return handleListExemptCommand(sender);
 else   if (subCommand.equals("String_Node_Str"))   return handleAddExemptPlayerCommand(sender,subCommandArgs);
 else   if (subCommand.equals("String_Node_Str"))   return handleRemoveExemptPlayerCommand(sender,subCommandArgs);
  return false;
}

Fixed version (ground truth):
public boolean onCommand(CommandSender sender,Command cmd,String commandLabel,String[] args){
  if (args.length < 1) {
    return false;
  }
  if (!sender.hasPermission(PERMISSION_CONFIG)) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return true;
  }
  String subCommand=args[0].toLowerCase();
  ArrayList<String> subCommandArgs=null;
  if (args.length > 1) {
    subCommandArgs=new ArrayList<String>();
    subCommandArgs.addAll(Arrays.asList(args).subList(1,args.length));
  }
  if (subCommand.equals("String_Node_Str"))   return handleListExemptCommand(sender);
 else   if (subCommand.equals("String_Node_Str"))   return handleAddExemptPlayerCommand(sender,subCommandArgs);
 else   if (subCommand.equals("String_Node_Str"))   return handleRemoveExemptPlayerCommand(sender,subCommandArgs);
  return false;
}
Program: 19849
Project: 19849
Buggy source:
private boolean handleAddExemptPlayerCommand(CommandSender sender,ArrayList<String> args){
  if (args.size() == 0) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  ConcurrentSkipListSet exemptPlayers=afkBooter.getExemptPlayers();
  for (  String name : args) {
    name=name.trim();
    if (exemptPlayers.contains(name)) {
      sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
    afkBooter.addExemptPlayer(name,sender.getName());
    sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
private boolean handleAddExemptPlayerCommand(CommandSender sender,ArrayList<String> args){
  if (args.size() == 0) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  ConcurrentSkipListSet exemptPlayers=afkBooter.getExemptPlayers();
  for (  String name : args) {
    name=name.trim().toLowerCase();
    if (exemptPlayers.contains(name)) {
      sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
    afkBooter.addExemptPlayer(name,sender.getName());
    sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
  }
  return true;
}
Program: 19850
Project: 19850
Buggy source:
private boolean handleRemoveExemptPlayerCommand(CommandSender sender,ArrayList<String> args){
  if (args.size() == 0) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  ConcurrentSkipListSet exemptPlayers=afkBooter.getExemptPlayers();
  for (  String name : args) {
    name=name.trim();
    if (!exemptPlayers.contains(name)) {
      sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
    afkBooter.removeExemptPlayer(name,sender.getName());
    sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
private boolean handleRemoveExemptPlayerCommand(CommandSender sender,ArrayList<String> args){
  if (args.size() == 0) {
    sender.sendMessage("String_Node_Str");
    return true;
  }
  ConcurrentSkipListSet exemptPlayers=afkBooter.getExemptPlayers();
  for (  String name : args) {
    name=name.trim().toLowerCase();
    if (!exemptPlayers.contains(name)) {
      sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
      continue;
    }
    afkBooter.removeExemptPlayer(name,sender.getName());
    sender.sendMessage("String_Node_Str" + name + "String_Node_Str");
  }
  return true;
}
Program: 19851
Project: 19851
Buggy source:
public void onDisable(){
  if (afkBooter != null) {
    afkBooter.tidyUp();
  }
  self=null;
  log.info("String_Node_Str");
}

Fixed version (ground truth):
public void onDisable(){
  if (afkBooter != null) {
    afkBooter.tidyUp();
    log.info("String_Node_Str");
  }
  self=null;
  log.info("String_Node_Str");
}
Program: 19852
Project: 19852
Buggy source:
/** 
 * Kick AFK players.
 */
public void kickAfkPlayers(){
  if (lastPlayerActivity.size() < 1) {
    return;
  }
  if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {
    return;
  }
  long activityWindow=System.currentTimeMillis() - kickTimeout;
  for (  String name : lastPlayerActivity.keySet()) {
    Player player=plugin.getServer().getPlayer(name);
    if (player == null) {
      continue;
    }
    if (player.hasPermission(PERMISSION_EXEMPT) || (exemptPlayers.contains(name.toLowerCase()))) {
      continue;
    }
    if (lastPlayerActivity.get(name) == null) {
      continue;
    }
    long lastActivity=lastPlayerActivity.get(name);
    if (lastActivity < activityWindow) {
      kickIdlePlayer(player);
    }
  }
}

Fixed version (ground truth):
/** 
 * Kick AFK players.
 */
public void kickAfkPlayers(){
  if (lastPlayerActivity.size() < 1) {
    return;
  }
  if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {
    return;
  }
  long activityWindow=System.currentTimeMillis() - kickTimeout;
  for (  String name : lastPlayerActivity.keySet()) {
    Player player=plugin.getServer().getPlayer(name);
    if (player == null) {
      continue;
    }
    if (player.hasPermission(PERMISSION_EXEMPT) || (exemptPlayers.contains(name.toLowerCase()))) {
      continue;
    }
    Long tmpLong=lastPlayerActivity.get(name);
    if (tmpLong == null) {
      continue;
    }
    long lastActivity=tmpLong.longValue();
    if (lastActivity < activityWindow) {
      kickIdlePlayer(player);
    }
  }
}
Program: 19854
Project: 19854
Buggy source:
@Override public CompoundProperty addSALIFeatures(CompoundProperty p){
  CompoundProperty oldProps[]=new CompoundProperty[0];
  for (  CompoundProperty prop : getAdditionalProperties())   if (prop instanceof SALIProperty)   oldProps=ArrayUtil.push(CompoundProperty.class,oldProps,prop);
  Double d[]=new Double[getNumCompounds(true)];
  String domain[]=null;
  if (p instanceof NominalProperty) {
    domain=((NominalProperty)p).getDomain();
    if (domain.length != 2)     throw new IllegalArgumentException("String_Node_Str");
  }
  if (p instanceof NumericProperty) {
    int count=0;
    for (    Compound comp : getCompounds(false)) {
      if (comp.getDoubleValue((NumericProperty)p) != null) {
        d[count]=getNormalizedDoubleValue(comp,(NumericProperty)p);
      }
      count++;
    }
  }
 else {
    int count=0;
    for (    Compound comp : getCompounds(false)) {
      if (comp.getStringValue((NominalProperty)p) != null)       d[count]=(double)ArrayUtil.indexOf(domain,comp.getStringValue((NominalProperty)p));
      count++;
    }
  }
  List<SALIProperty> l=SALIProperty.create(d,clusteringData.getFeatureDistanceMatrix().getValues(),p.toString());
  addNewAdditionalProperties(ListUtil.toArray(l),oldProps);
  return l.get(0);
}

Fixed version (ground truth):
@Override public CompoundProperty addSALIFeatures(CompoundProperty p){
  CompoundProperty oldProps[]=new CompoundProperty[0];
  for (  CompoundProperty prop : getAdditionalProperties())   if (prop instanceof SALIProperty)   oldProps=ArrayUtil.push(CompoundProperty.class,oldProps,prop);
  Double d[]=new Double[getNumCompounds(true)];
  String domain[]=null;
  if (p instanceof NominalProperty) {
    domain=((NominalProperty)p).getDomain();
    if (domain.length != 2)     throw new IllegalArgumentException("String_Node_Str");
  }
  for (int i=0; i < getNumCompounds(false); i++) {
    Compound c=null;
    for (    Compound comp : getCompounds(false)) {
      if (comp.getOrigIndex() == i) {
        c=comp;
        break;
      }
    }
    if (p instanceof NumericProperty) {
      if (c.getDoubleValue((NumericProperty)p) != null)       d[i]=getNormalizedDoubleValue(c,(NumericProperty)p);
    }
 else {
      if (c.getStringValue((NominalProperty)p) != null)       d[i]=(double)ArrayUtil.indexOf(domain,c.getStringValue((NominalProperty)p));
    }
  }
  List<SALIProperty> l=SALIProperty.create(d,clusteringData.getFeatureDistanceMatrix().getValues(),p.toString());
  addNewAdditionalProperties(ListUtil.toArray(l),oldProps);
  return l.get(0);
}
Program: 19856
Project: 19856
Buggy source:
public void setVolume(int volume){
  double value=volume * 1.9;
  double dB=getDB((int)Math.round(value));
  int linear=(int)Math.round(100.0 * Math.pow(10,dB / 10));
  volume=Math.min(linear,VLC_VOLUME_MAX);
  if (instance != null) {
    libvlc_exception_t ex=new libvlc_exception_t();
    libvlc.libvlc_audio_set_volume(instance,volume,ex);
    throwError(ex);
  }
}

Fixed version (ground truth):
public void setVolume(int volume){
  this.volume=volume;
  double value=volume * 1.9;
  double dB=getDB((int)Math.round(value));
  int linear=(int)Math.round(100.0 * Math.pow(10,dB / 10));
  volume=Math.min(linear,VLC_VOLUME_MAX);
  if (instance != null) {
    libvlc_exception_t ex=new libvlc_exception_t();
    libvlc.libvlc_audio_set_volume(instance,volume,ex);
    throwError(ex);
  }
}
Program: 19858
Project: 19858
Buggy source:
private String getMissionXML(Mission mission){
  StringBuilder sb=new StringBuilder();
  int phaseLength=0;
  int lastPhaseLength=0;
  int phase=1;
  sb.append("String_Node_Str");
  for (  Map.Entry<Integer,Event> entry : mission.getMissionEvents().getEntrySet()) {
    int time=entry.getKey();
    if (time >= phaseLength) {
      lastPhaseLength=phaseLength;
      phaseLength+=mission.getMissionPhaseLength(phase);
      sb.append("String_Node_Str" + mission.getMissionPhaseLength(phase) + "String_Node_Str");
      if (++phase >= 2) {
        sb.append("String_Node_Str").append(phase == 2 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
      }
    }
    sb.append("String_Node_Str").append((long)(time - lastPhaseLength) * 1000).append("String_Node_Str").append(entry.getValue().getXMLAttributes(time)).append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String getMissionXML(Mission mission){
  StringBuilder sb=new StringBuilder();
  int phaseLength=0;
  int lastPhaseLength=0;
  int phase=1;
  sb.append("String_Node_Str");
  for (  Map.Entry<Integer,Event> entry : mission.getMissionEvents().getEntrySet()) {
    int time=entry.getKey();
    if (time >= phaseLength) {
      lastPhaseLength=phaseLength;
      phaseLength+=mission.getMissionPhaseLength(phase);
      sb.append("String_Node_Str" + mission.getMissionPhaseLength(phase) + "String_Node_Str");
      if (phase >= 2) {
        sb.append("String_Node_Str").append(phase == 2 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
      }
      phase++;
    }
    sb.append("String_Node_Str").append((long)(time - lastPhaseLength) * 1000).append("String_Node_Str").append(entry.getValue().getXMLAttributes(time)).append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 19859
Project: 19859
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  boolean optionsOk=Options.parseOptions(args);
  Options options=Options.getOptions();
  if (!options.silent || !optionsOk) {
    MavenProperties mavenProperties=new MavenProperties("String_Node_Str","String_Node_Str");
    System.out.println("String_Node_Str" + mavenProperties.getVersionNumber() + "String_Node_Str"+ mavenProperties.getVersionTimestamp());
  }
  if (options.gui && !options.help) {
    System.out.println("String_Node_Str");
    return;
  }
  if (!optionsOk || options.help || (!options.play && options.output.size() == 0 && options.print.size() == 0)) {
    Options.printHelp();
    if (!optionsOk)     System.out.println("String_Node_Str");
    return;
  }
  new CommandLine().start();
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  boolean optionsOk=Options.parseOptions(args);
  Options options=Options.getOptions();
  if (!options.silent || !optionsOk) {
    MavenProperties mavenProperties=new MavenProperties("String_Node_Str","String_Node_Str");
    System.out.println("String_Node_Str" + mavenProperties.getVersionNumber() + "String_Node_Str"+ mavenProperties.getVersionTimestamp());
  }
  if (options.gui && !options.help) {
    System.out.println("String_Node_Str");
    return;
  }
  if (options.listRenderers) {
    printRenderers();
    return;
  }
  if (!optionsOk || options.help || (!options.play && options.output.size() == 0 && options.print.size() == 0)) {
    Options.printHelp();
    printRenderers();
    if (!optionsOk)     System.out.println("String_Node_Str");
    return;
  }
  new CommandLine().start();
}
Program: 19860
Project: 19860
Buggy source:
/** 
 * get renderers from Strings
 * @param rendererNames
 * @return
 */
private List<Renderer> getRendererClasses(List<String> rendererNames) throws Exception {
  if (rendererNames == null)   return null;
  List<Renderer> rendererList=new ArrayList<Renderer>(rendererNames.size());
  for (  String renderer : rendererNames) {
    renderer=upFirstLowerRest(renderer);
    try {
      rendererList.add((Renderer)Class.forName("String_Node_Str" + renderer + "String_Node_Str").newInstance());
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  return rendererList;
}

Fixed version (ground truth):
/** 
 * get renderers from Strings
 * @param rendererNames
 * @return
 */
private List<Renderer> getRendererClasses(List<String> rendererNames) throws Exception {
  if (rendererNames == null)   return null;
  List<Renderer> rendererList=new ArrayList<Renderer>(rendererNames.size());
  for (  String renderer : rendererNames) {
    renderer=upFirstLowerRest(renderer);
    try {
      rendererList.add((Renderer)Class.forName("String_Node_Str" + renderer + "String_Node_Str").newInstance());
    }
 catch (    ClassNotFoundException e) {
      throw new Exception("String_Node_Str" + renderer + "String_Node_Str");
    }
  }
  return rendererList;
}
Program: 19865
Project: 19865
Buggy source:
@Override public void onCreate(SQLiteDatabase db){
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str");
  insertConsoles(db);
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onCreate(SQLiteDatabase db){
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str");
  insertConsoles(db);
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  db.execSQL("String_Node_Str" + _ID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  onUpgrade(db,1,DATABASE_VERSION);
}
Program: 19866
Project: 19866
Buggy source:
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion){
}

Fixed version (ground truth):
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion){
  if (oldVersion < 2) {
    InsertHelper ih=new InsertHelper(db,"String_Node_Str");
    final int id=ih.getColumnIndex(_ID);
    final int name=ih.getColumnIndex("String_Node_Str");
    final int abbv=ih.getColumnIndex("String_Node_Str");
    ih.prepareForInsert();
    ih.bind(id,190);
    ih.bind(name,"String_Node_Str");
    ih.bind(abbv,"String_Node_Str");
    ih.execute();
    ih.prepareForInsert();
    ih.bind(id,191);
    ih.bind(name,"String_Node_Str");
    ih.bind(abbv,"String_Node_Str");
    ih.execute();
    ih.prepareForInsert();
    ih.bind(id,192);
    ih.bind(name,"String_Node_Str");
    ih.bind(abbv,"String_Node_Str");
    ih.execute();
    ih.prepareForInsert();
    ih.bind(id,193);
    ih.bind(name,"String_Node_Str");
    ih.bind(abbv,"String_Node_Str");
    ih.execute();
    ih.prepareForInsert();
    ih.bind(id,194);
    ih.bind(name,"String_Node_Str");
    ih.bind(abbv,"String_Node_Str");
    ih.execute();
  }
}
Program: 19868
Project: 19868
Buggy source:
public int getBoxQuantity(){
  return box;
}

Fixed version (ground truth):
public float getBoxQuantity(){
  return box;
}
Program: 19869
Project: 19869
Buggy source:
public void setManualQuantity(int man){
  this.man=man;
}

Fixed version (ground truth):
public void setManualQuantity(float man){
  this.man=man;
}
Program: 19870
Project: 19870
Buggy source:
public void setBoxQuantity(int box){
  this.box=box;
}

Fixed version (ground truth):
public void setBoxQuantity(float box){
  this.box=box;
}
Program: 19871
Project: 19871
Buggy source:
public int getGameQuantity(){
  return qty;
}

Fixed version (ground truth):
public float getGameQuantity(){
  return qty;
}
Program: 19872
Project: 19872
Buggy source:
public void setGameQuantity(int qty){
  this.qty=qty;
}

Fixed version (ground truth):
public void setGameQuantity(float qty){
  this.qty=qty;
}
Program: 19873
Project: 19873
Buggy source:
public int getManualQuantity(){
  return man;
}

Fixed version (ground truth):
public float getManualQuantity(){
  return man;
}
Program: 19875
Project: 19875
Buggy source:
public static List<Game> getSearchPage(String query,int page) throws Exception {
  List<Game> gameList=new ArrayList<Game>();
  try {
    Document document=Jsoup.connect(Constants.FUNCTION_SEARCH + "String_Node_Str" + Constants.PARAM_QUERY+ "String_Node_Str"+ URLEncoder.encode(query)+ "String_Node_Str"+ Constants.PARAM_FIRST_RESULT+ "String_Node_Str"+ getFirstResult(page)).timeout(Constants.TIMEOUT).get();
    Element table=document.select("String_Node_Str").get(0);
    Elements tableRows=table.select("String_Node_Str");
    for (int i=0; i < tableRows.size(); i++) {
      Elements tableData=tableRows.get(i).select("String_Node_Str");
      Game newGame=new Game();
      String href=tableData.get(3).select("String_Node_Str").first().attr("String_Node_Str");
      newGame.setRFGID(href.substring(href.indexOf("String_Node_Str") + 1));
      newGame.setConsole(tableData.get(0).text());
      newGame.setRegion(tableData.get(1).select("String_Node_Str").first().attr("String_Node_Str"));
      newGame.setType(tableData.get(2).text());
      newGame.setTitle(tableData.get(3).text());
      newGame.setPublisher(tableData.get(4).text());
      try {
        newGame.setYear(Integer.parseInt(tableData.get(5).text()));
      }
 catch (      Exception e) {
      }
      newGame.setGenre(tableData.get(6).text());
      gameList.add(newGame);
    }
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return gameList;
}

Fixed version (ground truth):
public static List<Game> getSearchPage(String query,int page) throws Exception {
  List<Game> gameList=new ArrayList<Game>();
  try {
    Document document=Jsoup.connect(Constants.FUNCTION_SEARCH + "String_Node_Str" + Constants.PARAM_QUERY+ "String_Node_Str"+ URLEncoder.encode(query)+ "String_Node_Str"+ Constants.PARAM_FIRST_RESULT+ "String_Node_Str"+ getFirstResult(page)).timeout(Constants.TIMEOUT).get();
    Element table=document.select("String_Node_Str").get(0);
    Elements tableRows=table.select("String_Node_Str");
    for (int i=0; i < tableRows.size(); i++) {
      Elements tableData=tableRows.get(i).select("String_Node_Str");
      Game newGame=new Game();
      String href=tableData.get(3).select("String_Node_Str").first().attr("String_Node_Str");
      newGame.setRFGID(href.substring(href.indexOf("String_Node_Str") + 1));
      newGame.setConsole(tableData.get(0).text());
      newGame.setRegion(tableData.get(1).select("String_Node_Str").first().attr("String_Node_Str"));
      newGame.setType(tableData.get(2).text());
      newGame.setTitle(tableData.get(3).text());
      newGame.setPublisher(tableData.get(4).text());
      try {
        newGame.setYear(Integer.parseInt(tableData.get(5).text()));
      }
 catch (      Exception e) {
      }
      newGame.setGenre(tableData.get(6).text());
      gameList.add(newGame);
    }
  }
 catch (  Exception e) {
  }
  return gameList;
}
Program: 19876
Project: 19876
Buggy source:
public static int getTotalPages(String query){
  int numPages=0;
  try {
    Document document=Jsoup.connect(Constants.FUNCTION_SEARCH + "String_Node_Str" + Constants.PARAM_QUERY+ "String_Node_Str"+ URLEncoder.encode(query)).timeout(Constants.TIMEOUT).get();
    Element div=document.select("String_Node_Str").get(1);
    String divText=div.text().substring(div.text().indexOf("String_Node_Str") + 3);
    numPages=(int)Math.ceil(Integer.parseInt(divText.substring(0,divText.indexOf("String_Node_Str"))) / 50.0);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  return numPages;
}

Fixed version (ground truth):
public static int getTotalPages(String query){
  int numPages=0;
  try {
    Document document=Jsoup.connect(Constants.FUNCTION_SEARCH + "String_Node_Str" + Constants.PARAM_QUERY+ "String_Node_Str"+ URLEncoder.encode(query)).timeout(Constants.TIMEOUT).get();
    Element div=document.select("String_Node_Str").get(1);
    String divText=div.text().substring(div.text().indexOf("String_Node_Str") + 3);
    numPages=(int)Math.ceil(Integer.parseInt(divText.substring(0,divText.indexOf("String_Node_Str"))) / 50.0);
  }
 catch (  Exception e) {
  }
  return numPages;
}
Program: 19877
Project: 19877
Buggy source:
public static List<Folder> getCollectionFolders(Context ctx){
  List<Folder> folderList=new ArrayList<Folder>();
  try {
    Log.i(TAG,"String_Node_Str" + Constants.FUNCTION_FOLDERS);
    Document document=Jsoup.connect(Constants.FUNCTION_FOLDERS).cookie(Constants.LOGIN_COOKIE,LoginScraper.getCookie(ctx)).timeout(Constants.TIMEOUT).get();
    Log.i(TAG,"String_Node_Str" + document.baseUri());
    if (!Constants.FUNCTION_FOLDERS.equals(document.baseUri()))     Log.e(TAG,"String_Node_Str");
    Element table=document.select("String_Node_Str").get(0);
    Elements tableRows=table.select("String_Node_Str");
    for (int i=0; i < tableRows.size(); i++) {
      Elements tableData=tableRows.get(i).select("String_Node_Str");
      Folder newFolder=new Folder();
      newFolder.setName(tableData.get(0).text());
      newFolder.setOwned(tableData.get(4).text().equals("String_Node_Str"));
      newFolder.setForSale(tableData.get(5).text().equals("String_Node_Str"));
      newFolder.setPrivate(tableData.get(6).text().split("String_Node_Str")[0].equals("String_Node_Str"));
      folderList.add(newFolder);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  return folderList;
}

Fixed version (ground truth):
public static List<Folder> getCollectionFolders(Context ctx){
  List<Folder> folderList=new ArrayList<Folder>();
  try {
    Log.i(TAG,"String_Node_Str" + Constants.FUNCTION_FOLDERS);
    Document document=Jsoup.connect(Constants.FUNCTION_FOLDERS).cookie(Constants.LOGIN_COOKIE,LoginScraper.getCookie(ctx)).timeout(Constants.TIMEOUT).get();
    Log.i(TAG,"String_Node_Str" + document.baseUri());
    if (!Constants.FUNCTION_FOLDERS.equals(document.baseUri()))     Log.e(TAG,"String_Node_Str");
    Element table=document.select("String_Node_Str").get(0);
    Elements tableRows=table.select("String_Node_Str");
    for (int i=0; i < tableRows.size(); i++) {
      Elements tableData=tableRows.get(i).select("String_Node_Str");
      Folder newFolder=new Folder();
      newFolder.setName(tableData.get(0).text());
      newFolder.setOwned(tableData.get(4).text().equals("String_Node_Str"));
      newFolder.setForSale(tableData.get(5).text().equals("String_Node_Str"));
      newFolder.setPrivate(tableData.get(6).text().split("String_Node_Str")[0].equals("String_Node_Str"));
      folderList.add(newFolder);
    }
    if (folderList.size() == 0) {
      createAccount(ctx);
      folderList=getCollectionFolders(ctx);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  return folderList;
}