nus-yam/ex-repair huggingface dataset:
Program: 84929
Project: 84929
Buggy source:
public stats(main instance,player _p){
  plugin=instance;
  p=_p;
  ResultSet r=plugin.sql.query("String_Node_Str" + p.dbid + "String_Node_Str");
  ResultSet r2=plugin.sql.query("String_Node_Str" + p.dbid + "String_Node_Str");
  try {
    while (r.next()) {
      stats.put(Stat.valueOf(r.getInt("String_Node_Str")),r.getInt("String_Node_Str"));
    }
    while (r2.next()) {
      achs.add(Achievement.valueOf(r2.getInt("String_Node_Str")));
    }
    toach.removeAll(achs);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  t.schedule(new updatestats(),30000,30000);
}

Fixed version (ground truth):
public stats(main instance,player _p){
  plugin=instance;
  p=_p;
  ResultSet r=plugin.sql.query("String_Node_Str" + p.dbid + "String_Node_Str");
  ResultSet r2=plugin.sql.query("String_Node_Str" + p.dbid + "String_Node_Str");
  try {
    while (r.next()) {
      stats.put(Stat.valueOf(r.getInt("String_Node_Str")),r.getInt("String_Node_Str"));
    }
    while (r2.next()) {
      achs.add(Achievement.valueOf(r2.getInt("String_Node_Str")));
    }
    toach.removeAll(achs);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  tid=plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin,new updatestats(),600L,600L);
}
Program: 84930
Project: 84930
Buggy source:
public void destroy(){
  t.cancel();
  update();
}

Fixed version (ground truth):
public void destroy(){
  plugin.getServer().getScheduler().cancelTask(tid);
  update();
}
Program: 84931
Project: 84931
Buggy source:
public void incStat(Stat s,int c){
synchronized (this) {
    if (stats.containsKey(s)) {
      updated.add(s);
    }
 else {
      newv.add(s);
    }
    int out=getStat(s) + c;
    if (out < 0) {
      out=0;
    }
    ArrayList<Achievement> tmp=new ArrayList<Achievement>();
    for (    Achievement a : toach) {
      if (a.getStat() == s && a.getCount() <= out) {
        tmp.add(a);
      }
    }
    for (    Achievement a : tmp) {
      awardAchievement(a);
    }
    stats.put(s,out);
  }
}

Fixed version (ground truth):
public void incStat(Stat s,int c){
  if (stats.containsKey(s) && !updated.contains(s)) {
    updated.add(s);
  }
 else   if (!stats.containsKey(s) && !newv.contains(s)) {
    newv.add(s);
  }
  int out=getStat(s) + c;
  if (out < 0) {
    out=0;
  }
  ArrayList<Achievement> tmp=new ArrayList<Achievement>();
  for (  Achievement a : toach) {
    if (a.getStat() == s && a.getCount() <= out) {
      tmp.add(a);
    }
  }
  for (  Achievement a : tmp) {
    awardAchievement(a);
  }
  stats.put(s,out);
}
Program: 84932
Project: 84932
Buggy source:
public void statsOf2Pairs(List<List<Integer>> allRolls){
  long count=0;
  long debug=0;
  List<List<Integer>> rolls=new ArrayList<List<Integer>>();
  rolls=allRolls;
  for (  List<Integer> roll : rolls) {
    if (roll.size() < 5) {
      debug++;
    }
    if (hasMultiplesOf(roll,2)) {
      roll.removeAll(Arrays.asList(mRepeatedDice));
      if (hasMultiplesOf(roll,2)) {
        count++;
      }
    }
  }
  System.out.println("String_Node_Str" + count);
  System.out.println("String_Node_Str" + ((double)count / (double)mTotalPossibleRolls) * 100d + "String_Node_Str");
}

Fixed version (ground truth):
public void statsOf2Pairs(List<List<Integer>> allRolls){
  long count=0;
  long debug=0;
  List<List<Integer>> rolls=new ArrayList<List<Integer>>(allRolls);
  for (  List<Integer> rollToCopy : rolls) {
    List<Integer> roll=new ArrayList<Integer>(rollToCopy);
    if (roll.size() < 5) {
      debug++;
    }
    if (hasMultiplesOf(roll,2)) {
      roll.removeAll(Arrays.asList(mRepeatedDice));
      if (hasMultiplesOf(roll,2)) {
        count++;
      }
    }
  }
  System.out.println("String_Node_Str" + count);
  System.out.println("String_Node_Str" + ((double)count / (double)mTotalPossibleRolls) * 100d + "String_Node_Str");
}
Program: 84933
Project: 84933
Buggy source:
public void statsOfFullHouse(List<List<Integer>> allRolls){
  long count=0;
  long debug=0;
  for (  List<Integer> roll : allRolls) {
    if (roll.size() < 3) {
      debug++;
    }
    if (hasMultiplesOf(roll,3)) {
      roll.removeAll(Arrays.asList(mRepeatedDice));
      if (hasMultiplesOf(roll,2)) {
        count++;
      }
    }
  }
  System.out.println("String_Node_Str" + count);
  System.out.println("String_Node_Str" + ((double)count / (double)mTotalPossibleRolls) * 100d + "String_Node_Str");
}

Fixed version (ground truth):
public void statsOfFullHouse(List<List<Integer>> allRolls){
  long count=0;
  long debug=0;
  List<List<Integer>> rolls=new ArrayList<List<Integer>>(allRolls);
  for (  List<Integer> rollToCopy : rolls) {
    List<Integer> roll=new ArrayList<Integer>(rollToCopy);
    if (roll.size() < 5) {
      debug++;
    }
    if (hasMultiplesOf(roll,3)) {
      roll.removeAll(Arrays.asList(mRepeatedDice));
      if (hasMultiplesOf(roll,2)) {
        count++;
      }
    }
  }
  System.out.println("String_Node_Str" + count);
  System.out.println("String_Node_Str" + ((double)count / (double)mTotalPossibleRolls) * 100d + "String_Node_Str");
}
Program: 84935
Project: 84935
Buggy source:
/** 
 * Creates a new <code>MainFrame</code>.
 * @param base the base to be used by the whole GUI
 */
public MainFrame(DataBase base){
  super(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
  this.base=base;
  layout=new CardLayout();
  setLayout(layout);
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent event){
      MainFrame.this.windowClosing();
    }
  }
);
  initializeGUI();
  setSize(1000,600);
  setLocationRelativeTo(null);
  setExtendedState(MAXIMIZED_BOTH);
  setVisible(true);
}

