nus-yam/ex-repair huggingface dataset:
Program: 143243
Project: 143243
Buggy source:
@Test(dataProvider="String_Node_Str") public void testProcess(final String phrase,final List<Result> resultList){
  final NerResultSet result=namedEntityAnalyser.process(phrase);
  final Map<NameType,Set<String>> mappedResult=result.getMappedResult();
  for (  final Result r : resultList) {
    assertTrue(mappedResult.containsKey(r.type),"String_Node_Str" + r.phrase + "String_Node_Str"+ r.type+ "String_Node_Str"+ mappedResult+ "String_Node_Str");
    final Set<String> phrases=mappedResult.get(r.type);
    assertNotNull(phrases.remove(r.phrase),"String_Node_Str" + r.phrase + "String_Node_Str"+ phrases+ "String_Node_Str");
    if (phrases.isEmpty())     mappedResult.remove(r.type);
  }
  assertTrue(mappedResult.isEmpty(),"String_Node_Str" + mappedResult);
  for (int i=0; i < result.phrases.get(0).size(); i++) {
    final Phrase p=result.phrases.get(0).get(i);
    final Result r=resultList.get(i);
    assertEquals(p.score,r.scores,"String_Node_Str" + p.phraseString() + "String_Node_Str"+ Arrays.toString(r.scores)+ "String_Node_Str"+ Arrays.toString(p.score)+ "String_Node_Str");
    assertEquals(p.attachedWordMap,r.attachedWordMap);
  }
}

