nus-yam/ex-repair huggingface dataset:
Program: 39399
Project: 39399
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  ViewHolder holder=null;
  if (convertView == null) {
    holder=new ViewHolder();
    convertView=mInflater.inflate(R.layout.account_item_2,null);
    holder.icon=(ImageView)convertView.findViewById(R.id.account_type_icon);
    holder.name=(TextView)convertView.findViewById(R.id.name);
    holder.money=(TextView)convertView.findViewById(R.id.yu_e);
    holder.selectMark=(TextView)convertView.findViewById(R.id.select_mark);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  AccountDetailDO accountDetailDO=accounts.get(position);
  holder.selectMark.setVisibility(accountID == accountDetailDO.getAccountID() ? View.VISIBLE : View.GONE);
  holder.icon.setImageResource(IconTypeUtil.getAccountIcon(accountDetailDO.getAccountTypeID()));
  if (!TextUtils.isEmpty(accountDetailDO.getAccountColor())) {
    holder.icon.setColorFilter(Integer.parseInt(accountDetailDO.getAccountColor()));
  }
 else {
    holder.icon.setColorFilter(0);
  }
  holder.name.setText(accountDetailDO.getAccountName());
  holder.money.setText(String.format(context.getResources().getString(R.string.money_format_2),accountDetailDO.getAccountMoney()));
  holder.name.setTextColor(context.getResources().getColor(colorID));
  holder.name.setTextColor(context.getResources().getColor(colorID));
  holder.selectMark.setTextColor(context.getResources().getColor(colorID));
  return convertView;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  ViewHolder holder=null;
  if (convertView == null) {
    holder=new ViewHolder();
    convertView=mInflater.inflate(R.layout.account_item_2,null);
    holder.icon=(ImageView)convertView.findViewById(R.id.account_type_icon);
    holder.name=(TextView)convertView.findViewById(R.id.name);
    holder.money=(TextView)convertView.findViewById(R.id.yu_e);
    holder.selectMark=(TextView)convertView.findViewById(R.id.select_mark);
    convertView.setTag(holder);
  }
 else {
    holder=(ViewHolder)convertView.getTag();
  }
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    convertView.setBackgroundResource(R.drawable.ripple);
  }
  AccountDetailDO accountDetailDO=accounts.get(position);
  holder.selectMark.setVisibility(accountID == accountDetailDO.getAccountID() ? View.VISIBLE : View.GONE);
  holder.icon.setImageResource(IconTypeUtil.getAccountIcon(accountDetailDO.getAccountTypeID()));
  if (!TextUtils.isEmpty(accountDetailDO.getAccountColor())) {
    holder.icon.setColorFilter(Integer.parseInt(accountDetailDO.getAccountColor()));
  }
 else {
    holder.icon.setColorFilter(0);
  }
  holder.name.setText(accountDetailDO.getAccountName());
  holder.money.setText(String.format(context.getResources().getString(R.string.money_format_2),accountDetailDO.getAccountMoney()));
  holder.name.setTextColor(context.getResources().getColor(colorID));
  holder.name.setTextColor(context.getResources().getColor(colorID));
  holder.selectMark.setTextColor(context.getResources().getColor(colorID));
  return convertView;
}
Program: 39400
Project: 39400
Buggy source:
@Override protected void onResume(){
  super.onResume();
  MobclickAgent.onResume(this);
  mainColor=this.getResources().getColor(ThemeUtil.getTheme(this).getMainColorID());
  mainDarkColor=this.getResources().getColor(ThemeUtil.getTheme(this).getMainDarkColorID());
  textColor=this.getResources().getColor(ThemeUtil.getTheme(this).getTextColorID());
  if (getSupportActionBar() != null) {
    getSupportActionBar().setBackgroundDrawable(new ColorDrawable(mainColor));
    StatusBarCompat.compat(this,mainDarkColor);
  }
}

Fixed version (ground truth):
@Override protected void onResume(){
  if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT) {
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
  }
  super.onResume();
  MobclickAgent.onResume(this);
  mainColor=this.getResources().getColor(ThemeUtil.getTheme(this).getMainColorID());
  mainDarkColor=this.getResources().getColor(ThemeUtil.getTheme(this).getMainDarkColorID());
  textColor=this.getResources().getColor(ThemeUtil.getTheme(this).getTextColorID());
  if (getSupportActionBar() != null) {
    getSupportActionBar().setBackgroundDrawable(new ColorDrawable(mainColor));
    StatusBarCompat.compat(this,mainDarkColor);
  }
}
Program: 39401
Project: 39401
Buggy source:
public List<Record> getRecordsByRecordTypeIDAndMonth(Context context,long recordTypeID,int recordYear,int recordMonth){
  RecordDao recordDao=getDaoSession(context).getRecordDao();
  return recordDao.queryBuilder().where(RecordDao.Properties.IsDel.eq(false)).where(RecordDao.Properties.RecordTypeID.eq(recordTypeID)).where(RecordDao.Properties.Year.eq(recordYear)).where(RecordDao.Properties.Month.eq(recordMonth)).list();
}

Fixed version (ground truth):
public List<Record> getRecordsByRecordTypeIDAndMonth(Context context,long recordTypeID,int recordYear,int recordMonth){
  RecordDao recordDao=getDaoSession(context).getRecordDao();
  return recordDao.queryBuilder().where(RecordDao.Properties.IsDel.eq(false)).where(RecordDao.Properties.RecordTypeID.eq(recordTypeID)).where(RecordDao.Properties.Year.eq(recordYear)).where(RecordDao.Properties.Month.eq(recordMonth)).orderDesc(RecordDao.Properties.RecordDate).list();
}
Program: 39402
Project: 39402
Buggy source:
public void closeIMClient(){
  if (mClient != null) {
    mClient.close(null);
    mClient=null;
  }
}

