nus-yam/ex-repair huggingface dataset:
Program: 33023
Project: 33023
Buggy source:
/** 
 * Prepare the Screen's standard options menu to be displayed.  This is called right before the menu is shown, every time it is shown.  You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents.  See  {@link android.app.Activity#onPrepareOptionsMenu(android.view.Menu) Activity.onPrepareOptionsMenu}for more information.
 * @param menu The options menu as last shown or first initialized byonCreateOptionsMenu().
 * @see #setHasOptionsMenu
 * @see #onCreateOptionsMenu
 */
@Override public void onPrepareOptionsMenu(Menu menu){
  menu.clear();
  menu.add(Menu.NONE,MENU_ITEM_SEARCH,Menu.NONE,getString(R.string.search)).setIcon(new IconDrawable(getActivity(),Iconify.IconValue.fa_search).colorRes(R.color.black).actionBarSize()).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
  menu.addSubMenu(Menu.NONE,MENU_ITEM_DATA_TABLES,Menu.NONE,Constants.DATA_TABLE_SAVINGS_ACCOUNTS_NAME);
  menu.add(Menu.NONE,MENU_ITEM_DOCUMENTS,Menu.NONE,getResources().getString(R.string.documents));
  int SUBMENU_ITEM_ID=0;
  SubMenu dataTableSubMenu=menu.getItem(0).getSubMenu();
  if (dataTableSubMenu != null && savingsAccountDataTables != null && savingsAccountDataTables.size() > 0) {
    Iterator<DataTable> dataTableIterator=savingsAccountDataTables.iterator();
    while (dataTableIterator.hasNext()) {
      dataTableSubMenu.add(Menu.NONE,SUBMENU_ITEM_ID,Menu.NONE,dataTableIterator.next().getRegisteredTableName());
      SUBMENU_ITEM_ID++;
    }
  }
  super.onPrepareOptionsMenu(menu);
}

Fixed version (ground truth):
/** 
 * Prepare the Screen's standard options menu to be displayed.  This is called right before the menu is shown, every time it is shown.  You can use this method to efficiently enable/disable items or otherwise dynamically modify the contents.  See  {@link android.app.Activity#onPrepareOptionsMenu(android.view.Menu) Activity.onPrepareOptionsMenu}for more information.
 * @param menu The options menu as last shown or first initialized byonCreateOptionsMenu().
 * @see #setHasOptionsMenu
 * @see #onCreateOptionsMenu
 */
@Override public void onPrepareOptionsMenu(Menu menu){
  menu.clear();
  menu.add(Menu.NONE,MENU_ITEM_SEARCH,Menu.NONE,getString(R.string.search)).setIcon(new IconDrawable(getActivity(),Iconify.IconValue.fa_search).colorRes(R.color.black).actionBarSize()).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
  menu.addSubMenu(Menu.NONE,MENU_ITEM_DATA_TABLES,Menu.NONE,Constants.DATA_TABLE_SAVINGS_ACCOUNTS_NAME);
  menu.add(Menu.NONE,MENU_ITEM_DOCUMENTS,Menu.NONE,getResources().getString(R.string.documents));
  int SUBMENU_ITEM_ID=0;
  SubMenu dataTableSubMenu=menu.getItem(1).getSubMenu();
  if (dataTableSubMenu != null && savingsAccountDataTables != null && savingsAccountDataTables.size() > 0) {
    Iterator<DataTable> dataTableIterator=savingsAccountDataTables.iterator();
    while (dataTableIterator.hasNext()) {
      dataTableSubMenu.add(Menu.NONE,SUBMENU_ITEM_ID,Menu.NONE,dataTableIterator.next().getRegisteredTableName());
      SUBMENU_ITEM_ID++;
    }
  }
  super.onPrepareOptionsMenu(menu);
}
Program: 33024
Project: 33024
Buggy source:
@Override public int getGroupCount(){
  return mifosGroups.size();
}

Fixed version (ground truth):
@Override public int getGroupCount(){
  return sMifosGroups.size();
}
Program: 33025
Project: 33025
Buggy source:
@Override public Client getChild(int groupPosition,int childPosition){
  return mifosGroups.get(groupPosition).getClients().get(childPosition);
}

