Program: 79995
Project: 79995
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.calendar_event_detail_form);
  OActionBarUtils.setActionBar(this,true);
  calendarEvent=new CalendarEvent(this,null);
  actionBar=getSupportActionBar();
  actionBar.setHomeAsUpIndicator(R.drawable.ic_action_mark_undone);
  actionBar.setTitle(R.string.label_new_meeting);
  mView=findViewById(R.id.eventForm);
  event_date_end=(OField)findViewById(R.id.event_date_end);
  event_time_end=(OField)findViewById(R.id.event_end_time);
  event_date_start=(OField)findViewById(R.id.event_date_start);
  event_time_start=(OField)findViewById(R.id.event_start_time);
  allDay=(OField)findViewById(R.id.fieldAllDay);
  if (savedInstanceState != null) {
    mEventColor=savedInstanceState.getString(KEY_EXTRA_EVENT_COLOR);
    color_data=savedInstanceState.getParcelable(KEY_COLOR_DATA);
    colorSelected(color_data);
  }
 else {
    setThemeColor(mEventColor);
  }
  allDay.setOnValueChangeListener(this);
  ((OField)findViewById(R.id.event_date_start)).setOnValueChangeListener(this);
  ((OField)findViewById(R.id.event_start_time)).setOnValueChangeListener(this);
  findViewById(R.id.event_color).setOnClickListener(this);
  findViewById(R.id.reminderForEvent).setOnClickListener(this);
  Bundle extra=getIntent().getExtras();
  eventForm=(OForm)mView;
  if (extra != null) {
    row_id=getIntent().getIntExtra(OColumn.ROW_ID,-1);
    if (row_id != -1) {
      actionBar.setTitle(R.string.label_edit_meeting);
      ODataRow record=calendarEvent.browse(row_id);
      eventForm.initForm(record);
      allDay.setValue(record.getBoolean("String_Node_Str"));
      String dateFormat=(record.getBoolean("String_Node_Str")) ? ODateUtils.DEFAULT_DATE_FORMAT : ODateUtils.DEFAULT_FORMAT;
      event_date_start.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_DATE_FORMAT));
      event_date_end.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_DATE_FORMAT));
      event_time_start.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_TIME_FORMAT));
      event_time_end.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_TIME_FORMAT));
      colorSelected(CalendarUtils.getColorData(record.getInt("String_Node_Str")));
    }
 else {
      ODataRow opp_data=null;
      OField opp_field=(OField)findViewById(R.id.opportunity_id);
      if (extra != null && extra.containsKey("String_Node_Str")) {
        opp_field.setVisibility(View.VISIBLE);
        opp_data=new ODataRow();
        opp_data.put("String_Node_Str",extra.getInt("String_Node_Str"));
      }
      eventForm.initForm(opp_data);
      opp_field.setEditable(false);
    }
  }
 else {
    eventForm.initForm(null);
  }
  String action=getIntent().getAction();
  if (action != null && (action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_DONE) || action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_RE_SCHEDULE))) {
    ONotificationBuilder.cancelNotification(this,getIntent().getExtras().getInt(OColumn.ROW_ID));
    if (action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_DONE)) {
      int row_id=getIntent().getExtras().getInt(OColumn.ROW_ID);
      OValues values=new OValues();
      values.put("String_Node_Str",1);
      calendarEvent.update(row_id,values);
      Toast.makeText(this,R.string.toast_event_marked_done,Toast.LENGTH_LONG).show();
      extra.remove(KEY_RESCHEDULE);
    }
  }
  if (extra != null && extra.containsKey(KEY_RESCHEDULE)) {
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        onClick(findViewById(R.id.reminderForEvent));
      }
    }