Fixed version (ground truth):
@Test(dataProvider="String_Node_Str") public void testProcess(final String phrase,final List<Result> resultList){
  final NerResultSet result=namedEntityAnalyser.process(phrase);
  final Map<NameType,Set<String>> mappedResult=result.getMappedResult();
  for (  final Result r : resultList) {
    assertTrue(mappedResult.containsKey(r.type),"String_Node_Str" + r.phrase + "String_Node_Str"+ r.type+ "String_Node_Str"+ mappedResult+ "String_Node_Str");
    final Set<String> phrases=mappedResult.get(r.type);
    assertNotNull(phrases.remove(r.phrase),"String_Node_Str" + r.phrase + "String_Node_Str"+ phrases+ "String_Node_Str");
    if (phrases.isEmpty())     mappedResult.remove(r.type);
  }
  assertTrue(mappedResult.isEmpty(),"String_Node_Str" + mappedResult);
  final List<Phrase> flat=new ArrayList<>();
  for (  final List<Phrase> l : result.phrases) {
    for (    final Phrase p : l) {
      flat.add(p);
    }
  }
  for (int i=0; i < flat.size(); i++) {
    final Phrase p=flat.get(i);
    final Result r=resultList.get(i);
    assertEquals(p.score,r.scores,"String_Node_Str" + p.phraseString() + "String_Node_Str"+ Arrays.toString(r.scores)+ "String_Node_Str"+ Arrays.toString(p.score)+ "String_Node_Str");
    assertEquals(p.attachedWordMap,r.attachedWordMap);
  }
}
Program: 143245
Project: 143245
Buggy source:
@Override protected String doInBackground(Void... v){
  try {
    Command cmd=Command.commandFactory(Command.commandType.LISTSERVERS,U);
    if (cmd != null)     cmd.execute();
 else {
      Utils.alert("String_Node_Str",FloatingIPActivity.this);
      return null;
    }
    jsonBuf=cmd.getRESTResponse();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}

Fixed version (ground truth):
@Override protected String doInBackground(Void... v){
  try {
    Command cmd=Command.commandFactory(Command.commandType.LISTSERVERS,U);
    if (cmd != null)     cmd.execute();
 else {
      hasError=true;
      errorMessage="String_Node_Str";
      return null;
    }
    jsonBuf=cmd.getRESTResponse();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}
Program: 143246
Project: 143246
Buggy source:
@Override protected Void doInBackground(String... args){
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(args[0],args[1],args[2],args[3],Integer.parseInt(args[4]),args[5],ImageLaunchActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      Utils.alert("String_Node_Str",ImageLaunchActivity.this);
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(String... args){
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(args[0],args[1],args[2],args[3],Integer.parseInt(args[4]),args[5],ImageLaunchActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      hasError=true;
      errorMessage="String_Node_Str";
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}
Program: 143247
Project: 143247
Buggy source:
@Override protected Void doInBackground(Void... args){
  OSClient osc=OSClient.getInstance(U);
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(name_InstanceToLaunch,imageID_InstanceToLaunch,keyname_InstanceToLaunch,flavorID_InstanceToLaunch,Integer.parseInt(count_InstanceToLaunch),secgrpID_InstanceToLaunch,OSImagesActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      Utils.alert("String_Node_Str",OSImagesActivity.this);
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(Void... args){
  OSClient osc=OSClient.getInstance(U);
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(name_InstanceToLaunch,imageID_InstanceToLaunch,keyname_InstanceToLaunch,flavorID_InstanceToLaunch,Integer.parseInt(count_InstanceToLaunch),secgrpID_InstanceToLaunch,OSImagesActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      hasError=true;
      errorMessage="String_Node_Str";
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}
Program: 143248
Project: 143248
Buggy source:
@Override protected String doInBackground(Void... u){
  OSClient osc=OSClient.getInstance(U);
  try {
    jsonBufQuota=osc.listQuotas();
    Command cmd=Command.commandFactory(Command.commandType.LISTSERVERS,U);
    if (cmd != null)     cmd.execute();
 else {
      Utils.alert("String_Node_Str",OverViewActivity.this);
      return null;
    }
    jsonBuf=cmd.getRESTResponse();
    jsonBufFIPs=osc.listFloatingIPs();
    jsonBufSecgs=osc.listSecGroups();
    jsonBufferFlavor=osc.listFlavors();
    jsonBufferVolumes=osc.listVolumes();
    jsonBufferQuotaVols=osc.listVolQuotas();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}

Fixed version (ground truth):
@Override protected String doInBackground(Void... u){
  OSClient osc=OSClient.getInstance(U);
  try {
    jsonBufQuota=osc.listQuotas();
    Command cmd=Command.commandFactory(Command.commandType.LISTSERVERS,U);
    if (cmd != null)     cmd.execute();
 else {
      hasError=true;
      errorMessage="String_Node_Str";
      return null;
    }
    jsonBuf=cmd.getRESTResponse();
    jsonBufFIPs=osc.listFloatingIPs();
    jsonBufSecgs=osc.listSecGroups();
    jsonBufferFlavor=osc.listFlavors();
    jsonBufferVolumes=osc.listVolumes();
    jsonBufferQuotaVols=osc.listVolQuotas();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}
Program: 143249
Project: 143249
Buggy source:
@Override protected Void doInBackground(Void... args){
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(name_InstanceToLaunch,imageID_InstanceToLaunch,keyname_InstanceToLaunch,flavorID_InstanceToLaunch,Integer.parseInt(count_InstanceToLaunch),secgrpID_InstanceToLaunch,ServersActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      Utils.alert("String_Node_Str",ServersActivity.this);
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(Void... args){
  try {
    Command cmd=Command.commandFactory(Command.commandType.CREATESERVER,U);
    if (cmd != null) {
      cmd.setup(name_InstanceToLaunch,imageID_InstanceToLaunch,keyname_InstanceToLaunch,flavorID_InstanceToLaunch,Integer.parseInt(count_InstanceToLaunch),secgrpID_InstanceToLaunch,ServersActivity.this.selectedNetworks);
      cmd.execute();
    }
 else {
      hasError=true;
      errorMessage="String_Node_Str";
      return null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    errorMessage=e.getMessage();
    hasError=true;
    return null;
  }
  return null;
}
Program: 143250
Project: 143250
Buggy source:
/** 
 */
public static Command commandFactory(commandType type,User U){
switch (type) {
case LISTIMAGES:
    return new ListImagesCommand(U);
case DELETEIMAGE:
  return new DeleteImageCommand(U);
case LISTSERVERS:
return new ListServersCommand(U);
default :
return null;
}
}

Fixed version (ground truth):
/** 
 */
public static Command commandFactory(commandType type,User U){
switch (type) {
case LISTIMAGES:
    return new ListImagesCommand(U);
case DELETEIMAGE:
  return new DeleteImageCommand(U);
case LISTSERVERS:
return new ListServersCommand(U);
case CREATESERVER:
return new CreateServerCommand(U);
default :
return null;
}
}
Program: 143251
Project: 143251
Buggy source:
public void setup(String serverName,String imageID,String key_name,String flavorID,int count,String securityGroupID,Hashtable<Pair<String,String>,String> netID_to_netIP){
  this.serverName=serverName;
  this.imageID=imageID;
  this.keyName=keyName;
  this.flavorID=flavorID;
  this.count=count;
  this.securityGroupID=securityGroupID;
  this.netID_to_netIP=netID_to_netIP;
}

Fixed version (ground truth):
public void setup(String serverName,String imageID,String keyName,String flavorID,int count,String securityGroupID,Hashtable<Pair<String,String>,String> netID_to_netIP){
  this.serverName=serverName;
  this.imageID=imageID;
  this.keyName=keyName;
  this.flavorID=flavorID;
  this.count=count;
  this.securityGroupID=securityGroupID;
  this.netID_to_netIP=netID_to_netIP;
}
Program: 143255
Project: 143255
Buggy source:
@Override protected String doInBackground(Void... v){
  OSClient osc=OSClient.getInstance(U);
  try {
    jsonBuf=osc.requestServers();
    jsonBufferFlavor=osc.requestFlavors();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}

Fixed version (ground truth):
@Override protected String doInBackground(Void... v){
  OSClient osc=OSClient.getInstance(U);
  try {
    jsonBuf=osc.requestServers();
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
    return "String_Node_Str";
  }
  return jsonBuf;
}
Program: 143256
Project: 143256
Buggy source:
protected void pickAServerToAssociateFIP(){
  if (servers.size() == 0) {
    Utils.alert(getString(R.string.NOSERVERTOASSOCIATEFIP),this);
    return;
  }
  spinnerServersArrayAdapter=new ArrayAdapter<Server>(FloatingIPActivity.this,android.R.layout.simple_spinner_item,servers.subList(0,servers.size()));
  spinnerServersArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  LayoutInflater li=LayoutInflater.from(this);
  View promptsView=li.inflate(R.layout.my_dialog_layout_fipassociate,null);
  AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(this);
  alertDialogBuilder.setView(promptsView);
  alertDialogBuilder.setTitle(getString(R.string.PICKASERVERTOASSOCIATEFIP) + "String_Node_Str" + this.fipToAssociate);
  alertDialogSelectServer=alertDialogBuilder.create();
  serverSpinner=(Spinner)promptsView.findViewById(R.id.mySpinner);
  serverSpinner.setAdapter(spinnerServersArrayAdapter);
  final Button mButton=(Button)promptsView.findViewById(R.id.myButton);
  final Button mButtonCancel=(Button)promptsView.findViewById(R.id.myButtonCancel);
  mButton.setOnClickListener(new FloatingIPActivity.ConfirmButtonHandler());
  mButtonCancel.setOnClickListener(new FloatingIPActivity.CancelButtonHandler());
  alertDialogSelectServer.setCanceledOnTouchOutside(false);
  alertDialogSelectServer.setCancelable(false);
  alertDialogSelectServer.show();
}

Fixed version (ground truth):
protected void pickAServerToAssociateFIP(){
  if (servers.size() == 0) {
    Utils.alert(getString(R.string.NOSERVERTOASSOCIATEFIP),this);
    return;
  }
  spinnerServersArrayAdapter=new ArrayAdapter<Server>(FloatingIPActivity.this,android.R.layout.simple_spinner_item,servers.subList(0,servers.size()));
  spinnerServersArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  LayoutInflater li=LayoutInflater.from(this);
  View promptsView=li.inflate(R.layout.my_dialog_layout_fipassociate,null);
  AlertDialog.Builder alertDialogBuilder=new AlertDialog.Builder(this);
  alertDialogBuilder.setView(promptsView);
  alertDialogBuilder.setTitle(getString(R.string.PICKASERVERTOASSOCIATEFIP) + "String_Node_Str" + this.selectedFIPObj.getIP());
  alertDialogSelectServer=alertDialogBuilder.create();
  serverSpinner=(Spinner)promptsView.findViewById(R.id.mySpinner);
  serverSpinner.setAdapter(spinnerServersArrayAdapter);
  final Button mButton=(Button)promptsView.findViewById(R.id.myButton);
  final Button mButtonCancel=(Button)promptsView.findViewById(R.id.myButtonCancel);
  mButton.setOnClickListener(new FloatingIPActivity.ConfirmButtonHandler());
  mButtonCancel.setOnClickListener(new FloatingIPActivity.CancelButtonHandler());
  alertDialogSelectServer.setCanceledOnTouchOutside(false);
  alertDialogSelectServer.setCancelable(false);
  alertDialogSelectServer.show();
}
Program: 143257
Project: 143257
Buggy source:
/** 
 */
private void associateFIP(String fip){
  fipToAssociate=fip;
  this.progressDialogWaitStop.show();
  (new AsyncTaskOSListServers()).execute();
}

Fixed version (ground truth):
/** 
 */
private void associateFIP(){
  this.progressDialogWaitStop.show();
  (new AsyncTaskOSListServers()).execute();
}
Program: 143258
Project: 143258
Buggy source:
@Override protected Void doInBackground(String... ip_serverid){
  floatingip=ip_serverid[0];
  serverid=ip_serverid[1];
  OSClient osc=OSClient.getInstance(U);
  try {
    osc.requestFloatingIPAssociate(floatingip,serverid);
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(String... ip_serverid){
  floatingip=ip_serverid[0];
  serverid=ip_serverid[1];
  OSClient osc=OSClient.getInstance(U);
  try {
    osc.associateFloatingIP(floatingip,serverid);
  }
 catch (  Exception e) {
    errorMessage=e.getMessage();
    hasError=true;
  }
  return null;
}
Program: 143259
Project: 143259
Buggy source:
private void refreshView(Vector<SecGroup> secgrps){
  ((LinearLayout)findViewById(R.id.secgrpLayout)).removeAllViews();
  if (secgrps.size() == 0) {
    Utils.alert(getString(R.string.NOSECGRPSAVAIL),this);
    return;
  }
  Iterator<SecGroup> it=secgrps.iterator();
  while (it.hasNext()) {
    SecGroup s=it.next();
    ListSecGroupView sgv=new ListSecGroupView(s,this);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).addView(sgv);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).setGravity(Gravity.CENTER_HORIZONTAL);
    View space=new View(this);
    space.setMinimumHeight(10);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).addView(space);
  }
}

Fixed version (ground truth):
/** 
 */
private void refreshView(Vector<SecGroup> secgrps){
  ((LinearLayout)findViewById(R.id.secgrpLayout)).removeAllViews();
  if (secgrps.size() == 0) {
    Utils.alert(getString(R.string.NOSECGRPSAVAIL),this);
    return;
  }
  Iterator<SecGroup> it=secgrps.iterator();
  while (it.hasNext()) {
    SecGroup s=it.next();
    ListSecGroupView sgv=new ListSecGroupView(s,this);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).addView(sgv);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).setGravity(Gravity.CENTER_HORIZONTAL);
    View space=new View(this);
    space.setMinimumHeight(10);
    ((LinearLayout)findViewById(R.id.secgrpLayout)).addView(space);
  }
}
Program: 143260
Project: 143260
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.secgrplist);
  progressDialogWaitStop=new CustomProgressDialog(this,ProgressDialog.STYLE_SPINNER);
  progressDialogWaitStop.setMessage(getString(R.string.PLEASEWAITCONNECTING));
  String selectedUser=Utils.getStringPreference("String_Node_Str","String_Node_Str",this);
  try {
    U=User.fromFileID(selectedUser,Configuration.getInstance().getValue("String_Node_Str",Defaults.DEFAULTFILESDIR));
  }
 catch (  RuntimeException re) {
    Utils.alert("String_Node_Str" + re.getMessage(),this);
    return;
  }
  if (selectedUser.length() != 0)   ((TextView)findViewById(R.id.selected_user)).setText(getString(R.string.SELECTEDUSER) + "String_Node_Str" + U.getUserName()+ "String_Node_Str"+ U.getTenantName()+ "String_Node_Str");
 else   ((TextView)findViewById(R.id.selected_user)).setText(getString(R.string.SELECTEDUSER) + "String_Node_Str" + getString(R.string.NONE));
  this.update();
}

Fixed version (ground truth):
/** 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.secgrplist);
  progressDialogWaitStop=new CustomProgressDialog(this,ProgressDialog.STYLE_SPINNER);
  progressDialogWaitStop.setMessage(getString(R.string.PLEASEWAITCONNECTING));
  String selectedUser=Utils.getStringPreference("String_Node_Str","String_Node_Str",this);
  try {
    U=User.fromFileID(selectedUser,Configuration.getInstance().getValue("String_Node_Str",Defaults.DEFAULTFILESDIR));
  }
 catch (  RuntimeException re) {
    Utils.alert("String_Node_Str" + re.getMessage(),this);
    return;
  }
  if (selectedUser.length() != 0)   ((TextView)findViewById(R.id.selected_user)).setText(getString(R.string.SELECTEDUSER) + "String_Node_Str" + U.getUserName()+ "String_Node_Str"+ U.getTenantName()+ "String_Node_Str");
 else   ((TextView)findViewById(R.id.selected_user)).setText(getString(R.string.SELECTEDUSER) + "String_Node_Str" + getString(R.string.NONE));
  this.update();
}
Program: 143261
Project: 143261
Buggy source:
public void createSecGroup(View v){
  final AlertDialog.Builder alert=new AlertDialog.Builder(this);
  alert.setMessage(getString(R.string.INPUTSSECNAME));
  final EditText input=new EditText(this);
  alert.setView(input);
  alert.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int whichButton){
      String secgrpName=input.getText().toString();
      SecGrpActivity.this.progressDialogWaitStop.show();
      (new AsyncTaskCreateSecGroup()).execute(secgrpName,"String_Node_Str");
    }
  }
);
  AlertDialog build=alert.create();
  build.show();
}

Fixed version (ground truth):
/** 
 */
public void createSecGroup(View v){
  final AlertDialog.Builder alert=new AlertDialog.Builder(this);
  alert.setMessage(getString(R.string.INPUTSSECNAME));
  final EditText input=new EditText(this);
  alert.setView(input);
  alert.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int whichButton){
      String secgrpName=input.getText().toString();
      secgrpName=secgrpName.trim();
      if (secgrpName.length() == 0) {
        Utils.alert(getString(R.string.NOEMPTYNAME),SecGrpActivity.this);
        return;
      }
      SecGrpActivity.this.progressDialogWaitStop.show();
      (new AsyncTaskCreateSecGroup()).execute(secgrpName,"String_Node_Str");
    }
  }
);
  alert.create().show();
}
Program: 143262
Project: 143262
Buggy source:
public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  int order=Menu.FIRST;
  int GROUP=0;
  menu.add(GROUP,0,order++,getString(R.string.MENUHELP)).setIcon(android.R.drawable.ic_menu_help);
  menu.add(GROUP,1,order++,getString(R.string.MENUUPDATE)).setIcon(R.drawable.ic_menu_refresh);
  return true;
}

Fixed version (ground truth):
/** 
 */
public boolean onCreateOptionsMenu(Menu menu){
  super.onCreateOptionsMenu(menu);
  int order=Menu.FIRST;
  int GROUP=0;
  menu.add(GROUP,0,order++,getString(R.string.MENUHELP)).setIcon(android.R.drawable.ic_menu_help);
  menu.add(GROUP,1,order++,getString(R.string.MENUUPDATE)).setIcon(R.drawable.ic_menu_refresh);
  return true;
}
Program: 143263
Project: 143263
Buggy source:
public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == Menu.FIRST - 1) {
    Utils.alert(getString(R.string.NOTIMPLEMENTED),this);
    return true;
  }
  if (id == Menu.FIRST) {
    if (U == null) {
      Utils.alert("String_Node_Str",this);
    }
 else {
      this.update();
      return true;
    }
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
/** 
 */
public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == Menu.FIRST - 1) {
    Utils.alert(getString(R.string.NOTIMPLEMENTED),this);
    return true;
  }
  if (id == Menu.FIRST) {
    if (U == null) {
      Utils.alert("String_Node_Str",this);
    }
 else {
      this.update();
      return true;
    }
  }
  return super.onOptionsItemSelected(item);
}
Program: 143264
Project: 143264
Buggy source:
public ListSecGroupView getSecGroupView(){
  return relatedListSecGroupView;
}

Fixed version (ground truth):
public SecGroupView getSecGroupView(){
  return relatedSecGroupView;
}
Program: 143265
Project: 143265
Buggy source:
public SimpleSecGroupRule getServer(){
  return R;
}

Fixed version (ground truth):
public SimpleSecGroupRule getServer(){
  return Rl;
}
Program: 143267
Project: 143267
Buggy source:
/** 
 * Called when the user has indicated they she would like to dismiss one or more list item positions.
 * @param listView               The originating {@link ListView}.
 * @param reverseSortedPositions An array of positions to dismiss, sorted in descendingorder for convenience.
 */
void onDismiss(ListView listView,int[] reverseSortedPositions);

Fixed version (ground truth):
/** 
 * Called when the user has indicated they she would like to dismiss one or more list item positions.
 * @param listView The originating {@link ListView}.
 * @param position The position being dismissed.
 */
void onDismiss(ListView listView,int position);
Program: 143268
Project: 143268
Buggy source:
private void performDismiss(final View dismissView,final int dismissPosition){
  final ViewGroup.LayoutParams lp=dismissView.getLayoutParams();
  final int originalHeight=dismissView.getHeight();
  ValueAnimator animator=ValueAnimator.ofInt(originalHeight,1).setDuration(mAnimationTime);
  animator.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      --mDismissAnimationRefCount;
      if (mDismissAnimationRefCount == 0) {
        Collections.sort(mPendingDismisses);
        int[] dismissPositions=new int[mPendingDismisses.size()];
        for (int i=mPendingDismisses.size() - 1; i >= 0; i--) {
          dismissPositions[i]=mPendingDismisses.get(i).position;
        }
        mCallback.onDismiss(mListView,dismissPositions);
        ViewGroup.LayoutParams lp;
        for (        PendingDismissData pendingDismiss : mPendingDismisses) {
          setAlpha(pendingDismiss.view,1f);
          setTranslationX(pendingDismiss.view,0);
          lp=pendingDismiss.view.getLayoutParams();
          lp.height=originalHeight;
          pendingDismiss.view.setLayoutParams(lp);
        }
        mPendingDismisses.clear();
      }
    }
  }
);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator valueAnimator){
      lp.height=(Integer)valueAnimator.getAnimatedValue();
      dismissView.setLayoutParams(lp);
    }
  }
);
  mPendingDismisses.add(new PendingDismissData(dismissPosition,dismissView));
  animator.start();
}

