nus-yam/ex-repair huggingface dataset:
Program: 25184
Project: 25184
Buggy source:
public List<Game> getUnfinishedGames(Registrant player){
  em.clear();
  List<Game> ret=new ArrayList<Game>();
  Query query=em.createNamedQuery("String_Node_Str");
  query.setParameter("String_Node_Str",player);
  query.setParameter("String_Node_Str",GameState.ENDED);
  query.setLockMode(LockModeType.PESSIMISTIC_READ);
  List<Game> games=query.getResultList();
  for (  Game game : games) {
    ret.add(game);
  }
  return ret;
}

Fixed version (ground truth):
public List<Game> getUnfinishedGames(Registrant player){
  em.clear();
  List<Game> ret=new ArrayList<Game>();
  Query query=em.createNamedQuery("String_Node_Str");
  query.setParameter("String_Node_Str",player);
  query.setParameter("String_Node_Str",GameState.ENDED);
  List<Game> games=query.getResultList();
  for (  Game game : games) {
    ret.add(game);
  }
  return ret;
}
Program: 25185
Project: 25185
Buggy source:
public Suggestion makeSuggestion(Game game,Suggestion suggestion) throws InvalidSuggestionException {
  if (em.contains(game))   em.refresh(game);
 else   game=em.find(game.getClass(),game.getId());
  Move move=suggestion.listMove();
  List<GamePlayer> players=game.listPlayers();
  for (  GamePlayer p : players) {
    if (p.equals(move.getPlayerModel())) {
      move.setPlayerModel(p);
      break;
    }
  }
  Cell current=move.getCurrentCell();
  Cell destination=move.getDestinationCell();
  if (current != null) {
    if (!em.contains(current)) {
      Cell impl=(em.find(current.getClass(),current.getId()));
      if (impl != null)       current=impl;
    }
    move.setCurrentCell(current);
  }
  if (destination != null) {
    if (!em.contains(destination)) {
      Cell impl=(em.find(destination.getClass(),destination.getId()));
      if (impl != null)       destination=impl;
    }
    move.setDestinationCell(destination);
  }
  if (em.contains(suggestion)) {
    em.refresh(suggestion);
  }
 else   em.merge(suggestion);
  game.setMessageSender(messageSender);
  suggestion=game.suggest(suggestion);
  if (suggestion.getStatus().equals(SuggestionStatus.INVALID))   throw new InvalidSuggestionException("String_Node_Str");
  return suggestion;
}

Fixed version (ground truth):
public Suggestion makeSuggestion(Game game,Suggestion suggestion) throws InvalidSuggestionException {
  if (em.contains(game))   em.refresh(game,LockModeType.PESSIMISTIC_WRITE);
 else   game=em.find(game.getClass(),game.getId(),LockModeType.PESSIMISTIC_WRITE);
  Move move=suggestion.listMove();
  GamePlayer player=suggestion.listSuggestor();
  Cell current=move.getCurrentCell();
  Cell destination=move.getDestinationCell();
  if (suggestion.getId() == 0) {
    suggestion.attachSuggestor(null);
    suggestion.attachMove(null);
    em.persist(suggestion);
  }
  if (move.getId() == 0) {
    move.setPlayerModel(null);
    move.setCurrentCell(null);
    move.setDestinationCell(null);
    em.persist(move);
    move.setPlayerModel(player);
    move.setDestinationCell(destination);
    move.setCurrentCell(current);
  }
  suggestion.attachSuggestor(player);
  suggestion.attachMove(move);
  suggestion=em.merge(suggestion);
  game.setMessageSender(messageSender);
  suggestion=game.suggest(suggestion);
  if (suggestion.getStatus().equals(SuggestionStatus.INVALID))   throw new InvalidSuggestionException("String_Node_Str");
  em.flush();
  return suggestion;
}
Program: 25186
Project: 25186
Buggy source:
public Game getGame(int gameId){
  Game game=em.find(GridGame.class,gameId);
  game.setMessageSender(messageSender);
  return game;
}

Fixed version (ground truth):
public Game getGame(int gameId){
  Game game=em.find(GridGame.class,gameId,LockModeType.PESSIMISTIC_WRITE);
  game.setMessageSender(messageSender);
  em.flush();
  return game;
}
Program: 25187
Project: 25187
Buggy source:
public Move doMove(Game game,Move move) throws InvalidMoveException {
  if (em.contains(game))   em.refresh(game);
 else   game=em.find(game.getClass(),game.getId());
  List<GamePlayer> players=game.listPlayers();
  for (  GamePlayer p : players) {
    if (p.equals(move.getPlayerModel())) {
      move.setPlayerModel(p);
      break;
    }
  }
  Cell current=move.getCurrentCell();
  Cell destination=move.getDestinationCell();
  if (current != null) {
    if (!em.contains(current)) {
      Cell impl=(em.find(current.getClass(),current.getId()));
      if (impl != null)       current=impl;
    }
    move.setCurrentCell(current);
  }
  if (destination != null) {
    if (!em.contains(destination)) {
      Cell impl=(em.find(destination.getClass(),destination.getId()));
      if (impl != null)       destination=impl;
    }
    move.setDestinationCell(destination);
  }
  em.merge(move);
  game.setMessageSender(messageSender);
  move=game.move(move);
  if (move.getStatus().equals(MoveStatus.INVALID))   throw new InvalidMoveException("String_Node_Str" + move.toString() + "String_Node_Str");
  return move;
}

