Program: 167585
Project: 167585
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.home_fragment);
  analytics=GoogleAnalytics.getInstance(this);
  analytics.setLocalDispatchPeriod(1800);
  tracker=analytics.newTracker("String_Node_Str");
  tracker.enableExceptionReporting(true);
  tracker.enableAdvertisingIdCollection(true);
  tracker.enableAutoActivityTracking(true);
  key="String_Node_Str";
  iap inAppPayments=new iap();
  bp=inAppPayments.getBilling(this,key);
  bp.loadOwnedPurchasesFromGoogle();
  Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  AccountHeader headerResult=new AccountHeaderBuilder().withActivity(this).withHeaderBackground(R.drawable.cover).build();
  result=new DrawerBuilder().withActivity(this).withToolbar(toolbar).withTranslucentStatusBar(true).withActionBarDrawerToggle(true).withAccountHeader(headerResult).withSelectedItem(0).addDrawerItems(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_swap_horiz_24px),new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_settings_24px)).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener(){
    @Override public boolean onItemClick(    AdapterView<?> parent,    View view,    int position,    long id,    IDrawerItem drawerItem){
      if (drawerItem instanceof Nameable) {
switch (((Nameable)drawerItem).getName()) {
case "String_Node_Str":
{
            Intent intent=new Intent(MainActivity.this,SettingsActivity.class);
            startActivity(intent);
            break;
          }
case "String_Node_Str":
{
          try {
            Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str" + "String_Node_Str"));
            startActivity(intent);
          }
 catch (          Exception e) {
            Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
          break;
        }
case "String_Node_Str":
{
        removeAds();
        break;
      }
case "String_Node_Str":
{
      Intent intent=new Intent(MainActivity.this,Gitty.class);
      startActivity(intent);
      break;
    }
case "String_Node_Str":
{
    String url="String_Node_Str";
    Intent i=new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse(url));
    startActivity(i);
    break;
  }
}
}
return false;
}
}
).build();
if (!bp.isPurchased("String_Node_Str")) {
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_dnd_on_24px));
}
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_edit_black_18dp));
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_mail_24px));
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_shop_24px));
adapter=new ServerListAdapter();
fab=(FloatingActionButton)findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
newAddServerActivity(v);
}
}
);
list=(ExpandableHeightListView)findViewById(R.id.list);
list.setAdapter(adapter);
list.setOnItemClickListener(this);
list.setOnItemLongClickListener(this);
list.setExpanded(true);
fab.attachToListView(list);
LinearLayout reportBugLayout=(LinearLayout)findViewById(R.id.reportLayout);
reportBugLayout.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View v){
Intent intent=new Intent(MainActivity.this,Gitty.class);
startActivity(intent);
}
}
);
if (instanceCount > 0) {
finish();
}
prefs=getSharedPreferences("String_Node_Str",MODE_PRIVATE);
if (prefs.getBoolean("String_Node_Str",true)) {
startIntro();
prefs.edit().putBoolean("String_Node_Str",false).commit();
}
if (adapter.isServerNull()) {
reportBugLayout.setVisibility(View.GONE);
}
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.home_fragment);
  analytics=GoogleAnalytics.getInstance(this);
  analytics.setLocalDispatchPeriod(1800);
  tracker=analytics.newTracker("String_Node_Str");
  tracker.enableExceptionReporting(true);
  tracker.enableAdvertisingIdCollection(true);
  tracker.enableAutoActivityTracking(true);
  key="String_Node_Str";
  iap inAppPayments=new iap();
  bp=inAppPayments.getBilling(this,key);
  bp.loadOwnedPurchasesFromGoogle();
  Toolbar toolbar=(Toolbar)findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);
  AccountHeader headerResult=new AccountHeaderBuilder().withActivity(this).withHeaderBackground(R.drawable.cover).build();
  result=new DrawerBuilder().withActivity(this).withToolbar(toolbar).withTranslucentStatusBar(true).withActionBarDrawerToggle(true).withAccountHeader(headerResult).withSelectedItem(0).addDrawerItems(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_swap_horiz_24px),new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_settings_24px)).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener(){
    @Override public boolean onItemClick(    AdapterView<?> parent,    View view,    int position,    long id,    IDrawerItem drawerItem){
      if (drawerItem instanceof Nameable) {
switch (((Nameable)drawerItem).getName()) {
case "String_Node_Str":
{
            Intent intent=new Intent(MainActivity.this,SettingsActivity.class);
            startActivity(intent);
            break;
          }
case "String_Node_Str":
{
          try {
            Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str" + "String_Node_Str"));
            startActivity(intent);
          }
 catch (          Exception e) {
            Toast.makeText(MainActivity.this,"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
          break;
        }
case "String_Node_Str":
{
        removeAds();
        break;
      }
case "String_Node_Str":
{
      Intent intent=new Intent(MainActivity.this,Gitty.class);
      startActivity(intent);
      break;
    }
case "String_Node_Str":
{
    String url="String_Node_Str";
    Intent i=new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse(url));
    startActivity(i);
    break;
  }
}
}
return false;
}
}
).build();
if (!inAppPayments.isPurchased()) {
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_dnd_on_24px));
}
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_edit_black_18dp));
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_mail_24px));
result.addItem(new PrimaryDrawerItem().withName("String_Node_Str").withIcon(R.drawable.ic_ic_shop_24px));
adapter=new ServerListAdapter();
fab=(FloatingActionButton)findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
newAddServerActivity(v);
}
}
);
list=(ExpandableHeightListView)findViewById(R.id.list);
list.setAdapter(adapter);
list.setOnItemClickListener(this);
list.setOnItemLongClickListener(this);
list.setExpanded(true);
fab.attachToListView(list);
LinearLayout reportBugLayout=(LinearLayout)findViewById(R.id.reportLayout);
reportBugLayout.setOnClickListener(new View.OnClickListener(){
@Override public void onClick(View v){
Intent intent=new Intent(MainActivity.this,Gitty.class);
startActivity(intent);
}
}
);
if (instanceCount > 0) {
finish();
}
prefs=getSharedPreferences("String_Node_Str",MODE_PRIVATE);
if (prefs.getBoolean("String_Node_Str",true)) {
startIntro();
prefs.edit().putBoolean("String_Node_Str",false).commit();
}
if (adapter.isServerNull()) {
reportBugLayout.setVisibility(View.GONE);
}
}