Fixed version (ground truth):
public void closeIMClient(){
  if (mClient != null) {
    conversationMap.clear();
    mClient.close(null);
    mClient=null;
  }
}
Program: 39403
Project: 39403
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_record_detail);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  recordMonth=getIntent().getIntExtra(IntentConstant.RECORD_MONTH,0);
  recordYear=getIntent().getIntExtra(IntentConstant.RECORD_YEAR,2016);
  recordTypeID=getIntent().getLongExtra(IntentConstant.RECORD_TYPE_ID,0);
  recordDesc=getIntent().getStringExtra(IntentConstant.RECORD_DESC);
  getSupportActionBar().setTitle(recordDesc + "String_Node_Str");
  recordManager=new RecordManager(this);
  initWidget();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_record_detail);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  recordMonth=getIntent().getIntExtra(IntentConstant.RECORD_MONTH,0);
  recordYear=getIntent().getIntExtra(IntentConstant.RECORD_YEAR,2016);
  recordTypeID=getIntent().getLongExtra(IntentConstant.RECORD_TYPE_ID,0);
  recordDesc=getIntent().getStringExtra(IntentConstant.RECORD_DESC);
  getSupportActionBar().setTitle("String_Node_Str" + recordDesc + "String_Node_Str"+ "String_Node_Str");
  recordManager=new RecordManager(this);
  initWidget();
}
Program: 39404
Project: 39404
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_abount);
  mToolbar=(Toolbar)findViewById(R.id.toolbar);
  setSupportActionBar(mToolbar);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  mToolbar.setNavigationOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      AboutActivity.this.onBackPressed();
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_abount);
  mToolbar=(Toolbar)findViewById(R.id.toolbar);
  mToolbar.setNavigationOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      AboutActivity.this.onBackPressed();
    }
  }
);
  setSupportActionBar(mToolbar);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  initWidget();
}
Program: 39405
Project: 39405
Buggy source:
@Override protected void initWidget(){
}

Fixed version (ground truth):
@Override protected void initWidget(){
  findViewById(R.id.background).setBackgroundColor(getColor(this,getMainTheme().getMainColorID()));
}
Program: 39406
Project: 39406
Buggy source:
public static AVRecord convertRecord2AVRecord(Record record){
  AVRecord avRecord=new AVRecord();
  avRecord.setRecordId(record.getRecordId());
  avRecord.setUser(MyAVUser.getCurrentUser());
  avRecord.setRecordId(record.getRecordId());
  avRecord.setAccountId(record.getAccountID());
  avRecord.setRecordDate(record.getRecordDate());
  avRecord.setRecordMoney(record.getRecordMoney());
  avRecord.setRecordTypeId(record.getRecordTypeID());
  avRecord.setRecordType(record.getRecordType());
  avRecord.setRemark(record.getRemark());
  avRecord.setRecordIsDel(record.getIsDel());
  return avRecord;
}

Fixed version (ground truth):
public static AVRecord convertRecord2AVRecord(Record record){
  AVRecord avRecord=new AVRecord();
  avRecord.setRecordId(record.getRecordId());
  avRecord.setUser(MyAVUser.getCurrentUser());
  avRecord.setRecordId(record.getRecordId());
  avRecord.setAccountId(record.getAccountID());
  avRecord.setRecordDate(record.getRecordDate());
  avRecord.setRecordMoney(record.getRecordMoney());
  avRecord.setRecordTypeId(record.getRecordTypeID());
  avRecord.setRecordType(record.getRecordType());
  avRecord.setRemark(record.getRemark());
  avRecord.setRecordIsDel(record.getIsDel());
  if (!TextUtils.isEmpty(record.getObjectID())) {
    avRecord.setObjectId(record.getObjectID());
  }
  return avRecord;
}
Program: 39408
Project: 39408
Buggy source:
@Override public void showSelect(String value){
  if (isSetting) {
    if (TextUtils.isEmpty(secret)) {
      secret=value;
      mTvTip.setText("String_Node_Str");
    }
 else {
      if (!value.equals(secret)) {
        secret=value;
        mTvTip.setText("String_Node_Str");
      }
 else       if (value.equals(secret)) {
        mTvTip.setText("String_Node_Str");
        SPUtils.put(GestureLockActivity.this,Constant.SP_GESTURE,secret);
        finish();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void showSelect(String value){
  if (isSetting) {
    if (TextUtils.isEmpty(secret)) {
      secret=value;
      mTvTip.setText("String_Node_Str");
    }
 else {
      if (!value.equals(secret)) {
        mTvTip.setText("String_Node_Str");
      }
 else       if (value.equals(secret)) {
        mTvTip.setText("String_Node_Str");
        SPUtils.put(GestureLockActivity.this,Constant.SP_GESTURE,secret);
        finish();
      }
    }
  }
}
Program: 39412
Project: 39412
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_edit_account_prop);
  accountManager=new AccountManager(this);
  recordManager=new RecordManager(this);
  initParam();
  initWidget();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_edit_account_prop);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  accountManager=new AccountManager(this);
  recordManager=new RecordManager(this);
  initParam();
  initWidget();
}
Program: 39414
Project: 39414
Buggy source:
@Override protected void onResume(){
  super.onResume();
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
}
Program: 39415
Project: 39415
Buggy source:
public void switchColor(View view){
  MyRoundColorView myRoundColorView=(MyRoundColorView)view;
  final Intent intent=new Intent();
  intent.putExtra("String_Node_Str",myRoundColorView.getRoundColor());
  accountManager.updateAccountColor(mAccountID,myRoundColorView.getRoundColor() + "String_Node_Str",new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      setResult(RESULT_OK,intent);
      finish();
    }
  }
);
}