Fixed version (ground truth):
public Move doMove(Game game,Move move) throws InvalidMoveException {
  GamePlayer player=move.getPlayerModel();
  Cell current=move.getCurrentCell();
  Cell destination=move.getDestinationCell();
  if (move.getId() == 0) {
    move.setPlayerModel(null);
    move.setCurrentCell(null);
    move.setDestinationCell(null);
    em.persist(move);
    move.setPlayerModel(player);
    move.setDestinationCell(destination);
    move.setCurrentCell(current);
  }
  move=em.merge(move);
  game=em.find(game.getClass(),game.getId(),LockModeType.PESSIMISTIC_WRITE);
  game.setMessageSender(messageSender);
  game.move(move);
  if (move.getStatus().equals(MoveStatus.INVALID))   throw new InvalidMoveException("String_Node_Str" + move.toString() + "String_Node_Str");
  em.flush();
  return move;
}
Program: 25188
Project: 25188
Buggy source:
public void shareGame(Game impl){
  em.merge(impl);
}

Fixed version (ground truth):
public void shareGame(Game impl){
  em.merge(impl);
  em.flush();
}
Program: 25189
Project: 25189
Buggy source:
public Move doMove(Game game,Move move) throws InvalidMoveException {
  game=em.find(game.getClass(),game.getId());
  move=em.merge(move);
  game.setMessageSender(messageSender);
  move=game.move(move);
  if (move.getStatus().equals(MoveStatus.INVALID))   throw new InvalidMoveException("String_Node_Str" + move.toString() + "String_Node_Str");
  return move;
}

Fixed version (ground truth):
public Move doMove(Game game,Move move) throws InvalidMoveException {
  if (game == null)   throw new InvalidMoveException("String_Node_Str");
  game=em.find(game.getClass(),game.getId());
  if (move == null)   throw new InvalidMoveException("String_Node_Str");
  move=em.merge(move);
  game.setMessageSender(messageSender);
  move=game.move(move);
  if (move.getStatus().equals(MoveStatus.INVALID))   throw new InvalidMoveException("String_Node_Str" + move.toString() + "String_Node_Str");
  return move;
}
Program: 25191
Project: 25191
Buggy source:
public void setCells(Set<GridCell> c){
  cells=c;
}

