Program: 47646
Project: 47646
Buggy source:
@TargetApi(11) @Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  if (mFlattrEnabled) {
    ViewStub flattrViewStub=getActivity().findViewById(R.id.donations__flattr_stub);
    flattrViewStub.inflate();
    buildFlattrView();
  }
  if (mGoogleEnabled) {
    ViewStub googleViewStub=getActivity().findViewById(R.id.donations__google_stub);
    googleViewStub.inflate();
    mGoogleSpinner=getActivity().findViewById(R.id.donations__google_android_market_spinner);
    ArrayAdapter<CharSequence> adapter;
    if (mDebug) {
      adapter=new ArrayAdapter<CharSequence>(getActivity(),android.R.layout.simple_spinner_item,CATALOG_DEBUG);
    }
 else {
      adapter=new ArrayAdapter<CharSequence>(getActivity(),android.R.layout.simple_spinner_item,mGoogleCatalogValues);
    }
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    mGoogleSpinner.setAdapter(adapter);
    Button btGoogle=getActivity().findViewById(R.id.donations__google_android_market_donate_button);
    btGoogle.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        donateGoogleOnClick(v);
      }
    }
);
    if (mDebug)     Log.d(TAG,"String_Node_Str");
    mHelper=new IabHelper(getActivity(),mGooglePubkey);
    mHelper.enableDebugLogging(mDebug);
    if (mDebug)     Log.d(TAG,"String_Node_Str");
    mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener(){
      public void onIabSetupFinished(      IabResult result){
        if (mDebug)         Log.d(TAG,"String_Node_Str");
        if (!result.isSuccess()) {
          openDialog(android.R.drawable.ic_dialog_alert,R.string.donations__google_android_market_not_supported_title,getString(R.string.donations__google_android_market_not_supported));
          return;
        }
        if (mHelper == null)         return;
      }
    }
);
  }
  if (mPaypalEnabled) {
    ViewStub paypalViewStub=getActivity().findViewById(R.id.donations__paypal_stub);
    paypalViewStub.inflate();
    Button btPayPal=getActivity().findViewById(R.id.donations__paypal_donate_button);
    btPayPal.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        donatePayPalOnClick(v);
      }
    }
);
  }
  if (mBitcoinEnabled) {
    ViewStub bitcoinViewStub=(ViewStub)getActivity().findViewById(R.id.donations__bitcoin_stub);
    bitcoinViewStub.inflate();
    Button btBitcoin=getActivity().findViewById(R.id.donations__bitcoin_button);
    btBitcoin.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        donateBitcoinOnClick(v);
      }
    }
);
    btBitcoin.setOnLongClickListener(new View.OnLongClickListener(){
      @Override public boolean onLongClick(      View v){
        ClipboardManager clipboard=(ClipboardManager)getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clip=ClipData.newPlainText(mBitcoinAddress,mBitcoinAddress);
        clipboard.setPrimaryClip(clip);
        Toast.makeText(getActivity(),R.string.donations__bitcoin_toast_copy,Toast.LENGTH_SHORT).show();
        return true;
      }
    }
);
  }
}

Fixed version (ground truth):
@TargetApi(11) @Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  if (mFlattrEnabled) {
    ViewStub flattrViewStub=getActivity().findViewById(R.id.donations__flattr_stub);
    flattrViewStub.inflate();
    buildFlattrView();
  }
  if (mGoogleEnabled) {
    ViewStub googleViewStub=getActivity().findViewById(R.id.donations__google_stub);
    googleViewStub.inflate();
    mGoogleSpinner=getActivity().findViewById(R.id.donations__google_android_market_spinner);
    ArrayAdapter<CharSequence> adapter;
    if (mDebug) {
      adapter=new ArrayAdapter<CharSequence>(getActivity(),android.R.layout.simple_spinner_item,CATALOG_DEBUG);
    }
 else {
      adapter=new ArrayAdapter<CharSequence>(getActivity(),android.R.layout.simple_spinner_item,mGoogleCatalogValues);
    }
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    mGoogleSpinner.setAdapter(adapter);
    Button btGoogle=getActivity().findViewById(R.id.donations__google_android_market_donate_button);
    btGoogle.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        try {
          donateGoogleOnClick(v);
        }
 catch (        IllegalStateException e) {
          if (mDebug)           Log.e(TAG,e.getMessage());
          openDialog(android.R.drawable.ic_dialog_alert,R.string.donations__google_android_market_not_supported_title,getString(R.string.donations__google_android_market_not_supported));
        }
      }
    }
);
    if (mDebug)     Log.d(TAG,"String_Node_Str");
    mHelper=new IabHelper(getActivity(),mGooglePubkey);
    mHelper.enableDebugLogging(mDebug);
    if (mDebug)     Log.d(TAG,"String_Node_Str");
    mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener(){
      public void onIabSetupFinished(      IabResult result){
        if (mDebug)         Log.d(TAG,"String_Node_Str");
        if (!result.isSuccess()) {
          openDialog(android.R.drawable.ic_dialog_alert,R.string.donations__google_android_market_not_supported_title,getString(R.string.donations__google_android_market_not_supported));
          return;
        }
        if (mHelper == null)         return;
      }
    }
);
  }
  if (mPaypalEnabled) {
    ViewStub paypalViewStub=getActivity().findViewById(R.id.donations__paypal_stub);
    paypalViewStub.inflate();
    Button btPayPal=getActivity().findViewById(R.id.donations__paypal_donate_button);
    btPayPal.setOnClickListener(new OnClickListener(){
      @Override public void onClick(      View v){
        donatePayPalOnClick(v);
      }
    }
);
  }
  if (mBitcoinEnabled) {
    ViewStub bitcoinViewStub=(ViewStub)getActivity().findViewById(R.id.donations__bitcoin_stub);
    bitcoinViewStub.inflate();
    Button btBitcoin=getActivity().findViewById(R.id.donations__bitcoin_button);
    btBitcoin.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        donateBitcoinOnClick(v);
      }
    }
);
    btBitcoin.setOnLongClickListener(new View.OnLongClickListener(){
      @Override public boolean onLongClick(      View v){
        ClipboardManager clipboard=(ClipboardManager)getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clip=ClipData.newPlainText(mBitcoinAddress,mBitcoinAddress);
        clipboard.setPrimaryClip(clip);
        Toast.makeText(getActivity(),R.string.donations__bitcoin_toast_copy,Toast.LENGTH_SHORT).show();
        return true;
      }
    }
);
  }
}