nus-yam/ex-repair huggingface dataset:
Program: 112578
Project: 112578
Buggy source:
private void openPocket(WalletAccount account){
  if (mViewPager != null && !account.getId().equals(currentAccountId)) {
    currentAccountId=account.getId();
    CoinType type=account.getCoinType();
    mTitle=type.getName();
    coinIconRes=Constants.COINS_ICONS.get(type);
    AppSectionsPagerAdapter adapter=new AppSectionsPagerAdapter(this,account);
    mViewPager.setAdapter(adapter);
    mViewPager.setCurrentItem(BALANCE);
    mViewPager.getAdapter().notifyDataSetChanged();
    getWalletApplication().getConfiguration().touchLastAccountId(currentAccountId);
    connectCoinService();
  }
}

Fixed version (ground truth):
private void openPocket(WalletAccount account,boolean selectInNavDrawer){
  if (account != null && mViewPager != null && !account.getId().equals(currentAccountId)) {
    currentAccountId=account.getId();
    CoinType type=account.getCoinType();
    mTitle=type.getName();
    coinIconRes=Constants.COINS_ICONS.get(type);
    AppSectionsPagerAdapter adapter=new AppSectionsPagerAdapter(this,account);
    mViewPager.setAdapter(adapter);
    mViewPager.setCurrentItem(BALANCE);
    mViewPager.getAdapter().notifyDataSetChanged();
    getWalletApplication().getConfiguration().touchLastAccountId(currentAccountId);
    connectCoinService();
    if (selectInNavDrawer && mNavigationDrawerFragment != null) {
      mNavigationDrawerFragment.selectAccount(account);
    }
  }
}
Program: 112579
Project: 112579
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wallet);
  if (getWalletApplication().getWallet() == null) {
    startIntro();
    finish();
    return;
  }
  if (getIntent().getBooleanExtra(Constants.ARG_TEST_WALLET,false)) {
    new AlertDialog.Builder(this).setTitle(R.string.test_wallet).setMessage(R.string.test_wallet_message).setNeutralButton(R.string.button_ok,null).create().show();
  }
  if (savedInstanceState == null) {
    checkAlerts();
  }
  mTitle=getTitle();
  getSupportActionBar().setElevation(0);
  mNavigationDrawerFragment=(NavigationDrawerFragment)getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
  mNavigationDrawerFragment.setUp(R.id.navigation_drawer,(DrawerLayout)findViewById(R.id.drawer_layout));
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setOffscreenPageLimit(2);
  mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    @Override public void onPageScrolled(    int pos,    float posOffset,    int posOffsetPixels){
    }
    @Override public void onPageSelected(    int position){
      if (position == BALANCE)       Keyboard.hideKeyboard(WalletActivity.this);
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
);
  String lastAccountId=getWalletApplication().getConfiguration().getLastAccountId();
  mNavigationDrawerFragment.selectAccountInit(lastAccountId);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wallet);
  wallet=getWallet();
  if (getWalletApplication().getWallet() == null) {
    startIntro();
    finish();
    return;
  }
  if (getIntent().getBooleanExtra(Constants.ARG_TEST_WALLET,false)) {
    new AlertDialog.Builder(this).setTitle(R.string.test_wallet).setMessage(R.string.test_wallet_message).setNeutralButton(R.string.button_ok,null).create().show();
  }
  if (savedInstanceState == null) {
    checkAlerts();
  }
  mTitle=getTitle();
  getSupportActionBar().setElevation(0);
  mNavigationDrawerFragment=(NavigationDrawerFragment)getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
  mNavigationDrawerFragment.setUp(R.id.navigation_drawer,(DrawerLayout)findViewById(R.id.drawer_layout));
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setOffscreenPageLimit(2);
  mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    @Override public void onPageScrolled(    int pos,    float posOffset,    int posOffsetPixels){
    }
    @Override public void onPageSelected(    int position){
      if (position == BALANCE)       Keyboard.hideKeyboard(WalletActivity.this);
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
);
  WalletAccount lastAccount=getAccount(getWalletApplication().getConfiguration().getLastAccountId());
  if (lastAccount != null) {
    mNavigationDrawerFragment.selectAccount(lastAccount,false);
    openPocket(lastAccount,false);
  }
}
Program: 112580
Project: 112580
Buggy source:
@Override public void onAccountSelected(WalletAccount account){
  log.info("String_Node_Str",account.getId());
  openPocket(account);
}