Fixed version (ground truth):
/** 
 * Creates a new <code>MainFrame</code>.
 * @param base the base to be used by the whole GUI
 */
public MainFrame(DataBase base){
  super(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
  this.base=base;
  layout=new CardLayout();
  setLayout(layout);
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent event){
      MainFrame.this.windowClosing();
    }
  }
);
  initializeGUI();
  setSize(1000,600);
  setLocationRelativeTo(null);
  setLocation(0,0);
  setExtendedState(MAXIMIZED_BOTH);
  setVisible(true);
}
Program: 84936
Project: 84936
Buggy source:
/** 
 * Checks whether the entered authors are existing, if not, the background color will be changed to yellow.
 */
private void checkAuthors(){
  String[] authors=getText().split("String_Node_Str");
  setBackground(Color.WHITE);
  for (  String author : authors) {
    try {
      if (!checkAuthor(author)) {
        setBackground(Color.YELLOW);
      }
    }
 catch (    SQLException ex) {
      Logger.getLogger(AuthorInputField.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks whether the entered authors are existing, if not, the background color will be changed to yellow.
 */
private void checkAuthors(){
  String[] authors=getText().split("String_Node_Str");
  setBackground(Color.WHITE);
  for (  String author : authors) {
    try {
      if (!checkAuthor(author.trim())) {
        setBackground(Color.YELLOW);
      }
    }
 catch (    SQLException ex) {
      Logger.getLogger(AuthorInputField.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}
Program: 84937
Project: 84937
Buggy source:
public void resetMask(){
  for (  Component c : getComponents()) {
    if (c instanceof ExtendedTextField) {
      ((ExtendedTextField)c).setText("String_Node_Str");
    }
  }
  titleInput.reset();
  informationInput.setText("String_Node_Str");
  tagInput.clearSelection();
  locationInput.reset();
  categoryInput.reset();
  book=null;
  titleInput.requestFocusInWindow();
}

Fixed version (ground truth):
public void resetMask(){
  for (  Component c : getComponents()) {
    if (c instanceof ExtendedTextField) {
      ((ExtendedTextField)c).setText("String_Node_Str");
    }
  }
  titleInput.reset();
  informationInput.setText("String_Node_Str");
  tagInput.clearSelection();
  book=null;
  titleInput.requestFocusInWindow();
}
Program: 84940
Project: 84940
Buggy source:
/** 
 * Creates an <code>ExtendedBookBaseWriter</code>.
 * @param reader the reader to be used by the <code>ExtendedBookBaseWriter</code>
 * @param writer the writer to be used by the <code>ExtendedBookBaseWeiter</code>
 */
public ExtendedBookBaseWriter(DataBaseReader reader,DataBaseWriter writer){
  this.reader=reader;
  this.writer=writer;
}

Fixed version (ground truth):
/** 
 * Creates an <code>ExtendedBookBaseWriter</code>.
 * @param reader the reader to be used bythe <code>ExtendedBookBaseWriter</code>
 * @param writer the writer to be used bythe <code>ExtendedBookBaseWeiter</code>
 */
public ExtendedBookBaseWriter(DataBaseReader reader,DataBaseWriter writer){
  this.reader=reader;
  this.writer=writer;
}
Program: 84941
Project: 84941
Buggy source:
public static void setUserDevice(User user,String regID){
  Entity userEntry=new Entity("String_Node_Str",user.getUserId());
  userEntry.setProperty(DEVICE_ID,regID);
  userEntry.setProperty("String_Node_Str",user.getEmail());
  DatastoreService datastore=DatastoreServiceFactory.getDatastoreService();
  datastore.put(userEntry);
  log.info("String_Node_Str" + user.getEmail());
}

Fixed version (ground truth):
public static void setUserDevice(User user,String regID){
  DatastoreService datastore=DatastoreServiceFactory.getDatastoreService();
  Entity userEntry;
  Key userKey=KeyFactory.createKey("String_Node_Str",user.getUserId());
  try {
    userEntry=datastore.get(userKey);
  }
 catch (  EntityNotFoundException e) {
    userEntry=new Entity(userKey);
  }
  userEntry.setProperty(DEVICE_ID,regID);
  userEntry.setProperty("String_Node_Str",user.getEmail());
  datastore.put(userEntry);
  log.info("String_Node_Str" + user.getEmail());
}
Program: 84942
Project: 84942
Buggy source:
public static void setUserDevice(User user,String regID){
  Entity userEntry=new Entity("String_Node_Str",user.getUserId());
  userEntry.setProperty(DEVICE_ID,regID);
  userEntry.setProperty("String_Node_Str",user.getEmail());
  DatastoreService datastore=DatastoreServiceFactory.getDatastoreService();
  datastore.put(userEntry);
  log.info("String_Node_Str" + user.getEmail());
}

Fixed version (ground truth):
public static void setUserDevice(User user,String regID){
  DatastoreService datastore=DatastoreServiceFactory.getDatastoreService();
  Entity userEntry;
  Key userKey=KeyFactory.createKey("String_Node_Str",user.getUserId());
  try {
    userEntry=datastore.get(userKey);
  }
 catch (  EntityNotFoundException e) {
    userEntry=new Entity(userKey);
  }
  userEntry.setProperty(DEVICE_ID,regID);
  userEntry.setProperty("String_Node_Str",user.getEmail());
  datastore.put(userEntry);
  log.info("String_Node_Str" + user.getEmail());
}
Program: 84943
Project: 84943
Buggy source:
private void getChildrenFile(GridFtpActionItem actionItem,String source){
  try {
    si.getChildrenFileNames(source,false);
  }
 catch (  final Exception e) {
    actionItem.setException(e);
    return;
  }
}

Fixed version (ground truth):
private void getChildrenFile(GridFtpActionItem actionItem,String source){
  try {
    si.ls(source,1);
  }
 catch (  final Exception e) {
    actionItem.setException(e);
    return;
  }
}
Program: 84944
Project: 84944
Buggy source:
private void initiateInstall(){
  try {
    mAppInfo=mPm.getApplicationInfo(mPkgInfo.packageName,PackageManager.GET_UNINSTALLED_PACKAGES);
  }
 catch (  NameNotFoundException e) {
    mAppInfo=null;
  }
  if (mAppInfo == null) {
    startInstallConfirm();
  }
 else {
    if (localLOGV)     Log.i(TAG,"String_Node_Str" + mPkgInfo.applicationInfo.packageName);
    showDialogInner(DLG_REPLACE_APP);
  }
}

Fixed version (ground truth):
private void initiateInstall(){
  String pkgName=mPkgInfo.packageName;
  String[] oldName=mPm.canonicalToCurrentPackageNames(new String[]{pkgName});
  if (oldName != null && oldName.length > 0 && oldName[0] != null) {
    pkgName=oldName[0];
    mPkgInfo.setPackageName(pkgName);
  }
  try {
    mAppInfo=mPm.getApplicationInfo(pkgName,PackageManager.GET_UNINSTALLED_PACKAGES);
  }
 catch (  NameNotFoundException e) {
    mAppInfo=null;
  }
  if (mAppInfo == null) {
    startInstallConfirm();
  }
 else {
    if (localLOGV)     Log.i(TAG,"String_Node_Str" + mPkgInfo.applicationInfo.packageName);
    showDialogInner(DLG_REPLACE_APP);
  }
}
Program: 84945
Project: 84945
Buggy source:
public void setRotation(float rx,float ry,float rz){
  setRotX(rx);
  setRotY(ry);
  setRotZ(rz);
}

Fixed version (ground truth):
public void setRotation(float rx,float ry,float rz){
  setRotationX(rx);
  setRotationY(ry);
  setRotationZ(rz);
}
Program: 84946
Project: 84946
Buggy source:
@Test(expected=IllegalArgumentException.class) public void should_reject_null_with_IllegalArgumentException() throws Exception {
  AdjacentMultiples testSubject=new AdjacentMultiplesProblem();
}

Fixed version (ground truth):
@Test(expected=IllegalArgumentException.class) public void should_reject_null_with_IllegalArgumentException() throws Exception {
  AdjacentMultiplesProblem testSubject=new AdjacentMultiplesProblem();
}
Program: 84952
Project: 84952
Buggy source:
private void updateIncomingFileConfirmNotification(){
  Cursor cursor=mContext.getContentResolver().query(BluetoothShare.CONTENT_URI,null,WHERE_CONFIRM_PENDING,null,BluetoothShare._ID);
  if (cursor == null) {
    return;
  }
  for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
    String title=mContext.getString(R.string.incoming_file_confirm_Notification_title);
    String caption=mContext.getString(R.string.incoming_file_confirm_Notification_caption);
    int id=cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID));
    long timeStamp=cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP));
    Uri contentUri=Uri.parse(BluetoothShare.CONTENT_URI + "String_Node_Str" + id);
    Notification n=new Notification();
    n.icon=R.drawable.bt_incomming_file_notification;
    n.flags|=Notification.FLAG_ONLY_ALERT_ONCE;
    n.defaults=Notification.DEFAULT_SOUND;
    n.tickerText=title;
    Intent intent=new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    n.when=timeStamp;
    mNotificationMgr.notify(id,n);
  }
  cursor.close();
}

Fixed version (ground truth):
private void updateIncomingFileConfirmNotification(){
  Cursor cursor=mContext.getContentResolver().query(BluetoothShare.CONTENT_URI,null,WHERE_CONFIRM_PENDING,null,BluetoothShare._ID);
  if (cursor == null) {
    return;
  }
  for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
    String title=mContext.getString(R.string.incoming_file_confirm_Notification_title);
    String caption=mContext.getString(R.string.incoming_file_confirm_Notification_caption);
    int id=cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID));
    long timeStamp=cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP));
    Uri contentUri=Uri.parse(BluetoothShare.CONTENT_URI + "String_Node_Str" + id);
    Notification n=new Notification();
    n.icon=R.drawable.bt_incomming_file_notification;
    n.flags|=Notification.FLAG_ONLY_ALERT_ONCE;
    n.defaults=Notification.DEFAULT_SOUND;
    n.tickerText=title;
    Intent intent=new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.when=timeStamp;
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    mNotificationMgr.notify(id,n);
  }
  cursor.close();
}
Program: 84957
Project: 84957
Buggy source:
private void updateIncomingFileConfirmNotification(){
  Cursor cursor=mContext.getContentResolver().query(BluetoothShare.CONTENT_URI,null,WHERE_CONFIRM_PENDING,null,BluetoothShare._ID);
  if (cursor == null) {
    return;
  }
  for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
    String title=mContext.getString(R.string.incoming_file_confirm_Notification_title);
    String caption=mContext.getString(R.string.incoming_file_confirm_Notification_caption);
    int id=cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID));
    long timeStamp=cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP));
    Uri contentUri=Uri.parse(BluetoothShare.CONTENT_URI + "String_Node_Str" + id);
    Notification n=new Notification();
    n.icon=R.drawable.bt_incomming_file_notification;
    n.flags|=Notification.FLAG_ONLY_ALERT_ONCE;
    n.defaults=Notification.DEFAULT_SOUND;
    n.tickerText=title;
    Intent intent=new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    n.when=timeStamp;
    mNotificationMgr.notify(id,n);
  }
  cursor.close();
}