,500);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.calendar_event_detail_form);
  OActionBarUtils.setActionBar(this,true);
  calendarEvent=new CalendarEvent(this,null);
  actionBar=getSupportActionBar();
  actionBar.setHomeAsUpIndicator(R.drawable.ic_action_mark_undone);
  actionBar.setTitle(R.string.label_new_meeting);
  mView=findViewById(R.id.eventForm);
  event_date_end=(OField)findViewById(R.id.event_date_end);
  event_time_end=(OField)findViewById(R.id.event_end_time);
  event_date_start=(OField)findViewById(R.id.event_date_start);
  event_time_start=(OField)findViewById(R.id.event_start_time);
  allDay=(OField)findViewById(R.id.fieldAllDay);
  if (savedInstanceState != null) {
    mEventColor=savedInstanceState.getString(KEY_EXTRA_EVENT_COLOR);
    color_data=savedInstanceState.getParcelable(KEY_COLOR_DATA);
    colorSelected(color_data);
  }
 else {
    setThemeColor(mEventColor);
  }
  allDay.setOnValueChangeListener(this);
  ((OField)findViewById(R.id.event_date_start)).setOnValueChangeListener(this);
  ((OField)findViewById(R.id.event_start_time)).setOnValueChangeListener(this);
  findViewById(R.id.event_color).setOnClickListener(this);
  findViewById(R.id.reminderForEvent).setOnClickListener(this);
  Bundle extra=getIntent().getExtras();
  eventForm=(OForm)mView;
  if (extra != null) {
    row_id=getIntent().getIntExtra(OColumn.ROW_ID,-1);
    if (row_id != -1) {
      findViewById(R.id.meetingDeleteLayout).setVisibility(View.VISIBLE);
      findViewById(R.id.meetingDeleteLayout).setOnClickListener(this);
      actionBar.setTitle(R.string.label_edit_meeting);
      ODataRow record=calendarEvent.browse(row_id);
      eventForm.initForm(record);
      allDay.setValue(record.getBoolean("String_Node_Str"));
      String dateFormat=(record.getBoolean("String_Node_Str")) ? ODateUtils.DEFAULT_DATE_FORMAT : ODateUtils.DEFAULT_FORMAT;
      event_date_start.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_DATE_FORMAT));
      event_date_end.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_DATE_FORMAT));
      event_time_start.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_TIME_FORMAT));
      event_time_end.setValue(ODateUtils.parseDate(record.getString("String_Node_Str"),dateFormat,ODateUtils.DEFAULT_TIME_FORMAT));
      colorSelected(CalendarUtils.getColorData(record.getInt("String_Node_Str")));
    }
 else {
      ODataRow opp_data=new ODataRow();
      if (extra.containsKey(CalendarDashboard.KEY_DATE)) {
        event_date_start.setValue(extra.getString(CalendarDashboard.KEY_DATE));
        event_date_end.setValue(extra.getString(CalendarDashboard.KEY_DATE));
      }
      OField opp_field=(OField)findViewById(R.id.opportunity_id);
      if (extra.containsKey("String_Node_Str")) {
        opp_field.setVisibility(View.VISIBLE);
        opp_data.put("String_Node_Str",extra.getInt("String_Node_Str"));
      }
      eventForm.initForm(opp_data);
      opp_field.setEditable(false);
    }
  }
 else {
    eventForm.initForm(null);
  }
  String action=getIntent().getAction();
  if (action != null && (action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_DONE) || action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_RE_SCHEDULE))) {
    ONotificationBuilder.cancelNotification(this,getIntent().getExtras().getInt(OColumn.ROW_ID));
    if (action.equals(ReminderReceiver.ACTION_EVENT_REMINDER_DONE)) {
      int row_id=getIntent().getExtras().getInt(OColumn.ROW_ID);
      OValues values=new OValues();
      values.put("String_Node_Str",1);
      calendarEvent.update(row_id,values);
      Toast.makeText(this,R.string.toast_event_marked_done,Toast.LENGTH_LONG).show();
      extra.remove(KEY_RESCHEDULE);
    }
  }
  if (extra != null && extra.containsKey(KEY_RESCHEDULE)) {
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        onClick(findViewById(R.id.reminderForEvent));
      }
    }
,500);
  }
}