Fixed version (ground truth):
@Override public void onAccountSelected(WalletAccount account){
  log.info("String_Node_Str",account.getId());
  openPocket(account,false);
}
Program: 112581
Project: 112581
Buggy source:
private void setSendFromCoin(CoinURI coinUri) throws CoinURIParseException {
  List<WalletAccount> accounts=getAccounts(coinUri.getType());
  if (mViewPager != null && mNavigationDrawerFragment != null && accounts.size() > 0) {
    WalletAccount account;
    if (accounts.size() > 1) {
      Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
    account=accounts.get(0);
    mNavigationDrawerFragment.selectAccount(account);
    mViewPager.setCurrentItem(SEND);
    for (    Fragment fragment : getSupportFragmentManager().getFragments()) {
      if (fragment instanceof SendFragment) {
        ((SendFragment)fragment).updateStateFrom(coinUri.getAddress(),coinUri.getAmount(),coinUri.getLabel());
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void setSendFromCoin(final CoinURI coinUri) throws CoinURIParseException {
  List<WalletAccount> accounts=getAccounts(coinUri.getType());
  if (mViewPager != null && mNavigationDrawerFragment != null && accounts.size() > 0) {
    final WalletAccount account;
    if (accounts.size() > 1) {
      Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
    }
    account=accounts.get(0);
    openPocket(account);
    mViewPager.setCurrentItem(SEND);
    for (    Fragment fragment : getSupportFragmentManager().getFragments()) {
      if (fragment instanceof SendFragment) {
        ((SendFragment)fragment).updateStateFrom(coinUri.getAddress(),coinUri.getAmount(),coinUri.getLabel());
        break;
      }
    }
  }
}
Program: 112582
Project: 112582
Buggy source:
public void onMakeTransaction(Address toAddress,Coin amount){
  Intent intent=new Intent(getActivity(),SignTransactionActivity.class);
  try {
    if (pocket == null) {
      throw new NoSuchPocketException("String_Node_Str" + type.getName());
    }
    intent.putExtra(Constants.ARG_ACCOUNT_ID,type.getId());
    intent.putExtra(Constants.ARG_SEND_TO_ADDRESS,toAddress.toString());
    intent.putExtra(Constants.ARG_SEND_AMOUNT,amount.getValue());
    startActivityForResult(intent,SIGN_TRANSACTION);
  }
 catch (  NoSuchPocketException e) {
    Toast.makeText(getActivity(),R.string.no_such_pocket_error,Toast.LENGTH_LONG).show();
  }
}

Fixed version (ground truth):
public void onMakeTransaction(Address toAddress,Coin amount){
  Intent intent=new Intent(getActivity(),SignTransactionActivity.class);
  try {
    if (pocket == null) {
      throw new NoSuchPocketException("String_Node_Str" + type.getName());
    }
    intent.putExtra(Constants.ARG_ACCOUNT_ID,pocket.getId());
    intent.putExtra(Constants.ARG_SEND_TO_ADDRESS,toAddress.toString());
    intent.putExtra(Constants.ARG_SEND_AMOUNT,amount.getValue());
    startActivityForResult(intent,SIGN_TRANSACTION);
  }
 catch (  NoSuchPocketException e) {
    Toast.makeText(getActivity(),R.string.no_such_pocket_error,Toast.LENGTH_LONG).show();
  }
}
Program: 112583
Project: 112583
Buggy source:
@Override protected Exception doInBackground(Void... params){
  Wallet wallet=application.getWallet();
  if (wallet == null)   return new NoSuchPocketException("String_Node_Str");
  Exception error=null;
  try {
    if (wallet.isEncrypted()) {
      KeyCrypter crypter=checkNotNull(wallet.getKeyCrypter());
      request.aesKey=crypter.deriveKey(password);
    }
    request.signInputs=true;
    pocket.completeTx(request);
    pocket.broadcastTx(request.tx);
  }
 catch (  Exception e) {
    error=e;
  }
  return error;
}

Fixed version (ground truth):
@Override protected Exception doInBackground(Void... params){
  Wallet wallet=application.getWallet();
  if (wallet == null)   return new NoSuchPocketException("String_Node_Str");
  Exception error=null;
  try {
    if (wallet.isEncrypted()) {
      KeyCrypter crypter=checkNotNull(wallet.getKeyCrypter());
      request.aesKey=crypter.deriveKey(password);
    }
    request.signInputs=true;
    pocket.completeAndSignTx(request);
    pocket.broadcastTx(request.tx);
  }
 catch (  Exception e) {
    error=e;
  }
  return error;
}
Program: 112584
Project: 112584
Buggy source:
private View.OnClickListener getOnNextListener(){
  return new View.OnClickListener(){
    @Override public void onClick(    View v){
      verifyMnemonic();
    }
  }
;
}

Fixed version (ground truth):
private View.OnClickListener getOnNextListener(){
  return new View.OnClickListener(){
    @Override public void onClick(    View v){
      verifyMnemonicAndProceed();
    }
  }
;
}
Program: 112585
Project: 112585
Buggy source:
@Override public void onActivityResult(final int requestCode,final int resultCode,final Intent intent){
  if (requestCode == REQUEST_CODE_SCAN) {
    if (resultCode == Activity.RESULT_OK) {
      mnemonicTextView.setText(intent.getStringExtra(ScanActivity.INTENT_EXTRA_RESULT));
    }
  }
}

Fixed version (ground truth):
@Override public void onActivityResult(final int requestCode,final int resultCode,final Intent intent){
  if (requestCode == REQUEST_CODE_SCAN) {
    if (resultCode == Activity.RESULT_OK) {
      mnemonicTextView.setText(intent.getStringExtra(ScanActivity.INTENT_EXTRA_RESULT));
      verifyMnemonic();
    }
  }
}
Program: 112586
Project: 112586
Buggy source:
private View.OnClickListener getOnSkipListener(){
  return new View.OnClickListener(){
    @Override public void onClick(    View v){
      log.info("String_Node_Str");
      mnemonicTextView.setText("String_Node_Str");
      verifyMnemonic(seed,true);
    }
  }
;
}

Fixed version (ground truth):
private View.OnClickListener getOnSkipListener(){
  return new View.OnClickListener(){
    @Override public void onClick(    View v){
      log.info("String_Node_Str");
      mnemonicTextView.setText("String_Node_Str");
      verifyMnemonicAndProceed(seed,true);
    }
  }
;
}
Program: 112587
Project: 112587
Buggy source:
private void clearError(){
  if (errorΜessage.isShown())   errorΜessage.setVisibility(View.GONE);
}

Fixed version (ground truth):
private void clearError(){
  if (errorΜessage.getVisibility() == View.VISIBLE) {
    errorΜessage.setVisibility(View.GONE);
  }
}
Program: 112588
Project: 112588
Buggy source:
private void verifyMnemonic(String seedText,boolean skipSeedEntry){
  log.info("String_Node_Str");
  ArrayList<String> seedWords=new ArrayList<String>();
  for (  String word : seedText.trim().split("String_Node_Str")) {
    if (word.isEmpty())     continue;
    seedWords.add(word);
  }
  boolean isValid=false;
  try {
    MnemonicCode.INSTANCE.check(seedWords);
    clearError();
    isValid=true;
  }
 catch (  MnemonicException.MnemonicChecksumException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error_checksum);
  }
catch (  MnemonicException.MnemonicWordException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error_words);
  }
catch (  MnemonicException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error,e.getMessage());
  }
  if (seed != null && !seedText.trim().equals(seed.trim())) {
    log.info("String_Node_Str");
    setError(R.string.restore_error_mismatch);
    isValid=false;
  }
  if (isValid && skipSeedEntry) {
    SkipDialogFragment skipDialog=SkipDialogFragment.newInstance(seedText);
    skipDialog.show(getFragmentManager(),null);
  }
 else   if (isValid && isNewSeed) {
    if (mListener != null)     mListener.onNewSeedVerified(seedText);
  }
 else   if (isValid) {
    if (mListener != null)     mListener.onExistingSeedVerified(seedText,isSeedProtected);
  }
}

Fixed version (ground truth):
private boolean verifyMnemonic(String seedText){
  log.info("String_Node_Str");
  ArrayList<String> seedWords=new ArrayList<String>();
  for (  String word : seedText.trim().split("String_Node_Str")) {
    if (word.isEmpty())     continue;
    seedWords.add(word);
  }
  boolean isValid=false;
  try {
    MnemonicCode.INSTANCE.check(seedWords);
    clearError();
    isValid=true;
  }
 catch (  MnemonicException.MnemonicChecksumException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error_checksum);
  }
catch (  MnemonicException.MnemonicWordException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error_words);
  }
catch (  MnemonicException e) {
    log.info("String_Node_Str",e.getMessage());
    setError(R.string.restore_error,e.getMessage());
  }
  if (seed != null && !seedText.trim().equals(seed.trim())) {
    log.info("String_Node_Str");
    setError(R.string.restore_error_mismatch);
    isValid=false;
  }
  return isValid;
}
Program: 112589
Project: 112589
Buggy source:
/** 
 * <p> Disables auto-saving, after it had been enabled with  {@link Wallet#autosaveToFile(java.io.File,long,java.util.concurrent.TimeUnit,com.coinomi.core.wallet.WalletFiles.Listener)}before. This method blocks until finished. </p>
 */