Fixed version (ground truth):
private void updateIncomingFileConfirmNotification(){
  Cursor cursor=mContext.getContentResolver().query(BluetoothShare.CONTENT_URI,null,WHERE_CONFIRM_PENDING,null,BluetoothShare._ID);
  if (cursor == null) {
    return;
  }
  for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
    String title=mContext.getString(R.string.incoming_file_confirm_Notification_title);
    String caption=mContext.getString(R.string.incoming_file_confirm_Notification_caption);
    int id=cursor.getInt(cursor.getColumnIndexOrThrow(BluetoothShare._ID));
    long timeStamp=cursor.getLong(cursor.getColumnIndexOrThrow(BluetoothShare.TIMESTAMP));
    Uri contentUri=Uri.parse(BluetoothShare.CONTENT_URI + "String_Node_Str" + id);
    Notification n=new Notification();
    n.icon=R.drawable.bt_incomming_file_notification;
    n.flags|=Notification.FLAG_ONLY_ALERT_ONCE;
    n.defaults=Notification.DEFAULT_SOUND;
    n.tickerText=title;
    Intent intent=new Intent(Constants.ACTION_INCOMING_FILE_CONFIRM);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.when=timeStamp;
    n.setLatestEventInfo(mContext,title,caption,PendingIntent.getBroadcast(mContext,0,intent,0));
    intent=new Intent(Constants.ACTION_HIDE);
    intent.setClassName(Constants.THIS_PACKAGE_NAME,BluetoothOppReceiver.class.getName());
    intent.setData(contentUri);
    n.deleteIntent=PendingIntent.getBroadcast(mContext,0,intent,0);
    mNotificationMgr.notify(id,n);
  }
  cursor.close();
}
Program: 84958
Project: 84958
Buggy source:
public ClientThread(Context context,ObexTransport transport){
  super("String_Node_Str");
  mContext1=context;
  mTransport1=transport;
  waitingForShare=true;
  mWaitingForRemote=false;
}