Fixed version (ground truth):
public void switchColor(View view){
  MyRoundColorView myRoundColorView=(MyRoundColorView)view;
  final Intent intent=new Intent();
  intent.putExtra("String_Node_Str",myRoundColorView.getRoundColor());
  if (mAccountID > 0) {
    accountManager.updateAccountColor(mAccountID,myRoundColorView.getRoundColor() + "String_Node_Str",new Handler(){
      @Override public void handleMessage(      Message msg){
        super.handleMessage(msg);
        setResult(RESULT_OK,intent);
        finish();
      }
    }
);
  }
 else {
    setResult(RESULT_OK,intent);
    finish();
  }
}
Program: 39416
Project: 39416
Buggy source:
@Override protected void initWidget(){
  mRecordDr=(DragGridView)findViewById(R.id.record_item);
  panelBackView=findViewById(R.id.panel_color);
  panel=findViewById(R.id.panel);
  tvMoneyCount=(TextView)findViewById(R.id.money_count);
  tvTypeTitle=(TextView)findViewById(R.id.record_title);
  typeIcon=(ImageView)findViewById(R.id.record_icon);
  btZhiChu=(Button)findViewById(R.id.zhi_chu);
  btShouRu=(Button)findViewById(R.id.shou_ru);
  mAccountTv=(TextView)findViewById(R.id.account);
  mDateTv=(TextView)findViewById(R.id.date);
  circleProgressBar=(CircleProgressBar)findViewById(R.id.progressBar);
  circleProgressBar.setVisibility(View.INVISIBLE);
  remarkPanel=findViewById(R.id.remark_panel);
  remarkBt=(Button)findViewById(R.id.remark_bt);
  remarkSaveBt=(Button)findViewById(R.id.remark_save);
  etRemark=(TextInputEditText)findViewById(R.id.edit_remark);
  mAccountTv.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  mDateTv.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  remarkBt.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  findViewById(R.id.line3).setBackgroundColor(getResources().getColor(getMainTheme().getMainColorID()));
  initRemarkPanel();
}

Fixed version (ground truth):
@Override protected void initWidget(){
  mRecordDr=(DragGridView)findViewById(R.id.record_item);
  panelBackView=findViewById(R.id.panel_color);
  panel=findViewById(R.id.panel);
  tvMoneyCount=(TextView)findViewById(R.id.money_count);
  tvTypeTitle=(TextView)findViewById(R.id.record_title);
  typeIcon=(ImageView)findViewById(R.id.record_icon);
  btZhiChu=(Button)findViewById(R.id.zhi_chu);
  btShouRu=(Button)findViewById(R.id.shou_ru);
  mAccountTv=(TextView)findViewById(R.id.account);
  mDateTv=(TextView)findViewById(R.id.date);
  circleProgressBar=(CircleProgressBar)findViewById(R.id.progressBar);
  circleProgressBar.setVisibility(View.INVISIBLE);
  remarkPanel=findViewById(R.id.remark_panel);
  remarkBt=(Button)findViewById(R.id.remark_bt);
  remarkSaveBt=(Button)findViewById(R.id.remark_save);
  etRemark=(TextInputEditText)findViewById(R.id.edit_remark);
  mAccountTv.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  mDateTv.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  remarkBt.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  remarkSaveBt.setTextColor(getResources().getColor(getMainTheme().getMainColorID()));
  findViewById(R.id.line3).setBackgroundColor(getResources().getColor(getMainTheme().getMainColorID()));
  initRemarkPanel();
}
Program: 39417
Project: 39417
Buggy source:
@Override public void done(List<AVAccount> list,AVException e){
  Message message=new Message();
  if (list.size() > 0)   accountLocalDao.clearAllAccount(_context);
  if (e == null) {
    for (    AVAccount avAccount : list) {
      Account account=new Account();
      account.setObjectID(avAccount.getObjectId());
      account.setAccountID(avAccount.getAccountId());
      account.setAccountTypeID(avAccount.getAccountTypeId());
      account.setAccountMoney(avAccount.getAccountMoney());
      account.setAccountRemark(avAccount.getAccountRemark());
      account.setIsDel(avAccount.isAccountDel());
      account.setAccountName(avAccount.getAccountName());
      account.setSyncStatus(true);
      accountLocalDao.createNewAccount(account,_context);
    }
    message.what=Constant.MSG_SUCCESS;
  }
 else {
    message.what=Constant.MSG_ERROR;
    getAvEx(e);
  }
  handler.sendMessage(message);
}

Fixed version (ground truth):
@Override public void done(List<AVAccount> list,AVException e){
  Message message=new Message();
  if (list.size() > 0)   accountLocalDao.clearAllAccount(_context);
  if (e == null) {
    for (    AVAccount avAccount : list) {
      Account account=new Account();
      account.setObjectID(avAccount.getObjectId());
      account.setAccountID(avAccount.getAccountId());
      account.setAccountTypeID(avAccount.getAccountTypeId());
      account.setAccountMoney(avAccount.getAccountMoney());
      account.setAccountRemark(avAccount.getAccountRemark());
      account.setIsDel(avAccount.isAccountDel());
      account.setAccountColor(avAccount.getAccountColor());
      account.setAccountName(avAccount.getAccountName());
      account.setSyncStatus(true);
      accountLocalDao.createNewAccount(account,_context);
    }
    message.what=Constant.MSG_SUCCESS;
  }
 else {
    message.what=Constant.MSG_ERROR;
    getAvEx(e);
  }
  handler.sendMessage(message);
}
Program: 39418
Project: 39418
Buggy source:
/** 
 * 从云端获取全部账户信息初始化数据
 * @param handler
 */