Fixed version (ground truth):
@Override public Client getChild(int groupPosition,int childPosition){
  return sMifosGroups.get(groupPosition).getClients().get(childPosition);
}
Program: 33026
Project: 33026
Buggy source:
@Override public View getGroupView(int groupPosition,boolean isExpanded,View convertView,ViewGroup parent){
  MifosGroupReusableViewHolder mifosGroupReusableViewHolder;
  if (convertView == null) {
    convertView=layoutInflater.inflate(R.layout.row_collection_list_group,null);
    mifosGroupReusableViewHolder=new MifosGroupReusableViewHolder(convertView);
    convertView.setTag(mifosGroupReusableViewHolder);
  }
 else {
    mifosGroupReusableViewHolder=(MifosGroupReusableViewHolder)convertView.getTag();
  }
  mifosGroupReusableViewHolder.tv_groupName.setText(mifosGroups.get(groupPosition).getGroupName());
  mifosGroupReusableViewHolder.tv_groupTotal.setText("String_Node_Str");
  return convertView;
}

Fixed version (ground truth):
@Override public View getGroupView(int groupPosition,boolean isExpanded,View convertView,ViewGroup parent){
  MifosGroupReusableViewHolder mifosGroupReusableViewHolder;
  if (convertView == null) {
    convertView=layoutInflater.inflate(R.layout.row_collection_list_group,null);
    mifosGroupReusableViewHolder=new MifosGroupReusableViewHolder(convertView);
    convertView.setTag(mifosGroupReusableViewHolder);
  }
 else {
    mifosGroupReusableViewHolder=(MifosGroupReusableViewHolder)convertView.getTag();
  }
  double groupTotalDue=0;
  for (  Client client : sMifosGroups.get(groupPosition).getClients()) {
    for (    Loan loan : client.getLoans()) {
      groupTotalDue+=sRepaymentTransactions.get(loan.getLoanId());
    }
  }
  mifosGroupReusableViewHolder.tv_groupName.setText(sMifosGroups.get(groupPosition).getGroupName());
  mifosGroupReusableViewHolder.tv_groupTotal.setText(String.valueOf(groupTotalDue));
  return convertView;
}
Program: 33027
Project: 33027
Buggy source:
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  ClientReusableViewHolder clientReusableViewHolder;
  if (convertView == null) {
    convertView=layoutInflater.inflate(R.layout.row_collection_list_group_client,null);
    clientReusableViewHolder=new ClientReusableViewHolder(convertView);
    convertView.setTag(clientReusableViewHolder);
  }
 else {
    clientReusableViewHolder=(ClientReusableViewHolder)convertView.getTag();
  }
  Client client=mifosGroups.get(groupPosition).getClients().get(childPosition);
  double totalDue=0;
  List<Loan> loans=client.getLoans();
  for (  Loan loan : loans) {
    totalDue+=loan.getTotalDue();
  }
  clientReusableViewHolder.tv_clientName.setText(client.getClientName());
  clientReusableViewHolder.et_amount.setText(String.valueOf(totalDue));
  return convertView;
}

Fixed version (ground truth):
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  ClientReusableViewHolder clientReusableViewHolder;
  if (convertView == null) {
    convertView=layoutInflater.inflate(R.layout.row_collection_list_group_client,null);
    clientReusableViewHolder=new ClientReusableViewHolder(convertView);
    convertView.setTag(clientReusableViewHolder);
  }
 else {
    clientReusableViewHolder=(ClientReusableViewHolder)convertView.getTag();
  }
  Client client=sMifosGroups.get(groupPosition).getClients().get(childPosition);
  double totalDue=0;
  List<Loan> loans=client.getLoans();
  for (  Loan loan : loans) {
    totalDue+=loan.getTotalDue();
  }
  clientReusableViewHolder.tv_clientId.setText(String.valueOf(client.getClientId()));
  clientReusableViewHolder.tv_clientName.setText(client.getClientName());
  clientReusableViewHolder.tv_clientTotal.setText(String.valueOf(totalDue));
  CollectionSheetLoanAccountListAdapter collectionSheetLoanAccountListAdapter=new CollectionSheetLoanAccountListAdapter(context,loans,groupPosition,childPosition);
  clientReusableViewHolder.lv_loans.setAdapter(collectionSheetLoanAccountListAdapter);
  return convertView;
}
Program: 33028
Project: 33028
Buggy source:
public CollectionListAdapter(Context context,List<MifosGroup> mifosGroups){
  this.context=context;
  layoutInflater=LayoutInflater.from(this.context);
  this.mifosGroups=mifosGroups;
}