Fixed version (ground truth):
public ClientThread(Context context,ObexTransport transport){
  super("String_Node_Str");
  mContext1=context;
  mTransport1=transport;
  waitingForShare=true;
  mWaitingForRemote=false;
  PowerManager pm=(PowerManager)mContext1.getSystemService(Context.POWER_SERVICE);
  wakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
}
Program: 84959
Project: 84959
Buggy source:
@Override public void run(){
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  PowerManager pm=(PowerManager)mContext1.getSystemService(Context.POWER_SERVICE);
  wakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,Constants.TAG);
  wakeLock.acquire();
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e1) {
    if (Constants.LOGVV) {
      Log.v(TAG,"String_Node_Str");
    }
    mInterrupted=true;
  }
  if (!mInterrupted) {
    connect();
  }
  while (!mInterrupted) {
    if (!waitingForShare) {
      doSend();
    }
 else {
      try {
        if (Constants.LOGV) {
          Log.v(TAG,"String_Node_Str" + mTimeoutRemainingMs);
        }
        Thread.sleep(mTimeoutRemainingMs);
      }
 catch (      InterruptedException e) {
      }
    }
  }
  disconnect();
  if (wakeLock != null) {
    wakeLock.release();
    wakeLock=null;
  }
  Message msg=Message.obtain(mCallback);
  msg.what=BluetoothOppObexSession.MSG_SESSION_COMPLETE;
  msg.obj=mInfo;
  msg.sendToTarget();
}

