Program: 42260
Project: 42260
Buggy source:
public static void sendChangeStatusBarIntent(final Activity activity){
  boolean isSysApp=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
  if (isSysApp) {
    Utils.log("String_Node_Str");
    return;
  }
  WindowType type=Utils.getWindowType(activity);
switch (type) {
case Normal:
    boolean needGetColorFromBackground=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
  if (!needGetColorFromBackground)   return;
int delay=Constant.DELAY_GET_CACHEDRAWABLE;
String activityName=activity.getLocalClassName();
if (activityName.equals("String_Node_Str")) {
delay=800;
}
 else if (activityName.equals("String_Node_Str") && activity.getPackageName().equals("String_Node_Str")) {
delay=300;
}
Handler handler=new Handler();
handler.postDelayed(new Runnable(){
@Override public void run(){
Bitmap bitmap=Utils.getBitMapFromActivityBackground(activity);
int color=Color.BLACK;
boolean isdark=false;
boolean darkHandled=false;
if (bitmap != null) {
BitMapColor bitmapColor=Utils.getBitmapColor(bitmap);
if (bitmapColor.mType == Type.FLAT) {
Utils.log("String_Node_Str");
color=bitmapColor.Color;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
darkHandled=true;
}
 else if (bitmapColor.mType == Type.GRADUAL) {
Utils.log("String_Node_Str");
color=bitmapColor.Color;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
darkHandled=true;
if (!(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str")) {
  Utils.resetPadding(activity,Constant.OFFEST_FOR_GRADUAL_ACTIVITY);
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
}
}
 else if (bitmapColor.mType == Type.PICTURE) {
Utils.log("String_Node_Str");
if (Settings.System.getInt(activity.getContentResolver(),SettingsActivity.KEY_PREF_FORCE_TINT,0) == 1) {
  color=bitmapColor.Color;
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
  isdark=Utils.getDarkMode(color);
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
  darkHandled=true;
}
}
}
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,color);
intent.putExtra(Constant.IS_DARKMODE,isdark);
intent.putExtra(Constant.DARKMODE_HANDLE,darkHandled);
activity.sendBroadcast(intent);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",false);
}
}
,delay);
break;
case Translucent:
boolean needGetDarkModeFromBackground=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
if (needGetDarkModeFromBackground) {
Bitmap bitmap=Utils.getBitMapFromActivityBackground(activity);
if (bitmap != null) {
BitMapColor bitmapColor=Utils.getBitmapColor(bitmap);
int color=bitmapColor.Color;
boolean darkMode=Utils.getDarkMode(color);
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,Color.TRANSPARENT);
intent.putExtra(Constant.IS_DARKMODE,darkMode);
intent.putExtra(Constant.DARKMODE_HANDLE,true);
activity.sendBroadcast(intent);
}
}
break;
default :
break;
}
}

Fixed version (ground truth):
public void sendChangeStatusBarIntent(final Activity activity){
  boolean isSysApp=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
  if (isSysApp) {
    Utils.log("String_Node_Str");
    return;
  }
  WindowType type=Utils.getWindowType(activity);
switch (type) {
case Normal:
    boolean needGetColorFromBackground=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
  if (!needGetColorFromBackground)   return;
int delay=Constant.DELAY_GET_CACHEDRAWABLE;
String activityName=activity.getLocalClassName();
if (activityName.equals("String_Node_Str")) {
delay=800;
}
 else if (activityName.equals("String_Node_Str") && activity.getPackageName().equals("String_Node_Str")) {
delay=300;
}
Handler handler=new Handler();
handler.postDelayed(new Runnable(){
@Override public void run(){
Bitmap bitmap=Utils.getBitMapFromActivityBackground(activity);
int color=Color.BLACK;
boolean isdark=false;
boolean darkHandled=false;
if (bitmap != null) {
BitMapColor bitmapColor=Utils.getBitmapColor(bitmap);
if (bitmapColor.mType == Type.FLAT) {
Utils.log("String_Node_Str");
color=bitmapColor.Color;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
darkHandled=true;
}
 else if (bitmapColor.mType == Type.GRADUAL) {
Utils.log("String_Node_Str");
color=bitmapColor.Color;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
darkHandled=true;
if (!(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str")) {
  Utils.resetPadding(activity,Constant.OFFEST_FOR_GRADUAL_ACTIVITY);
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
}
}
 else if (bitmapColor.mType == Type.PICTURE) {
Utils.log("String_Node_Str");
if (Settings.System.getInt(activity.getContentResolver(),SettingsActivity.KEY_PREF_FORCE_TINT,0) == 1) {
  color=bitmapColor.Color;
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
  isdark=Utils.getDarkMode(color);
  XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
  darkHandled=true;
}
}
}
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,color);
intent.putExtra(Constant.IS_DARKMODE,isdark);
intent.putExtra(Constant.DARKMODE_HANDLE,darkHandled);
activity.sendBroadcast(intent);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",false);
}
}
,delay);
break;
case Translucent:
if (this.mDarkModeTranslucent == null) {
Bitmap bitmap=Utils.getBitMapFromActivityBackground(activity);
if (bitmap != null) {
BitMapColor bitmapColor=Utils.getBitmapColor(bitmap);
int color=bitmapColor.Color;
mDarkModeTranslucent=Utils.getDarkMode(color);
}
}
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,Color.TRANSPARENT);
intent.putExtra(Constant.IS_DARKMODE,mDarkModeTranslucent);
intent.putExtra(Constant.DARKMODE_HANDLE,true);
activity.sendBroadcast(intent);
break;
default :
break;
}
}