public void initAccountData(final Handler handler){
  AVQuery<AVAccount> query=AVObject.getQuery(AVAccount.class);
  query.limit(1000);
  query.whereEqualTo(AVAccount.USER,MyAVUser.getCurrentUser());
  query.findInBackground(new FindCallback<AVAccount>(){
    @Override public void done(    List<AVAccount> list,    AVException e){
      Message message=new Message();
      if (list.size() > 0)       accountLocalDao.clearAllAccount(_context);
      if (e == null) {
        for (        AVAccount avAccount : list) {
          Account account=new Account();
          account.setObjectID(avAccount.getObjectId());
          account.setAccountID(avAccount.getAccountId());
          account.setAccountTypeID(avAccount.getAccountTypeId());
          account.setAccountMoney(avAccount.getAccountMoney());
          account.setAccountRemark(avAccount.getAccountRemark());
          account.setIsDel(avAccount.isAccountDel());
          account.setAccountName(avAccount.getAccountName());
          account.setSyncStatus(true);
          accountLocalDao.createNewAccount(account,_context);
        }
        message.what=Constant.MSG_SUCCESS;
      }
 else {
        message.what=Constant.MSG_ERROR;
        getAvEx(e);
      }
      handler.sendMessage(message);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * 从云端获取全部账户信息初始化数据
 * @param handler
 */
public void initAccountData(final Handler handler){
  AVQuery<AVAccount> query=AVObject.getQuery(AVAccount.class);
  query.limit(1000);
  query.whereEqualTo(AVAccount.USER,MyAVUser.getCurrentUser());
  query.findInBackground(new FindCallback<AVAccount>(){
    @Override public void done(    List<AVAccount> list,    AVException e){
      Message message=new Message();
      if (list.size() > 0)       accountLocalDao.clearAllAccount(_context);
      if (e == null) {
        for (        AVAccount avAccount : list) {
          Account account=new Account();
          account.setObjectID(avAccount.getObjectId());
          account.setAccountID(avAccount.getAccountId());
          account.setAccountTypeID(avAccount.getAccountTypeId());
          account.setAccountMoney(avAccount.getAccountMoney());
          account.setAccountRemark(avAccount.getAccountRemark());
          account.setIsDel(avAccount.isAccountDel());
          account.setAccountColor(avAccount.getAccountColor());
          account.setAccountName(avAccount.getAccountName());
          account.setSyncStatus(true);
          accountLocalDao.createNewAccount(account,_context);
        }
        message.what=Constant.MSG_SUCCESS;
      }
 else {
        message.what=Constant.MSG_ERROR;
        getAvEx(e);
      }
      handler.sendMessage(message);
    }
  }
);
}
Program: 39419
Project: 39419
Buggy source:
/** 
 * 用户登出
 */
public void logOut(boolean clearAvUser){
  if (clearAvUser)   MyAVUser.getCurrentUser().logOut();
  recordLocalDAO.clearAllRecord(_context);
  accountLocalDao.clearAllAccount(_context);
  recordTypeLocalDao.clearAllRecordType(_context);
  userLocalDao.delUserByUserId(MyAVUser.getCurrentUserId(),_context);
  SPUtils.put(_context,Constant.SP_GESTURE,"String_Node_Str");
  SPUtils.put(_context,true,SettingsActivity.GESTURE_LOCK,false);
  user=null;
  configLocalDao.initRecordType(_context);
  configLocalDao.createDefaultAccount(_context);
}

Fixed version (ground truth):
/** 
 * 用户登出
 */
public void logOut(boolean clearAvUser){
  if (clearAvUser)   MyAVUser.getCurrentUser().logOut();
  recordLocalDAO.clearAllRecord(_context);
  accountLocalDao.clearAllAccount(_context);
  recordTypeLocalDao.clearAllRecordType(_context);
  userLocalDao.clear(_context);
  SPUtils.put(_context,Constant.SP_GESTURE,"String_Node_Str");
  SPUtils.put(_context,true,SettingsActivity.GESTURE_LOCK,false);
  user=null;
  configLocalDao.initRecordType(_context);
  configLocalDao.createDefaultAccount(_context);
}
Program: 39420
Project: 39420
Buggy source:
private void initLineChart(){
  mLineChart.setDescription("String_Node_Str");
  mLineChart.setDragEnabled(true);
  mLineChart.setScaleEnabled(false);
  mLineChart.setTouchEnabled(true);
  mLineChart.setDrawGridBackground(false);
  mLineChart.setDrawBorders(false);
  mLineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
  mLineChart.getXAxis().setDrawGridLines(false);
  mLineChart.getAxisRight().setEnabled(false);
  for (int j=0; j < 12; j++) {
    xLineVals1.add(j + 1 + "String_Node_Str");
  }
  refreshLineChart(0);
}

Fixed version (ground truth):
private void initLineChart(){
  mLineChart.setDescription("String_Node_Str");
  mLineChart.setDragEnabled(false);
  mLineChart.setScaleEnabled(false);
  mLineChart.setTouchEnabled(false);
  mLineChart.setDrawGridBackground(false);
  mLineChart.setDrawBorders(false);
  mLineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
  mLineChart.getXAxis().setDrawGridLines(false);
  mLineChart.getAxisRight().setEnabled(false);
  for (int j=0; j < 12; j++) {
    xLineVals1.add(j + 1 + "String_Node_Str");
  }
  refreshLineChart(0);
}
Program: 39421
Project: 39421
Buggy source:
private void initLineChart(){
  mLineChart.setDescription("String_Node_Str");
  mLineChart.setDragEnabled(true);
  mLineChart.setScaleEnabled(false);
  mLineChart.setTouchEnabled(true);
  mLineChart.setDrawGridBackground(false);
  mLineChart.setDrawBorders(false);
  mLineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
  mLineChart.getXAxis().setDrawGridLines(false);
  mLineChart.getAxisRight().setEnabled(false);
  for (int j=0; j < 12; j++) {
    xLineVals1.add(j + 1 + "String_Node_Str");
  }
  refreshLineChart();
}

Fixed version (ground truth):
private void initLineChart(){
  mLineChart.setDescription("String_Node_Str");
  mLineChart.setDragEnabled(true);
  mLineChart.setScaleEnabled(false);
  mLineChart.setTouchEnabled(false);
  mLineChart.setDrawGridBackground(false);
  mLineChart.setDrawBorders(false);
  mLineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
  mLineChart.getXAxis().setDrawGridLines(false);
  mLineChart.getAxisRight().setEnabled(false);
  for (int j=0; j < 12; j++) {
    xLineVals1.add(j + 1 + "String_Node_Str");
  }
  refreshLineChart();
}
Program: 39423
Project: 39423
Buggy source:
@Override public void onResume(){
  super.onResume();
  mainColor=getResources().getColor(ThemeUtil.getTheme(getActivity()).getMainColorID());
  mainDarkColor=getResources().getColor(ThemeUtil.getTheme(getActivity()).getMainDarkColorID());
  mAddRecordBt.setColorNormal(mainColor);
  mAddRecordBt.setColorPressed(mainDarkColor);
  backGround.setBackground(new ColorDrawable(mainColor));
  footTv.setTextColor(mainColor);
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  mainColor=getResources().getColor(ThemeUtil.getTheme(getActivity()).getMainColorID());
  mainDarkColor=getResources().getColor(ThemeUtil.getTheme(getActivity()).getMainDarkColorID());
  mAddRecordBt.setColorNormal(mainColor);
  mAddRecordBt.setColorPressed(mainDarkColor);
  backGround.setBackground(new ColorDrawable(mainColor));
  resetFoot();
}
Program: 39425
Project: 39425
Buggy source:
protected boolean canSync(){
  return MyAVUser.getCurrentUser() != null && ((boolean)SPUtils.get(_context,true,Constant.SP_SYNC_ONLY_WIFI,false) ? NetworkUtil.checkNetwork(_context) : NetworkUtil.checkNetwork(_context));
}

Fixed version (ground truth):
protected boolean canSync(){
  return MyAVUser.getCurrentUser() != null && ((boolean)SPUtils.get(_context,true,Constant.SP_SYNC_ONLY_WIFI,false) ? NetworkUtil.checkWifi(_context) : NetworkUtil.checkNetwork(_context));
}
Program: 39426
Project: 39426
Buggy source:
/** 
 * 创建新记录
 * @param record
 */
public void createNewRecord(final Record record,final Handler handler){
  record.setIsDel(false);
  if (canSync()) {
    final AVRecord avRecord=DataConvertUtil.convertRecord2AVRecord(record);
    avRecord.setRecordIsDel(false);
    avRecord.saveInBackground(new SaveCallback(){
      @Override public void done(      AVException e){
        record.setSyncStatus(e == null ? true : false);
        recordLocalDAO.createNewRecord(_context,record);
        getAvEx(e);
        sendEmptyMessage(handler,Constant.MSG_SUCCESS);
      }
    }
);
  }
 else {
    record.setSyncStatus(false);
    recordLocalDAO.createNewRecord(_context,record);
  }
}

Fixed version (ground truth):
/** 
 * 创建新记录
 * @param record
 */
public void createNewRecord(final Record record,final Handler handler){
  record.setIsDel(false);
  if (canSync()) {
    final AVRecord avRecord=DataConvertUtil.convertRecord2AVRecord(record);
    avRecord.setRecordIsDel(false);
    avRecord.saveInBackground(new SaveCallback(){
      @Override public void done(      AVException e){
        record.setSyncStatus(e == null ? true : false);
        recordLocalDAO.createNewRecord(_context,record);
        getAvEx(e);
        sendEmptyMessage(handler,Constant.MSG_SUCCESS);
      }
    }
);
  }
 else {
    record.setSyncStatus(false);
    recordLocalDAO.createNewRecord(_context,record);
    sendEmptyMessage(handler,Constant.MSG_SUCCESS);
  }
}
Program: 39428
Project: 39428
Buggy source:
private boolean canSync(){
  return MyAVUser.getCurrentUser() != null && ((boolean)SPUtils.get(this,true,Constant.SP_SYNC_ONLY_WIFI,false) ? NetworkUtil.checkNetwork(this) : NetworkUtil.checkNetwork(this));
}

Fixed version (ground truth):
private boolean canSync(){
  return MyAVUser.getCurrentUser() != null && ((boolean)SPUtils.get(this,true,Constant.SP_SYNC_ONLY_WIFI,false) ? NetworkUtil.checkWifi(this) : NetworkUtil.checkNetwork(this));
}
Program: 39431
Project: 39431
Buggy source:
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  new Handler().postDelayed(new Runnable(){
    @Override public void run(){
      setResult(RESULT_OK);
      finish();
    }
  }
,500);
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  new Handler().postDelayed(new Runnable(){
    @Override public void run(){
      setResult(RESULT_OK);
      finish();
    }
  }
,600);
}
Program: 39432
Project: 39432
Buggy source:
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  if (msg.what == Constant.MSG_ERROR) {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
  }
 else {
    AVUser.requestEmailVerfiyInBackground(mTieEmail.getText().toString(),new RequestEmailVerifyCallback(){
      @Override public void done(      AVException e){
      }
    }
);
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
    MyAVUser.getCurrentUser().logOut();
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        finish();
      }
    }
,500);
  }
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  if (msg.what == Constant.MSG_ERROR) {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
  }
 else {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
    MyAVUser.getCurrentUser().logOut();
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        finish();
      }
    }