Fixed version (ground truth):
public void setCells(Set<GridCell> c){
  this.cells=new TreeSet<GridCell>(new CellComparator());
  this.cells.addAll(cells);
}
Program: 25192
Project: 25192
Buggy source:
public GridCell getLocation(GridCell location){
  GridCell ret=null;
  if (location != null) {
    TreeSet<GridCell> treeSet=new TreeSet<GridCell>(new CellComparator());
    for (    GridCell cell : cells) {
      treeSet.add(cell);
    }
    CellComparator comparator=(CellComparator)treeSet.comparator();
    SortedSet<GridCell> sublist=treeSet.tailSet(location);
    for (    GridCell c : sublist) {
      int value=comparator.compare(location,c);
      if (value == 0) {
        ret=c;
        break;
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public GridCell getLocation(GridCell location){
  GridCell ret=null;
  if (location != null) {
    CellComparator comparator=new CellComparator();
    TreeSet<GridCell> treeSet=new TreeSet<GridCell>(comparator);
    for (    GridCell cell : cells) {
      treeSet.add(cell);
    }
    SortedSet<GridCell> sublist=treeSet.tailSet(location);
    for (    GridCell c : sublist) {
      int value=comparator.compare(location,c);
      if (value == 0) {
        ret=c;
        break;
      }
    }
  }
  return ret;
}
Program: 25193
Project: 25193
Buggy source:
@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.EAGER) public Set<GridCell> getCells(){
  return cells;
}

Fixed version (ground truth):
@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.EAGER) @Sort(comparator=CellComparator.class) public Set<GridCell> getCells(){
  if (cells == null)   cells=new TreeSet<GridCell>(new CellComparator());
  return cells;
}
Program: 25194
Project: 25194
Buggy source:
public void updateCell(GridCell cell){
  if (cells == null)   cells=new LinkedHashSet<GridCell>();
  if (cells.contains(cell))   cells.remove(cell);
  cells.add(cell);
}

Fixed version (ground truth):
public void updateCell(GridCell cell){
  if (cells == null)   cells=new TreeSet<GridCell>(new CellComparator());
  if (cells.contains(cell))   cells.remove(cell);
  cells.add(cell);
}
Program: 25195
Project: 25195
Buggy source:
public void sendMessage(int gameId,GameEvent gameEvent,Serializable body){
  try {
    Connection connection=connectionFactory.createConnection();
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    MessageProducer producer=session.createProducer(topic);
    ObjectMessage message=session.createObjectMessage();
    message.setIntProperty("String_Node_Str",gameId);
    message.setStringProperty("String_Node_Str",gameEvent.toString());
    message.setLongProperty("String_Node_Str",getNextMessageId(gameId));
    if (body != null) {
      message.setObject(body);
    }
    producer.send(message);
    session.close();
    connection.close();
  }
 catch (  JMSException e) {
    logger.severe("String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void sendMessage(int gameId,GameEvent gameEvent,Serializable body){
  if (connectionFactory == null)   initialize();
  try {
    Connection connection=connectionFactory.createConnection();
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    MessageProducer producer=session.createProducer(topic);
    ObjectMessage message=session.createObjectMessage();
    message.setIntProperty("String_Node_Str",gameId);
    message.setStringProperty("String_Node_Str",gameEvent.toString());
    message.setLongProperty("String_Node_Str",getNextMessageId(gameId));
    if (body != null) {
      message.setObject(body);
    }
    producer.send(message);
    session.close();
    connection.close();
  }
 catch (  JMSException e) {
    logger.severe("String_Node_Str");
    e.printStackTrace();
  }
}
Program: 25196
Project: 25196
Buggy source:
public void onEnable(){
  logManager.info("String_Node_Str");
  PluginManager pluginManager=getServer().getPluginManager();
  pluginManager.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
  dbman.connect();
  if (!propman.fileExists()) {
    propman.setup();
  }
}

Fixed version (ground truth):
public void onEnable(){
  logManager.info("String_Node_Str");
  PluginManager pluginManager=getServer().getPluginManager();
  pluginManager.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
  dbman.connect();
  if (!propman.fileExists()) {
    propman.setup();
  }
  permMan=new RentPermissionsManager(this);
}
Program: 25197
Project: 25197
Buggy source:
/** 
 * Constructs a RentPropertiesManager using the given properties file name.
 * @param propertiesName The name of the properties file to use.
 */
public RentPropertiesManager(String propertiesName){
  this.propertiesName=propertiesName;
  propFile=new File(RentDirectoryManager.getPathInDir(this.propertiesName));
  if (!fileExists()) {
    setup();
  }
  prop=new Properties();
  logManager=new RentLogManager(Logger.getLogger("String_Node_Str"));
  update();
  setupDefaults();
  checkDefaults();
}

Fixed version (ground truth):
/** 
 * Constructs a RentPropertiesManager using the given properties file name.
 * @param propertiesName The name of the properties file to use.
 */
public RentPropertiesManager(String propertiesName){
  this.propertiesName=propertiesName;
  propFile=new File(RentDirectoryManager.getPathInDir(this.propertiesName));
  prop=new Properties();
  logManager=new RentLogManager(Logger.getLogger("String_Node_Str"));
  if (!fileExists()) {
    if (!RentDirectoryManager.directoryExists()) {
      RentDirectoryManager.createDirectory();
    }
    setup();
  }
  update();
  setupDefaults();
  checkDefaults();
}
Program: 25198
Project: 25198
Buggy source:
/** 
 * Returns the total amount a player owes. This <b>DOES NOT</b> include the current month in these calculations.
 * @param playerID The {@code int} database ID number of the requested player.
 * @return The total amount the player owes (could include {@code 0} or negative values) or {@code 0} if an the requested player does not exist.
 */
public double getAmountPlayerOwes(int playerID){
  if (!dbMan.playerExists(dbMan.getPlayerFromID(playerID))) {
    return 0;
  }
  String currentMonth=dateUtils.getCurrentMonth();
  int currentMonthID=dbMan.getMonthID(currentMonth);
  ArrayList<Integer> playerLogins=dbMan.getMonthsPlayerLoggedIn(playerID);
  playerLogins.remove(new Integer(currentMonthID));
  while (playerLogins.contains(new Integer(currentMonthID))) {
    playerLogins.remove(new Integer(currentMonthID));
  }
  double sum=0.0;
  for (  Integer monthIDNum : playerLogins) {
    sum+=getIndividualRate(monthIDNum);
  }
  return sum;
}

Fixed version (ground truth):
/** 
 * Returns the total amount a player owes. This <b>DOES NOT</b> include the current month in these calculations.
 * @param playerID The {@code int} database ID number of the requested player.
 * @return The total amount the player owes (could include {@code 0} or negative values) or {@code 0} if an the requested player does not exist.
 */
public double getAmountPlayerOwes(int playerID){
  if (!dbMan.playerExists(dbMan.getPlayerFromID(playerID))) {
    return 0;
  }
  return getPlayerCost(playerID) - dbMan.getPlayerPayments(playerID);
}
Program: 25199
Project: 25199
Buggy source:
public void onEnable(){
  logManager.info("String_Node_Str");
  PluginManager pluginManager=getServer().getPluginManager();
  pluginManager.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
  pluginManager.registerEvent(Event.Type.PLAYER_LOGIN,playerListener,Priority.Normal,this);
  dbman.connect();
  if (!propman.fileExists()) {
    propman.setup();
  }
  permMan=new RentPermissionsManager(this);
}

Fixed version (ground truth):
public void onEnable(){
  logManager.info("String_Node_Str");
  PluginManager pluginManager=getServer().getPluginManager();
  dbman.connect();
  if (!propman.fileExists()) {
    propman.setup();
  }
  permMan=new RentPermissionsManager(this);
  playerListener=new RentPlayerListener(this);
  pluginManager.registerEvent(Event.Type.PLAYER_LOGIN,playerListener,Priority.Normal,this);
  pluginManager.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
}
Program: 25200
Project: 25200
Buggy source:
/** 
 * Returns the lowercase player name of the player with the specified id.   {@code null} if the player is not in the database or if an error occurs. 
 * @param id The integer database id number of the player.
 * @return The lowercase name of the player corresponding to the id in the database. {@code null} if the player does not exist or if an error occurs.
 */
public String getPlayerFromID(int id){
  try {
    Statement statement=conn.createStatement();
    ResultSet resultSet=statement.executeQuery("String_Node_Str" + id + "String_Node_Str");
    if (!resultSet.isBeforeFirst()) {
      resultSet.close();
      return null;
    }
    String name=resultSet.getString("String_Node_Str").toLowerCase();
    resultSet.close();
    return name;
  }
 catch (  SQLException e) {
    logManager.severe("String_Node_Str" + new Integer(id).toString() + "String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the lowercase player name of the player with the specified id.   {@code null} if the player is not in the database or if an error occurs. 
 * @param id The integer database id number of the player.
 * @return The lowercase name of the player corresponding to the id in the database. {@code null} if the player does not exist or if an error occurs.
 */
public String getPlayerFromID(int id){
  try {
    Statement statement=conn.createStatement();
    ResultSet resultSet=statement.executeQuery("String_Node_Str" + new Integer(id).toString() + "String_Node_Str");
    if (!resultSet.isBeforeFirst()) {
      resultSet.close();
      return null;
    }
    String name=resultSet.getString("String_Node_Str").toLowerCase();
    resultSet.close();
    return name;
  }
 catch (  SQLException e) {
    logManager.severe("String_Node_Str" + new Integer(id).toString() + "String_Node_Str");
  }
  return null;
}
Program: 25201
Project: 25201
Buggy source:
/** 
 * Adds the specified player to the database.   {@code userName} is turned into a lowercase string before storage.<br/>Adds the player even if a player with the same name is already stored.
 * @param userName The name of the player to add to the database.
 */
public void addPlayer(String userName){
  String workingUserName=userName.toLowerCase();
  try {
    PreparedStatement statement=conn.prepareStatement("String_Node_Str");
    statement.setString(1,workingUserName);
    statement.addBatch();
    conn.setAutoCommit(false);
    statement.executeBatch();
    conn.setAutoCommit(true);
  }
 catch (  SQLException e) {
    logManager.severe("String_Node_Str" + workingUserName + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Adds the specified player to the database.   {@code userName} is turned into a lowercase string before storage.<br/>Adds the player even if a player with the same name is already stored.
 * @param userName The name of the player to add to the database.
 */
public void addPlayer(String userName){
  String workingUserName=userName.toLowerCase();
  try {
    PreparedStatement statement=conn.prepareStatement("String_Node_Str");
    statement.setString(1,workingUserName);
    statement.setDouble(2,0);
    statement.addBatch();
    conn.setAutoCommit(false);
    statement.executeBatch();
    conn.setAutoCommit(true);
  }
 catch (  SQLException e) {
    logManager.severe("String_Node_Str" + workingUserName + "String_Node_Str");
  }
}
Program: 25203
Project: 25203
Buggy source:
public void onDestroy(){
  DebugLog.writeActivity(DebugType.DT_DEBUG,"String_Node_Str");
  gatorObject.sendMessageToCache(CacheMessage.SHUTDOWN);
  super.onDestroy();
}

Fixed version (ground truth):
public void onDestroy(){
  DebugLog.writeActivity(DebugType.DT_DEBUG,"String_Node_Str");
  if (gatorObject != null) {
    gatorObject.sendMessageToCache(CacheMessage.SHUTDOWN);
  }
  super.onDestroy();
}
Program: 25204
Project: 25204
Buggy source:
public void onListItemClick(ListView l,View v,int pos,long id){
  List<TitleModel> actlist=partedList.getListByStatus(isUnreadsActive);
  TitleModel title=actlist.get(pos);
  AsyncTask<TitleModel,Void,String> task=new AsyncTask<TitleModel,Void,String>(){
    @Override protected String doInBackground(    TitleModel... params){
      final String url=params[0].getEksiSozlukUrl();
      gatorObject.setItemAsRead(params[0]);
      return url;
    }
    @Override protected void onPostExecute(    String s){
      Intent browserintent=new Intent(Intent.ACTION_VIEW,Uri.parse(s));
      startActivity(browserintent);
    }
  }
;
  task.execute(title);
}

Fixed version (ground truth):
public void onListItemClick(ListView l,View v,int pos,long id){
  List<TitleModel> actlist=partedList.getListByStatus(isUnreadsActive);
  TitleModel title=actlist.get(pos);
  AsyncTask<TitleModel,Void,String> task=new AsyncTask<TitleModel,Void,String>(){
    @Override protected String doInBackground(    TitleModel... params){
      final String url=params[0].getEksiSozlukUrl();
      if (params[0].getStatus()) {
        gatorObject.setItemAsRead(params[0]);
      }
      return url;
    }
    @Override protected void onPostExecute(    String s){
      Intent browserintent=new Intent(Intent.ACTION_VIEW,Uri.parse(s));
      startActivity(browserintent);
      MainActivity.refreshOnResume=true;
    }
  }
;
  task.execute(title);
}
Program: 25205
Project: 25205
Buggy source:
public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
switch (id) {
case M_SETTING:
{
      Intent intent=new Intent(this,Preferences.class);
      startActivity(intent);
      break;
    }
case M_EXITAPP:
{
    if (gatorObject != null) {
      gatorObject.sendMessageToCache(CacheMessage.SHUTDOWN);
    }
    this.finish();
    break;
  }
case M_TITLEMGR:
{
  Intent intent=new Intent(this,TitleListManagerActivity.class);
  startActivity(intent);
  break;
}
case M_ABOUT:
{
final Dialog aboutDlg=new Dialog(this);
aboutDlg.setContentView(R.layout.about_dialog);
aboutDlg.setTitle("String_Node_Str");
aboutDlg.setCancelable(true);
aboutDlg.show();
((Button)aboutDlg.findViewById(R.id.clbtn)).setOnClickListener(new OnClickListener(){
  @Override public void onClick(  View v){
    aboutDlg.dismiss();
  }
}
);
}
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
switch (id) {
case M_SETTING:
{
      Intent intent=new Intent(this,Preferences.class);
      startActivity(intent);
      break;
    }
case M_EXITAPP:
{
    if (gatorObject != null) {
      gatorObject.sendMessageToCache(CacheMessage.SHUTDOWN);
    }
    closeApp();
    break;
  }
case M_TITLEMGR:
{
  Intent intent=new Intent(this,TitleListManagerActivity.class);
  startActivity(intent);
  break;
}
case M_ABOUT:
{
final Dialog aboutDlg=new Dialog(this);
aboutDlg.setContentView(R.layout.about_dialog);
aboutDlg.setTitle("String_Node_Str");
aboutDlg.setCancelable(true);
aboutDlg.show();
((Button)aboutDlg.findViewById(R.id.clbtn)).setOnClickListener(new OnClickListener(){
  @Override public void onClick(  View v){
    aboutDlg.dismiss();
  }
}
);
}
}
return super.onOptionsItemSelected(item);
}
Program: 25206
Project: 25206
Buggy source:
@Override protected String doInBackground(TitleModel... params){
  final String url=params[0].getEksiSozlukUrl();
  gatorObject.setItemAsRead(params[0]);
  return url;
}

Fixed version (ground truth):
@Override protected String doInBackground(TitleModel... params){
  final String url=params[0].getEksiSozlukUrl();
  if (params[0].getStatus()) {
    gatorObject.setItemAsRead(params[0]);
  }
  return url;
}
Program: 25207
Project: 25207
Buggy source:
@Override protected void onPostExecute(String s){
  Intent browserintent=new Intent(Intent.ACTION_VIEW,Uri.parse(s));
  startActivity(browserintent);
}

Fixed version (ground truth):
@Override protected void onPostExecute(String s){
  Intent browserintent=new Intent(Intent.ACTION_VIEW,Uri.parse(s));
  startActivity(browserintent);
  MainActivity.refreshOnResume=true;
}
Program: 25208
Project: 25208
Buggy source:
private void disconnectService(){
  unbindService(servConnection);
  connectedToService=false;
}

Fixed version (ground truth):
private void disconnectService(){
  if (servConnection != null) {
    unbindService(servConnection);
  }
  connectedToService=false;
}
Program: 25209
Project: 25209
Buggy source:
public void onStop(){
  DebugLog.writeActivity(DebugType.DT_DEBUG,"String_Node_Str");
  if (Helper.isSuspendable(this)) {
    gatorObject.sendMessageToCache(CacheMessage.PASSIVE);
    disconnectService();
  }
  super.onStop();
}

Fixed version (ground truth):
public void onStop(){
  DebugLog.writeActivity(DebugType.DT_DEBUG,"String_Node_Str");
  if (Helper.isSuspendable(this)) {
    if (gatorObject != null)     gatorObject.sendMessageToCache(CacheMessage.PASSIVE);
    disconnectService();
  }
  super.onStop();
}
Program: 25210
Project: 25210
Buggy source:
public static Settings readPreferences(Context context){
  Settings settings=new Settings();
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context);
  settings.mail=pref.getString("String_Node_Str","String_Node_Str");
  settings.apiKey=pref.getString("String_Node_Str","String_Node_Str");
  settings.commitEnabled=!pref.getBoolean("String_Node_Str",true);
  return settings;
}

Fixed version (ground truth):
public static Settings readPreferences(Context context){
  Settings settings=new Settings();
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context);
  settings.mail=pref.getString("String_Node_Str","String_Node_Str");
  settings.apiKey=pref.getString("String_Node_Str","String_Node_Str");
  settings.commitEnabled=!pref.getBoolean("String_Node_Str",true);
  if (!pref.contains("String_Node_Str"))   pref.edit().putBoolean("String_Node_Str",true);
  return settings;
}
Program: 25213
Project: 25213
Buggy source:
@Override protected void onPostExecute(ResultContainer result){
  String toastText=null;
  progressDlg.dismiss();
switch (result.getMessage()) {
case PU_STAT_OK:
    toastText=String.format("String_Node_Str",result.getExtra());
  break;
case PU_STAT_ERR:
{
  toastText="String_Node_Str";
  break;
}
case PU_STAT_MOVED:
{
toastText=String.format("String_Node_Str",result.getExtra(),result.getExtra2(),result.getExtra2());
break;
}
case PU_STAT_NOT_FOUND:
{
toastText=String.format("String_Node_Str",result.getExtra());
break;
}
}
if (toastText != null) {
Toast.makeText(getBaseContext(),toastText,Toast.LENGTH_LONG).show();
}
}

Fixed version (ground truth):
@Override protected void onPostExecute(ResultContainer result){
  String toastText=null;
  if (progressDlg != null)   progressDlg.dismiss();
switch (result.getMessage()) {
case PU_STAT_OK:
    toastText=String.format("String_Node_Str",result.getExtra());
  break;
case PU_STAT_ERR:
{
  toastText="String_Node_Str";
  break;
}
case PU_STAT_MOVED:
{
toastText=String.format("String_Node_Str",result.getExtra(),result.getExtra2(),result.getExtra2());
break;
}
case PU_STAT_NOT_FOUND:
{
toastText=String.format("String_Node_Str",result.getExtra());
break;
}
}
if (toastText != null) {
Toast.makeText(getBaseContext(),toastText,Toast.LENGTH_LONG).show();
}
}
Program: 25215
Project: 25215
Buggy source:
public void removeDiamond(Player player){
  ItemStack[] inventory=player.getInventory().getContents();
  for (  ItemStack x : inventory) {
    if (x.getTypeId() == 264) {
      if (x.getAmount() == 1) {
        x.setTypeId(0);
        x.setAmount(0);
        player.getInventory().setContents(inventory);
      }
 else {
        x.setAmount(x.getAmount() - 1);
        player.getInventory().setContents(inventory);
      }
    }
  }
}

Fixed version (ground truth):
public void removeDiamond(Player player){
  ItemStack[] inventory=player.getInventory().getContents();
  for (  ItemStack x : inventory) {
    if (x.getTypeId() == 264) {
      if (x.getAmount() == 1) {
        x.setTypeId(0);
        x.setAmount(0);
        player.getInventory().setContents(inventory);
      }
 else {
        x.setAmount(x.getAmount() - 1);
        player.getInventory().setContents(inventory);
      }
      return;
    }
  }
}
Program: 25217
Project: 25217
Buggy source:
public void onPlayerChat(PlayerChatEvent event){
  Player player=event.getPlayer();
  String[] split=event.getMessage().split("String_Node_Str");
  String x=ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.GREEN+ "String_Node_Str";
  String y=ChatColor.AQUA + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.AQUA+ "String_Node_Str";
  if (mcConfig.getInstance().isPartyToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (mcUsers.getProfile(herp).inParty()) {
        if (mcm.inSameParty(herp,player)) {
          herp.sendMessage(x + event.getMessage());
        }
      }
    }
    return;
  }
  if (player.isOp() && mcConfig.getInstance().isAdminToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (herp.isOp()) {
        herp.sendMessage(y + event.getMessage());
      }
    }
    return;
  }
  if (player.isOp()) {
    event.setCancelled(true);
    for (    Player derp : plugin.getServer().getOnlinePlayers()) {
      String z=ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.RED+ "String_Node_Str"+ ChatColor.WHITE;
      derp.sendMessage(z + event.getMessage());
    }
  }
}

Fixed version (ground truth):
public void onPlayerChat(PlayerChatEvent event){
  Player player=event.getPlayer();
  String[] split=event.getMessage().split("String_Node_Str");
  String x=ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.GREEN+ "String_Node_Str";
  String y=ChatColor.AQUA + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.AQUA+ "String_Node_Str";
  if (mcConfig.getInstance().isPartyToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (mcUsers.getProfile(herp).inParty()) {
        if (mcm.getInstance().inSameParty(herp,player)) {
          herp.sendMessage(x + event.getMessage());
        }
      }
    }
    return;
  }
  if (player.isOp() && mcConfig.getInstance().isAdminToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (herp.isOp()) {
        herp.sendMessage(y + event.getMessage());
      }
    }
    return;
  }
  if (player.isOp()) {
    event.setCancelled(true);
    for (    Player derp : plugin.getServer().getOnlinePlayers()) {
      String z=ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.RED+ "String_Node_Str"+ ChatColor.WHITE;
      derp.sendMessage(z + event.getMessage());
    }
  }
}
Program: 25219
Project: 25219
Buggy source:
public static boolean inSameParty(Player playera,Player playerb){
  if (mcUsers.getProfile(playera).getParty().equals(mcUsers.getProfile(playerb).getParty())) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean inSameParty(Player playera,Player playerb){
  if (mcUsers.getProfile(playera).getParty().equals(mcUsers.getProfile(playerb).getParty())) {
    return true;
  }
 else {
    return false;
  }
}
Program: 25222
Project: 25222
Buggy source:
public void loadUsers(){
  File theDir=new File(location);
  if (!theDir.exists()) {
    FileWriter writer=null;
    try {
      writer=new FileWriter(location);
      writer.write("String_Node_Str");
      writer.write("String_Node_Str");
    }
 catch (    Exception e) {
      log.log(Level.SEVERE,"String_Node_Str" + location,e);
    }
 finally {
      try {
        if (writer != null) {
          writer.close();
        }
      }
 catch (      IOException e) {
        log.log(Level.SEVERE,"String_Node_Str" + location,e);
      }
    }
  }
 else {
    try {
      load();
    }
 catch (    IOException e) {
      log.log(Level.SEVERE,"String_Node_Str" + location,e);
    }
  }
}

Fixed version (ground truth):
public void loadUsers(){
  File theDir=new File(location);
  if (!theDir.exists()) {
    FileWriter writer=null;
    try {
      writer=new FileWriter(location);
      writer.write("String_Node_Str");
    }
 catch (    Exception e) {
      log.log(Level.SEVERE,"String_Node_Str" + location,e);
    }
 finally {
      try {
        if (writer != null) {
          writer.close();
        }
      }
 catch (      IOException e) {
        log.log(Level.SEVERE,"String_Node_Str" + location,e);
      }
    }
  }
 else {
    try {
      load();
    }
 catch (    IOException e) {
      log.log(Level.SEVERE,"String_Node_Str" + location,e);
    }
  }
}
Program: 25223
Project: 25223
Buggy source:
public boolean load(){
  try {
    FileReader file=new FileReader(location);
    BufferedReader in=new BufferedReader(file);
    String line="String_Node_Str";
    while ((line=in.readLine()) != null) {
      String[] character=line.split("String_Node_Str");
      if (!character[0].equals(playerName)) {
        continue;
      }
      if (character.length > 1)       mining=character[1];
      if (character.length > 2)       myspawn=character[2];
      if (character.length > 3)       party=character[3];
      if (character.length > 4)       gather=character[4];
      if (character.length > 5)       woodcutting=character[5];
      if (character.length > 6)       wgather=character[6];
      if (character.length > 7)       repair=character[7];
      if (character.length > 8)       unarmed=character[8];
      if (character.length > 9)       herbalism=character[9];
      if (character.length > 10)       repair=character[10];
      if (character.length > 11)       excavation=character[11];
      in.close();
      return true;
    }
    in.close();
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"String_Node_Str" + location + "String_Node_Str",e);
  }
  return false;
}

Fixed version (ground truth):
public boolean load(){
  try {
    FileReader file=new FileReader(location);
    BufferedReader in=new BufferedReader(file);
    String line="String_Node_Str";
    while ((line=in.readLine()) != null) {
      String[] character=line.split("String_Node_Str");
      if (!character[0].equals(playerName)) {
        continue;
      }
      if (character.length > 1)       mining=character[1];
      if (character.length > 2)       myspawn=character[2];
      if (character.length > 3)       party=character[3];
      if (character.length > 4)       gather=character[4];
      if (character.length > 5)       woodcutting=character[5];
      if (character.length > 6)       wgather=character[6];
      if (character.length > 7)       repair=character[7];
      if (character.length > 8)       unarmed=character[8];
      if (character.length > 9)       herbalism=character[9];
      if (character.length > 10)       excavation=character[10];
      in.close();
      return true;
    }
    in.close();
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"String_Node_Str" + location + "String_Node_Str",e);
  }
  return false;
}
Program: 25225
Project: 25225
Buggy source:
public void onPlayerChat(PlayerChatEvent event){
  Player player=event.getPlayer();
  String[] split=event.getMessage().split("String_Node_Str");
  String x=ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.GREEN+ "String_Node_Str";
  String y=ChatColor.AQUA + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.AQUA+ "String_Node_Str";
  if (mcConfig.getInstance().isPartyToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (mcUsers.getProfile(herp).inParty()) {
        if (mcm.inSameParty(herp,player)) {
          herp.sendMessage(x + event.getMessage());
        }
      }
    }
    return;
  }
  if (player.isOp() && mcConfig.getInstance().isAdminToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (herp.isOp()) {
        herp.sendMessage(y + event.getMessage());
      }
    }
    return;
  }
  if (player.isOp()) {
    event.setCancelled(true);
    for (    Player derp : plugin.getServer().getOnlinePlayers()) {
      String z=ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.RED+ "String_Node_Str"+ ChatColor.WHITE;
      derp.sendMessage(z + event.getMessage());
    }
  }
  event.setCancelled(true);
}

Fixed version (ground truth):
public void onPlayerChat(PlayerChatEvent event){
  Player player=event.getPlayer();
  String[] split=event.getMessage().split("String_Node_Str");
  String x=ChatColor.GREEN + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.GREEN+ "String_Node_Str";
  String y=ChatColor.AQUA + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.AQUA+ "String_Node_Str";
  if (mcConfig.getInstance().isPartyToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (mcUsers.getProfile(herp).inParty()) {
        if (mcm.inSameParty(herp,player)) {
          herp.sendMessage(x + event.getMessage());
        }
      }
    }
    return;
  }
  if (player.isOp() && mcConfig.getInstance().isAdminToggled(player.getName())) {
    event.setCancelled(true);
    for (    Player herp : plugin.getServer().getOnlinePlayers()) {
      if (herp.isOp()) {
        herp.sendMessage(y + event.getMessage());
      }
    }
    return;
  }
  if (player.isOp()) {
    event.setCancelled(true);
    for (    Player derp : plugin.getServer().getOnlinePlayers()) {
      String z=ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ player.getName()+ ChatColor.RED+ "String_Node_Str"+ ChatColor.WHITE;
      derp.sendMessage(z + event.getMessage());
    }
  }
}
Program: 25227
Project: 25227
Buggy source:
public void onEnable(){
  mcUsers.getInstance().loadUsers();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_DROP_ITEM,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_QUIT,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_COMMAND,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_DAMAGED,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_CHAT,playerListener,Priority.Monitor,this);
  pm.registerEvent(Event.Type.ENTITY_DAMAGEDBY_ENTITY,entityListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.ENTITY_DEATH,entityListener,Priority.Normal,this);
  PluginDescriptionFile pdfFile=this.getDescription();
  System.out.println(pdfFile.getName() + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
public void onEnable(){
  mcUsers.getInstance().loadUsers();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.PLAYER_JOIN,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_DROP_ITEM,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_QUIT,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_COMMAND,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_DAMAGED,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_CHAT,playerListener,Priority.Monitor,this);
  pm.registerEvent(Event.Type.ENTITY_DAMAGEDBY_ENTITY,entityListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.ENTITY_DEATH,entityListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_FLOW,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_PLACED,blockListener,Priority.Normal,this);
  PluginDescriptionFile pdfFile=this.getDescription();
  System.out.println(pdfFile.getName() + "String_Node_Str" + pdfFile.getVersion()+ "String_Node_Str");
}
Program: 25228
Project: 25228
Buggy source:
public void onPlayerJoin(PlayerEvent event){
  Player player=event.getPlayer();
  mcUsers.addUser(player);
  player.sendMessage(ChatColor.DARK_RED + "String_Node_Str");
  player.sendMessage(ChatColor.DARK_RED + "String_Node_Str");
  player.sendMessage(ChatColor.AQUA + "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage("String_Node_Str" + ChatColor.YELLOW + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str");
  player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.DARK_GRAY+ "String_Node_Str");
}