public void shutdownAutosaveAndWait(){
  lock.lock();
  try {
    WalletFiles files=vFileManager;
    vFileManager=null;
    checkState(files != null,"String_Node_Str");
    files.shutdownAndWait();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
/** 
 * <p> Disables auto-saving, after it had been enabled with  {@link Wallet#autosaveToFile(java.io.File,long,java.util.concurrent.TimeUnit,com.coinomi.core.wallet.WalletFiles.Listener)}before. This method blocks until finished. </p>
 */
public void shutdownAutosaveAndWait(){
  lock.lock();
  try {
    WalletFiles files=vFileManager;
    vFileManager=null;
    if (files != null) {
      files.shutdownAndWait();
    }
  }
  finally {
    lock.unlock();
  }
}
Program: 112590
Project: 112590
Buggy source:
private void updateAppearance(){
  if (type != null) {
    symbol.setText(type.getSymbol());
    symbol.setVisibility(VISIBLE);
  }
 else   if (localCurrencyCode != null) {
    symbol.setText(localCurrencyCode);
    symbol.setVisibility(VISIBLE);
  }
 else {
    symbol.setText(null);
    symbol.setVisibility(GONE);
  }
  final Spannable hintSpannable=new MonetarySpannable(hintFormat,hint != null ? hint : Coin.ZERO);
  textView.setHint(hintSpannable);
}

Fixed version (ground truth):
private void updateAppearance(){
  if (type != null) {
    symbol.setText(type.getSymbol());
    symbol.setVisibility(VISIBLE);
  }
 else   if (localCurrencyCode != null) {
    symbol.setText(localCurrencyCode);
    symbol.setVisibility(VISIBLE);
  }
 else {
    symbol.setText(null);
    symbol.setVisibility(GONE);
  }
  final Spannable hintSpannable=new MonetarySpannable(hintFormat,amountSigned,hint != null ? hint : Coin.ZERO,type);
  textView.setHint(hintSpannable);
}
Program: 112591
Project: 112591
Buggy source:
private void selectItem(int position){
  if (position < 0) {
    position=0;
  }
  mCurrentSelectedPosition=position;
  if (mDrawerListView != null) {
    mDrawerListView.setItemChecked(position,true);
  }
  if (mDrawerLayout != null) {
    mDrawerLayout.closeDrawer(mFragmentContainerView);
  }
  if (mCallbacks != null && application.getWallet() != null) {
    mCallbacks.onNavigationDrawerCoinSelected(application.getWallet().getCoinTypes().get(position));
  }
}

Fixed version (ground truth):
private void selectItem(int position,boolean closeDrawer){
  if (position < 0) {
    position=0;
  }
  mCurrentSelectedPosition=position;
  if (mDrawerListView != null) {
    mDrawerListView.setItemChecked(position,true);
  }
  if (mDrawerLayout != null && closeDrawer) {
    mDrawerLayout.closeDrawer(mFragmentContainerView);
  }
  if (mCallbacks != null && application.getWallet() != null) {
    mCallbacks.onNavigationDrawerCoinSelected(application.getWallet().getCoinTypes().get(position));
  }
}
Program: 112592
Project: 112592
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wallet);
  if (getWalletApplication().getWallet() == null) {
    startIntro();
    finish();
    return;
  }
  mTitle=getTitle();
  mNavigationDrawerFragment=(NavigationDrawerFragment)getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
  mNavigationDrawerFragment.setUp(R.id.navigation_drawer,(DrawerLayout)findViewById(R.id.drawer_layout));
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setOffscreenPageLimit(2);
  CoinType lastPocket=getWalletApplication().getConfiguration().getLastPocket();
  mNavigationDrawerFragment.selectItem(lastPocket);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wallet);
  if (getWalletApplication().getWallet() == null) {
    startIntro();
    finish();
    return;
  }
  mTitle=getTitle();
  mNavigationDrawerFragment=(NavigationDrawerFragment)getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
  mNavigationDrawerFragment.setUp(R.id.navigation_drawer,(DrawerLayout)findViewById(R.id.drawer_layout));
  mViewPager=(ViewPager)findViewById(R.id.pager);
  mViewPager.setOffscreenPageLimit(2);
  CoinType lastPocket=getWalletApplication().getConfiguration().getLastPocket();
  mNavigationDrawerFragment.selectCoinInit(lastPocket);
}
Program: 112593
Project: 112593
Buggy source:
@Override public void running(){
  if (stratumClient != null && stratumClient.isConnected()) {
    log.info("String_Node_Str",type.getName(),lastServerAddress);
    broadcastOnConnection();
    retrySeconds=1;
  }
}