,500);
  }
}
Program: 39433
Project: 39433
Buggy source:
private void register(){
  String user=mTieUserID.getText().toString();
  String password=mTiePass.getText().toString();
  String password2=mTiePass2.getText().toString();
  String email=mTieEmail.getText().toString();
  if (TextUtils.isEmpty(user)) {
    mTilUserID.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(email)) {
    mTilEmail.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password)) {
    mTilPass.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password2)) {
    mTilPass2.setError("String_Node_Str");
    return;
  }
  if (!password.equals(password2)) {
    mTilPass.setError("String_Node_Str");
    mTilPass2.setError("String_Node_Str");
    return;
  }
  userManager.register(user,password,email,new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_ERROR) {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
      }
 else {
        AVUser.requestEmailVerfiyInBackground(mTieEmail.getText().toString(),new RequestEmailVerifyCallback(){
          @Override public void done(          AVException e){
          }
        }
);
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
        MyAVUser.getCurrentUser().logOut();
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            finish();
          }
        }
,500);
      }
    }
  }
);
}

Fixed version (ground truth):
private void register(){
  String user=mTieUserID.getText().toString();
  String password=mTiePass.getText().toString();
  String password2=mTiePass2.getText().toString();
  String email=mTieEmail.getText().toString();
  if (TextUtils.isEmpty(user)) {
    mTilUserID.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(email)) {
    mTilEmail.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password)) {
    mTilPass.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password2)) {
    mTilPass2.setError("String_Node_Str");
    return;
  }
  if (!password.equals(password2)) {
    mTilPass.setError("String_Node_Str");
    mTilPass2.setError("String_Node_Str");
    return;
  }
  userManager.register(user,password,email,new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_ERROR) {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
      }
 else {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
        MyAVUser.getCurrentUser().logOut();
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            finish();
          }
        }
