Program: 187175
Project: 187175
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  try {
    if (mActivity == null)     initAddClips();
  }
 catch (  Exception e) {
    Log.e(AppConstants.TAG,"String_Node_Str",e);
    return null;
  }
  int layout=getArguments().getInt("String_Node_Str");
  View view=inflater.inflate(layout,null);
  if (layout == R.layout.fragment_add_clips) {
    mAddClipsViewPager=(ViewPager)view.findViewById(R.id.viewPager);
    mAddClipsViewPager.setPageMargin(-75);
    mAddClipsViewPager.setPageMarginDrawable(R.drawable.ic_action_forward_gray);
    mAddClipsViewPager.setAdapter(mAddClipsPagerAdapter);
    mAddClipsViewPager.setOnPageChangeListener(new OnPageChangeListener(){
      int mDragAtEnd=0;
      @Override public void onPageScrollStateChanged(      int state){
      }
      @Override public void onPageScrolled(      int position,      float positionOffset,      int positionOffsetPixels){
        if (((position + 1) == mTemplate.getScene(mScene).getClips().size()) && positionOffset == 0 & positionOffsetPixels == 0) {
          mDragAtEnd++;
          if (mDragAtEnd > mTemplate.getScene(mScene).getClips().size()) {
            AlertDialog.Builder builder=new AlertDialog.Builder(mActivity);
            builder.setMessage(R.string.add_new_clip_to_the_scene_).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
              @Override public void onClick(              DialogInterface dialog,              int which){
                ((SceneEditorActivity)mActivity).addShotToScene();
              }
            }
).setNegativeButton(R.string.no,null).show();
            mDragAtEnd=0;
          }
        }
 else {
          mDragAtEnd=0;
        }
      }
      @Override public void onPageSelected(      int position){
        mActivity.mMPM.mClipIndex=position;
      }
    }
);
  }
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  try {
    if (mActivity == null)     initAddClips();
  }
 catch (  Exception e) {
    Log.e(AppConstants.TAG,"String_Node_Str",e);
    return null;
  }
  int layout=getArguments().getInt("String_Node_Str");
  View view=inflater.inflate(layout,null);
  if (layout == R.layout.fragment_add_clips) {
    mAddClipsViewPager=(ViewPager)view.findViewById(R.id.viewPager);
    mAddClipsViewPager.setPageMarginDrawable(R.drawable.ic_action_forward_gray);
    mAddClipsViewPager.setAdapter(mAddClipsPagerAdapter);
    mAddClipsViewPager.setOnPageChangeListener(new OnPageChangeListener(){
      int mDragAtEnd=0;
      @Override public void onPageScrollStateChanged(      int state){
      }
      @Override public void onPageScrolled(      int position,      float positionOffset,      int positionOffsetPixels){
        if (((position + 1) == mTemplate.getScene(mScene).getClips().size()) && positionOffset == 0 & positionOffsetPixels == 0) {
          mDragAtEnd++;
          if (mDragAtEnd > mTemplate.getScene(mScene).getClips().size()) {
            AlertDialog.Builder builder=new AlertDialog.Builder(mActivity);
            builder.setMessage(R.string.add_new_clip_to_the_scene_).setPositiveButton(R.string.yes,new DialogInterface.OnClickListener(){
              @Override public void onClick(              DialogInterface dialog,              int which){
                ((SceneEditorActivity)mActivity).addShotToScene();
              }
            }
).setNegativeButton(R.string.no,null).show();
            mDragAtEnd=0;
          }
        }
 else {
          mDragAtEnd=0;
        }
      }
      @Override public void onPageSelected(      int position){
        mActivity.mMPM.mClipIndex=position;
      }
    }
);
  }
  return view;
}