Fixed version (ground truth):
@Override public void running(){
  if (isConnected()) {
    log.info("String_Node_Str",type.getName(),lastServerAddress);
    broadcastOnConnection();
    retrySeconds=1;
  }
}
Program: 112594
Project: 112594
Buggy source:
/** 
 * Removes the given event listener object. Returns true if the listener was removed, false if that listener was never added.
 */
public boolean removeEventListener(ConnectionEventListener listener){
  return ListenerRegistration.removeFromList(listener,eventListeners);
}

Fixed version (ground truth):
/** 
 * Removes the given event listener object. Returns true if the listener was removed, false if that listener was never added.
 */
private boolean removeEventListener(ConnectionEventListener listener){
  return ListenerRegistration.removeFromList(listener,eventListeners);
}
Program: 112595
Project: 112595
Buggy source:
/** 
 * Adds an event listener object. Methods on this object are called when something interesting happens, like new connection to a server. The listener is executed by the given executor.
 */
public void addEventListener(ConnectionEventListener listener,Executor executor){
  eventListeners.add(new ListenerRegistration<ConnectionEventListener>(listener,executor));
}

Fixed version (ground truth):
/** 
 * Adds an event listener object. Methods on this object are called when something interesting happens, like new connection to a server. The listener is executed by the given executor.
 */
private void addEventListener(ConnectionEventListener listener,Executor executor){
  eventListeners.add(new ListenerRegistration<ConnectionEventListener>(listener,executor));
}
Program: 112596
Project: 112596
Buggy source:
public ServerClients(List<CoinAddress> coins,Wallet wallet){
  connections=new HashMap<CoinType,ServerClient>(coins.size());
  for (  CoinAddress coinAddress : coins) {
    ServerClient client=new ServerClient(coinAddress);
    client.addEventListener(wallet.getPocket(coinAddress.getType()));
    connections.put(coinAddress.getType(),client);
  }
}

