Program: 3043
Project: 3043
Buggy source:
public EventDialog(Context context,Event event,Activity activity,boolean fromMap){
  super(context);
  this.mContext=context;
  this.mEvent=event;
  this.mActivity=activity;
  this.requestWindowFeature(Window.FEATURE_NO_TITLE);
  this.setContentView(R.layout.popupcontentdialog);
  this.setCancelable(true);
  this.fromMap=fromMap;
  dialogIcon=(ImageView)findViewById(R.id.PopupDialogTypeIconImageView);
  dialogIcon.setImageResource(Utilities.getImageIcon(this.mEvent));
  TextView dialogDateTime=(TextView)findViewById(R.id.PopupDialogDateAndTimeTextView);
  TextView dialogLocation=(TextView)findViewById(R.id.PopupDialogLocationTextView);
  dialogDateTime.setText(DateFormat.format("String_Node_Str" + DateFormat.HOUR_OF_DAY + "String_Node_Str",this.mEvent.getDatetime()));
  if (this.mEvent.getLocation() != null) {
    try {
      address=MyLocation.getAddressForLocation(mContext,this.mEvent.getLocation());
      addressString+=address.getAddressLine(0) + "String_Node_Str";
      addressString+=address.getAddressLine(1) + "String_Node_Str";
    }
 catch (    Exception e) {
      addressString="String_Node_Str";
    }
  }
  dialogLocation.setText(addressString);
  mainLayout=(LinearLayout)findViewById(R.id.PopupContentLinearLayout);
  emotionLayout=(LinearLayout)findViewById(R.id.PopupMenuDockLinearLayout);
  updateMainview();
  ((TimelineActivity)mActivity).setSelectedEvent(this.mEvent);
  setupAddButtonQuickAction();
  setupEmotionButtonQuickAction();
  final ToggleButton shareButton=(ToggleButton)findViewById(R.id.PopupShareButton);
  shareButton.setTag(this.mEvent);
  shareButton.setChecked(mEvent.isShared());
  if (((TimelineActivity)activity).getTimeline().isShared() && Utilities.isConnectedToInternet(mContext)) {
    shareButton.setEnabled(!mEvent.isShared());
  }
 else {
    shareButton.setEnabled(false);
  }
  shareButton.setOnCheckedChangeListener(new OnCheckedChangeListener(){
    public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      mEvent.setShared(isChecked);
      shareButton.setEnabled(!mEvent.isShared());
      Thread shareThread=new Thread(shareEventThread,"String_Node_Str");
      shareThread.start();
    }
  }
);
  ImageButton deleteButton=(ImageButton)findViewById(R.id.popupDeleteButton);
  deleteButton.setTag(event);
  deleteButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      AlertDialog.Builder builder=new AlertDialog.Builder(mActivity);
      builder.setMessage(R.string.Delete_event_confirmation).setPositiveButton(R.string.yes_label,deleteEventListener).setNegativeButton(R.string.no_label,new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int which){
          try {
            dialog.cancel();
          }
 catch (          Exception e) {
          }
        }
      }
).setOnCancelListener(new OnCancelListener(){
        public void onCancel(        DialogInterface dialog){
          try {
            dialog.cancel();
          }
 catch (          Exception e) {
          }
        }
      }
);
      AlertDialog confirmation=builder.create();
      confirmation.show();
    }
  }
);
  shareEventThread=new Runnable(){
    public void run(){
      GAEHandler.send(mEvent,mActivity);
      ContentUpdater updater=new ContentUpdater(mContext);
      updater.setEventShared(mEvent);
    }
  }
;
}

Fixed version (ground truth):
public EventDialog(Context context,Event event,Activity activity,boolean fromMap){
  super(context);
  this.mContext=context;
  this.mEvent=event;
  this.mActivity=activity;
  this.requestWindowFeature(Window.FEATURE_NO_TITLE);
  this.setContentView(R.layout.popupcontentdialog);
  this.setCancelable(true);
  this.fromMap=fromMap;
  dialogIcon=(ImageView)findViewById(R.id.PopupDialogTypeIconImageView);
  dialogIcon.setImageResource(Utilities.getImageIcon(this.mEvent));
  TextView dialogDateTime=(TextView)findViewById(R.id.PopupDialogDateAndTimeTextView);
  TextView dialogLocation=(TextView)findViewById(R.id.PopupDialogLocationTextView);
  dialogDateTime.setText(DateFormat.format("String_Node_Str" + DateFormat.HOUR_OF_DAY + "String_Node_Str",this.mEvent.getDatetime()));
  if (this.mEvent.getLocation() != null) {
    try {
      address=MyLocation.getAddressForLocation(mContext,this.mEvent.getLocation());
      addressString+=address.getAddressLine(0) + "String_Node_Str";
      addressString+=address.getAddressLine(1) + "String_Node_Str";
    }
 catch (    Exception e) {
      addressString="String_Node_Str";
    }
  }
  dialogLocation.setText(addressString);
  mainLayout=(LinearLayout)findViewById(R.id.PopupContentLinearLayout);
  emotionLayout=(LinearLayout)findViewById(R.id.PopupMenuDockLinearLayout);
  updateMainview();
  ((TimelineActivity)mActivity).setSelectedEvent(this.mEvent);
  setupAddButtonQuickAction();
  setupEmotionButtonQuickAction();
  final ToggleButton shareButton=(ToggleButton)findViewById(R.id.PopupShareButton);
  shareButton.setTag(this.mEvent);
  shareButton.setChecked(mEvent.isShared());
  if (((TimelineActivity)activity).getTimeline().isShared() && Utilities.isConnectedToInternet(mContext)) {
    shareButton.setEnabled(!mEvent.isShared());
  }
 else {
    shareButton.setEnabled(false);
  }
  shareButton.setOnCheckedChangeListener(new OnCheckedChangeListener(){
    public void onCheckedChanged(    CompoundButton buttonView,    boolean isChecked){
      mEvent.setShared(isChecked);
      shareButton.setEnabled(!mEvent.isShared());
      Thread shareThread=new Thread(shareEventThread,"String_Node_Str");
      shareThread.start();
    }
  }
);
  ImageButton deleteButton=(ImageButton)findViewById(R.id.popupDeleteButton);
  deleteButton.setTag(event);
  deleteButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      AlertDialog.Builder builder=new AlertDialog.Builder(mActivity);
      builder.setMessage(R.string.Delete_event_confirmation).setPositiveButton(R.string.yes_label,deleteEventListener).setNegativeButton(R.string.no_label,new DialogInterface.OnClickListener(){
        public void onClick(        DialogInterface dialog,        int which){
          try {
            dialog.cancel();
          }
 catch (          Exception e) {
          }
        }
      }
).setOnCancelListener(new OnCancelListener(){
        public void onCancel(        DialogInterface dialog){
          try {
            dialog.cancel();
          }
 catch (          Exception e) {
          }
        }
      }
);
      AlertDialog confirmation=builder.create();
      confirmation.show();
    }
  }
);
  shareEventThread=new Runnable(){
    public void run(){
      GAEHandler.persistTimelineObject(mEvent);
      ContentUpdater updater=new ContentUpdater(mContext);
      updater.setEventShared(mEvent);
    }
  }
;
}