Program: 94117
Project: 94117
Buggy source:
public static void addSaveButtons(XC_InitPackageResources.InitPackageResourcesParam resparam,final XModuleResources mResources,final Context localContext,final boolean mModeSave,final boolean mModeStory){
  Logger.log("String_Node_Str");
  final FrameLayout.LayoutParams layoutParams=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.BOTTOM | Gravity.START);
  final Bitmap saveImg=BitmapFactory.decodeResource(mResources,R.mipmap.snap_button);
  resparam.res.hookLayout(Common.PACKAGE_SNAP,"String_Node_Str","String_Node_Str",new XC_LayoutInflated(){
    @Override public void handleLayoutInflated(    LayoutInflatedParam liparam) throws Throwable {
      final FrameLayout frameLayout=(FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("String_Node_Str","String_Node_Str",Common.PACKAGE_SNAP)).getParent();
      saveStoryButton=new ImageButton(localContext);
      saveStoryButton.setLayoutParams(layoutParams);
      saveStoryButton.setBackgroundColor(0);
      saveStoryButton.setImageBitmap(saveImg);
      saveStoryButton.setVisibility(mModeSave ? View.VISIBLE : View.INVISIBLE);
      frameLayout.addView(saveStoryButton);
      saveStoryButton.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          Logger.printTitle("String_Node_Str");
          Saving.saveSnapButtonPress();
        }
      }
);
    }
  }
);
  resparam.res.hookLayout(Common.PACKAGE_SNAP,"String_Node_Str","String_Node_Str",new XC_LayoutInflated(){
    @Override public void handleLayoutInflated(    LayoutInflatedParam liparam) throws Throwable {
      final FrameLayout frameLayout=(FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("String_Node_Str","String_Node_Str",Common.PACKAGE_SNAP)).getParent();
      saveSnapButton=new ImageButton(localContext);
      saveSnapButton.setLayoutParams(layoutParams);
      saveSnapButton.setBackgroundColor(0);
      saveSnapButton.setImageBitmap(saveImg);
      saveSnapButton.setVisibility(mModeStory ? View.VISIBLE : View.INVISIBLE);
      frameLayout.addView(saveSnapButton);
      saveSnapButton.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          Logger.printTitle("String_Node_Str");
          Saving.saveSnapButtonPress();
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public static void addSaveButtons(XC_InitPackageResources.InitPackageResourcesParam resparam,final XModuleResources mResources,final Context localContext,final boolean mModeSave,final boolean mModeStory){
  Logger.log("String_Node_Str");
  final FrameLayout.LayoutParams layoutParams=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.BOTTOM | Gravity.START);
  final Bitmap saveImg=BitmapFactory.decodeResource(mResources,R.mipmap.snap_button);
  resparam.res.hookLayout(Common.PACKAGE_SNAP,"String_Node_Str","String_Node_Str",new XC_LayoutInflated(){
    @Override public void handleLayoutInflated(    LayoutInflatedParam liparam) throws Throwable {
      final FrameLayout frameLayout=(FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("String_Node_Str","String_Node_Str",Common.PACKAGE_SNAP)).getParent();
      saveStoryButton=new ImageButton(localContext);
      saveStoryButton.setLayoutParams(layoutParams);
      saveStoryButton.setBackgroundColor(0);
      saveStoryButton.setImageBitmap(saveImg);
      saveStoryButton.setAlpha(0.8f);
      saveStoryButton.setVisibility(mModeSave ? View.VISIBLE : View.INVISIBLE);
      frameLayout.addView(saveStoryButton);
      saveStoryButton.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          Logger.printTitle("String_Node_Str");
          Saving.saveSnapButtonPress();
        }
      }
);
    }
  }
);
  resparam.res.hookLayout(Common.PACKAGE_SNAP,"String_Node_Str","String_Node_Str",new XC_LayoutInflated(){
    @Override public void handleLayoutInflated(    LayoutInflatedParam liparam) throws Throwable {
      final FrameLayout frameLayout=(FrameLayout)liparam.view.findViewById(liparam.res.getIdentifier("String_Node_Str","String_Node_Str",Common.PACKAGE_SNAP)).getParent();
      saveSnapButton=new ImageButton(localContext);
      saveSnapButton.setLayoutParams(layoutParams);
      saveSnapButton.setBackgroundColor(0);
      saveSnapButton.setAlpha(0.8f);
      saveSnapButton.setImageBitmap(saveImg);
      saveSnapButton.setVisibility(mModeStory ? View.VISIBLE : View.INVISIBLE);
      frameLayout.addView(saveSnapButton);
      saveSnapButton.setOnClickListener(new View.OnClickListener(){
        @Override public void onClick(        View v){
          Logger.printTitle("String_Node_Str");
          Saving.saveSnapButtonPress();
        }
      }
);
    }
  }
);
}