Fixed version (ground truth):
public ServerClients(List<CoinAddress> coins,Wallet wallet){
  connections=new HashMap<CoinType,ServerClient>(coins.size());
  for (  CoinAddress coinAddress : coins) {
    ServerClient client=new ServerClient(coinAddress);
    connections.put(coinAddress.getType(),client);
  }
  setWallet(wallet);
}
Program: 112597
Project: 112597
Buggy source:
public void refresh(){
  lock.lock();
  try {
    for (    WalletPocket pocket : getPockets()) {
      pocket.refresh();
    }
    saveNow();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
public void refresh(){
  lock.lock();
  try {
    for (    WalletPocket pocket : getPockets()) {
      pocket.refresh();
    }
    saveLater();
  }
  finally {
    lock.unlock();
  }
}
Program: 112598
Project: 112598
Buggy source:
private void connectTransaction(Transaction tx){
  checkState(lock.isHeldByCurrentThread());
  if (tx.getConfidence().getConfidenceType() != ConfidenceType.BUILDING)   return;
  if (log.isInfoEnabled())   log.info("String_Node_Str",tx.getHash());
  for (  TransactionInput txi : tx.getInputs()) {
    if (txi.getConnectedOutput() != null)     continue;
    Sha256Hash outputHash=txi.getOutpoint().getHash();
    Transaction fromTx=transactions.get(outputHash);
    if (fromTx != null) {
      for (int i=2; i > 0; i--) {
        ConnectionResult result=txi.connect(fromTx,ConnectMode.DISCONNECT_ON_CONFLICT);
        if (result == ConnectionResult.NO_SUCH_TX) {
          log.error("String_Node_Str",txi.getOutpoint(),fromTx.getHash());
        }
 else         if (result == ConnectionResult.ALREADY_SPENT) {
          TransactionOutput out=fromTx.getOutput((int)txi.getOutpoint().getIndex());
          log.warn("String_Node_Str",out);
          out.markAsUnspent();
        }
 else {
          log.info("String_Node_Str",fromTx.getHash(),txi.getOutpoint().getIndex());
          break;
        }
      }
      maybeMovePool(fromTx);
    }
 else {
      log.warn("String_Node_Str",txi.getParentTransaction().getHash(),txi.getOutpoint().getIndex());
    }
  }
  maybeMovePool(tx);
}

Fixed version (ground truth):
private void connectTransaction(Transaction tx){
  checkState(lock.isHeldByCurrentThread());
  if (tx.getConfidence().getConfidenceType() != ConfidenceType.BUILDING)   return;
  if (log.isInfoEnabled())   log.info("String_Node_Str",tx.getHash());
  for (  TransactionInput txi : tx.getInputs()) {
    if (txi.getConnectedOutput() != null)     continue;
    Sha256Hash outputHash=txi.getOutpoint().getHash();
    Transaction fromTx=transactions.get(outputHash);
    if (fromTx != null) {
      for (int i=2; i > 0; i--) {
        ConnectionResult result=txi.connect(fromTx,ConnectMode.DISCONNECT_ON_CONFLICT);
        if (result == ConnectionResult.NO_SUCH_TX) {
          log.error("String_Node_Str",txi.getOutpoint(),fromTx.getHash());
        }
 else         if (result == ConnectionResult.ALREADY_SPENT) {
          TransactionOutput out=fromTx.getOutput((int)txi.getOutpoint().getIndex());
          log.warn("String_Node_Str",out);
          out.markAsUnspent();
        }
 else {
          log.info("String_Node_Str",fromTx.getHash(),txi.getOutpoint().getIndex());
          break;
        }
      }
      maybeMovePool(fromTx);
    }
 else {
      log.info("String_Node_Str",txi.getParentTransaction().getHash(),txi.getOutpoint().getIndex());
    }
  }
  maybeMovePool(tx);
}
Program: 112599
Project: 112599
Buggy source:
public DarkcoinMain(){
  id="String_Node_Str";
  addressHeader=76;
  p2shHeader=5;
  acceptableAddressCodes=new int[]{addressHeader,p2shHeader};
  name="String_Node_Str";
  symbol="String_Node_Str";
  uriScheme="String_Node_Str";
  bip44Index=5;
}

Fixed version (ground truth):
public DarkcoinMain(){
  id="String_Node_Str";
  addressHeader=76;
  p2shHeader=5;
  acceptableAddressCodes=new int[]{addressHeader,p2shHeader};
  name="String_Node_Str";
  symbol="String_Node_Str";
  uriScheme="String_Node_Str";
  bip44Index=10;
  throw new RuntimeException(name + "String_Node_Str" + bip44Index+ "String_Node_Str");
}
Program: 112600
Project: 112600
Buggy source:
public PeercoinMain(){
  id="String_Node_Str";
  addressHeader=55;
  p2shHeader=117;
  acceptableAddressCodes=new int[]{addressHeader,p2shHeader};
  name="String_Node_Str";
  symbol="String_Node_Str";
  uriScheme="String_Node_Str";
  bip44Index=4;
}

Fixed version (ground truth):
public PeercoinMain(){
  id="String_Node_Str";
  addressHeader=55;
  p2shHeader=117;
  acceptableAddressCodes=new int[]{addressHeader,p2shHeader};
  name="String_Node_Str";
  symbol="String_Node_Str";
  uriScheme="String_Node_Str";
  bip44Index=13;
  feePerKb=Coin.valueOf(1);
  minNonDust=Coin.valueOf(1);
  throw new RuntimeException(name + "String_Node_Str" + bip44Index+ "String_Node_Str");
}
Program: 112601
Project: 112601
Buggy source:
public JSONObject put(String key,Collection value) throws JSONException {
  this.put(key,new JSONArray(value));
  return this;
}

Fixed version (ground truth):
public JSONObject put(String key,@Nullable Collection value) throws JSONException {
  if (value != null) {
    this.put(key,new JSONArray(value));
  }
  return this;
}
Program: 112602
Project: 112602
Buggy source:
public void setParams(Collection params){
  try {
    put("String_Node_Str",params);
  }
 catch (  JSONException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public void setParams(@Nullable Collection params){
  if (params == null)   return;
  try {
    put("String_Node_Str",params);
  }
 catch (  JSONException e) {
    throw new RuntimeException(e);
  }
}
Program: 112603
Project: 112603
Buggy source:
public StatePublisher(int port){
  context=ZMQ.context(1);
  socket=context.socket(ZMQ.PUB);
  socket.bind("String_Node_Str" + port);
}

Fixed version (ground truth):
public StatePublisher(int port){
  context=ZMQ.context(1);
  socket=context.socket(ZMQ.PUB);
  socket.bind("String_Node_Str" + port);
  this.setDaemon(true);
  this.start();
}
Program: 112604
Project: 112604
Buggy source:
@Override public void publish(String id,State state){
  try {
    JSONObject json=state.inner.toMonitorJSON();
    json.put("String_Node_Str",id);
    socket.send(json.toString());
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void publish(String id,TrackerServer.State state){
  try {
    JSONObject json=state.inner.toMonitorJSON();
    json.put("String_Node_Str",id);
    queue.put(json.toString());
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e.getMessage());
    e.printStackTrace();
  }
}
Program: 112605
Project: 112605
Buggy source:
@Override public void run(){
  Stopwatch sw=new Stopwatch();
  sw.start();
  vector.set(matcher.execute(state.inner.vector(),state.inner.sample(),sample));
  sw.stop();
  logger.info("String_Node_Str",sample.id(),sw.ms());
}

Fixed version (ground truth):
@Override public void run(){
  while (true) {
    try {
      String message=queue.take();
      socket.send(message);
    }
 catch (    InterruptedException e) {
      logger.warn("String_Node_Str");
      return;
    }
  }
}
Program: 112606
Project: 112606
Buggy source:
@Override public void delete(String id,long time){
  try {
    JSONObject json=new JSONObject();
    json.put("String_Node_Str",id);
    json.put("String_Node_Str",time);
    socket.send(json.toString());
    logger.info("String_Node_Str",id);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e.getMessage());
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void delete(String id,long time){
  try {
    JSONObject json=new JSONObject();
    json.put("String_Node_Str",id);
    json.put("String_Node_Str",time);
    queue.put(json.toString());
    logger.info("String_Node_Str",id);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e.getMessage());
    e.printStackTrace();
  }
}
Program: 112609
Project: 112609
Buggy source:
@Bean public MongoClient mongoClient(){
  List<ServerAddress> serverAddresses=new ArrayList();
  MongoClient mongoClient=null;
  try {
    for (    String mongoHost : configurationContext.getMongoHosts()) {
      String[] elements=mongoHost.split("String_Node_Str");
      if (elements.length < 2) {
        serverAddresses.add(new ServerAddress(elements[0]));
      }
 else {
        serverAddresses.add(new ServerAddress(elements[0],Integer.parseInt(elements[1])));
      }
    }
    if (configurationContext.getMongoUsername() != null && configurationContext.getMongoPassword() != null) {
      mongoClient=new MongoClient(serverAddresses,Arrays.asList(MongoCredential.createPlainCredential(configurationContext.getMongoUsername(),"String_Node_Str",configurationContext.getMongoPassword().toCharArray())));
    }
 else {
      log.warn("String_Node_Str",configurationContext.getMongoUsername(),configurationContext.getMongoPassword());
      mongoClient=new MongoClient(serverAddresses);
    }
  }
 catch (  UnknownHostException e) {
    e.printStackTrace();
  }
  log.error("String_Node_Str");
  return mongoClient;
}

Fixed version (ground truth):
@Bean public MongoClient mongoClient(){
  List<ServerAddress> serverAddresses=new ArrayList();
  MongoClient mongoClient=null;
  try {
    for (    String mongoHost : configurationContext.getMongoHosts()) {
      String[] elements=mongoHost.split("String_Node_Str");
      if (elements.length < 2) {
        serverAddresses.add(new ServerAddress(elements[0]));
      }
 else {
        serverAddresses.add(new ServerAddress(elements[0],Integer.parseInt(elements[1])));
      }
    }
    if (configurationContext.getMongoUsername() != null && configurationContext.getMongoPassword() != null) {
      mongoClient=new MongoClient(serverAddresses,Arrays.asList(MongoCredential.createPlainCredential(configurationContext.getMongoUsername(),"String_Node_Str",configurationContext.getMongoPassword().toCharArray())));
    }
 else {
      log.warn("String_Node_Str",configurationContext.getMongoUsername(),configurationContext.getMongoPassword());
      mongoClient=new MongoClient(serverAddresses);
    }
  }
 catch (  UnknownHostException e) {
    e.printStackTrace();
  }
  log.debug("String_Node_Str");
  return mongoClient;
}
Program: 112611
Project: 112611
Buggy source:
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
}

Fixed version (ground truth):
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
  try {
    BulkProcessor bulkProcessor=BulkProcessor.builder(getClient(),new BulkProcessor.Listener(){
      @Override public void beforeBulk(      long executionId,      BulkRequest request){
        log.debug("String_Node_Str",request.numberOfActions());
      }
      @Override public void afterBulk(      long executionId,      BulkRequest request,      BulkResponse response){
        log.debug("String_Node_Str",request.numberOfActions());
      }
      @Override public void afterBulk(      long executionId,      BulkRequest request,      Throwable failure){
        log.error("String_Node_Str",failure);
      }
    }
).setBulkActions(maxBatchSize).build();
    for (    StratioStreamingMessage stratioStreamingMessage : messages) {
      try {
        XContentBuilder contentBuilder=XContentFactory.jsonBuilder().startObject();
        for (        ColumnNameTypeValue column : stratioStreamingMessage.getColumns()) {
          contentBuilder=contentBuilder.field(column.getColumn(),column.getValue());
        }
        contentBuilder=contentBuilder.field("String_Node_Str",elasicSearchTimestampFormat.format(stratioStreamingMessage.getTimestamp()));
        contentBuilder=contentBuilder.endObject();
        IndexRequestBuilder request=getClient().prepareIndex(INDEX_NAME,stratioStreamingMessage.getStreamName()).setSource(contentBuilder);
        bulkProcessor.add(request.request());
      }
 catch (      IOException e) {
        log.error("String_Node_Str",stratioStreamingMessage.getStreamName(),e);
      }
    }
    bulkProcessor.close();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e.getMessage());
  }
}
Program: 112612
Project: 112612
Buggy source:
public StreamStatusDTO(String streamName,Boolean userDefined,List<ColumnNameTypeValue> columns){
  this.streamName=streamName;
  this.userDefined=userDefined;
  this.actionsEnabled=new HashSet<>();
  this.addedQueries=new HashMap<>();
  this.streamDefinition=columns != null ? columns : new ArrayList<>();
  this.engineActionsEnabled=new HashMap<>();
  this.streamColumns=new HashMap();
  streamDefinition.forEach(column -> streamColumns.put(column.getColumn(),column));
}

Fixed version (ground truth):
public StreamStatusDTO(String streamName,Boolean userDefined,List<ColumnNameTypeValue> columns){
  this.streamName=streamName;
  this.userDefined=userDefined;
  this.actionsEnabled=new HashSet<>();
  this.addedQueries=new HashMap<>();
  this.engineActionsEnabled=new HashMap<>();
  this.streamColumns=new HashMap();
  this.streamDefinition=new ArrayList<>();
  columns.forEach(column -> {
    streamDefinition.add(column);
    streamColumns.put(column.getColumn(),column);
  }
);
}
Program: 112613
Project: 112613
Buggy source:
public void enableAction(String streamName,StreamAction action){
  if (streamStatusDao.getEnabledActions(streamName).size() == 0) {
    String actionQueryId=siddhiManager.addQuery(QueryFactory.createQuery().from(QueryFactory.inputStream(streamName)).insertInto(STREAMING.STATS_NAMES.SINK_STREAM_PREFIX.concat(streamName)));
    streamStatusDao.setActionQuery(streamName,actionQueryId);
    siddhiManager.addCallback(actionQueryId,callbackService.add(streamName,streamStatusDao.getEnabledActions(streamName),configurationContext.getClusterId()));
  }
  streamStatusDao.enableAction(streamName,action);
}

Fixed version (ground truth):
public void enableAction(String streamName,StreamAction action){
  if (streamStatusDao.getEnabledActions(streamName).size() == 0) {
    String actionQueryId=siddhiManager.addQuery(QueryFactory.createQuery().from(QueryFactory.inputStream(streamName)).insertInto(STREAMING.STATS_NAMES.SINK_STREAM_PREFIX.concat(streamName)));
    streamStatusDao.setActionQuery(streamName,actionQueryId);
    String clusterId=null;
    if (configurationContext != null) {
      clusterId=configurationContext.getClusterId();
    }
    siddhiManager.addCallback(actionQueryId,callbackService.add(streamName,streamStatusDao.getEnabledActions(streamName),clusterId));
  }
  streamStatusDao.enableAction(streamName,action);
}
Program: 112614
Project: 112614
Buggy source:
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamName,castToColumnNameTypeValue(streamDefinition.getAttributeList()));
  }
}

