Program: 162506
Project: 162506
Buggy source:
void initialiseViews(){
  appBarLayout=getAppbar().getAppbarLayout();
  mScreenLayout=findViewById(R.id.main_frame);
  buttonBarFrame=findViewById(R.id.buttonbarframe);
  drawerHeaderLayout=getLayoutInflater().inflate(R.layout.drawerheader,null);
  drawerHeaderParent=(RelativeLayout)drawerHeaderLayout.findViewById(R.id.drawer_header_parent);
  drawerHeaderView=drawerHeaderLayout.findViewById(R.id.drawer_header);
  drawerHeaderView.setOnLongClickListener(v -> {
    Intent intent1;
    if (SDK_INT < Build.VERSION_CODES.KITKAT) {
      intent1=new Intent();
      intent1.setAction(Intent.ACTION_GET_CONTENT);
    }
 else {
      intent1=new Intent(Intent.ACTION_OPEN_DOCUMENT);
    }
    intent1.addCategory(Intent.CATEGORY_OPENABLE);
    intent1.setType("String_Node_Str");
    startActivityForResult(intent1,image_selector_request_code);
    return false;
  }
);
  setSupportActionBar(getAppbar().getToolbar());
  frameLayout=findViewById(R.id.content_frame);
  indicator_layout=findViewById(R.id.indicator_layout);
  mDrawerLinear=findViewById(R.id.left_drawer);
  if (getAppTheme().equals(AppTheme.DARK))   mDrawerLinear.setBackgroundColor(Utils.getColor(this,R.color.holo_dark_background));
 else   if (getAppTheme().equals(AppTheme.BLACK))   mDrawerLinear.setBackgroundColor(Utils.getColor(this,android.R.color.black));
 else   mDrawerLinear.setBackgroundColor(Color.WHITE);
  mDrawerLayout=findViewById(R.id.drawer_layout);
  mDrawerList=findViewById(R.id.menu_drawer);
  drawerHeaderView.setBackgroundResource(R.drawable.amaze_header);
  if (findViewById(R.id.tab_frame) != null) {
    mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN,mDrawerLinear);
    mDrawerLayout.openDrawer(mDrawerLinear);
    mDrawerLayout.setScrimColor(Color.TRANSPARENT);
    isDrawerLocked=true;
  }
 else   if (findViewById(R.id.tab_frame) == null) {
    mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED,mDrawerLinear);
    mDrawerLayout.closeDrawer(mDrawerLinear);
    isDrawerLocked=false;
  }
  mDrawerList.addHeaderView(drawerHeaderLayout);
  getSupportActionBar().setDisplayShowTitleEnabled(false);
  fabBgView=findViewById(R.id.fab_bg);
  if (getAppTheme().equals(AppTheme.DARK) || getAppTheme().equals(AppTheme.BLACK)) {
    fabBgView.setBackgroundResource(R.drawable.fab_shadow_dark);
  }
  fabBgView.setOnClickListener(view -> {
    if (getAppbar().getSearchView().isEnabled())     getAppbar().getSearchView().hideSearchView();
  }
);
  setDrawerHeaderBackground();
  if (SDK_INT == Build.VERSION_CODES.KITKAT_WATCH || SDK_INT == Build.VERSION_CODES.KITKAT) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    FrameLayout.MarginLayoutParams p=(ViewGroup.MarginLayoutParams)findViewById(R.id.drawer_layout).getLayoutParams();
    SystemBarTintManager.SystemBarConfig config=tintManager.getConfig();
    if (!isDrawerLocked)     p.setMargins(0,config.getStatusBarHeight(),0,0);
  }
 else   if (SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    Window window=getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    if (isDrawerLocked) {
      window.setStatusBarColor((skinStatusBar));
    }
 else     window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    if (colourednavigation)     window.setNavigationBarColor(skinStatusBar);
  }
}