Fixed version (ground truth):
/** 
 * Animate the dismissed list item to zero-height and fire the dismiss callback when it finishes.
 * @param dismissView     ListView item to dismiss
 * @param dismissPosition Position of dismissed item
 */
private void performDismiss(final View dismissView,final int dismissPosition){
  final ViewGroup.LayoutParams lp=dismissView.getLayoutParams();
  final int originalHeight=dismissView.getHeight();
  ValueAnimator animator=ValueAnimator.ofInt(originalHeight,1).setDuration(mAnimationTime);
  animator.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      dismissView.setTag(R.id.original_height,originalHeight);
      mCallback.onDismiss(mListView,dismissPosition);
      mDismissing=false;
    }
  }
);
  animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener(){
    @Override public void onAnimationUpdate(    ValueAnimator valueAnimator){
      lp.height=(Integer)valueAnimator.getAnimatedValue();
      dismissView.setLayoutParams(lp);
    }
  }
);
  animator.start();
}
Program: 143270
Project: 143270
Buggy source:
@Override public void onAnimationEnd(Animator animation){
  --mDismissAnimationRefCount;
  if (mDismissAnimationRefCount == 0) {
    Collections.sort(mPendingDismisses);
    int[] dismissPositions=new int[mPendingDismisses.size()];
    for (int i=mPendingDismisses.size() - 1; i >= 0; i--) {
      dismissPositions[i]=mPendingDismisses.get(i).position;
    }
    mCallback.onDismiss(mListView,dismissPositions);
    ViewGroup.LayoutParams lp;
    for (    PendingDismissData pendingDismiss : mPendingDismisses) {
      setAlpha(pendingDismiss.view,1f);
      setTranslationX(pendingDismiss.view,0);
      lp=pendingDismiss.view.getLayoutParams();
      lp.height=originalHeight;
      pendingDismiss.view.setLayoutParams(lp);
    }
    mPendingDismisses.clear();
  }
}

