Program: 162623
Project: 162623
Buggy source:
/** 
 * Called when the activity is first created.
 */
@Override public void onCreate(Bundle savedInstanceState){
  try {
    super.onCreate(savedInstanceState);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  getActionBar().hide();
  Sp=PreferenceManager.getDefaultSharedPreferences(this);
  utils=new Futils();
  s=new Shortcuts(this);
  path=getIntent().getStringExtra("String_Node_Str");
  restart=getIntent().getBooleanExtra("String_Node_Str",false);
  val=getStorageDirectories();
  rootmode=Sp.getBoolean("String_Node_Str",false);
  theme=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  util=new IconUtils(Sp,this);
  Calendar calendar=Calendar.getInstance();
  int hour=calendar.get(Calendar.HOUR_OF_DAY);
  int th=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  theme1=th;
  if (th == 2) {
    Sp.edit().putString("String_Node_Str","String_Node_Str").commit();
    if (hour <= 6 || hour >= 18) {
      theme1=1;
    }
 else     theme1=0;
  }
  if (theme1 == 1) {
    setTheme(R.style.DarkTheme);
  }
  setContentView(R.layout.main);
  aBoolean=Sp.getBoolean("String_Node_Str",true);
  ImageView overflow=((ImageView)findViewById(R.id.action_overflow));
  showPopup(overflow);
  title=(TextView)findViewById(R.id.title);
  frameLayout=(FrameLayout)findViewById(R.id.content_frame);
  paste=(ImageButton)findViewById(R.id.paste);
  paste.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Main ma=((TabFragment)getSupportFragmentManager().findFragmentById(R.id.content_frame)).getTab();
      String path=ma.current;
      ArrayList<String> arrayList=new ArrayList<String>();
      if (COPY_PATH != null) {
        arrayList=COPY_PATH;
        new CheckForFiles(ma,path,false).execute(arrayList);
      }
 else       if (MOVE_PATH != null) {
        arrayList=MOVE_PATH;
        new CheckForFiles(ma,path,true).execute(arrayList);
      }
      COPY_PATH=null;
      MOVE_PATH=null;
      invalidatePasteButton();
    }
  }
);
  intent=getIntent();
  if (intent.getAction().equals(Intent.ACTION_GET_CONTENT) || intent.getAction().equals(RingtoneManager.ACTION_RINGTONE_PICKER)) {
    mReturnIntent=true;
    if (intent.getAction().equals(RingtoneManager.ACTION_RINGTONE_PICKER)) {
      mRingtonePickerIntent=true;
    }
    Toast.makeText(this,utils.getString(con,R.string.pick_a_file),Toast.LENGTH_LONG).show();
  }
  skin=PreferenceManager.getDefaultSharedPreferences(this).getString("String_Node_Str","String_Node_Str");
  RelativeLayout linearLayout=(RelativeLayout)findViewById(R.id.action_bar);
  linearLayout.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout1=(LinearLayout)findViewById(R.id.pathbar);
  linearLayout1.setBackgroundColor(Color.parseColor(skin));
  title.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
    }
  }
);
  HorizontalScrollView horizontalScrollView=(HorizontalScrollView)findViewById(R.id.scroll1);
  horizontalScrollView.setBackgroundColor(Color.parseColor(skin));
  HorizontalScrollView horizontalScrollView1=(HorizontalScrollView)findViewById(R.id.scroll);
  horizontalScrollView1.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout2=(LinearLayout)findViewById(R.id.drawerheader);
  linearLayout2.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout3=(LinearLayout)findViewById(R.id.settings_bg);
  linearLayout3.setBackgroundColor(Color.parseColor(skin));
  FloatingActionButton floatingActionButton=(FloatingActionButton)findViewById(R.id.fab);
  floatingActionButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      MaterialDialog.Builder builder=new MaterialDialog.Builder(con);
      builder.items(new String[]{getResources().getString(R.string.folder),getResources().getString(R.string.file),getResources().getString(R.string.tab)});
      builder.itemsCallback(new MaterialDialog.ListCallback(){
        @Override public void onSelection(        MaterialDialog materialDialog,        View view,        int i,        CharSequence s){
          add(i);
        }
      }
);
      builder.title(getResources().getString(R.string.new_string));
      if (theme1 == 1)       builder.theme(Theme.DARK);
      builder.build().show();
    }
  }
);
  if (Sp.getBoolean("String_Node_Str",true)) {
    try {
      s.makeS();
    }
 catch (    Exception e) {
    }
    File file=new File(val.get(0));
    Sp.edit().putString("String_Node_Str",file.getPath()).apply();
    Sp.edit().putBoolean("String_Node_Str",false).commit();
  }
  mDrawerLinear=(RelativeLayout)findViewById(R.id.left_drawer);
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mDrawerList=(ListView)findViewById(R.id.menu_drawer);
  (findViewById(R.id.search)).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      search();
    }
  }
);
  list=new ArrayList<String>();
  for (int i=0; i < val.size(); i++) {
    File file=new File(val.get(i));
    if (!file.isDirectory())     list.add(val.get(i));
 else     if (file.canExecute())     list.add(val.get(i));
  }
  list.add(utils.getString(this,R.string.apps));
  list.add(utils.getString(this,R.string.bookmanag));
  adapter=new DrawerAdapter(this,list,MainActivity.this,Sp);
  mDrawerList.setAdapter(adapter);
  if (savedInstanceState == null) {
    if (!restart)     selectItem(0);
 else     goToMain();
  }
 else {
    select=savedInstanceState.getInt("String_Node_Str",0);
    adapter.toggleChecked(select);
  }
  if (Build.VERSION.SDK_INT >= 19) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintColor(Color.parseColor(skin));
    SystemBarTintManager.SystemBarConfig config=tintManager.getConfig();
    DrawerLayout.MarginLayoutParams p=(ViewGroup.MarginLayoutParams)mDrawerLayout.getLayoutParams();
    p.setMargins(0,config.getPixelInsetTop(false),0,0);
  }
  final Activity activity=this;
  ((ImageButton)findViewById(R.id.settingsbutton)).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Intent in=new Intent(MainActivity.this,Preferences.class);
      final int enter_anim=android.R.anim.fade_in;
      final int exit_anim=android.R.anim.fade_out;
      activity.overridePendingTransition(enter_anim,exit_anim);
      activity.finish();
      activity.overridePendingTransition(enter_anim,exit_anim);
      activity.startActivity(in);
    }
  }
);
  if (theme1 == 1) {
    mDrawerList.setBackgroundResource(android.R.drawable.screen_background_dark);
  }
  mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
  mDrawerList.setDivider(null);
  progress=(ProgressWheel)findViewById(R.id.progressBar);
  progress.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      if (select != 102) {
        android.support.v4.app.FragmentTransaction transaction=getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.content_frame,new ProcessViewer());
        select=102;
        title.setText(utils.getString(con,R.string.process_viewer));
        transaction.commit();
      }
 else {
        selectItem(0);
      }
    }
  }
);
  if (select != null && select < list.size() - 2) {
    title.setText(R.string.app_name);
  }
  mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,util.getDrawerDrawable(),R.string.drawer_open,R.string.drawer_close){
    public void onDrawerClosed(    View view){
      if (select == 102)       title.setText(R.string.process_viewer);
    }
    public void onDrawerOpened(    View drawerView){
    }
  }