Fixed version (ground truth):
void initialiseViews(){
  appBarLayout=getAppbar().getAppbarLayout();
  mScreenLayout=findViewById(R.id.main_frame);
  buttonBarFrame=findViewById(R.id.buttonbarframe);
  drawerHeaderLayout=getLayoutInflater().inflate(R.layout.drawerheader,null);
  drawerHeaderParent=(RelativeLayout)drawerHeaderLayout.findViewById(R.id.drawer_header_parent);
  drawerHeaderView=drawerHeaderLayout.findViewById(R.id.drawer_header);
  drawerHeaderView.setOnLongClickListener(v -> {
    Intent intent1;
    if (SDK_INT < Build.VERSION_CODES.KITKAT) {
      intent1=new Intent();
      intent1.setAction(Intent.ACTION_GET_CONTENT);
    }
 else {
      intent1=new Intent(Intent.ACTION_OPEN_DOCUMENT);
    }
    intent1.addCategory(Intent.CATEGORY_OPENABLE);
    intent1.setType("String_Node_Str");
    startActivityForResult(intent1,image_selector_request_code);
    return false;
  }
);
  setSupportActionBar(getAppbar().getToolbar());
  frameLayout=findViewById(R.id.content_frame);
  indicator_layout=findViewById(R.id.indicator_layout);
  mDrawerLinear=findViewById(R.id.left_drawer);
  if (getAppTheme().equals(AppTheme.DARK))   mDrawerLinear.setBackgroundColor(Utils.getColor(this,R.color.holo_dark_background));
 else   if (getAppTheme().equals(AppTheme.BLACK))   mDrawerLinear.setBackgroundColor(Utils.getColor(this,android.R.color.black));
 else   mDrawerLinear.setBackgroundColor(Color.WHITE);
  mDrawerLayout=findViewById(R.id.drawer_layout);
  mDrawerList=findViewById(R.id.menu_drawer);
  drawerHeaderView.setBackgroundResource(R.drawable.amaze_header);
  boolean initDrawerOpen;
  if (findViewById(R.id.tab_frame) != null) {
    mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN,mDrawerLinear);
    mDrawerLayout.setScrimColor(Color.TRANSPARENT);
    isDrawerLocked=true;
    initDrawerOpen=true;
  }
 else {
    mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED,mDrawerLinear);
    isDrawerLocked=false;
    initDrawerOpen=false;
  }
  mDrawerLayout.post(() -> {
    if (initDrawerOpen) {
      mDrawerLayout.openDrawer(mDrawerLinear);
    }
 else {
      mDrawerLayout.closeDrawer(mDrawerLinear);
    }
  }
);
  mDrawerList.addHeaderView(drawerHeaderLayout);
  getSupportActionBar().setDisplayShowTitleEnabled(false);
  fabBgView=findViewById(R.id.fab_bg);
  if (getAppTheme().equals(AppTheme.DARK) || getAppTheme().equals(AppTheme.BLACK)) {
    fabBgView.setBackgroundResource(R.drawable.fab_shadow_dark);
  }
  fabBgView.setOnClickListener(view -> {
    if (getAppbar().getSearchView().isEnabled())     getAppbar().getSearchView().hideSearchView();
  }
);
  setDrawerHeaderBackground();
  if (SDK_INT == Build.VERSION_CODES.KITKAT_WATCH || SDK_INT == Build.VERSION_CODES.KITKAT) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    FrameLayout.MarginLayoutParams p=(ViewGroup.MarginLayoutParams)findViewById(R.id.drawer_layout).getLayoutParams();
    SystemBarTintManager.SystemBarConfig config=tintManager.getConfig();
    if (!isDrawerLocked)     p.setMargins(0,config.getStatusBarHeight(),0,0);
  }
 else   if (SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    Window window=getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    if (isDrawerLocked) {
      window.setStatusBarColor((skinStatusBar));
    }
 else     window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    if (colourednavigation)     window.setNavigationBarColor(skinStatusBar);
  }
}