Program: 26099
Project: 26099
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mDialogIcon=getArguments().getInt("String_Node_Str");
  mDialogTitle=getArguments().getString("String_Node_Str");
  mDialogText=getArguments().getString("String_Node_Str");
  mImageUrl=(URL)getArguments().getSerializable("String_Node_Str");
  mDialogType=(TYPE)getArguments().getSerializable("String_Node_Str");
  mMenuItems=new LinkedHashMap<>();
switch (mDialogType) {
case IMAGE:
    mMenuItems.put(getString(R.string.action_img_download),new MenuActionLongClick(){
      @Override public void execute(){
        downloadImage(mImageUrl);
      }
      public void executeLongClick(){
        changeDownloadDir();
      }
    }
);
  mMenuItems.put(getString(R.string.action_img_open),new MenuAction(){
    @Override public void execute(){
      openLinkInBrowser(mImageUrl);
    }
  }
);
mMenuItems.put(getString(R.string.action_img_sharelink),new MenuAction(){
  @Override public void execute(){
    shareImage();
  }
}
);
mMenuItems.put(getString(R.string.action_img_copylink),new MenuAction(){
@Override public void execute(){
  copyToCipboard(mDialogTitle,mImageUrl.toString());
}
}
);
break;
case URL:
mMenuItems.put(getString(R.string.action_link_open),new MenuAction(){
@Override public void execute(){
try {
openLinkInBrowser(new URL(mDialogText));
}
 catch (MalformedURLException e) {
Toast.makeText(getActivity(),getString(R.string.error_invalid_url),Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}
}
);
mMenuItems.put(getString(R.string.action_link_share),new MenuAction(){
@Override public void execute(){
shareLink();
}
}
);
mMenuItems.put(getString(R.string.action_link_copy),new MenuAction(){
@Override public void execute(){
copyToCipboard(mDialogTitle,mDialogText);
}
}
);
break;
}
int style=DialogFragment.STYLE_NO_TITLE;
int theme=ThemeChooser.isDarkTheme(getActivity()) ? R.style.Theme_Material_Dialog_Floating : R.style.Theme_Material_Light_Dialog_Floating;
setStyle(style,theme);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mDialogIcon=getArguments().getInt("String_Node_Str");
  mDialogTitle=getArguments().getString("String_Node_Str");
  mDialogText=getArguments().getString("String_Node_Str");
  mImageUrl=(URL)getArguments().getSerializable("String_Node_Str");
  mDialogType=(TYPE)getArguments().getSerializable("String_Node_Str");
  mMenuItems=new LinkedHashMap<>();
switch (mDialogType) {
case IMAGE:
    mMenuItems.put(getString(R.string.action_img_download),new MenuActionLongClick(){
      @Override public void execute(){
        downloadImage(mImageUrl);
      }
      public void executeLongClick(){
        changeDownloadDir();
      }
    }
);
  mMenuItems.put(getString(R.string.action_img_open),new MenuAction(){
    @Override public void execute(){
      openLinkInBrowser(mImageUrl);
    }
  }
);
mMenuItems.put(getString(R.string.action_img_sharelink),new MenuAction(){
  @Override public void execute(){
    shareImage();
  }
}
);
mMenuItems.put(getString(R.string.action_img_copylink),new MenuAction(){
@Override public void execute(){
  copyToCipboard(mDialogTitle,mImageUrl.toString());
}
}
);
break;
case URL:
mMenuItems.put(getString(R.string.action_link_open),new MenuAction(){
@Override public void execute(){
try {
openLinkInBrowser(new URL(mDialogText));
}
 catch (MalformedURLException e) {
Toast.makeText(getActivity(),getString(R.string.error_invalid_url),Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}
}
);
mMenuItems.put(getString(R.string.action_link_share),new MenuAction(){
@Override public void execute(){
shareLink();
}
}
);
mMenuItems.put(getString(R.string.action_link_copy),new MenuAction(){
@Override public void execute(){
copyToCipboard(mDialogTitle,mDialogText);
}
}
);
break;
}
int style=DialogFragment.STYLE_NO_TITLE;
int theme=ThemeChooser.isDarkTheme(getActivity()) ? R.style.FloatingDialog : R.style.FloatingDialogLight;
setStyle(style,theme);
}