Fixed version (ground truth):
@Override public void run(){
  Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str");
  }
  wakeLock.acquire();
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e1) {
    if (Constants.LOGVV) {
      Log.v(TAG,"String_Node_Str");
    }
    mInterrupted=true;
  }
  if (!mInterrupted) {
    connect();
  }
  while (!mInterrupted) {
    if (!waitingForShare) {
      doSend();
    }
 else {
      try {
        if (Constants.LOGV) {
          Log.v(TAG,"String_Node_Str" + mTimeoutRemainingMs);
        }
        Thread.sleep(mTimeoutRemainingMs);
      }
 catch (      InterruptedException e) {
      }
    }
  }
  disconnect();
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str");
  }
  wakeLock.release();
  Message msg=Message.obtain(mCallback);
  msg.what=BluetoothOppObexSession.MSG_SESSION_COMPLETE;
  msg.obj=mInfo;
  msg.sendToTarget();
}
Program: 84961
Project: 84961
Buggy source:
@Override public void onDisconnect(HeaderSet req,HeaderSet resp){
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  resp.responseCode=ResponseCodes.OBEX_HTTP_OK;
  if (mCallback != null) {
    Message msg=Message.obtain(mCallback);
    msg.what=BluetoothOppObexSession.MSG_SESSION_COMPLETE;
    msg.obj=mInfo;
    msg.sendToTarget();
  }
}