Fixed version (ground truth):
public CollectionListAdapter(Context context,List<MifosGroup> mifosGroups){
  this.context=context;
  layoutInflater=LayoutInflater.from(this.context);
  sMifosGroups=mifosGroups;
  for (  MifosGroup mifosGroup : sMifosGroups) {
    for (    Client client : mifosGroup.getClients()) {
      for (      Loan loan : client.getLoans()) {
        sRepaymentTransactions.put(loan.getLoanId(),loan.getTotalDue());
      }
    }
  }
}
Program: 33029
Project: 33029
Buggy source:
@Override public int getChildrenCount(int groupPosition){
  return mifosGroups.get(groupPosition).getClients().size();
}

Fixed version (ground truth):
@Override public int getChildrenCount(int groupPosition){
  return sMifosGroups.get(groupPosition).getClients().size();
}
Program: 33030
Project: 33030
Buggy source:
@Override public MifosGroup getGroup(int groupPosition){
  return mifosGroups.get(groupPosition);
}

Fixed version (ground truth):
@Override public MifosGroup getGroup(int groupPosition){
  return sMifosGroups.get(groupPosition);
}
Program: 33033
Project: 33033
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.action_settings) {
    return true;
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  return super.onOptionsItemSelected(item);
}
Program: 33034
Project: 33034
Buggy source:
public void findClients(final String clientName){
  safeUIBlockingUtility=new SafeUIBlockingUtility(getActivity());
  safeUIBlockingUtility.safelyBlockUI();
  API.searchService.searchClientsByName(clientName,new Callback<List<SearchedEntity>>(){
    @Override public void success(    List<SearchedEntity> searchedEntities,    Response response){
      Iterator<SearchedEntity> iterator=searchedEntities.iterator();
      clientNames.clear();
      while (iterator.hasNext()) {
        SearchedEntity searchedEntity=iterator.next();
        clientNames.add("String_Node_Str" + searchedEntity.getEntityId() + "String_Node_Str"+ searchedEntity.getEntityName());
        clientIds.add(searchedEntity.getEntityId());
      }
      String[] clientNamesArrayForAdapter=clientNames.toArray(new String[clientNames.size()]);
      ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,clientNamesArrayForAdapter);
      lv_searchResults.setAdapter(adapter);
      lv_searchResults.setOnItemClickListener(ClientSearchFragment.this);
      InputMethodManager inputMethodManager=(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
      inputMethodManager.hideSoftInputFromWindow(et_searchById.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}

Fixed version (ground truth):
public void findClients(final String clientName){
  safeUIBlockingUtility=new SafeUIBlockingUtility(getActivity());
  safeUIBlockingUtility.safelyBlockUI();
  API.searchService.searchClientsByName(clientName,new Callback<List<SearchedEntity>>(){
    @Override public void success(    List<SearchedEntity> searchedEntities,    Response response){
      Iterator<SearchedEntity> iterator=searchedEntities.iterator();
      clientNames.clear();
      while (iterator.hasNext()) {
        SearchedEntity searchedEntity=iterator.next();
        clientNames.add("String_Node_Str" + searchedEntity.getEntityId() + "String_Node_Str"+ searchedEntity.getEntityName());
        clientIds.add(searchedEntity.getEntityId());
      }
      String[] clientNamesArrayForAdapter=clientNames.toArray(new String[clientNames.size()]);
      ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,clientNamesArrayForAdapter);
      lv_searchResults.setAdapter(adapter);
      lv_searchResults.setOnItemClickListener(ClientSearchFragment.this);
      hideKeyboard();
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}
Program: 33035
Project: 33035
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  inputMethodManager=(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
}
Program: 33036
Project: 33036
Buggy source:
@Override public void success(List<SearchedEntity> searchedEntities,Response response){
  Iterator<SearchedEntity> iterator=searchedEntities.iterator();
  clientNames.clear();
  while (iterator.hasNext()) {
    SearchedEntity searchedEntity=iterator.next();
    clientNames.add("String_Node_Str" + searchedEntity.getEntityId() + "String_Node_Str"+ searchedEntity.getEntityName());
    clientIds.add(searchedEntity.getEntityId());
  }
  String[] clientNamesArrayForAdapter=clientNames.toArray(new String[clientNames.size()]);
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,clientNamesArrayForAdapter);
  lv_searchResults.setAdapter(adapter);
  lv_searchResults.setOnItemClickListener(ClientSearchFragment.this);
  InputMethodManager inputMethodManager=(InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
  inputMethodManager.hideSoftInputFromWindow(et_searchById.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);
  safeUIBlockingUtility.safelyUnBlockUI();
}

Fixed version (ground truth):
@Override public void success(List<SearchedEntity> searchedEntities,Response response){
  Iterator<SearchedEntity> iterator=searchedEntities.iterator();
  clientNames.clear();
  while (iterator.hasNext()) {
    SearchedEntity searchedEntity=iterator.next();
    clientNames.add("String_Node_Str" + searchedEntity.getEntityId() + "String_Node_Str"+ searchedEntity.getEntityName());
    clientIds.add(searchedEntity.getEntityId());
  }
  String[] clientNamesArrayForAdapter=clientNames.toArray(new String[clientNames.size()]);
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,clientNamesArrayForAdapter);
  lv_searchResults.setAdapter(adapter);
  lv_searchResults.setOnItemClickListener(ClientSearchFragment.this);
  hideKeyboard();
  safeUIBlockingUtility.safelyUnBlockUI();
}
Program: 33037
Project: 33037
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.action_settings) {
    return true;
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  return super.onOptionsItemSelected(item);
}
Program: 33038
Project: 33038
Buggy source:
/** 
 * Use this method to fetch all datatables for client and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.changeRestAdapterLogLevel(RestAdapter.LogLevel.NONE);
  API.dataTableService.getDatatablesOfClient(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        Log.i("String_Node_Str","String_Node_Str");
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_CLIENTS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          clientDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Use this method to fetch all datatables for client and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.dataTableService.getDatatablesOfClient(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_CLIENTS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          clientDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}
Program: 33039
Project: 33039
Buggy source:
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    Log.i("String_Node_Str","String_Node_Str");
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_CLIENTS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      clientDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}

Fixed version (ground truth):
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_CLIENTS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      clientDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}
Program: 33041
Project: 33041
Buggy source:
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    Log.i("String_Node_Str","String_Node_Str");
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_LOANS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      loanDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}

Fixed version (ground truth):
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_LOANS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      loanDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}
Program: 33042
Project: 33042
Buggy source:
/** 
 * Use this method to fetch all datatables for client and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.changeRestAdapterLogLevel(RestAdapter.LogLevel.NONE);
  API.dataTableService.getDatatablesOfLoan(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        Log.i("String_Node_Str","String_Node_Str");
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_LOANS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          loanDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Use this method to fetch all datatables for client and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.dataTableService.getDatatablesOfLoan(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLE_LOANS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          loanDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}
Program: 33043
Project: 33043
Buggy source:
/** 
 * Use this method to fetch all datatables for a savings account and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.changeRestAdapterLogLevel(RestAdapter.LogLevel.NONE);
  API.dataTableService.getDatatablesOfSavingsAccount(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        Log.i("String_Node_Str","String_Node_Str");
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLES_SAVINGS_ACCOUNTS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          savingsAccountDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Use this method to fetch all datatables for a savings account and inflate them as menu options
 */
public void inflateDataTablesList(){
  safeUIBlockingUtility.safelyBlockUI();
  API.dataTableService.getDatatablesOfSavingsAccount(new Callback<List<DataTable>>(){
    @Override public void success(    List<DataTable> dataTables,    Response response){
      if (dataTables != null) {
        ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLES_SAVINGS_ACCOUNTS;
        ClientActivity.shouldAddDataTables=Boolean.TRUE;
        ClientActivity.didMenuDataChange=Boolean.TRUE;
        Iterator<DataTable> dataTableIterator=dataTables.iterator();
        ClientActivity.dataTableMenuItems.clear();
        while (dataTableIterator.hasNext()) {
          DataTable dataTable=dataTableIterator.next();
          savingsAccountDataTables.add(dataTable);
          ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
        }
      }
      safeUIBlockingUtility.safelyUnBlockUI();
    }
    @Override public void failure(    RetrofitError retrofitError){
      Log.i("String_Node_Str",retrofitError.getLocalizedMessage());
      safeUIBlockingUtility.safelyUnBlockUI();
    }
  }
);
}
Program: 33044
Project: 33044
Buggy source:
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    Log.i("String_Node_Str","String_Node_Str");
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLES_SAVINGS_ACCOUNTS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      savingsAccountDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}

Fixed version (ground truth):
@Override public void success(List<DataTable> dataTables,Response response){
  if (dataTables != null) {
    ClientActivity.idOfDataTableToBeShownInMenu=Constants.DATA_TABLES_SAVINGS_ACCOUNTS;
    ClientActivity.shouldAddDataTables=Boolean.TRUE;
    ClientActivity.didMenuDataChange=Boolean.TRUE;
    Iterator<DataTable> dataTableIterator=dataTables.iterator();
    ClientActivity.dataTableMenuItems.clear();
    while (dataTableIterator.hasNext()) {
      DataTable dataTable=dataTableIterator.next();
      savingsAccountDataTables.add(dataTable);
      ClientActivity.dataTableMenuItems.add(dataTable.getRegisteredTableName());
    }
  }
  safeUIBlockingUtility.safelyUnBlockUI();
}
Program: 33045
Project: 33045
Buggy source:
public void setInterestRatePerPeriod(Integer interestRatePerPeriod){
  this.interestRatePerPeriod=interestRatePerPeriod;
}

Fixed version (ground truth):
public void setInterestRatePerPeriod(Double interestRatePerPeriod){
  this.interestRatePerPeriod=interestRatePerPeriod;
}
Program: 33046
Project: 33046
Buggy source:
public void setAnnualInterestRate(Integer annualInterestRate){
  this.annualInterestRate=annualInterestRate;
}

Fixed version (ground truth):
public void setAnnualInterestRate(Double annualInterestRate){
  this.annualInterestRate=annualInterestRate;
}
Program: 33047
Project: 33047
Buggy source:
public Integer getPrincipal(){
  return principal;
}

Fixed version (ground truth):
public Double getPrincipal(){
  return principal;
}
Program: 33048
Project: 33048
Buggy source:
public Integer getInterestRatePerPeriod(){
  return interestRatePerPeriod;
}

Fixed version (ground truth):
public Double getInterestRatePerPeriod(){
  return interestRatePerPeriod;
}
Program: 33049
Project: 33049
Buggy source:
public Integer getApprovedPrincipal(){
  return approvedPrincipal;
}

Fixed version (ground truth):
public Double getApprovedPrincipal(){
  return approvedPrincipal;
}
Program: 33050
Project: 33050
Buggy source:
public void setApprovedPrincipal(Integer approvedPrincipal){
  this.approvedPrincipal=approvedPrincipal;
}

Fixed version (ground truth):
public void setApprovedPrincipal(Double approvedPrincipal){
  this.approvedPrincipal=approvedPrincipal;
}
Program: 33051
Project: 33051
Buggy source:
public void setFeeChargesAtDisbursementCharged(Integer feeChargesAtDisbursementCharged){
  this.feeChargesAtDisbursementCharged=feeChargesAtDisbursementCharged;
}

Fixed version (ground truth):
public void setFeeChargesAtDisbursementCharged(Double feeChargesAtDisbursementCharged){
  this.feeChargesAtDisbursementCharged=feeChargesAtDisbursementCharged;
}
Program: 33052
Project: 33052
Buggy source:
public Integer getFeeChargesAtDisbursementCharged(){
  return feeChargesAtDisbursementCharged;
}

Fixed version (ground truth):
public Double getFeeChargesAtDisbursementCharged(){
  return feeChargesAtDisbursementCharged;
}
Program: 33053
Project: 33053
Buggy source:
public void setPrincipal(Integer principal){
  this.principal=principal;
}

Fixed version (ground truth):
public void setPrincipal(Double principal){
  this.principal=principal;
}
Program: 33054
Project: 33054
Buggy source:
public Integer getAnnualInterestRate(){
  return annualInterestRate;
}

Fixed version (ground truth):
public Double getAnnualInterestRate(){
  return annualInterestRate;
}
Program: 33055
Project: 33055
Buggy source:
public String getFormattedActivationDateAsString(){
  Calendar calender=Calendar.getInstance();
  calender.set(activationDate.get(0),activationDate.get(1),activationDate.get(2));
  DateFormat dateFormat=DateFormat.getDateInstance();
  return dateFormat.format(calender.getTime()).toString();
}

Fixed version (ground truth):
public String getFormattedActivationDateAsString(){
  Calendar calendar=Calendar.getInstance();
  calendar.set(activationDate.get(0),activationDate.get(1) - 1,activationDate.get(2));
  DateFormat dateFormat=DateFormat.getDateInstance();
  return dateFormat.format(calendar.getTime()).toString();
}
Program: 33056
Project: 33056
Buggy source:
public String getFormattedActivationDateAsString(){
  Calendar calender=Calendar.getInstance();
  calender.set(activationDate.get(0),activationDate.get(1),activationDate.get(2));
  DateFormat dateFormat=DateFormat.getDateInstance();
  return dateFormat.format(calender.getTime()).toString();
}

Fixed version (ground truth):
public String getFormattedActivationDateAsString(){
  Calendar calendar=Calendar.getInstance();
  calendar.set(activationDate.get(0),activationDate.get(1) - 1,activationDate.get(2));
  DateFormat dateFormat=DateFormat.getDateInstance();
  return dateFormat.format(calendar.getTime()).toString();
}
Program: 33057
Project: 33057
Buggy source:
@Override public View getView(int i,View view,ViewGroup viewGroup){
  ViewHolder viewHolder;
  if (view == null) {
    view=layoutInflater.inflate(R.layout.row_client_list_item,viewGroup,false);
    viewHolder=new ViewHolder(view);
    view.setTag(viewHolder);
  }
 else {
    viewHolder=(ViewHolder)view.getTag();
  }
  final Client client=listClient.get(i);
  clientId=client.getClientId();
  Loan loan=Select.from(Loan.class).where(Condition.prop("String_Node_Str").eq(clientId)).first();
  if (loan != null && loan.productShortName.length() > 0) {
    viewHolder.tv_product_short_name.setText(loan.productShortName);
    viewHolder.tv_client_name.setText(client.getClientName());
    viewHolder.et_amt_paid.setText(String.valueOf(listPaidAmounts.get(clientId)));
    viewHolder.et_amt_paid.setTag(loan);
    viewHolder.et_amt_paid.setOnFocusChangeListener(editFocusChangeListener);
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int i,View view,ViewGroup viewGroup){
  ViewHolder viewHolder;
  if (view == null) {
    view=layoutInflater.inflate(R.layout.row_client_list_item,viewGroup,false);
    viewHolder=new ViewHolder(view);
    view.setTag(viewHolder);
  }
 else {
    viewHolder=(ViewHolder)view.getTag();
  }
  final Client client=listClient.get(i);
  Loan loan=Select.from(Loan.class).where(Condition.prop("String_Node_Str").eq(client.getId())).first();
  if (loan != null && loan.productShortName.length() > 0) {
    viewHolder.tv_product_short_name.setText(loan.productShortName);
    viewHolder.tv_client_name.setText(client.getClientName());
    viewHolder.et_amt_paid.setText(String.valueOf(loan.totalDue));
    viewHolder.et_amt_paid.setTag(loan);
    viewHolder.et_amt_paid.setOnFocusChangeListener(editFocusChangeListener);
  }
  return view;
}
Program: 33058
Project: 33058
Buggy source:
@Override public void intercept(RequestFacade request){
  request.addHeader("String_Node_Str","String_Node_Str");
  request.addHeader("String_Node_Str","String_Node_Str");
  request.addHeader("String_Node_Str","String_Node_Str");
  request.addHeader("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void intercept(RequestFacade request){
  request.addHeader("String_Node_Str","String_Node_Str");
  request.addHeader("String_Node_Str","String_Node_Str");
  request.addHeader("String_Node_Str","String_Node_Str");
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(Constants.applicationContext);
  String authToken=pref.getString(User.AUTHENTICATION_KEY,"String_Node_Str");
  if (authToken != null && !"String_Node_Str".equals(authToken)) {
    request.addHeader("String_Node_Str",authToken);
  }
}
Program: 33059
Project: 33059
Buggy source:
public Notification getForegroundNotification(){
  notifBuilder.setContentText("String_Node_Str");
  return notifBuilder.build();
}

Fixed version (ground truth):
public Notification getForegroundNotification(){
  if (notif == null)   notif=notifBuilder.build();
  return notif;
}
Program: 33060
Project: 33060
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  boolean isBooting=false;
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent != null && intent.getExtras() != null) {
    if (intent.getExtras().containsKey("String_Node_Str")) {
      Object objBooting;
      objBooting=intent.getExtras().get("String_Node_Str");
      isBooting=(Boolean)objBooting;
    }
  }
  if (isBooting)   startServices();
  return super.onStartCommand(intent,flags,startId);
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  boolean isBooting=false;
  if (intent != null && intent.getExtras() != null) {
    if (intent.getExtras().containsKey("String_Node_Str")) {
      Object objBooting;
      objBooting=intent.getExtras().get("String_Node_Str");
      isBooting=(Boolean)objBooting;
    }
  }
  if (isBooting)   startServices();
  return super.onStartCommand(intent,flags,startId);
}
Program: 33061
Project: 33061
Buggy source:
public void stopProcess(){
  DataOutputStream os;
  Timer tm;
  os=new DataOutputStream(nodeProcess.getOutputStream());
  try {
    os.writeChars("String_Node_Str");
    os.flush();
    nodeProcess.getOutputStream().close();
    isStopping=true;
    tm=new Timer("String_Node_Str",true);
    tm.schedule(new TimerTask(){
      @Override public void run(){
        Log.w(TAG,"String_Node_Str");
        nodeProcess.destroy();
      }
    }
,5000);
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}

Fixed version (ground truth):
public void stopProcess(){
  tm.schedule(new TimerTask(){
    @Override public void run(){
      Log.w(TAG,"String_Node_Str");
      nodeProcess.destroy();
    }
  }
,5000);
  try {
    OutputStream stdin=nodeProcess.getOutputStream();
    stdin.write("String_Node_Str".getBytes());
    stdin.flush();
    stdin.close();
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}
Program: 33062
Project: 33062
Buggy source:
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
}

Fixed version (ground truth):
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
  this.tm=new Timer("String_Node_Str",true);
}
Program: 33063
Project: 33063
Buggy source:
@Override protected InetAddress doInBackground(Void... params){
  try {
    NetworkInterface intf;
    InetAddress inetAddress;
    for (Enumeration<NetworkInterface> en=NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) {
      intf=en.nextElement();
      for (Enumeration<InetAddress> enumIpAddr=intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
        inetAddress=enumIpAddr.nextElement();
        if (inetAddress.isLoopbackAddress()) {
          Log.d(TAG,"String_Node_Str" + inetAddress.toString() + "String_Node_Str");
          continue;
        }
        if (inetAddress instanceof Inet6Address) {
          Log.d(TAG,"String_Node_Str" + inetAddress.toString() + "String_Node_Str");
          continue;
        }
        if (inetAddress instanceof Inet4Address) {
          Log.d(TAG,"String_Node_Str" + inetAddress.toString() + "String_Node_Str");
          return inetAddress;
        }
      }
    }
  }
 catch (  SocketException ex) {
    Log.e(TAG,ex.toString());
  }
  return null;
}

Fixed version (ground truth):
@Override protected InetAddress doInBackground(Void... params){
  try {
    NetworkInterface intf;
    InetAddress inetAddress;
    InetAddress loopbackInetAddress=null;
    for (Enumeration<NetworkInterface> en=NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) {
      intf=en.nextElement();
      for (Enumeration<InetAddress> enumIpAddr=intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
        inetAddress=enumIpAddr.nextElement();
        if (inetAddress instanceof Inet6Address) {
          Log.d(TAG,"String_Node_Str" + inetAddress.toString() + "String_Node_Str");
          continue;
        }
        if (inetAddress instanceof Inet4Address) {
          if (!inetAddress.isLoopbackAddress()) {
            Log.d(TAG,"String_Node_Str" + inetAddress.toString() + "String_Node_Str");
            return inetAddress;
          }
          loopbackInetAddress=inetAddress;
        }
      }
    }
    return loopbackInetAddress;
  }
 catch (  SocketException ex) {
    Log.e(TAG,ex.toString());
  }
  return null;
}
Program: 33064
Project: 33064
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent.getExtras() != null && intent.getExtras().containsKey("String_Node_Str") && ((Boolean)intent.getExtras().get("String_Node_Str")))   startServices();
  return super.onStartCommand(intent,flags,startId);
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  boolean isBooting=false;
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent != null && intent.getExtras() != null) {
    if (intent.getExtras().containsKey("String_Node_Str")) {
      Object objBooting;
      objBooting=intent.getExtras().get("String_Node_Str");
      isBooting=(Boolean)objBooting;
    }
  }
  if (isBooting)   startServices();
  return super.onStartCommand(intent,flags,startId);
}
Program: 33065
Project: 33065
Buggy source:
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  SharedPreferences sharedPrefs;
  String msg;
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
switch (ev) {
case NODE_STOPPED:
case NODE_ERROR:
    nodeThread=null;
  if (sharedPrefs.getBoolean("String_Node_Str",false)) {
    msg="String_Node_Str";
  }
 else {
    msg="String_Node_Str";
  }
Toast.makeText(getApplicationContext(),msg,Toast.LENGTH_LONG).show();
}
}