Fixed version (ground truth):
public void onPlayerJoin(PlayerEvent event){
  Player player=event.getPlayer();
  mcUsers.addUser(player);
  player.sendMessage(ChatColor.DARK_RED + "String_Node_Str");
  player.sendMessage(ChatColor.DARK_RED + "String_Node_Str");
  player.sendMessage(ChatColor.AQUA + "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage(ChatColor.GREEN + "String_Node_Str" + ChatColor.YELLOW+ "String_Node_Str"+ ChatColor.GREEN+ "String_Node_Str");
  player.sendMessage("String_Node_Str" + ChatColor.YELLOW + "String_Node_Str"+ ChatColor.WHITE+ "String_Node_Str");
  player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.DARK_GRAY+ "String_Node_Str");
}
Program: 25230
Project: 25230
Buggy source:
public void onPlayerCommand(PlayerChatEvent event){
  String[] split=event.getMessage().split("String_Node_Str");
  Player player=event.getPlayer();
  if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    String tempList="String_Node_Str";
    int x=0;
    for (    Player p : plugin.getServer().getOnlinePlayers()) {
      if (p != null && x < playerCount()) {
        tempList+=p.getName() + "String_Node_Str";
        x++;
      }
      if (x >= playerCount())       tempList+=p.getName();
    }
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ tempList+ ChatColor.RED+ "String_Node_Str");
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.GREEN+ playerCount());
  }
}