Fixed version (ground truth):
@Override public void onAnimationEnd(Animator animation){
  dismissView.setTag(R.id.original_height,originalHeight);
  mCallback.onDismiss(mListView,dismissPosition);
  mDismissing=false;
}
Program: 143271
Project: 143271
Buggy source:
@PostConstruct void init(){
  presentations.setContainerDataSource(datasource);
  presentations.setVisibleColumns("String_Node_Str","String_Node_Str");
  if (user.isAdmin())   addComponent(addButton);
}

Fixed version (ground truth):
@PostConstruct void init(){
  setSizeFull();
  addComponent(presentations);
  setExpandRatio(presentations,1f);
  presentations.setSizeFull();
  presentations.setSelectable(true);
  presentations.addValueChangeListener(this::presentationSelectedFromList);
  presentations.setContainerDataSource(datasource);
  presentations.setVisibleColumns("String_Node_Str","String_Node_Str");
  if (user.isAdmin())   addComponent(addButton);
  addButton.setWidth("String_Node_Str");
}
Program: 143272
Project: 143272
Buggy source:
public boolean doesItemMatch(boolean previous,ItemStack keyStack,ItemStack checkedStack){
  return previous || (keyStack != null ? checkedStack != null && keyStack.getItem() == checkedStack.getItem() && (keyStack.getItem().getHasSubtypes() ? keyStack.getItemDamage() == checkedStack.getItemDamage() : true) : false);
}

