Program: 42255
Project: 42255
Buggy source:
public void sendChangeStatusBarIntent(Activity activity){
  int backgroundtype=0;
  int color=Color.BLACK;
  String path=null;
  boolean colorHandled=false;
  boolean isdark=false;
  boolean darkHandled=false;
  WindowType type=Utils.getWindowType(activity);
switch (type) {
case Float:
    return;
case Fullscreen:
  color=Color.parseColor("String_Node_Str");
colorHandled=true;
isdark=false;
darkHandled=true;
break;
case Translucent:
color=Color.TRANSPARENT;
colorHandled=true;
Utils.log("String_Node_Str");
break;
default :
boolean exinform=Settings.System.getInt(activity.getContentResolver(),Constant.KEY_PREF_EXPORT_INFORM,0) == 1 ? true : false;
if (exinform) {
Utils.logStandXml(activity);
Utils.exportStandXml(activity);
}
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",1);
darkHandled=true;
backgroundtype=(Integer)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
switch (backgroundtype) {
case 1:
path=(String)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
isdark=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
colorHandled=true;
break;
case 0:
Object obj=XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
if (obj != null) {
color=(Integer)obj;
Utils.log("String_Node_Str" + color);
isdark=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
colorHandled=true;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",false);
break;
}
}
if (!colorHandled) {
ProfileHelper helper=(ProfileHelper)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
if (helper != null) {
try {
backgroundtype=helper.getBackgroundType();
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",backgroundtype);
switch (backgroundtype) {
case 0:
int i=helper.getColor();
if (i != Constant.UNKNOW_COLOR) {
color=i;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
int k=helper.getPaddingOffset();
if (k != 0) {
Utils.resetPadding(activity,k);
}
}
break;
case 1:
path=helper.getBackgroundPath();
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",path);
Bitmap tempmap=helper.getBitmap();
isdark=Utils.getDarkMode(Utils.getBitmapColor(tempmap).Color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
int k=helper.getPaddingOffset();
if (k != 0) {
Utils.resetPadding(activity,k);
}
break;
}
}
 catch (NumberFormatException e) {
e.printStackTrace();
}
}
}
if (!colorHandled) {
darkHandled=true;
ActionBar actionBar=activity.getActionBar();
if (actionBar != null) {
FrameLayout container=(FrameLayout)XposedHelpers.getObjectField(actionBar,"String_Node_Str");
if (container != null) {
Drawable backgroundDrawable=(Drawable)XposedHelpers.getObjectField(container,"String_Node_Str");
if (backgroundDrawable != null) {
try {
color=Utils.getMainColorFromActionBarDrawable(backgroundDrawable);
actionBar.setBackgroundDrawable(new ColorDrawable(color));
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
}
 catch (IllegalArgumentException e) {
}
container.invalidate();
}
}
}
}
if (!colorHandled) {
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
Utils.log("String_Node_Str");
return;
}
break;
}
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_TYPE,backgroundtype);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,color);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_PATH,path);
intent.putExtra(Constant.IS_DARKMODE,isdark);
intent.putExtra(Constant.DARKMODE_HANDLE,darkHandled);
Utils.log("String_Node_Str" + backgroundtype + "String_Node_Str"+ "String_Node_Str"+ color+ "String_Node_Str"+ "String_Node_Str"+ path+ "String_Node_Str"+ "String_Node_Str"+ isdark+ "String_Node_Str"+ "String_Node_Str"+ darkHandled);
activity.sendBroadcast(intent);
}

Fixed version (ground truth):
public void sendChangeStatusBarIntent(Activity activity){
  int backgroundtype=0;
  int color=Color.BLACK;
  String path=null;
  boolean colorHandled=false;
  boolean isdark=false;
  boolean darkHandled=false;
  WindowType type=Utils.getWindowType(activity);
  Utils.log("String_Node_Str" + type);
switch (type) {
case Float:
    return;
case Fullscreen:
  color=Color.parseColor("String_Node_Str");
colorHandled=true;
isdark=false;
darkHandled=true;
break;
case Translucent:
color=Color.TRANSPARENT;
colorHandled=true;
Utils.log("String_Node_Str");
break;
default :
boolean exinform=Settings.System.getInt(activity.getContentResolver(),Constant.KEY_PREF_EXPORT_INFORM,0) == 1 ? true : false;
if (exinform) {
Utils.logStandXml(activity);
Utils.exportStandXml(activity);
}
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",0);
darkHandled=true;
backgroundtype=(Integer)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
switch (backgroundtype) {
case 1:
path=(String)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
isdark=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
colorHandled=true;
break;
case 0:
Object obj=XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
if (obj != null) {
color=(Integer)obj;
Utils.log("String_Node_Str" + color);
isdark=(Boolean)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
colorHandled=true;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",false);
break;
}
}
if (!colorHandled) {
ProfileHelper helper=(ProfileHelper)XposedHelpers.getAdditionalInstanceField(activity,"String_Node_Str");
if (helper != null) {
try {
backgroundtype=helper.getBackgroundType();
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",backgroundtype);
switch (backgroundtype) {
case 0:
int i=helper.getColor();
if (i != Constant.UNKNOW_COLOR) {
color=i;
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
int k=helper.getPaddingOffset();
if (k != 0) {
Utils.resetPadding(activity,k);
}
}
break;
case 1:
path=helper.getBackgroundPath();
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",path);
Bitmap tempmap=helper.getBitmap();
isdark=Utils.getDarkMode(Utils.getBitmapColor(tempmap).Color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
int k=helper.getPaddingOffset();
if (k != 0) {
Utils.resetPadding(activity,k);
}
break;
}
}
 catch (NumberFormatException e) {
e.printStackTrace();
}
}
}
if (!colorHandled) {
darkHandled=true;
ActionBar actionBar=activity.getActionBar();
if (actionBar != null) {
FrameLayout container=(FrameLayout)XposedHelpers.getObjectField(actionBar,"String_Node_Str");
if (container != null) {
Drawable backgroundDrawable=(Drawable)XposedHelpers.getObjectField(container,"String_Node_Str");
if (backgroundDrawable != null) {
try {
color=Utils.getMainColorFromActionBarDrawable(backgroundDrawable);
actionBar.setBackgroundDrawable(new ColorDrawable(color));
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",color);
isdark=Utils.getDarkMode(color);
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",isdark);
colorHandled=true;
}
 catch (IllegalArgumentException e) {
}
container.invalidate();
}
}
}
}
if (!colorHandled) {
XposedHelpers.setAdditionalInstanceField(activity,"String_Node_Str",true);
Utils.log("String_Node_Str");
return;
}
break;
}
Intent intent=new Intent(Constant.INTENT_CHANGE_STATUSBAR_COLOR);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_TYPE,backgroundtype);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_COLOR,color);
intent.putExtra(Constant.STATUSBAR_BACKGROUND_PATH,path);
intent.putExtra(Constant.IS_DARKMODE,isdark);
intent.putExtra(Constant.DARKMODE_HANDLE,darkHandled);
Utils.log("String_Node_Str" + backgroundtype + "String_Node_Str"+ "String_Node_Str"+ color+ "String_Node_Str"+ "String_Node_Str"+ path+ "String_Node_Str"+ "String_Node_Str"+ isdark+ "String_Node_Str"+ "String_Node_Str"+ darkHandled);
activity.sendBroadcast(intent);
}