Fixed version (ground truth):
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamDefinition.getStreamId(),castToColumnNameTypeValue(streamDefinition.getAttributeList()));
  }
}
Program: 112615
Project: 112615
Buggy source:
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamName,castToColumnNameTypeValue(streamDefinition.getAttributeList()));
  }
}

Fixed version (ground truth):
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamDefinition.getStreamId(),castToColumnNameTypeValue(streamDefinition.getAttributeList()));
  }
}
Program: 112616
Project: 112616
Buggy source:
public synchronized void load() throws Exception {
  FailoverPersistenceStoreModel failoverPersistenceStoreModel=streamingFailoverDao.load();
  if (failoverPersistenceStoreModel != null) {
    streamStatusDao.putAll(failoverPersistenceStoreModel.getStreamStatuses());
    Map<String,StreamStatusDTO> streamsStatus=failoverPersistenceStoreModel.getStreamStatuses();
    for (    Map.Entry<String,StreamStatusDTO> entry : streamsStatus.entrySet()) {
      StreamStatusDTO stream=entry.getValue();
      streamOperationService.createStream(stream.getStreamName(),stream.getStreamDefinition());
      for (      Map.Entry<String,QueryDTO> query : stream.getAddedQueries().entrySet()) {
        streamOperationService.addQuery(entry.getKey(),query.getValue().getQueryRaw());
      }
      for (      StreamAction action : stream.getActionsEnabled()) {
        streamOperationService.enableAction(entry.getKey(),action);
      }
    }
  }
}

