Program: 170518
Project: 170518
Buggy source:
void setDesc(IssueEvent model){
  SpannableStringBuilder text=new SpannableStringBuilder(model.getActor().getLogin());
  text.append("String_Node_Str");
  String info;
switch (model.getType()) {
case reopened:
    text.append(getString(R.string.issue_reopened));
  break;
case closed:
text.append(getString(R.string.issue_close));
break;
case locked:
text.append(getString(R.string.issue_locked_conversation));
break;
case unlocked:
text.append(getString(R.string.issue_unlocked_conversation));
break;
case crossReferenced:
if (model.getSource().getType() != null) {
info=String.format(getString(R.string.issue_referenced),model.getSource().getIssue().getTitle());
text.append(info);
}
break;
case assigned:
info=String.format(getString(R.string.issue_assigned),model.getAssignee().getLogin());
text.append(info);
break;
case unassigned:
text.append(getString(R.string.issue_unassigned));
break;
case milestoned:
info=String.format(getString(R.string.issue_added_to_milestone),model.getMilestone().getTitle());
text.append(info);
break;
case demilestoned:
info=String.format(getString(R.string.issue_removed_from_milestone),model.getMilestone().getTitle());
text.append(info);
break;
case commentDeleted:
text.append(getString(R.string.issue_delete_comment));
break;
case labeled:
info=String.format(getString(R.string.issue_add_label),"String_Node_Str");
text.append(info);
break;
case unlabeled:
info=String.format(getString(R.string.issue_remove_label),"String_Node_Str");
text.append(info);
break;
default :
break;
}
int labelPos=text.toString().indexOf("String_Node_Str");
Label label=model.getLabel();
if (label != null && labelPos >= 0) {
text.replace(labelPos,labelPos + 7,label.getName());
text.setSpan(new IssueLabelSpan(context,label),labelPos,labelPos + label.getName().length(),0);
}
String timeStr=StringUtils.getNewsTimeStr(context,model.getCreatedAt());
text.append("String_Node_Str").append(timeStr);
desc.setText(text);
}

Fixed version (ground truth):
void setDesc(IssueEvent model){
  SpannableStringBuilder text=new SpannableStringBuilder(model.getActor().getLogin());
  text.append("String_Node_Str");
  String info;
switch (model.getType()) {
case reopened:
    text.append(getString(R.string.issue_reopened));
  break;
case closed:
text.append(getString(R.string.issue_close));
break;
case renamed:
text.append(getString(R.string.issue_modified));
break;
case locked:
text.append(getString(R.string.issue_locked_conversation));
break;
case unlocked:
text.append(getString(R.string.issue_unlocked_conversation));
break;
case crossReferenced:
if (model.getSource().getType() != null) {
info=String.format(getString(R.string.issue_referenced),"String_Node_Str" + model.getSource().getIssue().getTitle());
text.append(info);
}
break;
case assigned:
info=String.format(getString(R.string.issue_assigned),model.getAssignee().getLogin());
text.append(info);
break;
case unassigned:
text.append(getString(R.string.issue_unassigned));
break;
case milestoned:
info=String.format(getString(R.string.issue_added_to_milestone),model.getMilestone().getTitle());
text.append(info);
break;
case demilestoned:
info=String.format(getString(R.string.issue_removed_from_milestone),model.getMilestone().getTitle());
text.append(info);
break;
case commentDeleted:
text.append(getString(R.string.issue_delete_comment));
break;
case labeled:
info=String.format(getString(R.string.issue_add_label),"String_Node_Str");
text.append(info);
break;
case unlabeled:
info=String.format(getString(R.string.issue_remove_label),"String_Node_Str");
text.append(info);
break;
default :
break;
}
int labelPos=text.toString().indexOf("String_Node_Str");
Label label=model.getLabel();
if (label != null && labelPos >= 0) {
text.replace(labelPos,labelPos + 7,label.getName());
text.setSpan(new IssueLabelSpan(context,label),labelPos,labelPos + label.getName().length(),0);
}
String timeStr=StringUtils.getNewsTimeStr(context,model.getCreatedAt());
text.append("String_Node_Str").append(timeStr);
desc.setText(text);
}