,500);
      }
    }
  }
);
}
Program: 39434
Project: 39434
Buggy source:
public static String getError(int errorCode){
  String info="String_Node_Str";
switch (errorCode) {
case AVException.USERNAME_TAKEN:
    info="String_Node_Str";
  break;
case AVException.USER_DOESNOT_EXIST:
info="String_Node_Str";
break;
case AVException.USERNAME_PASSWORD_MISMATCH:
info="String_Node_Str";
break;
case AVException.INVALID_EMAIL_ADDRESS:
info="String_Node_Str";
break;
case AVException.INVALID_PHONE_NUMBER:
info="String_Node_Str";
break;
case AVException.EMAIL_TAKEN:
info="String_Node_Str";
break;
case AVException.USER_MOBILE_PHONENUMBER_TAKEN:
info="String_Node_Str";
break;
default :
break;
}
return info;
}

Fixed version (ground truth):
public static String getError(int errorCode){
  String info="String_Node_Str";
switch (errorCode) {
case AVException.USERNAME_TAKEN:
    info="String_Node_Str";
  break;
case AVException.USER_DOESNOT_EXIST:
info="String_Node_Str";
break;
case AVException.USERNAME_PASSWORD_MISMATCH:
info="String_Node_Str";
break;
case AVException.INVALID_EMAIL_ADDRESS:
info="String_Node_Str";
break;
case AVException.INVALID_PHONE_NUMBER:
info="String_Node_Str";
break;
case AVException.EMAIL_TAKEN:
info="String_Node_Str";
break;
case AVException.USER_MOBILE_PHONENUMBER_TAKEN:
info="String_Node_Str";
break;
case 216:
info="String_Node_Str";
break;
default :
break;
}
return info;
}
Program: 39435
Project: 39435
Buggy source:
public List<Record> getRecordByDate(Context context,Date date){
  RecordDao recordDao=getDaoSession(context).getRecordDao();
  return recordDao.queryBuilder().where(RecordDao.Properties.IsDel.eq(false)).where(RecordDao.Properties.RecordDate.eq(date)).orderDesc(RecordDao.Properties.Id).list();
}

Fixed version (ground truth):
public List<Record> getRecordByDate(Context context,Date date){
  RecordDao recordDao=getDaoSession(context).getRecordDao();
  return recordDao.queryBuilder().where(RecordDao.Properties.IsDel.eq(false)).where(RecordDao.Properties.RecordDate.eq(date)).whereOr(RecordDao.Properties.RecordType.eq(Constant.RecordType.SHOURU.getId()),RecordDao.Properties.RecordType.eq(Constant.RecordType.AA_SHOURU.getId()),RecordDao.Properties.RecordType.eq(Constant.RecordType.ZUICHU.getId()),RecordDao.Properties.RecordType.eq(Constant.RecordType.AA_ZHICHU.getId())).orderDesc(RecordDao.Properties.Id).list();
}
Program: 39436
Project: 39436
Buggy source:
/** 
 * 创建新记录
 * @param record
 */
public void createNewRecord(final Record record,final Handler handler){
  record.setIsDel(false);
  if (!TextUtils.isEmpty(MyAVUser.getCurrentUserId())) {
    final AVRecord avRecord=new AVRecord();
    avRecord.setUser(MyAVUser.getCurrentUser());
    avRecord.setRecordId(record.getRecordId());
    avRecord.setAccountId(record.getAccountID());
    avRecord.setRecordDate(record.getRecordDate());
    avRecord.setRecordMoney(record.getRecordMoney());
    avRecord.setRecordTypeId(record.getRecordTypeID());
    avRecord.setRecordType(record.getRecordType());
    avRecord.setRemark(record.getRemark());
    avRecord.setRecordIsDel(false);
    avRecord.saveInBackground(new SaveCallback(){
      @Override public void done(      AVException e){
        record.setSyncStatus(e == null ? true : false);
        recordLocalDAO.createNewRecord(_context,record);
        getAvEx(e);
        handler.sendEmptyMessage(Constant.MSG_SUCCESS);
      }
    }
);
  }
 else {
    record.setSyncStatus(false);
    recordLocalDAO.createNewRecord(_context,record);
  }
}

Fixed version (ground truth):
/** 
 * 创建新记录
 * @param record
 */