Fixed version (ground truth):
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  SharedPreferences sharedPrefs;
  String msg;
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
switch (ev) {
case NODE_STARTED:
    startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  break;
case NODE_STOPPED:
break;
case NODE_ERROR:
nodeThread=null;
if (sharedPrefs.getBoolean("String_Node_Str",false)) {
msg="String_Node_Str";
}
 else {
msg="String_Node_Str";
}
Toast.makeText(getApplicationContext(),msg,Toast.LENGTH_LONG).show();
}
}
Program: 33066
Project: 33066
Buggy source:
protected void prepareLayout(){
  final SharedPreferences sharedPrefs;
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  addPreferencesFromResource(R.xml.preferences);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.startServiceThreads();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.stopServiceThreads();
      findPreference("String_Node_Str").setSummary("String_Node_Str");
      findPreference("String_Node_Str").setEnabled(false);
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.stopServiceThreads();
      Runtime.getRuntime().exit(0);
      return true;
    }
  }
);
}

Fixed version (ground truth):
protected void prepareLayout(){
  addPreferencesFromResource(R.xml.preferences);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.startServiceThreads();
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.stopServiceThreads();
      findPreference("String_Node_Str").setSummary("String_Node_Str");
      findPreference("String_Node_Str").setEnabled(false);
      return true;
    }
  }
);
  findPreference("String_Node_Str").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener(){
    @Override public boolean onPreferenceClick(    Preference preference){
      serviceBinder.stopServiceThreads();
      Runtime.getRuntime().exit(0);
      return true;
    }
  }
);
}
Program: 33067
Project: 33067
Buggy source:
public void stopProcess(){
  DataOutputStream os;
  Timer tm;
  os=new DataOutputStream(nodeProcess.getOutputStream());
  try {
    os.writeChars("String_Node_Str");
    os.flush();
    nodeProcess.getOutputStream().close();
    isStopping=true;
    tm=new Timer("String_Node_Str",true);
    tm.schedule(new TimerTask(){
      @Override public void run(){
        Log.w(TAG,"String_Node_Str");
        nodeProcess.destroy();
      }
    }
,5000);
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}

Fixed version (ground truth):
public void stopProcess(){
  tm.schedule(new TimerTask(){
    @Override public void run(){
      Log.w(TAG,"String_Node_Str");
      nodeProcess.destroy();
    }
  }
,5000);
  try {
    OutputStream stdin=nodeProcess.getOutputStream();
    stdin.write("String_Node_Str".getBytes());
    stdin.flush();
    stdin.close();
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}
Program: 33068
Project: 33068
Buggy source:
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
}

Fixed version (ground truth):
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
  this.tm=new Timer("String_Node_Str",true);
}
Program: 33069
Project: 33069
Buggy source:
public void stopProcess(){
  DataOutputStream os;
  Timer tm;
  os=new DataOutputStream(nodeProcess.getOutputStream());
  try {
    os.writeChars("String_Node_Str");
    os.flush();
    nodeProcess.getOutputStream().close();
    isStopping=true;
    tm=new Timer("String_Node_Str",true);
    tm.schedule(new TimerTask(){
      @Override public void run(){
        Log.w(TAG,"String_Node_Str");
        nodeProcess.destroy();
      }
    }
,5000);
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}

Fixed version (ground truth):
public void stopProcess(){
  tm.schedule(new TimerTask(){
    @Override public void run(){
      Log.w(TAG,"String_Node_Str");
      nodeProcess.destroy();
    }
  }
,5000);
  try {
    OutputStream stdin=nodeProcess.getOutputStream();
    stdin.write("String_Node_Str".getBytes());
    stdin.flush();
    stdin.close();
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}
Program: 33070
Project: 33070
Buggy source:
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
}

Fixed version (ground truth):
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
  this.tm=new Timer("String_Node_Str",true);
}
Program: 33071
Project: 33071
Buggy source:
public void stopProcess(){
  DataOutputStream os;
  Timer tm;
  os=new DataOutputStream(nodeProcess.getOutputStream());
  try {
    os.writeChars("String_Node_Str");
    os.flush();
    nodeProcess.getOutputStream().close();
    isStopping=true;
    tm=new Timer("String_Node_Str",true);
    tm.schedule(new TimerTask(){
      @Override public void run(){
        Log.w(TAG,"String_Node_Str");
        nodeProcess.destroy();
      }
    }
,5000);
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}

Fixed version (ground truth):
public void stopProcess(){
  tm.schedule(new TimerTask(){
    @Override public void run(){
      Log.w(TAG,"String_Node_Str");
      nodeProcess.destroy();
    }
  }
,5000);
  try {
    OutputStream stdin=nodeProcess.getOutputStream();
    stdin.write("String_Node_Str".getBytes());
    stdin.flush();
    stdin.close();
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}
Program: 33072
Project: 33072
Buggy source:
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
}

Fixed version (ground truth):
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
  this.tm=new Timer("String_Node_Str",true);
}