Fixed version (ground truth):
public boolean doesItemMatch(boolean previous,ItemStack keyStack,ItemStack checkedStack){
  return previous || this.getDefaultMatch(keyStack,checkedStack);
}
Program: 143273
Project: 143273
Buggy source:
public boolean doesItemMatch(ItemStack keyStack,ItemStack checkedStack){
  boolean isGood=false;
  for (  RoutingFocusLogic logic : logicList) {
    isGood=logic.doesItemMatch(isGood,keyStack,checkedStack);
    if (isGood) {
      return true;
    }
  }
  return isGood;
}

Fixed version (ground truth):
public boolean doesItemMatch(ItemStack keyStack,ItemStack checkedStack){
  boolean isGood=false;
  boolean isFirst=true;
  for (  RoutingFocusLogic logic : logicList) {
    if (isFirst) {
      isGood=logic.getDefaultMatch(keyStack,checkedStack);
      isFirst=false;
      continue;
    }
    isGood=logic.doesItemMatch(isGood,keyStack,checkedStack);
  }
  return isGood;
}
Program: 143274
Project: 143274
Buggy source:
public void addLogic(RoutingFocusLogic logic){
  logicList.add(logic);
}

Fixed version (ground truth):
public void addLogic(RoutingFocusLogic logic){
  if (logic instanceof ILimitingLogic) {
    maximumAmount+=((ILimitingLogic)logic).getRoutingLimit();
  }
  logicList.add(logic);
}
Program: 143275
Project: 143275
Buggy source:
public void clear(){
  logicList.clear();
  locationList.clear();
}

Fixed version (ground truth):
public void clear(){
  logicList.clear();
  locationList.clear();
  maximumAmount=0;
}
Program: 143277
Project: 143277
Buggy source:
public boolean showIngameHUD(World world,ItemStack stack,EntityPlayer player);

Fixed version (ground truth):
boolean showIngameHUD(World world,ItemStack stack,EntityPlayer player);
Program: 143278
Project: 143278
Buggy source:
public ReagentContainerInfo getInfo();

Fixed version (ground truth):
ReagentContainerInfo getInfo();
Program: 143279
Project: 143279
Buggy source:
public ReagentStack getReagent();

Fixed version (ground truth):
ReagentStack getReagent();
Program: 143280
Project: 143280
Buggy source:
public int fill(ReagentStack resource,boolean doFill);

Fixed version (ground truth):
int fill(ReagentStack resource,boolean doFill);
Program: 143281
Project: 143281
Buggy source:
public int getReagentStackAmount();

Fixed version (ground truth):
int getReagentStackAmount();
Program: 143282
Project: 143282
Buggy source:
public ReagentStack drain(int maxDrain,boolean doDrain);

Fixed version (ground truth):
ReagentStack drain(int maxDrain,boolean doDrain);
Program: 143283
Project: 143283
Buggy source:
public int getCapacity();

Fixed version (ground truth):
int getCapacity();
Program: 143284
Project: 143284
Buggy source:
public int getTanksTunedToReagent(Reagent reagent);

Fixed version (ground truth):
int getTanksTunedToReagent(Reagent reagent);
Program: 143285
Project: 143285
Buggy source:
public void setTanksTunedToReagent(Reagent reagent,int total);

Fixed version (ground truth):
void setTanksTunedToReagent(Reagent reagent,int total);
Program: 143286
Project: 143286
Buggy source:
public Map<Reagent,Integer> getAttunedTankMap();

Fixed version (ground truth):
Map<Reagent,Integer> getAttunedTankMap();
Program: 143287
Project: 143287
Buggy source:
public int getNumberOfTanks();