public void createNewRecord(final Record record,final Handler handler){
  record.setIsDel(false);
  if (!TextUtils.isEmpty(MyAVUser.getCurrentUserId())) {
    final AVRecord avRecord=new AVRecord();
    avRecord.setUser(MyAVUser.getCurrentUser());
    avRecord.setRecordId(record.getRecordId());
    avRecord.setAccountId(record.getAccountID());
    avRecord.setRecordDate(record.getRecordDate());
    avRecord.setRecordMoney(record.getRecordMoney());
    avRecord.setRecordTypeId(record.getRecordTypeID());
    avRecord.setRecordType(record.getRecordType());
    avRecord.setRemark(record.getRemark());
    avRecord.setRecordIsDel(false);
    avRecord.saveInBackground(new SaveCallback(){
      @Override public void done(      AVException e){
        record.setSyncStatus(e == null ? true : false);
        recordLocalDAO.createNewRecord(_context,record);
        getAvEx(e);
        sendEmptyMessage(handler,Constant.MSG_SUCCESS);
      }
    }
);
  }
 else {
    record.setSyncStatus(false);
    recordLocalDAO.createNewRecord(_context,record);
  }
}
Program: 39437
Project: 39437
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_edit_account_prop);
  accountManager=new AccountManager(this);
  initParam();
  initWidget();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_edit_account_prop);
  accountManager=new AccountManager(this);
  recordManager=new RecordManager(this);
  initParam();
  initWidget();
}
Program: 39438
Project: 39438
Buggy source:
private void saveProp(String param){
  final Intent intent=new Intent();
switch (mEditType) {
case PROP_TYPE_ACCOUNT_NAME:
    intent.putExtra(IntentConstant.EDIT_ACCOUNT_NAME,param);
  if (mAccountID > 0) {
    accountManager.updateAccountName(mAccountID,param,new Handler(){
      @Override public void handleMessage(      Message msg){
        super.handleMessage(msg);
        setResult(RESULT_OK,intent);
        finish();
      }
    }
);
  }
break;
case PROP_TYPE_ACCOUNT_MONEY:
double money=Double.parseDouble(param);
if (mAccountID > 0) {
accountManager.updateAccountMoney(mAccountID,money - mMoney,new Handler(){
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  setResult(RESULT_OK,intent);
  finish();
}
}
);
}
intent.putExtra(IntentConstant.EDIT_ACCOUNT_MONEY,money);
break;
case PROP_TYPE_ACCOUNT_REMARK:
intent.putExtra(IntentConstant.EDIT_ACCOUNT_REMARK,param);
if (mAccountID > 0) {
accountManager.updateAccountRemark(mAccountID,param,new Handler(){
@Override public void handleMessage(Message msg){
super.handleMessage(msg);
setResult(RESULT_OK,intent);
finish();
}
}
);
}
break;
default :
break;
}
}

Fixed version (ground truth):
private void saveProp(String param){
  final Intent intent=new Intent();
switch (mEditType) {
case PROP_TYPE_ACCOUNT_NAME:
    intent.putExtra(IntentConstant.EDIT_ACCOUNT_NAME,param);
  if (mAccountID > 0) {
    accountManager.updateAccountName(mAccountID,param,new Handler(){
      @Override public void handleMessage(      Message msg){
        super.handleMessage(msg);
        setResult(RESULT_OK,intent);
        finish();
      }
    }
);
  }
break;
case PROP_TYPE_ACCOUNT_MONEY:
final double money=Double.parseDouble(param);
if (mAccountID > 0) {
accountManager.updateAccountMoney(mAccountID,money - mMoney,new Handler(){
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  Record record=new Record();
  record.setIsDel(false);
  record.setRemark("String_Node_Str");
  record.setRecordId(System.currentTimeMillis());
  record.setAccountID(mAccountID);
  record.setRecordType(Constant.RecordType.CHANGE.getId());
  record.setRecordTypeID(27L);
  record.setRecordMoney(money - mMoney);
  record.setRecordDate(new Date(System.currentTimeMillis()));
  recordManager.createNewRecord(record,null);
  setResult(RESULT_OK,intent);
  finish();
}
}
);
}
intent.putExtra(IntentConstant.EDIT_ACCOUNT_MONEY,money);
break;
case PROP_TYPE_ACCOUNT_REMARK:
intent.putExtra(IntentConstant.EDIT_ACCOUNT_REMARK,param);
if (mAccountID > 0) {
accountManager.updateAccountRemark(mAccountID,param,new Handler(){
@Override public void handleMessage(Message msg){
super.handleMessage(msg);
setResult(RESULT_OK,intent);
finish();
}
}
);
}
break;
default :
break;
}
}
Program: 39439
Project: 39439
Buggy source:
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  if (msg.what == Constant.MSG_ERROR) {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
  }
 else {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        finish();
      }
    }
,500);
  }
}

Fixed version (ground truth):
@Override public void handleMessage(Message msg){
  super.handleMessage(msg);
  if (msg.what == Constant.MSG_ERROR) {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
  }
 else {
    SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
    MyAVUser.getCurrentUser().logOut();
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        finish();
      }
    }
,500);
  }
}
Program: 39440
Project: 39440
Buggy source:
private void register(){
  String user=mTieUserID.getText().toString();
  String password=mTiePass.getText().toString();
  String password2=mTiePass2.getText().toString();
  String email=mTieEmail.getText().toString();
  if (TextUtils.isEmpty(user)) {
    mTilUserID.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(email)) {
    mTilEmail.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password)) {
    mTilPass.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password2)) {
    mTilPass2.setError("String_Node_Str");
    return;
  }
  if (!password.equals(password2)) {
    mTilPass.setError("String_Node_Str");
    mTilPass2.setError("String_Node_Str");
    return;
  }
  userManager.register(user,password,email,new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_ERROR) {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
      }
 else {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            finish();
          }
        }
,500);
      }
    }
  }
);
}