Fixed version (ground truth):
public synchronized void load() throws Exception {
  FailoverPersistenceStoreModel failoverPersistenceStoreModel=streamingFailoverDao.load();
  if (failoverPersistenceStoreModel != null) {
    streamStatusDao.putAll(failoverPersistenceStoreModel.getStreamStatuses());
    Map<String,StreamStatusDTO> streamsStatus=failoverPersistenceStoreModel.getStreamStatuses();
    for (    Map.Entry<String,StreamStatusDTO> entry : streamsStatus.entrySet()) {
      StreamStatusDTO stream=entry.getValue();
      streamOperationService.createStream(stream.getStreamName(),stream.getStreamDefinition());
      for (      Map.Entry<String,QueryDTO> query : stream.getAddedQueries().entrySet()) {
        streamOperationService.addQuery(entry.getKey(),query.getValue().getQueryRaw());
      }
      for (      StreamAction action : stream.getActionsEnabled()) {
        streamOperationService.enableAction(entry.getKey(),action);
      }
    }
    streamMetadataService.setSnapshot(failoverPersistenceStoreModel.getSiddhiSnapshot());
  }
}
Program: 112617
Project: 112617
Buggy source:
public synchronized void save() throws Exception {
  streamingFailoverDao.save(new FailoverPersistenceStoreModel(streamStatusDao.getAll(),null));
}

Fixed version (ground truth):
public synchronized void save() throws Exception {
  streamingFailoverDao.save(new FailoverPersistenceStoreModel(streamStatusDao.getAll(),streamMetadataService.getSnapshot()));
}
Program: 112618
Project: 112618
Buggy source:
public StreamingFailoverService(StreamStatusDao streamStatusDao,StreamMetadataService streamMetadataService,StreamingFailoverDao streamingFailoverDao,StreamOperationService streamOperationService){
  this.streamStatusDao=streamStatusDao;
  this.streamMetadataService=streamMetadataService;
  this.streamingFailoverDao=streamingFailoverDao;
  this.streamOperationService=streamOperationService;
}

Fixed version (ground truth):
public StreamingFailoverService(StreamStatusDao streamStatusDao,StreamMetadataService streamMetadataService,StreamingFailoverDao streamingFailoverDao){
  this.streamStatusDao=streamStatusDao;
  this.streamMetadataService=streamMetadataService;
  this.streamingFailoverDao=streamingFailoverDao;
}
Program: 112619
Project: 112619
Buggy source:
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
  Map<String,Collection<SolrInputDocument>> elemntsToInsert=new HashMap<String,Collection<SolrInputDocument>>();
  for (  StratioStreamingMessage stratioStreamingMessage : messages) {
    SolrInputDocument document=new SolrInputDocument();
    document.addField("String_Node_Str",stratioStreamingMessage.getTimestamp());
    for (    ColumnNameTypeValue column : stratioStreamingMessage.getColumns()) {
      document.addField(column.getColumn(),column.getValue());
    }
    checkCore(stratioStreamingMessage);
    Collection<SolrInputDocument> collection=elemntsToInsert.get(stratioStreamingMessage.getStreamName());
    collection.add(document);
    elemntsToInsert.put(stratioStreamingMessage.getStreamName(),collection);
    getClient(stratioStreamingMessage).add(document);
  }
  for (  Map.Entry<String,Collection<SolrInputDocument>> elem : elemntsToInsert.entrySet()) {
    getSolrclient(elem.getKey()).add(elem.getValue());
  }
  flushClients();
}

Fixed version (ground truth):
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
  Map<String,Collection<SolrInputDocument>> elemntsToInsert=new HashMap<String,Collection<SolrInputDocument>>();
  for (  StratioStreamingMessage stratioStreamingMessage : messages) {
    SolrInputDocument document=new SolrInputDocument();
    document.addField("String_Node_Str",stratioStreamingMessage.getTimestamp());
    for (    ColumnNameTypeValue column : stratioStreamingMessage.getColumns()) {
      document.addField(column.getColumn(),column.getValue());
    }
    checkCore(stratioStreamingMessage);
    Collection<SolrInputDocument> collection=elemntsToInsert.get(stratioStreamingMessage.getStreamName());
    collection.add(document);
    elemntsToInsert.put(stratioStreamingMessage.getStreamName(),collection);
  }
  for (  Map.Entry<String,Collection<SolrInputDocument>> elem : elemntsToInsert.entrySet()) {
    getSolrclient(elem.getKey()).add(elem.getValue());
  }
  flushClients();
}
Program: 112620
Project: 112620
Buggy source:
public void createInternalStream(String streamName,List<ColumnNameTypeValue> columns){
  StreamDefinition newStream=QueryFactory.createStreamDefinition().name(streamName);
  for (  ColumnNameTypeValue column : columns) {
    newStream.attribute(column.getColumn(),getSiddhiType(column.getType()));
  }
  siddhiManager.defineStream(newStream);
  streamStatusDao.createInferredStream(streamName);
}

