Program: 187900
Project: 187900
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Intent intent=getIntent();
  mStartCountdown=false;
  mCountdownState=STATE_COUNTDOWN_IDLE;
  mRingtoneType=RingtoneManager.TYPE_ALL;
  final String action=intent.getAction();
  if (Intent.ACTION_EDIT.equals(action) || Intent.ACTION_VIEW.equals(action)) {
    mState=STATE_EDIT;
    mUri=intent.getData();
    cancelNotification(mUri);
  }
 else   if (Intent.ACTION_INSERT.equals(action)) {
    mState=STATE_INSERT;
    ContentValues cv=new ContentValues();
    cv.put(Durations.RING,CHECKED);
    cv.put(Durations.RINGTONE,RingtoneManager.getDefaultUri(mRingtoneType).toString());
    cv.put(Durations.VIBRATE,CHECKED);
    mUri=getContentResolver().insert(intent.getData(),cv);
    intent.setAction(Intent.ACTION_EDIT);
    intent.setData(mUri);
    setIntent(intent);
    if (mUri == null) {
      Log.e(TAG,"String_Node_Str" + getIntent().getData());
      finish();
      return;
    }
    setResult(RESULT_OK,(new Intent()).setAction(mUri.toString()));
  }
 else {
    Log.e(TAG,"String_Node_Str");
    finish();
    return;
  }
  setContentView(R.layout.countdown_editor);
  mText=(EditText)findViewById(R.id.title);
  mDurationPicker=(DurationPicker)findViewById(R.id.durationpicker);
  mDurationPicker.setCurrentMinute(0);
  mDurationPicker.setCurrentSecond(0);
  mCountdownView=(TextView)findViewById(R.id.countdown);
  mStart=(Button)findViewById(R.id.start);
  mStart.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      start();
    }
  }
);
  mStop=(Button)findViewById(R.id.stop);
  mStop.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      stop();
    }
  }
);
  mModify=(Button)findViewById(R.id.modify);
  mModify.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      modify();
    }
  }
);
  mCont=(Button)findViewById(R.id.cont);
  mCont.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      cont();
    }
  }
);
  mRingtoneView=(CheckBox)findViewById(R.id.ringtone);
  mRingtoneView.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton view,    boolean checked){
      setRingtone(checked);
    }
  }
);
  mVibrateView=(CheckBox)findViewById(R.id.vibrate);
  mVibrateView.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton view,    boolean checked){
      if (checked) {
        mVibrate=CHECKED;
      }
 else {
        mVibrate=UNCHECKED;
      }
    }
  }
);
  mCursor=managedQuery(mUri,Durations.PROJECTION,null,null,null);
  if (savedInstanceState != null) {
    mOriginalContent=savedInstanceState.getString(ORIGINAL_CONTENT);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Intent intent=getIntent();
  mCountdownState=STATE_COUNTDOWN_IDLE;
  mRingtoneType=RingtoneManager.TYPE_ALL;
  final String action=intent.getAction();
  if (Intent.ACTION_EDIT.equals(action) || Intent.ACTION_VIEW.equals(action)) {
    mState=STATE_EDIT;
    mUri=intent.getData();
    cancelNotification(mUri);
  }
 else   if (Intent.ACTION_INSERT.equals(action)) {
    mState=STATE_INSERT;
    ContentValues cv=new ContentValues();
    cv.put(Durations.RING,CHECKED);
    cv.put(Durations.RINGTONE,RingtoneManager.getDefaultUri(mRingtoneType).toString());
    cv.put(Durations.VIBRATE,CHECKED);
    mUri=getContentResolver().insert(intent.getData(),cv);
    intent.setAction(Intent.ACTION_EDIT);
    intent.setData(mUri);
    setIntent(intent);
    if (mUri == null) {
      Log.e(TAG,"String_Node_Str" + getIntent().getData());
      finish();
      return;
    }
    setResult(RESULT_OK,(new Intent()).setAction(mUri.toString()));
  }
 else {
    Log.e(TAG,"String_Node_Str");
    finish();
    return;
  }
  setContentView(R.layout.countdown_editor);
  mText=(EditText)findViewById(R.id.title);
  mDurationPicker=(DurationPicker)findViewById(R.id.durationpicker);
  mDurationPicker.setCurrentMinute(0);
  mDurationPicker.setCurrentSecond(0);
  mCountdownView=(TextView)findViewById(R.id.countdown);
  mStart=(Button)findViewById(R.id.start);
  mStart.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      start();
    }
  }
);
  mStop=(Button)findViewById(R.id.stop);
  mStop.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      stop();
    }
  }
);
  mModify=(Button)findViewById(R.id.modify);
  mModify.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      modify();
    }
  }
);
  mCont=(Button)findViewById(R.id.cont);
  mCont.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View arg0){
      cont();
    }
  }
);
  mRingtoneView=(CheckBox)findViewById(R.id.ringtone);
  mRingtoneView.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton view,    boolean checked){
      setRing(checked);
    }
  }
);
  mVibrateView=(CheckBox)findViewById(R.id.vibrate);
  mVibrateView.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener(){
    @Override public void onCheckedChanged(    CompoundButton view,    boolean checked){
      setVibrate(checked);
    }
  }
);
  mCursor=managedQuery(mUri,Durations.PROJECTION,null,null,null);
  if (savedInstanceState != null) {
    mOriginalContent=savedInstanceState.getString(ORIGINAL_CONTENT);
  }
}