Fixed version (ground truth):
@Override public void onDisconnect(HeaderSet req,HeaderSet resp){
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  resp.responseCode=ResponseCodes.OBEX_HTTP_OK;
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  if (mWakeLock.isHeld()) {
    mWakeLock.release();
  }
  if (mPartialWakeLock.isHeld()) {
    mPartialWakeLock.release();
  }
  if (mCallback != null) {
    Message msg=Message.obtain(mCallback);
    msg.what=BluetoothOppObexSession.MSG_SESSION_COMPLETE;
    msg.obj=mInfo;
    msg.sendToTarget();
  }
}
Program: 84962
Project: 84962
Buggy source:
public BluetoothOppObexServerSession(Context context,ObexTransport transport){
  mContext=context;
  mTransport=transport;
}

Fixed version (ground truth):
public BluetoothOppObexServerSession(Context context,ObexTransport transport){
  mContext=context;
  mTransport=transport;
  PowerManager pm=(PowerManager)mContext.getSystemService(Context.POWER_SERVICE);
  mWakeLock=pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE,TAG);
  mPartialWakeLock=pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,TAG);
}
Program: 84964
Project: 84964
Buggy source:
/** 
 * Called when connection is accepted from remote, to retrieve the first Header then wait for user confirmation
 */
public void preStart(){
  try {
    if (Constants.LOGV) {
      Log.v(TAG,"String_Node_Str" + mTransport.toString());
    }
    mSession=new ServerSession(mTransport,this,null);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * Called when connection is accepted from remote, to retrieve the first Header then wait for user confirmation
 */
public void preStart(){
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  mWakeLock.acquire();
  try {
    if (Constants.LOGV) {
      Log.v(TAG,"String_Node_Str" + mTransport.toString());
    }
    mSession=new ServerSession(mTransport,this,null);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str" + e);
  }
}
Program: 84965
Project: 84965
Buggy source:
/** 
 * Called from BluetoothOppTransfer to cancel the "Transfer" Otherwise, server should end by itself.
 */
public void stop(){
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  mInterrupted=true;
  if (mSession != null) {
    try {
      mSession.close();
      mTransport.close();
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str" + e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Called from BluetoothOppTransfer to cancel the "Transfer" Otherwise, server should end by itself.
 */
public void stop(){
  if (Constants.LOGV) {
    Log.v(TAG,"String_Node_Str");
  }
  mInterrupted=true;
  if (mSession != null) {
    try {
      mSession.close();
      mTransport.close();
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str" + e);
    }
  }
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str");
  }
  if (mWakeLock.isHeld()) {
    mWakeLock.release();
  }
  if (mPartialWakeLock.isHeld()) {
    mPartialWakeLock.release();
  }
}
Program: 84970
Project: 84970
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str");
  }
  mBluetooth=(BluetoothDevice)getSystemService(Context.BLUETOOTH_SERVICE);
  mPowerManager=(PowerManager)getSystemService(Context.POWER_SERVICE);
  mSocketListener=new BluetoothOppRfcommListener();
  mShares=Lists.newArrayList();
  mBatchs=Lists.newArrayList();
  mObserver=new BluetoothShareContentObserver();
  getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI,true,mObserver);
  mBatchId=1;
  mNotifier=new BluetoothOppNotification(this);
  mNotifier.mNotificationMgr.cancelAll();
  mNotifier.updateNotification();
  trimDatabase();
  IntentFilter filter=new IntentFilter(BluetoothIntent.REMOTE_DEVICE_DISCONNECTED_ACTION);
  filter.addAction(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION);
  registerReceiver(mBluetoothIntentReceiver,filter);
synchronized (BluetoothOppService.this) {
    if (mBluetooth == null) {
      Log.w(TAG,"String_Node_Str");
    }
 else {
      startListenerDelayed();
    }
  }
  BluetoothOppPreference.getInstance(this).dump();
  updateFromProvider();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str");
  }
  mBluetooth=(BluetoothDevice)getSystemService(Context.BLUETOOTH_SERVICE);
  mPowerManager=(PowerManager)getSystemService(Context.POWER_SERVICE);
  mSocketListener=new BluetoothOppRfcommListener();
  mShares=Lists.newArrayList();
  mBatchs=Lists.newArrayList();
  mObserver=new BluetoothShareContentObserver();
  getContentResolver().registerContentObserver(BluetoothShare.CONTENT_URI,true,mObserver);
  mBatchId=1;
  mNotifier=new BluetoothOppNotification(this);
  mNotifier.mNotificationMgr.cancelAll();
  mNotifier.updateNotification();
  trimDatabase();
  IntentFilter filter=new IntentFilter(BluetoothIntent.REMOTE_DEVICE_DISCONNECTED_ACTION);
  filter.addAction(BluetoothIntent.BLUETOOTH_STATE_CHANGED_ACTION);
  registerReceiver(mBluetoothIntentReceiver,filter);
synchronized (BluetoothOppService.this) {
    if (mBluetooth == null) {
      Log.w(TAG,"String_Node_Str");
    }
 else {
      startListenerDelayed();
    }
  }
  if (Constants.LOGVV) {
    BluetoothOppPreference.getInstance(this).dump();
  }
  updateFromProvider();
}
Program: 84971
Project: 84971
Buggy source:
private void markConnectionFailed(BluetoothSocket s){
  try {
    s.close();
  }
 catch (  IOException e) {
    if (Constants.LOGVV) {
      Log.v(TAG,"String_Node_Str");
    }
  }
  mSessionHandler.obtainMessage(RFCOMM_ERROR).sendToTarget();
  return;
}