Fixed version (ground truth):
public void createInternalStream(String streamName,List<ColumnNameTypeValue> columns){
  StreamDefinition newStream=QueryFactory.createStreamDefinition().name(streamName);
  for (  ColumnNameTypeValue column : columns) {
    newStream.attribute(column.getColumn(),getSiddhiType(column.getType()));
  }
  siddhiManager.defineStream(newStream);
  streamStatusDao.createInferredStream(streamName,columns);
}
Program: 112621
Project: 112621
Buggy source:
public void createStream(String streamName,List<ColumnNameTypeValue> columns){
  StreamDefinition newStream=QueryFactory.createStreamDefinition().name(streamName);
  for (  ColumnNameTypeValue column : columns) {
    newStream.attribute(column.getColumn(),getSiddhiType(column.getType()));
  }
  siddhiManager.defineStream(newStream);
  streamStatusDao.create(streamName);
}

Fixed version (ground truth):
public void createStream(String streamName,List<ColumnNameTypeValue> columns){
  StreamDefinition newStream=QueryFactory.createStreamDefinition().name(streamName);
  for (  ColumnNameTypeValue column : columns) {
    newStream.attribute(column.getColumn(),getSiddhiType(column.getType()));
  }
  siddhiManager.defineStream(newStream);
  streamStatusDao.create(streamName,columns);
}
Program: 112622
Project: 112622
Buggy source:
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamDefinition.getStreamId());
  }
}

Fixed version (ground truth):
public void addQuery(String streamName,String queryString){
  String queryId=siddhiManager.addQuery(queryString);
  streamStatusDao.addQuery(streamName,queryId,queryString);
  for (  StreamDefinition streamDefinition : siddhiManager.getStreamDefinitions()) {
    streamStatusDao.createInferredStream(streamName,castToColumnNameTypeValue(streamDefinition.getAttributeList()));
  }
}
Program: 112623
Project: 112623
Buggy source:
public synchronized void load(){
  CassandraPersistenceStoreModel cassandraPersistenceStoreModel=streamingFailoverDao.load();
  if (cassandraPersistenceStoreModel != null) {
    streamStatusDao.putAll(cassandraPersistenceStoreModel.getStreamStatuses());
    streamMetadataService.setSnapshot(cassandraPersistenceStoreModel.getSiddhiSnapshot());
  }
}

Fixed version (ground truth):
public synchronized void load(){
  CassandraPersistenceStoreModel cassandraPersistenceStoreModel=streamingFailoverDao.load();
  if (cassandraPersistenceStoreModel != null) {
    Map<String,StreamStatusDTO> streamsStatus=cassandraPersistenceStoreModel.getStreamStatuses();
    streamStatusDao.putAll(cassandraPersistenceStoreModel.getStreamStatuses());
    for (    Map.Entry<String,StreamStatusDTO> entry : streamsStatus.entrySet()) {
      StreamStatusDTO streamStatusDTO=entry.getValue();
      streamOperationService.createStream(streamStatusDTO.getStreamName(),streamStatusDTO.getStreamDefinition());
    }
    streamMetadataService.setSnapshot(cassandraPersistenceStoreModel.getSiddhiSnapshot());
  }
}
Program: 112624
Project: 112624
Buggy source:
public StreamingFailoverService(StreamStatusDao streamStatusDao,StreamMetadataService streamMetadataService,StreamingFailoverDao streamingFailoverDao){
  this.streamStatusDao=streamStatusDao;
  this.streamMetadataService=streamMetadataService;
  this.streamingFailoverDao=streamingFailoverDao;
}

Fixed version (ground truth):
public StreamingFailoverService(StreamStatusDao streamStatusDao,StreamMetadataService streamMetadataService,StreamingFailoverDao streamingFailoverDao,StreamOperationService streamOperationService){
  this.streamStatusDao=streamStatusDao;
  this.streamMetadataService=streamMetadataService;
  this.streamingFailoverDao=streamingFailoverDao;
  this.streamOperationService=streamOperationService;
}
Program: 112625
Project: 112625
Buggy source:
public String getStreamDefinition(){
  return streamDefinition;
}

Fixed version (ground truth):
public List<ColumnNameTypeValue> getStreamDefinition(){
  return streamDefinition;
}
Program: 112626
Project: 112626
Buggy source:
public void setStreamDefinition(String streamDefinition){
  this.streamDefinition=streamDefinition;
}

Fixed version (ground truth):
public void setStreamDefinition(List<ColumnNameTypeValue> streamDefinition){
  this.streamDefinition=streamDefinition;
}
Program: 112627
Project: 112627
Buggy source:
public StreamStatusDTO(String streamName,Boolean userDefined){
  this.streamName=streamName;
  this.userDefined=userDefined;
  this.actionsEnabled=new HashSet<>();
  this.addedQueries=new HashMap<>();
}

Fixed version (ground truth):
public StreamStatusDTO(String streamName,Boolean userDefined,List<ColumnNameTypeValue> columns){
  this.streamName=streamName;
  this.userDefined=userDefined;
  this.actionsEnabled=new HashSet<>();
  this.addedQueries=new HashMap<>();
  this.streamDefinition=columns;
}
Program: 112628
Project: 112628
Buggy source:
@Test public void addQueryTest(){
  createBaseStream();
  streamOperationService.addQuery(STREAM_NAME_GOOD,"String_Node_Str" + STREAM_NAME_GOOD + "String_Node_Str"+ INFERRED_STREAM_GOOD+ "String_Node_Str");
  Mockito.verify(streamStatusDao,VerificationModeFactory.times(2)).createInferredStream(Mockito.anyString());
  Assert.assertEquals(2,sm.getStreamDefinitions().size());
}

Fixed version (ground truth):
@Test public void addQueryTest(){
  createBaseStream();
  streamOperationService.addQuery(STREAM_NAME_GOOD,"String_Node_Str" + STREAM_NAME_GOOD + "String_Node_Str"+ INFERRED_STREAM_GOOD+ "String_Node_Str");
  Mockito.verify(streamStatusDao,VerificationModeFactory.times(2)).createInferredStream(Mockito.anyString(),null);
  Assert.assertEquals(2,sm.getStreamDefinitions().size());
}