Program: 58300
Project: 58300
Buggy source:
@Override public void onViewCreated(final View view,Bundle savedInstanceState){
  ExpandingLayout anim=(ExpandingLayout)getActivity().findViewById(R.id.layoutDetails);
  anim.setAnimationBounds(mStartTop,mFinalTop,mStartBottom,mFinalBottom);
  super.onViewCreated(view,savedInstanceState);
  if (mListener != null) {
    mListener.onAlarmDetailSetTitle(mStat.getName());
    mListener.onAlarmDetailSetTaskerTitle("String_Node_Str");
  }
  loadStatsFromSource(view);
  final EditText edit=(EditText)view.findViewById(R.id.editAlarmSeconds);
  SharedPreferences prefs=getActivity().getSharedPreferences(AlarmDetailFragment.class.getPackage().getName() + "String_Node_Str",Context.MODE_WORLD_READABLE);
  String blockSeconds="String_Node_Str" + mStat.getName() + "String_Node_Str";
  edit.setText(String.valueOf(prefs.getLong(blockSeconds,240)));
  edit.setOnEditorActionListener(new TextView.OnEditorActionListener(){
    @Override public boolean onEditorAction(    TextView textView,    int i,    KeyEvent keyEvent){
      if (i == EditorInfo.IME_ACTION_DONE) {
        return handleTextChange(textView,edit);
      }
      return false;
    }
  }
);
  edit.setOnFocusChangeListener(new View.OnFocusChangeListener(){
    @Override public void onFocusChange(    View view,    boolean b){
      if (!b) {
        handleTextChange((TextView)view,edit);
      }
    }
  }
);
  final Switch onOff=(Switch)view.findViewById(R.id.switchAlarm);
  String blockName="String_Node_Str" + mStat.getName() + "String_Node_Str";
  boolean enabled=prefs.getBoolean(blockName,false);
  onOff.setChecked(enabled);
  getView().findViewById(R.id.editAlarmSeconds).setEnabled(onOff.isChecked());
  onOff.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View view,    MotionEvent motionEvent){
      if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
        boolean isPremium=false;
        Activity baseActivity=getActivity();
        if (baseActivity instanceof MaterialSettingsActivity) {
          isPremium=((MaterialSettingsActivity)getActivity()).isPremium();
        }
 else         if (baseActivity instanceof TaskerActivity) {
          isPremium=((TaskerActivity)getActivity()).isPremium();
        }
        if (isPremium || mFreeAlarm) {
          final boolean b=!onOff.isChecked();
          if (b && !mKnownSafeAlarm) {
            warnUnknownAlarm(onOff);
          }
 else {
            updateEnabledAlarm(b);
            return false;
          }
        }
 else {
          warnLicensing(onOff);
        }
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  View panel=(View)getView().findViewById(R.id.settingsPanel);
  panel.setBackgroundColor(enabled ? getResources().getColor(R.color.background_panel_enabled) : getResources().getColor(R.color.background_panel_disabled));
  panel.setAlpha(enabled ? 1 : (float).4);
  TextView resetButton=(TextView)view.findViewById(R.id.buttonResetStats);
  resetButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View resetView){
      UnbounceStatsCollection stats=UnbounceStatsCollection.getInstance();
      stats.resetStats(getActivity(),mStat.getName());
      loadStatsFromSource(view);
      if (mClearListener != null) {
        mClearListener.onAlarmCleared();
      }
    }
  }
);
  TextView description=(TextView)view.findViewById(R.id.textViewAlarmDescription);
  String descriptionText=EventLookup.getDescription(mStat.getName());
  description.setText(descriptionText);
  mKnownSafeAlarm=EventLookup.isSafe(mStat.getName()) == EventLookup.SAFE;
  mFreeAlarm=EventLookup.isFree(mStat.getName());
}

Fixed version (ground truth):
@Override public void onViewCreated(final View view,Bundle savedInstanceState){
  ExpandingLayout anim=(ExpandingLayout)getActivity().findViewById(R.id.layoutDetails);
  anim.setAnimationBounds(mStartTop,mFinalTop,mStartBottom,mFinalBottom);
  super.onViewCreated(view,savedInstanceState);
  if (mListener != null) {
    mListener.onAlarmDetailSetTitle(mStat.getName());
    mListener.onAlarmDetailSetTaskerTitle(getResources().getString(R.string.tasker_choose_settings));
  }
  loadStatsFromSource(view);
  final EditText edit=(EditText)view.findViewById(R.id.editAlarmSeconds);
  SharedPreferences prefs=getActivity().getSharedPreferences(AlarmDetailFragment.class.getPackage().getName() + "String_Node_Str",Context.MODE_WORLD_READABLE);
  String blockSeconds="String_Node_Str" + mStat.getName() + "String_Node_Str";
  edit.setText(String.valueOf(prefs.getLong(blockSeconds,240)));
  edit.setOnEditorActionListener(new TextView.OnEditorActionListener(){
    @Override public boolean onEditorAction(    TextView textView,    int i,    KeyEvent keyEvent){
      if (i == EditorInfo.IME_ACTION_DONE) {
        return handleTextChange(textView,edit);
      }
      return false;
    }
  }
);
  edit.setOnFocusChangeListener(new View.OnFocusChangeListener(){
    @Override public void onFocusChange(    View view,    boolean b){
      if (!b) {
        handleTextChange((TextView)view,edit);
      }
    }
  }
);
  final Switch onOff=(Switch)view.findViewById(R.id.switchAlarm);
  String blockName="String_Node_Str" + mStat.getName() + "String_Node_Str";
  boolean enabled=prefs.getBoolean(blockName,false);
  onOff.setChecked(enabled);
  getView().findViewById(R.id.editAlarmSeconds).setEnabled(onOff.isChecked());
  onOff.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View view,    MotionEvent motionEvent){
      if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
        boolean isPremium=false;
        Activity baseActivity=getActivity();
        if (baseActivity instanceof MaterialSettingsActivity) {
          isPremium=((MaterialSettingsActivity)getActivity()).isPremium();
        }
 else         if (baseActivity instanceof TaskerActivity) {
          isPremium=((TaskerActivity)getActivity()).isPremium();
        }
        if (isPremium || mFreeAlarm) {
          final boolean b=!onOff.isChecked();
          if (b && !mKnownSafeAlarm) {
            warnUnknownAlarm(onOff);
          }
 else {
            updateEnabledAlarm(b);
            return false;
          }
        }
 else {
          warnLicensing(onOff);
        }
        return true;
      }
 else {
        return false;
      }
    }
  }
);
  View panel=(View)getView().findViewById(R.id.settingsPanel);
  panel.setBackgroundColor(enabled ? getResources().getColor(R.color.background_panel_enabled) : getResources().getColor(R.color.background_panel_disabled));
  panel.setAlpha(enabled ? 1 : (float).4);
  TextView resetButton=(TextView)view.findViewById(R.id.buttonResetStats);
  resetButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View resetView){
      UnbounceStatsCollection stats=UnbounceStatsCollection.getInstance();
      stats.resetStats(getActivity(),mStat.getName());
      loadStatsFromSource(view);
      if (mClearListener != null) {
        mClearListener.onAlarmCleared();
      }
    }
  }
);
  TextView description=(TextView)view.findViewById(R.id.textViewAlarmDescription);
  String descriptionText=EventLookup.getDescription(getActivity(),mStat.getName());
  description.setText(descriptionText);
  mKnownSafeAlarm=EventLookup.isSafe(mStat.getName()) == EventLookup.SAFE;
  mFreeAlarm=EventLookup.isFree(mStat.getName());
}