Program: 141905
Project: 141905
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  softpultLayout=(RelativeLayoutWithMultitouch)inflater.inflate(R.layout.pantilt_fragment,container,false);
  softpultLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    public void onGlobalLayout(){
      Log.d(ControlActivity.TAG,"String_Node_Str");
      if (cc == null || fader == null) {
        return;
      }
      if (cc.getMode() == CrossControl.MODE_POINTER_PLAIN) {
        fader.setVisibility(View.GONE);
      }
 else {
        fader.setVisibility(View.VISIBLE);
      }
      fader.setValue(cc.getSpeed() / 100.0f,0);
      setCrrSelected();
      setEnableLock();
      softpultLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
    }
  }
);
  EntityManager entityManager=EntityManager.get();
  cc=(CrossControl)softpultLayout.findViewById(R.id.crosscontrol);
  PositionModel positionModel=entityManager.getEntitySelection(EntityManager.CENTRAL_ENTITY_SELECTION).getModel(Type.Position);
  cc.setValueListener(positionModel);
  Float[] position=positionModel.getWidgetValue();
  cc.setValue(position[0],position[1]);
  fader=(FaderVerticalControl)softpultLayout.findViewById(R.id.speedfader);
  fader.setValueListener(new IValueListener(){
    @Override public void onValueChanged(    View v,    float x,    float y){
      cc.setSpeed((int)(x * 100));
    }
  }
);
  Log.d(ControlActivity.TAG,"String_Node_Str" + cc.getSpeed());
  fader.setValue(cc.getSpeed() / 100.0f,0);
  modePlain=(Button)softpultLayout.findViewById(R.id.mode_plain);
  modePlain.setOnClickListener(this);
  modeFollow=(Button)softpultLayout.findViewById(R.id.mode_follow);
  modeFollow.setOnClickListener(this);
  modeSensor=(Button)softpultLayout.findViewById(R.id.mode_sensor);
  modeSensor.setOnClickListener(this);
  lockX=(Button)softpultLayout.findViewById(R.id.lockxdirection);
  lockX.setOnClickListener(this);
  lockY=(Button)softpultLayout.findViewById(R.id.lockydirection);
  lockY.setOnClickListener(this);
  Button reset=(Button)softpultLayout.findViewById(R.id.reset);
  reset.setOnClickListener(this);
  return softpultLayout;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  softpultLayout=(RelativeLayoutWithMultitouch)inflater.inflate(R.layout.pantilt_fragment,container,false);
  softpultLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener(){
    public void onGlobalLayout(){
      Log.d(ControlActivity.TAG,"String_Node_Str");
      if (cc == null || fader == null) {
        return;
      }
      if (cc.getMode() == CrossControl.MODE_POINTER_PLAIN) {
        fader.setVisibility(View.GONE);
      }
 else {
        fader.setVisibility(View.VISIBLE);
      }
      fader.setValue(cc.getSpeed() / 100.0f,0);
      setCrrSelected();
      setEnableLock();
      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        softpultLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
      }
 else {
        softpultLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
      }
    }
  }
);
  EntityManager entityManager=EntityManager.get();
  cc=(CrossControl)softpultLayout.findViewById(R.id.crosscontrol);
  PositionModel positionModel=entityManager.getEntitySelection(EntityManager.CENTRAL_ENTITY_SELECTION).getModel(Type.Position);
  cc.setValueListener(positionModel);
  Float[] position=positionModel.getWidgetValue();
  cc.setValue(position[0],position[1]);
  fader=(FaderVerticalControl)softpultLayout.findViewById(R.id.speedfader);
  fader.setValueListener(new IValueListener(){
    @Override public void onValueChanged(    View v,    float x,    float y){
      cc.setSpeed((int)(x * 100));
    }
  }
);
  Log.d(ControlActivity.TAG,"String_Node_Str" + cc.getSpeed());
  fader.setValue(cc.getSpeed() / 100.0f,0);
  modePlain=(Button)softpultLayout.findViewById(R.id.mode_plain);
  modePlain.setOnClickListener(this);
  modeFollow=(Button)softpultLayout.findViewById(R.id.mode_follow);
  modeFollow.setOnClickListener(this);
  modeSensor=(Button)softpultLayout.findViewById(R.id.mode_sensor);
  modeSensor.setOnClickListener(this);
  lockX=(Button)softpultLayout.findViewById(R.id.lockxdirection);
  lockX.setOnClickListener(this);
  lockY=(Button)softpultLayout.findViewById(R.id.lockydirection);
  lockY.setOnClickListener(this);
  Button reset=(Button)softpultLayout.findViewById(R.id.reset);
  reset.setOnClickListener(this);
  return softpultLayout;
}