Fixed version (ground truth):
public void onPlayerCommand(PlayerChatEvent event){
  String[] split=event.getMessage().split("String_Node_Str");
  Player player=event.getPlayer();
  if (split[0].equalsIgnoreCase("String_Node_Str") || split[0].equalsIgnoreCase("String_Node_Str")) {
    event.setCancelled(true);
    String tempList="String_Node_Str";
    int x=0;
    for (    Player p : plugin.getServer().getOnlinePlayers()) {
      if (p != null && x + 1 == playerCount()) {
        tempList+=p.getName();
        x++;
      }
      if (p != null && x < playerCount()) {
        tempList+=p.getName() + "String_Node_Str";
        x++;
      }
    }
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.WHITE+ tempList+ ChatColor.RED+ "String_Node_Str");
    player.sendMessage(ChatColor.RED + "String_Node_Str" + ChatColor.GREEN+ playerCount());
  }
}
Program: 25231
Project: 25231
Buggy source:
public void onEntityDamageByEntity(EntityDamageByEntityEvent event){
  Entity x=event.getEntity();
  Entity y=event.getDamager();
  if (y instanceof Player) {
    Player attacker=(Player)y;
    if (x instanceof Player) {
      Player defender=(Player)x;
      if (mcUsers.getProfile(defender).getParty().equals(mcUsers.getProfile(attacker).getParty())) {
        event.setCancelled(true);
      }
      if (mcUsers.getProfile(defender).isDead())       return;
      if ((defender.getHealth() - event.getDamage()) <= 0) {
        for (        Player derp : plugin.getServer().getOnlinePlayers()) {
          derp.sendMessage(ChatColor.GRAY + attacker.getName() + "String_Node_Str"+ ChatColor.DARK_RED+ "String_Node_Str"+ ChatColor.GRAY+ defender.getName());
          mcUsers.getProfile(defender).setDead(true);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void onEntityDamageByEntity(EntityDamageByEntityEvent event){
  Entity x=event.getEntity();
  Entity y=event.getDamager();
  if (y instanceof Player) {
    Player attacker=(Player)y;
    if (x instanceof Player) {
      Player defender=(Player)x;
      if (mcUsers.getProfile(defender).inParty() && mcUsers.getProfile(defender).getParty().equals(mcUsers.getProfile(attacker).getParty()))       event.setCancelled(true);
      if (mcUsers.getProfile(defender).isDead())       return;
      if ((defender.getHealth() - event.getDamage()) <= 0) {
        for (        Player derp : plugin.getServer().getOnlinePlayers()) {
          derp.sendMessage(ChatColor.GRAY + attacker.getName() + "String_Node_Str"+ ChatColor.DARK_RED+ "String_Node_Str"+ ChatColor.GRAY+ defender.getName());
          mcUsers.getProfile(defender).setDead(true);
        }
      }
    }
  }
}
Program: 25232
Project: 25232
Buggy source:
public boolean onConsoleCommand(String[] split){
  String server=Colors.LightGreen + "String_Node_Str" + Colors.DarkPurple;
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (split.length > 1) {
      String args="String_Node_Str" + etc.combineSplit(1,split,"String_Node_Str");
      vChat.gmsg(server + "String_Node_Str" + args);
      log.log(Level.INFO,"String_Node_Str" + args);
      return true;
    }
    return false;
  }
  if (split[0].equalsIgnoreCase("String_Node_Str"))   vChat.gmsg(server + "String_Node_Str");
  log.log(Level.INFO,"String_Node_Str" + "String_Node_Str");
  return false;
}

Fixed version (ground truth):
public boolean onConsoleCommand(String[] split){
  String server=Colors.LightGreen + "String_Node_Str" + Colors.DarkPurple;
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    if (split.length > 1) {
      String args="String_Node_Str" + etc.combineSplit(1,split,"String_Node_Str");
      vChat.gmsg(server + "String_Node_Str" + args);
      log.log(Level.INFO,"String_Node_Str" + args);
      return true;
    }
    return false;
  }
  if (split[0].equalsIgnoreCase("String_Node_Str")) {
    vChat.gmsg(server + "String_Node_Str");
    log.log(Level.INFO,"String_Node_Str" + "String_Node_Str");
  }
  return false;
}
Program: 25234
Project: 25234
Buggy source:
public void onEntityDamage(EntityDamageEvent event){
  Entity x=event.getEntity();
  if (x instanceof Player) {
    Player player=(Player)x;
    if ((player.getHealth() - event.getDamage()) <= 0) {
      Location deathLoc=player.getLocation();
      ItemStack[] items=player.getInventory().getContents();
      for (int i=0; i < items.length; i++) {
        ItemStack is=items[i];
        if (is != null && is.getAmount() > 0) {
          player.getWorld().dropItemNaturally(deathLoc,is);
        }
      }
      player.setHealth(20);
      player.teleportTo(mcUsers.getProfile(player).getMySpawn(player));
      for (      Player derp : plugin.getServer().getOnlinePlayers()) {
        derp.sendMessage(ChatColor.GRAY + player.getName() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
public void onEntityDamage(EntityDamageEvent event){
  Entity x=event.getEntity();
  if (x instanceof Player) {
    Player player=(Player)x;
    if (mcUsers.getProfile(player).isDead()) {
      mcUsers.getProfile(player).setDead(false);
      return;
    }
    if ((player.getHealth() - event.getDamage()) <= 0) {
      Location deathLoc=player.getLocation();
      ItemStack[] items=player.getInventory().getContents();
      for (int i=0; i < items.length; i++) {
        ItemStack is=items[i];
        if (is != null && is.getAmount() > 0) {
          player.getWorld().dropItemNaturally(deathLoc,is);
        }
      }
      player.setHealth(20);
      player.teleportTo(mcUsers.getProfile(player).getMySpawn(player));
      for (      Player derp : plugin.getServer().getOnlinePlayers()) {
        derp.sendMessage(ChatColor.GRAY + player.getName() + "String_Node_Str");
      }
    }
  }
}