Fixed version (ground truth):
int getNumberOfTanks();
Program: 143288
Project: 143288
Buggy source:
@Override public boolean equals(Object o){
  return o instanceof Reagent ? this == o && name.equals(((Reagent)o).name) : false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  return o instanceof Reagent && this == o && name.equals(((Reagent)o).name);
}
Program: 143289
Project: 143289
Buggy source:
@Override public void setTanksTunedToReagent(Reagent reagent,int total){
  if (total == 0 && this.attunedTankMap.containsKey(reagent)) {
    this.attunedTankMap.remove(reagent);
    return;
  }
  this.attunedTankMap.put(reagent,new Integer(total));
}

Fixed version (ground truth):
@Override public void setTanksTunedToReagent(Reagent reagent,int total){
  if (total == 0 && this.attunedTankMap.containsKey(reagent)) {
    this.attunedTankMap.remove(reagent);
    return;
  }
  this.attunedTankMap.put(reagent,total);
}
Program: 143290
Project: 143290
Buggy source:
protected boolean areTagsEqual(NBTTagCompound tag,NBTTagCompound comparedTag){
  Set set=tag.func_150296_c();
  for (  Object obj : set) {
    if (obj instanceof String) {
      String str=(String)obj;
      NBTBase baseTag=comparedTag.getTag(str);
      if (baseTag instanceof NBTTagCompound) {
        NBTBase comparedBaseTag=comparedTag.getTag(str);
        if (comparedBaseTag instanceof NBTTagCompound) {
          if (!this.areTagsEqual((NBTTagCompound)tag,comparedTag)) {
            return false;
          }
        }
      }
 else {
        if (baseTag != null && !baseTag.equals(comparedTag.getTag(str))) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean areTagsEqual(NBTTagCompound tag,NBTTagCompound comparedTag){
  Set set=tag.func_150296_c();
  for (  Object obj : set) {
    if (obj instanceof String) {
      String str=(String)obj;
      NBTBase baseTag=comparedTag.getTag(str);
      if (baseTag instanceof NBTTagCompound) {
        NBTBase comparedBaseTag=comparedTag.getTag(str);
        if (comparedBaseTag instanceof NBTTagCompound) {
          if (!this.areTagsEqual(tag,comparedTag)) {
            return false;
          }
        }
      }
 else {
        if (baseTag != null && !baseTag.equals(comparedTag.getTag(str))) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 143291
Project: 143291
Buggy source:
public static boolean isRequiredItemValid(ItemStack testItem,int currentTierAltar){
  for (  AltarRecipe recipe : altarRecipes) {
    if (recipe.doesRequiredItemMatch(testItem,currentTierAltar)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean isRequiredItemValid(ItemStack testItem,int currentTierAltar){
  if (testItem == null) {
    return false;
  }
  for (  AltarRecipe recipe : altarRecipes) {
    if (recipe.doesRequiredItemMatch(testItem,currentTierAltar)) {
      return true;
    }
  }
  return false;
}
Program: 143292
Project: 143292
Buggy source:
public static void registerAltarOrbRecipe(ItemStack orbStack,int minTier,int consumptionRate){
  registerAltarRecipe(null,orbStack,minTier,0,consumptionRate,0,true);
}

Fixed version (ground truth):
public static void registerAltarOrbRecipe(ItemStack orbStack,int minTier,int consumptionRate){
  if (!orbMap.containsKey(minTier)) {
    orbMap.put(minTier,orbStack);
  }
  registerAltarRecipe(null,orbStack,minTier,0,consumptionRate,0,true);
}
Program: 143293
Project: 143293
Buggy source:
public boolean doesRequiredItemMatch(ItemStack testStack){
  if (testStack == null || this.requiredItem == null) {
    return false;
  }
  return this.requiredItem.isItemEqual(testStack);
}

Fixed version (ground truth):
public boolean doesRequiredItemMatch(ItemStack testStack){
  return !(testStack == null || this.requiredItem == null) && this.requiredItem.isItemEqual(testStack);
}
Program: 143294
Project: 143294
Buggy source:
@Override public void drawBackground(int mouseX,int mouseY,float gameTicks){
  if (isDragging) {
    this.shiftedX-=prevMouseX - mouseX;
    this.shiftedY-=prevMouseY - mouseY;
    prevMouseX=mouseX;
    prevMouseY=mouseY;
  }
}

Fixed version (ground truth):
@Override public void drawBackground(int mouseX,int mouseY,float gameTicks){
  if (isDragging) {
    this.shiftedX-=prevMouseX - mouseX;
    this.shiftedY-=prevMouseY - mouseY;
    onDrag(shiftedX,shiftedY);
    prevMouseX=mouseX;
    prevMouseY=mouseY;
  }
}
Program: 143295
Project: 143295
Buggy source:
public void renderBackground(){
  RenderHelper.bindTexture(TEXTURE);
  int startX=shiftedX % 256;
  int startY=shiftedY % 256;
  this.gui.drawSizedTexturedModalRect(this.gui.guiLeft,this.gui.guiTop,128 - startX,0 - startY,128,198,128 / zoom,198 / zoom);
}

Fixed version (ground truth):
public void renderBackground(){
  RenderHelper.bindTexture(texture);
  int startX=shiftedX % 256;
  int startY=shiftedY % 256;
  this.gui.drawSizedTexturedModalRect(this.gui.guiLeft,this.gui.guiTop,128 - startX,0 - startY,128,198,128,198);
}
Program: 143296
Project: 143296
Buggy source:
public ElementBackground(GuiBase containerScreen,int x,int y,int width,int height){
  super(containerScreen,x,y,width,height);
}

Fixed version (ground truth):
public ElementBackground(GuiBase containerScreen,int x,int y,int width,int height,ResourceLocation texture){
  super(containerScreen,x,y,width,height);
  this.texture=texture;
}
Program: 143297
Project: 143297
Buggy source:
@Override public void initGui(){
  super.initGui();
  this.addElement(background);
  pages.add(new TabletPage(this,50,50,10,10,"String_Node_Str","String_Node_Str"));
  for (int i=0; i < container.inventorySlots.size(); i++) {
    ((Slot)this.container.inventorySlots.get(i)).xDisplayPosition=-this.getGuiLeft() - 16;
    ((Slot)this.container.inventorySlots.get(i)).yDisplayPosition=-this.getGuiTop() - 16;
  }
}

Fixed version (ground truth):
@Override public void initGui(){
  super.initGui();
  this.addElement(background);
  pages.add(new TabletPage(this,50,50,10,10,"String_Node_Str","String_Node_Str"));
  for (  TabletPage page : this.pages) {
    page.gui=this;
  }
  for (int i=0; i < container.inventorySlots.size(); i++) {
    ((Slot)this.container.inventorySlots.get(i)).xDisplayPosition=-this.getGuiLeft() - 16;
    ((Slot)this.container.inventorySlots.get(i)).yDisplayPosition=-this.getGuiTop() - 16;
  }
}
Program: 143298
Project: 143298
Buggy source:
public TabletGui(Container container){
  super(container,TEXTURE);
  this.container=container;
  this.xSize=128;
  this.ySize=200;
  this.drawInventory=false;
  background=new ElementBackground(this,6,6,128,200);
}

Fixed version (ground truth):
public TabletGui(Container container){
  super(container,TEXTURE);
  this.container=container;
  this.xSize=128;
  this.ySize=200;
  this.drawInventory=false;
  background=new ElementBackground(this,6,6,128,200,new ResourceLocation(Reference.TEXTURE_LOCATION + "String_Node_Str")){
    @Override public void onDrag(    int shiftedX,    int shiftedY){
      shiftX=shiftedX;
      shiftY=shiftedY;
    }
  }
;
}
Program: 143299
Project: 143299
Buggy source:
public int getShiftY(){
  return background.shiftedY;
}

Fixed version (ground truth):
public int getShiftY(){
  return shiftY;
}
Program: 143300
Project: 143300
Buggy source:
public int getShiftX(){
  return background.shiftedX;
}

Fixed version (ground truth):
public int getShiftX(){
  return shiftX;
}
Program: 143301
Project: 143301
Buggy source:
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
switch (ID) {
case ARMOUR_ID:
    if (ItemHelper.isPlayerHoldingItem(IModularItem.class,player)) {
      return new ArmourContainer(player.getHeldItem(),player.inventory,world);
    }
case RECIPE_ID:
  return new ArmourContainerRecipe(player.getHeldItem(),player.inventory,world);
default :
return null;
}
}

Fixed version (ground truth):
@Override public Object getServerGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
switch (ID) {
case ARMOUR_ID:
    if (ItemHelper.isPlayerHoldingItem(IModularItem.class,player)) {
      return new ArmourContainer(player.getHeldItem(),player.inventory);
    }
case RECIPE_ID:
  return new ArmourContainerRecipe(player.getHeldItem(),player.inventory,world);
default :
return null;
}
}
Program: 143302
Project: 143302
Buggy source:
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
switch (ID) {
case ARMOUR_ID:
    if (ItemHelper.isPlayerHoldingItem(IModularItem.class,player)) {
      return new ArmourGui(new ArmourContainer(player.getHeldItem(),player.inventory,world),player.inventory);
    }
case RECIPE_ID:
  return new ArmourGuiRecipe(new ArmourContainerRecipe(player.getHeldItem(),player.inventory,world),player.inventory);
default :
return null;
}
}

Fixed version (ground truth):
@Override public Object getClientGuiElement(int ID,EntityPlayer player,World world,int x,int y,int z){
switch (ID) {
case ARMOUR_ID:
    if (ItemHelper.isPlayerHoldingItem(IModularItem.class,player)) {
      return new ArmourGui(new ArmourContainer(player.getHeldItem(),player.inventory),player.inventory);
    }
case RECIPE_ID:
  return new ArmourGuiRecipe(new ArmourContainerRecipe(player.getHeldItem(),player.inventory,world),player.inventory);
default :
return null;
}
}
Program: 143303
Project: 143303
Buggy source:
/** 
 * Called every tick.
 * @param world
 * @param player
 * @param stack
 */
@Override public void onArmourTick(World world,EntityPlayer player,ItemStack stack){
  int energy=0;
  Iterator<IUpgrade> iterator=NBTHelper.getNBTUpgradeList(stack).iterator();
  while (iterator.hasNext()) {
    IUpgrade upgrade=iterator.next();
    if (upgrade == null) {
      iterator.remove();
      continue;
    }
    energy+=upgrade.onTick(world,player,stack,ArmourSlot.getArmourSlot(this.item.getSlot()));
  }
  if (energy < 0) {
    this.damageArmour(stack,energy * -1);
  }
 else {
    this.healArmour(stack,energy);
  }
}

Fixed version (ground truth):
/** 
 * Called every tick.
 * @param world
 * @param player
 * @param stack
 */
@Override public void onArmourTick(World world,EntityPlayer player,ItemStack stack){
  int energy=0;
  Iterator<IUpgrade> iterator=NBTHelper.getNBTUpgradeList(stack).iterator();
  while (iterator.hasNext()) {
    IUpgrade upgrade=iterator.next();
    if (upgrade == null) {
      iterator.remove();
      continue;
    }
    energy+=upgrade.onTick(world,player,stack,ArmourSlot.getArmourSlot(this.item.getSlot()));
  }
  if (energy > 0) {
    this.damageArmour(stack,energy);
  }
 else {
    this.healArmour(stack,energy * -1);
  }
}
Program: 143305
Project: 143305
Buggy source:
@Override public final void preInit(){
  material=(ItemBase)new ItemBase("String_Node_Str").setUnlocalizedName("String_Node_Str").setCreativeTab(ModularArmour.creativeTab);
  materialModular=EnumHelper.addArmorMaterial("String_Node_Str",25,new int[]{3,7,5,3},10);
  helmetModular=new RFModularArmour(materialModular,0).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  chestplateModular=new RFModularArmour(materialModular,1).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  leggingsModular=new RFModularArmour(materialModular,2).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  bootsModular=new RFModularArmour(materialModular,3).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  GameRegistry.registerItem(helmetModular,"String_Node_Str");
  GameRegistry.registerItem(chestplateModular,"String_Node_Str");
  GameRegistry.registerItem(leggingsModular,"String_Node_Str");
  GameRegistry.registerItem(bootsModular,"String_Node_Str");
  UpgradeRegistry.registerListener(new FieldList());
}

Fixed version (ground truth):
@Override public final void preInit(){
  material=(ItemBase)new ItemBase("String_Node_Str").setUnlocalizedName("String_Node_Str").setCreativeTab(ModularArmour.creativeTab);
  materialModular=EnumHelper.addArmorMaterial("String_Node_Str",25,new int[]{3,7,5,3},0);
  helmetModular=new RFModularArmour(materialModular,0).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  chestplateModular=new RFModularArmour(materialModular,1).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  leggingsModular=new RFModularArmour(materialModular,2).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  bootsModular=new RFModularArmour(materialModular,3).setUnlocalizedName("String_Node_Str").setTextureName(Reference.ITEM_LOCATION + "String_Node_Str");
  GameRegistry.registerItem(helmetModular,"String_Node_Str");
  GameRegistry.registerItem(chestplateModular,"String_Node_Str");
  GameRegistry.registerItem(leggingsModular,"String_Node_Str");
  GameRegistry.registerItem(bootsModular,"String_Node_Str");
  UpgradeRegistry.registerListener(new FieldList());
}
Program: 143307
Project: 143307
Buggy source:
public ArmourGuiRecipe(ArmourContainerRecipe container,InventoryPlayer inventory){
  super(container,TEXTURE);
  this.container=container;
  this.texture=TEXTURE;
  this.drawTitle=false;
  this.drawInventory=false;
  this.xSize=176;
  this.ySize=152;
  this.leftArrow=new ElementButton(this,5,5,"String_Node_Str",227,12,227,12,227,12,7,7,TEXTURE.toString());
  this.rightArrow=new ElementButton(this,164,5,"String_Node_Str",235,12,235,12,235,12,7,7,TEXTURE.toString());
  this.upgrade=new ElementButton(this,71,18,"String_Node_Str",227,23,227,23,16,16,TEXTURE.toString());
  this.compatible=new TabCompatible(this);
  this.rightArrow.setToolTip("String_Node_Str");
  this.leftArrow.setToolTip("String_Node_Str");
}

Fixed version (ground truth):
public ArmourGuiRecipe(ArmourContainerRecipe container,InventoryPlayer inventory){
  super(container,TEXTURE);
  this.container=container;
  this.texture=TEXTURE;
  this.drawTitle=false;
  this.drawInventory=false;
  this.xSize=176;
  this.ySize=152;
  this.leftArrow=new ElementButton(this,5,5,"String_Node_Str",227,12,227,12,227,12,7,7,TEXTURE.toString());
  this.rightArrow=new ElementButton(this,164,5,"String_Node_Str",235,12,235,12,235,12,7,7,TEXTURE.toString());
  this.upgrade=new ElementButton(this,71,18,"String_Node_Str",227,23,227,23,16,16,TEXTURE.toString());
  this.upgrade.setToolTip("String_Node_Str");
  this.compatible=new TabCompatible(this);
  this.rightArrow.setToolTip("String_Node_Str");
  this.leftArrow.setToolTip("String_Node_Str");
}
Program: 143308
Project: 143308
Buggy source:
@Override public boolean onMouseWheel(int mouseX,int mouseY,int movement){
  if (!super.onMouseWheel(mouseX,mouseY,movement)) {
    return false;
  }
  this.startIndex+=movement / 12;
  if (startIndex > this.modularItems.length - this.maxItems) {
    this.startIndex=this.modularItems.length - this.maxItems;
  }
  if (this.startIndex < 0) {
    this.startIndex=0;
  }
  displaySlots(this.open);
  return true;
}

Fixed version (ground truth):
@Override public boolean onMouseWheel(int mouseX,int mouseY,int movement){
  if (!super.onMouseWheel(mouseX,mouseY,movement)) {
    return false;
  }
  this.startIndex+=movement / 96;
  if (startIndex > this.modularItems.length - this.maxItems) {
    this.startIndex=this.modularItems.length - this.maxItems;
  }
  if (this.startIndex < 0) {
    this.startIndex=0;
  }
  displaySlots(this.open);
  return true;
}
Program: 143309
Project: 143309
Buggy source:
@SubscribeEvent public void onPlayerTick(PlayerTickEvent e){
  EntityPlayer player=e.player;
  PlayerArmour storage=PlayerArmour.getFor(player);
  ItemStack[] armourList=player.inventory.armorInventory;
  for (int i=0; i < armourList.length; i++) {
    ItemStack playerStack=armourList[i];
    ItemStack storedStack=storage.stacks[i];
    if (!ItemStack.areItemStacksEqual(playerStack,storedStack)) {
      if (playerStack != null && playerStack.getItem() instanceof IModularItem) {
        ((IModularItem)playerStack.getItem()).onArmourEquip(player.worldObj,player,playerStack);
      }
      if (storedStack != null && storedStack.getItem() instanceof IModularItem) {
        ((IModularItem)storedStack.getItem()).onArmourDequip(player.worldObj,player,storedStack);
      }
    }
  }
  storage.update(armourList);
}

Fixed version (ground truth):
@SubscribeEvent public void onPlayerTick(PlayerTickEvent e){
  EntityPlayer player=e.player;
  PlayerArmour storage=PlayerArmour.getFor(player);
  ItemStack[] armourList=player.inventory.armorInventory;
  for (int i=0; i < armourList.length; i++) {
    ItemStack playerStack=armourList[i];
    ItemStack storedStack=storage.stacks[i];
    if (!InventoryUtil.areItemStacksEqual(playerStack,storedStack)) {
      if (playerStack != null && playerStack.getItem() instanceof IModularItem) {
        ((IModularItem)playerStack.getItem()).onArmourEquip(player.worldObj,player,playerStack);
      }
      if (storedStack != null && storedStack.getItem() instanceof IModularItem) {
        ((IModularItem)storedStack.getItem()).onArmourDequip(player.worldObj,player,storedStack);
      }
    }
  }
  storage.update(armourList);
}