Fixed version (ground truth):
private void register(){
  String user=mTieUserID.getText().toString();
  String password=mTiePass.getText().toString();
  String password2=mTiePass2.getText().toString();
  String email=mTieEmail.getText().toString();
  if (TextUtils.isEmpty(user)) {
    mTilUserID.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(email)) {
    mTilEmail.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password)) {
    mTilPass.setError("String_Node_Str");
    return;
  }
  if (TextUtils.isEmpty(password2)) {
    mTilPass2.setError("String_Node_Str");
    return;
  }
  if (!password.equals(password2)) {
    mTilPass.setError("String_Node_Str");
    mTilPass2.setError("String_Node_Str");
    return;
  }
  userManager.register(user,password,email,new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_ERROR) {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,msg.obj.toString());
      }
 else {
        SnackBarUtil.showSnackInfo(mTilUserID,RegisterActivity.this,"String_Node_Str");
        MyAVUser.getCurrentUser().logOut();
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            finish();
          }
        }
,500);
      }
    }
  }
);
}
Program: 39441
Project: 39441
Buggy source:
private static void reloadConfig(){
  PrimitiveMobsConfigMobs.load(config);
  TreasureSlimeLoot.load();
  HauntedToolLoot.load();
  FilchLizardLoot.load();
  if (config.hasChanged()) {
    config.save();
  }
}

Fixed version (ground truth):
private static void reloadConfig(){
  PrimitiveMobsConfigMobs.load(config);
  PrimitiveMobsConfigSpawns.load(config);
  TreasureSlimeLoot.load();
  HauntedToolLoot.load();
  FilchLizardLoot.load();
  if (config.hasChanged()) {
    config.save();
  }
}
Program: 39443
Project: 39443
Buggy source:
public static void load(Configuration config){
  config.addCustomCategoryComment("String_Node_Str","String_Node_Str");
  treasureSlimeSpawn=config.get("String_Node_Str","String_Node_Str",0.25).getDouble();
}

Fixed version (ground truth):
public static void load(Configuration config){
  String category="String_Node_Str";
  config.addCustomCategoryComment(category,"String_Node_Str");
  chameleonSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  treasureslimeSpawnRate=config.get(category,"String_Node_Str",20).getInt() / 100f;
  hauntedToolSpawnRate=config.get(category,"String_Node_Str",15).getInt() / 100f;
  groveSpriteSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  bewitchedTomeSpawnRate=config.get(category,"String_Node_Str",30).getInt() / 100f;
  filchLizardSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  brainSlimeSpawnRate=config.get(category,"String_Node_Str",50).getInt() / 100f;
  rocketCreeperSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  festiveCreeperSpawnRate=config.get(category,"String_Node_Str",15).getInt() / 100f;
  supportCreeperSpawnRate=config.get(category,"String_Node_Str",15).getInt() / 100f;
  skeletonWarriorSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  blazingJuggernautSpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
  lilyLurkerSpawnRate=config.get(category,"String_Node_Str",30).getInt() / 100f;
  spiderFamilySpawnRate=config.get(category,"String_Node_Str",25).getInt() / 100f;
}
Program: 39446
Project: 39446
Buggy source:
private static PrimitiveMobsSpawnEntry registerSpawnWater(PrimitiveMobsSpawnEntry entry){
  if (!PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.IN_WATER);
  return entry;
}

Fixed version (ground truth):
private static PrimitiveMobsSpawnEntry registerSpawnWater(PrimitiveMobsSpawnEntry entry){
  if (PrimitiveMobsEntities.enabledEntities.containsKey(entry.entityClass) && !PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.IN_WATER);
  return entry;
}
Program: 39447
Project: 39447
Buggy source:
private static PrimitiveMobsSpawnEntry registerSpawnFlying(PrimitiveMobsSpawnEntry entry){
  if (!PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.IN_AIR);
  return entry;
}

Fixed version (ground truth):
private static PrimitiveMobsSpawnEntry registerSpawnFlying(PrimitiveMobsSpawnEntry entry){
  if (PrimitiveMobsEntities.enabledEntities.containsKey(entry.entityClass) && !PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.IN_AIR);
  return entry;
}
Program: 39449
Project: 39449
Buggy source:
private static PrimitiveMobsSpawnEntry registerSpawnNormal(PrimitiveMobsSpawnEntry entry,BiomeDictionary.Type[]... array){
  if (!PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.ON_GROUND);
  return entry;
}

Fixed version (ground truth):
private static PrimitiveMobsSpawnEntry registerSpawnNormal(PrimitiveMobsSpawnEntry entry,BiomeDictionary.Type[]... array){
  if (PrimitiveMobsEntities.enabledEntities.containsKey(entry.entityClass) && !PrimitiveMobsEntities.enabledEntities.get(entry.entityClass))   return entry;
  SPAWNS.add(entry);
  EntitySpawnPlacementRegistry.setPlacementType(entry.getEntityClass(),EntityLiving.SpawnPlacementType.ON_GROUND);
  return entry;
}
Program: 39452
Project: 39452
Buggy source:
private HttpClientMockBuilder newRule(String method,String urlText){
  UrlParser urlParser=new UrlParser();
  Rule r=new Rule();
  r.addCondition(new HttpMethodCondition(method));
  List<Condition> urlConditions=urlParser.parse(host + urlText);
  r.addConditions(urlConditions);
  return new HttpClientMockBuilder(r);
}

Fixed version (ground truth):
private HttpClientMockBuilder newRule(String method,String urlText){
  UrlParser urlParser=new UrlParser();
  Rule r=new Rule();
  r.addCondition(new HttpMethodCondition(method));
  List<Condition> urlConditions=urlParser.parse(host + urlText);
  r.addConditions(urlConditions);
  rules.add(r);
  return new HttpClientMockBuilder(r);
}