Fixed version (ground truth):
private void markConnectionFailed(BluetoothSocket s){
  try {
    s.close();
  }
 catch (  IOException e) {
    if (Constants.LOGVV) {
      Log.e(TAG,"String_Node_Str");
    }
  }
  mSessionHandler.obtainMessage(RFCOMM_ERROR).sendToTarget();
  return;
}
Program: 84972
Project: 84972
Buggy source:
private void doOpushSdp(){
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str" + mBatch.mDestination);
  }
  mTimestamp=System.currentTimeMillis();
  String[] uuids=mBluetooth.getRemoteUuids(mBatch.mDestination);
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str" + mBatch.mDestination);
  }
  String savedUuid=null;
  boolean isOpush=false;
  if (uuids != null) {
    for (    String uuid : uuids) {
      UUID remoteUuid=UUID.fromString(uuid);
      Log.v(TAG,"String_Node_Str" + remoteUuid);
      if (remoteUuid.equals(OPUSH_UUID128)) {
        savedUuid=uuid;
        isOpush=true;
      }
    }
    if (isOpush) {
      int channel=mBluetooth.getRemoteServiceChannel(mBatch.mDestination,savedUuid);
      if (Constants.LOGV) {
        Log.v(TAG,"String_Node_Str" + channel + "String_Node_Str"+ mBatch.mDestination);
      }
      if (channel != -1) {
        mConnectThread=new SocketConnectThread(mBatch.mDestination,channel);
        mConnectThread.start();
      }
      return;
    }
  }
  Log.v(TAG,"String_Node_Str");
  Log.e(TAG,"String_Node_Str");
  markBatchFailed(BluetoothShare.STATUS_CONNECTION_ERROR);
  mBatch.mStatus=Constants.BATCH_STATUS_FAILED;
}