;
  mDrawerLayout.setDrawerListener(mDrawerToggle);
  ((ImageButton)findViewById(R.id.drawer_buttton)).setOnClickListener(new ImageView.OnClickListener(){
    @Override public void onClick(    View view){
      if (mDrawerLayout.isDrawerOpen(mDrawerLinear)) {
        mDrawerLayout.closeDrawer(mDrawerLinear);
      }
 else       mDrawerLayout.openDrawer(mDrawerLinear);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created.
 */
@Override public void onCreate(Bundle savedInstanceState){
  try {
    super.onCreate(savedInstanceState);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  getActionBar().hide();
  Sp=PreferenceManager.getDefaultSharedPreferences(this);
  utils=new Futils();
  s=new Shortcuts(this);
  path=getIntent().getStringExtra("String_Node_Str");
  restart=getIntent().getBooleanExtra("String_Node_Str",false);
  val=getStorageDirectories();
  rootmode=Sp.getBoolean("String_Node_Str",false);
  theme=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  util=new IconUtils(Sp,this);
  Calendar calendar=Calendar.getInstance();
  int hour=calendar.get(Calendar.HOUR_OF_DAY);
  int th=Integer.parseInt(Sp.getString("String_Node_Str","String_Node_Str"));
  theme1=th;
  if (th == 2) {
    Sp.edit().putString("String_Node_Str","String_Node_Str").commit();
    if (hour <= 6 || hour >= 18) {
      theme1=1;
    }
 else     theme1=0;
  }
  if (theme1 == 1) {
    setTheme(R.style.DarkTheme);
  }
  setContentView(R.layout.main);
  aBoolean=Sp.getBoolean("String_Node_Str",true);
  ImageView overflow=((ImageView)findViewById(R.id.action_overflow));
  showPopup(overflow);
  title=(TextView)findViewById(R.id.title);
  frameLayout=(FrameLayout)findViewById(R.id.content_frame);
  paste=(ImageButton)findViewById(R.id.paste);
  paste.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Main ma=((TabFragment)getSupportFragmentManager().findFragmentById(R.id.content_frame)).getTab();
      String path=ma.current;
      ArrayList<String> arrayList=new ArrayList<String>();
      if (COPY_PATH != null) {
        arrayList=COPY_PATH;
        new CheckForFiles(ma,path,false).execute(arrayList);
      }
 else       if (MOVE_PATH != null) {
        arrayList=MOVE_PATH;
        new CheckForFiles(ma,path,true).execute(arrayList);
      }
      COPY_PATH=null;
      MOVE_PATH=null;
      invalidatePasteButton();
    }
  }
);
  intent=getIntent();
  if (intent.getAction().equals(Intent.ACTION_GET_CONTENT) || intent.getAction().equals(RingtoneManager.ACTION_RINGTONE_PICKER)) {
    mReturnIntent=true;
    if (intent.getAction().equals(RingtoneManager.ACTION_RINGTONE_PICKER)) {
      mRingtonePickerIntent=true;
    }
    Toast.makeText(this,utils.getString(con,R.string.pick_a_file),Toast.LENGTH_LONG).show();
  }
  skin=PreferenceManager.getDefaultSharedPreferences(this).getString("String_Node_Str","String_Node_Str");
  RelativeLayout linearLayout=(RelativeLayout)findViewById(R.id.action_bar);
  linearLayout.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout1=(LinearLayout)findViewById(R.id.pathbar);
  linearLayout1.setBackgroundColor(Color.parseColor(skin));
  title.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
    }
  }
);
  HorizontalScrollView horizontalScrollView=(HorizontalScrollView)findViewById(R.id.scroll1);
  horizontalScrollView.setBackgroundColor(Color.parseColor(skin));
  HorizontalScrollView horizontalScrollView1=(HorizontalScrollView)findViewById(R.id.scroll);
  horizontalScrollView1.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout2=(LinearLayout)findViewById(R.id.drawerheader);
  linearLayout2.setBackgroundColor(Color.parseColor(skin));
  LinearLayout linearLayout3=(LinearLayout)findViewById(R.id.settings_bg);
  linearLayout3.setBackgroundColor(Color.parseColor(skin));
  FloatingActionButton floatingActionButton=(FloatingActionButton)findViewById(R.id.fab);
  floatingActionButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      MaterialDialog.Builder builder=new MaterialDialog.Builder(con);
      builder.items(new String[]{getResources().getString(R.string.folder),getResources().getString(R.string.file),getResources().getString(R.string.tab)});
      builder.itemsCallback(new MaterialDialog.ListCallback(){
        @Override public void onSelection(        MaterialDialog materialDialog,        View view,        int i,        CharSequence s){
          add(i);
        }
      }
);
      builder.title(getResources().getString(R.string.new_string));
      if (theme1 == 1)       builder.theme(Theme.DARK);
      builder.build().show();
    }
  }
);
  if (Sp.getBoolean("String_Node_Str",true)) {
    try {
      s.makeS();
    }
 catch (    Exception e) {
    }
    File file=new File(val.get(0));
    Sp.edit().putString("String_Node_Str",file.getPath()).apply();
    Sp.edit().putBoolean("String_Node_Str",false).commit();
  }
  mDrawerLinear=(RelativeLayout)findViewById(R.id.left_drawer);
  mDrawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  mDrawerList=(ListView)findViewById(R.id.menu_drawer);
  (findViewById(R.id.search)).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      search();
    }
  }
);
  list=new ArrayList<String>();
  for (int i=0; i < val.size(); i++) {
    File file=new File(val.get(i));
    if (!file.isDirectory())     list.add(val.get(i));
 else     if (file.canExecute())     list.add(val.get(i));
  }
  list.add(utils.getString(this,R.string.apps));
  list.add(utils.getString(this,R.string.bookmanag));
  adapter=new DrawerAdapter(this,list,MainActivity.this,Sp);
  mDrawerList.setAdapter(adapter);
  initiatebbar();
  if (savedInstanceState == null) {
    if (!restart)     selectItem(0);
 else     goToMain();
  }
 else {
    select=savedInstanceState.getInt("String_Node_Str",0);
    adapter.toggleChecked(select);
  }
  if (Build.VERSION.SDK_INT >= 19) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setStatusBarTintColor(Color.parseColor(skin));
    SystemBarTintManager.SystemBarConfig config=tintManager.getConfig();
    DrawerLayout.MarginLayoutParams p=(ViewGroup.MarginLayoutParams)mDrawerLayout.getLayoutParams();
    p.setMargins(0,config.getPixelInsetTop(false),0,0);
  }
  final Activity activity=this;
  ((ImageButton)findViewById(R.id.settingsbutton)).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      Intent in=new Intent(MainActivity.this,Preferences.class);
      final int enter_anim=android.R.anim.fade_in;
      final int exit_anim=android.R.anim.fade_out;
      activity.overridePendingTransition(enter_anim,exit_anim);
      activity.finish();
      activity.overridePendingTransition(enter_anim,exit_anim);
      activity.startActivity(in);
    }
  }
);
  if (theme1 == 1) {
    mDrawerList.setBackgroundResource(android.R.drawable.screen_background_dark);
  }
  mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
  mDrawerList.setDivider(null);
  progress=(ProgressWheel)findViewById(R.id.progressBar);
  progress.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View view){
      if (select != 102) {
        android.support.v4.app.FragmentTransaction transaction=getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.content_frame,new ProcessViewer());
        select=102;
        title.setText(utils.getString(con,R.string.process_viewer));
        transaction.commit();
      }
 else {
        selectItem(0);
      }
    }
  }
);
  if (select != null && select < list.size() - 2) {
    title.setText(R.string.app_name);
  }
  mDrawerToggle=new ActionBarDrawerToggle(this,mDrawerLayout,util.getDrawerDrawable(),R.string.drawer_open,R.string.drawer_close){
    public void onDrawerClosed(    View view){
      if (select == 102)       title.setText(R.string.process_viewer);
    }
    public void onDrawerOpened(    View drawerView){
    }
  }
;
  mDrawerLayout.setDrawerListener(mDrawerToggle);
  ((ImageButton)findViewById(R.id.drawer_buttton)).setOnClickListener(new ImageView.OnClickListener(){
    @Override public void onClick(    View view){
      if (mDrawerLayout.isDrawerOpen(mDrawerLinear)) {
        mDrawerLayout.closeDrawer(mDrawerLinear);
      }
 else       mDrawerLayout.openDrawer(mDrawerLinear);
    }
  }
);
}