Program: 165314
Project: 165314
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  ((FDroidApp)getApplication()).applyTheme(this);
  super.onCreate(savedInstanceState);
  displayImageOptions=new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisc(true).imageScaleType(ImageScaleType.NONE).showImageOnLoading(R.drawable.ic_repo_app_default).showImageForEmptyUri(R.drawable.ic_repo_app_default).bitmapConfig(Bitmap.Config.RGB_565).build();
  ActionBarCompat abCompat=ActionBarCompat.create(this);
  abCompat.setDisplayHomeAsUpEnabled(true);
  setContentView(R.layout.appdetails);
  Intent i=getIntent();
  Uri data=i.getData();
  if (data != null) {
    if (data.isHierarchical()) {
      if (data.getHost() != null && data.getHost().equals("String_Node_Str")) {
        appid=data.getQueryParameter("String_Node_Str");
      }
 else {
        appid=data.getLastPathSegment();
        if (appid != null && appid.equals("String_Node_Str"))         appid=null;
      }
    }
 else {
      appid=data.getEncodedSchemeSpecificPart();
    }
    Log.d("String_Node_Str","String_Node_Str" + appid + "String_Node_Str");
  }
 else   if (!i.hasExtra("String_Node_Str")) {
    Log.d("String_Node_Str","String_Node_Str");
  }
 else {
    appid=i.getStringExtra("String_Node_Str");
  }
  if (i.hasExtra("String_Node_Str")) {
    setTitle(i.getStringExtra("String_Node_Str"));
  }
  mPm=getPackageManager();
  AppDetails old=(AppDetails)getLastNonConfigurationInstance();
  if (old != null) {
    copyState(old);
  }
 else {
    if (!reset()) {
      finish();
      return;
    }
    resetRequired=false;
  }
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(getBaseContext());
  pref_expert=prefs.getBoolean(Preferences.PREF_EXPERT,false);
  pref_permissions=prefs.getBoolean(Preferences.PREF_PERMISSIONS,false);
  pref_incompatibleVersions=prefs.getBoolean(Preferences.PREF_INCOMP_VER,false);
  headerView=new LinearLayout(this);
  ListView lv=(ListView)findViewById(android.R.id.list);
  lv.addHeaderView(headerView);
  adapter=new ApkListAdapter(this,app);
  setListAdapter(adapter);
  startViews();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  ((FDroidApp)getApplication()).applyTheme(this);
  super.onCreate(savedInstanceState);
  displayImageOptions=new DisplayImageOptions.Builder().cacheInMemory(true).cacheOnDisc(true).imageScaleType(ImageScaleType.NONE).showImageOnLoading(R.drawable.ic_repo_app_default).showImageForEmptyUri(R.drawable.ic_repo_app_default).bitmapConfig(Bitmap.Config.RGB_565).build();
  setContentView(R.layout.appdetails);
  ActionBarCompat.create(this).setDisplayHomeAsUpEnabled(true);
  Intent i=getIntent();
  Uri data=i.getData();
  if (data != null) {
    if (data.isHierarchical()) {
      if (data.getHost() != null && data.getHost().equals("String_Node_Str")) {
        appid=data.getQueryParameter("String_Node_Str");
      }
 else {
        appid=data.getLastPathSegment();
        if (appid != null && appid.equals("String_Node_Str"))         appid=null;
      }
    }
 else {
      appid=data.getEncodedSchemeSpecificPart();
    }
    Log.d("String_Node_Str","String_Node_Str" + appid + "String_Node_Str");
  }
 else   if (!i.hasExtra("String_Node_Str")) {
    Log.d("String_Node_Str","String_Node_Str");
  }
 else {
    appid=i.getStringExtra("String_Node_Str");
  }
  if (i.hasExtra("String_Node_Str")) {
    setTitle(i.getStringExtra("String_Node_Str"));
  }
  mPm=getPackageManager();
  AppDetails old=(AppDetails)getLastNonConfigurationInstance();
  if (old != null) {
    copyState(old);
  }
 else {
    if (!reset()) {
      finish();
      return;
    }
    resetRequired=false;
  }
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(getBaseContext());
  pref_expert=prefs.getBoolean(Preferences.PREF_EXPERT,false);
  pref_permissions=prefs.getBoolean(Preferences.PREF_PERMISSIONS,false);
  pref_incompatibleVersions=prefs.getBoolean(Preferences.PREF_INCOMP_VER,false);
  headerView=new LinearLayout(this);
  ListView lv=(ListView)findViewById(android.R.id.list);
  lv.addHeaderView(headerView);
  adapter=new ApkListAdapter(this,app);
  setListAdapter(adapter);
  startViews();
}