Fixed version (ground truth):
private void doOpushSdp(){
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str" + mBatch.mDestination);
  }
  mTimestamp=System.currentTimeMillis();
  String[] uuids=mBluetooth.getRemoteUuids(mBatch.mDestination);
  if (Constants.LOGVV) {
    Log.v(TAG,"String_Node_Str" + mBatch.mDestination);
  }
  String savedUuid=null;
  boolean isOpush=false;
  if (uuids != null) {
    for (    String uuid : uuids) {
      UUID remoteUuid=UUID.fromString(uuid);
      if (Constants.LOGVV) {
        Log.v(TAG,"String_Node_Str" + remoteUuid);
      }
      if (remoteUuid.equals(OPUSH_UUID128)) {
        savedUuid=uuid;
        isOpush=true;
      }
    }
    if (isOpush) {
      int channel=mBluetooth.getRemoteServiceChannel(mBatch.mDestination,savedUuid);
      if (Constants.LOGV) {
        Log.v(TAG,"String_Node_Str" + channel + "String_Node_Str"+ mBatch.mDestination);
      }
      if (channel != -1) {
        mConnectThread=new SocketConnectThread(mBatch.mDestination,channel);
        mConnectThread.start();
      }
      return;
    }
  }
  Log.e(TAG,"String_Node_Str");
  markBatchFailed(BluetoothShare.STATUS_CONNECTION_ERROR);
  mBatch.mStatus=Constants.BATCH_STATUS_FAILED;
}
Program: 84976
Project: 84976
Buggy source:
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}

Fixed version (ground truth):
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
    System.out.println("String_Node_Str");
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}
Program: 84977
Project: 84977
Buggy source:
public Assign(Object O1,Object O2){
  o1=Lexer.parseExp(O1);
  o2=Lexer.parseStm(O2);
}

Fixed version (ground truth):
public Assign(String O1,Object O2){
  o1=O1;
  o2=Lexer.parseStm(O2);
}
Program: 84978
Project: 84978
Buggy source:
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}

Fixed version (ground truth):
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
    System.out.println("String_Node_Str");
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}
Program: 84979
Project: 84979
Buggy source:
public Assign(Object O1,Object O2){
  o1=Lexer.parseExp(O1);
  o2=Lexer.parseStm(O2);
}

Fixed version (ground truth):
public Assign(String O1,Object O2){
  o1=O1;
  o2=Lexer.parseStm(O2);
}
Program: 84980
Project: 84980
Buggy source:
public int[] solution(int N,int[] A){
  int[] result=new int[N];
  int maxValue=0;
  for (int k=0; k < A.length; k++) {
    if (A[k] >= 1 && A[k] <= N) {
      result[A[k] - 1]++;
      if (result[A[k] - 1] > maxValue) {
        maxValue=result[A[k] - 1];
      }
    }
 else     if (A[k] == (N + 1)) {
      Arrays.fill(result,maxValue);
    }
    for (int i=0; i < result.length; i++) {
      System.out.print(result[i] + "String_Node_Str");
    }
    System.out.println("String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
public int[] solution(int N,int[] A){
  int[] result=new int[N];
  int currentMax=0, maxCounter=0;
  for (int k=0; k < A.length; k++) {
    if (A[k] >= 1 && A[k] <= N) {
      if (result[A[k] - 1] < maxCounter) {
        result[A[k] - 1]=maxCounter;
      }
      result[A[k] - 1]++;
      if (result[A[k] - 1] > currentMax) {
        currentMax=result[A[k] - 1];
      }
    }
 else     if (A[k] == (N + 1)) {
      maxCounter=currentMax;
    }
  }
  for (int i=0; i < result.length; i++) {
    if (result[i] < maxCounter) {
      result[i]=maxCounter;
    }
  }
  return result;
}
Program: 84981
Project: 84981
Buggy source:
public static void main(String[] args){
  new MaxCounters().solution(5,new int[]{3,4,4,6,1,4,4});
}

Fixed version (ground truth):
public static void main(String[] args){
  new MaxCounters().solution(5,new int[]{3,4,4,6,1,4,4});
  new MaxCounters().solution(5,new int[]{3,4,4,6,1,4,6});
}
Program: 84983
Project: 84983
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: 84986
Project: 84986
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: 84987
Project: 84987
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: 84989
Project: 84989
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");
      }
    }
  }
}
Program: 84990
Project: 84990
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 ((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).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: 84991
Project: 84991
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: 84992
Project: 84992
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());
    }
  }
}