Program: 57666
Project: 57666
Buggy source:
/** 
 * called first, next: onStart()
 * @param savedInstanceState saved instance state
 */
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  mAdapter=NfcAdapter.getDefaultAdapter(this);
  mIntentFilter.addAction(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION);
  mPendingIntent=PendingIntent.getActivity(this,0,new Intent(this,getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP),0);
  IntentFilter tech=new IntentFilter();
  tech.addAction(NfcAdapter.ACTION_TECH_DISCOVERED);
  mFilters=new IntentFilter[]{tech};
  mTechLists=new String[][]{new String[]{NfcA.class.getName()},new String[]{Ndef.class.getName()},new String[]{IsoDep.class.getName()}};
  mManager=(WifiP2pManager)getSystemService(Context.WIFI_P2P_SERVICE);
  mChannel=mManager.initialize(this,getMainLooper(),null);
  mReset=(Button)findViewById(R.id.resetstatus);
  mConnect=(Button)findViewById(R.id.connectbutton);
  mAbort=(Button)findViewById(R.id.abortbutton);
  mOwnID=(TextView)findViewById(R.id.editTextOwnID);
  mInfo=(TextView)findViewById(R.id.DisplayMsg);
  mDebuginfo=(TextView)findViewById(R.id.editTextDevModeEnabledDebugging);
  mIP=(TextView)findViewById(R.id.editIP);
  mPort=(TextView)findViewById(R.id.editPort);
  mConnect.requestFocus();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  mAdapter=NfcAdapter.getDefaultAdapter(this);
  mIntentFilter.addAction(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
  mIntentFilter.addAction(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION);
  mPendingIntent=PendingIntent.getActivity(this,0,new Intent(this,getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP),0);
  IntentFilter tech=new IntentFilter();
  tech.addAction(NfcAdapter.ACTION_TECH_DISCOVERED);
  mFilters=new IntentFilter[]{tech};
  mTechLists=new String[][]{new String[]{NfcA.class.getName()},new String[]{Ndef.class.getName()},new String[]{IsoDep.class.getName()}};
  mManager=(WifiP2pManager)getSystemService(Context.WIFI_P2P_SERVICE);
  mChannel=mManager.initialize(this,getMainLooper(),null);
  mReset=(Button)findViewById(R.id.resetstatus);
  mConnect=(Button)findViewById(R.id.connectbutton);
  mAbort=(Button)findViewById(R.id.abortbutton);
  mOwnID=(TextView)findViewById(R.id.editTextOwnID);
  mInfo=(TextView)findViewById(R.id.DisplayMsg);
  mDebuginfo=(TextView)findViewById(R.id.editTextDevModeEnabledDebugging);
  mIP=(TextView)findViewById(R.id.editIP);
  mPort=(TextView)findViewById(R.id.editPort);
  mConnect.requestFocus();
}